updates ground attributes, and geometry if required
974931
function (updateGeometry) {

    var resolution = 64; // number of divisions of the ground mesh

    if (updateGeometry) {
      var visibleground = this.data.ground != 'none';
      this.ground.setAttribute('visible', visibleground);
      if (!visibleground) {
        return;
      }

      if (!this.groundGeometry) {
        this.groundGeometry = new THREE.PlaneGeometry(this.STAGE_SIZE + 2, this.STAGE_SIZE + 2, resolution - 1, resolution - 1);
      }
      var perlin = new PerlinNoise();
      var verts = this.groundGeometry.vertices;
      var numVerts = this.groundGeometry.vertices.length;
      var frequency = 10;
      var inc = frequency / resolution;

      for (var i = 0, x = 0, y = 0; i < numVerts; i++) {
        if (this.data.ground == 'flat') {
          verts[i].z = 0;
          continue;
        }

        var h;
        switch (this.data.ground) {
          case 'hills': {
            h = Math.max(0, perlin.noise(x, y, 0));
            break;
          }
          case 'canyon': {
            h = 0.2 + perlin.noise(x, y, 0) * 0.8;
            h = Math.min(1, Math.pow(h, 2) * 10);
            break;
          }
          case 'spikes': {
            h = this.random(i) < 0.02 ? this.random(i + 1) : 0;
            break;
          }
          case 'noise': {
            h = this.random(i) < 0.35 ? this.random(i + 1) : 0;
            break;
          }
        }

        h += this.random(i + 2) * 0.1; // add some randomness

        // flat ground in the center
        var xx = x * 2 / frequency - 1;
        var yy = y * 2 / frequency - 1;
        var pa = this.data.playArea;
        xx = Math.max(0, Math.min(1, (Math.abs(xx) - (pa - 0.9)) * (1 / pa) ));
        yy = Math.max(0, Math.min(1, (Math.abs(yy) - (pa - 0.9)) * (1 / pa) ));
        h *= xx > yy ? xx : yy;
        if (h < 0.01) h = 0; // stick to the floor

        // set height
        verts[i].z = h;

        // calculate next x,y ground coordinates
        x += inc;
        if (x >= 10) {
          x = 0;
          y += inc;
        }
      }

      this.groundGeometry.computeFaceNormals();
      if (this.data.flatShading) {
        this.groundGeometry.computeFlatVertexNormals();
      }
      else {
        this.groundGeometry.computeVertexNormals();
      }

      this.groundGeometry.verticesNeedUpdate = true;
      this.groundGeometry.normalsNeedUpdate = true;
    }

    // apply Y scale. There's no need to recalculate the geometry for this. Just change scale
    this.ground.setAttribute('scale', {z: this.data.groundYScale});

    // update ground, playarea and grid textures.
    var groundResolution = 2048;
    var texMeters = 20; // ground texture of 20 x 20 meters
    var texRepeat = this.STAGE_SIZE / texMeters;

    if (!this.groundCanvas || this.groundCanvas.width != groundResolution) {
      this.gridCanvas = document.createElement('canvas');
      this.gridCanvas.width = groundResolution;
      this.gridCanvas.height = groundResolution;
      this.gridTexture = new THREE.Texture(this.gridCanvas);
      this.gridTexture.wrapS = THREE.RepeatWrapping;
      this.gridTexture.wrapT = THREE.RepeatWrapping;
      this.gridTexture.repeat.set(texRepeat, texRepeat);

      this.groundCanvas = document.createElement('canvas');
      this.groundCanvas.width = groundResolution;
      this.groundCanvas.height = groundResolution;
      this.groundTexture = new THREE.Texture(this.groundCanvas);
      this.groundTexture.wrapS = THREE.RepeatWrapping;
      this.groundTexture.wrapT = THREE.RepeatWrapping;
      this.groundTexture.repeat.set(texRepeat, texRepeat);

      // ground material diffuse map is the regular ground texture and the grid texture
      // is used in the emissive map. This way, the grid is always equally visible, even at night.
      this.groundMaterialProps = {
        map: this.groundTexture,
        emissive: new THREE.Color(0xFFFFFF),
        emissiveMap: this.gridTexture
      };

      // use .shading for A-Frame < 0.7.0 and .flatShading for A-Frame >= 0.7.0
      if (new THREE.Material().hasOwnProperty('shading')) {
        this.groundMaterialProps.shading = this.data.flatShading ? THREE.FlatShading : THREE.SmoothShading;
      } else {
        this.groundMaterialProps.flatShading = this.data.flatShading;
      }

      this.groundMaterial = new THREE.MeshLambertMaterial(this.groundMaterialProps);
    }

    var groundctx = this.groundCanvas.getContext('2d');
    var gridctx = this.gridCanvas.getContext('2d');

    this.drawTexture(groundctx, groundResolution, texMeters);

    gridctx.fillStyle = '#000000';
    gridctx.fillRect(0, 0, groundResolution, groundResolution);
    this.drawGrid(gridctx, groundResolution, texMeters);

    this.groundTexture.needsUpdate = true;
    this.gridTexture.needsUpdate = true;

    if (updateGeometry) {
      var mesh = new THREE.Mesh(this.groundGeometry, this.groundMaterial);
      this.ground.setObject3D('mesh', mesh);
    }
    else {
      this.ground.getObject3D('mesh').material = this.groundMaterial;
    }

    this.ground.setAttribute('shadow', {
      cast: false,
      receive: this.data.shadow
    });
  }
