cwielenb/CNCF-Dataset huggingface dataset:
Project: ArangoDB (App Definition and Development / Database)
File: _index.md

+++ title = "result<>" description = "Gentle introduction to writing code with simple success-or-failure return types." weight = 10 tags = ["result", "try", "namespace"] +++ We will define a function that converts a `std::string` to an `int`. This function can fail for a number of reasons; if it does we want to communicate the failure reason. {{% snippet "usingresult.cpp" "convertdecl" %}} Template alias {{< api "result<T, E = varies, NoValuePolicy = policy::default_policy<T, E, void>>" >}} has three template parameters, but the last two have default values. The first (`T`) represents the type of the object returned from the function upon success. The second (`EC`) is the type of object containing information about the reason for failure when the function fails. A result object stores either a `T` or an `EC` at any given moment, and is therefore conceptually similar to `variant<T, EC>`. `EC` is defaulted to `std::errorcode` in standalone Outcome, or to `boost::system::errorcode` in Boost.Outcome[^1]. The third parameter (`NoValuePolicy`) is called a no-value policy. We will cover it later. If both `T` and `EC` are , `result<T, EC, NVP>` is also trivially copyable. Triviality, complexity and constexpr-ness of each operation (construction, copy construction, assignment, destruction etc) is always the intersection of the corresponding operation in `T` and `EC`, so for example if both `T` and `EC` are , so will be `result<T, EC, NVP>`. Additionally, if both `T` and `EC` have , `result<T, EC, NVP>` has standard layout; thus if both `T` and `EC` are C-compatible, so will `result<T, EC, NVP>` be C-compatible. Now, we will define an enumeration describing different failure situations during conversion. {{% snippet "using_result.cpp" "enum" %}} Assume we have plugged it into `std::error_code` framework, as described in . One notable effect of such plugging is that `ConversionErrc` is now convertible to `std::error_code`. Now we can implement function `convert` as follows: {{% snippet "using_result.cpp" "convert" %}} `result<T, EC>` is convertible from any `T2` convertible to `T` as well as any `EC2` convertible to `EC`, provided that there is no constructability possible in either direction between `T` and `EC`. If there is, all implicit conversion is disabled, and you will need to use one of the tagged constructors: {{% snippet "using_result.cpp" "explicit" %}} Or use helper functions: {{% snippet "using_result.cpp" "factory" %}} {{% notice note %}} The functions {{< api "auto failure(T &&, ...)" >}} and {{< api "auto success(T &&, ...)" >}} return special types implicitly convertible to failed or successful `result` (and `outcome`). {{% /notice %}}
Project: Podman (App Definition and Development / Application Definition & Image Build)
File: userns-gid-map-group.md

Specifies that a GID mapping to be used to set ownership, at the filesystem level, on the working container's contents, can be found in entries in the `/etc/subgid` file which correspond to the specified group. Commands run when handling `RUN` instructions defaults to being run in their own user namespaces, configured using the UID and GID maps. If --userns-uid-map-user is specified, but --userns-gid-map-group is not specified, `podman` assumes that the specified user name is also a suitable group name to use as the default setting for this option. NOTE: When this option is specified by a rootless user, the specified mappings are relative to the rootless user namespace in the container, rather than being relative to the host as it is when run rootful.
Project: ClickHouse (App Definition and Development / Database)
File: v21.3.3.14-lts.md

sidebar_position: 1 sidebar_label: 2022 Backported in : Fix that S3 table holds old credentials after config update. (). Backported in : Fix possible error ` Cannot find column` when `optimizeskipunused_shards` is enabled and zero shards are used. (). Backported in : Fix fsyncpartdirectory for horizontal merge. (). Backported in : Fix distributed requests cancellation (for example simple select from multiple shards with limit, i.e. `select from remote('127.{2,3}', system.numbers) limit 100`) with `asyncsocketfor_remote=1`. (). Backported in : Fix bug for ReplicatedMerge table engines when `ALTER MODIFY COLUMN` query doesn't change the type of decimal column if its size (32 bit or 64 bit) doesn't change. (). Backported in : Reverted S3 connection pools. (). Backported in : Fix incorrect query result (and possible crash) which could happen when `WHERE` or `HAVING` condition is pushed before `GROUP BY`. Fixes . (). fix incorrect number of rows for Chunks with no columns in PartialSor ().
Project: KubeVela (App Definition and Development / Application Definition & Image Build)
File: apply-component.eg.md

