Performs correct modification based on what type of change_type is specified
329527
def font_switch(change_type, arg)
      case change_type
      when Worksheet::NAME          then change_font_name(arg)
      when Worksheet::SIZE          then change_font_size(arg)
      when Worksheet::COLOR         then change_font_color(arg)
      when Worksheet::ITALICS       then change_font_italics(arg)
      when Worksheet::BOLD          then change_font_bold(arg)
      when Worksheet::UNDERLINE     then change_font_underline(arg)
      when Worksheet::STRIKETHROUGH then change_font_strikethrough(arg)
      else raise 'Invalid change_type'
      end
    end
617646
def _change_generic(env, model_name, record_ids, target_record_id,
                    exclude_columns, method='orm'):
    
    for model_to_replace, res_id_column, model_column in [
            ('calendar.event', 'res_id', 'res_model'),
            ('ir.attachment', 'res_id', 'res_model'),
            ('mail.activity', 'res_id', 'res_model'),
            ('mail.followers', 'res_id', 'res_model'),
            ('mail.message', 'res_id', 'model'),
            ('rating.rating', 'res_id', 'res_model'),
            ]:
        try:
            model = env[model_to_replace].with_context(active_test=False)
        except KeyError:
            continue
        if (model._table, res_id_column) in exclude_columns:
            continue
        if method == 'orm':
            records = model.search([
                (model_column, '=', model_name),
                (res_id_column, 'in', record_ids)])
            if records:
                records.write({res_id_column: target_record_id})
                logger.debug(
                    "Changed %s record(s) of model '%s'",
                    len(records), model_to_replace)
        else:
            logged_query(
                env.cr,
                """ UPDATE %(table)s
                    SET %(res_id_column)s = %(target_record_id)s
                    WHERE %(model_column)s = %(model_name)s
                    AND %(res_id_column)s in %(record_ids)s
                """,
                {
                    'table': AsIs(model._table),
                    'res_id_column': AsIs(res_id_column),
                    'model_column': AsIs(model_column),
                    'model_name': model_name,
                    'target_record_id': target_record_id,
                    'record_ids': record_ids,
                }, skip_no_result=True)
