Skip to content

Instantly share code, notes, and snippets.

View AndrewChanChina's full-sized avatar

Andrew AndrewChanChina

  • Tencent
  • shenzhen
View GitHub Profile
AndrewChanChina / js.html
Created July 7, 2017 14:10
js scheme打开app
<script type="text/javascript">
function open_discovery()
{"mqqapi://qstory/opendiscovery?one_page=0&key_form=web&src_type=type&version=1&parter_api=tribe", '_blank')
//'mqqapi://huayang', '_blank')
//window.location.href = 'mqqapi://qstory/open?src_type=1&version=1&parter_api=1&default_label=dd';
class Memory {
* Function that get the size of an object.
* @param object
* @return Size in bytes of the object or -1 if the object
* is null.
* @throws IOException
curl -i -d "type=1" --data-binary @""
AndrewChanChina / 性能优化
Last active August 29, 2015 14:12
Like other have said, use FileChannel.transferTo() or FileChannel.transferFrom(). The key advantage here is that the JVM uses the OS's access to DMA (Direct Memory Access)