```yaml apiVersion: core.oam.dev/v1beta1 kind: Application metadata: name: first-vela-workflow namespace: default spec: components: name: express-server type: webservice properties: image: oamdev/hello-world port: 8000 traits: type: ingress properties: domain: testsvc.example.com http: /: 8000 workflow: steps: name: express-server type: apply-component properties: component: express-server ```
Project: Carvel (App Definition and Development / Application Definition & Image Build)
File: README_ClientVPN.md

The following is a sample Lambda function that receives a Client VPN connection handler request as an input and then validates the IP address input and checks whether the connection source IP is on the allowed list defined as a map inside the function. If the source IP matches an allowed IP address it allows the access, otherwise an error message is presented to the user. Debug logs are generated to CloudWatch Logs. (Note that anything written to stdout or stderr will be logged as CloudWatch Logs events.) ```go import ( "fmt" "log" "net" "encoding/json" "github.com/aws/aws-lambda-go/events" "github.com/aws/aws-lambda-go/lambda" ) var ( AllowedIPs = map[string]bool{ "10.11.12.13": true, } ) func handler(request events.ClientVPNConnectionHandlerRequest) (events.ClientVPNConnectionHandlerResponse, error) { requestJson, _ := json.MarshalIndent(request, "", " ") log.Printf("REQUEST: %s", requestJson) sourceIP := request.PublicIP if net.ParseIP(sourceIP) == nil { return events.ClientVPNConnectionHandlerResponse{}, fmt.Errorf("Invalid parameter PublicIP passed in request: %q", sourceIP) } log.Printf("SOURCE IP: %q", sourceIP) if allowed, ok := AllowedIPs[sourceIP]; ok && allowed { log.Printf("Allowing access from: %q", sourceIP) return events.ClientVPNConnectionHandlerResponse{ Allow: true, ErrorMsgOnFailedPostureCompliance: "", PostureComplianceStatuses: []string{}, SchemaVersion: "v1", }, nil } log.Printf("Blocking access from: %q", sourceIP) return events.ClientVPNConnectionHandlerResponse{ Allow: false, ErrorMsgOnFailedPostureCompliance: "You're trying to connect from an IP address that is not allowed.", PostureComplianceStatuses: []string{"BlockedSourceIP"}, SchemaVersion: "v1", }, nil } func main() { lambda.Start(handler) } ```
Project: ShardingSphere (App Definition and Development / Database)
File: refresh-table-metadata.en.md

+++ title = "REFRESH TABLE METADATA" weight = 9 +++ The `REFRESH TABLE METADATA` syntax is used to refresh table metadata. {{< tabs >}} {{% tab name="Grammar" %}} ```sql RefreshTableMetadata ::= 'REFRESH' 'TABLE' 'METADATA' (tableName | tableName 'FROM' 'STORAGE' 'UNIT' storageUnitName ('SCHEMA' schemaName)?)? tableName ::= identifier storageUnitName ::= identifier schemaName ::= identifier ``` {{% /tab %}} {{% tab name="Railroad diagram" %}} <iframe frameborder="0" name="diagram" id="diagram" width="100%" height="100%"></iframe> {{% /tab %}} {{< /tabs >}} When `tableName` and `storageUnitName` is not specified, the default is to refresh all table metadata. refresh table metadata need to use `DATABASE`. If `DATABASE` is not used, `No database selected` will be prompted. If there are no tables in the schema, the schema will be deleted. Refresh specified table's metadata in specified schema of a specified storage unit ```sql REFRESH TABLE METADATA torder FROM STORAGE UNIT ds1 SCHEMA db_schema; ``` Refresh all tables' metadata in specified schema of a specified storage unit ```sql REFRESH TABLE METADATA FROM STORAGE UNIT ds1 SCHEMA dbschema; ``` Refresh metadata for specified table in specified storage unit ```sql REFRESH TABLE METADATA torder FROM STORAGE UNIT ds1; ``` Refresh metadata for specified table ```sql REFRESH TABLE METADATA t_order; ``` Refresh all table metadata ```sql REFRESH TABLE METADATA; ``` `REFRESH`, `TABLE`, `METADATA`, `FROM`, `STORAGE`, `UNIT`
Project: ClickHouse (App Definition and Development / Database)
File: v22.11.2.30-stable.md

