text:
/**
 * Created by ameyapandilwar on 3/8/16.
 */

var q = require('q');

module.exports = function(db, mongoose) {

    var CourseSchema = require("./course.schema.server.js")(mongoose);
    var CourseModel = mongoose.model('CatalogCourse', CourseSchema);

    var api = {
        viewCourses: viewCourses,
        createCourse: createCourse,
        deleteCourseById: deleteCourseById,
        updateCourseById: updateCourseById,
        searchCourseByName: searchCourseByName,

        addModuleToCourse: addModuleToCourse,
        findModulesForCourse: findModulesForCourse,
        deleteModuleFromCourse: deleteModuleFromCourse,
        updateModulesInCourse: updateModulesInCourse,

        findAllCourses: viewCourses,
        findCourseById: findCourseById,
        findAllCoursesForUser: findAllCoursesForUser,
        findCourseByUserId: findCourseByUserId,
        findCourseByTitle: findCourseByTitle,

        searchModuleInCourse: searchModuleInCourse,
        registerUserToCourse: registerUserToCourse,
        deregisterUserFromCourse: deregisterUserFromCourse,
        getCourseByNumber: getCourseByNumber,
        getModuleByNumber: getModuleByNumber,

        addAssignment: addAssignment,
        getAssignments: getAssignments,
        removeAssignment: removeAssignment,
        updateAssignment: updateAssignment,

        addLecture: addLecture,
        removeLecture: removeLecture,
        updateLecture: updateLecture,
        getLectureById: getLectureById,

        addLearningElement: addLearningElement,
        removeLearningElement: removeLearningElement,
        updateLearningElement: updateLearningElement,

        addExample: addExample,
        getExamples: getExamples,
        removeExample: removeExample,
        updateExample: updateExample,
        getExampleById: getExampleById,

        addDemo: addDemo,
        removeDemo: removeDemo,
        updateDemo: updateDemo,

        addDependency: addDependency,
        removeDependency: removeDependency,
        updateDependency: updateDependency
    };

    return api;

    function viewCourses() {
        var deferred = q.defer();

        CourseModel.find(
            function(err, res) {
                if (err) {
                    deferred.reject(err);
                } else {
                    deferred.resolve(res);
                }
            });

        return deferred.promise;
    }

    function searchCourseByName(name) {
        return CourseModel.find({'title': {'$regex': new RegExp(name.toLowerCase(), 'i')}});
    }

    function findModulesForCourse(courseId) {
        var deferred = q.defer();

        getCourseById(courseId).then(function(course) {
            deferred.resolve(course.modules);
        });

        return deferred.promise;
    }

    function findCourseByTitle(title) {
        return CourseModel.findOne({title: title});
    }

    function getCourseByNumber(number) {
        return CourseModel.findOne({number: number});
    }

    function searchModuleInCourse(courseId, moduleId) {
        var deferred = q.defer();

        CourseModel.findById(courseId, function(err, course) {
            for (var m in course.modules) {
                if (m.title === moduleId) {
                    deferred.resolve(m);
                }
            }
        });

        return deferred.promise;
    }

    function getModuleByNumber(courseNumber, moduleNumber) {
        var deferred = q.defer();

        CourseModel.findOne({number: courseNumber}, function(err, course) {
            if (course) {
                for (var m in course.modules) {
                    if (course.modules[m].number === parseInt(moduleNumber)) {
                        deferred.resolve(course.modules[m]);
                    }
                }
            } else {
                deferred.reject(err);
            }
        });

        return deferred.promise;
    }

    function updateModulesInCourse(courseId, modules) {
        var deferred = q.defer();

        getCourseById(courseId).then(function(course){
            course.modules = modules;

            course.save(function(err, savedCourse){
                getModulesByCourseId(courseId).then(function(modules){
                    deferred.resolve(modules);
                });
            });
        });

        return deferred.promise;
    }

    function getCourseById(id){
        var deferred = q.defer();

        CourseModel.findById(id, function(err, course){
            deferred.resolve(course);
        });

        return deferred.promise;
    }

    function findCourseById(id) {
        return CourseModel.findById(id);
    }

    function findCourseByUserId(courseId) {
        var course = null;
        for (var u in courses) {
            if (courses[u].title === courseId) {
                course = courses[u];
                break;
            }
        }
        return course;
    }

    function findAllCoursesForUser(courseIds) {
        var courses = []
        for (var u in courses) {
            for (var id in courseIds) {
                if (courses[u].number === courseIds[id]) {
                    courses.push(courses[u]);
                }
            }
        }
        return courses;
    }

    function createCourse(course) {
        var deferred = q.defer();

        CourseModel.create(course, function (err, res) {
            if (err) {
                deferred.reject(err);
            } else {
                deferred.resolve(res);
            }
        });

        return deferred.promise;
    }

    function deleteCourseById(id) {
        var deferred = q.defer();

        CourseModel.remove({_id: id},
            function(err, res) {
                if (err) {
                    deferred.reject(err);
                } else {
                    deferred.resolve(res);
                }
            });

        return deferred.promise;
    }

    function updateCourseById(id, course) {
        var deferred = q.defer();

        delete course._id;

        CourseModel.update({_id: id}, course, function(err, response) {
            getCourseById(id).then(function(course) {
                deferred.resolve(course);
            });
        });

        return deferred.promise;
    }

    function addModuleToCourse(id, module) {
        var deferred = q.defer();

        CourseModel.findById(id, function(err, course) {
            course.modules.push(module);
            course.save(function(err, saved){
                getModulesByCourseId(saved._id).then(function(modules) {
                    deferred.resolve(modules);
                });
            });
        });

        return deferred.promise;
    }

    function getModulesByCourseId(id){
        var deferred = q.defer();

        CourseModel.findById(id, function(err, course){
            deferred.resolve(course.modules);
        });

        return deferred.promise;
    }

    function deleteModuleFromCourse(courseId, moduleId) {
        var deferred = q.defer();

        CourseModel.findById(courseId, function(err, course){
            course.modules.id(moduleId).remove();
            course.save(function(err, course){
                getModulesByCourseId(course._id).then(function(modules){
                    deferred.resolve(modules);
                });
            });
        });

        return deferred.promise;
    }

    function registerUserToCourse(id, username) {
        var deferred = q.defer();

        CourseModel.findById(id, function(err, course) {
            course.users.push(username);
            course.save(function(err, saved){
                getCourseById(saved._id).then(function(course) {
                    deferred.resolve(course);
                });
            });
        });

        return deferred.promise;
    }

    function deregisterUserFromCourse(id, username) {
        var deferred = q.defer();

        CourseModel.findById(id, function(err, course) {
            for (u in course.users) {
                if (course.users[u] == username) {
                    course.users.splice(u, 1);
                }
            }
            course.save(function(err, saved){
                getCourseById(saved._id).then(function(course) {
                    deferred.resolve(course);
                });
            });
        });

        return deferred.promise;
    }

    function addAssignment(courseId, moduleId, assignment) {
        var deferred = q.defer();

        getCourseById(courseId).then(function(course) {
            course.modules.id(moduleId).assignments.push(assignment);

            course.save(function(err) {
                getAssignments(courseId, moduleId).then(function(assignments) {
                    deferred.resolve(assignments);
                });
            });
        });

        return deferred.promise;
    }

    function getAssignments(courseId, moduleId){
        var deferred = q.defer();

        getCourseById(courseId).then(function(course){
            deferred.resolve(course.modules.id(moduleId).assignments);
        });
        return deferred.promise;
    }

    function removeAssignment(courseId, moduleId, assignmentId) {
        var deferred = q.defer();

        getCourseById(courseId).then(function(course) {
            course.modules.id(moduleId).assignments.id(assignmentId).remove();

            course.save(function(err) {
                getAssignments(courseId, moduleId).then(function(assignments) {
                    deferred.resolve(assignments);
                });
            });
        });

        return deferred.promise;
    }

    function updateAssignment(courseId, moduleId, assignmentId, assignment) {
        var deferred = q.defer();

        getCourseById(courseId).then(function(course) {
            var asgn = course.modules.id(moduleId).assignments.id(assignmentId);
            asgn.title = assignment.title;
            asgn.src = assignment.src;

            course.save(function(err, saved) {
                getAssignments(courseId, moduleId).then(function(assignments) {
                    deferred.resolve(assignments);
                });
            });
        });

        return deferred.promise;
    }

    function getExamples(courseId, moduleId) {
        var deferred = q.defer();

        getCourseById(courseId).then(function(course) {
            deferred.resolve(course.modules.id(moduleId).examples);
        });

        return deferred.promise;
    }

    function addExample(courseId, moduleId, example) {
        var deferred = q.defer();

        getCourseById(courseId).then(function(course) {
            course.modules.id(moduleId).examples.push(example);

            course.save(function(err, saved) {
                getExamples(courseId, moduleId).then(function(examples) {
                    deferred.resolve(examples);
                });
            });
        });

        return deferred.promise;
    }

    function removeExample(courseId, moduleId, exampleId) {
        var deferred = q.defer();

        getCourseById(courseId).then(function(course) {
            course.modules.id(moduleId).examples.id(exampleId).remove();

            course.save(function(err) {
                getExamples(courseId, moduleId).then(function(examples) {
                    deferred.resolve(examples);
                });
            });
        });

        return deferred.promise;
    }

    function updateExample(courseId, moduleId, exampleId, example) {
        var deferred = q.defer();

        getCourseById(courseId).then(function(course) {
            var ex = course.modules.id(moduleId).examples.id(exampleId);
            ex.title = example.title;
            ex.demos = example.demos;

            course.save(function(err) {
                getExamples(courseId, moduleId).then(function(examples) {
                    deferred.resolve(examples);
                });
            });
        });

        return deferred.promise;
    }

    function getExampleById(courseId, moduleId, exampleId) {
        var deferred = q.defer();

        getCourseById(courseId).then(function(course) {
            deferred.resolve(course.modules.id(moduleId).examples.id(exampleId));
        });

        return deferred.promise;
    }

    function getDemos(courseId, moduleId, exampleId){
        var deferred = q.defer();
        getCourseById(courseId).then(function(course){
            deferred.resolve(course.modules.id(moduleId).examples.id(exampleId).demos);
        });

        return deferred.promise;
    }

    function addDemo(courseId, moduleId, exampleId, demo) {
        var deferred = q.defer();

        getCourseById(courseId).then(function(course) {
            course.modules.id(moduleId).examples.id(exampleId).demos.push(demo);

            course.save(function(err){
                getDemos(courseId, moduleId, exampleId).then(function(demos){
                    deferred.resolve(demos);
                });
            });
        });

        return deferred.promise;
    }

    function removeDemo(courseId, moduleId, exampleId, demoId) {
        var deferred = q.defer();

        getCourseById(courseId).then(function(course) {
            course.modules.id(moduleId).examples.id(exampleId).demos.id(demoId).remove();

            course.save(function(err) {
                getDemos(courseId, moduleId, exampleId).then(function(demos) {
                    deferred.resolve(demos);
                });
            });
        });

        return deferred.promise;
    }

    function updateDemo(courseId, moduleId, exampleId, demoId, demo) {
        var deferred = q.defer();

        getCourseById(courseId).then(function(course) {
            var d = course.modules.id(moduleId).examples.id(exampleId).demos.id(demoId);

            d.title = demo.title;
            d.base = demo.base;
            d.src = demo.src;
            d.dependencies = demo.dependencies;

            course.save(function(err) {
                getDemos(courseId, moduleId, exampleId).then(function(demos){
                    deferred.resolve(demos);
                });
            });
        });

        return deferred.promise;
    }

    function getDependencies(courseId, moduleId, exampleId, demoId){
        var deferred = q.defer();

        getCourseById(courseId).then(function(course){
            deferred.resolve(course.modules.id(moduleId).examples.id(exampleId).demos.id(demoId).dependencies);
        });

        return deferred.promise;
    }

    function addDependency(courseId, moduleId, exampleId, demoId, dependency) {
        var deferred = q.defer();

        getCourseById(courseId).then(function(course) {
            course.modules.id(moduleId).examples.id(exampleId).demos.id(demoId).dependencies.push(dependency);
            course.save(function(err) {
                getDependencies(courseId, moduleId, exampleId, demoId).then(function(dependencies) {
                    deferred.resolve(dependencies);
                });
            });
        });

        return deferred.promise;
    }

    function removeDependency(courseId, moduleId, exampleId, demoId, dependencyId) {
        var deferred = q.defer();

        getCourseById(courseId).then(function(course) {
            course.modules.id(moduleId).examples.id(exampleId).demos.id(demoId).dependencies.id(dependencyId).remove();
            course.save(function(err) {
                getDependencies(courseId, moduleId, exampleId, demoId).then(function(dependencies) {
                    deferred.resolve(dependencies);
                });
            });
        });

        return deferred.promise;
    }

    function updateDependency(courseId, moduleId, exampleId, demoId, dependencyId, dependency) {
        var deferred = q.defer();

        getCourseById(courseId).then(function(course){
            var dep = course.modules.id(moduleId).examples.id(exampleId).demos.id(demoId).dependencies.id(dependencyId);

            dep.title = dependency.title;
            dep.src = dependency.src;

            course.save(function(err) {
                getDependencies(courseId, moduleId, exampleId, demoId).then(function(dependencies) {
                    deferred.resolve(dependencies);
                });
            });
        });

        return deferred.promise;
    }

    function getLectures(courseId, moduleId){
        var deferred = q.defer();

        getCourseById(courseId).then(function(course){
            deferred.resolve(course.modules.id(moduleId).lectures);
        });
        return deferred.promise;
    }

    function addLecture(courseId, moduleId, lecture) {
        var deferred = q.defer();

        getCourseById(courseId).then(function(course) {
            course.modules.id(moduleId).lectures.push(lecture);

            course.save(function(err) {
                getLectures(courseId, moduleId).then(function(lectures) {
                    deferred.resolve(lectures);
                });
            });
        });

        return deferred.promise;
    }

    function removeLecture(courseId, moduleId, lectureId) {
        var deferred = q.defer();

        getCourseById(courseId).then(function(course) {
            course.modules.id(moduleId).lectures.id(lectureId).remove();

            course.save(function(err) {
                getLectures(courseId, moduleId).then(function(lectures) {
                    deferred.resolve(lectures);
                });
            });
        });

        return deferred.promise;
    }

    function updateLecture(courseId, moduleId, lectureId, lecture) {
        var deferred = q.defer();

        getCourseById(courseId).then(function(course) {
            var lect = course.modules.id(moduleId).lectures.id(lectureId);

            lect.title = lecture.title;
            lect.overview = lecture.overview;
            lect.learningElements = lecture.learningElements;

            course.save(function(err) {
                getLectures(courseId, moduleId).then(function(lectures) {
                    deferred.resolve(lectures);
                });
            });
        });

        return deferred.promise;
    }

    function getLectureById(courseId, moduleId, lectureId) {
        var deferred = q.defer();

        getCourseById(courseId).then(function(course) {
            deferred.resolve(course.modules.id(moduleId).lectures.id(lectureId));
        });

        return deferred.promise;
    }

    function getLearningElements(courseId, moduleId, lectureId){
        var deferred = q.defer();

        getCourseById(courseId).then(function(course){
            deferred.resolve(course.modules.id(moduleId).lectures.id(lectureId).learningElements);
        });
        return deferred.promise;
    }

    function addLearningElement(courseId, moduleId, lectureId, le) {
        var deferred = q.defer();

        getCourseById(courseId).then(function(course) {
            course.modules.id(moduleId).lectures.id(lectureId).learningElements.push(le);
            course.save(function(err) {
                getLearningElements(courseId, moduleId, lectureId).then(function(learningElements) {
                    deferred.resolve(learningElements);
                });
            });
        });

        return deferred.promise;
    }

    function removeLearningElement(courseId, moduleId, lectureId, leId) {
        var deferred = q.defer();

        getCourseById(courseId).then(function(course) {
            course.modules.id(moduleId).lectures.id(lectureId).learningElements.id(leId).remove();

            course.save(function(err) {
                getLearningElements(courseId, moduleId, lectureId).then(function(learningElements) {
                    deferred.resolve(learningElements);
                });
            });
        });

        return deferred.promise;
    }

    function updateLearningElement(courseId, moduleId, lectureId, leId, le) {
        var deferred = q.defer();

        getCourseById(courseId).then(function(course) {
            var learning = course.modules.id(moduleId).lectures.id(lectureId).learningElements.id(leId);

            learning.title = le.title;
            learning.type = le.type;
            learning.src = le.src;
            learning.html = le.html;

            course.save(function(err) {
                getLearningElements(courseId, moduleId, lectureId).then(function(learningElements) {
                    deferred.resolve(learningElements);
                });
            });
        });
        return deferred.promise;
    }
};


