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
#!/bin/sh | |
# From Gerrit Code Review 2.6 | |
# | |
# Part of Gerrit Code Review (http://code.google.com/p/gerrit/) | |
# | |
# Copyright (C) 2009 The Android Open Source Project | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at |
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
/** | |
* Created by Harris on 2016/7/31. | |
*/ | |
/** | |
* | |
* @ClassName: com.example.mediastore.Song | |
* @Description: 歌曲实体类 | |
* @author zhaokaiqiang | |
* @date 2014-12-4 上午11:49:59 |
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
/** | |
* Created by 赵晨璞 | |
*/ | |
public class StatusBarUtil { | |
/** | |
* 修改状态栏为全透明 | |
* @param activity | |
*/ | |
@TargetApi(19) |
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
/** | |
* Created by 赵晨璞 | |
*/ | |
public class StatusBarUtil { | |
/** | |
* 修改状态栏为全透明 | |
* @param activity | |
*/ | |
@TargetApi(19) |
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 BitmapLruCache extends LruCache<String, Bitmap> implements ImageLoader.ImageCache { | |
public static int getDefaultLruCacheSize() { | |
final int maxMemory = (int) (Runtime.getRuntime().maxMemory() / 1024); | |
final int cacheSize = maxMemory / 8; | |
return cacheSize; | |
} | |
public BitmapLruCache() { | |
this(getDefaultLruCacheSize()); |
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 final static String ACTION_SET_ALARM = "android.intent.action.SET_ALARM"; | |
public static final String EXTRA_HOUR = "android.intent.extra.alarm.HOUR"; | |
public static final String EXTRA_MESSAGE = "android.intent.extra.alarm.MESSAGE"; | |
public static final String EXTRA_MINUTES = "android.intent.extra.alarm.MINUTES"; | |
public static final String EXTRA_SKIP_UI = "android.intent.extra.alarm.SKIP_U"; | |
Intent i = new Intent(ACTION_SET_ALARM); | |
i.putExtra(EXTRA_HOUR, 9); | |
i.putExtra(EXTRA_MINUTES,41); | |
i.putExtra(EXTRA_MESSAGE, "Good"); |
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.text.SimpleDateFormat; | |
import java.util.Date; | |
import android.util.Log; | |
public class LogUtil { | |
private static final boolean DEBUG = true; | |
public static void d(String TAG, String method, String msg) { | |
Log.d(TAG, "[" + method + "]" + msg); |
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
git clone https://..... | |
git add . | |
git commint -m "First Commit" | |
git push origin master | |
改变云端文件后,本地需要 | |
git pull origin master | |
才能进行操作 | |
之后本地更改需要重复上面的add-commit-push操作。 | |
git init将本地文件初始化为一个仓库,也就是生成一个.git隐藏文件。 |
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
/* * 文 件 名: DataCleanManager.java * 描 述: 主要功能有清除内/外缓存,清除数据库,清除sharedPreference,清除files和清除自定义目录 */ | |
import java.io.File; | |
import android.content.Context; | |
import android.os.Environment; | |
/** * 本应用数据清除管理器 */ | |
public class DataCleanManager { | |
/** * 清除本应用内部缓存(/data/data/com.xxx.xxx/cache) * * @param context */ | |
public static void cleanInternalCache(Context context) { |
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 test; | |
import java.util.*; | |
import java.util.Map.Entry; | |
public class B { | |
public static void main(String[] args) { | |
Map<Integer,Integer> mm = new HashMap<Integer,Integer>(); | |
for(int i=0;i<10;i++) { | |
mm.put(i, i); | |
} | |
for( Entry<Integer, Integer> e : mm.entrySet()) { |
NewerOlder