text:
package in.twizmwaz.cardinal.command;

import com.sk89q.minecraft.util.commands.Command;
import com.sk89q.minecraft.util.commands.CommandContext;
import com.sk89q.minecraft.util.commands.CommandException;
import in.twizmwaz.cardinal.Cardinal;
import in.twizmwaz.cardinal.GameHandler;
import in.twizmwaz.cardinal.chat.ChatConstant;
import in.twizmwaz.cardinal.chat.LocalizedChatMessage;
import in.twizmwaz.cardinal.match.Match;
import in.twizmwaz.cardinal.match.MatchState;
import in.twizmwaz.cardinal.module.GameObjective;
import in.twizmwaz.cardinal.module.modules.hill.HillObjective;
import in.twizmwaz.cardinal.module.modules.matchTimer.MatchTimer;
import in.twizmwaz.cardinal.module.modules.score.ScoreModule;
import in.twizmwaz.cardinal.module.modules.team.TeamModule;
import in.twizmwaz.cardinal.module.modules.timeLimit.TimeLimit;
import in.twizmwaz.cardinal.util.ChatUtils;
import in.twizmwaz.cardinal.util.ScoreboardUtils;
import in.twizmwaz.cardinal.util.StringUtils;
import in.twizmwaz.cardinal.util.TeamUtils;
import org.apache.commons.lang.WordUtils;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;

public class MatchCommand {

    @Command(aliases = {"matchinfo", "match"}, desc = "Shows information about the currently playing match.", usage = "")
    public static void match(final CommandContext args, CommandSender sender) throws CommandException {
        sender.sendMessage(ChatColor.RED + "" + ChatColor.STRIKETHROUGH + "------" + ChatColor.DARK_AQUA + " " + new LocalizedChatMessage(ChatConstant.UI_MATCH_INFO).getMessage(ChatUtils.getLocale(sender)) + " " + ChatColor.GRAY + "(" + GameHandler.getGameHandler().getMatch().getNumber() + ")" + ChatColor.RED + " " + ChatColor.STRIKETHROUGH + "------");
        sender.sendMessage(ChatColor.DARK_PURPLE + new LocalizedChatMessage(ChatConstant.UI_TIME).getMessage(ChatUtils.getLocale(sender)) + ": " + ChatColor.GOLD + (Cardinal.getInstance().getConfig().getBoolean("matchTimeMillis") ? StringUtils.formatTimeWithMillis(MatchTimer.getTimeInSeconds()) : StringUtils.formatTime(MatchTimer.getTimeInSeconds())));
        String teams = "";
        boolean hasObjectives = false;
        for (TeamModule team : TeamUtils.getTeams()) {
            int players = 0;
            for (Player player : Bukkit.getOnlinePlayers()) {
                if (TeamUtils.getTeamByPlayer(player) != null) {
                    if (TeamUtils.getTeamByPlayer(player) == team) {
                        players++;
                    }
                }
            }
            teams += team.getCompleteName() + ChatColor.GRAY + ": " + ChatColor.RESET + players + (team.isObserver() ? "" : ChatColor.GRAY + "/" + team.getMax() + ChatColor.AQUA + " | ");
            if (TeamUtils.getShownObjectives(team).size() > 0) hasObjectives = true;
        }
        if (ScoreboardUtils.getHills().size() > 0) hasObjectives = true;
        sender.sendMessage(teams);
        Match match = GameHandler.getGameHandler().getMatch();
        if (match.isRunning() || match.getState().equals(MatchState.ENDED) || match.getState().equals(MatchState.CYCLING)) {
            if (hasObjectives) {
                sender.sendMessage(ChatColor.RED + "---- " + new LocalizedChatMessage(ChatConstant.UI_GOALS).getMessage(ChatUtils.getLocale(sender)) + " ----");
                for (TeamModule team : TeamUtils.getTeams()) {
                    if (!team.isObserver()) {
                        if (TeamUtils.getShownObjectives(team).size() > 0 || ScoreboardUtils.getHills().size() > 0) {
                            String objectives = "";
                            for (GameObjective objective : TeamUtils.getShownObjectives(team)) {
                                objectives += (objective.isComplete() ? ChatColor.GREEN : ChatColor.DARK_RED) + WordUtils.capitalizeFully(objective.getName().replaceAll("_", " ")) + "  ";
                            }
                            for (HillObjective hill : ScoreboardUtils.getHills()) {
                                if (hill.getTeam() != null) {
                                    if (hill.getTeam() == team) {
                                        objectives += ChatColor.GREEN + WordUtils.capitalizeFully(hill.getName().replaceAll("_", " ") + "  ");
                                        break;
                                    }
                                }
                                objectives += ChatColor.DARK_RED + WordUtils.capitalizeFully(hill.getName().replaceAll("_", " ") + "  ");
                            }
                            objectives = objectives.trim();
                            sender.sendMessage(team.getCompleteName() + ChatColor.GRAY + ": " + objectives);
                        }
                    }
                }
            }
            if (ScoreModule.matchHasScoring()) {
                String score = "";
                for (ScoreModule scoreModule : GameHandler.getGameHandler().getMatch().getModules().getModules(ScoreModule.class)) {
                    score += scoreModule.getTeam().getColor() + "" + scoreModule.getScore() + " ";
                }
                score = score.trim();
                double timeRemaining;
                if (TimeLimit.getMatchTimeLimit() != 0) {
                    timeRemaining = TimeLimit.getMatchTimeLimit() - MatchTimer.getTimeInSeconds();
                    sender.sendMessage(ChatColor.DARK_AQUA + "Score: " + score + (TimeLimit.getMatchTimeLimit() != 0 ? ChatColor.RED + "  " + StringUtils.formatTime(timeRemaining) : "") + (ScoreModule.matchHasMax() ? ChatColor.GRAY + "  [" + ScoreModule.max() + "]" : ""));
                }
            }
        }
    }

}


text:
<textarea style='display:none' id='top'>
@var title = "Programming Erlang 2'nd edition"
@var tags = "programming, erlang, book"

<img src="../images/jaerlang2_small.jpg" width="400">

I'm pleased to announce the 2'nd edition of Programming Erlang has been
handed over to Pragmatic Press for the final stages of copy editing.

I have been working on this for over a year and it's finally over.

The book should be available to buy as a PDF around the 10 April from
the Pragmatic Web site.

The book will come out as a ``beta'' - this means it comes out when it is
almost ready. All the chapters are not yet written, but enough to warrant publishing.

After it comes out as a beta, you can read it, report bugs and suggest
and request changes and this process will continue for a few months
until we freeze the text and print paper copies of the book.

The 2'nd edition has several totally new chapters, and all the text
has been revised.

* What's new in the 2'nd edition

+ Exercises after virtually all chapters
+ New chapter on websockets
+ New chapter with description of maps
+ New chapter on types and the Dialyzer
+ Very much rewritten chapter on handling errors in concurrent programs
+ New chapter with programming idioms
+ New chapter on rebar, sharing code via github and cowboy
+ New chapter with a simple execution environment - a minimal (7 module) Erlang system

I've also removed the appendices with man pages in them, and moved
some material off-book into on-line version on github. This is for
things that change more rapidly than the printed version of the book
can keep up with.
</textarea>
<script src='../src/post_template.js'></script>
<script src='../src/expander.js'></script>

redpajama_set_name: RedPajamaGithub


text:
import io
import os
import unittest

from atcodertools.client.models.contest import Contest
from atcodertools.client.models.problem import Problem
from atcodertools.tools.codegen import main, get_problem_from_url

RESOURCE_DIR = os.path.join(
    os.path.dirname(os.path.abspath(__file__)),
    "./resources/test_codegen_command/")
TEMPLATE_PATH = os.path.join(RESOURCE_DIR, "template_jinja.cpp")

class TestCodeGenCommand(unittest.TestCase):

    def test_generate_code(self):
        config_path = os.path.join(RESOURCE_DIR, "test_codegen_command.toml")
        answer_file_path = os.path.join(RESOURCE_DIR, "generated_code.cpp")
        f1 = io.StringIO()

        main(
            "",
            ["https://atcoder.jp/contests/abc012/tasks/abc012_4",
             "--template", TEMPLATE_PATH,
             "--lang", "cpp",
             "--without-login",
             '--config', config_path
             ],
            output_file=f1
        )

        with open(answer_file_path) as f2:
            self.assertEqual(f1.getvalue(), f2.read())

    def test_url_parser(self):
        problem = Problem(Contest("utpc2014"), "Z", "utpc2014_k")
        urls = [
            "http://utpc2014.contest.atcoder.jp/tasks/utpc2014_k",
            "http://beta.atcoder.jp/contests/utpc2014/tasks/utpc2014_k",
            "http://atcoder.jp/contests/utpc2014/tasks/utpc2014_k",
            "https://utpc2014.contest.atcoder.jp/tasks/utpc2014_k",
            "https://beta.atcoder.jp/contests/utpc2014/tasks/utpc2014_k",
            "https://atcoder.jp/contests/utpc2014/tasks/utpc2014_k",
            "https://atcoder.jp/contests/utpc2014/tasks/utpc2014_k?lang=en",
            "https://atcoder.jp/contests/utpc2014/tasks/utpc2014_k/?lang=en",
        ]

        for url in urls:
            self.assertEqual(
                get_problem_from_url(url).to_dict(), problem.to_dict())

if __name__ == '__main__':
    unittest.main()


text:
sudo dfu-programmer atmega16u2 erase
sudo dfu-programmer atmega16u2 flash --debug 1 my_original_firmware_clone_R3.hex
sudo dfu-programmer atmega16u2 reset


text:
using System;
using System.Threading.Tasks;
using System.Drawing;
using System.Collections.Generic;

using MonoTouch.UIKit;
using MonoTouch.Dialog;

namespace iOS.WebServiceExample.iPhoneApp
{
    public class MyViewController : UIViewController
    {
        UIButton buttonGetCerts, buttonClasses, buttonUploadNewClass;
        float buttonWidth = 200;
        float buttonHeight = 50;
        string url = "http://192.168.5.201"; // Make sure to add your own IP so that your iOS device can reach the Web API.

        public MyViewController()
        {
        }

        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            View.Frame = UIScreen.MainScreen.Bounds;
            View.BackgroundColor = UIColor.White;
            View.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;

            #region Certificates button

