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

+++ title = "Inspecting result<T, EC>" description = "" weight = 20 tags = ["nodiscard", "value", "error", "try"] +++ Suppose we will be writing a function `print_half` that takes a `std::string` representing an integer and prints half the integer: {{% snippet "usingresult.cpp" "halfdecl" %}} The type `result<void>` means that there is no value to be returned upon success, but that the operation might still fail, and we may be interested in inspecting the cause of the failure. The class template `result<>` is declared with the attribute `[[nodiscard]]`, which means the compiler will warn you if you forget to inspect the returned object (in C++ 17 or later). The implementation will do the following: if the integral number can be represented by an `int`, we will convert to `int` and use its arithmetical operations. If the number is too large, we will fall back to using a custom `BigInt` implementation that needs to allocate memory. In the implementation we will use the function `convert` defined in the previous section. {{% snippet "usingresult.cpp" "halfimpl" %}} {{% snippet "usingresult.cpp" "fromstring" %}} Our control statement means: if `fromString` returned failure, this same error information should be returned from `print_half`, even though the type of `result<>` is different. If `fromString` returned success, we create variable `i` of type `BigInt` with the value returned from `fromString`. If control goes to subsequent line, it means `fromString` succeeded and variable of type `BigInt` is in scope. and it would have the same effect, but `r.as_failure()` will work when implicit construction from `E` has been disabled due to `T` and `E` having a constructibility relationship. all `result` and `outcome` types into a successful return, default constructing any `T` if necessary.
Project: YugabyteDB (App Definition and Development / Database)
File: dml_truncate.md

title: TRUNCATE statement [YCQL] headerTitle: TRUNCATE linkTitle: TRUNCATE description: Use the TRUNCATE statement to remove all rows from a specified table. menu: preview: parent: api-cassandra weight: 1330 aliases: /preview/api/cassandra/dml_truncate /preview/api/ycql/dml_truncate type: docs Use the `TRUNCATE` statement to remove all rows from a specified table. <svg class="rrdiagram" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" width="303" height="50" viewbox="0 0 303 50"><path class="connector" d="M0 22h5m84 0h30m58 0h20m-93 0q5 0 5 5v8q0 5 5 5h68q5 0 5-5v-8q0-5 5-5m5 0h10m91 0h5"/><rect class="literal" x="5" y="5" width="84" height="25" rx="7"/><text class="text" x="15" y="22">TRUNCATE</text><rect class="literal" x="119" y="5" width="58" height="25" rx="7"/><text class="text" x="129" y="22">TABLE</text><a xlink:href="../grammardiagrams#table-name"><rect class="rule" x="207" y="5" width="91" height="25"/><text class="text" x="217" y="22">tablename</text></a></svg> ```ebnf truncate ::= TRUNCATE [ TABLE ] table_name; ``` Where `table_name` is an identifier (possibly qualified with a keyspace name). An error is raised if the specified `table_name` does not exist. ```sql ycqlsh:example> CREATE TABLE employees(department_id INT, employee_id INT, name TEXT, PRIMARY KEY(departmentid, employeeid)); ``` ```sql ycqlsh:example> INSERT INTO employees(departmentid, employeeid, name) VALUES (1, 1, 'John'); ``` ```sql ycqlsh:example> INSERT INTO employees(departmentid, employeeid, name) VALUES (1, 2, 'Jane'); ``` ```sql ycqlsh:example> INSERT INTO employees(departmentid, employeeid, name) VALUES (2, 1, 'Joe'); ``` ```sql ycqlsh:example> SELECT * FROM employees; ``` ```output departmentid | employeeid | name +-+ 2 | 1 | Joe 1 | 1 | John 1 | 2 | Jane ``` Remove all rows from the table. ```sql ycqlsh:example> TRUNCATE employees; ``` ```sql ycqlsh:example> SELECT * FROM employees; ``` ```output departmentid | employeeid | name +-+ ```
Project: SeaTunnel (App Definition and Development / Streaming & Messaging)
File: README.md

