text:
package org.yeastrc.www.project.experiment;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;
import org.apache.struts.action.ActionMessages;
import org.yeastrc.ms.domain.search.mascot.MascotResultFilterCriteria;

public class MascotFilterResultsForm extends FilterResultsForm {

    private int searchId;

    private String minIonScore;
    private String minIdentityScore;
    private String minHomologyScore;
    private String minExpect;

    private String maxRank;

    public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
        ActionErrors errors =  super.validate(mapping, request);

        if(maxRank != null && maxRank.trim().length() > 0) {
            try {Integer.parseInt(maxRank);}
            catch(NumberFormatException e) {
                errors.add(ActionMessages.GLOBAL_MESSAGE,
                        new ActionMessage("error.general.errorMessage", "Invalid value for Mascot rank"));}
        }
        if(minIonScore != null && minIonScore.trim().length() > 0) {
            try{Double.parseDouble(minIonScore);}
            catch(NumberFormatException e){
                errors.add(ActionMessages.GLOBAL_MESSAGE,
                        new ActionMessage("error.general.errorMessage", "Invalid value for Min. Ion Score"));}
        }

        if(minIdentityScore != null && minIdentityScore.trim().length() > 0) {
            try{Double.parseDouble(minIdentityScore);}
            catch(NumberFormatException e){
                errors.add(ActionMessages.GLOBAL_MESSAGE,
                        new ActionMessage("error.general.errorMessage", "Invalid value for Min. Identity Score"));}
        }

        if(minHomologyScore != null && minHomologyScore.trim().length() > 0) {
            try{Double.parseDouble(minHomologyScore);}
            catch(NumberFormatException e){
                errors.add(ActionMessages.GLOBAL_MESSAGE,
                        new ActionMessage("error.general.errorMessage", "Invalid value for Min. Homology Score"));}
        }

        if(minExpect != null && minExpect.trim().length() > 0) {
            try{Double.parseDouble(minExpect);}
            catch(NumberFormatException e){
                errors.add(ActionMessages.GLOBAL_MESSAGE,
                        new ActionMessage("error.general.errorMessage", "Invalid value for Min. Expect"));}
        }

        return errors;
    }

    public int getSearchId() {
        return searchId;
    }

    public void setSearchId(int searchId) {
        this.searchId = searchId;
    }

    public String getMaxRank() {
        return maxRank;
    }

    public Integer getMaxRank_Integer() {
        if(maxRank != null && maxRank.trim().length() > 0)
            return Integer.parseInt(maxRank);
        return null;
    }

    public void setMaxRank(String rank) {
        this.maxRank = rank;
    }

    public String getMinIonScore() {
        return minIonScore;
    }

    public Double getMinIonScoreDouble() {
        if(minIonScore != null && minIonScore.trim().length() > 0)
            return Double.parseDouble(minIonScore);
        return null;
    }

    public void setMinIonScore(String minIonScore) {
        this.minIonScore = minIonScore;
    }

    public String getMinIdentityScore() {
        return minIdentityScore;
    }

    public Double getMinIdentityScoreDouble() {
        if(minIdentityScore != null && minIdentityScore.trim().length() > 0)
            return Double.parseDouble(minIdentityScore);
        return null;
    }

    public void setMinIdentityScore(String minIdentityScore) {
        this.minIdentityScore = minIdentityScore;
    }

    public String getMinHomologyScore() {
        return minHomologyScore;
    }

    public Double getMinHomologyScoreDouble() {
        if(minHomologyScore != null && minHomologyScore.trim().length() > 0)
            return Double.parseDouble(minHomologyScore);
        return null;
    }

    public void setMinHomologyScore(String minHomologyScore) {
        this.minHomologyScore = minHomologyScore;
    }

    public String getMinExpect() {
        return minExpect;
    }

    public Double getMinExpectDouble() {
        if(minExpect != null && minExpect.trim().length() > 0)
            return Double.parseDouble(minExpect);
        return null;
    }

    public void setMinExpect(String minExpect) {
        this.minExpect = minExpect;
    }

    public MascotResultFilterCriteria getFilterCriteria() {
        MascotResultFilterCriteria criteria = new MascotResultFilterCriteria();

        criteria.setMinScan(getMinScanInt());
        criteria.setMaxScan(getMaxScanInt());

        criteria.setMinCharge(getMinChargeInt());
        criteria.setMaxCharge(getMaxChargeInt());

        criteria.setMinObservedMass(getMinObsMassDouble());
        criteria.setMaxObservedMass(getMaxObsMassDouble());

        criteria.setMinRetentionTime(getMinRTDouble());
        criteria.setMaxRetentionTime(getMaxRTDouble());

        criteria.setPeptide(getPeptide());
        criteria.setExactPeptideMatch(getExactPeptideMatch());

        criteria.setShowOnlyModified(isShowModified() && !isShowUnmodified());
        criteria.setShowOnlyUnmodified(isShowUnmodified() && !isShowModified());

        criteria.setRank(getMaxRank_Integer());
        criteria.setMinIonScore(getMinIonScoreDouble());
        criteria.setMinIdentityScore(getMinIdentityScoreDouble());
        criteria.setMinHomologyScore(getMinHomologyScoreDouble());
        criteria.setMinExpectScore(getMinExpectDouble());

        criteria.setFileNames(filteredFileNames());

        return criteria;
    }
}


text:
-- MySQL dump 10.13  Distrib 5.5.54-38.7, for debian-linux-gnu (x86_64)
--
-- Host: localhost    Database: gsx_ast_server
-- ------------------------------------------------------
-- Server version	5.5.54-38.7

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `gsx_users_diagnostics_headers`
--

