text:
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");

/*
 * Perform an FPU multiply (return x * y).
 */

#include <sys/types.h>

#include <machine/frame.h>
#include <machine/fp.h>

#include "fpu_arith.h"
#include "fpu_emu.h"
#include "fpu_extern.h"

/*
 * The multiplication algorithm for normal numbers is as follows:
 *
 * The fraction of the product is built in the usual stepwise fashion.
 * Each step consists of shifting the accumulator right one bit
 * (maintaining any guard bits) and, if the next bit in y is set,
 * adding the multiplicand (x) to the accumulator.  Then, in any case,
 * we advance one bit leftward in y.  Algorithmically:
 *
 *	A = 0;
 *	for (bit = 0; bit < FP_NMANT; bit++) {
 *		sticky |= A & 1, A >>= 1;
 *		if (Y & (1 << bit))
 *			A += X;
 *	}
 *
 * (X and Y here represent the mantissas of x and y respectively.)
 * The resultant accumulator (A) is the product's mantissa.  It may
 * be as large as 11.11111... in binary and hence may need to be
 * shifted right, but at most one bit.
 *
 * Since we do not have efficient multiword arithmetic, we code the
 * accumulator as four separate words, just like any other mantissa.
 * We use local `register' variables in the hope that this is faster
 * than memory.  We keep x->fp_mant in locals for the same reason.
 *
 * In the algorithm above, the bits in y are inspected one at a time.
 * We will pick them up 32 at a time and then deal with those 32, one
 * at a time.  Note, however, that we know several things about y:
 *
 *    - the guard and round bits at the bottom are sure to be zero;
 *
 *    - often many low bits are zero (y is often from a single or double
 *	precision source);
 *
 *    - bit FP_NMANT-1 is set, and FP_1*2 fits in a word.
 *
 * We can also test for 32-zero-bits swiftly.  In this case, the center
 * part of the loop---setting sticky, shifting A, and not adding---will
 * run 32 times without adding X to A.  We can do a 32-bit shift faster
 * by simply moving words.  Since zeros are common, we optimize this case.
 * Furthermore, since A is initially zero, we can omit the shift as well
 * until we reach a nonzero word.
 */
struct fpn *
__fpu_mul(fe)
	struct fpemu *fe;
{
	struct fpn *x = &fe->fe_f1, *y = &fe->fe_f2;
	u_int a3, a2, a1, a0, x3, x2, x1, x0, bit, m;
	int sticky;
	FPU_DECL_CARRY

	/*
	 * Put the `heavier' operand on the right (see fpu_emu.h).
	 * Then we will have one of the following cases, taken in the
	 * following order:
	 *
	 *  - y = NaN.  Implied: if only one is a signalling NaN, y is.
	 *	The result is y.
	 *  - y = Inf.  Implied: x != NaN (is 0, number, or Inf: the NaN
	 *    case was taken care of earlier).
	 *	If x = 0, the result is NaN.  Otherwise the result
	 *	is y, with its sign reversed if x is negative.
	 *  - x = 0.  Implied: y is 0 or number.
	 *	The result is 0 (with XORed sign as usual).
	 *  - other.  Implied: both x and y are numbers.
	 *	The result is x * y (XOR sign, multiply bits, add exponents).
	 */
	ORDER(x, y);
	if (ISNAN(y))
		return (y);
	if (ISINF(y)) {
		if (ISZERO(x))
			return (__fpu_newnan(fe));
		y->fp_sign ^= x->fp_sign;
		return (y);
	}
	if (ISZERO(x)) {
		x->fp_sign ^= y->fp_sign;
		return (x);
	}

	/*
	 * Setup.  In the code below, the mask `m' will hold the current
	 * mantissa byte from y.  The variable `bit' denotes the bit
	 * within m.  We also define some macros to deal with everything.
	 */
	x3 = x->fp_mant[3];
	x2 = x->fp_mant[2];
	x1 = x->fp_mant[1];
	x0 = x->fp_mant[0];
	sticky = a3 = a2 = a1 = a0 = 0;

#define	ADD	/* A += X */ \
	FPU_ADDS(a3, a3, x3); \
	FPU_ADDCS(a2, a2, x2); \
	FPU_ADDCS(a1, a1, x1); \
	FPU_ADDC(a0, a0, x0)

#define	SHR1	/* A >>= 1, with sticky */ \
	sticky |= a3 & 1, a3 = (a3 >> 1) | (a2 << 31), \
	a2 = (a2 >> 1) | (a1 << 31), a1 = (a1 >> 1) | (a0 << 31), a0 >>= 1

#define	SHR32	/* A >>= 32, with sticky */ \
	sticky |= a3, a3 = a2, a2 = a1, a1 = a0, a0 = 0

#define	STEP	/* each 1-bit step of the multiplication */ \
	SHR1; if (bit & m) { ADD; }; bit <<= 1

	/*
	 * We are ready to begin.  The multiply loop runs once for each
	 * of the four 32-bit words.  Some words, however, are special.
	 * As noted above, the low order bits of Y are often zero.  Even
	 * if not, the first loop can certainly skip the guard bits.
	 * The last word of y has its highest 1-bit in position FP_NMANT-1,
	 * so we stop the loop when we move past that bit.
	 */
	if ((m = y->fp_mant[3]) == 0) {
		/* SHR32; */			/* unneeded since A==0 */
	} else {
		bit = 1 << FP_NG;
		do {
			STEP;
		} while (bit != 0);
	}
	if ((m = y->fp_mant[2]) == 0) {
		SHR32;
	} else {
		bit = 1;
		do {
			STEP;
		} while (bit != 0);
	}
	if ((m = y->fp_mant[1]) == 0) {
		SHR32;
	} else {
		bit = 1;
		do {
			STEP;
		} while (bit != 0);
	}
	m = y->fp_mant[0];		/* definitely != 0 */
	bit = 1;
	do {
		STEP;
	} while (bit <= m);

	/*
	 * Done with mantissa calculation.  Get exponent and handle
	 * 11.111...1 case, then put result in place.  We reuse x since
	 * it already has the right class (FP_NUM).
	 */
	m = x->fp_exp + y->fp_exp;
	if (a0 >= FP_2) {
		SHR1;
		m++;
	}
	x->fp_sign ^= y->fp_sign;
	x->fp_exp = m;
	x->fp_sticky = sticky;
	x->fp_mant[3] = a3;
	x->fp_mant[2] = a2;
	x->fp_mant[1] = a1;
	x->fp_mant[0] = a0;
	return (x);
}


text:
Catalyst was an experimental opinionated wrapper around the Angular testing API
with the aim of reducing number of decisions and boilerplate while writing
tests.

**This is an experimental API and is not an officially supported product of
Google or Angular. Do not use.**

This was only an experiment which the Angular team ultimately decided not to
move forward with. The code is published here for historical purposes, though it
lacks some of the infrastructure it relied on to function internally and doesn't
work out of the box in this context.

Three challenges to address to get this to work:
1.  Catalyst relies on `@angular/http` which has been replaced by
    `@angular/common/http`. Existing `@angular/http` usage would need to be
    migrated.
