Skip to content

Instantly share code, notes, and snippets.

@nervoussystem
nervoussystem / volume.js
Last active April 22, 2016 14:20
Calculate the volume of a mesh stored in a VBO-like structure (vertex data in an array and triangle data in another array). Uses gl-matrix
var volume = 0;
var v1 = vec3.create(),
v2 = vec3.create(),
v3 = vec3.create();
var i,index1,index2,index3;
for(i=0;i<numIndices;) {
index1 = indices[i++]*3;
index2 = indices[i++]*3;
index3 = indices[i++]*3;
@iluvcapra
iluvcapra / cycloid_gear.scad
Last active May 20, 2023 01:30
OpenSCAD cycloid gear
function epicycloid(t, rmaj, rmin) = [ (rmaj+rmin) * cos(t) - rmin * cos(((rmaj+rmin)/rmin)*t),
(rmaj+rmin) * sin(t) - rmin * sin(((rmaj+rmin)/rmin)*t) ];
function hypocycloid(t, rmaj, rmin) = [ (rmaj-rmin) * cos(t) + rmin * cos(((rmaj-rmin)/rmin)*t),
(rmaj-rmin) * sin(t) - rmin * sin(((rmaj-rmin)/rmin)*t) ];
module CycloidTooth(
rmaj = 30,
rmin = 20,
circ_pitch = 10.0,
@staltz
staltz / introrx.md
Last active May 7, 2024 09:38
The introduction to Reactive Programming you've been missing
@imjasonh
imjasonh / markdown.css
Last active February 12, 2024 17:18
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
<a class="question_link" target="_blank" href="/question/30746665/answer/49332475">会写 Parser、Tokenizer 是什么水平?</a><br/><br/>大多数编译原理书前100页的内容,说明大学听了一半左右的编译原理课,通俗地说,写了这个只能证明你不是个棒槌。<br><br><br>所以其实你更应该关心不会tokenizer和parser是什么水平。
<span class="answer-date-link-wrap">
<a class="answer-date-link last_updated meta-item" data-tip="s$t$发布于 2015-05-29" target="_blank" href="/question/30746665/answer/49332475">编辑于 2015-05-29</a>
</span>
<hr/><a class="question_link" target="_blank" href="/question/30703519/answer/49150834">王垠到底对 winter 做了什么?</a><br/><br/>你可以理解为是路边看到一坨**,忍不住想去一脚踩爆它的心态。(虽然我知道这么做无聊而且会沾一脚)<br><br>想了想,可能还有一点觉得他的粉丝很可怜的,想让他们停止吃**的心态吧,虽然我知道"然而没卵用"。<br><br>回到题主的问题,要问做了什么,那就是“他是**,还碰巧被我看到了”,这样的事情,简直无法被饶恕。
@bbx10
bbx10 / ESPWebForm.ino
Created July 21, 2015 03:31
Demonstrate using an http server and an HTML form to control an LED. The http server runs on the ESP8266.
/*
* Demonstrate using an http server and an HTML form to control an LED.
* The http server runs on the ESP8266.
*
* Connect to "http://esp8266WebForm.local" or "http://<IP address>"
* to bring up an HTML form to control the LED connected GPIO#0. This works
* for the Adafruit ESP8266 HUZZAH but the LED may be on a different pin on
* other breakout boards.
*
* Imperatives to turn the LED on/off using a non-browser http client.
@PurpleBooth
PurpleBooth / README-Template.md
Last active May 6, 2024 07:22
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@NirViaje
NirViaje / H17.md
Last active November 18, 2015 06:28

##on-holic

  • the holic type
  • restricted holic, self discipline
  • daily life only, never get mental holic

##Gartner hyper cycle graph

群体模型与Gartner hyper cycle graph的调制,以及泡沫在模型中内省的(是否)必须性

@shagunsodhani
shagunsodhani / CurriculumLearning.md
Created May 8, 2016 17:14
Notes for Curriculum Learning paper

Curriculum Learning

Introduction

  • Curriculum Learning - When training machine learning models, start with easier subtasks and gradually increase the difficulty level of the tasks.
  • Motivation comes from the observation that humans and animals seem to learn better when trained with a curriculum like a strategy.
  • Link to the paper.

Contributions of the paper