text:
package com.unipad.brain;

import android.app.Application;
import android.app.Service;
import android.os.Environment;
import android.os.Handler;
import android.os.Message;
import android.os.Vibrator;
import android.util.DisplayMetrics;

import com.baidu.mapapi.SDKInitializer;
import com.unipad.baiduservice.LocationService;
import com.unipad.io.mina.LongTcpClient;

import org.xutils.x;

import java.io.File;
import java.lang.ref.WeakReference;

/**
 * Created by Wbj on 2016/4/7.
 */
public class App extends Application {
    private static App mContext;
    private File mAppFile, mTakePhotoFile;
    public static int screenWidth = 0, screenHeight = 0;
    public LocationService locationService;
    public Vibrator mVibrator;

    @Override
    public void onCreate() {
        super.onCreate();
        mContext = (App) getApplicationContext();
        x.Ext.init(this);
        x.Ext.setDebug(true);
        // 获取屏幕的宽和高
        DisplayMetrics displayMetrics = getResources().getDisplayMetrics();
        screenWidth = displayMetrics.widthPixels;
        screenHeight = displayMetrics.heightPixels;
        // 初始化 百度定位
        locationService = new LocationService(getApplicationContext());
        mVibrator =(Vibrator)getApplicationContext().getSystemService(Service.VIBRATOR_SERVICE);
        SDKInitializer.initialize(getApplicationContext());
        this.createDirs();
    }

    private void createDirs() {
        if (Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState())) {
            mAppFile = new File(Environment.getExternalStorageDirectory(), "MadBrain");
            if (!mAppFile.exists()) {
                mAppFile.mkdir();
            }

            if (mAppFile.exists() && mAppFile.isDirectory()) {
                mTakePhotoFile = new File(mAppFile, "TakePhoto");
                mTakePhotoFile.mkdir();
                File gameFile = new File(mAppFile,"game");
                gameFile.mkdir();
            }

        }
    }

    public String getAppFilePath() {
        return mAppFile.getAbsolutePath();
    }

    public File getTakePhotoFile() {
        return mTakePhotoFile;
    }

    public static App getContext() {
        return mContext;
    }

    public static class AppHandler extends Handler {
        private WeakReference<HandlerCallback> mHandlerCallback;

        public AppHandler(HandlerCallback handlerCallback) {
            mHandlerCallback = new WeakReference<>(handlerCallback);
        }

        @Override
        public void handleMessage(Message msg) {
            super.handleMessage(msg);
            HandlerCallback callback = mHandlerCallback.get();
            if (callback != null) {
                callback.dispatchMessage(msg);
            }
        }
    }

    public interface HandlerCallback {
        /**
         * 分发消息以刷新界面
         */
        void dispatchMessage(Message msg);
    }

}

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace Exercise\HTMLPurifierBundle\Tests\CacheWarmer;

use Exercise\HTMLPurifierBundle\CacheWarmer\SerializerCacheWarmer;

class SerializerCacheWarmerTest extends \PHPUnit_Framework_TestCase
{
    public function testShouldBeRequired()
    {
        $cacheWarmer = new SerializerCacheWarmer(array());
        $this->assertFalse($cacheWarmer->isOptional());
    }

    public function testShouldCreatePaths()
    {
        if (!is_writable(sys_get_temp_dir())) {
            $this->markTestSkipped(sprintf('The system temp directory "%s" is not writeable for the current system user.', sys_get_temp_dir()));
        }

        $path = sys_get_temp_dir() . '/' . uniqid('htmlpurifierbundle');

        $cacheWarmer = new SerializerCacheWarmer(array($path));
        $cacheWarmer->warmUp(null);

        $this->assertTrue(is_dir($path));
        $this->assertTrue(is_writeable($path));

        rmdir($path);
    }
}


text:
import wsme
from wsme import types as wtypes

from aodh.api.controllers.v2 import base
from aodh.api.controllers.v2 import utils as v2_utils
from aodh.i18n import _
from aodh import storage

class AlarmThresholdRule(base.AlarmRule):
    """Alarm Threshold Rule

    Describe when to trigger the alarm based on computed statistics
    """

    meter_name = wsme.wsattr(wtypes.text, mandatory=True)
    "The name of the meter"

    # FIXME(sileht): default doesn't work
    # workaround: default is set in validate method
    query = wsme.wsattr([base.Query], default=[])
    """The query to find the data for computing statistics.
    Ownership settings are automatically included based on the Alarm owner.
    """

    period = wsme.wsattr(wtypes.IntegerType(minimum=1), default=60)
    "The time range in seconds over which query"

    comparison_operator = base.AdvEnum('comparison_operator', str,
                                       'lt', 'le', 'eq', 'ne', 'ge', 'gt',
                                       default='eq')
    "The comparison against the alarm threshold"

    threshold = wsme.wsattr(float, mandatory=True)
    "The threshold of the alarm"

    statistic = base.AdvEnum('statistic', str, 'max', 'min', 'avg', 'sum',
                             'count', default='avg')
    "The statistic to compare to the threshold"

    evaluation_periods = wsme.wsattr(wtypes.IntegerType(minimum=1), default=1)
    "The number of historical periods to evaluate the threshold"

    exclude_outliers = wsme.wsattr(bool, default=False)
    "Whether datapoints with anomalously low sample counts are excluded"

    def __init__(self, query=None, **kwargs):
        if query:
            query = [base.Query(**q) for q in query]
        super(AlarmThresholdRule, self).__init__(query=query, **kwargs)

    @staticmethod
    def validate(threshold_rule):
        # note(sileht): wsme default doesn't work in some case
        # workaround for https://bugs.launchpad.net/wsme/+bug/1227039
        if not threshold_rule.query:
            threshold_rule.query = []

        # Timestamp is not allowed for AlarmThresholdRule query, as the alarm
        # evaluator will construct timestamp bounds for the sequence of
        # statistics queries as the sliding evaluation window advances
        # over time.
        v2_utils.validate_query(threshold_rule.query,
                                storage.SampleFilter.__init__,
                                allow_timestamps=False)
        return threshold_rule

    @staticmethod
    def validate_alarm(alarm):
        # ensure an implicit constraint on project_id is added to
        # the query if not already present
        alarm.threshold_rule.query = v2_utils.sanitize_query(
            alarm.threshold_rule.query,
            storage.SampleFilter.__init__,
            on_behalf_of=alarm.project_id
        )

    @property
    def default_description(self):
        return (_('Alarm when %(meter_name)s is %(comparison_operator)s a '
                  '%(statistic)s of %(threshold)s over %(period)s seconds') %
                dict(comparison_operator=self.comparison_operator,
                     statistic=self.statistic,
                     threshold=self.threshold,
                     meter_name=self.meter_name,
                     period=self.period))

    def as_dict(self):
        rule = self.as_dict_from_keys(['period', 'comparison_operator',
                                       'threshold', 'statistic',
                                       'evaluation_periods', 'meter_name',
                                       'exclude_outliers'])
        rule['query'] = [q.as_dict() for q in self.query]
        return rule

    @classmethod
    def sample(cls):
        return cls(meter_name='cpu_util',
                   period=60,
                   evaluation_periods=1,
                   threshold=300.0,
                   statistic='avg',
                   comparison_operator='gt',
                   query=[{'field': 'resource_id',
                           'value': '2a4d689b-f0b8-49c1-9eef-87cae58d80db',
                           'op': 'eq',
                           'type': 'string'}])


text:
require File.expand_path '../../../spec_helper.rb', __FILE__

describe Demo::MoneyBallController do
  it 'should ok when view home page' do
    get demo_path('/ball')
    expect(last_response).to be_ok
    expect(last_response.headers['ETag']).to_not be_empty
    expect(last_response.headers['Last-Modified']).to_not be_empty

    header 'IF-None-Match', last_response.headers['ETag']
    header 'If-Modified-Since', last_response.headers['Last-Modified']
    get demo_path('/ball')

    expect(last_response.status).to eq(304)
    expect(last_response.body).to be_empty

    visit demo_path('/ball')
    expect(page.title).to include('台球')
  end
end


text:
package authzfilter

import (
	"github.com/sirupsen/logrus"
	"github.com/aakso/ssh-inscribe/pkg/logging"
)

var Log *logrus.Entry = logging.GetLogger("authzfilter").WithField("pkg", "auth/authz/authzfilter")


text:
<?php

use Symfony\Component\Routing\RequestContext;
use Symfony\Component\Routing\Exception\RouteNotFoundException;

/**
 * appprodUrlGenerator
 *
 * This class has been auto-generated
 * by the Symfony Routing Component.
 */
class appprodUrlGenerator extends Symfony\Component\Routing\Generator\UrlGenerator
{
    static private $declaredRouteNames = array(
       'sujet' => true,
       'sujet_show' => true,
       'sujet_new' => true,
       'sujet_create' => true,
       'sujet_edit' => true,
       'sujet_update' => true,
       'sujet_delete' => true,
       'sujet_student' => true,
       'sujet_student_views' => true,
       'module' => true,
       'module_show' => true,
       'module_new' => true,
       'module_create' => true,
       'module_edit' => true,
       'module_update' => true,
       'module_delete' => true,
       'module_student_view' => true,
       'diplome' => true,
       'diplome_show' => true,
       'diplome_new' => true,
       'diplome_create' => true,
       'diplome_edit' => true,
       'diplome_update' => true,
       'diplome_delete' => true,
       'rendu_create' => true,
       'rendu_new' => true,
       'rendu_list' => true,
       'rendu_show' => true,
       'DNR2IDevoirsBundle_homepage' => true,
       'fos_user_security_login' => true,
       'fos_user_security_check' => true,
       'fos_user_security_logout' => true,
       'fos_user_profile_show' => true,
       'fos_user_profile_edit' => true,
       'fos_user_registration_register' => true,
       'fos_user_registration_check_email' => true,
       'fos_user_registration_confirm' => true,
       'fos_user_registration_confirmed' => true,
       'fos_user_resetting_request' => true,
       'fos_user_resetting_send_email' => true,
       'fos_user_resetting_check_email' => true,
       'fos_user_resetting_reset' => true,
       'fos_user_change_password' => true,
    );

    /**
     * Constructor.
     */
    public function __construct(RequestContext $context)
    {
        $this->context = $context;
    }

    public function generate($name, $parameters = array(), $absolute = false)
    {
        if (!isset(self::$declaredRouteNames[$name])) {
            throw new RouteNotFoundException(sprintf('Route "%s" does not exist.', $name));
        }

        $escapedName = str_replace('.', '__', $name);

        list($variables, $defaults, $requirements, $tokens) = $this->{'get'.$escapedName.'RouteInfo'}();

        return $this->doGenerate($variables, $defaults, $requirements, $tokens, $parameters, $name, $absolute);
    }

    private function getsujetRouteInfo()
    {
        return array(array (), array (  '_controller' => 'DNR2I\\DevoirsBundle\\Controller\\SujetController::indexAction',), array (), array (  0 =>   array (    0 => 'text',    1 => '/sujets/',  ),));
    }

    private function getsujet_showRouteInfo()
    {
        return array(array (  0 => 'id',), array (  '_controller' => 'DNR2I\\DevoirsBundle\\Controller\\SujetController::showAction',), array (), array (  0 =>   array (    0 => 'text',    1 => '/show',  ),  1 =>   array (    0 => 'variable',    1 => '/',    2 => '[^/]+?',    3 => 'id',  ),  2 =>   array (    0 => 'text',    1 => '/sujets',  ),));
    }

    private function getsujet_newRouteInfo()
    {
        return array(array (), array (  '_controller' => 'DNR2I\\DevoirsBundle\\Controller\\SujetController::newAction',), array (), array (  0 =>   array (    0 => 'text',    1 => '/sujets/new',  ),));
    }

    private function getsujet_createRouteInfo()
    {
        return array(array (), array (  '_controller' => 'DNR2I\\DevoirsBundle\\Controller\\SujetController::createAction',), array (  '_method' => 'post',), array (  0 =>   array (    0 => 'text',    1 => '/sujets/create',  ),));
    }