            // Setup button UI
            buttonGetCerts = UIButton.FromType(UIButtonType.RoundedRect);
            buttonGetCerts.Frame = new RectangleF(
                View.Frame.Width / 2 - buttonWidth / 2,
                200,
                buttonWidth,
                buttonHeight);
            buttonGetCerts.SetTitle("Get certificates", UIControlState.Normal);

            // Handle button touch
            buttonGetCerts.TouchUpInside += async (object sender, EventArgs e) =>
            {
                // Call API and get certificates from web api
                var certs = await new Api(url).GetCertificatesAsync();

                // Process certificates & display alert
                if (certs != null)
                {
                    string message = "";

                    foreach (var cert in certs)
                        message += cert.Name + ";\r";

                    Alert("Xamarin Certificates", message);
                }
            };
            buttonGetCerts.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleTopMargin | UIViewAutoresizing.FlexibleBottomMargin;
            View.AddSubview(buttonGetCerts);
            #endregion

            #region Class button

            // Setup button UI
            buttonClasses = UIButton.FromType(UIButtonType.RoundedRect);
            buttonClasses.Frame = new RectangleF(
                View.Frame.Width / 2 - buttonWidth / 2,
                buttonGetCerts.Frame.Y + buttonHeight,
                buttonWidth,
                buttonHeight);
            buttonClasses.SetTitle("Get classes", UIControlState.Normal);

            // Handle button touch
            buttonClasses.TouchUpInside += (object sender, EventArgs e) =>
            {
                // Prepate action sheet
                var actionSheet = new UIActionSheet("Select class type");

                // Add button for each class type
                foreach (var typ in Enum.GetNames(typeof(Common.Model.ClassType)))
		            actionSheet.AddButton(typ);

                // Handle sheet clicked
                actionSheet.Clicked += async delegate(object sender2, UIButtonEventArgs e2){

                    // Make sure user didn't dismiss action sheet
                    if (e2.ButtonIndex != -1)
                    {
                        // Get selected type
                        var title = ((UIActionSheet)sender2).ButtonTitle(e2.ButtonIndex);
                        var selectedClassType = (Common.Model.ClassType)Enum.Parse(typeof(Common.Model.ClassType), title, true);

                        // Call API and get classes available for selected type
                        var classes = await new Api(url).GetClassesAsync(selectedClassType);

                        // Process classes returned
                        if (classes != null)
                        {
                            Alert("", "Classed found: " + classes.Count);

                            foreach (var cls in classes)
                                Console.WriteLine("Code: {0}, Name: {1}, Description: {2}", cls.Code, cls.Name, cls.Description);
                        }
                    }

                };
                actionSheet.ShowInView(this.View);
            };

            buttonClasses.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleTopMargin | UIViewAutoresizing.FlexibleBottomMargin;
            View.AddSubview(buttonClasses);
            #endregion

            #region Upload Model button

            // Setup button UI
            buttonUploadNewClass = UIButton.FromType(UIButtonType.RoundedRect);
            buttonUploadNewClass.Frame = new RectangleF(
                View.Frame.Width / 2 - buttonWidth / 2,
                buttonClasses.Frame.Y + buttonHeight,
                buttonWidth,
                buttonHeight);
            buttonUploadNewClass.SetTitle("Upload new class", UIControlState.Normal);

            // Handle button touch
            buttonUploadNewClass.TouchUpInside += async (object sender, EventArgs e) =>
            {
                // Create new class to upload
                var newClass = new Common.Model.Class()
                {
                    Code = "[IOS104]",
                    Description = "Intro to RESTful Web Services with iOS",
                    Name = "Teaches how to integrate with and use web services in iOS."
                };

                // Call API and upload new class
                var success = await new Api(url).UploadNewClass(newClass);

                Alert("New Class Upload", (success ? "Success" : "Failed"));
            };

            buttonUploadNewClass.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleTopMargin | UIViewAutoresizing.FlexibleBottomMargin;
            View.AddSubview(buttonUploadNewClass);
            #endregion
        }

        public static void Alert(string title, string message)
        {
            UIAlertView alert = new UIAlertView();
            alert.Title = title;
            alert.Message = message;
            alert.AddButton("OK");
            alert.Show();
        }
    }
}


text:
package com.egzosn.pay.union.bean;

import java.math.BigDecimal;
import java.util.Map;

import com.alibaba.fastjson.JSONObject;
import com.egzosn.pay.common.bean.BaseRefundResult;
import com.egzosn.pay.common.bean.CurType;

/**
 * 银联退款结果
 *
 * @author Egan
 * email egzosn@gmail.com
 * date 2020/8/16 22:15
 */
public class UnionRefundResult extends BaseRefundResult {

    /**
     * 二维码数据
     */
    private String qrCode;
    /**
     * 签名
     */
    private String signature;
    /**
     * 签名方法
     */
    private String signMethod;
    /**
     * 应答码
     */
    private String respCode;
    /**
     * 应答信息
     */
    private String respMsg;
    /**
     * 签名公钥证书
     */
    private String signPubKeyCert;
    /**
     * 版本号
     */
    private String version;
    /**
     * 编码方式
     */
    private String encoding;
    /**
     * 产品类型
     */
    private String bizType;
    /**
     * 订单发送时间
     */
    private String txnTime;

    /**
     * 交易类型
     */
    private String txnType;
    /**
     * 交易子类
     */
    private String txnSubType;
    /**
     * 接入类型
     * 0:商户直连接入
     * 1:收单机构接入
     * 2:平台商户接入
     */
    private String accessType;
    /**
     * 请求方保留域
     */
    private String reqReserved;
    /**
     * 商户代码
     */
    private String merId;
    /**
     * 商户订单号
     */
    private String orderId;
    /**
     * 保留域
     */
    private String reserved;

    /**
     * 获取退款请求结果状态码
     *
     * @return 状态码
     */
    @Override
    public String getCode() {
        return respCode;
    }

    /**
     * 获取退款请求结果状态提示信息
     *
     * @return 提示信息
     */
    @Override
    public String getMsg() {
        return respMsg;
    }

    /**
     * 返回业务结果状态码
     *
     * @return 业务结果状态码
     */
    @Override
    public String getResultCode() {
        return null;
    }

    /**
     * 返回业务结果状态提示信息
     *
     * @return 业务结果状态提示信息
     */
    @Override
    public String getResultMsg() {
        return null;
    }

    /**
     * 退款金额
     *
     * @return 退款金额
     */
    @Override
    public BigDecimal getRefundFee() {
        return null;
    }

    /**
     * 退款币种信息
     *
     * @return 币种信息
     */
    @Override
    public CurType getRefundCurrency() {
        return null;
    }

    /**
     * 支付平台交易号
     * 发起支付时 支付平台(如支付宝)返回的交易订单号
     *
     * @return 支付平台交易号
     */
    @Override
    public String getTradeNo() {
        return null;
    }

    /**
     * 支付订单号
     * 发起支付时,用户系统的订单号
     *
     * @return 支付订单号
     */
    @Override
    public String getOutTradeNo() {
        return orderId;
    }

    /**
     * 商户退款单号
     *
     * @return 商户退款单号
     */
    @Override
    public String getRefundNo() {
        return null;
    }

    public String getQrCode() {
        return qrCode;
    }

    public void setQrCode(String qrCode) {
        this.qrCode = qrCode;
    }

    public String getSignature() {
        return signature;
    }

    public void setSignature(String signature) {
        this.signature = signature;
    }

    public String getSignMethod() {
        return signMethod;
    }

    public void setSignMethod(String signMethod) {
        this.signMethod = signMethod;
    }

    public String getRespCode() {
        return respCode;
    }

    public void setRespCode(String respCode) {
        this.respCode = respCode;
    }

    public String getRespMsg() {
        return respMsg;
    }

    public void setRespMsg(String respMsg) {
        this.respMsg = respMsg;
    }

    public String getSignPubKeyCert() {
        return signPubKeyCert;
    }

