Change number of match and total matches.
963939
def change_number_matches(self, current_match=0, total_matches=0):
        """"""
        if current_match and total_matches:
            matches_string = u"{} {} {}".format(current_match, _(u"of"),
                                               total_matches)
            self.number_matches_text.setText(matches_string)
        elif total_matches:
            matches_string = u"{} {}".format(total_matches, _(u"matches"))
            self.number_matches_text.setText(matches_string)
        else:
            self.number_matches_text.setText(_(u"no matches"))
381592
def update(self, result, spec):
        """"""
        if isinstance(spec, dict):
            if spec:
                spec_value = next(iter(spec.values()))
                for key, value in result.items():
                    result[key] = self.update(value, spec_value)
        if isinstance(spec, list):
            if spec:
                for i, value in enumerate(result):
                    result[i] = self.update(value, spec[0])
        if isinstance(spec, tuple):
            return tuple(self.update(value, s)
                         for s, value in zip(spec, result))
        if callable(spec):
            return spec(result)
        return result
1040699
def set_(name, add, match):
    '''
    
    '''
    ret = {'name': name,
           'changes': {},
           'comment': '',
           'result': True}
    if name not in __reg__:
        __reg__[name] = {}
        __reg__[name]['val'] = set()
    for event in __events__:
        if salt.utils.stringutils.expr_match(event['tag'], match):
            try:
                val = event['data']['data'].get(add)
            except KeyError:
                val = event['data'].get(add)
            if val is None:
                val = 'None'
            ret['changes'][add] = val
            __reg__[name]['val'].add(val)
    return ret
179246
def _populate_inputs(self, total):
        
        total = total + 1
        for input_number in range(1, total):
            self.query('ISN'+str(input_number).zfill(2))
312663
def process(self, rules, uio, prevxn=None):
        """"""
        self.apply_outcomes(self.match_rules(rules), uio, prevxn=prevxn)
846520
def _add_match(self, match_key, match_value):
        """"""
        if match_key is None:
            raise errors.NullArgument()
        self._query_terms[match_key] = str(match_key) + '=' + str(match_value)
93901
def _merge_results(self, results):
        """"""
        self.results['tests'] += results['tests']

        for key, value in results['summary'].items():
            self.results['summary'][key] += value
64342
def update(self, value):
    """"""
    super(UniformSample, self).update(value)

    self.count += 1
    c = self.count
    if c < len(self.sample):
      self.sample[c-1] = value
    else:
      r = random.randint(0, c)
      if r < len(self.sample):
        self.sample[r] = value
21356
function updateResults(response) {
  responseHits.textContent = response.hits.total;
  responseTime.textContent = response.took;
}
35974
def increment(self, gold_set, test_set):
        ""
        self.gold += len(gold_set)
        self.test += len(test_set)
        self.correct += len(gold_set & test_set)
336864
def update_total(self, n=1):
    """"""
    with self._lock:
      self._pbar.total += n
      self.refresh()
451785
def add_match(match,name=nil)
    return unless match
    return match if match==self

    add_match_name(super(match),name)

    update_match_length
    match
  end
815766
def update_counts(self):
        ""
        # Properties.attrib['TotalCountOfFields']
        fields = str(len(self.fields))
        self.properties.attrib['TotalCountOfFields'] = fields

        # Properties.CountOfWellsX/Y
        wx, wy = (str(x) for x in self.count_of_wells)

        self.properties.CountOfWellsX = wx
        self.properties.CountOfWellsY = wy

        # Properties.attrib['TotalCountOfWells']
        wells = str(len(self.wells))
        self.properties.attrib['TotalCountOfWells'] = wells

        # Properties.attrib['TotalAssignedJobs']
        self.properties.attrib['TotalAssignedJobs'] = str(self.count_of_assigned_jobs)
1127139
def update_db(matches):
    
    for match in matches:
        try:
            match.save()
        except IntegrityError:
            args = (match.text_log_error_id, match.matcher_name, match.classified_failure_id)
            logger.warning(
                "Tried to create duplicate match for TextLogError %i with matcher %s and classified_failure %i",
                args,
            )
625513
private void pruneMatches() {
		int index = 0;
		while( index < matches.size ) {
			AssociatedTripleIndex a = matches.get(index);
			// not matched. Remove it from the list by copying that last element over it
			if( a.c == -1 ) {
				a.set(matches.get(matches.size-1));
				matches.size--;
			} else {
				index++;
			}
		}
	}
570465
private void modifyBeliefCount(int count){
        introspector.setBeliefValue(getLocalName(), Definitions.RECEIVED_MESSAGE_COUNT, getBeliefCount()+count, null);
    }
1253226
def update(self, n=1):
    """"""
    with self._lock:
      self._pbar.update(n)
      self.refresh()