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
-- Standard awesome library | |
require("awful") | |
require("awful.autofocus") | |
require("awful.rules") | |
-- Theme handling library | |
require("beautiful") | |
-- Notification library | |
require("naughty") | |
vicious = require("vicious") | |
-- Load Debian menu entries |
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
#!/usr/bin/env sh | |
JDK_URL="http://download.oracle.com/otn-pub/java/jdk/7u21-b11/jdk-7u21-linux-i586.tar.gz" | |
JDK_DOWNLOAD_PATH="~/Downloads" | |
JDK_NAME="jdk-7u21-linux-i586" | |
JDK_FILE=$JDK_NAME".tar.gz" | |
JDK_INSTALL_PATH="/usr/lib/jvm/jdk1.7.0/" | |
JDK_EXTRACTED_DIR="jdk1.7.0_21/*" | |
cd $JDK_DOWNLOAD_PATH && wget -c $JDK_URL |
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
Transformation transformation = new Transformation() { | |
@Override | |
public Bitmap transform(Bitmap source) { | |
if(null == source){ | |
return null; | |
} | |
int size = Math.min(source.getWidth(), source.getHeight()); |
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
Uri.Builder builder = Uri.parse(baseUrl).buildUpon(); | |
builder.appendQueryParameter(key, value); | |
return builder.build().toString(); |
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
| |
-- | |
-- 表的结构 `area` | |
-- | |
DROP TABLE IF EXISTS `area`; | |
CREATE TABLE IF NOT EXISTS `area` ( | |
`id` int(11) NOT NULL auto_increment, | |
`areaID` int(11) NOT NULL, | |
`area` varchar(20) character set gbk NOT 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
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end | |
import android.app.Activity; | |
import android.app.Fragment; | |
import android.app.FragmentManager; | |
#parse("File Header.java") | |
public class ${NAME} extends Fragment { | |
private static final String FRAG_TAG = ${NAME}.class.getCanonicalName(); |
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
final String offlineMessageHtml = "DEFINE THIS"; | |
final String timeoutMessageHtml = "DEFINE THIS"; | |
WebView browser = (WebView) findViewById(R.id.webview); | |
browser.setNetworkAvailable(isConnected); | |
browser.setWebViewClient(new WebViewClient() { | |
@Override | |
public boolean shouldOverrideUrlLoading(WebView view, String url) { | |
if (isConnected) { | |
// return false to let the WebView handle the URL |
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 ImageUtils { | |
public static final String TMP_CAPTURE_FILE_NAME = "tmp.jpg"; | |
private static final String CACHE_FILE_DIR = "/app"; | |
public static Bitmap getCircle(Bitmap bitmap, boolean recyle) { | |
if (null == bitmap) | |
return null; | |
int w = bitmap.getWidth(); | |
int h = bitmap.getHeight(); |
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
abstract class Singleton<T> { | |
private T mInstance; | |
protected abstract T create(); | |
public final T get() { | |
synchronized (this) { | |
if (mInstance == null) { | |
mInstance = create(); | |
} |
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 com.example.zhou.helloword.log; | |
import android.util.Log; | |
import com.example.zhou.helloword.BuildConfig; | |
public class Logger { | |
private Logger() { | |
} |
OlderNewer