Project: Box2D_friction_mod      WheelConstraint.h      box2d_friction_joint.patch      b2FrictionJoint.h      TopDownCar.h      b2FrictionJoint.cpp      TestEntries.cpp      python_friction_joint.patch     

Project: jvfeatures

jvtypes.h      jvtypes.cpp      jvfeatures.h      chessSeg.cpp      jvtest.cpp      jvfeatures.cpp     

Project: Other


Project: Infinite HMM Tutorial

HMMProblem.m      HMM.m      README.txt      HDP.m      HDP_HMM.m      run.m      ConditionalProbabilityTable.m     

Project: Arduino_Code

arduino-serial.c      oscilloscope.pde      ranger_test.pde      accelerometer_test.pde      pwm_manual.pde      servo_test.pde      motordriver.pde      ranger_plane_sweep.pde      helicopter_controller.pde      clodbuster_controller.pde     

Project: RRT

BidirectionalRRT.cpp      RRT.tgz      AbstractRRT.cpp      RRT.h      RRT.cpp      rrt_test.cpp     

Project: ArduCom     

Project: Dirichlet Process Mixture Tutorial

EM_GM.m      DP_Demo.m      DirichletProcess.m      DPMM.m      gaussian_EM.m     

Project: support

Protector.php      geshi.php     

Project: Cogent

CodePane.php      Cogent.php      NotesPane.php      PubsTable.php      PicsPane.php     
Click here to download "resources/site-code/Cogent/PicsPane.php"



* PicsPane
* A class for generating HTML tables of images by scanning a directory
* containing folders of image files.  For each directory found, PicsPane
* will add an album (top-level div) with a heading of that name.
* Outline:
* PicsPane("<directory name>")
* PicsPane->run();      // runs HTML output for all images found, organized by album
* The CSS id of the top-level div is "pics", in accordance with the formatting scheme that I
* use for my website.  For other applications, just define the "pics" properties as desired
* Author: Jonathan Scholz
* 2/3/2010

class PicsPane extends Cogent

* Generates HTML for a grid from nested divs for the images found
* in each album

protected function generate($dir, $files){
        // write heading for this project
        if ($this->depth == 0) {
                print '<h3 id="'.$dir.'">'.$dir."</h3>\n";

        // count elements in array
        $numpics = count($files);

        // loop over pics array to apply css container properties & links to highres versions:
        for ($pic=0; $pic < $numpics; $pic++) {
                print '<a href="'.$this->rootdir.'/'.$dir.'/'.$files[$pic].'" '.   // set target
                        'onClick="_gaq.push(["_trackEvent", "Picture", "Viewed", "'.$files[$pic].'"]);">'. // install tracker
                        '<img class="thumb" src="'.$this->rootdir.'/'.$dir.'/'.$files[$pic].    // set content
                        '" /></a>'."\n";
} // End: class PicsPane


About me

Pic of me