text:
package org.jivesoftware.openfire.admin;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.jivesoftware.openfire.SessionManager;
import org.jivesoftware.openfire.session.ComponentSession;
import org.jivesoftware.openfire.session.Session;
import org.jivesoftware.util.JiveGlobals;
import org.jivesoftware.util.ParamUtils;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collection;
import java.util.Date;

public final class component_002dsession_002dsummary_jsp extends org.apache.jasper.runtime.HttpJspBase
    implements org.apache.jasper.runtime.JspSourceDependent {

    final int DEFAULT_RANGE = 15;
    final int[] RANGE_PRESETS = {15, 25, 50, 75, 100};

  private static java.util.List _jspx_dependants;

  private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_fmt_message_key_nobody;
  private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_fmt_message_key;
  private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_fmt_param_value_nobody;

  public Object getDependants() {
    return _jspx_dependants;
  }

  public void _jspInit() {
    _jspx_tagPool_fmt_message_key_nobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
    _jspx_tagPool_fmt_message_key = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
    _jspx_tagPool_fmt_param_value_nobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
  }

  public void _jspDestroy() {
    _jspx_tagPool_fmt_message_key_nobody.release();
    _jspx_tagPool_fmt_message_key.release();
    _jspx_tagPool_fmt_param_value_nobody.release();
  }

  public void _jspService(HttpServletRequest request, HttpServletResponse response)
        throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/html");
      pageContext = _jspxFactory.getPageContext(this, request, response,
      			"error.jsp", true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\n\n\n\n\n\n\n\n\n\n");
      out.write('\n');
      out.write('\n');
      org.jivesoftware.util.WebManager admin = null;
      synchronized (_jspx_page_context) {
        admin = (org.jivesoftware.util.WebManager) _jspx_page_context.getAttribute("admin", PageContext.PAGE_SCOPE);
        if (admin == null){
          admin = new org.jivesoftware.util.WebManager();
          _jspx_page_context.setAttribute("admin", admin, PageContext.PAGE_SCOPE);
        }
      }
      out.write('\n');
 admin.init(request, response, session, application, out );
      out.write('\n');
      out.write('\n');
 // Get parameters
    int start = ParamUtils.getIntParameter(request, "start", 0);
    int range = ParamUtils
            .getIntParameter(request, "range", admin.getRowsPerPage("component-session-summary", DEFAULT_RANGE));
    boolean close = ParamUtils.getBooleanParameter(request, "close");
    String jid = ParamUtils.getParameter(request, "jid");

    if (request.getParameter("range") != null) {
        admin.setRowsPerPage("component-session-summary", range);
    }

    // Get the session manager
    SessionManager sessionManager = admin.getSessionManager();

    Collection<ComponentSession> sessions = sessionManager.getComponentSessions();

    // Get the session count
    int sessionCount = sessions.size();

    // Close the external component connection
    if (close) {
        try {
            Session sess = sessionManager.getComponentSession(jid);
            if (sess != null) {
                sess.close();
            }
            // Log the event
            admin.logEvent("closed component session for "+jid, null);
            // wait one second
            Thread.sleep(1000L);
        }
        catch (Exception ignored) {
            // Session might have disappeared on its own
        }
        // redirect back to this page
        response.sendRedirect("component-session-summary.jsp?close=success");
        return;
    }
    // paginator vars
    int numPages = (int) Math.ceil((double) sessionCount / (double) range);
    int curPage = (start / range) + 1;
    int maxIndex = (start + range <= sessionCount ? start + range : sessionCount);

      out.write("\n\n\n    \n        <title>");
      if (_jspx_meth_fmt_message_0(_jspx_page_context))
        return;
      out.write("</title>\n        <meta name=\"pageID\" content=\"component-session-summary\"/>\n    \n    \n\n");
  if ("success".equals(request.getParameter("close"))) {
      out.write("\n\n
\n    ");
      if (_jspx_meth_fmt_message_1(_jspx_page_context))
        return;
      out.write("\n
\n\n");
  }
      out.write("\n\n
\n");
      if (_jspx_meth_fmt_message_2(_jspx_page_context))
        return;
      out.write(": ");
      out.print( sessions.size() );
      out.write("\n\n");
  if (numPages > 1) {
      out.write("\n\n    - ");
      if (_jspx_meth_fmt_message_3(_jspx_page_context))
        return;
      out.write(' ');
      out.print( (start+1) );
      out.write('-');
      out.print( (start+range) );
      out.write('\n');
      out.write('\n');
  }
      out.write("\n - ");
      if (_jspx_meth_fmt_message_4(_jspx_page_context))
        return;
      out.write(":\n<select size=\"1\" onchange=\"location.href='component-session-summary.jsp?start=0&range=' + this.options[this.selectedIndex].value;\">\n\n    ");
 for (int aRANGE_PRESETS : RANGE_PRESETS) {
      out.write("\n\n    <option value=\"");
      out.print( aRANGE_PRESETS );
      out.write("\"\n            ");
      out.print( (aRANGE_PRESETS == range ? "selected" : "") );
      out.write('>');
      out.print( aRANGE_PRESETS );
      out.write("\n    </option>\n\n    ");
 }
      out.write("\n\n</select>\n
\n\n");
  if (numPages > 1) {
      out.write("\n\n
\n    ");
      if (_jspx_meth_fmt_message_5(_jspx_page_context))
        return;
      out.write(":\n    [\n    ");
  for (int i=0; i<numPages; i++) {
            String sep = ((i+1)<numPages) ? " " : "";
            boolean isCurrent = (i+1) == curPage;

      out.write("\n        ");
      out.print( (i+1) );
      out.write("");
      out.print( sep );
      out.write("\n\n    ");
  }
      out.write("\n    ]\n
\n\n");
  }
      out.write("\n\n
\n");
      //  fmt:message
      org.apache.taglibs.standard.tag.rt.fmt.MessageTag _jspx_th_fmt_message_6 = (org.apache.taglibs.standard.tag.rt.fmt.MessageTag) _jspx_tagPool_fmt_message_key.get(org.apache.taglibs.standard.tag.rt.fmt.MessageTag.class);
      _jspx_th_fmt_message_6.setPageContext(_jspx_page_context);
      _jspx_th_fmt_message_6.setParent(null);
      _jspx_th_fmt_message_6.setKey("component.session.summary.info");
      int _jspx_eval_fmt_message_6 = _jspx_th_fmt_message_6.doStartTag();
      if (_jspx_eval_fmt_message_6 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
        if (_jspx_eval_fmt_message_6 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
          out = _jspx_page_context.pushBody();
          _jspx_th_fmt_message_6.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
          _jspx_th_fmt_message_6.doInitBody();
        }
        do {
          out.write("\n    ");
          //  fmt:param
          org.apache.taglibs.standard.tag.rt.fmt.ParamTag _jspx_th_fmt_param_0 = (org.apache.taglibs.standard.tag.rt.fmt.ParamTag) _jspx_tagPool_fmt_param_value_nobody.get(org.apache.taglibs.standard.tag.rt.fmt.ParamTag.class);
          _jspx_th_fmt_param_0.setPageContext(_jspx_page_context);
          _jspx_th_fmt_param_0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_fmt_message_6);
          _jspx_th_fmt_param_0.setValue( "" );
          int _jspx_eval_fmt_param_0 = _jspx_th_fmt_param_0.doStartTag();
          if (_jspx_th_fmt_param_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _jspx_tagPool_fmt_param_value_nobody.reuse(_jspx_th_fmt_param_0);
            return;
          }
          _jspx_tagPool_fmt_param_value_nobody.reuse(_jspx_th_fmt_param_0);
          out.write("\n    ");
          //  fmt:param
          org.apache.taglibs.standard.tag.rt.fmt.ParamTag _jspx_th_fmt_param_1 = (org.apache.taglibs.standard.tag.rt.fmt.ParamTag) _jspx_tagPool_fmt_param_value_nobody.get(org.apache.taglibs.standard.tag.rt.fmt.ParamTag.class);
          _jspx_th_fmt_param_1.setPageContext(_jspx_page_context);
          _jspx_th_fmt_param_1.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_fmt_message_6);
          _jspx_th_fmt_param_1.setValue( "" );
          int _jspx_eval_fmt_param_1 = _jspx_th_fmt_param_1.doStartTag();
          if (_jspx_th_fmt_param_1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _jspx_tagPool_fmt_param_value_nobody.reuse(_jspx_th_fmt_param_1);
            return;
          }
          _jspx_tagPool_fmt_param_value_nobody.reuse(_jspx_th_fmt_param_1);
          out.write('\n');
          int evalDoAfterBody = _jspx_th_fmt_message_6.doAfterBody();
          if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
            break;
        } while (true);
        if (_jspx_eval_fmt_message_6 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE)
          out = _jspx_page_context.popBody();
      }
      if (_jspx_th_fmt_message_6.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
        _jspx_tagPool_fmt_message_key.reuse(_jspx_th_fmt_message_6);
        return;
      }
      _jspx_tagPool_fmt_message_key.reuse(_jspx_th_fmt_message_6);
      out.write("\n
\n\n
\n
\n
\n
\n         	\n        ");
      if (_jspx_meth_fmt_message_7(_jspx_page_context))
        return;
      out.write("	\n        ");
      if (_jspx_meth_fmt_message_8(_jspx_page_context))
        return;
      out.write("	\n        ");
      if (_jspx_meth_fmt_message_9(_jspx_page_context))
        return;
      out.write("	\n        ");
      if (_jspx_meth_fmt_message_10(_jspx_page_context))
        return;
      out.write("	\n        ");
      if (_jspx_meth_fmt_message_11(_jspx_page_context))
        return;
      out.write("	\n        ");
      if (_jspx_meth_fmt_message_12(_jspx_page_context))
        return;
      out.write("	\n        ");
      if (_jspx_meth_fmt_message_13(_jspx_page_context))
        return;
      out.write("	\n
\n
\n
\n    ");
  // Check if no out/in connection to/from a remote server exists
        if (sessions.isEmpty()) {

      out.write("\n
\n            \n\n                ");
      if (_jspx_meth_fmt_message_14(_jspx_page_context))
        return;
      out.write("\n\n            	\n
\n\n    ");
  }
      out.write("\n\n    ");
  int count = 0;
        sessions = new ArrayList<ComponentSession>(sessions).subList(start, maxIndex);
        for (ComponentSession componentSession : sessions) {
            count++;

      out.write("\n
\n        ");
      out.print( count );
      out.write("	\n        \n            ');
      out.print( componentSession.getAddress() );
      out.write("\n        	\n        \n            ");
      out.print( componentSession.getExternalComponent().getName() );
      out.write("\n        	\n        \n            ");
      out.print( componentSession.getExternalComponent().getCategory() );
      out.write("\n        	\n        \n
\n
\n            ");
 if ("gateway".equals(componentSession.getExternalComponent().getCategory())) {
                if ("msn".equals(componentSession.getExternalComponent().getType())) {
      out.write("\n                	\n             ");
 }
                else if ("aim".equals(componentSession.getExternalComponent().getType())) {
      out.write("\n                	\n             ");
 }
                else if ("yahoo".equals(componentSession.getExternalComponent().getType())) {
      out.write("\n                	\n             ");
 }
                else if ("icq".equals(componentSession.getExternalComponent().getType())) {
      out.write("\n                	\n             ");
 }
                else if ("irc".equals(componentSession.getExternalComponent().getType())) {
      out.write("\n                	\n             ");
 }
               }
               else if ("component".equals(componentSession.getExternalComponent().getCategory())) {
                if ("clearspace".equals(componentSession.getExternalComponent().getType().toLowerCase())) {
      out.write("\n                	 \n             ");
 }
               }

      out.write("\n            ");
      out.print( componentSession.getExternalComponent().getType() );
      out.write("	\n

\n        	\n        ");
  Date creationDate = componentSession.getCreationDate();
            Calendar creationCal = Calendar.getInstance();
            creationCal.setTime(creationDate);

            Date lastActiveDate = componentSession.getLastActiveDate();
            Calendar lastActiveCal = Calendar.getInstance();
            lastActiveCal.setTime(lastActiveDate);

            Calendar nowCal = Calendar.getInstance();

            boolean sameCreationDay = nowCal.get(Calendar.DAY_OF_YEAR) == creationCal.get(Calendar.DAY_OF_YEAR) && nowCal.get(Calendar.YEAR) == creationCal.get(Calendar.YEAR);
            boolean sameActiveDay = nowCal.get(Calendar.DAY_OF_YEAR) == lastActiveCal.get(Calendar.DAY_OF_YEAR) && nowCal.get(Calendar.YEAR) == lastActiveCal.get(Calendar.YEAR);

      out.write("\n        \n            ");
      out.print( sameCreationDay ? JiveGlobals.formatTime(creationDate) : JiveGlobals.formatDateTime(creationDate) );
      out.write("\n        	\n        \n            ");
      out.print( sameActiveDay ? JiveGlobals.formatTime(lastActiveDate) : JiveGlobals.formatDateTime(lastActiveDate) );
      out.write("\n        	\n\n        \n            \n        	\n
\n    ");
  }
      out.write("\n\n
\n
\n
\n\n");
  if (numPages > 1) {
      out.write("\n\n
\n    ");
      if (_jspx_meth_fmt_message_18(_jspx_page_context))
        return;
      out.write(":\n    [\n    ");
  for (int i=0; i<numPages; i++) {
            String sep = ((i+1)<numPages) ? " " : "";
            boolean isCurrent = (i+1) == curPage;

      out.write("\n        ");
      out.print( (i+1) );
      out.write("");
      out.print( sep );
      out.write("\n\n    ");
  }
      out.write("\n    ]\n
\n\n");
  }
      out.write("\n\n
\n
\n");
      if (_jspx_meth_fmt_message_19(_jspx_page_context))
        return;
      out.write(':');
      out.write(' ');
      out.print( JiveGlobals.formatDateTime(new Date()) );
      out.write("\n
\n\n    \n");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)){
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }

  private boolean _jspx_meth_fmt_message_0(PageContext _jspx_page_context)
          throws Throwable {
    PageContext pageContext = _jspx_page_context;
    JspWriter out = _jspx_page_context.getOut();
    //  fmt:message
    org.apache.taglibs.standard.tag.rt.fmt.MessageTag _jspx_th_fmt_message_0 = (org.apache.taglibs.standard.tag.rt.fmt.MessageTag) _jspx_tagPool_fmt_message_key_nobody.get(org.apache.taglibs.standard.tag.rt.fmt.MessageTag.class);
    _jspx_th_fmt_message_0.setPageContext(_jspx_page_context);
    _jspx_th_fmt_message_0.setParent(null);
    _jspx_th_fmt_message_0.setKey("component.session.summary.title");
    int _jspx_eval_fmt_message_0 = _jspx_th_fmt_message_0.doStartTag();
    if (_jspx_th_fmt_message_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
      _jspx_tagPool_fmt_message_key_nobody.reuse(_jspx_th_fmt_message_0);
      return true;
    }
    _jspx_tagPool_fmt_message_key_nobody.reuse(_jspx_th_fmt_message_0);
    return false;
  }

  private boolean _jspx_meth_fmt_message_1(PageContext _jspx_page_context)
          throws Throwable {
    PageContext pageContext = _jspx_page_context;
    JspWriter out = _jspx_page_context.getOut();
    //  fmt:message
    org.apache.taglibs.standard.tag.rt.fmt.MessageTag _jspx_th_fmt_message_1 = (org.apache.taglibs.standard.tag.rt.fmt.MessageTag) _jspx_tagPool_fmt_message_key_nobody.get(org.apache.taglibs.standard.tag.rt.fmt.MessageTag.class);
    _jspx_th_fmt_message_1.setPageContext(_jspx_page_context);
    _jspx_th_fmt_message_1.setParent(null);
    _jspx_th_fmt_message_1.setKey("component.session.summary.close");
    int _jspx_eval_fmt_message_1 = _jspx_th_fmt_message_1.doStartTag();
    if (_jspx_th_fmt_message_1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
      _jspx_tagPool_fmt_message_key_nobody.reuse(_jspx_th_fmt_message_1);
      return true;
    }
    _jspx_tagPool_fmt_message_key_nobody.reuse(_jspx_th_fmt_message_1);
    return false;
  }

  private boolean _jspx_meth_fmt_message_2(PageContext _jspx_page_context)
          throws Throwable {
    PageContext pageContext = _jspx_page_context;
    JspWriter out = _jspx_page_context.getOut();
    //  fmt:message
    org.apache.taglibs.standard.tag.rt.fmt.MessageTag _jspx_th_fmt_message_2 = (org.apache.taglibs.standard.tag.rt.fmt.MessageTag) _jspx_tagPool_fmt_message_key_nobody.get(org.apache.taglibs.standard.tag.rt.fmt.MessageTag.class);
    _jspx_th_fmt_message_2.setPageContext(_jspx_page_context);
    _jspx_th_fmt_message_2.setParent(null);
    _jspx_th_fmt_message_2.setKey("component.session.summary.active");
    int _jspx_eval_fmt_message_2 = _jspx_th_fmt_message_2.doStartTag();
    if (_jspx_th_fmt_message_2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
      _jspx_tagPool_fmt_message_key_nobody.reuse(_jspx_th_fmt_message_2);
      return true;
    }
    _jspx_tagPool_fmt_message_key_nobody.reuse(_jspx_th_fmt_message_2);
    return false;
  }

  private boolean _jspx_meth_fmt_message_3(PageContext _jspx_page_context)
          throws Throwable {
    PageContext pageContext = _jspx_page_context;
    JspWriter out = _jspx_page_context.getOut();
    //  fmt:message
    org.apache.taglibs.standard.tag.rt.fmt.MessageTag _jspx_th_fmt_message_3 = (org.apache.taglibs.standard.tag.rt.fmt.MessageTag) _jspx_tagPool_fmt_message_key_nobody.get(org.apache.taglibs.standard.tag.rt.fmt.MessageTag.class);
    _jspx_th_fmt_message_3.setPageContext(_jspx_page_context);
    _jspx_th_fmt_message_3.setParent(null);
    _jspx_th_fmt_message_3.setKey("global.showing");
    int _jspx_eval_fmt_message_3 = _jspx_th_fmt_message_3.doStartTag();
    if (_jspx_th_fmt_message_3.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
      _jspx_tagPool_fmt_message_key_nobody.reuse(_jspx_th_fmt_message_3);
      return true;
    }
    _jspx_tagPool_fmt_message_key_nobody.reuse(_jspx_th_fmt_message_3);
    return false;
  }

  private boolean _jspx_meth_fmt_message_4(PageContext _jspx_page_context)
          throws Throwable {
    PageContext pageContext = _jspx_page_context;
    JspWriter out = _jspx_page_context.getOut();
    //  fmt:message
    org.apache.taglibs.standard.tag.rt.fmt.MessageTag _jspx_th_fmt_message_4 = (org.apache.taglibs.standard.tag.rt.fmt.MessageTag) _jspx_tagPool_fmt_message_key_nobody.get(org.apache.taglibs.standard.tag.rt.fmt.MessageTag.class);
    _jspx_th_fmt_message_4.setPageContext(_jspx_page_context);
    _jspx_th_fmt_message_4.setParent(null);
    _jspx_th_fmt_message_4.setKey("component.session.summary.sessions_per_page");
    int _jspx_eval_fmt_message_4 = _jspx_th_fmt_message_4.doStartTag();
    if (_jspx_th_fmt_message_4.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
      _jspx_tagPool_fmt_message_key_nobody.reuse(_jspx_th_fmt_message_4);
      return true;
    }
    _jspx_tagPool_fmt_message_key_nobody.reuse(_jspx_th_fmt_message_4);
    return false;
  }

  private boolean _jspx_meth_fmt_message_5(PageContext _jspx_page_context)
          throws Throwable {
    PageContext pageContext = _jspx_page_context;
    JspWriter out = _jspx_page_context.getOut();
    //  fmt:message
    org.apache.taglibs.standard.tag.rt.fmt.MessageTag _jspx_th_fmt_message_5 = (org.apache.taglibs.standard.tag.rt.fmt.MessageTag) _jspx_tagPool_fmt_message_key_nobody.get(org.apache.taglibs.standard.tag.rt.fmt.MessageTag.class);
    _jspx_th_fmt_message_5.setPageContext(_jspx_page_context);
    _jspx_th_fmt_message_5.setParent(null);
    _jspx_th_fmt_message_5.setKey("global.pages");
    int _jspx_eval_fmt_message_5 = _jspx_th_fmt_message_5.doStartTag();
    if (_jspx_th_fmt_message_5.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
      _jspx_tagPool_fmt_message_key_nobody.reuse(_jspx_th_fmt_message_5);
      return true;
    }
    _jspx_tagPool_fmt_message_key_nobody.reuse(_jspx_th_fmt_message_5);
    return false;
  }

  private boolean _jspx_meth_fmt_message_7(PageContext _jspx_page_context)
          throws Throwable {
    PageContext pageContext = _jspx_page_context;
    JspWriter out = _jspx_page_context.getOut();
    //  fmt:message
    org.apache.taglibs.standard.tag.rt.fmt.MessageTag _jspx_th_fmt_message_7 = (org.apache.taglibs.standard.tag.rt.fmt.MessageTag) _jspx_tagPool_fmt_message_key_nobody.get(org.apache.taglibs.standard.tag.rt.fmt.MessageTag.class);
    _jspx_th_fmt_message_7.setPageContext(_jspx_page_context);
    _jspx_th_fmt_message_7.setParent(null);
    _jspx_th_fmt_message_7.setKey("component.session.label.domain");
    int _jspx_eval_fmt_message_7 = _jspx_th_fmt_message_7.doStartTag();
    if (_jspx_th_fmt_message_7.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
      _jspx_tagPool_fmt_message_key_nobody.reuse(_jspx_th_fmt_message_7);
      return true;
    }
    _jspx_tagPool_fmt_message_key_nobody.reuse(_jspx_th_fmt_message_7);
    return false;
  }

  private boolean _jspx_meth_fmt_message_8(PageContext _jspx_page_context)
          throws Throwable {
    PageContext pageContext = _jspx_page_context;
    JspWriter out = _jspx_page_context.getOut();
    //  fmt:message
    org.apache.taglibs.standard.tag.rt.fmt.MessageTag _jspx_th_fmt_message_8 = (org.apache.taglibs.standard.tag.rt.fmt.MessageTag) _jspx_tagPool_fmt_message_key_nobody.get(org.apache.taglibs.standard.tag.rt.fmt.MessageTag.class);
    _jspx_th_fmt_message_8.setPageContext(_jspx_page_context);
    _jspx_th_fmt_message_8.setParent(null);
    _jspx_th_fmt_message_8.setKey("component.session.label.name");
    int _jspx_eval_fmt_message_8 = _jspx_th_fmt_message_8.doStartTag();
    if (_jspx_th_fmt_message_8.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
      _jspx_tagPool_fmt_message_key_nobody.reuse(_jspx_th_fmt_message_8);
      return true;
    }
    _jspx_tagPool_fmt_message_key_nobody.reuse(_jspx_th_fmt_message_8);
    return false;
  }

  private boolean _jspx_meth_fmt_message_9(PageContext _jspx_page_context)
          throws Throwable {
    PageContext pageContext = _jspx_page_context;
    JspWriter out = _jspx_page_context.getOut();
    //  fmt:message
    org.apache.taglibs.standard.tag.rt.fmt.MessageTag _jspx_th_fmt_message_9 = (org.apache.taglibs.standard.tag.rt.fmt.MessageTag) _jspx_tagPool_fmt_message_key_nobody.get(org.apache.taglibs.standard.tag.rt.fmt.MessageTag.class);
    _jspx_th_fmt_message_9.setPageContext(_jspx_page_context);
    _jspx_th_fmt_message_9.setParent(null);
    _jspx_th_fmt_message_9.setKey("component.session.label.category");
    int _jspx_eval_fmt_message_9 = _jspx_th_fmt_message_9.doStartTag();
    if (_jspx_th_fmt_message_9.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
      _jspx_tagPool_fmt_message_key_nobody.reuse(_jspx_th_fmt_message_9);
      return true;
    }
    _jspx_tagPool_fmt_message_key_nobody.reuse(_jspx_th_fmt_message_9);
    return false;
  }

  private boolean _jspx_meth_fmt_message_10(PageContext _jspx_page_context)
          throws Throwable {
    PageContext pageContext = _jspx_page_context;
    JspWriter out = _jspx_page_context.getOut();
    //  fmt:message
    org.apache.taglibs.standard.tag.rt.fmt.MessageTag _jspx_th_fmt_message_10 = (org.apache.taglibs.standard.tag.rt.fmt.MessageTag) _jspx_tagPool_fmt_message_key_nobody.get(org.apache.taglibs.standard.tag.rt.fmt.MessageTag.class);
    _jspx_th_fmt_message_10.setPageContext(_jspx_page_context);
    _jspx_th_fmt_message_10.setParent(null);
    _jspx_th_fmt_message_10.setKey("component.session.label.type");
    int _jspx_eval_fmt_message_10 = _jspx_th_fmt_message_10.doStartTag();
    if (_jspx_th_fmt_message_10.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
      _jspx_tagPool_fmt_message_key_nobody.reuse(_jspx_th_fmt_message_10);
      return true;
    }
    _jspx_tagPool_fmt_message_key_nobody.reuse(_jspx_th_fmt_message_10);
    return false;
  }

  private boolean _jspx_meth_fmt_message_11(PageContext _jspx_page_context)
          throws Throwable {
    PageContext pageContext = _jspx_page_context;
    JspWriter out = _jspx_page_context.getOut();
    //  fmt:message
    org.apache.taglibs.standard.tag.rt.fmt.MessageTag _jspx_th_fmt_message_11 = (org.apache.taglibs.standard.tag.rt.fmt.MessageTag) _jspx_tagPool_fmt_message_key_nobody.get(org.apache.taglibs.standard.tag.rt.fmt.MessageTag.class);
    _jspx_th_fmt_message_11.setPageContext(_jspx_page_context);
    _jspx_th_fmt_message_11.setParent(null);
    _jspx_th_fmt_message_11.setKey("component.session.label.creation");
    int _jspx_eval_fmt_message_11 = _jspx_th_fmt_message_11.doStartTag();
    if (_jspx_th_fmt_message_11.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
      _jspx_tagPool_fmt_message_key_nobody.reuse(_jspx_th_fmt_message_11);
      return true;
    }
    _jspx_tagPool_fmt_message_key_nobody.reuse(_jspx_th_fmt_message_11);
    return false;
  }

  private boolean _jspx_meth_fmt_message_12(PageContext _jspx_page_context)
          throws Throwable {
    PageContext pageContext = _jspx_page_context;
    JspWriter out = _jspx_page_context.getOut();
    //  fmt:message
    org.apache.taglibs.standard.tag.rt.fmt.MessageTag _jspx_th_fmt_message_12 = (org.apache.taglibs.standard.tag.rt.fmt.MessageTag) _jspx_tagPool_fmt_message_key_nobody.get(org.apache.taglibs.standard.tag.rt.fmt.MessageTag.class);
    _jspx_th_fmt_message_12.setPageContext(_jspx_page_context);
    _jspx_th_fmt_message_12.setParent(null);
    _jspx_th_fmt_message_12.setKey("component.session.label.last_active");
    int _jspx_eval_fmt_message_12 = _jspx_th_fmt_message_12.doStartTag();
    if (_jspx_th_fmt_message_12.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
      _jspx_tagPool_fmt_message_key_nobody.reuse(_jspx_th_fmt_message_12);
      return true;
    }
    _jspx_tagPool_fmt_message_key_nobody.reuse(_jspx_th_fmt_message_12);
    return false;
  }

  private boolean _jspx_meth_fmt_message_13(PageContext _jspx_page_context)
          throws Throwable {
    PageContext pageContext = _jspx_page_context;
    JspWriter out = _jspx_page_context.getOut();
    //  fmt:message
    org.apache.taglibs.standard.tag.rt.fmt.MessageTag _jspx_th_fmt_message_13 = (org.apache.taglibs.standard.tag.rt.fmt.MessageTag) _jspx_tagPool_fmt_message_key_nobody.get(org.apache.taglibs.standard.tag.rt.fmt.MessageTag.class);
    _jspx_th_fmt_message_13.setPageContext(_jspx_page_context);
    _jspx_th_fmt_message_13.setParent(null);
    _jspx_th_fmt_message_13.setKey("component.session.label.close_connect");
    int _jspx_eval_fmt_message_13 = _jspx_th_fmt_message_13.doStartTag();
    if (_jspx_th_fmt_message_13.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
      _jspx_tagPool_fmt_message_key_nobody.reuse(_jspx_th_fmt_message_13);
      return true;
    }
    _jspx_tagPool_fmt_message_key_nobody.reuse(_jspx_th_fmt_message_13);
    return false;
  }

  private boolean _jspx_meth_fmt_message_14(PageContext _jspx_page_context)
          throws Throwable {
    PageContext pageContext = _jspx_page_context;
    JspWriter out = _jspx_page_context.getOut();
    //  fmt:message
    org.apache.taglibs.standard.tag.rt.fmt.MessageTag _jspx_th_fmt_message_14 = (org.apache.taglibs.standard.tag.rt.fmt.MessageTag) _jspx_tagPool_fmt_message_key_nobody.get(org.apache.taglibs.standard.tag.rt.fmt.MessageTag.class);
    _jspx_th_fmt_message_14.setPageContext(_jspx_page_context);
    _jspx_th_fmt_message_14.setParent(null);
    _jspx_th_fmt_message_14.setKey("component.session.summary.not_session");
    int _jspx_eval_fmt_message_14 = _jspx_th_fmt_message_14.doStartTag();
    if (_jspx_th_fmt_message_14.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
      _jspx_tagPool_fmt_message_key_nobody.reuse(_jspx_th_fmt_message_14);
      return true;
    }
    _jspx_tagPool_fmt_message_key_nobody.reuse(_jspx_th_fmt_message_14);
    return false;
  }

  private boolean _jspx_meth_fmt_message_15(PageContext _jspx_page_context)
          throws Throwable {
    PageContext pageContext = _jspx_page_context;
    JspWriter out = _jspx_page_context.getOut();
    //  fmt:message
    org.apache.taglibs.standard.tag.rt.fmt.MessageTag _jspx_th_fmt_message_15 = (org.apache.taglibs.standard.tag.rt.fmt.MessageTag) _jspx_tagPool_fmt_message_key_nobody.get(org.apache.taglibs.standard.tag.rt.fmt.MessageTag.class);
    _jspx_th_fmt_message_15.setPageContext(_jspx_page_context);
    _jspx_th_fmt_message_15.setParent(null);
    _jspx_th_fmt_message_15.setKey("session.row.cliked");
    int _jspx_eval_fmt_message_15 = _jspx_th_fmt_message_15.doStartTag();
    if (_jspx_th_fmt_message_15.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
      _jspx_tagPool_fmt_message_key_nobody.reuse(_jspx_th_fmt_message_15);
      return true;
    }
    _jspx_tagPool_fmt_message_key_nobody.reuse(_jspx_th_fmt_message_15);
    return false;
  }

  private boolean _jspx_meth_fmt_message_16(PageContext _jspx_page_context)
          throws Throwable {
    PageContext pageContext = _jspx_page_context;
    JspWriter out = _jspx_page_context.getOut();
    //  fmt:message
    org.apache.taglibs.standard.tag.rt.fmt.MessageTag _jspx_th_fmt_message_16 = (org.apache.taglibs.standard.tag.rt.fmt.MessageTag) _jspx_tagPool_fmt_message_key_nobody.get(org.apache.taglibs.standard.tag.rt.fmt.MessageTag.class);
    _jspx_th_fmt_message_16.setPageContext(_jspx_page_context);
    _jspx_th_fmt_message_16.setParent(null);
    _jspx_th_fmt_message_16.setKey("session.row.cliked_kill_session");
    int _jspx_eval_fmt_message_16 = _jspx_th_fmt_message_16.doStartTag();
    if (_jspx_th_fmt_message_16.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
      _jspx_tagPool_fmt_message_key_nobody.reuse(_jspx_th_fmt_message_16);
      return true;
    }
    _jspx_tagPool_fmt_message_key_nobody.reuse(_jspx_th_fmt_message_16);
    return false;
  }

  private boolean _jspx_meth_fmt_message_17(PageContext _jspx_page_context)
          throws Throwable {
    PageContext pageContext = _jspx_page_context;
    JspWriter out = _jspx_page_context.getOut();
    //  fmt:message
    org.apache.taglibs.standard.tag.rt.fmt.MessageTag _jspx_th_fmt_message_17 = (org.apache.taglibs.standard.tag.rt.fmt.MessageTag) _jspx_tagPool_fmt_message_key_nobody.get(org.apache.taglibs.standard.tag.rt.fmt.MessageTag.class);
    _jspx_th_fmt_message_17.setPageContext(_jspx_page_context);
    _jspx_th_fmt_message_17.setParent(null);
    _jspx_th_fmt_message_17.setKey("session.row.confirm_close");
    int _jspx_eval_fmt_message_17 = _jspx_th_fmt_message_17.doStartTag();
    if (_jspx_th_fmt_message_17.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
      _jspx_tagPool_fmt_message_key_nobody.reuse(_jspx_th_fmt_message_17);
      return true;
    }
    _jspx_tagPool_fmt_message_key_nobody.reuse(_jspx_th_fmt_message_17);
    return false;
  }

  private boolean _jspx_meth_fmt_message_18(PageContext _jspx_page_context)
          throws Throwable {
    PageContext pageContext = _jspx_page_context;
    JspWriter out = _jspx_page_context.getOut();
    //  fmt:message
    org.apache.taglibs.standard.tag.rt.fmt.MessageTag _jspx_th_fmt_message_18 = (org.apache.taglibs.standard.tag.rt.fmt.MessageTag) _jspx_tagPool_fmt_message_key_nobody.get(org.apache.taglibs.standard.tag.rt.fmt.MessageTag.class);
    _jspx_th_fmt_message_18.setPageContext(_jspx_page_context);
    _jspx_th_fmt_message_18.setParent(null);
    _jspx_th_fmt_message_18.setKey("global.pages");
    int _jspx_eval_fmt_message_18 = _jspx_th_fmt_message_18.doStartTag();
    if (_jspx_th_fmt_message_18.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
      _jspx_tagPool_fmt_message_key_nobody.reuse(_jspx_th_fmt_message_18);
      return true;
    }
    _jspx_tagPool_fmt_message_key_nobody.reuse(_jspx_th_fmt_message_18);
    return false;
  }

  private boolean _jspx_meth_fmt_message_19(PageContext _jspx_page_context)
          throws Throwable {
    PageContext pageContext = _jspx_page_context;
    JspWriter out = _jspx_page_context.getOut();
    //  fmt:message
    org.apache.taglibs.standard.tag.rt.fmt.MessageTag _jspx_th_fmt_message_19 = (org.apache.taglibs.standard.tag.rt.fmt.MessageTag) _jspx_tagPool_fmt_message_key_nobody.get(org.apache.taglibs.standard.tag.rt.fmt.MessageTag.class);
    _jspx_th_fmt_message_19.setPageContext(_jspx_page_context);
    _jspx_th_fmt_message_19.setParent(null);
    _jspx_th_fmt_message_19.setKey("component.session.summary.last_update");
    int _jspx_eval_fmt_message_19 = _jspx_th_fmt_message_19.doStartTag();
    if (_jspx_th_fmt_message_19.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
      _jspx_tagPool_fmt_message_key_nobody.reuse(_jspx_th_fmt_message_19);
      return true;
    }
    _jspx_tagPool_fmt_message_key_nobody.reuse(_jspx_th_fmt_message_19);
    return false;
  }
}


text:
package org.scalatest.examples.fixture.testdatafixture

import org.scalatest._

class ExampleSpec extends fixture.FlatSpec with fixture.TestDataFixture {

  "Accessing the test data" should "be easy!" in { td =>
    assert(td.name == "Accessing the test data should be easy!")
  }

  it should "be fun!" in { td =>
    assert(td.name == "Accessing the test data should be fun!")
  }
}

redpajama_set_name: RedPajamaGithub


text:
  {{app.name}}

      Sign in

    <form name="form" class="form-validation">

          {{authError}}

          <input type="email" placeholder="Email" class="form-control no-border" ng-model="user.email" required>

           <input type="password" placeholder="Password" class="form-control no-border" ng-model="user.password" required>

      <button type="submit" class="btn btn-lg btn-primary btn-block" ng-click="login()" ng-disabled='form.$invalid'>Log in</button>
    </form>


text:
     && (defined(__x86_64__) ||  defined(__mips64) ||  defined(__aarch64__))
#define CAN_SANITIZE_LEAKS 1
#else
#define CAN_SANITIZE_LEAKS 0
#endif

namespace __sanitizer {
class FlagParser;
struct DTLS;
}

namespace __lsan {

// Chunk tags.
enum ChunkTag {
  kDirectlyLeaked = 0,  // default
  kIndirectlyLeaked = 1,
  kReachable = 2,
  kIgnored = 3
};

struct Flags {
#define LSAN_FLAG(Type, Name, DefaultValue, Description) Type Name;
#include "lsan_flags.inc"
#undef LSAN_FLAG

  void SetDefaults();
  uptr pointer_alignment() const {
    return use_unaligned ? 1 : sizeof(uptr);
  }
};

extern Flags lsan_flags;
inline Flags *flags() { return &lsan_flags; }
void RegisterLsanFlags(FlagParser *parser, Flags *f);

struct Leak {
  u32 id;
  uptr hit_count;
  uptr total_size;
  u32 stack_trace_id;
  bool is_directly_leaked;
  bool is_suppressed;
};

struct LeakedObject {
  u32 leak_id;
  uptr addr;
  uptr size;
};

// Aggregates leaks by stack trace prefix.
class LeakReport {
 public:
  LeakReport() : next_id_(0), leaks_(1), leaked_objects_(1) {}
  void AddLeakedChunk(uptr chunk, u32 stack_trace_id, uptr leaked_size,
                      ChunkTag tag);
  void ReportTopLeaks(uptr max_leaks);
  void PrintSummary();
  void ApplySuppressions();
  uptr UnsuppressedLeakCount();

 private:
  void PrintReportForLeak(uptr index);
  void PrintLeakedObjectsForLeak(uptr index);

  u32 next_id_;
  InternalMmapVector<Leak> leaks_;
  InternalMmapVector<LeakedObject> leaked_objects_;
};

typedef InternalMmapVector<uptr> Frontier;

// Platform-specific functions.
void InitializePlatformSpecificModules();
void ProcessGlobalRegions(Frontier *frontier);
void ProcessPlatformSpecificAllocations(Frontier *frontier);
// Run stoptheworld while holding any platform-specific locks.
void DoStopTheWorld(StopTheWorldCallback callback, void* argument);

void ScanRangeForPointers(uptr begin, uptr end,
                          Frontier *frontier,
                          const char *region_type, ChunkTag tag);

enum IgnoreObjectResult {
  kIgnoreObjectSuccess,
  kIgnoreObjectAlreadyIgnored,
  kIgnoreObjectInvalid
};

// Functions called from the parent tool.
void InitCommonLsan();
void DoLeakCheck();
bool DisabledInThisThread();

// Used to implement __lsan::ScopedDisabler.
void DisableInThisThread();
void EnableInThisThread();
// Can be used to ignore memory allocated by an intercepted
// function.
struct ScopedInterceptorDisabler {
  ScopedInterceptorDisabler() { DisableInThisThread(); }
  ~ScopedInterceptorDisabler() { EnableInThisThread(); }
};

// Special case for "new T[0]" where T is a type with DTOR.
// new T[0] will allocate one word for the array size (0) and store a pointer
// to the end of allocated chunk.
inline bool IsSpecialCaseOfOperatorNew0(uptr chunk_beg, uptr chunk_size,
                                        uptr addr) {
  return chunk_size == sizeof(uptr) && chunk_beg + chunk_size == addr &&
         *reinterpret_cast<uptr *>(chunk_beg) == 0;
}

// The following must be implemented in the parent tool.

void ForEachChunk(ForEachChunkCallback callback, void *arg);
// Returns the address range occupied by the global allocator object.
void GetAllocatorGlobalRange(uptr *begin, uptr *end);
// Wrappers for allocator's ForceLock()/ForceUnlock().
void LockAllocator();
void UnlockAllocator();
// Returns true if [addr, addr + sizeof(void *)) is poisoned.
bool WordIsPoisoned(uptr addr);
// Wrappers for ThreadRegistry access.
void LockThreadRegistry();
void UnlockThreadRegistry();
bool GetThreadRangesLocked(uptr os_id, uptr *stack_begin, uptr *stack_end,
                           uptr *tls_begin, uptr *tls_end, uptr *cache_begin,
                           uptr *cache_end, DTLS **dtls);
void ForEachExtraStackRange(uptr os_id, RangeIteratorCallback callback,
                            void *arg);
// If called from the main thread, updates the main thread's TID in the thread
// registry. We need this to handle processes that fork() without a subsequent
// exec(), which invalidates the recorded TID. To update it, we must call
// gettid() from the main thread. Our solution is to call this function before
// leak checking and also before every call to pthread_create() (to handle cases
// where leak checking is initiated from a non-main thread).
void EnsureMainThreadIDIsCorrect();
// If p points into a chunk that has been allocated to the user, returns its
// user-visible address. Otherwise, returns 0.
uptr PointsIntoChunk(void *p);
// Returns address of user-visible chunk contained in this allocator chunk.
uptr GetUserBegin(uptr chunk);
// Helper for __lsan_ignore_object().
IgnoreObjectResult IgnoreObjectLocked(const void *p);
// Wrapper for chunk metadata operations.
class LsanMetadata {
 public:
  // Constructor accepts address of user-visible chunk.
  explicit LsanMetadata(uptr chunk);
  bool allocated() const;
  ChunkTag tag() const;
  void set_tag(ChunkTag value);
  uptr requested_size() const;
  u32 stack_trace_id() const;
 private:
  void *metadata_;
};

}  // namespace __lsan

extern "C" {
SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE
int __lsan_is_turned_off();

SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE
const char *__lsan_default_suppressions();
}  // extern "C"

#endif  // LSAN_COMMON_H


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

namespace UMA
{
	public class SlotLibrary : SlotLibraryBase
	{
		[SerializeField]
		protected SlotDataAsset[] slotElementList = new SlotDataAsset[0];
		[NonSerialized]
		private Dictionary<int, SlotDataAsset> slotDictionary;

		void Awake()
		{
			ValidateDictionary();
		}

	#pragma warning disable 618
		override public void UpdateDictionary()
		{
			ValidateDictionary();
			slotDictionary.Clear();
			for (int i = 0; i < slotElementList.Length; i++)
			{
				if (slotElementList[i])
				{
					var hash = slotElementList[i].nameHash;
					if (!slotDictionary.ContainsKey(hash))
					{
						slotDictionary.Add(hash, slotElementList[i]);
					}
				}
			}
		}

		public override void ValidateDictionary()
		{
			if (slotDictionary == null)
			{
				slotDictionary = new Dictionary<int, SlotDataAsset>();
				UpdateDictionary();
			}
		}

		public override void AddSlotAsset(SlotDataAsset slot)
		{
			ValidateDictionary();
			if (slotDictionary.ContainsKey(slot.nameHash))
			{
				for (int i = 0; i < slotElementList.Length; i++)
				{
					if (slotElementList[i].slotName == slot.slotName)
					{
						slotElementList[i] = slot;
						break;
					}
				}
			}
			else
			{
				var list = new SlotDataAsset[slotElementList.Length + 1];
				for (int i = 0; i < slotElementList.Length; i++)
				{
					list[i] = slotElementList[i];
				}
				list[list.Length - 1] = slot;
				slotElementList = list;
			}
			slotDictionary[slot.nameHash] = slot;
		}
	#pragma warning restore 618

		public override bool HasSlot(string name)
		{
			ValidateDictionary();
			return slotDictionary.ContainsKey(UMAUtils.StringToHash(name));
		}

		public override bool HasSlot(int nameHash)
		{
			ValidateDictionary();
			return slotDictionary.ContainsKey(nameHash);
		}

		public override SlotData InstantiateSlot(string name)
		{
#if SUPER_LOGGING
			Debug.Log("Instantiating slot: " + name);
#endif
			var res = Internal_InstantiateSlot(UMAUtils.StringToHash(name));
			if (res == null)
			{
				throw new UMAResourceNotFoundException("SlotLibrary: Unable to find: " + name);
			}
			return res;
		}
		public override SlotData InstantiateSlot(int nameHash)
		{
			var res = Internal_InstantiateSlot(nameHash);
			if (res == null)
			{
				throw new UMAResourceNotFoundException("SlotLibrary: Unable to find hash: " + nameHash);
			}
			return res;
		}

		public override SlotData InstantiateSlot(string name, List<OverlayData> overlayList)
		{
#if SUPER_LOGGING
			Debug.Log("Instantiating slot: " + name);
#endif
			var res = Internal_InstantiateSlot(UMAUtils.StringToHash(name));
			if (res == null)
			{
				throw new UMAResourceNotFoundException("SlotLibrary: Unable to find: " + name);
			}
			res.SetOverlayList(overlayList);
			return res;
		}

		public override SlotData InstantiateSlot(int nameHash, List<OverlayData> overlayList)
		{
			var res = Internal_InstantiateSlot(nameHash);
			if (res == null)
			{
	#if UNITY_EDITOR
				foreach (var path in UnityEditor.AssetDatabase.GetAllAssetPaths())
				{
					if (!path.EndsWith(".asset")) continue;
					var slot = UnityEditor.AssetDatabase.LoadAssetAtPath(path, typeof(SlotDataAsset)) as SlotDataAsset;
					if (slot == null) continue;
					if (slot.nameHash == nameHash)
					{
						throw new UMAResourceNotFoundException("SlotLibrary: Unable to find: " + slot.slotName);
					}
				}
	#endif
				throw new UMAResourceNotFoundException("SlotLibrary: Unable to find hash: " + nameHash);
			}
			res.SetOverlayList(overlayList);
			return res;
		}

		private SlotData Internal_InstantiateSlot(int nameHash)
		{
			ValidateDictionary();
			SlotDataAsset source;
			if (!slotDictionary.TryGetValue(nameHash, out source))
			{
				return null;
			}
			else
			{
				return new SlotData(source);
			}
		}

		public override SlotDataAsset[] GetAllSlotAssets()
		{
	#pragma warning disable 618
			return slotElementList;
	#pragma warning restore 618
		}
	}
}


text:
/* */
module.exports = System._nodeRequire ? System._nodeRequire('buffer') : require('buffer');


text:
# Stop any JetBrains ETW provider services
Get-Service | Where-Object { $_.Name -like "JetBrainsETW*" } | Stop-Service


text:
/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/**
 * @fileoverview Representation of a person.
 */

/**
 * @class
 * Base interface for all person objects.
 *
 * @name opensocial.Person
 */

/**
 * Base interface for all person objects.
 *
 * @private
 * @constructor
 */
opensocial.Person = function() {};

/**
 * @static
 * @class
 * All of the fields that a person has. These are the supported keys for the
 * Person.getField() method.
 *
 * @name opensocial.Person.Field
 */
opensocial.Person.Field = {
  /**
   * A string ID that can be permanently associated with this person.
   * This field may be used interchangeably with the string 'id'.
   * @member opensocial.Person.Field
   */
  ID : 'id',

  /**
   * A opensocial.Name object containing the person's name.
   * This field may be used interchangeably with the string 'name'.
   * @member opensocial.Person.Field
   */
  NAME : 'name',

  /**
   * A String representing the person's nickname. This represents the casual
   * way to address this person in real life.
   * This field may be used interchangeably with the string 'nickname'.
   * @member opensocial.Person.Field
   */
  NICKNAME : 'nickname',

  /**
   * Person's photo thumbnail URL, specified as a string.
   * This URL must be fully qualified. Relative URLs will not work in gadgets.
   * This field may be used interchangeably with the string 'thumbnailUrl'.
   * @member opensocial.Person.Field
   */
  THUMBNAIL_URL : 'thumbnailUrl',

  /**
   * Person's profile URL, specified as a string.
   * This URL must be fully qualified. Relative URLs will not work in gadgets.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'profileUrl'.
   * @member opensocial.Person.Field
   */
  PROFILE_URL : 'profileUrl',

  /**
   * Person's current location, specified as an
   * Address.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'currentLocation'.
   * @member opensocial.Person.Field
   */
  CURRENT_LOCATION : 'currentLocation',

  /**
   * Addresses associated with the person, specified as an Array of
   * Addresses.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'addresses'.
   * @member opensocial.Person.Field
   */
  ADDRESSES : 'addresses',

  /**
   * Emails associated with the person, specified as an Array of
   * Emails.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'emails'.
   * @member opensocial.Person.Field
   */
  EMAILS : 'emails',

  /**
   * Phone numbers associated with the person, specified as an Array of
   * Phones.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'phoneNumbers'.
   * @member opensocial.Person.Field
   */
  PHONE_NUMBERS : 'phoneNumbers',

  /**
   * A general statement about the person, specified as a string.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'aboutMe'.
   * @member opensocial.Person.Field
   */
  ABOUT_ME : 'aboutMe',

  /**
   * Person's status, headline or shoutout, specified as a string.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'status'.
   * @member opensocial.Person.Field
   */
  STATUS : 'status',

  /**
   * Person's profile song, specified as an opensocial.Url.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'profileSong'.
   * @member opensocial.Person.Field
   */
  PROFILE_SONG : 'profileSong',

  /**
   * Person's profile video, specified as an opensocial.Url.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'profileVideo'.
   * @member opensocial.Person.Field
   */
  PROFILE_VIDEO : 'profileVideo',

  /**
   * Person's gender, specified as an opensocial.Enum with the enum's
   * key referencing opensocial.Enum.Gender.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'gender'.
   * @member opensocial.Person.Field
   */
  GENDER : 'gender',

  /**
   * Person's sexual orientation, specified as a string.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'sexualOrientation'.
   * @member opensocial.Person.Field
   */
  SEXUAL_ORIENTATION : 'sexualOrientation',

  /**
   * Person's relationship status, specified as a string.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string
   * 'relationshipStatus'.
   * @member opensocial.Person.Field
   */
  RELATIONSHIP_STATUS : 'relationshipStatus',

  /**
   * Person's age, specified as a number.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'age'.
   * @member opensocial.Person.Field
   */
  AGE : 'age',

  /**
   * Person's date of birth, specified as a Date object.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'dateOfBirth'.
   * @member opensocial.Person.Field
   */
  DATE_OF_BIRTH : 'dateOfBirth',

  /**
   * Person's body characteristics, specified as an opensocial.BodyType.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'bodyType'.
   * @member opensocial.Person.Field
   */
  BODY_TYPE : 'bodyType',

  /**
   * Person's ethnicity, specified as a string.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'ethnicity'.
   * @member opensocial.Person.Field
   */
  ETHNICITY : 'ethnicity',

  /**
   * Person's smoking status, specified as an opensocial.Enum with the enum's
   * key referencing opensocial.Enum.Smoker.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'smoker'.
   * @member opensocial.Person.Field
   */
  SMOKER : 'smoker',

  /**
   * Person's drinking status, specified as an opensocial.Enum with the enum's
   * key referencing opensocial.Enum.Drinker.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'drinker'.
   * @member opensocial.Person.Field
   */
  DRINKER : 'drinker',

  /**
   * Description of the person's children, specified as a string.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'children'.
   * @member opensocial.Person.Field
   */
  CHILDREN : 'children',

  /**
   * Description of the person's pets, specified as a string.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'pets'.
   * @member opensocial.Person.Field
   */
  PETS : 'pets',

  /**
   * Description of the person's living arrangement, specified as a string.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'livingArrangement'.
   * @member opensocial.Person.Field
   */
  LIVING_ARRANGEMENT : 'livingArrangement',

  /**
   * Person's time zone, specified as the difference in minutes between
   * Greenwich Mean Time (GMT) and the user's local time. See
   * Date.getTimezoneOffset() in javascript for more details on this format.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'timeZone'.
   * @member opensocial.Person.Field
   */
  TIME_ZONE : 'timeZone',

  /**
   * List of the languages that the person speaks as ISO 639-1 codes,
   * specified as an Array of strings.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'languagesSpoken'.
   * @member opensocial.Person.Field
   */
  LANGUAGES_SPOKEN : 'languagesSpoken',

  /**
   * Jobs the person has held, specified as an Array of
   * Organizations.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'jobs'.
   * @member opensocial.Person.Field
   */
  JOBS : 'jobs',

  /**
   * Person's favorite jobs, or job interests and skills, specified as a string.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'jobInterests'.
   * @member opensocial.Person.Field
   */
  JOB_INTERESTS : 'jobInterests',

  /**
   * Schools the person has attended, specified as an Array of
   * Organizations.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'schools'.
   * @member opensocial.Person.Field
   */
  SCHOOLS : 'schools',

  /**
   * Person's interests, hobbies or passions, specified as an Array of strings.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'interests'.
   * @member opensocial.Person.Field
   */
  INTERESTS : 'interests',

  /**
   * URLs related to the person, their webpages, or feeds. Specified as an
   * Array of opensocial.Url.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'urls'.
   * @member opensocial.Person.Field
   */
  URLS : 'urls',

  /**
   * Person's favorite music, specified as an Array of strings.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'music'.
   * @member opensocial.Person.Field
   */
  MUSIC : 'music',

  /**
   * Person's favorite movies, specified as an Array of strings.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'movies'.
   * @member opensocial.Person.Field
   */
  MOVIES : 'movies',

  /**
   * Person's favorite TV shows, specified as an Array of strings.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'tvShows'.
   * @member opensocial.Person.Field
   */
  TV_SHOWS : 'tvShows',

  /**
   * Person's favorite books, specified as an Array of strings.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'books'.
   * @member opensocial.Person.Field
   */
  BOOKS : 'books',

  /**
   * Person's favorite activities, specified as an Array of strings.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'activities'.
   * @member opensocial.Person.Field
   */
  ACTIVITIES : 'activities',

  /**
   * Person's favorite sports, specified as an Array of strings.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'sports'.
   * @member opensocial.Person.Field
   */
  SPORTS : 'sports',

  /**
   * Person's favorite heroes, specified as an Array of strings.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'heroes'.
   * @member opensocial.Person.Field
   */
  HEROES : 'heroes',

  /**
   * Person's favorite quotes, specified as an Array of strings.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'quotes'.
   * @member opensocial.Person.Field
   */
  QUOTES : 'quotes',

  /**
   * Person's favorite cars, specified as an Array of strings.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'cars'.
   * @member opensocial.Person.Field
   */
  CARS : 'cars',

  /**
   * Person's favorite food, specified as an Array of strings.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'food'.
   * @member opensocial.Person.Field
   */
  FOOD : 'food',

  /**
   * Person's turn ons, specified as an Array of strings.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'turnOns'.
   * @member opensocial.Person.Field
   */
  TURN_ONS : 'turnOns',

  /**
   * Person's turn offs, specified as an Array of strings.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'turnOffs'.
   * @member opensocial.Person.Field
   */
  TURN_OFFS : 'turnOffs',

  /**
   * Arbitrary tags about the person, specified as an Array of strings.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'tags'.
   * @member opensocial.Person.Field
   */
  TAGS : 'tags',

  /**
   * Person's comments about romance, specified as a string.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'romance'.
   * @member opensocial.Person.Field
   */
  ROMANCE : 'romance',

  /**
   * What the person is scared of, specified as a string.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'scaredOf'.
   * @member opensocial.Person.Field
   */
  SCARED_OF : 'scaredOf',

  /**
   * Describes when the person is happiest, specified as a string.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'happiestWhen'.
   * @member opensocial.Person.Field
   */
  HAPPIEST_WHEN : 'happiestWhen',

  /**
   * Person's thoughts on fashion, specified as a string.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'fashion'.
   * @member opensocial.Person.Field
   */
  FASHION : 'fashion',

  /**
   * Person's thoughts on humor, specified as a string.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'humor'.
   * @member opensocial.Person.Field
   */
  HUMOR : 'humor',

  /**
   * Person's statement about who or what they are looking for, or what they are
   * interested in meeting people for. Specified as an Array of opensocial.Enum
   * with the enum's key referencing opensocial.Enum.LookingFor.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'lookingFor'.
   * @member opensocial.Person.Field
   */
  LOOKING_FOR : 'lookingFor',

  /**
   * Person's relgion or religious views, specified as a string.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'religion'.
   * @member opensocial.Person.Field
   */
  RELIGION : 'religion',

  /**
   * Person's political views, specified as a string.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'politicalViews'.
   * @member opensocial.Person.Field
   */
  POLITICAL_VIEWS : 'politicalViews',

  /**
   * A boolean indicating whether the person has used the current app.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'hasApp'.
   * @member opensocial.Person.Field
   */
  HAS_APP : 'hasApp',

  /**
   * Person's current network status. Specified as an Enum with the enum's
   * key referencing opensocial.Enum.Presence.
   * Container support for this field is OPTIONAL.
   * This field may be used interchangeably with the string 'networkPresence'.
   * @member opensocial.Person.Field
   */
  NETWORK_PRESENCE : 'networkPresence'
};

/**
 * Gets an ID that can be permanently associated with this person.
 *
 * @return {String} The ID
 */
opensocial.Person.prototype.getId = function() {};

/**
 * Gets a text display name for this person; guaranteed to return
 * a useful string.
 *
 * @return {String} The display name
 */
opensocial.Person.prototype.getDisplayName = function() {};

/**
 * Gets data for this person that is associated with the specified key.
 *
 * @param {String} key The key to get data for;
 *    keys are defined in
 *    Person.Field
 * @param {Map.<opensocial.DataRequest.DataRequestFields, Object>}
 *  opt_params Additional
 *    params
 *    to pass to the request.
 * @return {String} The data
 */
opensocial.Person.prototype.getField = function(key, opt_params) {};

/**
 * Returns true if this person object represents the currently logged in user.
 *
 * @return {Boolean} True if this is the currently logged in user;
 *   otherwise, false
 */
opensocial.Person.prototype.isViewer = function() {};

/**
 * Returns true if this person object represents the owner of the current page.
 *
 * @return {Boolean} True if this is the owner of the page;
 *   otherwise, false
 */
opensocial.Person.prototype.isOwner = function() {};


text:
"""ASN.1 X509 base components."""

from ct.crypto.asn1 import oid
from ct.crypto.asn1 import print_util
from ct.crypto.asn1 import types

class Version(types.Integer):
    def _encode_value(self):
        return types.encode_int(self._value - 1)

    @classmethod
    def _convert_value(cls, value):
        return int(value) + 1

    @classmethod
    def _decode_value(cls, buf, strict=True):
        return types.decode_int(buf, strict=strict) + 1

class CertificateSerialNumber(types.Integer):
    def __str__(self):
        return print_util.int_to_hex(int(self))

class AlgorithmIdentifier(types.Sequence):
    components = (
        (types.Component("algorithm", oid.ObjectIdentifier)),
        (types.Component("parameters", types.Any, optional=True))
        )

class UniqueIdentifier(types.BitString):
    pass

class SubjectPublicKeyInfo(types.Sequence):
    components = (
        (types.Component("algorithm", AlgorithmIdentifier)),
        (types.Component("subjectPublicKey", types.BitString))
        )


text:
<?xml version="1.0"?>

<project name="arithmetic tester" default="run.requestor" basedir="">

	<!-- loads system environment variables -->
	<property environment="env" />
	<import file="${env.SORCER_HOME}/bin/common-run.xml" />
	<echo message="webster: ${provider.webster.url}" />
	<property name="webster" value="${provider.webster.url}" />

	<!-- setValue property values here -->
	<property name="requestor.name" value="sorcer-tester" />
	<property name="requestor.class" value="sorcer.arithmetic.requestor.ArithmeticTester" />

	<path id="project.classpath">
		<pathelement location="${sorcer.lib}/${requestor.name}.jar" />
		<pathelement location="${sorcer.lib}/sorcer-platform.jar" />
		<pathelement location="${sorcer.lib}/sorcer-lib.jar" />
		<pathelement location="${jini.lib}/jsk-lib.jar" />
		<pathelement location="${jini.lib}/jsk-platform.jar" />
		<pathelement location="${rio.lib}/rio.jar" />
	</path>

	<!-- provider codeabse jars -->
	<property name="j1" value="${webster}/arithmetic-dl.jar" />
	<property name="j2" value="${webster}/sorcer-dl.jar" />
	<property name="j3" value="${webster}/sorcer-lib.jar" />

	<target name="run.requestor">
		<java classname="${requestor.class}" fork="yes">
			<classpath refid="project.classpath" />
			<sysproperty key="java.util.logging.config.file" value="${sorcer.home}/configs/sorcer.logging" />
			<sysproperty key="java.security.policy" value="../policy/${requestor.name}-req.policy" />
			<sysproperty key="java.rmi.server.codebase" value="${j1} ${j2} ${j3}" />
			<sysproperty key="sorcer.env.file" value="${sorcer.home}/configs/sorcer.env" />
			<arg value="f5xP" />
			<arg value="30" />
			<arg value="300" />
		</java>
	</target>

</project>


text:
void ofSoundStopAll(){
	#ifdef OF_SOUND_PLAYER_FMOD
		ofFmodSoundStopAll();
	#endif
}

//--------------------
void ofSoundSetVolume(float vol){
	#ifdef OF_SOUND_PLAYER_FMOD
		ofFmodSoundSetVolume(vol);
	#endif
}

//--------------------
void ofSoundUpdate(){
	#ifdef OF_SOUND_PLAYER_FMOD
		ofFmodSoundUpdate();
	#endif
}

//--------------------
void ofSoundShutdown(){
	#ifdef OF_SOUND_PLAYER_FMOD
		ofFmodSoundPlayer::closeFmod();
	#endif
}

//--------------------
float * ofSoundGetSpectrum(int nBands){
	#ifdef OF_SOUND_PLAYER_FMOD
		return ofFmodSoundGetSpectrum(nBands);
	#else
		ofLog(OF_LOG_ERROR, "ofSoundGetSpectrum returning NULL - no implementation!");
		return NULL;
	#endif
}

#include "ofSoundPlayer.h"
#include "ofMain.h" // for ofLog?
//---------------------------------------------------------------------------
ofSoundPlayer::ofSoundPlayer (){
	player		= new OF_SOUND_PLAYER_TYPE;
}

//---------------------------------------------------------------------------
ofSoundPlayer::~ofSoundPlayer(){
	if( player != NULL ){
		delete player;
		player = NULL;
	}
}

//---------------------------------------------------------------------------
bool ofSoundPlayer::setPlayer(ofBaseSoundPlayer * newPlayer){
	if( player == NULL ){
		player = newPlayer;
	}else{
		delete player;
		player = newPlayer;
	}
	return true;
}

//--------------------------------------------------------------------
ofBaseSoundPlayer * ofSoundPlayer::getPlayer(){
	return player;
}

//--------------------------------------------------------------------
void ofSoundPlayer::loadSound(string fileName, bool stream){
	if( player != NULL ){
		player->loadSound(fileName, stream);
	}
}

//--------------------------------------------------------------------
void ofSoundPlayer::unloadSound(){
	if( player != NULL ){
		player->unloadSound();
	}
}

//--------------------------------------------------------------------
void ofSoundPlayer::play(){
	if( player != NULL ){
		player->play();
	}
}

//--------------------------------------------------------------------
void ofSoundPlayer::stop(){
	if( player != NULL ){
		player->stop();
	}
}

//--------------------------------------------------------------------
void ofSoundPlayer::setVolume(float vol){
	if( player != NULL ){
		player->setVolume(vol);
	}
}

//--------------------------------------------------------------------
void ofSoundPlayer::setPan(float pan){
	if( player != NULL ){
		player->setPan(pan);
	}
}

//--------------------------------------------------------------------
void ofSoundPlayer::setSpeed(float spd){
	if( player != NULL ){
		player->setSpeed(spd);
	}
}

//--------------------------------------------------------------------
void ofSoundPlayer::setPaused(bool bP){
	if( player != NULL ){
		player->setPaused(bP);
	}
}

//--------------------------------------------------------------------
void ofSoundPlayer::setLoop(bool bLp){
	if( player != NULL ){
		player->setLoop(bLp);
	}
}

//--------------------------------------------------------------------
void ofSoundPlayer::setMultiPlay(bool bMp){
	if( player != NULL ){
		player->setMultiPlay(bMp);
	}
}

//--------------------------------------------------------------------
void ofSoundPlayer::setPosition(float pct){
	if( player != NULL ){
		player->setPosition(pct);
	}
}

//--------------------------------------------------------------------
float ofSoundPlayer::getPosition(){
	if( player != NULL ){
		return player->getPosition();
	} else {
		return 0;
	}
}

//--------------------------------------------------------------------
bool ofSoundPlayer::getIsPlaying(){
	if( player != NULL ){
		return player->getIsPlaying();
	} else {
		return false;
	}
}

//--------------------------------------------------------------------
float ofSoundPlayer::getSpeed(){
	if( player != NULL ){
		return player->getSpeed();
	} else {
		return 0;
	}
}

//--------------------------------------------------------------------
float ofSoundPlayer::getPan(){
	if( player != NULL ){
		return player->getPan();
	} else {
		return 0;
	}
}


text:
/**
 * @author:   * @date: 2016/3/30
 */
define([
    "core/js/controls/Control",
    "core/js/controls/ToolStrip",
    "core/js/controls/ToolStripItem",
    "core/js/editors/TouchSpinEditor"
], function (Control, ToolStrip,
             ToolStripItem,
             TouchSpinEditor) {
    var Pagination = Control.extend({
        xtype: $Component.PAGINATION,
        eTag: "",
        /**
         * 可以选择的分页个数,默认是单数
         */
        itemNum: null,
        /**
         * itemNum的默认值
         */
        itemNumDefault:7,
        pageButtons: null,
        pageSize:10,
        currentPage: 1,
        totalPage: null,
        className: "pagination",
        goButton: null,
        textInput:null,

        /**
         * 模式,应用$cons.PaginationMode中的模式
         */
        mode:$cons.PaginationMode.FULL,
        /**
         * 按钮组
         */
        $buttonGroup:null,
        /**
         * 挂载内容
         */
        mountContent: function (triggerEvent) {
            this.itemNum = this.itemNumDefault;
            if(this.itemNumDefault>this.totalPage){
                this.itemNum = this.totalPage;
            }
            this.initButtonGroup();
            this.$el.append(this.$buttonGroup);

        },
        initButtonGroup:function(){
            this.$buttonGroup = $("
");
            this.pageButtons = this.createPageButtons(this.createButtonItems());
            this.pageButtons.activeItems([this.currentPage]);
            if(this.mode==$cons.PaginationMode.FULL){
                this.$buttonGroup.append("
"+"    总共"+this.totalPage+"页  到第 "+"
");
                this.textInput = new TouchSpinEditor({
                    $container: this.$buttonGroup,
                    size:TouchSpinEditor.size.sm,
                    min:1,
                    max: this.totalPage,
                    displayButtons:true,
                    width:30,
                    //prefix:"总共"+this.totalPage+"页 "
                });
                this.$buttonGroup.append("
"+" 页  "+"
");
                var that = this;
                this.goButton = new ToolStripItem({
                    $container: this.$buttonGroup,
                    text:"确定",
                    size:ToolStripItem.size.sm,
                    onclick:$.proxy(that.clickGo, that)
                });
            }

        },
        /**
         * 点击按钮确定的时间
         * @param event
         */
        clickGo:function(event){
            var value = this.textInput.getValue();
            if(this.currentPage!=value){
                this.currentPage = value;
                this._setCurrentPage(this.currentPage);
            }
        },
        createPageButtons: function (itemOptions) {
            return new ToolStrip({
                $container: this.$buttonGroup,
                size: ToolStrip.size.sm,
                itemOptions: itemOptions
            });
        },
        createButtonItems: function () {
            var that = this;
            var result = [{
                text: "<上一页",
                enabled:this.currentPage==1?false:true,
                onclick: function () {
                    that.prev();
                }
            }];
            var itemNum = this.itemNum;
            /*if(this.itemNum>this.totalPage){
                itemNum = this.totalPage;
            }*/
            for (var i = 1; i <= itemNum; i++) {
                result.push({
                    text: i,
                    onclick: $.proxy(that.clickItem, that)
                });
            }

            if (this.totalPage > this.itemNum) {
                result.push({
                    text: "...",
                    enabled: false
                });

            }

            result.push({
                text: "下一页>",
                enabled:this.totalPage==1?false:true,
                onclick: function () {
                    that.next();
                }
            });
            return result;
        },
        clickItem: function (event) {
            this.currentPage = parseInt($(event.jqEvent.target).text());
            this._setCurrentPage(this.currentPage);
        },
        _setCurrentPage: function (currentPage) {
            var itemOptions = this.getNavigationOptions(this.totalPage, this.currentPage, this.itemNum);
            this.updateButtonItems(itemOptions);
            this.trigger("page",currentPage);
        },
        /**
         * 分页事件
         * @param currentPage
         */
        onpage:function(currentPage){

        },
        /**
         * 修改分页按钮状态
         * @param itemOptions
         */
        updateButtonItems: function (itemOptions) {
            var items = this.pageButtons.getItems();
            var currentItem = null;
            for (var i = 1; i < items.length; i++) {
                var item = items[i];
                item.setText(itemOptions[i]);
                if (this.currentPage == itemOptions[i]) {
                    currentItem = item;
                }
            }
            this.pageButtons.clearActive();
            if (currentItem) {
                currentItem.setActive(true);
            }
            if (this.currentPage == 1) {
                this.pageButtons.items[0].setEnabled(false);
            } else {
                this.pageButtons.items[0].setEnabled(true);
            }
            if (this.currentPage == this.totalPage) {
                this.pageButtons.items[this.pageButtons.items.length - 1].setEnabled(false);
            } else {
                this.pageButtons.items[this.pageButtons.items.length - 1].setEnabled(true);
            }
        },
        /**
         * 上一页
         */
        prev: function () {
            this.currentPage--;
            this._setCurrentPage(this.currentPage);
        },
        /**
         * 下一页
         */
        next: function () {
            this.currentPage++;
            this._setCurrentPage(this.currentPage);
        },
        /**
         * 获取导航条的参数
         * @param totalPage
         * @param currentPage
         * @param itemNum
         * @returns {Array}
         */
        getNavigationOptions: function (totalPage, currentPage, itemNum) {
            //获取中间数
            var center = Math.round(itemNum / 2);
            //保存按钮对应的页数
            var itemValues = [];
            var start = 1;
            var realItemNum = itemNum;
            if(this.itemNum<this.totalPage){
                //当总页数大于现实的页数时,才需要处理
                //处理总页数小于规定的子项数
                if (totalPage < itemNum) {
                    realItemNum = totalPage;
                }
                //处理
                if (totalPage - center + 1 < currentPage) {
                    start = totalPage - itemNum + 1;
                } else if (currentPage > center) {
                    //当前页面减去中间数
                    start = currentPage - center + 1;
                }
            }
            for (var i = 1; i <= realItemNum; i++, start++) {
                itemValues[i] = start;
            }
            return itemValues;
        },
        /**
         *
         * @param options        主要包含以下属性
         *    pageSize
         *    currentPage
         *    totalPage
         */
        reload:function(options){
            this.$el.empty();
            if(options){
                if(options.pageSize){
                    this.pageSize = options.pageSize
                }
                if(options.currentPage){
                    this.currentPage = options.currentPage
                }
                if(options.totalPage){
                    this.totalPage = options.totalPage
                }

            }
            this.mountContent();
        }
    });
    return Pagination;
});


text:
package org.jboss.as.quickstarts.cluster.hasingleton.service.ejb;

import java.io.Serializable;

/**
 * @author Paul Ferraro
 */
public class Environment implements Serializable {
    private static final long serialVersionUID = -7845251073515304583L;

    private final String nodeName;

    public Environment(String nodeName) {
        this.nodeName = nodeName;
    }

    public String getNodeName() {
        return this.nodeName;
    }
}


text:
<?php

namespace JasonRoman\NbaApi\Request\Stats\Stats\Homepage;

use JasonRoman\NbaApi\Constraints as ApiAssert;
use JasonRoman\NbaApi\Params\LeagueIdParam;
use JasonRoman\NbaApi\Params\SeasonParam;
use JasonRoman\NbaApi\Params\Stats\GameScopeParam;
use JasonRoman\NbaApi\Params\Stats\PlayerOrTeamParam;
use JasonRoman\NbaApi\Params\Stats\PlayerScopeParam;
use JasonRoman\NbaApi\Params\Stats\SeasonTypeParam;
use JasonRoman\NbaApi\Params\Stats\StatParam;
use JasonRoman\NbaApi\Request\Stats\Stats\AbstractStatsStatsRequest;
use Symfony\Component\Validator\Constraints as Assert;

class LeadersTilesRequest extends AbstractStatsStatsRequest
{
    const ENDPOINT = '/stats/leaderstiles';

    /**
     * @Assert\NotBlank()
     * @Assert\Type("string")
     * @ApiAssert\ApiRegex(LeagueIdParam::FORMAT)
     *
     * @var string
     */
    public $leagueId;

    /**
     * @Assert\NotBlank()
     * @Assert\Type("string")
     * @ApiAssert\ApiRegex(SeasonParam::FORMAT)
     *
     * @var string
     */
    public $season;

    /**
     * @Assert\NotBlank()
     * @Assert\Type("string")
     * @ApiAssert\ApiChoice(SeasonTypeParam::OPTIONS)
     *
     * @var string
     */
    public $seasonType;

    /**
     * @Assert\NotBlank()
     * @Assert\Type("string")
     * @ApiAssert\ApiChoice(StatParam::OPTIONS)
     *
     * @var string
     */
    public $stat;

    /**
     * @Assert\NotBlank()
     * @Assert\Type("string")
     * @ApiAssert\ApiChoice(PlayerOrTeamParam::OPTIONS)
     *
     * @var string
     */
    public $playerOrTeam;

    /**
     * @Assert\NotBlank()
     * @Assert\Type("string")
     * @ApiAssert\ApiChoice(GameScopeParam::OPTIONS)
     *
     * @var string
     */
    public $gameScope;

    /**
     * @Assert\NotBlank()
     * @Assert\Type("string")
     * @ApiAssert\ApiChoice(PlayerScopeParam::OPTIONS)
     *
     * @var string
     */
    public $playerScope;
}


text:
using Homebank.Core.Entities;
using Homebank.Core.Interfaces.Repositories;
using Microsoft.EntityFrameworkCore;
using System.Collections.Generic;
using System.Linq;

namespace Homebank.Core.Repositories
{
	public class TransactionRepository : BaseRepository<Transaction>, ITransactionRepository
    {
		public TransactionRepository(DatabaseContext databaseContext)
			: base(databaseContext)
		{
		}

		public IList<Transaction> GetByAccount(int accountId, int page, out int totalTransactions)
		{
			var baseQuery = _databaseContext.Transactions
				.Include(p => p.Bookings)
				.Include(p => p.Category)
				.Where(p => p.Bookings.Any(x => x.Account.Id == accountId));

			totalTransactions = baseQuery.Count();

			var query = baseQuery
				.OrderByDescending(p => p.Date)
				.ThenByDescending(p => p.Id)
				.Skip(100 * (page - 1))
				.Take(100);

			return query.ToList();
		}

		public Transaction GetById(User user, int id)
		{
			return
				_databaseContext.Transactions.FirstOrDefault(p => p.Id == id && p.Bookings.Any(b => b.Account.User.Id == user.Id));
		}

		public IList<Transaction> GetAll()
		{
			return _databaseContext.Transactions.ToList();
		}

		public IList<string> GetDescriptionsList(User user, string description)
		{
			return _databaseContext.Transactions
				.Where(p => p.Bookings.Any(b => b.Account.User.Id == user.Id))
				.Where(p => p.Description.Contains(description))
				.Select(p => p.Description)
				.Distinct()
				.ToList();
		}
	}
}


text:
package pmm.pbm.service.cms;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import lombok.NonNull;
import lombok.val;
import pmm.pbm.data.base.entity.Book;
import pmm.pbm.data.base.entity.BookExample;
import pmm.pbm.data.base.iface.BookMapper;
import pmm.pbm.data.base.support.Mapper;
import pmm.pbm.data.base.support.Paged;
import pmm.pbm.data.dao.iface.BookDAO;
import pmm.pbm.service.params.ListBookDTO;
import pmm.pbm.service.results.BookVO;
import pmm.pbm.service.support.CrudService;

@Service("cmsBookService")
public class BookService implements CrudService<Book, BookExample, Integer> {
    @Autowired
    private BookMapper bookMapper;

    @Autowired
    private BookDAO bookDAO;

    @Override
    public Mapper<Book, BookExample, Integer> getMapper() {
        return bookMapper;
    }

    @Transactional
    public Paged<BookVO> getBookPaged(@NonNull ListBookDTO dto) {
        return selectPaged(() -> bookDAO.getBooks(dto), dto);
    }

    @Transactional
    public BookVO getBookById(@NonNull String id) {
        val dto = new ListBookDTO();
        dto.setId(id);
        dto.setLimit(1);

        val results = bookDAO.getBooks(dto);
        return results.isEmpty() ? null : results.get(0);
    }

}