Tutorial by Topics: en

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 ...
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...
Random number generation in C++ is provided by the <random> header. This header defines random devices, pseudo-random generators and distributions. Random devices return random numbers provided by operating system. They should either be used for initialization of pseudo-random generators or...
This code will turn off the capability for a user to hold down the Shift key when opening a database to skip the default form opening and allow the user access to the Navigation Pane and VB Editor. In DB’s that you do not want users to have access to either of these (along with disabling the use ...
CREATE ROLE name [ [ WITH ] option [ ... ] ] CREATE USER name [ [ WITH ] option [ ... ] ] where option can be: SUPERUSER | NOSUPERUSER | CREATEDB | NOCREATEDB | CREATEROLE | NOCREATEROLE | CREATEUSER | NOCREATEUSER | INHERIT | NOINHERIT | LOGIN | NOLOGIN | CONNECTION LIMIT connlimit | ...
myApp.controller('MyController', function($scope) { ... }); // non-minified code myApp.controller('MyController', ['$scope', function($scope) { ... }]); //support minification function MyController(){} MyController.$inject = ['$scope']; myApp.controller('MyController', MyController)...
With pthreads v3 pthreads can only be loaded when using the cli SAPI, thus it is a good practice to keep the extension=pthreads.so directive in php-cli.ini ONLY, if you are using PHP7 and Pthreads v3. If you are using Wamp on Windows, you have to configure the extension in php.ini : Open php...
Extension methods are methods (Sub or Function) that add functionality to a Type (which may be a Reference Type or a Value Type). These Types may or may not be owned by you. They may or may not be in the same assembly as the Type they are intended to modify. You can allow an opt-in to your exte...
iOS notifications are a simple and powerful way to send data in a loosely coupled way. That is, the sender of a notification doesn't have to care about who (if anyone) receives the notification, it just posts it out there to the rest of the app and it could be picked up by lots of things or nothing ...
bool supported = document.execCommand(commandName, showDefaultUI, valueArgument) commandIdvalue⋮ Inline formatting commands backColorColor value Stringbold createLinkURL StringfontNameFont family namefontSize"1", "2", "3", "4", "5", "6&q...
When an event "fires" (which means the same as "publishing an event" or "emitting an event"), each listener will be called synchronously (source), along with any accompanying data that was passed in to emit(), no matter how many arguments you pass in: myDog.on('bark'...
/* Comment */ Comments in CSS always start with /* and end with */ Comments cannot be nested
render_template(template_name_or_list, **context)

Page 8 of 66