    private function getsujet_editRouteInfo()
    {
        return array(array (  0 => 'id',), array (  '_controller' => 'DNR2I\\DevoirsBundle\\Controller\\SujetController::editAction',), array (), array (  0 =>   array (    0 => 'text',    1 => '/edit',  ),  1 =>   array (    0 => 'variable',    1 => '/',    2 => '[^/]+?',    3 => 'id',  ),  2 =>   array (    0 => 'text',    1 => '/sujets',  ),));
    }

    private function getsujet_updateRouteInfo()
    {
        return array(array (  0 => 'id',), array (  '_controller' => 'DNR2I\\DevoirsBundle\\Controller\\SujetController::updateAction',), array (  '_method' => 'post',), array (  0 =>   array (    0 => 'text',    1 => '/update',  ),  1 =>   array (    0 => 'variable',    1 => '/',    2 => '[^/]+?',    3 => 'id',  ),  2 =>   array (    0 => 'text',    1 => '/sujets',  ),));
    }

    private function getsujet_deleteRouteInfo()
    {
        return array(array (  0 => 'id',), array (  '_controller' => 'DNR2I\\DevoirsBundle\\Controller\\SujetController::deleteAction',), array (  '_method' => 'post',), array (  0 =>   array (    0 => 'text',    1 => '/delete',  ),  1 =>   array (    0 => 'variable',    1 => '/',    2 => '[^/]+?',    3 => 'id',  ),  2 =>   array (    0 => 'text',    1 => '/sujets',  ),));
    }

    private function getsujet_studentRouteInfo()
    {
        return array(array (), array (  '_controller' => 'DNR2I\\DevoirsBundle\\Controller\\SujetController::indexStudentAction',), array (), array (  0 =>   array (    0 => 'text',    1 => '/sujets/student',  ),));
    }

    private function getsujet_student_viewsRouteInfo()
    {
        return array(array (  0 => 'category',), array (  '_controller' => 'DNR2I\\DevoirsBundle\\Controller\\SujetController::indexStudentAction',), array (), array (  0 =>   array (    0 => 'variable',    1 => '/',    2 => '[^/]+?',    3 => 'category',  ),  1 =>   array (    0 => 'text',    1 => '/sujets/student',  ),));
    }

    private function getmoduleRouteInfo()
    {
        return array(array (), array (  '_controller' => 'DNR2I\\DevoirsBundle\\Controller\\ModuleController::indexAction',), array (), array (  0 =>   array (    0 => 'text',    1 => '/modules/',  ),));
    }

    private function getmodule_showRouteInfo()
    {
        return array(array (  0 => 'id',), array (  '_controller' => 'DNR2I\\DevoirsBundle\\Controller\\ModuleController::showAction',), array (), array (  0 =>   array (    0 => 'text',    1 => '/show',  ),  1 =>   array (    0 => 'variable',    1 => '/',    2 => '[^/]+?',    3 => 'id',  ),  2 =>   array (    0 => 'text',    1 => '/modules',  ),));
    }

    private function getmodule_newRouteInfo()
    {
        return array(array (), array (  '_controller' => 'DNR2I\\DevoirsBundle\\Controller\\ModuleController::newAction',), array (), array (  0 =>   array (    0 => 'text',    1 => '/modules/new',  ),));
    }

    private function getmodule_createRouteInfo()
    {
        return array(array (), array (  '_controller' => 'DNR2I\\DevoirsBundle\\Controller\\ModuleController::createAction',), array (  '_method' => 'post',), array (  0 =>   array (    0 => 'text',    1 => '/modules/create',  ),));
    }

    private function getmodule_editRouteInfo()
    {
        return array(array (  0 => 'id',), array (  '_controller' => 'DNR2I\\DevoirsBundle\\Controller\\ModuleController::editAction',), array (), array (  0 =>   array (    0 => 'text',    1 => '/edit',  ),  1 =>   array (    0 => 'variable',    1 => '/',    2 => '[^/]+?',    3 => 'id',  ),  2 =>   array (    0 => 'text',    1 => '/modules',  ),));
    }

    private function getmodule_updateRouteInfo()
    {
        return array(array (  0 => 'id',), array (  '_controller' => 'DNR2I\\DevoirsBundle\\Controller\\ModuleController::updateAction',), array (  '_method' => 'post',), array (  0 =>   array (    0 => 'text',    1 => '/update',  ),  1 =>   array (    0 => 'variable',    1 => '/',    2 => '[^/]+?',    3 => 'id',  ),  2 =>   array (    0 => 'text',    1 => '/modules',  ),));
    }

    private function getmodule_deleteRouteInfo()
    {
        return array(array (  0 => 'id',), array (  '_controller' => 'DNR2I\\DevoirsBundle\\Controller\\ModuleController::deleteAction',), array (), array (  0 =>   array (    0 => 'text',    1 => '/delete',  ),  1 =>   array (    0 => 'variable',    1 => '/',    2 => '[^/]+?',    3 => 'id',  ),  2 =>   array (    0 => 'text',    1 => '/modules',  ),));
    }

    private function getmodule_student_viewRouteInfo()
    {
        return array(array (), array (  '_controller' => 'DNR2I\\DevoirsBundle\\Controller\\ModuleController::showModulesByStudentAction',), array (), array (  0 =>   array (    0 => 'text',    1 => '/modules/mymodules',  ),));
    }

    private function getdiplomeRouteInfo()
    {
        return array(array (), array (  '_controller' => 'DNR2I\\DevoirsBundle\\Controller\\DiplomeController::indexAction',), array (), array (  0 =>   array (    0 => 'text',    1 => '/diplomes/',  ),));
    }

    private function getdiplome_showRouteInfo()
    {
        return array(array (  0 => 'id',), array (  '_controller' => 'DNR2I\\DevoirsBundle\\Controller\\DiplomeController::showAction',), array (), array (  0 =>   array (    0 => 'text',    1 => '/show',  ),  1 =>   array (    0 => 'variable',    1 => '/',    2 => '[^/]+?',    3 => 'id',  ),  2 =>   array (    0 => 'text',    1 => '/diplomes',  ),));
    }

    private function getdiplome_newRouteInfo()
    {
        return array(array (), array (  '_controller' => 'DNR2I\\DevoirsBundle\\Controller\\DiplomeController::newAction',), array (), array (  0 =>   array (    0 => 'text',    1 => '/diplomes/new',  ),));
    }

    private function getdiplome_createRouteInfo()
    {
        return array(array (), array (  '_controller' => 'DNR2I\\DevoirsBundle\\Controller\\DiplomeController::createAction',), array (  '_method' => 'post',), array (  0 =>   array (    0 => 'text',    1 => '/diplomes/create',  ),));
    }

    private function getdiplome_editRouteInfo()
    {
        return array(array (  0 => 'id',), array (  '_controller' => 'DNR2I\\DevoirsBundle\\Controller\\DiplomeController::editAction',), array (), array (  0 =>   array (    0 => 'text',    1 => '/edit',  ),  1 =>   array (    0 => 'variable',    1 => '/',    2 => '[^/]+?',    3 => 'id',  ),  2 =>   array (    0 => 'text',    1 => '/diplomes',  ),));
    }

    private function getdiplome_updateRouteInfo()
    {
        return array(array (  0 => 'id',), array (  '_controller' => 'DNR2I\\DevoirsBundle\\Controller\\DiplomeController::updateAction',), array (  '_method' => 'post',), array (  0 =>   array (    0 => 'text',    1 => '/update',  ),  1 =>   array (    0 => 'variable',    1 => '/',    2 => '[^/]+?',    3 => 'id',  ),  2 =>   array (    0 => 'text',    1 => '/diplomes',  ),));
    }

    private function getdiplome_deleteRouteInfo()
    {
        return array(array (  0 => 'id',), array (  '_controller' => 'DNR2I\\DevoirsBundle\\Controller\\DiplomeController::deleteAction',), array (), array (  0 =>   array (    0 => 'text',    1 => '/delete',  ),  1 =>   array (    0 => 'variable',    1 => '/',    2 => '[^/]+?',    3 => 'id',  ),  2 =>   array (    0 => 'text',    1 => '/diplomes',  ),));
    }

    private function getrendu_createRouteInfo()
    {
        return array(array (), array (  '_controller' => 'DNR2I\\DevoirsBundle\\Controller\\RenduController::createAction',), array (), array (  0 =>   array (    0 => 'text',    1 => '/rendus/create',  ),));
    }

    private function getrendu_newRouteInfo()
    {
        return array(array (  0 => 'id',), array (  '_controller' => 'DNR2I\\DevoirsBundle\\Controller\\RenduController::newAction',), array (  'id' => '\\d+',), array (  0 =>   array (    0 => 'variable',    1 => '/',    2 => '\\d+',    3 => 'id',  ),  1 =>   array (    0 => 'text',    1 => '/rendus/new',  ),));
    }

    private function getrendu_listRouteInfo()
    {
        return array(array (  0 => 'id',), array (  '_controller' => 'DNR2I\\DevoirsBundle\\Controller\\RenduController::listByIdAction',), array (  'id' => '\\d+',), array (  0 =>   array (    0 => 'variable',    1 => '/',    2 => '\\d+',    3 => 'id',  ),  1 =>   array (    0 => 'text',    1 => '/rendus/list',  ),));
    }

    private function getrendu_showRouteInfo()
    {
        return array(array (  0 => 'id',), array (  '_controller' => 'DNR2I\\DevoirsBundle\\Controller\\RenduController::showArchiveContentAction',), array (  'id' => '\\d+',), array (  0 =>   array (    0 => 'variable',    1 => '/',    2 => '\\d+',    3 => 'id',  ),  1 =>   array (    0 => 'text',    1 => '/rendus/show',  ),));
    }

    private function getDNR2IDevoirsBundle_homepageRouteInfo()
    {
        return array(array (), array (  '_controller' => 'DNR2I\\DevoirsBundle\\Controller\\IndexController::indexAction',), array (), array (  0 =>   array (    0 => 'text',    1 => '/',  ),));
    }

    private function getfos_user_security_loginRouteInfo()
    {
        return array(array (), array (  '_controller' => 'FOS\\UserBundle\\Controller\\SecurityController::loginAction',), array (), array (  0 =>   array (    0 => 'text',    1 => '/login',  ),));
    }

    private function getfos_user_security_checkRouteInfo()
    {
        return array(array (), array (  '_controller' => 'FOS\\UserBundle\\Controller\\SecurityController::checkAction',), array (), array (  0 =>   array (    0 => 'text',    1 => '/login_check',  ),));
    }

    private function getfos_user_security_logoutRouteInfo()
    {
        return array(array (), array (  '_controller' => 'FOS\\UserBundle\\Controller\\SecurityController::logoutAction',), array (), array (  0 =>   array (    0 => 'text',    1 => '/logout',  ),));
    }

    private function getfos_user_profile_showRouteInfo()
    {
        return array(array (), array (  '_controller' => 'FOS\\UserBundle\\Controller\\ProfileController::showAction',), array (  '_method' => 'GET',), array (  0 =>   array (    0 => 'text',    1 => '/profile/',  ),));
    }

    private function getfos_user_profile_editRouteInfo()
    {
        return array(array (), array (  '_controller' => 'FOS\\UserBundle\\Controller\\ProfileController::editAction',), array (), array (  0 =>   array (    0 => 'text',    1 => '/profile/edit',  ),));
    }

    private function getfos_user_registration_registerRouteInfo()
    {
        return array(array (), array (  '_controller' => 'FOS\\UserBundle\\Controller\\RegistrationController::registerAction',), array (), array (  0 =>   array (    0 => 'text',    1 => '/register/',  ),));
    }

    private function getfos_user_registration_check_emailRouteInfo()
    {
        return array(array (), array (  '_controller' => 'FOS\\UserBundle\\Controller\\RegistrationController::checkEmailAction',), array (  '_method' => 'GET',), array (  0 =>   array (    0 => 'text',    1 => '/register/check-email',  ),));
    }

    private function getfos_user_registration_confirmRouteInfo()
    {
        return array(array (  0 => 'token',), array (  '_controller' => 'FOS\\UserBundle\\Controller\\RegistrationController::confirmAction',), array (  '_method' => 'GET',), array (  0 =>   array (    0 => 'variable',    1 => '/',    2 => '[^/]+?',    3 => 'token',  ),  1 =>   array (    0 => 'text',    1 => '/register/confirm',  ),));
    }

