Posts

Showing posts with the label display

Bluetooth LE example connect to Bluetooth LE device and display GATT Services

Image
Bluetooth LE example connect to Bluetooth LE device and display GATT Services Last post of Bluetooth LE example show how to "Scan specified BLE devices with ScanFilter". This post show how to connect to the device and display the supported service by the device. Modify from last "Scan specified BLE devices with ScanFilter". Basically this part copy from "example code of Bluetooth Le Gatt", refer to "Bluetooth Le Gatt example to link with Arduino/Genuino 101". Create a new activity ControlActivity.java package com.blogspot.android_er.androidblegatt; import android.bluetooth.BluetoothGattCharacteristic; import android.bluetooth.BluetoothGattService; import android.content.BroadcastReceiver; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.ServiceConnection; import android.os.Bundle; import android.os.IBinder; import android.support.annota...

Bootstrap Display a map in a tab page within a tab control

Bootstrap Display a map in a tab page within a tab control Recently i was working with bootstrap and i needed to display a map within a tab page of a tab control. The task look simple enough, below is the html and javascript codes: <html> <head> <link href="./css/bootstrap.min.css" rel="stylesheet" type="text/css" /> <link href="./css/bootstrap.additional.css" rel="stylesheet" type="text/css" /> <script src="./jslib/jquery-1.8.3.min.js"></script> <script src="./jslib/bootstrap.min.js"></script> <script src="./jslib/OpenLayers.js"></script> <script> $(function(){ $("#tabs").tab(); var lat = 1.3000; var lon = 103.8000; updateMap("myMap", lon, lat); }); function updateMap(mapElementId, lon, lat) { var layer = new OpenLayers.Layer.OSM(); map = new OpenLayers.Map(mapElementId); map.addLayer(layer); var epsg43...

Bootstrap Display a network graph within a tab page of a tab control

Bootstrap Display a network graph within a tab page of a tab control Recently I was working with bootstrap and needed to display a network graph within a bootstrap tab control. I decided to use vis.js which is easy to use for creating a graph network. Initially the problem looked simple as all that i need to do is to create tab control using bootstrap and create a graph network in one of its tab pages. Below is the original implementation: <html> <head> <link href="./css/bootstrap.min.css" rel="stylesheet" type="text/css" /> <link href="./css/bootstrap.additional.css" rel="stylesheet" type="text/css" /> <link href="./css/vis.css" rel="stylesheet" type="text/css"> <script src="./jslib/jquery-1.8.3.min.js"></script> <script src="./jslib/bootstrap.min.js"></script> <script src="./jslib/vis.js"></script> ...