894263
function modify( $tpl, $operatorName, $operatorParameters, $rootNamespace, $currentNamespace, &$value, $namedParameters, $placement )
    {
        if ( isset( $this->PHPNameMap[$operatorName] ) )
        {
            $typeFunction = $this->PHPNameMap[$operatorName];
            $this->checkType( $typeFunction, $tpl, $value, $operatorParameters, $rootNamespace, $currentNamespace, $placement );
            return;
        }
        switch ( $operatorName )
        {
            case $this->IsClassName:
            {
                if ( count( $operatorParameters ) == 1 )
                {
                    $className = $tpl->elementValue( $operatorParameters[0], $rootNamespace, $currentNamespace, $placement );
                    $value = strtolower( get_class( $value ) ) == strtolower( $className );
                }
                else
                {
                    $className = $tpl->elementValue( $operatorParameters[0], $rootNamespace, $currentNamespace, $placement );
                    $value = strtolower( get_class( $tpl->elementValue( $operatorParameters[1], $rootNamespace, $currentNamespace, $placement ) ) ) == strtolower( $className );
                }
            } break;
            case $this->IsSetName:
            {
                if ( count( $operatorParameters ) > 0 )
                {
                    if ( count( $operatorParameters ) > 1 )
                    {
                        $tpl->extraParameters( $operatorName, count( $operatorParameters ), 1 );
                    }

                    $operand = $tpl->elementValue( $operatorParameters[0], $rootNamespace, $currentNamespace, $placement, true );
                    $value = $operand !== null;


                }
                else
                    $tpl->missingParameter( $operatorName, 'input' );

            } break;
            case $this->IsUnsetName:
            {
                if ( count( $operatorParameters ) > 0 )
                {
                    if ( count( $operatorParameters ) > 1 )
                        $tpl->extraParameters( $operatorName,
                                               count( $operatorParameters ),
                                               1 );
                    $operand = $tpl->elementValue( $operatorParameters[0], $rootNamespace, $currentNamespace, $placement, true );
                    $value = $operand === null;
                }
                else
                    $tpl->missingParameter( $operatorName, 'input' );
            } break;
            case $this->GetTypeName:
            {
                if ( count( $operatorParameters ) > 0 )
                {
                    if ( count( $operatorParameters ) > 1 )
                        $tpl->extraParameters( $operatorName,
                                               count( $operatorParameters ),
                                               1 );
                    $operand = $tpl->elementValue( $operatorParameters[0], $rootNamespace, $currentNamespace, $placement );
                }
                else
                    $operand =& $value;
                if ( $operand === null )
                    $value = 'null';
                else if ( is_bool( $operand ) )
                    $value = 'boolean[' . ( $operand ? 'true' : 'false' ) . ']';
                else if ( is_object( $operand ) )
                    $value = 'object[' . get_class( $operand ) . ']';
                else if ( is_array( $operand ) )
                    $value = 'array[' . count( $operand ) . ']';
                else if ( is_string( $operand ) )
                    $value = 'string[' . strlen( $operand ) . ']';
                else
                    $value = gettype( $operand );
            } break;
            case $this->GetClassName:
            {
                if ( count( $operatorParameters ) > 0 )
                {
                    if ( count( $operatorParameters ) > 1 )
                        $tpl->extraParameters( $operatorName,
                                               count( $operatorParameters ),
                                               1 );
                    $operand = $tpl->elementValue( $operatorParameters[0], $rootNamespace, $currentNamespace, $placement );
                    $value = strtolower( get_class( $operand ) );
                }
                else
                {
                    $value = strtolower( get_class( $value ) );
                }
            } break;
        }
    }
263141
function setVersion(type, ver) {

  const idx = verMap[type];
  let cur = verArr[idx];
  let next = cur + 1;

  if (isTruthy(ver))
    next = ver;

  if (isTruthy(ver)) {
    verArr[idx] = ver;
  }

  else {
    if (type === 'patch') {
      if (next > maxPatch) {
        // zero current stepping
        // up to minor.
        verArr[idx] = 0;
        return setVersion('minor');
      }
      else {
        verArr[idx] = next;
      }
    }
    else if (type === 'minor') {
      if (next > maxMinor) {
        // zero current stepping
        // up to major.
        verArr[idx] = 0;
        return setVersion('major');
      }
      else {
        verArr[idx] = next;
      }
    }
    else {
      verArr[idx] = next;
    }
  }

}
577516
def modify(self, **kwargs):
        """"""
        for key, val in kwargs.items():
            setattr(self, key, val)
        return self
808548
def changed?
      return false unless loaded?
      return true if added.length > 0
      return true if removed.length > 0
      false
    end
689091
def on_change(self, value):
        ''''''
        self._modifier(self.inst, self.prop, value)
221109
function setEditType(field, editType) {
    var gridCompColumn = this.getColumnByField(field);
    gridCompColumn.options.editType = editType;
}
1070633
def modify_member(row, key, value):
    '''  '''
    (target, tkey, tvalue) = dict_crawl(row, key)
    if target:
        target[tkey] = value
    return row
950990
def qteModificationChanged(self, mod):
        
        if mod:
            s = '*'
        else:
            s = '-'
        self._qteModeBar.qteChangeModeValue('MODIFIED', s)
