This file contains hidden or 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
public class BluetoothService extends Service { | |
private final static String LOG_TAG = BluetoothService.class.getName(); | |
private final static String AUTHORITY = "com.forcemove.forceemotion.bt"; | |
private final int SERVICE_STATUS_ID = 1; | |
private BluetoothGatt mBluetoothGatt; | |
public final static String ACTION_GATT_CONNECTED = AUTHORITY + ".ACTION_GATT_CONNECTED"; | |
public final static String ACTION_GATT_CONNECTING = AUTHORITY + ".ACTION_GATT_CONNECTING"; |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Test login page</title> | |
<link rel="stylesheet" href="https://storage.googleapis.com/code.getmdl.io/1.0.6/material.indigo-pink.min.css"> | |
<script src="https://storage.googleapis.com/code.getmdl.io/1.0.6/material.min.js"></script> | |
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"> | |
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:300,400,500,700" type="text/css"> | |
<style type="text/css"> |
This file contains hidden or 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
'use strict'; | |
function IntGenerator(start, end, step) { | |
this.start = start || 0; | |
this.current = start || 0; | |
this.end = end || this.current; | |
this.step = step || ((this.current > this.end) ? -1 : 1); | |
} | |
IntGenerator.prototype[Symbol.iterator] = function () { |
This file contains hidden or 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
[ | |
"AdvancedNewFile", | |
"All Autocomplete", | |
"Better CoffeeScript", | |
"Bracketeer", | |
"BracketHighlighter", | |
"C++11", | |
"Darkula Color Scheme", | |
"DocBlockr", | |
"DocBlockr_Python", |
This file contains hidden or 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
# Rebind C-b to C-a | |
unbind C-b | |
set-option -g prefix ` | |
bind ` send-prefix | |
bind M-r source-file ~/.tmux.conf | |
# Fast pane switching | |
bind -n M-h select-pane -L | |
bind -n M-l select-pane -R |
This file contains hidden or 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
containers: | |
ubuntu: | |
setup: | |
- !Ubuntu trusty | |
- !UbuntuUniverse | |
mongodb: | |
setup: | |
- !Container ubuntu | |
- !AptTrust keys: [EA312927] |
This file contains hidden or 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
; More functional approach, but it gets a stack overflowed on huge numbers | |
(defun factorial(num) | |
(cond | |
((< num 1) 1) | |
(t (* (factorial (- num 1)) num)) | |
) | |
) | |
This file contains hidden or 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
(defun range(s &optional end step_) | |
(let | |
( | |
(start (cond | |
(end s) | |
(T 0))) | |
(end (cond | |
(end end) | |
(T s))) | |
(step_ (cond |
This file contains hidden or 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
(defun merge-sort(lst) | |
(defun merge_(f s) | |
(cond | |
((= (list-length f) 0) s) | |
((= (list-length s) 0) f) | |
((< (car f) (car s)) (append (list (car f)) (merge_ (cdr f) s))) | |
((> (car f) (car s)) (append (list (car s)) (merge_ f (cdr s)))) | |
((= (car f) (car s)) (append (list (car f) (car s)) (merge_ (cdr f) (cdr s)))) | |
) | |
) |
This file contains hidden or 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
Python 2.7.12 (default, Dec 4 2017, 14:50:18) | |
[GCC 5.4.0 20160609] on linux2 | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> from trafaret_validator import TrafaretValidator | |
>>> import trafaret as t | |
>>> class T1(TrafaretValidator): | |
... id = t.Int() | |
... | |
>>> x = T1(id=1) | |
>>> x.test = 1 |
OlderNewer