Update fields at the end of each time step.
341570
def update_fields(u, u_old, v_old, a_old):
    """"""

    # Get vectors (references)
    u_vec, u0_vec  = u.vector(), u_old.vector()
    v0_vec, a0_vec = v_old.vector(), a_old.vector()

    # use update functions using vector arguments
    a_vec = update_a(u_vec, u0_vec, v0_vec, a0_vec, ufl=False)
    v_vec = update_v(a_vec, u0_vec, v0_vec, a0_vec, ufl=False)

    # Update (u_old <- u)
    v_old.vector()[:], a_old.vector()[:] = v_vec, a_vec
    u_old.vector()[:] = u.vector()
1078945
void updateResolveMap(Map<TemporalField, Long> fieldValues, ChronoField field, long value) {
        Long current = fieldValues.get(field);
        if (current != null && current.longValue() != value) {
            throw new DateTimeException("Invalid state, field: " + field + " " + current + " conflicts with " + field + " " + value);
        }
        fieldValues.put(field, value);
    }
279680
def UpdateColums(self, cursor, field, FieldType, model, columns, UNCHANGED):
        '''
        '''
        table = model.__name__.lower()
        if field not in columns:
            n = UNCHANGED.pop()
            new_sql = f"ALTER TABLE {table} ADD COLUMN {field} {FieldType} AFTER {n}"
            cursor.execute(new_sql)
            print("\n\n", new_sql)
        else:
            UNCHANGED.append(field)

        # We drop the fields in the table not in models
        TCOLS = set(columns)-set(model._fields)
        for col in TCOLS:
            columns.remove(col)
            QRY = f"ALTER TABLE {table} DROP COLUMN {col}"
            cursor.execute(QRY)
            print("\n\n", QRY)

        return True
1217431
def update_payload(self, fields=None):
        """"""
        data = super(SyncPlan, self).update_payload(fields)
        if isinstance(data.get('sync_date'), datetime):
            data['sync_date'] = data['sync_date'].strftime('%Y-%m-%d %H:%M:%S')
        return data
368566
protected function updateTimestamps()
    {
        if ($this->parent->timestamps)
        {
            $time = $this->freshTimestamp();

            $this->setUpdatedAt($time);

            if ( ! $this->exists())
            {
                $this->setCreatedAt($time);
            }
        }
    }
964395
function updatedec(){
  var dec = decinputfield;
  if(decinputvalue != dec){
    updateall(decinputtobin(dec));
    clearallinputs();
    decinputfield = dec;
    decinputvalue = dec;
  }
}
886020
private void updateRemoveR() {
        for( int i = 1; i < n+1; i++ ) {
            for( int j = 0; j < n; j++ ) {
                double sum = 0;
                for( int k = i-1; k <= j; k++ ) {
                    sum += U_tran.data[i*m+k] * R.data[k*n+j];
                }
                R.data[(i-1)*n+j] = sum;
            }
        }
    }
516852
def transform_field(field):
    """"""
    field.name = field.attname
    if isinstance(field, models.AutoField):
        field.__class__ = models.IntegerField

    elif isinstance(field, models.FileField):
        # Don't copy file, just path.
        field.__class__ = models.TextField

    # Historical instance shouldn't change create/update timestamps
    field.auto_now = False
    field.auto_now_add = False

    if field.primary_key or field.unique:
        # Unique fields can no longer be guaranteed unique,
        # but they should still be indexed for faster lookups.
        field.primary_key = False
        field._unique = False
        field.db_index = True
        field.serialize = True
32698
void mergeFields() {
        for (int k = 0; k < fields.size(); ++k) {
            HashMap fd = ((AcroFields)fields.get(k)).getFields();
            mergeWithMaster(fd);
        }
    }
1136819
function updateTrack( newList, oldList, steps,  rawNewValue, oldKeyMap ){
    
    for(var i =0, slen = steps.length; i < slen ;i++){
      var step = steps[i];
      switch( step.mode){
        case 0 : //remove
          removeRange(step.index, step.len, group.children, oldKeyMap);
          break;
        case 1 : //insert
          addRange(step.index, step.index + step.len, newList, rawNewValue, oldKeyMap )
          break;
      }
    }     
    var children = group.children;
    for(var j=1, len = children.length; j < len; j++){
      var child = children[j];
      if( child ){
        child.data[variable] = newList[j-1];
        child.data[indexName] = j-1
      }
    }

    
  }
1348515
def update_fields(fields)
      attributes[:id] = fields['id'] || attributes[:id]
      attributes[:name] = fields['name'] || fields[:name] || attributes[:name]
      attributes[:description] = fields['desc'] || attributes[:description]
      attributes[:closed] = fields['closed'] if fields.has_key?('closed')
      attributes[:url] = fields['url'] || attributes[:url]
      attributes[:check_items] = fields['checkItems'] if fields.has_key?('checkItems')
      attributes[:position] = fields['pos'] || attributes[:position]
      attributes[:board_id] = fields['idBoard'] || attributes[:board_id]
      attributes[:card_id] = fields['idCard'] || fields[:card_id] || attributes[:card_id]
      attributes[:list_id] = fields['idList'] || attributes[:list_id]
      attributes[:member_ids] = fields['idMembers'] || attributes[:member_ids]
      self
    end
1286247
public void prepareUpdateStep5b() {

        if (!isInitialized()) {
            return;
        }

        addSubscriptionDriver();

        if ((m_workplaceUpdateThread != null) && (m_workplaceUpdateThread.isFinished())) {
            // update is already finished, just wait for client to collect final data
            return;
        }

        if (m_workplaceUpdateThread == null) {
            m_workplaceUpdateThread = new CmsUpdateThread(this);
        }

        if (!m_workplaceUpdateThread.isAlive()) {
            m_workplaceUpdateThread.start();
        }
    }
248532
protected function adjustDependentFields()
    {
        // Recurring-event fields
        if (array_key_exists('repeats', $this->aProperties) && !$this->repeats) {
            $this->frequency = null;
            $this->interval = self::INTERVAL_ONCE;
            $this->setWeekdays();
            $this->ends_at = null;
        }

        // Datetimes & timezone
        if (!is_null($this->strStartsAt)) {
            $this->aProperties['starts_at'] = Carbon::parse($this->strStartsAt, $this->strTimezone)
                ->setTimezone('UTC')
                ->toDateTimeString();
        }
        if (!is_null($this->strEndsAt)) {
            $this->aProperties['ends_at'] = Carbon::parse($this->strEndsAt, $this->strTimezone)
                ->setTimezone('UTC')
                ->toDateTimeString();
        }
    }
1337237
private void updateTime() {
        computeTime();
        // If we are lenient, we need to recompute the fields to normalize
        // the values.  Also, if we haven't set all the fields yet (i.e.,
        // in a newly-created object), we need to fill in the fields. [LIU]
        if (isLenient() || !areAllFieldsSet) areFieldsSet = false;
        isTimeSet = true;
        areFieldsVirtuallySet = false;
    }
320564
def update_done(self, *args, **kwargs):
        """"""
        kwargs['state'] = 'done'
        self.update(*args, **kwargs)
        self.rec = None
1331968
def set_data(self, index, value):
        """"""
        acces, field = self.get_item(index), self.header[index.column()]
        self.beginResetModel()
        self.set_data_hook(acces, field, value)
        self.endResetModel()
256081
def finish(self):
        """"""
        self.update(self.maxval)
        if self.signal_set:
            signal.signal(signal.SIGWINCH, signal.SIG_DFL)