1187345
def _check_patch_type_mismatch(self, patched_item, existing_item):
        """"""
        def raise_mismatch_error(patched_item, existing_item, data_type_name):
            error_msg = ('Type mismatch. Patch {} corresponds to pre-existing '
                'data_type {} ({}:{}) that has type other than {}.')
            raise InvalidSpec(error_msg.format(
                quote(patched_item.name),
                quote(existing_item.name),
                existing_item.path,
                existing_item.lineno,
                quote(data_type_name)), patched_item.lineno, patched_item.path)

        if isinstance(patched_item, AstStructPatch):
            if not isinstance(existing_item, AstStructDef):
                raise_mismatch_error(patched_item, existing_item, 'struct')
        elif isinstance(patched_item, AstUnionPatch):
            if not isinstance(existing_item, AstUnionDef):
                raise_mismatch_error(patched_item, existing_item, 'union')
            else:
                if existing_item.closed != patched_item.closed:
                    raise_mismatch_error(
                        patched_item, existing_item,
                        'union_closed' if existing_item.closed else 'union')
        else:
            raise AssertionError(
                'Unknown Patch Object Type {}'.format(patched_item.__class__.__name__))
1191968
def change_type(self, func):
        """"""
        model = self.model()
        index_list = self.selectedIndexes()
        [model.setData(i, '', change_type=func) for i in index_list]
725913
void onEndTypeChange() {

        EndType endType = m_model.getEndType();
        m_groupDuration.selectButton(getDurationButtonForType(endType));
        switch (endType) {
            case DATE:
            case TIMES:
                m_durationPanel.setVisible(true);
                m_seriesEndDate.setValue(m_model.getSeriesEndDate());
                int occurrences = m_model.getOccurrences();
                if (!m_occurrences.isFocused()) {
                    m_occurrences.setFormValueAsString(occurrences > 0 ? "" + occurrences : "");
                }
                break;
            default:
                m_durationPanel.setVisible(false);
                break;
        }
        updateExceptions();
    }
1363911
def update_templatetype(templatetype,**kwargs):
    

    tmpltype_i = db.DBSession.query(TemplateType).filter(TemplateType.id == templatetype.id).one()

    _update_templatetype(templatetype, tmpltype_i)

    db.DBSession.flush()

    return tmpltype_i
243543
def find_types_that_changed_kind(
    old_schema: GraphQLSchema, new_schema: GraphQLSchema
) -> List[BreakingChange]:
    
    old_type_map = old_schema.type_map
    new_type_map = new_schema.type_map

    breaking_changes = []
    for type_name in old_type_map:
        if type_name not in new_type_map:
            continue
        old_type = old_type_map[type_name]
        new_type = new_type_map[type_name]
        if old_type.__class__ is not new_type.__class__:
            breaking_changes.append(
                BreakingChange(
                    BreakingChangeType.TYPE_CHANGED_KIND,
                    f"{type_name} changed from {type_kind_name(old_type)}"
                    f" to {type_kind_name(new_type)}.",
                )
            )
    return breaking_changes
103571
def modify_column(self, table, name, new_name=None, data_type=None, null=None, default=None):
        """"""
        existing_def = self.get_schema_dict(table)[name]

        # Set column name
        new_name = new_name if new_name is not None else name

        # Set data type
        if not data_type:
            data_type = existing_def['Type']

        # Set NULL
        if null is None:
            null_ = 'NULL' if existing_def['Null'].lower() == 'yes' else 'NOT NULL'
        else:
            null_ = 'NULL' if null else 'NOT NULL'

        default = 'DEFAULT {0}'.format(default if default else null_)

        query = 'ALTER TABLE {0} CHANGE {1} {2} {3} {4} {5}'.format(wrap(table), wrap(name), wrap(new_name), data_type,
                                                                           null_, default)
        self.execute(query)
        self._printer('\tModified column {0}'.format(name))
563320
function modify( &$tpl, &$operatorName, &$operatorParameters, &$rootNamespace,
                     &$currentNamespace, &$operatorValue, &$namedParameters )
    {
       switch ( $operatorName )
       {
            case 'opengraph':
            {
                $operatorValue = $this->generateOpenGraphTags( $namedParameters['nodeid'] );
                break;
            }
            case 'language_code':
            {
                $operatorValue = eZLocale::instance()->httpLocaleCode();
                break;
            }
       }
    }