text:
const float kBitmapPaddingL = 5;
const float kBitmapPaddingS = 5;

class BPath;

class DockPane : public BControl
{
public:
						DockPane(	BPoint	p,
									uint32	paneAppearance
											= kLargeIconWithCaption );
						DockPane( BMessage* archive );
						~DockPane();
	virtual void		InitObject( void );
	virtual void		AttachedToWindow( void );
	virtual void		Draw( BRect r );
	virtual void		GetPreferredSize( float *w, float *h );
	virtual void		MessageReceived( BMessage *m );
	virtual void		MouseDown( BPoint p );
	virtual void		MouseMoved( BPoint p, uint32 code, const BMessage *m );
	virtual void		MouseUp( BPoint p );

	void				DroppedToOtherPane( void );	// called from peer panes.
	void				SetTo( const entry_ref* ref );
	void				SetTo( const char* ref );
	void				GetPath( BPath* path );
	void				GetRef( entry_ref *ref ) const;
	bool				HasRef( void );
	const char*			Caption( void ) const
							{ return mDockItem->Caption(); }
	status_t			SetPaneAppearance( uint32 paneAppearance );
	const uint32		PaneAppearance( void ) const
							{ return mPaneAppearance; }
	DockItem*			Item( void )
							{ return mDockItem; }
	const BBitmap*		Icon( void );
	// ----------- obsolete ----------------
	status_t			SetDisplayMode( uint32 displayMode )
							{ return SetPaneAppearance( displayMode ); }
	const uint32		DisplayMode( void ) const
							{ return PaneAppearance(); }

protected:

private:
	void				DoubleClicked();
	void				Launch( BMessage* droppedMsg = NULL );
	void				OpenFolder( void );
	void				ClearDockPane( void );
	void				SetWillAccept( bool flag );
	bool				WillAccept( void )
							{ return mWillAccept; }
	void				HighlightBitmap( bool flag );
	void				HighlightPane( bool flag );
	void				PopUpGo( BPoint p );
	void				PopUpForFolder( BPopUpMenu *popUp );
	void				PopUpForFile( BPopUpMenu *popUp );
	void				StartMouseWatchDog( BPoint p );
	void				StopMouseWatchDog( void );

	DockItem*			mDockItem;
	rgb_color			mBgColor;
	rgb_color			mFgColor;
	bool				mPaneHighlight;
	bool				mBitmapHighlight;
	bool				mWillAccept;
	int64				mLastTimeClicked;
	BRect				mBitmapRect;
	uint32				mPaneAppearance;
	static bool			mEnableSingleClick;
	bool				mTracking;
	BPoint				mHotSpot;
	int32				mClicks;
	BMessageRunner*		mMouseWatchDog;
};

// vi: set ts=4:
#endif // _DOCK_PANE_H


text:
<?php namespace Alumni\Providers;

use Illuminate\Bus\Dispatcher;
use Illuminate\Support\ServiceProvider;

class BusServiceProvider extends ServiceProvider {

	/**
	 * Bootstrap any application services.
	 *
	 * @param  \Illuminate\Bus\Dispatcher  $dispatcher
	 * @return void
	 */
	public function boot(Dispatcher $dispatcher)
	{
		$dispatcher->mapUsing(function($command)
		{
			return Dispatcher::simpleMapping(
				$command, 'Alumni\Commands', 'Alumni\Handlers\Commands'
			);
		});
	}

	/**
	 * Register any application services.
	 *
	 * @return void
	 */
	public function register()
	{
		//
	}

}

redpajama_set_name: RedPajamaGithub


text:
import cgi
import json
import os.path
import glob
import re
import collections

from lxml import etree
from openerp.addons.base.ir.ir_qweb import QWebContext, FileSystemLoader
import openerp.modules

from openerp.tests import common
from openerp.addons.base.ir import ir_qweb

class TestQWebTField(common.TransactionCase):
    def setUp(self):
        super(TestQWebTField, self).setUp()
        self.engine = self.registry('ir.qweb')

    def context(self, values):
        return ir_qweb.QWebContext(
            self.cr, self.uid, values, context={'inherit_branding': True})

    def test_trivial(self):
        field = etree.Element('span', {'t-field': u'company.name'})

        Companies = self.registry('res.company')
        company_id = Companies.create(self.cr, self.uid, {
            'name': "My Test Company"
        })
        result = self.engine.render_node(field, self.context({
            'company': Companies.browse(self.cr, self.uid, company_id),
        }))

        self.assertEqual(
            result,
            '%s' % (
                company_id,
                "My Test Company",))

    def test_i18n(self):
        field = etree.Element('span', {'t-field': u'company.name'})

        Companies = self.registry('res.company')
        s = u"Testing «ταБЬℓσ»: 1<2 & 4+1>3, now 20% off!"
        company_id = Companies.create(self.cr, self.uid, {
            'name': s,
        })
        result = self.engine.render_node(field, self.context({
            'company': Companies.browse(self.cr, self.uid, company_id),
        }))

        self.assertEqual(
            result,
            '%s' % (
                company_id,
                cgi.escape(s.encode('utf-8')),))

    def test_reject_crummy_tags(self):
        field = etree.Element('td', {'t-field': u'company.name'})

        with self.assertRaisesRegexp(
                AssertionError,
                r'^RTE widgets do not work correctly'):
            self.engine.render_node(field, self.context({
                'company': None
            }))

    def test_reject_t_tag(self):
        field = etree.Element('t', {'t-field': u'company.name'})

        with self.assertRaisesRegexp(
                AssertionError,
                r'^t-field can not be used on a t element'):
            self.engine.render_node(field, self.context({
                'company': None
            }))

class TestQWeb(common.TransactionCase):
    matcher = re.compile('^qweb-test-(.*)\.xml$')

    @classmethod
    def get_cases(cls):
        path = cls.qweb_test_file_path()

        return (
            cls("test_qweb_{}".format(cls.matcher.match(f).group(1)))
            for f in os.listdir(path)
            # js inheritance
            if f != 'qweb-test-extend.xml'
            if cls.matcher.match(f)
        )
    @classmethod
    def qweb_test_file_path(cls):
        path = os.path.dirname(
            openerp.modules.get_module_resource(
                'web', 'static', 'lib', 'qweb', 'qweb2.js'))
        return path

    def __getattr__(self, item):
        if not item.startswith('test_qweb_'):
            raise AttributeError("No {} on {}".format(item, self))

        f = 'qweb-test-{}.xml'.format(item[10:])
        path = self.qweb_test_file_path()

        return lambda: self.run_test_file(os.path.join(path, f))

    def run_test_file(self, path):
        doc = etree.parse(path).getroot()
        loader = FileSystemLoader(path)
        context = QWebContext(self.cr, self.uid, {}, loader=loader)
        qweb = self.env['ir.qweb']
        for template in loader:
            if not template or template.startswith('_'):
                continue
            param = doc.find('params[@id="{}"]'.format(template))
            # OrderedDict to ensure JSON mappings are iterated in source order
            # so output is predictable & repeatable
            params = {} if param is None else json.loads(param.text, object_pairs_hook=collections.OrderedDict)

            ctx = context.copy()
            ctx.update(params)
            result = doc.find('result[@id="{}"]'.format(template)).text
            self.assertEqual(
                qweb.render(template, qwebcontext=ctx).strip(),
                (result or u'').strip().encode('utf-8'),
                template
            )

def load_tests(loader, suite, _):
    # can't override TestQWeb.__dir__ because dir() called on *class* not
    # instance
    suite.addTests(TestQWeb.get_cases())
    return suite


text:
/**
 * @file
 * @brief AddRange 操作
 */

using System.Collections.Generic;

namespace ThunderEgg.Extentions {

    public static partial class A {

        /// 値をコレクションに足します
        public static ICollection<T> AddRange<T>( //
            this ICollection<T> @this, params T[] vals) //
        {
            for (var i = 0; i < vals.Length; ++i) @this.Add(vals[i]);
            return @this;
        }

        /// 値をコレクションに足します
        public static ICollection<T> AddRange<T>( //
            this ICollection<T> @this, IEnumerable<T> vals) //
        {
            foreach (var t in vals) @this.Add(t);
            return @this;
        }
    }
}


