Project: jvfeatures

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

Project: Other


Project: Infinite HMM Tutorial

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

Project: RRT

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

Project: Box2D_friction_mod

WheelConstraint.h      b2FrictionJoint.h      python_friction_joint.patch      TestEntries.cpp      TopDownCar.h      b2FrictionJoint.cpp      box2d_friction_joint.patch     

Project: Dirichlet Process Mixture Tutorial

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

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

Project: ArduCom     

Project: support

geshi.php      Protector.php     

Project: Cogent

CodePane.php      NotesPane.php      PicsPane.php      Cogent.php      PubsTable.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