The `seatunnel-config` is used to parse `seatunnel.conf` files. This module is based on `com.typesafe.config`, We have made some enhancement and import our enhancement by using maven shade. Most of the times, you don't need to directly using this module, since you can receive from maven repository. If you want to modify the config module, you can follow the steps below. Open the `seatunnel-config` module. ```xml <!-- We retrieve the config module from maven repository. If you want to change the config module, you need to open this annotation and change the dependency of config-shade to project. <module>seatunnel-config</module> --> ``` Open the annuotaion in `pom.xml` file, to import the `seatunnel-config` module. Replace the `config-shade` dependency to project. ```xml <dependency> <groupId>org.apache.seatunnel</groupId> <artifactId>seatunnel-config-shade</artifactId> <version>${project.version}</version> </dependency> ``` Add `<version>${project.version}</version>` to `seatunnel-config-shade` everywhere you use.
Project: YugabyteDB (App Definition and Development / Database)
File: extension-tablefunc.md

title: tablefunc extension headerTitle: tablefunc extension linkTitle: tablefunc description: Using the tablefunc extension in YugabyteDB menu: v2.18: identifier: extension-tablefunc parent: pg-extensions weight: 20 type: docs The module includes various functions that return tables (that is, multiple rows). ```sql CREATE EXTENSION tablefunc; CREATE TABLE t(k int primary key, v double precision); PREPARE insertkv_pairs(int) AS INSERT INTO t(k, v) SELECT generate_series(1, $1), normal_rand($1, 1000.0, 10.0); ``` Test it as follows: ```sql DELETE FROM t; EXECUTE insertkv_pairs(10); SELECT k, to_char(v, '9999.99') AS v FROM t ORDER BY k; ``` You'll see results similar to the following: ```output k | v -+- 1 | 988.53 2 | 1005.18 3 | 1014.30 4 | 1000.92 5 | 999.51 6 | 1000.94 7 | 1007.45 8 | 991.22 9 | 987.95 10 | 996.57 (10 rows) ``` Every time you repeat the test, you'll see different generated values for `v`. For another example that uses `normal_rand()`, refer to . It populates a table with a large number (say 100,000) of rows and displays the outcome as a histogram that clearly shows the familiar bell-curve shape. `tablefunc` also provides the `connectby()`, `crosstab()`, and `crosstabN()` functions. The `connectby()` function displays a hierarchy of the kind that you see in an "employees" table with a reflexive foreign key constraint where "managerid" refers to "employeeid". Each next deeper level in the tree is indented from its parent following the well-known pattern. The `crosstab()`and `crosstabN()` functions produce "pivot" displays. The "N" in crosstabN() indicates the fact that a few, `crosstab1()`, `crosstab2()`, `crosstab3()`, are provided natively by the extension and that you can follow documented steps to create more.
Project: YugabyteDB (App Definition and Development / Database)
File: run-sample-apps.md

app is a sample ecommerce application built using a microservices design pattern. React UI, Node.js Express app framework and YugabyteDB (YCQL and YEDIS) are used as the underlying technology stack. Create a cluster. The YEDIS API is initialized along with cluster creation so nothing additional needs to be done. ```sh $ ./yb-docker-ctl -rf 3 create ``` Clients can now connect to the YSQL API at `localhost:5433`, YCQL API at `localhost:9042`, and YEDIS API at `localhost:6379`. ```sh $ docker run -p 3001:3001 -d --network yb-net --name yugastore yugabytedb/yugastore ``` You can see the Yugastore app at http://localhost:3001. ```sh $ docker exec -it yugastore node /usr/local/yugastore/test/sample-user.js ``` Now you can observe the effects of the read/write operations generated by the load tester by simply going to the YugabyteDB Admin UI at http://localhost:7000. Details of Yugastore architecture are documented . Source code is available in the . After running Yugastore, run the app. This app is built on top of YugabyteDB as the database (using the YCQL API), Confluent Kafka as the message broker, KSQL or Apache Spark Streaming for real-time analytics and Spring Boot as the application framework.
Project: YugabyteDB (App Definition and Development / Database)
File: ddl_drop_role.md

