Tutorial by Examples: o

Include the plugin from a CDN or locally after including jQuery. Then attach the .validate() method to the form in order to initialize the plugin. Within this method you can define your rules, custom messages, and other options. <script type="text/javascript" src="//cdnjs.cloudf...
(defrecord Logline [datetime action user id]) (def pattern #"(\d{8}-\d{2}:\d{2}:\d{2}.\d{3})\|.*\|(\w*),(\w*),(\d*)") (defn parser [line] (if-let [[_ dt a u i] (re-find pattern line)] (->Logline dt a u i))) Define a sample line : (def sample "20170426-17:20:04...
my.pipe.ts import { Pipe, PipeTransform } from '@angular/core'; @Pipe({name: 'myPipe'}) export class MyPipe implements PipeTransform { transform(value:any, args?: any):string { let transformedValue = value; // implement your transformation logic here return transformedValue; }...
About this Project This is simple boilerplate project. This post will guide you to set up the environment for ReactJs + Webpack + Bable. Lets get Started we will need node package manager for fire up express server and manage dependencies throughout the project. if you are new to node package man...
app.module.ts Add these into your app.module.ts file to use reactive forms import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { AppComponent } from './app.component'; @...
The NgFor directive instantiates a template once per item from an iterable. The context for each instantiated template inherits from the outer context with the given loop variable set to the current item from the iterable. To customize the default tracking algorithm, NgFor supports trackBy option. ...
I found this to be the way to properly nest children routes inside the app.routing.ts or app.module.ts file (depending on your preference). This approach works when using either WebPack or SystemJS. The example below shows routes for home, home/counter, and home/counter/fetch-data. The first and l...
Router enables navigation from one view to another based on user interactions with the application. Following are the steps in implementing basic routing in Angular - NOTE: Ensure you have this tag: <base href='/'> as the first child under your head tag in your index.html file. This ele...
One common scenario is to wait for a number of requests to finish before continuing. This can be accomplished using the forkJoin method. In the following example, forkJoin is used to call two methods that return Observables. The callback specified in the .subscribe method will be called when both O...
Detailed instructions on getting facebook-ads-api set up or installed.
Folder Structure . ├── lib ├── modules | ├── misc.js | ├── someFunctions.js ├── app.js ├── index.html ├── package.json ├── webpack.config.js └── webserver.js package.json { "name": "webpack-example-with-nodejs", "version": "1.0.0", ...
This is a just a simple example of how to use GooglePlay Service's ActivityRecognitionApi. Although this is a great library, it does not work on devices that do not have Google Play Services installed. Docs for ActivityRecognition API Manifest <!-- This is needed to use Activity Recognition! -...
PathSense activity recognition is another good library for devices which don't have Google Play Services, as they have built their own activity recognition model, but requires developers register at http://developer.pathsense.com to get an API key and Client ID. Manifest <application andro...
Add repository repositories { maven { url "https://github.com/QuickBlox/quickblox-android-sdk-releases/raw/master/" } } Add in Project Gradle for Chat Functionality dependencies { compile("com.quickblox:quickblox-android-sdk-chat:2.6.1&...
Create session with User & Sign In to QuickBlox Chat // Initialise Chat service QBChatService chatService = QBChatService.getInstance(); final QBUser user = new QBUser("garrysantos", "garrysantospass"); QBAuth.createSession(user, new QBEntityCallback<QBSession>()...
Detailed instructions on getting internet-explorer set up or installed.
First, create a new console project using Visual Studio and add the following .dlls to your project: DocumentFormat.OpenXml WindowsBase Next, compile and execute the following code: static void Main(string[] args) { // Create a Wordprocessing document. using ( WordprocessingDocumen...
You may find yourself needing to clone a row, maybe change a few attributes but you need an efficient way to keep things DRY. Laravel provides a sort of 'hidden' method to allow you to do this functionality. Though it is completely undocumented, you need to search through the API to find it. Using ...
def quicksort(arr): if len(arr) <= 1: return arr pivot = arr[len(arr) / 2] left = [x for x in arr if x < pivot] middle = [x for x in arr if x == pivot] right = [x for x in arr if x > pivot] return quicksort(left) + middle + quicksort(right) print qu...
Sherlock captures all your crashes and reports them as a notification. When you tap on the notification, it opens up an activity with all the crash details along with Device and Application info How to integrate Sherlock with your application? You just need to add Sherlock as a gradle dependency i...

Page 957 of 1038