text:
**This package is no longer maintained**. A Vue.js 2 component to draw QR codes on an HTML Canvas using [qrious](https://github.com/neocotic/qrious).

## Installation
- #### NPM / Yarn
  Run `npm install --save vue-qriously`, or `yarn add vue-qriously`

- #### With Modules

  ``` js
  // ES6
  import Vue from 'vue'
  import VueQriously from 'vue-qriously'
  Vue.use(VueQriously)

  // ES5
  var Vue = require('vue')
  Vue.use(require('vue-qriously').default)
  ```

- #### `<script>` Include

  Just include `./dist/vue-qriously.js` after Vue itself.

## Usage

There's nothing you need to do in JavaScript except for installation. To use the plugin, simply use the `qriously` component.

``` html
<qriously value="Hello World!" :size="200" />
```

You may use all of [these](https://github.com/neocotic/qrious#api) props to change the format of your QR code.

## License

[MIT](http://opensource.org/licenses/MIT)


text:
package com.bee.auction.authentication.service;

import com.bee.auction.authentication.model.Role;

import java.util.HashSet;

public interface RoleService {
    HashSet<Role> getUserRoleToSet();

    Role getUserRole();
}


text:
package org.dswarm.converter.flow.test.ralfsmabxml;

import org.dswarm.converter.flow.test.xml.AbstractXMLTransformationFlowTest;

/**
 * @author tgaengler
 */
public abstract class AbstractRalfsMABXMLTransformationFlowTest extends AbstractXMLTransformationFlowTest {

	public AbstractRalfsMABXMLTransformationFlowTest(final String taskJSONFileName, final String taskResultJSONFileName) {

		super(taskJSONFileName, taskResultJSONFileName, "record", "xml", null, "dmpf_bsp1.xml");
	}
}


text:
'use strict';

angular.module('feedID.register').controller('ConfirmCtrl', function ($scope, $rootScope, $http, $location, $routeParams) {
    $scope.countries = [];
    $scope.address = [];
    $scope.actId = $routeParams.activationId;
    $scope.sex = [{id: '0', name:"Man"}, {id: '1', name: "Vrouw"}];
    $scope.user = [];
    $scope.app = [];
    $scope.releaseBtn = false;

    //get App
    $http.get(url + '/api/apps/Profile').success(function(resultApp){
        $scope.app = resultApp;
    });

    //set sex default man
    $scope.user.sex = $scope.sex[0];

    if($scope.user.sex == null){
        $location.url('/');
    }

    //validate user
    $http.get(url + '/api/users/validate/'+$scope.actId).success(function(user){
        $scope.user = user;
        //check if user has an owner (to set new password by claiming user)
        if(!$scope.user.validated){
            var user_id = $scope.user._id;

            //get app to make sure it is set (I made another get app request here because sometimes this userapps request was sent before app was set)
            $http.get(url + '/api/apps/Profile').success(function(resultApp) {
                $scope.app = resultApp;

                $http.get(url + '/api/userapps/' + user_id + '/' + $scope.app._id).success(function (userapp) {
                    if (userapp._id) {
                        $scope.releaseBtn = true;
                    }
                });
            });
        } else {
            $location.url('/');
        }
    });

    //get countries
    $http.get(url + '/api/countries').success(function(countries) {
        for (var c in countries)
            $scope.countries.push(countries[c]);

        $scope.address.country = countries[0];
    });

    //confirm user's personal information
    $scope.confirm = function() {
        $scope.user.validated = true;
        $http.put(url + '/api/users/' + $scope.user._id, $scope.user).success(function(){
            $http.put(url + '/api/users/reset/' + $scope.user._id, $scope.user).success(function() {
                $location.url('/');
            });
        });
    };
});


text:
var supervisord = require('supervisord');
var express = require('express');
var app = express();
var jwt = require('jwt-simple');
const expressJwt = require('express-jwt');
var fs = require('fs');
var bodyParser = require('body-parser');
const config = require('./config.json');
app.use(bodyParser.json()); // to support JSON-encoded bodies
app.use(
    bodyParser.urlencoded({
        // to support URL-encoded bodies
        extended: true
    })
);

const RSA_PUBLIC_KEY = fs.readFileSync(config.key);

const checkIfAuthenticated = expressJwt({
    secret: RSA_PUBLIC_KEY
});

var client = supervisord.connect(config.server);

app.use(function(req, res, next) {
    res.header('Access-Control-Allow-Origin', '*');
    res.header('Access-Control-Allow-Headers', 'Content-Type, Authorization');
    res.header('Access-Control-Allow-Methods', 'PUT, POST, GET, DELETE, OPTIONS');
    next();
});

app.get('/api/*', checkIfAuthenticated, function(req, res) {
    switch (req.url) {
        case '/api/getAllProcesses':
            console.log(req.url);
            getAllProcessInfo(req, res);
            break;

        default:
            console.log('response 404 => unknown url:' + req.url);
            res.sendStatus(404);
    }
});

app.post('/api/*', checkIfAuthenticated, function(req, res) {
    switch (req.url) {
        case '/api/startProcces':
            startProcess(req, res);
            break;
        case '/api/stopProcces':
            stopProcess(req, res);
            break;
        case '/api/restartProcces':
            restartProcess(req, res);
            break;
        case '/api/clearLogs':
            clearLogs(req, res);
            break;
        case '/api/getProcessLog':
            console.log(req.url);
            getProcessLog(req, res);
            break;
        default:
            console.log('response 404 => unknown url:' + req.url);
            res.sendStatus(404);
    }
});

function getAllProcessInfo(req, res) {
    console.log(req.url);
    try {
        client.getAllProcessInfo(function(err, processes) {
            if (err) {
                console.log(err);
                res.sendStatus(500);
            } else {
                var token = fromHeaderOrQuerystring(req);
                var decoded = jwt.decode(token, RSA_PUBLIC_KEY);
                var to_return = [];
                processes.forEach(function(process) {
                    to_return.push({
                        name: process.name,
                        statename: process.statename,
                        start: process.start,
                        stop: process.stop,
                        now: process.now
                    });
                });
                res.json({ response: to_return });
                console.log(to_return);
            }
        });
    } catch (err) {
        console.log(err); // bar
        res.sendStatus(500);
    }
}
function startProcess(req, res) {
    try {
        console.log('restart process');
        console.log(req.body.process);
        client.startProcess(req.body.process, function(err, result) {
            res.json({ result: result });
        });
    } catch (err) {
        console.log(err); // bar
        res.sendStatus(500);
    }
}
function stopProcess(req, res) {
    try {
        console.log('restart process');
        console.log(req.body.process);
        client.stopProcess(req.body.process, function(err, result) {
            res.json({ result: result });
        });
    } catch (err) {
        console.log(err); // bar
        res.sendStatus(500);
    }
}

function restartProcess(req, res) {
    try {
        console.log('restart process');
        console.log(req.body.process);
        client.stopProcess(req.body.process, function(err, result) {
            client.startProcess(req.body.process, function(err, result) {
                res.json({ result: result });
            });
        });
    } catch (err) {
        console.log(err); // bar
        res.sendStatus(500);
    }
}
function clearLogs(req, res) {
    try {
        console.log('restart process');
        console.log(req.body.process);
        client.clearProcessLogs(req.body.process, function(err, result) {
            res.json({ result: result });
        });
    } catch (err) {
        console.log(err); // bar
        res.sendStatus(500);
    }
}
function getProcessLog(req, res) {
    try {
        console.log('log requested');
        console.log(req.body.process);
        client.tailProcessStdoutLog(req.body.process, 0, 10000, function(err, result) {
            console.log(result);
            res.json({ response: result });
        });
    } catch (err) {
        console.log(err); // bar
        res.sendStatus(500);
    }
}
function fromHeaderOrQuerystring(req) {
    if (req.headers.authorization && req.headers.authorization.split(' ')[0] === 'Bearer') {
        return req.headers.authorization.split(' ')[1];
    } else if (req.query && req.query.token) {
        return req.query.token;
    }
    return null;
}

const PORT = config.port;
app.listen(PORT, () => {
    console.log(`Webservice running on port ${PORT}`);
});


text:
<?php

class Google_Service_Dataflow_TemplateMetadata extends Google_Collection
{
  protected $collection_key = 'parameters';
  public $description;
  public $name;
  protected $parametersType = 'Google_Service_Dataflow_ParameterMetadata';
  protected $parametersDataType = 'array';

  public function setDescription($description)
  {
    $this->description = $description;
  }
  public function getDescription()
  {
    return $this->description;
  }
  public function setName($name)
  {
    $this->name = $name;
  }
  public function getName()
  {
    return $this->name;
  }
  /**
   * @param Google_Service_Dataflow_ParameterMetadata[]
   */
  public function setParameters($parameters)
  {
    $this->parameters = $parameters;
  }
  /**
   * @return Google_Service_Dataflow_ParameterMetadata[]
   */
  public function getParameters()
  {
    return $this->parameters;
  }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;

class SoftUniBeerPong
{
    static void Main()
    {
        Dictionary<string, Dictionary<string, int>> gamesBase =
            new Dictionary<string, Dictionary<string, int>>();

        gamesBase = InsertTeamAndUpToThreeUsers();

        gamesBase = RemoveLessThanThreeUsers(gamesBase);

        var sumDic = SumTeamsPoints(gamesBase);

        PrinTeamUser(gamesBase, sumDic);
    }

    private static Dictionary<string, Dictionary<string, int>> InsertTeamAndUpToThreeUsers()
    {
        var dictionary = new Dictionary<string, Dictionary<string, int>>();

        while (true)
        {
            string readLine = Console.ReadLine();

            if (readLine.Equals("stop the game"))
            {
                break;
            }
            else
            {
                string[] input = readLine
                    .Split(new[] { ' ', '|' }, StringSplitOptions.RemoveEmptyEntries)
                    .ToArray();

                string player = input[0];
                string team = input[1];
                int pointsMade = int.Parse(input[2]);

                if (!dictionary.ContainsKey(team))
                {
                    dictionary.Add(team, new Dictionary<string, int>());
                    dictionary[team][player] = pointsMade;
                }

                foreach (var kvpTeam in dictionary)
                {
                    string teamKey = kvpTeam.Key;
                    var players = kvpTeam.Value;

                    if (teamKey == team)
                    {
                        if (players.Count() < 3)
                        {
                            dictionary[team][player] = pointsMade;
                            break;
                        }
                        else
                        {
                            break;
                        }
                    }
                }
            }
        }

        return dictionary;
    }

    private static Dictionary<string, Dictionary<string, int>> RemoveLessThanThreeUsers(Dictionary<string, Dictionary<string, int>> gamesBase)
    {
        var dictionary = gamesBase
            .Where(x => x.Value.Keys.Count.Equals(3))
            .ToDictionary(x => x.Key, x => x.Value);

        return dictionary;
    }

    private static Dictionary<string, long> SumTeamsPoints(
        Dictionary<string, Dictionary<string, int>> gamesBase)
    {
        var dictionary = new Dictionary<string, long>();

        foreach (var kvpBase in gamesBase)
        {
            string team = kvpBase.Key;
            long sum = kvpBase.Value.Values.Sum();

            foreach (var kvpPlayer in kvpBase.Value)
            {
                if (!dictionary.ContainsKey(team))
                {
                    dictionary.Add(team, sum);
                }
            }
        }

        return dictionary
            .OrderByDescending(x => x.Value)
            .ToDictionary(x => x.Key, x => x.Value);
    }

    private static void PrinTeamUser(Dictionary<string, Dictionary<string, int>> gamesBase, Dictionary<string, long> sumDic)
    {
        int count = 1;

        foreach (var kvpSum in sumDic)
        {
            foreach (var kvpBase in gamesBase)
            {
                if (kvpSum.Key == kvpBase.Key)
                {
                    Console.WriteLine(
                        $"{count}. {kvpBase.Key}; Players:");

                    var players = kvpBase.Value
                         .OrderByDescending(x => x.Value)
                         .ToDictionary(x => x.Key, x => x.Value);

                    foreach (var kvpPlayer in players)
                    {
                        Console.WriteLine(
                            $"###{kvpPlayer.Key}: {kvpPlayer.Value}");
                    }
                }
            }

            count++;
        }
    }
}


text:
import { useCurrentStateAndParams, useRouter } from '@uirouter/react';
import { useCallback, useEffect, FunctionComponent } from 'react';

import { LoadingSpinner } from '@waldur/core/LoadingSpinner';
import { translate } from '@waldur/i18n';
import { UsersService } from '@waldur/user/UsersService';

import { AuthService } from '../AuthService';

export const AuthLoginCompleted: FunctionComponent = () => {
  const router = useRouter();
  const { params } = useCurrentStateAndParams();
  const completeAuth = useCallback(
    async (token, method) => {
      AuthService.setAuthHeader(token);
      const user = await UsersService.getCurrentUser();
      AuthService.loginSuccess({
        data: { ...user, method },
      });
      router.stateService.go('profile.details');
    },
    [router.stateService],
  );
  useEffect(() => {
    completeAuth(params.token, params.method);
  }, [completeAuth, params]);

  return (

      <LoadingSpinner />

{translate('Logging user in')}

  );
};


text:
var React = require('react-native');

var {
  View,
  NativeImagePicker,
  Component,
  Text,
  Image,
  Alert,
  AlertIOS,
  ListView,
  StyleSheet,
  ScrollView,
  TouchableHighlight,
  TouchableOpacity,
  TouchableWithoutFeedback,
  TextInput,
  DeviceEventEmitter,
  Dimensions,
  NativeModules: {
    ImagePickerManager
  }
} = React;

var currentView = 'start'
const dismissKeyboard = require('dismissKeyboard')
class FulfillmentViewPage extends Component {

  sendImage() {
    var ref = new Firebase("https://snapdrop.firebaseio.com");
    var authData = ref.getAuth();

    var fulfillmentsRef = new Firebase("https://snapdrop.firebaseio.com/fulfillments")
    fulfillmentsRef.push({
      requestKey: this.props.requestKey,
      requestImage: this.props.sourceIm,
      caption: this.state.captionText,
      userUID: authData.uid
    })
    this.props.navigator.popN(2);
  }

  cancelImage() {
    this.props.navigator.popN(1);
  }

  keyboardWillShow (e) {
    let newSize = Dimensions.get('window').height - e.endCoordinates.height;
    this.setState({visibleHeight: newSize});
  }

  keyboardWillHide (e) {
    this.setState({visibleHeight: Dimensions.get('window').height});
  }

  constructor(props) {
    super(props)
    this.state = {
      captionText: '',
      visibleHeight: Dimensions.get('window').height
    };
  }

  componentDidMount() {
  let self = this;

  DeviceEventEmitter.addListener('keyboardWillShow', function(e: Event) {
    self.keyboardWillShow(e);
  });

  DeviceEventEmitter.addListener('keyboardWillHide', function(e: Event) {
        self.keyboardWillHide(e);
    });
  }

  dismiss() {
    dismissKeyboard();
    this.sendImage();
  }

  twoEvents() {
    Alert.alert("CONFIRMATION", "YOUR PHOTO WAS SENT", () => this.dismiss());
  }

  render() {
    return (
      <TouchableWithoutFeedback onPress={()=> dismissKeyboard()}>
          <View style={{height: this.state.visibleHeight}}>
        <View style={styles.container}>
          <View style={styles.container}>
            <Image style={styles.canvas} source={this.props.sourceIm} />
          </View>
          <View style={styles.captionContainer}>
            <TextInput style={styles.textEdit} placeholderTextColor={'#FFF'} placeholder="CAPTION" onChangeText={(captionText) => this.setState({captionText})}/>
          </View>
          <View style={styles.buttonContainer}>
            <TouchableHighlight
              style={styles.button}
              underlayColor='#9FA8DA'
              onPress={()=> this.twoEvents()}>
              <Text style={styles.buttonText}>SEND</Text>
            </TouchableHighlight>
            <TouchableHighlight
              style={styles.button}
              underlayColor='#9FA8DA'
              onPress={() => this.cancelImage()}>
              <Text style={styles.buttonText}>CANCEL</Text>
            </TouchableHighlight>
          </View>
        </View>
        </View>
      </TouchableWithoutFeedback>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: 'rgba(236,64,122,1)',
  },
  canvas: {
    height: 800,
    width: 400,
  },
  buttonContainer: {
    marginBottom: 40,
  },
  captionContainer: {
    position: 'absolute',
    top: 240,
  },
  button: {
    height: 36,
    width: 300,
    marginTop: 20,
    borderRadius: 10,
    justifyContent: 'center',
    backgroundColor: '#FFF',
  },
  buttonText: {
    color: 'rgba(236,64,122,1)',
    textAlign: 'center',
    // marginTop: 10,
    fontWeight: 'bold',
  },
  buttonText: {
    color: 'rgba(236,64,122,1)',
    textAlign: 'center',
    // marginTop: 10,
    fontWeight: 'bold',
  },
  text: {
    color: '#FFF'
  },
  textEdit: {
    fontWeight: 'bold',
    height: 40,
    width: 400,
    color: '#FFF',
    borderColor: 'rgba(255,255,255,0.7)',
    backgroundColor: 'rgba(236,64,122,0.3)',
    borderWidth: 2,
    borderRadius: 5,
    marginLeft: -10,
    textAlign: 'center',
    alignItems: 'center',
  },
});

module.exports = FulfillmentViewPage;


text:
Test Strea wrapper registered
--FILE--
<?php
var_dump(in_array("extension-embed", stream_get_wrappers()));
?>
--EXPECTF--
bool(true)


text:
"use strict";
const template = require('./counter.html');

class CounterController {
  /**
   * @param {TodoList} TodoList
   */
  count: number;
  constructor($interval) {
    "ngInject";
    this.count = 0;
    $interval(() => this.increaseCount(), 1000);
  }
  increaseCount() {
    this.count += 1000;
  }
  onAlert() {
    window.alert('you hot swapped the shit out of me !!');
  }
}

export default {
  bindings: {},
  template,
  controller: CounterController
}


text:
<?xml version="1.0" encoding="UTF-8"?>

<document>
  <segment instanceid="email_221197.txt_1" begin="0" end="57">
    <text>Message-ID: <16267978.1075861634185.JavaMail.evans@thyme></text>
    <annotation annotator="gold" mainReferentGenericity="CANNOT_DECIDE" mainVerbAspectualClass="CANNOT_DECIDE"/>
    <annotation annotator="A" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
    <annotation annotator="D" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
    <annotation annotator="B" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
  </segment>
  <segment instanceid="email_221197.txt_2" begin="58" end="101">
    <text>Date: Thu, 15 Nov 2001 13:46:02 -0800 (PST)</text>
    <annotation annotator="gold" mainReferentGenericity="CANNOT_DECIDE" mainVerbAspectualClass="CANNOT_DECIDE"/>
    <annotation annotator="A" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
    <annotation annotator="D" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
    <annotation annotator="B" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
  </segment>
  <segment instanceid="email_221197.txt_3" begin="102" end="123">
    <text>From: jacton@crai.com</text>
    <annotation annotator="gold" mainReferentGenericity="CANNOT_DECIDE" mainVerbAspectualClass="CANNOT_DECIDE"/>
    <annotation annotator="A" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
    <annotation annotator="D" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
    <annotation annotator="B" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
  </segment>
  <segment instanceid="email_221197.txt_4" begin="124" end="148">
    <text>To: d..steffes@enron.com</text>
    <annotation annotator="gold" mainReferentGenericity="CANNOT_DECIDE" mainVerbAspectualClass="CANNOT_DECIDE"/>
    <annotation annotator="A" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
    <annotation annotator="D" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
    <annotation annotator="B" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
  </segment>
  <segment instanceid="email_221197.txt_5" begin="149" end="186">
    <text>Subject: Confidential for Dan Watkiss</text>
    <annotation annotator="gold" mainReferentGenericity="CANNOT_DECIDE" mainVerbAspectualClass="CANNOT_DECIDE"/>
    <annotation annotator="A" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
    <annotation annotator="D" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
    <annotation annotator="B" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
  </segment>
  <segment instanceid="email_221197.txt_6" begin="187" end="204">
    <text>Mime-Version: 1.0</text>
    <annotation annotator="gold" mainReferentGenericity="CANNOT_DECIDE" mainVerbAspectualClass="CANNOT_DECIDE"/>
    <annotation annotator="A" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
    <annotation annotator="D" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
    <annotation annotator="B" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
  </segment>
  <segment instanceid="email_221197.txt_7" begin="205" end="247">
    <text>Content-Type: text/plain; charset=us-ascii</text>
    <annotation annotator="gold" mainReferentGenericity="CANNOT_DECIDE" mainVerbAspectualClass="CANNOT_DECIDE"/>
    <annotation annotator="A" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
    <annotation annotator="D" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
    <annotation annotator="B" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
  </segment>
  <segment instanceid="email_221197.txt_8" begin="248" end="279">
    <text>Content-Transfer-Encoding: 7bit</text>
    <annotation annotator="gold" mainReferentGenericity="CANNOT_DECIDE" mainVerbAspectualClass="CANNOT_DECIDE"/>
    <annotation annotator="A" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
    <annotation annotator="D" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
    <annotation annotator="B" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
  </segment>
  <segment instanceid="email_221197.txt_9" begin="281" end="284">
    <text>Jim</text>
    <annotation annotator="gold" mainReferentGenericity="CANNOT_DECIDE" mainVerbAspectualClass="CANNOT_DECIDE"/>
    <annotation annotator="A" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
    <annotation annotator="D" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
    <annotation annotator="B" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
  </segment>
  <segment instanceid="email_221197.txt_10" begin="287" end="341">
    <text>If you are able to provide this to Dan for the meeting</text>
    <mainVerb begin="294" end="297">are</mainVerb>
    <mainReferent begin="0" end="10">Message-ID</mainReferent>
    <annotation annotator="gold" seType="STATE" mainReferentGenericity="NON-GENERIC" habituality="STATIC" mainVerbAspectualClass="STATIVE"/>
    <annotation annotator="A" seType="STATE" mainReferentGenericity="NON-GENERIC" habituality="STATIC" mainVerbAspectualClass="STATIVE"/>
    <annotation annotator="D" seType="STATE" mainReferentGenericity="NON-GENERIC" habituality="STATIC" mainVerbAspectualClass="STATIVE"/>
    <annotation annotator="B" seType="STATE" mainReferentGenericity="NON-GENERIC" habituality="STATIC" mainVerbAspectualClass="STATIVE"/>
  </segment>
  <segment instanceid="email_221197.txt_11" begin="342" end="364">
    <text>I would appreciate it.</text>
    <mainVerb begin="350" end="360">appreciate</mainVerb>
    <mainReferent begin="342" end="343">I</mainReferent>
    <annotation annotator="gold" seType="STATE" mainReferentGenericity="NON-GENERIC" habituality="STATIC" mainVerbAspectualClass="STATIVE"/>
    <annotation annotator="A" seType="STATE" mainReferentGenericity="NON-GENERIC" habituality="STATIC" mainVerbAspectualClass="STATIVE"/>
    <annotation annotator="D" seType="STATE" mainReferentGenericity="NON-GENERIC" habituality="STATIC" mainVerbAspectualClass="STATIVE"/>
    <annotation annotator="B" seType="STATE" mainReferentGenericity="NON-GENERIC" habituality="STATIC" mainVerbAspectualClass="STATIVE"/>
  </segment>
  <segment instanceid="email_221197.txt_12" begin="367" end="412">
    <text>He may not want to circulate it to the group.</text>
    <mainVerb begin="378" end="382">want</mainVerb>
    <mainReferent begin="367" end="369">He</mainReferent>
    <annotation annotator="gold" seType="STATE" mainReferentGenericity="NON-GENERIC" habituality="STATIC" mainVerbAspectualClass="STATIVE"/>
    <annotation annotator="A" seType="STATE" mainReferentGenericity="NON-GENERIC" habituality="STATIC" mainVerbAspectualClass="STATIVE"/>
    <annotation annotator="D" seType="STATE" mainReferentGenericity="NON-GENERIC" habituality="STATIC" mainVerbAspectualClass="STATIVE"/>
    <annotation annotator="B" seType="STATE" mainReferentGenericity="NON-GENERIC" habituality="STATIC" mainVerbAspectualClass="DYNAMIC"/>
  </segment>
  <segment instanceid="email_221197.txt_13" begin="414" end="460">
    <text>It is intended as a work product for attorney.</text>
    <mainVerb begin="417" end="419">is</mainVerb>
    <mainReferent begin="414" end="416">It</mainReferent>
    <annotation annotator="gold" seType="STATE" mainReferentGenericity="NON-GENERIC" habituality="STATIC" mainVerbAspectualClass="STATIVE"/>
    <annotation annotator="A" seType="STATE" mainReferentGenericity="NON-GENERIC" habituality="STATIC" mainVerbAspectualClass="STATIVE"/>
    <annotation annotator="D" seType="STATE" mainReferentGenericity="NON-GENERIC" habituality="STATIC" mainVerbAspectualClass="STATIVE"/>
    <annotation annotator="B" seType="STATE" mainReferentGenericity="NON-GENERIC" habituality="STATIC" mainVerbAspectualClass="STATIVE"/>
  </segment>
  <segment instanceid="email_221197.txt_14" begin="463" end="535">
    <text>This e-mail and the attachments were prepared at the request of counsel.</text>
    <mainVerb begin="500" end="508">prepared</mainVerb>
    <mainReferent begin="468" end="474">e-mail</mainReferent>
    <annotation annotator="gold" seType="EVENT" mainReferentGenericity="NON-GENERIC" habituality="EPISODIC" mainVerbAspectualClass="DYNAMIC"/>
    <annotation annotator="A" seType="EVENT" mainReferentGenericity="NON-GENERIC" habituality="EPISODIC" mainVerbAspectualClass="DYNAMIC"/>
    <annotation annotator="D" seType="EVENT" mainReferentGenericity="NON-GENERIC" habituality="EPISODIC" mainVerbAspectualClass="DYNAMIC"/>
    <annotation annotator="B" seType="EVENT" mainReferentGenericity="NON-GENERIC" habituality="EPISODIC" mainVerbAspectualClass="DYNAMIC"/>
  </segment>
  <segment instanceid="email_221197.txt_15" begin="538" end="561">
    <text><<NOTES FOR DISCUSSION.</text>
    <annotation annotator="gold" mainReferentGenericity="CANNOT_DECIDE" mainVerbAspectualClass="CANNOT_DECIDE"/>
    <annotation annotator="A" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
    <annotation annotator="D" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
    <annotation annotator="B" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
  </segment>
  <segment instanceid="email_221197.txt_16" begin="561" end="566">
    <text>doc>></text>
    <annotation annotator="gold" mainReferentGenericity="CANNOT_DECIDE" mainVerbAspectualClass="CANNOT_DECIDE"/>
    <annotation annotator="A" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
    <annotation annotator="D" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
    <annotation annotator="B" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
  </segment>
  <segment instanceid="email_221197.txt_17" begin="569" end="697">
    <text>Jan Paul Acton Vice President Charles River Associates 1201 F St., NW, Suite 700 Washington, DC 20004-1204 Voice: (202) 662 3902</text>
    <annotation annotator="gold" mainReferentGenericity="CANNOT_DECIDE" mainVerbAspectualClass="CANNOT_DECIDE"/>
    <annotation annotator="A" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
    <annotation annotator="D" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
    <annotation annotator="B" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
  </segment>
  <segment instanceid="email_221197.txt_18" begin="699" end="718">
    <text>Fax: (202) 662 3910</text>
    <annotation annotator="gold" mainReferentGenericity="CANNOT_DECIDE" mainVerbAspectualClass="CANNOT_DECIDE"/>
    <annotation annotator="A" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
    <annotation annotator="D" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
    <annotation annotator="B" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
  </segment>
  <segment instanceid="email_221197.txt_19" begin="720" end="796">
    <text>****************************************************************************</text>
    <annotation annotator="gold" mainReferentGenericity="CANNOT_DECIDE" mainVerbAspectualClass="CANNOT_DECIDE"/>
    <annotation annotator="A" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
    <annotation annotator="D" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
    <annotation annotator="B" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
  </segment>
  <segment instanceid="email_221197.txt_20" begin="798" end="803">
    <text>*****</text>
    <mainVerb begin="798" end="803">*****</mainVerb>
    <mainReferent begin="540" end="545">NOTES</mainReferent>
    <annotation annotator="gold" mainReferentGenericity="CANNOT_DECIDE" mainVerbAspectualClass="CANNOT_DECIDE"/>
    <annotation annotator="A" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
    <annotation annotator="D" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
    <annotation annotator="B" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
  </segment>
  <segment instanceid="email_221197.txt_21" begin="804" end="907">
    <text>This electronic message contains information from the consulting firm of Charles River Associates Inc.,</text>
    <mainVerb begin="828" end="836">contains</mainVerb>
    <mainReferent begin="820" end="827">message</mainReferent>
    <annotation annotator="gold" seType="STATE" mainReferentGenericity="NON-GENERIC" habituality="STATIC" mainVerbAspectualClass="STATIVE"/>
    <annotation annotator="A" seType="STATE" mainReferentGenericity="NON-GENERIC" habituality="STATIC" mainVerbAspectualClass="STATIVE"/>
    <annotation annotator="D" seType="STATE" mainReferentGenericity="NON-GENERIC" habituality="STATIC" mainVerbAspectualClass="STATIVE"/>
    <annotation annotator="B" seType="STATE" mainReferentGenericity="NON-GENERIC" habituality="STATIC" mainVerbAspectualClass="STATIVE"/>
  </segment>
  <segment instanceid="email_221197.txt_22" begin="908" end="948">
    <text>which may be confidential or privileged.</text>
    <mainVerb begin="918" end="920">be</mainVerb>
    <mainReferent begin="902" end="906">Inc.</mainReferent>
    <annotation annotator="gold" seType="STATE" mainReferentGenericity="NON-GENERIC" habituality="STATIC" mainVerbAspectualClass="STATIVE"/>
    <annotation annotator="A" seType="STATE" mainReferentGenericity="NON-GENERIC" habituality="STATIC" mainVerbAspectualClass="STATIVE"/>
    <annotation annotator="D" seType="STATE" mainReferentGenericity="NON-GENERIC" habituality="STATIC" mainVerbAspectualClass="STATIVE"/>
    <annotation annotator="B" seType="STATE" mainReferentGenericity="NON-GENERIC" habituality="STATIC" mainVerbAspectualClass="STATIVE"/>
  </segment>
  <segment instanceid="email_221197.txt_23" begin="950" end="1017">
    <text>The information is intended for the use of the individual or entity</text>
    <mainVerb begin="969" end="977">intended</mainVerb>
    <mainReferent begin="954" end="965">information</mainReferent>
    <annotation annotator="gold" seType="STATE" mainReferentGenericity="NON-GENERIC" habituality="STATIC" mainVerbAspectualClass="STATIVE"/>
    <annotation annotator="A" seType="STATE" mainReferentGenericity="NON-GENERIC" habituality="STATIC" mainVerbAspectualClass="STATIVE"/>
    <annotation annotator="D" seType="STATE" mainReferentGenericity="NON-GENERIC" habituality="STATIC" mainVerbAspectualClass="STATIVE"/>
    <annotation annotator="B" seType="STATE" mainReferentGenericity="NON-GENERIC" habituality="STATIC" mainVerbAspectualClass="STATIVE"/>
  </segment>
  <segment instanceid="email_221197.txt_24" begin="1018" end="1030">
    <text>named above.</text>
    <mainVerb begin="1018" end="1023">named</mainVerb>
    <mainReferent begin="997" end="1007">individual</mainReferent>
    <annotation annotator="gold" seType="STATE" mainReferentGenericity="NON-GENERIC" habituality="STATIC" mainVerbAspectualClass="STATIVE"/>
    <annotation annotator="A" seType="STATE" mainReferentGenericity="NON-GENERIC" habituality="STATIC" mainVerbAspectualClass="STATIVE"/>
    <annotation annotator="D" seType="STATE" mainReferentGenericity="NON-GENERIC" habituality="STATIC" mainVerbAspectualClass="STATIVE"/>
    <annotation annotator="B" seType="EVENT" mainReferentGenericity="NON-GENERIC" habituality="EPISODIC" mainVerbAspectualClass="DYNAMIC"/>
  </segment>
  <segment instanceid="email_221197.txt_25" begin="1031" end="1078">
    <text>If you are not the intended recipient, be aware</text>
    <mainVerb begin="1070" end="1072">be</mainVerb>
    <annotation annotator="gold" seType="STATE" mainReferentGenericity="NON-GENERIC" habituality="STATIC" mainVerbAspectualClass="STATIVE"/>
    <annotation annotator="A" seType="IMPERATIVE" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
    <annotation annotator="D" seType="STATE" mainReferentGenericity="NON-GENERIC" habituality="STATIC" mainVerbAspectualClass="STATIVE"/>
    <annotation annotator="B" seType="STATE" mainReferentGenericity="NON-GENERIC" habituality="STATIC" mainVerbAspectualClass="STATIVE"/>
  </segment>
  <segment instanceid="email_221197.txt_26" begin="1079" end="1179">
    <text>that any disclosure, copying, distribution or use of the contents of this information is prohibited.</text>
    <mainVerb begin="1168" end="1178">prohibited</mainVerb>
    <mainReferent begin="1109" end="1121">distribution</mainReferent>
    <annotation annotator="gold" seType="STATE" mainReferentGenericity="NON-GENERIC" habituality="STATIC" mainVerbAspectualClass="STATIVE"/>
    <annotation annotator="A" seType="FACT:ABSTRACT_ENTITY:STATE" mainReferentGenericity="NON-GENERIC" habituality="STATIC" mainVerbAspectualClass="STATIVE"/>
    <annotation annotator="D" seType="STATE" mainReferentGenericity="NON-GENERIC" habituality="STATIC" mainVerbAspectualClass="STATIVE"/>
    <annotation annotator="B" seType="STATE" mainReferentGenericity="NON-GENERIC" habituality="STATIC" mainVerbAspectualClass="STATIVE"/>
  </segment>
  <segment instanceid="email_221197.txt_27" begin="1181" end="1333">
    <text>If you have received this electronic transmission in error, please notify us by telephone (617 425-3582) or by e-mail (postmaster@crai.com) immediately.</text>
    <mainVerb begin="1248" end="1254">notify</mainVerb>
    <mainReferent begin="1241" end="1247">please</mainReferent>
    <annotation annotator="gold" seType="STATE" mainReferentGenericity="NON-GENERIC" habituality="STATIC" mainVerbAspectualClass="DYNAMIC"/>
    <annotation annotator="A" seType="IMPERATIVE" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
    <annotation annotator="D" seType="STATE" mainReferentGenericity="NON-GENERIC" habituality="STATIC" mainVerbAspectualClass="DYNAMIC"/>
    <annotation annotator="B" seType="STATE" mainReferentGenericity="NON-GENERIC" habituality="STATIC" mainVerbAspectualClass="DYNAMIC"/>
  </segment>
  <segment instanceid="email_221197.txt_28" begin="1335" end="1411">
    <text>****************************************************************************</text>
    <annotation annotator="gold" mainReferentGenericity="CANNOT_DECIDE" mainVerbAspectualClass="CANNOT_DECIDE"/>
    <annotation annotator="A" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
    <annotation annotator="D" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
    <annotation annotator="B" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
  </segment>
  <segment instanceid="email_221197.txt_29" begin="1413" end="1418">
    <text>*****</text>
    <annotation annotator="gold" mainReferentGenericity="CANNOT_DECIDE" mainVerbAspectualClass="CANNOT_DECIDE"/>
    <annotation annotator="A" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
    <annotation annotator="D" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
    <annotation annotator="B" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
  </segment>
  <segment instanceid="email_221197.txt_30" begin="1420" end="1443">
    <text>- NOTES FOR DISCUSSION.</text>
    <annotation annotator="gold" mainReferentGenericity="CANNOT_DECIDE" mainVerbAspectualClass="CANNOT_DECIDE"/>
    <annotation annotator="A" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
    <annotation annotator="D" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
    <annotation annotator="B" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
  </segment>
  <segment instanceid="email_221197.txt_31" begin="1443" end="1446">
    <text>doc</text>
    <annotation annotator="gold" mainReferentGenericity="CANNOT_DECIDE" mainVerbAspectualClass="CANNOT_DECIDE"/>
    <annotation annotator="A" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
    <annotation annotator="D" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
    <annotation annotator="B" seType="" mainReferentGenericity="" habituality="" mainVerbAspectualClass=""/>
  </segment>
</document>


text:
<?php

namespace CM\Messaging\Request;

/**
 * Class RequestSerializer
 *
 * @package CM\Messaging\Request
 */
abstract class RequestSerializer implements \JsonSerializable
{

    /**
     * Specify data which should be serialized to JSON and filter all null values
     *
     * @link  http://php.net/manual/en/jsonserializable.jsonserialize.php
     * @return mixed data which can be serialized by <b>json_encode</b>,
     *        which is a value of any type other than a resource.
     */
    public function jsonSerialize()
    {
        return array_filter(get_object_vars($this->getClass()));
    }

    /**
     * @return $this
     */
    abstract protected function getClass();

}


text:
package de.knightsoftnet.mtwidgets.client.ui.widget;

import de.knightsoftnet.mtwidgets.client.ui.handler.HandlerFactory;
import de.knightsoftnet.mtwidgets.client.ui.widget.helper.BigDecimalParser;
import de.knightsoftnet.mtwidgets.client.ui.widget.helper.BigDecimalRenderer;

import elemental.client.Browser;

import java.math.BigDecimal;

/**
 * big decimal box for decimal input.
 *
 * @author Manfred Tremmel
 *
 */
public class DecimalBigDecimalBox extends AbstractMinMaxTextBox<BigDecimal> {

  /**
   * default constructor.
   */
  public DecimalBigDecimalBox() {
    super(Browser.getDocument().createInputElement(), "text", BigDecimalRenderer.instance(),
        BigDecimalParser.instance(), HandlerFactory.getDecimalKeyPressHandler());
  }
}


text:
import re
import sys
import copy
from itertools import izip
from itertools import imap

# =====================================================================
""" Context classes, used during propagation and the "to PFW script" step """
# =====================================================================

class PropagationContextItem(list) :
    """Handle an item during the propagation step"""
    def __copy__(self):
        """C.__copy__() -> a shallow copy of C"""
        return self.__class__(self)

class PropagationContextElement(PropagationContextItem) :
    """Handle an Element during the propagation step"""
    def getElementsFromName(self, name):
        matchingElements = []
        for element in self :
            if element.getName() == name :
                matchingElements.append(element)
        return matchingElements

class PropagationContextOption(PropagationContextItem) :
    """Handle an Option during the propagation step"""
    def getOptionItems (self, itemName):
        items = []
        for options in self :
            items.append(options.getOption(itemName))
        return items

class PropagationContext() :
    """Handle the context during the propagation step"""
    def __init__(self, propagationContext=None) :

        if propagationContext == None :
            self._context = {
                "DomainOptions" : PropagationContextOption() ,
                "Configurations" : PropagationContextElement() ,
                "ConfigurationOptions" : PropagationContextOption() ,
                "Rules" : PropagationContextElement() ,
                "PathOptions" : PropagationContextOption() ,
        }
        else :
            self._context = propagationContext

    def copy(self):
        """return a copy of the context"""
        contextCopy = self._context.copy()

        for key in iter(self._context) :
            contextCopy[key] = contextCopy[key].__copy__()

        return self.__class__(contextCopy)

    def getDomainOptions (self):
        return self._context["DomainOptions"]

    def getConfigurations (self):
        return self._context["Configurations"]

    def getConfigurationOptions (self):
        return self._context["ConfigurationOptions"]

    def getRules (self):
        return self._context["Rules"]

    def getPathOptions (self):
        return self._context["PathOptions"]

# =====================================================
"""Element option container"""
# =====================================================

class Options () :
    """handle element options"""
    def __init__(self, options=[], optionNames=[]) :
        self.options = dict(izip(optionNames, options))
        # print(options,optionNames,self.options)

    def __str__(self) :
        ops2str = []
        for name, argument in self.options.items() :
            ops2str.append(str(name) + "=\"" + str(argument) + "\"")

        return " ".join(ops2str)

    def getOption(self, name):
        """get option by its name, if it does not exist return empty string"""
        return self.options.get(name, "")

    def setOption(self, name, newOption):
        """set option by its name"""
        self.options[name] = newOption

    def copy (self):
        """D.copy() -> a shallow copy of D"""
        copy = Options()
        copy.options = self.options.copy()
        return copy

# ====================================================
"""Definition of all element class"""
# ====================================================

class Element(object):
    """ implement a basic element

    It is the class base for all other elements as Domain, Configuration..."""
    tag = "unknown"
    optionNames = ["Name"]
    childWhiteList = []
    optionDelimiter = " "

    def __init__(self, line=None) :

        if line == None :
            self.option = Options([], self.optionNames)
        else :
            self.option = self.optionFromLine(line)

        self.children = []

    def optionFromLine(self, line) :
        # get ride of spaces
        line = line.strip()

        options = self.extractOptions(line)

        return Options(options, self.optionNames)

    def extractOptions(self, line) :
        """return the line splited by the optionDelimiter atribute

        Option list length is less or equal to the optionNames list length
        """
        options = line.split(self.optionDelimiter, len(self.optionNames) - 1)

        # get ride of leftover spaces
        optionsStrip = list(imap(str.strip, options))

        return optionsStrip

    def addChild(self, child, append=True) :
        """ A.addChid(B) -> add B to A child list if B class name is in A white List"""
        try:
            # Will raise an exception if this child is not in the white list
            self.childWhiteList.index(child.__class__.__name__)
            # If no exception was raised, add child to child list

            if append :
                self.children.append(child)
            else :
                self.children.insert(0, child)

        except ValueError:
            # the child class is not in the white list
            raise ChildNotPermitedError("", self, child)

    def addChildren(self, children, append=True) :
        """Add a list of child"""
        if append:
            # Add children at the end of the child list
            self.children.extend(children)
        else:
            # Add children at the begining of the child list
            self.children = children + self.children

    def childrenToString(self, prefix=""):
        """return raw printed children """
        body = ""
        for child in self.children :
            body = body + child.__str__(prefix)

        return body

    def __str__(self, prefix="") :
        """return raw printed element"""
        selfToString = prefix + " " + self.tag + " " + str(self.option)
        return selfToString + "\n" + self.childrenToString(prefix + "\t")

    def extractChildrenByClass(self, classTypeList) :
        """return all children whose class is in the list argument

        return a list of all children whose class in the list "classTypeList" (second arguments)"""
        selectedChildren = []

        for child in  self.children :
            for classtype in classTypeList :
                if child.__class__ == classtype :
                    selectedChildren.append(child)
                    break
        return selectedChildren

    def propagate (self, context=PropagationContext()):
        """call the propagate method of all children"""
        for child in  self.children :
            child.propagate(context)

    def getName(self):
        """return name option value. If none return "" """
        return self.option.getOption("Name")

    def setName(self, name):
        self.option.setOption("Name", name)

    def translate(self, translator):
        for child in self.children:
            child.translate(translator)

# ----------------------------------------------------------

class ElementWithTag (Element):
    """Element of this class are declared with a tag  => line == "tag: .*" """
    def extractOptions(self, line) :
        lineWithoutTag = line.split(":", 1)[-1].strip()
        options = super(ElementWithTag, self).extractOptions(lineWithoutTag)
        return options

# ----------------------------------------------------------

class ElementWithInheritance(Element):
    def propagate (self, context=PropagationContext) :
        """propagate some proprieties to children"""

        # copy the context so that everything that hapend next will only affect
        # children
        contextCopy = context.copy()

        # check for inheritance
        self.Inheritance(contextCopy)

        # call the propagate method of all children
        super(ElementWithInheritance, self).propagate(contextCopy)

class ElementWithRuleInheritance(ElementWithInheritance):
    """class that will give to its children its rules"""
    def ruleInheritance(self, context):
        """Add its rules to the context and get context rules"""

        # extract all children rule and operator
        childRules = self.extractChildrenByClass([Operator, Rule])

        # get context rules
        contextRules = context.getRules()

        # adopt rules of the beginning of the context
        self.addChildren(contextRules, append=False)

        # add previously extract rules to the context
        contextRules += childRules

# ----------------------------------------------------------

class EmptyLine (Element) :
    """This class represents an empty line.

    Will raise "EmptyLineWarning" exception at instanciation."""

    tag = "emptyLine"
    match = re.compile(r"[ \t]*\n?$").match
    def __init__ (self, line):
       raise EmptyLineWarning(line)

# ----------------------------------------------------------

class Commentary(Element):
    """This class represents a commentary.

    Will raise "CommentWarning" exception at instanciation."""

    tag = "commentary"
    optionNames = ["comment"]
    match = re.compile(r"#").match
    def __init__ (self, line):
       raise CommentWarning(line)

# ----------------------------------------------------------

class Path (ElementWithInheritance) :
    """class implementing the "path = value" concept"""
    tag = "path"
    optionNames = ["Name", "value"]
    match = re.compile(r".+=").match
    optionDelimiter = "="

    def translate(self, translator):
        translator.setParameter(self.getName(), self.option.getOption("value"))

    def Inheritance (self, context) :
        """check for path name inheritance"""
        self.OptionsInheritance(context)

    def OptionsInheritance (self, context) :
        """make configuration name inheritance """

        context.getPathOptions().append(self.option.copy())
        self.setName("/".join(context.getPathOptions().getOptionItems("Name")))

class GroupPath (Path, ElementWithTag) :
    tag = "component"
    match = re.compile(tag + r" *:").match
    optionNames = ["Name"]
    childWhiteList = ["Path", "GroupPath"]

    def getPathNames (self) :
        """Return the list of all path child name"""

        pathNames = []

        paths = self.extractChildrenByClass([Path])
        for path in paths :
            pathNames.append(path.getName())

        groupPaths = self.extractChildrenByClass([GroupPath])
        for groupPath in groupPaths :
            pathNames += groupPath.getPathNames()

        return pathNames

    def translate(self, translator):
        for child in self.extractChildrenByClass([Path, GroupPath]):
            child.translate(translator)

# ----------------------------------------------------------

class Rule (Element) :
    """class implementing the rule concept

    A rule is composed of a criterion, a rule type and an criterion state.
    It should not have any child and is propagated to all configuration in parent descendants.
    """

    tag = "rule"
    optionNames = ["criterion", "type", "element"]
    match = re.compile(r"[a-zA-Z0-9_.]+ +(Is|IsNot|Includes|Excludes) +[a-zA-Z0-9_.]+").match
    childWhiteList = []

    def PFWSyntax (self, prefix=""):

        script = prefix + \
                    self.option.getOption("criterion") + " " + \
                    self.option.getOption("type") + " " + \
                    self.option.getOption("element")

        return script

class Operator (Rule) :
    """class implementing the operator concept

    An operator contains rules and other operators
    It is as rules propagated to all configuration children in parent descendants.
    It should only have the name ANY or ALL to be understood by PFW.
    """

    tag = "operator"
    optionNames = ["Name"]
    match = re.compile(r"ANY|ALL").match
    childWhiteList = ["Rule", "Operator"]

    syntax = { "ANY" : "Any" , "ALL" : "All"}

    def PFWSyntax (self, prefix=""):
        """ return a pfw rule (ex : "Any{criterion1 is state1}") generated from "self" and its children options"""
        script = ""

        script += prefix + \
                    self.syntax[self.getName()] + "{ "

        rules = self.extractChildrenByClass([Rule, Operator])

        PFWRules = []
        for rule in rules :
            PFWRules.append(rule.PFWSyntax(prefix + "    "))

        script += (" , ").join(PFWRules)

        script += prefix + " }"

        return script

# ----------------------------------------------------------

class Configuration (ElementWithRuleInheritance, ElementWithTag) :
    tag = "configuration"
    optionNames = ["Name"]
    match = re.compile(r"conf *:").match
    childWhiteList = ["Rule", "Operator", "Path", "GroupPath"]

    def composition (self, context):
        """make all needed composition

        Composition is the fact that group configuration with the same name defined
        in a parent will give their rule children to this configuration
        """

        name = self.getName()
        sameNameConf = context.getConfigurations().getElementsFromName(name)

        sameNameConf.reverse()

        for configuration in sameNameConf :
            # add same name configuration rule children to self child list
            self.addChildren(configuration.extractChildrenByClass([Operator, Rule]), append=False)

    def propagate (self, context=PropagationContext) :
        """propagate proprieties to children

        make needed compositions, join ancestor name to its name,
        and add rules previously defined rules"""

        # make all needed composition
        self.composition(context)

        super(Configuration, self).propagate(context)

    def Inheritance (self, context) :
        """make configuration name and rule inheritance"""
        # check for configuration name inheritance
        self.OptionsInheritance(context)

        # check for rule inheritance
        self.ruleInheritance(context)

    def OptionsInheritance (self, context) :
        """make configuration name inheritance """

        context.getConfigurationOptions().append(self.option.copy())
        self.setName(".".join(context.getConfigurationOptions().getOptionItems("Name")))

    def getRootPath (self) :

        paths = self.extractChildrenByClass([Path, GroupPath])

        rootPath = GroupPath()
        rootPath.addChildren(paths)

        return rootPath

    def getConfigurableElements (self) :
        """return all path name defined in this configuration"""

        return self.getRootPath().getPathNames()

    def getRuleString(self):
        """Output this configuration's rule as a string"""

        # Create a rootRule
        ruleChildren = self.extractChildrenByClass([Rule, Operator])

        # Do not create a root rule if there is only one fist level Operator rule
        if len(ruleChildren) == 1 and ruleChildren[0].__class__ == Operator :
            ruleroot = ruleChildren[0]

        else :
            ruleroot = Operator()
            ruleroot.setName("ALL")
            ruleroot.addChildren(ruleChildren)

        return ruleroot.PFWSyntax()

    def translate(self, translator):
        translator.createConfiguration(self.getName())
        translator.setRule(self.getRuleString())

        paths = self.extractChildrenByClass([Path, GroupPath])
        translator.setElementSequence(self.getConfigurableElements())
        for path in paths:
            path.translate(translator)

    def copy (self) :
        """return a shallow copy of the configuration"""

        # create configuration or subclass copy
        confCopy = self.__class__()

        # add children
        confCopy.children = list(self.children)

        # add option
        confCopy.option = self.option.copy()

        return confCopy

class GroupConfiguration (Configuration) :
    tag = "GroupConfiguration"
    optionNames = ["Name"]
    match = re.compile(r"(supConf|confGroup|confType) *:").match
    childWhiteList = ["Rule", "Operator", "GroupConfiguration", "Configuration", "GroupPath"]

    def composition (self, context) :
        """add itself in context for configuration composition

        Composition is the fact that group configuration with the same name defined
        in a parent will give their rule children to this configuration
        """

        # copyItself
        selfCopy = self.copy()

        # make all needed composition
        super(GroupConfiguration, self).composition(context)

        # add the copy in context for futur configuration composition
        context.getConfigurations().append(selfCopy)

    def getConfigurableElements (self) :
        """return a list. Each elements consist of a list of configurable element of a configuration

        return a list consisting of all configurable elements for each configuration.
        These configurable elements are organized in a list"""
        configurableElements = []

        configurations = self.extractChildrenByClass([Configuration])
        for configuration in configurations :
            configurableElements.append(configuration.getConfigurableElements())

        groudeConfigurations = self.extractChildrenByClass([GroupConfiguration])
        for groudeConfiguration in groudeConfigurations :
            configurableElements += groudeConfiguration.getConfigurableElements()

        return configurableElements

    def translate(self, translator):
        for child in self.extractChildrenByClass([Configuration, GroupConfiguration]):
            child.translate(translator)

# ----------------------------------------------------------

class Domain (ElementWithRuleInheritance, ElementWithTag) :
    tag = "domain"
    sequenceAwareKeyword = "sequenceAware"

    match = re.compile(r"domain *:").match
    optionNames = ["Name", sequenceAwareKeyword]
    childWhiteList = ["Configuration", "GroupConfiguration", "Rule", "Operator"]

    def propagate (self, context=PropagationContext) :
        """ propagate name, sequenceAwareness and rule to children"""

        # call the propagate method of all children
        super(Domain, self).propagate(context)

        self.checkConfigurableElementUnicity()

    def Inheritance (self, context) :
        """check for domain name, sequence awarness and rules inheritance"""
        # check for domain name and sequence awarness inheritance
        self.OptionsInheritance(context)

        # check for rule inheritance
        self.ruleInheritance(context)

    def OptionsInheritance(self, context) :
        """ make domain name and sequence awareness inheritance

        join to the domain name all domain names defined in context and
        if any domain in context is sequence aware, set sequenceAwareness to True"""

        # add domain options to context
        context.getDomainOptions().append(self.option.copy())

        # set name to the junction of all domain name in context
        self.setName(".".join(context.getDomainOptions().getOptionItems("Name")))

        # get sequenceAwareness of all domains in context
        sequenceAwareList = context.getDomainOptions().getOptionItems(self.sequenceAwareKeyword)
        # or operation on all booleans in sequenceAwareList
        sequenceAwareness = False
        for sequenceAware in sequenceAwareList :
            sequenceAwareness = sequenceAwareness or sequenceAware
        # current domain sequenceAwareness = sequenceAwareness
        self.option.setOption(self.sequenceAwareKeyword, sequenceAwareness)

    def extractOptions(self, line) :
        """Extract options from the definition line"""
        options = super(Domain, self).extractOptions(line)

        sequenceAwareIndex = self.optionNames.index(self.sequenceAwareKeyword)

        # translate the keyword self.sequenceAwareKeyword if specified to boolean True,
        # to False otherwise
        try :
            if options[sequenceAwareIndex] == self.sequenceAwareKeyword :
               options[sequenceAwareIndex] = True
            else:
               options[sequenceAwareIndex] = False
        except IndexError :
            options = options + [None] * (sequenceAwareIndex - len(options)) + [False]
        return options

    def getRootConfiguration (self) :
        """return the root configuration group"""
        configurations = self.extractChildrenByClass([Configuration, GroupConfiguration])

        configurationRoot = GroupConfiguration()

        configurationRoot.addChildren(configurations)

        return configurationRoot

    # TODO: don't do that in the parser, let the PFW tell you that
    def checkConfigurableElementUnicity (self):
        """ check that all configurable elements defined in child configuration are the sames"""

        # get a list. Each elements of is the configurable element list of a configuration
        configurableElementsList = self.getRootConfiguration().getConfigurableElements()

        # if at least two configurations in the domain
        if len(configurableElementsList) > 1 :

            # get first configuration configurable element list sort
            configurableElementsList0 = list(configurableElementsList[0])
            configurableElementsList0.sort()

            for configurableElements in configurableElementsList :
                # sort current configurable element list
                auxConfigurableElements = list(configurableElements)
                auxConfigurableElements.sort()

                if auxConfigurableElements != configurableElementsList0 :
                    # if different, 2 configurations those not have the same configurable element list
                    # => one or more configurable element is missing in one of the 2 configuration
                    raise UndefinedParameter(self.getName())

    def translate(self, translator):
        sequence_aware = self.option.getOption(self.sequenceAwareKeyword)
        translator.createDomain(self.getName(), sequence_aware)

        configurations = self.getRootConfiguration()
        configurableElementsList = configurations.getConfigurableElements()

        # add configurable elements
        if len(configurableElementsList) != 0 :
            for configurableElement in configurableElementsList[0] :
                translator.addElement(configurableElement)

        configurations.translate(translator)

class GroupDomain (Domain) :
    tag = "groupDomain"
    match = re.compile(r"(supDomain|domainGroup) *:").match
    childWhiteList = ["GroupDomain", "Domain", "GroupConfiguration", "Rule", "Operator"]

    def translate(self, translator):
        for child in self.extractChildrenByClass([Domain, GroupDomain]):
            child.translate(translator)

# ----------------------------------------------------------

class Root(Element):
    tag = "root"
    childWhiteList = ["Domain", "GroupDomain"]

# ===========================================
""" Syntax error Exceptions"""
# ===========================================

class MySyntaxProblems(SyntaxError) :
    comment = "syntax error in %(line)s "

    def __init__(self, line=None, num=None):
        self.setLine(line, num)

    def __str__(self):

        if self.line :
            self.comment = self.comment % {"line" : repr(self.line)}
        if self.num :
            self.comment = "Line " + str(self.num) + ", " + self.comment
        return self.comment

    def setLine (self, line, num):
        self.line = str(line)
        self.num = num

# ---------------------------------------------------------

class MyPropagationError(MySyntaxProblems) :
    """ Syntax error Exceptions used in the propagation step"""
    pass

class UndefinedParameter(MyPropagationError) :
    comment = "Configurations in domain '%(domainName)s' do not all set the same parameters "
    def __init__ (self, domainName):
        self.domainName = domainName
    def __str__ (self):
        return self.comment % { "domainName" : self.domainName }

# -----------------------------------------------------
""" Syntax error Exceptions used by parser"""

class MySyntaxError(MySyntaxProblems) :
    """ Syntax error Exceptions used by parser"""
    pass

class MySyntaxWarning(MySyntaxProblems) :
    """ Syntax warning Exceptions used by parser"""
    pass

class IndentationSyntaxError(MySyntaxError) :
    comment = """syntax error in %(line)s has no father element.
    You can only increment indentation by one tabutation per line")"""

class EmptyLineWarning(MySyntaxWarning):
    comment = "warning : %(line)s is an empty line and has been ommited"

class CommentWarning(MySyntaxWarning):
    comment = "warning : %(line)s is a commentary and has been ommited"

class ChildNotPermitedError(MySyntaxError):
    def __init__(self, line, fatherElement, childElement):
        self.comment = "syntax error in %(line)s, " + fatherElement.tag + " should not have a " + childElement.tag + " child."
        super(ChildNotPermitedError, self).__init__(line)

class UnknownElementTypeError(MySyntaxError):
    comment = " error in line %(line)s , not known element type were matched "

class SpaceInIndentationError(MySyntaxError):
    comment = " error in ,%(line)s space is not permited in indentation"

# ============================================
"""Class creating the DOM elements from a stream"""
# ============================================

class ElementsFactory(object)  :
    """Element factory, return an instance of the first matching element

    Test each element list in elementClass and instanciate it if it's methode match returns True
    The method match is called with input line as argument
    """
    def __init__ (self):
        self.elementClass = [
        EmptyLine ,
        Commentary,
        GroupDomain,
        Domain,
        Path,
        GroupConfiguration,
        Configuration,
        Operator,
        Rule,
        GroupPath
        ]

    def createElementFromLine (self, line) :
        """return an instance of the first matching element

        Test each element list in elementClass and instanciate it if it's methode match returns True
        The method match is called with the argument line.
        Raise UnknownElementTypeError if no element matched.
        """
        for element in self.elementClass :
            if element.match(line) :
                # print (line + element.__class__.__name__)
                return element(line)
        # if we have not find any
        raise UnknownElementTypeError(line)

#------------------------------------------------------

class Parser(object) :
    """Class implementing the parser"""
    def __init__(self):
        self.rankPattern = re.compile(r"^([\t ]*)(.*)")
        self.elementFactory = ElementsFactory()
        self.previousRank = 0

    def __parseLine__(self, line):

        rank, rest = self.__getRank__(line)

        # instanciate the coresponding element
        element = self.elementFactory.createElementFromLine(rest)

        self.__checkIndentation__(rank)

        return rank, element

    def __getRank__(self, line):
        """return the rank, the name and the option of the input line

the rank is the number of tabulation (\t) at the line beginning.
the rest is the rest of the line."""
        # split line in rank and rest
        rank = self.rankPattern.match(line)
        if rank :
            rank, rest = rank.group(1, 2)
        else :
            raise MySyntaxError(line)

        # check for empty line
        if rest == "" :
            raise EmptyLineWarning(line)

        # check for space in indentation
        if rank.find(" ") > -1 :
            raise SpaceInIndentationError(line)

        rank = len (rank) + 1  # rank starts at 1

        return rank, rest

    def __checkIndentation__(self, rank):
        """check if indentation > previous indentation + 1. If so, raise IndentationSyntaxError"""
        if (rank > self.previousRank + 1) :
            raise IndentationSyntaxError()
        self.previousRank = rank

    def parse(self, stream, verbose=False):
        """parse a stream, usually a opened file"""
        myroot = Root("root")
        context = [myroot]  # root is element of rank 0
        warnings = ""

        for num, line in enumerate(stream):
            try:
                rank, myelement = self.__parseLine__(line)

                while len(context) > rank :
                    context.pop()
                context.append(myelement)
                context[-2].addChild(myelement)

            except MySyntaxWarning, ex:
                ex.setLine(line, num + 1)
                if verbose :
                    print >>sys.stderr, ex

            except MySyntaxError, ex :
                ex.setLine(line, num + 1)
                raise

        return myroot


text:
package br.edu.ifmt.cba.alphalab.business;

import java.time.LocalDate;
import java.util.Date;
import java.util.List;

import br.edu.ifmt.cba.alphalab.dao.IDAO;
import br.edu.ifmt.cba.alphalab.dao.IReservaDAO;
import br.edu.ifmt.cba.alphalab.entity.exception.ReservaException;
import br.edu.ifmt.cba.alphalab.entity.laboratorio.EnumTipoReserva;
import br.edu.ifmt.cba.alphalab.entity.laboratorio.ReservaEntity;
import br.edu.ifmt.cba.alphalab.entity.pessoa.EnumTipoServidor;

public class Reserva extends ABusiness<ReservaEntity, ReservaException, IReservaDAO> {

	public Reserva(IDAO<ReservaEntity> dao) {
		super(dao);
	}

	public ReservaEntity getByID(Long id) {
		return ((IReservaDAO) dao).getById(id);
	}

	public List<ReservaEntity> buscarTodasReservas() {
		return ((IReservaDAO) dao).buscarTodasReservas();
	}

	public List<ReservaEntity> getByData(Date data) {
		return ((IReservaDAO) dao).getByData(data);
	}

	public List<ReservaEntity> getAtivosNoDia(LocalDate data) {
		return ((IReservaDAO) dao).getAtivosNoDia(data);
	}

	public List<ReservaEntity> getAtivosNaSemana(LocalDate data) {
		return ((IReservaDAO) dao).getAtivosNaSemana(data);
	}

	public List<ReservaEntity> getByTipo(EnumTipoReserva enumTipoReserva) {
		return ((IReservaDAO) dao).getByTipo(enumTipoReserva);
	}

	public List<ReservaEntity> getByServidor(EnumTipoServidor enumTipoServidor) {
		return ((IReservaDAO) dao).getByServidor(enumTipoServidor);
	}

	public List<ReservaEntity> getByTipoEServidor(EnumTipoReserva enumTipoReserva, EnumTipoServidor enumTipoServidor) {
		return ((IReservaDAO) dao).getByTipoEServidor(enumTipoReserva, enumTipoServidor);
	}

	public List<ReservaEntity> buscarReservasPedidas() {
		return ((IReservaDAO) dao).buscarReservasPedidas();
	}

	public List<ReservaEntity> getByTipoEServidorEPedido(EnumTipoReserva enumTipoReserva,
			EnumTipoServidor enumTipoServidor) {
		return ((IReservaDAO) dao).getByTipoEServidorEPedido(enumTipoReserva, enumTipoServidor);
	}

	public List<ReservaEntity> getReservasEmAbertoNoDia(LocalDate data) {
		return ((IReservaDAO) dao).getReservasEmAbertoNoDia(data);
	}

	public List<ReservaEntity> getReservasEmAbertNaSemana(LocalDate data) {
		return ((IReservaDAO) dao).getReservasEmAbertoNaSemana(data);
	}
}


text:
#ifndef TC_HEADER_Encryption_Ciphers
#define TC_HEADER_Encryption_Ciphers

#include "Platform/Platform.h"

namespace nemesis
{
	class Cipher;
	typedef vector < shared_ptr <Cipher> > CipherList;

	class Cipher
	{
	public:
		virtual ~Cipher ();

		virtual void DecryptBlock (byte *data) const;
		virtual void DecryptBlocks (byte *data, size_t blockCount) const;
		static void EnableHwSupport (bool enable) { HwSupportEnabled = enable; }
		virtual void EncryptBlock (byte *data) const;
		virtual void EncryptBlocks (byte *data, size_t blockCount) const;
		static CipherList GetAvailableCiphers ();
		virtual size_t GetBlockSize () const = 0;
		virtual const SecureBuffer &GetKey () const { return Key; }
		virtual size_t GetKeySize () const = 0;
		virtual wstring GetName () const = 0;
		virtual shared_ptr <Cipher> GetNew () const = 0;
		virtual bool IsHwSupportAvailable () const { return false; }
		static bool IsHwSupportEnabled () { return HwSupportEnabled; }
		virtual void SetKey (const ConstBufferPtr &key);

		static const int MaxBlockSize = 16;

	protected:
		Cipher ();

		virtual void Decrypt (byte *data) const = 0;
		virtual void Encrypt (byte *data) const = 0;
		virtual size_t GetScheduledKeySize () const = 0;
		virtual void SetCipherKey (const byte *key) = 0;

		static bool HwSupportEnabled;
		bool Initialized;
		SecureBuffer Key;
		SecureBuffer ScheduledKey;

	private:
		Cipher (const Cipher &);
		Cipher &operator= (const Cipher &);
	};

	struct CipherException : public Exception
	{
	protected:
		CipherException () { }
		CipherException (const string &message) : Exception (message) { }
		CipherException (const string &message, const wstring &subject) : Exception (message, subject) { }
	};

#define TC_CIPHER(NAME, BLOCK_SIZE, KEY_SIZE) \
	class TC_JOIN (Cipher,NAME) : public Cipher \
	{ \
	public: \
		TC_JOIN (Cipher,NAME) () { } \
		virtual ~TC_JOIN (Cipher,NAME) () { } \
\
		virtual size_t GetBlockSize () const { return BLOCK_SIZE; }; \
		virtual size_t GetKeySize () const { return KEY_SIZE; }; \
		virtual wstring GetName () const { return L###NAME; }; \
		virtual shared_ptr <Cipher> GetNew () const { return shared_ptr <Cipher> (new TC_JOIN (Cipher,NAME)()); } \
		TC_CIPHER_ADD_METHODS \
\
	protected: \
		virtual void Decrypt (byte *data) const; \
		virtual void Encrypt (byte *data) const; \
		virtual size_t GetScheduledKeySize () const; \
		virtual void SetCipherKey (const byte *key); \
\
	private: \
		TC_JOIN (Cipher,NAME) (const TC_JOIN (Cipher,NAME) &); \
		TC_JOIN (Cipher,NAME) &operator= (const TC_JOIN (Cipher,NAME) &); \
	}

#define TC_CIPHER_ADD_METHODS \
	virtual void DecryptBlocks (byte *data, size_t blockCount) const; \
	virtual void EncryptBlocks (byte *data, size_t blockCount) const; \
	virtual bool IsHwSupportAvailable () const;

	TC_CIPHER (AES, 16, 32);

#undef TC_CIPHER_ADD_METHODS
#define TC_CIPHER_ADD_METHODS

	TC_CIPHER (Blowfish, 8, 56);
	TC_CIPHER (Cast5, 8, 16);
	TC_CIPHER (Serpent, 16, 32);
	TC_CIPHER (TripleDES, 8, 24);
	TC_CIPHER (Twofish, 16, 32);
	TC_CIPHER (Camellia, 16, 32);

#undef TC_CIPHER

#define TC_EXCEPTION(NAME) TC_EXCEPTION_DECL(NAME,CipherException)

#undef TC_EXCEPTION_SET
#define TC_EXCEPTION_SET \
	TC_EXCEPTION (CipherInitError); \
	TC_EXCEPTION (WeakKeyDetected);

	TC_EXCEPTION_SET;

#undef TC_EXCEPTION

#if (defined (TC_ARCH_X86) || defined (TC_ARCH_X64)) && !defined (__ppc__)
#	define TC_AES_HW_CPU
#endif

}

#endif // TC_HEADER_Encryption_Ciphers


text:
typedef void(^DynamicAnimationCloseFinish)();
typedef void(^DynamicAnimationShowFinish)();

@interface ButtonsView : UIView

@property (strong, nonatomic)   UIBezierPath                    *beizerPath;
@property (copy, nonatomic)     DynamicAnimationCloseFinish     dynamicAnimaionCloseFinsh;
@property (copy, nonatomic)     DynamicAnimationShowFinish      dynamicAnimaionShowFinsh;

- (instancetype)initWithFrame:(CGRect)frame btnsArray:(NSArray *)btnArray;

- (void)showBtnsAnimation;
- (void)closeBtnsAniamtion;

@end


text:
package io.cdap.plugin.zuora.objects;

import com.google.gson.annotations.SerializedName;
import io.cdap.cdap.api.data.schema.Schema;
import io.cdap.plugin.zuora.restobjects.annotations.ObjectDefinition;
import io.cdap.plugin.zuora.restobjects.annotations.ObjectFieldDefinition;
import io.cdap.plugin.zuora.restobjects.objects.BaseObject;

import javax.annotation.Nullable;

/**
* Object name: PUTSubscriptionPreviewInvoiceItemsType (PUTSubscriptionPreviewInvoiceItemsType).
* Related objects:
**/
@SuppressWarnings("unused")
@ObjectDefinition(
  Name = "PUTSubscriptionPreviewInvoiceItemsType",
  ObjectType = ObjectDefinition.ObjectDefinitionType.NESTED
)
public class PUTSubscriptionPreviewInvoiceItemsType extends BaseObject {
  /**
  * Name: chargeAmount (chargeAmount), Type: number.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("chargeAmount")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String chargeAmount;

  /**
  * Name: chargeDescription (chargeDescription), Type: string.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("chargeDescription")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String chargeDescription;

  /**
  * Name: chargeName (chargeName), Type: string.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("chargeName")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String chargeName;

  /**
  * Name: productName (productName), Type: string.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("productName")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String productName;

  /**
  * Name: productRatePlanChargeId (productRatePlanChargeId), Type: string.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("productRatePlanChargeId")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String productRatePlanChargeId;

  /**
  * Name: quantity (quantity), Type: number.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("quantity")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String quantity;

  /**
  * Name: serviceEndDate (serviceEndDate), Type: string.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("serviceEndDate")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String serviceEndDate;

  /**
  * Name: serviceStartDate (serviceStartDate), Type: string.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("serviceStartDate")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String serviceStartDate;

  /**
  * Name: unitOfMeasure (unitOfMeasure), Type: string.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("unitOfMeasure")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String unitOfMeasure;

  @Override
  public void addFields() {
    addCustomField("chargeAmount", chargeAmount, String.class);
    addCustomField("chargeDescription", chargeDescription, String.class);
    addCustomField("chargeName", chargeName, String.class);
    addCustomField("productName", productName, String.class);
    addCustomField("productRatePlanChargeId", productRatePlanChargeId, String.class);
    addCustomField("quantity", quantity, String.class);
    addCustomField("serviceEndDate", serviceEndDate, String.class);
    addCustomField("serviceStartDate", serviceStartDate, String.class);
    addCustomField("unitOfMeasure", unitOfMeasure, String.class);
  }
}


text:
import { QuestionNonValue } from "./questionnonvalue";
import { Serializer } from "./jsonobject";
import { QuestionFactory } from "./questionfactory";
import { LocalizableString } from "./localizablestring";

/**
 * A Model for html question. Unlike other questions it doesn't have value and title.
 */
export class QuestionHtmlModel extends QuestionNonValue {
  constructor(public name: string) {
    super(name);
    var locHtml = this.createLocalizableString("html", this);
    var self = this;
    locHtml.onGetTextCallback = function(str: string): string {
      return !!self.survey ? self.survey.processHtml(str) : str;
    };
  }
  public getType(): string {
    return "html";
  }
  public get isCompositeQuestion(): boolean {
    return true;
  }
  /**
   * Set html to display it
   */
  public get html(): string {
    return this.getLocalizableStringText("html", "");
  }
  public set html(val: string) {
    this.setLocalizableStringText("html", val);
  }
  get locHtml(): LocalizableString {
    return this.getLocalizableString("html");
  }
  public get processedHtml() {
    return this.survey ? this.survey.processHtml(this.html) : this.html;
  }
}
Serializer.addClass(
  "html",
  [{ name: "html:html", serializationProperty: "locHtml" }],
  function() {
    return new QuestionHtmlModel("");
  },
  "nonvalue"
);
QuestionFactory.Instance.registerQuestion("html", name => {
  return new QuestionHtmlModel(name);
});


text:
package com.scrollablelayout.simple.gridimageview;

import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.drawable.Drawable;
import android.support.annotation.DrawableRes;
import android.support.annotation.NonNull;
import android.support.v4.content.ContextCompat;
import android.util.AttributeSet;
import android.widget.ImageView;

import com.scrollablelayout.simple.R;

/**
 * An ImageView which supports a foreground drawable.
 * <p/>
 * From: https://gist.github.com/JakeWharton/0a251d67649305d84e8a
 */
public class ForegroundImageView extends ImageView {
    private Drawable foreground;

    public ForegroundImageView(Context context) {
        this(context, null);
    }

    public ForegroundImageView(Context context, AttributeSet attrs) {
        super(context, attrs);

        TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.ForegroundImageView);
        Drawable foreground = a.getDrawable(R.styleable.ForegroundImageView_android_foreground);
        if (foreground != null) {
            setForeground(foreground);
        }
        a.recycle();
    }

    /**
     * Supply a drawable resource that is to be rendered on top of all of the child
     * views in the frame layout.
     *
     * @param drawableResId The drawable resource to be drawn on top of the children.
     */
    public void setForegroundResource(@DrawableRes int drawableResId) {
        setForeground(ContextCompat.getDrawable(getContext(), drawableResId));
    }

    /**
     * Supply a Drawable that is to be rendered on top of all of the child
     * views in the frame layout.
     *
     * @param drawable The Drawable to be drawn on top of the children.
     */
    public void setForeground(Drawable drawable) {
        if (foreground == drawable) {
            return;
        }
        if (foreground != null) {
            foreground.setCallback(null);
            unscheduleDrawable(foreground);
        }

        foreground = drawable;

        if (drawable != null) {
            drawable.setCallback(this);
            if (drawable.isStateful()) {
                drawable.setState(getDrawableState());
            }
        }
        requestLayout();
        invalidate();
    }

    @Override
    protected boolean verifyDrawable(Drawable who) {
        return super.verifyDrawable(who) || who == foreground;
    }

    @Override
    public void jumpDrawablesToCurrentState() {
        super.jumpDrawablesToCurrentState();
        if (foreground != null) foreground.jumpToCurrentState();
    }

    @Override
    protected void drawableStateChanged() {
        super.drawableStateChanged();
        if (foreground != null && foreground.isStateful()) {
            foreground.setState(getDrawableState());
        }
    }

    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
        if (foreground != null) {
            foreground.setBounds(0, 0, getMeasuredWidth(), getMeasuredHeight());
            invalidate();
        }
    }

    @Override
    protected void onSizeChanged(int w, int h, int oldw, int oldh) {
        super.onSizeChanged(w, h, oldw, oldh);
        if (foreground != null) {
            foreground.setBounds(0, 0, w, h);
            invalidate();
        }
    }

    @Override
    public void draw(@NonNull Canvas canvas) {
        super.draw(canvas);

        if (foreground != null) {
            foreground.draw(canvas);
        }
    }
}