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
var FindProxyForURL = function(init, profiles) { | |
return function(url, host) { | |
"use strict"; | |
var result = init, scheme = url.substr(0, url.indexOf(":")); | |
do { | |
result = profiles[result]; | |
if (typeof result === "function") result = result(url, host, scheme); | |
} while (typeof result !== "string" || result.charCodeAt(0) === 43); | |
return result; | |
}; |
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
var FindProxyForURL = function(init, profiles) { | |
return function(url, host) { | |
"use strict"; | |
var result = init, scheme = url.substr(0, url.indexOf(":")); | |
do { | |
result = profiles[result]; | |
if (typeof result === "function") result = result(url, host, scheme); | |
} while (typeof result !== "string" || result.charCodeAt(0) === 43); | |
return result; | |
}; |
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
@Message | |
public static class MsgHeader { | |
public MsgHeader() { | |
msgId = -1; | |
} | |
@Index(0) | |
public int msgId; | |
public byte[] toBytes() { |
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
/** | |
* <p>Operates on classes without using reflection.</p> | |
* <p/> | |
* <p>This class handles invalid {@code null} inputs as best it can. | |
* Each method documents its behaviour in more detail.</p> | |
* <p/> | |
* <p>The notion of a {@code canonical name} includes the human | |
* readable name for the type, for example {@code int[]}. The | |
* non-canonical method variants work with the JVM names, such as | |
* {@code [I}. </p> |
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
@Override | |
protected void onLayout(boolean changed, int l, int t, int r, int b) { | |
int row, col, left, top; | |
for (int i=0; i < getChildCount(); i++) { | |
row = i / mColumnCount; | |
col = i % mColumnCount; | |
View child = getChildAt(i); | |
left = col * child.getMeasuredWidth(); | |
top = row * child.getMeasuredHeight(); |
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
//https://github.com/devunwired/custom-view-examples/tree/master/app/src/main/java/com/example/customview/widget | |
@Override | |
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { | |
setMeasuredDimension(measure(widthMeasureSpec, true), measure(heightMeasureSpec, false)); | |
} | |
private int measure(int measureSpec, boolean isWidth) { | |
int result; | |
int mode = MeasureSpec.getMode(measureSpec); | |
int size = MeasureSpec.getSize(measureSpec); |
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
# Project-wide Gradle settings. | |
# IDE (e.g. Android Studio) users: | |
# Settings specified in this file will override any Gradle settings | |
# configured through the IDE. | |
# For more details on how to configure your build environment visit | |
# http://www.gradle.org/docs/current/userguide/build_environment.html | |
# The Gradle daemon aims to improve the startup and execution time of Gradle. |
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
//go to https://github.com/easternHong/vb-android-app-quality | |
//get the config file and put them into app/config/.. | |
apply plugin: 'pmd' | |
apply plugin: 'findbugs' | |
apply plugin: 'checkstyle' | |
task findbugs(type: FindBugs) { | |
description 'Run findbugs' | |
group 'verification' | |
classes = fileTree('build/intermediates/classes/debug/') |
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
$ sudo add-apt-repository ppa:noobslab/apps | |
$ sudo apt-get update | |
$ sudo apt-get install xdman | |
Optional, to remove xdman, do: | |
$ sudo apt-get remove xdman |
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
目前这个安装器已经收录于 Ubuntu 14.04 官方源(从 Debian源中导入)。 | |
Ubuntu 14.04 用户可以通过以下命令安装 Pepper Flash Player For Chromium : | |
sudo apt-get install pepperflashplugin-nonfree | |
sudo update-pepperflashplugin-nonfree --install | |
如果你想使用 Beta 版的 Google Chrome 中的 Pepper Flash Player ,那么可以把第二个命令改为: | |
sudo update-pepperflashplugin-nonfree --install --beta --unverified |
NewerOlder