Creates the DCA configuration
13176
public function create()
	{
		// Element fields, so don´t use parent construct method
		$GLOBALS['TL_DCA']['tl_content']['palettes'][$this->element] .= ',protected';
		$GLOBALS['TL_DCA']['tl_content']['fields']['protected']['eval']['tl_class'] = 'clr'; // push to new row (clear)

		// The groups field
		if (!$this->canChangeGroups)
		{
			if(($key = array_search('protected', $GLOBALS['TL_DCA']['tl_content']['palettes']['__selector__'])) !== false) {
				unset($GLOBALS['TL_DCA']['tl_content']['palettes']['__selector__'][$key]);
			}
			
			unset($GLOBALS['TL_DCA']['tl_content']['subpalettes']['protected']);
			
			$GLOBALS['TL_DCA']['tl_content']['fields']['protected']['eval']['submitOnChange'] = false;
			
			// Overwrite the elements groups with groups from the pattern
			$db = Database::getInstance();
			$db->prepare("UPDATE tl_content SET groups=? WHERE id=?")
			   ->execute($this->groups, $this->cid);
		}
		
		// The guests field
		if ($this->canChangeGuests)
		{
			$GLOBALS['TL_DCA']['tl_content']['palettes'][$this->element] .= ',guests';
		}
	}
369805
def create(config, group, type):
        """"""
        if type not in ('user', 'service'):
            raise click.BadOptionUsage(  # pragma: no cover
                "--grouptype must be 'user' or 'service'")

        client = Client()
        client.prepare_connection()
        group_api = API(client)
        group_api.create(group, type)
931283
public function createEnvironment()
    {
        if (empty($this->containerName) && !$this->dataContainer) {
            throw new DcGeneralRuntimeException('Required container name or container is missing');
        }

        if (null === $this->eventDispatcher) {
            throw new DcGeneralRuntimeException('Required event dispatcher is missing');
        }

        if (null === $this->translator) {
            throw new DcGeneralRuntimeException('Required translator is missing');
        }

        if ($this->dataContainer) {
            $dataContainer = clone $this->dataContainer;
        } else {
            $dataContainer = $this->createContainer();
        }

        /** @var EnvironmentInterface $environment */
        $environment = (new \ReflectionClass($this->environmentClassName))->newInstance();
        $environment->setDataDefinition($dataContainer);
        $environment->setEventDispatcher($this->eventDispatcher);
        $environment->setTranslator($this->translator);

        // Backwards compatibility.
        $this->getEventDispatcher()->dispatch(
            PopulateEnvironmentEvent::NAME,
            new PopulateEnvironmentEvent($environment)
        );

        return $environment;
    }
1343418
def create_default_config(self):
        
        # make config directory with the minimal possible permission
        self._config_file.parent.mkdir(mode=0o700, exist_ok=True)
        self["network.kovan"]   = {"default_eth_rpc_endpoint": "https://kovan.infura.io",   "default_gas_price" : "medium"}
        self["network.mainnet"] = {"default_eth_rpc_endpoint": "https://mainnet.infura.io", "default_gas_price" : "medium"}
        self["network.ropsten"] = {"default_eth_rpc_endpoint": "https://ropsten.infura.io", "default_gas_price" : "medium"}
        self["network.rinkeby"] = {"default_eth_rpc_endpoint": "https://rinkeby.infura.io", "default_gas_price" : "medium"}
        self["ipfs"] = {"default_ipfs_endpoint": "http://ipfs.singularitynet.io:80"}
        self["session"] = {
        "network": "kovan" }
        self._persist()
        print("We've created configuration file with default values in: %s\n"%str(self._config_file))
1131735
private function buildRadiusOptions()
    {
        if (!$this->radius || !isset($GLOBALS['TL_DCA'][$this->strTable]['fields'][$this->radius])) {
            return null;
        }

        $options = [
            'element'      => 'ctrl_' . $this->radius,
            'min'          => 0,
            'max'          => 0,
            'defaultValue' => 0
        ];

        if (isset($GLOBALS['TL_DCA'][$this->strTable]['fields'][$this->radius]['eval'])) {
            $config = $GLOBALS['TL_DCA'][$this->strTable]['fields'][$this->radius]['eval'];

            $options['min']          = isset($config['minval']) ? (int) $config['minval'] : 0;
            $options['max']          = isset($config['maxval']) ? (int) $config['maxval'] : 0;
            $options['defaultValue'] = isset($config['default']) ? (int) $config['default'] : 0;
            $options['steps']        = isset($config['steps']) ? (int) $config['steps'] : 0;
        }

        return $options;
    }
