Tutorial by Examples

You can extend C++ with named operators that are "quoted" by standard C++ operators. First we start with a dozen-line library: namespace named_operator { template<class D>struct make_operator{constexpr make_operator(){}}; template<class T, char, class O> struct half_a...
In C, there are two unary operators - '++' and '--' that are very common source of confusion. The operator ++ is called the increment operator and the operator -- is called the decrement operator. Both of them can be used used in either prefix form or postfix form. The syntax for prefix form for ++ ...
CREATE CERTIFICATE My_New_Cert FROM FILE = 'D:\Temp\CertTest\certificateDER.cer' GO Create the certificate SELECT EncryptByCert(Cert_ID('My_New_Cert'), 'This text will get encrypted') encryption_test Usually, you would encrypt with a symmetric key, that key would get encrypted by the asym...
USE TDE CREATE DATABASE ENCRYPTION KEY WITH ALGORITHM = AES_256 ENCRYPTION BY SERVER CERTIFICATE My_New_Cert GO ALTER DATABASE TDE SET ENCRYPTION ON GO This uses 'Transparent Data Encryption' (TDE)
-- Create the key and protect it with the cert CREATE SYMMETRIC KEY My_Sym_Key WITH ALGORITHM = AES_256 ENCRYPTION BY CERTIFICATE My_New_Cert; GO -- open the key OPEN SYMMETRIC KEY My_Sym_Key DECRYPTION BY CERTIFICATE My_New_Cert; -- Encrypt SELECT EncryptByKey(Key_GUID('SSN_Key_01'),...
Odoo (formerly known as OpenERP and before that, TinyERP) is a suite of open core enterprise management applications. Targeting companies of all sizes, the application suite covers all business needs, from Website/Ecommerce down to manufacturing, inventory and accounting, all seamlessly integrated. ...
The queue is a FIFO (first-in, first-out) data-structure, i.e. the first element added to the queue will be the first element removed ("first out"). Let us consider the example of customers waiting to be helped. Alice, Bob, and Dan are all at the supermarket. Alice is ready to pay, so she...
This function gets existing item form cache, and if the item don't exist in cache, it will fetch item based on the valueFetchFactory function. public static TValue GetExistingOrAdd<TValue>(string key, double minutesForExpiration, Func<TValue> valueFetchFactory) { ...
A common pattern in other languages is having a function that produces a "stream" of objects, and being able to use loop-code to loop over it. We can model this in C++ as template<class T> struct generator_iterator { using difference_type=std::ptrdiff_t; using value_type=T; ...
SASS gives you the ability to omit any parameter except the ones you want to overwrite of course. Let's take again the default-box example: @mixin default-box ($color: red, $borderColor: blue) { color: $color; border: 1px solid $borderColor; clear: both; display: block; mar...
Laravel automatically resolves Eloquent models defined in routes or controller actions whose variable names match a route segment name. For example: Route::get('api/users/{user}', function (App\User $user) { return $user->email; }); In this example, since the Eloquent $user variable de...
To register an explicit binding, use the router's model method to specify the class for a given parameter. You should define your explicit model bindings in the boot method of the RouteServiceProvider class public function boot() { parent::boot(); Route::model('user', App\User::class); ...
By definition: Services are basically constructor functions. They use ‘this’ keyword. Factories are simple functions hence return an object. Under the hood: Factories internally calls provider function. Services internally calls Factory function. Debate: Factories can run code before we retur...
Latest Cordova version: Cordova 6.1.0 - https://cordova.apache.org/news/2016/03/23/tools-release.html Cordova 6.0.0 - https://cordova.apache.org/news/2016/01/28/tools-release.html Latest Android platform and iOS plaatform Cordova Android 5.2.2 - https://cordova.apache.org/announcements/2...
Given these sample data: IDSTATUSSTATUS_TIMESTATUS_BY1ONE2016-09-28-19.47.52.501398USER_13ONE2016-09-28-19.47.52.501511USER_21THREE2016-09-28-19.47.52.501517USER_33TWO2016-09-28-19.47.52.501521USER_23THREE2016-09-28-19.47.52.501524USER_4 Items identified by ID values must move from STATUS 'ONE' to...
SASS's optional arguments let you use a parameter only if you specify its value; otherwise, it will be ignored. Let's take an example of the following mixin: @mixin galerie-thumbnail ($img-height:14em, $img-width: null) { width: $img-width; height: $img-height; outline: 1px solid li...
Transformations can be applied to elements by adding a transform attribute: <circle cx="0" cy="0" r="50" transform="translate(50,50)"/> Or to groups of elements enclosed in <g> tags: <g transform="translate(50,50)"> <circle...
Translate translate moves graphics along specified vectors: <circle cx="0" cy="0" r="50" transform="translate(50,50)"/> The first value is the x translation, and the second the y. If the y is omitted, it will default to 0. Scale scale resizes elem...
Use the value binding to obtain the value of an element. The value binding can be applied to any form control, however there are other bindings that may be better suited for checkboxes, radio buttons, and text inputs. The following example illustrates how to apply the binding element to several for...
Deferred execution enables combining different operations to build the final query, before evaluating the values: var list = new List<int>() {1,1,2,3,5,8}; var query = list.Select(x => x + 1); If we execute the query at this point: foreach (var x in query) { Console.Write($"...

Page 954 of 1336