Tutorial by Examples: a

This example is a custom binding that replaces text whenever an input value is updated. In this case, spaces will be replaced with "+". It is intended to be used alongside the existing value binding, and shows binding with an object literal. Sample markup with the replaceText binding: &l...
index.html <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="Content-Security-Policy" content="default-src *; script-src 'self' 'unsafe-inline' 'unsafe-eval' *; style-src 'self' 'unsafe-inline' *"/> ...
Using the IntDef#flag() attribute set to true, multiple constants can be combined. Using the same example in this topic: public abstract class Car { //Define the list of accepted constants @IntDef(flag=true, value={MICROCAR, CONVERTIBLE, SUPERCAR, MINIVAN, SUV}) //Tell the compi...
Detailed instructions on getting opencart set up or installed.
CELERY Installation - pip install django-celery Add Basic project structure. - src/ - bin/celery_worker_start # will be explained later on - logs/celery_worker.log - stack/__init __.py - stack/celery.py - stack/settings.py - stack/urls.py - manage.py ...
Step 1: Go to root directory of project and open command line prompt cordova build --release android This generates an unsigned apk under \platforms\android\build\outputs\apk with the name android-release-unsigned.apk Step 2: Key generation for obtaining signed apk Syntax: keytool -genkey ...
Objects that are not built-in To print the source code of a Python object use inspect. Note that this won't work for built-in objects nor for objects defined interactively. For these you will need other methods explained later. Here's how to print the source code of the method randint from the ran...
Given an interface: public interface Logger { void log(String message); } Rather than usage: public void doJob(Logger logger) { if (logger != null) { logger.log("[doJob]:Step 1"); } // ... if (logger != null) { logger.log("[doJob]:Step 2&q...
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)
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. ...
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...
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...
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...

Page 778 of 1099