title: DROP ROLE statement [YCQL] headerTitle: DROP ROLE linkTitle: DROP ROLE description: Use the DROP ROLE statement to delete an existing role. menu: preview: parent: api-cassandra weight: 1265 aliases: /preview/api/cassandra/ddldroprole /preview/api/ycql/ddldroprole type: docs Use the `DROP ROLE` statement to delete an existing role. This statement is enabled by setting the YB-TServer flag to `true`. <svg class="rrdiagram" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" width="375" height="50" viewbox="0 0 375 50"><path class="connector" d="M0 22h5m53 0h10m52 0h30m32 0h10m64 0h20m-141 0q5 0 5 5v8q0 5 5 5h116q5 0 5-5v-8q0-5 5-5m5 0h10m84 0h5"/><rect class="literal" x="5" y="5" width="53" height="25" rx="7"/><text class="text" x="15" y="22">DROP</text><rect class="literal" x="68" y="5" width="52" height="25" rx="7"/><text class="text" x="78" y="22">ROLE</text><rect class="literal" x="150" y="5" width="32" height="25" rx="7"/><text class="text" x="160" y="22">IF</text><rect class="literal" x="192" y="5" width="64" height="25" rx="7"/><text class="text" x="202" y="22">EXISTS</text><a xlink:href="../grammardiagrams#role-name"><rect class="rule" x="286" y="5" width="84" height="25"/><text class="text" x="296" y="22">rolename</text></a></svg> ```ebnf droprole ::= DROP ROLE [ IF EXISTS ] rolename ``` Where `role_name` is a text identifier. An error is raised if `role_name` does not exist unless IF EXISTS option is present. Only a role with the `SUPERUSER` status can delete another `SUPERUSER` role. Only a client with the permission `DROP` on `ALL ROLES` or on the specified `role_name`, or with the `SUPERUSER` status can delete another role. ```sql ycqlsh:example> DROP ROLE role1; ``` ```sql ycqlsh:example> DROP ROLE IF EXISTS role2; ```
Project: Backstage (App Definition and Development / Application Definition & Image Build)
File: index.md

id: overview title: Kubernetes sidebar_label: Overview description: Monitoring Kubernetes based services with the software catalog Kubernetes in Backstage is a tool that's designed around the needs of service owners, not cluster admins. Now developers can easily check the health of their services no matter how or where those services are deployed whether it's on a local host for testing or in production on dozens of clusters around the world. It will elevate the visibility of errors where identified, and provide drill down about the deployments, pods, and other objects for a service. The feature is made up of two plugins: and . The frontend plugin exposes information to the end user in a digestible way, while the backend wraps the mechanics to connect to Kubernetes clusters to collect the relevant information. To get started, first you must and then .
Project: Apache Heron (App Definition and Development / Streaming & Messaging)
File: getting-started-docker.md

id: version-0.20.5-incubating-getting-started-docker title: The official Apache Heron Docker Image(s) sidebar_label: Heron & Docker original_id: getting-started-docker <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> The current version of Heron is {{heron:version}} The official Apache Heron Docker image is located at the link below <a target="_blank" href="https://hub.docker.com/repository/docker/apache/heron">https://hub.docker.com/repository/docker/apache/heron</a> In one terminal execute to start Heron in a container ```bash $ docker run -it --rm \ -p 8889:8889 \ -p 8888:8888 \ --name local-heron \ apache/heron:0.20.4-incubating supervisord --nodaemon ``` In another terminal execute the following to deploy a job: ```bash $ docker exec -it \ local-heron \ bash -c "heron submit sandbox /heron/examples/heron-eco-examples.jar org.apache.heron.eco.Eco --eco-config-file /heron/examples/heron_wordcount.yaml" ``` View your job details by navigating to `localhost:8889` in your browser. Congratulations, you've just deployed a Heron job in Docker! r!
Project: Beam (App Definition and Development / Streaming & Messaging)
File: hint1.md

