Set property values for Polygon.
11373
def set_contourf_properties(stroke_width, fcolor, fill_opacity, contour_levels, contourf_idx, unit):
    """"""
    return {
        "stroke": fcolor,
        "stroke-width": stroke_width,
        "stroke-opacity": 1,
        "fill": fcolor,
        "fill-opacity": fill_opacity,
        "title": "%.2f" % contour_levels[contourf_idx] + ' ' + unit
    }
1055228
def setValues(self, values):
        
        ncols = self.getNumCols()
        nindices = self.getNumIndices()
        for key, value in values.items():
            key = Utils.convToList(key)
            assert len(key) == nindices
            value = Utils.convToList(value)
            assert len(value) == ncols-nindices
            self.addRow(key + value)
1366089
def _set_property(self, val, *args):
        """"""
        val = UserClassAdapter._set_property(self, val, *args)
        if val:
            Adapter._set_property(self, val, *args)
        return val
413703
def set_value(self, key, field, value):
        """"""
        self._db.hset(key, field, value)
63429
public void setValue(Properties properties)  {
        if (properties == null) {
            throw new IllegalArgumentException("properties must not be null");
        }
        if (type == null) {
            type = ItemType.PROPERTIES;
        }
        if (!isMappableType()) {
            throw new IllegalArgumentException("The type of this item must be 'properties' or 'map'");
        }
        tokensMap = new LinkedHashMap<>();
        for (String key : properties.stringPropertyNames()) {
            Object o = properties.get(key);
            if (o instanceof Token[]) {
                tokensMap.put(key, (Token[])o);
            } else if (o instanceof Token) {
                Token[] tokens = new Token[] { (Token)o };
                tokensMap.put(key, tokens);
            } else {
                Token[] tokens = TokenParser.makeTokens(o.toString(), isTokenize());
                putValue(name, tokens);
            }
        }
    }
108065
function setGeom(params) {
    params.geom = {};

    for(var param in params) {
      if(params.hasOwnProperty(param) && geoms.indexOf(param) !== -1){
        params.geom[param] = params[param];
        delete params[param];
      }
    }

    setGeomAttrList(params.geom);
  }
563794
def create_regpoly(self, x0, y0, x1, y1, sides=0, start=90, extent=360, **kw):
        """"""
        coords = self.__regpoly_coords(x0, y0, x1, y1, sides, start, extent)
        return self.canvas.create_polygon(*coords, **kw)
893169
protected void set(double values[][])
    {
        super.set(values);
        nRows = nCols = Math.min(nRows, nCols);
    }
66140
def set(self, locs, values):
        
        try:
            self.values[locs] = values
        except (ValueError):

            # broadcasting error
            # see GH6171
            new_shape = list(values.shape)
            new_shape[0] = len(self.items)
            self.values = np.empty(tuple(new_shape), dtype=self.dtype)
            self.values.fill(np.nan)
            self.values[locs] = values
128947
def set_value(cls, group, key=None, value=None):
        """"""
        return cls.query.set_value(general_object_model_class=cls, group=group, key=key, value=value)
