Showing posts with label Tutorial. Show all posts
Showing posts with label Tutorial. Show all posts

Install Google Maps dengan Pod di Swift

Buat File Pod dan Isi :
pod 'GoogleMaps'
Jalan perintah pod install di terminal :
pod install


Install Google Maps dengan Pod di Swift
IOS Google Maps

Berikut contoh instalasi Google Maps dengan Pod :

Controller :
import UIKit

class ViewController: UIViewController {

    @IBOutlet weak var mapView: GMSMapView!
    override func viewDidLoad() {
        super.viewDidLoad()
       
        let camera : GMSCameraPosition = GMSCameraPosition.cameraWithLatitude(-7.798657, longitude: 110.365746, zoom: 15.0)
        mapView.camera = camera
        // Do any additional setup after loading the view, typically from a nib.
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

}
Tambahkan pada AppDelegate,swift :
    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
        GMSServices.provideAPIKey("Key")
        // Override point for customization after application launch.
        return true
    }

Selengkapnya bisa dilihat di  https://youtu.be/s8sTx0vsRR8

Restoring Grub openSUSE (13.1)

Mengembalikan GRUB openSUSE


- Jalankan openSUSE dengan Live USB atau Live CD
- Jalankan masing-masing perintah dibawah ini dan contoh partisi openSUSE ada di sda5 :

> sudo -i

# fdisk -l

# mount /dev/sda5 /mnt
# mount --bind /dev /mnt/dev
# mount --bind /proc /mnt/proc 
# mount --bind /sys /mnt/sys
# chroot /mnt
# grub2-install /dev/sda
# exit

# reboot


Fungsi INSTR di MySQL

Fungsi INSTR di MySQL


mysql> select * from aa;

+---------+---------+
|   id    |  angka  |
+---------+---------+
|       1 | 2,3,5,4 |
|       4 | 4       |
|       2 | 2       |
|       3 | 2,6     |
+---------+---------+
4 rows in set (0.00 sec)


mysql> select * from aa where INSTR(CONCAT(',', angka,','), ',2,');
+---------+---------+
|   id    |  angka  |
+---------+---------+
|       1 | 2,3,5,4 |
|       2 | 2       |
|       3 | 2,6     |
+---------+---------+
3 rows in set (0.00 sec)


mysql> select * from aa where INSTR( angka, '4');
+---------+---------+
|   id    |  angka  |
+---------+---------+
|       1 | 2,3,5,4 |
|       4 | 4       |
+---------+---------+
2 rows in set (0.00 sec)