<!-- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> To solve this challenge, you may build a pipeline that consists of the following steps: {{if (eq .Sdk "go")}} Add composite trigger `trigger := trigger.AfterAll(trigger.AfterCount(10),trigger.AfterEndOfWindow(). EarlyFiring(trigger.AfterProcessingTime(). PlusDelay(60 * time.Second)). LateFiring(trigger.Repeat(trigger.AfterCount(1))))` Write window `fixedWindowedItems := beam.WindowInto(s, window.NewFixedWindows(60*time.Second),input,beam.Trigger(trigger), beam.PanesDiscard())` {{end}} {{if (eq .Sdk "java")}} Add composite trigger `Trigger dataDrivenTrigger = AfterPane.elementCountAtLeast(2); Trigger processingTimeTrigger = AfterProcessingTime.pastFirstElementInPane().plusDelayOf(Duration.standardMinutes(1));` Write window `PCollection<Double> windowed = rideTotalAmounts.apply(window.triggering(AfterAll.of(Arrays.asList(dataDrivenTrigger,processingTimeTrigger))).withAllowedLateness(Duration.ZERO).accumulatingFiredPanes());` {{end}} {{if (eq .Sdk "python")}} Add composite trigger `datadriventrigger = trigger.AfterEach(trigger.AfterCount(10)) processingtimetrigger = trigger.AfterProcessingTime(60) compositetrigger = trigger.AfterAll(datadriventrigger,processingtime_trigger)` Write window `beam.WindowInto(FixedWindows(2), trigger=composite_trigger , accumulation_mode=trigger.AccumulationMode.DISCARDING)` {{end}}
Project: ArangoDB (App Definition and Development / Database)
File: _index.md

+++ title = "Videos" weight = 40 +++ Outcome has been presented at some of the major C++ conferences as it has evolved. As the older content is less relevant to Outcome today, this list is given in reverse chronological order. Literature review of the WG21 papers relating to deterministically handling failure, and using libraries such as Outcome to implement the same. {{< youtube cbUTAoHy6Ls >}} {{< slides "d/e/2PACX-1vRR3ZXU8pC1oFH6rctPJ1wijWCQY-uGIBEK2SzOLaVnuFjn7Ed76sYs8QE6pUl-oP2nrggw-b4fma" >}} Literature review of the several WG21 papers relating to std::expected<T, E>. {{< youtube JfMBLx7qE0I >}} {{< slides "d/e/2PACX-1vSnTCnhX3uKNco8LtJTgAg2LrRO0zOJ3JiQiWMFFG8pNVwvUZr2ooYjXO9V94kdlqLxSB7DLTLPf5" >}} Covers the history of error handling in C++, and how the LEWG Expected works. *(Note that the Expected presented here no longer exists, it was substantially changed after the Outcome v1 peer review. Furthermore the Outcome presented here no longer exists, the peer review demanded a complete rebuild)* {{< youtube XVofgKH-uu4 >}} {{< slides "d/e/2PACX-1vQZXLxkB716ZIMcEqV8QkeUvKhG33BmzKJdzSvx6QRfEGjmjXjHjeLrXSjgTZwG2rCaBNAZTxj41r5n" >}} n 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: ArangoDB (App Definition and Development / Database)
File: value_or_error.md

+++ title = "`valueorerror<T>`" description = "A boolean concept matching types with either a value or an error." +++ If on C++ 20 or the Concepts TS is enabled, a boolean concept matching types with a public `.has_value()` observer which returns `bool`, a public `.value()` observer function, and a public `.error()` observer function. If without Concepts, a static constexpr bool which is true for types matching the same requirements, using a SFINAE based emulation. This concept matches expected-like types such as {{% api "std::expected<T, E>" %}}, one of which is {{% api "basic_result<T, E, NoValuePolicy>" %}}. Be aware it does not differentiate between value-or-error types and value-and-error types if they present the interface matched above. If you want a concept matching specifically {{% api "basicresult<T, E, NoValuePolicy>" %}}, see {{% api "basicresult<T>" %}}. Namespace: `BOOSTOUTCOMEV2_NAMESPACE::concepts` Header: `<boost/outcome/convert.hpp>` Legacy: This was named `convert::ValueOrError<T>` in Outcome v2.1 and earlier. Define {{% api "BOOSTOUTCOMEENABLELEGACYSUPPORT_FOR" %}} to less than `220` to enable. `X::errortype` is `void` or is explicitly constructible to `T::errortype`, then `operator()(X &&)` is made available. `operator()(X &&v)` tests if `v.has_value()` is true, if so then a `T` with successful value is returned, else a `T` with unsuccessful value. If the input type was `void`, a default constructed value is used for either, else a move/copy construction from the source is performed. Namespace: `BOOSTOUTCOMEV2_NAMESPACE::convert` Header: `<boost/outcome/convert.hpp>`
Project: YugabyteDB (App Definition and Development / Database)
File: slice-operator.md