text:
import React from 'react';
import { View } from 'react-native';
import PropTypes from 'prop-types';
import { compose, pure, setPropTypes, defaultProps, branch, withProps } from 'recompose';
import { times } from 'lodash';

import { Link } from '@ui/NativeWebRouter';
import { getLinkPath, getItemImages } from '@utils/content';
import { withThemeMixin } from '@ui/theme';
import styled from '@ui/styled';
import { H5 } from '@ui/typography';
import ThumbnailCard from '@ui/ThumbnailCard';
import ErrorCard from '@ui/ErrorCard';

const generateLoadingStateData = (numberOfItems = 1) => {
  const itemData = () => ({
    id: 'fakeId0',
    title: '',
    channelName: '',
    content: {
      images: [],
    },
    isLoading: true,
  });

  const loadingStateData = [];
  times(numberOfItems, (n) => {
    const newData = itemData();
    newData.id = `fakeId${n}`;
    loadingStateData.push(newData);
  });

  return loadingStateData;
};

const enhance = compose(
  pure,
  setPropTypes({
    content: PropTypes.array,
    sectionTitle: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
    renderItem: PropTypes.func,
    isLoading: PropTypes.bool,
  }),
  defaultProps({
    isLoading: false,
    sectionTitle: 'More Like This',
    content: [],
  }),
  branch(({ isLoading, content }) => (isLoading && !content.length), withProps({
    content: generateLoadingStateData(3),
  })),
  withThemeMixin(() => ({
    type: 'light',
  })),
);

const defaultItemRenderer = item => (
  <Link to={getLinkPath(item)} key={item.id}>
    <ThumbnailCard
      title={item.title || item.name || ''}
      category={item.category}
      images={getItemImages(item)}
      isLoading={item.isLoading}
    />
  </Link>
);

