Set/update _current_term and _current_session fields on all bills
    for a given location.
9898
def populate_current_fields(abbr):
    
    meta = db.metadata.find_one({'_id': abbr})
    current_term = meta['terms'][-1]
    current_session = current_term['sessions'][-1]

    for bill in db.bills.find({settings.LEVEL_FIELD: abbr}):
        if bill['session'] == current_session:
            bill['_current_session'] = True
        else:
            bill['_current_session'] = False

        if bill['session'] in current_term['sessions']:
            bill['_current_term'] = True
        else:
            bill['_current_term'] = False

        db.bills.save(bill, safe=True)
372011
private function updateRegional()
    {
        $currentLocale = $this->getCurrentLocaleEntity();

        if ( ! empty($regional = $currentLocale->regional())) {
            $suffix = $this->getConfig('utf-8-suffix', '.UTF-8');

            setlocale(LC_TIME, $regional.$suffix);
            setlocale(LC_MONETARY, $regional.$suffix);
        }
    }
466061
public void updateAllTimestamp(long timestamp)
  {
    if (topLevel.markedForDeleteAt != Long.MIN_VALUE)
      topLevel = new DeletionTime(timestamp, topLevel.localDeletionTime);

    if (ranges != null)
      ranges.updateAllTimestamp(timestamp);
  }
926373
def set_locations(self, locations, values):
        

        indexes = [self._index[x] for x in locations]
        self.set(indexes, values)
239450
def update(self, response, **kwargs):
        '''
        
        '''
        response_cls = super(
            LocationResponseClassLegacyAccessor, self)._get_instance(**kwargs)
        if response_cls:
            setattr(response_cls, self.column, self.accessor(response))
            setattr(
                response_cls, self.venue_column, self.venue_accessor(response))
            _action_and_commit(response_cls, session.add)
413159
private void addFieldTermReferences(Set<String> termSet) {
        Map<String, Set<String>> fieldTermRefsMap = new HashMap<String, Set<String>>();
        fieldTermRefsMap.put(m_fieldName, termSet);
        m_dbTran.addTermReferences(m_tableDef, m_tableDef.getShardNumber(m_dbObj), fieldTermRefsMap);
    }
1326545
public synchronized void index(long offset, long term) {
    if (lookup(offset) != term) {
      terms.put(offset, term);
    }
  }
609715
public function setCurrent(): void
	{
		$this->current = true;
		$parent = $this->parent;
		if ($parent instanceof Item) {
			$parent->setCurrent();
		}
	}
1064475
def __set_locals(self):
        

        for globals in (Constants, RuntimeGlobals, UiConstants):
            self.__locals[globals.__name__] = globals

        self.__locals[Constants.application_name] = self
        self.__locals["application"] = self
        self.__locals["patches_manager"] = self.__patches_manager
        self.__locals["components_manager"] = self.__components_manager
        self.__locals["actions_manager"] = self.__actions_manager
        self.__locals["file_system_events_manager"] = self.__file_system_events_manager
        self.__locals["notifications_manager"] = self.__notifications_manager
        self.__locals["layouts_manager"] = self.__layouts_manager
        self.__locals["LOGGER"] = LOGGER

        LOGGER.debug("> Defined locals: '{0}'.".format(self.__locals))
138443
public void setAll(String attributeName, String busClassNameWithDots, String busClassName, boolean isNullable, RelatedFinder relatedFinder, Map properties, boolean transactional)
    {
        timestampAttribute.setAll(attributeName, busClassNameWithDots, busClassName, isNullable, relatedFinder, properties, transactional);
    }
622841
def _set_all_fields(self, schema, **kwargs):
        
        current_fields = self.get_fields(schema, **kwargs)
        for field_name, field in schema.fields.items():
            if field_name not in current_fields:
                if field.required:
                    raise ValueError('Cannot safely add {} on the fly because it is required'.format(field_name))

                else:
                    query_str = []
                    query_str.append('ALTER TABLE')
                    query_str.append('  {}'.format(schema))
                    query_str.append('ADD COLUMN')
                    query_str.append('  {}'.format(self.get_field_SQL(field_name, field)))
                    query_str = os.linesep.join(query_str)
                    self.query(query_str, ignore_result=True, **kwargs)

        return True
576767
def current_state(self):
        
        field_names = set()
        [field_names.add(f.name) for f in self._meta.local_fields]
        [field_names.add(f.attname) for f in self._meta.local_fields]
        return dict([(field_name, getattr(self, field_name)) for field_name in field_names])
504081
def update_data():
    
    global allData
    while not q.empty():
        allData = q.get()
    for key, value in tags.items():
        if key in allData:
            allData[key]['name'] = value
1235331
def setTerms( self, terms ):
        
        return self.setRules([XQueryRule(term = term) for term in terms])
667426
def set_current_context(self, name):
        """"""
        if self.context_exists(name):
            self.data['current-context'] = name
        else:
            raise KubeConfError("Context does not exist.")
269889
public void setTheDate()
    {
        boolean[] rgbEnabled = m_field.setEnableListeners(false);
        Calendar calAfter = m_field.getCalendar();
        Calendar calBefore = m_field.getCalendar();
        m_field.setValue(DateTimeField.currentTime(), DBConstants.DISPLAY, DBConstants.SCREEN_MOVE);   // File written or updated, set the update date
        calAfter = m_field.getCalendar();
        if (calBefore != null)
            if (calAfter.before(calBefore))
                calAfter = calBefore;   // If this was set with a different computer (clock), make sure it always increases!
        if (calAfter != null)
            if (calAfter.equals(calBefore))
        {
            calAfter.add(Calendar.SECOND, 1);   // Can't be the same as last time.
            m_field.setCalendar(calAfter, DBConstants.DISPLAY, DBConstants.SCREEN_MOVE);
        }
        Utility.getLogger().info("Set date: " + m_field.toString());
        m_field.setEnableListeners(rgbEnabled);
    }
396716
public void setTerm(long term) {
    if (term > this.term) {
      this.term = term;
      this.leader = null;
      this.lastVotedFor = null;
      meta.storeTerm(this.term);
      meta.storeVote(this.lastVotedFor);
      log.debug("Set term {}", term);
    }
  }