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
| app.controller('AppCtrl', function($scope, $q, $http) { | |
| var reqs = [ | |
| $http.get('http://10.40.110.202/api/videos/'), | |
| $http.get('http://10.40.110.202/api/videos/'), | |
| $http.get('http://10.40.110.202/api/videos/') | |
| ]; | |
| $q.all(reqs).then(function(data){ | |
| console.log(data[0]); // Response from the 1st request |
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
| # Image series to video | |
| ffmpeg -y -i %05d.tif -b:v 10M -vcodec mpeg4 video.mov | |
| # Movie to GIF | |
| ffmpeg -i input.mov -r 10 -pix_fmt rgb24 -vf scale=500:500 output.gif | |
| # Webm Encoding |
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
| var pigs = [{ | |
| name: 'Doug', | |
| }, { | |
| name: 'Larry' | |
| }, { | |
| name: 'Virgil' | |
| }]; | |
| var houses = { | |
| straw: { |
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 boolean isValidEmailAddress(String email) { | |
| String ePattern = "^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$"; | |
| java.util.regex.Pattern p = java.util.regex.Pattern.compile(ePattern); | |
| java.util.regex.Matcher m = p.matcher(email); | |
| return m.matches(); | |
| } |
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
| #include "ofApp.h" | |
| //-------------------------------------------------------------- | |
| void ofApp::setup(){ | |
| randomSeed = ofRandom(100000); | |
| for(int i = 0; i < COLOR_SOURCES; i++) { | |
| ofImage img; | |
| img.loadImage("color-source/color-source-" + ofToString(i) + ".jpg"); | |
| img.resize(CANVAS_WIDTH, CANVAS_HEIGHT); |
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
| ArrayList<Pathfinder> pathsLeft = new ArrayList<Pathfinder>(); | |
| ArrayList<Pathfinder> pathsRight = new ArrayList<Pathfinder>(); | |
| PVector center; | |
| PGraphics canvas; | |
| void setup() { | |
| size(displayWidth, displayHeight); | |
| canvas = createGraphics(displayWidth * 2, displayHeight * 2); | |
| canvas.beginDraw(); |
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
| ArrayList<Pathfinder> paths = new ArrayList<Pathfinder>(); | |
| PVector center; | |
| PGraphics canvas; | |
| void setup() { | |
| size(displayWidth, displayHeight); | |
| canvas = createGraphics(displayWidth * 2, displayHeight * 2); | |
| canvas.beginDraw(); | |
| canvas.background(255); |
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
| // http://labs.tineye.com/multicolr/rest/color_search/?limit=100&offset=0&colors[0]=73a1d2&colors[1]=d5c427&weights[0]=50&weights[1]=50 | |
| // http://img.tineye.com/flickr-images/?filepath=labs-flickr-public/images/3c/6872611445_3c927950b5_m.jpg&size=80 | |
| import java.util.*; | |
| import java.net.*; | |
| String baseUrl = "http://labs.tineye.com/multicolr/rest/color_search/?"; | |
| String baseImageUrl = "http://img.tineye.com/flickr-images/?filepath=labs-flickr-public/images/"; | |
| int pLimit = 200; |
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
| import toxi.color.*; | |
| import toxi.geom.*; | |
| import toxi.processing.*; | |
| import java.util.*; | |
| int num = 100; | |
| float r; | |
| int c; | |
| PImage src; | |
| PGraphics canvas; |
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
| #include "ofApp.h" | |
| void ofApp::setup(){ | |
| source.loadImage("source.jpg"); | |
| source.resize(CANVAS_WIDTH, CANVAS_HEIGHT); | |
| canvas.allocate(CANVAS_WIDTH, CANVAS_HEIGHT, GL_RGBA); | |
| canvas.begin(); | |
| ofBackground(0, 0, 0); |