4490
def create_default_config():
    
    config = configparser.RawConfigParser()
    config.add_section('global')
    config.set('global', 'env_source_rc', False)
    config.add_section('shell')
    config.set('shell', 'bash', "true")
    config.set('shell', 'zsh', "true")
    config.set('shell', 'gui', "true")
    return config
180170
function Configurator(){
  // Store reference to the tree/template
  this.__tree = {};
  // Cached instance of the fully rendered tree.
  this.__cachedResolvedTree = null;
  // Configuration for the GraphBuilder
  this.__config = {
   directives: {
     file: new (require('./directives/file.js')),
     http: new (require('./directives/http.js')),
     require: new (require('./directives/require.js'))
   },
   resolvers: {
     absolute: {
       order: 1,
       resolve: Path.resolve(__dirname, './resolvers/absolute.js')
     },
     relative: {
       order: 2,
       resolve: Path.resolve(__dirname, './resolvers/relative.js')
     },
     environment: {
       order: 3,
       resolve: Path.resolve(__dirname, './resolvers/environment.js')
     }
   }
  };
}
60851
def create_divisao_dc(self):
        """"""
        return DivisaoDc(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)
456893
def _make_config(config):
        """"""
        # The SBC config encoding is taken from a2dp_codecs.h, in particular,
        # the a2dp_sbc_t type is converted into a 4-byte array:
        #   uint8_t channel_mode:4
        #   uint8_t frequency:4
        #   uint8_t allocation_method:2
        #   uint8_t subbands:2
        #   uint8_t block_length:4
        #   uint8_t min_bitpool
        #   uint8_t max_bitpool
        return dbus.Array([dbus.Byte(config.channel_mode |
                                     (config.frequency << 4)),
                           dbus.Byte(config.allocation_method |
                                     (config.subbands << 2) |
                                     (config.block_length << 4)),
                           dbus.Byte(config.min_bitpool),
                           dbus.Byte(config.max_bitpool)])
956844
def create_client(access_token):
    """"""
    url = 'http://keycloak:8080/auth/admin/realms/dci-test/clients'
    r = requests.post(url,
                      data=json.dumps(client_data),
                      headers=get_auth_headers(access_token))
    if r.status_code in (201, 409):
        print('Keycloak client dci created successfully.')
    else:
        raise Exception(
            'Error while creating Keycloak client dci:\nstatus code %s\n'
            'error: %s' % (r.status_code, r.content)
        )
107832
public function create()
	{
		// Element fields, so don´t use parent construct method
		$GLOBALS['TL_DCA']['tl_content']['palettes'][$this->element] .= ',invisible';
		$GLOBALS['TL_DCA']['tl_content']['fields']['invisible']['eval']['tl_class'] = 'clr'; // push to new row (clear)
	
		// The start field
		if ($this->canChangeStart)
		{
			$GLOBALS['TL_DCA']['tl_content']['palettes'][$this->element] .= ',start';
		}
		// The stop field
		if ($this->canChangeStop)
		{
			$GLOBALS['TL_DCA']['tl_content']['palettes'][$this->element] .= ',stop';
		}		
	}
1215556
public function createDcGeneral()
    {
        if (empty($this->containerName) && !$this->dataContainer) {
            throw new DcGeneralRuntimeException('Required container name or container is missing');
        }

        if (null === $this->eventDispatcher) {
            throw new DcGeneralRuntimeException('Required event dispatcher is missing');
        }

        // Backwards compatibility.
        $this->getEventDispatcher()->dispatch(PreCreateDcGeneralEvent::NAME, new PreCreateDcGeneralEvent($this));

        $environment = $this->environment ?: $this->createEnvironment();

        /** @var DcGeneral $dcGeneral */
        $dcGeneral = (new \ReflectionClass($this->dcGeneralClassName))->newInstance($environment);

        // Backwards compatibility.
        $this->getEventDispatcher()->dispatch(CreateDcGeneralEvent::NAME, new CreateDcGeneralEvent($dcGeneral));

        return $dcGeneral;
    }
