Set client property if not set.
557311
def _set_client(self):
        """"""
        if self._client is None:
            if mongo_proxy:
                self._client = mongo_proxy.MongoProxy(
                    pymongo.MongoClient(self.connection_string),
                    logger=LOG)
            else:
                LOG.warning("MongoDBProxy not imported. AutoReconnect "
                            "is not enabled.")
                self._client = mongo_proxy.MongoProxy(
                    pymongo.MongoClient(self.connection_string),
                    logger=LOG)
            LOG.debug("Created new connection to MongoDB: %s",
                      self.safe_connection_string)
1085461
def SetProperties(has_props_cls, input_dict, include_immutable=True):
    """"""
    props = has_props_cls()
    if not isinstance(input_dict, (dict, collections.OrderedDict)):
        raise RuntimeError('input_dict invalid: ', input_dict)
    for k, v in iter(input_dict.items()):
        if (k in has_props_cls._props and (
                include_immutable or
                any(hasattr(has_props_cls._props[k], att) for att in ('required', 'new_name'))
                )
           ):
            p = props._props.get(k)
            if isinstance(p, properties.HasProperties):
                props._set(k, SetProperties(p, v, include_immutable=include_immutable))
            elif isinstance(p, properties.Instance):
                props._set(k, SetProperties(p.instance_class, v, include_immutable=include_immutable))
            elif isinstance(p, properties.List):
                if not isinstance(v, list):
                    raise RuntimeError('property value mismatch', p, v)
                if not isinstance(v[0], properties.HasProperties):
                    prop = p.prop.instance_class
                    newlist = []
                    for i in v:
                        value = SetProperties(prop, i, include_immutable=include_immutable)
                        newlist.append(value)
                    props._set(k, newlist)
                else:
                    props._set(k, v)
            else:
                props._set(k, p.from_json(v))

    # Return others as well
    # others_dict = {k: v for k, v in iter(input_dict.items())
    #                if k not in has_props_cls._props}
    return props
997885
function setBox(){
    if(my.container){
      my.box = {
        x: 0,
        y: 0,
        width: my.container.clientWidth,
        height: my.container.clientHeight
      };
    }
  }
1053987
def _set_properties(self, data):
        
        for property in data.keys():
            if property in vars(self):
                setattr(self, property, data[property])
357708
def workflow_set_properties(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/setProperties' % object_id, input_params, always_retry=always_retry, **kwargs)
391580
def on_set(self, key, value):
    """"""
    if self._on_set is not None:
      self._on_set(key, value)
343319
function Property (initValue) {
		if (arguments.length) {
			this.set(initValue);
		}
		else {
			this.set(this.defaultValue);
		}
		ok.Data.apply(this, arguments);
	}
612581
public void setClientID(String clientID) {
        if (clientID == null || clientID.isEmpty()) {
            this.clientID = DEFAULT_CLIENT_ID;
            return;
        }
        this.clientID = clientID;
    }
543568
def set_on_level(self, val):
        """"""
        on_cmd = self._create_set_property_msg("_on_level", 0x06,
                                               val)
        self._send_method(on_cmd, self._property_set)
        self._send_method(on_cmd, self._on_message_received)
123759
def set_property(node_uri, property_name, property_value, ossos_base=True):
    
    node = client.get_node(node_uri)
    property_uri = tag_uri(property_name) if ossos_base else property_name

    # If there is an existing value, clear it first
    if property_uri in node.props:
        node.props[property_uri] = None
        client.add_props(node)

    node.props[property_uri] = property_value
    client.add_props(node)
147157
def set_property(self, prop, value):
        """"""
        cmd_url = 'ctrl-int/1/setproperty?{}={}&[AUTH]'.format(
            prop, value)
        return self.daap.post(cmd_url)
1009632
def _set_property(self, val, *args):
        """"""
        if self._prop_write:
            val = self._prop_write(val)
        return self._setter(Adapter._get_property(self), val, *args)
1129878
public void setClientInfo(final Properties properties) 
        throws SQLClientInfoException {

        if (properties == null) {
            throw new IllegalArgumentException();
        } // end of if

        if (this.closed) {
            throw new SQLClientInfoException();
        } // end of if

        this.clientInfo = properties;
    }
787791
def on_connect(client):
    """"""
    client.nick(client.user.nick)
    client.userinfo(client.user.username, client.user.realname)
318055
def set_properties_from_api_repr(self, resource):
        """"""
        self.name = resource.get("name")
        self.number = resource["projectNumber"]
        self.labels = resource.get("labels", {})
        self.status = resource["lifecycleState"]
        if "parent" in resource:
            self.parent = resource["parent"]
479557
public void setCustomProperty(String name, String value) {
		if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
			SibTr.entry(tc, "setCustomProperty", name + " " + value);

		// Set the properties that belong to the bus
		// customProperties.put(name,value);

		if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
			SibTr.exit(tc, "setCustomProperty");
	}
436232
function setProperty(property, newValue) {
            var originalValue;

            if (newValue != originalValue) {
                originalValue = this[property];
                this[property] = newValue;

                this.dispatch('change:' + property, {
                    originalValue : originalValue,
                    newValue      : newValue
                });
            }

            return this;
        }