const renderSectionTitle = (sectionTitle) => {
  if (typeof sectionTitle !== 'string') return sectionTitle;
  return (<Title>{sectionTitle}</Title>);
};

const Wrapper = styled(({ theme }) => ({
  paddingVertical: theme.sizing.baseUnit,
  backgroundColor: theme.colors.lightSecondary,
}))(View);

const Title = styled(({ theme }) => ({
  textAlign: 'center',
  marginBottom: theme.sizing.baseUnit / 2,
  paddingHorizontal: theme.sizing.baseUnit,
}))(H5);

const RelatedContentWithoutData = enhance(({
  sectionTitle,
  renderItem = defaultItemRenderer,
  content,
  error,
  style,
}) => (
  <Wrapper style={style}>
    {sectionTitle ? renderSectionTitle(sectionTitle) : null}
    {error ? <ErrorCard error={error} /> : null}
    {(content || []).map(renderItem)}
  </Wrapper>
));

export default RelatedContentWithoutData;

redpajama_set_name: RedPajamaGithub


text:
namespace Oxide.Core.Libraries.Covalence
{
    /// <summary>
    /// Represents a generic connected player within a game
    /// </summary>
    public interface ILivePlayer
    {
        /// <summary>
        /// Gets the base player of this player
        /// </summary>
        IPlayer BasePlayer { get; }

        /// <summary>
        /// Gets this player's in-game character, if available
        /// </summary>
        IPlayerCharacter Character { get; }

        #region Administration

        /// <summary>
        /// Kicks this player from the game
        /// </summary>
        /// <param name="reason"></param>
        void Kick(string reason);

        #endregion

        #region Manipulation

        /// <summary>
        /// Sends a chat message to this player's client
        /// </summary>
        /// <param name="message"></param>
        void SendChatMessage(string message);

        /// <summary>
        /// Runs the specified console command on this player's client
        /// </summary>
        /// <param name="command"></param>
        void RunCommand(string command, params object[] args);

        #endregion
    }
}


text:
using FluentMigrator;

namespace Greetings_MySqlMigrations.Migrations;

[Migration(1)]
public class MySqlInitialCreate : Migration
{
    public override void Up()
    {
        Create.Table("Person")
            .WithColumn("Id").AsInt32().NotNullable().PrimaryKey().Identity()
            .WithColumn("Name").AsString().Unique()
            .WithColumn("TimeStamp").AsDateTime().Nullable().WithDefault(SystemMethods.CurrentDateTime);

        Create.Table("Greeting")
            .WithColumn("Id").AsInt32().NotNullable().PrimaryKey().Identity()
            .WithColumn("Message").AsString()
            .WithColumn("Recipient_Id").AsInt32();

        Create.ForeignKey()
            .FromTable("Greeting").ForeignColumn("Recipient_Id")
            .ToTable("Person").PrimaryColumn("Id");
    }

    public override void Down()
    {
        Delete.Table("Greeting");
        Delete.Table("Person");
    }
}


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

#ifndef BITCOIN_MEMUSAGE_H
#define BITCOIN_MEMUSAGE_H

#include <stdlib.h>

#include <map>
#include <set>
#include <vector>

#include <boost/unordered_set.hpp>
#include <boost/unordered_map.hpp>

namespace memusage
{

/** Compute the total memory used by allocating alloc bytes. */
static size_t MallocUsage(size_t alloc);

/** Compute the memory used for dynamically allocated but owned data structures.
 *  For generic data types, this is *not* recursive. DynamicUsage(vector<vector<int> >)
 *  will compute the memory used for the vector<int>'s, but not for the ints inside.
 *  This is for efficiency reasons, as these functions are intended to be fast. If
 *  application data structures require more accurate inner accounting, they should
 *  do the recursion themselves, or use more efficient caching + updating on modification.
 */
template<typename X> static size_t DynamicUsage(const std::vector<X>& v);
template<typename X> static size_t DynamicUsage(const std::set<X>& s);
template<typename X, typename Y> static size_t DynamicUsage(const std::map<X, Y>& m);
template<typename X, typename Y> static size_t DynamicUsage(const boost::unordered_set<X, Y>& s);
template<typename X, typename Y, typename Z> static size_t DynamicUsage(const boost::unordered_map<X, Y, Z>& s);
template<typename X> static size_t DynamicUsage(const X& x);

static inline size_t MallocUsage(size_t alloc)
{
    // Measured on libc6 2.19 on Linux.
    if (sizeof(void*) == 8) {
        return ((alloc + 31) >> 4) << 4;
    } else if (sizeof(void*) == 4) {
        return ((alloc + 15) >> 3) << 3;
    } else {
        assert(0);
    }
}

// STL data structures

template<typename X>
struct stl_tree_node
{
private:
    int color;
    void* parent;
    void* left;
    void* right;
    X x;
};

template<typename X>
static inline size_t DynamicUsage(const std::vector<X>& v)
{
    return MallocUsage(v.capacity() * sizeof(X));
}

template<typename X>
static inline size_t DynamicUsage(const std::set<X>& s)
{
    return MallocUsage(sizeof(stl_tree_node<X>)) * s.size();
}

template<typename X, typename Y>
static inline size_t DynamicUsage(const std::map<X, Y>& m)
{
    return MallocUsage(sizeof(stl_tree_node<std::pair<const X, Y> >)) * m.size();
}

// Boost data structures

template<typename X>
struct boost_unordered_node : private X
{
private:
    void* ptr;
};

template<typename X, typename Y>
static inline size_t DynamicUsage(const boost::unordered_set<X, Y>& s)
{
    return MallocUsage(sizeof(boost_unordered_node<X>)) * s.size() + MallocUsage(sizeof(void*) * s.bucket_count());
}

template<typename X, typename Y, typename Z>
static inline size_t DynamicUsage(const boost::unordered_map<X, Y, Z>& m)
{
    return MallocUsage(sizeof(boost_unordered_node<std::pair<const X, Y> >)) * m.size() + MallocUsage(sizeof(void*) * m.bucket_count());
}

// Dispatch to class method as fallback

template<typename X>
static inline size_t DynamicUsage(const X& x)
{
    return x.DynamicMemoryUsage();
}

}

#endif


text:
package TasksAndSyncs.typesystem;

/*Generated by MPS */

import jetbrains.mps.lang.typesystem.runtime.AbstractInferenceRule_Runtime;
import jetbrains.mps.lang.typesystem.runtime.InferenceRule_Runtime;
import org.jetbrains.mps.openapi.model.SNode;
import jetbrains.mps.typesystem.inference.TypeCheckingContext;
import jetbrains.mps.lang.typesystem.runtime.IsApplicableStatus;
import jetbrains.mps.typesystem.inference.EquationInfo;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SConceptOperations;
import jetbrains.mps.smodel.SModelUtil_new;

public class typeof_FutureJoin_InferenceRule extends AbstractInferenceRule_Runtime implements InferenceRule_Runtime {
  public typeof_FutureJoin_InferenceRule() {
  }

  public void applyRule(final SNode futureJoin, final TypeCheckingContext typeCheckingContext, IsApplicableStatus status) {
    {
      SNode _nodeToCheck_1029348928467 = futureJoin;
      EquationInfo _info_12389875345 = new EquationInfo(_nodeToCheck_1029348928467, null, "r:daf934de-3466-4fa8-a227-270fedb7e2f2(TasksAndSyncs.typesystem)", "4390787788471308638", 0, null);
      typeCheckingContext.createEquation((SNode) typeCheckingContext.typeOf(_nodeToCheck_1029348928467, "r:daf934de-3466-4fa8-a227-270fedb7e2f2(TasksAndSyncs.typesystem)", "4390787788471308645", true), (SNode) SConceptOperations.createNewNode("com.mbeddr.core.expressions.structure.VoidType", null), _info_12389875345);
    }
  }

  public String getApplicableConceptFQName() {
    return "TasksAndSyncs.structure.FutureJoin";
  }

  public IsApplicableStatus isApplicableAndPattern(SNode argument) {
    {
      boolean b = SModelUtil_new.isAssignableConcept(argument.getConcept().getQualifiedName(), this.getApplicableConceptFQName());
      return new IsApplicableStatus(b, null);
    }
  }

  public boolean overrides() {
    return false;
  }
}


text:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package fsmproject.entitys;

import java.util.HashMap;

/**
 * this class store all the existing entities in our world
 * in order to manage the messages they send.
 * @author Luis Fernández <@lfernandez93>
 */
public class EntityManager {

    private HashMap<Integer, BaseGameEntity> entityMap;
    private static EntityManager _instance;

    private EntityManager() {
        this.entityMap = new HashMap<>();
    }

    /**
     *  return the instance of the EntityManager class
     * @return
     */
    public static EntityManager getInstance() {
        if (_instance == null) {
            return new EntityManager();
        }
        return _instance;
    }

    /**
     * register an entity in the database map
     * @param entity
     */
    public void registerEntity(BaseGameEntity entity) {
        entityMap.put(entity.getId(), entity);
    }

    /**
     * search for an entity in the database map
     * @param id
     * @return
     */
    public BaseGameEntity getEntityFromId(int id) {
        BaseGameEntity desiredEntity;
        desiredEntity = entityMap.get(id);
        if (desiredEntity == null) {
            System.err.println("ID not found");
        }
        return desiredEntity;
    }

