Tutorial by Examples: al

Each individual CSS Selector has its own specificity value. Every selector in a sequence increases the sequence's overall specificity. Selectors fall into one of three different specificity groups: A, B and c. When multiple selector sequences select a given element, the browser uses the styles appli...
HTML input validation is done automatically by the browser based on special attributes on the input element. It could partially or completely replace JavaScript input validation. This kind of validation can be circumvented by the user via specially crafted HTTP requests, so it does not replace serve...
Supposing the following list we can sort a variety of ways. val names = List("Kathryn", "Allie", "Beth", "Serin", "Alana") The default behavior of sorted() is to use math.Ordering, which for strings results in a lexographic sort: names.sorted /...
main = do input <- getContents putStr input Input: This is an example sentence. And this one is, too! Output: This is an example sentence. And this one is, too! Note: This program will actually print parts of the output before all of the input has been fully read in. This m...
main = do line <- getLine putStrLn line Input: This is an example. Output: This is an example.
$ docker images REPOSITORY TAG IMAGE ID CREATED SIZE hello-world latest 693bce725149 6 days ago 967 B postgres 9.5 0f3af79d8673 10 weeks ago 265.7 MB postgres ...
In Google Chrome, you can pause execution without needing to place breakpoints. Pause on Exception: While this button is toggled on, if your program hits an unhandled exception, the program will pause as if it had hit a breakpoint. The button can be found near Execution Controls and is useful for ...
To install MongoDB, follow the steps below: For Mac OS: There are two options for Mac OS: manual install or homebrew. Installing with homebrew: Type the following command into the terminal: $ brew install mongodb Installing manually: Download the latest release here. Ma...
It's an emulation of classical inheritance using prototypical inheritance which shows how powerful prototypes are. It was made to make the language more attractive to programmers coming from other languages. 6 IMPORTANT NOTE: Since ES6 it doesn't make sense to use pseudo-calssical inheritance sinc...
Syntax: SELECT * FROM table_name Using the asterisk operator * serves as a shortcut for selecting all the columns in the table. All rows will also be selected because this SELECT statement does not have a WHERE clause, to specify any filtering criteria. This would also work the same way if you...
The following queries will return a list of all Stored Procedures in the database, with basic information about each Stored Procedure: SQL Server 2005 SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_TYPE = 'PROCEDURE' The ROUTINE_NAME, ROUTINE_SCHEMA and ROUTINE_DEFINITION columns are...
While object property notation is usually written as myObject.property, this will only allow characters that are normally found in JavaScript variable names, which is mainly letters, numbers and underscore (_). If you need special characters, such as space, ☺, or user-provided content, this is poss...
When local changes are present, the git pull command aborts reporting : error: Your local changes to the following files would be overwritten by merge In order to update (like svn update did with subversion), you can run : git stash git pull --rebase git stash pop A convenient way coul...
- (void)reachabilityChanged:(NSNotification *)note { Reachability* reachability = [note object]; NetworkStatus netStatus = [reachability currentReachabilityStatus]; if (netStatus == NotReachable) { NSLog(@"Network unavailable"); } }
- (void)reachabilityChanged:(NSNotification *)note { Reachability* reachability = [note object]; NetworkStatus netStatus = [reachability currentReachabilityStatus]; switch (netStatus) { case NotReachable: NSLog(@"Network unavailable"); br...
Functional Interfaces Lambdas can only operate on a functional interface, which is an interface with just one abstract method. Functional interfaces can have any number of default or static methods. (For this reason, they are sometimes referred to as Single Abstract Method Interfaces, or SAM Interf...
5 Object.seal prevents the addition or removal of properties from an object. Once an object has been sealed its property descriptors can't be converted to another type. Unlike Object.freeze it does allow properties to be edited. Attempts to do this operations on a sealed object will fail silently ...
// Java: List<String> list = people.stream().map(Person::getName).collect(Collectors.toList()); // Kotlin: val list = people.map { it.name } // toList() not needed
// Java: int total = employees.stream() .collect(Collectors.summingInt(Employee::getSalary))); // Kotlin: val total = employees.sumBy { it.salary }
// Java: Map<Department, Integer> totalByDept = employees.stream() .collect(Collectors.groupingBy(Employee::getDepartment, Collectors.summingInt(Employee::getSalary))); // Kotlin: val totalByDept = employees.groupBy { it.dept }.mapValues { it.v...

Page 16 of 269