    private function getfos_user_registration_confirmedRouteInfo()
    {
        return array(array (), array (  '_controller' => 'FOS\\UserBundle\\Controller\\RegistrationController::confirmedAction',), array (  '_method' => 'GET',), array (  0 =>   array (    0 => 'text',    1 => '/register/confirmed',  ),));
    }

    private function getfos_user_resetting_requestRouteInfo()
    {
        return array(array (), array (  '_controller' => 'FOS\\UserBundle\\Controller\\ResettingController::requestAction',), array (  '_method' => 'GET',), array (  0 =>   array (    0 => 'text',    1 => '/resetting/request',  ),));
    }

    private function getfos_user_resetting_send_emailRouteInfo()
    {
        return array(array (), array (  '_controller' => 'FOS\\UserBundle\\Controller\\ResettingController::sendEmailAction',), array (  '_method' => 'POST',), array (  0 =>   array (    0 => 'text',    1 => '/resetting/send-email',  ),));
    }

    private function getfos_user_resetting_check_emailRouteInfo()
    {
        return array(array (), array (  '_controller' => 'FOS\\UserBundle\\Controller\\ResettingController::checkEmailAction',), array (  '_method' => 'GET',), array (  0 =>   array (    0 => 'text',    1 => '/resetting/check-email',  ),));
    }

    private function getfos_user_resetting_resetRouteInfo()
    {
        return array(array (  0 => 'token',), array (  '_controller' => 'FOS\\UserBundle\\Controller\\ResettingController::resetAction',), array (  '_method' => 'GET|POST',), array (  0 =>   array (    0 => 'variable',    1 => '/',    2 => '[^/]+?',    3 => 'token',  ),  1 =>   array (    0 => 'text',    1 => '/resetting/reset',  ),));
    }

    private function getfos_user_change_passwordRouteInfo()
    {
        return array(array (), array (  '_controller' => 'FOS\\UserBundle\\Controller\\ChangePasswordController::changePasswordAction',), array (  '_method' => 'GET|POST',), array (  0 =>   array (    0 => 'text',    1 => '/change-password/change-password',  ),));
    }
}


text:
package com.yan.whereismytreasure.Modle.Bean;

/**
 * Created by a7501 on 2016/5/24.
 */
public class Null {
}


text:
<!doctype html>

		<title>Zabuun - Learn Egyptian Arabic for English speakers</title>
		<meta name="description" content="">
		<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/head.php';?>

		<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/ie8.php';?>
		<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/header.php';?>

			<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/side.php';?>

Essays > A Lucky Jacket

						Expand All | Collapse All

A Lucky Jacket

 When Anna entered the interview room, she started to sweat. She wondered why it was so hot. She realized that the heater was on. She sat down across from the interviewer. "Anna, you're sweating. You should take your sweater off." Anna laughed nervously. "I'm fine," she said. By the end of the interview, there was a sweat stain on Anna's sweater. She left the interview feeling unsure. A week later Anna got a phone call from the boss. The boss offered her the job! The lucky jacket worked!

		<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/footer.php';?>
		<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/scripts.php';?>


text:
/* AUTO-GENERATED FILE.  DO NOT MODIFY.
 *
 * This class was automatically generated by the
 * aapt tool from the resource data it found.  It
 * should not be modified by hand.
 */

package com.backendless.examples.messagingservice.pushdemo;

public final class Manifest {
    public static final class permission {
        public static final String C2D_MESSAGE="com.backendless.examples.messagingservice.pushdemo.permission.C2D_MESSAGE";
    }
}


text:
/******************************************************************
 * Author: Mgumbo
 *
 * Date Completed: 23 March 2016
 *
 * Description: A class representing a queue, a data structure
 *		that functions as a list with a "First In, First
 *		Out" policy. The front and back of the queue can
 *		both be accessed, but items can only be added to
 *		the back of the queue, and items can only be
 *		removed from the front.
 ******************************************************************/
#ifndef _MYQUEUE_H_
#define _MYQUEUE_H_
#define MAX_CAPACITY 100 //no more than 100 items

/**
 * Namespace containing various customized data structures.
 **/
namespace DataStructures
{
	template<class T>
	class Myqueue
	{
	public:
		//Constructor
		Myqueue();

		//Modifiers
		bool push(T item);
		bool pop();
		void clear();

		//Getters
		T getFront() const;
		T getBack() const;
		int getSize() const;
		bool isEmpty() const;
		bool isFull() const;

	private:
		T _queue[MAX_CAPACITY]; //underlying array
		int _front, _back, _size;
	};
} //end namespace

#endif


text:
@ExportPackage
package com.yahoo.vespa.hosted.node.admin.nodeadmin;

import com.yahoo.osgi.annotation.ExportPackage;


text:
package blue.lapis.pore.impl.scheduler;

import com.google.common.util.concurrent.AbstractFuture;
import org.spongepowered.api.scheduler.Task;

import java.util.concurrent.Callable;

class PoreFuture<T> extends AbstractFuture<T> implements Runnable {

    private final Callable<T> callable;
    Task handle;

    PoreFuture(Callable<T> callable) {
        this.callable = callable;
    }

    @Override
    public void run() {
        try {
            set(callable.call());
        } catch (Exception e) {
            setException(e);
        }
    }

    @Override
    protected void interruptTask() {
        handle.cancel();
    }
}


text:
(function() {
  window.admin_init();

}).call(this);


text:
<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Copyright 2013, Matt Brozowski and Eric Evans
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
-->
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:mvc="http://www.springframework.org/schema/mvc"
    xmlns:p="http://www.springframework.org/schema/p"
	xmlns:jee="http://www.springframework.org/schema/jee"
    xmlns:context="http://www.springframework.org/schema/context"
    xsi:schemaLocation="
        http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.0.xsd
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
        http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
">

    <mvc:annotation-driven />

	<mvc:default-servlet-handler/>

	<context:annotation-config />

<!--
	<jee:jndi-lookup id="tweetRepository" jndi-name="osgi:service/org.opennms.twissandra.api.TweetRepository" />
 -->
    <bean class="org.opennms.twissandra.webapp.internal.TweetsController" />

    <bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles2.TilesConfigurer">
        <property name="definitions">
            <list>
                <value>/WEB-INF/tiles-definitions.xml</value>
            </list>
        </property>
    </bean>

    <bean id="viewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver">
        <property name="viewClass" value="org.springframework.web.servlet.view.tiles2.TilesView"/>
    </bean>

<!--
   <bean id="jstlViewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver" p:order="1">
      <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
      <property name="prefix" value="/WEB-INF/jsp/"/>
      <property name="suffix" value=".jsp"/>
    </bean>
 -->
</beans>


text:
require_dependency 'stash_datacite/application_controller'

module StashDatacite
  class ResourceTypesController < ApplicationController
    before_action :set_resource_type, only: [:update, :destroy]

    # GET /resource_types/new
    def new
      @resource_type = ResourceType.new
    end

    # POST /resource_types
    def create
      @resource_type = ResourceType.new(resource_type_params)
      respond_to do |format|
        if @resource_type.save
          format.js
        else
          format.html { render :new }
        end
      end
    end

    # PATCH/PUT /resource_types/1
    def update
      respond_to do |format|
        if @resource_type.update(resource_type_params)
          # @resource_type.resource_type = @resource_type.resource_type_general
          # not overwriting any existing resource_type values
          @resource_type.save
          format.js { render template: 'stash_datacite/shared/update.js.erb' }
        else
          format.html { render :edit }
        end
      end
    end

    # DELETE /resource_types/1
    def destroy
      @resource_type.destroy
      redirect_to resource_types_url, notice: 'Resource type was successfully destroyed.'
    end

    private

    # Use callbacks to share common setup or constraints between actions.
    def set_resource_type
      @resource_type = ResourceType.find(resource_type_params[:id])
    end

    # Only allow a trusted parameter "white list" through.
    def resource_type_params
      params.require(:resource_type).permit(:id, :resource_type_general, :resource_type, :resource_id)
    end
  end
end


text:
..
   This file is part of khmer, https://github.com/dib-lab/khmer/, and is
   Copyright (C) 2016 The Regents of the University of California.
   It is licensed under the three-clause BSD license; see LICENSE.
   Contact: khmer-project@idyll.org

   Redistribution and use in source and binary forms, with or without
   modification, are permitted provided that the following conditions are
   met:

    * Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.

    * Redistributions in binary form must reproduce the above
      copyright notice, this list of conditions and the following
      disclaimer in the documentation and/or other materials provided
      with the distribution.

    * Neither the name of the Michigan State University nor the names
      of its contributors may be used to endorse or promote products
      derived from this software without specific prior written
      permission.

   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
   HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

   Contact: khmer-project@idyll.org

Example API Usage
=================

Examples of how to run khmer command-line scripts are included in the main khmer documentation, as well as the `khmer protocols collection <http://khmer-protocols.readthedocs.io>`__.
However, the intrepid user may be interested in having more direct access to khmer via its Python or C++ API.

The ``examples/python-api`` and ``examples/c++-api`` directories contain several small programs that demonstrate how one would write a program that uses the khmer API.
These programs are run frequently as part of our continuous integration build, so they are quite stable.
Note, however, that unlike the khmer command-line scripts, the Python and C++ API **ARE NOT** under `semantic versioning <http://semver.org/>`__.
Consequently, internal changes to the khmer codebase may require changes to the API examples at any time.
We expect to have the Python API under semantic versioning :doc:`by version 5.0 <../roadmap>`.


text:
package jason.stdlib;

import jason.asSemantics.DefaultInternalAction;
import jason.asSemantics.InternalAction;
import jason.asSemantics.TransitionSystem;
import jason.asSemantics.Unifier;
import jason.asSyntax.NumberTermImpl;
import jason.asSyntax.Term;

import java.util.Calendar;
import java.util.GregorianCalendar;

/**

Internal action: .time(HH,MM,SS).

Description: gets the current time (hour, minute, and seconds).

Parameters:

+/- hours (number): the hours (0--23).

+/- minutes (number): the minutes (0--59).

+/- seconds (number): the seconds (0--59).

Examples:

 .time(H,M,S): unifies H with the current hour, M
  with the current minutes, and S with the current seconds.

 .time(15,_,_): succeeds if it is now 3pm or a bit later
  but not yet 4pm.

  @see jason.stdlib.date
  @see jason.functions.time function time

 */
public class time extends DefaultInternalAction {

    private static InternalAction singleton = null;
    public static InternalAction create() {
        if (singleton == null)
            singleton = new time();
        return singleton;
    }

    @Override public int getMinArgs() { return 3; }
    @Override public int getMaxArgs() { return 3; }

    @Override
    public Object execute(TransitionSystem ts, Unifier un, Term[] args) throws Exception {
        checkArguments(args);

        Calendar now = new GregorianCalendar();
        return un.unifies(args[0], new NumberTermImpl(now.get(Calendar.HOUR_OF_DAY))) &&
               un.unifies(args[1], new NumberTermImpl(now.get(Calendar.MINUTE))) &&
               un.unifies(args[2], new NumberTermImpl(now.get(Calendar.SECOND)));
    }
}


text:
package post

import (
	"bytes"

	"gopkg.in/goyy/goyy.v0/data/entity"
	"gopkg.in/goyy/goyy.v0/data/schema"
	"gopkg.in/goyy/goyy.v0/util/jsons"
	"gopkg.in/goyy/goyy.v0/util/strings"
)

