text:
@interface WithNSURLConnectionTest : GHAsyncTestCase
{
    NLTHTTPStubServer *server;
}
@end

@implementation WithNSURLConnectionTest

- (BOOL)shouldRunOnMainThread {
    // By default NO, but if you have a UI test or test dependent on running on the main thread return YES
    return NO;
}

- (void)setUpClass {
    // Run at start of all tests in the class
    server = [NLTHTTPStubServer sharedServer];
}

- (void)setUp {
    // Run before each test method
    [server clear];
}

- (void)tearDown {
    // Run after each test method
    GHAssertNoThrow([server verify], @"stubs not empty");
}

- (NSString *)toString:(NSData *)data {
    return [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
}

- (id)toJSON:(NSData *)data {
    return [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:nil];
}

- (void)testWithURLString:(NSString *)urlString andCompletionHandler:(void (^)(NSURLResponse *response, NSData *data, NSError *error))handler {
    [self prepare];
    __weak id that = self;

    [NSURLConnection sendAsynchronousRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:urlString]]
                                       queue:[[NSOperationQueue alloc] init]
                           completionHandler:^(NSURLResponse *res, NSData *data, NSError *err) {
                               handler(res, data, err);
                               [that notify:kGHUnitWaitStatusSuccess];
                           }];

    [self waitForStatus:kGHUnitWaitStatusSuccess timeout:10];
}

- (void)testWithCompletionHandler:(void (^)(NSURLResponse *response, NSData *data, NSError *error))handler {

    [self testWithURLString:@"http://localhost:12345/stub" andCompletionHandler:handler];
}

- (void)testMostSimply {

    NSData *data = [@"RESPONSE" dataUsingEncoding:NSUTF8StringEncoding];
    [[[server expect] forPath:@"/stub"] andPlainResponse:data];

    __weak id that = self;
    [self testWithCompletionHandler:^(NSURLResponse *response, NSData *data, NSError *error) {
        GHAssertNil(error, nil);
        GHAssertEqualStrings([that toString:data], @"RESPONSE", nil);
    }];

    [server verify];
}

- (void)testJSONObject {

    [[[server expect] forPath:@"/stub"] andJSONResponseObject:@{ @"RESPONSE" : @"BODY" }];

    __weak id that = self;
    [self testWithCompletionHandler:^(NSURLResponse *response, NSData *data, NSError *error) {
        GHAssertNil(error, nil);
        NSDictionary *JSON = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:nil];
        GHAssertEqualStrings(JSON[@"RESPONSE"], @"BODY", nil);
    }];

    [server verify];
}

- (void)testWithNLTPathAndGavenGetParameters {

    [[server expect] forPath:[NLTPath pathWithPathString:@"/stub" andParameters:@{
            @"k1" : @"v1",
            @"k2" : @"v2",
            @"w" : [NLTPath anyValue]
    }]];

    [self testWithURLString:@"http://localhost:12345/stub?k1=v1&k2=v2&w=willlllld"
       andCompletionHandler:^(NSURLResponse *response, NSData *data, NSError *error) {}];

    [server verify];
}

- (void)testExternalStubResponse {

    [[server stub] forPath:@"/stub"];
    [[server expect] forPath:@"/expect"];
    [self testWithURLString:@"http://localhost:12345/stub"
       andCompletionHandler:^(NSURLResponse *response, NSData *data, NSError *error) {}];
    [self testWithURLString:@"http://localhost:12345/expect"
       andCompletionHandler:^(NSURLResponse *response, NSData *data, NSError *error) {}];
    [self testWithURLString:@"http://localhost:12345/stub"
       andCompletionHandler:^(NSURLResponse *response, NSData *data, NSError *error) {}];

    [server verify];
}

- (void)testWithFile {

    [[[server expect] forPath:@"/stub"] andJSONResponseResource:@"fake" ofType:@"json"];

    __weak id that = self;
    [self testWithCompletionHandler:^(NSURLResponse *response, NSData *data, NSError *error) {
        GHAssertNil(error, nil);
        NSDictionary *JSON = [that toJSON:data];
        GHAssertEqualStrings(JSON[@"fake"], @"dummy", nil);
    }];

    [server verify];
}

- (void)testNotFound {

    [[[server expect] forPath:@"/stub"] andStatusCode:404];

    [self testWithCompletionHandler:^(NSURLResponse *response, NSData *data, NSError *error) {
        NSHTTPURLResponse *URLResponse = (NSHTTPURLResponse *)response;
        GHAssertEquals([URLResponse statusCode], 404, nil);
    }];

    [server verify];
}

- (void)testRequestTwice {

    [[[server expect] forPath:@"/one"] andJSONResponseResource:@"fake" ofType:@"json"];
    [[[server expect] forPath:@"/two"] andJSONResponseResource:@"fake" ofType:@"json"];

    __weak id that = self;
    [self testWithURLString:@"http://localhost:12345/one"
       andCompletionHandler:^(NSURLResponse *response, NSData *data, NSError *error) {
           NSDictionary *JSON = [that toJSON:data];
           GHAssertEqualStrings(JSON[@"fake"], @"dummy", nil);
       }];
    [self testWithURLString:@"http://localhost:12345/two"
       andCompletionHandler:^(NSURLResponse *response, NSData *data, NSError *error) {
           NSDictionary *JSON = [that toJSON:data];
           GHAssertEqualStrings(JSON[@"fake"], @"dummy", nil);
       }];

    [server verify];
}

- (void)testDuplicate {

    [[[server expect] forPath:@"/stub"] andPlainResponse:[@"ONE" dataUsingEncoding:NSUTF8StringEncoding]];
    [[[server expect] forPath:@"/stub"] andPlainResponse:[@"TWO" dataUsingEncoding:NSUTF8StringEncoding]];

    __weak id that = self;
    [self testWithCompletionHandler:^(NSURLResponse *response, NSData *data, NSError *error) {
        GHAssertEqualStrings([that toString:data], @"ONE", nil);
    }];

    [self testWithCompletionHandler:^(NSURLResponse *response, NSData *data, NSError *error) {
        GHAssertEqualStrings([that toString:data], @"TWO", nil);
    }];

    [server verify];
}

- (void)testProcessingTime {

    [[[[server expect] forPath:@"/stub"] andPlainResponse:[@"RESPONSE" dataUsingEncoding:NSUTF8StringEncoding]] andProcessingTime:1.5f];

    NSDate *t = [NSDate date];
    [self testWithCompletionHandler:^(NSURLResponse *response, NSData *data, NSError *error) {}];

    GHAssertTrue(-[t timeIntervalSinceNow] > 1.4, nil);
}

- (void)testWithHTTPMethod:(NSString *)method
            POSTBodyString:(NSString *)bodyString
      andCompletionHandler:(void (^)(NSURLResponse *response, NSData *data, NSError *error))handler {

    NSURL *url = [NSURL URLWithString:@"http://localhost:12345/stub"];
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
    [request setHTTPMethod:method];
    [request setHTTPBody:[bodyString dataUsingEncoding:NSUTF8StringEncoding]];

    [self prepare];
    __weak id that = self;

    [NSURLConnection sendAsynchronousRequest:request
                                       queue:[[NSOperationQueue alloc] init]
                           completionHandler:^(NSURLResponse *res, NSData *data, NSError *err) {
                               handler(res, data, err);
                               [that notify:kGHUnitWaitStatusSuccess];
                           }];
    [self waitForStatus:kGHUnitWaitStatusSuccess timeout:10.0f];
}

- (void)testPOSTRequest {

    __weak id that = self;
    __block BOOL called = NO;
    [[[[server expect] forPath:@"/stub" HTTPMethod:@"POST"] andPlainResponse:[@"RESPONSE" dataUsingEncoding:NSUTF8StringEncoding]] andCheckPostBody:^(NSData *postBody) {
        NSString *postBodyString = [that toString:postBody];
        GHAssertEqualStrings(postBodyString, @"POST_BODY", nil);
        called = YES;
    }];

    [self testWithHTTPMethod:@"POST"
              POSTBodyString:@"POST_BODY"
        andCompletionHandler:^(NSURLResponse *response, NSData *data, NSError *error) {
            GHAssertEqualStrings([that toString:data], @"RESPONSE", nil);
        }];

    GHAssertTrue(called, nil);
    [server verify];

}

- (void)testPUTRequest {

    __weak id that = self;
    __block BOOL called = NO;
    [[[[server expect] forPath:@"/stub" HTTPMethod:@"PUT"] andPlainResponse:[@"RESPONSE" dataUsingEncoding:NSUTF8StringEncoding]] andCheckPostBody:^(NSData *postBody) {
        NSString *postBodyString = [that toString:postBody];
        GHAssertEqualStrings(postBodyString, @"POST_BODY", nil);
        called = YES;
    }];

    [self testWithHTTPMethod:@"PUT"
              POSTBodyString:@"POST_BODY"
        andCompletionHandler:^(NSURLResponse *response, NSData *data, NSError *error) {
            GHAssertEqualStrings([that toString:data], @"RESPONSE", nil);
        }];

    GHAssertTrue(called, nil);
    [server verify];

}

- (void)testDELETERequest {
    [[[server expect] forPath:@"/stub" HTTPMethod:@"DELETE"] andPlainResponse:[@"RESPONSE" dataUsingEncoding:NSUTF8StringEncoding]];

    __weak id that = self;
    [self testWithHTTPMethod:@"DELETE"
              POSTBodyString:nil
        andCompletionHandler:^(NSURLResponse *response, NSData *data, NSError *error) {
            GHAssertEqualStrings([that toString:data], @"RESPONSE", nil);
        }];

    [server verify];
}
@end


text:
exports['test describe completion'] = require('./test_describe_completion');
exports['test it completion'] = require('./test_it_completion');
exports['test expect completion'] = require('./test_expect_completion');

if (require.main === module) require("test").run(exports);

redpajama_set_name: RedPajamaGithub


text: This tests blur filters canvas.triangleBlur(), canvas.zoomBlur(), and canvas.tiltShift(). The image above has a transparent red center, but the red color should not leak into the surrounding image when blurred in any of the images below.


text:
import * as React from 'react';
import { useSelector, useDispatch } from 'react-redux';
import { RootState } from '../../../store';
import Slider, { createSliderWithTooltip } from 'rc-slider';
import 'rc-slider/assets/index.css';
import '../../../../css/canopyDensityModal.scss';
import { setCanopyDensity } from '../../../store/appState/actions';
import { mapController } from '../../../controllers/mapController';

import { canopyDensityContentConfig } from '../../../../../configs/translations/modal.tanslations';

const SliderWithTooltip = createSliderWithTooltip(Slider);

//TODO: This needs to be Language aware

export const forestCarbonGrossEmisionValue = {
  2: 30,
  3: 50,
  4: 75,
};
const marks = {
  2: { label: '30%', style: {} },
  3: { label: '50%', style: {} },
  4: { label: '75%', style: {} },
};

