Skip to content

Instantly share code, notes, and snippets.

View hyqhyq3's full-sized avatar

hyqhyq_3 hyqhyq3

  • moonton
  • Shanghai China
View GitHub Profile
#include <iostream>
#include <boost/bind.hpp>
class T {
public:
T() {
}
T(T&& other) {
std::cout << "moving" << std::endl;
INCLUDE (FindPackageHandleStandardArgs)
FIND_PATH (FFMPEG_ROOT_DIR
NAMES libavcodec/avcodec.h include/libavcodec/avcodec.h
PATHS ENV FFMPEG_ROOT
DOC "FFmpeg root directory")
FIND_PATH (FFMPEG_INCLUDE_DIR
NAMES libavcodec/avcodec.h
HINTS ${FFMPEG_ROOT_DIR}
@hyqhyq3
hyqhyq3 / streambuf.js
Last active December 18, 2015 07:09 — forked from anonymous/streambuf.js
/**
* Created with JetBrains WebStorm.
* User: kiyangqi
* Date: 13-6-9
* Time: 下午11:36
* To change this template use File | Settings | File Templates.
*/
function StreamBuf() {
this.chunks = [];
// Copyright 2006 Nemanja Trifunovic
// Copyright 2011 Jack.arain
/*
Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:
conn,err := net.Dial("tcp", "test.com:1024")
if err != nil {
//这里如何确定出错的原因
//是因为主机不可达,还是因为不能解析域名,或者说是连接被拒绝?
}
@hyqhyq3
hyqhyq3 / gist:3925580
Created October 21, 2012 03:39
牌面翻转
var t = new Date().getTime()
function getTime() {
return (new Date().getTime()-t)/1000;
}
function fun(n,order) {
console.log(getTime(),"卡片" + n + "正面")
setTimeout(function(){
console.log(getTime(),"卡片" + n + "反面")
setTimeout(function(){