var (
	ENTITY              = schema.TABLE("sys_post", "POST")
	ENTITY_ID           = ENTITY.PRIMARY("id", "ID")
	ENTITY_CODE         = ENTITY.COLUMN("code", "CODE")
	ENTITY_NAME         = ENTITY.COLUMN("name", "NAME")
	ENTITY_FULLNAME     = ENTITY.COLUMN("fullname", "FULLNAME")
	ENTITY_GENRE        = ENTITY.COLUMN("genre", "GENRE")
	ENTITY_LEAF         = ENTITY.COLUMN("leaf", "LEAF")
	ENTITY_GRADE        = ENTITY.COLUMN("grade", "GRADE")
	ENTITY_ORDINAL      = ENTITY.COLUMN("ordinal", "ORDINAL")
	ENTITY_PARENT_ID    = ENTITY.COLUMN("parent_id", "PARENT_ID")
	ENTITY_PARENT_IDS   = ENTITY.COLUMN("parent_ids", "PARENT_IDS")
	ENTITY_PARENT_CODES = ENTITY.COLUMN("parent_codes", "PARENT_CODES")
	ENTITY_PARENT_NAMES = ENTITY.COLUMN("parent_names", "PARENT_NAMES")
	ENTITY_MEMO         = ENTITY.COLUMN("memo", "MEMO")
	ENTITY_CREATES      = ENTITY.COLUMN("creates", "CREATES")
	ENTITY_CREATER      = ENTITY.CREATER("creater", "CREATER")
	ENTITY_CREATED      = ENTITY.CREATED("created", "CREATED")
	ENTITY_MODIFIER     = ENTITY.MODIFIER("modifier", "MODIFIER")
	ENTITY_MODIFIED     = ENTITY.MODIFIED("modified", "MODIFIED")
	ENTITY_VERSION      = ENTITY.VERSION("version", "VERSION")
	ENTITY_DELETION     = ENTITY.DELETION("deletion", "DELETION")
	ENTITY_ARTIFICAL    = ENTITY.COLUMN("artifical", "ARTIFICAL")
	ENTITY_HISTORY      = ENTITY.COLUMN("history", "HISTORY")
	ENTITY_MENU_IDS     = ENTITY.TRANSIENT("menu_ids", "MENU IDS")
)

func NewEntity() *Entity {
	e := &Entity{}
	e.init()
	return e
}

func (me *Entity) MenuIds() string {
	return me.menuIds.Value()
}

func (me *Entity) SetMenuIds(v string) {
	me.menuIds.SetValue(v)
}

func (me *Entity) init() {
	me.table = ENTITY
	me.initSetDict()
	me.initSetColumn()
	me.initSetDefault()
	me.initSetField()
	me.initSetExcel()
	me.initSetJson()
	me.initSetXml()
}

func (me *Entity) initSetDict() {
}

func (me *Entity) initSetColumn() {
	if t, ok := me.Tree.Type("id"); ok {
		t.SetColumn(ENTITY_ID)
	}
	if t, ok := me.Tree.Type("code"); ok {
		t.SetColumn(ENTITY_CODE)
	}
	if t, ok := me.Tree.Type("name"); ok {
		t.SetColumn(ENTITY_NAME)
	}
	if t, ok := me.Tree.Type("fullname"); ok {
		t.SetColumn(ENTITY_FULLNAME)
	}
	if t, ok := me.Tree.Type("genre"); ok {
		t.SetColumn(ENTITY_GENRE)
	}
	if t, ok := me.Tree.Type("leaf"); ok {
		t.SetColumn(ENTITY_LEAF)
	}
	if t, ok := me.Tree.Type("grade"); ok {
		t.SetColumn(ENTITY_GRADE)
	}
	if t, ok := me.Tree.Type("ordinal"); ok {
		t.SetColumn(ENTITY_ORDINAL)
	}
	if t, ok := me.Tree.Type("parent_id"); ok {
		t.SetColumn(ENTITY_PARENT_ID)
	}
	if t, ok := me.Tree.Type("parent_ids"); ok {
		t.SetColumn(ENTITY_PARENT_IDS)
	}
	if t, ok := me.Tree.Type("parent_codes"); ok {
		t.SetColumn(ENTITY_PARENT_CODES)
	}
	if t, ok := me.Tree.Type("parent_names"); ok {
		t.SetColumn(ENTITY_PARENT_NAMES)
	}
	if t, ok := me.Tree.Type("memo"); ok {
		t.SetColumn(ENTITY_MEMO)
	}
	if t, ok := me.Tree.Type("creates"); ok {
		t.SetColumn(ENTITY_CREATES)
	}
	if t, ok := me.Tree.Type("creater"); ok {
		t.SetColumn(ENTITY_CREATER)
	}
	if t, ok := me.Tree.Type("created"); ok {
		t.SetColumn(ENTITY_CREATED)
	}
	if t, ok := me.Tree.Type("modifier"); ok {
		t.SetColumn(ENTITY_MODIFIER)
	}
	if t, ok := me.Tree.Type("modified"); ok {
		t.SetColumn(ENTITY_MODIFIED)
	}
	if t, ok := me.Tree.Type("version"); ok {
		t.SetColumn(ENTITY_VERSION)
	}
	if t, ok := me.Tree.Type("deletion"); ok {
		t.SetColumn(ENTITY_DELETION)
	}
	if t, ok := me.Tree.Type("artifical"); ok {
		t.SetColumn(ENTITY_ARTIFICAL)
	}
	if t, ok := me.Tree.Type("history"); ok {
		t.SetColumn(ENTITY_HISTORY)
	}
	me.menuIds.SetColumn(ENTITY_MENU_IDS)
}

func (me *Entity) initSetDefault() {
	if t, ok := me.Tree.Type("created"); ok {
		t.SetDefault("-62135596800")
	}
	if t, ok := me.Tree.Type("modified"); ok {
		t.SetDefault("-62135596800")
	}
}

func (me *Entity) initSetField() {
	for _, c := range entity.TreeColumns {
		if t, ok := me.Tree.Type(c); ok {
			t.SetField(entity.DefaultField())
		}
	}
	me.menuIds.SetField(entity.DefaultField())
}

func (me *Entity) initSetExcel() {
}

func (me *Entity) initSetJson() {
	for _, c := range entity.TreeColumns {
		if t, ok := me.Tree.Type(c); ok {
			t.Field().SetJson(entity.NewJsonBy(c))
		}
	}
	me.menuIds.Field().SetJson(entity.NewJsonBy("menuIds"))
}

func (me *Entity) initSetXml() {
	for _, c := range entity.TreeColumns {
		if t, ok := me.Tree.Type(c); ok {
			t.Field().SetXml(entity.NewXmlBy(c))
		}
	}
	me.menuIds.Field().SetXml(entity.NewXmlBy("menuIds"))
}

func (me Entity) New() entity.Interface {
	return NewEntity()
}

func (me *Entity) Get(column string) interface{} {
	switch column {
	case ENTITY_MENU_IDS.Name():
		return me.menuIds.Value()
	}
	return me.Tree.Get(column)
}

func (me *Entity) GetPtr(column string) interface{} {
	switch column {
	case ENTITY_MENU_IDS.Name():
		return me.menuIds.ValuePtr()
	}
	return me.Tree.GetPtr(column)
}

func (me *Entity) GetString(field string) string {
	switch strings.ToLowerFirst(field) {
	case "menuIds":
		return me.menuIds.String()
	}
	return me.Tree.GetString(field)
}

func (me *Entity) SetString(field, value string) error {
	switch strings.ToLowerFirst(field) {
	case "menuIds":
		return me.menuIds.SetString(value)
	}
	return me.Tree.SetString(field, value)
}

func (me *Entity) Table() schema.Table {
	return me.table
}

func (me *Entity) Type(column string) (entity.Type, bool) {
	switch column {
	case ENTITY_MENU_IDS.Name():
		return &me.menuIds, true
	}
	return me.Tree.Type(column)
}

func (me *Entity) Column(field string) (schema.Column, bool) {
	switch strings.ToLowerFirst(field) {
	case "menuIds":
		return ENTITY_MENU_IDS, true
	}
	return me.Tree.Column(field)
}

func (me *Entity) Columns() []schema.Column {
	return []schema.Column{
		ENTITY_ID,
		ENTITY_CODE,
		ENTITY_NAME,
		ENTITY_FULLNAME,
		ENTITY_GENRE,
		ENTITY_LEAF,
		ENTITY_GRADE,
		ENTITY_ORDINAL,
		ENTITY_PARENT_ID,
		ENTITY_PARENT_IDS,
		ENTITY_PARENT_CODES,
		ENTITY_PARENT_NAMES,
		ENTITY_MEMO,
		ENTITY_CREATES,
		ENTITY_CREATER,
		ENTITY_CREATED,
		ENTITY_MODIFIER,
		ENTITY_MODIFIED,
		ENTITY_VERSION,
		ENTITY_DELETION,
		ENTITY_ARTIFICAL,
		ENTITY_HISTORY,
		ENTITY_MENU_IDS,
	}
}

func (me *Entity) Names() []string {
	return []string{
		"id",
		"code",
		"name",
		"fullname",
		"genre",
		"leaf",
		"grade",
		"ordinal",
		"parentId",
		"parentIds",
		"parentCodes",
		"parentNames",
		"memo",
		"creates",
		"creater",
		"created",
		"modifier",
		"modified",
		"version",
		"deletion",
		"artifical",
		"history",
		"menuIds",
	}
}

func (me *Entity) Value() *Entity {
	return me
}

func (me *Entity) Validate() error {
	return nil
}

func (me *Entity) JSON() string {
	var b bytes.Buffer
	b.WriteString("{")
	b.WriteString(`"id":"` + jsons.Format(me.GetString("id")) + `"`)
	b.WriteString(`,"code":"` + jsons.Format(me.GetString("code")) + `"`)
	b.WriteString(`,"name":"` + jsons.Format(me.GetString("name")) + `"`)
	b.WriteString(`,"fullname":"` + jsons.Format(me.GetString("fullname")) + `"`)
	b.WriteString(`,"genre":"` + jsons.Format(me.GetString("genre")) + `"`)
	b.WriteString(`,"leaf":` + me.GetString("leaf"))
	b.WriteString(`,"grade":` + me.GetString("grade"))
	b.WriteString(`,"ordinal":"` + jsons.Format(me.GetString("ordinal")) + `"`)
	b.WriteString(`,"parentId":"` + jsons.Format(me.GetString("parentId")) + `"`)
	b.WriteString(`,"parentIds":"` + jsons.Format(me.GetString("parentIds")) + `"`)
	b.WriteString(`,"parentCodes":"` + jsons.Format(me.GetString("parentCodes")) + `"`)
	b.WriteString(`,"parentNames":"` + jsons.Format(me.GetString("parentNames")) + `"`)
	b.WriteString(`,"memo":"` + jsons.Format(me.GetString("memo")) + `"`)
	b.WriteString(`,"creates":"` + jsons.Format(me.GetString("creates")) + `"`)
	b.WriteString(`,"creater":"` + jsons.Format(me.GetString("creater")) + `"`)
	b.WriteString(`,"created":` + me.GetString("created"))
	b.WriteString(`,"modifier":"` + jsons.Format(me.GetString("modifier")) + `"`)
	b.WriteString(`,"modified":` + me.GetString("modified"))
	b.WriteString(`,"version":` + me.GetString("version"))
	b.WriteString(`,"deletion":` + me.GetString("deletion"))
	b.WriteString(`,"artifical":` + me.GetString("artifical"))
	b.WriteString(`,"history":` + me.GetString("history"))
	b.WriteString(`,"menuIds":"` + jsons.Format(me.GetString("menuIds")) + `"`)
	b.WriteString("}")
	return b.String()
}

func (me *Entity) ExcelColumns() []string {
	return nil
}


text:
package com.gemstone.gemfire.internal.cache.partitioned;

import com.gemstone.gemfire.i18n.LogWriterI18n;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import java.util.Set;

import com.gemstone.gemfire.CancelException;
import com.gemstone.gemfire.DataSerializer;
import com.gemstone.gemfire.cache.persistence.PartitionOfflineException;
import com.gemstone.gemfire.distributed.internal.DM;
import com.gemstone.gemfire.distributed.internal.DistributionManager;
import com.gemstone.gemfire.distributed.internal.DistributionMessage;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.distributed.internal.ReplyException;
import com.gemstone.gemfire.distributed.internal.ReplyMessage;
import com.gemstone.gemfire.distributed.internal.ReplyProcessor21;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.Assert;
import com.gemstone.gemfire.distributed.internal.DistributionStats;
import com.gemstone.gemfire.internal.cache.Node;
import com.gemstone.gemfire.internal.cache.PartitionedRegion;
import com.gemstone.gemfire.internal.cache.ForceReattemptException;
import com.gemstone.gemfire.internal.cache.PartitionedRegionDataStore;

