$ sudo docker pull ubuntu
$ sudo docker run -t -i ubuntu:14.04 /bin/bash
root@856b6aa801af:/# apt-get update
Ign http://archive.ubuntu.com trusty InRelease
Ign http://archive.ubuntu.com trusty-updates InRelease
Ign http://archive.ubuntu.com trusty-security InRelease
Get:1 http://archive.ubuntu.com trusty Release.gpg [933 B]
Get:2 http://archive.ubuntu.com trusty-updates Release.gpg [933 B]
Get:3 http://archive.ubuntu.com trusty-security Release.gpg [933 B]
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
| /** | |
| * 根据经纬度计算日出日落时间 | |
| * @param lat 纬度 | |
| * @param lng 经度 | |
| * @param isSunRise true计算日出,false计算日落 | |
| * @return int[] 0位置为小时,1位置为分钟 | |
| */ | |
| public static int[] getDayTime(double lat, double lng, boolean isSunRise){ | |
| lat = Math.toRadians(lat); |
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
| import java.util.List; | |
| import android.content.Context; | |
| import android.content.Intent; | |
| import android.content.pm.PackageInfo; | |
| import android.content.pm.PackageManager; | |
| import android.content.pm.ProviderInfo; | |
| import android.content.pm.ResolveInfo; | |
| import android.text.TextUtils; | |
| /** |