sidebar_position: 1 sidebar_label: 2022 Backported in : Fixed backward incompatibility in (de)serialization of states of `min`, `max`, `any`, `argMin`, `argMax` aggregate functions with `String` argument. The incompatibility was introduced in https://github.com/ClickHouse/ClickHouse/pull/41431 and affects 22.9, 22.10 and 22.11 branches (fixed since 22.9.6, 22.10.4 and 22.11.2 correspondingly). Some minor releases of 22.3, 22.7 and 22.8 branches are also affected: 22.3.13...22.3.14 (fixed since 22.3.15), 22.8.6...22.8.9 (fixed since 22.8.10), 22.7.6 and newer (will not be fixed in 22.7, we recommend to upgrade from 22.7.* to 22.8.10 or newer). This release note does not concern users that have never used affected versions. Incompatible versions append extra `'\0'` to strings when reading states of the aggregate functions mentioned above. For example, if an older version saved state of `anyState('foobar')` to `statecolumn` then incompatible version will print `'foobar\0'` on `anyMerge(statecolumn)`. Also incompatible versions write states of the aggregate functions without trailing `'\0'`. Newer versions (that have the fix) can correctly read data written by all versions including incompatible versions, except one corner case. If an incompatible version saved a state with a string that actually ends with null character, then newer version will trim trailing `'\0'` when reading state of affected aggregate function. For example, if an incompatible version saved state of `anyState('abrac\0dabra\0')` to `statecolumn` then incompatible versions will print `'abrac\0dabra'` on `anyMerge(statecolumn)`. The issue also affects distributed queries when an incompatible version works in a cluster together with older or newer versions. (). Backported in : Restrict default access to named collections for user defined in config. It must have explicit `shownamedcollections=1` to be able to see them. (). Backported in : An issue with the following exception has been reported while trying to read a Parquet file from S3 into ClickHouse:. (). Backported in : Fixed queries with `SAMPLE BY` with prewhere optimization on tables using `Merge` engine. (). Backported in : Fix possible `Cannot create non-empty column with type Nothing` in functions if/multiIf. Closes . (). Backported in : Fix a bug when row level filter uses default value of column. (). Backported in : Fixed primary key analysis with conditions involving `toString(enum)`. (). Backported in : Optimized number of List requests to ZooKeeper when selecting a part to merge. Previously it could produce thousands of requests in some cases. Fixes . (). Update SECURITY.md on new stable tags (). Use all parameters with prefixes from ssm (). Temporarily disable `testhivequery` (). Do not checkout submodules recursively (). Use docker images cache from merged PRs in master and release branches (). Fix pagination issue in GITHUBJOBID() ().
Project: KICS (Provisioning / Security & Compliance)
File: b30981fa-a12e-49c7-a5bb-eeafb61d0f0f.md

title: Global Parameter Definition Not Being Used hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: b30981fa-a12e-49c7-a5bb-eeafb61d0f0f Query name: Global Parameter Definition Not Being Used Platform: OpenAPI Severity: <span style="color:#5bc0de">Info</span> Category: Best Practices URL: All global parameters definitions should be in use<br> ```json title="Positive test num. 1 - json file" hl_lines="26" { "swagger": "2.0", "info": { "title": "Simple API Overview", "version": "1.0.0" }, "paths": { "/": { "get": { "operationId": "listVersionsv2", "summary": "List API versions", "responses": { "200": { "description": "200 response" } }, "parameters": [ { "$ref": "#/parameters/limitParame" } ] } } }, "parameters": { "limitParam": { "name": "limit", "in": "body", "description": "max records to return", "required": true, "schema": { "type": "string" } } } } ``` ```yaml title="Positive test num. 2 - yaml file" hl_lines="16" swagger: "2.0" info: title: Simple API Overview version: 1.0.0 paths: "/": get: operationId: listVersionsv2 summary: List API versions responses: "200": description: 200 response parameters: "$ref": "#/parameters/limitParame" parameters: limitParam: name: limit in: body description: max records to return required: true schema: type: string ``` ```json title="Negative test num. 1 - json file" { "swagger": "2.0", "info": { "title": "Simple API Overview", "version": "1.0.0" }, "paths": { "/": { "get": { "operationId": "listVersionsv2", "summary": "List API versions", "responses": { "200": { "description": "200 response" } }, "parameters": [ { "$ref": "#/parameters/limitParam" } ] } } }, "parameters": { "limitParam": { "name": "limit", "in": "body", "description": "max records to return", "required": true, "schema": { "type": "string" } } } } ``` ```yaml title="Negative test num. 2 - yaml file" swagger: "2.0" info: title: Simple API Overview version: 1.0.0 paths: "/": get: operationId: listVersionsv2 summary: List API versions responses: "200": description: 200 response parameters: "$ref": "#/parameters/limitParam" parameters: limitParam: name: limit in: body description: max records to return required: true schema: type: string ```
Project: KICS (Provisioning / Security & Compliance)
File: 571254d8-aa6a-432e-9725-535d3ef04d69.md