/**
 * A request to manage a particular bucket
 *
 * @author Mitch Thomas
 * @since 5.0
 *
 */
public final class ManageBucketMessage extends PartitionMessage {
  /** The key associated with the value that must be sent */
  private int bucketId;

  /** The value associated with the key that must be sent */
  private int bucketSize;

  /**
   * Force the hosting of a bucket
   */
  private boolean forceCreation;

  /**
   * Empty constructor to satisfy {@link DataSerializer} requirements
   */
  public ManageBucketMessage() {}

  private ManageBucketMessage(InternalDistributedMember recipient, int regionId,
      ReplyProcessor21 processor, int bucketId, int bucketSize, boolean hostItNow) {
    super(recipient, regionId, processor, null);
    this.bucketId = bucketId;
    this.bucketSize = bucketSize;
    this.forceCreation = hostItNow;
  }
  public ManageBucketMessage(DataInput in) throws IOException, ClassNotFoundException {
    fromData(in);
  }

  @Override
  final public int getMessageProcessorType() {
    return DistributionManager.WAITING_POOL_EXECUTOR;
  }

  /**
   * Sends a PartitionedRegion manage bucket request to the recipient
   * @param recipient the member to which the bucket manage request is sent
   * @param r  the PartitionedRegion to which the bucket belongs
   * @param bucketId the unique identifier of the bucket
   * @param bucketSize the size in bytes of the bucket
   * @param forceCreation inform the recipient to accept the bucket appropriately ignoring maximums
   * @return the processor used to fetch the returned Node if any
   * @throws ForceReattemptException if the peer is no longer available
   */
  public static NodeResponse send(InternalDistributedMember recipient,
      PartitionedRegion r, int bucketId, int bucketSize, boolean forceCreation)
      throws ForceReattemptException
  {
    Assert.assertTrue(recipient != null, "ManageBucketMessage NULL recipient");
    NodeResponse p = new NodeResponse(r.getSystem(), recipient);
    ManageBucketMessage m = new ManageBucketMessage(recipient, r.getPRId(), p, bucketId, bucketSize, forceCreation);

    p.enableSevereAlertProcessing();

    Set failures = r.getDistributionManager().putOutgoing(m);
    if (failures != null && failures.size() > 0) {
      throw new ForceReattemptException(LocalizedStrings.ManageBucketMessage_FAILED_SENDING_0.toLocalizedString(m));
    }

    return p;
  }

  /**
   * This method is called upon receipt and make the desired changes to the
   * PartitionedRegion
   * Note: It is very important that this message does NOT cause any deadlocks as the sender will wait indefinitely for the acknowledgement
   */
  @Override
  protected boolean operateOnPartitionedRegion(DistributionManager dm,
      PartitionedRegion r, long startTime) {
    LogWriterI18n l = r.getCache().getLoggerI18n();
    if (DistributionManager.VERBOSE) {
      l.fine("ManageBucketMessage operateOnRegion: " + r.getFullPath());
    }

    // This is to ensure that initialization is complete before bucket creation request is
    // serviced. BUGFIX for 35888
    r.waitOnInitialization();

    r.checkReadiness(); //  Don't allow closed PartitionedRegions that have datastores to host buckets
    PartitionedRegionDataStore prDs = r.getDataStore();
    boolean managingBucket = prDs.handleManageBucketRequest(this.bucketId, this.bucketSize, this.sender, this.forceCreation);
    r.getPrStats().endPartitionMessagesProcessing(startTime);
    if (managingBucket) {
      //fix for bug 39356 - If the sender died while we were creating the bucket
      //notify other nodes that they should invoke grabBackupBuckets to
      //make copies of this bucket. Normally the sender would be responsible
      //for creating those copies.
      checkSenderStillAlive(r, getSender());

      ManageBucketReplyMessage.sendAcceptance(getSender(), getProcessorId(), dm);
    } else {
      ManageBucketReplyMessage.sendRefusal(getSender(), getProcessorId(), dm);
    }
    return false;
  }

  /**
   * Check that sender is still a participant in the partitioned region. If not,
   * notify other nodes to create backup buckets
   */
  private void checkSenderStillAlive(PartitionedRegion r, InternalDistributedMember sender) {
    if (!r.getDistributionAdvisor().containsId(sender)) {
      r.getRedundancyProvider().finishIncompleteBucketCreation(this.bucketId);
    }
  }

  public int getDSFID() {
    return PR_MANAGE_BUCKET_MESSAGE;
  }

  @Override
  public void fromData(DataInput in)
      throws IOException, ClassNotFoundException {
    super.fromData(in);
    this.bucketId = in.readInt();
    this.bucketSize = in.readInt();
    this.forceCreation = in.readBoolean();
  }

  @Override
  public void toData(DataOutput out)
      throws IOException {
    super.toData(out);
    out.writeInt(this.bucketId);
    out.writeInt(this.bucketSize);
    out.writeBoolean(this.forceCreation);
  }

  /**
   * Assists the toString method in reporting the contents of this message
   *
   * @see PartitionMessage#toString()
   */
  @Override
  protected void appendFields(StringBuilder buff) {
    super.appendFields(buff);
    buff.append("; bucketId=").append(this.bucketId)
        .append("; bucketSize=").append(this.bucketSize);
  }

  @Override
  public boolean isSevereAlertCompatible() {
    // since bucket management happens during entry operations, it
    // must be severe-alert compatible
    return true;
  }

  /**
   * A class that contains the reply to a {@link ManageBucketMessage} message
   * which contains the {@link Node} that has accepted to manage the bucket.
   * @author mthomas
   * @since 5.0
   */
  public static final class ManageBucketReplyMessage extends ReplyMessage {

    protected boolean acceptedBucket;

    /** true if the vm refused because it was still in initialization */
    protected boolean notYetInitialized;

    /**
     * Empty constructor to conform to DataSerializable interface
     */
    public ManageBucketReplyMessage() {
    }

    public ManageBucketReplyMessage(DataInput in) throws IOException, ClassNotFoundException {
      fromData(in);
    }

    private ManageBucketReplyMessage(int processorId, boolean accept, boolean initializing)
    {
      this.processorId = processorId;
      this.acceptedBucket= accept;
      this.notYetInitialized = initializing;
    }

    /**
     * Refuse the request to manage the bucket
     * @param recipient the requesting node
     * @param processorId the identity of the processor the requesting node is waiting on
     * @param dm the distribution manager used to send the refusal
     */
    public static void sendRefusal(InternalDistributedMember recipient, int processorId, DM dm)
    {
      Assert.assertTrue(recipient != null, "ManageBucketReplyMessage NULL reply message");
      ManageBucketReplyMessage m = new ManageBucketReplyMessage(processorId, false, false);
      m.setRecipient(recipient);
      dm.putOutgoing(m);
    }

    /**
     * Refuse the request to manage the bucket because the region is still being initialized
     * @param recipient the requesting node
     * @param processorId the identity of the processor the requesting node is waiting on
     * @param dm the distribution manager used to send the acceptance message
     */
    public static void sendStillInitializing(InternalDistributedMember recipient,
        int processorId, DM dm)
    {
      ManageBucketReplyMessage m = new ManageBucketReplyMessage(processorId, false, true);
      m.setRecipient(recipient);
      dm.putOutgoing(m);
    }

    /**
     * Accept the request to manage the bucket
     * @param recipient the requesting node
     * @param processorId the identity of the processor the requesting node is waiting on
     * @param dm the distribution manager used to send the acceptance message
     */
    public static void sendAcceptance(InternalDistributedMember recipient, int processorId,
        DM dm)
    {
      Assert.assertTrue(recipient != null, "ManageBucketReplyMessage NULL reply message");
      ManageBucketReplyMessage m = new ManageBucketReplyMessage(processorId, true, false);
      m.setRecipient(recipient);
      dm.putOutgoing(m);
}

    /**
     * Processes this message.  This method is invoked by the receiver
     * of the message.
     * @param dm the distribution manager that is processing the message.
     */
    @Override
    public void process(final DM dm, final ReplyProcessor21 processor) {
      final long startTime = getTimestamp();
      LogWriterI18n l = dm.getLoggerI18n();
      if (DistributionManager.VERBOSE) {
        l.fine("ManageBucketReplyMessage process invoking reply processor with processorId:" + this.processorId);
      }

      if (processor == null) {
        if (DistributionManager.VERBOSE) {
          l.fine("ManageBucketReplyMessage processor not found");
        }
        return;
      }
      processor.process(this);

      if (DistributionManager.VERBOSE) {
        LogWriterI18n logger = dm.getLoggerI18n();
        logger.info(LocalizedStrings.ManageBucketMessage_0__PROCESSED__1, new Object[] {processor, this});
      }
      dm.getStats().incReplyMessageTime(DistributionStats.getStatTime()-startTime);
    }

    @Override
    public void toData(DataOutput out) throws IOException {
      super.toData(out);
      out.writeBoolean(this.acceptedBucket);
      out.writeBoolean(this.notYetInitialized);
    }

    @Override
  public int getDSFID() {
    return PR_MANAGE_BUCKET_REPLY_MESSAGE;
  }

    @Override
    public void fromData(DataInput in)
      throws IOException, ClassNotFoundException {
      super.fromData(in);
      this.acceptedBucket = in.readBoolean();
      this.notYetInitialized = in.readBoolean();
    }

    @Override
    public String toString() {
      return new StringBuffer()
      .append("ManageBucketReplyMessage ")
      .append("processorid=").append(this.processorId)
      .append(" accepted bucket=").append(this.acceptedBucket)
      .append(" isInitializing=").append(this.notYetInitialized)
      .toString();
    }
  }

  /**
   * A processor to capture the {@link Node} returned by {@link ManageBucketMessage}
   * @author mthomas
   * @since 5.0
   */
  static public class NodeResponse extends ReplyProcessor21  {
    /**
     * the message that triggers return from waitForAcceptance.  This will
     * be null if the target member exited
     */
    private volatile ManageBucketReplyMessage msg;

    public NodeResponse(InternalDistributedSystem ds, InternalDistributedMember recipient) {
      super(ds, recipient);
    }

    @Override
    public void process(DistributionMessage msg)
    {
      try {
        if (msg instanceof ManageBucketReplyMessage) {
          ManageBucketReplyMessage reply =(ManageBucketReplyMessage) msg;
          this.msg = reply;
          if (DistributionManager.VERBOSE) {
            getDistributionManager().getLoggerI18n().fine("NodeResponse return value is " +
                reply.acceptedBucket + " isInitializing=" + reply.notYetInitialized);
          }
        } else {
          Assert.assertTrue(msg instanceof ReplyMessage);
        }
      } finally {
        super.process(msg);
      }
    }

    /**
     * Wait for the response to a {@link ManageBucketMessage} request.
     * @return true if the node sent the request is managing the bucket
     * @see com.gemstone.gemfire.internal.cache.PartitionedRegionDataStore#handleManageBucketRequest(int, int, InternalDistributedMember, boolean)
     * @throws ForceReattemptException if the peer is no longer available
     */
    public boolean waitForAcceptance()  throws ForceReattemptException
    {
      try {
        waitForRepliesUninterruptibly();
      }
      catch (ReplyException e) {
        Throwable t = e.getCause();
        if (t instanceof CancelException) {
          getDistributionManager().getLoggerI18n().fine("NodeResponse got remote cancellation, throwing PartitionedRegionCommunication Exception.", t);
          throw new ForceReattemptException(LocalizedStrings.ManageBucketMessage_NODERESPONSE_GOT_REMOTE_CANCELLATION_THROWING_PARTITIONEDREGIONCOMMUNICATION_EXCEPTION.toLocalizedString(), t);
        }
        if (t instanceof PRLocallyDestroyedException) {
          getDistributionManager().getLoggerI18n().fine("NodeResponse got local destroy on the PartitionRegion , throwing ForceReattemptException.", t);
          throw new ForceReattemptException(LocalizedStrings.ManageBucketMessage_NODERESPONSE_GOT_LOCAL_DESTROY_ON_THE_PARTITIONREGION_THROWING_FORCEREATTEMPTEXCEPTION.toLocalizedString(), t);
        }
        if (t instanceof PartitionOfflineException) {
          throw (PartitionOfflineException) t;
        }
        if (t instanceof ForceReattemptException) {
          String msg = "NodeResponse got ForceReattemptException due to local destroy on the PartitionRegion.";
          getDistributionManager().getLoggerI18n().fine(msg, t);
          throw (ForceReattemptException)t;
        }
        e.handleAsUnexpected();
      }
      return (this.msg != null) && this.msg.acceptedBucket;
    }

