Skip to content

Instantly share code, notes, and snippets.

@jaycelq
jaycelq / InteractionHolder.cs
Created September 27, 2018 12:58
[Interactive Grass Shader UserCase] #unity
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class InteractionHolder : MonoBehaviour {
[SerializeField]
GameObject[] objects;
Vector4[] positions = new Vector4[100];
// Update is called once per frame
@jaycelq
jaycelq / Lit Swaying Interactive.shader
Created September 27, 2018 12:56
[Interactive Grass Shader] #shader #unity
Shader "Toon/Lit Swaying Interactive" {
Properties {
_Color ("Main Color", Color) = (0.5,0.5,0.5,1)
_MainTex ("Base (RGB)", 2D) = "white" {}
_Ramp ("Toon Ramp (RGB)", 2D) = "gray" {}
_Speed ("MoveSpeed", Range(20,50)) = 25 // speed of the swaying
_Rigidness("Rigidness", Range(1,50)) = 25 // lower makes it look more "liquid" higher makes it look rigid
_SwayMax("Sway Max", Range(0, 0.1)) = .005 // how far the swaying goes
_YOffset("Y offset", float) = 0.0// y offset, below this is no animation
_MaxWidth("Max Displacement Width", Range(0, 2)) = 0.1 // width of the line around the dissolve

##分布式系统(Distributed System)资料


#####希望转载的朋友,你可以不用联系我.但是一定要保留原文链接,因为这个项目还在继续也在不定期更新.希望看到文章的朋友能够学到更多.

介绍:这是一篇介绍在动态网络里面实现分布式系统重构的paper.论文的作者(导师)是MIT读博的时候是做分布式系统的研究的,现在在NUS带学生,不仅仅是分布式系统,还有无线网络.如果感兴趣可以去他的主页了解.

@jaycelq
jaycelq / gist:9b5d85bfacd91433bc814d20cec1ce3d
Created September 4, 2017 12:38
boost binomial distribution
#include <time.h>
#include <vector>
#include <boost/random/binomial_distribution.hpp>
#include <boost/random/mersenne_twister.hpp>
#include <boost/random/variate_generator.hpp>
template<class T>
double gen_normal_3(T &generator)
{
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
@jaycelq
jaycelq / YCM install output
Created February 28, 2017 11:02
error during install ycm
-- The C compiler identification is AppleClang 8.0.0.8000042
-- The CXX compiler identification is AppleClang 8.0.0.8000042
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works