Mixpanel tutorial (2) and mixpanel tutorial

Source: Internet
Author: User

Mixpanel tutorial (2) and mixpanel tutorial

6. Send emails and push notifications

Select the user's checkbox, click Send A Notification, and select Email Message/Push Notifiaction from the drop-down list to Send emails or Push notifications to the user.

In the mail body, you can use some special labels, such:


{$ {Name }}} indicates the name attribute in the user Profile.

Click "Continue" to allow you to choose the sending time, or specify the sending time immediately:


Note that there is no Beijing time in the time zone. You can select Shanghai time.

Select Now and Send this Message. The email will be sent immediately.

In addition, there is also a way to send Notifications, which can be scheduled for the time period of sending Notifications.

To send a Push notification to a user, you need to collect the device tokens of the User device in the application delegate and send them to the mixpanel using addPushDeviceToken:

-(Void) application :( UIApplication *) applicationdidRegisterForRemoteNotificationsWithDeviceToken :( NSData *) deviceToken {

Mixpanel * mixpanel = [Mixpanel sharedInstance];

[Mixpanelidentify: @ "kmyhy"];

[Mixpanel. people addPushDeviceToken: deviceToken];

}

If you do this, you will see the device token (the iOS Devices attribute) of the user in the user's Profile ):


Then you can send a Push notification to the user.

The message writing interface of mixpanel is quite interesting. It displays an image of Push notification received when the iPhone lockscreen is locked. to edit the message content, edit the message content on the screen, as shown in:


It is worth noting that the prompt sound cannot be directly added to the Message editing interface. You must provide the prompt sound through Payload in Custom Data. mixpanel will merge Custom Data into the editing result:


For example, write the following Payload to play the default prompt sound and display the logo with a number 1 while the user receives the message:

{"Aps": {"sound": "default", "badge": 1 }}



Math Lab answer 2

% Calculate y based on the following formula, and return the calculated result as the function value. n is input through the form parameter.
Function y = fun1 (n)
Clc
% N = 11;
% Ans = 1.8333 ......
Y = 0;
For k = 1: n
Fm = 0;
For g = 1: k
Fm = fm + g;
End
Y = y + 1/fm;
End

% Calculates and outputs the sum of the square root of the average of every two adjacent elements in the given array s (Length: 9.
Function y = fun2 (s)
Clc
Y = 0;
% S = [12 34 4 23 34 45 18 3 11];
% Ans = 35.9510
For k = 1: length (s)-1
Y = y + sqrt (s (k) + s (k + 1)/2 );
End

% Calculates the square root of all natural numbers whose values are less than the sum of the natural numbers whose values can be divisible by 3 and 7, and returns them as function values.
Function y = fun3 (n)
Clc
% N = 1000;
% Ans = 153.9091
N = 1: n;
F = find (rem (N, 3) = 0 & rem (N, 7) = 0 );
Y = 0;
For k = 1: length (f)
Y = y + f (k );
End
Y = sqrt (y );

% Calculate the value of P based on the following formula
Function y = fun4 (m, n)
Clc
% M = 12; n = 8;
% Ans = 495
Fz = 1; fm1 = 1; fm2 = 1;
For k = 1: m
Fz = fz * k;
If k <= n
Fm1 = fm1 * k;
End
If k <= m-n
Fm2 = fm2 * k;
End
End
Y = fz/fm1/fm2;

% Delete all leading signs (*) In string s, and do not delete signs (*) In the middle and end.
Function y = fun5 (s)
Clc
% S = '******** A * BC * DEF * G ****';
% Ans = A * BC * DEF * G ****
For k = 1: length (s)
If s (k )~ = '*'
T = K-1;
Break
End
End
S (1: t) = []

% Find the maximum element of vector s in the array subscript coexist in the storage unit referred to by k.
Function y = fun6 (s)
Clc
% S = [876 675 896 101 301 401 980 431 451];
% K = 7 m = 980
M = s (1 );
For g = 1: length (s)
If s (g)> m
M = s (g );
K = g;
End
End
K
M

% Combine two positive integers a and B to form an integer in c.
% Merge: place the digits and digits of a In order to hundreds of digits and digits of c.
In turn, the number of digits and the number of digits of % B are placed on the thousands and ten digits of the number of digits of c.
Function y = fun7 (a, B)
Clc
% A = 45; B = 12;
% Ans = 1425
Qw = fix (B/10) * 1000;
Bw = fix (a/10) * 100;
Sw = rem (B, 10) * 10;
Gw = rem (a, 10 );
Y = qw + bw + sw + gw;

% Calculates and outputs the sum of all the factors of the given integer n (excluding the sum of 1 and n itself.
The value of % indicates that n is not greater than 1000.
Function y = fun8 (n)
Clc
% N = 856;
% Ans = 763
S = 0;
For k = 2: n-1
If rem (n... the remaining full text>

Big things lab 2 1 Summary

.... You won't be a big stone ....

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.