title: Group With Privilege Escalation By Actions 'lambda:UpdateFunctionCode' hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 571254d8-aa6a-432e-9725-535d3ef04d69 Query name: Group With Privilege Escalation By Actions 'lambda:UpdateFunctionCode' Platform: Terraform Severity: <span style="color:#ff7213">Medium</span> Category: Access Control URL: Group with privilege escalation by actions 'lambda:UpdateFunctionCode' and Resource set to '*'. For more information see https://rhinosecuritylabs.com/aws/aws-privilege-escalation-methods-mitigation/.<br> ```tf title="Positive test num. 1 - tf file" hl_lines="1" resource "awsiamgroup" "cosmic" { name = "cosmic" } resource "awsiamgrouppolicy" "testinline_policy" { name = "testinlinepolicy" group = awsiamgroup.cosmic.name policy = jsonencode({ Version = "2012-10-17" Statement = [ { Action = [ "lambda:UpdateFunctionCode", ] Effect = "Allow" Resource = "*" }, ] }) } ``` ```tf title="Negative test num. 1 - tf file" resource "awsiamuser" "cosmic2" { name = "cosmic2" } resource "awsiamuserpolicy" "inlinepolicyruninstances2" { name = "inlinepolicyrun_instances" user = awsiamuser.cosmic2.name policy = jsonencode({ Version = "2012-10-17" Statement = [ { Action = [ "ec2:Describe*", ] Effect = "Allow" Resource = "*" }, ] }) } ```
Project: Meshery (Provisioning / Automation & Configuration)
File: mesheryctl-exp-model.md

layout: default title: mesheryctl-exp-model permalink: reference/mesheryctl/exp/model redirect_from: reference/mesheryctl/exp/model/ type: reference display-title: "false" language: en command: exp subcommand: model View list of models and detail of models View list of models and detailed information of a specific model <pre class='codeblock-pre'> <div class='codeblock'> mesheryctl exp model [flags] </div> </pre> To view list of components <pre class='codeblock-pre'> <div class='codeblock'> mesheryctl exp model list </div> </pre> To view a specific model <pre class='codeblock-pre'> <div class='codeblock'> mesheryctl exp model view [model-name] </div> </pre> <pre class='codeblock-pre'> <div class='codeblock'> -h, --help help for model </div> </pre> <pre class='codeblock-pre'> <div class='codeblock'> --config string path to config file (default "/home/runner/.meshery/config.yaml") -v, --verbose verbose output </div> </pre> Go back to , if you want to add content manually to the CLI documentation, please refer to the for guidance.
Project: YugabyteDB (App Definition and Development / Database)
File: yba_storage-config_gcs_list.md

List GCS YugabyteDB Anywhere storage-configurations List GCS YugabyteDB Anywhere storage-configurations ``` yba storage-config gcs list [flags] ``` ``` -h, --help help for list ``` ``` -a, --apiToken string YugabyteDB Anywhere api token. --config string Config file, defaults to $HOME/.yba-cli.yaml --debug Use debug mode, same as --logLevel debug. --disable-color Disable colors in output. (default false) -H, --host string YugabyteDB Anywhere Host (default "http://localhost:9000") -l, --logLevel string Select the desired log level format. Allowed values: debug, info, warn, error, fatal. (default "info") -n, --name string [Optional] The name of the storage configuration for the operation. Required for create, delete, describe, update. -o, --output string Select the desired output format. Allowed values: table, json, pretty. (default "table") --timeout duration Wait command timeout, example: 5m, 1h. (default 168h0m0s) --wait Wait until the task is completed, otherwise it will exit immediately. (default true) ``` - Manage a YugabyteDB Anywhere GCS storage configuration
Project: StarRocks (App Definition and Development / Database)
File: reverse.md

displayed_sidebar: "English" Reverses a string or array. Returns a string or array with the characters in the string or array elements in reverse order. ```Haskell reverse(param) ``` `param`: the string or array to reverse. It can be of the VARCHAR, CHAR, or ARRAY type. Currently, this function supports only one-dimensional arrays and the array elements cannot be of the DECIMAL type. This function supports the following types of array elements: BOOLEAN, TINYINT, SMALLINT, INT, BIGINT, LARGEINT, FLOAT, DOUBLE, VARCHAR, DECIMALV2, DATETIME, DATE, and JSON. JSON is supported from 2.5. The return type is the same as `param`. Example 1: Reverse a string. ```Plain Text MySQL > SELECT REVERSE('hello'); ++ | REVERSE('hello') | ++ | olleh | ++ 1 row in set (0.00 sec) ``` Example 2: Reverse an array. ```Plain Text MYSQL> SELECT REVERSE([4,1,5,8]); +--+ | REVERSE([4,1,5,8]) | +--+ | [8,5,1,4] | +--+ ```
Project: Lagoon (App Definition and Development / Application Definition & Image Build)
File: client-libraries.md

