Tutorial by Examples: and

A good VOD (Video On Demand) service should start with the basics. Lets say you have a directory on your server that is not publicly accessible, yet through some sort of portal or paywall you want to allow users to access your media. var movie = path.resolve('./public/' + req.params.filename); ...
Implement onMessageReceived that will catch the notification sent from GCM server. @Override public void onMessageReceived(String from, Bundle data) { String message = data.getString("message"); Log.d(TAG, "From: " + from); Log.d(TAG, "Message: "...
To receive the notification, implement application:didReceiveRemoteNotification:fetchCompletionHandler: (or application:didReceiveRemoteNotification: for iOS < 8.0), and call GCMService:appDidReceiveMessage:message to acknowledge the reception of the message to GCM. - (void)application:(UIApplic...
This writeup walks though steps to configure Tomcat to request CAC certificates from the client. It is focused on setting up a development environment, so some features that should be considered for production are not here. (For example it shows using a self-signed certificate for https and it does...
#![feature(asm)] #[cfg(any(target_arch="x86", target_arch="x86_64"))] fn subtract(first: i32, second: i32) { unsafe { // Output values must either be unassigned (let result;) or mutable. let result: i32; // Each value that you pass in will b...
The following example is high level coverage of the key concepts and basic skeletal setup:- Collects credentials from the user (Usually from a login screen you've created) Authenticates the credentials with the server (stores custom authentication) Stores the credentials on the device Exte...
Case 1: While using in the place of method arguments. If a method requires an object of wrapper class as argument.Then interchangeably the argument can be passed a variable of the respective primitive type and vice versa. Example: int i; Integer j; void ex_method(Integer i)//Is a valid statem...
Spring Boot is a bootstrapping framework for Spring applications. It has seamless support for integrating with Jersey also. One of the advantages of this (from the perspective of a Jersey user), is that you have access to Spring's vast ecosystem. To get started, create a new standalone (non-wepapp)...
The pandas.DataFrame.apply() method is used to apply a given function to an entire DataFrame --- for example, computing the square root of every entry of a given DataFrame or summing across each row of a DataFrame to return a Series. The below is a basic example of usage of this function: # create...
The iv is prefixed to the encrypted data aesCBC128Encrypt will create a random IV and prefixed to the encrypted code. aesCBC128Decrypt will use the prefixed IV during decryption. Inputs are the data and key are Data objects. If an encoded form such as Base64 if required convert to and/or from in ...
The iv is prefixed to the encrypted data aesCBC128Encrypt will create a random IV and prefixed to the encrypted code. aesCBC128Decrypt will use the prefixed IV during decryption. Inputs are the data and key are Data objects. If an encoded form such as Base64 if required convert to and/or from in ...
Random mask will show a rundom number from the specified range instead of the actual value: ALTER TABLE Product ALTER COLUMN Price ADD MASKED WITH (FUNCTION = 'random(100,200)') Note that is some cases displayed value might match actual value in column (if randomly selected number matches valu...
In order to compile the driver, it is necessary to have the Linux Kernel source tree. Assuming the sources are at /lib/modules/<kernel-version>, the following Makefile will compile the file driver.c into the driver.ko Kernel Object obj-m := driver.o KDIR := /lib/modules/$(shell uname -r)/bu...
override func viewDidLoad() { super.viewDidLoad() NotificationCenter.default.addObserver(self, selector: Selector(("batteryStateDidChange:")), name: NSNotification.Name.UIDeviceBatteryStateDidChange, object: nil) NotificationCenter.default.addObserver(self, selector: Selecto...
Build the world Go to the freebsdsrc/ (the root directory of the FreeBSD source tree you've already downloaded) and build the world: sudo make -j${NUMBER_OF_PROCESSORS} buildworld KERNCONF=MODEDKERNEL -DNO_CLEAN Estimated time Estimated time on Hasee Q540S running on a one processor: 8 hours...
Install the world sudo make installworld KERNCONF=MODEDKERNEL Estimated time on Hasee Q540S: 5 minutes. Install the kernel sudo make installkernel KERNCONF=MODEDKERNEL Estimated time on Hasee Q540S: a few seconds.
The preserveAspectRatio attribute has an optional parameter: meet | slice. The default behavior is meet which stretches the content in both the x and y dimension until it fills either the width or height of the viewBox. The alternative - slice preserves the aspect ratio of the content but scales up ...
Keychain.h #import <Foundation/Foundation.h> typedef void (^KeychainOperationBlock)(BOOL successfulOperation, NSData *data, OSStatus status); @interface Keychain : NSObject -(id) initWithService:(NSString *) service_ withGroup:(NSString*)group_; -(void)insertKey:(NSString *)key with...
You can push tasks or data to the firebase realtime database and run a worker which listens to the firebase queue to run some background processess Setup firebase Create a Firebase project in the Firebase console, if you don't already have one. If you already have an existing Google project a...
If you have found your software in the ports tree, now its the time to build it. Simple build and install with manual configuration cd /usr/ports/www/apache24 make make install Simple build and install with automatic configuration cd /usr/ports/www/apache24 make BATCH=yes make install ...

Page 106 of 153