function to get updates
500631
function getUpdates() {
		return _client.method('WaitForUpdatesEx', {
			_this: _client._updatesCollector,
			version: _client._updatesVersion,
			options: {
				maxWaitSeconds: 0
			}
		})
		.then(function(set) {
			if (set) {

				// update the version
				_client._updatesVersion = set.version;
				
				// get only the updates
				var updates   = [];
				var filterSet = _.get(set, 'filterSet');
				filterSet     = Array.isArray(filterSet) ? filterSet : [filterSet];
				
				// loop through the filter sets
				_.forEach(filterSet, function(f) {
					
					var objectSet = _.get(f, 'objectSet');
					objectSet     = Array.isArray(objectSet) ? objectSet : [objectSet];
					
					// format the objects
					_.forEach(objectSet, function(u) {
						u.obj = {
							type: _.get(u, 'obj.attributes.type'),
							id: _.get(u, 'obj.$value')
						};
						
						// make the change set an array
						u.changeSet = Array.isArray(u.changeSet) ? u.changeSet : [u.changeSet];
						
						// update change set
						_.forEach(u.changeSet, function(c) {
							c.val = _.get(c, 'val.$value');
						});
						
						// push the update
						updates.push(u);
					});
				});

				// emit the results
				_client.emit('updates', updates);
			}
		});
	}
591477
function updateSortFunction() {
  switch(sortBy.value) {
    case '0': // transmitterId increasing
      sortFunction = function(tr1, tr2) {
        if(tr1.getElementsByTagName('td')[0].textContent <
           tr2.getElementsByTagName('td')[0].textContent) {
          return -1;
        };
        return 1;
      }
      break;
    case '1': // transmitterId decreasing
      sortFunction = function(tr1, tr2) {
        if(tr1.getElementsByTagName('td')[0].textContent >
           tr2.getElementsByTagName('td')[0].textContent) {
          return -1;
        };
        return 1;
      }
      break;
    case '2': // receiverId increasing
      sortFunction = function(tr1, tr2) {
        if(tr1.getElementsByTagName('td')[2].textContent <
           tr2.getElementsByTagName('td')[2].textContent) {
          return -1;
        };
        return 1;
      }
      break;
    case '3': // receiverId decreasing
      sortFunction = function(tr1, tr2) {
        if(tr1.getElementsByTagName('td')[2].textContent >
           tr2.getElementsByTagName('td')[2].textContent) {
          return -1;
        };
        return 1;
      }
      break;
    case '4': // rssi increasing
      sortFunction = function(tr1, tr2) {
        if(parseInt(tr1.getElementsByTagName('td')[3].textContent) <
           parseInt(tr2.getElementsByTagName('td')[3].textContent)) {
          return -1;
        };
        return 1;
      }
      break;
    case '5': // rssi decreasing
      sortFunction = function(tr1, tr2) {
        if(parseInt(tr1.getElementsByTagName('td')[3].textContent) >
           parseInt(tr2.getElementsByTagName('td')[3].textContent)) {
          return -1;
        };
        return 1;
      }
      break;
    case '6': // numberOfReceivers increasing
      sortFunction = function(tr1, tr2) {
        if(parseInt(tr1.getElementsByTagName('td')[4].textContent.split(RDPS)[0]) <
           parseInt(tr2.getElementsByTagName('td')[4].textContent.split(RDPS)[0])) {
          return -1;
        };
        return 1;
      }
      break;
    case '7': // numberOfReceivers decreasing
      sortFunction = function(tr1, tr2) {
        if(parseInt(tr1.getElementsByTagName('td')[4].textContent.split(RDPS)[0]) >
           parseInt(tr2.getElementsByTagName('td')[4].textContent.split(RDPS)[0])) {
          return -1;
        };
        return 1;
      }
      break;
    case '8': // numberOfDecodings increasing
      sortFunction = function(tr1, tr2) {
        if(parseInt(tr1.getElementsByTagName('td')[4].textContent.split(RDPS)[1]) <
           parseInt(tr2.getElementsByTagName('td')[4].textContent.split(RDPS)[1])) {
          return -1;
        };
        return 1;
      }
      break;
    case '9': // numberOfDecodings decreasing
      sortFunction = function(tr1, tr2) {
        if(parseInt(tr1.getElementsByTagName('td')[4].textContent.split(RDPS)[1]) >
           parseInt(tr2.getElementsByTagName('td')[4].textContent.split(RDPS)[1])) {
          return -1;
        };
        return 1;
      }
      break;
    case '10': // numberOfPackets increasing
      sortFunction = function(tr1, tr2) {
        if(parseInt(tr1.getElementsByTagName('td')[4].textContent.split(RDPS)[2]) <
           parseInt(tr2.getElementsByTagName('td')[4].textContent.split(RDPS)[2])) {
          return -1;
        };
        return 1;
      }
      break;
    case '11': // numberOfPackets decreasing
      sortFunction = function(tr1, tr2) {
        if(parseInt(tr1.getElementsByTagName('td')[4].textContent.split(RDPS)[2]) >
           parseInt(tr2.getElementsByTagName('td')[4].textContent.split(RDPS)[2])) {
          return -1;
        };
        return 1;
      }
      break;
  }
  sortRaddecsAndHighlight();
}
70776
function updateCheck() {
    // CASE: The check will not happen if your NODE_ENV is not in the allowed defined environments.
    if (_.indexOf(allowedCheckEnvironments, process.env.NODE_ENV) === -1) {
        return Promise.resolve();
    }

    return api.settings.read(_.extend({key: 'next_update_check'}, internal))
        .then(function then(result) {
            const nextUpdateCheck = result.settings[0];

            // CASE: Next update check should happen now?
            // @NOTE: You can skip this check by adding a config value. This is helpful for developing.
            if (!config.get('updateCheck:forceUpdate') && nextUpdateCheck && nextUpdateCheck.value && nextUpdateCheck.value > moment().unix()) {
                return Promise.resolve();
            }

            return updateCheckRequest()
                .then(updateCheckResponse)
                .catch(updateCheckError);
        })
        .catch(updateCheckError);
}
184968
def _get_update(self, variant):
        
        update = {
                '$inc': {
                    'homozygote': variant.get('homozygote', 0),
                    'hemizygote': variant.get('hemizygote', 0),
                    'observations': 1
                },
                '$set': {
                    'chrom': variant.get('chrom'),
                    'start': variant.get('pos'),
                    'end': variant.get('end'),
                    'ref': variant.get('ref'),
                    'alt': variant.get('alt'),
                }
             }
        if variant.get('case_id'):
            update['$push'] = {
                                'families': {
                                '$each': [variant.get('case_id')],
                                '$slice': -50
                                }
                            }
        return update