If you're interested in developing tooling for the Lagoon ecosystem, there are a few libraries that you may find helpful. The Machinery library is the most actively supported and developed of the tooling libraries for Lagoon. It is a central store of all the basic operations used across all our golang based tool types, primarily -- but not exclusively -- for API interaction. If you're looking for PHP integration, the php-sdk may give you a good jumping off point for your work. A frequently updated and expanding Ansible library for interacting with Lagoon.
Project: EMQ Technologies (App Definition and Development / Streaming & Messaging)
File: v5.0.2-en.md

Announcement: EMQX team has decided to stop supporting relup for opensource edition. Going forward, it will be an enterprise-only feature. Main reason: relup requires carefully crafted upgrade instructions from ALL previous versions. For example, 4.3 is now at 4.3.16, we have `4.3.0->4.3.16`, `4.3.1->4.3.16`, ... 16 such upgrade paths in total to maintain. This had been the biggest obstacle for EMQX team to act agile enough in delivering enhancements and fixes. Fixed a typo in `bin/emqx` which affects MacOs release when trying to enable Erlang distribution over TLS Restricted shell was accidentally disabled in 5.0.1, it has been added back.
Project: StarRocks (App Definition and Development / Database)
File: SHOW_GRANTS.md

displayed_sidebar: "English" Displays all the privileges that have been granted to a user or role. For more information about roles and privileges, see . :::tip All roles and users can view the privileges granted to them or the roles assigned to them. Only users with the `user_admin` role can view the privileges of a specified user or role. ::: ```SQL SHOW GRANTS; -- View the privileges of the current user. SHOW GRANTS FOR ROLE <role_name>; -- View the privileges of a specific role. SHOW GRANTS FOR <user_identity>; -- View the privileges of a specific user. ``` role_name user_identity Return fields: ```SQL -- View the privileges of a specific user. +--+--++ |UserIdentity |Catalog | Grants | +--+--++ -- View the privileges of a specific role. +-+--+-+ |RoleName |Catalog | Grants | +-+--+-+ ``` | Field | Description | | | | | UserIdentity | The user identity, which is displayed when you query the privileges of a user. | | RoleName | The role name, which is displayed when you query the privileges of a role. | | Catalog | The catalog name.<br />`default` is returned if the GRANT operation is performed on the StarRocks internal catalog.<br />The name of the external catalog is returned if the GRANT operation is performed on an external catalog.<br />`NULL` is returned if the operation shown in the `Grants` column is assigning roles. | | Grants | The specific GRANT operation. | ```SQL mysql> SHOW GRANTS; +--++-+ | UserIdentity | Catalog | Grants | +--++-+ | 'root'@'%' | NULL | GRANT 'root', 'testrole' TO 'root'@'%' | +--++-+ mysql> SHOW GRANTS FOR 'user_g'@'%'; +-+-+--+ |UserIdentity |Catalog |Grants | +-+-+ |'userg'@'%' |NULL |GRANT roleg, public to `user_g`@`%`; | |'userg'@'%' |NULL |GRANT IMPERSONATE ON USER `usera`@`%` TO USER `user_g`@`%`; | |'userg'@'%' |default |GRANT CREATEDATABASE ON CATALOG defaultcatalog TO USER `userg`@`%`; | |'userg'@'%' |default |GRANT ALTER, DROP, CREATETABLE ON DATABASE db1 TO USER `user_g`@`%`; | |'userg'@'%' |default |GRANT CREATEVIEW ON DATABASE db1 TO USER `user_g`@`%` WITH GRANT OPTION; | |'userg'@'%' |default |GRANT ALTER, DROP, SELECT, INGEST, EXPORT, DELETE, UPDATE ON TABLE db.* TO USER `userg`@`%`; | |'userg'@'%' |default |GRANT ALTER, DROP, SELECT ON VIEW db2.view TO USER `userg`@`%`; | |'userg'@'%' |Hivecatalog |GRANT USAGE ON CATALOG Hivecatalog TO USER `userg`@`%` | +-+--+--+ mysql> SHOW GRANTS FOR ROLE role_g; +-+--+-+ |RoleName |Catalog | Grants | +-+--+-+ |roleg |NULL | GRANT rolep, roletest TO ROLE roleg; | |roleg |default | GRANT SELECT ON *.* TO ROLE roleg WITH GRANT OPTION; | +-+--+--+ ```