const ForestGrossCarbonEmissionContent = (): JSX.Element => {
  const dispatch = useDispatch();
  const density = useSelector((store: RootState) => store.appState.leftPanel.density);
  const customColorTheme = useSelector((store: RootState) => store.appSettings.customColorTheme);
  const selectedLanguage = useSelector((store: RootState) => store.appState.selectedLanguage);
  const { directions } = canopyDensityContentConfig[selectedLanguage];

  async function handleSliderChange(value: number): Promise<void> {
    dispatch(setCanopyDensity(value));
    //send % value to modify the layer
    mapController.updateDensityValue(forestCarbonGrossEmisionValue[value]);
    mapController.updateBiodensityValue(value);
  }
  const findDensity = forestCarbonGrossEmisionValue[density];

  return (

{directions}

      <SliderWithTooltip
        min={0}
        max={8}
        step={null}
        marks={marks}
        defaultValue={findDensity ? findDensity : 2}
        tipFormatter={(val: number): string => forestCarbonGrossEmisionValue[val] + '%'}
        railStyle={{ height: 10, backgroundColor: customColorTheme }}
        trackStyle={{ backgroundColor: '#e9e9e9', height: 10 }}
        activeDotStyle={{ border: '2px solid #e9e9e9' }}
        dotStyle={{
          border: `2px solid ${customColorTheme}`,
          height: 10,
          width: 10,
          bottom: -6,
        }}
        handleStyle={{
          border: `2px solid ${customColorTheme}`,
          height: 20,
          width: 20,
        }}
        onChange={handleSliderChange}
      />

  );
};

export default ForestGrossCarbonEmissionContent;


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<TITLE>
org.apache.fop.render.intermediate.util (Apache FOP 1.0 API)
</TITLE>

<META NAME="keywords" CONTENT="org.apache.fop.render.intermediate.util package">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style">

org.apache.fop.render.intermediate.util

Classes

IFConcatenator

IFDocumentHandlerProxy


text:
/*
 *
 * GENERAL
 *
 */
.panel-heading {
    border-bottom: 0;
    border-top: 1px solid #DDD;
}
.panel {
    margin-bottom: 0;
}
.section {
    padding-top: 0;
    margin-top: 0;
}

.btn-default.active,
.btn-default:active,
.btn-default:focus,
.btn-default:hover,
.open .dropdown-toggle.btn-default {
    color: #333;
    background-color: #ffffff;
    border-color: #ADADAD;
}
.well {
    border-radius: 0;
}
.navbar-absolute-bottom .btn-navbar:hover,
.navbar-absolute-bottom .btn-navbar {
    color: #A9A9A9;
}
.navbar-absolute-bottom .btn-navbar.active{
    color: #007AFF;
}

.admin-button {
    margin-top:15px;
}
.admin-button a{
    color: #A9A9A9;
    margin-left:15px;
}
.btn-gray {
    color: #333;
    background-color: #ddd;
    border-color: #bbb;
}
.sidebar-left {
    background-color: #000012;
}

.sidebar-left img {
    margin-top: 1%;
}

/*
 *
 * VIEW APARTA
 *
 */
.price{
	color: #5ad427;
	font-weight: bold;
	font-size: 28px;
}
.services-group label,
.feature-group label{
	float: none;
	width: 24%;
}
.input-group-addon.warning{
	color:#F0AD4E;
	background-color:#FCF8E3;
}
.media-body .price{
	font-weight: bold;
	font-size: 17px;
}
.media-body a:focus, a:hover {
    text-decoration: none;
}
/*
 *
 * SEARCH
 *
 */
.search-box {
    min-height: 20px;
    padding: 19px 29px;
    margin-bottom: 20px;
    background-color: #007AFF;
    border: 1px solid #E3E3E3;
}
.search-box .input-group-addon:first-child {
    border-radius: 0px !important;
    padding-left: 6px;
    padding-right: 0px;
}
.search-box .input-group-addon:last-child {
    border-radius: 0px !important;
    padding-left: 10px;
    padding-right:10px;
}
.search-box .input-group input{
    border-left: 0px none;
    border-right:0px none;
}
.radio-group,
.checkbox-group,
.services-group,
.feature-group{
	margin-top: 15px;
	margin-bottom: 15px;
	text-align: center;
}
.radio-group i,
.services-group i,
.checkbox-group i{
	font-size: 24pt;
	display: block;
}
.feature-group i{
	font-size: 18pt;
	display: block;
}
.radio-group input,
.checkbox-group input{
	display: none;
}
/*
 *
 * RATING
 *
 */
.rating{
  color: #a9a9a9;
  margin: 0;
  padding: 0;
}

ul.rating {
  display: block;
  text-align: center;
}

.rating li {
  list-style-type: none;
  display: inline-block;
  padding: 1px;
  text-align: center;
  font-size: 24pt;
  cursor: pointer;
}

.apartas-item .rating li {
  font-size: 18pt;
}

.apartas-item ul.rating {
  text-align: left;
}

.rating .filled.yellow{
  color: #ffcd02;
}
.rating .filled.black{
  color: #000000;
}
.rating .filled.blue{
  color: #007AFF;
}
/*
 *
 * PROFILE
 *
 */
.profile{
  background-color:#eee;
}
.my-profile,
.profile{
  padding: 60px 40px;
  height: 100%;
}
.my-profile img,
.profile img{
  float: none;
}

.my-profile input{
  margin-top: 20px;

}

/* Main carousel style */
.carousel {
    width: 600px;
}

/* Indicators list style */
.article-slide .carousel-indicators {
    bottom: 0;
    left: 0;
    margin-left: 5px;
    width: 100%;
}
/* Indicators list style */
.article-slide .carousel-indicators li {
    border: medium none;
    border-radius: 0;
    float: left;
    height: 54px;
    margin-bottom: 5px;
    margin-left: 0;
    margin-right: 5px !important;
    margin-top: 0;
    width: 100px;
}
/* Indicators images style */
.article-slide .carousel-indicators img {
    border: 2px solid #FFFFFF;
    float: left;
    height: 54px;
    left: 0;
    width: 100px;
}
/* Indicators active image style */
.article-slide .carousel-indicators .active img {
    border: 2px solid #428BCA;
    opacity: 0.7;
}

/*
 *
 * LIST APARTAS
 *
 */
.list-inline>li {
    padding: 0;
}
.apartas-item {
    -webkit-box-shadow: 1px 1px 0 rgba(0,0,0,.2);
    box-shadow: 1px 1px 0 rgba(0,0,0,.2);
    border: 1px solid #ededed;
    padding: 10px!important;
    margin: 0px!important;
}
.apartas-list {
	padding: 0 !important;
	margin: 0 !important;
}
.apartas-descrip {
	padding-top: 10px !important;
}
.fnt-smaller {
    font-size: .9em;
}
.btm-mrg-10 {
    margin-bottom: 10px!important;
}
.list-inline {
    color: #535353;
	 margin: 0!important;
}
.img-list-apartas {
	max-width:100%;
	height:auto;
}
.angular-google-map-container { height: 700px; }

/*
 * Social Buttons for Bootstrap
 *
 * Copyright 2013 Panayiotis Lipiridis
 * Licensed under the MIT License
 *
 * https://phone.com/lipis/bootstrap-social
 */

