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
<?php> | |
//~~~~~~~~~~~~~~~BASIC RESPONSE EXAMPLE ~~~~~~~~~~~~~// | |
$client = new Services_Twilio($AccountSid, $AuthToken); | |
$body = $inbody . "" . ":and the PHP added ME!" ; | |
$message = $client->account->sms_messages->create($from, $to, $body); | |
<?> |
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
//set an an amount to loop through (this is often an array called with array.length) | |
// the for loop, set a varioable called 'i' to 0, as long as 'i' is less than the variable amount, then increase 'i' by after it executes the code in the curly braces each time | |
for (var i=0; i<amount; i++){ | |
//do stuff here | |
//do something each time! | |
console.log("this is iteration #" + i + " through the for loop"); | |
// example to append a thing 10 times | |
$('.theCount').append("<p class='underline'>iteration #" + i + "</p>"); |
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
void setup() { | |
size(320,320); | |
frameRate(30); | |
} | |
void draw() { | |
// set background to black | |
background(0); | |
// get my current time values |
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
/* | |
We are going to look at a number of different jQuery methods and a small amount of basic javascript so hold on to your horses! | |
please search for these methods in the jQuery API: http://api.jquery.com/ | |
.addClass() | |
.removeClass() | |
.html() | |
.css() | |
.fadeIn() / .fadeOut() |
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> | |
<head> | |
<title></title> | |
</head> | |
<style type="text/css" media="screen"> | |
html{height:100%;} | |
body{height:100%;} |
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> | |
<head> | |
<meta charset="utf-8"> | |
<meta content="stuff, to, help, search, engines, not" name="keywords"> | |
<meta content="What this page is about." name="description"> | |
<meta content="Display Webcam Stream" name="title"> | |
<title>Display Webcam Stream</title> | |
<style> |
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
///a simple 2 player lightbike game in processing using WASD and Arrow Keys. | |
//game params | |
int speed = 4; | |
int playerSize = speed + 1 ; | |
color p1color = color(255, 255, 0); //must have green for detection | |
color p2color = color(0, 255, 255); //must have green for detection | |
//player alive? | |
int player1status = 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
//path to image files (list) filenames as the following: 0001.jpg, 0002.jpg, 0003.jpg etc. | |
String PATH = "/Users/bmoren/Desktop/Aspens_test/JPG/"; | |
int IMAGE_NB = 0001; // first in sequence | |
void setup() | |
{ | |
//change to what you want your output to be | |
size(5184,3456); | |
background(255); | |
tint(255,10); // this setting will stick | |
} |
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
String PATH = "/Users/bmoren/Desktop/Aspens_test/JPG/"; | |
int IMAGE_NB = 0001; // first in sequence | |
int imageAlpha = 100; | |
PImage composition; | |
PImage workingImage; | |
boolean firstImage = true; | |
void setup() |
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(){ //jq do some work! - when ever the DOM is ready, do the stuff in here! | |
$(document).keypress(function(e) { // look at the keypressed | |
if(e.which == 97) { // use some logic to see what key was pressed | |
alert('You pressed "A"!'); //do something when that key was pressed | |
} | |
}); | |
///////USE BELOW TO FIGURE OUT KEY NUMBERS! | |
$(document).keypress(function(e) { |
OlderNewer