cat filename | while read line
do
echo '###' $line
done
作者归档:杨龙
桌面右键“个性化”


参考地址:http://www.027zpw.com/zimeiti/ruanjian/10807.html
MySQL类型不匹配导致的慢查询
这是个慢查询
SELECT *, `user_id` as uid
FROM (`journals`)
WHERE `user_id` IN ('1456870', 2573141) -- 字符串
AND `status` = 1
ORDER BY `id` desc
LIMIT 20
这个则不是
SELECT *, `user_id` as uid FROM (`journals`) WHERE `user_id` IN (1456870, 2573141) -- 数字 AND `status` = 1 ORDER BY `id` desc LIMIT 20
scrollView.setOnScrollChangeListener
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
scrollView.setOnScrollChangeListener(new View.OnScrollChangeListener() {
@Override
public void onScrollChange(View v, int scrollX, int scrollY, int oldScrollX, int oldScrollY) {
Log.i("iTag.scrollY", String.valueOf(scrollY));
Log.i("iTag.oldScrollY", String.valueOf(oldScrollY));
if (scrollY < 0 && oldScrollY < 0) {
textView.setText("");
doGet();
}
}
});
}
Activity的生命周期
WebView
WebView webView = (WebView) activity.findViewById(R.id.web1);
if (webView.getUrl() == null) {
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().supportMultipleWindows();
webView.setWebViewClient(new WebViewClient());
webView.setWebChromeClient(new WebChromeClient());
webView.loadUrl("http://www.baidu.com/");
}
[ngRepeat:dupes]
数组的值不能重复
r.js打包方法&七牛上传
r.js打包方法
http://www.cnblogs.com/breakdown/p/3503556.html
node r.js -o build.js optimize=uglify
— 七牛上传
qshell fput xxxxxx reward/dist/js/util.min.js reward/dist/js/util.min.js true
Usage: qshell fput <Bucket> <Key> <LocalFile> [<Overwrite>] [<MimeType>] [<UpHost>]
Form upload a local file
android去除标题栏
跟踪
android:theme="@style/AppTheme"
进入修改style.xml文件,这里还可以修改颜色,还可以全屏
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.NoActionBar">
<!-- Customize your theme here. -->
<!--<item name="colorPrimary">@color/colorPrimary</item>-->
<!--<item name="colorPrimaryDark">@color/colorPrimaryDark</item>-->
<!--<item name="colorAccent">@color/colorAccent</item>-->
<item name="android:windowFullscreen">true</item>
</style>
</resources>