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
import java.io.IOException; | |
import android.content.Context; | |
import android.net.ConnectivityManager; | |
import android.net.NetworkInfo; | |
import android.util.Log; | |
public class Internet { | |
private NetworkInfo info = null; |
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
public class NewTaipeiCity { | |
public static void main(String[] args) { | |
// 新北 | |
getCity(25.054501, 121.76686); | |
getCity(25.025884, 121.680343); | |
getCity(25.040193, 121.685587); | |
// 臺北 | |
getCity(25.029306, 121.5774); | |
getCity(25.160823, 121.519017); |
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
<?php | |
$devices = explode("\n", shell_exec("adb devices")); | |
$pattern = "/([a-zA-Z0-9]+)\s+device/"; | |
$zip = new ZipArchive; | |
if ($zip->open($argv[1]) === TRUE) { | |
$zip->extractTo('.', 'AndroidManifest.xml'); | |
$zip->close(); | |
} |
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
免則聲明: | |
本 iHelp 內的資訊及服務均以 App 形式提供,本 iHelp 不提供任何種類的明示或暗示的保證,包括但不限於: | |
本 iHelp 不保證 iHelp 資訊及服務的準確性、可靠性、安全性及即時性,您於使用本 iHelp 資訊和服務時應自行評估及判斷, | |
本 iHelp 不保證 iHelp 資訊及服務適合使用者使用, | |
本 iHelp 不保證 iHelp 資訊及服務未侵害第三人之權利 | |
本 iHelp 不保證 iHelp 資訊及服務不含電腦病毒, | |
本 iHelp 不就 iHelp 資訊任何錯誤、遺漏、或與事實不符之處述承擔任何責任。 | |
對於任何因使用本 iHelp 所提供的資訊或服務而導致或所涉及的任何損失、損害或利益之喪失,本 iHelp 概不承擔任何法律責任及賠償義務。 | |
本 iHelp 包含由第三人提供的內容及通往第三人 iHelp 的連結。 本 iHelp 提供的任何第三人所有之內容或 iHelp 連結均不構成任何該等第三人與本 iHelp 的任何形式的合作或聯繫。 |
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
public class Test { | |
public static void main(String[] argv) { | |
MessageDigest md = MessageDigest.getInstance("MD5"); | |
md.update("test"); | |
// md5("test") | |
System.out.pringln(toHexString(md.digest())); | |
// md5(md5("test")) | |
System.out.pringln(toHexString(md.digest())); | |
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
developmentAppKey = UA App Key | |
developmentAppSecret = UA App Secret | |
# 若沒有註冊信用卡則不會有這組key | |
#productionAppKey = 沒信用卡 | |
#productionAppSecret = 沒信用卡 | |
#transport, only gcm is supported for now | |
transport = gcm |
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
package weitsai.UA.demo; | |
import com.urbanairship.AirshipConfigOptions; | |
import com.urbanairship.UAirship; | |
import com.urbanairship.push.PushManager; | |
import weitsai.UA.demo.urbanairship.UrbanairshipNotification; | |
import android.app.Application; |
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
public CAMERA_TEST extends Fragment { | |
private final int CAMERA_IMAGE_CODE = 10; | |
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); | |
File out = new File(Environment.getExternalStorageDirectory(), "test.jpg"); | |
Uri uri = Uri.fromFile(out); | |
intent.putExtra(MediaStore.EXTRA_OUTPUT, uri); | |
startActivityForResult(intent, CAMERA_IMAGE_CODE); |
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
Bitmap bitmap = Media.getBitmap(mContext.getContentResolver(), data.getData()); | |
Matrix vMatrix = new Matrix(); | |
int newWidth = 200; | |
float scaleWidth = newWidth / bitmap.getWidth(); | |
int newHeight = 200; | |
float scaleHeight = newHeight / bitmap.getHeight(); | |
vMatrix.postScale(scaleWidth, scaleHeight); |
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
Download the following ZIPs: | |
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links) | |
Download the correct GApps for your Android version: | |
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip) | |
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip) | |
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip) | |
Google Apps for Android 4.2 (https://www.androidfilehost.com/?fid=23060877490000128 - gapps-jb-20130812-signed.zip) | |
Google Apps for Android 4.1 (https://www.androidfilehost.com/?fid=22979706399755082 - gapps-jb-20121011-signed.zip) |
OlderNewer