376441
@SuppressWarnings({"unchecked", "SuspiciousSystemArraycopy"})
    private static void setIndexedValue(Object obj, Property property, int index, Object value, ObjectWrapper options) {
        if (property == null) {
            throw new IllegalArgumentException("Cannot set a new indexed value to a 'null' property.");
        }

        Object propertyValue = property.get(obj);

        if (propertyValue == null) {
            if (options.isAutoInstancing) {
                Class<?> propertyType = property.getType();

                if (propertyType.isAssignableFrom(List.class)) {
                    propertyValue = new ArrayList();
                    property.set(obj, propertyValue);
                } else if (propertyType.isArray()) {
                    propertyValue = Array.newInstance(property.getActualType(), index + 1);
                    property.set(obj, propertyValue);
                } else {
                    throw new IllegalArgumentException("The indexed " + property + " in object "
                                                               + obj.getClass().getSimpleName() + " has value 'null'. Only List and array types can be " +
                                                               "auto instantiated, but " + propertyType.getSimpleName() + " found.");
                }
            } else {
                throw new NullPointerException("Invalid 'null' value found for the indexed '" + property + "' in "
                                                       + obj.getClass().getName() + " object.");
            }
        }

        if (propertyValue instanceof List) {
            List list = (List) propertyValue;
            int size = list.size();

            if (index >= size && options.isAutoGrowing) {
                for (int i = size; i < index; i++) {
                    try {
                        list.add(null);
                    } catch (NullPointerException ex) {
                        throw new NullPointerException("The indexed " + property + " has size lower than the requested '"
                                                               + index + "' index. An attempt to autogrowing it, filling with 'null' values, was made, " +
                                                               " but the List implementation seems to do not accept 'null' values. " + ex.getMessage());
                    }
                }

                list.add(index, value);
            } else {
                try {
                    list.set(index, value);
                } catch (IndexOutOfBoundsException e) {
                    throw new IndexOutOfBoundsException("Cannot set a new value to the indexed list " + property + " in "
                                                                + obj.getClass().getSimpleName() + " as the requested '" + index + "' index is unbound.");
                }
            }
        } else if (propertyValue.getClass().isArray()) {
            int length = Array.getLength(propertyValue);

            if (index >= length && options.isAutoGrowing) {
                Object biggerArray = Array.newInstance(property.getActualType(), index + 1);
                System.arraycopy(propertyValue, 0, biggerArray, 0, length);
                property.set(obj, biggerArray);
                propertyValue = biggerArray;
            }

            try {
                Array.set(propertyValue, index, value);
            } catch (ArrayIndexOutOfBoundsException e) {
                throw new IndexOutOfBoundsException("Cannot set a new value to the indexed array " + property
                                                            + " in " + obj.getClass().getSimpleName() + " as the requested '" + index + "' index is unbound.");
            }
        } else {
            throw new IllegalArgumentException("Cannot set a new value to a not indexed " + property + ". Only List and array " +
                                                       "types are supported, but " + propertyValue.getClass().getName() + " found.");
        }
    }
1259544
private void setPropertyValue(Object pObj, String pProperty, 
                                  Object pValue) {
	
        Method m = null;
        Class[] cl = {pValue.getClass()};
	
        try {
            //Util.setPropertyValue(pObj, pProperty, pValue);	   
	    
            // Find method
            m = pObj.getClass().
                getMethod("set" + StringUtil.capitalize(pProperty), cl);
            // Invoke it
            Object[] args = {pValue};
            m.invoke(pObj, args);
	    
        }
        catch (NoSuchMethodException e) {
            e.printStackTrace();
        }		
        catch (IllegalAccessException iae) {
            iae.printStackTrace();
        }
        catch (InvocationTargetException ite) {
            ite.printStackTrace();
        }

    }
155626
function Polygon(polygon) {
        crs(polygon);
        bbox(polygon);
        if (!requiredProperty(polygon, 'coordinates', 'array')) {
            if (!positionArray(polygon.coordinates, 'LinearRing', 2)) {
                rightHandRule(polygon, errors);
            }
        }
    }
1307208
public void setProperty(final String propertyName, final List<String> values) {
        Preconditions.checkNotNull(propertyName);
        if (values == null) {
            properties.put(propertyName, null);
            return;
        }
        properties.put(propertyName, values);
    }
366752
def _set_property(xml_root, name, value, properties=None):
    """"""
    if properties is None:
        properties = xml_root.find("properties")

    for prop in properties:
        if prop.get("name") == name:
            prop.set("value", utils.get_unicode_str(value))
            break
    else:
        etree.SubElement(
            properties, "property", {"name": name, "value": utils.get_unicode_str(value)}
        )
520780
public static void setProperty(String key, String value, PropertyOwner propertyOwner, Map<String,Object> properties)
    {
        if (propertyOwner != null)
        {
            propertyOwner.setProperty(key, value);
        }
        if (properties != null)
        {
            if (value != null)
                properties.put(key, value);
            else
                properties.remove(key);
        }
    }
1324339
def set(self, **args) :
		""
		for k, v in args.items() :
			setattr(self, k, v)