Used by hashUpdate()
185164
private final void resizeCache() {
    final ResizeFactor rf = getResizeFactor();
    final int lgTgtLongs = lgNomLongs_ + 1;
    final int lgDeltaLongs = lgTgtLongs - lgArrLongs_;
    final int lgResizeFactor = max(min(rf.lg(), lgDeltaLongs), 1); //rf_.lg() could be 0
    lgArrLongs_ += lgResizeFactor; // new tgt size

    final long[] tgtArr = new long[1 << lgArrLongs_];
    final int newCount = HashOperations.hashArrayInsert(cache_, tgtArr, lgArrLongs_, thetaLong_);

    assert newCount == curCount_;  //Assumes no dirty values.
    curCount_ = newCount;

    cache_ = tgtArr;
    hashTableThreshold_ = setHashTableThreshold(lgNomLongs_, lgArrLongs_);
  }
551571
static void buildHashTable(Block keyBlock, int keyOffset, int keyCount, MethodHandle keyBlockHashCode, int[] outputHashTable, int hashTableOffset, int hashTableSize)
    {
        for (int i = 0; i < keyCount; i++) {
            int hash = getHashPosition(keyBlock, keyOffset + i, keyBlockHashCode, hashTableSize);
            while (true) {
                if (outputHashTable[hashTableOffset + hash] == -1) {
                    outputHashTable[hashTableOffset + hash] = i;
                    break;
                }
                hash++;
                if (hash == hashTableSize) {
                    hash = 0;
                }
            }
        }
    }
249129
private ImmutableTriple<Integer,ResultSet,SQLWarning> update(final TreeMap<Integer,Parameter> parameters) throws SQLException {

        checkClosed();

        if (this.query) {
            throw new SQLException("Cannot update with query");
        } // end of if

        // ---

        final ArrayList<Parameter> params = 
            new ArrayList<Parameter>(parameters.values());

        final int idx = params.indexOf(null);

        if (idx != -1) {
            throw new SQLException("Missing parameter value: " + (idx+1));
        } // end of if

        // ---

        try {
            final UpdateResult res = this.handler.whenSQLUpdate(sql, params);
            final SQLWarning w = res.getWarning();
            final ResultSet k = (res.generatedKeys == null) 
                ? EMPTY_GENERATED_KEYS.withStatement(this)
                : generateKeysResultSet(res);
            
            return ImmutableTriple.of(res.getUpdateCount(), k, w);
        } catch (SQLException se) {
            throw se;
        } catch (Exception e) {
            throw new SQLException(e.getMessage(), e);
        } // end of catch
    }
390992
boolean checkUpdate(final INodeReadTrx paramNewRtx, final INodeReadTrx paramOldRtx) throws TTIOException {
        assert paramNewRtx != null;
        assert paramOldRtx != null;
        boolean updated = false;
        final long newKey = paramNewRtx.getNode().getDataKey();
        boolean movedNewRtx = paramNewRtx.moveTo(((ITreeStructData)paramNewRtx.getNode()).getRightSiblingKey());
        final long oldKey = paramOldRtx.getNode().getDataKey();
        boolean movedOldRtx = paramOldRtx.moveTo(((ITreeStructData)paramOldRtx.getNode()).getRightSiblingKey());
        if (movedNewRtx && movedOldRtx && checkNodes(paramNewRtx, paramOldRtx)) {
            updated = true;
        } else if (!movedNewRtx && !movedOldRtx) {
            movedNewRtx = paramNewRtx.moveTo(paramNewRtx.getNode().getParentKey());
            movedOldRtx = paramOldRtx.moveTo(paramOldRtx.getNode().getParentKey());

            if (movedNewRtx && movedOldRtx && checkNodes(paramNewRtx, paramOldRtx)) {
                updated = true;
            }
        }
        paramNewRtx.moveTo(newKey);
        paramOldRtx.moveTo(oldKey);
        if (!updated) {
            updated = paramNewRtx.getNode().getDataKey() == paramOldRtx.getNode().getDataKey();
        }
        return updated;
    }
902777
private int rollHash(int hashvalue, String str, int i) {
    // 'roll' hash
    char outchar = str.charAt(str.length() - 1 - i);
    char inchar = str.charAt(str.length() - _block - 1 - i);
    hashvalue = A * hashvalue + CHAR_HASHES[inchar] - _Apowblock * CHAR_HASHES[outchar];
    return hashvalue;
  }
9361
public void bindUpdate(PreparedStatement stmt, ClassDescriptor cld, Object obj) throws java.sql.SQLException
    {
        if (cld.getUpdateProcedure() != null)
        {
            this.bindProcedure(stmt, cld, obj, cld.getUpdateProcedure());
        }
        else
        {
            int index = 1;
            ValueContainer[] values, valuesSnapshot;
            // first take a snapshot of current locking values
            valuesSnapshot = cld.getCurrentLockingValues(obj);
            cld.updateLockingValues(obj); // BRJ
            values = getNonKeyValues(m_broker, cld, obj);

            // parameters for SET-clause
            for (int i = 0; i < values.length; i++)
            {
                setObjectForStatement(stmt, index, values[i].getValue(), values[i].getJdbcType().getType());
                index++;
            }
            // parameters for WHERE-clause pk
            values = getKeyValues(m_broker, cld, obj);
            for (int i = 0; i < values.length; i++)
            {
                setObjectForStatement(stmt, index, values[i].getValue(), values[i].getJdbcType().getType());
                index++;
            }
            // parameters for WHERE-clause locking
            // take old locking values
            values = valuesSnapshot;
            for (int i = 0; i < values.length; i++)
            {
                setObjectForStatement(stmt, index, values[i].getValue(), values[i].getJdbcType().getType());
                index++;
            }
        }
    }
