text:
CREATE TABLE IF NOT EXISTS `admin_company_operators` (
  `operator_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'オペレータID',
  `company_id` int(11) NOT NULL COMMENT '管理組織ID',
  `role_id` int(11) NOT NULL COMMENT 'ロールID',
  `login_id` varchar(200) COLLATE utf8_unicode_ci NOT NULL COMMENT 'オペレータログインID',
  `password` varchar(200) COLLATE utf8_unicode_ci NOT NULL COMMENT 'オペレータログインパスワード',
  `operator_title` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '役職名',
  `operator_name` varchar(100) COLLATE utf8_unicode_ci NOT NULL COMMENT 'オペレータ名',
  `operator_name_kana` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'オペレータ名カナ',
  `zip1` varchar(3) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '郵便番号1',
  `zip2` varchar(4) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '郵便番号2',
  `pref` int(11) DEFAULT NULL COMMENT '都道府県',
  `address1` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '住所1',
  `address2` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '住所2',
  `free_tel1` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'フリーダイヤル1',
  `free_tel2` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'フリーダイヤル2',
  `free_tel3` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'フリーダイヤル3',
  `tel1` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '電話番号1',
  `tel2` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '電話番号2',
  `tel3` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '電話番号3',
  `fax1` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'FAX番号1',
  `fax2` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'FAX番号2',
  `fax3` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'FAX番号3',
  `url` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'サイトURL',
  `email` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'メールアドレス',
  `location` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '所在地',
  `age` int(11) DEFAULT NULL COMMENT '年齢',
  `support_limit` int(11) DEFAULT NULL COMMENT '受付可能人数',
  `description` varchar(2048) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '備考',
  `contact_name` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '受付担当者名',
  `display_flg` tinyint(1) NOT NULL DEFAULT '1' COMMENT '表示フラグ',
  `start_time` datetime DEFAULT NULL COMMENT '利用開始日時',
  `end_time` datetime DEFAULT NULL COMMENT '利用終了日時',
  `create_time` datetime NOT NULL COMMENT 'データ作成日時',
  `update_time` datetime NOT NULL COMMENT 'データ最終更新日時',
  PRIMARY KEY (`operator_id`),
  UNIQUE KEY `login_id` (`login_id`),
  KEY `company_id` (`company_id`),
  KEY `role_id` (`role_id`),
  CONSTRAINT `admin_company_operators_ibfk_1` FOREIGN KEY (`company_id`) REFERENCES `admin_companys` (`company_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `admin_company_operators_ibfk_2` FOREIGN KEY (`role_id`) REFERENCES `admin_roles` (`role_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='管理組織オペレータテーブル'


text:
package ru.job4j;

import org.junit.Test;
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertThat;
/**
 *Test.
 *
 *@author Kseniya Shustova (shustovakv@mail.ru)
 *@version $Id$
 *@since 0.1
 */
public class CalculateTest {
	/**
	 * Test add.
	 */
	 @Test
	 public void whenTakeNameThenTreeEchoPlusName() {
		 String input = "Kseniya Shustova";
		 String expect = "Echo, echo, echo : Kseniya Shustova";
		 Calculate calc = new Calculate();
		 String result = calc.echo(input);
		 assertThat(result, is(expect));
	}
}

redpajama_set_name: RedPajamaGithub


text:
from collections import namedtuple
from functools import lru_cache

from django.db.models import Sum
from django.template.response import TemplateResponse
from django.urls import reverse_lazy as reverse
from django.utils.functional import cached_property
from django.utils.translation import gettext_lazy as _

from ...forms.reports.orderables import OrderablePaymentsForm, OrderablePaymentsStatusForm, OrderableStatsForm
from ...models.agegroup import AgeGroup
from ...models.citizenship import Citizenship
from ...models.orderables import Orderable, OrderableRegistration
from ...models.roles import Participant
from ...models.subjects import SubjectPayment, SubjectRegistrationParticipant, SubjectType
from ...views.generic import FormView

class ReportOrderablePaymentsView(FormView):
    form_class = OrderablePaymentsForm
    template_name = "leprikon/reports/orderable_payments.html"
    title = _("Orderable payments")
    submit_label = _("Show")
    back_url = reverse("leprikon:report_list")

    def form_valid(self, form):
        context = form.cleaned_data
        context["form"] = form
        context["received_payments"] = SubjectPayment.objects.filter(
            target_registration__subject__subject_type__subject_type=SubjectType.ORDERABLE,
            accounted__gte=context["date_start"],
            accounted__lte=context["date_end"],
        )
        context["returned_payments"] = SubjectPayment.objects.filter(
            source_registration__subject__subject_type__subject_type=SubjectType.ORDERABLE,
            accounted__gte=context["date_start"],
            accounted__lte=context["date_end"],
        )
        context["received_payments_sum"] = context["received_payments"].aggregate(sum=Sum("amount"))["sum"] or 0
        context["returned_payments_sum"] = context["returned_payments"].aggregate(sum=Sum("amount"))["sum"] or 0
        context["sum"] = context["received_payments_sum"] - context["returned_payments_sum"]
        return TemplateResponse(self.request, self.template_name, self.get_context_data(**context))

class ReportOrderablePaymentsStatusView(FormView):
    form_class = OrderablePaymentsStatusForm
    template_name = "leprikon/reports/orderable_payments_status.html"
    title = _("Orderable event payments status")
    submit_label = _("Show")
    back_url = reverse("leprikon:report_list")

    OrderablePaymentsStatusSums = namedtuple("OrderablePaymentsStatusSums", ("registrations", "status"))

    def form_valid(self, form):
        context = form.cleaned_data
        context["form"] = form
        context["reports"] = [
            self.Report(orderable, context["date"])
            for orderable in Orderable.objects.filter(school_year=self.request.school_year)
        ]
        context["sum"] = self.OrderablePaymentsStatusSums(
            registrations=sum(len(r.registration_statuses) for r in context["reports"]),
            status=sum(r.status for r in context["reports"]),
        )
        return TemplateResponse(self.request, self.template_name, self.get_context_data(**context))

    class Report:
        def __init__(self, orderable, d):
            self.orderable = orderable
            self.date = d

        RegPaymentStatus = namedtuple("RegPaymentStatus", ("registration", "status"))

        @cached_property
        def registration_statuses(self):
            return [
                registration_status
                for registration_status in (
                    self.RegPaymentStatus(
                        registration=registration,
                        status=registration.get_payment_status(self.date),
                    )
                    for registration in OrderableRegistration.objects.filter(
                        subject=self.orderable,
                        approved__date__lte=self.date,
                    )
                )
                if registration_status.status.receivable
            ]

        @cached_property
        def status(self):
            return sum(rs.status for rs in self.registration_statuses)

class ReportOrderableStatsView(FormView):
    form_class = OrderableStatsForm
    template_name = "leprikon/reports/orderable_stats.html"
    title = _("Orderable statistics")
    submit_label = _("Show")
    back_url = reverse("leprikon:report_list")

    ReportItem = namedtuple("ReportItem", ("age_group", "all", "boys", "girls", "citizenships"))

    def get_form_kwargs(self):
        kwargs = super().get_form_kwargs()
        kwargs["school_year"] = self.request.school_year
        return kwargs

    @lru_cache
    def get_orderable_days(self, orderable_id):
        orderable = Orderable.objects.get(id=orderable_id)
        return orderable.duration.days + 1

    def form_valid(self, form):
        d = form.cleaned_data["date"]
        paid_only = form.cleaned_data["paid_only"]
        paid_later = form.cleaned_data["paid_later"]
        approved_later = form.cleaned_data["approved_later"]
        unique_participants = form.cleaned_data["unique_participants"]
        min_days = form.cleaned_data["min_days"]
        context = form.cleaned_data
        context["form"] = form

        if approved_later:
            # approved registrations created by the date
            participants = SubjectRegistrationParticipant.objects.filter(
                registration__created__date__lte=d,
                registration__approved__isnull=False,
            )
        else:
            # registrations approved by the date
            participants = SubjectRegistrationParticipant.objects.filter(
                registration__approved__date__lte=d,
            )
        participants = (
            participants.filter(
                registration__subject__in=form.cleaned_data["orderables"],
            )
            .exclude(registration__canceled__date__lte=d)
            .select_related("registration", "age_group")
        )
        if paid_only:
            paid_date = None if paid_later else d
            participants = [
                participant
                for participant in participants
                if participant.registration.orderableregistration.get_payment_status(paid_date).balance >= 0
            ]
        else:
            participants = list(participants)

        if min_days:
            participants = [p for p in participants if self.get_orderable_days(p.registration.subject_id) >= min_days]

        context["orderables_count"] = len(set(participant.registration.subject_id for participant in participants))

        if unique_participants:
            participants = list({p.key: p for p in participants}.values())

        citizenships = list(Citizenship.objects.all())
        context["citizenships"] = citizenships

        context["participants_counts"] = self.ReportItem(
            age_group=None,
            all=len(participants),
            boys=len([p for p in participants if p.gender == Participant.MALE]),
            girls=len([p for p in participants if p.gender == Participant.FEMALE]),
            citizenships=[
                len([p for p in participants if p.citizenship_id == citizenship.id]) for citizenship in citizenships
            ],
        )
        context["participants_counts_by_age_groups"] = []
        for age_group in AgeGroup.objects.all():
            parts = [p for p in participants if p.age_group == age_group]
            context["participants_counts_by_age_groups"].append(
                self.ReportItem(
                    age_group=age_group,
                    all=len(parts),
                    boys=len([p for p in parts if p.gender == Participant.MALE]),
                    girls=len([p for p in parts if p.gender == Participant.FEMALE]),
                    citizenships=[
                        len([p for p in parts if p.citizenship_id == citizenship.id]) for citizenship in citizenships
                    ],
                )
            )

        return TemplateResponse(self.request, self.template_name, self.get_context_data(**context))


text:
import asyncio
import glob
import importlib
import json
import logging
import os

import pkg_resources
from aiohttp import web

import dcos_installer
from dcos_installer import backend
from dcos_installer.action_lib.prettyprint import print_header
from dcos_installer.util import STATE_DIR

from ssh.ssh_runner import Node

log = logging.getLogger()

options = None

VERSION = '1'

"""Define the aiohttp web application framework and setup
# the routes to be used in the API"""
loop = asyncio.get_event_loop()
app = web.Application(loop=loop)
app['current_action'] = ''
ui_dist_path = os.getenv('INSTALLER_UI_PATH', pkg_resources.resource_filename(__name__, 'templates/'))
index_path = '{}index.html'.format(ui_dist_path)
assets_path = '{}assets/'.format(ui_dist_path)

# Dict containing action name to handler mappings.
action_map = {
    'preflight': dcos_installer.action_lib.run_preflight,
    'deploy': dcos_installer.action_lib.install_dcos,
    'postflight': dcos_installer.action_lib.run_postflight,
}

remove_on_done = ['preflight', 'postflight']

def root(request):
    """Return the root endpoint, serve the index.html.

    :param request: a web requeest object.
    :type request: request | None
    """
    log.info("Root page requested.")
    index_file = open(index_path)
    log.info("Serving %s", index_path)
    resp = web.Response(body=index_file.read().encode('utf-8'))
    resp.headers['content-type'] = 'text/html'
    return resp

def redirect_to_root(request):
    """Return the redirect from /api/v1 to /

    :param request: a web requeest object.
    :type request: request | None
    """
    log.warning("/api/v{} -> redirecting -> /".format(VERSION))
    return web.HTTPFound('/'.format(VERSION))

def configure(request):
    """Return /api/v1/configure

    :param request: a web requeest object.
    :type request: request | None
    """
    if request.method == 'POST':
        new_config = yield from request.json()
        log.info('POST to configure: {}'.format(new_config))
        validation_err, messages = backend.create_config_from_post(new_config)

        resp = web.json_response({}, status=200)
        if validation_err:
            resp = web.json_response(messages, status=400)

        return resp

    elif request.method == 'GET':
        config = backend.get_ui_config()
        resp = web.json_response(config)

    resp.headers['Content-Type'] = 'application/json'
    return resp

def configure_status(request):
    """Return /configure/status

    :param request: a web requeest object.
    :type request: request | None
    """
    log.info("Request for configuration validation made.")
    code = 200
    messages = backend.do_validate_config()
    if messages:
        code = 400
    resp = web.json_response(messages, status=code)
    return resp

def configure_type(request):
    """Return /configure/type

    :param request: a web requeest object.
    :type request: request | None
    """
    log.info("Request for configuration type made.")
    return web.json_response(backend.determine_config_type())

def success(request):
    """Return /success

    :param request: a web requeest object.
    :type request: request | None
    """
    log.info("Request for success made.")
    msgs, code = backend.success()
    return web.json_response(msgs, status=code)

def unlink_state_file(action_name):
    json_status_file = STATE_DIR + '/{}.json'.format(action_name)
    if os.path.isfile(json_status_file):
        log.debug('removing {}'.format(json_status_file))
        os.unlink(json_status_file)
        return True
    log.debug('cannot remove {}, file not found'.format(json_status_file))
    return False

def read_json_state(action_name):
    json_status_file = STATE_DIR + '/{}.json'.format(action_name)
    if not os.path.isfile(json_status_file):
        return False

    with open(json_status_file) as fh:
        return json.load(fh)

def action_action_name(request):
    """Return /action/<action_name>

    :param request: a web requeest object.
    :type request: request | None
    """
    action_name = request.match_info['action_name']

    # Update the global action
    json_state = read_json_state(action_name)
    app['current_action'] = action_name

    if request.method == 'GET':
        log.info('GET {}'.format(action_name))

        if json_state:
            return web.json_response(json_state)
        return web.json_response({})

    elif request.method == 'POST':
        log.info('POST {}'.format(action_name))
        action = action_map.get(action_name)
        # If the action name is preflight, attempt to run configuration
        # generation. If genconf fails, present the UI with a usable error
        # for the end-user
        if action_name == 'preflight':
            try:
                print_header("GENERATING CONFIGURATION")
                backend.do_configure()
            except:
                genconf_failure = {
                    "errors": "Configuration generation failed, please see command line for details"
                }
                return web.json_response(genconf_failure, status=400)

        params = yield from request.post()

        if json_state:
            if action_name == 'deploy' and 'retry' in params:
                if 'hosts' in json_state:
                    failed_hosts = []
                    for deploy_host, deploy_params in json_state['hosts'].items():
                        if deploy_params['host_status'] != 'success':
                            failed_hosts.append(Node(deploy_host, tags=deploy_params['tags']))
                    log.debug('failed hosts: {}'.format(failed_hosts))
                    if failed_hosts:
                        yield from asyncio.async(
                            action(
                                backend.get_config(),
                                state_json_dir=STATE_DIR,
                                hosts=failed_hosts,
                                try_remove_stale_dcos=True,
                                **params))
                        return web.json_response({
                            'status': 'retried',
                            'details': sorted(['{}:{}'.format(node.ip, node.port) for node in failed_hosts])
                        })

            if action_name not in remove_on_done:
                return web.json_response({'status': '{} was already executed, skipping'.format(action_name)})

            running = False
            for host, attributes in json_state['hosts'].items():
                if attributes['host_status'].lower() == 'running':
                    running = True

            log.debug('is action running: {}'.format(running))
            if running:
                return web.json_response({'status': '{} is running, skipping'.format(action_name)})
            else:
                unlink_state_file(action_name)

        yield from asyncio.async(action(backend.get_config(), state_json_dir=STATE_DIR, options=options, **params))
        return web.json_response({'status': '{} started'.format(action_name)})

def action_current(request):
    """Return the current action /action/current endpoint.

    :param request: a web requeest object.
    :type request: request | None
    """
    action = app['current_action']
    return_json = {'current_action': action}
    return web.json_response(return_json)

def logs_handler(request):
    """Return the log file on disk.

    :param request: a web requeest object.
    :type request: request | None
    """
    log.info("Request for logs endpoint made.")
    complete_log_path = '/genconf/state/complete.log'
    json_files = glob.glob('/genconf/state/*.json')
    complete_log = []
    for f in json_files:
        log.debug('Adding {} to complete log file.'.format(f))
        with open(f) as blob:
            complete_log.append(json.loads(blob.read()))

    with open(complete_log_path, 'w') as f:
        f.write(json.dumps(complete_log, indent=4, sort_keys=True))

    return web.HTTPFound('/download/log/complete.log'.format(VERSION))

try:
    app.router.add_static('/assets', assets_path)
    app.router.add_static('/download/log', '/genconf/state/')
except ValueError as err:
    log.warning(err)

def no_caching(request, response):
    response.headers['Cache-Control'] = 'no-cache'

app.router.add_route('GET', '/', root)
app.router.add_route('GET', '/api/v{}'.format(VERSION), redirect_to_root)
app.router.add_route('GET', '/api/v{}/configure'.format(VERSION), configure)
app.router.add_route('POST', '/api/v{}/configure'.format(VERSION), configure)
app.router.add_route('GET', '/api/v{}/configure/status'.format(VERSION), configure_status)
app.router.add_route('GET', '/api/v{}/configure/type'.format(VERSION), configure_type)
app.router.add_route('GET', '/api/v{}/success'.format(VERSION), success)
# TODO(malnick) The regex handling in the variable routes blows up if we insert another variable to be
# filled in by .format. Had to hardcode the VERSION into the URL for now. Fix suggestions please!
app.router.add_route('GET', '/api/v1/action/{action_name:preflight|postflight|deploy}', action_action_name)
app.router.add_route('POST', '/api/v1/action/{action_name:preflight|postflight|deploy}', action_action_name)
app.router.add_route('GET', '/api/v{}/action/current'.format(VERSION), action_current)
app.router.add_route('GET', '/api/v{}/logs'.format(VERSION), logs_handler)

# Allow overriding calculators with a `gen_extra/async_server.py` if it exists
if os.path.exists('gen_extra/async_server.py'):
    mod = importlib.machinery.SourceFileLoader('gen_extra.async_server', 'gen_extra/async_server.py').load_module()
    mod.extend_app(app)

app.on_response_prepare.append(no_caching)

def start(cli_options):
    global options
    options = cli_options

    log.debug('DC/OS Installer')
    handler = app.make_handler()
    f = loop.create_server(
        handler,
        '0.0.0.0',
        cli_options.port)
    srv = loop.run_until_complete(f)
    log.info('Starting server {}'.format(srv.sockets[0].getsockname()))
    if os.path.isdir(STATE_DIR):
        for state_file in glob.glob(STATE_DIR + '/*.json'):
            try:
                os.unlink(state_file)
                log.debug('removing {}'.format(state_file))
            except FileNotFoundError:
                log.error('{} not found'.format(state_file))
            except PermissionError:
                log.error('cannot remove {}, Permission denied'.format(state_file))
    else:
        os.makedirs(STATE_DIR)

    assert os.path.isdir(assets_path)
    assert os.path.isdir('/genconf/state/')

    try:
        loop.run_forever()
    except KeyboardInterrupt:
        srv.close()
        loop.run_until_complete(handler.finish_connections(1.0))
        loop.run_until_complete(app.finish())
    loop.close()


text:
glyph: h
name: Scorpio
---

_Key Phrase_: I DESIRE

_Basic Nature_: Resourceful and Transforming

_Keywords_: deep, intense, penetrating, passionate, transforming, sexual organs of cosmic
man, mysterious, profound, surgeons, battle between light and darkness, secretive,
visionary, magnetic, tackle impossible tasks, determination, regeneration, arise to spiritual
challenge


text:
using System.Linq;
using System.Web.Mvc;
using System.Web.Routing;

namespace RestfulRouting.Filters
{
    public class RedirectFilterAttribute : ActionFilterAttribute
    {
        public override void OnActionExecuting(ActionExecutingContext filterContext)
        {
            if (filterContext.IsChildAction)
                return;

            var redirect = filterContext.RouteData.Route as RedirectRoute;
            if (redirect != null)
            {
                var helper = new UrlHelper(filterContext.RequestContext);
                var values = new RouteValueDictionary(filterContext.RequestContext.RouteData.Values);
                var merged = new RouteValueDictionary(redirect.DataTokens["new_path"] as RouteValueDictionary);

                // keep the values we specified, and add the other routeValues
                // that we we didn't have overrides for.
                foreach (var key in values.Keys.Where(key => !merged.ContainsKey(key)))
                    merged.Add(key, filterContext.RouteData.Values[key]);

                var url = helper.RouteUrl(filterContext.RouteData.Values);
                filterContext.Result = new RedirectResult(url, redirect.IsPermanent);
            }
        }
    }
}


text:
package lv.ctco.scm.mobile.utils;

import lv.ctco.scm.utils.exec.ExecCommand;
import lv.ctco.scm.utils.exec.ExecOutputStream;
import lv.ctco.scm.utils.exec.ExecResult;
import lv.ctco.scm.utils.exec.ExecUtil;
import lv.ctco.scm.utils.exec.FullOutputFilter;
import lv.ctco.scm.utils.exec.NullOutputFilter;

import java.io.File;

public final class NugetUtil {

    private NugetUtil() {}

    public static ExecResult restore(File projectFile) {
        ExecCommand command = new ExecCommand("nuget");
        command.addArgument("restore");
        command.addArgument(projectFile.getName());
        command.setWorkingDirectory(projectFile.getParentFile());
        return ExecUtil.executeCommand(command, new ExecOutputStream(new NullOutputFilter(), new FullOutputFilter()));
    }

}


text:
package net.tinyos.script.tree;

import java.io.*;
import java.util.*;

import java_cup.runtime.Symbol;
import net.tinyos.script.*;

public class Call extends Expression {
  private String name;
  private ParameterList list;
  private Symbol symbol;
  private boolean isStatement;

  public Call(int lineNumber, String name, ParameterList list, Symbol s) {
    super(lineNumber);
    this.name = name;
    this.list = list;
    this.symbol = s;
    this.isStatement = false;
  }

  public void setStatement(boolean isStatement) {
    this.isStatement = isStatement;
  }
  public boolean isStatement() {return isStatement;}

  public boolean hasReturnValue() {
    Function fn = FunctionSet.getFunction(name);
    return fn.hasReturnValue();
  }

  public void checkStatement(SymbolTable table) throws SemanticException {
    Function fn = FunctionSet.getFunction(name);

    if (fn == null) {
      throw new SemanticException("Function " + name + " does not exist", lineNumber());
    }

    Integer numParams = new Integer((String)fn.get("numParams"));
    if (numParams.intValue() != list.numParams()) {
      throw new SemanticException("" + symbol.value + ": Function parameter count mismatch: " + name + " expects " + fn.get("numParams") + ", was passed " + list.numParams(), lineNumber());
    }

    Boolean returnVal = new Boolean((String)fn.get("returnVal"));
    if (!returnVal.booleanValue() && !isStatement()) {
      // Expecting a return val but do not have one
      throw new SemanticException("" + symbol.value + ": Function has no return value, but exists in expression that expects one.");
    }

    Enumeration params = list.getParams();
    while(params.hasMoreElements()) {
      Expression e = (Expression)params.nextElement();
      e.setIsParam(true);
      e.checkStatement(table);
    }
  }

  public void generateCode(SymbolTable table, CodeWriter writer) throws IOException {
    Function fn = FunctionSet.getFunction(name);
    Enumeration params = list.getParams();
    while(params.hasMoreElements()) {
      Expression e = (Expression)params.nextElement();
      e.generateCode(table, writer);
    }
    writer.writeInstr((String)fn.get("opcode"));
  }

  public String toString () {
    return name + list;
  }
}


text:
package com.github.gunmetal313.ohdv1;

import org.junit.Assert;
import org.junit.Test;

import static org.junit.Assert.*;

public class JsonPeResultTest {

    @Test
    public void IsAllEqualsTest(){
        JsonPeResult result = new JsonPeResult();
        Assert.assertTrue(result.IsAllEquals());

        result.reportEquals("firstnode","secondNode");
        Assert.assertTrue(result.IsAllEquals());
        result.reportNotEquals("firstnode_2","secondNode");
        Assert.assertFalse(result.IsAllEquals());

    }

}


text:
<!doctype html>

    <meta charset="utf-8" />
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/foundicons/3.0.0/foundation-icons.css" integrity="sha256-CWltC/W+elkkUKhitcztPiSfE3AEpzAvrkmEqB68Lx0=" crossorigin="anonymous" />
    <title>About Me | Jonathan Sifuentes</title>
    <link rel="stylesheet" href="assets/css/app.css">

             <button class="menu-icon dark" type="button" data-toggle></button>
            Jonathan Sifuentes

Home

About

Showcase

Pricing

Contact

            <hgroup>

About Me

            </hgroup>

            <hgroup>

Introduction

            </hgroup>

            My name is Jonathan Sifuentes, and I've been coding for over
            half my life.  I'm from Las Vegas, born in 1986, and speak
            three-and-an-eighth languages.

            <hgroup>

Programming Experience

            </hgroup>

            I was first introduced to web design and, by extension,
            programming, in 1999, my eighth grade year of school, using HTML 4 and CSS.  It was so impactful
            that I decided to apply to A-TECH, a Las Vegas magnet high
            school that focuses on technology and its use.  There, I learned
            quite a few programming and scripting languages, including PHP, Perl, ActionScript,
            C++ and Java.

            Since high school, I have added to my arsenal: Ruby, JavaScript (including NodeJS and ES2015+), Python, LaTeX and, most
            recently, Haskell and Elixir.

            <hgroup>

Other Skills

            </hgroup>

                Even though I'm passionate about web design,
                I was originally passionate about game design.
                As such,
                I've picked up a bunch of quirky other skills,
                with varying application to web design.

I learned my way around Adobe Photoshop and Illustrator,
                        up to Creative Suite 5.5, in an effort to understand UI
                        design and texturing of 3D models.  I also picked up
                        working knowledges of color theory
                        and the Rule of
                            thirds.

I learned sound engineering from my church, and know how
                        to mix live shows without feedback, as well as capture
                        and edit recordings to be put to disc.

I've done 3D modeling in Blender, 3ds Max and Maya PLE,
                        and fully understand how hard hair is to
                        control in those environments.

                            Copyright © 2017 Jonathan Sifuentes.  All rights
                            reserved.

Made with the fantastic Foundation for
                             Sites 6.

                         See the source on GitHub
                             .


text:
/* LCM type definition class file
 * This file was automatically generated by lcm-gen
 * DO NOT MODIFY BY HAND!!!!
 */

using System;
using System.Collections.Generic;
using System.IO;
using LCM.LCM;

namespace forseti2
{
    public sealed class score_state : LCM.LCM.LCMEncodable
    {
        public forseti2.header header;
        public byte blue_total;
        public byte gold_total;
        public byte blue_autonomous_points;
        public byte gold_autonomous_points;
        public byte blue_normal_points;
        public byte gold_normal_points;
        public byte blue_permanent_points;
        public byte gold_permanent_points;
        public byte blue_penalty;
        public byte gold_penalty;
        public byte bonus_possession;
        public byte bonus_points;
        public byte bonus_time_remaining;

        public score_state()
        {
        }

        public static readonly ulong LCM_FINGERPRINT;
        public static readonly ulong LCM_FINGERPRINT_BASE = 0x4b09fcdd281b73b1L;

        public const int BLUE = 1;
        public const int GOLD = 2;
        public const int NEUTRAL = 4;

        static score_state()
        {
            LCM_FINGERPRINT = _hashRecursive(new List<String>());
        }

        public static ulong _hashRecursive(List<String> classes)
        {
            if (classes.Contains("forseti2.score_state"))
                return 0L;

            classes.Add("forseti2.score_state");
            ulong hash = LCM_FINGERPRINT_BASE
                 + forseti2.header._hashRecursive(classes)
                ;
            classes.RemoveAt(classes.Count - 1);
            return (hash<<1) + ((hash>>63)&1);
        }

        public void Encode(LCMDataOutputStream outs)
        {
            outs.Write((long) LCM_FINGERPRINT);
            _encodeRecursive(outs);
        }

        public void _encodeRecursive(LCMDataOutputStream outs)
        {
            this.header._encodeRecursive(outs);

            outs.Write(this.blue_total);

            outs.Write(this.gold_total);

            outs.Write(this.blue_autonomous_points);

            outs.Write(this.gold_autonomous_points);

            outs.Write(this.blue_normal_points);

            outs.Write(this.gold_normal_points);

            outs.Write(this.blue_permanent_points);

            outs.Write(this.gold_permanent_points);

            outs.Write(this.blue_penalty);

            outs.Write(this.gold_penalty);

            outs.Write(this.bonus_possession);

            outs.Write(this.bonus_points);

            outs.Write(this.bonus_time_remaining);

        }

        public score_state(byte[] data) : this(new LCMDataInputStream(data))
        {
        }

        public score_state(LCMDataInputStream ins)
        {
            if ((ulong) ins.ReadInt64() != LCM_FINGERPRINT)
                throw new System.IO.IOException("LCM Decode error: bad fingerprint");

            _decodeRecursive(ins);
        }

        public static forseti2.score_state _decodeRecursiveFactory(LCMDataInputStream ins)
        {
            forseti2.score_state o = new forseti2.score_state();
            o._decodeRecursive(ins);
            return o;
        }

        public void _decodeRecursive(LCMDataInputStream ins)
        {
            this.header = forseti2.header._decodeRecursiveFactory(ins);

            this.blue_total = ins.ReadByte();

            this.gold_total = ins.ReadByte();

            this.blue_autonomous_points = ins.ReadByte();

            this.gold_autonomous_points = ins.ReadByte();

            this.blue_normal_points = ins.ReadByte();

            this.gold_normal_points = ins.ReadByte();

            this.blue_permanent_points = ins.ReadByte();

            this.gold_permanent_points = ins.ReadByte();

            this.blue_penalty = ins.ReadByte();

            this.gold_penalty = ins.ReadByte();

            this.bonus_possession = ins.ReadByte();

            this.bonus_points = ins.ReadByte();

            this.bonus_time_remaining = ins.ReadByte();

        }

        public forseti2.score_state Copy()
        {
            forseti2.score_state outobj = new forseti2.score_state();
            outobj.header = this.header.Copy();

            outobj.blue_total = this.blue_total;

            outobj.gold_total = this.gold_total;

            outobj.blue_autonomous_points = this.blue_autonomous_points;

            outobj.gold_autonomous_points = this.gold_autonomous_points;

            outobj.blue_normal_points = this.blue_normal_points;

            outobj.gold_normal_points = this.gold_normal_points;

            outobj.blue_permanent_points = this.blue_permanent_points;

            outobj.gold_permanent_points = this.gold_permanent_points;

            outobj.blue_penalty = this.blue_penalty;

            outobj.gold_penalty = this.gold_penalty;

            outobj.bonus_possession = this.bonus_possession;

            outobj.bonus_points = this.bonus_points;

            outobj.bonus_time_remaining = this.bonus_time_remaining;

            return outobj;
        }
    }
}


text:
@interface ViewController ()

-(void)_didChangeLanguage:(NSNotification*)notif;

@end

@implementation ViewController

- (void)viewDidLoad
{
    [super viewDidLoad];

    // add observer
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_didChangeLanguage:) name:GGLOCALIZATIONSYSTEM_LANGUAGE_DID_CHANGE object:nil];
    // set english language
    [[GGLocalizationSystem sharedLocalSystem] setLanguage:@"en"];
}

-(void)_didChangeLanguage:(NSNotification*)notif
{
    // get current language
    NSLog(@"Current language: %@",[[GGLocalizationSystem sharedLocalSystem] getLanguage]);
    // print hello world
    NSLog( @"%@",GGLocalizeString(@"hello_world") );
    NSLog( @"%@",GGLocalizeStringForInterfaceWithName(@"CKg-nV-n2I.normalTitle", @"Main"));

    _labelOutlet.text = GGLocalizeStringForInterfaceWithName(@"Ihn-UL-YDZ.text", @"Main");

    // translate the french button
    NSString *translatedString = GGLocalizeStringForInterfaceWithName(@"CKg-nV-n2I.normalTitle", @"Main");
    [_buttonOutlet setTitle:translatedString forState:UIControlStateNormal];

    // translate the english button
    translatedString = GGLocalizeStringForInterfaceWithName(@"ebn-n0-btk.normalTitle", @"Main");
    [_englishButton setTitle:translatedString forState:UIControlStateNormal];

    // data
    NSString* path = [[[GGLocalizationSystem sharedLocalSystem] bundle] pathForResource:@"myFile" ofType:@"plist"];
    NSMutableDictionary *dict = [[NSMutableDictionary alloc] initWithContentsOfFile:path];
    NSLog(@"dict:%@",dict);
}

- (IBAction)switchLanguage:(id)sender {
    [[GGLocalizationSystem sharedLocalSystem] setLanguage:@"fr"];

}
- (IBAction)activateEnglishLanguage:(id)sender {
    [[GGLocalizationSystem sharedLocalSystem] setLanguage:@"en"];
}
@end


text:
export default class AmdDependencyResolver {
  resolve({failedModules, pendingModules, modules}) {

    for(let i = 0; i < pendingModules.length; i++){
      const module = pendingModules[i];

      if(this.hasMetDependencies(module, modules)) {
        pendingModules.splice(i, 1);

        try {
          const exports = module.factory(...this.getDependencies(module, modules));
          if(exports)
            module.exports = exports;

          Object.freeze(module.exports);
          modules.push(module);
        } catch(exception) {
          failedModules.push(module);
          console.error(`Failed to load module ${module.id}`, exception);
        }

        i = -1;
      }
    }
  }

  getDefaultDependency(dependency, module) {
    switch(dependency) {
      case 'exports':
        return module.exports;
    }
  }

  dependencyToModule(module , modules) {
    return (dep => this.getDefaultDependency(dep, module) || modules.find(module => dep === module.id));
  }

  getDependencies(module, modules) {
    return module.dependencies.map(this.dependencyToModule(module, modules));
  }

  hasMetDependencies(module, modules) {
    return module.dependencies.every(this.dependencyToModule(module, modules));
  }
}


text:
<?php

    /*
    Module: Bookmarks
    File: /modules/bookmarks/bookmarks.php
    Developer: Indy
    */

    include "modules/module.php";

    function UserRegistration_Bookmarks() {
        global $bookmarkfolders;
        global $user;
        global $users;

        $userid = $user->Id();
        $userip = UserIp();
        $fdate = NowDate();

        $sql = "INSERT INTO `$bookmarkfolders`
                    ( `bfolder_id` , `bfolder_name` , `bfolder_userid` , `bfolder_parid`, `bfolder_ip` , `bfolder_date` )
                    VALUES( '' , 'root' , '$userid', '0' , '$userip', '$fdate' );";
        bcsql_query( $sql );

        $rootfolderid = bcsql_insert_id();

        $sql = "UPDATE `$users`
                SET `user_bookmarksrootfolderid`='$rootfolderid'
                WHERE `user_id`='$userid' LIMIT 1;";
        bcsql_query( $sql );
    }

    function CreateBookmark( $PostId, $Label ) { //$FolderId should be added on tree structure implementation

        global $bookmarks;
        global $user;

        $FolderId = $user->BookmarksRootFolderId();
        $nowdate = NowDate();
        $userip = UserIp();
        $userid = $user->Id();
        $Label = bcsql_escape( $Label );
        $query = "INSERT INTO `$bookmarks` ( `bookmark_id` , `bookmark_postid` , `bookmark_folderid` , `bookmark_label` , `bookmark_date` , `bookmark_ip` , `bookmark_userid` ) VALUES ( '' , '$PostId' , '$folderid' , '$Label' , '$nowdate' , '$userip' , '$userid' );";
        bcsql_query( $query );
        return bcsql_insert_id();
    }

    function IsBookmarked( $PostId ) {
        global $bookmarks;
        global $user;

        $userid = $user->Id();

        $query = bcsql_query("SELECT
                    *
                FROM
                    `$bookmarks`
                WHERE
                    `bookmark_postid` = '$PostId' AND
                    `bookmark_userid` = '$userid'
                LIMIT
                    1");
        if ( bcsql_num_rows($query) != 1 ) {
            return false;
        }
        return true;
    }

    class Bookmark {

        private $mId;
        private $mUserId;
        private $mLabel;
        private $mPostId;
        private $mFolderId;
        private $mDate;
        private $mIp;

        public function Bookmark( $Construct ) {

            global $bookmarks;

            if ( !is_array( $Construct ) ) {
                $BookmarkId = $Construct;
                $query = "SELECT * FROM `$bookmarks` WHERE `bookmark_id` = '$BookmarkId' LIMIT 1;";
                $sqlr = bcsql_query( $query );
                $bookmark_details = bcsql_fetch_array( $sqlr );
            }
            else
                $bookmark_details = $Construct;
            $this->mUserId = $bookmark_details[ "bookmark_userid" ];
            $this->mLabel = $bookmark_details[ "bookmark_label" ];
            $this->mPostId = $bookmark_details[ "bookmark_postid" ];
            $this->mFolderId = $bookmark_details[ "bookmark_folderid" ];
            $this->mId = $bookmark_details[ "bookmark_id" ];
            $this->mIp = $bookmark_details[ "bookmark_ip" ];
            $this->mDate = $bookmark_details[ "bookmark_date" ];

        }

        public function DeleteBookmark() {

            global $bookmarks;

            $Id = $this->mId;
            $query = "DELETE FROM `$bookmarks` WHERE `bookmark_id` = '$Id' LIMIT 1;";
            bcsql_query( $query );

        }

        public function MoveBookmark( $NewFolderId ) {

            global $bookmarks;

            $Id = $this->mId;
            $query = "UPDATE `$bookmarks` SET `bookmark_folderid` = '$NewFolderId' WHERE `bookmark_id` = '$Id' LIMIT 1;";
            bcsql_query( $query );
            $this->mFolderId = $NewFolderId;
        }

        public function ChangeLabel( $NewLabel ) {

            global $bookmarks;

            $this->mLabel = $NewLabel;
            $NewLabel = bcsql_escape( $NewLabel );
            $Id = $this->mId;
            $query = "UPDATE `$bookmarks` SET `bookmark_label` = '$NewLabel' WHERE `bookmark_id` = '$Id' LIMIT 1;";
            bcsql_query( $query );
        }

        public function Id() {
            return $this->mId;
        }

        public function UserId() {
            return $this->mUserId;
        }

        public function Label() {
            return $this->mLabel;
        }

        public function PostId() {
            return $this->mPostId;
        }

        public function Date() {
            return $this->mDate;
        }

        public function FolderId() {
            return $this->mFolderId;
        }

        public function Ip() {
            return $this->mIp;
        }

    }

    function CreateBookmarkFolder( $ParId = 0 , $Name ) {

        global $bookmarkfolders;
        global $user;

        $UserId = $user->Id();
        $UserIp = UserIp();
        $NowDate = NowDate();
        $Name = bcsql_escape( $Name );
        $query = "INSERT INTO `$bookmarkfolders` ( `bfolder_id` , `bfolder_name` , `bfolder_userid` , `bfolder_parid` , `bfolder_ip` , `bfolder_date` ) VALUES ( '' , '$Name' , '$UserId' , '$ParId' , '$UseIp' , '$NowDate' );";
        bcsql_query( $query );
        return bcsql_insert_id();
    }

    class BookmarkFolder {

        private $mUserid;
        private $mParid;
        private $mId;
        private $mName;
        private $mIp;
        private $mDate;

        public function UserId() {
            return $this->mUserId;
        }

        public function Parid() {
            return $this->mParid;
        }

        public function Id() {
            return $this->mId;
        }

        public function Name() {
            return $this->mName;
        }

        public function Ip() {
            return $this->mIp;
        }

        public function Date() {
            return $this->mDate;
        }

        public function BookmarkFolder( $construct ) {

            global $bookmarkfolders;

            if ( !is_array( $construct ) ) {
                $BookmarkFolderId = $construct;
                $query = "SELECT * FROM `$bookmarkfolders` WHERE `bfolder_id` = `$BookmarkFolderId` LIMIT 1;";
                $sqlr = bcsql_query( $query );
                $bfolder_details = bcsql_fetch_array( $sqlr );
            }
            else {
                $bfolder_details = $construct;
            }
            $this->mUserId = $bfolder_details[ "bfolder_userid" ];
            $this->mParId = $bfolder_details[ "bfolder_parid" ];
            $this->mId = $bfolder_details[ "bfolder_id" ];
            $this->mName = $bfolder_details[ "bfolder_name" ];
            $this->mIp = $bfolder_details[ "bfolder_ip" ];
            $this->mDate = $bfolder_details[ "bfolder_date" ];

        }

        public function DeleteFolder() {

            global $bookmarks;
            global $bookmarkfolders;

            $Id = $this->mId;
            $query = "DELETE FROM `$bookmarkfolders` WHERE `bfolder_id` = '$Id' LIMIT 1;";
            bcsql_query( $query );
            $query = "SELECT * FROM `$bookmarkfolders` WHERE `bfolder_parid` = '$Id';";
            $sqlr = bcsql_query( $query );
            if ( bcsql_num_rows( $sqlr ) ) {
                while( $sqlbf = bcsql_fetch_array( $sqlr ) ) {
                    $subbf = New BookmarkFolder( $sqlbf );
                    $subbf->DeleteFolder();
                }
            }
            $query = "DELETE FROM `$bookmarks` WHERE `bookmarks_folderid` = '$Id';";
            bcsql_query( $query );
            $this->mId = 0;
            $this->mName = "";
            $this->mParentId = 0;

        }

        public function MoveFolder( $NewParId ) {

            global $bookmarkfolders;

            $Id = $this->Id;
            $query = "UPDATE `$bookmarkfolders` SET `bfolder_parid` = '$NewParId' WHERE `bfolder_id` = '$Id' LIMIT 1;";
            bcsql_query( $query );
            $this->ParId = $NewParId;

        }

        public function ChangeName( $NewName ) {

            global $bookmarkfolders;

            $this->mName = $NewName;
            $NewName = bcsql_escape( $NewName );
            $Id = $this->Id;
            $query = "UPDATE `$bookmarkfolders` SET `bfolder_name` = '$NewName' WHERE `bfolder_id` = '$Id' LIMIT 1";
            bcsql_query( $query );
        }

    }

    function GetAllBookmarks( $CurrentUserId = 0 ) {

        global $bookmarks;
        global $user;

        if ( $CurrentUserId === 0 )
            $CurrentUserId = $user->Id();
        if ( !ValidId( $CurrentUserId ) ) {
            return false;
        }
        $BookmarkList = Array();
        $Query = "
                SELECT
                    *
                FROM
                    `$bookmarks`
                WHERE
                    `bookmark_userid` = $CurrentUserId;";
        $Sqlr = bcsql_query( $Query );
        while ($BookmarkDetails = bcsql_fetch_array($Sqlr)) {
            $BookmarkList[] = New Bookmark( $BookmarkDetails );
        }
        return $BookmarkList;

    }

    function GetBookmarkByPostId( $PostId ) {
        global $bookmarks;
        global $user;

        $userid = $user->Id();

        $Query = "SELECT
                    *
                FROM
                    `$bookmarks`
                WHERE
                    `bookmark_userid` = '$userid' AND
                    `bookmark_postid` = '$PostId'
                LIMIT 1
                ";
        $result = bcsql_query($Query);
        $curbookmark = New Bookmark(bcsql_fetch_array($result));
        return $curbookmark;
    }
?>


text:
body, div, iframe, ul, ol, dl, dt, dd, h1, h2, h3, h4, h5, h6, p, pre, table, th, td,
form, input, button, select, textarea {margin: 0;padding: 0;font-weight: normal;font-style: normal;font-size: 100%;font-family: inherit;}
ol, ul {list-style: none;}
img {border: 0;}
a:link,a:visited {color:#666;text-decoration:none;}
a:hover {color:#c00;text-decoration:underline;}
body {font-size:12px;color:#666;font-family:arial, sans-serif;background:#fff}
div,form,img,ul,ol,li,dl,dt,dd {margin: 0; padding: 0; border:0; }
h1,h2,h3,h4,h5,h6 {margin:0; padding:0; font-size:12px; font-weight:normal;}
table,td,tr,th{font-size:12px;}
li{list-style-type:none;}
img{vertical-align:top;}
.cr {clear:both;height:0px;overflow:hidden;}
.fl {float:left;}
.fr {float:right;}
.mt15 {margin-top:15px;}
.mt8 {margin-top:8px;}
.ins {display:none}

#header {background:url(headbg.png) repeat-x;height:178px;width:100%;z-index:8;position:relative;overflow:hidden}
.top{background:url(topbg.jpg) no-repeat;height:92px;}
.top .login {margin:50px 20px 0 0;float:right;font-size:14px;color:#fff;font-weight:bold}
.top .login a,.top .login a:visited {color:#fff;}
.top .login a:hover {color:#ff0}
.top .login b {color:#f60}
.top .login {
margin: 53px 20px 0 0;
float: right;
font-size: 12px;
color: #fff;
}
.top .login li {
float: left;
padding: 5px;
line-height: 12px;
}

/* 公供 */
a.logo,a.logo:visited {float:left;width:556px;display:block;line-height:240px;height:80px;overflow:hidden;margin-top:10px}
.tm {line-height:29px;height:29px;padding:7px 0 7px 10px;clear:both;}
.tm li {float:left;font-size:14px;width:85px;height:29px;line-height:29px;font-weight:bold;margin-left:12px;display:inline;text-align:center}
.tm li a,.tm li a:visited {color:#fff;display:block;}
.tm li.curr ,.tm li a:hover {background:url(menuh.png) no-repeat; text-decoration:none;color:#fff}
.topnav {line-height:35px;height:35px;padding-bottom:9px;overflow:hidden;clear:both;}
.topnav p {float:left}
.topnav p a,.topnav p a:visited {color:#888;margin-left:10px;background:url(topnav.gif) no-repeat;padding-left:24px}
.topnav #togglemenu {}
.topnav #allmenu { background-position:0 -26px;padding-left:20px}
.topnav .action {float:left;padding-left:30px;}
.topnav .fr a,.topnav .fr a:visited {color:#4A4A4A;margin:0 6px;}
.tico {display:block;width:15px;line-height:9px;height:9px;overflow:hidden;background:url(tico.png) no-repeat; position:absolute;top:169px;left:198px;}
#footer {padding:8px 0 0;height:20px;line-height:20px;color:#fff;background:url(footbg.png) repeat-x;width:100%; position:relative}
#footer .tico {top:0;background-position:0 -10px}
#footer p {line-height:20px; font-family:Arial, Helvetica, sans-serif;}
#footer .fl {height:20px;background:url(footlogo.jpg) no-repeat;padding-left:200px;}
#footer .fl a,#footer .fl a:visited {margin:0 3px}
#footer .fr {padding-right:20px;}
#footer a,#footer a:visited {color:#fff}
#footer a:hover {color:#ff0}

#content { position:relative;heigsht:100%;}
body.showmenu #frmTitle {display:block;}
body.hidemenu #frmTitle{display:none;}

#frmTitle {background:url(leftbg.png) repeat-y right 100%;padding:0 12px 0 0px;border-right:1px solid #A7A7A5}

.mbox {widtH:168px;background:url(mbox.jpg) repeat-y -168px 100%;margin:4px auto 0}
.mbox h3 {height:34px;line-height:34px;text-align:center;background:url(mbox.jpg) no-repeat;color:#fff;font-size:14px;font-weight:bold;padding-bottom:12px;}
.mbox .m_b {background:url(mbox.jpg) no-repeat -336px 0 ;height:30px;overflow:hidden}
.mbox ul {margin:10px auto;width:154px;height:100%;overflow:hidden}
.mbox ul li {float:left;width:154px;height:32px;line-height:32px;overflow:hidden;text-align:center;font-weight:bold;}
.mbox ul li a,.mbox ul li a:visited {color:#4A4A4A;display:block}
.mbox ul li a:hover {background:url(mboxh.jpg) no-repeat; text-decoration:none;}


text:
namespace policy {
class PolicyOAuth2TokenFetcher;
}

namespace chromeos {

// WebUIMessageHandler implementation which handles events occurring on the
// page, such as the user pressing the signin button.
class EnrollmentScreenHandler
    : public BaseScreenHandler,
      public EnrollmentScreenActor,
      public BrowsingDataRemover::Observer {
 public:
  EnrollmentScreenHandler();
  virtual ~EnrollmentScreenHandler();

  // Implements WebUIMessageHandler:
  virtual void RegisterMessages() OVERRIDE;

  // Implements EnrollmentScreenActor:
  virtual void SetParameters(Controller* controller,
                             bool is_auto_enrollment,
                             bool can_exit_enrollment,
                             const std::string& user) OVERRIDE;
  virtual void PrepareToShow() OVERRIDE;
  virtual void Show() OVERRIDE;
  virtual void Hide() OVERRIDE;
  virtual void FetchOAuthToken() OVERRIDE;
  virtual void ResetAuth(const base::Closure& callback) OVERRIDE;
  virtual void ShowSigninScreen() OVERRIDE;
  virtual void ShowEnrollmentSpinnerScreen() OVERRIDE;
  virtual void ShowLoginSpinnerScreen() OVERRIDE;
  virtual void ShowAuthError(const GoogleServiceAuthError& error) OVERRIDE;
  virtual void ShowEnrollmentStatus(policy::EnrollmentStatus status) OVERRIDE;
  virtual void ShowUIError(UIError error_code) OVERRIDE;

  // Implements BaseScreenHandler:
  virtual void Initialize() OVERRIDE;
  virtual void DeclareLocalizedValues(LocalizedValuesBuilder* builder) OVERRIDE;

  // Implements BrowsingDataRemover::Observer:
  virtual void OnBrowsingDataRemoverDone() OVERRIDE;

 private:
  // Handlers for WebUI messages.
  void HandleClose(const std::string& reason);
  void HandleCompleteLogin(const std::string& user);
  void HandleRetry();

  // Shows a given enrollment step.
  void ShowStep(const char* step);

  // Display the given i18n resource as error message.
  void ShowError(int message_id, bool retry);

  // Display the given string as error message.
  void ShowErrorMessage(const std::string& message, bool retry);

  // Display the given i18n string as a progress message.
  void ShowWorking(int message_id);

  // Handles completion of the OAuth2 token fetch attempt.
  void OnTokenFetched(const std::string& token,
                      const GoogleServiceAuthError& error);

  // Shows the screen.
  void DoShow();

  // Keeps the controller for this actor.
  Controller* controller_;

  bool show_on_init_;

  // Whether this is an auto-enrollment screen.
  bool is_auto_enrollment_;

  // True of we can exit enrollment and return back to the regular login flow.
  bool can_exit_enrollment_;

  // Whether an enrollment attempt has failed.
  bool enrollment_failed_once_;

  // Username of the user signing in.
  std::string user_;

  // This intentionally lives here and not in the controller, since it needs to
  // execute requests in the context of the profile that displays the webui.
  scoped_ptr<policy::PolicyOAuth2TokenFetcher> oauth_fetcher_;

  // The browsing data remover instance currently active, if any.
  BrowsingDataRemover* browsing_data_remover_;

  // The callbacks to invoke after browsing data has been cleared.
  std::vector<base::Closure> auth_reset_callbacks_;

  DISALLOW_COPY_AND_ASSIGN(EnrollmentScreenHandler);
};

}  // namespace chromeos

#endif  // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_ENROLLMENT_SCREEN_HANDLER_H_


text:
package com.halle.facade;

import javax.ejb.Local;

import com.halle.exception.ApplicationException;
import com.halle.model.SecurityToken;

@Local
public interface SecurityTokenFacade {

	SecurityToken createToken(final SecurityToken securityToken) throws ApplicationException;

	SecurityToken validAccess(final String token) throws ApplicationException;

	void removeToken(final String token) throws ApplicationException;

}


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    app:layout_behavior="@string/appbar_scrolling_view_behavior"
    tools:context="weather.manish.com.weatherforecast.MapActivity"
    tools:showIn="@layout/activity_map">

    <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/ForecastMap"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />
</RelativeLayout>