    /**
     * delete an entity from the database map
     * @param entity
     */
    public void removeEntity(BaseGameEntity entity) {
        entityMap.remove(entityMap.get(entity.getId()));

    }
}


text:
<?php

namespace Concrete\Core\Http;

use Concrete\Core\Application\Application;
use Concrete\Core\Http\Middleware\DispatcherDelegate;
use Concrete\Core\Http\Middleware\MiddlewareStack;
use Concrete\Core\Routing\Redirect;
use Concrete\Core\Routing\RouterInterface;
use Concrete\Core\Session\SessionValidator;
use Concrete\Core\User\User;
use Concrete\Core\View\View;
use Symfony\Component\HttpFoundation\Request as SymfonyRequest;
use Symfony\Component\HttpFoundation\Response as SymfonyResponse;
use Symfony\Component\Routing\Exception\MethodNotAllowedException;
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
use Symfony\Component\Routing\Matcher\UrlMatcher;
use Symfony\Component\Routing\RequestContext;
use Symfony\Component\Routing\RouteCollection;

class DefaultDispatcher implements DispatcherInterface
{
    /**
     * @var \Concrete\Core\Application\Application
     */
    private $app;

    /**
     * @var \Concrete\Core\Routing\RouterInterface
     */
    private $router;

    public function __construct(Application $app, RouterInterface $router)
    {
        $this->app = $app;
        $this->router = $router;
    }

    /**
     * @param \Symfony\Component\HttpFoundation\Request $request
     *
     * @return SymfonyResponse
     */
    public function dispatch(SymfonyRequest $request)
    {
        $path = rawurldecode($request->getPathInfo());

        if (substr($path, 0, 3) == '../' || substr($path, -3) == '/..' || strpos($path, '/../') ||
            substr($path, 0, 3) == '..\\' || substr($path, -3) == '\\..' || strpos($path, '\\..\\')) {
            throw new \RuntimeException(t('Invalid path traversal. Please make this request with a valid HTTP client.'));
        }

        $response = null;
        if ($this->app->isInstalled()) {
            $response = $this->getEarlyDispatchResponse();
        }
        if ($response === null) {
            $response = $this->handleDispatch($request);
        }

        return $response;
    }

    private function getEarlyDispatchResponse()
    {
        $validator = $this->app->make(SessionValidator::class);
        if ($validator->hasActiveSession()) {
            $session = $this->app['session'];
            if (!$session->has('uID')) {
                User::verifyAuthTypeCookie();
            }

            // User may have been logged in, so lets check status again.
            if ($session->has('uID') && $session->get('uID') > 0 && $response = $this->validateUser()) {
                return $response;
            }
        }
    }

    private function validateUser()
    {
        // check to see if this is a valid user account
        $user = $this->app->make(User::class);
        if (!$user->checkLogin()) {
            $isActive = $user->isActive();
            $user->logout();

            if ($user->isError()) {
                switch ($user->getError()) {
                    case USER_SESSION_EXPIRED:
                        return Redirect::to('/login', 'session_invalidated')->send();
                }
            } elseif (!$isActive) {
                return Redirect::to('/login', 'account_deactivated')->send();
            } else {
                $v = new View('/frontend/user_error');
                $v->setViewTheme('concrete');
                $contents = $v->render();

                return $this->app->make(ResponseFactoryInterface::class)->forbidden($contents);
            }
        }
    }

    private function handleDispatch($request)
    {
        try {
            $route = $this->router->matchRoute($request)->getRoute();
            $dispatcher = new RouteDispatcher($this->router, $route, []);
            $stack = new MiddlewareStack(
                new DispatcherDelegate($dispatcher)
            );
            $stack->setApplication($this->app);
            foreach($route->getMiddlewares() as $middleware) {
                if (is_string($middleware->getMiddleware())) {
                    $inflatedMiddleware =  $this->app->make($middleware->getMiddleware());
                } else {
                    $inflatedMiddleware = $middleware->getMiddleware();
                }
                $stack = $stack->withMiddleware(
                    $inflatedMiddleware,
                    $middleware->getPriority()
                );
            }
            return $stack->process($request);
        } catch (ResourceNotFoundException $e) {
        } catch (MethodNotAllowedException $e) {
        }
        $c = \Page::getFromRequest($request);
        $response = $this->app->make(ResponseFactoryInterface::class)->collection($c);

        return $response;
    }

    /**
     * @param \Symfony\Component\Routing\RouteCollection $routes
     * @param string $path
     *
     * @return \Symfony\Component\Routing\RouteCollection
     */
    private function filterRouteCollectionForPath(RouteCollection $routes, $path)
    {
        $result = new RouteCollection();
        foreach ($routes->getResources() as $resource) {
            $result->addResource($resource);
        }
        foreach ($routes->all() as $name => $route) {
            $routePath = $route->getPath();
            $p = strpos($routePath, '{');
            $skip = false;
            if ($p === false) {
                if ($routePath !== $path) {
                    $skip = true;
                }
            } elseif ($p > 0) {
                $routeFixedPath = substr($routePath, 0, $p);
                if (strpos($path, $routeFixedPath) !== 0) {
                    $skip = true;
                }
            }
            if ($skip === false) {
                $result->add($name, $route);
            }
        }

        return $result;
    }
}


text:
module TfpMetaprogramming
  module Callable
    module MethodObjects

    end
  end
end
require_relative './method_objects/unbindr'


text:
@font-face
{
    font-family: 'dejavu_sansextralight';
    font-weight: normal;
    font-style: normal;

    src: url('/fonts/dejavusans-extralight-webfont.eot');
    src: url('/fonts/dejavusans-extralight-webfont.eot?#iefix') format('embedded-opentype'), url('/fonts/dejavusans-extralight-webfont.woff') format('woff'), url('/fonts/dejavusans-extralight-webfont.ttf') format('truetype'), url('/fonts/dejavusans-extralight-webfont.svg#dejavu_sansextralight') format('svg');
}
@font-face
{
    font-family: 'dejavu_sanscondensed';
    font-weight: normal;
    font-style: normal;

    src: url('/fonts/dejavusanscondensed-webfont.eot');
    src: url('/fonts/dejavusanscondensed-webfont.eot?#iefix') format('embedded-opentype'), url('/fonts/dejavusanscondensed-webfont.woff') format('woff'), url('/fonts/dejavusanscondensed-webfont.ttf') format('truetype'), url('/fonts/dejavusanscondensed-webfont.svg#dejavu_sanscondensed') format('svg');
}
@font-face
{
    font-family: 'dejavu_sans';
    font-weight: normal;
    font-style: normal;

    src: url('/fonts/dejavusans-webfont.eot');
    src: url('/fonts/dejavusans-webfont.eot?#iefix') format('embedded-opentype'), url('/fonts/dejavusans-webfont.woff') format('woff'), url('/fonts/dejavusans-webfont.ttf') format('truetype'), url('/fonts/dejavusans-webfont.svg#dejavu_sansbook') format('svg');
}
@font-face
{
    font-family: 'dejavu_sanscondensed_bold';
    font-weight: normal;
    font-style: normal;

    src: url('/fonts/dejavusanscondensed-bold-webfont.eot');
    src: url('/fonts/dejavusanscondensed-bold-webfont.eot?#iefix') format('embedded-opentype'), url('/fonts/dejavusanscondensed-bold-webfont.woff') format('woff'), url('/fonts/dejavusanscondensed-bold-webfont.ttf') format('truetype'), url('/fonts/dejavusanscondensed-bold-webfont.svg#dejavu_sanscondensed_bold') format('svg');
}
@font-face
{
    font-family: 'dejavu_sansbold';
    font-weight: normal;
    font-style: normal;

    src: url('/fonts/dejavusans-bold-webfont.eot');
    src: url('/fonts/dejavusans-bold-webfont.eot?#iefix') format('embedded-opentype'), url('/fonts/dejavusans-bold-webfont.woff') format('woff'), url('/fonts/dejavusans-bold-webfont.ttf') format('truetype'), url('/fonts/dejavusans-bold-webfont.svg#dejavu_sansbold') format('svg');
}


text:
"""Support for deCONZ sensors."""

from __future__ import annotations

from collections.abc import Callable
from dataclasses import dataclass
from datetime import datetime
from typing import Generic, TypeVar

from pydeconz.interfaces.sensors import SensorResources
from pydeconz.models.event import EventType
from pydeconz.models.sensor import SensorBase as PydeconzSensorBase
from pydeconz.models.sensor.air_quality import AirQuality
from pydeconz.models.sensor.consumption import Consumption
from pydeconz.models.sensor.daylight import DAYLIGHT_STATUS, Daylight
from pydeconz.models.sensor.generic_status import GenericStatus
from pydeconz.models.sensor.humidity import Humidity
from pydeconz.models.sensor.light_level import LightLevel
from pydeconz.models.sensor.power import Power
from pydeconz.models.sensor.pressure import Pressure
from pydeconz.models.sensor.switch import Switch
from pydeconz.models.sensor.temperature import Temperature
from pydeconz.models.sensor.time import Time