453556
public int executeUpdate() throws SQLException {
        final boolean isExceptionThrown = ExecutorExceptionHandler.isExceptionThrown();
        SQLExecuteCallback<Integer> executeCallback = SQLExecuteCallbackFactory.getPreparedUpdateSQLExecuteCallback(getDatabaseType(), isExceptionThrown);
        List<Integer> results = executeCallback(executeCallback);
        if (isAccumulate()) {
            return accumulate(results);
        } else {
            return results.get(0);
        }
    }
1004536
function update(instance, array, tx, callback) {
    var
        model = instance.__model,
        beforeUpdate = model.__beforeUpdate,
        updates,
        params,
        sql;
    if (beforeUpdate) {
        beforeUpdate(instance);
    }
    if (!array) {
        array = model.__updateAttributesArray;
    }
    updates = _.map(array, function (attr) {
        return '`' + attr + '`=?';
    });
    params = _.map(array, function (attr) {
        return instance[attr];
    });
    params.push(instance[model.__primaryKey]);
    sql = utils.format('update `%s` set %s where `%s`=?', model.__table, updates.join(', '), model.__primaryKey);
    smartRunSQL(model.__pool, sql, params, tx, function (err, result) {
        if (err) {
            return callback(err);
        }
        callback(null, instance);
    });
}
957601
public boolean check(String value, String hashString) {
        return update(value.getBytes()).asString().equalsIgnoreCase(hashString);
    }
299433
public int executeUpdate() throws SQLException {
        return executeUpdate(new Updater() {
            
            @Override
            public int executeUpdate(final Statement statement, final String sql) throws SQLException {
                return statement.executeUpdate(sql);
            }
        });
    }
90231
function(older_hash, newer_hash){

	if( ! older_hash ){ older_hash = {}; }
	if( ! newer_hash ){ newer_hash = {}; }

	var ret_hash = {};
	function _add (val, key){
	    ret_hash[key] = val;
	}
	each(older_hash, _add);
	each(newer_hash, _add);
	return ret_hash;
    }
579351
function update() {
        for (var i = 0; i < states.length; i++) {
          if (anyMatch(states[i].state, states[i].params)) {
            addClass($element, activeClasses[states[i].hash]);
          } else {
            removeClass($element, activeClasses[states[i].hash]);
          }

          if (exactMatch(states[i].state, states[i].params)) {
            addClass($element, activeEqClass);
          } else {
            removeClass($element, activeEqClass);
          }
        }
      }
1247459
private void onKeyUpdated(final int index, final Map.Entry<String, String> object, final String value) {
        final HashMap<String, String> _m = new LinkedHashMap<String, String>(getValue());
        final String lastKeyValue = object.getKey();
        String mapValue = "";
        if (lastKeyValue != null) {
            mapValue = _m.remove(lastKeyValue);
        }
        _m.put(value, mapValue);
        setValue(_m, true);
    }
660587
private void _hashname() throws
      IOException,
      CssException
  {
    if (debug)
    {
      checkState(reader.curChar == '#');
      checkState(NMCHAR.matches((char) reader.peek()) || isNextEscape());
    }
    builder.type = Type.HASHNAME;
    builder.append('#');
    append(NMCHAR);
  }
786903
def _todo_do_update(self, line):
        ""
        table, line = self.get_table_params(line)
        hkey, line = line.split(" ", 1)
        expected, attr = self.get_expected(line)

        if attr[0] == '-':
            op, attr = attr.split(" ", 1)
            op = op[1]
        else:
            op = "u"

        if attr[0] == '+':
            ret, attr = attr.split(" ", 1)
            ret = ret[1:]
        else:
            ret = "ALL_NEW"

        if ',' in hkey:
            hkey, rkey = hkey.split(",", 1)
        else:
            rkey = None

        item = table.new_item(hash_key=self.get_typed_key_value(table, hkey), range_key=self.get_typed_key_value(table, rkey, False))

        attr = json.loads(attr.strip())
        for name in attr.keys():
            value = attr[name]
            if isinstance(value, list):
                value = set(value)

            if op == 'a':
                item.add_attribute(name, value)
            elif op == 'd':
                item.delete_attribute(name, value)
            else:
                item.put_attribute(name, value)

        self.pprint(item)
        updated = item.save(expected_value=expected or None, return_values=ret)
        self.pprint(updated)

        if self.consumed:
            print "consumed units:", item.consumed_units
1233852
protected Map<String, Map<Integer, Set<String>>> createUpdateList() {
    Map<String, Map<Integer, Set<String>>> updateList = new HashMap<>();
    updateList.put(UPDATE_TYPE_OFFSET, new HashMap<>());
    updateList.put(UPDATE_TYPE_POSITION, new HashMap<>());
    updateList.put(UPDATE_TYPE_LOCAL_REF_POSITION_START, new HashMap<>());
    updateList.put(UPDATE_TYPE_LOCAL_REF_POSITION_END, new HashMap<>());
    updateList.put(UPDATE_TYPE_LOCAL_REF_OFFSET_START, new HashMap<>());
    updateList.put(UPDATE_TYPE_LOCAL_REF_OFFSET_END, new HashMap<>());
    updateList.put(UPDATE_TYPE_VARIABLE, new HashMap<>());
    return updateList;
  }
907673
@Override
	public synchronized void update(long paramId, int used, String flags,
			String values) throws DatabaseException {
        try {
			psUpdate.setInt(1, used);
			psUpdate.setString(2, flags);
			psUpdate.setString(3, values);
			psUpdate.setLong(4, paramId);
			psUpdate.executeUpdate();
		} catch (SQLException e) {
			throw new DatabaseException(e);
		}
    }