This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private RelativeLayout mCalendarView; | |
. | |
. | |
. | |
private void expandLayout() { | |
final int widthSpec = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED); | |
final int heightSpec = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED); | |
mCalendarView.measure(widthSpec, heightSpec); | |
ValueAnimator animator = slideAnimator(0, 750); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Date today = new Date(); | |
Calendar cal = Calendar.getInstance(); | |
cal.setTime(today); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Register a new gcm ID | |
GoogleCloudMessaging gcm = GoogleCloudMessaging.getInstance(context); | |
String gcmID = gcm.register(SENDER_ID); | |
//New NotificationHub instance | |
NotificationHub hub = new NotificationHub("<hub name>", "<connection string>", context); | |
//Register your gcm ID with NotificationHub | |
NativeRegistration registration = hub.register(gcmID); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var hubClient = | |
NotificationHubClient.CreateClientFromConnectionString("<connection string>", "<hub name>"); | |
//JSON payload | |
var payload = "{ \"data\" : {\"msg\":\"Hello\"}}"; | |
var tags = new List<string>(){ "tags" }; | |
//Send push notification just to selected tags | |
hubClient.SendGcmNativeNotificationAsync(payload, tags); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Register a new gcm ID | |
GoogleCloudMessaging gcm = GoogleCloudMessaging.getInstance(context); | |
String gcmID = gcm.register(SENDER_ID); | |
//New NotificationHub instance | |
NotificationHub hub = new NotificationHub("<hub name>", "<connection string>", context); | |
String template = "{ \"data\" : {\"msg\":\"$(message)\"}}"; | |
//Register your gcm ID with NotificationHub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var hubClient = | |
NotificationHubClient.CreateClientFromConnectionString("<connection string>", "<hub name>"); | |
var expressions = new Dictionary<string, string>(); | |
expressions.Add("message", "Hello"); | |
//Send platform independent message to all devices | |
hubClient.SendTemplateNotificationAsync(expressions); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cd /opt/bitnami | |
$ sudo ./ctlscript.sh restart mysql |
OlderNewer