from homeassistant.components.sensor import (
    DOMAIN,
    SensorDeviceClass,
    SensorEntity,
    SensorEntityDescription,
    SensorStateClass,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
    ATTR_TEMPERATURE,
    ATTR_VOLTAGE,
    ENERGY_KILO_WATT_HOUR,
    LIGHT_LUX,
    PERCENTAGE,
    POWER_WATT,
    PRESSURE_HPA,
    TEMP_CELSIUS,
)
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity import EntityCategory
from homeassistant.helpers.entity_platform import AddEntitiesCallback
import homeassistant.helpers.entity_registry as er
from homeassistant.helpers.typing import StateType
import homeassistant.util.dt as dt_util

from .const import ATTR_DARK, ATTR_ON, DOMAIN as DECONZ_DOMAIN
from .deconz_device import DeconzDevice
from .gateway import DeconzGateway, get_gateway_from_config_entry

PROVIDES_EXTRA_ATTRIBUTES = (
    "battery",
    "consumption",
    "daylight_status",
    "humidity",
    "light_level",
    "power",
    "pressure",
    "status",
    "temperature",
)

ATTR_CURRENT = "current"
ATTR_POWER = "power"
ATTR_DAYLIGHT = "daylight"
ATTR_EVENT_ID = "event_id"

T = TypeVar(
    "T",
    AirQuality,
    Consumption,
    Daylight,
    GenericStatus,
    Humidity,
    LightLevel,
    Power,
    Pressure,
    Temperature,
    Time,
    PydeconzSensorBase,
)

@dataclass
class DeconzSensorDescriptionMixin(Generic[T]):
    """Required values when describing secondary sensor attributes."""

    update_key: str
    value_fn: Callable[[T], datetime | StateType]

@dataclass
class DeconzSensorDescription(SensorEntityDescription, DeconzSensorDescriptionMixin[T]):
    """Class describing deCONZ binary sensor entities."""

    instance_check: type[T] | None = None
    name_suffix: str = ""
    old_unique_id_suffix: str = ""

ENTITY_DESCRIPTIONS: tuple[DeconzSensorDescription, ...] = (
    DeconzSensorDescription[AirQuality](
        key="air_quality",
        update_key="airquality",
        value_fn=lambda device: device.air_quality,
        instance_check=AirQuality,
        state_class=SensorStateClass.MEASUREMENT,
    ),
    DeconzSensorDescription[AirQuality](
        key="air_quality_ppb",
        update_key="airqualityppb",
        value_fn=lambda device: device.air_quality_ppb,
        instance_check=AirQuality,
        name_suffix="PPB",
        old_unique_id_suffix="ppb",
        device_class=SensorDeviceClass.AQI,
        state_class=SensorStateClass.MEASUREMENT,
    ),
    DeconzSensorDescription[Consumption](
        key="consumption",
        update_key="consumption",
        value_fn=lambda device: device.scaled_consumption,
        instance_check=Consumption,
        device_class=SensorDeviceClass.ENERGY,
        state_class=SensorStateClass.TOTAL_INCREASING,
        native_unit_of_measurement=ENERGY_KILO_WATT_HOUR,
    ),
    DeconzSensorDescription[Daylight](
        key="daylight_status",
        update_key="status",
        value_fn=lambda device: DAYLIGHT_STATUS[device.daylight_status],
        instance_check=Daylight,
        icon="mdi:white-balance-sunny",
        entity_registry_enabled_default=False,
    ),
    DeconzSensorDescription[GenericStatus](
        key="status",
        update_key="status",
        value_fn=lambda device: device.status,
        instance_check=GenericStatus,
    ),
    DeconzSensorDescription[Humidity](
        key="humidity",
        update_key="humidity",
        value_fn=lambda device: device.scaled_humidity,
        instance_check=Humidity,
        device_class=SensorDeviceClass.HUMIDITY,
        state_class=SensorStateClass.MEASUREMENT,
        native_unit_of_measurement=PERCENTAGE,
    ),
    DeconzSensorDescription[LightLevel](
        key="light_level",
        update_key="lightlevel",
        value_fn=lambda device: device.scaled_light_level,
        instance_check=LightLevel,
        device_class=SensorDeviceClass.ILLUMINANCE,
        state_class=SensorStateClass.MEASUREMENT,
        native_unit_of_measurement=LIGHT_LUX,
    ),
    DeconzSensorDescription[Power](
        key="power",
        update_key="power",
        value_fn=lambda device: device.power,
        instance_check=Power,
        device_class=SensorDeviceClass.POWER,
        state_class=SensorStateClass.MEASUREMENT,
        native_unit_of_measurement=POWER_WATT,
    ),
    DeconzSensorDescription[Pressure](
        key="pressure",
        update_key="pressure",
        value_fn=lambda device: device.pressure,
        instance_check=Pressure,
        device_class=SensorDeviceClass.PRESSURE,
        state_class=SensorStateClass.MEASUREMENT,
        native_unit_of_measurement=PRESSURE_HPA,
    ),
    DeconzSensorDescription[Temperature](
        key="temperature",
        update_key="temperature",
        value_fn=lambda device: device.scaled_temperature,
        instance_check=Temperature,
        device_class=SensorDeviceClass.TEMPERATURE,
        state_class=SensorStateClass.MEASUREMENT,
        native_unit_of_measurement=TEMP_CELSIUS,
    ),
    DeconzSensorDescription[Time](
        key="last_set",
        update_key="lastset",
        value_fn=lambda device: dt_util.parse_datetime(device.last_set),
        instance_check=Time,
        device_class=SensorDeviceClass.TIMESTAMP,
    ),
    DeconzSensorDescription[SensorResources](
        key="battery",
        update_key="battery",
        value_fn=lambda device: device.battery,
        name_suffix="Battery",
        old_unique_id_suffix="battery",
        device_class=SensorDeviceClass.BATTERY,
        state_class=SensorStateClass.MEASUREMENT,
        native_unit_of_measurement=PERCENTAGE,
        entity_category=EntityCategory.DIAGNOSTIC,
    ),
    DeconzSensorDescription[SensorResources](
        key="internal_temperature",
        update_key="temperature",
        value_fn=lambda device: device.internal_temperature,
        name_suffix="Temperature",
        old_unique_id_suffix="temperature",
        device_class=SensorDeviceClass.TEMPERATURE,
        state_class=SensorStateClass.MEASUREMENT,
        native_unit_of_measurement=TEMP_CELSIUS,
    ),
)

@callback
def async_update_unique_id(
    hass: HomeAssistant, unique_id: str, description: DeconzSensorDescription
) -> None:
    """Update unique ID to always have a suffix.

    Introduced with release 2022.9.
    """
    ent_reg = er.async_get(hass)

    new_unique_id = f"{unique_id}-{description.key}"
    if ent_reg.async_get_entity_id(DOMAIN, DECONZ_DOMAIN, new_unique_id):
        return

    if description.old_unique_id_suffix:
        unique_id = f'{unique_id.split("-", 1)[0]}-{description.old_unique_id_suffix}'

    if entity_id := ent_reg.async_get_entity_id(DOMAIN, DECONZ_DOMAIN, unique_id):
        ent_reg.async_update_entity(entity_id, new_unique_id=new_unique_id)

async def async_setup_entry(
    hass: HomeAssistant,
    config_entry: ConfigEntry,
    async_add_entities: AddEntitiesCallback,
) -> None:
    """Set up the deCONZ sensors."""
    gateway = get_gateway_from_config_entry(hass, config_entry)
    gateway.entities[DOMAIN] = set()

    known_device_entities: dict[str, set[str]] = {
        description.key: set()
        for description in ENTITY_DESCRIPTIONS
        if description.instance_check is None
    }

    @callback
    def async_add_sensor(_: EventType, sensor_id: str) -> None:
        """Add sensor from deCONZ."""
        sensor = gateway.api.sensors[sensor_id]
        entities: list[DeconzSensor] = []

        for description in ENTITY_DESCRIPTIONS:
            if description.instance_check and not isinstance(
                sensor, description.instance_check
            ):
                continue

            no_sensor_data = False
            if description.value_fn(sensor) is None:
                no_sensor_data = True

            if description.instance_check is None:
                if (
                    sensor.type.startswith("CLIP")
                    or (no_sensor_data and description.key != "battery")
                    or (
                        (unique_id := sensor.unique_id.rsplit("-", 1)[0])
                        in known_device_entities[description.key]
                    )
                ):
                    continue
                known_device_entities[description.key].add(unique_id)
                if no_sensor_data and description.key == "battery":
                    async_update_unique_id(hass, sensor.unique_id, description)
                    DeconzBatteryTracker(
                        sensor_id, gateway, description, async_add_entities
                    )
                    continue

            if no_sensor_data:
                continue

            async_update_unique_id(hass, sensor.unique_id, description)
            entities.append(DeconzSensor(sensor, gateway, description))

        async_add_entities(entities)

    gateway.register_platform_add_device_callback(
        async_add_sensor,
        gateway.api.sensors,
    )