DROP TABLE IF EXISTS `gsx_users_diagnostics_headers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `gsx_users_diagnostics_headers` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `user_uuid` varchar(40) DEFAULT NULL,
  `diagnostic_event_number` varchar(40) DEFAULT NULL,
  `tool_id` varchar(20) DEFAULT NULL,
  `tool_version` varchar(20) DEFAULT NULL,
  `diagnostic_start_timestamp` int(10) DEFAULT NULL,
  `diagnostic_end_timestamp` int(10) DEFAULT NULL,
  `serial_number` varchar(20) DEFAULT NULL,
  `server_id` varchar(20) DEFAULT NULL,
  `account_id` int(10) DEFAULT NULL,
  `profile_file` varchar(255) DEFAULT NULL,
  `log_file` varchar(255) DEFAULT NULL,
  `test_result` varchar(20) DEFAULT NULL,
  `pass_count` int(10) DEFAULT NULL,
  `created_at` int(10) DEFAULT NULL,
  `deleted_at` int(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `diagnostic_event_number` (`diagnostic_event_number`)
) ENGINE=InnoDB AUTO_INCREMENT=758 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `gsx_users_diagnostics_results`
--

DROP TABLE IF EXISTS `gsx_users_diagnostics_results`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `gsx_users_diagnostics_results` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `user_uuid` varchar(40) DEFAULT NULL,
  `diagnostic_event_number` varchar(40) DEFAULT NULL,
  `module_name` varchar(100) DEFAULT NULL,
  `module_location` varchar(100) DEFAULT NULL,
  `module_serial_number` varchar(50) DEFAULT NULL,
  `module_test_name` varchar(100) DEFAULT NULL,
  `module_test_number` int(10) DEFAULT NULL,
  `module_test_result` varchar(20) DEFAULT NULL,
  `created_at` int(10) DEFAULT NULL,
  `deleted_at` int(10) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=493 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `gsx_users_tokens`
--

DROP TABLE IF EXISTS `gsx_users_tokens`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `gsx_users_tokens` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `user_uuid` varchar(40) DEFAULT NULL,
  `user_session_token` varchar(35) DEFAULT NULL,
  `expires_at` int(10) DEFAULT '0',
  `created_at` int(10) DEFAULT '0',
  `deleted_at` int(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `user_session_token` (`user_session_token`)
) ENGINE=InnoDB AUTO_INCREMENT=7579 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2017-08-24 18:36:57

redpajama_set_name: RedPajamaGithub


text:
package org.apache.xmlbeans.impl.common;

import javax.xml.namespace.QName;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import org.apache.xmlbeans.XmlError;
import org.apache.xmlbeans.XmlException;
import org.apache.xmlbeans.impl.common.XMLChar;

public class XPath
{
    public static class XPathCompileException extends XmlException
    {
        XPathCompileException ( XmlError err )
        {
            super( err.toString(), null, err );
        }
    }

    //
    //
    //

    public static class ExecutionContext
    {
        public ExecutionContext ( )
        {
            _stack = new ArrayList();
        }

        public static final int HIT     = 0x1;
        public static final int DESCEND = 0x2;
        public static final int ATTRS   = 0x4;

        public final void init ( XPath xpath )
        {
            if (_xpath != xpath)
            {
                _xpath = xpath;

                _paths = new PathContext [ xpath._selector._paths.length ];

                for ( int i = 0 ; i < _paths.length ; i++ )
                    _paths[ i ] = new PathContext();
            }

            _stack.clear();

            for ( int i = 0 ; i < _paths.length ; i++ )
                _paths[ i ].init( xpath._selector._paths[ i ] );
        }

        public final int start ( )
        {
            int result = 0;

            for ( int i = 0 ; i < _paths.length ; i++ )
                result |= _paths[ i ].start();

            return result;
        }

        public final int element ( QName name )
        {
            assert name != null;

            _stack.add( name );

            int result = 0;

            for ( int i = 0 ; i < _paths.length ; i++ )
                result |= _paths[ i ].element( name );

            return result;
        }

        public final boolean attr ( QName name )
        {
            boolean hit = false;

            for ( int i = 0 ; i < _paths.length ; i++ )
                hit = hit | _paths[ i ].attr( name );

            return hit;
        }

        public final void end ( )
        {
            _stack.remove( _stack.size() - 1 );

            for ( int i = 0 ; i < _paths.length ; i++ )
                _paths[ i ].end();
        }

        private final class PathContext
        {
            PathContext ( )
            {
                _prev = new ArrayList();
            }

            void init ( Step steps )
            {
                _curr = steps;
                _prev.clear();
            }

            private QName top ( int i )
            {
                return (QName) ExecutionContext.this._stack.get( _stack.size() - 1 - i );
            }

            // goes back to the begining of the sequence since last // wildcard
            private void backtrack ( )
            {
                assert _curr != null;

                if (_curr._hasBacktrack)
                {   // _backtrack seems to be a pointer to the step that follows a // wildcard
                    // ex: for .//b/c/d steps c and d should backtrack to b in case there isn't a match
                    _curr = _curr._backtrack;
                    return;
                }

                assert !_curr._deep;

                _curr = _curr._prev;

                search: for ( ; !_curr._deep ; _curr = _curr._prev )
                {
                    int t = 0;

                    for ( Step s = _curr ; !s._deep ; s = s._prev )
                    {
                        if (!s.match( top( t++ )))
                            continue search;
                    }

                    break;
                }
            }

            int start ( )
            {
                assert _curr != null;
                assert _curr._prev == null;

                if (_curr._name != null)
                    return _curr._flags;

                // If the steps consist on only a terminator, then the path can
                // only be '.'.  In this case, we get a hit, but there is
                // nothing else to match.  No need to backtrack.

                _curr = null;

                return HIT;
            }

            int element ( QName name )
            {
                //System.out.println("  Path.element: " + name);
                _prev.add( _curr );

                if (_curr == null)
                    return 0;

                assert _curr._name != null;

                if (!_curr._attr && _curr.match( name ))
                {
                    if ((_curr = _curr._next)._name != null)
                        return _curr._flags;

                    backtrack();

                    //System.out.println("    element - HIT " + _curr._flags);
                    return _curr == null ? HIT : HIT | _curr._flags;
                }

                for ( ; ; )
                {
                    backtrack();

                    if (_curr == null)
                        return 0;

                    if (_curr.match( name ))
                    {
                        _curr = _curr._next;
                        break;
                    }

                    if (_curr._deep)
                        break;
                }

                return _curr._flags;
            }

            boolean attr ( QName name )
            {
                return _curr != null && _curr._attr && _curr.match( name );
            }

            void end ( )
            {
                //System.out.println("  Path.end ");
                _curr = (Step) _prev.remove( _prev.size() - 1 );
            }

            private Step _curr;
            private List _prev;
        }

        private XPath         _xpath;
        private ArrayList     _stack;
        private PathContext[] _paths;
    }

    //
    //
    //

    public static XPath compileXPath ( String xpath )
        throws XPathCompileException
    {
        return compileXPath( xpath, "$this", null );
    }

    public static XPath compileXPath ( String xpath, String currentNodeVar )
        throws XPathCompileException
    {
        return compileXPath( xpath, currentNodeVar, null );
    }

    public static XPath compileXPath ( String xpath, Map namespaces )
            throws XPathCompileException
    {
        return compileXPath( xpath, "$this", namespaces );
    }

    public static XPath compileXPath (
        String xpath, String currentNodeVar, Map namespaces )
            throws XPathCompileException
    {
        return
            new CompilationContext( namespaces, currentNodeVar ).
                compile( xpath );
    }

    private static class CompilationContext
    {
        CompilationContext ( Map namespaces, String currentNodeVar )
        {
            assert
                _currentNodeVar == null ||
                _currentNodeVar.startsWith( "$" );

            if (currentNodeVar == null)
                _currentNodeVar = "$this";
            else
                _currentNodeVar = currentNodeVar;

            _namespaces = new HashMap();

            _externalNamespaces =
                namespaces == null ? new HashMap() : namespaces;
        }

        XPath compile ( String expr ) throws XPathCompileException
        {
            _offset = 0;
            _line = 1;
            _column = 1;
            _expr = expr;

            return tokenizeXPath();
        }

        int currChar ( )
        {
            return currChar( 0 );
        }

        int currChar ( int offset )
        {
            return
                _offset + offset >= _expr.length()
                    ? -1
                    : _expr.charAt( _offset + offset );
        }

        void advance ( )
        {
            if (_offset < _expr.length())
            {
                char ch = _expr.charAt( _offset );

                _offset++;
                _column++;

                if (ch == '\r' || ch == '\n')
                {
                    _line++;
                    _column = 1;

                    if (_offset + 1 < _expr.length())
                    {
                        char nextCh = _expr.charAt( _offset + 1 );

                        if ((nextCh == '\r' || nextCh == '\n') && ch != nextCh)
                            _offset++;
                    }
                }
            }
        }

        void advance ( int count )
        {
            assert count >= 0;

            while ( count-- > 0 )
                advance();
        }

        boolean isWhitespace ( )
        {
            return isWhitespace( 0 );
        }

        boolean isWhitespace ( int offset )
        {
            int ch = currChar( offset );
            return ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r';
        }

        boolean isNCNameStart ( )
        {
            return
                currChar() == -1
                    ? false :
                    XMLChar.isNCNameStart( currChar() );
        }

        boolean isNCName ( )
        {
            return
                currChar() == -1
                    ? false :
                    XMLChar.isNCName( currChar() );
        }

        boolean startsWith ( String s )
        {
            return startsWith( s, 0 );
        }

        boolean startsWith ( String s, int offset )
        {
            if (_offset + offset >= _expr.length())
                return false;

            return _expr.startsWith( s, _offset + offset );
        }

        private XPathCompileException newError ( String msg )
        {
            XmlError err =
                XmlError.forLocation(
                    msg, XmlError.SEVERITY_ERROR, null,
                    _line, _column, _offset );

            return new XPathCompileException( err );
        }

        String lookupPrefix ( String prefix ) throws XPathCompileException
        {
            if (_namespaces.containsKey( prefix ))
                return (String) _namespaces.get( prefix );

            if (_externalNamespaces.containsKey( prefix ))
                return (String) _externalNamespaces.get( prefix );

            if (prefix.equals( "xml" ))
                  return "http://www.w3.org/XML/1998/namespace";

            if (prefix.equals( "xs" ))
                  return "http://www.w3.org/2001/XMLSchema";

            if (prefix.equals( "xsi" ))
                  return "http://www.w3.org/2001/XMLSchema-instance";

            if (prefix.equals( "fn" ))
                  return "http://www.w3.org/2002/11/xquery-functions";

            if (prefix.equals( "xdt" ))
                  return "http://www.w3.org/2003/11/xpath-datatypes";

            if (prefix.equals( "local" ))
                  return "http://www.w3.org/2003/11/xquery-local-functions";

            throw newError( "Undefined prefix: " + prefix );
        }

        private boolean parseWhitespace ( ) throws XPathCompileException
        {
            boolean sawSpace = false;

            while ( isWhitespace() )
            {
                advance();
                sawSpace = true;
            }

            return sawSpace;
        }

        //
        // Tokenizing will consume whitespace followed by the tokens, separated
        // by whitespace.  The whitespace following the last token is not
        // consumed.
        //

        private boolean tokenize ( String s )
        {
            assert s.length() > 0;

            int offset = 0;

            while ( isWhitespace( offset ) )
                offset++;

            if (!startsWith( s, offset ))
                return false;

            offset += s.length();

            advance( offset );

            return true;
        }

        private boolean tokenize ( String s1, String s2 )
        {
            assert s1.length() > 0;
            assert s2.length() > 0;

            int offset = 0;

            while ( isWhitespace( offset ) )
                offset++;

            if (!startsWith( s1, offset ))
                return false;

            offset += s1.length();

            while ( isWhitespace( offset ) )
                offset++;

            if (!startsWith( s2, offset ))
                return false;

            offset += s2.length();

            advance( offset );

            return true;
        }

        private boolean tokenize ( String s1, String s2, String s3)
        {
            assert s1.length() > 0;
            assert s2.length() > 0;
            assert s3.length() > 0;

            int offset = 0;

            while ( isWhitespace( offset ) )
                offset++;

            if (!startsWith( s1, offset ))
                return false;

            offset += s1.length();

            while ( isWhitespace( offset ) )
                offset++;

            if (!startsWith( s2, offset ))
                return false;

            offset += s2.length();

            while ( isWhitespace( offset ) )
                offset++;

            if (!startsWith( s3, offset ))
                return false;

            offset += s3.length();

             while ( isWhitespace( offset ) )
                offset++;

            advance( offset );

            return true;
        }
        private boolean tokenize ( String s1, String s2, String s3,String s4) {
            assert s1.length() > 0;
            assert s2.length() > 0;
            assert s3.length() > 0;
            assert s4.length() > 0;

            int offset = 0;

            while ( isWhitespace( offset ) )
                offset++;

            if (!startsWith( s1, offset ))
                return false;

            offset += s1.length();

            while ( isWhitespace( offset ) )
                offset++;

            if (!startsWith( s2, offset ))
                return false;

            offset += s2.length();

            while ( isWhitespace( offset ) )
                offset++;

            if (!startsWith( s3, offset ))
                return false;

            offset += s3.length();

             while ( isWhitespace( offset ) )
                offset++;

            if (!startsWith( s4, offset ))
                return false;

            offset += s4.length();

            advance( offset );

            return true;
        }

        private String tokenizeNCName ( ) throws XPathCompileException
        {
            parseWhitespace();

            if (!isNCNameStart())
                throw newError( "Expected non-colonized name" );

            StringBuffer sb = new StringBuffer();

            sb.append( (char) currChar() );

            for ( advance() ; isNCName() ; advance() )
                sb.append( (char) currChar() );

            return sb.toString();
        }

        private QName getAnyQName ( )
        {
            return new QName( "", "" );
        }

        private QName tokenizeQName ( ) throws XPathCompileException
        {
            if (tokenize( "*" ))
                return getAnyQName();

            String ncName = tokenizeNCName();

            if (!tokenize( ":" ))
                return new QName( lookupPrefix( "" ), ncName );

            return
                new QName(
                    lookupPrefix( ncName ),
                    tokenize( "*" ) ? "" : tokenizeNCName() );
        }

        private String tokenizeQuotedUri ( ) throws XPathCompileException
        {
            char quote;

            if (tokenize( "\"" ))
                quote = '"';
            else  if (tokenize( "'" ))
                quote = '\'';
            else
                throw newError( "Expected quote (\" or ')" );

            StringBuffer sb = new StringBuffer();

            for ( ; ; )
            {
                if (currChar() == -1)
                    throw newError( "Path terminated in URI literal" );

                if (currChar() == quote)
                {
                    advance();

                    if (currChar() != quote)
                        break;
                }

                sb.append( (char) currChar() );

                advance();
            }

            return sb.toString();
        }

        private Step addStep ( boolean deep, boolean attr, QName name, Step steps )
        {
            Step step = new Step( deep, attr, name );

            if (steps == null)
                return step;

            Step s = steps;

            while ( steps._next != null )
                steps = steps._next;

            steps._next = step;
            step._prev = steps;

            return s;
        }

        private Step tokenizeSteps ( ) throws XPathCompileException
        {
            if (tokenize( "/" ))
                throw newError( "Absolute paths unsupported" );

            boolean deep;

            if (tokenize( "$", _currentNodeVar, "//" ) || tokenize( ".", "//" ))
                deep = true;
            else if (tokenize( "$", _currentNodeVar, "/" ) || tokenize( ".", "/" ))
                deep = false;
            else if (tokenize( "$", _currentNodeVar ) || tokenize( "." ))
                return addStep( false, false, null, null );
            else
                deep = false;

            Step steps = null;

            // Compile the steps removing /. and mergind //. with the next step

            boolean deepDot = false;

            for ( ; ; )
            {
                if (tokenize( "attribute", "::" ) || tokenize( "@" ))
                {
                    steps = addStep( deep, true, tokenizeQName(), steps );
                    break;
                }

                QName name;

                if (tokenize( "." ))
                    deepDot = deepDot || deep;
                else
                {
                    tokenize( "child", "::" );
                    if ((name = tokenizeQName()) != null)
                    {
                        steps = addStep( deep, false, name, steps );
                        deep = false; // only this step needs to be deep
                        // other folowing steps will be deep only if they are preceded by // wildcard
                    }
                }

                if (tokenize( "//" ))
                {
                    deep = true;
                    deepDot = false;
                }
                else if (tokenize( "/" ))
                {
                    if (deepDot)
                        deep = true;
                }
                else
                    break;
            }

            // If there was a //. at the end of th path, then we need to make
            // two paths, one with * at the end and another with @* at the end.

            if ((_lastDeepDot = deepDot))
            {
                _lastDeepDot = true;
                steps = addStep( true, false, getAnyQName(), steps );
            }

            // Add sentinal step (_name == null)

            return addStep( false, false, null, steps );
        }

        private void computeBacktrack ( Step steps )
            throws XPathCompileException
        {
            //
            // Compute static backtrack information
            //
            // Note that I use the fact that _hasBacktrack is initialized to
            // false and _backtrack to null in the following code.
            //

            Step s, t;

            for ( s = steps ; s != null ; s = t )
            {
                // Compute the segment from [ s, t )

                for ( t = s._next ; t != null && !t._deep ; )
                    t = t._next;

                // If the segment is NOT rooted at //, then the backtrack is
                // null for the entire segment, including possible attr and/or
                // sentinal

                if (!s._deep)
                {
                    for ( Step u = s ; u != t ; u = u._next )
                        u._hasBacktrack = true;

                    continue;
                }

                // Compute the sequence [ s, u ) of length n which contain no
                // wild steps.

                int n = 0;
                Step u = s;

                while ( u != t && u._name != null && !u.isWild() && !u._attr )
                {
                    n++;
                    u = u._next;
                }

                // Now, apply KMP to [ s, u ) for fast backtracking

                QName [] pattern = new QName [ n + 1 ];
                int [] kmp = new int [ n + 1 ];

                Step v = s;

                for ( int i = 0 ; i < n ; i++ )
                {
                    pattern[ i ] = v._name;
                    v = v._next;
                }

                pattern[ n ] = getAnyQName();

                int i = 0;
                int j = kmp[ 0 ] = -1;

                while ( i < n )
                {
                    while ( j > -1 && !pattern[ i ].equals( pattern[ j ] ) )
                        j = kmp[ j ];

                    if (pattern[ ++i ].equals( pattern[ ++j ] ))
                        kmp[ i ] = kmp[ j ];
                    else
                        kmp[ i ] = j;
                }

                i = 0;

                for ( v = s ; v != u ; v = v._next )
                {
                    v._hasBacktrack = true;
                    v._backtrack = s;

                    for ( j = kmp[ i ] ; j > 0 ; j-- )
                        v._backtrack = v._backtrack._next;

                    i++;
                }

                // Compute the success backtrack and stuff it into an attr and
                // sentinal if they exist for this segment

                v = s;

                if (n > 1)
                {
                    for ( j = kmp[ n - 1 ] ; j > 0 ; j-- )
                        v = v._next;
                }

                if (u != t && u._attr)
                {
                    u._hasBacktrack = true;
                    u._backtrack = v;
                    u = u._next;
                }

                if (u != t && u._name == null)
                {
                    u._hasBacktrack = true;
                    u._backtrack = v;
                }

                // The first part of a deep segment always backtracks to itself

                assert s._deep;

                s._hasBacktrack = true;
                s._backtrack = s;
            }
        }

        private void tokenizePath ( ArrayList paths )
            throws XPathCompileException
        {
            _lastDeepDot = false;

            Step steps = tokenizeSteps();

            computeBacktrack( steps );

            paths.add( steps );

            // If the last path ended in //., that path will match all
            // elements, here I make a path which matches all attributes.

            if (_lastDeepDot)
            {
                _sawDeepDot = true;

                Step s = null;

                for ( Step t = steps ; t != null ; t = t._next )
                {
                    if (t._next != null && t._next._next == null)
                        s = addStep( t._deep, true, t._name, s );
                    else
                        s = addStep( t._deep, t._attr, t._name, s );
                }

                computeBacktrack( s );

                paths.add( s );
            }
        }

        private Selector tokenizeSelector ( ) throws XPathCompileException
        {
            ArrayList paths = new ArrayList();

            tokenizePath( paths );

            while ( tokenize( "|" ) )
                tokenizePath( paths );

            return new Selector( (Step[]) paths.toArray( new Step [ 0 ] ) );
        }

        private XPath tokenizeXPath ( ) throws XPathCompileException
        {
            for ( ; ; )
            {
                if (tokenize( "declare", "namespace" ))
                {
                    if (!parseWhitespace())
                        throw newError( "Expected prefix after 'declare namespace'" );

                    String prefix = tokenizeNCName();

                    if (!tokenize( "=" ))
                        throw newError( "Expected '='" );

                    String uri = tokenizeQuotedUri();

                    if (_namespaces.containsKey( prefix ))
                    {
                        throw newError(
                            "Redefinition of namespace prefix: " + prefix );
                    }

                    _namespaces.put( prefix, uri );

                    //return these to saxon:? Is it an error to pass external NS
                    //that conflicts? or should we just override it?
                    if (_externalNamespaces.containsKey( prefix ))
                    {
                        throw newError(
                            "Redefinition of namespace prefix: " + prefix );
                    }
                    _externalNamespaces.put( prefix, uri );

                    if (! tokenize( ";" ))
                    {
//			            throw newError(
//                            "Namespace declaration must end with ;" );
			        }

                    _externalNamespaces.put(_NS_BOUNDARY,new Integer(_offset));

                    continue;
                }

                if (tokenize( "declare","default", "element", "namespace" ))
                {
                    String uri = tokenizeQuotedUri();

                    if (_namespaces.containsKey( "" ))
                    {
                        throw newError(
                            "Redefinition of default element namespace" );
                    }

                    _namespaces.put( "", uri );

                    //return these to saxon:? Is it an error to pass external NS
                    //that conflicts? or should we just override it?
                    if (_externalNamespaces.containsKey( XPath._DEFAULT_ELT_NS ))
                    {
                         throw newError("Redefinition of default element namespace : ");
                    }
                    _externalNamespaces.put( XPath._DEFAULT_ELT_NS, uri );

                    if (! tokenize( ";" ))
                        throw newError("Default Namespace declaration must end with ;" );
                    //the boundary is the last ; in the prolog...
                    _externalNamespaces.put(_NS_BOUNDARY,new Integer(_offset));

                    continue;
                }

                break;
            }

            // Add the default prefix mapping if it has not been redefined

            if (!_namespaces.containsKey( "" ))
                _namespaces.put( "", "" );

            Selector selector = tokenizeSelector();

            parseWhitespace();

            if (currChar() != -1)
            {
                throw newError(
                    "Unexpected char '" + (char) currChar() + "'" );
            }

            return new XPath( selector, _sawDeepDot );
        }

        //split of prolog decls that are not standard XPath syntax
        //but work in v1
        private void processNonXpathDecls(){

        }

        private String _expr;

        private boolean _sawDeepDot;  // Saw one overall
        private boolean _lastDeepDot;

        private String _currentNodeVar;

       // private Map _namespaces;
        protected Map _namespaces;
        private Map _externalNamespaces;

        private int _offset;
        private int _line;
        private int _column;
    }

    private static final class Step
    {
        Step ( boolean deep, boolean attr, QName name )
        {
            _name = name;

            _deep = deep;
            _attr = attr;

            int flags = 0;

            if (_deep || !_attr)
                flags |= ExecutionContext.DESCEND;

            if (_attr)
                flags |= ExecutionContext.ATTRS;

            _flags = flags;
        }

        boolean isWild ( )
        {
            return _name.getLocalPart().length() == 0;
        }

        boolean match ( QName name )
        {
            String local = _name.getLocalPart();
            String nameLocal = name.getLocalPart();
            String uri;
            String nameUri;

            int localLength = local.length();
            int uriLength;

            // match any name to _name when _name is empty ""@""
            if (localLength==0)
            {
                uri = _name.getNamespaceURI();
                uriLength = uri.length();

                if (uriLength==0)
                    return true;

                return uri.equals(name.getNamespaceURI());
            }

            if (localLength!=nameLocal.length())
                return false;

            uri = _name.getNamespaceURI();
            nameUri = name.getNamespaceURI();

            if (uri.length()!=nameUri.length())
                return false;

            return local.equals(nameLocal) && uri.equals(nameUri);
        }

        final boolean _attr;
        final boolean _deep;

        int _flags;

        final QName _name;

        Step _next, _prev;

        boolean _hasBacktrack;
        Step    _backtrack;
    }

    private static final class Selector
    {
        Selector ( Step[] paths )
        {
            _paths = paths;
        }

        final Step[] _paths;
    }

    //
    //
    //

    private XPath ( Selector selector, boolean sawDeepDot )
    {
        _selector = selector;
        _sawDeepDot = sawDeepDot;
    }

    public boolean sawDeepDot ( )
    {
        return _sawDeepDot;
    }

    public static final String _NS_BOUNDARY = "$xmlbeans!ns_boundary";
    public static final String _DEFAULT_ELT_NS = "$xmlbeans!default_uri";
    private final Selector _selector;
    private final boolean  _sawDeepDot;
}


text:
#ifndef SIDECAR_GUI_PLAYBACK_APP_H // -*- C++ -*-
#define SIDECAR_GUI_PLAYBACK_APP_H

#include "GUI/AppBase.h"

namespace SideCar {
namespace GUI {

/** Namespace for the Playback application.

    \image html Playback.png

    The SideCar Playback application can read binary files created by SideCar
    algorithms when they had their recorders turned on. Unlike the PRIEmitter
    application, Playback can retransmit data from multiple files at the same
    time. It also supports random access within the recording files, jumping
    forwards and backwards in time using both relative and absolute times.
*/
namespace Playback {

class BrowserWindow;

/** Application class for the Playback application.
 */
class App : public AppBase {
    Q_OBJECT
    using Super = AppBase;

public:
    /** Menu action enumeration for tool window show/hide actions.
     */
    enum ToolsMenuAction { kShowBrowserWindow, kNumToolsMenuActions };

    /** Obtain type-casted App singleton object.

        \return App object
    */
    static App* GetApp() { return static_cast<App*>(AppBase::GetApp()); }

    /** Constructor

        \param argc number of arguments on the command line

        \param argv array of command line parameter values
    */
    App(int& argc, char** argv);

    QAction* getToolsMenuAction(ToolsMenuAction index) { return Super::getToolsMenuAction(index); }

    BrowserWindow* getBrowserWindow() const { return browserWindow_; }

private:
    /** Override of AppBase method. Creates a new MainWindow object.

        \return MainWindow object
    */
    MainWindowBase* makeNewMainWindow(const QString& objectName);

    BrowserWindow* browserWindow_;
};

} // end namespace Playback
} // end namespace GUI
} // end namespace SideCar

/** \file
 */

#endif


text:
const d2utils = require('./../d2utils')
const path = require('path')
const fs = require('fs')

class Dota2GenerateTooltipsCommand extends Command {
  execute () {
    var npcDir = path.join(d2utils.getAddonGameDir(donkey.files.activeFilePath), 'scripts', 'npc')

    var unitsPath = path.join(npcDir, 'npc_units_custom.txt')
    var abilitiesPath = path.join(npcDir, 'npc_abilities_custom.txt')
    var itemsPath = path.join(npcDir, 'npc_items_custom.txt')

    var tooltipData = new VDFMap()

    // UNIT NAME STRINGS
    tooltipData.set(donkey.files.getCommentMacro(), 'UNIT NAMES')

    var unitsData = donkey.files.getParser('kv1').parse(fs.readFileSync(unitsPath, 'utf8')).get('DOTAUnits')

    this.generateUnitNames(unitsData, tooltipData)

    // Abilities
    tooltipData.set(donkey.files.getCommentMacro(), 'ABILITIES')

    var abilitiesData = donkey.files.getParser('kv1').parse(fs.readFileSync(abilitiesPath, 'utf8')).get('DOTAAbilities')

    this.generateAbilityTooltips(abilitiesData, tooltipData)

    // Items
    tooltipData.set(donkey.files.getCommentMacro(), 'ITEMS')

    var itemsData = donkey.files.getParser('kv1').parse(fs.readFileSync(itemsPath, 'utf8')).get('DOTAAbilities')

    this.generateAbilityTooltips(itemsData, tooltipData)

    var resultPath = path.join(d2utils.getAddonContentDir(donkey.files.activeFilePath), 'generated_tooltips.txt')

    donkey.files.add(resultPath)
    donkey.files.writeData(resultPath, tooltipData)
  }

  capitalizeFirst (str) {
    return str.charAt(0).toUpperCase() + str.slice(1)
  }

  generateUnitNames (data, result) {
    for (var [key, value] of data) {
      if (typeof value !== 'string') {
        var name = key
        var meta = data.getBefore(key)
        if (meta && meta[0].includes(donkey.files.KVMACRO_COMMENT)) {
          var metaData = donkey.files.getParser('kv1').parse(meta[1])
          if (metaData.has('Name')) {
            name = metaData.get('Name')
          }
        } else {
          var nameArr = key.split('_')
          var namePartOne = nameArr[nameArr.length - 2]
          var namePartTwo = nameArr[nameArr.length - 1]
          name = this.capitalizeFirst(namePartOne) + ' ' + this.capitalizeFirst(namePartTwo)
        }

        result.set(key, name)
      }
    }
  }

  generateAbilityTooltips (data, result) {
    for (var [key, value] of data) {
      if (typeof value !== 'string') {
        var id = 'DOTA_Tooltip_ability_' + key
        var prefix = id + '_'
        var meta = data.getBefore(key)

        var nameArr = key.split('_')
        var namePartOne = nameArr[nameArr.length - 2]
        var namePartTwo = nameArr[nameArr.length - 1]
        var name = this.capitalizeFirst(namePartOne) + ' ' + this.capitalizeFirst(namePartTwo)

        var description = ''
        var lore = ''
        var note0 = ''
        var note1 = ''

        if (meta && meta[0].includes(donkey.files.KVMACRO_COMMENT)) {
          var metaData = donkey.files.getParser('kv1').parse(meta[1])
          if (metaData.has('Name')) {
            name = metaData.get('Name')
          }
          if (metaData.has('Description')) {
            description = metaData.get('Description')
          }
          if (metaData.has('Lore')) {
            lore = metaData.get('Lore')
          }
          if (metaData.has('Note0')) {
            note0 = metaData.get('Note0')
          }
          if (metaData.has('Note1')) {
            note1 = metaData.get('Note1')
          }
        }

        result.set(id, name)

        if (description) {
          result.set(prefix + 'Description', description)
        }
        if (lore) {
          result.set(prefix + 'Lore', lore)
        }
        if (note0) {
          result.set(prefix + 'Note0', note0)
        }
        if (note1) {
          result.set(prefix + 'Note1', note1)
        }

        // AbilitySpecial
        if (value.has('AbilitySpecial')) {
          for (var [, value1] of value.get('AbilitySpecial')) {
            if (typeof value1 !== 'string') {
              for (var [key2] of value1) {
                if (key2 !== 'vart_type') {
                  result.set(prefix + key2, key2.toUpperCase().replace(/_/g, ' ') + ':')
                }
              }
            }
          }
        }
      }
    }
  }
}

module.exports = donkey.commands.add('dota2:generatetooltips', Dota2GenerateTooltipsCommand)


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <!-- Application information -->
  <groupId>com.brahalla</groupId>
  <artifactId>PhotoAlbum</artifactId>
  <version>1.0-SNAPSHOT</version>
  <name>PhotoAlbum</name>
  <description>Example photo album API</description>
  <inceptionYear>2015</inceptionYear>

  <!-- Properties information -->
  <properties>
    <java.version>1.8</java.version>
    <spring-boot.version>1.2.3.RELEASE</spring-boot.version>
    <spring-framework.version>4.1.6.RELEASE</spring-framework.version>
    <h2.version>1.4.188</h2.version>
    <jackson.version>2.5.3</jackson.version>
    <apache-commons.version>3.0</apache-commons.version>
    <junit.version>4.12</junit.version>
  </properties>

  <!-- Parent information -->
  <parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.2.5.RELEASE</version>
  </parent>

  <!-- Dependency information -->
  <dependencies>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-actuator</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-security</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-tx</artifactId>
      <version>${spring-framework.version}</version>
    </dependency>
    <dependency>
      <groupId>com.h2database</groupId>
      <artifactId>h2</artifactId>
      <version>${h2.version}</version>
    </dependency>
    <dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-databind</artifactId>
			<version>${jackson.version}</version>
		</dependency>
    <dependency>
      <groupId>com.mysema.querydsl</groupId>
      <artifactId>querydsl-core</artifactId>
      <version>3.6.0</version>
    </dependency>
    <dependency>
      <groupId>com.mysema.querydsl</groupId>
      <artifactId>querydsl-apt</artifactId>
      <version>3.6.0</version>
    </dependency>
    <dependency>
      <groupId>com.mysema.querydsl</groupId>
      <artifactId>querydsl-jpa</artifactId>
      <version>3.6.0</version>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
      <version>${apache-commons.version}</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <!-- Build information -->
  <build>
    <plugins>
      <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>pl.project13.maven</groupId>
        <artifactId>git-commit-id-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>com.mysema.maven</groupId>
        <artifactId>apt-maven-plugin</artifactId>
        <version>1.1.3</version>
        <executions>
          <execution>
            <goals>
              <goal>process</goal>
            </goals>
            <configuration>
              <outputDirectory>target/generated-sources/java</outputDirectory>
              <processor>com.mysema.query.apt.jpa.JPAAnnotationProcessor</processor>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

</project>


text:
class Admin::TaxCategoriesController < Admin::BaseController
  resource_controller

  create.response do |wants|
    wants.html { redirect_to collection_url }
  end

  update.response do |wants|
    wants.html { redirect_to collection_url }
  end
end


text:
from forecast.exceptions import MiddlewareError

from .signals import start_request, end_request, middleware_failure

class Middlewares(list):
    def __init__(self, settings, *args, **kwargs):
        self.settings = settings
        super(Middlewares, self).__init__(*args, **kwargs)

    def register(self, middlewares):
        for middleware in middlewares:
            instance = middleware(self.settings)
            self.append(instance)

class MiddlewareContextManager(object):
    def __init__(self, handler):
        self.handler = handler

    def __enter__(self):
        start_request.send(self.handler)

        middlewares = self.handler.middlewares
        for middleware in middlewares:
            try:
                middleware.start_request(self.handler)
            except Exception, error:
                middleware_failure.send(error)
                raise MiddlewareError("Error in middleware start %s: %s" % (middleware, error))

    def __exit__(self, exc_type, exc_val, exc_tb):
        middlewares = self.handler.middlewares
        for middleware in middlewares:
            try:
                middleware.end_request(self.handler)
            except Exception, error:
                middleware_failure.send(error)
                raise MiddlewareError("Error in middleware end %s: %s" % (middleware, error))

        end_request.send(self.handler)

class BaseMiddleware(object):
    def __init__(self, settings):
        self.settings = settings

    def start_request(self, handler):
        pass  # Do nothing!

    def end_request(self, handler):
        pass  # Do nothing!


text:
package com.team.weChat.common.model;

import java.io.File;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.ObjectMapper;
/**
 * 信息实体
 *
 * @author cl
 *
 */
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.NON_PRIVATE)
public class WeChat implements Cloneable, Serializable {

	private static final long serialVersionUID = -7880331156566396021L;

	/** 访问主页 */
	public static final Integer GOFIRSTPAGE_YES = 0;
	/** 不访问主页 */
	public static final Integer GOFIRSTPAGE_NO = -1;

	// 入库id 忽略属性

	private String id;
	// solr 设置别名

	private String solrid;
	// 公众号名字
	private String name;
	// 公众号账号
	private String weChat;
	// 公众号usrname

	private String usrname;
	// 公众号id
	private String openid;
	// 公众号简介
	private String desc;
	// 公众号主体
	private String source = "【无公司信息】";
	// 公众号图片url
	@JsonProperty("img_url")
	private String imgUrl;
	// 公众号二维码url
	@JsonProperty("qr_code_url")
	private String qrCodeUrl;
	// 频道id(tx新闻客户端)

	private String chlid;
	// 订阅数/粉丝数
	@JsonProperty("fan_num")
	private Integer fanNum;
	// 分享数
	@JsonProperty("share_num")
	private Integer shareNum;
	// 收藏数
	@JsonProperty("collection_num")
	private Integer collectionNum=0;
	// 阅读数
	@JsonProperty("read_num")
	private Integer readNum=0;
	// 所属地区
	private String area;
	// 最新发表
	@JsonProperty("update_time")
	private Long updateTime;
	@JsonProperty("update_article")
	private String updateArticle;
	// 公众号首页所有文章发表时间
	private List<Long> posttimes = new ArrayList<Long>();
	// 收录时间

	private Long birthTime = System.currentTimeMillis();
	// 采集该公众号时,是否访问公众号主页
	private Integer goFirstPage = GOFIRSTPAGE_NO;

	public WeChat() {
		super();
	}

	@Override
	public WeChat clone() {
		WeChat instance = null;
		try {
			instance = (WeChat) super.clone();
			instance.collectionNum = null;
			instance.desc = null;
			instance.chlid = null;
			instance.fanNum = null;
			instance.id = null;
			instance.solrid = null;
			instance.imgUrl = null;
			instance.name = null;
			instance.qrCodeUrl = null;
			instance.readNum = null;
			instance.shareNum = null;
			instance.source = "【无公司信息】";
			instance.weChat = null;
			instance.usrname = null;
			instance.openid = null;
			instance.area = null;
			instance.updateTime = null;
			instance.updateArticle = null;
			instance.posttimes = new ArrayList<Long>();
			instance.birthTime = System.currentTimeMillis();
			instance.goFirstPage = GOFIRSTPAGE_NO;
		} catch (CloneNotSupportedException e) {
			e.printStackTrace();
		}
		return instance;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getSolrid() {
		return solrid;
	}

	public void setSolrid(String solrid) {
		this.solrid = solrid;
	}

	public String getName() {
		return name;
	}

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

	public String getWeChat() {
		return weChat;
	}

	public void setWeChat(String weChat) {
		this.weChat = weChat;
	}

	public String getUsrname() {
		return usrname;
	}

	public void setUsrname(String usrname) {
		this.usrname = usrname;
	}

	public String getOpenid() {
		return openid;
	}

	public void setOpenid(String openid) {
		this.openid = openid;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public String getSource() {
		return source;
	}

	public void setSource(String source) {
		this.source = source;
	}

	public String getImgUrl() {
		return imgUrl;
	}

	public void setImgUrl(String imgUrl) {
		this.imgUrl = imgUrl;
	}

	public String getQrCodeUrl() {
		return qrCodeUrl;
	}

	public void setQrCodeUrl(String qrCodeUrl) {
		this.qrCodeUrl = qrCodeUrl;
	}

	public String getChlid() {
		return chlid;
	}

	public void setChlid(String chlid) {
		this.chlid = chlid;
	}

	public Integer getFanNum() {
		return fanNum;
	}

	public void setFanNum(Integer fanNum) {
		this.fanNum = fanNum;
	}

	public Integer getShareNum() {
		return shareNum;
	}

	public void setShareNum(Integer shareNum) {
		this.shareNum = shareNum;
	}

	public Integer getCollectionNum() {
		return collectionNum;
	}

	public void setCollectionNum(Integer collectionNum) {
		this.collectionNum = (collectionNum==null?0:collectionNum);
	}

	public Integer getReadNum() {
		return readNum;
	}

	public void setReadNum(Integer readNum) {
		this.readNum = readNum;
	}

	public String getArea() {
		return area;
	}

	public void setArea(String area) {
		this.area = area;
	}

	public Long getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Long updateTime) {
		this.updateTime = updateTime;
	}

	public String getUpdateArticle() {
		return updateArticle;
	}

	public void setUpdateArticle(String updateArticle) {
		this.updateArticle = updateArticle;
	}

	public List<Long> getPosttimes() {
		return posttimes;
	}

	public void setPosttimes(List<Long> posttimes) {
		this.posttimes = posttimes;
	}

	public Long getBirthTime() {
		return birthTime;
	}

	public void setBirthTime(Long birthTime) {
		this.birthTime = birthTime;
	}

	public Integer getGoFirstPage() {
		return goFirstPage;
	}

	public void setGoFirstPage(Integer goFirstPage) {
		this.goFirstPage = goFirstPage;
	}

	@Override
	public String toString() {
		return "WeChat [id=" + id + ", solrid=" + solrid + ", name=" + name + ", weChat=" + weChat + ", usrname="
				+ usrname + ", openid=" + openid + ", desc=" + desc + ", source=" + source + ", imgUrl=" + imgUrl
				+ ", qrCodeUrl=" + qrCodeUrl + ", fanNum=" + fanNum + ", shareNum=" + shareNum + ", collectionNum="
				+ collectionNum + ", readNum=" + readNum + ", area=" + area + ", updateTime=" + updateTime
				+ ", updateArticle=" + updateArticle + ", posttimes=" + posttimes + ", birthTime=" + birthTime
				+ ", goFirstPage=" + goFirstPage + "]";
	}

	public static void main(String[] args) throws Exception {
		ObjectMapper mapper = new ObjectMapper();
		WeChat[] list = mapper.readValue(new File("D:/hsnn/CX_program/com.hsnn.trade/src/main/resources/55.json"),WeChat[].class );
		System.out.println(list[0]);
	}
}


text:
export class HttpClientStatusReporter {
    setRootModel(rootModel) {
        this.rootModel = rootModel;
    }
    showWaitAnimation() {
        if (!this.rootModel) {
            return;
        }
        this.timer = setTimeout(() => {
            this.rootModel.showWaitAnimation();
        }, 1000);
    }
    hideWaitAnimation() {
        if (this.timer) {
            clearTimeout(this.timer);
        }
        if (!this.rootModel) {
            return;
        }
        this.rootModel.hideWaitAnimation();
    }
    reportError(error) {
        if (!this.rootModel) {
            console.log(error);
            return;
        }
        this.rootModel.reportError(error);
    }
}


text:
/*
 * Stub for class boofcv.core.image.border.ImageBorderValue.Value_I
 * Generated by Sapphire Compiler (sc).
 */
package boofcv.core.image.border.stubs;

public final class ImageBorderValue$Value_I_Stub extends boofcv.core.image.border.ImageBorderValue.Value_I implements sapphire.common.AppObjectStub {

    sapphire.policy.SapphirePolicy.SapphireClientPolicy $__client = null;
    boolean $__directInvocation = false;

    public ImageBorderValue$Value_I_Stub (int $param_int_1) {
        super($param_int_1);
    }

    public ImageBorderValue$Value_I_Stub (boofcv.struct.image.GrayI $param_GrayI_1, int $param_int_2) {
        super($param_GrayI_1, $param_int_2);
    }

    public void $__initialize(sapphire.policy.SapphirePolicy.SapphireClientPolicy client) {
        $__client = client;
    }

    public void $__initialize(boolean directInvocation) {
        $__directInvocation = directInvocation;
    }

    public Object $__clone() throws CloneNotSupportedException {
        return super.clone();
    }

    // Implementation of setOutside(int, int, int)
    public void setOutside(int $param_int_1, int $param_int_2, int $param_int_3) {
        java.lang.Object $__result = null;
        try {
            if ($__directInvocation)
                super.setOutside( $param_int_1,  $param_int_2,  $param_int_3);
            else {
                java.util.ArrayList<Object> $__params = new java.util.ArrayList<Object>();
                String $__method = "public void boofcv.core.image.border.ImageBorderValue$Value_I.setOutside(int,int,int)";
                $__params.add($param_int_1);
                $__params.add($param_int_2);
                $__params.add($param_int_3);
                $__result = $__client.onRPC($__method, $__params);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    // Implementation of getOutside(int, int)
    public int getOutside(int $param_int_1, int $param_int_2) {
        java.lang.Object $__result = null;
        try {
            if ($__directInvocation)
                $__result = super.getOutside( $param_int_1,  $param_int_2);
            else {
                java.util.ArrayList<Object> $__params = new java.util.ArrayList<Object>();
                String $__method = "public int boofcv.core.image.border.ImageBorderValue$Value_I.getOutside(int,int)";
                $__params.add($param_int_1);
                $__params.add($param_int_2);
                $__result = $__client.onRPC($__method, $__params);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        return ((java.lang.Integer) $__result).intValue();
    }
}


text:
package com.github.vvinston.functional;

import javax.annotation.Nonnull;
import java.util.function.Consumer;

public final class GuardedConsumerBuilderStepOne<INPUT> {
    private final Consumer<INPUT> success;

    GuardedConsumerBuilderStepOne(@Nonnull final Consumer<INPUT> success) {
        this.success = success;
    }

    public GuardedConsumerBuilderStepTwo<INPUT> inCaseOf(@Nonnull final Class<? extends RuntimeException> clazz) {
        return new GuardedConsumerBuilderStepTwo<>(clazz, success);
    }
}


text:
import os

from setuptools import setup, find_packages

here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README.md')) as f:
    README = f.read()
with open(os.path.join(here, 'CHANGES.txt')) as f:
    CHANGES = f.read()

requires = [
    'pyramid',
    'pyramid_mako',
    'pyramid_tm',
    'pyramid_debugtoolbar',
    'SQLAlchemy',
    'transaction',
    'zope.sqlalchemy',
    'waitress',
    'cornice',
    'gunicorn',
    'eventlet',
    'velruse'
    ]

setup(name='pi_director',
      version='0.0',
      description='pi_director',
      long_description=README + '\n\n' + CHANGES,
      classifiers=[
        "Programming Language :: Python",
        "Framework :: Pyramid",
        "Topic :: Internet :: WWW/HTTP",
        "Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
        ],
      author='',
      author_email='',
      url='',
      keywords='web wsgi bfg pylons pyramid',
      packages=find_packages(),
      include_package_data=True,
      zip_safe=False,
      test_suite='pi_director',
      install_requires=requires,
      entry_points="""\
      [paste.app_factory]
      main = pi_director:main
      [console_scripts]
      initialize_pi_director_db = pi_director.scripts.initializedb:main
      """,
      )


text:
package com.chdev.ks.minx;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

import com.balysv.materialripple.MaterialRippleLayout;

import butterknife.ButterKnife;

/**
 * Created by Kartik_ch on 8/15/2015.
 */
public class HomeFragment extends Fragment {

    String search_url, title, body;
    MainActivity mainActivity;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        //Log.d("test","true");
        ButterKnife.bind(getActivity());
        mainActivity = (MainActivity) getActivity();
        search_url = mainActivity.getSearchTxt();
        return inflater.inflate(R.layout.fragment_home, container, false);
    }

    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        LoadWebData loadWebData = new LoadWebData(search_url, getActivity());
        if (!search_url.equals("")) {
            //Toast.makeText(getActivity(), search_url, Toast.LENGTH_SHORT).show();
            loadWebData.execute();
        }
    }

}


text:
package net.mitchtech.xposed;

import android.app.Application;

import com.tsengvn.typekit.Typekit;

public class MacroExpandApplication extends Application {

    private static String TAG = MacroExpandApplication.class.getSimpleName();

    @Override
    public void onCreate() {
        super.onCreate();
        Typekit.getInstance()
                .addNormal(Typekit.createFromAsset(this, "Roboto-Light.ttf"))
                .addBold(Typekit.createFromAsset(this, "Roboto-Regular.ttf"))
                .addItalic(Typekit.createFromAsset(this, "Roboto-LightItalic.ttf"))
                .addBoldItalic(Typekit.createFromAsset(this, "Roboto-BoldItalic.ttf"));
    }
}


text:
typedef struct PoolTy {
  // Ptr1, Ptr2 - Implementation specified data pointers.
  void *Ptr1, *Ptr2;

  // NodeSize - Keep track of the object size tracked by this pool
  unsigned NodeSize;

  // FreeablePool - Set to false if the memory from this pool cannot be freed
  // before destroy.
  //
  unsigned FreeablePool;
} PoolTy;

extern "C" {
  void poolinit(PoolTy *Pool, unsigned NodeSize);
  void poolmakeunfreeable(PoolTy *Pool);
  void pooldestroy(PoolTy *Pool);
  void *poolalloc(PoolTy *Pool, unsigned NumBytes);
  void poolfree(PoolTy *Pool, void *Node);
  void poolcheck(PoolTy *Pool, void *Node);
}

#endif


text:
@import '../../../third_party/react-dates/_datepicker.css';

amp-date-picker,
.SingleDatePicker_picker,
.DateRangePicker_picker {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

amp-date-picker * {
  box-sizing: border-box;
  font-family: inherit;
}

.DateInput_input {
  font-size: 100%;
}

.CalendarMonth_caption {
  font-weight: lighter;
  margin: 0 -30px 38px;
  padding-bottom: 20px;
  background-color: #000;
  color: #fff;
}

.CalendarMonth_caption > * {
  font-weight: lighter;
}

.DayPicker_weekHeader {
  top: 75px;
}

.i-amphtml-default-week-day-format .DayPicker_weekHeader li::first-letter {
  font-size: small;
}

.i-amphtml-default-week-day-format .DayPicker_weekHeader li {
  font-size: 0;
}

.CalendarDay__highlighted_calendar,
.CalendarDay__highlighted_calendar:hover {
  background-color: #fff;
  border: 1px solid transparent;
}

.CalendarDay_container, /* remove after update to react-dates v16 */
.CalendarDay__default {
  border: 1px solid transparent;
}

.CalendarDay_container:hover, /* remove after update to react-dates v16 */
.CalendarDay__default:hover {
  background-color: #e4e7e7;
  border: 1px solid #e4e7e7;
}

.CalendarDay__blocked_calendar {
  border: 1px solid #cacccd;
}

.CalendarDay__blocked_out_of_range,
.CalendarDay__blocked_out_of_range:active,
.CalendarDay__blocked_out_of_range:hover {
  color: rgb(0, 0, 0, .1);
  border: 1px solid transparent;
}

.CalendarDay__hovered_span,
.CalendarDay__hovered_span:hover,
.CalendarDay__selected_span,
.CalendarDay__selected_span:active,
.CalendarDay__selected_span:hover {
  background-color: #9bbbdd;
  border: 1px solid #9bbbdd;
  color: #000;
}

.CalendarDay__selected,
.CalendarDay__selected_start,
.CalendarDay__selected:active,
.CalendarDay__selected:hover {
  background-color: #0654ab;
  border: 1px solid #0654ab;
  color: #fff;
}

.DayPickerNavigation_leftButton__horizontal,
.DayPickerNavigation_leftButton__horizontal:active {
  background-image: url('data:image/svg+xml;charset=utf-8,<svg width="16" height="25" xmlns="http://www.w3.org/2000/svg"><path fill="#fff" d="M15.7 22l-9.5-9.5L15.7 3l-3-3L.4 12.6 12.8 25"/></svg>');
}

.DayPickerNavigation_rightButton__horizontal,
.DayPickerNavigation_rightButton__horizontal:active {
  background-image: url('data:image/svg+xml;charset=utf-8,<svg width="16" height="25" xmlns="http://www.w3.org/2000/svg"><path fill="#fff" d="M.3 3l9.5 9.5L.3 22l3 3 12.4-12.5L3.2 0"/></svg>')!important;
}

.DayPickerNavigation_button__horizontal,
.DayPickerNavigation_button__horizontal:hover,
.DayPickerNavigation_button__horizontal:active {
  border: 0;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: 55% 50%;
  height: 30px;
  width: 26px;
  background-size: 13px 20px;
}

.DayPickerNavigation_svg__horizontal {
  display: none;
}

.DateInput_fangShape {
  fill: #000;
}

.DayPickerKeyboardShortcuts_show,
.DayPickerKeyboardShortcuts_show:hover {
  border: 2px solid #0654ab;
  border-radius: 50%;
  color: #0654ab;
  width: 22px;
  height: 22px;
  margin: 10px;
}

.DayPickerKeyboardShortcuts_show:hover {
  border: 2px solid #9bbbdd;
}

.DayPickerKeyboardShortcuts_show:hover .DayPickerKeyboardShortcuts_showSpan {
  color: #9bbbdd;
}

.DayPickerKeyboardShortcuts_showSpan {
  position: static;
  color: #0654ab;
  font-weight: bold;
}

.CalendarDay__highlighted_calendar,
.CalendarDay__highlighted_calendar:hover {
  background-image: radial-gradient(circle at 50% 82%, #0654ab 0px, #0654ab 2px, transparent 3px, transparent 100%);
}

.CalendarDay__selected.CalendarDay__highlighted_calendar {
  background-image: radial-gradient(circle at 50% 82%, #fff 0px, #fff 2px, transparent 3px, transparent 100%);
}

.CalendarDay__blocked_out_of_range.CalendarDay__highlighted_calendar::after {
  background-image: radial-gradient(circle at 50% 82%, rgba(0, 0, 0, 0.1) 0px, rgba(0, 0, 0, 0.1) 2px, transparent 3px, transparent 100%);
}

.i-amphtml-amp-date-picker-info {
  display: block;
  padding: 10px;
}

/**
 * TODO(cvializ): scope this to the date picker unless we want to enable AMP
 * tooltips more widely ; ) This is ok now because amp-date-picker is still
 * experimental
 * Adapted from: https://freqdec.github.io/Pure-CSS-Tooltips/
 */

[data-date-tooltip] {
  position: relative;
}

[data-date-tooltip]::before,
[data-date-tooltip]::after {
  pointer-events: none;
  outline: none;
  position: absolute;
  bottom: 100%;
  left: 50%;
  margin: 0;
  padding: 0;
  opacity: 0;
  transform: translate(-50%, 12px);
}

[data-date-tooltip]:hover::before,
[data-date-tooltip]:hover::after {
  transition: transform 300ms ease-out, opacity 300ms ease-out;
}

[data-date-tooltip]::before {
  content: "";
  width: 0;
  height: 0;
  line-height: 0;
  border: 5px solid transparent;
  border-top: 5px solid #000;
  border-bottom: 0px;
  overflow: hidden;
}

[data-date-tooltip]::after {
  content: attr(data-date-tooltip);
  width: 85px;
  margin-bottom: 5px;
  letter-spacing: normal;
  text-align: center;
  text-decoration: none;
  word-spacing: normal;
  word-wrap: normal;
  word-break: normal;
  line-height: 1.2;
  font-weight: normal;
  font-size: 14px;
  padding: 6px;
  min-height: 18px;
  color: #e9e6e6;
  background-color: #222;
  border-radius: 3px;
}

[data-date-tooltip]:hover::before,
[data-date-tooltip]:focus::before,
[data-date-tooltip]:hover::after,
[data-date-tooltip]:focus::after {
  transform: translate(-50%, 0);
  pointer-events: auto;
  opacity: 1;
}


text:
namespace anki {

//==============================================================================
template<typename TAlloc>
typename StringListBase<TAlloc>::String
	StringListBase<TAlloc>::join(const CString& separator) const
{
	// Count the characters
	I sepLen = separator.getLength();
	I charCount = 0;
	for(const String& str : *this)
	{
		charCount += str.getLength() + sepLen;
	}

	charCount -= sepLen; // Remove last separator
	ANKI_ASSERT(charCount > 0);

	Allocator alloc = Base::get_allocator();
	String out(alloc);
	out.reserve(charCount + 1);

	typename Base::const_iterator it = Base::begin();
	for(; it != Base::end(); it++)
	{
		out += *it;
		if(it != Base::end() - 1)
		{
			out += separator;
		}
	}

	return out;
}

//==============================================================================
template<typename TAlloc>
I StringListBase<TAlloc>::getIndexOf(const CString& value) const
{
	U pos = 0;

	for(auto it = Base::begin(); it != Base::end(); ++it)
	{
		if(*it == value)
		{
			break;
		}
		++ pos;
	}

	return (pos == Base::size()) ? -1 : pos;
}

//==============================================================================
template<typename TAlloc>
StringListBase<TAlloc>
	StringListBase<TAlloc>::splitString(
	const CString& s,
	const Char separator,
	Allocator alloc)
{
	Self out(alloc);
	const Char* begin = &s[0];
	const Char* end = begin;

	while(true)
	{
		if(*end == '\0')
		{
			if(begin < end)
			{
				out.emplace_back(begin, end, alloc);
			}

			break;
		}
		else if(*end == separator)
		{
			if(begin < end)
			{
				out.emplace_back(begin, end, alloc);
				begin = end + 1;
			}
			else
			{
				++begin;
			}
		}

		++end;
	}

	return out;
}

} // end namespace anki


text:
"""
Transform FreeSurfer surfaces to the original space of a given image.

Copyright 2011 Arno Klein (arno@mindboggle.info) after
               https://gist.github.com/1459725 by Satrajit Ghosh
Apache License, Version 2.0

"""

import os, sys
import numpy as np
import nibabel as nb
from tvtk.api import tvtk
from mayavi import mlab
import nibabel.gifti as gifti

transform_volume = 0
convert_volumes = 0
get_transforms = 1
transform_surfaces = 1
plot_output = 1
plot_output_files = 1

surfaces = ['pial'] #,'smoothwm'] #['inflated','sphere']
hemis = ['lh','rh']

# Inputs
if len(sys.argv) < 3:
    print "Usage: python freesurfer_to_native_space.py <path to FreeSurfer subject> <output directory>"
    exit(-1)
else:
    subject_path = sys.argv[1]
    output_path = sys.argv[2]

original_volume_mgz = subject_path + '/mri/orig/001.mgz'
conformed_volume_mgz = subject_path + '/mri/brain.mgz'
original_volume_nii = output_path + '/original.nii.gz'
conformed_volume_nii = output_path + '/conformed.nii.gz'
transformed_volume_nii = output_path + '/transformed.nii.gz'

# Reslice a conformed volume in native ("transformed") space:
if transform_volume and os.path.exists(conformed_volume_mgz) and os.path.exists(original_volume_mgz):
    args = ['mri_convert -rl',original_volume_mgz,'-rt nearest',conformed_volume_mgz,transformed_volume_nii]
    print(" ".join(args)); os.system(" ".join(args));  # p = Popen(args); p.close()

# Convert volume files from FreeSurfer's mgz format to nifti format:
if convert_volumes:
    if os.path.exists(original_volume_mgz):
        cmd = 'mri_convert ' + original_volume_mgz + ' ' + original_volume_nii; os.system(cmd)
    if os.path.exists(conformed_volume_mgz):
        cmd = 'mri_convert ' + conformed_volume_mgz + ' ' + conformed_volume_nii; os.system(cmd)

# Load the original and conformed volume files' affine transform matrices:
if get_transforms and os.path.exists(conformed_volume_nii) and os.path.exists(original_volume_nii):
    affine_conformed = nb.load(conformed_volume_nii).get_affine()
    affine_original = nb.load(original_volume_nii).get_affine()

# Create and apply a transform matrix to FreeSurfer's surface meshes:
if transform_surfaces:

    # Create the transform matrix from FreeSurfer's conformed surface to conformed volume:
    M = np.array([[-1,0,0,128],
                  [0,0,1,-128],
                  [0,-1,0,128],
                  [0,0,0,1]],dtype=float)

    print('xfm = np.dot( np.linalg.inv(affine_original), np.dot(affine_conformed, np.linalg.inv(M)))')
    xfm = np.dot( np.linalg.inv(affine_original), np.dot(affine_conformed, np.linalg.inv(M)))

    # Apply the above transform to FreeSurfer's surface meshes:
    for surface in surfaces:
        for hemi in hemis:
            freesurfer_surface = subject_path + '/surf/' + hemi + '.' + surface
            gifti_surface = output_path + '/' + hemi + '.' + surface + '.gii'
            vtk_surface = output_path + '/' + hemi + '.' + surface + '.vtp'
            if os.path.exists(freesurfer_surface):

                # Convert files from FreeSurfer surface format to gifti:
                args = ['mris_convert', freesurfer_surface, gifti_surface]
                print(" ".join(args)); os.system(" ".join(args));  # p = Popen(args); p.close()

                # Load gifti surface:
                surf = gifti.read(gifti_surface)

                # Transform the vertex data array:
                transformed_vertices = np.dot(xfm, np.hstack((surf.darrays[0].data, \
                                       np.ones((surf.darrays[0].data.shape[0],1)))).T)[:3,:].T

                surf=nb.freesurfer.read_geometry(freesurfer_surface)
                xfm = np.dot(affine_conformed, np.linalg.inv(M))
                xfmda0 = np.dot(xfm, np.hstack((surf[0], np.ones((surf[0].shape[0],1)))).T)[:3,:].T
                mesh = tvtk.PolyData(points=xfmda0, polys=surf[1])

                # Create a mesh:
#                mesh = tvtk.PolyData(points=transformed_vertices, polys=surf.darrays[1].data)
                if plot_output and not plot_output_files:
                    mlab.pipeline.surface(mesh)

                # Write gifti surface in original space to vtk file:
                print('w = tvtk.XMLPolyDataWriter(input=mesh, file_name=vtk_surface)')
                w = tvtk.XMLPolyDataWriter(input=mesh, file_name=vtk_surface)
                w.write()

# Plot the brain and surfaces transformed to native space:
if plot_output:
    cdata = nb.load(transformed_volume_nii).get_data()
    #mlab.pipeline.volume(mlab.pipeline.scalar_field(cdata))
    if plot_output_files:
        for surface in surfaces:
            for hemi in hemis:
                 vtk_surface = output_path + '/' + hemi + '.' + surface + '.vtp'
                 mesh_reader = tvtk.XMLPolyDataReader(file_name=vtk_surface)
                 mesh2 = mesh_reader.output
                 mlab.pipeline.surface(mesh2)
    mlab.show()


text:
package org.gradoop.flink.model.impl.operators.neighborhood;

import org.apache.flink.api.java.DataSet;
import org.apache.flink.api.java.tuple.Tuple2;
import org.gradoop.common.model.impl.id.GradoopId;
import org.gradoop.common.model.impl.pojo.Vertex;
import org.gradoop.flink.model.api.epgm.LogicalGraph;
import org.gradoop.flink.model.api.functions.VertexAggregateFunction;
import org.gradoop.flink.model.impl.functions.epgm.Id;
import org.gradoop.flink.model.impl.operators.neighborhood.functions.NeighborVertexReduceFunction;
import org.gradoop.flink.model.impl.operators.neighborhood.functions.ShuffledVertexIdsFromEdge;
import org.gradoop.flink.model.impl.operators.neighborhood.functions.VertexIdsFromEdge;
import org.gradoop.flink.model.impl.operators.neighborhood.functions.VertexToFieldOne;
import org.gradoop.flink.model.impl.operators.neighborhood.functions.VertexToFieldZero;
import org.gradoop.flink.model.impl.operators.neighborhood.keyselector.IdInTuple;

/**
 * Reduce vertex neighborhood operator.
 */
public class ReduceVertexNeighborhood extends VertexNeighborhood {

  /**
   * Valued constructor.
   *
   * @param function  vertex aggregate function
   * @param direction considered edge direction
   */
  public ReduceVertexNeighborhood(VertexAggregateFunction function, EdgeDirection direction) {
    super(function, direction);
  }

  /**
   * {@inheritDoc}
   */
  @Override
  public LogicalGraph execute(LogicalGraph graph) {
    DataSet<Vertex> vertices;
    switch (getDirection()) {
    case IN:
      // takes edges and gets the corresponding vertices and applies the aggregate function for
      // vertices of incoming edges
      vertices = graph.getEdges()
        // tuple of source id and target id
        .map(new VertexIdsFromEdge())
        .join(graph.getVertices())
        .where(1).equalTo(new Id<>())
        // replace the second id with the vertex
        .with(new VertexToFieldOne<GradoopId, GradoopId>())
        .join(graph.getVertices())
        // replace the first id with the vertex
        .where(0).equalTo(new Id<>())
        .with(new VertexToFieldZero<GradoopId, Vertex>())
        // group by the target vertex
        .groupBy(new IdInTuple<Tuple2<Vertex, Vertex>>(1))
        // aggregate values
        .reduceGroup(new NeighborVertexReduceFunction((VertexAggregateFunction) getFunction()));
      break;
    case OUT:
      // takes edges and gets the corresponding vertices and applies the aggregate function for
      // vertices of outgoing edges
      vertices = graph.getEdges()
        // tuple of target id and source id
        .map(new VertexIdsFromEdge(true))
        .join(graph.getVertices())
        .where(1).equalTo(new Id<>())
        // replace the second id with the vertex
        .with(new VertexToFieldOne<GradoopId, GradoopId>())
        .join(graph.getVertices())
        // replace the first id with the vertex
        .where(0).equalTo(new Id<>())
        .with(new VertexToFieldZero<GradoopId, Vertex>())
        // group by the target vertex
        .groupBy(new IdInTuple<Tuple2<Vertex, Vertex>>(1))
        // aggregate values
        .reduceGroup(new NeighborVertexReduceFunction((VertexAggregateFunction) getFunction()));
      break;
    case BOTH:
      // takes edges and gets the corresponding vertices and applies the aggregate function for
      // vertices of incoming and outgoing edges
      vertices = graph.getEdges()
        // maps source-target and target-source ids from the edge
        .flatMap(new ShuffledVertexIdsFromEdge())
        .join(graph.getVertices())
        .where(1).equalTo(new Id<>())
        // replace the second id with the vertex
        .with(new VertexToFieldOne<GradoopId, GradoopId>())
        .join(graph.getVertices())
        .where(0).equalTo(new Id<>())
        // replace the first id with the vertex
        .with(new VertexToFieldZero<GradoopId, Vertex>())
        .groupBy(new IdInTuple<Tuple2<Vertex, Vertex>>(1))
        // aggregate values
        .reduceGroup(new NeighborVertexReduceFunction((VertexAggregateFunction) getFunction()));
      break;
    default:
      vertices = null;
    }
    return graph.getConfig().getLogicalGraphFactory()
      .fromDataSets(graph.getGraphHead(), vertices, graph.getEdges());
  }

  /**
   * {@inheritDoc}
   */
  @Override
  public String getName() {
    return ReduceVertexNeighborhood.class.getName();
  }
}


text:
package org.zstack.utils;

import java.util.*;
import java.util.stream.Collectors;

/**
 */
public class RangeSet {
    public static class Range {
        private long start;
        private long end;

        public Range(long start, long end) {
            this.start = Math.min(start, end);
            this.end = Math.max(start, end);
        }

        public long getStart() {
            return start;
        }

        public void setStart(long start) {
            this.start = start;
        }

        public long getEnd() {
            return end;
        }

        public void setEnd(long end) {
            this.end = end;
        }

        public boolean isOverlap(Range r) {
            return (start <= r.end && r.end <= end) || (start <= r.start && r.start <= end);
        }

        public boolean isConnected(Range r) {
            return end + 1 == r.getStart() || r.getEnd() + 1 == start;
        }

        public void merge(Range r) {
            DebugUtils.Assert(isOverlap(r) || isConnected(r), String.format("range %s is not overlap with %s", toString(), r.toString()));
            start = Math.min(start, r.start);
            end = Math.max(end, r.end);
        }

        public boolean is(long s, long e) {
            return start == s && end == e;
        }

        @Override
        public String toString() {
            return String.format("[%s, %s]", start, end);
        }
    }

    private List<Range> ranges = new ArrayList<Range>();

    public List<Range> getRanges() {
        return ranges;
    }

    public void setRanges(List<Range> ranges) {
        this.ranges = ranges;
    }

    public RangeSet open(long s, long e) {
        ranges.add(new Range(s+1, e-1));
        return this;
    }

    public RangeSet closed(long s, long e) {
        ranges.add(new Range(s, e));
        return this;
    }

    public RangeSet openClosed(long s, long e) {
        ranges.add(new Range(s+1, e));
        return this;
    }

    public RangeSet closedOpen(long s, long e) {
        ranges.add(new Range(s, e-1));
        return this;
    }

    public List<Range> merge() {
        List<Range> ret = new ArrayList<Range>();
        if (ranges.isEmpty()) {
            return ret;
        }

        sort();

        Range r = ranges.get(0);
        for (int i=1; i<ranges.size(); i++) {
            Range r1 = ranges.get(i);
            if (r.isOverlap(r1) || r.isConnected(r1)) {
                r.merge(r1);
            } else {
                ret.add(r);
                r = r1;
            }
        }
        ret.add(r);
        return ret;
    }

    public List<Range> mergeAndSort() {
        List<Range> ret = merge();
        sort();
        return ret;
    }

    public void sort(){
        Collections.sort(ranges, new Comparator<Range>() {
            @Override
            public int compare(Range o1, Range o2) {
                return Long.compare(o1.start, o2.start);
            }
        });
    }

    public List<String> sortAndToString() {
        List<String> strList = new ArrayList<String>();
        if (ranges.isEmpty()){
            return strList;
        }

        sort();

        Iterator<Range> it = ranges.iterator();
        while (it.hasNext()){
            Range range = it.next();
            for (long i = range.start; i <= range.end; i++){
                strList.add(Long.toString(i));
            }
        }

        return strList;
    }

    public static RangeSet valueOf(Collection<Long> numbers) {
        RangeSet results = new RangeSet();
        if (numbers.isEmpty()) {
            return results;
        }

        List<Long> asc = numbers.stream().sorted().distinct().collect(Collectors.toList());
        Long begin = asc.remove(0);
        Long end = begin;
        for (long n : asc) {
            long lastEnd = end;
            if (n != ++end) {
                results.ranges.add(new Range(begin, lastEnd));
                begin = n;
                end = n;
            }
        }
        results.ranges.add(new Range(begin, end));
        return results;
    }

    public Set<Long> values(){
        Set<Long> result = new HashSet<>();
        for (Range range : ranges) {
            for (long i = range.start; i <= range.end; i++) {
                result.add(i);
            }
        }
        return result;
    }
}


text:
/// Copyright (c) 2012 Ecma International.  All rights reserved.
/**
 * @path ch13/13.2/13.2-25-s.js
 * @description StrictMode - reading a property named 'arguments' of function objects is not allowed outside the function
 * @onlyStrict
 */

function testcase() {
        function foo () {"use strict";}
        try {
            var temp = foo.arguments;
            return false;
        }
        catch (e) {
            return e instanceof TypeError;
        }
}
runTestCase(testcase);


text:
typedef DPTR(class Precode) PTR_Precode;

#ifndef PRECODE_ALIGNMENT
#define PRECODE_ALIGNMENT sizeof(void*)
#endif

enum PrecodeType {
    PRECODE_INVALID         = InvalidPrecode::Type,
    PRECODE_STUB            = StubPrecode::Type,
#ifdef HAS_NDIRECT_IMPORT_PRECODE
    PRECODE_NDIRECT_IMPORT  = NDirectImportPrecode::Type,
#endif // HAS_NDIRECT_IMPORT_PRECODE
#ifdef HAS_REMOTING_PRECODE
    PRECODE_REMOTING        = RemotingPrecode::Type,
#endif // HAS_REMOTING_PRECODE
#ifdef HAS_FIXUP_PRECODE
    PRECODE_FIXUP           = FixupPrecode::Type,
#endif // HAS_FIXUP_PRECODE
#ifdef HAS_THISPTR_RETBUF_PRECODE
    PRECODE_THISPTR_RETBUF  = ThisPtrRetBufPrecode::Type,
#endif // HAS_THISPTR_RETBUF_PRECODE
};

// For more details see. file:../../doc/BookOfTheRuntime/ClassLoader/MethodDescDesign.doc
class Precode {
#ifdef DACCESS_COMPILE
    friend class NativeImageDumper;
#endif

    BYTE m_data[SIZEOF_PRECODE_BASE];

    StubPrecode* AsStubPrecode()
    {
        LIMITED_METHOD_CONTRACT;
        SUPPORTS_DAC;

        return dac_cast<PTR_StubPrecode>(this);
    }

#ifdef HAS_NDIRECT_IMPORT_PRECODE
public:
    // Fake precodes has to be exposed
    NDirectImportPrecode* AsNDirectImportPrecode()
    {
        LIMITED_METHOD_CONTRACT;
        SUPPORTS_DAC;

        return dac_cast<PTR_NDirectImportPrecode>(this);
    }

private:
#endif // HAS_NDIRECT_IMPORT_PRECODE

#ifdef HAS_REMOTING_PRECODE
    RemotingPrecode* AsRemotingPrecode()
    {
        LIMITED_METHOD_CONTRACT;
        SUPPORTS_DAC;

        return dac_cast<PTR_RemotingPrecode>(this);
    }
#endif // HAS_REMOTING_PRECODE

#ifdef HAS_FIXUP_PRECODE
    FixupPrecode* AsFixupPrecode()
    {
        LIMITED_METHOD_CONTRACT;
        SUPPORTS_DAC;

        return dac_cast<PTR_FixupPrecode>(this);
    }
#endif // HAS_FIXUP_PRECODE

#ifdef HAS_THISPTR_RETBUF_PRECODE
    ThisPtrRetBufPrecode* AsThisPtrRetBufPrecode()
    {
        LIMITED_METHOD_CONTRACT;
        SUPPORTS_DAC;
        return dac_cast<PTR_ThisPtrRetBufPrecode>(this);
    }
#endif // HAS_THISPTR_RETBUF_PRECODE

    TADDR GetStart()
    {
        SUPPORTS_DAC;
        LIMITED_METHOD_CONTRACT;
        return dac_cast<TADDR>(this);
    }

    static void UnexpectedPrecodeType(const char * originator, PrecodeType precodeType)

    {
        SUPPORTS_DAC;
#ifdef DACCESS_COMPILE
        DacError(E_UNEXPECTED);
#else
#ifdef _PREFIX_
        // We only use __UNREACHABLE here since otherwise it would be a hint
        // for the compiler to fold this case with the other cases in a switch
        // statement. However, we would rather have this case be a separate
        // code path so that we will get a clean crash sooner.
        __UNREACHABLE("Unexpected precode type");
#endif
        CONSISTENCY_CHECK_MSGF(false, ("%s: Unexpected precode type: 0x%02x.", originator, precodeType));
#endif
    }

public:
    PrecodeType GetType()
    {
        LIMITED_METHOD_CONTRACT;
        SUPPORTS_DAC;

#ifdef OFFSETOF_PRECODE_TYPE

        BYTE type = m_data[OFFSETOF_PRECODE_TYPE];
#ifdef _TARGET_X86_
        if (type == X86_INSTR_MOV_RM_R)
            type = m_data[OFFSETOF_PRECODE_TYPE_MOV_RM_R];
#endif //  _TARGET_X86_

#ifdef _TARGET_AMD64_
        if (type == (X86_INSTR_MOV_R10_IMM64 & 0xFF))
            type = m_data[OFFSETOF_PRECODE_TYPE_MOV_R10];
        else if ((type == (X86_INSTR_CALL_REL32 & 0xFF)) || (type == (X86_INSTR_JMP_REL32  & 0xFF)))
            type = m_data[OFFSETOF_PRECODE_TYPE_CALL_OR_JMP];
#endif // _AMD64

#if defined(HAS_FIXUP_PRECODE) && (defined(_TARGET_X86_) || defined(_TARGET_AMD64_))
        if (type == FixupPrecode::TypePrestub)
            type = FixupPrecode::Type;
#endif

#ifdef _TARGET_ARM_
        static_assert_no_msg(offsetof(StubPrecode, m_pTarget) == offsetof(NDirectImportPrecode, m_pMethodDesc));
        // If the precode does not have thumb bit on target, it must be NDirectImportPrecode.
        if (type == StubPrecode::Type && ((AsStubPrecode()->m_pTarget & THUMB_CODE) == 0))
            type = NDirectImportPrecode::Type;
#endif

        return (PrecodeType)type;

#else // OFFSETOF_PRECODE_TYPE
        return PRECODE_STUB;
#endif // OFFSETOF_PRECODE_TYPE
    }

    static BOOL IsValidType(PrecodeType t);

    static int AlignOf(PrecodeType t)
    {
        SUPPORTS_DAC;
        int align = PRECODE_ALIGNMENT;

#if defined(_TARGET_X86_) && defined(HAS_FIXUP_PRECODE)
        // Fixup precodes has to be aligned to allow atomic patching
        if (t == PRECODE_FIXUP)
            align = 8;
#endif // _TARGET_X86_ && HAS_FIXUP_PRECODE

#if defined(_TARGET_ARM_) && defined(HAS_COMPACT_ENTRYPOINTS)
        // Precodes have to be aligned to allow fast compact entry points check
        _ASSERTE (align >= sizeof(void*));
#endif // _TARGET_ARM_ && HAS_COMPACT_ENTRYPOINTS

        return align;
    }

    static SIZE_T SizeOf(PrecodeType t);

    SIZE_T SizeOf()
    {
        WRAPPER_NO_CONTRACT;
        return SizeOf(GetType());
    }

    // Note: This is immediate target of the precode. It does not follow jump stub if there is one.
    PCODE GetTarget();

    BOOL IsPointingTo(PCODE target, PCODE addr)
    {
        WRAPPER_NO_CONTRACT;
        SUPPORTS_DAC;

#ifdef CROSSGEN_COMPILE
        // Crossgen does not create jump stubs on AMD64, so just return always false here to
        // avoid non-deterministic behavior.
        return FALSE;
#else // CROSSGEN_COMPILE
        if (target == addr)
            return TRUE;

#ifdef _TARGET_AMD64_
        // Handle jump stubs
        if (isJumpRel64(target)) {
            target = decodeJump64(target);
            if (target == addr)
                return TRUE;
        }
#endif // _TARGET_AMD64_

        return FALSE;
#endif // CROSSGEN_COMPILE
    }

    BOOL IsPointingToNativeCode(PCODE pNativeCode)
    {
        WRAPPER_NO_CONTRACT;
        SUPPORTS_DAC;

#ifdef HAS_REMOTING_PRECODE
        // Remoting precode is special case
        if (GetType() == PRECODE_REMOTING)
            return FALSE;
#endif

        return IsPointingTo(GetTarget(), pNativeCode);
    }

    BOOL IsPointingToPrestub(PCODE target);

    BOOL IsPointingToPrestub()
    {
        WRAPPER_NO_CONTRACT;
        return IsPointingToPrestub(GetTarget());
    }

    PCODE GetEntryPoint()
    {
        LIMITED_METHOD_CONTRACT;
        return dac_cast<TADDR>(this) + GetEntryPointOffset();
    }

    static SIZE_T GetEntryPointOffset()
    {
        LIMITED_METHOD_CONTRACT;
#ifdef _TARGET_ARM_
        return THUMB_CODE;
#else
        return 0;
#endif
    }

    MethodDesc *  GetMethodDesc(BOOL fSpeculative = FALSE);
    BOOL          IsCorrectMethodDesc(MethodDesc *  pMD);

    static Precode* Allocate(PrecodeType t, MethodDesc* pMD,
        LoaderAllocator *pLoaderAllocator, AllocMemTracker *pamTracker);
    void Init(PrecodeType t, MethodDesc* pMD, LoaderAllocator *pLoaderAllocator);

#ifndef DACCESS_COMPILE
    void ResetTargetInterlocked();
    BOOL SetTargetInterlocked(PCODE target, BOOL fOnlyRedirectFromPrestub = TRUE);

    // Reset precode to point to prestub
    void Reset();
#endif // DACCESS_COMPILE

    static Precode* GetPrecodeFromEntryPoint(PCODE addr, BOOL fSpeculative = FALSE)
    {
        LIMITED_METHOD_DAC_CONTRACT;

#ifdef DACCESS_COMPILE
        // Always use speculative checks with DAC
        fSpeculative = TRUE;
#endif

        TADDR pInstr = PCODEToPINSTR(addr);

        // Always do consistency check in debug
        if (fSpeculative INDEBUG(|| TRUE))
        {
            if (!IS_ALIGNED(pInstr, PRECODE_ALIGNMENT) || !IsValidType(PTR_Precode(pInstr)->GetType()))
            {
                if (fSpeculative) return NULL;
                _ASSERTE(!"Precode::GetPrecodeFromEntryPoint: Unexpected code in precode");
            }
        }

        Precode* pPrecode = PTR_Precode(pInstr);

        if (!fSpeculative)
        {
            g_IBCLogger.LogMethodPrecodeAccess(pPrecode->GetMethodDesc());
        }

        return pPrecode;
    }

    // If addr is patched fixup precode, returns address that it points to. Otherwise returns NULL.
    static PCODE TryToSkipFixupPrecode(PCODE addr);

    //
    // Precode as temporary entrypoint
    //

    static SIZE_T SizeOfTemporaryEntryPoint(PrecodeType t)
    {
        LIMITED_METHOD_DAC_CONTRACT;
#ifdef HAS_FIXUP_PRECODE_CHUNKS
        _ASSERTE(t != PRECODE_FIXUP);
#endif
        return ALIGN_UP(SizeOf(t), AlignOf(t));
    }

    static Precode * GetPrecodeForTemporaryEntryPoint(TADDR temporaryEntryPoints, int index);

    static SIZE_T SizeOfTemporaryEntryPoints(PrecodeType t, bool preallocateJumpStubs, int count);
    static SIZE_T SizeOfTemporaryEntryPoints(TADDR temporaryEntryPoints, int count);

    static TADDR AllocateTemporaryEntryPoints(MethodDescChunk* pChunk,
        LoaderAllocator *pLoaderAllocator, AllocMemTracker *pamTracker);

#ifdef FEATURE_PREJIT
    //
    // NGEN stuff
    //

    void Save(DataImage *image);
    void Fixup(DataImage *image, MethodDesc * pMD);

    BOOL IsPrebound(DataImage *image);

    // Helper class for saving precodes in chunks
    class SaveChunk
    {
#ifdef HAS_FIXUP_PRECODE_CHUNKS
        // Array of methods to be saved in the method desc chunk
        InlineSArray<MethodDesc *, 20> m_rgPendingChunk;
#endif // HAS_FIXUP_PRECODE_CHUNKS

    public:
        void Save(DataImage * image, MethodDesc * pMD);
        void Flush(DataImage * image);
    };
#endif // FEATURE_PREJIT

#ifdef DACCESS_COMPILE
    void EnumMemoryRegions(CLRDataEnumMemoryFlags flags);
#endif

#ifdef HAS_FIXUP_PRECODE_CHUNKS
    static DWORD GetOffsetOfBase(PrecodeType t, DWORD count)
    {
        assert(t == PRECODE_FIXUP);
        return (DWORD)(count * sizeof(FixupPrecode));
    }

    static DWORD GetOffset(PrecodeType t, DWORD index, DWORD count)
    {
        assert(t == PRECODE_FIXUP);
        assert(index < count);
        return (DWORD)((count - index - 1)* sizeof(FixupPrecode));
    }
#endif
};

#endif // __PRECODE_H__


text:
{{theCompany.content.name}}

Address: {{theCompany.content.address}}

                <button class="btn" ng-click="showForm()" data-toggle="modal">
                    Add Director
                </button>

City: {{theCompany.content.city}}

Country: {{theCompany.content.country}}

Telephone: {{theCompany.content.phone}}

E-mail: {{theCompany.content.email}}

Directors:

                <form id="form" name="form" ng-model="newDirector">

                                Forename:

                                <input type='text' ng-model="newDirector.forename" required/>
                                Required!

                                Surname:

                                <input type='text' ng-model="newDirector.surname" required/>
                                Required!

                                <button class="btn" ng-click="addDirector(newDirector)" data-toggle="modal">
                                    Submit
                                </button>

                </form>

                            {{director.forename}} {{director.surname}}

                        <button ng-click="deleteDirector(director)" role='button' class='btn'>
                            Delete
                        </button>