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
const LETTERS = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']; | |
const IDX_0 = LETTERS.indexOf('0'); | |
const IDX_9 = LETTERS.indexOf('9'); | |
const IDX_a = LETTERS.indexOf('a'); | |
const IDX_z = LETTERS.indexOf('z'); | |
const IDX_A = LETTERS.indexOf('A'); | |
const IDX_Z = LETTERS.indexOf('Z'); | |
function keysGen(len, min, max, count) { | |
if (Math.pow(max - min + 1, len) < count) { |
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 each(arr, iterator, onEnd) { | |
var endIdx = arr.length - 1; | |
arr.forEach(function(i, idx) { | |
iterator.apply(this, [i, idx, | |
function() { | |
if (idx === endIdx) { | |
if ( typeof onEnd === 'function') { | |
setImmediate(onEnd); | |
} | |
} |
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
TwitterAuthDialogFragment dialog = TwitterAuthDialogFragment_.builder() | |
.consumerKey("xxxxx") | |
.consumerSecret("yyyyy") | |
.callbackUrl("http://xxxxx/yyyy") | |
.build(); | |
dialog.setCallbacks(new TwitterAuthDialogFragment.Callbacks() { | |
@Override | |
public void onAccessTokenAvailable(String accessToken, String accessTokenSecret) { | |
// save accessToken & accessTokenSecret or do something | |
} |
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; | |
import java.util.List; | |
import android.content.Context; | |
import android.graphics.Bitmap; | |
import android.graphics.Canvas; | |
import android.graphics.ColorMatrix; | |
import android.graphics.ColorMatrixColorFilter; | |
import android.graphics.Matrix; |
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 org.androidannotations.annotations.Background; | |
import org.androidannotations.annotations.EFragment; | |
import org.androidannotations.annotations.FragmentArg; | |
import org.androidannotations.annotations.UiThread; | |
import twitter4j.Twitter; | |
import twitter4j.TwitterException; | |
import twitter4j.TwitterFactory; | |
import twitter4j.auth.AccessToken; | |
import twitter4j.auth.RequestToken; |
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
/* | |
* Copyright (C) 2012 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
package com.eje_c.matrixtest; | |
import android.app.Activity; | |
import android.graphics.Bitmap; | |
import android.graphics.BitmapFactory; | |
import android.graphics.Canvas; | |
import android.graphics.Color; | |
import android.graphics.Matrix; | |
import android.graphics.Paint; | |
import android.os.Bundle; |
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 isMobile() { | |
return !!navigator.userAgent.match(/(android|iphone|ipad)/i); | |
}; |
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 MidiChannel(midiOutput, channel) { | |
this.output = midiOutput; | |
this.channel = channel; | |
} | |
MidiChannel.prototype = { | |
/* | |
* Channel voice messages | |
*/ | |
noteOff: function(noteNumber, velocity, timestamp) { |
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
<!DOCTYPE html> | |
<html ng-app="myApp"> | |
<head> | |
<title>HelloAudio</title> | |
</head> | |
<body ng-controller="Main"> | |
<input type="range" min="20" max="4000" ng-model="hz.value" step="0.01"> | |
<input type="range" min="0" max="1" ng-model="gain.value" step="0.01"> | |
<script src="angular.min.js"></script> |
OlderNewer