737205
function getNewVersions() {
  return getTags()
    .then(tags => {
      var newVersions = []
      for(tag of tags) {
        if (semver.gt(tag.name, update.latest) || (
            semver.eq(tag.name, update.latest) && (semver(tag.name).build[0] || 0) > (semver(update.latest).build[0] || 0)
          )) {
          newVersions.push(tag)
        }
      }
      newVersions.reverse()
      // order versions from lower to greater
      console.log(chalk.blue('New versions available: ' + (newVersions.map(v => v.name).join(', ') || 'none') + '.'))
      return newVersions
    })
    .catch(e => console.log(e.stack))
}
616846
def update(self):
        """"""

        if self.device_time_check():

            if not self.in_process:
                outlets, switches, fans = self.get_devices()

                self.outlets = helpers.resolve_updates(self.outlets, outlets)
                self.switches = helpers.resolve_updates(
                    self.switches, switches)
                self.fans = helpers.resolve_updates(self.fans, fans)

                self.last_update_ts = time.time()
799037
def update(connection, force_download):
    """"""
    manager.database.update(
        connection=connection,
        force_download=force_download
    )
1184843
async def get_last_updated(self, source_id):
        """"""
        last_updated = await self._db.get_last_updated(source_id)
        logger.info("LAST UPDATED: {} {}".format(last_updated, self))
        return last_updated
814105
def update(self):
        """"""
        if self.client_mode == 'glances':
            return self.update_glances()
        elif self.client_mode == 'snmp':
            return self.update_snmp()
        else:
            self.end()
            logger.critical("Unknown server mode: {}".format(self.client_mode))
            sys.exit(2)
620336
def update_release(id, **kwargs):
    
    data = update_release_raw(id, **kwargs)
    if data:
        return utils.format_json(data)
1248417
def patch(attrs, updates):
    """"""
    orig = {}
    for attr, value in updates:
        orig[attr] = attrs[attr]
        attrs[attr] = value
    return orig
621142
protected function generateUpdates()
    {
        $updates = array();

        if ($this->flush) {
            $updates[] = array('flush', array($this->cache, 'flush'), array());
        }

        foreach ($this->keys as $key => $data) {
            $updates[] = $data;
        }

        return $updates;
    }
1036418
def getLeapSecondLastUpdated():  # @NoSelf
        
        print('Leap second last updated:', str(CDFepoch.LTS[-1][0]) + '-' +
              str(CDFepoch.LTS[-1][1]) + '-' + str(CDFepoch.LTS[-1][2]))
1307451
def return_self_updater(func):
    '''
    
    '''
    @functools.wraps(func)
    def decorator(k,v):
        func(k,v)
        return v
    return decorator
475837
def update_table(event):
    """"""
    update_number = 0
    for update in event.get('updates', []):
        header = "======= Update #%s on %s =======" % (update_number, utils.clean_time(update.get('startDate')))
        click.secho(header, fg='green')
        update_number = update_number + 1
        text = update.get('contents')
        # deals with all the \r\n from the API
        click.secho(utils.clean_splitlines(text))
1137625
function upToDate (imPath, type) {
          return readFile(imPath)
            .then(getChecksum)
            .then(function (sum) {
              var key = imPath + type
              var isUpToDate = cachedState[key] === sum
              cachedState[key] = sum
              return isUpToDate
            })
        }
1123702
def update(verbose=False):
    
    local = local_list()
    remote = dict(remote_list())

    updated = False

    for name, date in local:
        if name in remote and remote[name] > date:
            updated = True
            if verbose:
                print("Updating '%s'..." % name)
            download(name)

    if not updated and verbose:
        print("Nothing to update.")