Skip to content

Instantly share code, notes, and snippets.

/*
* 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.
@wjch
wjch / CHexConver.java
Created November 21, 2015 08:35 — forked from alanland/CHexConver.java
java 中 Hex的转换
package mobi.dzs.util;
/**
* 16进制值与String/Byte之间的转换
* @author JerryLi
* @email lijian@dzs.mobi
* @data 2011-10-16
* */
public class CHexConver
{
@wjch
wjch / BCDConvert.java
Last active August 29, 2015 14:26 — forked from neuro-sys/BCD.java
BCD Conversion in java
/* 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
@wjch
wjch / README.md
Last active August 29, 2015 14:23 — forked from polbins/README.md

Simple RecyclerView Divider

Simple Horizontal Divider Item Decoration for RecyclerView

    mRecyclerView.addItemDecoration(new SimpleDividerItemDecoration(
            getApplicationContext()
    	));

NOTE: Add item decoration prior to setting the adapter

@wjch
wjch / 0_reuse_code.js
Last active August 29, 2015 14:21
Here are some things you can do with Gists in GistBox.
// 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&gt;[] cons = clazz.getConstructors();
Error in user YAML: (<unknown>): found character that cannot start any token while scanning for the next token at line 2 column 1
---
# Python 简介
@su27 and @menghan
---

What is Python?

Python: 优雅而健壮的编程语言

  • 高级

  • 易学易读易维护