693625
protected function createCommandInstance($commandName, array &$commandDca)
    {
        switch ($commandName) {
            case 'cut':
                return new CutCommand();

            case 'copy':
            case 'deepcopy':
                return new CopyCommand();

            case 'all':
                return new SelectCommand();

            case 'toggle':
                $command = new ToggleCommand();

                if (isset($commandDca['toggleProperty'])) {
                    $command->setToggleProperty($commandDca['toggleProperty']);
                    unset($commandDca['toggleProperty']);
                } else {
                    // Implicit fallback to "published" as in Contao core.
                    $command->setToggleProperty('published');
                }

                if (isset($commandDca['toggleInverse'])) {
                    $command->setInverse($commandDca['toggleInverse']);
                    unset($commandDca['toggleInverse']);
                }

                return $command;
            default:
        }
        return new Command();
    }
277325
function createCoreRuleConfigs() {
    return Object.keys(builtInRules).reduce((accumulator, id) => {
        const rule = rules.get(id);
        const schema = (typeof rule === "function") ? rule.schema : rule.meta.schema;

        accumulator[id] = generateConfigsFromSchema(schema);
        return accumulator;
    }, {});
}
474130
def create(self):
        
        payload = {'type': self._type}
        if self._ddoc_id and self._ddoc_id != '':
            if isinstance(self._ddoc_id, STRTYPE):
                if self._ddoc_id.startswith('_design/'):
                    payload['ddoc'] = self._ddoc_id[8:]
                else:
                    payload['ddoc'] = self._ddoc_id
            else:
                raise CloudantArgumentError(122, self._ddoc_id)
        if self._name and self._name != '':
            if isinstance(self._name, STRTYPE):
                payload['name'] = self._name
            else:
                raise CloudantArgumentError(123, self._name)
        self._def_check()
        payload['index'] = self._def

        if self._partitioned:
            payload['partitioned'] = True

        headers = {'Content-Type': 'application/json'}
        resp = self._r_session.post(
            self.index_url,
            data=json.dumps(payload, cls=self._database.client.encoder),
            headers=headers
        )
        resp.raise_for_status()
        self._ddoc_id = response_to_json_dict(resp)['id']
        self._name = response_to_json_dict(resp)['name']
187209
def create(vm_):
    '''
    
    '''
    creds = get_creds()
    clc.v1.SetCredentials(creds["token"], creds["token_pass"])
    cloud_profile = config.is_provider_configured(
        __opts__,
        __active_provider_name__ or __virtualname__,
        ('token',)
    )
    group = config.get_cloud_config_value(
        'group', vm_, __opts__, search_global=False, default=None,
    )
    name = vm_['name']
    description = config.get_cloud_config_value(
        'description', vm_, __opts__, search_global=False, default=None,
    )
    ram = config.get_cloud_config_value(
        'ram', vm_, __opts__, search_global=False, default=None,
    )
    backup_level = config.get_cloud_config_value(
        'backup_level', vm_, __opts__, search_global=False, default=None,
    )
    template = config.get_cloud_config_value(
        'template', vm_, __opts__, search_global=False, default=None,
    )
    password = config.get_cloud_config_value(
        'password', vm_, __opts__, search_global=False, default=None,
    )
    cpu = config.get_cloud_config_value(
        'cpu', vm_, __opts__, search_global=False, default=None,
    )
    network = config.get_cloud_config_value(
        'network', vm_, __opts__, search_global=False, default=None,
    )
    location = config.get_cloud_config_value(
        'location', vm_, __opts__, search_global=False, default=None,
    )
    if len(name) > 6:
        name = name[0:6]
    if len(password) < 9:
        password = ''
    clc_return = clc.v1.Server.Create(alias=None, location=(location), name=(name), template=(template), cpu=(cpu), ram=(ram), backup_level=(backup_level), group=(group), network=(network), description=(description), password=(password))
    req_id = clc_return["RequestID"]
    vm_['ssh_host'] = get_build_status(req_id, name)
    __utils__['cloud.fire_event'](
        'event',
        'waiting for ssh',
        'salt/cloud/{0}/waiting_for_ssh'.format(name),
        sock_dir=__opts__['sock_dir'],
        args={'ip_address': vm_['ssh_host']},
        transport=__opts__['transport']
    )

    # Bootstrap!
    ret = __utils__['cloud.bootstrap'](vm_, __opts__)
    return_message = {"Server Name": name, "IP Address": vm_['ssh_host']}
    ret.update(return_message)
    return return_message
318064
def create(self):
        
        data = values.of({})

        payload = self._version.create(
            'POST',
            self._uri,
            data=data,
        )

        return ConfigurationInstance(self._version, payload, )