text:
This gem is a Ruby wrapper for the main features of [Webpagetest](http://www.webpagetest.org/) REST API.
Features included so far:
- Run tests with all [specified](https://sites.google.com/a/webpagetest.org/docs/advanced-features/webpagetest-restful-apis#TOC-Parameters) parameters of the API.
- Check test status
- Get available test locations

This gem is inspired by [Susuwatari](https://github.com/moviepilot/susuwatari) gem, so several ideas were taken from there (it's like a rewrite with some modifications). There were two main reasons to create a new `Webpagetest` gem:

- Susuwatari uses [Rest client](https://github.com/rest-client/rest-client) to make HTTP requests, but this gem uses [Faraday](https://github.com/lostisland/faraday) instead, since it's more flexible and extensible in terms of HTTP connection.
- Susuwatari `Client` class is focused on test runs, but no general-purpose wrapper has been built so far (for example, locations were missing).

## Installation

Add this line to your application's Gemfile:

    gem 'webpagetest'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install webpagetest

## Usage
All you require to use the gem is a Webpagetest API key in order to run tests. You can ask your own by emailing Patrick Meenan, like he explains in [Webpagetest docs](https://sites.google.com/a/webpagetest.org/docs/advanced-features/webpagetest-restful-apis).

Basically, you need to instantiate an object of `Webpagetest` class, and then use it to interact with the API.

### Instantiate WPT object

```ruby
require 'webpagetest'

wpt = Webpagetest.new(k: your_api_key)
```

### Run test
When running a test, a `Response` object is returned, with the following available methods:

* `test_id`: the `id` assigned to the submitted test
* `status`: the status of the test (`nil` at the beginning)
* `result`: the result object (`nil` at the beginning)
* `raw`: the raw response of the request
* `get_status`: makes a test status request, and fetches the result when status is `:completed`

```ruby
response = wpt.run_test do |params|
    params.url = 'http://webpagetest.org'
end

# Test is running, so status must be requested
response.get_status # => :running

# When test is completed, status will be updated
response.get_status # => :completed

# Only after knowing that test is completed, the result is set
response.result.keys
[
    [ 0] "id",
    [ 1] "url",
    [ 2] "summary",
    [ 3] "testUrl",
    [ 4] "location",
    [ 5] "from",
    [ 6] "connectivity",
    [ 7] "bwDown",
    [ 8] "bwUp",
    [ 9] "latency",
    [10] "plr",
    [11] "completed",
    [12] "testerDNS",
    [13] "runs",
    [14] "fvonly",
    [15] "successfulFVRuns",
    [16] "successfulRVRuns",
    [17] "average",
    [18] "standardDeviation",
    [19] "median",
    [20] "status_code",
    [21] "status_text"
]

response.result.runs[1].firstView.loadTime # => 2051
```

### Get test result
In order to get a result based on a test `id`,  the same procedure as above must be done.
```ruby
test = wpt.test_result("some_test_id") # test is a Response object

response.test_id # => "131007_FC_WHR"

# Test could be running or completed
response.get_status # => :completed

response.result.average.firstView.domElements # => 714
```

### Locations
```ruby
locations = wpt.locations
locations.keys
[
    [  0] "Dulles_IE6",
    [  1] "Dulles_IE10",
    [  2] "Dulles:Chrome",
    [  3] "Dulles:Canary",
    [  4] "Dulles:Firefox",
    [  5] "Dulles_iOS",
    [  6] "Dulles_Android",
    [  7] "Dulles_Thinkpad:Chrome",
    [  8] "Dulles_Thinkpad:Canary",
    [  9] "Asheville_IE",
    [ 10] "Miami_IE8",
    [ 11] "Miami:Chrome",
    [ 12] "Miami:Firefox",
    ...
]
```

## Contribution
This gem is just a starting point wrapper, so much work can be done from here.

Any contribution is appreciated. Just fork this repository and submit the appropriate pull request if you want to add features to this gem.


text:
Puppet::Type.newtype(:bsd_interface) do
  @doc = 'Manage a network interface state on BSD'

  newparam :name, namevar: true

  ensurable do
    desc('The state the interface should be in.')

    newvalue(:present) do
      provider.create
    end

    newvalue(:absent) do
      provider.destroy
    end

    newvalue(:up) do
      provider.up
    end

    newvalue(:down) do
      provider.down
    end

    aliasvalue(:down, :absent)
    aliasvalue(:up, :present)

    defaultto :present
  end

  newparam :parents do
    desc 'a String or Array of parent interfaces to ensure correct ordering'
    validate do |value|
      raise ArgumentError, "param parents must be an Array, is: #{value.class}" unless value.is_a? Array
      value.each do |v|
        unless v =~ %r{[[:alpha:]]+[[:digit:]]+}
          raise ArgumentError, "got illegal parent interface name: '#{v}' for '#{resource[:name]}'"
        end
      end
    end
  end

  newproperty(:state) do
    desc 'The state of the interface'
    newvalue(:up)
    newvalue(:down)
    newvalue(:absent)
  end

  newproperty(:destroyable) do
    desc 'Booleana representing if the interface is a pseudo interface'
    newvalue(:true)
    newvalue(:false)
  end

  newproperty(:flags) do
    desc 'Interface flags from ifconfig(8)'
  end

  newproperty(:mtu) do
    desc 'Running MTU of the interface'
  end

  def refresh
    provider.restart
  end

  autorequire(:bsd_interface) do
    self[:parents]
  end
end

redpajama_set_name: RedPajamaGithub


text:
**Effective date: February 7, 2022.** View [change history][changes-terms].

[changes-terms]: https://github.com/zulip/zulip/commits/main/templates/corporate/policies/terms.md

Welcome to Zulip. Please read on to learn the rules and restrictions that govern
your use of our website(s), products, services and applications (the
"Services"). If you have any questions, comments, or concerns regarding these
terms or the Services, please contact us at:

* Email: [support@zulip.com](mailto:support@zulip.com)
* Address: Kandra Labs Inc., 450 Townsend Street, San Francisco, CA 94107

These Terms of Service (the "Terms") are a binding contract between
you and **KANDRA LABS, INC.** ("Zulip," "we" and "us"). Your use of
the Services in any way means that you agree to all of these Terms,
and these Terms will remain in effect while you use the
Services. These Terms include the provisions in this document as well
as those in the [Privacy Policy](/policies/privacy), [Rules of
Use](/policies/rules), and, if applicable, [Data Processing
Addendum](/static/images/policies/Zulip-Data-Processing-Addendum.pdf).

**Please read these Terms carefully.** They cover important information about
Services provided to you and any charges, taxes, and fees we bill you. **These
Terms include information about future changes to these Terms, automatic
renewals, limitations of liability, a class action waiver and resolution of
disputes by arbitration instead of in court. PLEASE NOTE THAT YOUR USE OF AND
ACCESS TO OUR SERVICES ARE SUBJECT TO THE FOLLOWING TERMS; IF YOU DO NOT AGREE
TO ALL OF THE FOLLOWING, YOU MAY NOT USE OR ACCESS THE SERVICES IN ANY MANNER.**

**ARBITRATION NOTICE AND CLASS ACTION WAIVER:** EXCEPT FOR CERTAIN TYPES OF
DISPUTES DESCRIBED IN THE ARBITRATION AGREEMENT SECTION BELOW, YOU AGREE THAT
DISPUTES BETWEEN YOU AND US WILL BE RESOLVED BY BINDING, INDIVIDUAL ARBITRATION
AND YOU WAIVE YOUR RIGHT TO PARTICIPATE IN A CLASS ACTION LAWSUIT OR CLASS-WIDE
ARBITRATION.

## Will these Terms ever change?

We are constantly trying to improve our Services, so these Terms may
need to change along with our Services. We reserve the right to change
the Terms at any time, but if we do, we will place a notice on our
site located at [https://zulip.com/policies/terms](/policies/terms),
send you an email, and/or notify you by some other means. We will
generally aim to provide such notice about changes to the Terms at
least 14 days in advance of the new Terms taking effect.

If you don't agree with the new Terms, you are free to reject them;
unfortunately, that means you will no longer be able to use the Services. If you
use the Services in any way after a change to the Terms is effective, that means
you agree to all of the changes.

Except for changes by us as described here, no other amendment or modification
of these Terms will be effective unless in writing and signed by both you and
us.

## What about my privacy?

Zulip takes the privacy of its users very seriously; see our [Privacy
Policy](/policies/privacy) for details.

### Children's Online Privacy Protection Act

The Children's Online Privacy Protection Act ("COPPA") requires that
online service providers obtain parental consent before they knowingly
collect personally identifiable information online from children who
are under thirteen (13). We do not knowingly collect or solicit
personally identifiable information from children under thirteen (13)
years of age and children below the minimum [minimum age of consent in
their country](/policies/age-of-consent); if you are a child under the
age of thirteen (13) or below the minimum age of consent in your
country, please do not attempt to register for or otherwise use the
Services or send us any personal information. If we learn we have
collected personal information from a child under thirteen (13) years
of age or below the minimum age of consent in their country, we will
delete that information as quickly as possible. If you believe that a
child under the age of thirteen (13) or below the minimum age of
consent in their country may have provided us personal information,
please contact us at [privacy@zulip.com](mailto:privacy@zulip.com).

## What are the basics of using Zulip?

To use some of the Services, you may be required to sign up for an account,
select a password and display name ("Zulip Display Name"), and provide us with
certain information or data, such as your email address. You agree that you are
solely responsible for ensuring that your registration information, including
your email address, is accurate, complete and up to date. You may not select as
your Zulip Display Name a name that you do not have the right to use, or another
person's name with the intent to impersonate that person. You may not transfer
your account to anyone else without our prior written permission.

Additionally, you may be able to access certain parts or features of the
Services by using your account credentials from third party services ("Third
Party Accounts"), such as those offered by Google and Apple. By using the
Services through a Third Party Account, you permit us to access certain
information from such account for use by the Services. You are ultimately in
control of how much information is accessible to us and may exercise such
control by adjusting your privacy settings on your Third Party Account.

You represent and warrant that you are an individual of legal age to form a
binding contract (or if not, you've received your parent's or guardian's
permission to use the Services and have gotten your parent or guardian to agree
to these Terms on your behalf). If you're agreeing to these Terms on behalf of
an organization or entity or creating or administering an organization or group
in use of the Services (each such organization, entity, or group, a "Zulip
Organization", and each administrator of a Zulip Organization, a "Zulip
Organization Administrator"), you represent and warrant that you are authorized
to agree to these Terms on such Zulip Organization's behalf and bind them to
these Terms (in which case, the references to "you" and "your" in these Terms,
except for in this sentence, refer to that Zulip Organization).

You will only use the Services for your own internal, personal use, and not on
behalf of or for the benefit of any third party, and only in a manner that
complies with all laws that apply to you. If your use of the Services is
prohibited by applicable laws, then you aren't authorized to use the Services.
We can't and won't be responsible for your using the Services in a way that
breaks the law.

You will not share your Zulip account or password with anyone, and you must
protect the security of your Zulip account, your password, and any other access
tools or credentials. You're responsible for any activity associated with your
Zulip account.

## What about notifications?

As part of the Services, you may receive communications through the Services,
including notifications that Zulip sends you (for example, via email or SMS).
When signing up for the Services, you will receive a welcome notification and
instructions on how to stop receiving notifications. **By signing up for the
Services and providing us with your wireless number, you confirm that you want
Zulip to send you information regarding your account or transactions with us,
which may include Zulip using automated dialing technology to text you at the
wireless number you provided, and you agree to receive communications from
Zulip, and you represent and warrant that each person you register for the
Services or for whom you provide a wireless phone number has consented to
receive communications from Zulip.** You agree to indemnify and hold Zulip
harmless from and against any and all claims, liabilities, damages (actual and
consequential), losses and expenses (including attorneys' fees) arising from or
in any way related to any breach of the foregoing on your part.

## What are my rights in the Services?

The materials displayed or performed or available on or through the Services,
including, but not limited to, text, graphics, data, articles, photos, images,
illustrations, User Submissions (as defined below) and so forth (all of the
foregoing, the "Content") are protected by copyright and/or other intellectual
property laws. You promise to abide by all copyright notices, trademark rules,
information, and restrictions contained in any Content you access through the
Services, and you won't use, copy, reproduce, modify, translate, publish,
broadcast, transmit, distribute, perform, upload, display, license, sell,
commercialize or otherwise exploit for any purpose any Content not owned by you
in a way that violates someone else's (including Zulip's) rights.

Subject to these Terms, we grant each user of the Services a worldwide,
non-exclusive, non-sublicensable and non-transferable license to:

- Use (i.e., to download and display locally) Content solely for purposes of
  using the Services.

- Export Content via the official Zulip API and distribute such Content for
  legitimate purposes (e.g., a public archive or mirror which is approved by
  organization owners).

Use, reproduction, modification, distribution or storage of any Content for any
purpose other than using the Services is expressly prohibited without prior
written permission from us.

You understand that Zulip owns the Services. You won't modify, publish,
transmit, participate in the transfer or sale of, reproduce (except as expressly
provided in this Section), create derivative works based on, or otherwise
exploit any of the Services. You will also not upload to, or transmit from, the
Services any data, file, software, or link that contains or redirects to a
virus, Trojan horse, worm, or other harmful component or a technology that
unlawfully accesses or downloads content or information stored within the
Services. The Services may allow you to copy or download certain Content, but
please remember that even where these functionalities exist, all the
restrictions in this section still apply.

## What about anything I contribute to the Services? Do I have to grant any licenses to Zulip or to other users?

### User Submissions

Anything you post, upload, share, store, or otherwise provide through the
Services is your "User Submission". Some User Submissions may be viewable by
other users or by anyone on the Internet. You are solely responsible for all
User Submissions you contribute to the Services. You represent that all User
Submissions submitted are not false, deceptive, or misleading, and are in
compliance with all applicable laws, rules and regulations.

### Licenses
Your User Submissions remain yours. These Terms don't give us any ownership in
your User Submissions, or any rights to them except the limited rights set forth
below.

To provide the Services, we need your permission to do things like storing your
User Submissions and showing them to the people you send messages to, or who
otherwise have permission to see them (for example, any member of your Zulip
Organization for a message you send to a public stream.) Our Services also
provide you with features like sharing and searching. To provide these and other
features, Zulip may access, use, store, copy, process, adapt, distribute,
perform, export, and display your User Submissions. Note that the following
licenses are subject to our [Privacy Policy](/policies/privacy) to the extent
they relate to User Submissions that are also your personally-identifiable
information.

You give us permission to do these things only as reasonably necessary (a) to
deliver the Services; (b) to prevent or address service, security, support,
abuse or technical issues; or (c) as required by law. This license is
non-exclusive, worldwide, perpetual, royalty-free, fully paid, sublicensable and
transferable to use, edit, modify, truncate, aggregate, reproduce, distribute,
prepare derivative works of, display, perform, and otherwise fully exploit the
User Submissions in connection with the Services and extends to our affiliates
and trusted third parties we work with.

Other people may have access to your User Submissions through the Services, and
you also give those people a non-exclusive, worldwide permission to do these
things, only as permitted by the functionality of the Services and these Terms.
For example:

- People you send a Zulip message to may view the message through the Services.
- Your Zulip Organization Administrators may [export the Zulip Organization's
  data](/help/export-your-organization) for archival or backup purposes, or to
  import the data into a self-hosted Zulip server.
- Messages on a web-public stream may be viewed by anyone on the Internet.

When you delete your Zulip account, we will stop displaying your User
Submissions in association with your account, if applicable. You understand that
User Submissions may still be viewable in association with a "deleted user"
after you delete your Zulip account. You understand and agree that it may not be
possible to completely delete that content from Zulip's records, and that your
User Submissions may remain viewable elsewhere to the extent that they were
copied or stored by other users.

We welcome feedback, but note that by sending any feedback, you grant us an
irrevocable, non-exclusive, royalty-free, perpetual, worldwide license to use,
modify, prepare derivative works from, publish, distribute and sublicense any
such feedback, and we may incorporate into our products and services any
feedback, comments, or suggestions without any obligation or compensation to
you.

## Are there restrictions in how I can use the Services?

You represent, warrant, and agree that you will not provide or contribute
anything, including any Content or User Submission, to the Services, or
otherwise use or interact with the Services, in a manner that is not consistent
with the [Zulip Rules of Use](/policies/rules). A violation of any of the Zulip
Rules of Use is grounds for termination of your right to use or access the
Services.

## What if I see something on the Services that infringes my copyright?

In accordance with the DMCA, we've adopted the following policy toward copyright
infringement.  We reserve the right to (1) block access to or remove material
that we believe in good faith to be copyrighted material that has been illegally
copied and distributed by any of our advertisers, affiliates, content providers,
members or users and (2) remove and discontinue service to repeat offenders.

* **Procedure for Reporting Copyright Infringements**.  If you believe that
   material or content residing on or accessible through the Services infringes
   your copyright (or the copyright of someone whom you are authorized to act on
   behalf of), please send a notice of copyright infringement containing the
   following information to Zulip's Designated Agent to Receive Notification of
   Claimed Infringement (our "Designated Agent," whose contact details are
   listed below):
      * (a) A physical or electronic signature of a person authorized to act on behalf
         of the owner of the copyright that has been allegedly infringed;
      * (b) Identification of works or materials being infringed;
      * (c) Identification of the material that is claimed to be infringing including
         information regarding the location of the infringing materials that the
         copyright owner seeks to have removed, with sufficient detail so that we
         are capable of finding and verifying its existence;
      * (d) Contact information about the notifier including address, telephone number
         and, if available, email address;
      * (e) A statement that the notifier has a good faith belief that the material
         identified in (c) is not authorized by the copyright owner, its agent,
         or the law; and
      * (f) A statement made under penalty of perjury that the information provided is
         accurate and the notifying party is authorized to make the complaint on
         behalf of the copyright owner.
* **Once Proper Bona Fide Infringement Notification is Received by the
   Designated Agent**.  Upon receipt of a proper notice of copyright
   infringement, we reserve the right to:
      * (a) remove or disable access to the infringing material;
      * (b) notify the content provider who is accused of infringement that we have
          removed or disabled access to the applicable material; and
      * (c) terminate such content provider's access to the Services if they are a
          repeat offender.
* **Procedure to Supply a Counter-Notice to the Designated Agent**.  If the
   content provider believes that the material that was removed (or to which
   access was disabled) is not infringing, or the content provider believes that
   it has the right to post and use such material from the copyright owner, the
   content provider may send us a counter-notice containing the following
   information to the Designated Agent:
       * (a) A physical or electronic signature of the content provider;
       * (b) Identification of the material that has been removed or to which access
           has been disabled and the location at which the material appeared before
           it was removed or disabled;
       * (c) A statement under penalty of perjury that the content provider has a
           good faith belief that the material was removed or disabled as a result
           of mistake or misidentification of the material; and
       * (d) Content provider's name, address, telephone number, and, if available,
           email address, and a statement that the content provider consents to the
           jurisdiction of the Federal Court for the judicial district in which the
           content provider's address is located, or, if the content provider's
           address is located outside the United States, for any judicial district
           in which Company is located, and that the content provider will accept
           service of process from the person who provided notification of the
           alleged infringement or an agent of such person.

If a counter-notice is received by the Designated Agent, Company may, in its
discretion, send a copy of the counter-notice to the original complaining party
informing that person that Company may replace the removed material or cease
disabling it in 10 business days. Unless the copyright owner files an action
seeking a court order against the content provider accused of committing
infringement, the removed material may be replaced or access to it restored 10
business days or more after receipt of the counter-notice, at Company's
discretion.

Please contact Zulip's Designated Agent at the following address:

Kandra Labs, Inc.

Attn: DMCA Designated Agent

450 Townsend Street

San Francisco, CA 94107

## Who is responsible for what I see and do on the Services?

Any information or Content publicly posted or privately transmitted through the
Services is the sole responsibility of the person from whom such Content
originated, and you access all such information and Content at your own risk,
and we aren't liable for any errors or omissions in that information or Content
or for any damages or loss you might suffer in connection with it. We cannot
control and have no duty to take any action regarding how you may interpret and
use the Content or what actions you may take as a result of having been exposed
to the Content, and you hereby release us from all liability for you having
acquired or not acquired Content through the Services. We can't guarantee the
identity of any users with whom you interact in using the Services and are not
responsible for which users gain access to the Services.

You are responsible for all Content you contribute, in any manner, to the
Services, and you represent and warrant you have all rights necessary to do so,
in the manner in which you contribute it.

The Services may contain links or connections to third-party websites or
services that are not owned or controlled by Zulip. When you access third-party
websites or use third-party services, you accept that there are risks in doing
so, and that Zulip is not responsible for such risks.

Zulip has no control over, and assumes no responsibility for, the content,
accuracy, privacy policies, or practices of or opinions expressed in any
third-party websites or by any third party that you interact with through the
Services. In addition, Zulip will not and cannot monitor, verify, censor or edit
the content of any third-party site or service. We encourage you to be aware
when you leave the Services and to read the terms and conditions and privacy
policy of each third-party website or service that you visit or utilize. By
using the Services, you release and hold us harmless from any and all liability
arising from your use of any third-party website or service.

Your interactions with Zulip Organizations and/or individuals found on or
through the Services, including payment and delivery of goods or services, and
any other terms, conditions, warranties or representations associated with such
dealings, are solely between you and such organizations and/or individuals. You
should make whatever investigation you feel necessary or appropriate before
proceeding with any online or offline transaction with any of these third
parties. You agree that Zulip shall not be responsible or liable for any loss or
damage of any sort incurred as the result of any such dealings.

If there is a dispute between participants on this site or Services, or between
users and any third party, you agree that Zulip is under no obligation to become
involved. In the event that you have a dispute with one or more other users, you
release Zulip, its directors, officers, employees, agents, and successors from
claims, demands, and damages of every kind or nature, known or unknown,
suspected or unsuspected, disclosed or undisclosed, arising out of or in any way
related to such disputes and/or our Services. You shall and hereby do waive
California Civil Code Section 1542 or any similar law of any jurisdiction, which
says in substance: "A general release does not extend to claims that the
creditor or releasing party does not know or suspect to exist in his or her
favor at the time of executing the release and that, if known by him or her,
would have materially affected his or her settlement with the debtor or released
party."

## Will Zulip ever change the Services?

We're always trying to improve our Services, so they may change over time. We
may suspend or discontinue any part of the Services, or we may introduce new
features or impose limits on certain features or restrict access to parts or all
of the Services. We reserve the right to remove any Content from the Services at
any time, for any reason (including, but not limited to, if someone alleges you
contributed that Content in violation of these Terms), in our sole discretion,
and without notice.

## Do the Services cost anything?

The Services may be free or we may charge a fee for using the Services. If you
are using a free version of the Services, we will notify you before any Services
you are then using begin carrying a fee, and if you wish to continue using such
Services, you must pay all applicable fees for such Services. Note that if you
elect to receive text messages through the Services, data and message rates may
apply. Any and all such charges, fees or costs are your sole responsibility. You
should consult with your wireless carrier to determine what rates, charges, fees
or costs may apply to your use of the Services.

* (a) **Paid Services**. Certain of our Services may be subject to payments now or
   in the future (the "Paid Services"). Please see our Paid Services page:
   <https://zulip.com/plans/> for a description of the current Paid Services.
   Please note that any payment terms presented to you in the process of using
   or signing up for a Paid Service are deemed part of these Terms.
* (b) **Billing**. We use a third-party payment processor (the "Payment Processor")
   to bill you through a payment account linked to your account on the Services
   (your "Billing Account") for use of the Paid Services. The processing of
   payments will be subject to the terms, conditions and privacy policies of the
   Payment Processor in addition to these Terms. Currently, we use Stripe, Inc.
   as our Payment Processor. You can access Stripe's Terms of Service at
   <https://stripe.com/us/checkout/legal> and their Privacy Policy at
   <https://stripe.com/us/privacy>. We are not responsible for any error by, or
   other acts or omissions of, the Payment Processor. By choosing to use Paid
   Services, you agree to pay us, through the Payment Processor, all charges at
   the prices then in effect for any use of such Paid Services in accordance
   with the applicable payment terms, and you authorize us, through the Payment
   Processor, to charge your chosen payment provider (your "Payment Method").
   You agree to make payment using that selected Payment Method. We reserve the
   right to correct any errors or mistakes that the Payment Processor makes even
   if it has already requested or received payment.
* (c) **Payment Method**. The terms of your payment will be based on your Payment
   Method and may be determined by agreements between you and the financial
   institution, credit card issuer or other provider of your chosen Payment
   Method. If we, through the Payment Processor, do not receive payment from
   you, you agree to pay all amounts due on your Billing Account upon demand.
* (d) **Recurring Billing**. Some of the Paid Services may consist of an initial
   period, for which there is a one-time charge, followed by recurring period
   charges as agreed to by you. By choosing a recurring payment plan, you
   acknowledge that such Services have an initial and recurring payment feature
   and you accept responsibility for all recurring charges prior to
   cancellation. WE MAY SUBMIT PERIODIC CHARGES (E.G., MONTHLY) WITHOUT FURTHER
   AUTHORIZATION FROM YOU, UNTIL YOU PROVIDE PRIOR NOTICE (RECEIPT OF WHICH IS
   CONFIRMED BY US) THAT YOU HAVE TERMINATED THIS AUTHORIZATION OR WISH TO
   CHANGE YOUR PAYMENT METHOD. SUCH NOTICE WILL NOT AFFECT CHARGES SUBMITTED
   BEFORE WE REASONABLY COULD ACT. TO TERMINATE YOUR AUTHORIZATION OR CHANGE
   YOUR PAYMENT METHOD, GO TO YOUR [BILLING SETTINGS](/billing/).
* (e) **Current Information Required**. YOU MUST PROVIDE CURRENT, COMPLETE AND
   ACCURATE INFORMATION FOR YOUR BILLING ACCOUNT. YOU MUST PROMPTLY UPDATE ALL
   INFORMATION TO KEEP YOUR BILLING ACCOUNT CURRENT, COMPLETE AND ACCURATE (SUCH
   AS A CHANGE IN BILLING ADDRESS, CREDIT CARD NUMBER, OR CREDIT CARD EXPIRATION
   DATE), AND YOU MUST PROMPTLY NOTIFY US OR OUR PAYMENT PROCESSOR IF YOUR
   PAYMENT METHOD IS CANCELED (E.G., FOR LOSS OR THEFT) OR IF YOU BECOME AWARE
   OF A POTENTIAL BREACH OF SECURITY, SUCH AS THE UNAUTHORIZED DISCLOSURE OR USE
   OF YOUR USER NAME OR PASSWORD. CHANGES TO SUCH INFORMATION CAN BE MADE IN
   YOUR [BILLING SETTINGS](/billing/). IF YOU FAIL TO PROVIDE ANY OF THE
   FOREGOING INFORMATION, YOU AGREE THAT WE MAY CONTINUE CHARGING YOU FOR ANY
   USE OF PAID SERVICES UNDER YOUR BILLING ACCOUNT UNLESS YOU HAVE TERMINATED
   YOUR PAID SERVICES AS SET FORTH ABOVE.
* (f) **Change in Amount Authorized**. If the amount to be charged to your Billing
   Account varies from the amount you preauthorized (other than due to the
   imposition or change in the amount of sales taxes), you have the right to
   receive, and we shall provide, notice of the amount to be charged and the
   date of the charge before the scheduled date of the transaction. Any
   agreement you have with your payment provider will govern your use of your
   Payment Method. You agree that we may accumulate charges incurred and submit
   them as one or more aggregate charges during or at the end of each billing
   cycle.
* (g) **Auto-Renewal for Paid Services**. Unless you opt out of auto-renewal, which
   can be done through your [billing settings](/billing/), any Paid Services you
   have signed up for will be automatically extended for successive renewal
   periods of the same duration as the subscription term originally selected, at
   the then-current non-promotional rate. To change or resign your Paid Services
   at any time, go to your [billing settings](/billing/).  If you terminate a
   Paid Service, you may use your subscription until the end of your
   then-current term, and your subscription will not be renewed after your
   then-current term expires. However, you will not be eligible for a prorated
   refund of any portion of the subscription fee paid for the then-current
   subscription period. IF YOU DO NOT WANT TO CONTINUE TO BE CHARGED ON A
   RECURRING BASIS, YOU MUST CANCEL THE APPLICABLE PAID SERVICE THROUGH YOUR
   [BILLING SETTINGS](/billing/) OR TERMINATE YOUR ZULIP ACCOUNT BEFORE THE END
   OF THE RECURRING TERM. PAID SERVICES CANNOT BE TERMINATED BEFORE THE END OF
   THE PERIOD FOR WHICH YOU HAVE ALREADY PAID, AND EXCEPT AS EXPRESSLY PROVIDED
   IN THESE TERMS, ZULIP WILL NOT REFUND ANY FEES THAT YOU HAVE ALREADY PAID.
* (h) **Reaffirmation of Authorization**. Your non-termination or continued use of
   a Paid Service reaffirms that we are authorized to charge your Payment Method
   for that Paid Service. We may submit those charges for payment and you will
   be responsible for such charges. This does not waive our right to seek
   payment directly from you. Your charges may be payable in advance, in
   arrears, per usage, or as otherwise described when you initially selected to
   use the Paid Service.
* (i) **Free Trials and Other Promotions**. Any free trial or other promotion that
   provides access to a Paid Service may only be used within the specified time
   of the trial. You must stop using a Paid Service before the end of the trial
   period in order to avoid being charged for that Paid Service. If you cancel
   prior to the end of the trial period and are inadvertently charged for a Paid
   Service, please contact us at [support@zulip.com](mailto:support@zulip.com).

## What if I want to stop using the Services?

You're free to stop using the Services at any time by contacting us at
[support@zulip.com](mailto:support@zulip.com); please refer to our [Privacy
Policy](/policies/privacy), as well as the licenses above, to understand how we
treat information you provide to us after you have stopped using our Services.

Zulip is also free to terminate (or suspend access to) your use of the Services
or your account for any reason at our sole discretion, including your breach of
these Terms. Zulip has the sole right to decide whether you are in violation of
any of the restrictions set forth in these Terms.

Account termination may result in destruction of any Content associated with
your account, so keep that in mind before you decide to terminate your account.
We will try to provide advance notice to you prior to our terminating your
account so that you are able to retrieve any important User Submissions you may
have stored in your account (to the extent allowed by law and these Terms), but
we may not do so if we determine it would be impractical, illegal, not in the
interest of someone's safety or security, or otherwise harmful to the rights or
property of Zulip or third parties.

If you have deleted your account by mistake, contact us immediately at
[support@zulip.com](mailto:support@zulip.com) – we will try to help, but
unfortunately, we can't promise that we can recover or restore anything.

Provisions that, by their nature, should survive termination of these Terms
shall survive termination. By way of example, all of the following will survive
termination: any obligation you have to pay us or indemnify us, any limitations
on our liability, any terms regarding ownership or intellectual property rights,
and terms regarding disputes between us, including without limitation the
arbitration agreement.

## What about Mobile Applications?

You acknowledge and agree that the availability of our mobile application is
dependent on the third party stores from which you download the application,
e.g., the App Store from Apple or the Play Store from Google (each an "App
Store"). Each App Store may have its own terms and conditions to which you must
agree before downloading mobile applications from such store, including the
specific terms relating to Apple App Store set forth below. You agree to comply
with, and your license to use our application is conditioned upon your
compliance with, such App Store terms and conditions. To the extent such other
terms and conditions from such App Store are less restrictive than, or otherwise
conflict with, the terms and conditions of these Terms of Service, the more
restrictive or conflicting terms and conditions in these Terms of Service apply.

### I use the Zulip App available via the Apple App Store – should I know anything about that?

These Terms apply to your use of all the Services, including our iOS
applications (the "Application") available via the Apple, Inc. ("Apple") App
Store, but the following additional terms also apply to the Application:

* (a) Both you and Zulip acknowledge that the Terms are concluded between you and
   Zulip only, and not with Apple, and that Apple is not responsible for the
   Application or the Content;
* (b) The Application is licensed to you on a limited, non-exclusive,
   non-transferrable, non-sublicensable basis, solely to be used in connection
   with the Services for your private, internal, personal use, subject to all
   the terms and conditions of these Terms as they are applicable to the
   Services;
* (c) You will only use the Application in connection with an Apple device that you
   own or control;
* (d) You acknowledge and agree that Apple has no obligation whatsoever to furnish
   any maintenance and support services with respect to the Application;
* (e) In the event of any failure of the Application to conform to any applicable
   warranty, including those implied by law, you may notify Apple of such
   failure; upon notification, Apple's sole warranty obligation to you will be
   to refund to you the purchase price, if any, of the Application;
* (f) You acknowledge and agree that Zulip, and not Apple, is responsible for
   addressing any claims you or any third party may have in relation to the
   Application;
* (g) You acknowledge and agree that, in the event of any third-party claim that
   the Application or your possession and use of the Application infringes that
   third party's intellectual property rights, Zulip, and not Apple, will be
   responsible for the investigation, defense, settlement and discharge of any
   such infringement claim;
* (h) You represent and warrant that you are not located in a country subject to a
   U.S. Government embargo, or that has been designated by the U.S. Government
   as a "terrorist supporting" country, and that you are not listed on any U.S.
   Government list of prohibited or restricted parties;
* (i) Both you and Zulip acknowledge and agree that, in your use of the
   Application, you will comply with any applicable third-party terms of
   agreement which may affect or be affected by such use; and
* (j) Both you and Zulip acknowledge and agree that Apple and Apple's subsidiaries
    are third-party beneficiaries of these Terms, and that upon your acceptance
    of these Terms, Apple will have the right (and will be deemed to have
    accepted the right) to enforce these Terms against you as the third-party
    beneficiary hereof.

## What else do I need to know?

*Warranty Disclaimer.* Zulip and its licensors, suppliers, partners, parent,
subsidiaries or affiliated entities, and each of their respective officers,
directors, members, employees, consultants, contract employees, representatives
and agents, and each of their respective successors and assigns (Zulip and all
such parties together, the "Zulip Parties") make no representations or
warranties concerning the Services, including without limitation regarding any
Content contained in or accessed through the Services, and the Zulip Parties
will not be responsible or liable for the accuracy, copyright compliance,
legality, or decency of material contained in or accessed through the Services
or any claims, actions, suits, procedures, costs, expenses, damages or
liabilities arising out of use of, or in any way related to your participation
in, the Services. The Zulip Parties make no representations or warranties
regarding suggestions or recommendations of services or products offered or
purchased through or in connection with the Services. THE SERVICES AND CONTENT
ARE PROVIDED BY ZULIP (AND ITS LICENSORS AND SUPPLIERS) ON AN "AS-IS" BASIS,
WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT
LIMITATION, IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, NON-INFRINGEMENT, OR THAT USE OF THE SERVICES WILL BE UNINTERRUPTED OR
ERROR-FREE. SOME STATES DO NOT ALLOW LIMITATIONS ON HOW LONG AN IMPLIED WARRANTY
LASTS, SO THE ABOVE LIMITATIONS MAY NOT APPLY TO YOU.

*Limitation of Liability*. TO THE FULLEST EXTENT ALLOWED BY APPLICABLE LAW,
UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
TORT, CONTRACT, STRICT LIABILITY, OR OTHERWISE) SHALL ANY OF THE ZULIP PARTIES
BE LIABLE TO YOU OR TO ANY OTHER PERSON FOR (A) ANY INDIRECT, SPECIAL,
INCIDENTAL, PUNITIVE OR CONSEQUENTIAL DAMAGES OF ANY KIND, INCLUDING DAMAGES FOR
LOST PROFITS, BUSINESS INTERRUPTION, LOSS OF DATA, LOSS OF GOODWILL, WORK
STOPPAGE, ACCURACY OF RESULTS, OR COMPUTER FAILURE OR MALFUNCTION, (B) ANY
SUBSTITUTE GOODS, SERVICES OR TECHNOLOGY, (C) ANY AMOUNT, IN THE AGGREGATE, IN
EXCESS OF THE GREATER OF (I) ONE-HUNDRED ($100) DOLLARS OR (II) THE AMOUNTS PAID
AND/OR PAYABLE BY YOU TO ZULIP IN CONNECTION WITH THE SERVICES IN THE TWELVE
(12) MONTH PERIOD PRECEDING THIS APPLICABLE CLAIM OR (D) ANY MATTER BEYOND OUR
REASONABLE CONTROL. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF
INCIDENTAL OR CONSEQUENTIAL OR CERTAIN OTHER DAMAGES, SO THE ABOVE LIMITATION
AND EXCLUSIONS MAY NOT APPLY TO YOU.

*Indemnity*. To the fullest extent allowed by applicable law, you agree to
indemnify and hold the Zulip Parties harmless from and against any and all
claims, liabilities, damages (actual and consequential), losses and expenses
(including attorneys' fees) arising from or in any way related to any claims
relating to (a) your use of the Services (including any actions taken by a third
party using your account), and (b) your violation of these Terms.

*Assignment*. You may not assign, delegate or transfer these Terms or your
rights or obligations hereunder, or your Services account, in any way (by
operation of law or otherwise) without Zulip's prior written consent. We may
transfer, assign, or delegate these Terms and our rights and obligations without
consent.

*Choice of Law*. These Terms are governed by and will be construed under the
Federal Arbitration Act, applicable federal law, and the laws of the State of
California, without regard to the conflicts of laws provisions thereof.

*Arbitration Agreement.* Please read the following ARBITRATION AGREEMENT
carefully because it requires you to arbitrate certain disputes and claims with
Zulip and limits the manner in which you can seek relief from Zulip. Both you
and Zulip acknowledge and agree that for the purposes of any dispute arising out
of or relating to the subject matter of these Terms, Zulip's officers,
directors, employees and independent contractors ("Personnel") are third-party
beneficiaries of these Terms, and that upon your acceptance of these Terms,
Personnel will have the right (and will be deemed to have accepted the right) to
enforce these Terms against you as the third-party beneficiary hereof.

* (a) *Arbitration Rules; Applicability of Arbitration Agreement*. The parties
  shall use their best efforts to settle any dispute, claim, question, or
  disagreement arising out of or relating to the subject matter of these Terms
  directly through good-faith negotiations, which shall be a precondition to
  either party initiating arbitration. If such negotiations do not resolve the
  dispute, it shall be finally settled by binding arbitration in San Francisco
  County, California. The arbitration will proceed in the English language, in
  accordance with the JAMS Streamlined Arbitration Rules and Procedures (the
  "Rules") then in effect, by one commercial arbitrator with substantial
  experience in resolving intellectual property and commercial contract
  disputes. The arbitrator shall be selected from the appropriate list of JAMS
  arbitrators in accordance with such Rules. Judgment upon the award rendered by
  such arbitrator may be entered in any court of competent jurisdiction.

* (b) *Costs of Arbitration*. The Rules will govern payment of all arbitration
  fees. Zulip will pay all arbitration fees for claims less than seventy-five
  thousand ($75,000) dollars. Zulip will not seek its attorneys' fees and costs
  in arbitration unless the arbitrator determines that your claim is frivolous.

* (c) *Small Claims Court; Infringement*. Either you or Zulip may assert claims,
  if they qualify, in small claims court in San Francisco County, California or
  any United States county where you live or work. Furthermore, notwithstanding
  the foregoing obligation to arbitrate disputes, each party shall have the
  right to pursue injunctive or other equitable relief at any time, from any
  court of competent jurisdiction, to prevent the actual or threatened
  infringement, misappropriation or violation of a party's copyrights,
  trademarks, trade secrets, patents or other intellectual property rights.

* (d) *Waiver of Jury Trial*. YOU AND ZULIP WAIVE ANY CONSTITUTIONAL AND
  STATUTORY RIGHTS TO GO TO COURT AND HAVE A TRIAL IN FRONT OF A JUDGE OR JURY.
  You and Zulip are instead choosing to have claims and disputes resolved by
  arbitration. Arbitration procedures are typically more limited, more
  efficient, and less costly than rules applicable in court and are subject to
  very limited review by a court. In any litigation between you and Zulip over
  whether to vacate or enforce an arbitration award, YOU AND ZULIP WAIVE ALL
  RIGHTS TO A JURY TRIAL, and elect instead to have the dispute be resolved by a
  judge.

* (e) *Waiver of Class or Consolidated Actions*. ALL CLAIMS AND DISPUTES WITHIN
  THE SCOPE OF THIS ARBITRATION AGREEMENT MUST BE ARBITRATED OR LITIGATED ON AN
  INDIVIDUAL BASIS AND NOT ON A CLASS BASIS. CLAIMS OF MORE THAN ONE CUSTOMER OR
  USER CANNOT BE ARBITRATED OR LITIGATED JOINTLY OR CONSOLIDATED WITH THOSE OF
  ANY OTHER CUSTOMER OR USER. If however, this waiver of class or consolidated
  actions is deemed invalid or unenforceable, neither you nor Zulip is entitled
  to arbitration; instead all claims and disputes will be resolved in a court as
  set forth in (g) below.

* (f) *Opt-out*. You have the right to opt out of the provisions of this
  Arbitration Agreement by sending written notice of your decision to opt out to
  the following address: 450 Townsend Street, San Francisco, CA 94107 postmarked
  within thirty (30) days of first accepting these Terms. You must include (i)
  your name and residence address, (ii) the email address and/or telephone
  number associated with your account, and (iii) a clear statement that you want
  to opt out of these Terms' arbitration agreement.

* (g) *Exclusive Venue*. If you send the opt-out notice in (f), and/or in any
  circumstances where the foregoing arbitration agreement permits either you or
  Zulip to litigate any dispute arising out of or relating to the subject matter
  of these Terms in court, then the foregoing arbitration agreement will not
  apply to either party, and both you and Zulip agree that any judicial
  proceeding (other than small claims actions) will be brought in the state or
  federal courts located in, respectively, San Francisco County, California, or
  the federal district in which that county falls.

* (h) *Severability*. If the prohibition against class actions and other claims
  brought on behalf of third parties contained above is found to be
  unenforceable, then all of the preceding language in this Arbitration
  Agreement section will be null and void. This arbitration agreement will
  survive the termination of your relationship with Zulip.

*Miscellaneous*. You will be responsible for paying, withholding, filing, and
reporting all taxes, duties, and other governmental assessments associated with
your activity in connection with the Services, provided that Zulip may, in its
sole discretion, do any of the foregoing on your behalf or for itself as it sees
fit. The failure of either you or us to exercise, in any way, any right herein
shall not be deemed a waiver of any further rights hereunder. If any provision
of these Terms are found to be unenforceable or invalid, that provision will be
limited or eliminated, to the minimum extent necessary, so that these Terms
shall otherwise remain in full force and effect and enforceable. You and Zulip
agree that these Terms are the complete and exclusive statement of the mutual
understanding between you and Zulip, and that these Terms supersede and cancel
all previous written and oral agreements, communications and other
understandings relating to the subject matter of these Terms. You hereby
acknowledge and agree that neither these Terms nor your use of the Services
makes you an employee, agent, partner, or joint venture of Zulip, and you do not
have any authority of any kind to bind Zulip in any respect whatsoever.

Except as expressly set forth in the sections above regarding the Apple
Application and the arbitration agreement, you and Zulip agree there are no
third-party beneficiaries intended under these Terms.


text:
/*
 * SocketException.cpp
 *
 *  Created on: 2015/10/12
 *      Author: tsubaki
 */

#include "SocketException.h"

SocketException::SocketException() {
	// TODO Auto-generated constructor stub

}

SocketException::~SocketException() {
	// TODO Auto-generated destructor stub
}

std::string SocketException::getClassName() {
	return "SocketException";
}


text:
examples.perspective = function() {
  var vp1 = rc.addPoint(300, 800);
  var vp2 = rc.addPoint(1100, 800);

  var centerFoot = rc.addPoint(600, 600);
  var leftFoot = rc.addPoint(500, 500);
  var rightFoot = rc.addPoint(900, 500);
  var backFoot = rc.addPoint(700, 467);

  var centerHead = rc.addPoint(600, 300);
  var leftHead = rc.addPoint(500, 350);
  var rightHead = rc.addPoint(900, 350);
  var backHead = rc.addPoint(700, 367);

  rc.addLine(vp1, centerFoot);
  rc.addLine(centerFoot, vp2);
  rc.addLine(vp1, centerHead);
  rc.addLine(centerHead, vp2);

  rc.addLine(leftFoot, centerFoot);
    rc.addLine(leftFoot, centerFoot);
    rc.addLine(leftFoot, centerFoot);
    rc.addLine(leftFoot, centerFoot);
  rc.addLine(rightFoot, centerFoot);
    rc.addLine(rightFoot, centerFoot);
    rc.addLine(rightFoot, centerFoot);
    rc.addLine(rightFoot, centerFoot);
  rc.addLine(leftFoot, backFoot);
    rc.addLine(leftFoot, backFoot);
    // rc.addLine(leftFoot, backFoot);
    // rc.addLine(leftFoot, backFoot);
  rc.addLine(rightFoot, backFoot);
    rc.addLine(rightFoot, backFoot);
    // rc.addLine(rightFoot, backFoot);
    // rc.addLine(rightFoot, backFoot);
  rc.addParallelConstraint(vp1, centerFoot, leftFoot, centerFoot);
  rc.addParallelConstraint(vp2, centerFoot, rightFoot, centerFoot);
  rc.addParallelConstraint(vp1, backFoot, backFoot, rightFoot);
  rc.addParallelConstraint(vp2, backFoot, backFoot, leftFoot);

  rc.addLine(leftHead, centerHead);
    rc.addLine(leftHead, centerHead);
    rc.addLine(leftHead, centerHead);
    rc.addLine(leftHead, centerHead);
  rc.addLine(rightHead, centerHead);
    rc.addLine(rightHead, centerHead);
    rc.addLine(rightHead, centerHead);
    rc.addLine(rightHead, centerHead);
  rc.addLine(leftHead, backHead);
    rc.addLine(leftHead, backHead);
    // rc.addLine(leftHead, backHead);
    // rc.addLine(leftHead, backHead);
  rc.addLine(rightHead, backHead);
    rc.addLine(rightHead, backHead);
    // rc.addLine(rightHead, backHead);
    // rc.addLine(rightHead, backHead);
  rc.addParallelConstraint(vp1, centerHead, leftHead, centerHead);
  rc.addParallelConstraint(vp2, centerHead, rightHead, centerHead);
  rc.addParallelConstraint(vp1, backHead, backHead, rightHead);
  rc.addParallelConstraint(vp2, backHead, backHead, leftHead);

  rc.addLine(leftFoot, leftHead);
    rc.addLine(leftFoot, leftHead);
    rc.addLine(leftFoot, leftHead);
    rc.addLine(leftFoot, leftHead);
    rc.addLine(leftFoot, leftHead);
  rc.addLine(centerFoot, centerHead);
    rc.addLine(centerFoot, centerHead);
    rc.addLine(centerFoot, centerHead);
    rc.addLine(centerFoot, centerHead);
    rc.addLine(centerFoot, centerHead);
  rc.addLine(rightFoot, rightHead);
    rc.addLine(rightFoot, rightHead);
    rc.addLine(rightFoot, rightHead);
    rc.addLine(rightFoot, rightHead);
    rc.addLine(rightFoot, rightHead);
  rc.addLine(backFoot, backHead);
    rc.addLine(backFoot, backHead);
    rc.addLine(backFoot, backHead);
    // rc.addLine(backFoot, backHead);
    // rc.addLine(backFoot, backHead);
  rc.addParallelConstraint(leftHead, leftFoot, centerHead, centerFoot);
  rc.addParallelConstraint(rightHead, rightFoot, centerHead, centerFoot);
  rc.addParallelConstraint(backHead, backFoot, centerHead, centerFoot);

  // try to keep the center line the same length at all times
  var l = Relax.geom.magnitude(Relax.geom.minus(centerHead, centerFoot));
  rc.addLengthConstraint(centerFoot, centerHead, l);

  // add lines in the back
  rc.addLine(vp1, rightFoot);
  rc.addLine(vp2, leftFoot);
  rc.addLine(vp1, rightHead);
  rc.addLine(vp2, leftHead);

  // keep vertical lines upright
  var upright = rc.addPoint(-50, 550);
  var downright = rc.addPoint(-50, 650);
  rc.addLine(upright, downright);
  rc.addCoordinateConstraint(upright, -50, 550);
  rc.addCoordinateConstraint(downright, -50, 650);
  rc.addParallelConstraint(upright, downright, centerHead, centerFoot);
};


text:
package de.axxepta.oxygen.workspace;

import de.axxepta.oxygen.actions.CheckInAction;
import de.axxepta.oxygen.actions.CheckOutAction;
import de.axxepta.oxygen.api.*;
import de.axxepta.oxygen.customprotocol.ArgonEditorsWatchMap;
import de.axxepta.oxygen.customprotocol.CustomProtocolURLUtils;
import de.axxepta.oxygen.utils.ImageUtils;
import de.axxepta.oxygen.utils.Lang;
import de.axxepta.oxygen.versioncontrol.VersionHistoryUpdater;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import ro.sync.ecss.extensions.api.AuthorDocumentController;
import ro.sync.ecss.extensions.api.node.AttrValue;
import ro.sync.ecss.extensions.api.node.AuthorElement;
import ro.sync.ecss.extensions.api.node.AuthorNode;
import ro.sync.exml.editor.EditorPageConstants;
import ro.sync.exml.workspace.api.editor.WSEditor;
import ro.sync.exml.workspace.api.editor.page.ditamap.DITAMapPopupMenuCustomizer;
import ro.sync.exml.workspace.api.editor.page.ditamap.WSDITAMapEditorPage;
import ro.sync.exml.workspace.api.listeners.WSEditorChangeListener;
import ro.sync.exml.workspace.api.standalone.StandalonePluginWorkspace;

import javax.swing.*;
import java.io.IOException;
import java.net.URL;

import static de.axxepta.oxygen.utils.WorkspaceUtils.booleanDialog;

/**
 * @author Markus on 05.11.2016.
 */
class DitaMapManagerChangeListener extends WSEditorChangeListener {

    private static final Logger logger = LogManager.getLogger(DitaMapManagerChangeListener.class);
    private final StandalonePluginWorkspace pluginWorkspaceAccess;

    DitaMapManagerChangeListener(StandalonePluginWorkspace pluginWorkspace) {
        super();
        this.pluginWorkspaceAccess = pluginWorkspace;
    }

    @Override
    public void editorPageChanged(URL editorLocation) {
        customizeEditorPopupMenu();
    }

    @Override
    public void editorSelected(URL editorLocation) {
        customizeEditorPopupMenu();
        TopicHolder.changedEditorStatus.postMessage(VersionHistoryUpdater.checkVersionHistory(editorLocation));
    }

    @Override
    public void editorActivated(URL editorLocation) {
        customizeEditorPopupMenu();
        TopicHolder.changedEditorStatus.postMessage(VersionHistoryUpdater.checkVersionHistory(editorLocation));
    }

    @Override
    public void editorClosed(URL editorLocation) {
        if (editorLocation.toString().startsWith(ArgonConst.ARGON)) {
            try (Connection connection = BaseXConnectionWrapper.getConnection()) {
                BaseXSource source = CustomProtocolURLUtils.sourceFromURL(editorLocation);
                String path = CustomProtocolURLUtils.pathFromURL(editorLocation);
                if (connection.lockedByUser(source, path) && !ArgonEditorsWatchMap.getInstance().askedForCheckIn(editorLocation)) {

                    int checkInFile = booleanDialog(pluginWorkspaceAccess,
                            "Closed checked out file",
                            "You just closed a checked out file. Do you want to check it in?",
                            "Yes", 0,
                            "No", 1, 0);
                    if (checkInFile == 0) {
                        connection.unlock(source, path);
                    }

                }
            } catch (IOException ioe) {
                logger.debug(ioe.getMessage());
            }
            ArgonEditorsWatchMap.getInstance().removeURL(editorLocation);
        }
    }

    private void customizeEditorPopupMenu() {
        WSEditor editorAccess = pluginWorkspaceAccess.getCurrentEditorAccess(StandalonePluginWorkspace.DITA_MAPS_EDITING_AREA);
        if (editorAccess != null) {
            if (EditorPageConstants.PAGE_DITA_MAP.equals(editorAccess.getCurrentPageID())) {
                WSDITAMapEditorPage currentCustomizedDitaPageAccess;
                currentCustomizedDitaPageAccess = (WSDITAMapEditorPage) editorAccess.getCurrentPage();
                currentCustomizedDitaPageAccess.setPopUpMenuCustomizer(new ArgonDitaPopupMenuCustomizer(currentCustomizedDitaPageAccess));
            }
        }
    }

    private JMenuItem createCheckOutEditorPopUpAddition(String urlString) {
        return new JMenuItem(new CheckOutAction(Lang.get(Lang.Keys.cm_checkout), ImageUtils.getIcon(ImageUtils.UNLOCK), urlString));
    }

    private JMenuItem createCheckInEditorPopUpAddition(String urlString) {
        return new JMenuItem(new CheckInAction(Lang.get(Lang.Keys.cm_checkin), ImageUtils.getIcon(ImageUtils.BASEX_LOCKED), urlString));
    }

    private static String getAbsoluteURLString(String baseURL, String refName) throws IllegalArgumentException {
        String[] baseComponents = baseURL.split(":|/");
        String[] refComponents = refName.split("/");
        int refUp = 0;
        for (String refComponent : refComponents) {
            if (refComponent.equals("..")) {
                refUp++;
            }
        }
        if (refUp > (baseComponents.length - 2)) {
            throw new IllegalArgumentException("Cannot resolve DITAMap link URL.");
        }
        StringBuilder absoluteURL = (new StringBuilder(baseComponents[0])).append(":");
        for (int i = 1; i < baseComponents.length - 1 - refUp; i++) {
            absoluteURL.append(baseComponents[i]).append("/");
        }
        for (int i = refUp; i < refComponents.length; i++) {
            absoluteURL.append(refComponents[i]);
            if (i < (refComponents.length - 1)) {
                absoluteURL.append("/");
            }
        }
        return absoluteURL.toString();
    }

    private class ArgonDitaPopupMenuCustomizer implements DITAMapPopupMenuCustomizer {

        private final WSDITAMapEditorPage ditaMapEditorPage;

        ArgonDitaPopupMenuCustomizer(WSDITAMapEditorPage editorPage) {
            ditaMapEditorPage = editorPage;
        }

        @Override
        public void customizePopUpMenu(Object popUp, AuthorDocumentController authorDocumentController) {
            AuthorNode[] nodes = ditaMapEditorPage.getSelectedNodes(true);
            if (nodes.length > 0) {
                AuthorNode selectedNode = nodes[0];
                if (selectedNode instanceof AuthorElement) {
                    AttrValue attrValue = ((AuthorElement) selectedNode).getAttribute("href");
                    if (attrValue != null) {
                        String baseUrl = selectedNode.getXMLBaseURL().toString();
                        String refName = attrValue.getRawValue();
                        if (baseUrl.startsWith("argon") &&
                                (!refName.contains(":") || (refName.contains(":") && refName.startsWith("argon")))) {
                            try {
                                String urlString = getAbsoluteURLString(baseUrl, refName);
                                JMenuItem checkOutMenuItem = createCheckOutEditorPopUpAddition(urlString);
                                ((JPopupMenu) popUp).add(checkOutMenuItem, 0);

                                JMenuItem checkInMenuItem = createCheckInEditorPopUpAddition(urlString);
                                ((JPopupMenu) popUp).add(checkInMenuItem, 1);
                            } catch (IllegalArgumentException iae) {
                                logger.debug("Cannot resolve DITAMap link URL.");
                            }
                        }
                    }
                }
            }
        }
    }
}


text:
using ArmyOfCreatures.Logic;
using ArmyOfCreatures.Logic.Creatures;
using NUnit.Framework;
using System;

namespace ArmyOfCreatures.Tests.Logic.CreaturesFactoryTests
{
    [TestFixture]
    public class CreaturesFactory_Should
    {
        [TestCase("Angel")]
        [TestCase("Archangel")]
        [TestCase("ArchDevil")]
        [TestCase("Behemoth")]
        [TestCase("Devil")]
        public void ReturnValidCreature_WhenValidNameIsPassed(string name)
        {
            // Arrange
            var factory = new CreaturesFactory();

            // Act
            var creature = factory.CreateCreature(name);

            // Assert
            Assert.AreEqual(name, creature.GetType().Name);
        }

        [Test]
        public void ThrowArgumentException_WhenInvalidNameIsPassed()
        {
            // Arrange
            var factory = new CreaturesFactory();

            // Act
            var creature =

            // Assert
            Assert.Throws<ArgumentException>(() => factory.CreateCreature("Gosho"));
        }
    }
}


text:
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Microsoft.Win32;
using System.Windows.Threading;

namespace VTreeViewTest
{
    /// <summary>
    /// Interaction logic for Window1.xaml
    /// </summary>
    public partial class Window1 : Window
    {
        public Window1()
        {
            InitializeComponent();
            this.Loaded += new RoutedEventHandler(Window1_Loaded);
        }

        void Window1_Loaded(object sender, RoutedEventArgs e)
        {

            RandomTreeNode root = new RandomTreeNode() { Name = "Root" };
            //KeyTreeNode root = new KeyTreeNode() { Key = Registry.CurrentUser };

            //myTreeView.ItemsSource = root.Children;
            myVTreeView.Data.AddRootItems(root.Children);

            #region Comparison Code
            DT = new DispatcherTimer();
            DT.Interval = new TimeSpan(0, 0, 2);
            DT.Tick += new EventHandler(DT_Tick);
            DT.Start();
            #endregion
        }

        #region Comparison Code
        DispatcherTimer DT;
        void DT_Tick(object sender, EventArgs e)
        {
            TB1.Text = "TreeView: " + GetVisualCount(myTreeView).ToString() + " (Visuals)";
            TB2.Text = "VTreeView:  " + GetVisualCount(myVTreeView).ToString() + " (Visuals)";

        }
        private static int GetVisualCount(DependencyObject visual)
        {
            int visualCount = 1;
            int childCount = VisualTreeHelper.GetChildrenCount(visual);

            for (int i = 0; i < childCount; i++)
            {
                DependencyObject childVisual = VisualTreeHelper.GetChild(visual, i);
                visualCount += GetVisualCount(childVisual);
            }

            return visualCount;
        }
        #endregion
    }
}


text:
//
// This file is part of - WebExtras
// Copyright (C) 2016 Mihir Mone
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

using System;

namespace WebExtras.Nancy.Http
{
  /// <summary>
  ///   An abstract Nancy route
  /// </summary>
  [AttributeUsage(AttributeTargets.Method)]
  public abstract class AbstractRouteAttribute : Attribute
  {
    /// <summary>
    ///   Route path
    /// </summary>
    public string RoutePath { get; private set; }

    /// <summary>
    ///   HTTP request type
    /// </summary>
    public EHttpRoute RequestType { get; private set; }

    /// <summary>
    ///   Constructor
    /// </summary>
    /// <param name="routePath">Route path</param>
    /// <param name="requestType">Request type</param>
    protected AbstractRouteAttribute(string routePath, EHttpRoute requestType)
    {
      RoutePath = routePath;
      RequestType = requestType;
    }
  }
}


text:
package com.intellij.ide.scratch;

import com.intellij.openapi.fileTypes.LanguageFileType;
import com.intellij.openapi.fileTypes.PlainTextFileType;
import com.intellij.openapi.fileTypes.PlainTextLanguage;
import com.intellij.openapi.fileTypes.ex.FileTypeIdentifiableByVirtualFile;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.openapi.vfs.newvfs.impl.FakeVirtualFile;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import javax.swing.*;

/**
 * @author gregsh
 */
public class ScratchFileType extends LanguageFileType implements FileTypeIdentifiableByVirtualFile {

  public static final LanguageFileType INSTANCE = new ScratchFileType();

  ScratchFileType() {
    super(PlainTextLanguage.INSTANCE);
  }

  @Override
  public boolean isMyFileType(@NotNull VirtualFile file) {
    return ScratchFileService.isInScratchRoot(file instanceof FakeVirtualFile ? file.getParent() : file);
  }

  @NotNull
  @Override
  public String getName() {
    return "Scratch";
  }

  @NotNull
  @Override
  public String getDescription() {
    return "Scratch";
  }

  @NotNull
  @Override
  public String getDefaultExtension() {
    return "";
  }

  @Nullable
  @Override
  public Icon getIcon() {
    return PlainTextFileType.INSTANCE.getIcon();
  }

  @Override
  public boolean isReadOnly() {
    return true;
  }

  @Nullable
  @Override
  public String getCharset(@NotNull VirtualFile file, @NotNull byte[] content) {
    return null;
  }
}


text:
// Copyright (c) 2017-2022 The Dash Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#include <evo/cbtx.h>
#include <evo/deterministicmns.h>
#include <llmq/blockprocessor.h>
#include <llmq/commitment.h>
#include <llmq/utils.h>
#include <evo/simplifiedmns.h>
#include <evo/specialtx.h>
#include <consensus/validation.h>

#include <chain.h>
#include <chainparams.h>
#include <consensus/merkle.h>

bool CheckCbTx(const CTransaction& tx, const CBlockIndex* pindexPrev, CValidationState& state)
{
    if (tx.nType != TRANSACTION_COINBASE) {
        return state.Invalid(ValidationInvalidReason::CONSENSUS, false, REJECT_INVALID, "bad-cbtx-type");
    }

    if (!tx.IsCoinBase()) {
        return state.Invalid(ValidationInvalidReason::CONSENSUS, false, REJECT_INVALID, "bad-cbtx-invalid");
    }

    CCbTx cbTx;
    if (!GetTxPayload(tx, cbTx)) {
        return state.Invalid(ValidationInvalidReason::CONSENSUS, false, REJECT_INVALID, "bad-cbtx-payload");
    }

    if (cbTx.nVersion == 0 || cbTx.nVersion > CCbTx::CURRENT_VERSION) {
        return state.Invalid(ValidationInvalidReason::CONSENSUS, false, REJECT_INVALID, "bad-cbtx-version");
    }

    if (pindexPrev && pindexPrev->nHeight + 1 != cbTx.nHeight) {
        return state.Invalid(ValidationInvalidReason::CONSENSUS, false, REJECT_INVALID, "bad-cbtx-height");
    }

    if (pindexPrev) {
        bool fDIP0008Active = pindexPrev->nHeight >= Params().GetConsensus().DIP0008Height;
        if (fDIP0008Active && cbTx.nVersion < 2) {
            return state.Invalid(ValidationInvalidReason::CONSENSUS, false, REJECT_INVALID, "bad-cbtx-version");
        }
    }

    return true;
}

// This can only be done after the block has been fully processed, as otherwise we won't have the finished MN list
bool CheckCbTxMerkleRoots(const CBlock& block, const CBlockIndex* pindex, CValidationState& state, const CCoinsViewCache& view)
{
    if (block.vtx[0]->nType != TRANSACTION_COINBASE) {
        return true;
    }

    static int64_t nTimePayload = 0;

    int64_t nTime1 = GetTimeMicros();

    CCbTx cbTx;
    if (!GetTxPayload(*block.vtx[0], cbTx)) {
        return state.Invalid(ValidationInvalidReason::CONSENSUS, false, REJECT_INVALID, "bad-cbtx-payload");
    }

    int64_t nTime2 = GetTimeMicros(); nTimePayload += nTime2 - nTime1;
    LogPrint(BCLog::BENCHMARK, "          - GetTxPayload: %.2fms [%.2fs]\n", 0.001 * (nTime2 - nTime1), nTimePayload * 0.000001);

    if (pindex) {
        static int64_t nTimeMerkleMNL = 0;
        static int64_t nTimeMerkleQuorum = 0;

        uint256 calculatedMerkleRoot;
        if (!CalcCbTxMerkleRootMNList(block, pindex->pprev, calculatedMerkleRoot, state, view)) {
            // pass the state returned by the function above
            return false;
        }
        if (calculatedMerkleRoot != cbTx.merkleRootMNList) {
            return state.Invalid(ValidationInvalidReason::CONSENSUS, false, REJECT_INVALID, "bad-cbtx-mnmerkleroot");
        }

        int64_t nTime3 = GetTimeMicros(); nTimeMerkleMNL += nTime3 - nTime2;
        LogPrint(BCLog::BENCHMARK, "          - CalcCbTxMerkleRootMNList: %.2fms [%.2fs]\n", 0.001 * (nTime3 - nTime2), nTimeMerkleMNL * 0.000001);

        if (cbTx.nVersion >= 2) {
            if (!CalcCbTxMerkleRootQuorums(block, pindex->pprev, calculatedMerkleRoot, state)) {
                // pass the state returned by the function above
                return false;
            }
            if (calculatedMerkleRoot != cbTx.merkleRootQuorums) {
                return state.Invalid(ValidationInvalidReason::CONSENSUS, false, REJECT_INVALID, "bad-cbtx-quorummerkleroot");
            }
        }

        int64_t nTime4 = GetTimeMicros(); nTimeMerkleQuorum += nTime4 - nTime3;
        LogPrint(BCLog::BENCHMARK, "          - CalcCbTxMerkleRootQuorums: %.2fms [%.2fs]\n", 0.001 * (nTime4 - nTime3), nTimeMerkleQuorum * 0.000001);

    }

    return true;
}

bool CalcCbTxMerkleRootMNList(const CBlock& block, const CBlockIndex* pindexPrev, uint256& merkleRootRet, CValidationState& state, const CCoinsViewCache& view)
{
    LOCK(deterministicMNManager->cs);

    try {
        static int64_t nTimeDMN = 0;
        static int64_t nTimeSMNL = 0;
        static int64_t nTimeMerkle = 0;

        int64_t nTime1 = GetTimeMicros();

        CDeterministicMNList tmpMNList;
        if (!deterministicMNManager->BuildNewListFromBlock(block, pindexPrev, state, view, tmpMNList, false)) {
            // pass the state returned by the function above
            return false;
        }

        int64_t nTime2 = GetTimeMicros(); nTimeDMN += nTime2 - nTime1;
        LogPrint(BCLog::BENCHMARK, "            - BuildNewListFromBlock: %.2fms [%.2fs]\n", 0.001 * (nTime2 - nTime1), nTimeDMN * 0.000001);

        CSimplifiedMNList sml(tmpMNList);

        int64_t nTime3 = GetTimeMicros(); nTimeSMNL += nTime3 - nTime2;
        LogPrint(BCLog::BENCHMARK, "            - CSimplifiedMNList: %.2fms [%.2fs]\n", 0.001 * (nTime3 - nTime2), nTimeSMNL * 0.000001);

        static CSimplifiedMNList smlCached;
        static uint256 merkleRootCached;
        static bool mutatedCached{false};

        if (sml == smlCached) {
            merkleRootRet = merkleRootCached;
            if (mutatedCached) {
                return state.Invalid(ValidationInvalidReason::CONSENSUS, false, REJECT_INVALID, "mutated-cached-calc-cb-mnmerkleroot");
            }
            return true;
        }

        bool mutated = false;
        merkleRootRet = sml.CalcMerkleRoot(&mutated);

        int64_t nTime4 = GetTimeMicros(); nTimeMerkle += nTime4 - nTime3;
        LogPrint(BCLog::BENCHMARK, "            - CalcMerkleRoot: %.2fms [%.2fs]\n", 0.001 * (nTime4 - nTime3), nTimeMerkle * 0.000001);

        smlCached = std::move(sml);
        merkleRootCached = merkleRootRet;
        mutatedCached = mutated;

        if (mutated) {
            return state.Invalid(ValidationInvalidReason::CONSENSUS, false, REJECT_INVALID, "mutated-calc-cb-mnmerkleroot");
        }

        return true;
    } catch (const std::exception& e) {
        LogPrintf("%s -- failed: %s\n", __func__, e.what());
        return state.Invalid(ValidationInvalidReason::CONSENSUS, false, REJECT_INVALID, "failed-calc-cb-mnmerkleroot");
    }
}

using QcHashMap = std::map<Consensus::LLMQType, std::vector<uint256>>;
using QcIndexedHashMap = std::map<Consensus::LLMQType, std::map<int16_t, uint256>>;

/**
 * Handles the calculation or caching of qcHashes and qcIndexedHashes
 * @param pindexPrev The const CBlockIndex* (ie a block) of a block. Both the Quorum list and quorum rotation actiavtion status will be retrieved based on this block.
 * @return nullopt if quorumCommitment was unable to be found, otherwise returns the qcHashes and qcIndexedHashes that were calculated or cached
 */
auto CachedGetQcHashesQcIndexedHashes(const CBlockIndex* pindexPrev) ->
        std::optional<std::pair<QcHashMap /*qcHashes*/, QcIndexedHashMap /*qcIndexedHashes*/>> {
    auto quorums = llmq::quorumBlockProcessor->GetMinedAndActiveCommitmentsUntilBlock(pindexPrev);

    static CCriticalSection cs_cache;
    static std::map<Consensus::LLMQType, std::vector<const CBlockIndex*>> quorums_cached GUARDED_BY(cs_cache);
    static QcHashMap qcHashes_cached GUARDED_BY(cs_cache);
    static QcIndexedHashMap qcIndexedHashes_cached GUARDED_BY(cs_cache);

    LOCK(cs_cache);

    if (quorums == quorums_cached) {
        return std::make_pair(qcHashes_cached, qcIndexedHashes_cached);
    }

    // Quorums set is different, reset cached values
    quorums_cached.clear();
    qcHashes_cached.clear();
    qcIndexedHashes_cached.clear();

    for (const auto& [llmqType, vecBlockIndexes] : quorums) {
        bool rotation_enabled = llmq::utils::IsQuorumRotationEnabled(llmqType, pindexPrev);
        auto& vec_hashes = qcHashes_cached[llmqType];
        vec_hashes.reserve(vecBlockIndexes.size());
        auto& map_indexed_hashes = qcIndexedHashes_cached[llmqType];
        for (const auto& blockIndex : vecBlockIndexes) {
            uint256 dummyHash;
            llmq::CFinalCommitmentPtr pqc = llmq::quorumBlockProcessor->GetMinedCommitment(llmqType, blockIndex->GetBlockHash(), dummyHash);
            if (pqc == nullptr) {
                // this should never happen
                return std::nullopt;
            }
            auto qcHash = ::SerializeHash(*pqc);
            if (rotation_enabled) {
                map_indexed_hashes[pqc->quorumIndex] = qcHash;
            } else {
                vec_hashes.emplace_back(qcHash);
            }
        }
    }
    quorums_cached = quorums;
    return std::make_pair(qcHashes_cached, qcIndexedHashes_cached);
}

auto CalcHashCountFromQCHashes(const QcHashMap& qcHashes)
{
    size_t hash_count{0};
    for (const auto& [_, vec_hashes] : qcHashes) {
        hash_count += vec_hashes.size();
    }
    return hash_count;
}

bool CalcCbTxMerkleRootQuorums(const CBlock& block, const CBlockIndex* pindexPrev, uint256& merkleRootRet, CValidationState& state)
{
    static int64_t nTimeMined = 0;
    static int64_t nTimeLoop = 0;
    static int64_t nTimeMerkle = 0;

    int64_t nTime1 = GetTimeMicros();

    auto retVal = CachedGetQcHashesQcIndexedHashes(pindexPrev);
    if (retVal == std::nullopt) {
        return state.Invalid(ValidationInvalidReason::CONSENSUS, false, REJECT_INVALID, "commitment-not-found");
    }
    // The returned quorums are in reversed order, so the most recent one is at index 0
    auto [qcHashes, qcIndexedHashes] = retVal.value();

    int64_t nTime2 = GetTimeMicros(); nTimeMined += nTime2 - nTime1;
    LogPrint(BCLog::BENCHMARK, "            - CachedGetQcHashesQcIndexedHashes: %.2fms [%.2fs]\n", 0.001 * (nTime2 - nTime1), nTimeMined * 0.000001);

    // now add the commitments from the current block, which are not returned by GetMinedAndActiveCommitmentsUntilBlock
    // due to the use of pindexPrev (we don't have the tip index here)
    for (size_t i = 1; i < block.vtx.size(); i++) {
        auto& tx = block.vtx[i];

        if (tx->nVersion == 3 && tx->nType == TRANSACTION_QUORUM_COMMITMENT) {
            llmq::CFinalCommitmentTxPayload qc;
            if (!GetTxPayload(*tx, qc)) {
                return state.Invalid(ValidationInvalidReason::CONSENSUS, false, REJECT_INVALID, "bad-qc-payload-calc-cbtx-quorummerkleroot");
            }
            if (qc.commitment.IsNull()) {
                // having null commitments is ok but we don't use them here, move to the next tx
                continue;
            }
            auto qcHash = ::SerializeHash(qc.commitment);
            if (llmq::utils::IsQuorumRotationEnabled(qc.commitment.llmqType, pindexPrev)) {
                auto& map_indexed_hashes = qcIndexedHashes[qc.commitment.llmqType];
                map_indexed_hashes[qc.commitment.quorumIndex] = qcHash;
            } else {
                const auto& llmq_params = llmq::GetLLMQParams(qc.commitment.llmqType);
                auto& vec_hashes = qcHashes[llmq_params.type];
                if (vec_hashes.size() == size_t(llmq_params.signingActiveQuorumCount)) {
                    // we pop the last entry, which is actually the oldest quorum as GetMinedAndActiveCommitmentsUntilBlock
                    // returned quorums in reversed order. This pop and later push can only work ONCE, but we rely on the
                    // fact that a block can only contain a single commitment for one LLMQ type
                    vec_hashes.pop_back();
                }
                vec_hashes.emplace_back(qcHash);
            }
        }
    }

    for (const auto& [llmqType, map_indexed_hashes] : qcIndexedHashes) {
        auto& vec_hashes = qcHashes[llmqType];
        for (const auto& [_, hash] : map_indexed_hashes) {
            vec_hashes.emplace_back(hash);
        }
    }

    std::vector<uint256> vec_hashes_final;
    vec_hashes_final.reserve(CalcHashCountFromQCHashes(qcHashes));

    for (const auto& [llmqType, vec_hashes] : qcHashes) {
        const auto& llmq_params = llmq::GetLLMQParams(llmqType);
        if (vec_hashes.size() > size_t(llmq_params.signingActiveQuorumCount)) {
            return state.Invalid(ValidationInvalidReason::CONSENSUS, false, REJECT_INVALID, "excess-quorums-calc-cbtx-quorummerkleroot");
        }
        // Copy vec_hashes into vec_hashes_final
        std::copy(vec_hashes.begin(), vec_hashes.end(), std::back_inserter(vec_hashes_final));
    }
    std::sort(vec_hashes_final.begin(), vec_hashes_final.end());

    int64_t nTime3 = GetTimeMicros(); nTimeLoop += nTime3 - nTime2;
    LogPrint(BCLog::BENCHMARK, "            - Loop: %.2fms [%.2fs]\n", 0.001 * (nTime3 - nTime2), nTimeLoop * 0.000001);

    bool mutated = false;
    merkleRootRet = ComputeMerkleRoot(vec_hashes_final, &mutated);

    int64_t nTime4 = GetTimeMicros(); nTimeMerkle += nTime4 - nTime3;
    LogPrint(BCLog::BENCHMARK, "            - ComputeMerkleRoot: %.2fms [%.2fs]\n", 0.001 * (nTime4 - nTime3), nTimeMerkle * 0.000001);

    if (mutated) {
        return state.Invalid(ValidationInvalidReason::CONSENSUS, false, REJECT_INVALID, "mutated-calc-cbtx-quorummerkleroot");
    }

    return true;
}

std::string CCbTx::ToString() const
{
    return strprintf("CCbTx(nVersion=%d, nHeight=%d, merkleRootMNList=%s, merkleRootQuorums=%s)",
        nVersion, nHeight, merkleRootMNList.ToString(), merkleRootQuorums.ToString());
}


text:
package org.apache.poi.ss.usermodel;

/**
 * High level representation of spreadsheet drawing.
 */
public interface Drawing<T extends Shape> extends ShapeContainer<T> {
	/**
	 * Creates a picture.
	 * @param anchor       the client anchor describes how this picture is
	 *                     attached to the sheet.
	 * @param pictureIndex the index of the picture in the workbook collection
	 *                     of pictures.
	 *
	 * @return the newly created picture.
	 */
	Picture createPicture(ClientAnchor anchor, int pictureIndex);

	/**
	 * Creates a comment.
	 * @param anchor the client anchor describes how this comment is attached
	 *               to the sheet.
	 * @return the newly created comment.
	 */
	Comment createCellComment(ClientAnchor anchor);

	/**
	 * Creates a chart.
	 * @param anchor the client anchor describes how this chart is attached to
	 *               the sheet.
	 * @return the newly created chart
	 */
	Chart createChart(ClientAnchor anchor);

	/**
	 * Creates a new client anchor and sets the top-left and bottom-right
	 * coordinates of the anchor.
	 *
	 * @param dx1  the x coordinate in EMU within the first cell.
	 * @param dy1  the y coordinate in EMU within the first cell.
	 * @param dx2  the x coordinate in EMU within the second cell.
	 * @param dy2  the y coordinate in EMU within the second cell.
	 * @param col1 the column (0 based) of the first cell.
	 * @param row1 the row (0 based) of the first cell.
	 * @param col2 the column (0 based) of the second cell.
	 * @param row2 the row (0 based) of the second cell.
	 * @return the newly created client anchor
	 */
	ClientAnchor createAnchor(int dx1, int dy1, int dx2, int dy2, int col1, int row1, int col2, int row2);

    /**
     * Adds a new OLE Package Shape
     *
     * @param anchor       the client anchor describes how this picture is
     *                     attached to the sheet.
     * @param storageId    the storageId returned by {@link Workbook#addOlePackage(byte[], String, String, String)}
     * @param pictureIndex the index of the picture (used as preview image) in the
     *                     workbook collection of pictures.
     *
     * @return newly created shape
     */
    ObjectData createObjectData(ClientAnchor anchor, int storageId, int pictureIndex);
}