1.  Catalyst used
    [`goog.module()`](https://google.github.io/closure-library/api/goog.module.html)
    internally, but Jasmine doesn't support that normally meaning we need to use
    CommonJS or ESM. Angular v13+ only supports ESM, but this version of Jasmine
    appears to be too old to use ESM and will likely need to be upgraded.
1.  Catalyst itself doesn't really require the Angular compiler to be built, but
    the components it tests do need to be AOT compiled with the Angular CLI or
    `@angular/compiler-cli`. For real Angular code, this is probably already the
    case, but this repository does not run the Angular compiler and tests in
    here likely won't work as is.

Catalyst tests are synchronous (when not using `it.async`) and asserted to be
so. Catalyst uses a fakeAsync Zone to capture all async tasks within Angular and
resolve them synchronously. This makes the test easier to write, read and debug.

It also automatically runs change detection synchronously whenever an event
handler is fired. This reduces boilerplate around having to manually trigger
change detection in tests.

If you are using Catalyst, your tests should not use any imports from
`@angular/core/testing`

## API

-   `describe`, `it`, `beforeEach`, `afterEach`, `beforeAll`, `afterAll`
    -   Catalyst wrappers to Jasmine that asserts everything is synchronous
-   `describe.only`, `it.only`
    -   Convenience shorthand for `fdescribe` and `fit`, respectively
-   `describe.skip`, `it.skip`
    -   Convenience shorthand for `xdescribe` and `xit`, respectively
-   `setupModule`
    -   To setup the testing module
-   `bootstrap`, `bootstrapTemplate`
    -   To synchronously bootstrap from a Component or from a dynamic template
        string (No more async compileComponents())
-   `getEl`, `getEls`, `hasEl`
    -   Locate HTML element(s) using querySelector/querySelectorAll in the DOM
-   `getDebugEl`, `getDebugEls`, `hasDebugEl`
    -   Locate DebugElement by Directive or Component type
-   `tick`
    -   Advance timer queue by the specified amount and reflect any pending
        state change to DOM
-   `describeWithDate`
    -   Mocks `Date.now()`, `jasmine.clock()` and `goog.now` inside of describe
        block. `tick` will also move time as seen by all of the above methods.
        Only works when used instead of the top level `describe` in the file
        (b/150296894).
-   `flush`, `markForCheckAndFlush`
    -   Flush all pending non-periodic timers and promises and reflects any
        pending state change to DOM
    -   `markForCheckAndFlush` performs `flush` for components with OnPush
        change detection strategy. This is only necessary when modifying
        properties directly on OnPush components within your test.
        Alternatively, you may consider using bootstrapTemplate(), updating the
        context, and/or calling flush().
-   `get`
    -   Inject an object by token
-   `trigger`
    -   Trigger an event on a HTMLElement
-   `now`
    -   Run async tasks synchronously and reflects any pending state change to
        the DOM.
-   `destroyTestComponent`
    -   Destroys the root test component and all of its children. This will
        `ngOnDestroy` to be called in all components.

## Managing State Change

Any DOM events triggered in the test automatically resolve all pending promises
and run Angular change detection synchronously.

So if you did something like

```typescript
getEl('p').click();
// DOM updated with state change caused by the click handler even if it's async
```

In your test you no longer have to call the right combination of whenStable,
detectChanges. It gets done for you automatically and synchronously (using Zone
interception of event handler invocation).

If you don't trigger a state change through an event handler, you can manually
force a change detection using `flush`. `flush` recursively flushes all pending
async tasks(scheduled by Promise-s and setTimeout-s) and then runs change
detection at the end. In that way it flushes all pending tasks and state changes
and the test is at a stable state at the end of it.

```typescript
componentInstance.myProperty = 10;
flush();
// DOM updated with myProperty in component set to 10.
```

Catalyst doesn't allow any async tasks to be scheduled directly in the test. To
run an async task you can wrap it with `now()` to run the task synchronously.
Any changes to the component state is automatically reflected in the DOM.

```typescript
now(() => componentInstance.asyncTask());

// At this point asyncTask has been run synchronously and any state change will
// be reflected in DOM.
```

When changing element values, a `trigger` is required to update any ngForm
component values and validity:

```typescript
const input = getEl<HTMLInputElement>('input.template-name-input');
input.value = value;     // HTML is updated, ngForm.value is still not updated
trigger(input, 'input'); // ngForm.value/ngForm.valid is updated
```

## Managing Timer Queue

The event queue can either be moved ahead by a specified time interval using
`tick(INTERVAL)` or all pending timers can be recursively triggered using
`flush()`.

The former is useful for precise control of time in your unit test while the
latter can be used to trigger any pending timers in an external component that
your component under test is using(and you don't want your test to be tied to
exact timeout values).

When inside `describeWithDate` block, `tick` and `flush` also advance the mock
Date through Jasmine's Date mocking facility. `Date.now()` is properly advanced
as per the elapsed time in the test scheduler of Catalyst. Catalyst
automatically installs and uninstalls the Jasmine mock Date before and after
each test respectively. This is useful for testing code that reschedules tasks
depending on the currently elapsed time.

In addition Catalyst monkey patches the RxJS scheduler to use the Jasmine mock
Date so that the default async scheduler of RxJS is in sync with the test
scheduler of Catalyst. This is needed to make RxJS operators like `delay`,
`debounce` etc. to work as expected with `tick` and `flush`.

## XHR calls / HTTP testing

If the code under test makes any XHR calls you will need to mock the HTTP
backend.

```typescript
import {HttpClientTestingModule, HttpTestingController} from '@angular/common/http/testing';
import {NoopAnimationsModule} from '@angular/platform-browser/animations';

let mockHttp: HttpTestingController;

beforeEach(() => {
  setupModule({
    imports: [
      AppModule,
      HttpClientTestingModule,
      NoopAnimationsModule,
    ],
  });

  // bootstrap your component ...

  mockHttp = get(HttpTestingController);
});

afterEach(() => {
  mockHttp.verify();
});

it('my test', () => {
  // your test ...
});
```

Note that you won't be able to use `mockHttp` to respond to any HTTP requests
until the code under test has created the HTTP request. If your component does
HTTP logic inside its constructor or `ngOnInit`, you can immediately use
`mockHttp` after `get`, as the constructor and `ngOnInit` immediately run after
you call `bootstrap`/`bootstrapTemplate`. A code example follows for all other
scenarios.

```typescript
import {asyncMatchers} from '@angular/catalyst';
import {lastValueFrom} from 'rxjs';
import {shareReplay} from 'rxjs/operators';

// beforeEach/afterEach from above

beforeEach(() => {
  // another beforeEach to enable toEmit matcher
  jasmine.addMatchers(asyncMatchers);
});

it('service calls http', () => {
  const output = myService.myObservableMethod('param')
      .pipe(shareReplay({bufferSize: 1, refCount: true}));

  // Subscribe to the observable but don't await it. It will now be stuck
  // waiting on an HTTP response. Using `firstValueFrom()` / `lastValueFrom()`
  // here unsubscribes automatically to avoid leaking test state.
  lastValueFrom(output);

  const request = mockHttp.expectOne('endpoint');
  expect(request.request.method).toBe('POST');
  request.flush('http response');

  expect(output).toEmit('http response');
});
```

WARNING: If you find the test doesn't work with `lastValueFrom`, try
`firstValueFrom`. If that also fails, then instead of `lastValueFrom(output)`,
you can use `output.subscribe()` to also trigger the observable, but will then
need to manually call `.unsubscribe()` when you are done with the result.

For more on mocking and testing XHR calls see
https://angular.io/guide/http#testing-http-requests.

## Angular Harnesses

Many Angular Material components provide
[harnesses](https://material.angular.io/cdk/test-harnesses/overview) to ease
testing code that calls them.

## Async Matchers

Catalyst provides jasmine matchers to simplify testing of async code.

```typescript
import {beforeAll, it, asyncMatchers} from '@angular/catalyst';

beforeAll(() => {
  jasmine.addMatchers(asyncMatchers);
});

...
// For Observables:
expect(service.someAsyncCall()).toEmit(expectedResponse);
expect(service.someAsyncCallWithError()).toEmitError(expectedErrorResponse);
expect(service.someAsyncCallWithMultipleResults()).toEmitSequence([response1, response2]);
// Same as above without respect to ordering
expect(service.someAsyncCallWithMultipleResults())
    .toEmitSequence(jasmine.arrayWithExactContents([response2, response1]));
// Only checks partial results
expect(service.someAsyncCallWithManyResults()).toEmitSequence(jasmine.arrayContaining([response1]));
expect(service.someAsyncCallWithNoValue()).toHaveNeverEmitted();
expect(service.someAsyncCallWithNoValue()).toHaveEmitted();

// For Promises:
expect(service.someAsyncCall()).toResolveWith(expectedResponse);
expect(service.someAsyncCall()).toRejectWith(expectedRejectionValue);
expect(service.someAsyncCall()).toRejectWithError(expectedErrorMessageOrRegExp);

```

### Matching hot observables

Catalyst's async matchers essentially subscribe to the observable and collect
all values that are emitted immediately on subscription. They won't work
properly with
["hot" observables](https://medium.com/@benlesh/hot-vs-cold-observables-f8094ed53339)
(including Angular's `EventEmitter`). This is because "hot" observables emit
immediately, not on subscription, so by the time that the async matcher has
subscribed in the `expect().toEmit()` line the emissions have already occurred
and the matcher doesn't see any further emissions.

The fix is to use a `ReplaySubject` - or, more conveniently, an operator like
`shareReplay()` that uses a `ReplaySubject` under the hood - to save the
emissions and then check them later.

```typescript
import {firstValueFrom} from 'rxjs';
import {shareReplay} from 'rxjs/operators';

...
const obs = service.hotObservable.pipe(shareReplay());

// Subscribe to the observable but don't await it. It will now be stuck
// waiting for emissions. Using `firstValueFrom()` / `lastValueFrom()` here
// unsubscribes automatically to avoid leaking test state.
firstValueFrom(obs);

service.doThingThatTriggersEmissions();
expect(obs).toEmit(expectedEmissions);
```

WARNING: If you find the test doesn't work with `firstValueFrom`, try
`lastValueFrom`. If that also fails, then instead of `firstValueFrom(output)`,
you can use `output.subscribe()` to also trigger the observable, but will then
need to manually call `.unsubscribe()` when you are done with the result.

## Necessarily asynchronous tests

In some cases, such as screen diffing tests, the test requires asynchronous
behavior. In this case `it.async(..., async () => { ... })` may be called.
`it.async.skip` and `it.async.only` functions are provided to skip or filter
tests when dealing with `it.async`. When setting up a `beforeEach` with
asynchronicity, use `beforeEach.async`.

## Animations

If the component you are testing uses material components, chances are they use
animatons, and the test needs to disable animations. This is also true if you
use harnesses, or if you receive the following error message.

```
Found the synthetic property @transitionMessages. Please include either "BrowserAnimationsModule" or "NoopAnimationsModule" in your application.
```

The easiest way to fix this is to import `NoopAnimationsModule` in your test. It
must be the last module imported, so it overrides any other transitively
imported modules related to animations.

```typescript
import {NoopAnimationsModule} from '@angular/platform-browser/animations';

beforeEach(() => {
  setupModule({
    imports: [
      AppModule,
      NoopAnimationsModule,
    ],
  });

  // bootstrap your component ...
});

it('my test', () => {
  // ...
});
```

redpajama_set_name: RedPajamaGithub


text:
package pe.asomapps.popularmovies.model;

import android.content.ContentValues;
import android.os.Parcel;
import android.os.Parcelable;

import pe.asomapps.popularmovies.model.data.VideoColumns;

/**
 * Created by Danihelsan
 */
public class Video implements Parcelable{
    private String id;
    private String key;
    private String name;
    private String site;

    public Video(){}

    protected Video(Parcel in) {
        id = in.readString();
        key = in.readString();
        name = in.readString();
        site = in.readString();
    }

    public static final Creator<Video> CREATOR = new Creator<Video>() {
        @Override
        public Video createFromParcel(Parcel in) {
            return new Video(in);
        }

        @Override
        public Video[] newArray(int size) {
            return new Video[size];
        }
    };

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSite() {
        return site;
    }

    public void setSite(String site) {
        this.site = site;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(id);
        dest.writeString(key);
        dest.writeString(name);
        dest.writeString(site);
    }

    public static ContentValues getContentValue(Video video, long movieId) {
        ContentValues videoVContentValues = new ContentValues();
        videoVContentValues.put(VideoColumns.VIDEO_ID, video.getId());
        videoVContentValues.put(VideoColumns.MOVIE_ID, movieId);
        videoVContentValues.put(VideoColumns.NAME, video.getName());
        videoVContentValues.put(VideoColumns.SITE, video.getSite());
        videoVContentValues.put(VideoColumns.KEY, video.getKey());

        return videoVContentValues;
    }

    public String getVideoPath() {
        if (site != null && key != null) {
            String url = site;
            if (site.equalsIgnoreCase("youtube")) {
                url = String.format("https://www.youtube.com/watch?v=%s", key);
            }
            return url;
        }
        return null;
    }
}


text:
namespace Maestro.Configuration
{
	public enum ServiceType
	{
		BaseType,
		Type
	}
}


text:
"""
"""

__revision__ = '0.1'

from unittest import TestCase

class simpleTest(TestCase):
    def setUp(self):
        pass

    def tearDown(self):
        pass

    def testExample(self):
        from gif_thumb import create_thumb
        import os
        for root, dirs, files in os.walk('test'):
            for file_name in files:
                path = os.path.join(root, file_name)
                thumbnail_path = os.path.join(root, file_name + '.jpg')
                create_thumb(path, thumbnail_path)
        self.assertEqual(1, 1)

    def testOther(self):
        self.assertNotEqual(0, 1)

if '__main__' == __name__:
    import unittest
    unittest.main()


text:
package com.tfsinc.ilabs.job;

import com.awesome.pro.executor.IThreadPool;
import com.awesome.pro.executor.ThreadPool;
import com.tfsinc.ilabs.references.CubeExtractorConfigReferences;

/**
 * Wrapper class for thread pool executor for cube extraction
 * making it available in a static context.
 * @author siddharth.s
 */
public class CubeExtractorJobExecutor {

	/**
	 * Thread pool executor.
	 */
	public static IThreadPool EXECUTOR = null;

	/**
	 * Initializes the thread pool executor.
	 */
	public static synchronized final void initialize() {
		EXECUTOR = new ThreadPool(
				CubeExtractorConfigReferences.FILE_THREAD_POOL_CONFIG);
		EXECUTOR.start();
	}

	/**
	 * Shuts down the thread pool executor.
	 */
	public static synchronized final void shutdown() {
		EXECUTOR.shutdown();
	}

	/**
	 * Waits for completion of all runnable jobs.
	 */
	public static synchronized final void waitForCompletion() {
		EXECUTOR.waitForCompletion();
	}

}


text:
eqEd.RightBracket = function(parent) {
	eqEd.Bracket.call(this, parent); // call super constructor.
	this.className = "eqEd.RightBracket";

    // Set up the desiredHeight calculation
    var desiredHeight = 0;
    this.properties.push(new Property(this, "desiredHeight", desiredHeight, {
        get: function() {
            return desiredHeight;
        },
        set: function(value) {
            desiredHeight = value;
        },
        compute: function() {
            var desiredHeightVal = 0;
            if (this.parent instanceof eqEd.BracketWrapper) {
                var sameBracketTypeCounter = 0;
                var matchingBracketIndex = null;
                var maxTopAlign = 0;
                var maxBottomAlign = 0;
                for (var i = (this.parent.index - 1); i >= 0; i--) {
                    var wrapper = this.parent.parent.wrappers[i];
                    if (wrapper instanceof eqEd.BracketWrapper) {
                        if (wrapper.bracket instanceof this.constructor) {
                            sameBracketTypeCounter++;
                        } else if (wrapper.bracket instanceof this.matchingBracketCtor
                                    && sameBracketTypeCounter === 0) {
                            matchingBracketIndex = i;
                            break;
                        } else if (wrapper.bracket instanceof this.matchingBracketCtor) {
                            sameBracketTypeCounter--;
                        }
                    } else {
                        maxTopAlign = (wrapper.topAlign > maxTopAlign) ? wrapper.topAlign : maxTopAlign;
                        maxBottomAlign = (wrapper.bottomAlign > maxBottomAlign) ? wrapper.bottomAlign : maxBottomAlign;
                    }
                }
                if (matchingBracketIndex !== null && !(maxTopAlign === 0 && maxBottomAlign === 0)) {
                    desiredHeightVal = (maxTopAlign > maxBottomAlign) ? 2 * maxTopAlign : 2 * maxBottomAlign;
                } else {
                    var fontHeight = this.equation.fontMetrics.height[this.parent.parent.fontSize];
                    desiredHeightVal = fontHeight;
                }
            } else if (this.parent instanceof eqEd.BracketPairWrapper) {
                if (this.parent.bracketContainer.wrappers.length > 0) {
                    var maxTopAlign = this.parent.bracketContainer.wrappers[this.parent.bracketContainer.maxTopAlignIndex].topAlign;
                    var maxBottomAlign = this.parent.bracketContainer.wrappers[this.parent.bracketContainer.maxBottomAlignIndex].bottomAlign;
                    desiredHeightVal = (maxTopAlign > maxBottomAlign) ? 2 * maxTopAlign : 2 * maxBottomAlign;
                }
            }
            return desiredHeightVal;
        },
        updateDom: function() {}
    }));
};
(function() {
    // subclass extends superclass
    eqEd.RightBracket.prototype = Object.create(eqEd.Bracket.prototype);
    eqEd.RightBracket.prototype.constructor = eqEd.RightBracket;
})();


text:
using Newtonsoft.Json;

namespace MiniCover.Core.Model
{
    public class InstrumentedBranch
    {
        public int HitId { get; set; }
        public bool External { get; set; }

        [JsonIgnore]
        public string Instruction { get; set; }
    }
}


text:
using namespace std;

namespace dai {

OpenNIUserTrackerInstance::OpenNIUserTrackerInstance()
    : StreamInstance(DataFrame::Depth | DataFrame::Mask | DataFrame::Skeleton | DataFrame::Metadata, 640, 480)
{
    m_device = nullptr;
}

OpenNIUserTrackerInstance::OpenNIUserTrackerInstance(OpenNIDevice* device)
    : StreamInstance(DataFrame::Depth | DataFrame::Mask | DataFrame::Skeleton | DataFrame::Metadata, 640, 480)
{
    m_device = device;
}

OpenNIUserTrackerInstance::~OpenNIUserTrackerInstance()
{
    closeInstance();
}

bool OpenNIUserTrackerInstance::is_open() const
{
    return m_device->is_open();
}

bool OpenNIUserTrackerInstance::openInstance()
{
    bool result = false;

    if (!is_open())
    {
        if (m_device == nullptr)
            m_device = OpenNIDevice::create("ANY_DEVICE");
        m_device->open();
        result = true;
    }

    return result;
}

void OpenNIUserTrackerInstance::closeInstance()
{
    if (is_open()) {
        m_device->close();
    }
}

void OpenNIUserTrackerInstance::restartInstance()
{
}

void OpenNIUserTrackerInstance::nextFrame(QHashDataFrames& output)
{
#ifndef __APPLE__
    Q_ASSERT(output.size() > 0);
    shared_ptr<DepthFrame> depthFrame = static_pointer_cast<DepthFrame>(output.value(DataFrame::Depth));
    shared_ptr<MaskFrame> maskFrame = static_pointer_cast<MaskFrame>(output.value(DataFrame::Mask));
    shared_ptr<SkeletonFrame> skeletonFrame = static_pointer_cast<SkeletonFrame>(output.value(DataFrame::Skeleton));
    shared_ptr<MetadataFrame> metadataFrame = static_pointer_cast<MetadataFrame>(output.value(DataFrame::Metadata));
    m_device->readUserTrackerFrame(depthFrame, maskFrame, skeletonFrame, metadataFrame);
#else
    Q_UNUSED(output);
#endif
}

} // End Namespace


text:
include(ExternalProject)
# Creat a target named "third_party", which can compile external dependencies on all platform(windows/linux/mac)

set(THIRD_PARTY_PATH
    "${CMAKE_BINARY_DIR}/third_party"
    CACHE STRING
          "A path setting third party libraries download & build directories.")
set(THIRD_PARTY_CACHE_PATH
    "${CMAKE_SOURCE_DIR}"
    CACHE STRING
          "A path cache third party source code to avoid repeated download.")

set(THIRD_PARTY_BUILD_TYPE Release)
set(third_party_deps)

include(ProcessorCount)
ProcessorCount(NPROC)

# cache funciton to avoid repeat download code of third_party.
# This function has 4 parameters, URL / REPOSITOR / TAG / DIR:
# 1. URL:           specify download url of 3rd party
# 2. REPOSITORY:    specify git REPOSITORY of 3rd party
# 3. TAG:           specify git tag/branch/commitID of 3rd party
# 4. DIR:           overwrite the original SOURCE_DIR when cache directory
#
# The function Return 1 PARENT_SCOPE variables:
#  - ${TARGET}_DOWNLOAD_CMD: Simply place "${TARGET}_DOWNLOAD_CMD" in ExternalProject_Add,
#                            and you no longer need to set any donwnload steps in ExternalProject_Add.
# For example:
#    Cache_third_party(${TARGET}
#            REPOSITORY ${TARGET_REPOSITORY}
#            TAG        ${TARGET_TAG}
#            DIR        ${TARGET_SOURCE_DIR})

function(cache_third_party TARGET)
  set(options "")
  set(oneValueArgs URL REPOSITORY TAG DIR)
  set(multiValueArgs "")
  cmake_parse_arguments(cache_third_party "${optionps}" "${oneValueArgs}"
                        "${multiValueArgs}" ${ARGN})

  string(REPLACE "extern_" "" TARGET_NAME ${TARGET})
  string(REGEX REPLACE "[0-9]+" "" TARGET_NAME ${TARGET_NAME})
  string(TOUPPER ${TARGET_NAME} TARGET_NAME)
  if(cache_third_party_REPOSITORY)
    set(${TARGET_NAME}_DOWNLOAD_CMD GIT_REPOSITORY
                                    ${cache_third_party_REPOSITORY})
    if(cache_third_party_TAG)
      list(APPEND ${TARGET_NAME}_DOWNLOAD_CMD GIT_TAG ${cache_third_party_TAG})
    endif()
  elseif(cache_third_party_URL)
    set(${TARGET_NAME}_DOWNLOAD_CMD URL ${cache_third_party_URL})
  else()
    message(
      FATAL_ERROR "Download link (Git repo or URL) must be specified for cache!"
    )
  endif()
  if(WITH_TP_CACHE)
    if(NOT cache_third_party_DIR)
      message(
        FATAL_ERROR
          "Please input the ${TARGET_NAME}_SOURCE_DIR for overwriting when -DWITH_TP_CACHE=ON"
      )
    endif()
    # Generate and verify cache dir for third_party source code
    set(cache_third_party_REPOSITORY ${cache_third_party_REPOSITORY}
                                     ${cache_third_party_URL})
    if(cache_third_party_REPOSITORY AND cache_third_party_TAG)
      string(MD5 HASH_REPO ${cache_third_party_REPOSITORY})
      string(MD5 HASH_GIT ${cache_third_party_TAG})
      string(SUBSTRING ${HASH_REPO} 0 8 HASH_REPO)
      string(SUBSTRING ${HASH_GIT} 0 8 HASH_GIT)
      string(CONCAT HASH ${HASH_REPO} ${HASH_GIT})
      # overwrite the original SOURCE_DIR when cache directory
      set(${cache_third_party_DIR}
          ${THIRD_PARTY_CACHE_PATH}/third_party/${TARGET}_${HASH})
    elseif(cache_third_party_REPOSITORY)
      string(MD5 HASH_REPO ${cache_third_party_REPOSITORY})
      string(SUBSTRING ${HASH_REPO} 0 16 HASH)
      # overwrite the original SOURCE_DIR when cache directory
      set(${cache_third_party_DIR}
          ${THIRD_PARTY_CACHE_PATH}/third_party/${TARGET}_${HASH})
    endif()

    if(EXISTS ${${cache_third_party_DIR}})
      # judge whether the cache dir is empty
      file(GLOB files ${${cache_third_party_DIR}}/*)
      list(LENGTH files files_len)
      if(files_len GREATER 0)
        list(APPEND ${TARGET_NAME}_DOWNLOAD_CMD DOWNLOAD_COMMAND "")
      endif()
    endif()
    set(${cache_third_party_DIR}
        ${${cache_third_party_DIR}}
        PARENT_SCOPE)
  endif()

  # Pass ${TARGET_NAME}_DOWNLOAD_CMD to parent scope, the double quotation marks can't be removed
  set(${TARGET_NAME}_DOWNLOAD_CMD
      "${${TARGET_NAME}_DOWNLOAD_CMD}"
      PARENT_SCOPE)
endfunction()

macro(UNSET_VAR VAR_NAME)
  unset(${VAR_NAME} CACHE)
  unset(${VAR_NAME})
endmacro()

# Funciton to Download the dependencies during compilation
# This function has 2 parameters, URL / DIRNAME:
# 1. URL:           The download url of 3rd dependencies
# 2. NAME:          The name of file, that determin the dirname
#
function(file_download_and_uncompress URL NAME)
  set(options "")
  set(oneValueArgs MD5)
  set(multiValueArgs "")
  cmake_parse_arguments(URL "${options}" "${oneValueArgs}" "${multiValueArgs}"
                        ${ARGN})
  message(STATUS "Download dependence[${NAME}] from ${URL}, MD5: ${URL_MD5}")
  set(${NAME}_INCLUDE_DIR
      ${THIRD_PARTY_PATH}/${NAME}/data
      PARENT_SCOPE)
  ExternalProject_Add(
    download_${NAME}
    ${EXTERNAL_PROJECT_LOG_ARGS}
    PREFIX ${THIRD_PARTY_PATH}/${NAME}
    URL ${URL}
    URL_MD5 ${URL_MD5}
    TIMEOUT 120
    DOWNLOAD_DIR ${THIRD_PARTY_PATH}/${NAME}/data/
    SOURCE_DIR ${THIRD_PARTY_PATH}/${NAME}/data/
    DOWNLOAD_NO_PROGRESS 1
    CONFIGURE_COMMAND ""
    BUILD_COMMAND ""
    UPDATE_COMMAND ""
    INSTALL_COMMAND "")
  set(third_party_deps
      ${third_party_deps} download_${NAME}
      PARENT_SCOPE)
endfunction()

# Correction of flags on different Platform(WIN/MAC) and Print Warning Message
if(APPLE)
  if(WITH_MKL)
    message(
      WARNING "Mac is not supported with MKL in Paddle yet. Force WITH_MKL=OFF."
    )
    set(WITH_MKL
        OFF
        CACHE STRING "Disable MKL for building on mac" FORCE)
  endif()
endif()

if(WIN32 OR APPLE)
  message(STATUS "Disable XBYAK in Windows and MacOS")
  set(WITH_XBYAK
      OFF
      CACHE STRING "Disable XBYAK in Windows and MacOS" FORCE)

  if(WITH_LIBXSMM)
    message(WARNING "Windows, Mac are not supported with libxsmm in Paddle yet."
                    "Force WITH_LIBXSMM=OFF")
    set(WITH_LIBXSMM
        OFF
        CACHE STRING "Disable LIBXSMM in Windows and MacOS" FORCE)
  endif()

  if(WITH_BOX_PS)
    message(WARNING "Windows or Mac is not supported with BOX_PS in Paddle yet."
                    "Force WITH_BOX_PS=OFF")
    set(WITH_BOX_PS
        OFF
        CACHE STRING "Disable BOX_PS package in Windows and MacOS" FORCE)
  endif()

  if(WITH_PSLIB)
    message(WARNING "Windows or Mac is not supported with PSLIB in Paddle yet."
                    "Force WITH_PSLIB=OFF")
    set(WITH_PSLIB
        OFF
        CACHE STRING "Disable PSLIB package in Windows and MacOS" FORCE)
  endif()

  if(WITH_ARM_BRPC)
    message(
      WARNING "Windows or Mac is not supported with ARM_BRPC in Paddle yet."
              "Force WITH_ARM_BRPC=OFF")
    set(WITH_ARM_BRPC
        OFF
        CACHE STRING "Disable ARM_BRPC package in Windows and MacOS" FORCE)
  endif()

  if(WITH_LIBMCT)
    message(WARNING "Windows or Mac is not supported with LIBMCT in Paddle yet."
                    "Force WITH_LIBMCT=OFF")
    set(WITH_LIBMCT
        OFF
        CACHE STRING "Disable LIBMCT package in Windows and MacOS" FORCE)
  endif()

  if(WITH_PSLIB_BRPC)
    message(
      WARNING "Windows or Mac is not supported with PSLIB_BRPC in Paddle yet."
              "Force WITH_PSLIB_BRPC=OFF")
    set(WITH_PSLIB_BRPC
        OFF
        CACHE STRING "Disable PSLIB_BRPC package in Windows and MacOS" FORCE)
  endif()
endif()

set(WITH_MKLML ${WITH_MKL})
if(NOT DEFINED WITH_MKLDNN)
  if(WITH_MKL AND AVX2_FOUND)
    set(WITH_MKLDNN ON)
  else()
    message(STATUS "Do not have AVX2 intrinsics and disabled MKL-DNN.")
    set(WITH_MKLDNN OFF)
  endif()
endif()

if(WIN32
   OR APPLE
   OR NOT WITH_GPU
   OR (ON_INFER AND NOT WITH_PYTHON))
  set(WITH_DGC OFF)
endif()

if(${CMAKE_VERSION} VERSION_GREATER "3.5.2")
  set(SHALLOW_CLONE "GIT_SHALLOW TRUE"
  )# adds --depth=1 arg to git clone of External_Projects
endif()

########################### include third_party according to flags ###############################
include(external/zlib) # download, build, install zlib
include(external/gflags) # download, build, install gflags
include(external/glog) # download, build, install glog
include(external/eigen) # download eigen3
include(external/threadpool) # download threadpool
include(external/dlpack) # download dlpack
include(external/xxhash) # download, build, install xxhash
include(external/warpctc) # download, build, install warpctc
include(external/utf8proc) # download, build, install utf8proc

list(APPEND third_party_deps extern_eigen3 extern_gflags extern_glog
     extern_xxhash)
list(
  APPEND
  third_party_deps
  extern_zlib
  extern_dlpack
  extern_warpctc
  extern_threadpool
  extern_utf8proc)
include(external/lapack) # download, build, install lapack

list(APPEND third_party_deps extern_eigen3 extern_gflags extern_glog
     extern_xxhash)
list(
  APPEND
  third_party_deps
  extern_zlib
  extern_dlpack
  extern_warpctc
  extern_threadpool
  extern_lapack)

include(cblas) # find first, then download, build, install openblas

message(STATUS "CBLAS_PROVIDER: ${CBLAS_PROVIDER}")
if(${CBLAS_PROVIDER} STREQUAL MKLML)
  list(APPEND third_party_deps extern_mklml)
elseif(${CBLAS_PROVIDER} STREQUAL EXTERN_OPENBLAS)
  list(APPEND third_party_deps extern_openblas)
endif()

if(WITH_MKLDNN)
  include(external/mkldnn) # download, build, install mkldnn
  list(APPEND third_party_deps extern_mkldnn)
endif()

include(external/protobuf) # find first, then download, build, install protobuf
if(TARGET extern_protobuf)
  list(APPEND third_party_deps extern_protobuf)
endif()

if(WITH_PYTHON)
  include(external/python) # find python and python_module
  include(external/pybind11) # download pybind11
  list(APPEND third_party_deps extern_pybind)
endif()

if(WITH_TESTING OR WITH_DISTRIBUTE)
  include(external/gtest) # download, build, install gtest
  list(APPEND third_party_deps extern_gtest)
endif()

if(WITH_ONNXRUNTIME)
  include(external/onnxruntime
  )# download, build, install onnxruntime、paddle2onnx
  include(external/paddle2onnx)
  list(APPEND third_party_deps extern_onnxruntime extern_paddle2onnx)
endif()

if(WITH_GPU)
  if(${CMAKE_CUDA_COMPILER_VERSION} LESS 11.0 OR ${CMAKE_CUDA_COMPILER_VERSION}
                                                 GREATER_EQUAL 11.6)
    include(external/cub) # download cub
    list(APPEND third_party_deps extern_cub)
  endif()
  set(URL
      "https://paddlepaddledeps.bj.bcebos.com/externalErrorMsg_20210928.tar.gz"
      CACHE STRING "" FORCE)
  file_download_and_uncompress(
    ${URL} "externalError" MD5 a712a49384e77ca216ad866712f7cafa
  )# download file externalErrorMsg.tar.gz
  if(WITH_TESTING)
    # copy externalErrorMsg.pb, just for unittest can get error message correctly.
    set(SRC_DIR ${THIRD_PARTY_PATH}/externalError/data)
    if(WIN32 AND (NOT "${CMAKE_GENERATOR}" STREQUAL "Ninja"))
      set(DST_DIR1
          ${CMAKE_BINARY_DIR}/paddle/fluid/third_party/externalError/data)
    else()
      set(DST_DIR1 ${CMAKE_BINARY_DIR}/paddle/third_party/externalError/data)
    endif()
    set(DST_DIR2
        ${CMAKE_BINARY_DIR}/python/paddle/include/third_party/externalError/data
    )
    add_custom_command(
      TARGET download_externalError
      POST_BUILD
      COMMAND ${CMAKE_COMMAND} -E copy_directory ${SRC_DIR} ${DST_DIR1}
      COMMAND ${CMAKE_COMMAND} -E copy_directory ${SRC_DIR} ${DST_DIR2}
      COMMENT "copy_directory from ${SRC_DIR} to ${DST_DIR}")
  endif()
endif()

if(WITH_XPU)
  include(external/xpu) # download, build, install xpu
  list(APPEND third_party_deps extern_xpu)
endif()

if(WITH_MLU)
  include(external/concurrentqueue) # download, build, install concurrentqueue
  list(APPEND third_party_deps extern_concurrentqueue)
endif()

if(WITH_PSLIB)
  include(external/pslib) # download, build, install pslib
  list(APPEND third_party_deps extern_pslib)
  if(WITH_LIBMCT)
    include(external/libmct) # download, build, install libmct
    list(APPEND third_party_deps extern_libxsmm)
  endif()
  if(WITH_PSLIB_BRPC)
    include(external/pslib_brpc) # download, build, install pslib_brpc
    list(APPEND third_party_deps extern_pslib_brpc)
  else()
    include(external/snappy)
    list(APPEND third_party_deps extern_snappy)

    include(external/leveldb)
    list(APPEND third_party_deps extern_leveldb)
    if(NOT WITH_HETERPS)
      include(external/brpc)
      list(APPEND third_party_deps extern_brpc)
    endif()
  endif()
endif()

if(NOT WIN32 AND NOT APPLE)
  include(external/gloo)
  list(APPEND third_party_deps extern_gloo)
endif()

if(WITH_BOX_PS)
  include(external/box_ps)
  list(APPEND third_party_deps extern_box_ps)
endif()

if(WITH_ASCEND OR WITH_ASCEND_CL)
  include(external/ascend)
  if(WITH_ASCEND OR WITH_ASCEND_CL)
    list(APPEND third_party_deps extern_ascend)
  endif()
  if(WITH_ASCEND_CL)
    list(APPEND third_party_deps extern_ascend_cl)
  endif()
endif()

if(WITH_PSCORE)
  include(external/snappy)
  list(APPEND third_party_deps extern_snappy)

  include(external/leveldb)
  list(APPEND third_party_deps extern_leveldb)

  if(WITH_ARM_BRPC)
    include(external/arm_brpc)
    list(APPEND third_party_deps extern_arm_brpc)
  else()
    include(external/brpc)
    list(APPEND third_party_deps extern_brpc)
  endif()

  include(external/libmct) # download, build, install libmct
  list(APPEND third_party_deps extern_libmct)

  include(external/rocksdb) # download, build, install rocksdb
  list(APPEND third_party_deps extern_rocksdb)
endif()

if(WITH_RPC
   AND NOT WITH_PSCORE
   AND NOT WITH_PSLIB)
  include(external/snappy)
  list(APPEND third_party_deps extern_snappy)

  include(external/leveldb)
  list(APPEND third_party_deps extern_leveldb)

  include(external/brpc)
  list(APPEND third_party_deps extern_brpc)
endif()

if(WITH_XBYAK)
  include(external/xbyak) # download, build, install xbyak
  list(APPEND third_party_deps extern_xbyak)
endif()

if(WITH_LIBXSMM)
  include(external/libxsmm) # download, build, install libxsmm
  list(APPEND third_party_deps extern_libxsmm)
endif()

if(WITH_DGC)
  message(STATUS "add dgc lib.")
  include(external/dgc) # download, build, install dgc
  add_definitions(-DPADDLE_WITH_DGC)
  list(APPEND third_party_deps extern_dgc)
endif()

if(WITH_LITE)
  message(STATUS "Compile Paddle with Lite Engine.")
  include(external/lite)
endif()

if(WITH_CINN)
  message(STATUS "Compile Paddle with CINN.")
  include(external/cinn)
  add_definitions(-DPADDLE_WITH_CINN)
  if(WITH_GPU)
    add_definitions(-DCINN_WITH_CUDA)
    add_definitions(-DCINN_WITH_CUDNN)
  endif()
  if(WITH_MKL)
    add_definitions(-DCINN_WITH_MKL_CBLAS)
    add_definitions(-DCINN_WITH_MKLDNN)
  endif()
endif()

if(WITH_CRYPTO)
  include(external/cryptopp) # download, build, install cryptopp
  list(APPEND third_party_deps extern_cryptopp)
  add_definitions(-DPADDLE_WITH_CRYPTO)
endif()

if(WITH_POCKETFFT)
  include(external/pocketfft)
  list(APPEND third_party_deps extern_pocketfft)
  add_definitions(-DPADDLE_WITH_POCKETFFT)
endif()

if(WIN32)
  include(external/dirent)
  list(APPEND third_party_deps extern_dirent)
endif()

if(WITH_INFRT)
  include(external/llvm)
  list(APPEND third_party_deps ${llvm_libs})
endif()

if(WITH_IPU)
  include(external/poplar)
  list(APPEND third_party_deps extern_poplar)
endif()

if(WITH_CUSPARSELT)
  include(external/cusparselt) # download, build, install cusparselt
  list(APPEND third_party_deps extern_cusparselt)
endif()

if(WITH_GPU
   AND NOT WITH_ARM
   AND NOT WIN32
   AND NOT APPLE)
  if(${CMAKE_CUDA_COMPILER_VERSION} GREATER_EQUAL 11.0)
    include(external/cutlass) # download, build, install cusparselt
    list(APPEND third_party_deps extern_cutlass)
  endif()
endif()

if(WITH_CUDNN_FRONTEND)
  include(external/cudnn-frontend) # download cudnn-frontend
  list(APPEND third_party_deps extern_cudnn_frontend)
endif()

add_custom_target(third_party ALL DEPENDS ${third_party_deps})


text:
#include <aws/autoscaling/model/LifecycleState.h>
#include <aws/core/utils/HashingUtils.h>

using namespace Aws::Utils;

static const int Pending_HASH = HashingUtils::HashString("Pending");
static const int Pending_Wait_HASH = HashingUtils::HashString("Pending:Wait");
static const int Pending_Proceed_HASH = HashingUtils::HashString("Pending:Proceed");
static const int Quarantined_HASH = HashingUtils::HashString("Quarantined");
static const int InService_HASH = HashingUtils::HashString("InService");
static const int Terminating_HASH = HashingUtils::HashString("Terminating");
static const int Terminating_Wait_HASH = HashingUtils::HashString("Terminating:Wait");
static const int Terminating_Proceed_HASH = HashingUtils::HashString("Terminating:Proceed");
static const int Terminated_HASH = HashingUtils::HashString("Terminated");
static const int Detaching_HASH = HashingUtils::HashString("Detaching");
static const int Detached_HASH = HashingUtils::HashString("Detached");
static const int EnteringStandby_HASH = HashingUtils::HashString("EnteringStandby");
static const int Standby_HASH = HashingUtils::HashString("Standby");

namespace Aws
{
namespace AutoScaling
{
namespace Model
{
namespace LifecycleStateMapper
{
LifecycleState GetLifecycleStateForName(const Aws::String& name)
{
  int hashCode = HashingUtils::HashString(name.c_str());

  if (hashCode == Pending_HASH)
  {
    return LifecycleState::Pending;
  }
  else if (hashCode == Pending_Wait_HASH)
  {
    return LifecycleState::Pending_Wait;
  }
  else if (hashCode == Pending_Proceed_HASH)
  {
    return LifecycleState::Pending_Proceed;
  }
  else if (hashCode == Quarantined_HASH)
  {
    return LifecycleState::Quarantined;
  }
  else if (hashCode == InService_HASH)
  {
    return LifecycleState::InService;
  }
  else if (hashCode == Terminating_HASH)
  {
    return LifecycleState::Terminating;
  }
  else if (hashCode == Terminating_Wait_HASH)
  {
    return LifecycleState::Terminating_Wait;
  }
  else if (hashCode == Terminating_Proceed_HASH)
  {
    return LifecycleState::Terminating_Proceed;
  }
  else if (hashCode == Terminated_HASH)
  {
    return LifecycleState::Terminated;
  }
  else if (hashCode == Detaching_HASH)
  {
    return LifecycleState::Detaching;
  }
  else if (hashCode == Detached_HASH)
  {
    return LifecycleState::Detached;
  }
  else if (hashCode == EnteringStandby_HASH)
  {
    return LifecycleState::EnteringStandby;
  }
  else if (hashCode == Standby_HASH)
  {
    return LifecycleState::Standby;
  }

  return LifecycleState::NOT_SET;
}

Aws::String GetNameForLifecycleState(LifecycleState value)
{
  switch(value)
  {
  case LifecycleState::Pending:
    return "Pending";
  case LifecycleState::Pending_Wait:
    return "Pending:Wait";
  case LifecycleState::Pending_Proceed:
    return "Pending:Proceed";
  case LifecycleState::Quarantined:
    return "Quarantined";
  case LifecycleState::InService:
    return "InService";
  case LifecycleState::Terminating:
    return "Terminating";
  case LifecycleState::Terminating_Wait:
    return "Terminating:Wait";
  case LifecycleState::Terminating_Proceed:
    return "Terminating:Proceed";
  case LifecycleState::Terminated:
    return "Terminated";
  case LifecycleState::Detaching:
    return "Detaching";
  case LifecycleState::Detached:
    return "Detached";
  case LifecycleState::EnteringStandby:
    return "EnteringStandby";
  case LifecycleState::Standby:
    return "Standby";
  default:
    return "";
  }
}

} // namespace LifecycleStateMapper
} // namespace Model
} // namespace AutoScaling
} // namespace Aws


text:
package ch.goodrick.brewcontrol.actuator;

/**
 * The state of the actuator.
 *
 * @author sebastian@goodrick.ch
 *
 */
public enum ActuatorStatus {
	/**
	 * The state is "on".
	 */
	ON,

	/**
	 * The state is "off".
	 */
	OFF;
}


text:
"""Tests for tensorflow_datasets.core.deprecated.text_feature."""

import tensorflow as tf
from tensorflow_datasets import testing
from tensorflow_datasets.core import features
from tensorflow_datasets.core.deprecated.text import text_encoder

class TextFeatureTest(testing.FeatureExpectationsTestCase):

  def test_text(self):
    nonunicode_text = 'hello world'
    unicode_text = u'你好'

    self.assertFeature(
        feature=features.Text(),
        shape=(),
        dtype=tf.string,
        tests=[
            # Non-unicode
            testing.FeatureExpectationItem(
                value=nonunicode_text,
                expected=tf.compat.as_bytes(nonunicode_text),
            ),
            # Unicode
            testing.FeatureExpectationItem(
                value=unicode_text,
                expected=tf.compat.as_bytes(unicode_text),
            ),
            # Empty string
            testing.FeatureExpectationItem(
                value='',
                expected=tf.compat.as_bytes(''),
            ),
        ],
    )

  def test_text_encoded(self):
    unicode_text = u'你好'

    # Unicode integer-encoded by byte
    self.assertFeature(
        feature=features.Text(encoder=text_encoder.ByteTextEncoder()),
        shape=(None,),
        dtype=tf.int64,
        tests=[
            testing.FeatureExpectationItem(
                value=unicode_text,
                expected=[i + 1 for i in [228, 189, 160, 229, 165, 189]],
            ),
            # Empty string
            testing.FeatureExpectationItem(
                value='',
                expected=[],
            ),
        ],
        skip_feature_tests=True)

  def test_text_conversion(self):
    text_f = features.Text(encoder=text_encoder.ByteTextEncoder())
    text = u'你好'
    self.assertEqual(text, text_f.ints2str(text_f.str2ints(text)))

  def test_save_load_metadata(self):
    text_f = features.Text(
        encoder=text_encoder.ByteTextEncoder(additional_tokens=['HI']))
    text = u'HI 你好'
    ids = text_f.str2ints(text)
    self.assertEqual(1, ids[0])

    with testing.tmp_dir(self.get_temp_dir()) as data_dir:
      feature_name = 'dummy'
      text_f.save_metadata(data_dir, feature_name)

      new_f = features.Text()
      new_f.load_metadata(data_dir, feature_name)
      self.assertEqual(ids, text_f.str2ints(text))

if __name__ == '__main__':
  testing.test_main()


text:
You need to build python3 first in python3-alpha directory,
before make modules.

## old python2
You need to uncompress python-lib.zip here and make sure all the content
goes inside python-lib


text:
package com.google.cloud.compute.v1;

import com.google.api.core.BetaApi;
import com.google.api.gax.httpjson.ApiMessage;
import java.util.LinkedList;
import java.util.List;
import java.util.Objects;
import javax.annotation.Generated;
import javax.annotation.Nullable;

@Generated("by GAPIC")
@BetaApi
/**
 * A Subnetwork resource. (== resource_for beta.subnetworks ==) (== resource_for v1.subnetworks ==)
 */
public final class Subnetwork implements ApiMessage {
  private final String creationTimestamp;
  private final String description;
  private final Boolean enableFlowLogs;
  private final String fingerprint;
  private final String gatewayAddress;
  private final String id;
  private final String ipCidrRange;
  private final String kind;
  private final String name;
  private final String network;
  private final Boolean privateIpGoogleAccess;
  private final String region;
  private final List<SubnetworkSecondaryRange> secondaryIpRanges;
  private final String selfLink;

  private Subnetwork() {
    this.creationTimestamp = null;
    this.description = null;
    this.enableFlowLogs = null;
    this.fingerprint = null;
    this.gatewayAddress = null;
    this.id = null;
    this.ipCidrRange = null;
    this.kind = null;
    this.name = null;
    this.network = null;
    this.privateIpGoogleAccess = null;
    this.region = null;
    this.secondaryIpRanges = null;
    this.selfLink = null;
  }

  private Subnetwork(
      String creationTimestamp,
      String description,
      Boolean enableFlowLogs,
      String fingerprint,
      String gatewayAddress,
      String id,
      String ipCidrRange,
      String kind,
      String name,
      String network,
      Boolean privateIpGoogleAccess,
      String region,
      List<SubnetworkSecondaryRange> secondaryIpRanges,
      String selfLink) {
    this.creationTimestamp = creationTimestamp;
    this.description = description;
    this.enableFlowLogs = enableFlowLogs;
    this.fingerprint = fingerprint;
    this.gatewayAddress = gatewayAddress;
    this.id = id;
    this.ipCidrRange = ipCidrRange;
    this.kind = kind;
    this.name = name;
    this.network = network;
    this.privateIpGoogleAccess = privateIpGoogleAccess;
    this.region = region;
    this.secondaryIpRanges = secondaryIpRanges;
    this.selfLink = selfLink;
  }

  @Override
  public Object getFieldValue(String fieldName) {
    if ("creationTimestamp".equals(fieldName)) {
      return creationTimestamp;
    }
    if ("description".equals(fieldName)) {
      return description;
    }
    if ("enableFlowLogs".equals(fieldName)) {
      return enableFlowLogs;
    }
    if ("fingerprint".equals(fieldName)) {
      return fingerprint;
    }
    if ("gatewayAddress".equals(fieldName)) {
      return gatewayAddress;
    }
    if ("id".equals(fieldName)) {
      return id;
    }
    if ("ipCidrRange".equals(fieldName)) {
      return ipCidrRange;
    }
    if ("kind".equals(fieldName)) {
      return kind;
    }
    if ("name".equals(fieldName)) {
      return name;
    }
    if ("network".equals(fieldName)) {
      return network;
    }
    if ("privateIpGoogleAccess".equals(fieldName)) {
      return privateIpGoogleAccess;
    }
    if ("region".equals(fieldName)) {
      return region;
    }
    if ("secondaryIpRanges".equals(fieldName)) {
      return secondaryIpRanges;
    }
    if ("selfLink".equals(fieldName)) {
      return selfLink;
    }
    return null;
  }

  @Nullable
  @Override
  public ApiMessage getApiMessageRequestBody() {
    return null;
  }

  @Nullable
  @Override
  /**
   * The fields that should be serialized (even if they have empty values). If the containing
   * message object has a non-null fieldmask, then all the fields in the field mask (and only those
   * fields in the field mask) will be serialized. If the containing object does not have a
   * fieldmask, then only non-empty fields will be serialized.
   */
  public List<String> getFieldMask() {
    return null;
  }

  /** [Output Only] Creation timestamp in RFC3339 text format. */
  public String getCreationTimestamp() {
    return creationTimestamp;
  }

  /**
   * An optional description of this resource. Provide this property when you create the resource.
   * This field can be set only at resource creation time.
   */
  public String getDescription() {
    return description;
  }

  /**
   * Whether to enable flow logging for this subnetwork. If this field is not explicitly set, it
   * will not appear in get listings. If not set the default behavior is to disable flow logging.
   */
  public Boolean getEnableFlowLogs() {
    return enableFlowLogs;
  }

  /**
   * Fingerprint of this resource. A hash of the contents stored in this object. This field is used
   * in optimistic locking. This field will be ignored when inserting a Subnetwork. An up-to-date
   * fingerprint must be provided in order to update the Subnetwork, otherwise the request will fail
   * with error 412 conditionNotMet.
   *
   *
To see the latest fingerprint, make a get() request to retrieve a Subnetwork.
   */
  public String getFingerprint() {
    return fingerprint;
  }

  /**
   * [Output Only] The gateway address for default routes to reach destination addresses outside
   * this subnetwork.
   */
  public String getGatewayAddress() {
    return gatewayAddress;
  }

  /**
   * [Output Only] The unique identifier for the resource. This identifier is defined by the server.
   */
  public String getId() {
    return id;
  }

  /**
   * The range of internal addresses that are owned by this subnetwork. Provide this property when
   * you create the subnetwork. For example, 10.0.0.0/8 or 192.168.0.0/16. Ranges must be unique and
   * non-overlapping within a network. Only IPv4 is supported. This field can be set only at
   * resource creation time.
   */
  public String getIpCidrRange() {
    return ipCidrRange;
  }

  /** [Output Only] Type of the resource. Always compute#subnetwork for Subnetwork resources. */
  public String getKind() {
    return kind;
  }

  /**
   * The name of the resource, provided by the client when initially creating the resource. The name
   * must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63
   * characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means
   * the first character must be a lowercase letter, and all following characters must be a dash,
   * lowercase letter, or digit, except the last character, which cannot be a dash.
   */
  public String getName() {
    return name;
  }

  /**
   * The URL of the network to which this subnetwork belongs, provided by the client when initially
   * creating the subnetwork. Only networks that are in the distributed mode can have subnetworks.
   * This field can be set only at resource creation time.
   */
  public String getNetwork() {
    return network;
  }

  /**
   * Whether the VMs in this subnet can access Google services without assigned external IP
   * addresses. This field can be both set at resource creation time and updated using
   * setPrivateIpGoogleAccess.
   */
  public Boolean getPrivateIpGoogleAccess() {
    return privateIpGoogleAccess;
  }

  /**
   * URL of the region where the Subnetwork resides. This field can be set only at resource creation
   * time.
   */
  public String getRegion() {
    return region;
  }

  /**
   * An array of configurations for secondary IP ranges for VM instances contained in this
   * subnetwork. The primary IP of such VM must belong to the primary ipCidrRange of the subnetwork.
   * The alias IPs may belong to either primary or secondary ranges. This field can be updated with
   * a patch request.
   */
  public List<SubnetworkSecondaryRange> getSecondaryIpRangesList() {
    return secondaryIpRanges;
  }

  /** [Output Only] Server-defined URL for the resource. */
  public String getSelfLink() {
    return selfLink;
  }

  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }

  public static Builder newBuilder(Subnetwork prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }

  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
  }

  public static Subnetwork getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final Subnetwork DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new Subnetwork();
  }

  public static class Builder {
    private String creationTimestamp;
    private String description;
    private Boolean enableFlowLogs;
    private String fingerprint;
    private String gatewayAddress;
    private String id;
    private String ipCidrRange;
    private String kind;
    private String name;
    private String network;
    private Boolean privateIpGoogleAccess;
    private String region;
    private List<SubnetworkSecondaryRange> secondaryIpRanges;
    private String selfLink;

    Builder() {}

    public Builder mergeFrom(Subnetwork other) {
      if (other == Subnetwork.getDefaultInstance()) return this;
      if (other.getCreationTimestamp() != null) {
        this.creationTimestamp = other.creationTimestamp;
      }
      if (other.getDescription() != null) {
        this.description = other.description;
      }
      if (other.getEnableFlowLogs() != null) {
        this.enableFlowLogs = other.enableFlowLogs;
      }
      if (other.getFingerprint() != null) {
        this.fingerprint = other.fingerprint;
      }
      if (other.getGatewayAddress() != null) {
        this.gatewayAddress = other.gatewayAddress;
      }
      if (other.getId() != null) {
        this.id = other.id;
      }
      if (other.getIpCidrRange() != null) {
        this.ipCidrRange = other.ipCidrRange;
      }
      if (other.getKind() != null) {
        this.kind = other.kind;
      }
      if (other.getName() != null) {
        this.name = other.name;
      }
      if (other.getNetwork() != null) {
        this.network = other.network;
      }
      if (other.getPrivateIpGoogleAccess() != null) {
        this.privateIpGoogleAccess = other.privateIpGoogleAccess;
      }
      if (other.getRegion() != null) {
        this.region = other.region;
      }
      if (other.getSecondaryIpRangesList() != null) {
        this.secondaryIpRanges = other.secondaryIpRanges;
      }
      if (other.getSelfLink() != null) {
        this.selfLink = other.selfLink;
      }
      return this;
    }

    Builder(Subnetwork source) {
      this.creationTimestamp = source.creationTimestamp;
      this.description = source.description;
      this.enableFlowLogs = source.enableFlowLogs;
      this.fingerprint = source.fingerprint;
      this.gatewayAddress = source.gatewayAddress;
      this.id = source.id;
      this.ipCidrRange = source.ipCidrRange;
      this.kind = source.kind;
      this.name = source.name;
      this.network = source.network;
      this.privateIpGoogleAccess = source.privateIpGoogleAccess;
      this.region = source.region;
      this.secondaryIpRanges = source.secondaryIpRanges;
      this.selfLink = source.selfLink;
    }

    /** [Output Only] Creation timestamp in RFC3339 text format. */
    public String getCreationTimestamp() {
      return creationTimestamp;
    }

    /** [Output Only] Creation timestamp in RFC3339 text format. */
    public Builder setCreationTimestamp(String creationTimestamp) {
      this.creationTimestamp = creationTimestamp;
      return this;
    }

    /**
     * An optional description of this resource. Provide this property when you create the resource.
     * This field can be set only at resource creation time.
     */
    public String getDescription() {
      return description;
    }

    /**
     * An optional description of this resource. Provide this property when you create the resource.
     * This field can be set only at resource creation time.
     */
    public Builder setDescription(String description) {
      this.description = description;
      return this;
    }

    /**
     * Whether to enable flow logging for this subnetwork. If this field is not explicitly set, it
     * will not appear in get listings. If not set the default behavior is to disable flow logging.
     */
    public Boolean getEnableFlowLogs() {
      return enableFlowLogs;
    }

    /**
     * Whether to enable flow logging for this subnetwork. If this field is not explicitly set, it
     * will not appear in get listings. If not set the default behavior is to disable flow logging.
     */
    public Builder setEnableFlowLogs(Boolean enableFlowLogs) {
      this.enableFlowLogs = enableFlowLogs;
      return this;
    }

    /**
     * Fingerprint of this resource. A hash of the contents stored in this object. This field is
     * used in optimistic locking. This field will be ignored when inserting a Subnetwork. An
     * up-to-date fingerprint must be provided in order to update the Subnetwork, otherwise the
     * request will fail with error 412 conditionNotMet.
     *
     *
To see the latest fingerprint, make a get() request to retrieve a Subnetwork.
     */
    public String getFingerprint() {
      return fingerprint;
    }

    /**
     * Fingerprint of this resource. A hash of the contents stored in this object. This field is
     * used in optimistic locking. This field will be ignored when inserting a Subnetwork. An
     * up-to-date fingerprint must be provided in order to update the Subnetwork, otherwise the
     * request will fail with error 412 conditionNotMet.
     *
     *
To see the latest fingerprint, make a get() request to retrieve a Subnetwork.
     */
    public Builder setFingerprint(String fingerprint) {
      this.fingerprint = fingerprint;
      return this;
    }

    /**
     * [Output Only] The gateway address for default routes to reach destination addresses outside
     * this subnetwork.
     */
    public String getGatewayAddress() {
      return gatewayAddress;
    }

    /**
     * [Output Only] The gateway address for default routes to reach destination addresses outside
     * this subnetwork.
     */
    public Builder setGatewayAddress(String gatewayAddress) {
      this.gatewayAddress = gatewayAddress;
      return this;
    }

    /**
     * [Output Only] The unique identifier for the resource. This identifier is defined by the
     * server.
     */
    public String getId() {
      return id;
    }

    /**
     * [Output Only] The unique identifier for the resource. This identifier is defined by the
     * server.
     */
    public Builder setId(String id) {
      this.id = id;
      return this;
    }

    /**
     * The range of internal addresses that are owned by this subnetwork. Provide this property when
     * you create the subnetwork. For example, 10.0.0.0/8 or 192.168.0.0/16. Ranges must be unique
     * and non-overlapping within a network. Only IPv4 is supported. This field can be set only at
     * resource creation time.
     */
    public String getIpCidrRange() {
      return ipCidrRange;
    }

    /**
     * The range of internal addresses that are owned by this subnetwork. Provide this property when
     * you create the subnetwork. For example, 10.0.0.0/8 or 192.168.0.0/16. Ranges must be unique
     * and non-overlapping within a network. Only IPv4 is supported. This field can be set only at
     * resource creation time.
     */
    public Builder setIpCidrRange(String ipCidrRange) {
      this.ipCidrRange = ipCidrRange;
      return this;
    }

    /** [Output Only] Type of the resource. Always compute#subnetwork for Subnetwork resources. */
    public String getKind() {
      return kind;
    }

    /** [Output Only] Type of the resource. Always compute#subnetwork for Subnetwork resources. */
    public Builder setKind(String kind) {
      this.kind = kind;
      return this;
    }

    /**
     * The name of the resource, provided by the client when initially creating the resource. The
     * name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be
     * 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which
     * means the first character must be a lowercase letter, and all following characters must be a
     * dash, lowercase letter, or digit, except the last character, which cannot be a dash.
     */
    public String getName() {
      return name;
    }

    /**
     * The name of the resource, provided by the client when initially creating the resource. The
     * name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be
     * 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which
     * means the first character must be a lowercase letter, and all following characters must be a
     * dash, lowercase letter, or digit, except the last character, which cannot be a dash.
     */
    public Builder setName(String name) {
      this.name = name;
      return this;
    }

    /**
     * The URL of the network to which this subnetwork belongs, provided by the client when
     * initially creating the subnetwork. Only networks that are in the distributed mode can have
     * subnetworks. This field can be set only at resource creation time.
     */
    public String getNetwork() {
      return network;
    }

    /**
     * The URL of the network to which this subnetwork belongs, provided by the client when
     * initially creating the subnetwork. Only networks that are in the distributed mode can have
     * subnetworks. This field can be set only at resource creation time.
     */
    public Builder setNetwork(String network) {
      this.network = network;
      return this;
    }

    /**
     * Whether the VMs in this subnet can access Google services without assigned external IP
     * addresses. This field can be both set at resource creation time and updated using
     * setPrivateIpGoogleAccess.
     */
    public Boolean getPrivateIpGoogleAccess() {
      return privateIpGoogleAccess;
    }

    /**
     * Whether the VMs in this subnet can access Google services without assigned external IP
     * addresses. This field can be both set at resource creation time and updated using
     * setPrivateIpGoogleAccess.
     */
    public Builder setPrivateIpGoogleAccess(Boolean privateIpGoogleAccess) {
      this.privateIpGoogleAccess = privateIpGoogleAccess;
      return this;
    }

    /**
     * URL of the region where the Subnetwork resides. This field can be set only at resource
     * creation time.
     */
    public String getRegion() {
      return region;
    }

    /**
     * URL of the region where the Subnetwork resides. This field can be set only at resource
     * creation time.
     */
    public Builder setRegion(String region) {
      this.region = region;
      return this;
    }

    /**
     * An array of configurations for secondary IP ranges for VM instances contained in this
     * subnetwork. The primary IP of such VM must belong to the primary ipCidrRange of the
     * subnetwork. The alias IPs may belong to either primary or secondary ranges. This field can be
     * updated with a patch request.
     */
    public List<SubnetworkSecondaryRange> getSecondaryIpRangesList() {
      return secondaryIpRanges;
    }

    /**
     * An array of configurations for secondary IP ranges for VM instances contained in this
     * subnetwork. The primary IP of such VM must belong to the primary ipCidrRange of the
     * subnetwork. The alias IPs may belong to either primary or secondary ranges. This field can be
     * updated with a patch request.
     */
    public Builder addAllSecondaryIpRanges(List<SubnetworkSecondaryRange> secondaryIpRanges) {
      if (this.secondaryIpRanges == null) {
        this.secondaryIpRanges = new LinkedList<>();
      }
      this.secondaryIpRanges.addAll(secondaryIpRanges);
      return this;
    }

    /**
     * An array of configurations for secondary IP ranges for VM instances contained in this
     * subnetwork. The primary IP of such VM must belong to the primary ipCidrRange of the
     * subnetwork. The alias IPs may belong to either primary or secondary ranges. This field can be
     * updated with a patch request.
     */
    public Builder addSecondaryIpRanges(SubnetworkSecondaryRange secondaryIpRanges) {
      if (this.secondaryIpRanges == null) {
        this.secondaryIpRanges = new LinkedList<>();
      }
      this.secondaryIpRanges.add(secondaryIpRanges);
      return this;
    }

    /** [Output Only] Server-defined URL for the resource. */
    public String getSelfLink() {
      return selfLink;
    }

    /** [Output Only] Server-defined URL for the resource. */
    public Builder setSelfLink(String selfLink) {
      this.selfLink = selfLink;
      return this;
    }

    public Subnetwork build() {

      return new Subnetwork(
          creationTimestamp,
          description,
          enableFlowLogs,
          fingerprint,
          gatewayAddress,
          id,
          ipCidrRange,
          kind,
          name,
          network,
          privateIpGoogleAccess,
          region,
          secondaryIpRanges,
          selfLink);
    }

    public Builder clone() {
      Builder newBuilder = new Builder();
      newBuilder.setCreationTimestamp(this.creationTimestamp);
      newBuilder.setDescription(this.description);
      newBuilder.setEnableFlowLogs(this.enableFlowLogs);
      newBuilder.setFingerprint(this.fingerprint);
      newBuilder.setGatewayAddress(this.gatewayAddress);
      newBuilder.setId(this.id);
      newBuilder.setIpCidrRange(this.ipCidrRange);
      newBuilder.setKind(this.kind);
      newBuilder.setName(this.name);
      newBuilder.setNetwork(this.network);
      newBuilder.setPrivateIpGoogleAccess(this.privateIpGoogleAccess);
      newBuilder.setRegion(this.region);
      newBuilder.addAllSecondaryIpRanges(this.secondaryIpRanges);
      newBuilder.setSelfLink(this.selfLink);
      return newBuilder;
    }
  }

  @Override
  public String toString() {
    return "Subnetwork{"
        + "creationTimestamp="
        + creationTimestamp
        + ", "
        + "description="
        + description
        + ", "
        + "enableFlowLogs="
        + enableFlowLogs
        + ", "
        + "fingerprint="
        + fingerprint
        + ", "
        + "gatewayAddress="
        + gatewayAddress
        + ", "
        + "id="
        + id
        + ", "
        + "ipCidrRange="
        + ipCidrRange
        + ", "
        + "kind="
        + kind
        + ", "
        + "name="
        + name
        + ", "
        + "network="
        + network
        + ", "
        + "privateIpGoogleAccess="
        + privateIpGoogleAccess
        + ", "
        + "region="
        + region
        + ", "
        + "secondaryIpRanges="
        + secondaryIpRanges
        + ", "
        + "selfLink="
        + selfLink
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof Subnetwork) {
      Subnetwork that = (Subnetwork) o;
      return Objects.equals(this.creationTimestamp, that.getCreationTimestamp())
          && Objects.equals(this.description, that.getDescription())
          && Objects.equals(this.enableFlowLogs, that.getEnableFlowLogs())
          && Objects.equals(this.fingerprint, that.getFingerprint())
          && Objects.equals(this.gatewayAddress, that.getGatewayAddress())
          && Objects.equals(this.id, that.getId())
          && Objects.equals(this.ipCidrRange, that.getIpCidrRange())
          && Objects.equals(this.kind, that.getKind())
          && Objects.equals(this.name, that.getName())
          && Objects.equals(this.network, that.getNetwork())
          && Objects.equals(this.privateIpGoogleAccess, that.getPrivateIpGoogleAccess())
          && Objects.equals(this.region, that.getRegion())
          && Objects.equals(this.secondaryIpRanges, that.getSecondaryIpRangesList())
          && Objects.equals(this.selfLink, that.getSelfLink());
    }
    return false;
  }

  @Override
  public int hashCode() {
    return Objects.hash(
        creationTimestamp,
        description,
        enableFlowLogs,
        fingerprint,
        gatewayAddress,
        id,
        ipCidrRange,
        kind,
        name,
        network,
        privateIpGoogleAccess,
        region,
        secondaryIpRanges,
        selfLink);
  }
}


text:
package angular.angular;

import org.openqa.selenium.By;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.SearchContext;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;

import java.util.List;

/**
 * @author Paul Hammant
 */
public class ByAngularBinding extends By
{

    private final JavascriptExecutor jse;

    private String binding;

    public ByAngularBinding(JavascriptExecutor jse, String binding)
    {
        this.jse = jse;
        this.binding = binding;
    }

    private String makeJsBy(String oneOrAll)
    {
        return
                "var using = arguments[0] || document;\n" +
                "var binding = '" + binding + "';\n" +
                "var bindings = using.getElementsByClassName('ng-binding');\n" +
                "var matches = [];\n" +
                "for (var i = 0; i < bindings.length; ++i) {\n" +
                "  var bindingName = angular.element(bindings[i]).data().$binding[0].exp ||\n" +
                "      angular.element(bindings[i]).data().$binding;\n" +
                "  if (bindingName.indexOf(binding) != -1) {\n" +
                "    matches.push(bindings[i]);\n" +
                "  }\n" +
                "}\n" +
                "return matches" + oneOrAll + ";";
    }

    @Override
    public WebElement findElement(SearchContext context)
    {
        if (context instanceof WebDriver)
        {
            context = null;
        }
        return (WebElement) jse.executeScript(makeJsBy("[0]"), context);
    }

    @Override
    public List<WebElement> findElements(SearchContext searchContext)
    {
        if (searchContext instanceof WebDriver)
        {
            searchContext = null;
        }
        return (List<WebElement>) jse.executeScript(makeJsBy(""), searchContext);
    }
}


text:
[![Build Status](https://travis-ci.org/cloudfoundry/java-buildpack.svg?branch=master)](https://travis-ci.org/cloudfoundry/java-buildpack)
[![Dependency Status](https://gemnasium.com/cloudfoundry/java-buildpack.svg)](https://gemnasium.com/cloudfoundry/java-buildpack)
[![Code Climate](https://codeclimate.com/repos/5224adaec7f3a3415107004c/badges/bc49f7d7f8dfc47057c8/gpa.svg)](https://codeclimate.com/repos/5224adaec7f3a3415107004c/feed)
[![Code Climate](https://codeclimate.com/repos/5224adaec7f3a3415107004c/badges/bc49f7d7f8dfc47057c8/coverage.svg)](https://codeclimate.com/repos/5224adaec7f3a3415107004c/feed)

The `java-buildpack` is a [Cloud Foundry][] buildpack for running JVM-based applications.  It is designed to run many JVM-based applications ([Grails][], [Groovy][], Java Main, [Play Framework][], [Spring Boot][], and Servlet) with no additional configuration, but supports configuration of the standard components, and extension to add custom components.

## Usage
To use this buildpack specify the URI of the repository when pushing an application to Cloud Foundry:

```bash
cf push <APP-NAME> -p <ARTIFACT> -b https://github.com/cloudfoundry/java-buildpack.git
```

## Examples
The following are _very_ simple examples for deploying the artifact types that we support.

* [Grails](docs/example-grails.md)
* [Groovy](docs/example-groovy.md)
* [Java Main](docs/example-java_main.md)
* [Play Framework](docs/example-play_framework.md)
* [Servlet](docs/example-servlet.md)
* [Spring Boot CLI](docs/example-spring_boot_cli.md)

## Configuration and Extension
The buildpack supports configuration and extension through the use of Git repository forking.  The easiest way to accomplish this is to use [GitHub's forking functionality][] to create a copy of this repository.  Make the required configuration and extension changes in the copy of the repository.  Then specify the URL of the new repository when pushing Cloud Foundry applications.  If the modifications are generally applicable to the Cloud Foundry community, please submit a [pull request][] with the changes.

To learn how to configure various properties of the buildpack, follow the "Configuration" links below. More information on extending the buildpack is available [here](docs/extending.md).

## Additional Documentation
* [Design](docs/design.md)
* [Security](docs/security.md)
* Standard Containers
	* [Dist ZIP](docs/container-dist_zip.md)
	* [Groovy](docs/container-groovy.md) ([Configuration](docs/container-groovy.md#configuration))
	* [Java Main](docs/container-java_main.md) ([Configuration](docs/container-java_main.md#configuration))
	* [Play Framework](docs/container-play_framework.md)
	* [Ratpack](docs/container-ratpack.md)
	* [Spring Boot](docs/container-spring_boot.md)
	* [Spring Boot CLI](docs/container-spring_boot_cli.md) ([Configuration](docs/container-spring_boot_cli.md#configuration))
	* [Tomcat](docs/container-tomcat.md) ([Configuration](docs/container-tomcat.md#configuration))
* Standard Frameworks
	* [AppDynamics Agent](docs/framework-app_dynamics_agent.md) ([Configuration](docs/framework-app_dynamics_agent.md#configuration))
	* [Java Options](docs/framework-java_opts.md) ([Configuration](docs/framework-java_opts.md#configuration))
	* [MariaDB JDBC](docs/framework-maria_db_jdbc.md) ([Configuration](docs/framework-maria_db_jdbc.md#configuration))
	* [New Relic Agent](docs/framework-new_relic_agent.md) ([Configuration](docs/framework-new_relic_agent.md#configuration))
	* [Play Framework Auto Reconfiguration](docs/framework-play_framework_auto_reconfiguration.md) ([Configuration](docs/framework-play_framework_auto_reconfiguration.md#configuration))
	* [Play Framework JPA Plugin](docs/framework-play_framework_jpa_plugin.md) ([Configuration](docs/framework-play_framework_jpa_plugin.md#configuration))
	* [PostgreSQL JDBC](docs/framework-postgresql_jdbc.md) ([Configuration](docs/framework-postgresql_jdbc.md#configuration))
	* [Spring Auto Reconfiguration](docs/framework-spring_auto_reconfiguration.md) ([Configuration](docs/framework-spring_auto_reconfiguration.md#configuration))
	* [Spring Insight](docs/framework-spring_insight.md)
* Standard JREs
	* [OpenJDK](docs/jre-open_jdk_jre.md) ([Configuration](docs/jre-open_jdk_jre.md#configuration))
	* [Oracle](docs/jre-oracle_jre.md) ([Configuration](docs/jre-oracle_jre.md#configuration))
* [Extending](docs/extending.md)
	* [Application](docs/extending-application.md)
	* [Droplet](docs/extending-droplet.md)
	* [BaseComponent](docs/extending-base_component.md)
	* [VersionedDependencyComponent](docs/extending-versioned_dependency_component.md)
	* [ModularComponent](docs/extending-modular_component.md)
	* [Caches](docs/extending-caches.md) ([Configuration](docs/extending-caches.md#configuration))
	* [Logging](docs/extending-logging.md) ([Configuration](docs/extending-logging.md#configuration))
	* [Repositories](docs/extending-repositories.md) ([Configuration](docs/extending-repositories.md#configuration))
	* [Utilities](docs/extending-utilities.md)
* [Debugging the Buildpack](docs/debugging-the-buildpack.md)
* [Buildpack Modes](docs/buildpack-modes.md)
* Related Projects
	* [Java Buildpack Dependency Builder](https://github.com/cloudfoundry/java-buildpack-dependency-builder)
	* [Java Test Applications](https://github.com/cloudfoundry/java-test-applications)
	* [Java Buildpack System Tests](https://github.com/cloudfoundry/java-buildpack-system-test)

## Building Packages
The buildpack can be packaged up so that it can be uploaded to Cloud Foundry using the `cf create-buildpack` and `cf update-buildpack` commands.  In order to create these packages, the rake `package` task is used.

### Online Package
The online package is a version of the buildpack that is as minimal as possible and is configured to connect to the network for all dependencies.  This package is about 50K in size.  To create the online package, run:

```bash
bundle install
bundle exec rake package
...
Creating build/java-buildpack-cfd6b17.zip
```

### Offline Package
The offline package is a version of the buildpack designed to run without access to a network.  It packages the latest version of each dependency (as configured in the [`config/` directory][]) and [disables `remote_downloads`][]. This package is about 180M in size.  To create the offline package, use the `OFFLINE=true` argument:

```bash
bundle install
bundle exec rake package OFFLINE=true
...
Creating build/java-buildpack-offline-cfd6b17.zip
```

### Package Versioning
Keeping track of different versions of the buildpack can be difficult.  To help with this, the rake `package` task puts a version discriminator in the name of the created package file.  The default value for this discriminator is the current Git hash (e.g. `cfd6b17`).  To change the version when creating a package, use the `VERSION=<VERSION>` argument:

```bash
bundle install
bundle exec rake package VERSION=2.1
...
Creating build/java-buildpack-2.1.zip
```

## Running Tests
To run the tests, do the following:

```bash
bundle install
bundle exec rake
```

[Running Cloud Foundry locally][] is useful for privately testing new features.

## Contributing
[Pull requests][] are welcome; see the [contributor guidelines][] for details.

## License
This buildpack is released under version 2.0 of the [Apache License][].

[`config/` directory]: config
[Apache License]: http://www.apache.org/licenses/LICENSE-2.0
[Cloud Foundry]: http://www.cloudfoundry.com
[contributor guidelines]: CONTRIBUTING.md
[disables `remote_downloads`]: docs/extending-caches.md#configuration
[GitHub's forking functionality]: https://help.github.com/articles/fork-a-repo
[Grails]: http://grails.org
[Groovy]: http://groovy.codehaus.org
[Play Framework]: http://www.playframework.com
[pull request]: https://help.github.com/articles/using-pull-requests
[Pull requests]: http://help.github.com/send-pull-requests
[Running Cloud Foundry locally]: http://docs.cloudfoundry.org/deploying/run-local.html
[Spring Boot]: http://projects.spring.io/spring-boot/


text:
export interface FulfillmentRequest {
    originalRequest: OriginalRequest;
    result: Result;
}

export type FulfillmentResponse = {
    speech?: string;
    displayText?: string;
    data?: {
        slack?: any
    };
}

export type Result = {
    action: string;
    parameters?: any;
    metadata: Metadata;
}

export type Metadata = {
    intentName: string;
}

export type OriginalRequest = {
    source: Provider
    data: {
        authed_users: string[],
        event_id: string, // Ev8GL91D8U
        api_app_id: string, // A8BRxxxx
        team_id: string, // T036VJ7EH
        event: {
            event_ts: string, // 1513660587.000032
            channel: string, // D8B47US3X
            text: string, // ieri ho lavorato 30 minuti su voo facendo grafica,
            type: EventType, // message,
            user: string, // U036VJ7EV,
            ts: string //1513660587.000032
        },
        type: string, // event_callback,
        event_time: number, // 1513660587,
        token: string, // "HifH7KjUAS6suqzFFpEoyvKY"
    }
}

export enum Provider {
    Slack = "slack"
}

export enum EventType {
    Message = "message"
}


text:
/**
 * Represents vehicle module
 * Help display vehicle data
 * @author: felixgondwe
 */
(function(){
    'use strict';
    angular.module('fella').controller('VehicleCtrl',VehicleCtrl);

    function VehicleCtrl($scope,vehicleServices){
         $scope.sum = 2 + 2;

        $scope.text ="";
        vehicleServices.getAllCars().then(function(response){
               // $scope.text = response.data[0];
              $scope.cars = [];
            //  console.log(arr[0].name);
               _.forEach(response.data.makes, function(o){
                   console.log(o);
                    $scope.cars.push(o);

                });
                  console.log($scope.cars);

        },function(response){

        });

    }

})();


text:
#region Project Description [About this]
// =================================================================================
//            The whole Project is Licensed under the MIT License
// =================================================================================
// =================================================================================
//    Wiesend's Dynamic Link Library is a collection of reusable code that
//    I've written, or found throughout my programming career.
//
//    I tried my very best to mention all of the original copyright holders.
//    I hope that all code which I've copied from others is mentioned and all
//    their copyrights are given. The copied code (or code snippets) could
//    already be modified by me or others.
// =================================================================================
#endregion of Project Description
#region Original Source Code [Links to all original source code]
// =================================================================================
//          Original Source Code [Links to all original source code]
// =================================================================================
// https://github.com/JaCraig/Craig-s-Utility-Library
// =================================================================================
//    I didn't wrote this source totally on my own, this class could be nearly a
//    clone of the project of James Craig, I did highly get inspired by him, so
//    this piece of code isn't totally mine, shame on me, I'm not the best!
// =================================================================================
#endregion of where is the original source code
#region Licenses [MIT Licenses]
#region MIT License [James Craig]
// =================================================================================
//    Copyright(c) 2014 James Craig
//
//    Permission is hereby granted, free of charge, to any person obtaining a copy
//    of this software and associated documentation files (the "Software"), to deal
//    in the Software without restriction, including without limitation the rights
//    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//    copies of the Software, and to permit persons to whom the Software is
//    furnished to do so, subject to the following conditions:
//
//    The above copyright notice and this permission notice shall be included in all
//    copies or substantial portions of the Software.
//
//    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
//    SOFTWARE.
// =================================================================================
#endregion of MIT License [James Craig]
#region MIT License [Dominik Wiesend]
// =================================================================================
//    Copyright(c) 2016 Dominik Wiesend. All rights reserved.
//
//    Permission is hereby granted, free of charge, to any person obtaining a copy
//    of this software and associated documentation files (the "Software"), to deal
//    in the Software without restriction, including without limitation the rights
//    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//    copies of the Software, and to permit persons to whom the Software is
//    furnished to do so, subject to the following conditions:
//
//    The above copyright notice and this permission notice shall be included in all
//    copies or substantial portions of the Software.
//
//    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
//    SOFTWARE.
// =================================================================================
#endregion of MIT License [Dominik Wiesend]
#endregion of Licenses [MIT Licenses]

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Diagnostics.Contracts;
using System.Text;
using System.Threading;

namespace Wiesend.DataTypes
{
    ///
    /// Process extensions
    ///
    [EditorBrowsable(EditorBrowsableState.Never)]
    public static class ProcessExtensions
    {
        ///
        /// Gets information about all processes and returns it in an HTML formatted string
        ///
        /// <param name="Process">Process to get information about</param>
        /// <param name="HTMLFormat">Should this be HTML formatted?</param>
        /// <returns>An HTML formatted string</returns>
        public static string GetInformation(this Process Process, bool HTMLFormat = true)
        {
            Contract.Requires<ArgumentNullException>(Process != null, "Process");
            var Builder = new StringBuilder();
            return Builder.Append(HTMLFormat ? "" : "")
                   .Append(Process.ProcessName)
                   .Append(" Information")
                   .Append(HTMLFormat ? "
" : "\n")
                   .Append(Process.ToString(HTMLFormat))
                   .Append(HTMLFormat ? "
" : "\n")
                   .ToString();
        }

        ///
        /// Gets information about all processes and returns it in an HTML formatted string
        ///
        /// <param name="Processes">Processes to get information about</param>
        /// <param name="HTMLFormat">Should this be HTML formatted?</param>
        /// <returns>An HTML formatted string</returns>
        public static string GetInformation(this IEnumerable<Process> Processes, bool HTMLFormat = true)
        {
            if (Processes == null)
                return "";
            var Builder = new StringBuilder();
            Processes.ForEach(x => Builder.Append(x.GetInformation(HTMLFormat)));
            return Builder.ToString();
        }

        ///
        /// Kills a process
        ///
        /// <param name="Process">Process that should be killed</param>
        /// <param name="TimeToKill">Amount of time (in ms) until the process is killed.</param>
        public static void KillProcessAsync(this Process Process, int TimeToKill = 0)
        {
            Contract.Requires<ArgumentNullException>(Process != null, "Process");
            ThreadPool.QueueUserWorkItem(delegate { KillProcessAsyncHelper(Process, TimeToKill); });
        }

        ///
        /// Kills a list of processes
        ///
        /// <param name="Processes">Processes that should be killed</param>
        /// <param name="TimeToKill">Amount of time (in ms) until the processes are killed.</param>
        public static void KillProcessAsync(this IEnumerable<Process> Processes, int TimeToKill = 0)
        {
            Contract.Requires<ArgumentNullException>(Processes != null, "Processes");
            Processes.ForEach(x => ThreadPool.QueueUserWorkItem(delegate { KillProcessAsyncHelper(x, TimeToKill); }));
        }

        ///
        /// Kills a process asyncronously
        ///
        /// <param name="Process">Process to kill</param>
        /// <param name="TimeToKill">Amount of time until the process is killed</param>
        private static void KillProcessAsyncHelper(Process Process, int TimeToKill)
        {
            Contract.Requires<ArgumentNullException>(Process != null, "Process");
            if (TimeToKill > 0)
                Thread.Sleep(TimeToKill);
            Process.Kill();
        }
    }
}


text:
.. _fatiando_gravmag_eqlayer:

Equivalent layer processing (``fatiando.gravmag.eqlayer``)
==================================================================

.. automodule:: fatiando.gravmag.eqlayer
   :members:
   :show-inheritance:


text:
module Csvable

  require "csv"
  class << self

    def from_array_of_hashes(data = [], humanize = true)
      return "" unless data.first&.keys
      if humanize
        headers = data.first.keys
          .map(&:to_s)
          .map(&:humanize)
      else
        headers = data.first.keys
          .map(&:to_s)
      end

      CSV.generate do |csv|
        csv << headers
        data.each do |row|
          csv << row.values
        end
      end
    end

  end

end


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>wxLua: /mnt/share/devel/lua/wxLua/modules/wxluadebug/include/wxluadebugdefs.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>

Main Page

Classes

Files

Directories

File List

File Members

modules » wxluadebug » include

wxluadebugdefs.h File Reference
#include "wx/defs.h"

#include "wxlua/include/wxldefs.h"

Include dependency graph for wxluadebugdefs.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define 	WXDLLIMPEXP_WXLUADEBUG

#define 	WXDLLIMPEXP_DATA_WXLUADEBUG(type)   type

Define Documentation

          #define WXDLLIMPEXP_DATA_WXLUADEBUG
          (
          type

           )
             type

Definition at line 31 of file wxluadebugdefs.h.

          #define WXDLLIMPEXP_WXLUADEBUG

Definition at line 30 of file wxluadebugdefs.h.

<address style="text-align: right;">Generated on Tue Jul 13 10:30:39 2010 for wxLua by

 1.6.3 </address>


text:
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="WorldData.cs" company="Exit Games GmbH">
//   Copyright (c) Exit Games GmbH.  All rights reserved.
// </copyright>
// <summary>
//   The world data.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Photon.MmoDemo.Client
{
    /// <summary>
    /// The world data.
    /// </summary>
    public class WorldData
    {
        /// <summary>
        /// Gets or sets BottomRightCorner.
        /// </summary>
        public float[] BottomRightCorner { get; set; }

        /// <summary>
        /// Gets Height.
        /// </summary>
        public float Height
        {
            get
            {
                return this.BottomRightCorner[1] - this.TopLeftCorner[1];
            }
        }

        /// <summary>
        /// Gets or sets Name.
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// Gets or sets TileDimensions.
        /// </summary>
        public float[] TileDimensions { get; set; }

        /// <summary>
        /// Gets or sets TopLeftCorner.
        /// </summary>
        public float[] TopLeftCorner { get; set; }

        /// <summary>
        /// Gets Width.
        /// </summary>
        public float Width
        {
            get
            {
                return this.BottomRightCorner[0] - this.TopLeftCorner[0];
            }
        }
    }
}


text:
title: "You're 16 and want to get into software? Here are some tips."
author: "Wojciech Adam Koszek"
klayout: post
description: >
  Some software advice for 16-year olds.
maillist: >
  in which I shared some tips for young people who want to get into
  programming.
address: "Menlo Park, CA"
tags:
- "software engineering"
published: true
image:
ads:
-
-
spellcheck-allow:
---

Let's assume you are Alexander. You are 16 and somehow somewhere you heard
about this thing called programming. You read some
Alexander is


text:
require "aws-sdk-rds"  # v2: require 'aws-sdk'

# List all Amazon Relational Database Service (Amazon RDS) subnet groups.
#
# @param rds_resource [Aws::RDS::Resource] An SDK for Ruby Amazon RDS resource.
# @return [Array, nil] All the groups discovered, or nil if error.
def list_subnet_groups(rds_resource)
  db_subnet_groups = []
  rds_resource.db_subnet_groups.each do |s|
    db_subnet_groups.append({
                              "name": s.name,
                              "status": s.subnet_group_status
                            })
  end
  db_subnet_groups
rescue Aws::Errors::ServiceError => e
  puts "Couldn't list subnet groups:\n#{e.message}"
end
# snippet-end:[rds.ruby.listSubnetGroups]

if __FILE__ == $0
  rds_resource = Aws::RDS::Resource.new
  list_subnet_groups(rds_resource)
end


text:
<?php
namespace Db\Entity\Field;

trait Lyrics
{
    protected $lyrics;

    public function getLyrics()
    {
        return $this->lyrics;
    }

    public function setLyrics($value)
    {
        $this->lyrics = $value;
        return $this;
    }
}