Simple Horizontal Divider Item Decoration for RecyclerView
mRecyclerView.addItemDecoration(new SimpleDividerItemDecoration(
getApplicationContext()
));
NOTE: Add item decoration prior to setting the adapter
/* | |
* COPYRIGHT NOTICE | |
* Copyright (C) 2015, Jhuster, All Rights Reserved | |
* Author: Jhuster(lujun.hust@gmail.com) | |
* | |
* https://github.com/Jhuster/TLV | |
* | |
* This program is free software; you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation; version 2 of the License. |
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 |
###units-workflow http://designandsuch.com/work/alfred-workflow-units
###alfred-dev-doctor
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
public function action_authcode() { | |
//随机生成一个4位数的数字验证码 | |
$num=""; | |
for($i=0;$i<4;$i++){ | |
$num .= rand(0,9); | |
} | |
//4位验证码也可以用rand(1000,9999)直接生成 | |
//将生成的验证码写入session,备验证页面使用 | |
SESSION::put("authcode", $num); | |
//创建图片,定义颜色值 |
1.果然是实践出真知:
public class Hello {
public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
Class<?> clazz = Class.forName("com.wjch.reflection.Person");
Person p = (Person) clazz.newInstance();
Constructor>[] cons = clazz.getConstructors();