Changeset 29621 for other-projects

Show
Ignore:
Timestamp:
12.12.2014 21:00:43 (5 years ago)
Author:
davidb
Message:

Changes after some debugging with a larger set of images

Location:
other-projects/nz-flag-design/trunk/similarity-2d
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • other-projects/nz-flag-design/trunk/similarity-2d/display-flags.jsp

    r29605 r29621  
    3131      } 
    3232      var i; 
     33 
     34      var root_img_re = /^.*\/(.*?)\..*?$/; 
     35 
    3336      for (i=0; i<img_list.length; i++) { 
    34         document.write("<img src=\"" + img_list[i] + "\" style=\"padding: 4px;\">\n"); 
     37    var img   = img_list[i]; 
     38        var img_matches = root_img_re.exec(img); 
     39    var title = img_matches[1]; 
     40 
     41        document.write("<img src=\"" + img_list[i] + "\" " 
     42        + "title=\"" + title + "\" " 
     43        + "style=\"padding: 4px;\">\n"); 
    3544      } 
    3645 
  • other-projects/nz-flag-design/trunk/similarity-2d/flag-functions.jsp

    r29600 r29621  
    99 
    1010    ArrayList<File> listFilesForFolder(final File folder, String matchExt) { 
     11        ArrayList<File> fileList = new ArrayList<File>(); 
     12 
     13        for (final File fileEntry : folder.listFiles()) { 
     14            if (fileEntry.isFile()) { 
     15             if (fileEntry.getName().toLowerCase().endsWith(matchExt)) { 
     16                fileList.add(fileEntry); 
     17         } 
     18            } 
     19        } 
     20 
     21    return fileList; 
     22    } 
     23 
     24    ArrayList<File> listFilesForFolderRecursive(final File folder, String matchExt) { 
    1125        ArrayList<File> fileList = new ArrayList<File>(); 
    1226 
  • other-projects/nz-flag-design/trunk/similarity-2d/list-flags.jsp

    r29608 r29621  
    1616          String flagImageUrl = imageUrlBase + "/" + fileEntry.getName(); 
    1717 
    18           //out.println("<img src=\"" + flagImageUrl + "\">"); 
    1918          if (first_entry) { 
    2019              out.println("\"" + flagImageUrl + "\""); 
     
    3130 
    3231      out.println("</script>"); 
    33      
     32 
    3433   %>