Skip to content

Instantly share code, notes, and snippets.

View herbertdai's full-sized avatar

HerbertDai herbertdai

  • HeFei, AnHui, China
View GitHub Profile
const script = `<script>window.location.hash = 1;document.title = document.getElementsByTagName('html')[0].scrollHeight;</script>`;
onNavigationStateChange(navState) {
Util.log("webView Height:", navState.title);
this.setState({
height: navState.title
});
}
renderMobileBody(){
@herbertdai
herbertdai / DataConvUtil.java
Last active December 27, 2015 03:38
convert byte to int in Big endian mode
public static int byteToInt(byte[] b,int start) {
int s = 0;
int s0 = b[start] & 0xff;// 最低位
int s1 = b[start+1] & 0xff;
int s2 = b[start+2] & 0xff;
int s3 = b[start+3] & 0xff;
s3 <<= 24;
s2 <<= 16;
s1 <<= 8;
s = s0 | s1 | s2 | s3;
@herbertdai
herbertdai / ftp updown load
Last active October 5, 2015 18:18
Ftp upload and download files
ftp eu5.org
put [local] [remote]
get [remote] [local]