    /**
     * After a response has been returned from waitForAcceptance, this method
     * may be used to see if the other vm rejected the bucket because it was
     * still initializing.
     */
    public boolean rejectedDueToInitialization() {
      return (this.msg != null) && this.msg.notYetInitialized;
    }
  }

}


text:
package org.docksidestage.postgresql.dbflute.cbean.nss;

import org.docksidestage.postgresql.dbflute.cbean.cq.SummaryProductCQ;

/**
 * The nest select set-upper of summary_product.
 * @author DBFlute(AutoGenerator)
 */
public class SummaryProductNss {

    // ===================================================================================
    //                                                                           Attribute
    //                                                                           =========
    protected final SummaryProductCQ _query;
    public SummaryProductNss(SummaryProductCQ query) { _query = query; }
    public boolean hasConditionQuery() { return _query != null; }

    // ===================================================================================
    //                                                                     Nested Relation
    //                                                                     ===============
}


text:
process.env.TEST = 'true';

var expect = require('chai').expect;
var request = require('supertest');

var app = require('../../app');
request = request(app);

describe('shape controller', function () {
this.timeout(1000);

var shape = 6;
var newId;

describe('GET /shapes', function() {
    it('should respond with error', function(done) {
        request.get('/shapes')
          .set('Accept', 'application/json')
          .expect('Content-Type', /json/)
          .expect(403)
          .end(done);
    });
});

describe('GET /shapes/:id', function() {
    it('should respond with shape data', function(done) {
        request.get('/shapes/' + shape)
          .set('Accept', 'application/json')
          .expect('Content-Type', /json/)
          .expect(200)
          .expect(function(res) {
            expect(res.body).to.have.deep.property('properties.type_id');
            expect(res.body.objects[0]).to.include.keys('type','id','role');
          }).end(done);
    });

    it('should respond with error', function(done) {
        request.get('/shapes/111222.geojson')
          .set('Accept', 'application/json')
          .expect('Content-Type', /json/)
          .expect(404)
          .expect(function(res) {
            expect(res.body.message).to.have.string("not found");
          }).end(done);
    });

    it('should respond with geojson', function(done) {
        request.get('/shapes/' + shape + '.geojson')
          .set('Accept', 'application/json')
          .expect('Content-Type', /json/)
          .expect(200)
          .expect(function(res) {
            expect(res.body.properties).to.have.property('end_year');
            expect(res.body.geometry.coordinates[0]).to.be.an('array');
          }).end(done);
    });

    it('should respond with topojson', function(done) {
        request.get('/shapes/' + shape + '.topojson')
          .set('Accept', 'application/json')
          .expect('Content-Type', /json/)
          .expect(200)
          .expect(function(res) {
            expect(res.body.type).to.equal('Topology');
          }).end(done);
    });
});

});


text:
By default, the bundled libraries being used are:
- modernizr
- GSAP(TweenLite)

You can add other libraries by adding new bundles from config.babel.js.
Make sure to install the dependency first and add the appropriate file location to the browserify config from the config.babel.js file.

### Modernizr configurations
Edit the Modernizr features from the `_src/assets/_data/modernizrData.js` directory.

for more information refer to the modernizr documentation.


text:
// Euclidean distance
function eucldist(p1, p2) {
    return Math.sqrt(Math.pow((p1[0]-p2[0]), 2) + Math.pow((p1[1]-p2[1]), 2));
}

var BOUNDS = [-90, -180, 90, 180]; // (s, w, n, e)

// Returns a boolean - if the bounding box falls completely outside the current viewing window on the map
function outOfBounds(bbox, map) {
    // bbox = [w, s, e, n]
    return (bbox[0] > map.e || bbox[1] > map.n || bbox[2] < map.w || bbox[3] < map.s)
}

// Makes and handles a JSON request
// - this outsources the actual AJAX call but is necessary to properly close the layer callback
function loadData(src, layer, index, res, subid) {
    var handle = {
        'callback': attacher(this, function(data) {
            layer.load(data, index, res, subid);
        }),
        'error': function(msg) {
            console.log(msg);
        }
    };
    JSON(src, handle, {});
}

function CanvasMap(container, zoom) {
    this.zoom = zoom;
    this.layers = [];
    var layer_map = {};
    this.drawCoords = false;
    this.points = [];

    // Add a control layer to handle mouse interaction including:
    // 1. Detecting the cursor position
    // 2. Dragging to pan
    // 3. Scrolling to zoom
    // Data layers will be stuck in under this layer
    this.control_layer = new ControlLayer(this, container);
    this.control_layer.$canvas.mousedown(attacher(this, function(e) {
        this.drag_x = e.pageX;
        this.drag_y = e.pageY;
        this.drag_s = this.s;
        this.drag_w = this.w;
        this.drag_n = this.n;
        this.drag_e = this.e;
        this.dragging = true;
    }));
    this.control_layer.$canvas.mousemove(attacher(this, function(e) {
        var lon_offset = (e.pageX - this.drag_x) / this.zoom;
        var lat_offset = (e.pageY - this.drag_y) / this.zoom;
        if(this.dragging) {
            this.update(this.zoom, this.drag_s+lat_offset, this.drag_w-lon_offset, this.drag_n+lat_offset, this.drag_e-lon_offset);
        }
    }));
    this.control_layer.$canvas.mouseup(attacher(this, function(e) {
        this.dragging = false;
    }));
    this.control_layer.$canvas.mousewheel(attacher(this, function(e, delta, deltaX, deltaY) {
        var mouse_coord = [this.n-e.pageY/this.zoom, e.pageX/this.zoom+this.w]; // [s,w] of the mouse
        this.zoom *= Math.pow(1.1, delta); // zoom in
        var new_center = [mouse_coord[0] + (e.pageY - $(window).height()/2) / this.zoom, mouse_coord[1] + ($(window).width()/2 - e.pageX) / this.zoom];
        this.resize(null, new_center); // on the mouse position
    }));
    this.control_layer.$canvas.click(attacher(this, function(e) {
        // manually propogate click events down through layers
        for(l in this.layers) {
            this.layers[l].click(e);
        }
    }));

    // pan and changeZoom are updater functions triggered globally by buttons to
    // adjust the viewing window
    this.pan = function(x, y) {
        var degreesWide = this.width / this.zoom;
        var degreesHigh = this.height / this.zoom;
        var xchange = x * degreesWide;
        var ychange = y * degreesHigh;
        /*
        // fix horizontal overrun
        if(this.e + xchange > BOUNDS[3])
            xchange = BOUNDS[3] - this.e;
        else if(this.w + xchange < BOUNDS[1])
            xchange = BOUNDS[1] - this.w;

        // fix vertical overrun
        if(this.n + ychange > BOUNDS[2])
            ychange = BOUNDS[2] - this.n;
        else if(this.s + ychange < BOUNDS[0])
            ychange = BOUNDS[0] - this.s;
        */
        var s = this.s + ychange;
        var w = this.w + xchange;
        var n = this.n + ychange;
        var e = this.e + xchange;

        this.update(null, s, w, n, e);
    }

    this.changeZoom = function(mult) {
        this.zoom *= mult;
        this.resize();
    }

    this.update = function(z, s, w, n, e) {
        if(z != null)
            this.zoom = z;
        if(s != null)
            this.s = s;
        if(w != null)
            this.w = w;
        if(n != null)
            this.n = n;
        if(e != null)
            this.e = e;
        for(var l in this.layers) {
            this.redoLayer(l);
        }
        if(this.drawCoords)
            this.drawDegrees(10, this.layers.length-1); // uppermost layer
        for(var p in this.points) {
            this.point(this.points[p], this.layers.length-1); // uppermost layer
        }
    }

    this.redoLayer = function(l) {
        this.layers[l].render();
    }

    this.hide = function(id) {
        if(id in layer_map) {
            var l = layer_map[id];
            this.layers[l].hide();
            this.redoLayer(l);
            return true;
        }
        return false;
    }

    this.show = function(id) {
        if(id in layer_map) {
            var l = layer_map[id];
            this.layers[l].show();
            this.redoLayer(l);
            return true;
        }
        return false;
    }

    this.coord = function(x, y) {
        var x = (x - this.w) * this.zoom;
        var y = (y - this.s) * this.zoom;
        return [x,y];
    }

    this.clear = function() {
        for(l in this.layers) {
            this.layers[l].clear();
        }
    }

    this.addLayer = function(id, info, callback) {
        this.layers.push(new Layer(this, container));
        var i = this.layers.length - 1;
        layer_map[id] = i;
        this.layers[i].id = id;
        for(a in info) { // for each data set (only bathymetry has more than one)
            var multi = (info[a][0] == 'timeseries');
            var type = info[a][1];
            var resolutions = info[a][2];
            var style = info[a][3];
            this.layers[i].addData(multi, type, resolutions, style);
            if(multi) {
                for(var firstkey in resolutions[0][1]) break; // get the first key
                this.layers[i].change(firstkey); // set the default subid to the first in the list
            }
        }
        this.layers[i].onclick(function(lon, lat, objs){
            if(objs.length > 0) {
                for(var o in objs) {
                    if(objs[o] != null) {
                        console.log(this.id + ': ' + lon.toFixed(0) + ',' + lat.toFixed(0) + ' [' + objs + ']');
                        if(callback)
                            callback.apply(this, objs); // make a callback with the list of objects, usually indices into a list of features
                        break;
                    }
                }
            }
        });
    }

    this.changeLayer = function(id, subid) {
        var layer = this.layers[layer_map[id]];
        return layer.change(subid);
    }

    this.resize = function(event, center) {
        this.width = $(window).width();
        this.height = $(window).height();

        this.control_layer.$canvas.attr('width', this.width);
        this.control_layer.$canvas.attr('height', this.height);

        for(var l in this.layers) {
            this.layers[l].$canvas.attr('width', this.width);
            this.layers[l].$canvas.attr('height', this.height);
        }
        var degreesWide = this.width / this.zoom;
        var degreesHigh = this.height / this.zoom;
        if(center == null)
            center = [this.s + (this.n - this.s)/2, this.w + (this.e - this.w)/2];
        var s = center[0] - degreesHigh / 2;
        var n = center[0] + degreesHigh / 2;
        var w = center[1] - degreesWide / 2;
        var e = center[1] + degreesWide / 2;
        this.update(null, s, w, n, e);
    }

    // all we have to do here is make sure the center is at (0,0) and it will adjust the window based on the size and zoom
    this.s = BOUNDS[0];
    this.w = BOUNDS[1];
    this.n = BOUNDS[2];
    this.e = BOUNDS[3];
    this.resize(); // adjust for window size at startup

    $(window).resize(attacher(this, this.resize));

    // load 8k grid data
    // make this more elegant... later
    var handle = {
        'callback': attacher(this, function(data) {
            this.grid = [];
            for(var d in data) {
                // coords come in the form [s, n, w, e]
                this.grid.push([data[d][0]/10, data[d][2]/10, data[d][1]/10, data[d][3]/10]);
                // convert to [s, w, n, e]
            }
        }),
        'error': function(msg) {
            console.log(msg);
        }
    };
}

function ControlLayer(map, container) {
    this.$canvas = $('<canvas>');
    this.$canvas.addClass('layer');
    $(container).append(this.$canvas);
    this.$canvas.attr('width', this.$canvas.width());
    this.$canvas.attr('height', this.$canvas.height());
    this.ctx = this.$canvas.get(0).getContext('2d');

    this.map = map;

    // attach the mouse listener to the topmost layer
    this.$canvas.mousemove(attacher(this, function(e) {
        var x = e.pageX - $(e.currentTarget).offset().left;
        var y = e.pageY - $(e.currentTarget).offset().top;
        var lon = x/this.map.width * (this.map.e-this.map.w) + this.map.w;
        var lat = (1 - y/this.map.height) * (this.map.n-this.map.s) + this.map.s;
        if(lon < 0)
            lon = (lon * -1).toFixed(2) + ' W';
        else
            lon = lon.toFixed(2) + ' E';
        if(lat < 0)
            lat = (lat * -1).toFixed(2) + ' S';
        else
            lat = lat.toFixed(2) + ' N';
        this.ctx.clearRect(0,0,100,20);
        this.ctx.fillStyle = 'rgba(255,255,255,0.5)';
        this.ctx.fillRect(0,0,100,20);
        this.ctx.fillStyle = '#000000';
        this.ctx.fillText(lon + ', ' + lat, 5, 10);
    }));
}

