This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function youtube(url){ | |
return url.match(/^.*(youtu.be\/|v\/|embed\/|watch\?|youtube.com\/user\/[^#]*#([^\/]*?\/)*)\??v?=?([^#\&\?]*).*/)[3]; | |
} | |
function vimeo(url) { | |
var m = url.match(/^.+vimeo.com\/(.*\/)?([^#\?]*)/); | |
return m ? m[2] || m[1] : null; | |
} | |
console.log(youtube("http://www.youtube.com/v/0zM3nApSvMg?fs=1&hl=en_US&rel=0")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
import pyaudio | |
import sys, time | |
import numpy as np | |
import wave | |
RRATE = 16000 #from scipy import signal | |
WAVE = 15000 | |
sigme = ''.join([chr(int(math.sin(x/((RRATE/WAVE)/math.pi))*127+128)) for x in xrange(RRATE)]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Arrays; | |
import java.util.Collections; | |
import android.view.MotionEvent; | |
import java.lang.reflect.Method; | |
class Gestures { | |
int maxOffset, minLength,st,et,tOff; | |
String functionName; | |
PVector startPos, endPos; | |
PApplet pApp; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var rotZ = 0; | |
var rotZ = 0; | |
var rotZ = 0; | |
var persp= 0; | |
var image = document.getElementById('image'); | |
var funk=function(){ | |
image.style.transform="translateX(-96px) translateY(0px) translateZ(0px) rotateX("+rotX+"deg) rotateY("+rotY+"deg) rotateZ(" +rotZ+"deg)"; | |
rotZ+=.5; | |
rotX+=.7; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Variables to control the rotation and perspective of the image | |
var rotX = 0; | |
var rotY = 0; | |
var rotZ = 0; | |
var persp= 0; | |
// The skew increment | |
var skew = 0; | |
var deltaS=.5; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.Collections; | |
int index = 0; | |
int double_tap_threshold=1000; | |
int press_and_hold_time_threshold=200; | |
int press_and_hold_movement_threshold=4; | |
int rotate_speed=1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Reverse the bits in a byte with 3 operations (64-bit multiply and modulus division) | |
*/ | |
unsigned char b; // reverse this (8-bit) byte | |
b = (b * 0x0202020202ULL & 0x010884422010ULL) % 1023; | |
/* | |
Reverse an N-bit quantity in parallel in 5 * lg(N) operations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Same results on elasticsearch versions | |
Version: 2.0.0, Build: de54438/2015-10-22T08:09:48Z, JVM: 1.8.0_45 | |
Version: 2.1.1, Build: 40e2c53/2015-12-15T13:05:55Z, JVM: 1.8.0_45 | |
Could it be JVM: 1.8.0_45? | |
[snow@snow elasticsearch-2.1.1]$ bin/elasticsearch | |
[2016-01-11 12:19:41,226][INFO ][node ] [Adri Nital] version[2.1.1], pid[88371], build[40e2c53/2015-12-15T13:05:55Z] | |
[2016-01-11 12:19:41,227][INFO ][node ] [Adri Nital] initializing ... | |
[2016-01-11 12:19:41,323][INFO ][plugins ] [Adri Nital] loaded [], sites [] | |
[2016-01-11 12:19:41,344][INFO ][env ] [Adri Nital] using [1] data paths, mounts [[/ (/dev/disk1)]], net usable_space [79.6gb], net total_space [232.6gb], spins? [unknown], types [hfs] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import processing.serial.*; | |
Serial myPort; // The serial port | |
int xPos = 1; // horizontal position of the graph | |
float inByte = 0; | |
float prev=0; | |
float prev2=0; | |
float norm=0; | |
OlderNewer