Tutorial by Examples: dir

To add a directive with a selector [prefix]Highlight, run: $ ng g d highlight installing directive create src/app/highlight.directive.spec.ts create src/app/highlight.directive.ts update src/app/app.module.ts To prevent prefix usage add --prefix false or -p false flag ...
Service that is used for communication: import { Injectable } from '@angular/core'; import { Subject } from 'rxjs/Subject'; @Injectable() export class ComponentCommunicationService { private componentChangeSource = new Subject(); private newDateCreationSource = new Subject<Date&...
In general, there are two types of Bash scripts: System tools which operate from the current working directory Project tools which modify files relative to their own place in the files system For the second type of scripts, it is useful to change to the directory where the script is stored. T...
/** * Set a custom add to cart URL to redirect to * @return string */ function custom_add_to_cart_redirect() { return 'http://www.yourdomain.com/your-page/'; } add_filter( 'woocommerce_add_to_cart_redirect', 'custom_add_to_cart_redirect' );
Scope is used as the "glue" that we use to communicate between the parent controller, the directive, and the directive template. Whenever the AngularJS application is bootstrapped, a rootScope object is created. Each scope created by controllers, directives and services are prototypically ...
DirectByteBuffer is special implementation of ByteBuffer that has no byte[] laying underneath. We can allocate such ByteBuffer by calling: ByteBuffer directBuffer = ByteBuffer.allocateDirect(16); This operation will allocate 16 bytes of memory. The contents of direct buffers may reside outside ...
The raycaster has an origin, where its ray starts, and a direction, where the ray goes. The origin of the raycaster is at the raycaster entity’s position. We can change the origin of the raycaster by setting the position component of the raycaster entity (or parent entities of the raycaster entity)...
Redis-py provides the execute_command method to directly invoke Redis operations. This functionality can be used to access any modules that may not have a supported interface in the redis-py client. For example, you can use the execute_command to list all of the modules loaded into a Redis server:...
Directional lights are like a light source that is infinitely far away, but shining from a specific direction, like the sun. Thus, absolute position do not have an effect on the intensity of the light on an entity. We can specify the direction using the position component. The example below creates...
The example below is taken from the full docs, available here (GitHub) or here (NPM). Installation npm install --save activedirectory Usage // Initialize var ActiveDirectory = require('activedirectory'); var config = { url: 'ldap://dc.domain.com', baseDN: 'dc=domain,dc=com' }; va...
You can restrict the directions the user is able to scroll to using the following code: func scrollViewDidScroll(_ scrollView: UIScrollView) { if scrollView.contentOffset.x != 0 { scrollView.contentOffset.x = 0 } } Every time the user scrolls on the x-axis, the scrollView's c...
I get the file path from document directory and read that file in chunks of 1024 and save (append) to NSMutableData object or you can directly write to socket. // MARK: - Get file data as chunks Methode. func getFileDataInChunks() { let doumentDirectoryPath = NSSearchPathForDirectoriesI...
Ensure you met all requirements, as per Requirements Mount the temporary API filesystems: cd /location/of/new/root mount -t proc proc proc/ mount --rbind /sys sys/ mount --rbind /dev dev/ mount --rbind /run run/ (optionally) If you need to use an internet connection in the c...
Create an Azure AD B2C Directory Note the Domain name, it'll be used as the tenantName. Register your application Follow the instructions to create an application and enable both Web App and Native client. Refer Register a web application and Register a mobile/native application Enter th...
Refer the example here: https://github.com/NewtonJoshua/Azure-ADB2C-Angularjs-sample Azure AD B2C Azure AD B2C is a cloud identity management solution for your web and mobile applications. It is a highly available global service that scales to hundreds of millions of identities. Mobile app - ADAL...
Refer the example in https://github.com/NewtonJoshua/Azure-ADB2C-Angularjs-sample Web app implementation uses Hello.js that performs identity management with Azure AD B2C . Hello.js is a client-side JavaScript SDK for authenticating with OAuth2 web services and querying REST APIs. jwtHelper of ang...
php -S localhost:80 -t project/public router.php PHP 7.1.7 Development Server started at Fri Jul 14 15:22:25 2017 Listening on http://localhost:80 Document root is /home/project/public Press Ctrl-C to quit.
├───models │ ├───user.model.js ├───routes │ ├───user.route.js ├───services │ ├───user.service.js ├───controllers │ ├───user.controller.js For modular code structure the logic should be divided into these directories and files. Models - The schema definition of the Model Rou...
Given a directive that highlights text on mouse events import { Directive, ElementRef, HostListener, Input } from '@angular/core'; @Directive({ selector: '[appHighlight]' }) export class HighlightDirective { @Input('appHighlight') // tslint:disable-line no-input-rename highlightColor: str...

Page 13 of 13