function Layer(map, container) {
    this.$canvas = $('<canvas>');
    this.$canvas.addClass('layer');
    this.$canvas.insertBefore(map.control_layer.$canvas);
    this.$canvas.attr('width', this.$canvas.width());
    this.$canvas.attr('height', this.$canvas.height());
    this.ctx = this.$canvas.get(0).getContext('2d');

    this.map = map;
    this.id = null;
    this.sets = []; // list of separately rendering data sets, in the order they should be rendered [[resolutions, meta], [resolutions, meta], ...]
    this.data = []; // [this will be a sparse array with only indices with known resolutions filled (probably 0, 8, and 40)] for each vector set
    this.loading = []; // list of boolean values indicating if each data set has an outstanding request pending
    var multi = false;
    var subid = null; // id of the subset of the timeseries to display

    var hidden = true;
    this.hide = function() {
        hidden = true;
        this.clear();
    }
    this.show = function() {
        hidden = false;
    }
    this.visible = function() {
        return !hidden;
    }

    this.addData = function(m, type, resolutions, style) {
        multi = m;
        // sort available resolutions from highest to lowest
        resolutions.sort(function(a,b){return b[0]-a[0]});

        this.sets.push([type, resolutions, style]);
        this.data.push([]); // not loaded yet
        this.loading.push(false);
    }

    this.change = function(sid) {
        if(!multi)
            return false;
        subid = sid;
        this.render();
        return true;
    }

    this.clear = function() {
        this.ctx.clearRect(0, 0, this.$canvas.width(), this.$canvas.height());
    }

    this.load = function(data, index, res, subid) {
        var datatype = this.sets[index][0];
        var style = this.sets[index][2];
        if(subid) {
            // initialize empty set
            if(this.data[index][res] == null)
                this.data[index][res] = {};
            if(datatype == 'vector')
                this.data[index][res][subid] = new VectorData(res, data, style);
        }
        else {
            if(datatype == 'vector')
                this.data[index][res] = new VectorData(res, data, style);
            else if(datatype == 'point')
                this.data[index][res] = new PointData(res, data, style);
        }
        this.loading[index] = false;
        this.render();
    }

    this.render = function() {
        if(hidden) {
            return;
        }
        this.clear();
        for(var i in this.sets) {
            // search from most to least detailed, drawing the highest resolution available
            var datatype = this.sets[i][0]
            for(var r in this.sets[i][1]) { // resolutions are sorted highest to lowest
                var res = this.sets[i][1][r][0];
                if(multi) {
                    var filepath = this.sets[i][1][r][1][subid];
                    if(res <= this.map.zoom) {
                        if(this.data[i][res] && this.data[i][res][subid]) { //loaded
                            this.data[i][res][subid].render(this.map, this.ctx);
                            break;
                        }
                        else if(!this.loading[i]) {
                            loadData(filepath, this, i, res, subid)
                            this.loading[i] = true;
                            // notice that we don't break here, so it will keep going while we fetch data and render the next best resolution
                        }
                    }
                }
                else {
                    var filepath = this.sets[i][1][r][1];
                    if(res <= this.map.zoom) {
                        if(this.data[i][res]) { //loaded
                            this.data[i][res].render(this.map, this.ctx);
                            break;
                        }
                        else if(!this.loading[i]) {
                            loadData(filepath, this, i, res)
                            this.loading[i] = true;
                            // notice that we don't break here, so it will keep going while we fetch data and render the next best resolution
                        }
                    }
                }
            }
        }
    }

    // pseudo-event registration
    this.onclick = function(callback) {
        this.click = (function() {
            return function(event) {
                var lon = this.map.w + (event.clientX / this.map.zoom);
                var lat = this.map.n - (event.clientY / this.map.zoom);

                // collect a list of objects at this position on this layer
                var objs = [];
                if(!hidden) {
                    for(var i in this.sets) {
                        for(var r in this.sets[i][1]) {
                            var res = this.sets[i][1][r][0];
                            if(res <= this.map.zoom && this.data[i][res]) {
                                if(multi && this.data[i][res][subid]) {
                                    objs.push(this.data[i][res][subid].atCoord(event.clientX, event.clientY, lon, lat));
                                }
                                else {
                                    objs.push(this.data[i][res].atCoord(event.clientX, event.clientY, lon, lat));
                                }
                            }
                        }
                    }
                }

                callback.apply(this, [lon, lat, objs]);
            };
        })();
    }
}

/*
    Draws point data with labels, being careful not to overlap labels
    - derived almost entirely from layer rendering code in github.com/RandomEtc/shapefile-js, under some open source license
*/
function PointData(res, data, style) {
    // data = [[[x, y], text],
    //         [[x, y], text],
    //         ...
    //        ]
    var RADIUS = 3;
    var DIAMETER = RADIUS*2

    // get the index of the point at the given pixel coordinates (x,y)
    this.atCoord = function(x, y) {
        for(var d in data) {
            coords = map.coord(data[d][0][0]/100, data[d][0][1]/100);
            if(eucldist(coords, [x, map.height-y]) < RADIUS+1) {
                return d;
            }
        }
        return null;
    }

    this.render = function(map, ctx) {
        if (style.fillStyle) ctx.fillStyle = style.fillStyle;
        if (style.strokeStyle) ctx.strokeStyle = style.strokeStyle;
        if (style.lineWidth) ctx.lineWidth = style.lineWidth;

        for (var d in data) {

            // set classMap styles, if available
            var subStyle = {};
            if (style.classMap && style.classMap[data[d][2]]) { // third value in the data is the class (for stations, C, B, or A, urban, suburb, or rural, respectively)
                for(var s in style.classMap[data[d][2]]) {
                    ctx[s] = style.classMap[data[d][2]][s];
                    subStyle[s] = ctx[s];
                }
            }

            var coords = map.coord(data[d][0][0]/100, data[d][0][1]/100);
            if (style.fillStyle || subStyle.fillStyle) {
                /* draw a circle
                ctx.beginPath();
                ctx.arc(coords[0], map.height - coords[1], RADIUS, 0, Math.PI*2, true); // (x, y, radius, start_radian, end_radian, connect?)
                ctx.closePath();
                ctx.fill();
                */
                // draw rectangle
                ctx.fillRect(coords[0] - RADIUS, map.height - coords[1] - RADIUS, DIAMETER, DIAMETER);
            }
            if (style.strokeStyle || subStyle.strokeStyle) {
                /* draw a circle
                ctx.beginPath();
                ctx.arc(coords[0], map.height - coords[1], RADIUS, 0, Math.PI*2, true); // (x, y, radius, start_radian, end_radian, connect?)
                ctx.closePath();
                ctx.stroke();
                */
                // draw rectangle
                ctx.strokeRect(coords[0] - RADIUS, map.height - coords[1] - RADIUS, DIAMETER, DIAMETER);
            }
        }

        if (style.textFill || style.textStroke) {
            if (!style.helper) {
                style.helper = document.createElement('canvas');
                //$('#map').append($(style.helper)); // show it --------------- for debug
                //$(style.helper).addClass('layer');
            }

            // do this every time in case the window was resized
            style.helper.width = map.width;
            style.helper.height = map.height;

            var helper = style.helper.getContext('2d');
            helper.clearRect(0,0,style.helper.width,style.helper.height);
            helper.fillStyle = 'black';

            if (style.font) ctx.font = style.font;
            if (style.textFill) ctx.fillStyle = style.textFill;
            if (style.textStroke) {
                ctx.strokeStyle = style.textStroke;
                ctx.lineJoin = 'round';
                ctx.lineCap = 'round';
                ctx.lineWidth = style.textHalo || 1;
            }
            ctx.textAlign = 'left';
            ctx.textBaseline = 'middle';

            for (var d in data) {
                var coords = map.coord(data[d][0][0]/100, data[d][0][1]/100);
                var text = data[d][1];
                var tx = Math.round(3 + coords[0]);
                var ty = Math.round(map.height - coords[1]);
                var tw = Math.round(ctx.measureText(text).width);
                var th = 12;

                if (tx < 0 || tx+tw >= map.width || ty-th/2 < 0 || ty+th/2 >= map.height) continue;

                // these check for overlap with previously drawn text
                var img = helper.getImageData(tx+tw/2,ty,1,1);
                if (img.data[3]) continue;
                var img = helper.getImageData(tx,ty-th/2,1,1);
                if (img.data[3]) continue;
                img = helper.getImageData(tx+tw,ty-th/2,1,1);
                if (img.data[3]) continue;
                img = helper.getImageData(tx+tw,ty+th/2,1,1);
                if (img.data[3]) continue;
                img = helper.getImageData(tx,ty+th/2,1,1);
                if (img.data[3]) continue;

                helper.fillRect(tx, ty-th/2, tw, th);
                if (style.textStroke) ctx.strokeText(text, tx, ty);
                if (style.textFill) ctx.fillText(text, tx, ty);
            }
        }
    }
}

function VectorData(res, data, style) {
    var resolutions = res;

    // fix bounding box coordinates
    for(var d in data) {
        for(var b in data[d][0]) {
            data[d][0][b] /= 100;
        }
    }

    // get the index of the polygon at the given pixel coordinates (x,y)
    this.atCoord = function(x, y) {
        return null;
    }

    this.render = function(map, ctx) {
        //var m = 0;
        //var colors = ['#FF0000', '#FF7700', '#FFFF00', '#00FF00', '#00FFFF', '#0000FF', '#FF00FF'];
        for(var s in style) {
            ctx[s] = style[s];
        }
        for(var d in data) {
            var bbox = data[d][0];
            if(outOfBounds(bbox, map)) {
                continue
            }
            ctx.beginPath();
            for(var p in data[d][1]) { // parts of the polygon
                var polygon = data[d][1][p];
                var coords = map.coord(polygon[0][0]/100, polygon[0][1]/100);
                ctx.moveTo(coords[0], map.height - coords[1]);
                for(var p = 1; p < polygon.length; p++) {
                    coords = map.coord(polygon[p][0]/100, polygon[p][1]/100);
                    ctx.lineTo(coords[0], map.height - coords[1]);
                }
            }
            if(style.fillStyle) {
                ctx.fill();
            }
            if(style.strokeStyle) {
                ctx.stroke();
            }
        }
    }
}


text:
<link rel="preload" as="style" href="/sys/uniform.css/uniform.css">

<template>

UI Kit

To make it easier for you to kickstart app design, we have made available a UI kit for Adobe XD that utilizes Uniform design system. The kit contains the assets used in Uniform and sample design files of an app BlendingEditor.

View the kit online on Adobe Cloud

Download the kit for Adobe XD

Download the kit for Sketch

    <template is="declarative-shadow-dom">
        <link rel="stylesheet" href="/sys/uniform.css/uniform.css">

            <slot name="uniformdocs/main-heading"></slot>

            <slot name="uniformdocs/main-description"></slot>

                <slot name="uniformdocs/screenshot-1"></slot>

                <slot name="uniformdocs/screenshot-2"></slot>

    </template>
</template>


text:
package com.mytian.lb.bean.user;

import com.core.openapi.OpenApiSimpleResult;

import java.util.ArrayList;

/**
 * 评论返回数据
 * Created by bin.teng on 2015/10/28.
 */
public class CommentResult extends OpenApiSimpleResult {

    private String name;

    private String content;

    private String headUrl;

    public String getName() {
        return name;
    }

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

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getHeadUrl() {
        return headUrl;
    }

    public void setHeadUrl(String headUrl) {
        this.headUrl = headUrl;
    }