818820
def update(self, **kwargs):
        """"""
        self.inflate()
        for model in self._models:
            model.update(**kwargs)
        return self
1076605
def update(self, dct):
        """"""
        d = self.__dict__.copy()
        d.update(dct)
        self.set_attrs(**d)
967691
function update(paths){
    paths.attr("transform", function(d){
      var smaller_dim = Math.min(d.d3plus.width, d.d3plus.height);
      var scale = Math.floor(smaller_dim / 16);
      return "scale("+scale+")";
    })
  }
201254
def update_positions(self, positions):
        '''
        '''
        sphs_verts = self.sphs_verts_radii.copy()
        sphs_verts += positions.reshape(self.n_spheres, 1, 3)

        self.tr.update_vertices(sphs_verts)
        self.poslist = positions
628245
def update(self, **kwargs):
        
        for attr, val in kwargs.items():
            if attr in (list(self.__class__.__attributes__) + \
                        list(associations.associations_for(self.__class__))):
                setattr(self, attr, val)
963642
def update(self):
        """"""
        self._attrs = self._session.refresh_attributes(self.name)
        self._attrs = assert_is_dict(self._attrs)

        # force base_state to update properties
        if self.base_station:
            self.base_station.update()
1013581
private void updateMovementVector() {
		dirX = (float) Math.sin(Math.toRadians(ang));
		dirY = (float) -Math.cos(Math.toRadians(ang));
	}
359015
def update(self, deltat=1.0):
        ''''''
        DNFZ.update(self, deltat)
        if (self.distance_from_home() > gen_settings.region_width or
            self.getalt() < self.ground_height() or
            self.getalt() > self.ground_height() + 1000):
            self.randpos()
            self.randalt()
1372147
def update(self, pointvol):
        """"""

        # Check if we should use the provided pool for updating.
        if self.use_pool_update:
            pool = self.pool
        else:
            pool = None

        # Update the ellipsoid.
        self.ell.update(self.live_u, pointvol=pointvol, rstate=self.rstate,
                        bootstrap=self.bootstrap, pool=pool)
        if self.enlarge != 1.:
            self.ell.scale_to_vol(self.ell.vol * self.enlarge)

        return copy.deepcopy(self.ell)
1247716
def update_attributes(self, **kwargs):
        """"""
        attrs = self.attributes.values() + self.lists.values() \
                + self.references.values()
        for att in attrs:
            if att.name in kwargs:
                att.__set__(self, kwargs[att.name])
