Posts tonen met het label short reference. Alle posts tonen
Posts tonen met het label short reference. Alle posts tonen

woensdag 21 september 2011

processing Quick reference


Commentaar
// kort commentaar
/* Lang commentaar */
 println ("Schrijf commentaar " +m);
print()

Variabele
String comment = "Text";
float geluidsfactor  = 50;
double d;
boolean BEPAALMAX=false;
int PIEK = 20;
boolean[] Mic = new boolean [4] ;
Led[] LED;
int[] x= { 2,  3,  4,  7,  8,  8, 10, 10, 14, 13}
int[][] gr = {{ 2,40,76 }  , {9,80,113 }}

Stuctuur
for (int m = 0 ; m < 4; m++) {}

if (a == false){}else {}

switch(k) {
  case 1: //rood
    c1 = color(255,0,0);
    break;
 default:}

try {}
catch(Exception e) {    println("Fout: "+e.getMessage());}

hoofdstuctuur
void setup()
{
  noStroke();
  size(800, 600);
}
void draw(){}
void stop(){}

input
void mousePressed() {  println("X,Y: "+mouseX+" "+mouseY); }
void keyPressed() {if(key=='s') {    }  }

function 
void mijnFunctie(int X,intY){
return;
}

import processing.serial.*;

class
class Led {
  float x,y;
  void display(float R,float  G,float B) {}
  Led(int X, int Y) {
    x = X;
    y = Y;
  }
}

kleur
fill((int)R,(int)G,(int)B);
noStroke();
stroke(255)


rect(x,y,ledsize,ledsize);
line(micX, micY,X2,Y2);

 int a =int(random(4));
float m = map((float)d_min, 0, 500, 0, 255);


dinsdag 28 juni 2011

PHP short reference


php

..
?>




comment 

// dit is commentaar
# dit is commentaar
/*dit is een lang commentaar
*/
echo "hiermee schrijf ik commentaar naar de pagina";
print "hier kan je oook mee schrijven";

variable

$eenWoord = "mijn geheime document";
$eenGetal = 7;
$err = array();
$err[]='Een foutmelding';




show JPG   (Pasop geen echo's toevoegen anders doet-ie-het-niet)

$imagepath="knuffelbeer.jpg";
$image=imagecreatefromjpeg($imagepath);
header('Content-Type: image/jpeg');
imagejpeg($image,NULL,50);
imagedestroy($image);


loop

while ($i < 7) {
...
}

for($j=8;$j>0;$j--){
...
}


 foreach ($lines as $line_num => $line) {
...
}


speciale variabele

$_POST["fname"];
$_SESSION['bewaarmij'] = 7; 
$_COOKIE['tzRemember']
$_GET['logoff']






function


function mijnFunctie(){
}


IO


$File = "YourFile.txt";
$Handle = fopen($File, 'w');
$Data = $_SERVER['HTTP_USER_AGENT'];
$Data = "\n tijd:";
fwrite($Handle, $Data);
print "Data Written";
fclose($Handle); 

    




sessions
session_name('naamSessie');
session_set_cookie_params(2*7*24*60*60*100);
session_start();



define('INCLUDE_CHECK',true);

isset (INCLUDE_CHECK)


require 'mijnApparteFunctions.php';

header("Location: blStart.php");
exit;

donderdag 21 april 2011

lilypond short reference













symbool
rust
anoot a
a'oktaaf omhoog
a,oktaaf naar beneden
a4vierde noot
a4.vierde noot met punt
a [(g)]a gebonden g
%{ blabla %} blabla = commentaar