    public void setSignPubKeyCert(String signPubKeyCert) {
        this.signPubKeyCert = signPubKeyCert;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getEncoding() {
        return encoding;
    }

    public void setEncoding(String encoding) {
        this.encoding = encoding;
    }

    public String getBizType() {
        return bizType;
    }

    public void setBizType(String bizType) {
        this.bizType = bizType;
    }

    public String getTxnTime() {
        return txnTime;
    }

    public void setTxnTime(String txnTime) {
        this.txnTime = txnTime;
    }

    public String getTxnType() {
        return txnType;
    }

    public void setTxnType(String txnType) {
        this.txnType = txnType;
    }

    public String getTxnSubType() {
        return txnSubType;
    }

    public void setTxnSubType(String txnSubType) {
        this.txnSubType = txnSubType;
    }

    public String getAccessType() {
        return accessType;
    }

    public void setAccessType(String accessType) {
        this.accessType = accessType;
    }

    public String getReqReserved() {
        return reqReserved;
    }

    public void setReqReserved(String reqReserved) {
        this.reqReserved = reqReserved;
    }

    public String getMerId() {
        return merId;
    }

    public void setMerId(String merId) {
        this.merId = merId;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public String getReserved() {
        return reserved;
    }

    public void setReserved(String reserved) {
        this.reserved = reserved;
    }

    public static final UnionRefundResult create(Map<String, Object> result){
        UnionRefundResult refundResult = new JSONObject(result).toJavaObject(UnionRefundResult.class);
        refundResult.setAttrs(result);
        return refundResult;
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<gsmlb:CompositionPart xmlns:gsmlb="http://www.opengis.net/gsml/4.1/GeoSciML-Basic"
 xmlns:gsmle="http://www.opengis.net/gsml/4.1/GeoSciML-Extension"
 xmlns:xlink="http://www.w3.org/1999/xlink"
 xmlns:gml="http://www.opengis.net/gml/3.2"
 xmlns:swe="http://www.opengis.net/swe/2.0"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://www.opengis.net/gsml/4.1/GeoSciML-Basic http://schemas.opengis.net/gsml/4.1/geoSciMLBasic.xsd
 http://www.opengis.net/gsml/4.1/GeoSciML-Extension http://schemas.opengis.net/gsml/4.1/geoSciMLExtension.xsd">
 <gsmlb:material>
  <gsmlb:RockMaterial gml:id="my_metagabbro">
   <gsmlb:gbEarthMaterialDescription>
    <gsmle:CompoundMaterialDescription>
     <gsmle:constituent>
      <gsmle:ConstituentPart gml:id="cp_orthopyroxene">
       <gsmle:proportion/>
       <gsmle:role xlink:href="http://myVocabs/GeologicRelationshipTerm" xlink:title="constituent mineral"/>
       <gsmle:relatedMaterial>
        <gsmle:MaterialRelation gml:id="mr1">
         <gsmle:relationship xlink:href="http://myVocabs/GeologicRelationshipTerm" xlink:title="metamorphic mineral relationship"/>
         <gsmle:sourceRole xlink:href="http://myVocabs/RelationshipRoleTerm" xlink:title="mineral overgrowth - rim"/>
         <gsmle:targetRole xlink:href="http://myVocabs/RelationshipRoleTerm" xlink:title="mineral overgrowth - core"/>
         <gsmle:relatedMaterial>
          <gsmle:ConstituentPart gml:id="cp_olivine">
           <gsmle:constituentMaterial>
            <gsmle:Mineral gml:id="olivine">
             <gsmle:mineralName xlink:href="http://mymineralvocab/olivine" xlink:title="olivine"/>
            </gsmle:Mineral>
           </gsmle:constituentMaterial>
          </gsmle:ConstituentPart>
         </gsmle:relatedMaterial>
        </gsmle:MaterialRelation>
       </gsmle:relatedMaterial>
       <gsmle:constituentMaterial>
        <gsmle:Mineral gml:id="orthopyroxene">
         <gsmle:mineralName xlink:href="http://mymineralvocab/orthopyroxene" xlink:title="orthopyroxene"/>
        </gsmle:Mineral>
       </gsmle:constituentMaterial>
      </gsmle:ConstituentPart>
     </gsmle:constituent>
    </gsmle:CompoundMaterialDescription>
   </gsmlb:gbEarthMaterialDescription>
   <gsmlb:lithology xlink:href="http://resource.geosciml.org/classifier/cgi/simplelithology/sandstone" xlink:title="sandstone"/>
  </gsmlb:RockMaterial>
 </gsmlb:material>
</gsmlb:CompositionPart>


text:
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Google.Api {

  /// Holder for reflection information generated from google/api/context.proto
  public static partial class ContextReflection {

    #region Descriptor
    /// File descriptor for google/api/context.proto
    public static pbr::FileDescriptor Descriptor {
      get { return descriptor; }
    }
    private static pbr::FileDescriptor descriptor;

    static ContextReflection() {
      byte[] descriptorData = global::System.Convert.FromBase64String(
          string.Concat(
            "Chhnb29nbGUvYXBpL2NvbnRleHQucHJvdG8SCmdvb2dsZS5hcGkiMQoHQ29u",
            "dGV4dBImCgVydWxlcxgBIAMoCzIXLmdvb2dsZS5hcGkuQ29udGV4dFJ1bGUi",
            "RAoLQ29udGV4dFJ1bGUSEAoIc2VsZWN0b3IYASABKAkSEQoJcmVxdWVzdGVk",
            "GAIgAygJEhAKCHByb3ZpZGVkGAMgAygJQm4KDmNvbS5nb29nbGUuYXBpQgxD",
            "b250ZXh0UHJvdG9QAVpFZ29vZ2xlLmdvbGFuZy5vcmcvZ2VucHJvdG8vZ29v",
            "Z2xlYXBpcy9hcGkvc2VydmljZWNvbmZpZztzZXJ2aWNlY29uZmlnogIER0FQ",
            "SWIGcHJvdG8z"));
      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
          new pbr::FileDescriptor[] { },
          new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Api.Context), global::Google.Api.Context.Parser, new[]{ "Rules" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Api.ContextRule), global::Google.Api.ContextRule.Parser, new[]{ "Selector", "Requested", "Provided" }, null, null, null)
          }));
    }
    #endregion

  }
  #region Messages
  ///
  ///  `Context` defines which contexts an API requests.
  ///
  ///  Example:
  ///
  ///      context:
  ///        rules:
  ///        - selector: "*"
  ///          requested:
  ///          - google.rpc.context.ProjectContext
  ///          - google.rpc.context.OriginContext
  ///
  ///  The above specifies that all methods in the API request
  ///  `google.rpc.context.ProjectContext` and
  ///  `google.rpc.context.OriginContext`.
  ///
  ///  Available context types are defined in package
  ///  `google.rpc.context`.
  ///
  public sealed partial class Context : pb::IMessage<Context> {
    private static readonly pb::MessageParser<Context> _parser = new pb::MessageParser<Context>(() => new Context());
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<Context> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Google.Api.ContextReflection.Descriptor.MessageTypes[0]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public Context() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public Context(Context other) : this() {
      rules_ = other.rules_.Clone();
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public Context Clone() {
      return new Context(this);
    }

    /// Field number for the "rules" field.
    public const int RulesFieldNumber = 1;
    private static readonly pb::FieldCodec<global::Google.Api.ContextRule> _repeated_rules_codec
        = pb::FieldCodec.ForMessage(10, global::Google.Api.ContextRule.Parser);
    private readonly pbc::RepeatedField<global::Google.Api.ContextRule> rules_ = new pbc::RepeatedField<global::Google.Api.ContextRule>();
    ///
    ///  A list of RPC context rules that apply to individual API methods.
    ///
    ///  **NOTE:** All service configuration rules follow "last one wins" order.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<global::Google.Api.ContextRule> Rules {
      get { return rules_; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override bool Equals(object other) {
      return Equals(other as Context);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(Context other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if(!rules_.Equals(other.rules_)) return false;
      return true;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      hash ^= rules_.GetHashCode();
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void WriteTo(pb::CodedOutputStream output) {
      rules_.WriteTo(output, _repeated_rules_codec);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      size += rules_.CalculateSize(_repeated_rules_codec);
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(Context other) {
      if (other == null) {
        return;
      }
      rules_.Add(other.rules_);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            input.SkipLastField();
            break;
          case 10: {
            rules_.AddEntriesFrom(input, _repeated_rules_codec);
            break;
          }
        }
      }
    }

  }

  ///
  ///  A context rule provides information about the context for an individual API
  ///  element.
  ///
  public sealed partial class ContextRule : pb::IMessage<ContextRule> {
    private static readonly pb::MessageParser<ContextRule> _parser = new pb::MessageParser<ContextRule>(() => new ContextRule());
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<ContextRule> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Google.Api.ContextReflection.Descriptor.MessageTypes[1]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public ContextRule() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public ContextRule(ContextRule other) : this() {
      selector_ = other.selector_;
      requested_ = other.requested_.Clone();
      provided_ = other.provided_.Clone();
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public ContextRule Clone() {
      return new ContextRule(this);
    }

    /// Field number for the "selector" field.
    public const int SelectorFieldNumber = 1;
    private string selector_ = "";
    ///
    ///  Selects the methods to which this rule applies.
    ///
    ///  Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public string Selector {
      get { return selector_; }
      set {
        selector_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// Field number for the "requested" field.
    public const int RequestedFieldNumber = 2;
    private static readonly pb::FieldCodec<string> _repeated_requested_codec
        = pb::FieldCodec.ForString(18);
    private readonly pbc::RepeatedField<string> requested_ = new pbc::RepeatedField<string>();
    ///
    ///  A list of full type names of requested contexts.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<string> Requested {
      get { return requested_; }
    }

    /// Field number for the "provided" field.
    public const int ProvidedFieldNumber = 3;
    private static readonly pb::FieldCodec<string> _repeated_provided_codec
        = pb::FieldCodec.ForString(26);
    private readonly pbc::RepeatedField<string> provided_ = new pbc::RepeatedField<string>();
    ///
    ///  A list of full type names of provided contexts.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public pbc::RepeatedField<string> Provided {
      get { return provided_; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override bool Equals(object other) {
      return Equals(other as ContextRule);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(ContextRule other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Selector != other.Selector) return false;
      if(!requested_.Equals(other.requested_)) return false;
      if(!provided_.Equals(other.provided_)) return false;
      return true;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (Selector.Length != 0) hash ^= Selector.GetHashCode();
      hash ^= requested_.GetHashCode();
      hash ^= provided_.GetHashCode();
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void WriteTo(pb::CodedOutputStream output) {
      if (Selector.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(Selector);
      }
      requested_.WriteTo(output, _repeated_requested_codec);
      provided_.WriteTo(output, _repeated_provided_codec);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      if (Selector.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Selector);
      }
      size += requested_.CalculateSize(_repeated_requested_codec);
      size += provided_.CalculateSize(_repeated_provided_codec);
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(ContextRule other) {
      if (other == null) {
        return;
      }
      if (other.Selector.Length != 0) {
        Selector = other.Selector;
      }
      requested_.Add(other.requested_);
      provided_.Add(other.provided_);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            input.SkipLastField();
            break;
          case 10: {
            Selector = input.ReadString();
            break;
          }
          case 18: {
            requested_.AddEntriesFrom(input, _repeated_requested_codec);
            break;
          }
          case 26: {
            provided_.AddEntriesFrom(input, _repeated_provided_codec);
            break;
          }
        }
      }
    }

  }

  #endregion

}

#endregion Designer generated code


text:
<?php

namespace Google\Service\CloudLifeSciences;

class Metadata extends \Google\Collection
{
  protected $collection_key = 'events';
  /**
   * @var string
   */
  public $createTime;
  /**
   * @var string
   */
  public $endTime;
  protected $eventsType = Event::class;
  protected $eventsDataType = 'array';
  /**
   * @var string[]
   */
  public $labels;
  protected $pipelineType = Pipeline::class;
  protected $pipelineDataType = '';
  /**
   * @var string
   */
  public $pubSubTopic;
  /**
   * @var string
   */
  public $startTime;

  /**
   * @param string
   */
  public function setCreateTime($createTime)
  {
    $this->createTime = $createTime;
  }
  /**
   * @return string
   */
  public function getCreateTime()
  {
    return $this->createTime;
  }
  /**
   * @param string
   */
  public function setEndTime($endTime)
  {
    $this->endTime = $endTime;
  }
  /**
   * @return string
   */
  public function getEndTime()
  {
    return $this->endTime;
  }
  /**
   * @param Event[]
   */
  public function setEvents($events)
  {
    $this->events = $events;
  }
  /**
   * @return Event[]
   */
  public function getEvents()
  {
    return $this->events;
  }
  /**
   * @param string[]
   */
  public function setLabels($labels)
  {
    $this->labels = $labels;
  }
  /**
   * @return string[]
   */
  public function getLabels()
  {
    return $this->labels;
  }
  /**
   * @param Pipeline
   */
  public function setPipeline(Pipeline $pipeline)
  {
    $this->pipeline = $pipeline;
  }
  /**
   * @return Pipeline
   */
  public function getPipeline()
  {
    return $this->pipeline;
  }
  /**
   * @param string
   */
  public function setPubSubTopic($pubSubTopic)
  {
    $this->pubSubTopic = $pubSubTopic;
  }
  /**
   * @return string
   */
  public function getPubSubTopic()
  {
    return $this->pubSubTopic;
  }
  /**
   * @param string
   */
  public function setStartTime($startTime)
  {
    $this->startTime = $startTime;
  }
  /**
   * @return string
   */
  public function getStartTime()
  {
    return $this->startTime;
  }
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Metadata::class, 'Google_Service_CloudLifeSciences_Metadata');


text:
package com.velvetPearl.lottery.fragments;

import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.AppLaunchChecker;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
//import android.support.v7.app.AlertDialog;
import android.util.Log;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.TextView;

import com.velvetPearl.lottery.ApplicationDomain;
import com.velvetPearl.lottery.MainActivity;
import com.velvetPearl.lottery.R;
import com.velvetPearl.lottery.dataAccess.DataAccessEvent;
import com.velvetPearl.lottery.dataAccess.models.Lottery;

import java.util.Observable;
import java.util.Observer;

/**
 * Created by Stensig on 02-Nov-16.
 */

public class NewLottery extends Fragment implements View.OnClickListener, View.OnKeyListener, Observer {

    private static final String LOG_TAG = "NewLotteryFragment";

    private EditText numRangeMin;
    private EditText numRangeMax;
    private EditText numPrice;
    private Button cancelBtn;
    private Button createBtn;
    private EditText nameInput;
    private TextView errorLabel;
    private CheckBox allowMultiWinOnTicket;

    private AlertDialog savingDlg;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View root = inflater.inflate(R.layout.fragment_new_lottery, container, false);
        ApplicationDomain.getInstance().addObserver(this);
        initUi(root);

        return root;
    }

    @Override
    public void onDestroyView() {
        ApplicationDomain.getInstance().deleteObserver(this);
        super.onDestroyView();
    }

    private void initUi(View root) {
        MainActivity activity = (MainActivity) getActivity();
        activity.disableActiveLotteryMenuItems();
        activity.setTitle(R.string.new_lottery);

        numRangeMin = (EditText) root.findViewById(R.id.new_lottery_min_num);
        numRangeMax = (EditText) root.findViewById(R.id.new_lottery_max_num);
        numPrice = (EditText) root.findViewById(R.id.new_lottery_price_per_num);
        cancelBtn = (Button) root.findViewById(R.id.new_lottery_cancel);
        createBtn = (Button) root.findViewById(R.id.new_lottery_create);
        nameInput = (EditText) root.findViewById(R.id.new_lottery_name);
        allowMultiWinOnTicket = (CheckBox) root.findViewById(R.id.multi_winner_checkbox);
        errorLabel = (TextView) root.findViewById(R.id.new_lottery_error_lab);
        errorLabel.setText(null);

        cancelBtn.setOnClickListener(this);
        createBtn.setOnClickListener(this);

        numRangeMin.setOnKeyListener(this);
        numRangeMax.setOnKeyListener(this);
        nameInput.setOnKeyListener(this);
        numPrice.setOnKeyListener(this);
    }

    @Override
    public void onClick(View view) {
        if (view == cancelBtn) {
            FragmentManager fragMan = getFragmentManager();
            if (fragMan.getBackStackEntryCount() > 0) {
                fragMan.popBackStack();
            } else {
                fragMan.beginTransaction().replace(R.id.main_fragment_container, new Welcome()).commit();
            }
        } else if (view == createBtn) {
            parseInputDataToNewLottery();
        }
    }

    private void parseInputDataToNewLottery() {
        String name = nameInput.getText().toString();
        if (name.isEmpty()) {
            errorLabel.setText(R.string.new_lottery_error_missing_name);
            return;
        }

        int numMin;
        try {
            numMin = Integer.parseInt(numRangeMin.getText().toString());
        } catch (Exception ex) {
            errorLabel.setText(R.string.new_lottery_error_min_not_int);
            return;
        }
        if (numMin < 1) {
            errorLabel.setText(R.string.new_lottery_error_min_negative);
            return;
        }

        int numMax;
        try {
            numMax = Integer.parseInt(numRangeMax.getText().toString());
        } catch (Exception ex) {
            errorLabel.setText(R.string.new_lottery_error_max_not_int);
            return;
        }
        if (numMax <= numMin) {
            errorLabel.setText(R.string.new_lottery_error_max_small);
            return;
        }

        double price;
        try {
            price = Double.parseDouble(numPrice.getText().toString());
        } catch (Exception ex) {
            errorLabel.setText(R.string.new_lottery_error_price_not_double);
            return;
        }
        if (price < 0.0) {
            errorLabel.setText(R.string.new_lottery_error_price_not_double);
            return;
        }

        Log.d(LOG_TAG, "creating new lottery");
        Lottery lottery = new Lottery();
        lottery.setCreated(System.currentTimeMillis());
        lottery.setName(name);
        lottery.setLotteryNumLowerBound(numMin);
        lottery.setLotteryNumUpperBound(numMax);
        lottery.setPricePerLotteryNum(price);
        lottery.setTicketMultiWinEnabled(allowMultiWinOnTicket.isChecked());
        lottery = ApplicationDomain.getInstance().lotteryRepository.saveLottery(lottery);
        ApplicationDomain.getInstance().lotteryRepository.loadLottery(lottery.getId());

        final Lottery finalLottery = lottery;
        savingDlg = ProgressDialog.show(getContext(), getString(R.string.please_wait), getString(R.string.create_lottery), true, true, new DialogInterface.OnCancelListener() {
            @Override
            public void onCancel(DialogInterface dialogInterface) {
                Log.d(LOG_TAG, String.format("Cancelling lottery creation. Calling delete on ID %s.", (String) finalLottery.getId()));
                ApplicationDomain.getInstance().lotteryRepository.deleteLottery(finalLottery);
            }
        });

    }

    @Override
    public boolean onKey(View view, int keyCode, KeyEvent keyEvent) {
        if (keyEvent.getAction() == KeyEvent.ACTION_DOWN) {
            switch (keyCode) {
                case KeyEvent.KEYCODE_ENTER:
                case KeyEvent.KEYCODE_NUMPAD_ENTER:
                case KeyEvent.KEYCODE_DPAD_CENTER:
                    parseInputDataToNewLottery();
                    return true;
                default:
                    break;
            }
        }
        return false;
    }

    @Override
    public void update(Observable observable, Object args) {
        if (args != null && args.getClass() == DataAccessEvent.class) {
            if (args == DataAccessEvent.LOTTERY_LOADED){
                if (savingDlg.isShowing()) {
                    savingDlg.dismiss();
                }
                getFragmentManager().beginTransaction().replace(R.id.main_fragment_container, new LotteryHome()).addToBackStack(null).commit();
            }
        }
    }
}


text:
> This plugin transforms ES2015 modules to [CommonJS](http://wiki.commonjs.org/wiki/Modules/1.1).

## Example

**In**

```javascript
export default 42;
```

**Out**

```javascript
Object.defineProperty(exports, "__esModule", {
  value: true
});

exports.default = 42;
```

## Installation

```sh
npm install --save-dev babel-plugin-transform-es2015-modules-commonjs
```

## Usage

### Via `.babelrc` (Recommended)

**.babelrc**

```js
// without options
{
  "plugins": ["transform-es2015-modules-commonjs"]
}

// with options
{
  "plugins": [
    ["transform-es2015-modules-commonjs", {
      "allowTopLevelThis": true
    }]
  ]
}
```

### Via CLI

```sh
babel --plugins transform-es2015-modules-commonjs script.js
```

### Via Node API

```javascript
require("babel-core").transform("code", {
  plugins: ["transform-es2015-modules-commonjs"]
});
```

## Options

### `loose`

`boolean`, defaults to `false`.

As per the spec, `import` and `export` are only allowed to be used at the top
level. When in loose mode these are allowed to be used anywhere.

And by default, when using exports with babel a non-enumerable `__esModule` property
is exported.

```javascript
var foo = exports.foo = 5;

Object.defineProperty(exports, "__esModule", {
  value: true
});
```

In environments that don't support this you can enable loose mode on `es6.modules`
and instead of using `Object.defineProperty` an assignment will be used instead.

```javascript
var foo = exports.foo = 5;
exports.__esModule = true;
```


text:
package org.apache.dubbo.common.utils;

import org.apache.dubbo.common.Constants;
import org.apache.dubbo.common.io.UnsafeStringWriter;
import org.apache.dubbo.common.logger.Logger;
import org.apache.dubbo.common.logger.LoggerFactory;

import com.alibaba.fastjson.JSON;

import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * StringUtils
 */

public final class StringUtils {

    public static final String EMPTY = "";
    public static final int INDEX_NOT_FOUND = -1;
    public static final String[] EMPTY_STRING_ARRAY = new String[0];

    private static final Logger logger = LoggerFactory.getLogger(StringUtils.class);
    private static final Pattern KVP_PATTERN = Pattern.compile("([_.a-zA-Z0-9][-_.a-zA-Z0-9]*)[=](.*)"); //key value pair pattern.
    private static final Pattern INT_PATTERN = Pattern.compile("^\\d+$");
    private static final int PAD_LIMIT = 8192;

    private StringUtils() {
    }

    /**
     * Gets a CharSequence length or {@code 0} if the CharSequence is
     * {@code null}.
     *
     * @param cs a CharSequence or {@code null}
     * @return CharSequence length or {@code 0} if the CharSequence is
     * {@code null}.
     */
    public static int length(final CharSequence cs) {
        return cs == null ? 0 : cs.length();
    }

    /**
     *
Repeat a String {@code repeat} times to form a
     * new String.

     *
     *

     * StringUtils.repeat(null, 2) = null
     * StringUtils.repeat("", 0)   = ""
     * StringUtils.repeat("", 2)   = ""
     * StringUtils.repeat("a", 3)  = "aaa"
     * StringUtils.repeat("ab", 2) = "abab"
     * StringUtils.repeat("a", -2) = ""
     *

     *
     * @param str    the String to repeat, may be null
     * @param repeat number of times to repeat str, negative treated as zero
     * @return a new String consisting of the original String repeated,
     * {@code null} if null String input
     */
    public static String repeat(final String str, final int repeat) {
        // Performance tuned for 2.0 (JDK1.4)

        if (str == null) {
            return null;
        }
        if (repeat <= 0) {
            return EMPTY;
        }
        final int inputLength = str.length();
        if (repeat == 1 || inputLength == 0) {
            return str;
        }
        if (inputLength == 1 && repeat <= PAD_LIMIT) {
            return repeat(str.charAt(0), repeat);
        }

        final int outputLength = inputLength * repeat;
        switch (inputLength) {
            case 1:
                return repeat(str.charAt(0), repeat);
            case 2:
                final char ch0 = str.charAt(0);
                final char ch1 = str.charAt(1);
                final char[] output2 = new char[outputLength];
                for (int i = repeat * 2 - 2; i >= 0; i--, i--) {
                    output2[i] = ch0;
                    output2[i + 1] = ch1;
                }
                return new String(output2);
            default:
                final StringBuilder buf = new StringBuilder(outputLength);
                for (int i = 0; i < repeat; i++) {
                    buf.append(str);
                }
                return buf.toString();
        }
    }

    /**
     *
Repeat a String {@code repeat} times to form a
     * new String, with a String separator injected each time.

     *
     *

     * StringUtils.repeat(null, null, 2) = null
     * StringUtils.repeat(null, "x", 2)  = null
     * StringUtils.repeat("", null, 0)   = ""
     * StringUtils.repeat("", "", 2)     = ""
     * StringUtils.repeat("", "x", 3)    = "xxx"
     * StringUtils.repeat("?", ", ", 3)  = "?, ?, ?"
     *

     *
     * @param str       the String to repeat, may be null
     * @param separator the String to inject, may be null
     * @param repeat    number of times to repeat str, negative treated as zero
     * @return a new String consisting of the original String repeated,
     * {@code null} if null String input
     * @since 2.5
     */
    public static String repeat(final String str, final String separator, final int repeat) {
        if (str == null || separator == null) {
            return repeat(str, repeat);
        }
        // given that repeat(String, int) is quite optimized, better to rely on it than try and splice this into it
        final String result = repeat(str + separator, repeat);
        return removeEnd(result, separator);
    }

    /**
     *
Removes a substring only if it is at the end of a source string,
     * otherwise returns the source string.

     *
     *
A {@code null} source string will return {@code null}.
     * An empty ("") source string will return the empty string.
     * A {@code null} search string will return the source string.

     *
     *

     * StringUtils.removeEnd(null, *)      = null
     * StringUtils.removeEnd("", *)        = ""
     * StringUtils.removeEnd(*, null)      = *
     * StringUtils.removeEnd("www.domain.com", ".com.")  = "www.domain.com"
     * StringUtils.removeEnd("www.domain.com", ".com")   = "www.domain"
     * StringUtils.removeEnd("www.domain.com", "domain") = "www.domain.com"
     * StringUtils.removeEnd("abc", "")    = "abc"
     *

     *
     * @param str    the source String to search, may be null
     * @param remove the String to search for and remove, may be null
     * @return the substring with the string removed if found,
     * {@code null} if null String input
     */
    public static String removeEnd(final String str, final String remove) {
        if (isAnyEmpty(str, remove)) {
            return str;
        }
        if (str.endsWith(remove)) {
            return str.substring(0, str.length() - remove.length());
        }
        return str;
    }

    /**
     *
Returns padding using the specified delimiter repeated
     * to a given length.

     *
     *

     * StringUtils.repeat('e', 0)  = ""
     * StringUtils.repeat('e', 3)  = "eee"
     * StringUtils.repeat('e', -2) = ""
     *

     *
     *
Note: this method doesn't not support padding with
     * Unicode Supplementary Characters
     * as they require a pair of {@code char}s to be represented.
     * If you are needing to support full I18N of your applications
     * consider using {@link #repeat(String, int)} instead.
     *

     *
     * @param ch     character to repeat
     * @param repeat number of times to repeat char, negative treated as zero
     * @return String with repeated character
     * @see #repeat(String, int)
     */
    public static String repeat(final char ch, final int repeat) {
        final char[] buf = new char[repeat];
        for (int i = repeat - 1; i >= 0; i--) {
            buf[i] = ch;
        }
        return new String(buf);
    }

    /**
     *
Strips any of a set of characters from the end of a String.

     *
     *
A {@code null} input String returns {@code null}.
     * An empty string ("") input returns the empty string.

     *
     *
If the stripChars String is {@code null}, whitespace is
     * stripped as defined by {@link Character#isWhitespace(char)}.

     *
     *

     * StringUtils.stripEnd(null, *)          = null
     * StringUtils.stripEnd("", *)            = ""
     * StringUtils.stripEnd("abc", "")        = "abc"
     * StringUtils.stripEnd("abc", null)      = "abc"
     * StringUtils.stripEnd("  abc", null)    = "  abc"
     * StringUtils.stripEnd("abc  ", null)    = "abc"
     * StringUtils.stripEnd(" abc ", null)    = " abc"
     * StringUtils.stripEnd("  abcyx", "xyz") = "  abc"
     * StringUtils.stripEnd("120.00", ".0")   = "12"
     *

     *
     * @param str        the String to remove characters from, may be null
     * @param stripChars the set of characters to remove, null treated as whitespace
     * @return the stripped String, {@code null} if null String input
     */
    public static String stripEnd(final String str, final String stripChars) {
        int end;
        if (str == null || (end = str.length()) == 0) {
            return str;
        }

        if (stripChars == null) {
            while (end != 0 && Character.isWhitespace(str.charAt(end - 1))) {
                end--;
            }
        } else if (stripChars.isEmpty()) {
            return str;
        } else {
            while (end != 0 && stripChars.indexOf(str.charAt(end - 1)) != INDEX_NOT_FOUND) {
                end--;
            }
        }
        return str.substring(0, end);
    }

    /**
     *
Replaces all occurrences of a String within another String.

     *
     *
A {@code null} reference passed to this method is a no-op.

     *
     *

     * StringUtils.replace(null, *, *)        = null
     * StringUtils.replace("", *, *)          = ""
     * StringUtils.replace("any", null, *)    = "any"
     * StringUtils.replace("any", *, null)    = "any"
     * StringUtils.replace("any", "", *)      = "any"
     * StringUtils.replace("aba", "a", null)  = "aba"
     * StringUtils.replace("aba", "a", "")    = "b"
     * StringUtils.replace("aba", "a", "z")   = "zbz"
     *

     *
     * @param text         text to search and replace in, may be null
     * @param searchString the String to search for, may be null
     * @param replacement  the String to replace it with, may be null
     * @return the text with any replacements processed,
     * {@code null} if null String input
     * @see #replace(String text, String searchString, String replacement, int max)
     */
    public static String replace(final String text, final String searchString, final String replacement) {
        return replace(text, searchString, replacement, -1);
    }

    /**
     *
Replaces a String with another String inside a larger String,
     * for the first {@code max} values of the search String.

     *
     *
A {@code null} reference passed to this method is a no-op.

     *
     *

     * StringUtils.replace(null, *, *, *)         = null
     * StringUtils.replace("", *, *, *)           = ""
     * StringUtils.replace("any", null, *, *)     = "any"
     * StringUtils.replace("any", *, null, *)     = "any"
     * StringUtils.replace("any", "", *, *)       = "any"
     * StringUtils.replace("any", *, *, 0)        = "any"
     * StringUtils.replace("abaa", "a", null, -1) = "abaa"
     * StringUtils.replace("abaa", "a", "", -1)   = "b"
     * StringUtils.replace("abaa", "a", "z", 0)   = "abaa"
     * StringUtils.replace("abaa", "a", "z", 1)   = "zbaa"
     * StringUtils.replace("abaa", "a", "z", 2)   = "zbza"
     * StringUtils.replace("abaa", "a", "z", -1)  = "zbzz"
     *

     *
     * @param text         text to search and replace in, may be null
     * @param searchString the String to search for, may be null
     * @param replacement  the String to replace it with, may be null
     * @param max          maximum number of values to replace, or {@code -1} if no maximum
     * @return the text with any replacements processed,
     * {@code null} if null String input
     */
    public static String replace(final String text, final String searchString, final String replacement, int max) {
        if (isAnyEmpty(text, searchString) || replacement == null || max == 0) {
            return text;
        }
        int start = 0;
        int end = text.indexOf(searchString, start);
        if (end == INDEX_NOT_FOUND) {
            return text;
        }
        final int replLength = searchString.length();
        int increase = replacement.length() - replLength;
        increase = increase < 0 ? 0 : increase;
        increase *= max < 0 ? 16 : max > 64 ? 64 : max;
        final StringBuilder buf = new StringBuilder(text.length() + increase);
        while (end != INDEX_NOT_FOUND) {
            buf.append(text.substring(start, end)).append(replacement);
            start = end + replLength;
            if (--max == 0) {
                break;
            }
            end = text.indexOf(searchString, start);
        }
        buf.append(text.substring(start));
        return buf.toString();
    }

    public static boolean isBlank(String str) {
        return isEmpty(str);
    }

    /**
     * is empty string.
     *
     * @param str source string.
     * @return is empty.
     */
    public static boolean isEmpty(String str) {
        return str == null || str.isEmpty();
    }

    /**
     *
Checks if the strings contain empty or null elements.

     *
     *

     * StringUtils.isNoneEmpty(null)            = false
     * StringUtils.isNoneEmpty("")              = false
     * StringUtils.isNoneEmpty(" ")             = true
     * StringUtils.isNoneEmpty("abc")           = true
     * StringUtils.isNoneEmpty("abc", "def")    = true
     * StringUtils.isNoneEmpty("abc", null)     = false
     * StringUtils.isNoneEmpty("abc", "")       = false
     * StringUtils.isNoneEmpty("abc", " ")      = true
     *

     *
     * @param ss the strings to check
     * @return {@code true} if all strings are not empty or null
     */
    public static boolean isNoneEmpty(final String... ss) {
        if (ArrayUtils.isEmpty(ss)) {
            return false;
        }
        for (final String s : ss) {
            if (isEmpty(s)) {
                return false;
            }
        }
        return true;
    }

    /**
     *
Checks if the strings contain at least on empty or null element.

     *
     *

     * StringUtils.isAnyEmpty(null)            = true
     * StringUtils.isAnyEmpty("")              = true
     * StringUtils.isAnyEmpty(" ")             = false
     * StringUtils.isAnyEmpty("abc")           = false
     * StringUtils.isAnyEmpty("abc", "def")    = false
     * StringUtils.isAnyEmpty("abc", null)     = true
     * StringUtils.isAnyEmpty("abc", "")       = true
     * StringUtils.isAnyEmpty("abc", " ")      = false
     *

     *
     * @param ss the strings to check
     * @return {@code true} if at least one in the strings is empty or null
     */
    public static boolean isAnyEmpty(final String... ss) {
        return !isNoneEmpty(ss);
    }

    /**
     * is not empty string.
     *
     * @param str source string.
     * @return is not empty.
     */
    public static boolean isNotEmpty(String str) {
        return !isEmpty(str);
    }

    /**
     * @param s1
     * @param s2
     * @return equals
     */
    public static boolean isEquals(String s1, String s2) {
        if (s1 == null && s2 == null) {
            return true;
        }
        if (s1 == null || s2 == null) {
            return false;
        }
        return s1.equals(s2);
    }

    /**
     * is integer string.
     *
     * @param str
     * @return is integer
     */
    public static boolean isInteger(String str) {
        return isNotEmpty(str) && INT_PATTERN.matcher(str).matches();
    }

    public static int parseInteger(String str) {
        return isInteger(str) ? Integer.parseInt(str) : 0;
    }

    /**
     * Returns true if s is a legal Java identifier.

     * more info.
     */
    public static boolean isJavaIdentifier(String s) {
        if (isEmpty(s) || !Character.isJavaIdentifierStart(s.charAt(0))) {
            return false;
        }
        for (int i = 1; i < s.length(); i++) {
            if (!Character.isJavaIdentifierPart(s.charAt(i))) {
                return false;
            }
        }
        return true;
    }

    public static boolean isContains(String values, String value) {
        return isNotEmpty(values) && isContains(Constants.COMMA_SPLIT_PATTERN.split(values), value);
    }

    /**
     * @param values
     * @param value
     * @return contains
     */
    public static boolean isContains(String[] values, String value) {
        if (isNotEmpty(value) && ArrayUtils.isNotEmpty(values)) {
            for (String v : values) {
                if (value.equals(v)) {
                    return true;
                }
            }
        }
        return false;
    }

    public static boolean isNumeric(String str, boolean allowDot) {
        if (str == null || str.isEmpty()) {
            return false;
        }
        boolean hasDot = false;
        int sz = str.length();
        for (int i = 0; i < sz; i++) {
            if (str.charAt(i) == '.') {
                if (hasDot || !allowDot) {
                    return false;
                }
                hasDot = true;
                continue;
            }
            if (!Character.isDigit(str.charAt(i))) {
                return false;
            }
        }
        return true;
    }

    /**
     * @param e
     * @return string
     */
    public static String toString(Throwable e) {
        UnsafeStringWriter w = new UnsafeStringWriter();
        PrintWriter p = new PrintWriter(w);
        p.print(e.getClass().getName());
        if (e.getMessage() != null) {
            p.print(": " + e.getMessage());
        }
        p.println();
        try {
            e.printStackTrace(p);
            return w.toString();
        } finally {
            p.close();
        }
    }

    /**
     * @param msg
     * @param e
     * @return string
     */
    public static String toString(String msg, Throwable e) {
        UnsafeStringWriter w = new UnsafeStringWriter();
        w.write(msg + "\n");
        PrintWriter p = new PrintWriter(w);
        try {
            e.printStackTrace(p);
            return w.toString();
        } finally {
            p.close();
        }
    }

    /**
     * translate.
     *
     * @param src  source string.
     * @param from src char table.
     * @param to   target char table.
     * @return String.
     */
    public static String translate(String src, String from, String to) {
        if (isEmpty(src)) {
            return src;
        }
        StringBuilder sb = null;
        int ix;
        char c;
        for (int i = 0, len = src.length(); i < len; i++) {
            c = src.charAt(i);
            ix = from.indexOf(c);
            if (ix == -1) {
                if (sb != null) {
                    sb.append(c);
                }
            } else {
                if (sb == null) {
                    sb = new StringBuilder(len);
                    sb.append(src, 0, i);
                }
                if (ix < to.length()) {
                    sb.append(to.charAt(ix));
                }
            }
        }
        return sb == null ? src : sb.toString();
    }

    /**
     * split.
     *
     * @param ch char.
     * @return string array.
     */
    public static String[] split(String str, char ch) {
        List<String> list = null;
        char c;
        int ix = 0, len = str.length();
        for (int i = 0; i < len; i++) {
            c = str.charAt(i);
            if (c == ch) {
                if (list == null) {
                    list = new ArrayList<String>();
                }
                list.add(str.substring(ix, i));
                ix = i + 1;
            }
        }
        if (ix > 0) {
            list.add(str.substring(ix));
        }
        return list == null ? EMPTY_STRING_ARRAY : (String[]) list.toArray(EMPTY_STRING_ARRAY);
    }

    /**
     * join string.
     *
     * @param array String array.
     * @return String.
     */
    public static String join(String[] array) {
        if (ArrayUtils.isEmpty(array)) {
            return EMPTY;
        }
        StringBuilder sb = new StringBuilder();
        for (String s : array) {
            sb.append(s);
        }
        return sb.toString();
    }

    /**
     * join string like javascript.
     *
     * @param array String array.
     * @param split split
     * @return String.
     */
    public static String join(String[] array, char split) {
        if (ArrayUtils.isEmpty(array)) {
            return EMPTY;
        }
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < array.length; i++) {
            if (i > 0) {
                sb.append(split);
            }
            sb.append(array[i]);
        }
        return sb.toString();
    }

    /**
     * join string like javascript.
     *
     * @param array String array.
     * @param split split
     * @return String.
     */
    public static String join(String[] array, String split) {
        if (ArrayUtils.isEmpty(array)) {
            return EMPTY;
        }
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < array.length; i++) {
            if (i > 0) {
                sb.append(split);
            }
            sb.append(array[i]);
        }
        return sb.toString();
    }

    public static String join(Collection<String> coll, String split) {
        if (CollectionUtils.isEmpty(coll)) {
            return EMPTY;
        }

        StringBuilder sb = new StringBuilder();
        boolean isFirst = true;
        for (String s : coll) {
            if (isFirst) {
                isFirst = false;
            } else {
                sb.append(split);
            }
            sb.append(s);
        }
        return sb.toString();
    }

    /**
     * parse key-value pair.
     *
     * @param str           string.
     * @param itemSeparator item separator.
     * @return key-value map;
     */
    private static Map<String, String> parseKeyValuePair(String str, String itemSeparator) {
        String[] tmp = str.split(itemSeparator);
        Map<String, String> map = new HashMap<String, String>(tmp.length);
        for (int i = 0; i < tmp.length; i++) {
            Matcher matcher = KVP_PATTERN.matcher(tmp[i]);
            if (!matcher.matches()) {
                continue;
            }
            map.put(matcher.group(1), matcher.group(2));
        }
        return map;
    }

    public static String getQueryStringValue(String qs, String key) {
        Map<String, String> map = StringUtils.parseQueryString(qs);
        return map.get(key);
    }

    /**
     * parse query string to Parameters.
     *
     * @param qs query string.
     * @return Parameters instance.
     */
    public static Map<String, String> parseQueryString(String qs) {
        if (isEmpty(qs)) {
            return new HashMap<String, String>();
        }
        return parseKeyValuePair(qs, "\\&");
    }

    public static String getServiceKey(Map<String, String> ps) {
        StringBuilder buf = new StringBuilder();
        String group = ps.get(Constants.GROUP_KEY);
        if (isNotEmpty(group)) {
            buf.append(group).append("/");
        }
        buf.append(ps.get(Constants.INTERFACE_KEY));
        String version = ps.get(Constants.VERSION_KEY);
        if (isNotEmpty(group)) {
            buf.append(":").append(version);
        }
        return buf.toString();
    }

    public static String toQueryString(Map<String, String> ps) {
        StringBuilder buf = new StringBuilder();
        if (ps != null && ps.size() > 0) {
            for (Map.Entry<String, String> entry : new TreeMap<String, String>(ps).entrySet()) {
                String key = entry.getKey();
                String value = entry.getValue();
                if (isNoneEmpty(key, value)) {
                    if (buf.length() > 0) {
                        buf.append("&");
                    }
                    buf.append(key);
                    buf.append("=");
                    buf.append(value);
                }
            }
        }
        return buf.toString();
    }

    public static String camelToSplitName(String camelName, String split) {
        if (isEmpty(camelName)) {
            return camelName;
        }
        StringBuilder buf = null;
        for (int i = 0; i < camelName.length(); i++) {
            char ch = camelName.charAt(i);
            if (ch >= 'A' && ch <= 'Z') {
                if (buf == null) {
                    buf = new StringBuilder();
                    if (i > 0) {
                        buf.append(camelName.substring(0, i));
                    }
                }
                if (i > 0) {
                    buf.append(split);
                }
                buf.append(Character.toLowerCase(ch));
            } else if (buf != null) {
                buf.append(ch);
            }
        }
        return buf == null ? camelName : buf.toString();
    }

    public static String toArgumentString(Object[] args) {
        StringBuilder buf = new StringBuilder();
        for (Object arg : args) {
            if (buf.length() > 0) {
                buf.append(Constants.COMMA_SEPARATOR);
            }
            if (arg == null || ReflectUtils.isPrimitives(arg.getClass())) {
                buf.append(arg);
            } else {
                try {
                    buf.append(JSON.toJSONString(arg));
                } catch (Exception e) {
                    logger.warn(e.getMessage(), e);
                    buf.append(arg);
                }
            }
        }
        return buf.toString();
    }

    public static String trim(String str) {
        return str == null ? null : str.trim();
    }
}


text:
<?php

use EmailMarketing\Application\Action\Campanha;
use EmailMarketing\Application\Action\Cliente;
use EmailMarketing\Application\Action\Contato;
use EmailMarketing\Application\Action\HomePageAction;
use EmailMarketing\Application\Action\HomePageFactory;
use EmailMarketing\Application\Action\LoginPageAction;
use EmailMarketing\Application\Action\LoginPageFactory;
use EmailMarketing\Application\Action\LogoutAction;
use EmailMarketing\Application\Action\LogoutFactory;
use EmailMarketing\Application\Action\PingAction;
use EmailMarketing\Application\Action\Tag;
use EmailMarketing\Application\Action\TestePageAction;
use EmailMarketing\Application\Action\TestePageFactory;
use Zend\Expressive\Router\AuraRouter;
use Zend\Expressive\Router\RouterInterface;

return [
    'dependencies' => [
        'invokables' => [
            RouterInterface::class => AuraRouter::class,
            PingAction::class => PingAction::class,
        ],
        'factories' => [
            HomePageAction::class => HomePageFactory::class,
            LoginPageAction::class => LoginPageFactory::class,
            LogoutAction::class => LogoutFactory::class,
            TestePageAction::class => TestePageFactory::class,
            Cliente\ClienteListPageAction::class => Cliente\Factory\ClienteListPageFactory::class,
            Cliente\ClienteCreatePageAction::class => Cliente\Factory\ClienteCreatePageFactory::class,
            Cliente\ClienteUpdatePageAction::class => Cliente\Factory\ClienteUpdatePageFactory::class,
            Cliente\ClienteDeletePageAction::class => Cliente\Factory\ClienteDeletePageFactory::class,
            Contato\ContatoListPageAction::class => Contato\Factory\ContatoListPageFactory::class,
            Contato\ContatoCreatePageAction::class => Contato\Factory\ContatoCreatePageFactory::class,
            Contato\ContatoUpdatePageAction::class => Contato\Factory\ContatoUpdatePageFactory::class,
            Contato\ContatoDeletePageAction::class => Contato\Factory\ContatoDeletePageFactory::class,
            Tag\TagListPageAction::class => Tag\Factory\TagListPageFactory::class,
            Tag\TagCreatePageAction::class => Tag\Factory\TagCreatePageFactory::class,
            Tag\TagUpdatePageAction::class => Tag\Factory\TagUpdatePageFactory::class,
            Tag\TagDeletePageAction::class => Tag\Factory\TagDeletePageFactory::class,
            Campanha\CampanhaListPageAction::class => Campanha\Factory\CampanhaListPageFactory::class,
            Campanha\CampanhaCreatePageAction::class => Campanha\Factory\CampanhaCreatePageFactory::class,
            Campanha\CampanhaDeletePageAction::class => Campanha\Factory\CampanhaDeletePageFactory::class,
            Campanha\CampanhaUpdatePageAction::class => Campanha\Factory\CampanhaUpdatePageFactory::class,
            Campanha\CampanhaSenderPageAction::class => Campanha\Factory\CampanhaSenderPageFactory::class,
            Campanha\CampanhaReportAction::class => Campanha\Factory\CampanhaReportFactory::class,
        ],
    ],

    'routes' => [
        [
            'name' => 'home',
            'path' => '/',
            'middleware' => HomePageAction::class,
            'allowed_methods' => ['GET'],
        ],
        [
            'name' => 'api.ping',
            'path' => '/api/ping',
            'middleware' => PingAction::class,
            'allowed_methods' => ['GET'],
        ],
        [
            'name' => 'teste',
            'path' => '/teste',
            'middleware' => TestePageAction::class,
            'allowed_methods' => ['GET'],
        ],
        [
            'name' => 'auth.login',
            'path' => '/auth/login',
            'middleware' => LoginPageAction::class,
            'allowed_methods' => ['GET', 'POST'],
        ],
        [
            'name' => 'auth.logout',
            'path' => '/auth/logout',
            'middleware' => LogoutAction::class,
            'allowed_methods' => ['GET', 'POST'],
        ],
        [
            'name' => 'cliente.list',
            'path' => '/admin/clientes',
            'middleware' => Cliente\ClienteListPageAction::class,
            'allowed_methods' => ['GET'],
        ],
        [
            'name' => 'cliente.create',
            'path' => '/admin/cliente/create',
            'middleware' => Cliente\ClienteCreatePageAction::class,
            'allowed_methods' => ['GET','POST'],
        ],
        [
            'name' => 'cliente.update',
            'path' => '/admin/cliente/update/{id}',
            'middleware' => Cliente\ClienteUpdatePageAction::class,
            'allowed_methods' => ['GET','PUT'],
            'options' => [
                'tokens' => [
                    'id' => '\d+'
                ]
            ],
        ],
        [
            'name' => 'cliente.delete',
            'path' => '/admin/cliente/{id}/delete',
            'middleware' => Cliente\ClienteDeletePageAction::class,
            'allowed_methods' => ['GET','DELETE'],
            'options' => [
                'tokens' => [
                    'id' => '\d+'
                ]
            ],
        ],
        [
            'name' => 'contato.list',
            'path' => '/admin/contatos',
            'middleware' => Contato\ContatoListPageAction::class,
            'allowed_methods' => ['GET'],
        ],
        [
            'name' => 'contato.create',
            'path' => '/admin/contato/create',
            'middleware' => Contato\ContatoCreatePageAction::class,
            'allowed_methods' => ['GET','POST'],
        ],
        [
            'name' => 'contato.update',
            'path' => '/admin/contato/update/{id}',
            'middleware' => Contato\ContatoUpdatePageAction::class,
            'allowed_methods' => ['GET','PUT'],
            'options' => [
                'tokens' => [
                    'id' => '\d+'
                ]
            ],
        ],
        [
            'name' => 'contato.delete',
            'path' => '/admin/contato/{id}/delete',
            'middleware' => Contato\ContatoDeletePageAction::class,
            'allowed_methods' => ['GET','DELETE'],
            'options' => [
                'tokens' => [
                    'id' => '\d+'
                ]
            ],
        ],
        [
            'name' => 'tag.list',
            'path' => '/admin/tags',
            'middleware' => Tag\TagListPageAction::class,
            'allowed_methods' => ['GET'],
        ],
        [
            'name' => 'tag.create',
            'path' => '/admin/tag/create',
            'middleware' => Tag\TagCreatePageAction::class,
            'allowed_methods' => ['GET','POST'],
        ],
        [
            'name' => 'tag.update',
            'path' => '/admin/tag/update/{id}',
            'middleware' => Tag\TagUpdatePageAction::class,
            'allowed_methods' => ['GET','PUT'],
            'options' => [
                'tokens' => [
                    'id' => '\d+'
                ]
            ],
        ],
        [
            'name' => 'tag.delete',
            'path' => '/admin/tag/{id}/delete',
            'middleware' => Tag\TagDeletePageAction::class,
            'allowed_methods' => ['GET','DELETE'],
            'options' => [
                'tokens' => [
                    'id' => '\d+'
                ]
            ],
        ],

        [
            'name' => 'campanha.list',
            'path' => '/admin/campanhas',
            'middleware' => Campanha\CampanhaListPageAction::class,
            'allowed_methods' => ['GET'],
        ],
        [
            'name' => 'campanha.create',
            'path' => '/admin/campanha/create',
            'middleware' => Campanha\CampanhaCreatePageAction::class,
            'allowed_methods' => ['GET','POST'],
        ],
        [
            'name' => 'campanha.update',
            'path' => '/admin/campanha/update/{id}',
            'middleware' => Campanha\CampanhaUpdatePageAction::class,
            'allowed_methods' => ['GET','PUT'],
            'options' => [
                'tokens' => [
                    'id' => '\d+'
                ]
            ],
        ],
        [
            'name' => 'campanha.delete',
            'path' => '/admin/campanha/{id}/delete',
            'middleware' => Campanha\CampanhaDeletePageAction::class,
            'allowed_methods' => ['GET','DELETE'],
            'options' => [
                'tokens' => [
                    'id' => '\d+'
                ]
            ],
        ],
        [
            'name' => 'campanha.sender',
            'path' => '/admin/campanha/{id}/sender',
            'middleware' => Campanha\CampanhaSenderPageAction::class,
            'allowed_methods' => ['GET','POST'],
            'options' => [
                'tokens' => [
                    'id' => '\d+'
                ]
            ],
        ],
        [
            'name' => 'campanha.report',
            'path' => '/admin/campanha/{id}/report',
            'middleware' => Campanha\CampanhaReportAction::class,
            'allowed_methods' => ['GET'],
            'options' => [
                'tokens' => [
                    'id' => '\d+'
                ]
            ],
        ],
    ],
];


text:
deps := deps
doc := doc
mod_name := death_inventory_drop
mods := mods
release := release
release_name := death-inventor-drop

all: doc

clean:
	$(RM) -R $(doc)

.PHONY: doc
doc:
	ldoc --dir=$(doc) mods/$(mod_name)

.PHONY: release
release:
	# Prepare the directory structure.
	mkdir -p $(release)/
	mkdir -p $(release)/$(release_name)/
	mkdir -p $(release)/$(release_name)/mods/

	# Copy the dependencies.
	cp -R $(deps)/utils/utils $(release)/$(release_name)/mods/

	# Copy the mods.
	cp -R $(mods)/$(mod_name) $(release)/$(release_name)/mods/

	# Copy the files.
	cp LICENSE $(release)/$(release_name)/
	cp README $(release)/$(release_name)/

	tar -c --xz -C $(release) -f $(release)/$(release_name).tar.xz $(release_name)/
	tar -c --gz -C $(release) -f $(release)/$(release_name).tar.gz $(release_name)/
	cd $(release); zip -r -9 $(release_name).zip $(release_name); cd -

.PHONY: update-deps
update-deps:
	git submodule foreach git pull origin master
	git add $(deps)/
	git commit -m "Updated dependencies."


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

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>VariableInfo (JSP 2.3 API Documentation - Apache Tomcat 9.0.0.M11)</title>
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

JSP 2.3 - Apache Tomcat 9.0.0.M11

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

javax.servlet.jsp.tagext

Class VariableInfo

java.lang.Object

javax.servlet.jsp.tagext.VariableInfo

public class VariableInfo
extends java.lang.Object

Information on the scripting variables that are created/modified by a tag (at
 run-time). This information is provided by TagExtraInfo classes and it is
 used by the translation phase of JSP.

 Scripting variables generated by a custom action have an associated scope of
 either AT_BEGIN, NESTED, or AT_END.

 The class name (VariableInfo.getClassName) in the returned objects is used to
 determine the types of the scripting variables. Note that because scripting
 variables are assigned their values from scoped attributes which cannot be of
 primitive types, "boxed" types such as
 java.lang.Integer must be used instead of primitives.

 The class name may be a Fully Qualified Class Name, or a short class name.

 If a Fully Qualified Class Name is provided, it should refer to a class that
 should be in the CLASSPATH for the Web Application (see Servlet 2.4
 specification - essentially it is WEB-INF/lib and WEB-INF/classes). Failure
 to be so will lead to a translation-time error.

 If a short class name is given in the VariableInfo objects, then the class
 name must be that of a public class in the context of the import directives
 of the page where the custom action appears. The class must also be in the
 CLASSPATH for the Web Application (see Servlet 2.4 specification -
 essentially it is WEB-INF/lib and WEB-INF/classes). Failure to be so will
 lead to a translation-time error.

 Usage Comments

 Frequently a fully qualified class name will refer to a class that is known
 to the tag library and thus, delivered in the same JAR file as the tag
 handlers. In most other remaining cases it will refer to a class that is in
 the platform on which the JSP processor is built (like J2EE). Using fully
 qualified class names in this manner makes the usage relatively resistant to
 configuration errors.

 A short name is usually generated by the tag library based on some attributes
 passed through from the custom action user (the author), and it is thus less
 robust: for instance a missing import directive in the referring JSP page
 will lead to an invalid short name class and a translation error.

 Synchronization Protocol

 The result of the invocation on getVariableInfo is an array of VariableInfo
 objects. Each such object describes a scripting variable by providing its
 name, its type, whether the variable is new or not, and what its scope is.
 Scope is best described through a picture:

 The JSP 2.0 specification defines the interpretation of 3 values:

NESTED, if the scripting variable is available between the start tag and
 the end tag of the action that defines it.

AT_BEGIN, if the scripting variable is available from the start tag of
 the action that defines it until the end of the scope.

AT_END, if the scripting variable is available after the end tag of the
 action that defines it until the end of the scope.

 The scope value for a variable implies what methods may affect its value and
 thus where synchronization is needed as illustrated by the table below.
 Note: the synchronization of the variable(s) will occur after
 the respective method has been called.

   Variable Synchronization Points

 doStartTag()
 doInitBody()
 doAfterBody()
 doEndTag()
 doTag()

 Tag

 AT_BEGIN, NESTED

 AT_BEGIN, AT_END

 IterationTag

 AT_BEGIN, NESTED

 AT_BEGIN, NESTED

 AT_BEGIN, AT_END

 BodyTag

 AT_BEGIN,
 NESTED1

 AT_BEGIN,
 NESTED1

 AT_BEGIN, NESTED

 AT_BEGIN, AT_END

 SimpleTag

 AT_BEGIN, AT_END

 1 Called after doStartTag() if
 EVAL_BODY_INCLUDE is returned, or after
 doInitBody() otherwise.

 Variable Information in the TLD

 Scripting variable information can also be encoded directly for most cases
 into the Tag Library Descriptor using the <variable> subelement of the
 <tag> element. See the JSP specification.

Field Summary

Fields

Modifier and Type
Field and Description

static int
AT_BEGIN

Scope information that scripting variable is visible after start tag.

static int
AT_END

Scope information that scripting variable is visible after end tag.

static int
NESTED

Scope information that scripting variable is visible only within the
 start/end tags.

Constructor Summary

Constructors

Constructor and Description

VariableInfo(java.lang.String varName,
            java.lang.String className,
            boolean declare,
            int scope)

Constructor These objects can be created (at translation time) by the
 TagExtraInfo instances.

Method Summary

All Methods Instance Methods Concrete Methods

Modifier and Type
Method and Description

java.lang.String
getClassName()

Returns the type of this variable.

boolean
getDeclare()

Returns whether this is a new variable.

int
getScope()

Returns the lexical scope of the variable.

java.lang.String
getVarName()

Returns the name of the scripting variable.

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

NESTED

public static final int NESTED

Scope information that scripting variable is visible only within the
 start/end tags.

See Also:

Constant Field Values

AT_BEGIN

public static final int AT_BEGIN

Scope information that scripting variable is visible after start tag.

See Also:

Constant Field Values

AT_END

public static final int AT_END

Scope information that scripting variable is visible after end tag.

See Also:

Constant Field Values

Constructor Detail

VariableInfo

public VariableInfo(java.lang.String varName,
                    java.lang.String className,
                    boolean declare,
                    int scope)

Constructor These objects can be created (at translation time) by the
 TagExtraInfo instances.

Parameters:

varName - The name of the scripting variable

className - The type of this variable

declare - If true, it is a new variable (in some languages this will
            require a declaration)

scope - Indication on the lexical scope of the variable

Method Detail

getVarName

public java.lang.String getVarName()

Returns the name of the scripting variable.

Returns:

the name of the scripting variable

getClassName

public java.lang.String getClassName()

Returns the type of this variable.

Returns:

the type of this variable

getDeclare

public boolean getDeclare()

Returns whether this is a new variable. If so, in some languages this
 will require a declaration.

Returns:

whether this is a new variable.

getScope

public int getScope()

Returns the lexical scope of the variable.

Returns:

the lexical scope of the variable, either AT_BEGIN, AT_END, or
         NESTED.

See Also:

AT_BEGIN,
AT_END,
NESTED

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

JSP 2.3 - Apache Tomcat 9.0.0.M11

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.


text:
- + validity checks in Status.Step instances
- + validity checks at field/parse level

## refactors

- use DMaps in place of Left/Right Nothing/Just in reflex code


text:
#include <iostream>
#include <string>

#include "sbml/SBMLTypes.h"
#include "sbml/packages/layout/common/LayoutExtensionTypes.h"

#if (!defined LIBSBML_HAS_PACKAGE_LAYOUT)
#error "This example requires libSBML to be built with the layout extension."
#endif

using namespace std;
LIBSBML_CPP_NAMESPACE_USE

int main(int argc, char** argv){

  if (argc != 2)
  {
    cout << endl << "Usage: addLayout input-filename"
         << endl << endl;
    return 2;
  }

  SBMLDocument *d = readSBML(argv[1]);
  if ( d->getNumErrors() > 0)
  {
    d->printErrors();
  }
  else
  {
    // enable the layout package
    // note layout in L2 uses a different namespace than L3
    if (d->getLevel() == 2)
    {
      d->enablePackage(LayoutExtension::getXmlnsL2(), "layout",  true);
    }
    else if (d->getLevel() == 3)
    {
      d->enablePackage(LayoutExtension::getXmlnsL3V1V1(), "layout",  true);
    }

    // get the model plugin
    Model * model = d->getModel();

    LayoutModelPlugin* mplugin
      = static_cast<LayoutModelPlugin*>(model->getPlugin("layout"));

    // create the Layout
    LayoutPkgNamespaces layoutns(d->getLevel(), d->getVersion());
    Layout* layout = mplugin->createLayout();

    layout->setId("Layout_1");
    Dimensions dim(&layoutns, 400.0, 220.0);
    layout->setDimensions(&dim);

    // write out the model
    writeSBML(d, "added-layout.xml");
  }
}


text:
import React from 'react';
import PropTypes from 'prop-types';
import ReactCSSTransitionGroup from 'react-addons-css-transition-group';
import Avatar from 'material-ui/Avatar';

import Navigation from './Navigation';
import s from './Header.css';
import profileImage from './profileImage1.png';

class Header extends React.Component {

  static propTypes = {
    showNav: PropTypes.bool.isRequired,
  }

  constructor(props) {
    super(props);
    this.state = props;
  }

  componentDidMount() {
    window.componentHandler.upgradeElement(this.root);
  }

  componentWillUnmount() {
    window.componentHandler.downgradeElements(this.root);
  }

  handleMouseEnter = () => this.setState({ showNav: true, avatarSize: 120 })

  handleMouseLeave = () => this.setState({ showNav: false, avatarSize: 72 })

  render() {
    const styles = {
      headerBar: {
        height: '56px',
        display: 'flex',
        justifyContent: 'center',
        background: 'inherit',
      },
      wrapper: {
        position: 'absolute',
        zIndex: 99,
        top: '56px',
        width: '100%',
        display: 'flex',
        justifyContent: 'flex-end',
        alignItems: 'center',
        background: 'inherit',
      },
      avatar: {
        zIndex: 100,
        marginTop: `${this.state.showNav ? 56 : 12}px`,
      },
    };

    return (
      <header className={`mdl-layout__header ${s.header}`} ref={node => (this.root = node)}>

          <Avatar src={profileImage} size={this.state.avatarSize} style={styles.avatar} />
            {this.state.showNav &&
              <div className={`mdl-layout__header-row ${s.row}`} style={styles.wrapper}>

                <Navigation />

}

    );
  }
}

Header.defaultProps = {
  showNav: false,
  avatarSize: 72,
};

export default Header;


text:
<?xml version="1.0" encoding="UTF-8"?>
<site>
   <description name="Aspose.Words Java for Eclipse (Maven) - Eclipse Update Site" url="https://repository.aspose.com/list/plugins/aspose-words/eclipse/words-maven/20.10/site.xml">
      Aspose.Words Maven Project wizard creates Maven Project for using
Aspose.Words for Java API within Eclipse IDE.
Aspose.Words for Java is an advanced class library for Java that
enables you to perform a great range of document processing tasks
directly within your Java applications.
Aspose.Words for Java supports processing word (DOC, DOCX, OOXML,
RTF) HTML, OpenDocument, PDF, EPUB, XPS, SWF and all image formats.
With Aspose.Words you can generate, modify, and convert documents
without using Microsoft Word."
Aspose.Words Maven Project wizard fetch and configures the latest
Maven dependency reference of Aspose.Words for Java from the
Aspose Cloud Maven Repository.
The wizard also gives you option to download the Code Examples
to use Aspose.Words for Java API.
   </description>
   <feature url="features/com.aspose.words.java.maven_20.10.0.jar" id="com.aspose.words.java.maven" version="20.10">
      <category name="com.aspose.words.java.maven.category"/>
   </feature>
   <category-def name="com.aspose.words.java.maven.category" label="Aspose.Words Java for Eclipse (Maven)"/>
</site>


text:
<?php

namespace Oro\Bundle\SecurityBundle\Tests\Unit\Validator\Constraints;

use Oro\Bundle\SecurityBundle\Validator\Constraints\NotDangerousProtocol;

class NotDangerousProtocolTest extends \PHPUnit\Framework\TestCase
{
    public function testValidatedBy(): void
    {
        $constraint = new NotDangerousProtocol();
        $this->assertNotEmpty($constraint->message);
        $this->assertNotEmpty($constraint->validator);
        $this->assertEquals($constraint->validator, $constraint->validatedBy());
    }
}


text:
START_ATF_NAMESPACE
    #pragma pack(push, 1)
    struct  _buddy_add_answer_clzo
    {
        bool bAccept;
        unsigned __int16 wAskerIndex;
        unsigned int dwAskerSerial;
    };
    #pragma pack(pop)
END_ATF_NAMESPACE