.btn-social{position:relative;padding-left:44px;margin:5px;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.btn-social :first-child{position:absolute;left:0;top:0;bottom:0;width:32px;line-height:34px;font-size:1.6em;text-align:center;border-right:1px solid rgba(0,0,0,0.2)}
.btn-social.btn-lg{padding-left:61px}.btn-social.btn-lg :first-child{line-height:45px;width:45px;font-size:1.8em}
.btn-social.btn-sm{padding-left:38px}.btn-social.btn-sm :first-child{line-height:28px;width:28px;font-size:1.4em}
.btn-social.btn-xs{padding-left:30px}.btn-social.btn-xs :first-child{line-height:20px;width:20px;font-size:1.2em}
.btn-social-icon{position:relative;padding-left:44px;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;height:34px;width:34px;padding-left:0;padding-right:0}.btn-social-icon :first-child{position:absolute;left:0;top:0;bottom:0;width:32px;line-height:34px;font-size:1.6em;text-align:center;border-right:1px solid rgba(0,0,0,0.2)}
.btn-social-icon.btn-lg{padding-left:61px}.btn-social-icon.btn-lg :first-child{line-height:45px;width:45px;font-size:1.8em}
.btn-social-icon.btn-sm{padding-left:38px}.btn-social-icon.btn-sm :first-child{line-height:28px;width:28px;font-size:1.4em}
.btn-social-icon.btn-xs{padding-left:30px}.btn-social-icon.btn-xs :first-child{line-height:20px;width:20px;font-size:1.2em}
.btn-social-icon :first-child{border:none;text-align:center;width:100% !important}
.btn-social-icon.btn-lg{height:45px;width:45px;padding-left:0;padding-right:0}
.btn-social-icon.btn-sm{height:30px;width:30px;padding-left:0;padding-right:0}
.btn-social-icon.btn-xs{height:22px;width:22px;padding-left:0;padding-right:0}

.btn-facebook{color:#fff;background-color:#3b5998;border-color:rgba(0,0,0,0.2)}.btn-facebook:hover,.btn-facebook:focus,.btn-facebook:active,.btn-facebook.active,.open .dropdown-toggle.btn-facebook{color:#fff;background-color:#30487b;border-color:rgba(0,0,0,0.2)}
.btn-facebook:active,.btn-facebook.active,.open .dropdown-toggle.btn-facebook{background-image:none}
.btn-facebook.disabled,.btn-facebook[disabled],fieldset[disabled] .btn-facebook,.btn-facebook.disabled:hover,.btn-facebook[disabled]:hover,fieldset[disabled] .btn-facebook:hover,.btn-facebook.disabled:focus,.btn-facebook[disabled]:focus,fieldset[disabled] .btn-facebook:focus,.btn-facebook.disabled:active,.btn-facebook[disabled]:active,fieldset[disabled] .btn-facebook:active,.btn-facebook.disabled.active,.btn-facebook[disabled].active,fieldset[disabled] .btn-facebook.active{background-color:#3b5998;border-color:rgba(0,0,0,0.2)}

.btn-phone{color:#fff;background-color:#444;border-color:rgba(0,0,0,0.2)}.btn-phone:hover,.btn-phone:focus,.btn-phone:active,.btn-phone.active,.open .dropdown-toggle.btn-phone{color:#fff;background-color:#303030;border-color:rgba(0,0,0,0.2)}
.btn-phone:active,.btn-phone.active,.open .dropdown-toggle.btn-phone{background-image:none}
.btn-phone.disabled,.btn-phone[disabled],fieldset[disabled] .btn-phone,.btn-phone.disabled:hover,.btn-phone[disabled]:hover,fieldset[disabled] .btn-phone:hover,.btn-phone.disabled:focus,.btn-phone[disabled]:focus,fieldset[disabled] .btn-phone:focus,.btn-phone.disabled:active,.btn-phone[disabled]:active,fieldset[disabled] .btn-phone:active,.btn-phone.disabled.active,.btn-phone[disabled].active,fieldset[disabled] .btn-phone.active{background-color:#444;border-color:rgba(0,0,0,0.2)}

.btn-google-plus{color:#fff;background-color:#dd4b39;border-color:rgba(0,0,0,0.2)}.btn-google-plus:hover,.btn-google-plus:focus,.btn-google-plus:active,.btn-google-plus.active,.open .dropdown-toggle.btn-google-plus{color:#fff;background-color:#ca3523;border-color:rgba(0,0,0,0.2)}
.btn-google-plus:active,.btn-google-plus.active,.open .dropdown-toggle.btn-google-plus{background-image:none}
.btn-google-plus.disabled,.btn-google-plus[disabled],fieldset[disabled] .btn-google-plus,.btn-google-plus.disabled:hover,.btn-google-plus[disabled]:hover,fieldset[disabled] .btn-google-plus:hover,.btn-google-plus.disabled:focus,.btn-google-plus[disabled]:focus,fieldset[disabled] .btn-google-plus:focus,.btn-google-plus.disabled:active,.btn-google-plus[disabled]:active,fieldset[disabled] .btn-google-plus:active,.btn-google-plus.disabled.active,.btn-google-plus[disabled].active,fieldset[disabled] .btn-google-plus.active{background-color:#dd4b39;border-color:rgba(0,0,0,0.2)}
=======
/*
 *
 * GENERAL
 *
 */
.panel-heading {
    border-bottom: 0;
    border-top: 1px solid #DDD;
}
.panel {
    margin-bottom: 0;
}
.section {
    padding-top: 0;
    margin-top: 0;
}

.btn-default.active,
.btn-default:active,
.btn-default:focus,
.btn-default:hover,
.open .dropdown-toggle.btn-default {
    color: #333;
    background-color: #ffffff;
    border-color: #ADADAD;
}
.well {
    border-radius: 0;
}
.navbar-absolute-bottom .btn-navbar:hover,
.navbar-absolute-bottom .btn-navbar {
    color: #A9A9A9;
}
.navbar-absolute-bottom .btn-navbar.active{
    color: #007AFF;
}

.admin-button {
    margin-top:15px;
}
.admin-button a{
    color: #A9A9A9;
    margin-left:15px;
}
/*
 *
 * INTERESADOS
 *
 */
.interesados{
  color: #a9a9a9;
  margin: 0;
  padding: 0;
}

ul.interesados {
  display: block;
}

.interesados li {
  list-style-type: none;
  display: inline-block;
  padding: 1px;
  text-align: center;
  font-size: 24pt;
  cursor: pointer;
}

.interesados li>img,
.interesados li>span{
  height: 45px;
  width: 45px;
  border-radius: 0;
}
.interesados .label {
    padding: 0.2em 0.45em 0.3em;
}

/*
 *
 * VIEW APARTA
 *
 */
.price{
	color: #5ad427;
	font-weight: bold;
	font-size: 28px;
}
.services-group label,
.feature-group label{
	float: none;
	width: 24%;
}
.input-group-addon.warning{
	color:#F0AD4E;
	background-color:#FCF8E3;
}
.media-body .price{
	font-weight: bold;
	font-size: 17px;
}
.media-body a:focus, a:hover {
    text-decoration: none;
}
/*
 *
 * SEARCH
 *
 */
.search-box {
    min-height: 20px;
    padding: 19px 29px;
    margin-bottom: 20px;
    background-color: #007AFF;
    border: 1px solid #E3E3E3;
}
.search-box .input-group-addon:first-child {
    border-radius: 0px !important;
    padding-left: 6px;
    padding-right: 0px;
}
.search-box .input-group-addon:last-child {
    border-radius: 0px !important;
    padding-left: 10px;
    padding-right:10px;
}
.search-box .input-group input{
    border-left: 0px none;
    border-right:0px none;
}
.radio-group,
.checkbox-group,
.services-group,
.feature-group{
	margin-top: 15px;
	margin-bottom: 15px;
	text-align: center;
}
.radio-group i,
.services-group i,
.checkbox-group i{
	font-size: 24pt;
	display: block;
}
.feature-group i{
	font-size: 18pt;
	display: block;
}
.radio-group input,
.checkbox-group input{
	display: none;
}
/*
 *
 * RATING
 *
 */
.rating{
  color: #a9a9a9;
  margin: 0;
  padding: 0;
}

ul.rating {
  display: block;
  text-align: center;
}

.rating li {
  list-style-type: none;
  display: inline-block;
  padding: 1px;
  text-align: center;
  font-size: 24pt;
  cursor: pointer;
}

.apartas-item .rating li {
  font-size: 18pt;
}

.apartas-item ul.rating {
  text-align: left;
}

.rating .filled.yellow{
  color: #ffcd02;
}
.rating .filled.black{
  color: #000000;
}
.rating .filled.blue{
  color: #007AFF;
}
/*
 *
 * PROFILE
 *
 */
.profile{
  padding: 60px 40px;
  height: 100%;
  background-color:#eee;
}
.profile img{
  float: none;
}

/* Main carousel style */
.carousel {
    width: 600px;
}

/* Indicators list style */
.article-slide .carousel-indicators {
    bottom: 0;
    left: 0;
    margin-left: 5px;
    width: 100%;
}
/* Indicators list style */
.article-slide .carousel-indicators li {
    border: medium none;
    border-radius: 0;
    float: left;
    height: 54px;
    margin-bottom: 5px;
    margin-left: 0;
    margin-right: 5px !important;
    margin-top: 0;
    width: 100px;
}
/* Indicators images style */
.article-slide .carousel-indicators img {
    border: 2px solid #FFFFFF;
    float: left;
    height: 54px;
    left: 0;
    width: 100px;
}
/* Indicators active image style */
.article-slide .carousel-indicators .active img {
    border: 2px solid #428BCA;
    opacity: 0.7;
}

/*
 *
 * LIST APARTAS
 *
 */
.list-inline>li {
    padding: 0;
}
.apartas-item {
    -webkit-box-shadow: 1px 1px 0 rgba(0,0,0,.2);
    box-shadow: 1px 1px 0 rgba(0,0,0,.2);
    border: 1px solid #ededed;
    padding: 10px!important;
    margin: 0px!important;
}
.apartas-list {
	padding: 0 !important;
	margin: 0 !important;
}
.apartas-descrip {
	padding-top: 10px !important;
}
.fnt-smaller {
    font-size: .9em;
}
.btm-mrg-10 {
    margin-bottom: 10px!important;
}
.list-inline {
    color: #535353;
	 margin: 0!important;
}
.img-list-apartas {
	max-width:100%;
	height:auto;
}

/*
 * Social Buttons for Bootstrap
 *
 * Copyright 2013 Panayiotis Lipiridis
 * Licensed under the MIT License
 *
 * https://phone.com/lipis/bootstrap-social
 */

.btn-social{position:relative;padding-left:44px;margin:5px;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.btn-social :first-child{position:absolute;left:0;top:0;bottom:0;width:32px;line-height:34px;font-size:1.6em;text-align:center;border-right:1px solid rgba(0,0,0,0.2)}
.btn-social.btn-lg{padding-left:61px}.btn-social.btn-lg :first-child{line-height:45px;width:45px;font-size:1.8em}
.btn-social.btn-sm{padding-left:38px}.btn-social.btn-sm :first-child{line-height:28px;width:28px;font-size:1.4em}
.btn-social.btn-xs{padding-left:30px}.btn-social.btn-xs :first-child{line-height:20px;width:20px;font-size:1.2em}
.btn-social-icon{position:relative;padding-left:44px;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;height:34px;width:34px;padding-left:0;padding-right:0}.btn-social-icon :first-child{position:absolute;left:0;top:0;bottom:0;width:32px;line-height:34px;font-size:1.6em;text-align:center;border-right:1px solid rgba(0,0,0,0.2)}
.btn-social-icon.btn-lg{padding-left:61px}.btn-social-icon.btn-lg :first-child{line-height:45px;width:45px;font-size:1.8em}
.btn-social-icon.btn-sm{padding-left:38px}.btn-social-icon.btn-sm :first-child{line-height:28px;width:28px;font-size:1.4em}
.btn-social-icon.btn-xs{padding-left:30px}.btn-social-icon.btn-xs :first-child{line-height:20px;width:20px;font-size:1.2em}
.btn-social-icon :first-child{border:none;text-align:center;width:100% !important}
.btn-social-icon.btn-lg{height:45px;width:45px;padding-left:0;padding-right:0}
.btn-social-icon.btn-sm{height:30px;width:30px;padding-left:0;padding-right:0}
.btn-social-icon.btn-xs{height:22px;width:22px;padding-left:0;padding-right:0}

.btn-facebook{color:#fff;background-color:#3b5998;border-color:rgba(0,0,0,0.2)}.btn-facebook:hover,.btn-facebook:focus,.btn-facebook:active,.btn-facebook.active,.open .dropdown-toggle.btn-facebook{color:#fff;background-color:#30487b;border-color:rgba(0,0,0,0.2)}
.btn-facebook:active,.btn-facebook.active,.open .dropdown-toggle.btn-facebook{background-image:none}
.btn-facebook.disabled,.btn-facebook[disabled],fieldset[disabled] .btn-facebook,.btn-facebook.disabled:hover,.btn-facebook[disabled]:hover,fieldset[disabled] .btn-facebook:hover,.btn-facebook.disabled:focus,.btn-facebook[disabled]:focus,fieldset[disabled] .btn-facebook:focus,.btn-facebook.disabled:active,.btn-facebook[disabled]:active,fieldset[disabled] .btn-facebook:active,.btn-facebook.disabled.active,.btn-facebook[disabled].active,fieldset[disabled] .btn-facebook.active{background-color:#3b5998;border-color:rgba(0,0,0,0.2)}

.btn-phone{color:#fff;background-color:#444;border-color:rgba(0,0,0,0.2)}.btn-phone:hover,.btn-phone:focus,.btn-phone:active,.btn-phone.active,.open .dropdown-toggle.btn-phone{color:#fff;background-color:#303030;border-color:rgba(0,0,0,0.2)}
.btn-phone:active,.btn-phone.active,.open .dropdown-toggle.btn-phone{background-image:none}
.btn-phone.disabled,.btn-phone[disabled],fieldset[disabled] .btn-phone,.btn-phone.disabled:hover,.btn-phone[disabled]:hover,fieldset[disabled] .btn-phone:hover,.btn-phone.disabled:focus,.btn-phone[disabled]:focus,fieldset[disabled] .btn-phone:focus,.btn-phone.disabled:active,.btn-phone[disabled]:active,fieldset[disabled] .btn-phone:active,.btn-phone.disabled.active,.btn-phone[disabled].active,fieldset[disabled] .btn-phone.active{background-color:#444;border-color:rgba(0,0,0,0.2)}

.btn-google-plus{color:#fff;background-color:#dd4b39;border-color:rgba(0,0,0,0.2)}.btn-google-plus:hover,.btn-google-plus:focus,.btn-google-plus:active,.btn-google-plus.active,.open .dropdown-toggle.btn-google-plus{color:#fff;background-color:#ca3523;border-color:rgba(0,0,0,0.2)}
.btn-google-plus:active,.btn-google-plus.active,.open .dropdown-toggle.btn-google-plus{background-image:none}
.btn-google-plus.disabled,.btn-google-plus[disabled],fieldset[disabled] .btn-google-plus,.btn-google-plus.disabled:hover,.btn-google-plus[disabled]:hover,fieldset[disabled] .btn-google-plus:hover,.btn-google-plus.disabled:focus,.btn-google-plus[disabled]:focus,fieldset[disabled] .btn-google-plus:focus,.btn-google-plus.disabled:active,.btn-google-plus[disabled]:active,fieldset[disabled] .btn-google-plus:active,.btn-google-plus.disabled.active,.btn-google-plus[disabled].active,fieldset[disabled] .btn-google-plus.active{background-color:#dd4b39;border-color:rgba(0,0,0,0.2)}


text:
//// [classAbstractConstructorAssignability.ts]
class A {}

abstract class B extends A {}

class C extends B {}

var AA : typeof A = B;
var BB : typeof B = A;
var CC : typeof C = B;

new AA;
new BB;
new CC;

//// [classAbstractConstructorAssignability.js]
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var A = /** @class */ (function () {
    function A() {
    }
    return A;
}());
var B = /** @class */ (function (_super) {
    __extends(B, _super);
    function B() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return B;
}(A));
var C = /** @class */ (function (_super) {
    __extends(C, _super);
    function C() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return C;
}(B));
var AA = B;
var BB = A;
var CC = B;
new AA;
new BB;
new CC;


text:
package br.org.arquitetura.api;

import java.io.Serializable;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.List;

import javax.inject.Inject;
import javax.ws.rs.Consumes;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

import br.org.arquitetura.dto.IDto;
import br.org.arquitetura.excecao.EntidadeJaExisteExcecao;
import br.org.arquitetura.excecao.EntidadeNaoEncontradaExcecao;
import br.org.arquitetura.model.business.facade.IBusinessFacade;

/**
 * Classe abstrata que contém comportamento padrão de APIs do sistema.
 *
 * @param <D>
 *            tipo do DTO que representa a Entidade.
 *
 * @see br.org.arquitetura.model.business.facade.AbstractBusinessFacade
 */
@Consumes({ MediaType.APPLICATION_JSON })
@Produces({ MediaType.APPLICATION_JSON })
public abstract class AbstractApi<D extends IDto, P extends Serializable> {

    protected String apiPath;

    @Inject
    protected IBusinessFacade<D, P> businessFacade;

    public Response adicionar(D dto) throws EntidadeJaExisteExcecao, EntidadeNaoEncontradaExcecao, URISyntaxException {
        dto = businessFacade.adicionar(dto);
        return Response.created(new URI(apiPath + "/" + dto.getId())).build();
    }

    public Response listar() {
        List<D> dtos = businessFacade.listar();
        return Response.ok(dtos).build();
    }

    public Response remover(P chavePrimaria) throws EntidadeNaoEncontradaExcecao {
        businessFacade.remover(chavePrimaria);
        return Response.ok().build();
    }

    public Response atualizar(D dto) throws EntidadeNaoEncontradaExcecao, EntidadeJaExisteExcecao {
        dto = businessFacade.atualizar(dto);
        return Response.ok(dto).build();
    }

    public Response recuperar(P chavePrimaria) throws EntidadeNaoEncontradaExcecao {
        D dto = businessFacade.recuperar(chavePrimaria);
        return Response.ok(dto).build();
    }
}


text:
import { dispatch } from "lux.js";
import Mousetrap from "./MousetrapWrapper";

export { default as KeyboardShortcutScope } from "./KeyboardShortcutScope";
export { default as KeyboardInputManager } from "./KeyboardInputManager";
export { default as keyboardShortcutWrapper } from "./keyboardShortcutWrapper";
/*
	Example structure of keyMaps arg:

	{
		"board-quickAdd": {
			isExclusive: false, // optional - only needed if being set to true
			shortcuts: {
				"board-closeQuickAddPanel": {
					keys: [ "esc" ],
					info: "board.shortcuts.closeQuickAdd"
				}
			}
		},
		"board-view": {
			isExclusive: false,
			shortcuts: {
				"board-addCard": {
					keys: [ "a" ],
					info: "board.shortcuts.addCard"
				}
			}
		}
	}
*/
export function loadKeyMap( keyMaps ) {
	dispatch( "receiveKeyMaps", keyMaps );
}

export function unbindAllShortcuts() {
	return Mousetrap.reset();
}

export function disableShortcuts() {
	dispatch( "disableKeyboardShortcuts" );
}

export function enableShortcuts() {
	dispatch( "enableKeyboardShortcuts" );
}


text:
#include <deque>

#include "tensorflow/core/framework/partial_tensor_shape.h"
#include "tensorflow/core/framework/tensor.h"
#include "tensorflow/core/kernels/data/dataset.h"
#include "tensorflow/core/lib/core/error_codes.pb.h"

namespace tensorflow {

namespace {

// See documentation in ../ops/dataset_ops.cc for a high-level
// description of the following op.

class PrefetchDatasetOp : public UnaryDatasetOpKernel {
 public:
  explicit PrefetchDatasetOp(OpKernelConstruction* ctx)
      : UnaryDatasetOpKernel(ctx) {}

 protected:
  void MakeDataset(OpKernelContext* ctx, DatasetBase* input,
                   DatasetBase** output) override {
    int64 buffer_size;
    OP_REQUIRES_OK(
        ctx, ParseScalarArgument<int64>(ctx, "buffer_size", &buffer_size));
    OP_REQUIRES(ctx, buffer_size > 0,
                errors::InvalidArgument("buffer_size must be > 0"));

    *output = new Dataset(ctx, input, buffer_size);
  }

 private:
  class Dataset : public GraphDatasetBase {
   public:
    Dataset(OpKernelContext* ctx, const DatasetBase* input, int64 buffer_size)
        : GraphDatasetBase(ctx), input_(input), buffer_size_(buffer_size) {
      input_->Ref();
    }

    ~Dataset() override { input_->Unref(); }

    std::unique_ptr<IteratorBase> MakeIterator(
        const string& prefix) const override {
      return std::unique_ptr<IteratorBase>(
          new Iterator({this, strings::StrCat(prefix, "::Prefetch")}));
    }

    const DataTypeVector& output_dtypes() const override {
      return input_->output_dtypes();
    }
    const std::vector<PartialTensorShape>& output_shapes() const override {
      return input_->output_shapes();
    }

    string DebugString() override { return "PrefetchDatasetOp::Dataset"; }

   protected:
    Status AsGraphDefInternal(OpKernelContext* ctx, DatasetGraphDefBuilder* b,
                              Node** output) const override {
      Node* input_graph_node = nullptr;
      TF_RETURN_IF_ERROR(b->AddParentDataset(ctx, input_, &input_graph_node));
      Node* buffer_size = nullptr;
      TF_RETURN_IF_ERROR(b->AddScalar(buffer_size_, &buffer_size));
      TF_RETURN_IF_ERROR(
          b->AddDataset(this, {input_graph_node, buffer_size}, output));
      return Status::OK();
    }

   private:
    class Iterator : public DatasetIterator<Dataset> {
     public:
      explicit Iterator(const Params& params)
          : DatasetIterator<Dataset>(params),
            input_impl_(params.dataset->input_->MakeIterator(params.prefix)) {}

      ~Iterator() override {
        // Signal the prefetch thread to terminate it. We will then
        // join that thread when we delete `this->prefetch_thread_`.
        //
        // TODO(mrry): Replace this cancellation logic with a
        // CancellationManager. The syntax would be more heavyweight,
        // but it would be possible to thread a cancellation manager
        // through the IteratorContext to upstream,
        // potentially-blocking iterators, when we add these.
        {
          mutex_lock l(mu_);
          cancelled_ = true;
          cond_var_.notify_all();
        }
      }

      Status GetNextInternal(IteratorContext* ctx,
                             std::vector<Tensor>* out_tensors,
                             bool* end_of_sequence) override {
        mutex_lock l(mu_);
        TF_RETURN_IF_ERROR(EnsurePrefetchThreadStarted(ctx));

        while (true) {
          // Wait until the next element in the buffer has been
          // produced, or we are shutting down.
          while (!cancelled_ && !prefetch_thread_finished_ && buffer_.empty()) {
            cond_var_.wait(l);
          }

          if (cancelled_) {
            return errors::Cancelled(
                "PrefetchDatasetOp::Dataset::Iterator::GetNext");
          }

          if (!buffer_.empty()) {
            // A new element is available. Forward the status from
            // computing it, and (if we successfully got an element)
            // the output values.
            Status s = buffer_.front().status;
            if (s.ok()) {
              *out_tensors = std::move(buffer_.front().value);
            }
            buffer_.pop_front();
            *end_of_sequence = false;

            // Wake the prefetch thread, in case it has been waiting
            // for space in the buffer.
            // Also wake up threads from other calls to GetNext.
            // TODO(mrry): Consider using different condition variables
            // for GetNext and Prefetch.
            cond_var_.notify_all();
            return s;
          } else if (prefetch_thread_finished_) {
            *end_of_sequence = true;
            return Status::OK();
          }
        }
      }

     protected:
      Status SaveInternal(IteratorStateWriter* writer) override {
        // Acquire both locks to ensure that the prefetch thread and
        // all GetNext threads are blocked.
        mutex_lock parent_l(parent_mu_);
        mutex_lock l(mu_);
        TF_RETURN_IF_ERROR(SaveParent(writer, input_impl_));
        TF_RETURN_IF_ERROR(
            writer->WriteScalar(full_name("buffer_size"), buffer_.size()));
        for (size_t i = 0; i < buffer_.size(); i++) {
          auto& buffer_element = buffer_[i];
          TF_RETURN_IF_ERROR(WriteStatus(writer, i, buffer_element.status));
          if (buffer_element.status.ok()) {
            TF_RETURN_IF_ERROR(writer->WriteScalar(
                full_name(strings::StrCat("buffer[", i, "].size")),
                buffer_element.value.size()));
            for (size_t j = 0; j < buffer_element.value.size(); j++) {
              TF_RETURN_IF_ERROR(writer->WriteTensor(
                  strings::StrCat("buffer[", i, "][", j, "]"),
                  buffer_element.value[j]));
            }
          }
        }
        return Status::OK();
      }

      Status RestoreInternal(OpKernelContext* ctx,
                             IteratorStateReader* reader) override {
        mutex_lock parent_l(parent_mu_);
        mutex_lock l(mu_);
        buffer_.clear();
        TF_RETURN_IF_ERROR(RestoreParent(ctx, reader, input_impl_));
        size_t buffer_size;
        {
          int64 temp;
          TF_RETURN_IF_ERROR(
              reader->ReadScalar(full_name("buffer_size"), &temp));
          buffer_size = static_cast<size_t>(temp);
        }
        for (size_t i = 0; i < buffer_size; i++) {
          buffer_.emplace_back();
          auto& buffer_element = buffer_.back();
          TF_RETURN_IF_ERROR(ReadStatus(reader, i, &buffer_element.status));
          if (buffer_element.status.ok()) {
            size_t value_size;
            {
              int64 temp;
              TF_RETURN_IF_ERROR(reader->ReadScalar(
                  full_name(strings::StrCat("buffer[", i, "].size")), &temp));
              value_size = static_cast<size_t>(temp);
            }
            buffer_element.value.reserve(value_size);
            for (size_t j = 0; j < value_size; j++) {
              buffer_element.value.emplace_back();
              TF_RETURN_IF_ERROR(reader->ReadTensor(
                  strings::StrCat("buffer[", i, "][", j, "]"),
                  &buffer_element.value.back()));
            }
          }
        }
        return Status::OK();
      }

     private:
      // A buffer element comprises a status and (if that status is
      // OK) a vector of tensors, representing an element of the input dataset.
      struct BufferElement {
        // The producer sets `status` if getting the input element fails.
        Status status;
        // The buffered data element.
        std::vector<Tensor> value;
      };

      Status EnsurePrefetchThreadStarted(IteratorContext* ctx)
          EXCLUSIVE_LOCKS_REQUIRED(mu_) {
        if (!prefetch_thread_) {
          prefetch_thread_.reset(
              ctx->env()->StartThread({}, "prefetch_thread",
                                      std::bind(&Iterator::PrefetchThread, this,
                                                new IteratorContext(*ctx))));
        }
        return Status::OK();
      }

      // Prefetches elements of the input, storing results in an internal
      // buffer.
      //
      // It owns the iterator context passed to it.
      void PrefetchThread(IteratorContext* ctx) {
        std::unique_ptr<IteratorContext> cleanup(ctx);
        while (true) {
          std::vector<Tensor> value;

          // 1. Wait for a slot in the buffer.
          {
            mutex_lock l(mu_);
            while (!cancelled_ && buffer_.size() == dataset()->buffer_size_) {
              cond_var_.wait(l);
            }

            if (cancelled_) {
              return;
            }
          }

          // 2. Read the next element.
          // Acquire the parent lock since we will be reading an element
          // from the input iterator. Note that we do not wish to release
          // this lock till we have added the fetched element to the
          // `buffer_` else there will be local state that may be missed
          // by SaveInternal.
          mutex_lock parent_l(parent_mu_);
          bool end_of_sequence;
          BufferElement buffer_element;
          buffer_element.status = input_impl_->GetNext(
              ctx, &buffer_element.value, &end_of_sequence);
          if (buffer_element.status.ok() && end_of_sequence) {
            mutex_lock l(mu_);
            prefetch_thread_finished_ = true;
            cond_var_.notify_all();
            return;
          }

          // 3. Signal that the element has been produced.
          {
            mutex_lock l(mu_);
            buffer_.push_back(std::move(buffer_element));
            cond_var_.notify_all();
          }
        }
      }

      Status WriteStatus(IteratorStateWriter* writer, size_t index,
                         const Status& status) EXCLUSIVE_LOCKS_REQUIRED(mu_) {
        TF_RETURN_IF_ERROR(writer->WriteScalar(
            CodeKey(index), static_cast<int64>(status.code())));
        if (!status.ok()) {
          TF_RETURN_IF_ERROR(writer->WriteScalar(ErrorMessageKey(index),
                                                 status.error_message()));
        }
        return Status::OK();
      }

      Status ReadStatus(IteratorStateReader* reader, size_t index,
                        Status* status) EXCLUSIVE_LOCKS_REQUIRED(mu_) {
        int64 code_int;
        TF_RETURN_IF_ERROR(reader->ReadScalar(CodeKey(index), &code_int));
        error::Code code = static_cast<error::Code>(code_int);

        if (code != error::Code::OK) {
          string error_message;
          TF_RETURN_IF_ERROR(
              reader->ReadScalar(ErrorMessageKey(index), &error_message));
          *status = Status(code, error_message);
        } else {
          *status = Status::OK();
        }
        return Status::OK();
      }

      string CodeKey(size_t index) {
        return full_name(strings::StrCat("status[", index, "].code"));
      }

      string ErrorMessageKey(size_t index) {
        return full_name(strings::StrCat("status[", index, "].error_message"));
      }

      // This mutex is used to ensure exclusivity between multiple threads
      // reading/writing this iterator's local state.
      mutex mu_;
      // This mutex is used to ensure exclusivity between multiple threads
      // accessing the parent iterator. We keep this separate from `mu_` to
      // allow prefetching to run in parallel with GetNext calls.
      mutex parent_mu_ ACQUIRED_BEFORE(mu_);
      const std::unique_ptr<IteratorBase> input_impl_ GUARDED_BY(parent_mu_);
      condition_variable cond_var_;
      std::deque<BufferElement> buffer_ GUARDED_BY(mu_);
      std::unique_ptr<Thread> prefetch_thread_ GUARDED_BY(mu_);
      bool cancelled_ GUARDED_BY(mu_) = false;
      bool prefetch_thread_finished_ GUARDED_BY(mu_) = false;
    };

    const DatasetBase* const input_;
    const int64 buffer_size_;
  };
};

REGISTER_KERNEL_BUILDER(Name("PrefetchDataset").Device(DEVICE_CPU),
                        PrefetchDatasetOp);

}  // namespace

}  // namespace tensorflow


text:
import json

from flask import current_app, request, stream_with_context, Response
from twisted.web.wsgi import _InputStream
from requests import request as make_request

class NoSuchPlatform(Exception):
    pass

def get_desired_capabilities(data):
    return json.loads(data).get("desiredCapabilities")

def check_platform(platform):
    platforms = []
    for node in current_app.nodes:
        platforms += node.platforms

    if not platform in platforms:
        raise NoSuchPlatform(platform)

def request_closed():
    if isinstance(request.input_stream, _InputStream):
        return request.input_stream._wrapped.closed
    else:
        return request.input_stream.closed

def proxy(node):
    response = make_request(
        request.method,
        "http://%s:%s/%s" % (node.host, node.port, request.path),
        data=request.data,  stream=True)
    return Response(stream_with_context(response.iter_content()), content_type=response.headers['content-type'])

def parse_session_id(response):
    return json.loads(response.data).get("sessionId")

def get_new_session(dc):
    session = current_app.queue.enqueue(dc)
    from time import sleep
    while not request_closed() and session.node is None:
        sleep(0.1)

    response = proxy(session.node)
    session.node.unlock()
    current_app.sessions.add(parse_session_id(response), session.node)
    return response

def delete_session(session_id):
    node = current_app.sessions.node(session_id)
    response = proxy(node)
    current_app.sessions.remove(session_id)
    return response


text:
import boto3
import sys
import time

def cleanup(client, vpc_id, sg_id):
    in_use_found = False
    try:
        response = client.describe_network_interfaces(
            Filters=[
                {
                    'Name': 'vpc-id',
                    'Values': [
                        str(vpc_id),
                    ]
                },
                {
                    'Name': 'group-id',
                    'Values': [
                        str(sg_id),
                    ]
                },
            ],
        )
        for item in response['NetworkInterfaces']:
            if "AWS Lambda VPC ENI" in item['Description']:
                if item['Status'] == 'in-use':
                    in_use_found = True
                if item['Status'] == 'available':
                    # delete the ENI
                    print("Item to delete: " + str(item['NetworkInterfaceId']))
                    response = client.delete_network_interface(
                         NetworkInterfaceId=str(item['NetworkInterfaceId'])
                    )
        if in_use_found:
            print("Still In use ENIs found")
            time.sleep(30)
            cleanup(client, vpc_id, sg_id)
        else:
            return True
    except Exception as message:
        print(message)

if __name__ == u"__main__":
    client = boto3.client('ec2')
    cleanup(client, sys.argv[1], sys.argv[2])


text:
/*global document:true, jasmine:true, bespoke:true, describe:true, it:true, expect:true, beforeEach:true */

Function.prototype.bind = Function.prototype.bind || require("function-bind");

var bespoke = require("bespoke"),
    analytics = require("../../lib-instrumented/bespoke-analytics.js");

(function(document, jasmine, bespoke, describe, it, expect, beforeEach) {
    "use strict";

    describe("bespoke-analytics", function() {

        var deck,

            createDeck = function() {
                var parent = document.createElement("article");
                for (var i = 0; i < 10; i++) {
                    parent.appendChild(document.createElement("section"));
                }

                deck = bespoke.from(parent, [
                    analytics()
                ]);
            },

            expectToBeActive = function(index) {
                expect(deck.slides[index].classList.contains("bespoke-active")).toBe(true);
            },

            expectToBeInactive = function(index) {
                expect(deck.slides[index].classList.contains("bespoke-inactive")).toBe(true);
            };

        beforeEach(createDeck);

        describe("deck.trackActiveSlide on next", function() {
            it("should call window.ga", function() {
                var originalGoogleAnalytics = window.ga,
                    gaSpy = jasmine.createSpy("window.ga");

                window.ga = gaSpy;
                deck.next();
                window.ga = originalGoogleAnalytics;

                expect(gaSpy).toHaveBeenCalled();
            });
        });
    });
}(document, jasmine, bespoke, describe, it, expect, beforeEach));


text:
VF.Test.TextBracket = (function(){
  var TextBracket = {
    Start: function() {
      QUnit.module("TextBracket");
      VF.Test.runTests("Simple TextBracket", VF.Test.TextBracket.simple0);
      VF.Test.runTests("TextBracket Styles", VF.Test.TextBracket.simple1);
    },

    simple0: function(options, contextBuilder) {
      expect(0);

      options.contextBuilder = contextBuilder;
      var ctx = new options.contextBuilder(options.canvas_sel, 650, 200);
      ctx.scale(1, 1); ctx.fillStyle = "#221"; ctx.strokeStyle = "#221";
      ctx.font = " 10pt Arial";
      //ctx.translate(0.5, 0.5);
      var stave = new VF.Stave(10, 40, 550).addTrebleGlyph();
      stave.setContext(ctx).draw();

      function newNote(note_struct) { return new VF.StaveNote(note_struct); }

      var notes = [
        {keys: ["c/4"], duration: "4"},
        {keys: ["c/4"], duration: "4"},
        {keys: ["c/4"], duration: "4"},
        {keys: ["c/4"], duration: "4"}
      ].map(newNote);

      var voice = new VF.Voice(VF.TIME4_4).setStrict(false);
      voice.addTickables(notes);

      var octave_top = new VF.TextBracket({
        start: notes[0],
        stop: notes[3],
        text: "15",
        superscript: "va",
        position: 1
      });

      var octave_bottom = new VF.TextBracket({
        start: notes[0],
        stop: notes[3],
        text: "8",
        superscript: "vb",
        position: -1
      });

      octave_bottom.setLine(3);

      new VF.Formatter().joinVoices([voice]).formatToStave([voice], stave);
      voice.draw(ctx, stave);

      octave_top.setContext(ctx).draw();
      octave_bottom.setContext(ctx).draw();
    },

    simple1: function(options, contextBuilder) {
      expect(0);

      options.contextBuilder = contextBuilder;
      var ctx = new options.contextBuilder(options.canvas_sel, 650, 200);
      ctx.scale(1, 1); ctx.fillStyle = "#221"; ctx.strokeStyle = "#221";
      ctx.font = " 10pt Arial";
      //ctx.translate(0.5, 0.5);
      var stave = new VF.Stave(10, 40, 550).addTrebleGlyph();
      stave.setContext(ctx).draw();

      function newNote(note_struct) { return new VF.StaveNote(note_struct); }

      var notes = [
        {keys: ["c/4"], duration: "4"},
        {keys: ["c/4"], duration: "4"},
        {keys: ["c/4"], duration: "4"},
        {keys: ["c/4"], duration: "4"},
        {keys: ["c/4"], duration: "4"}
      ].map(newNote);

      var voice = new VF.Voice(VF.TIME4_4).setStrict(false);
      voice.addTickables(notes);

      var octave_top0 = new VF.TextBracket({
        start: notes[0],
        stop: notes[1],
        text: "Cool notes",
        superscript: "",
        position: 1
      });

      var octave_bottom0 = new VF.TextBracket({
        start: notes[2],
        stop: notes[4],
        text: "Not cool notes",
        superscript: " super uncool",
        position: -1
      });

      octave_bottom0.render_options.bracket_height = 40;
      octave_bottom0.setLine(4);

      var octave_top1 = new VF.TextBracket({
        start: notes[2],
        stop: notes[4],
        text: "Testing",
        superscript: "superscript",
        position: 1
      });

      var octave_bottom1 = new VF.TextBracket({
        start: notes[0],
        stop: notes[1],
        text: "8",
        superscript: "vb",
        position: -1
      });

      octave_top1.render_options.line_width = 2;
      octave_top1.render_options.show_bracket = false;
      octave_bottom1.setDashed(true, [2, 2]);
      octave_top1.setFont({
        weight: "",
        family: "Arial",
        size: 15
      });

      octave_bottom1.font.size = 30;
      octave_bottom1.setDashed(false);
      octave_bottom1.render_options.underline_superscript = false;

      octave_bottom1.setLine(3);

      new VF.Formatter().joinVoices([voice]).formatToStave([voice], stave);
      voice.draw(ctx, stave);

      octave_top0.setContext(ctx).draw();
      octave_bottom0.setContext(ctx).draw();

      octave_top1.setContext(ctx).draw();
      octave_bottom1.setContext(ctx).draw();
    }
  };

  return TextBracket;
})();


text:
<?php

namespace Ratchet\Mock;

use Ratchet\ConnectionInterface;
use Ratchet\Wamp\WampServerInterface;
use Ratchet\WebSocket\WsServerInterface;

class WampComponent implements WampServerInterface, WsServerInterface
{
    public $last = array();

    public $protocols = array();

    public function getSubProtocols()
    {
        return $this->protocols;
    }

    public function onCall(ConnectionInterface $conn, $id, $procURI, array $params)
    {
        $this->last[__FUNCTION__] = func_get_args();
    }

    public function onSubscribe(ConnectionInterface $conn, $topic)
    {
        $this->last[__FUNCTION__] = func_get_args();
    }

    public function onUnSubscribe(ConnectionInterface $conn, $topic)
    {
        $this->last[__FUNCTION__] = func_get_args();
    }

    public function onPublish(ConnectionInterface $conn, $topic, $event, array $exclude, array $eligible)
    {
        $this->last[__FUNCTION__] = func_get_args();
    }

    public function onOpen(ConnectionInterface $conn)
    {
        $this->last[__FUNCTION__] = func_get_args();
    }

    public function onClose(ConnectionInterface $conn)
    {
        $this->last[__FUNCTION__] = func_get_args();
    }

    public function onError(ConnectionInterface $conn, \Exception $e)
    {
        $this->last[__FUNCTION__] = func_get_args();
    }
}


text:
<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/privacy/dlp/v2beta1/dlp.proto

namespace Google\Cloud\Dlp\V2beta1;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Request for the list of info types belonging to a given category,
 * or all supported info types if no category is specified.
 *
 * Generated from protobuf message google.privacy.dlp.v2beta1.ListInfoTypesRequest
 */
class ListInfoTypesRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Category name as returned by ListRootCategories.
     *
     * Generated from protobuf field string category = 1;
     */
    private $category = '';
    /**
     * Optional BCP-47 language code for localized info type friendly
     * names. If omitted, or if localized strings are not available,
     * en-US strings will be returned.
     *
     * Generated from protobuf field string language_code = 2;
     */
    private $language_code = '';

    public function __construct() {
        \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce();
        parent::__construct();
    }

    /**
     * Category name as returned by ListRootCategories.
     *
     * Generated from protobuf field string category = 1;
     * @return string
     */
    public function getCategory()
    {
        return $this->category;
    }

    /**
     * Category name as returned by ListRootCategories.
     *
     * Generated from protobuf field string category = 1;
     * @param string $var
     * @return $this
     */
    public function setCategory($var)
    {
        GPBUtil::checkString($var, True);
        $this->category = $var;

        return $this;
    }

    /**
     * Optional BCP-47 language code for localized info type friendly
     * names. If omitted, or if localized strings are not available,
     * en-US strings will be returned.
     *
     * Generated from protobuf field string language_code = 2;
     * @return string
     */
    public function getLanguageCode()
    {
        return $this->language_code;
    }

    /**
     * Optional BCP-47 language code for localized info type friendly
     * names. If omitted, or if localized strings are not available,
     * en-US strings will be returned.
     *
     * Generated from protobuf field string language_code = 2;
     * @param string $var
     * @return $this
     */
    public function setLanguageCode($var)
    {
        GPBUtil::checkString($var, True);
        $this->language_code = $var;

        return $this;
    }

}


text:
function visualizeBoundary(X, y, model, varargin)
%VISUALIZEBOUNDARY plots a non-linear decision boundary learned by the SVM
%   VISUALIZEBOUNDARYLINEAR(X, y, model) plots a non-linear decision
%   boundary learned by the SVM and overlays the data on it

% Plot the training data on top of the boundary
plotData(X, y)

% Make classification predictions over a grid of values
x1plot = linspace(min(X(:,1)), max(X(:,1)), 100)';
x2plot = linspace(min(X(:,2)), max(X(:,2)), 100)';
[X1, X2] = meshgrid(x1plot, x2plot);
vals = zeros(size(X1));
for i = 1:size(X1, 2)
   this_X = [X1(:, i), X2(:, i)];
   [val, ~,~] = svmpredict(zeros(size(this_X,1),1), this_X,model,'-q');
   vals(:, i) = val;
end

% Plot the SVM boundary
hold on
contour(X1, X2, vals, [0 0], 'Color', 'b');
hold off;

end


text:
"""
This file is part of the everest project.
See LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information.

Package initialization file.

Created on Nov 3, 2011.
"""


text:
import sys
from datetime import datetime

class doSomething:
    def __init__ (self, var):
        self.variable = var
        return

    def get(self):
        return self.variable

def main():
    d = doSomething("hello")
    print d.get()
    return

if __name__ == '__main__':
    main()


text:
def approve_case_step(kase:,
                      expected_team:,
                      expected_status:,
                      expected_notice: "#{expected_team.name} has been notified that the response is ready to send.")
  cases_show_page.actions.clear_case.click
  expect(cases_approve_page).to be_displayed

  if cases_approve_page.has_bypass_press_option?
    cases_approve_page.bypass_press_option.radio_yes.click
    expect(cases_approve_page.bypass_press_option)
      .to have_no_bypass_reason_text
  end

  cases_approve_page.clear_response_button.click
  expect(cases_show_page).to be_displayed(id: kase.id)
  unless expected_notice.nil?
    expect(cases_show_page.notice.text)
      .to eq expected_notice % { number: kase.number, subject: kase.subject }
  end

  open_cases_page.load

  expect(open_cases_page).to be_displayed
  case_row = open_cases_page.row_for_case_number(kase.number)
  expect(case_row.who_its_with.text).to eq expected_team.name
  expect(case_row.status.text).to eq expected_status
end

def approve_case_with_bypass(kase:, expected_team:, expected_status:)
  cases_show_page.actions.clear_case.click
  expect(cases_approve_page).to be_displayed
  expect(cases_approve_page).to have_bypass_press_option
  cases_approve_page.bypass_press_option.radio_no.click
  expect(cases_approve_page.bypass_press_option)
      .to have_bypass_reason_text
  cases_approve_page.bypass_press_option.bypass_reason_text.set 'No Press office approval required'
  cases_approve_page.clear_response_button.click

  expect(cases_show_page).to be_displayed(id: kase.id)
  open_cases_page.load
  case_row = open_cases_page.row_for_case_number(kase.number)
  expect(case_row.who_its_with.text).to eq expected_team.name
  expect(case_row.status.text).to eq expected_status
end

def approve_upload_case_with_bypass(kase:, expected_team:, expected_status:)
  stub_s3_uploader_for_all_files!

  cases_show_page.actions.upload_approve.click
  expect(cases_upload_response_and_approve_page).to be_displayed
  expect(cases_upload_response_and_approve_page).to have_bypass_press_option
  cases_upload_response_and_approve_page.bypass_press_option.radio_no.click
  expect(cases_upload_response_and_approve_page.bypass_press_option)
      .to have_bypass_reason_text
  cases_upload_response_and_approve_page.bypass_press_option.bypass_reason_text.set 'No Press office approval required'
  cases_upload_response_and_approve_page.drop_in_dropzone(UPLOAD_RESPONSE_DOCX_FIXTURE)
  cases_upload_response_and_approve_page.upload_response_button.click

  expect(cases_show_page).to be_displayed(id: kase.id)
  open_cases_page.load
  case_row = open_cases_page.row_for_case_number(kase.number)
  expect(case_row.who_its_with.text).to eq expected_team.name
  expect(case_row.status.text).to eq expected_status
end

def request_amends(kase:, expected_team:, expected_status:, expected_action: nil)
  cases_show_page.actions.request_amends.click
  expect(request_amends_page)
    .to be_displayed(id: kase.id)
  expect(request_amends_page.clearance.action)
    .to have_text(expected_action) if expected_action
  expect(request_amends_page.clearance.expectations.team.text)
    .to eq expected_team.name
  expect(request_amends_page.clearance.expectations.status.text)
    .to eq expected_status
end

def execute_request_amends(expected_flash: 'You have requested amends to this case\'s response.')
  request_amends_page.submit_button.click
  expect(cases_show_page).to be_displayed
  expect(cases_show_page.notice)
    .to have_text expected_flash
end


text:
static TACommandVerdict internal_cmd(TAThread thread,TAInputStream stream)
{
    char* nptr, *endptr;
    mytype res;
    int base, orient, endptr_isnull;

    // Prepare
    nptr=(char*)readPointer(&stream);
    endptr_isnull=readInt(&stream);
    base=readInt(&stream);

    // Execute
    START_TARGET_OPERATION(thread);
    errno=0;
    if(endptr_isnull)
        res = internal_func(nptr, (char**)NULL, base, 0);
    else
        res = internal_func(nptr, &endptr, base, 0);
    END_TARGET_OPERATION(thread);

    // Response
    writeFunc(thread, res);
    if(!endptr_isnull)
        writePointer(thread, endptr);
    writeInt(thread, errno);

    sendResponse(thread);

    return taDefaultVerdict;
}


text:
"""Setup/installation tests for this package."""

from anv.buildout.testing import IntegrationTestCase
from plone import api

class TestInstall(IntegrationTestCase):
    """Test installation of anv.buildout into Plone."""

    def setUp(self):
        """Custom shared utility setup for tests."""
        self.portal = self.layer['portal']
        self.installer = api.portal.get_tool('portal_quickinstaller')

    def test_product_installed(self):
        """Test if anv.buildout is installed with portal_quickinstaller."""
        self.assertTrue(self.installer.isProductInstalled('anv.buildout'))

    def test_uninstall(self):
        """Test if anv.buildout is cleanly uninstalled."""
        self.installer.uninstallProducts(['anv.buildout'])
        self.assertFalse(self.installer.isProductInstalled('anv.buildout'))

    # browserlayer.xml
    def test_browserlayer(self):
        """Test that IAnvBuildoutLayer is registered."""
        from anv.buildout.interfaces import IAnvBuildoutLayer
        from plone.browserlayer import utils
        self.failUnless(IAnvBuildoutLayer in utils.registered_layers())


text:
#pragma once

#include <cstdio>
#include <string>
#include <exception>
#include "./timer.hpp"

namespace darwin {
	class warning final : public std::exception {
		std::string mWhat = "Darwin Warning";
	public:
		warning() = default;

		warning(const std::string &str) noexcept:
			mWhat("Darwin Warning:" + str) {}

		warning(const warning &) = default;

		warning(warning &&) = default;

		virtual ~warning() = default;

		virtual const char *what() const noexcept override
		{
			return this->mWhat.c_str();
		}
	};

	class error final : public std::exception {
		std::string mWhat = "Darwin Error";
	public:
		error() = default;

		error(const std::string &str) noexcept:
			mWhat("Darwin Error:" + str) {}

		error(const error &) = default;

		error(error &&) = default;

		virtual ~error() = default;

		error &operator=(const error &)= default;

		error &operator=(error &&)= default;

		virtual const char *what() const noexcept override
		{
			return this->mWhat.c_str();
		}
	};

	class outfs final {
		FILE *mfp = nullptr;
	public:
		outfs() = default;

		outfs(const char *path) : mfp(fopen(path, "w")) {}

		outfs(const std::string &path) : mfp(fopen(path.c_str(), "w")) {}

		~outfs()
		{
			if (this->mfp != nullptr) fclose(this->mfp);
		}

		outfs &operator=(const outfs &)= delete;

		operator bool() const noexcept
		{
			return this->mfp != nullptr;
		}

		bool usable() const noexcept
		{
			return this->mfp != nullptr;
		}

		void open(const char *path)
		{
			if (this->mfp == nullptr) {
				this->mfp = fopen(path, "w");
			}
		}

		void open(const std::string &path)
		{
			if (this->mfp == nullptr) {
				this->mfp = fopen(path.c_str(), "w");
			}
		}

		void close()
		{
			if (this->mfp != nullptr)
				fclose(this->mfp);
			this->mfp = nullptr;
		}

		template<typename...ArgsT>
		void printf(const char *format, ArgsT...args)
		{
			fprintf(this->mfp, format, args...);
		}

		void flush()
		{
			if (this->mfp != nullptr) {
				fflush(this->mfp);
			}
		}
	};

#ifndef DARWIN_DISABLE_LOG

	class debugger final {
		static outfs out;
	public:
#ifdef DARWIN_STRICT_CHECK
		static constexpr bool strict=true;
#else
		static constexpr bool strict = false;
#endif
#ifdef DARWIN_IGNORE_WARNING
		static constexpr bool ignore=true;
#else
		static constexpr bool ignore = false;
#endif

		static void log(const char *file, int line, const char *func, const char *msg)
		{
			if (!out.usable())
				out.open("./darwin_runtime.log");
			out.printf("[Darwin Log(%ums)]:In function \"%s\"(%s:%d):%s\n", timer::time(), func, file, line, msg);
		}

		static void warning(const char *file, int line, const char *func, const char *msg)
		{
			if (ignore)
				return;
			if (!out.usable())
				out.open("./darwin_runtime.log");
			out.printf("[Darwin Warning(%ums)]:In function \"%s\"(%s:%d):%s\n", timer::time(), func, file, line, msg);
			if (strict) {
				out.flush();
				std::terminate();
			}
		}

		static void error(const char *file, int line, const char *func, const char *msg)
		{
			out.printf("[Darwin Error(%ums)]:In function \"%s\"(%s:%d):%s\n", timer::time(), func, file, line, msg);
			out.flush();
			std::terminate();
		}

		static void log_path(const char *path)
		{
			out.close();
			out.open(path);
		}
	};

	outfs debugger::out;
#endif
}

#ifndef DARWIN_DISABLE_LOG

#define Darwin_Log(msg) darwin::debugger::log(__FILE__,__LINE__,__func__,msg);
#define Darwin_Warning(msg) darwin::debugger::warning(__FILE__,__LINE__,__func__,msg);
#define Darwin_Error(msg) darwin::debugger::error(__FILE__,__LINE__,__func__,msg);
#define Darwin_Set_Log_Path(path) darwin::debugger::log_path(path);

#else

#define Darwin_Log(msg)

#ifndef DARWIN_STRICT_CHECK

#define Darwin_Warning(msg)

#else

#define Darwin_Warning(msg) throw darwin::warning(msg);

#endif

#define Darwin_Error(msg) throw darwin::error(msg);
#define Darwin_Set_Log_Path(path)

#endif


text:
/*
 * (c) LibriCore
 *
 * Created on Dec 6, 2004
 *
 * S_CACHE_BIB_ITM_DSPLY.java
 */
package org.folio.marccat.dao.persistence;

import net.sf.hibernate.CallbackException;
import net.sf.hibernate.Session;
import org.folio.marccat.business.common.Persistence;
import org.folio.marccat.business.common.PersistenceState;
import org.folio.marccat.dao.AbstractDAO;
import org.folio.marccat.exception.DataAccessException;

import java.io.Serializable;

/**
 * @author paulm
 * @version $Revision: 1.2 $, $Date: 2005/12/21 13:33:34 $
 * @since 1.0
 */
public class Cache implements Persistence {
  private int bibItemNumber;
  private short cataloguingView;
  private char formOfItemCode;
  private String languageOfCataloguingCode;
  private char itemRecordTypeCode;
  private boolean relationshipCode;
  private boolean locationCode;
  private String titleVolumeNumberDescription;
  private String Date1;
  private String Date2;
  private String titleHeadingMainSortForm;
  private String mainEntrySortForm;
  private String codeTableAbreviatedName;
  private String nameMainEntryStringText;
  private String titleHeadingUniformStringText;
  private String titleHeadingMainStringText;
  private String editionStrngTxt;
  private String publisherStrngTxt;
  private String collationStrngTxt;
  private String titleHeadingSeriesStringText;
  private PersistenceState persistenceState = new PersistenceState();

  public Cache() {
    super();
    // TODO Auto-generated constructor stub
  }

  public Cache(int amicusNumber, short cataloguingView) {
    this();
    this.bibItemNumber = amicusNumber;
    this.cataloguingView = cataloguingView;
  }

  /**
   * @since 1.0
   */
  public int getBibItemNumber() {
    return bibItemNumber;
  }

  /**
   * @since 1.0
   */
  public void setBibItemNumber(int i) {
    bibItemNumber = i;
  }

  /**
   * @since 1.0
   */
  public short getCataloguingView() {
    return cataloguingView;
  }

  /**
   * @since 1.0
   */
  public void setCataloguingView(short s) {
    cataloguingView = s;
  }

  /**
   * @since 1.0
   */
  public PersistenceState getPersistenceState() {
    return persistenceState;
  }

  /**
   * @since 1.0
   */
  public void setPersistenceState(PersistenceState state) {
    persistenceState = state;
  }

  /* (non-Javadoc)
   * @see java.lang.Object#equals(java.lang.Object)
   */
  public boolean equals(Object arg0) {
    if (arg0 instanceof Cache) {
      Cache s = (Cache) arg0;
      return getBibItemNumber() == s.getBibItemNumber() &&
        getCataloguingView() == s.getCataloguingView();
    }
    return false;
  }

  /**
   * @since 1.0
   */
  public void evict(Object obj) throws DataAccessException {
    persistenceState.evict(obj);
  }

  public void evict() throws DataAccessException {
    evict(this);
  }

  /**
   * @since 1.0
   */
  public AbstractDAO getDAO() {
    return persistenceState.getDAO();
  }

  /**
   * @since 1.0
   */
  public int getUpdateStatus() {
    return persistenceState.getUpdateStatus();
  }

  /**
   * @since 1.0
   */
  public void setUpdateStatus(int i) {
    persistenceState.setUpdateStatus(i);
  }

  /* (non-Javadoc)
   * @see java.lang.Object#hashCode()
   */
  public int hashCode() {
    return getBibItemNumber() + getCataloguingView();
  }

  /**
   * @since 1.0
   */
  public boolean isChanged() {
    return persistenceState.isChanged();
  }

  /**
   * @since 1.0
   */
  public boolean isDeleted() {
    return persistenceState.isDeleted();
  }

  /**
   * @since 1.0
   */
  public boolean isNew() {
    return persistenceState.isNew();
  }

  /**
   * @since 1.0
   */
  public boolean isRemoved() {
    return persistenceState.isRemoved();
  }

  /**
   * @since 1.0
   */
  public void markChanged() {
    persistenceState.markChanged();
  }

  /**
   * @since 1.0
   */
  public void markDeleted() {
    persistenceState.markDeleted();
  }

  /**
   * @since 1.0
   */
  public void markNew() {
    persistenceState.markNew();
  }

  /**
   * @since 1.0
   */
  public void markUnchanged() {
    persistenceState.markUnchanged();
  }

  /**
   * @since 1.0
   */
  public boolean onDelete(Session arg0) throws CallbackException {
    return persistenceState.onDelete(arg0);
  }

  /**
   * @since 1.0
   */
  public void onLoad(Session arg0, Serializable arg1) {
    persistenceState.onLoad(arg0, arg1);
  }

  /**
   * @since 1.0
   */
  public boolean onSave(Session arg0) throws CallbackException {
    return persistenceState.onSave(arg0);
  }

  /**
   * @since 1.0
   */
  public boolean onUpdate(Session arg0) throws CallbackException {
    return persistenceState.onUpdate(arg0);
  }

  /* (non-Javadoc)
   * @see librisuite.business.common.Persistence#generateNewKey()
   */
  public void generateNewKey() throws DataAccessException {
    // not applicable for this class

  }

  /**
   * @since 1.0
   */
  public String getCodeTableAbreviatedName() {
    return codeTableAbreviatedName;
  }

  /**
   * @since 1.0
   */
  public void setCodeTableAbreviatedName(String string) {
    codeTableAbreviatedName = string;
  }

  /**
   * @since 1.0
   */
  public String getCollationStrngTxt() {
    return collationStrngTxt;
  }

  /**
   * @since 1.0
   */
  public void setCollationStrngTxt(String string) {
    collationStrngTxt = string;
  }

  /**
   * @since 1.0
   */
  public String getDate1() {
    return Date1;
  }

  /**
   * @since 1.0
   */
  public void setDate1(String string) {
    Date1 = string;
  }

  /**
   * @since 1.0
   */
  public String getDate2() {
    return Date2;
  }

  /**
   * @since 1.0
   */
  public void setDate2(String string) {
    Date2 = string;
  }

  /**
   * @since 1.0
   */
  public String getEditionStrngTxt() {
    return editionStrngTxt;
  }

  /**
   * @since 1.0
   */
  public void setEditionStrngTxt(String string) {
    editionStrngTxt = string;
  }

  /**
   * @since 1.0
   */
  public char getFormOfItemCode() {
    return formOfItemCode;
  }

  /**
   * @since 1.0
   */
  public void setFormOfItemCode(char c) {
    formOfItemCode = c;
  }

  /**
   * @since 1.0
   */
  public char getItemRecordTypeCode() {
    return itemRecordTypeCode;
  }

  /**
   * @since 1.0
   */
  public void setItemRecordTypeCode(char c) {
    itemRecordTypeCode = c;
  }

  /**
   * @since 1.0
   */
  public String getLanguageOfCataloguingCode() {
    return languageOfCataloguingCode;
  }

  /**
   * @since 1.0
   */
  public void setLanguageOfCataloguingCode(String string) {
    languageOfCataloguingCode = string;
  }

  /**
   * @since 1.0
   */
  public boolean isLocationCode() {
    return locationCode;
  }

  /**
   * @since 1.0
   */
  public void setLocationCode(boolean b) {
    locationCode = b;
  }

  /**
   * @since 1.0
   */
  public String getMainEntrySortForm() {
    return mainEntrySortForm;
  }

  /**
   * @since 1.0
   */
  public void setMainEntrySortForm(String string) {
    mainEntrySortForm = string;
  }

  /**
   * @since 1.0
   */
  public String getNameMainEntryStringText() {
    return nameMainEntryStringText;
  }

  /**
   * @since 1.0
   */
  public void setNameMainEntryStringText(String string) {
    nameMainEntryStringText = string;
  }

  /**
   * @since 1.0
   */
  public String getPublisherStrngTxt() {
    return publisherStrngTxt;
  }

  /**
   * @since 1.0
   */
  public void setPublisherStrngTxt(String string) {
    publisherStrngTxt = string;
  }

  /**
   * @since 1.0
   */
  public boolean isRelationshipCode() {
    return relationshipCode;
  }

  /**
   * @since 1.0
   */
  public void setRelationshipCode(boolean b) {
    relationshipCode = b;
  }

  /**
   * @since 1.0
   */
  public String getTitleHeadingMainSortForm() {
    return titleHeadingMainSortForm;
  }

  /**
   * @since 1.0
   */
  public void setTitleHeadingMainSortForm(String string) {
    titleHeadingMainSortForm = string;
  }

  /**
   * @since 1.0
   */
  public String getTitleHeadingMainStringText() {
    return titleHeadingMainStringText;
  }

  /**
   * @since 1.0
   */
  public void setTitleHeadingMainStringText(String string) {
    titleHeadingMainStringText = string;
  }

  /**
   * @since 1.0
   */
  public String getTitleHeadingSeriesStringText() {
    return titleHeadingSeriesStringText;
  }

  /**
   * @since 1.0
   */
  public void setTitleHeadingSeriesStringText(String string) {
    titleHeadingSeriesStringText = string;
  }

  /**
   * @since 1.0
   */
  public String getTitleHeadingUniformStringText() {
    return titleHeadingUniformStringText;
  }

  /**
   * @since 1.0
   */
  public void setTitleHeadingUniformStringText(String string) {
    titleHeadingUniformStringText = string;
  }

  /**
   * @since 1.0
   */
  public String getTitleVolumeNumberDescription() {
    return titleVolumeNumberDescription;
  }

  /**
   * @since 1.0
   */
  public void setTitleVolumeNumberDescription(String string) {
    titleVolumeNumberDescription = string;
  }

}


text:
{{::vm.translate.get('Create Menu')}}

{{::vm.translate.get('Edit Menu')}}

{{::vm.translate.get('Add Menu Items')}}

                        <form>

                                        {{::vm.translate.get('Name')}}
                                        {{::vm.translate.get('Type')}}

<input type="text" ng-model="entityFilter.name" class="form-control" />

                                                <select class="form-control" ng-model="entityFilter.entityTypeId" ng-options="entity.id as entity.name for entity in vm.entityTypes"></select>

                                                    <input type="checkbox" ng-checked="entity.isChecked" ng-click="vm.toggleEntity(entity)"> {{entity.name}}

                                        {{entity.entityTypeName}}

                                <button type="button" class="btn btn-default " ng-click="vm.addMenuItems()">{{::vm.translate.get('Add')}}</button>

                        </form>

{{::vm.translate.get('Add Custom Link')}}

                        <form name="addCustomLinkForm">

                                {{::vm.translate.get('Name')}}
                                <input type="text" required ng-model="vm.addingCustomLink.name" class="form-control">

                                {{::vm.translate.get('Link')}}
                                <input type="text" required ng-model="vm.addingCustomLink.customLink" class="form-control">

                            <button type="button" ng-disabled="addCustomLinkForm.$invalid" ng-click="vm.addCustomLink()" class="btn btn-default">{{::vm.translate.get('Add Custom Link')}}</button>
                        </form>

                <form name="pageForm" class="form-horizontal">

{{error}}

                        {{::vm.translate.get('Name')}}

                            <input name="name" ng-model="vm.menu.name" class="form-control" />

                        {{::vm.translate.get('Items')}}

                                    <input type="checkbox" ng-model="vm.menu.isPublished"> {{::vm.translate.get('Is Published')}}

                            <button class="btn btn-primary" ng-click="vm.save()"> {{::vm.translate.get('Save')}}</button>
                            <button ui-sref="menus" class="btn btn-default">{{::vm.translate.get('Cancel')}}</button>

                </form>


text:
<?php

namespace AnimeDb\SmartSleep\Rule;

class HolidayRule implements HourIntervalRule
{
    use HourlyIntervalRuleTrait;
    use RandSecondsRuleTrait;

    /**
     * @param int $start
     * @param int $end
     * @param int $seconds
     */
    public function __construct($start, $end, $seconds)
    {
        $this->setStart($start);
        $this->setEnd($end);
        $this->setSeconds($seconds);
    }

    /**
     * @param \DateTimeImmutable $time
     *
     * @return bool
     */
    public function isMatched(\DateTimeImmutable $time)
    {
        return
            $time->format('N') > 5 &&
            $this->start() <= $time->format('G') &&
            $this->end() > $time->format('G')
        ;
    }
}


text:
#include "wxtimeserieschartctrl.h"

wxTimeSeriesChartCtrl::wxTimeSeriesChartCtrl(wxWindow *parent,
                                             wxWindowID id,
                                             const wxPoint &pos,
                                             const wxSize &size,
                                             long style)
    : wxChartCtrl(parent, id, pos, size, style),
    m_timeSeriesChart(size)
{
}

wxTimeSeriesChartCtrl::wxTimeSeriesChartCtrl(wxWindow *parent,
                                             wxWindowID id,
                                             const wxTimeSeriesChartOptions &options,
                                             const wxPoint &pos,
                                             const wxSize &size,
                                             long style)
    : wxChartCtrl(parent, id, pos, size, style),
    m_timeSeriesChart(size)
{
}

wxTimeSeriesChart& wxTimeSeriesChartCtrl::GetChart()
{
    return m_timeSeriesChart;
}


text:
<?php

namespace App\Components;

use App\Models\Services\Highlight;
use App\Models\Services\Inflection;
use Mikulas\Vlna;
use Nette\Bridges\ApplicationLatte\Template;
use Nette\Utils\DateTime;

class Filters
{

	/**
	 * @var Vlna
	 */
	private $vlna;

	/**
	 * @var Inflection
	 */
	private $inflection;

	public function __construct(Vlna $vlna, Inflection $inflection)
	{
		$this->vlna = $vlna;
		$this->inflection = $inflection;
	}

	public function register(Template $template)
	{
		foreach ([
			'timeAgo', 'duration', 'isoDuration', 'hours', 'minutes', 'templateLink',
	         'lcFirst', 'subjectColor', 'subjectIcon', 'highlight', 'vlna',
		] as $filter)
		{
			$template->addFilter($filter, [$this, $filter]);
		}

		$cases = [
			'nominative' => 1,
			'genitive' => 2,
			'dative' => 3,
			'accusative' => 4,
			'vocative' => 5,
			'locative' => 6,
			'instrumental' => 7,
		];
		foreach ($cases as $name => $case)
		{
			$template->addFilter($name, function($phrase) use ($case) {
				return $this->inflection->inflect($phrase, $case);
			});
		}
	}

	public function timeAgo(DateTime $d)
	{
		return Html::el('time')
			->setText($d->format('j.n.Y H:i'))
			->addAttributes([
				'datetime' => $d->format('c')
			]);
	}

	public function duration($seconds)
	{
		$m = floor($seconds / 60);
		$s = round($seconds - 60 * $m);

		return $m . ':' . str_pad($s, 2, '0', STR_PAD_LEFT);
	}

	public function isoDuration($seconds)
	{
		$h = floor($seconds / 3600);
		$m = floor($seconds / 60 - 60 * $h);
		$s = round($seconds - 60 * $m);

		return 'T' . $h . 'H' . $m . 'M' . str_pad($s, 2, '0', STR_PAD_LEFT) . 'S';
	}

	public function hours($seconds)
	{
		return round($seconds / 3600);
	}

	public function minutes($seconds)
	{
		return round($seconds / 60);
	}

	public function templateLink($link)
	{
		return strtr($link, ['%7B' => '{', '%7D' => '}']);
	}

	public function lcFirst($text)
	{
		return lcFirst($text);
	}

	public function subjectColor($schema)
	{
		return $schema && $schema->subject ? $schema->subject->color : 'gray';
	}

	public function subjectIcon($schema)
	{
		return $schema && $schema->subject ? $schema->subject->icon : 'subject-history';
	}

	public function highlight($phrase)
	{
		return Highlight::process($phrase);
	}

	/**
	 * @param string $content
	 * @return string
	 */
	public function vlna($content)
	{
		$v = $this->vlna;
		return $v($content);
	}

}


text:
require 'test/unit'
require File.dirname(__FILE__) + '/memcache_server_test_helper'
require File.dirname(__FILE__) + '/memcache_segmented_test_helper'

$VERBOSE = nil
Memcache::Segmented.const_set('MAX_SIZE', 3)

class MemcacheSegmentedServerTest < Test::Unit::TestCase
  include MemcacheServerTestHelper
  include MemcacheServerTestHelper::AdvancedMethods
  include MemcacheSegmentedTestHelper

  with_prefixes nil, "foo:", "bar:"

  PORT = 11212
  def setup
    init_memcache(PORT) do
      Memcache::SegmentedServer.new(:host => 'localhost', :port => PORT)
    end
  end
end