How to count images withn a region

Asked by VJ

I need code to count number of occurrences of a image within a region. Can some one send me sample code please

Question information

Revision history for this message
RaiMan (raimund-hocke) said :
#1

have a look at the findAll feature in the docs.

Revision history for this message
Jeremy (hsloan1a) said :
#2

The findAll worked for me:
Iterator<Match> matches;
          int looking_for_three = 0;
          while (looking_for_three != 3)
          {
           looking_for_three = 0;
           matches = s.findAll(Battle.toString());
     while(matches.hasNext()){
      matches.next();
      looking_for_three++;
     }
           System.out.println(looking_for_three + " count");
          }
          matches = s.findAll(Battle.toString());
My page loads slowly, so I'm just waiting for them all to load.

Can you help with this problem?

Provide an answer of your own, or ask VJ for more information if necessary.

To post a message you must log in.