title: The array slice operator linkTitle: Array slice operator headerTitle: The array slice operator description: The array slice operator menu: v2.18: identifier: array-slice-operator parent: array-functions-operators weight: 30 type: docs Purpose: Return a new array whose length is defined by specifying the slice's lower and upper bound along each dimension. Signature: ``` input value: [lb1:ub1] ... [lbN:ubN]anyarray return value: anyarray ``` Note: You must specify the lower and upper slicing bounds, as `int` values for each of the input array's N dimensions. The specified slicing bounds must not exceed the source array's bounds. The new array has the same dimensionality as the source array and its lower bound is `1` on each axis. Example: ```plpgsql create table t(k int primary key, arr text[]); insert into t(k, arr) values (1, ' [4:5]= { { {a,b}, {c,d}, {e,f}, {g,h} }, { {i,j}, {k,l}, {m,n}, {o,p} }, { {q,r}, {s,t}, {u,v}, {w,x} } } '::text[]); select arr as "old value of arr" from t where k = 1; select array_lower(arr, 1) as "lb-1", array_upper(arr, 1) as "ub-1", array_lower(arr, 2) as "lb-2", array_upper(arr, 2) as "ub-2", array_lower(arr, 3) as "lb-3", array_upper(arr, 3) as "ub-3" from t where k = 1; ``` It produces these results: ``` old value of arr [4:5]={{{a,b},{c,d},{e,f},{g,h}},{{i,j},{k,l},{m,n},{o,p}},{{q,r},{s,t},{u,v},{w,x}}} ``` and: ``` lb-1 | ub-1 | lb-2 | ub-2 | lb-3 | ub-3 +++++ 2 | 4 | 3 | 6 | 4 | 5 ``` Now do the slicing: ```plpgsql update t set arr = arr[3:4] where k = 1; select arr as "new value of arr" from t where k = 1; select array_lower(arr, 1) as "lb-1", array_upper(arr, 1) as "ub-1", array_lower(arr, 2) as "lb-2", array_upper(arr, 2) as "ub-2", array_lower(arr, 3) as "lb-3", array_upper(arr, 3) as "ub-3" from t where k = 1; ``` It produces these results: ``` new value of arr -- {{{c},{e}},{{k},{m}}} ``` and: ``` lb-1 | ub-1 | lb-2 | ub-2 | lb-3 | ub-3 +++++ 1 | 2 | 1 | 2 | 1 | 1 ``` Notice, that as promised, all the lower bounds are equal to `1`.
Project: SeaTunnel (App Definition and Development / Streaming & Messaging)
File: Rabbitmq.md

Rabbitmq sink connector Used to write data to Rabbitmq. | name | type | required | default value | |-||-|| | host | string | yes | - | | port | int | yes | - | | virtual_host | string | yes | - | | username | string | yes | - | | password | string | yes | - | | queue_name | string | yes | - | | url | string | no | - | | networkrecoveryinterval | int | no | - | | topologyrecoveryenabled | boolean | no | - | | automaticrecoveryenabled | boolean | no | - | | usecorrelationid | boolean | no | false | | connection_timeout | int | no | - | | rabbitmq.config | map | no | - | | common-options | | no | - | the default host to use for connections the default port to use for connections virtual host the virtual host to use when connecting to the broker the AMQP user name to use when connecting to the broker the password to use when connecting to the broker convenience method for setting the fields in an AMQP URI: host, port, username, password and virtual host the queue to write the message to the schema fields of upstream data. how long will automatic recovery wait before attempting to reconnect, in ms if true, enables topology recovery if true, enables connection recovery whether the messages received are supplied with a unique id to deduplicate messages (in case of failed acknowledgments). connection TCP establishment timeout in milliseconds; zero for infinite In addition to the above parameters that must be specified by the RabbitMQ client, the user can also specify multiple non-mandatory parameters for the client, covering . Sink plugin common parameters, please refer to for details simple: ```hocon sink { RabbitMQ { host = "rabbitmq-e2e" port = 5672 virtual_host = "/" username = "guest" password = "guest" queue_name = "test1" rabbitmq.config = { requested-heartbeat = 10 connection-timeout = 10 } } } ``` Add Rabbitmq Sink Connector