class DeconzSensor(DeconzDevice[SensorResources], SensorEntity):
    """Representation of a deCONZ sensor."""

    TYPE = DOMAIN
    entity_description: DeconzSensorDescription

    def __init__(
        self,
        device: SensorResources,
        gateway: DeconzGateway,
        description: DeconzSensorDescription,
    ) -> None:
        """Initialize deCONZ sensor."""
        self.entity_description = description
        self.unique_id_suffix = description.key
        self._update_key = description.update_key
        if description.name_suffix:
            self._name_suffix = description.name_suffix
        super().__init__(device, gateway)

        if (
            self.entity_description.key in PROVIDES_EXTRA_ATTRIBUTES
            and self._update_keys is not None
        ):
            self._update_keys.update({"on", "state"})

    @property
    def native_value(self) -> StateType | datetime:
        """Return the state of the sensor."""
        return self.entity_description.value_fn(self._device)

    @property
    def extra_state_attributes(self) -> dict[str, bool | float | int | str | None]:
        """Return the state attributes of the sensor."""
        attr: dict[str, bool | float | int | str | None] = {}

        if self.entity_description.key not in PROVIDES_EXTRA_ATTRIBUTES:
            return attr

        if self._device.on is not None:
            attr[ATTR_ON] = self._device.on

        if self._device.internal_temperature is not None:
            attr[ATTR_TEMPERATURE] = self._device.internal_temperature

        if isinstance(self._device, Consumption):
            attr[ATTR_POWER] = self._device.power

        elif isinstance(self._device, Daylight):
            attr[ATTR_DAYLIGHT] = self._device.daylight

        elif isinstance(self._device, LightLevel):

            if self._device.dark is not None:
                attr[ATTR_DARK] = self._device.dark

            if self._device.daylight is not None:
                attr[ATTR_DAYLIGHT] = self._device.daylight

        elif isinstance(self._device, Power):
            attr[ATTR_CURRENT] = self._device.current
            attr[ATTR_VOLTAGE] = self._device.voltage

        elif isinstance(self._device, Switch):
            for event in self.gateway.events:
                if self._device == event.device:
                    attr[ATTR_EVENT_ID] = event.event_id

        return attr

class DeconzBatteryTracker:
    """Track sensors without a battery state and add entity when battery state exist."""

    def __init__(
        self,
        sensor_id: str,
        gateway: DeconzGateway,
        description: DeconzSensorDescription,
        async_add_entities: AddEntitiesCallback,
    ) -> None:
        """Set up tracker."""
        self.sensor = gateway.api.sensors[sensor_id]
        self.gateway = gateway
        self.description = description
        self.async_add_entities = async_add_entities
        self.unsubscribe = self.sensor.subscribe(self.async_update_callback)

    @callback
    def async_update_callback(self) -> None:
        """Update the device's state."""
        if self.description.update_key in self.sensor.changed_keys:
            self.unsubscribe()
            self.async_add_entities(
                [DeconzSensor(self.sensor, self.gateway, self.description)]
            )


text:
package org.krysalis.barcode4j.impl.postnet;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;

import org.junit.Test;

import com.github.mbhk.barcode4j.Configuration;

/**
 * Test class for the POSTNET implementation.
 *
 * @author Chris Dolphy
 * @version $Id$
 */
public class POSTNETTest {

    @Test
    public void testIllegalArguments() throws Exception {
        try {
            POSTNET impl = new POSTNET();
            impl.generateBarcode(null, null);
            fail("Expected an NPE");
        } catch (NullPointerException npe) {
            assertNotNull("Error message is empty", npe.getMessage());
        }
    }