775392
def update_view_bounds(self):
        """"""
        self.view_bounds.left = self.pan.X - self.world_center.X
        self.view_bounds.top = self.pan.Y - self.world_center.Y
        self.view_bounds.width = self.world_center.X * 2
        self.view_bounds.height = self.world_center.Y * 2
907956
def update(self):
        
        if self.instance is None:
            raise CQLEngineException("DML Query intance attribute is None")
        assert type(self.instance) == self.model
        null_clustering_key = False if len(self.instance._clustering_keys) == 0 else True
        static_changed_only = True
        statement = UpdateStatement(self.column_family_name, ttl=self._ttl, timestamp=self._timestamp,
                                    conditionals=self._conditional, if_exists=self._if_exists)
        for name, col in self.instance._clustering_keys.items():
            null_clustering_key = null_clustering_key and col._val_is_null(getattr(self.instance, name, None))

        updated_columns = set()
        # get defined fields and their column names
        for name, col in self.model._columns.items():
            # if clustering key is null, don't include non static columns
            if null_clustering_key and not col.static and not col.partition_key:
                continue
            if not col.is_primary_key:
                val = getattr(self.instance, name, None)
                val_mgr = self.instance._values[name]

                if val is None:
                    continue

                if not val_mgr.changed and not isinstance(col, columns.Counter):
                    continue

                static_changed_only = static_changed_only and col.static
                statement.add_update(col, val, previous=val_mgr.previous_value)
                updated_columns.add(col.db_field_name)

        if statement.assignments:
            for name, col in self.model._primary_keys.items():
                # only include clustering key if clustering key is not null, and non static columns are changed to avoid cql error
                if (null_clustering_key or static_changed_only) and (not col.partition_key):
                    continue
                statement.add_where(col, EqualsOperator(), getattr(self.instance, name))
            self._execute(statement)

        if not null_clustering_key:
            # remove conditions on fields that have been updated
            delete_conditionals = [condition for condition in self._conditional
                                   if condition.field not in updated_columns] if self._conditional else None
            self._delete_null_columns(delete_conditionals)
534471
private void updateVertex(Shape shape, GeometryEditService editService, GeometryIndex index)
			throws GeometryIndexNotFoundException {
		if (shape instanceof Rectangle) {
			Rectangle rectangle = (Rectangle) shape;
			Geometry geometry = editService.getGeometry();
			Coordinate v = editService.getIndexService().getVertex(geometry, index);
			if (!targetSpace.equals(RenderSpace.WORLD)) {
				v = mapPresenter.getViewPort().getTransformationService().transform(v, RenderSpace.WORLD, targetSpace);
			}
			rectangle.setUserX(v.getX() - VERTEX_HALF_SIZE);
			rectangle.setUserY(v.getY() - VERTEX_HALF_SIZE);
		}
	}
711310
def update(self, attrs):
        """"""

        data = self.dict()
        data.update(attrs)
        heartbeat = Heartbeat(data, self.args, self.configs, _clone=True)
        return heartbeat
971944
protected void updateAppAttributes(Map<String, Object> attributes) {

        m_rootLayout.setMainHeightFull(Boolean.TRUE.equals(attributes.get(ATTR_MAIN_HEIGHT_FULL)));

        Object infoComponentObj = attributes.get(ATTR_INFO_COMPONENT);
        if (m_infoComponent != null) {
            m_infoLayout.removeComponent(m_infoComponent);
        }
        if (infoComponentObj instanceof Component) {
            m_infoComponent = (Component)infoComponentObj;
            m_infoLayout.addComponent(m_infoComponent);
        }
    }
1255248
def update_attribute(attr,**kwargs):
    

    log.debug("Updating attribute: %s", attr.name)
    attr_i = _get_attr(attr.id)
    attr_i.name = attr.name
    attr_i.dimension_id = attr.dimension_id
    attr_i.description = attr.description

    #Make sure an update hasn't caused an inconsistency.
    #check_sion(attr_i.id)

    db.DBSession.flush()
    return JSONObject(attr_i)