    public static ArrayList<CommentResult> testData() {
        ArrayList<CommentResult> arrayList = new ArrayList<>();
        for (int i = 1; i < 8; i++) {
            arrayList.add(testData(i));
        }
        return arrayList;
    }

    public static CommentResult testData(int i) {
        CommentResult commentResult = new CommentResult();
        commentResult.headUrl = "https://raw.githubusercontent.com/tengbinlive/aibao_demo/master/app/src/main/res/mipmap/ic_launcher.png";
        commentResult.name = i==0?"new test ":"bin.teng " + i;
        commentResult.content = "this is a comment ";
        return commentResult;
    }

    @Override
    public String toString() {
        return "CommentResult{" +
                "name='" + name + '\'' +
                ", content='" + content + '\'' +
                ", headUrl='" + headUrl + '\'' +
                '}';
    }
}


text:
This is the Haskell GUI for the travel planner lab of the Chalmers course
DAT037 Data structures.

Installation
------------

Save the files Lab3GUI.hs and Lab3Help.hs into your source code directory.
Then install the threepenny-gui package by executing the following commands
in a terminal. This should work on Mac, Windows and Linux, as long as you have
the [Haskell Platform](http://haskell.org/platform) installed.

    cabal update
    cabal install threepenny-gui

Usage
-----

Import Lab3GUI and Lab3Help in your main source file. Create a data type
`Graph` to represent your graph, then write a function to find the shortest
path between two points. Your function should have the type
`Graph -> Name -> Name -> Maybe ([Name], Cost)`, where the `Name`s are strings
representing node names and the `Cost` is an `Int` representing the total
travel time for the path. Of course, you can (and probably should) use as many
helper functions as you like.

Use the provided functions `readStops` and `readLines` to read your graph
files, then build your graph and pass it, along with your stops and lines and
your `shortestPath` function, to `runGUI`.

Feel free to use this skeleton for your code:

    import Lab3Help
    import Lab3GUI

    data Graph = ... -- Use a sensible graph representation

    shortestPath :: Graph -> Name -> Name -> Maybe ([Name], Cost)
    shortestPath g from to = undefined -- TODO: implement Dijkstra's algorithm

    main = do
      Right bstops <- readStops "your-stops.txt"
      Right blines <- readLines "your-lines.txt"
      let graph = undefined -- Build your graph here using bstops and blines
      runGUI bstops blines graph shortestPath

To try out your program, start it and point your web browser to
[http://localhost:8888](http://localhost:8888).


text:
/* -*- mode: java; c-basic-offset: 2; indent-tabs-mode: nil -*- */

/*
  PdeTextAreaDefaults - grabs font/color settings for the editor
  Part of the Processing project - http://processing.org

  Copyright (c) 2004-06 Ben Fry and Casey Reas
  Copyright (c) 2001-03 Massachusetts Institute of Technology

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software Foundation,
  Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

package processing.app.syntax;

import processing.app.*;
import processing.app.helpers.OSUtils;

public class PdeTextAreaDefaults extends TextAreaDefaults {

  public PdeTextAreaDefaults() {

    inputHandler = new DefaultInputHandler();
    //inputHandler.addDefaultKeyBindings();  // 0122

    // use option on mac for text edit controls that are ctrl on windows/linux
    String mod = OSUtils.isMacOS() ? "A" : "C";

    // right now, ctrl-up/down is select up/down, but mod should be
    // used instead, because the mac expects it to be option(alt)

    inputHandler.addKeyBinding("BACK_SPACE", InputHandler.BACKSPACE);
    // for 0122, shift-backspace is delete, for 0176, it's now a preference,
    // to prevent holy warriors from attacking me for it.
    if (Preferences.getBoolean("editor.keys.shift_backspace_is_delete")) {
      inputHandler.addKeyBinding("S+BACK_SPACE", InputHandler.DELETE);
    } else {
      inputHandler.addKeyBinding("S+BACK_SPACE", InputHandler.BACKSPACE);
    }

    inputHandler.addKeyBinding("DELETE", InputHandler.DELETE);
    inputHandler.addKeyBinding("S+DELETE", InputHandler.DELETE);

    // the following two were changing for 0122 for better mac/pc compatability
    inputHandler.addKeyBinding(mod+"+BACK_SPACE", InputHandler.BACKSPACE_WORD);
    inputHandler.addKeyBinding(mod+"+DELETE", InputHandler.DELETE_WORD);

    // handled by listener, don't bother here
    //inputHandler.addKeyBinding("ENTER", InputHandler.INSERT_BREAK);
    //inputHandler.addKeyBinding("TAB", InputHandler.INSERT_TAB);

    inputHandler.addKeyBinding("INSERT", InputHandler.OVERWRITE);

    // http://dev.processing.org/bugs/show_bug.cgi?id=162
    // added for 0176, though the bindings do not appear relevant for osx
    if (Preferences.getBoolean("editor.keys.alternative_cut_copy_paste")) {
      inputHandler.addKeyBinding("C+INSERT", InputHandler.CLIPBOARD_COPY);
      inputHandler.addKeyBinding("S+INSERT", InputHandler.CLIPBOARD_PASTE);
      inputHandler.addKeyBinding("S+DELETE", InputHandler.CLIPBOARD_CUT);
    }

    // disabling for 0122, not sure what this does
    //inputHandler.addKeyBinding("C+\\", InputHandler.TOGGLE_RECT);

    // for 0122, these have been changed for better compatibility
    // HOME and END now mean the beginning/end of the document
    // for 0176 changed this to a preference so that the Mac OS X people
    // can get the "normal" behavior as well if they prefer.
    if (Preferences.getBoolean("editor.keys.home_and_end_travel_far")) {
      inputHandler.addKeyBinding("HOME", InputHandler.DOCUMENT_HOME);
      inputHandler.addKeyBinding("END", InputHandler.DOCUMENT_END);
      inputHandler.addKeyBinding("S+HOME", InputHandler.SELECT_DOC_HOME);
      inputHandler.addKeyBinding("S+END", InputHandler.SELECT_DOC_END);
    } else {
      // for 0123 added the proper windows defaults
      inputHandler.addKeyBinding("HOME", InputHandler.HOME);
      inputHandler.addKeyBinding("END", InputHandler.END);
      inputHandler.addKeyBinding("S+HOME", InputHandler.SELECT_HOME);
      inputHandler.addKeyBinding("S+END", InputHandler.SELECT_END);
      inputHandler.addKeyBinding("C+HOME", InputHandler.DOCUMENT_HOME);
      inputHandler.addKeyBinding("C+END", InputHandler.DOCUMENT_END);
      inputHandler.addKeyBinding("CS+HOME", InputHandler.SELECT_DOC_HOME);
      inputHandler.addKeyBinding("CS+END", InputHandler.SELECT_DOC_END);
    }

    if (OSUtils.isMacOS()) {
      inputHandler.addKeyBinding("M+LEFT", InputHandler.HOME);
      inputHandler.addKeyBinding("M+RIGHT", InputHandler.END);
      inputHandler.addKeyBinding("MS+LEFT", InputHandler.SELECT_HOME); // 0122
      inputHandler.addKeyBinding("MS+RIGHT", InputHandler.SELECT_END);  // 0122
    } else {
      inputHandler.addKeyBinding("C+LEFT", InputHandler.HOME);  // 0122
      inputHandler.addKeyBinding("C+RIGHT", InputHandler.END);  // 0122
      inputHandler.addKeyBinding("CS+HOME", InputHandler.SELECT_HOME); // 0122
      inputHandler.addKeyBinding("CS+END", InputHandler.SELECT_END);  // 0122
    }

    inputHandler.addKeyBinding("PAGE_UP", InputHandler.PREV_PAGE);
    inputHandler.addKeyBinding("PAGE_DOWN", InputHandler.NEXT_PAGE);
    inputHandler.addKeyBinding("S+PAGE_UP", InputHandler.SELECT_PREV_PAGE);
    inputHandler.addKeyBinding("S+PAGE_DOWN", InputHandler.SELECT_NEXT_PAGE);

    inputHandler.addKeyBinding("LEFT", InputHandler.PREV_CHAR);
    inputHandler.addKeyBinding("S+LEFT", InputHandler.SELECT_PREV_CHAR);
    inputHandler.addKeyBinding(mod + "+LEFT", InputHandler.PREV_WORD);
    inputHandler.addKeyBinding(mod + "S+LEFT", InputHandler.SELECT_PREV_WORD);
    inputHandler.addKeyBinding("RIGHT", InputHandler.NEXT_CHAR);
    inputHandler.addKeyBinding("S+RIGHT", InputHandler.SELECT_NEXT_CHAR);
    inputHandler.addKeyBinding(mod + "+RIGHT", InputHandler.NEXT_WORD);
    inputHandler.addKeyBinding(mod + "S+RIGHT", InputHandler.SELECT_NEXT_WORD);

    inputHandler.addKeyBinding("UP", InputHandler.PREV_LINE);
    inputHandler.addKeyBinding(mod + "+UP", InputHandler.PREV_LINE);  // p5
    inputHandler.addKeyBinding("S+UP", InputHandler.SELECT_PREV_LINE);
    inputHandler.addKeyBinding("DOWN", InputHandler.NEXT_LINE);
    inputHandler.addKeyBinding(mod + "+DOWN", InputHandler.NEXT_LINE);  // p5
    inputHandler.addKeyBinding("S+DOWN", InputHandler.SELECT_NEXT_LINE);

    inputHandler.addKeyBinding("MS+UP", InputHandler.SELECT_DOC_HOME);
    inputHandler.addKeyBinding("CS+UP", InputHandler.SELECT_DOC_HOME);
    inputHandler.addKeyBinding("MS+DOWN", InputHandler.SELECT_DOC_END);
    inputHandler.addKeyBinding("CS+DOWN", InputHandler.SELECT_DOC_END);

    inputHandler.addKeyBinding(mod + "+ENTER", InputHandler.REPEAT);

    document = new SyntaxDocument();
    editable = true;
    electricScroll = 3;

    cols = 80;
    rows = 15;

    // moved from SyntaxUtilities
    //DEFAULTS.styles = SyntaxUtilities.getDefaultSyntaxStyles();

    styles = new SyntaxStyle[Token.ID_COUNT];

    // comments
    styles[Token.COMMENT1] = Theme.getStyle("comment1");
    styles[Token.COMMENT2] = Theme.getStyle("comment2");

    // abstract, final, private
    styles[Token.KEYWORD1] = Theme.getStyle("keyword1");

    // beginShape, point, line
    styles[Token.KEYWORD2] = Theme.getStyle("keyword2");

    // byte, char, short, color
    styles[Token.KEYWORD3] = Theme.getStyle("keyword3");

    // constants: null, true, this, RGB, TWO_PI
    styles[Token.LITERAL1] = Theme.getStyle("literal1");

    // p5 built in variables: mouseX, width, pixels
    styles[Token.LITERAL2] = Theme.getStyle("literal2");

    // ??
    styles[Token.LABEL] = Theme.getStyle("label");

    // http://arduino.cc/
    styles[Token.URL] = Theme.getStyle("url");

    // + - = /
    styles[Token.OPERATOR] = Theme.getStyle("operator");

    // area that's not in use by the text (replaced with tildes)
    styles[Token.INVALID] = Theme.getStyle("invalid");

    // moved from TextAreaPainter

    font = Preferences.getFont("editor.font");

    fgcolor = Theme.getColor("editor.fgcolor");
    bgcolor =  Theme.getColor("editor.bgcolor");

    caretVisible = true;
    caretBlinks = Preferences.getBoolean("editor.caret.blink");
    caretColor = Theme.getColor("editor.caret.color");

    selectionColor = Theme.getColor("editor.selection.color");

    lineHighlight =
      Theme.getBoolean("editor.linehighlight");
    lineHighlightColor =
      Theme.getColor("editor.linehighlight.color");

    bracketHighlight =
      Theme.getBoolean("editor.brackethighlight");
    bracketHighlightColor =
      Theme.getColor("editor.brackethighlight.color");

    eolMarkers = Theme.getBoolean("editor.eolmarkers");
    eolMarkerColor = Theme.getColor("editor.eolmarkers.color");

    paintInvalid = Theme.getBoolean("editor.invalid");
  }
}