    @Test
    public void testDefaultsInXML() throws Exception {
        POSTNETBean refBean = new POSTNETBean();

        POSTNET gen = new POSTNET();
        Configuration cfg = new Configuration("postnet");
        gen.configure(cfg);
        POSTNETBean xmlBean = gen.getPOSTNETBean();
        assertEquals(refBean.getBarHeight(), xmlBean.getBarHeight(), 0.01);
        assertEquals(refBean.getBaselinePosition(), xmlBean.getBaselinePosition());
        assertEquals(refBean.getChecksumMode(), xmlBean.getChecksumMode());
        assertEquals(refBean.isDisplayChecksum(), xmlBean.isDisplayChecksum());
        assertEquals(refBean.getFontSize(), xmlBean.getFontSize(), 0.01);
        assertEquals(refBean.getHeight(), xmlBean.getHeight(), 0.01);
        assertEquals(refBean.getHumanReadableHeight(), xmlBean.getHumanReadableHeight(), 0.01);
        assertEquals(refBean.getIntercharGapWidth(), xmlBean.getIntercharGapWidth(), 0.01);
        assertEquals(refBean.getModuleWidth(), xmlBean.getModuleWidth(), 0.01);
        assertEquals(refBean.getQuietZone(), xmlBean.getQuietZone(), 0.01);
        assertEquals(refBean.getShortBarHeight(), xmlBean.getShortBarHeight(), 0.01);
        assertEquals(refBean.getVerticalQuietZone(), xmlBean.getVerticalQuietZone(), 0.01);
        assertEquals(refBean.hasQuietZone(), xmlBean.hasQuietZone());
        assertEquals(refBean.getChecksumMode(), xmlBean.getChecksumMode());
        assertEquals(refBean.getMsgPosition(), xmlBean.getMsgPosition());
        assertEquals(refBean.getPattern(), xmlBean.getPattern());
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_checked="true"
        android:color="@color/theme_green" />

    <item android:color="@color/theme_disabled_foreground" />
</selector>


text:
System.register(['angular2/core', './astronaut.component', './mission.service'], function(exports_1, context_1) {
    "use strict";
    var __moduleName = context_1 && context_1.id;
    var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
        var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
        if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
        else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    var __metadata = (this && this.__metadata) || function (k, v) {
        if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
    };
    var core_1, astronaut_component_1, mission_service_1;
    var MissionControlComponent;
    return {
        setters:[
            function (core_1_1) {
                core_1 = core_1_1;
            },
            function (astronaut_component_1_1) {
                astronaut_component_1 = astronaut_component_1_1;
            },
            function (mission_service_1_1) {
                mission_service_1 = mission_service_1_1;
            }],
        execute: function() {
            MissionControlComponent = (function () {
                function MissionControlComponent(missionService) {
                    var _this = this;
                    this.missionService = missionService;
                    this.astronauts = ['Lovell', 'Swigert', 'Haise'];
                    this.history = [];
                    this.missions = [
                        'Fly to the moon!',
                        'Fly to mars!',
                        'Fly to Vegas!'
                    ];
                    this.nextMission = 0;
                    missionService.missionConfirmed$.subscribe(function (astronaut) {
                        _this.history.push(astronaut + " confirmed the mission");
                    });
                }
                MissionControlComponent.prototype.announce = function () {
                    var mission = this.missions[this.nextMission++];
                    this.missionService.announceMission(mission);
                    this.history.push("Mission \"" + mission + "\" announced");
                    if (this.nextMission >= this.missions.length) {
                        this.nextMission = 0;
                    }
                };
                MissionControlComponent = __decorate([
                    core_1.Component({
                        selector: 'mission-control',
                        template: "\n
Mission Control
\n    <button (click)=\"announce()\">Announce mission</button>\n    <my-astronaut *ngFor=\"#astronaut of astronauts\"\n      [astronaut]=\"astronaut\">\n    </my-astronaut>\n
History
\n
\n
{{event}}
\n
\n  ",
                        directives: [astronaut_component_1.AstronautComponent],
                        providers: [mission_service_1.MissionService]
                    }),
                    __metadata('design:paramtypes', [mission_service_1.MissionService])
                ], MissionControlComponent);
                return MissionControlComponent;
            }());
            exports_1("MissionControlComponent", MissionControlComponent);
        }
    }
});
//# sourceMappingURL=mission-control.component.js.map


text:
from __future__ import unicode_literals

from django.db import migrations

class Migration(migrations.Migration):

    dependencies = [
        ('eventstatistics', '0008_auto_20170113_0633'),
    ]

    operations = [
        migrations.AlterModelOptions(
            name='eventstatistic',
            options={'ordering': ['period_id', 'minute', 'second', 'relative_seconds']},
        ),
    ]


text:
package org.schemaspy.model;

/**
 * Treat views as tables that have no rows and are represented by the SQL that
 * defined them.
 */
public class View extends Table {
    private String viewDefinition;

    /**
     * @param db
     * @param catalog
     * @param schema
     * @param name
     * @param remarks
     * @param viewDefinition
     */
    public View(Database db, String catalog, String schema,
                String name, String remarks, String viewDefinition) {
        super(db, catalog, schema, name, remarks);

        if (viewDefinition != null && viewDefinition.trim().length() > 0)
            this.viewDefinition = viewDefinition;
    }

    /**
     * @return
     */
    @Override
    public boolean isView() {
        return true;
    }

    @Override
    public String getViewDefinition() {
        return viewDefinition;
    }

    public void setViewDefinition(String viewDefinition) {
        this.viewDefinition = viewDefinition;
    }
}


text:
package org.apache.camel.builder.endpoint.dsl;

import java.util.*;
import java.util.concurrent.*;
import java.util.function.*;
import java.util.stream.*;
import javax.annotation.Generated;
import org.apache.camel.builder.EndpointConsumerBuilder;
import org.apache.camel.builder.EndpointProducerBuilder;
import org.apache.camel.builder.endpoint.AbstractEndpointBuilder;

/**
 * Expose metrics from Camel routes.
 *
 * Generated by camel build tools - do NOT edit this file!
 */
@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
public interface MicroProfileMetricsEndpointBuilderFactory {

    /**
     * Builder for endpoint for the MicroProfile Metrics component.
     */
    public interface MicroProfileMetricsEndpointBuilder
            extends
                EndpointProducerBuilder {
        default AdvancedMicroProfileMetricsEndpointBuilder advanced() {
            return (AdvancedMicroProfileMetricsEndpointBuilder) this;
        }
        /**
         * Action to use when using the timer type.
         *
         * The option is a: java.lang.String type.
         *
         * Group: producer
         *
         * @param action the value to set
         * @return the dsl builder
         */
        default MicroProfileMetricsEndpointBuilder action(String action) {
            doSetProperty("action", action);
            return this;
        }
        /**
         * Increment value when using the counter type.
         *
         * The option is a: java.lang.Long type.
         *
         * Group: producer
         *
         * @param counterIncrement the value to set
         * @return the dsl builder
         */
        default MicroProfileMetricsEndpointBuilder counterIncrement(
                Long counterIncrement) {
            doSetProperty("counterIncrement", counterIncrement);
            return this;
        }
        /**
         * Increment value when using the counter type.
         *
         * The option will be converted to a
         * java.lang.Long type.
         *
         * Group: producer
         *
         * @param counterIncrement the value to set
         * @return the dsl builder
         */
        default MicroProfileMetricsEndpointBuilder counterIncrement(
                String counterIncrement) {
            doSetProperty("counterIncrement", counterIncrement);
            return this;
        }
        /**
         * Metric description.
         *
         * The option is a: java.lang.String type.
         *
         * Group: producer
         *
         * @param description the value to set
         * @return the dsl builder
         */
        default MicroProfileMetricsEndpointBuilder description(
                String description) {
            doSetProperty("description", description);
            return this;
        }
        /**
         * Metric display name.
         *
         * The option is a: java.lang.String type.
         *
         * Group: producer
         *
         * @param displayName the value to set
         * @return the dsl builder
         */
        default MicroProfileMetricsEndpointBuilder displayName(
                String displayName) {
            doSetProperty("displayName", displayName);
            return this;
        }
        /**
         * Decrement metric value when using concurrent gauge type.
         *
         * The option is a: java.lang.Boolean type.
         *
         * Group: producer
         *
         * @param gaugeDecrement the value to set
         * @return the dsl builder
         */
        default MicroProfileMetricsEndpointBuilder gaugeDecrement(
                Boolean gaugeDecrement) {
            doSetProperty("gaugeDecrement", gaugeDecrement);
            return this;
        }
        /**
         * Decrement metric value when using concurrent gauge type.
         *
         * The option will be converted to a
         * java.lang.Boolean type.
         *
         * Group: producer
         *
         * @param gaugeDecrement the value to set
         * @return the dsl builder
         */
        default MicroProfileMetricsEndpointBuilder gaugeDecrement(
                String gaugeDecrement) {
            doSetProperty("gaugeDecrement", gaugeDecrement);
            return this;
        }
        /**
         * Increment metric value when using the concurrent gauge type.
         *
         * The option is a: java.lang.Boolean type.
         *
         * Group: producer
         *
         * @param gaugeIncrement the value to set
         * @return the dsl builder
         */
        default MicroProfileMetricsEndpointBuilder gaugeIncrement(
                Boolean gaugeIncrement) {
            doSetProperty("gaugeIncrement", gaugeIncrement);
            return this;
        }
        /**
         * Increment metric value when using the concurrent gauge type.
         *
         * The option will be converted to a
         * java.lang.Boolean type.
         *
         * Group: producer
         *
         * @param gaugeIncrement the value to set
         * @return the dsl builder
         */
        default MicroProfileMetricsEndpointBuilder gaugeIncrement(
                String gaugeIncrement) {
            doSetProperty("gaugeIncrement", gaugeIncrement);
            return this;
        }
        /**
         * Decrement metric value when using concurrent gauge type.
         *
         * The option is a: java.lang.Number type.
         *
         * Group: producer
         *
         * @param gaugeValue the value to set
         * @return the dsl builder
         */
        default MicroProfileMetricsEndpointBuilder gaugeValue(Number gaugeValue) {
            doSetProperty("gaugeValue", gaugeValue);
            return this;
        }
        /**
         * Decrement metric value when using concurrent gauge type.
         *
         * The option will be converted to a
         * java.lang.Number type.
         *
         * Group: producer
         *
         * @param gaugeValue the value to set
         * @return the dsl builder
         */
        default MicroProfileMetricsEndpointBuilder gaugeValue(String gaugeValue) {
            doSetProperty("gaugeValue", gaugeValue);
            return this;
        }
        /**
         * Mark value to set when using the meter type.
         *
         * The option is a: java.lang.Long type.
         *
         * Group: producer
         *
         * @param mark the value to set
         * @return the dsl builder
         */
        default MicroProfileMetricsEndpointBuilder mark(Long mark) {
            doSetProperty("mark", mark);
            return this;
        }
        /**
         * Mark value to set when using the meter type.
         *
         * The option will be converted to a
         * java.lang.Long type.
         *
         * Group: producer
         *
         * @param mark the value to set
         * @return the dsl builder
         */
        default MicroProfileMetricsEndpointBuilder mark(String mark) {
            doSetProperty("mark", mark);
            return this;
        }
        /**
         * Metric unit. See org.eclipse.microprofile.metrics.MetricUnits.
         *
         * The option is a: java.lang.String type.
         *
         * Group: producer
         *
         * @param metricUnit the value to set
         * @return the dsl builder
         */
        default MicroProfileMetricsEndpointBuilder metricUnit(String metricUnit) {
            doSetProperty("metricUnit", metricUnit);
            return this;
        }
        /**
         * Comma delimited list of tags associated with the metric in the format
         * tagName=tagValue.
         *
         * The option is a: java.lang.String type.
         *
         * Group: producer
         *
         * @param tags the value to set
         * @return the dsl builder
         */
        default MicroProfileMetricsEndpointBuilder tags(String tags) {
            doSetProperty("tags", tags);
            return this;
        }
        /**
         * Value to set when using the histogram type.
         *
         * The option is a: java.lang.Long type.
         *
         * Group: producer
         *
         * @param value the value to set
         * @return the dsl builder
         */
        default MicroProfileMetricsEndpointBuilder value(Long value) {
            doSetProperty("value", value);
            return this;
        }
        /**
         * Value to set when using the histogram type.
         *
         * The option will be converted to a
         * java.lang.Long type.
         *
         * Group: producer
         *
         * @param value the value to set
         * @return the dsl builder
         */
        default MicroProfileMetricsEndpointBuilder value(String value) {
            doSetProperty("value", value);
            return this;
        }
    }

    /**
     * Advanced builder for endpoint for the MicroProfile Metrics component.
     */
    public interface AdvancedMicroProfileMetricsEndpointBuilder
            extends
                EndpointProducerBuilder {
        default MicroProfileMetricsEndpointBuilder basic() {
            return (MicroProfileMetricsEndpointBuilder) this;
        }
        /**
         * Whether the producer should be started lazy (on the first message).
         * By starting lazy you can use this to allow CamelContext and routes to
         * startup in situations where a producer may otherwise fail during
         * starting and cause the route to fail being started. By deferring this
         * startup to be lazy then the startup failure can be handled during
         * routing messages via Camel's routing error handlers. Beware that when
         * the first message is processed then creating and starting the
         * producer may take a little time and prolong the total processing time
         * of the processing.
         *
         * The option is a: boolean type.
         *
         * Default: false
         * Group: producer (advanced)
         *
         * @param lazyStartProducer the value to set
         * @return the dsl builder
         */
        default AdvancedMicroProfileMetricsEndpointBuilder lazyStartProducer(
                boolean lazyStartProducer) {
            doSetProperty("lazyStartProducer", lazyStartProducer);
            return this;
        }
        /**
         * Whether the producer should be started lazy (on the first message).
         * By starting lazy you can use this to allow CamelContext and routes to
         * startup in situations where a producer may otherwise fail during
         * starting and cause the route to fail being started. By deferring this
         * startup to be lazy then the startup failure can be handled during
         * routing messages via Camel's routing error handlers. Beware that when
         * the first message is processed then creating and starting the
         * producer may take a little time and prolong the total processing time
         * of the processing.
         *
         * The option will be converted to a boolean
         * type.
         *
         * Default: false
         * Group: producer (advanced)
         *
         * @param lazyStartProducer the value to set
         * @return the dsl builder
         */
        default AdvancedMicroProfileMetricsEndpointBuilder lazyStartProducer(
                String lazyStartProducer) {
            doSetProperty("lazyStartProducer", lazyStartProducer);
            return this;
        }
    }

    public interface MicroProfileMetricsBuilders {
        /**
         * MicroProfile Metrics (camel-microprofile-metrics)
         * Expose metrics from Camel routes.
         *
         * Category: monitoring
         * Since: 3.0
         * Maven coordinates: org.apache.camel:camel-microprofile-metrics
         *
         * @return the dsl builder for the headers' name.
         */
        default MicroProfileMetricsHeaderNameBuilder microprofileMetrics() {
            return MicroProfileMetricsHeaderNameBuilder.INSTANCE;
        }
        /**
         * MicroProfile Metrics (camel-microprofile-metrics)
         * Expose metrics from Camel routes.
         *
         * Category: monitoring
         * Since: 3.0
         * Maven coordinates: org.apache.camel:camel-microprofile-metrics
         *
         * Syntax: microprofile-metrics:metricType:metricName
         *
         * Path parameter: metricType (required)
         * Metric type
         * There are 8 enums and the value can be one of: concurrent gauge,
         * counter, gauge, meter, histogram, timer, simple timer, invalid
         *
         * Path parameter: metricName (required)
         * Metric name
         *
         * @param path metricType:metricName
         * @return the dsl builder
         */
        @Deprecated
        default MicroProfileMetricsEndpointBuilder microprofileMetrics(
                String path) {
            return MicroProfileMetricsEndpointBuilderFactory.endpointBuilder("microprofile-metrics", path);
        }
        /**
         * MicroProfile Metrics (camel-microprofile-metrics)
         * Expose metrics from Camel routes.
         *
         * Category: monitoring
         * Since: 3.0
         * Maven coordinates: org.apache.camel:camel-microprofile-metrics
         *
         * Syntax: microprofile-metrics:metricType:metricName
         *
         * Path parameter: metricType (required)
         * Metric type
         * There are 8 enums and the value can be one of: concurrent gauge,
         * counter, gauge, meter, histogram, timer, simple timer, invalid
         *
         * Path parameter: metricName (required)
         * Metric name
         *
         * @param componentName to use a custom component name for the endpoint
         * instead of the default name
         * @param path metricType:metricName
         * @return the dsl builder
         */
        @Deprecated
        default MicroProfileMetricsEndpointBuilder microprofileMetrics(
                String componentName,
                String path) {
            return MicroProfileMetricsEndpointBuilderFactory.endpointBuilder(componentName, path);
        }
    }

    /**
     * The builder of headers' name for the MicroProfile Metrics component.
     */
    public static class MicroProfileMetricsHeaderNameBuilder {
        /**
         * The internal instance of the builder used to access to all the
         * methods representing the name of headers.
         */
        private static final MicroProfileMetricsHeaderNameBuilder INSTANCE = new MicroProfileMetricsHeaderNameBuilder();

        /**
         * Override increment value in URI.
         *
         * The option is a: {@code long} type.
         *
         * Group: producer
         *
         * @return the name of the header {@code
         * MicroProfileMetricsCounterIncrement}.
         */
        public String microProfileMetricsCounterIncrement() {
            return "MicroProfileMetricsCounterIncrement";
        }

        /**
         * Override gaugeIncrement value from the URI.
         *
         * The option is a: {@code Boolean} type.
         *
         * Group: producer
         *
         * @return the name of the header {@code
         * MicroProfileMetricsGaugeIncrement}.
         */
        public String microProfileMetricsGaugeIncrement() {
            return "MicroProfileMetricsGaugeIncrement";
        }

        /**
         * Override gaugeDecrement value from the URI.
         *
         * The option is a: {@code Boolean} type.
         *
         * Group: producer
         *
         * @return the name of the header {@code
         * MicroProfileMetricsGaugeDecrement}.
         */
        public String microProfileMetricsGaugeDecrement() {
            return "MicroProfileMetricsGaugeDecrement";
        }

        /**
         * Override gaugeValue value from the URI.
         *
         * The option is a: {@code Number} type.
         *
         * Group: producer
         *
         * @return the name of the header {@code MicroProfileMetricsGaugeValue}.
         */
        public String microProfileMetricsGaugeValue() {
            return "MicroProfileMetricsGaugeValue";
        }

        /**
         * Override histogram value from the URI.
         *
         * The option is a: {@code Long} type.
         *
         * Group: producer
         *
         * @return the name of the header {@code
         * MicroProfileMetricsHistogramValue}.
         */
        public String microProfileMetricsHistogramValue() {
            return "MicroProfileMetricsHistogramValue";
        }

        /**
         * Override meter mark value from the URI.
         *
         * The option is a: {@code Long} type.
         *
         * Group: producer
         *
         * @return the name of the header {@code MicroProfileMetricsMeterMark}.
         */
        public String microProfileMetricsMeterMark() {
            return "MicroProfileMetricsMeterMark";
        }

        /**
         * The description within the metric metadata.
         *
         * The option is a: {@code String} type.
         *
         * Group: producer
         *
         * @return the name of the header {@code
         * MicroProfileMetricsDescription}.
         */
        public String microProfileMetricsDescription() {
            return "MicroProfileMetricsDescription";
        }

        /**
         * The display name within the metric metadata.
         *
         * The option is a: {@code String} type.
         *
         * Group: producer
         *
         * @return the name of the header {@code
         * MicroProfileMetricsDisplayName}.
         */
        public String microProfileMetricsDisplayName() {
            return "MicroProfileMetricsDisplayName";
        }

        /**
         * The name of the metric.
         *
         * The option is a: {@code String} type.
         *
         * Group: producer
         *
         * @return the name of the header {@code MicroProfileMetricsName}.
         */
        public String microProfileMetricsName() {
            return "MicroProfileMetricsName";
        }

        /**
         * The tags of the metric.
         *
         * The option is a: {@code String} type.
         *
         * Group: producer
         *
         * @return the name of the header {@code MicroProfileMetricsTags}.
         */
        public String microProfileMetricsTags() {
            return "MicroProfileMetricsTags";
        }

        /**
         * The type of the metric.
         *
         * The option is a: {@code org.eclipse.microprofile.metrics.MetricType}
         * type.
         *
         * Group: producer
         *
         * @return the name of the header {@code MicroProfileMetricsType}.
         */
        public String microProfileMetricsType() {
            return "MicroProfileMetricsType";
        }

        /**
         * The metric unit within the metric metadata.
         *
         * The option is a: {@code String} type.
         *
         * Group: producer
         *
         * @return the name of the header {@code MicroProfileMetricsUnits}.
         */
        public String microProfileMetricsUnits() {
            return "MicroProfileMetricsUnits";
        }

        /**
         * Override time action from the URI.
         *
         * The option is a: {@code
         * org.apache.camel.component.microprofile.metrics.TimerAction} type.
         *
         * Group: producer
         *
         * @return the name of the header {@code
         * MicroProfileMetricsTimerAction}.
         */
        public String microProfileMetricsTimerAction() {
            return "MicroProfileMetricsTimerAction";
        }
    }
    @Deprecated
    static MicroProfileMetricsEndpointBuilder endpointBuilder(
            String componentName,
            String path) {
        class MicroProfileMetricsEndpointBuilderImpl extends AbstractEndpointBuilder implements MicroProfileMetricsEndpointBuilder, AdvancedMicroProfileMetricsEndpointBuilder {
            public MicroProfileMetricsEndpointBuilderImpl(String path) {
                super(componentName, path);
            }
        }
        return new MicroProfileMetricsEndpointBuilderImpl(path);
    }
}


text:
package com.hitsujun.core.gui;

import java.util.List;

import playn.core.Font;
import playn.core.PlayN;
import tripleplay.ui.Button;
import tripleplay.ui.Group;
import tripleplay.ui.Label;
import tripleplay.ui.Style;
import tripleplay.ui.Styles;
import tripleplay.ui.layout.AxisLayout;

public class UiUtils {

	private UiUtils () { super () ; throw new UnsupportedOperationException () ; }

	public static float scaleSize (float size)
	{
		return size ;//* graphics().scaleFactor() ;
	}

    private static Font buttonFont = PlayN.graphics().createFont("Helvetica", Font.Style.PLAIN, UiUtils.scaleSize (18));
    private static Styles buttonStyle = Styles.make(Style.FONT.is(buttonFont));

	public static Button getButton (String txt)
	{
		Button button = new Button(txt);
		button.addStyles(buttonStyle) ;
		return button ;
	}

	public static Label getEmptyLabel ()
	{
		return new Label(" ").setStyles(Styles.make(Style.FONT.is(PlayN.graphics().createFont("Helvetica", Font.Style.PLAIN, UiUtils.scaleSize (10))))) ;
	}

	public static <T> boolean addToTableGroup (Group table, String desc, Styles styleDesc, List<T> list, Styles styleVal)
	{
		if (list == null)
			return false ;
		boolean first = true ;
    	for (T str : list) {
    		table.add(new Label (((first)?(desc):(" "))).setStyles(styleDesc), new Label (str.toString()).setStyles(styleVal)) ;
    		first = false ;
    	}
    	return !first ;
	}

	public static <T> boolean addToTableGroup (Group table, String desc, Styles styleDesc, T value, Styles styleVal)
	{
		if (value == null)
			return false;
    	table.add(new Label (desc).setStyles(styleDesc), new Label (value.toString()).setStyles(styleVal)) ;
    	return true ;
	}

	public static <T> boolean addToTableGroup (Group table, String desc, Styles styleDesc, List<T> list, Styles styleVal, String sep)
	{
		String lstr = listToString(list, sep) ;
		if (lstr == null || lstr.isEmpty())
			return false ;
		table.add(new Label (desc).setStyles(styleDesc), new Label (lstr).setStyles(styleVal)) ;
		return true ;
	}

	public static <T> String listToString (List<T> list, String sep)
	{
		if (list == null || list.isEmpty())
			return null ;
    	int size = list.size() ;
    	StringBuilder sb = new StringBuilder () ;
    	int count = 0 ;
    	for (T str : list) {
    		sb.append (str.toString()) ;
    		if (count < size - 1)
    			sb.append (sep) ;
    		++count ;
    	}
    	return sb.toString() ;
	}

	public static Group getLabelGroup (String str1, Styles style1, String str2, Styles style2)
	{
		return new Group(AxisLayout.horizontal().offStretch()).add(
				new Label (str1).setStyles(style1),
				new Label (str2).setStyles(style2)) ;
	}
}