This file contains hidden or 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
<dependency> | |
<groupId>com.pubnub</groupId> | |
<artifactId>pubnub-gson</artifactId> | |
<version>4.14.0</version> | |
</dependency> |
This file contains hidden or 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
Demo: http://pubnub.github.io/d3-bubble/ | |
Tutorial: http://www.developer.com/java/fun-with-d3.js-data-visualization-eye-candy-with-streaming-json.html |
This file contains hidden or 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
protected void setAdvertiseData() { | |
AdvertiseData.Builder mBuilder = new AdvertiseData.Builder() | |
ByteBuffer mManufacturerData = ByteBuffer.allocate(24); | |
byte[] uuid = getIdAsByte(UUID.fromString("0CF052C297CA407C84F8B62AAC4E9020")); | |
mManufacturerData.put(0, (byte)0xBE); // Beacon Identifier | |
mManufacturerData.put(1, (byte)0xAC); // Beacon Identifier | |
for (int i=2; i<=17; i++) { | |
mManufacturerData.put(i, uuid[i-2]); // adding the UUID | |
} | |
mManufacturerData.put(18, (byte)0x00); // first byte of Major |
This file contains hidden or 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
<script type="text/javascript" src="http://pubnub.github.io/eon/lib/eon-map.js"></script> | |
<link type="text/css" rel="stylesheet" href="http://pubnub.github.io/eon/lib/eon.css" /> | |
<div id='map'></div> | |
<script type="text/javascript"> | |
var pubnub = new PubNub({ | |
publishKey: 'demo', | |
subscribeKey: 'demo' | |
}); | |
eon.map({ | |
pubnub: pubnub, |
This file contains hidden or 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
pubnub.subscribe({ | |
channels: [channel], | |
state: { | |
skill: 2 | |
} | |
}); | |
pubnub.addListener({ | |
status: function(statusEvent) { | |
}, |
This file contains hidden or 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
<!-- Include the PubNub Library --> | |
<script src="https://cdn.pubnub.com/sdk/javascript/pubnub.4.17.0.js"></script> | |
<!-- Instantiate PubNub --> | |
<script type="text/javascript"> | |
var pubnub = new PubNub({ | |
subscribeKey: 'Unique Subscribe Key Here', | |
publishKey: 'Unique Publish Key Here', | |
ssl: true |
This file contains hidden or 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
<script src="https://cdn.pubnub.com/sdk/javascript/pubnub.4.17.0.js"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> | |
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp"></script> |
This file contains hidden or 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
topic = "user/path/topic" |
This file contains hidden or 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 pubnub = new PubNub({ | |
publishKey : 'demo', | |
subscribeKey : 'demo' | |
}) |
This file contains hidden or 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
class Brain: NSObject, PNDelegate { | |
let configuration = PNConfiguration(publishKey: "demo", subscribeKey: "demo") | |
var channel = PNChannel() | |
var serverStatus = UILabel() | |
init() { | |
super.init() | |
} | |
} |