Tutorial by Examples: o

A layout manager for templated views. Used within a ControlTemplate to mark where the content to be presented appears.
An element with a single content. ContentView has very little use of its own. Its purpose is to serve as a base class for user-defined compound views. XAML <ContentView> <Label Text="Hi, I'm a simple Label inside of a simple ContentView" HorizontalOptions="Center" ...
An element capable of scrolling if it's Content requires. ScrollView contains layouts and enables them to scroll offscreen. ScrollView is also used to allow views to automatically move to the visible portion of the screen when the keyboard is showing. Note: ScrollViews should not be nested. In a...
AbsoluteLayout positions and sizes child elements proportional to its own size and position or by absolute values. Child views may be positioned and sized using proportional values or static values, and proportional and static values can be mixed. A definition of an AbsoluteLayout in XAML looks l...
A Layout that uses Constraints to layout its children. RelativeLayout is used to position and size views relative to properties of the layout or sibling views. Unlike AbsoluteLayout, RelativeLayout does not have the concept of the moving anchor and does not have facilities for positioning elements ...
StackLayout organizes views in a one-dimensional line ("stack"), either horizontally or vertically. Views in a StackLayout can be sized based on the space in the layout using layout options. Positioning is determined by the order views were added to the layout and the layout options of the...
Small Core, Small Module :- Build small and single purpose modules not in term of code size only, but also in term of scope that serves a single purpose a - "Small is beautiful" b - "Make each program do one thing well." The Reactor Pattern The Reactor Pattern is t...
Open "Database Tool Window" if you don't have it opened: This what it looks like: Create new data source: By clicking on "+" icon: Or by opening "Data Sources and Drivers" dialog And adding new data source by clicking "+" there If you ...
Authentication in Django REST Framework can be configured globally as a subkey of the REST_FRAMEWORK variable in settings.py, just like the rest of the default framework configurations. REST_FRAMEWORK = { 'DEFAULT_AUTHENTICATION_CLASSES': ( 'rest_framework.authentication.BasicAuthen...
Authentication can be set for an specific APIView endpoint, by using the authentication_classes variable: from rest_framework.authentication import SessionAuthentication, BasicAuthentication from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response ...
Django REST Framework provides a basic token-based authentication mechanism which needs to be configured as an application in Django before being usable, so that tokens are created in the database, and their lifecycle handled. Add Token-based authentication to settings.py INSTALLED_APPS = ( ...
OAuth is not handled by Django REST Framework, but there are a couple of pip modules that implement an OAuth client. The REST Framework documentation suggests one of the following modules: Django OAuth Toolkit Django REST Framework OAuth Django OAuth Toolkit pip install django-oauth-toolkit ...
The most interesting package for managing real tokens is django-rest-knox which supports multiple tokens per user (and cancelling each token independently), as well as having support for token expiration and several other security mechanisms. django-rest-knox depends on cryptography. You can find m...
Simplicity Probably the best part of CoffeeScript is its simplicity. CoffeeScript allows for a more concise and simplistic syntax than plain JavaScript. One simple but surprisingly time-saving feature is that CoffeeScript has no need for ; or {}, eliminating the need to spend hours finding out the ...
This sample uses a ToDataReader method described here Creating a Generic List DataReader for SqlBulkCopy. This can also be done using non-async methods. public class Widget { public int WidgetId {get;set;} public string Name {get;set;} public int Quantity {get;set;} } public as...
This sample uses a ToDataReader method described here Creating a Generic List DataReader for SqlBulkCopy. This can also be done using async methods. public class Widget { public int WidgetId {get;set;} public string Name {get;set;} public int Quantity {get;set;} } public void A...
Static initialization is suitable for most situations. When your application must delay the instantiation, use a non-default constructor or perform other tasks before the instantiation, and work in a multithreaded environment, you need a different solution. Cases do exist, however, in which you cann...
MongoDB.connect('mongodb://localhost:27017/databaseName', function(error, database) { if(error) return console.log(error); const collection = database.collection('collectionName'); collection.insert({key: 'value'}, function(error, result) { console.log(error, result); }); }...
const MongoDB = require('mongodb'); MongoDB.connect('mongodb://localhost:27017/databaseName') .then(function(database) { const collection = database.collection('collectionName'); return collection.insert({key: 'value'}); }) .then(function(result) { co...
You must always unregister scopes other then your current scope as shown below: //always deregister these $rootScope.$on(...); $scope.$parent.$on(...); You don't have to deregister listners on current scope as angular would take care of it: //no need to deregister this $scope.$on(...); $r...

Page 662 of 1038