Tutorial by Topics: o

include Comparable implement the space-ship operator (<=>) ParameterDetailsotherThe instance to be compared to self x <=> y should return a negative number if x < y, zero if x == y and a positive number if x > y.
a[start:end] # items start through end-1 a[start:] # items start through the rest of the array a[:end] # items from the beginning through end-1 a[start:end:step] # start through not past end, by step a[:] # a copy of the whole array source lst[::-1] gives you a revers...
lock (obj) {} Using the lock statement you can control different threads' access to code within the code block. It is commonly used to prevent race conditions, for example multiple threads reading and removing items from a collection. As locking forces threads to wait for other threads to ...
ActionCable was available for Rails 4.x, and was bundled into Rails 5. It allows easy use of websockets for realtime communication between server and client.
Approach with sealed trait and case objects is preferred because Scala enumeration has a few problems: Enumerations have the same type after erasure. Compiler doesn't complain about “Match is not exhaustive", if case is missed it will fail in runtime scala.MatchError: def isWeekendWith...
You can create package.json with npm init which will ask you about basic facts about your projects, including license identifier.
AR is perfect when you need to delete, update or create one or more records sequentially. Its support of dirty attributes (saving only what was really changed) results in optimized UPDATE statements which lifts the load from database significantly and reduces chances for various conflicts connecte...
by.css('css-selector') by.id('id') by.model('model') by.binding('binding') ParameterDetailscss-selectorA css selector like '.class-name' to select the element on the base of class nameidId of the dom elementmodelModel used for dom elementbindingName of the binding which is used to bound t...
Android Marshmallow introduced Runtime Permission model. Permissions are categorized into two categories i.e. Normal and Dangerous Permissions. where dangerous permissions are now granted by the user at run time. From sdk 23 Android requires runtime permissions for permissions on devices runni...

Page 35 of 283