Simple Horizontal Divider Item Decoration for RecyclerView
mRecyclerView.addItemDecoration(new SimpleDividerItemDecoration(
getApplicationContext()
));
NOTE: Add item decoration prior to setting the adapter
javascript:(function() { | |
function copyToClipboard(text) { | |
if (window.clipboardData && window.clipboardData.setData) { | |
/*IE specific code path to prevent textarea being shown while dialog is visible.*/ | |
return clipboardData.setData("Text", text); | |
} else if (document.queryCommandSupported && document.queryCommandSupported("copy")) { | |
var textarea = document.createElement("textarea"); | |
textarea.textContent = text; |
#-*- coding=utf-8 -*- | |
""" | |
作者:Abbey | |
博客:www.abbeyok.com | |
脚本简介:脚本通过查找wordpress文章中的新浪图床图片,自动下载到本地目录,并替换文章中的链接。 | |
脚本使用说明: | |
1. 安装好Python2.7。如果是linux系统,应该可以免去该步骤 | |
2. 安装依赖包: |
/* | |
* Copyright 2017 Google Inc. | |
* | |
* 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 | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
function DeCasteljauBezier(points, density, step){ | |
//if (points.length < 3) return null; | |
console.time('bezier'); | |
var ps = points.map(function(p){ | |
return { | |
x: p.x, | |
y: p.y | |
}; | |
}), | |
results = [], |
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.graphics.Canvas; | |
import android.graphics.Rect; | |
import android.graphics.drawable.Drawable; | |
import android.support.v4.content.ContextCompat; | |
import android.support.v7.widget.LinearLayoutManager; | |
import android.support.v7.widget.RecyclerView; | |
import android.util.AttributeSet; | |
import android.view.View; |
for i in {1..12} | |
do | |
url=http://www.bilibili.com/video/av3794937/index_$i.html | |
echo $url | |
youtube-dl -o "SeGmEnT-$i-%(playlist_index)s.%(ext)s" $url | |
rm -f buffer_list | |
touch buffer_list | |
for file in $(ls SeGmEnT-$i-*.flv) | |
do | |
echo file "'$file'" >> buffer_list |
package mobi.dzs.util; | |
/** | |
* 16进制值与String/Byte之间的转换 | |
* @author JerryLi | |
* @email lijian@dzs.mobi | |
* @data 2011-10-16 | |
* */ | |
public class CHexConver | |
{ |
/* Various BCD Conversion util. methods */ | |
public class BCD { | |
/* | |
* long number to bcd byte array e.g. 123 --> (0000) 0001 0010 0011 | |
* e.g. 12 ---> 0001 0010 | |
*/ | |
public static byte[] DecToBCDArray(long num) { | |
int digits = 0; |
/* | |
* Copyright (C) 2014 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 | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |