Skip to content

Instantly share code, notes, and snippets.

@xaf-cv
xaf-cv / breakpoints
Created March 18, 2016 17:15
breakpoints
from scipy import interpolate
import numpy
import pylab
from pylab import *
from scipy.optimize import curve_fit
def func(x, a, b, c):
@xaf-cv
xaf-cv / snippet.java
Last active November 2, 2019 20:14
Click&Hold detection through View.OnTouchListener()
View.OnTouchListener detectClickAndHoldListener = new View.OnTouchListener() {
private Timer timer = new Timer();
private long LONG_PRESS_TIMEOUT = 1337; // TODO: your timeout here
private boolean wasLong = false;
@Override
public boolean onTouch(View v, MotionEvent event) {
Log.d(getClass().getName(), "touch event: " + event.toString());