text:
#!/bin/sh

#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# -----------------------------------------------------------------------------------------------
# Tests report builder
# -----------------------------------------------------------------------------------------------
# Script is used to analyze load tests logs collected from all 'Tests' cluster nodes and build
# summary report
# -----------------------------------------------------------------------------------------------

#profile=/home/ignite/.bash_profile
profile=/root/.bash_profile

. $profile
. /opt/ignite-cassandra-tests/bootstrap/aws/common.sh "test"

# Building tests summary report
reportTestsSummary()
{
    echo "[INFO] Preparing tests results summary"

    TESTS_SUMMARY_DIR=/opt/ignite-cassandra-tests/tests-summary
    SUCCEED_NODES_FILE=$TESTS_SUMMARY_DIR/succeed-nodes
    SUCCEED_NODES_DIR=$TESTS_SUMMARY_DIR/succeed
    FAILED_NODES_FILE=$TESTS_SUMMARY_DIR/failed-nodes
    FAILED_NODES_DIR=$TESTS_SUMMARY_DIR/failed
    REPORT_FILE=$TESTS_SUMMARY_DIR/report.txt

    rm -Rf $TESTS_SUMMARY_DIR
    mkdir -p $TESTS_SUMMARY_DIR
    mkdir -p $SUCCEED_NODES_DIR
    mkdir -p $FAILED_NODES_DIR

    aws s3 ls $S3_TESTS_SUCCESS | sed -r "s/PRE //g" | sed -r "s/ //g" | sed -r "s/\///g" > $SUCCEED_NODES_FILE
    aws s3 ls $S3_TESTS_FAILURE | sed -r "s/PRE //g" | sed -r "s/ //g" | sed -r "s/\///g" > $FAILED_NODES_FILE

    succeedCount=$(cat $SUCCEED_NODES_FILE | wc -l)
    failedCount=$(cat $FAILED_NODES_FILE | wc -l)
    count=$(( $succeedCount+$failedCount ))

    echo "Test type         : $TESTS_TYPE" > $REPORT_FILE
    echo "Test nodes count  : $count" >> $REPORT_FILE
    echo "Test nodes succeed: $succeedCount" >> $REPORT_FILE
    echo "Test nodes failed : $failedCount" >> $REPORT_FILE
    echo "----------------------------------------------------------------------------------------------" >> $REPORT_FILE

    if [ $succeedCount -gt 0 ]; then
        echo "Succeed test nodes |" >> $REPORT_FILE
        echo "-------------------" >> $REPORT_FILE
        cat $SUCCEED_NODES_FILE >> $REPORT_FILE
        echo "----------------------------------------------------------------------------------------------" >> $REPORT_FILE

        aws s3 sync --delete $S3_TESTS_SUCCESS $SUCCEED_NODES_DIR
        if [ $? -ne 0 ]; then
            echo "[ERROR] Failed to get succeed tests details"
        else
            reportSucceedTestsStatistics "$REPORT_FILE" "$SUCCEED_NODES_DIR"
        fi
    fi

    if [ $failedCount -gt 0 ]; then
        echo "Failed test nodes |" >> $REPORT_FILE
        echo "------------------" >> $REPORT_FILE
        cat $FAILED_NODES_FILE >> $REPORT_FILE
        echo "----------------------------------------------------------------------------------------------" >> $REPORT_FILE

        aws sync --delete $S3_TESTS_FAILURE $FAILED_NODES_DIR
        if [ $? -ne 0 ]; then
            echo "[ERROR] Failed to get failed tests details"
        else
            reportFailedTestsDetailes "$REPORT_FILE" "$FAILED_NODES_DIR"
        fi
    fi

    rm -f $HOME/tests-summary.zip

    pushd $TESTS_SUMMARY_DIR

    zip -r -9 $HOME/tests-summary.zip .
    code=$?

    rm -Rf $TESTS_SUMMARY_DIR

    popd

    if [ $code -ne 0 ]; then
        echo "-------------------------------------------------------------------------------------"
        echo "[ERROR] Failed to create tests summary zip archive $HOME/tests-summary.zip for $TESTS_SUMMARY_DIR"
        echo "-------------------------------------------------------------------------------------"
        return 1
    fi

    aws s3 cp --sse AES256 $HOME/tests-summary.zip $S3_TESTS_SUMMARY
    if [ $? -ne 0 ]; then
        echo "-------------------------------------------------------------------------------------"
        echo "[ERROR] Failed to uploat tests summary archive to: $S3_TESTS_SUMMARY"
        echo "-------------------------------------------------------------------------------------"
    else
        echo "-------------------------------------------------------------------------------------"
        echo "[INFO] Tests results summary uploaded to: $S3_TESTS_SUMMARY"
        echo "-------------------------------------------------------------------------------------"
    fi

    rm -f $HOME/tests-summary.zip
}

# Creates report for succeed tests
reportSucceedTestsStatistics()
{
    writeMsg="0"
    writeErrors="0"
    writeSpeed="0"
    blkWriteMsg="0"
    blkWriteErrors="0"
    blkWriteSpeed="0"
    readMsg="0"
    readErrors="0"
    readSpeed="0"
    blkReadMsg="0"
    blkReadErrors="0"
    blkReadSpeed="0"

    writeErrNodes=
    blkWriteErrNodes=
    readErrNodes=
    blkReadErrNodes=

	tmpFile=`mktemp`

    for dir in $2/*
    do
        node=$(echo $dir | sed -r "s/^.*\///g")
        echo "-------------------------------------------------------------------------------------"
        echo "[INFO] Gathering statistics from $node test node"
        echo "-------------------------------------------------------------------------------------"

        logFile=$(ls $dir | grep "${TESTS_TYPE}-load-tests.log" | head -1)
        if [ -z "$logFile" ]; then
            echo "[WARN] Node $node marked as succeeded, but it doesn't have \"${TESTS_TYPE}-load-tests.log\" tests results summary file"
            echo "WARNING |" >> $tmpFile
            echo "--------" >> $tmpFile
            echo "Node $node marked as succeeded," >> $tmpFile
            echo "but it doesn't have \"${TESTS_TYPE}-load-tests.log\" tests results summary file" >> $tmpFile
            echo "----------------------------------------------------------------------------------------------" >> $tmpFile
            continue
        fi

        logFile=$dir/$logFile
        if [ ! -f "$logFile" ]; then
            echo "[WARN] Node $node marked as succeeded, but it doesn't have \"${TESTS_TYPE}-load-tests.log\" tests results summary file"
            echo "WARNING |" >> $tmpFile
            echo "--------" >> $tmpFile
            echo "Node $node marked as succeeded," >> $tmpFile
            echo "but it doesn't have \"${TESTS_TYPE}-load-tests.log\" tests results summary file" >> $tmpFile
            echo "----------------------------------------------------------------------------------------------" >> $tmpFile
            continue
        fi

        cnt=$(cat $logFile | grep "^WRITE messages" | sed -r "s/WRITE messages: //g" | xargs)
        if [ -n "$cnt" ]; then
            writeMsg=$(bc <<< "$writeMsg + $cnt")
            if [ $cnt -ne 0 ]; then
                echo "[INFO] WRITE messages: $cnt"
            else
                echo "[WARN] WRITE messages count is zero for $node node. This test probably failed."
                echo "WARNING |" >> $tmpFile
                echo "--------" >> $tmpFile
                echo "WRITE messages count is zero for $node node. This test probably failed." >> $tmpFile
                echo "----------------------------------------------------------------------------------------------" >> $tmpFile
            fi
        else
            echo "[WARN] Failed to detect WRITE messages count for $node node. This test probably failed."
            echo "WARNING |" >> $tmpFile
            echo "--------" >> $tmpFile
            echo "Failed to detect WRITE messages count for $node node. This test probably failed." >> $tmpFile
            echo "----------------------------------------------------------------------------------------------" >> $tmpFile
        fi

        cnt=$(cat $logFile | grep "^WRITE errors" | sed -r "s/WRITE errors: //g" | sed -r "s/,.*//g" | xargs)
        if [ -n "$cnt" ]; then
            echo "[INFO] WRITE errors: $cnt"
            writeErrors=$(bc <<< "$writeErrors + $cnt")
            if [ $cnt -ne 0 ]; then
                if [ -n "$writeErrNodes" ]; then
                    writeErrNodes="${writeErrNodes}, "
                fi
                writeErrNodes="${writeErrNodes}${node}"
            fi
        else
            echo "[WARN] Failed to detect WRITE errors count for $node node. This test probably failed."
            echo "WARNING |" >> $tmpFile
            echo "--------" >> $tmpFile
            echo "Failed to detect WRITE errors count for $node node. This test probably failed." >> $tmpFile
            echo "----------------------------------------------------------------------------------------------" >> $tmpFile
        fi

        cnt=$(cat $logFile | grep "^WRITE speed" | sed -r "s/WRITE speed: //g" | sed -r "s/ msg\/sec//g" | xargs)
        if [ -n "$cnt" ]; then
            writeSpeed=$(bc <<< "$writeSpeed + $cnt")
            if [ $cnt -ne 0 ]; then
                echo "[INFO] WRITE speed: $cnt msg/sec"
            else
                echo "[WARN] WRITE speed is zero for $node node. This test probably failed."
                echo "WARNING |" >> $tmpFile
                echo "--------" >> $tmpFile
                echo "WRITE speed is zero for $node node. This test probably failed." >> $tmpFile
                echo "----------------------------------------------------------------------------------------------" >> $tmpFile
            fi
        else
            echo "[WARN] Failed to detect WRITE speed for $node node. This test probably failed."
            echo "WARNING |" >> $tmpFile
            echo "--------" >> $tmpFile
            echo "Failed to detect WRITE speed for $node node. This test probably failed." >> $tmpFile
            echo "----------------------------------------------------------------------------------------------" >> $tmpFile
        fi

        cnt=$(cat $logFile | grep "^BULK_WRITE messages" | sed -r "s/BULK_WRITE messages: //g" | xargs)
        if [ -n "$cnt" ]; then
            blkWriteMsg=$(bc <<< "$blkWriteMsg + $cnt")
            if [ $cnt -ne 0 ]; then
                echo "[INFO] BULK_WRITE messages: $cnt"
            else
                echo "[WARN] BULK_WRITE messages count is zero for $node node. This test probably failed."
                echo "WARNING |" >> $tmpFile
                echo "--------" >> $tmpFile
                echo "BULK_WRITE messages count is zero for $node node. This test probably failed." >> $tmpFile
                echo "----------------------------------------------------------------------------------------------" >> $tmpFile
            fi
        else
            echo "[WARN] Failed to detect BULK_WRITE messages count for $node node. This test probably failed."
            echo "WARNING |" >> $tmpFile
            echo "--------" >> $tmpFile
            echo "Failed to detect BULK_WRITE messages count for $node node. This test probably failed." >> $tmpFile
            echo "----------------------------------------------------------------------------------------------" >> $tmpFile
        fi

        cnt=$(cat $logFile | grep "^BULK_WRITE errors" | sed -r "s/BULK_WRITE errors: //g" | sed -r "s/,.*//g" | xargs)
        if [ -n "$cnt" ]; then
            blkWriteErrors=$(bc <<< "$blkWriteErrors + $cnt")
            echo "[INFO] BULK_WRITE errors: $cnt"
            if [ $cnt -ne 0 ]; then
                if [ -n "$blkWriteErrNodes" ]; then
                    blkWriteErrNodes="${blkWriteErrNodes}, "
                fi
                blkWriteErrNodes="${blkWriteErrNodes}${node}"
            fi
        else
            echo "[WARN] Failed to detect BULK_WRITE errors count for $node node. This test probably failed."
            echo "WARNING |" >> $tmpFile
            echo "--------" >> $tmpFile
            echo "Failed to detect BULK_WRITE errors count for $node node. This test probably failed." >> $tmpFile
            echo "----------------------------------------------------------------------------------------------" >> $tmpFile
        fi

        cnt=$(cat $logFile | grep "^BULK_WRITE speed" | sed -r "s/BULK_WRITE speed: //g" | sed -r "s/ msg\/sec//g" | xargs)
        if [ -n "$cnt" ]; then
            blkWriteSpeed=$(bc <<< "$blkWriteSpeed + $cnt")
            if [ $cnt -ne 0 ]; then
                echo "[INFO] BULK_WRITE speed: $cnt msg/sec"
            else
                echo "[WARN] BULK_WRITE speed is zero for $node node. This test probably failed."
                echo "WARNING |" >> $tmpFile
                echo "--------" >> $tmpFile
                echo "BULK_WRITE speed is zero for $node node. This test probably failed." >> $tmpFile
                echo "----------------------------------------------------------------------------------------------" >> $tmpFile
            fi
        else
            echo "[WARN] Failed to detect BULK_WRITE speed for $node node. This test probably failed."
            echo "WARNING |" >> $tmpFile
            echo "--------" >> $tmpFile
            echo "Failed to detect BULK_WRITE speed for $node node. This test probably failed." >> $tmpFile
            echo "----------------------------------------------------------------------------------------------" >> $tmpFile
        fi

        cnt=$(cat $logFile | grep "^READ messages" | sed -r "s/READ messages: //g" | xargs)
        if [ -n "$cnt" ]; then
            readMsg=$(bc <<< "$readMsg + $cnt")
            if [ $cnt -ne 0 ]; then
                echo "[INFO] READ messages: $cnt"
            else
                echo "[WARN] READ messages count is zero for $node node. This test probably failed."
                echo "WARNING |" >> $tmpFile
                echo "--------" >> $tmpFile
                echo "READ messages count is zero for $node node. This test probably failed." >> $tmpFile
                echo "----------------------------------------------------------------------------------------------" >> $tmpFile
            fi
        else
            echo "[WARN] Failed to detect READ messages count for $node node. This test probably failed."
            echo "WARNING |" >> $tmpFile
            echo "--------" >> $tmpFile
            echo "Failed to detect READ messages count for $node node. This test probably failed." >> $tmpFile
            echo "----------------------------------------------------------------------------------------------" >> $tmpFile
        fi

        cnt=$(cat $logFile | grep "^READ errors" | sed -r "s/READ errors: //g" | sed -r "s/,.*//g" | xargs)
        if [ -n "$cnt" ]; then
            readErrors=$(bc <<< "$readErrors + $cnt")
            echo "[INFO] READ errors: $cnt"
            if [ $cnt -ne 0 ]; then
                if [ -n "$readErrNodes" ]; then
                    blkWriteErrNodes="${readErrNodes}, "
                fi
                readErrNodes="${readErrNodes}${node}"
            fi
        else
            echo "[WARN] Failed to detect READ errors count for $node node. This test probably failed."
            echo "WARNING |" >> $tmpFile
            echo "--------" >> $tmpFile
            echo "Failed to detect READ errors count for $node node. This test probably failed." >> $tmpFile
            echo "----------------------------------------------------------------------------------------------" >> $tmpFile
        fi

        cnt=$(cat $logFile | grep "^READ speed" | sed -r "s/READ speed: //g" | sed -r "s/ msg\/sec//g" | xargs)
        if [ -n "$cnt" ]; then
            readSpeed=$(bc <<< "$readSpeed + $cnt")
            if [ $cnt -ne 0 ]; then
                echo "[INFO] READ speed: $cnt msg/sec"
            else
                echo "[WARN] READ speed is zero for $node node. This test probably failed."
                echo "WARNING |" >> $tmpFile
                echo "--------" >> $tmpFile
                echo "READ speed is zero for $node node. This test probably failed." >> $tmpFile
                echo "----------------------------------------------------------------------------------------------" >> $tmpFile
            fi
        else
            echo "[WARN] Failed to detect READ speed for $node node. This test probably failed."
            echo "WARNING |" >> $tmpFile
            echo "--------" >> $tmpFile
            echo "Failed to detect READ speed for $node node. This test probably failed." >> $tmpFile
            echo "----------------------------------------------------------------------------------------------" >> $tmpFile
        fi

        cnt=$(cat $logFile | grep "^BULK_READ messages" | sed -r "s/BULK_READ messages: //g" | xargs)
        if [ -n "$cnt" ]; then
            blkReadMsg=$(bc <<< "$blkReadMsg + $cnt")
            if [ $cnt -ne 0 ]; then
                echo "[INFO] BULK_READ messages: $cnt"
            else
                echo "[WARN] BULK_READ messages count is zero for $node node. This test probably failed."
                echo "WARNING |" >> $tmpFile
                echo "--------" >> $tmpFile
                echo "BULK_READ messages count is zero for $node node. This test probably failed." >> $tmpFile
                echo "----------------------------------------------------------------------------------------------" >> $tmpFile
            fi
        else
            echo "[WARN] Failed to detect BULK_READ messages count for $node node. This test probably failed."
            echo "WARNING |" >> $tmpFile
            echo "--------" >> $tmpFile
            echo "Failed to detect BULK_READ messages count for $node node. This test probably failed." >> $tmpFile
            echo "----------------------------------------------------------------------------------------------" >> $tmpFile
        fi

        cnt=$(cat $logFile | grep "^BULK_READ errors" | sed -r "s/BULK_READ errors: //g" | sed -r "s/,.*//g" | xargs)
        if [ -n "$cnt" ]; then
            blkReadErrors=$(bc <<< "$blkReadErrors + $cnt")
            echo "[INFO] BULK_READ errors: $cnt"
            if [ $cnt -ne 0 ]; then
                if [ -n "$blkReadErrNodes" ]; then
                    blkReadErrNodes="${blkReadErrNodes}, "
                fi
                blkReadErrNodes="${blkReadErrNodes}${node}"
            fi
        else
            echo "[WARN] Failed to detect BULK_READ errors count for $node node. This test probably failed."
            echo "WARNING |" >> $tmpFile
            echo "--------" >> $tmpFile
            echo "Failed to detect BULK_READ errors count for $node node. This test probably failed." >> $tmpFile
            echo "----------------------------------------------------------------------------------------------" >> $tmpFile
        fi

        cnt=$(cat $logFile | grep "^BULK_READ speed" | sed -r "s/BULK_READ speed: //g" | sed -r "s/ msg\/sec//g" | xargs)
        if [ -n "$cnt" ]; then
            blkReadSpeed=$(bc <<< "$blkReadSpeed + $cnt")
            if [ $cnt -ne 0 ]; then
                echo "[INFO] BULK_READ speed: $cnt msg/sec"
            else
                echo "[WARN] BULK_READ speed is zero for $node node. This test probably failed."
                echo "WARNING |" >> $tmpFile
                echo "--------" >> $tmpFile
                echo "BULK_READ speed is zero for $node node. This test probably failed." >> $tmpFile
                echo "----------------------------------------------------------------------------------------------" >> $tmpFile
            fi
        else
            echo "[WARN] Failed to detect BULK_READ speed for $node node. This test probably failed."
            echo "WARNING |" >> $tmpFile
            echo "--------" >> $tmpFile
            echo "Failed to detect BULK_READ speed for $node node. This test probably failed." >> $tmpFile
            echo "----------------------------------------------------------------------------------------------" >> $tmpFile
        fi
    done

    echo "-------------------------------------------------------------------------------------"

    echo "WRITE test metrics |" >> $1
    echo "-------------------" >> $1
    echo "Messages: $writeMsg" >> $1
    echo "Speed   : $writeSpeed msg/sec" >> $1
    echo "Errors  : $writeErrors" >> $1
    echo "----------------------------------------------------------------------------------------------" >> $1

    echo "BULK_WRITE test metrics |" >> $1
    echo "------------------------" >> $1
    echo "Messages: $blkWriteMsg" >> $1
    echo "Speed   : $blkWriteSpeed msg/sec" >> $1
    echo "Errors  : $blkWriteErrors" >> $1
    echo "----------------------------------------------------------------------------------------------" >> $1

    echo "READ test metrics |" >> $1
    echo "------------------" >> $1
    echo "Messages: $readMsg" >> $1
    echo "Speed   : $readSpeed msg/sec" >> $1
    echo "Errors  : $readErrors" >> $1
    echo "----------------------------------------------------------------------------------------------" >> $1

    echo "BULK_READ test metrics |" >> $1
    echo "-----------------------" >> $1
    echo "Messages: $blkReadMsg" >> $1
    echo "Speed   : $blkReadSpeed msg/sec" >> $1
    echo "Errors  : $blkReadErrors" >> $1
    echo "----------------------------------------------------------------------------------------------" >> $1

    if [ -n "$writeErrNodes" ]; then
        echo "Nodes having WRITE errors |" >> $1
        echo "-------------------------------" >> $1
        echo "$writeErrNodes" >> $1
        echo "----------------------------------------------------------------------------------------------" >> $1
    fi

    if [ -n "$blkWriteErrNodes" ]; then
        echo "Nodes having BULK_WRITE errors |" >> $1
        echo "-------------------------------" >> $1
        echo "$blkWriteErrNodes" >> $1
        echo "----------------------------------------------------------------------------------------------" >> $1
    fi

    if [ -n "$readErrNodes" ]; then
        echo "Nodes having READ errors |" >> $1
        echo "-------------------------------" >> $1
        echo "$readErrNodes" >> $1
        echo "----------------------------------------------------------------------------------------------" >> $1
    fi

    if [ -n "$blkReadErrNodes" ]; then
        echo "Nodes having BULK_READ errors |" >> $1
        echo "-------------------------------" >> $1
        echo "$blkReadErrNodes" >> $1
        echo "----------------------------------------------------------------------------------------------" >> $1
    fi

    cat $tmpFile >> $1

    rm -f $tmpFile
}

# Creates report for failed tests
reportFailedTestsDetailes()
{
    for dir in $2/*
    do
        node=$(echo $dir | sed -r "s/^.*\///g")
        if [ -z "$node" ]; then
            continue
        fi

        echo "----------------------------------------------------------------------------------------------" >> $1
        echo "Error details for node: $node" >> $1
        echo "----------------------------------------------------------------------------------------------" >> $1

        if [ -f "$dir/__error__" ]; then
            cat $dir/__error__ >> $1
        else
            echo "N/A" >> $1
        fi
    done
}

#######################################################################################################

if [ "$TESTS_TYPE" != "ignite" ] && [ "$TESTS_TYPE" != "cassandra" ]; then
    terminate "Incorrect tests type specified: $TESTS_TYPE"
fi

reportTestsSummary


text:
package org.apache.jmeter.gui.action;

import java.awt.Component;
import java.awt.event.ActionEvent;
import java.util.HashSet;
import java.util.Locale;
import java.util.Set;

import org.apache.jmeter.util.JMeterUtils;
import org.apache.jorphan.logging.LoggingManager;
import org.apache.jorphan.util.JMeterError;
import org.apache.log.Logger;

/**
 * @version $Revision$
 */
public class ChangeLanguage implements Command {
    private static final Set<String> commands = new HashSet<>();

    private static final Logger log = LoggingManager.getLoggerForClass();

    static {
        commands.add(ActionNames.CHANGE_LANGUAGE);
    }

    /**
     * @see org.apache.jmeter.gui.action.Command#doAction(ActionEvent)
     */
    @Override
    public void doAction(ActionEvent e) {
        String locale = ((Component) e.getSource()).getName();
        Locale loc;

        int sep = locale.indexOf('_');
        if (sep > 0) {
            loc = new Locale(locale.substring(0, sep), locale.substring(sep + 1));
        } else {
            loc = new Locale(locale, "");
        }
        log.debug("Changing locale to " + loc.toString());
        try {
            JMeterUtils.setLocale(loc);
        } catch (JMeterError err) {
            JMeterUtils.reportErrorToUser(err.toString());
        }
    }

    /**
     * @see org.apache.jmeter.gui.action.Command#getActionNames()
     */
    @Override
    public Set<String> getActionNames() {
        return commands;
    }
}

redpajama_set_name: RedPajamaGithub


text:
using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore.Migrations;

namespace FlatExpenseCalculator.Data.Migrations
{
    public partial class unasynthecollection : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {

        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {

        }
    }
}


text:
package org.apache.yoko.orb.OB;

//
// IDL:orb.yoko.apache.org/OB/UnknownExceptionStrategy:1.0
//
/**
 *
 * The unknown exception strategy interface.
 *
 **/

public interface UnknownExceptionStrategyOperations
{
    //
    // IDL:orb.yoko.apache.org/OB/UnknownExceptionStrategy/unknown_exception:1.0
    //
    /**
     *
     * Handle an unknown exception.
     *
     * @param info Information about the exception.
     *
     **/

    void
    unknown_exception(UnknownExceptionInfo info);

    //
    // IDL:orb.yoko.apache.org/OB/UnknownExceptionStrategy/destroy:1.0
    //
    /**
     *
     * Clean up resources prior to ORB destruction.
     *
     **/

    void
    destroy();
}


text:
package org.springframework.cloud.netflix.concurrency.limits.web;

import java.util.function.Consumer;

import javax.servlet.http.HttpServletRequest;

import com.netflix.concurrency.limits.Limiter;
import com.netflix.concurrency.limits.servlet.ServletLimiterBuilder;

import org.springframework.beans.factory.ObjectProvider;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * MVC autoconfiguration class for registering Netflix {@link Limiter} bean.
 *
 * @author Spencer Gibb
 */
@Configuration
@ConditionalOnWebApplication(type = Type.SERVLET)
@ConditionalOnClass({ HttpServletRequest.class, HandlerInterceptor.class })
public class MvcConcurrencyLimitsAutoConfiguration implements WebMvcConfigurer {

	private final ObjectProvider<Consumer<ServletLimiterBuilder>> configurerProvider;

	public MvcConcurrencyLimitsAutoConfiguration(
			ObjectProvider<Consumer<ServletLimiterBuilder>> configurerProvider) {
		this.configurerProvider = configurerProvider;
	}

	@Bean
	@ConditionalOnMissingBean
	public Limiter<HttpServletRequest> servletLimiter() {
		ServletLimiterBuilder builder = new ServletLimiterBuilder();

		this.configurerProvider.ifAvailable(consumer -> consumer.accept(builder));

		return builder.build();
	}

	@Configuration
	protected static class HandlerInterceptorConfiguration implements WebMvcConfigurer {

		@Autowired
		private Limiter<HttpServletRequest> limiter;

		@Override
		public void addInterceptors(InterceptorRegistry registry) {
			registry.addInterceptor(new ConcurrencyLimitsHandlerInterceptor(limiter));
		}

	}

}


text:
package twitter4s

import com.typesafe.config.ConfigFactory
import http.client.connection.impl.PlayWSHttpConnection
import http.client.method.GetMethod
import http.client.response.HttpHeader
import org.scalatest._
import twitter4s.request.{TwitterAuthorizationHeader, TwitterTimelineRequest}

import scala.concurrent.duration._
import scala.concurrent.Await
import scala.concurrent.ExecutionContext.Implicits.global

class TwitterRequestSpec extends FlatSpec with Matchers with OptionValues with Inside with Inspectors {

  val config = ConfigFactory.load("test.conf")
  val _baseUrl = config.getString("twitter4s.test.base-url")
  val _relativeUrl = config.getString("twitter4s.test.relative-url")
  val _headers = Seq.empty[HttpHeader]
  val _queryString = Map("screen_name" → Seq("codewarrior"))

  val oauthConsumerSecret = config.getString("twitter4s.test.oauth-consumer-secret")
  val oauthConsumerKey = config.getString("twitter4s.test.oauth-consumer-key")
  val oauthToken = config.getString("twitter4s.test.oauth-token")
  val oauthTokenSecret = config.getString("twitter4s.test.oauth-token-secret")

  val twAuthHeaderGen = TwitterAuthorizationHeader.generate(
    oauthConsumerKey = oauthConsumerKey,
    oauthToken = oauthToken,
    oauthConsumerSecret = oauthConsumerSecret,
    oauthTokenSecret = oauthTokenSecret)(_)

  val request = TwitterTimelineRequest(
    baseUrl = _baseUrl,
    relativeUrl = _relativeUrl,
    headers = _headers,
    method = GetMethod,
    queryString = _queryString,
    body = None,
    paginated = false,
    authHeaderGen = twAuthHeaderGen)

  "Twitter request" should "properly fetch a user's timeline" in {

    val authHeader = twAuthHeaderGen(request)

    val authRequest = request.copy(
      headers = request.headers ++ Seq(authHeader))

    val conn = new PlayWSHttpConnection
    val respF = conn.makeRequest(authRequest)
    val resp = Await.result(respF, 10.seconds)
    assert(resp.status.equals(200))
    assert(resp.json.toString().contains("created_at"))
  }
}


text:
package integration

import (
	"net/http"
	"runtime"
	"sort"
	"strings"
	"testing"
	"time"
)

func interestingGoroutines() (gs []string) {
	buf := make([]byte, 2<<20)
	buf = buf[:runtime.Stack(buf, true)]
	for _, g := range strings.Split(string(buf), "\n\n") {
		sl := strings.SplitN(g, "\n", 2)
		if len(sl) != 2 {
			continue
		}
		stack := strings.TrimSpace(sl[1])
		if stack == "" ||
			strings.Contains(stack, "created by testing.RunTests") ||
			strings.Contains(stack, "testing.Main(") ||
			strings.Contains(stack, "runtime.goexit") ||
			strings.Contains(stack, "created by runtime.gc") ||
			strings.Contains(stack, "runtime.MHeap_Scavenger") {
			continue
		}
		gs = append(gs, stack)
	}
	sort.Strings(gs)
	return
}

// Verify the other tests didn't leave any goroutines running.
// This is in a file named z_last_test.go so it sorts at the end.
func TestGoroutinesRunning(t *testing.T) {
	t.Skip("TODO: etcdserver.Sender may still dial closed remote endpoint and need some time to timeout.")
	if testing.Short() {
		t.Skip("not counting goroutines for leakage in -short mode")
	}
	gs := interestingGoroutines()

	n := 0
	stackCount := make(map[string]int)
	for _, g := range gs {
		stackCount[g]++
		n++
	}

	t.Logf("num goroutines = %d", n)
	if n > 0 {
		t.Error("Too many goroutines.")
		for stack, count := range stackCount {
			t.Logf("%d instances of:\n%s", count, stack)
		}
	}
}

func afterTest(t *testing.T) {
	http.DefaultTransport.(*http.Transport).CloseIdleConnections()
	if testing.Short() {
		return
	}
	var bad string
	badSubstring := map[string]string{
		").readLoop(":                                  "a Transport",
		").writeLoop(":                                 "a Transport",
		"created by net/http/httptest.(*Server).Start": "an httptest.Server",
		"timeoutHandler":                               "a TimeoutHandler",
		"net.(*netFD).connect(":                        "a timing out dial",
		").noteClientGone(":                            "a closenotifier sender",
	}
	var stacks string
	for i := 0; i < 6; i++ {
		bad = ""
		stacks = strings.Join(interestingGoroutines(), "\n\n")
		for substr, what := range badSubstring {
			if strings.Contains(stacks, substr) {
				bad = what
			}
		}
		if bad == "" {
			return
		}
		// Bad stuff found, but goroutines might just still be
		// shutting down, so give it some time.
		time.Sleep(50 * time.Millisecond)
	}
	t.Errorf("Test appears to have leaked %s:\n%s", bad, stacks)
}


text:
using System;
using Gigya.Common.Contracts.Exceptions;

namespace Gigya.Microdot.ServiceDiscovery.HostManagement
{
    public class OverriddenRemoteHost : IEndPointHandle
    {
        private string ServiceName { get; }
        public string HostName { private set;get; }
        public int? Port { private set; get; }

        internal OverriddenRemoteHost(string serviceName, string hostName, int? port = null)
        {
            ServiceName = serviceName;
            HostName = hostName;
            Port = port;

        }

        public bool ReportFailure(Exception ex = null)
        {
            throw new ServiceUnreachableException("Failed to reach an overridden remote host. Please make sure the " +
                                           "overrides specified are reachable from all services that participate in the request. See inner " +
                                           "exception for details and tags for information on which override caused this issue.",
                ex,
                unencrypted: new Tags
                {
                    { "overriddenServiceName", ServiceName },
                    { "overriddenHostName", HostName },
                    { "overriddenPort", Port?.ToString() }

                });
        }

        public void ReportSuccess()
        {
        }

    }
}


text:
namespace OpenApoc
{

class VEquipmentType;
class VGeneralEquipmentType;
class VWeaponType;
class VEngineType;
class Vehicle;
class Projectile;
class Base;

class VEquipment : public Equipment
{
  public:
	VEquipment();
	~VEquipment() = default;

	StateRef<VEquipmentType> type;

	// All equipment state
	Vec2<int> equippedPosition;
	// General equipment state
	// Engine equipemnt state
	// Weapon equipment state
	enum class WeaponState
	{
		Ready,
		Disabled,
		Reloading,
		OutOfAmmo,
	};
	WeaponState weaponState;
	StateRef<Vehicle> owner;
	int ammo;
	int reloadTime;
	bool disabled = false;

	// All equipment methods
	// General equipment methods
	// Engine equipment methods
	// Weapon equipment methods
	float getRange() const;
	bool canFire() const;
	void update(int ticks);
	void setReloadTime(int ticks);
	// This sends alerts when not enough ammo to reload weapon or engine
	void noAmmoToReload(const GameState &state, const VEquipment *equipment) const;
	// Reload uses up to 'ammoAvailable' to reload the weapon. It returns the amount
	// actually used.
	int reload(int ammoAvailable);
	// Reload from base stores, return true if reloaded
	// Non-players reload from null base for free
	bool reload(GameState &state, StateRef<Base> base);
	// Subtract item from base stores and load ammo
	void equipFromBase(GameState &state, StateRef<Base> base);
	// Add item to base stores and unload ammo
	void unequipToBase(GameState &state, StateRef<Base> base);
	bool fire(GameState &state, Vec3<float> targetPosition, Vec3<float> homingPosition,
	          StateRef<Vehicle> targetVehicle = nullptr, bool manual = false);
	bool fire(GameState &state, Vec3<float> targetPosition,
	          StateRef<Vehicle> targetVehicle = nullptr, bool manual = false);

	sp<Image> getEquipmentArmorImage() const override;
	sp<Image> getEquipmentImage() const override;
	Vec2<int> getEquipmentSlotSize() const override;
};
} // namespace OpenApoc


text:
<title>Programmer's Toolbox</title>
    <link rel="stylesheet" href="index.css">

Tips

      <input type="text" id="myInput" placeholder="Enter tip..." onkeypress="handleKeyPress(event)">
      Add


text:
/* tslint:disable */
/* eslint-disable */
// @generated
// This file was automatically generated and should not be edited.

// ====================================================
// GraphQL fragment: InitialAppDataFragment
// ====================================================

export interface InitialAppDataFragment_currentRoute {
  __typename: "ClientCurrentRoute";
  protocol: string | null;
  slashes: boolean | null;
  auth: string | null;
  host: string | null;
  port: string | null;
  hostname: string | null;
  hash: string | null;
  search: string | null;
  query: string | null;
  pathname: string | null;
  path: string | null;
  href: string | null;
}

export interface InitialAppDataFragment_loginStatus {
  __typename: "ClientLoginStatus";
  isLoggedIn: boolean | null;
}

export interface InitialAppDataFragment_cookies {
  __typename: "ClientCookies";
  get: string | null;
}

export interface InitialAppDataFragment_serializedMe {
  __typename: "ClientSerializedMe";
  id: string | null;
  initials: string | null;
  name: string | null;
  avatar: string | null;
  authentication_token: string | null;
  is_premium: boolean | null;
  is_lifetime_premium: boolean | null;
  is_supporter: boolean | null;
  slug: string | null;
  hide_notification_count: boolean | null;
}

export interface InitialAppDataFragment_sharify {
  __typename: "ClientSharify";
  get: string | null;
  IS_SPIDER: boolean | null;
  IS_OUTSIDE_MAIN_ROUTER: boolean | null;
  THEME: string | null;
  ADMIN_SLUGS: (string | null)[] | null;
}

export interface InitialAppDataFragment {
  __typename: "Query";
  currentRoute: InitialAppDataFragment_currentRoute | null;
  loginStatus: InitialAppDataFragment_loginStatus | null;
  cookies: InitialAppDataFragment_cookies | null;
  serializedMe: InitialAppDataFragment_serializedMe | null;
  sharify: InitialAppDataFragment_sharify | null;
}


text:
package env

import (
	"fmt"
	"os"
)

// VarSpec defines a config variable. It specifies its name in the environment,
// a parser function to process the raw value, a default value and whether or
// not the variable must be set in the environment
type VarSpec struct {
	Name         string
	Parser       func(string) string
	DefaultValue string
	Optional     bool
}

// SpecMap is a mapping of config variable names to their specification
type SpecMap map[string]VarSpec

// Config is a mapping that maps and config name to its value retreived from the
// environment
type Config map[string]string
type envVarNotDefined struct {
	name string
}

func (e *envVarNotDefined) Error() string {
	return fmt.Sprintf("Environment variable not defined: %s", e.name)
}

func noopParser(val string) string { return val }

// NewConfigFromEnv Constructs a config mapping by looking up the OS environment
// variables
func NewConfigFromEnv(spec SpecMap) (Config, error) {
	source := make(map[string]string, len(spec))
	for _, varspec := range spec {
		source[varspec.Name] = os.Getenv(varspec.Name)
	}
	return newConfig(spec, source)
}

func newConfig(spec map[string]VarSpec, source map[string]string) (Config, error) {
	config := make(Config)
	for key, envVar := range spec {
		parser := noopParser
		if envVar.Parser != nil {
			parser = envVar.Parser
		}

		val := source[envVar.Name]

		if val == "" {
			val = envVar.DefaultValue
		}

		if val == "" && !envVar.Optional {
			return nil, &envVarNotDefined{envVar.Name}
		}

		val = parser(val)

		config[key] = val
	}
	return config, nil
}

// AsFlag treats a config variable as a flag returning false for zero-length
// strings and true otherwise
func (e Config) AsFlag(name string) bool {
	return e[name] != ""
}


text:
require("./basic")
require("./nested-object")
require("./select")
require("./radio")
require("./checkbox")
require("./arbitrary-functions")


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

using System.Collections.Generic;
using System.IO;
using CommandLine;

namespace SetupUnityPackage
{
    [Verb("tests", HelpText = "Setup the Tests.Unity project")]
    internal class TestOptions : OptionsBase
    {
        [Option("realm-package", Required = false, HelpText = "Path to the folder containing io.realm.unity.tgz to use. If not specified, a local install will be assumed.")]
        public string RealmPackage { get; set; }

        public override string PackageBasePath => Path.Combine(Helpers.SolutionFolder, "Tests", "Tests.Unity", "Assets");

        public override ISet<string> IgnoredDependencies { get; } = new HashSet<string>
        {
            "Realm.SourceGenerator",
            "Realm.Fody",
            "Fody",
            "Realm",
            "Microsoft.CSharp",
            "System.Configuration.ConfigurationManager"
        };

        private static readonly IEnumerable<DependencyInfo> _testsDependencies = new[]
        {
            new DependencyInfo("Nito.AsyncEx.Context", "lib/netstandard2.0/Nito.AsyncEx.Context.dll"),
            new DependencyInfo("Nito.AsyncEx.Tasks", "lib/netstandard2.0/Nito.AsyncEx.Tasks.dll"),
            new DependencyInfo("Nito.Disposables", "lib/netstandard2.0/Nito.Disposables.dll"),
            new DependencyInfo("System.Collections.Immutable", "lib/netstandard2.0/System.Collections.Immutable.dll"),
        };

        public override PackageInfo[] Files { get; } = new[]
        {
            new PackageInfo("Realm.Tests", new Dictionary<string, string>
            {
                { "lib/netstandard2.0/Realm.Tests.dll", "Tests/Realm.Tests.dll" },
                { "lib/netstandard2.0/Realm.Tests.pdb", "Tests/Realm.Tests.pdb" },
            }, _testsDependencies)
        };
    }
}


text:
package main
import "fmt"
func main() {
  /* This is my first sample program. */
  fmt.Println("Hello, World!");
}


text:
from .observer import *
from .selector import *
from .impchecker import *
from .impresponse import *
from .communicator import *
from .validator import *
from .y0 import *
from .modelnode import *
from .simulator import *
from .blueprint import *

__author__ = 'TimeWz667'


text:
```javascript
sdkbox.PluginTune.setListener(listener);
```
> set a listener to listen for event changes.

```javascript
sdkbox.PluginTune.init();
```
> init the instance.

```javascript
sdkbox.PluginTune.setDebugMode(enable);
```
> Specifies that the server responses should include debug information.

```javascript
sdkbox.PluginTune.setAllowDuplicateRequests(allow);
```
> Set to YES to allow duplicate requests to be registered with the MAT server.

```javascript
sdkbox.PluginTune.SDKBOX_DEPRECATED(checkForDeferredDeeplinkWithTimeout(doubletimeout);
```
> Check for a deferred deeplink entry point upon app installation.
This is safe to call at every app launch, since the function does nothing
unless this is the first launch.

```javascript
sdkbox.PluginTune.checkForDeferredDeepLink();
```
> Check for a deferred deeplink entry point upon app installation.
This is safe to call at every app launch, since the function does nothing
unless this is the first launch.

```javascript
sdkbox.PluginTune.automateIapEventMeasurement(automate);
```
> Enable automatic measurement of app store in-app-purchase events. When enabled, your code
should not explicitly measure events for successful purchases related to StoreKit to avoid event duplication.

```javascript
sdkbox.PluginTune.setFacebookEventLogging(logging, limit);
```
> Set whether the MAT events should also be logged to the Facebook SDK. This flag is ignored
if the Facebook SDK is not present.

```javascript
sdkbox.PluginTune.setExistingUser(existingUser);
```
> Set whether this is an existing user or a new one. This is generally used to
distinguish users who were using previous versions of the app, prior to
integration of the MAT SDK. The default is to assume a new user.

```javascript
sdkbox.PluginTune.setAppleAdvertisingIdentifier(appleAdvertisingIdentifier,
                                                 adTrackingEnabled);
```
> Set the Apple Advertising Identifier available in iOS 6.

```javascript
sdkbox.PluginTune.setAppleVendorIdentifier(appleVendorIdentifier);
```
> Set the Apple Vendor Identifier available in iOS 6.

```javascript
sdkbox.PluginTune.setCurrencyCode(currencyCode);
```
> Sets the currency code.

```javascript
sdkbox.PluginTune.setJailbroken(jailbroken);
```
> Sets the jailbroken device flag.

```javascript
sdkbox.PluginTune.setPackageName(packageName);
```
> Sets the package name (bundle identifier).
Defaults to the Bundle Identifier of the app that is running the sdk.

```javascript
sdkbox.PluginTune.setShouldAutoDetectJailbroken(autoDetect);
```
> Specifies if the sdk should auto detect if the iOS device is jailbroken.

```javascript
sdkbox.PluginTune.setShouldAutoGenerateAppleVendorIdentifier(autoGenerate);
```
> Specifies if the sdk should pull the Apple Vendor Identifier from the device.
Note that setting to false will clear any previously set value for the property.

```javascript
sdkbox.PluginTune.SDKBOX_DEPRECATED(setSiteId(conststd::string&siteId);
```
> Sets the site ID.

```javascript
sdkbox.PluginTune.setTRUSTeId(tpid);
```
> Set the TRUSTe Trusted Preference Identifier (TPID).

```javascript
sdkbox.PluginTune.setUserEmail(userEmail);
```
> Sets the user's email address.

```javascript
sdkbox.PluginTune.setUserId(userId);
```
> Sets the user ID.

```javascript
sdkbox.PluginTune.setUserName(userName);
```
> Sets the user's name.

```javascript
sdkbox.PluginTune.setPhoneNumber(phoneNumber);
```
> Sets the user's phone number.

```javascript
sdkbox.PluginTune.setFacebookUserId(facebookUserId);
```
> Set user's Facebook ID.

```javascript
sdkbox.PluginTune.setTwitterUserId(twitterUserId);
```
> Set user's Twitter ID.

```javascript
sdkbox.PluginTune.setGoogleUserId(googleUserId);
```
> Set user's Google ID.

```javascript
sdkbox.PluginTune.setAge(userAge);
```
> Sets the user's age.

```javascript
sdkbox.PluginTune.setGender(userGender);
```
> Sets the user's gender.

```javascript
sdkbox.PluginTune.setLatitude(latitude, longitude);
```
> Sets the user's location.

```javascript
sdkbox.PluginTune.setLatitude(latitude, longitude, altitude);
```
> Sets the user's location including altitude.

```javascript
sdkbox.PluginTune.setAppAdTracking(enable);
```
> Set app-level ad-tracking.

```javascript
sdkbox.PluginTune.setPayingUser(isPayingUser);
```
> Set whether the user is generating revenue for the app or not.
If measureEvent is called with a non-zero revenue, this is automatically set to YES.

```javascript
sdkbox.PluginTune.setPreloadData(preloadData);
```
> Sets publisher information for attribution.

```javascript
sdkbox.PluginTune.SDKBOX_DEPRECATED(matId();
```
> Get the MAT ID for this installation (mat_id).

```javascript
sdkbox.PluginTune.tuneId();
```
> Get the Tune ID for this installation.

```javascript
sdkbox.PluginTune.openLogId();
```
> Get the MAT log ID for the first app open (open_log_id).

```javascript
sdkbox.PluginTune.isPayingUser();
```
> Get whether the user is revenue-generating.

```javascript
sdkbox.PluginTune.measureSession();
```
> To be called when an app opens; typically in the AppDelegate::applicationWillEnterForeground() event.

```javascript
sdkbox.PluginTune.measureEventName(eventName);
```
> Record an event for an Event Name.

```javascript
sdkbox.PluginTune.measureEventId(eventId);
```
> Record an event by providing the equivalent Event ID defined on the MobileAppTracking dashboard.

```javascript
sdkbox.PluginTune.measureEvent(event);
```
> Record an event with a MATEvent.

```javascript
sdkbox.PluginTune.setUseCookieTracking(enable);
```
> Sets whether or not to use cookie based tracking.

```javascript
sdkbox.PluginTune.setRedirectUrl(redirectUrl);
```
> Sets a url to be used with app-to-app tracking so that
the sdk can open the download (redirect) url. This is
used in conjunction with the setTracking:advertiserId:offerId:publisherId:redirect: method.

```javascript
sdkbox.PluginTune.startAppToAppTracking(targetAppPackageName,
                                         targetAppAdvertiserId,
                                         targetAdvertiserOfferId,
                                         targetAdvertiserPublisherId,
                                         shouldRedirect);
```
> Start an app-to-app tracking session on the MAT server.

```javascript
sdkbox.PluginTune.applicationDidOpenURL(urlString, sourceApplication);
```
> Record the URL and Source when an application is opened via a URL scheme.
This typically occurs during OAUTH or when an app exits and is returned
to via a URL. The data will be sent to the HasOffers server when the next
measureXXX method is called so that a Re-Engagement can be recorded.

```javascript
sdkbox.PluginTune.setDeepLink(deepLinkUrl);
```
> Record the URL and Source when an application is opened via a URL scheme.

### Listeners
```javascript
onEnqueuedAction(referenceId);
```

```javascript
onSucceed(data);
```

```javascript
onFailed(errorString);
```

```javascript
onReceiveDeeplink(deeplink, timeout);
```

```javascript
onMobileAppTrackerDidFailDeeplinkWithError(errorString);
```


text:
<?php namespace AwkwardIdeas\ModelMaker\Models;

class BaseObject{

    public function __construct($params = array()){
        if ($params) {
            foreach ($params as $property => $value) {
                $this->__set($property, $value);
            }
        }
    }

    public function Get($property){
        return $this->__get($property);
    }

    public function Set($property, $value){
        return $this->__set($property, $value);
    }

    public function ObjectToArray(){
        return get_object_vars($this);
    }

    public function __get($property){
        $methodName = 'Get' . ucwords($property);
        if (method_exists($this, $methodName)) {
            return $this->$methodName();
        } else if (
            property_exists($this, $property)) {
            return $this->$property;
        }
    }

    public function __set($property, $value){
        $methodName = 'Set' . ucwords($property);
        if (method_exists($this, $methodName))
            return $this->$methodName($value);
        else if (property_exists($this, $property)) {
            $this->$property = $value;return true;
        } else {
            return false;
        }
    }
}


text:
package org.springside.modules.unit.test;

import static org.junit.Assert.*;

import javax.sql.DataSource;

import org.junit.Test;
import org.springframework.beans.BeansException;
import org.springframework.test.context.ContextConfiguration;
import org.springside.modules.test.spring.SpringTxTestCase;
import org.springside.modules.test.utils.DbUnitUtils;

@ContextConfiguration(locations = { "/applicationContext-core-test.xml" })
public class DbUnitUtilsTest extends SpringTxTestCase {

	@Test
	public void normal() throws BeansException, Exception {
		simpleJdbcTemplate.update("drop all objects");

		executeSqlScript("classpath:/schema.sql", false);

		DbUnitUtils.appendData((DataSource) applicationContext.getBean("dataSource"), "classpath:/test-data.xml");
		assertEquals(6, countRowsInTable("SS_USER"));

		DbUnitUtils.loadData((DataSource) applicationContext.getBean("dataSource"), "classpath:/test-data.xml");
		assertEquals(6, countRowsInTable("SS_USER"));

		DbUnitUtils.removeData((DataSource) applicationContext.getBean("dataSource"), "classpath:/test-data.xml");
		assertEquals(0, countRowsInTable("SS_USER"));
	}
}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

	<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />

	<?php $subtitle = "Woodworking 1 Upgrade";?>

		<?php require ($_SERVER['DOCUMENT_ROOT']."/functions.php"); ?>
			<?php require ($_SERVER['DOCUMENT_ROOT']."/header.php"); ?>
				<?php require ($_SERVER['DOCUMENT_ROOT']."/main_nav.php"); ?>

							<?php include ("../../permit_left_nav.php") ?>

									Related Links

Ironworker 1 Upgrade

Woodworking 2 Upgrade

Woodworking 1 Upgrade

Overview

The woodworking 1 upgrade is an additional amount of training individuals can take to learn the proper use of a variety of woodworking saws (table saw, panel saw, circular saw, track saw, and miter saw) in the Student Shop. Individuals will not be allowed to use these saws until they have obtained the woodworking 1 upgrade.

Privileges

Use Shop table saws (both traditional and SawStop)

Use the Shop panel saw

Use Shop circular saws

Use the Shop track saw

Use Shop miter saws

Prerequisites

Red or green shop permit

Requirements

(must be completed in order)

Apply for the Woodworking 1 upgrade*

Enroll in and attend the woodworking 1 seminar

*Individuals will only be able to see upgrades in EMU for which they have completed the prerequisites.

Time Frame

Upgrades must be completed within 45 days of applying. Failure to meet the 45 day deadline will result in all progress towards the upgrade being removed

					<?php require ($_SERVER['DOCUMENT_ROOT']."/footer.php"); ?>


text:
import React from 'react';

import CSSTransitionGroup from 'react-addons-css-transition-group';
import Interactive from 'react-interactive';
import { Link } from 'react-router';

import Splash from '../Splash/Splash';
import ProjectHeadingMetadata from '../ProjectHeadingMetadata/ProjectHeadingMetadata';

import projects from '../../data/projects.json';
import bio from '../../data/bio.json';

import s from './styles.css';

class Home extends React.Component {

  constructor(props) {
    super(props);
    this.state = {
      openProject: '_',
      pageState: 'bio',
    };
  }

  componentDidMount = () => {
    window.scrollTo(0, 0);
  }

  handleSplashClick = (p) => {
    this.setState({
      openProject: p,
      pageState: 'project',
    });
  }

  goBack = () => {
    this.setState({
      openProject: '_',
      pageState: 'bio',
    });
  }

  updateFeed = () => {
    // const filtered = this.filterFeed(projects, this.state.filters)
    const renderList = projects.map((item, i) =>
      <div key={`projectContainer${i}`} className={s.projectContainer}>
        <Splash
          handleClick={this.handleSplashClick.bind(this, projects[i].key)}
          className={s.splash}
          projectData={projects[i]}
          key={`Splash${i}`}
          projectKey={projects[i].key}
        />
        <ProjectHeadingMetadata key={`ProjectHeadingMetadata${i}`} projectData={projects[i]} />

,
   );
    return renderList;
  }

  updateProjectFeed = () => {
    console.log('hello');
  }

  render() {
    return (
      <CSSTransitionGroup
        transitionName={s}
        transitionEnterTimeout={200}
        transitionLeaveTimeout={200}
        transitionAppear
        transitionAppearTimeout={200}
      >

{bio.name}

{bio.sentence}

{'Send me an '}<Interactive as={Link} className={'linkNormal'} to={''}>email</Interactive>.

{'Find me on '}
                  <Interactive as={'a'} className={'linkNormal'} href={bio.twitter}>{'Twitter'}</Interactive>
                  {', '}
                  <Interactive as={'a'} className={'linkNormal'} href={bio.arena}>{'Are.na'}</Interactive>
                  {' or '}
                  <Interactive as={'a'} className={'linkNormal'} href={bio.github}>{'Github'}</Interactive>

              {this.updateFeed()}

            <button
              className={s.backButton}
              onClick={this.goBack.bind(this)}
              > {'I am a back Button'} </button>
            {this.updateProjectFeed()}

      </CSSTransitionGroup>
    );
  }
}

export default Home;


text:
require 'test_helper'

class InflectTest < Minitest::Test
  def test_that_it_has_a_version_number
    refute_nil ::Inflect::VERSION
  end
end


text:
extern "C" {
#endif

#define NEUEVENT_FLAGS_CLOSE            0x0100
#define NEUEVENT_FLAGS_ENOMEM           0x1000
#define NEUEVENT_FLAGS_EEVFAIL          0x2000

struct neuworker;

typedef void (*neutask_routine)(struct neuworker *w, void *data);
typedef struct neutask {
    // public data
    void *data;
    neutask_routine dotask;
}neutask_t;
#define NEUTASK_INIT(task_, data_, dotask_)    do{      \
        (task_)->data = data_;                          \
        (task_)->dotask = dotask_;                      \
}while(0)

typedef void (*neuevent_on_event)(evutil_socket_t efd, short flags, void *data);
typedef struct neuevent {
    // public data
    void *data;

    neuevent_on_event  onevent;
    int efd;
    int flags;      // libevent epoll flags
    struct timeval tv;
}neuevent_t;
#define NEUEVENT_INIT(ev_, data_, onev_, efd_, flags_, tv_)     do{         \
    (ev_)->data = data_;    \
    (ev_)->onevent = onev_; \
    (ev_)->efd = efd_;      \
    (ev_)->flags = flags_;  \
    (ev_)->tv = tv_;        \
}while(0)

typedef struct neumap_event{
    fixmap_node_t fmnode;

    int efd;
    struct event *ev;

    neuevent_on_event onevent;
    void *data;
}neumap_event_t;

typedef struct neuworker{
    // public data
    void *data;

    // private data
    struct event_base *base;

    fixmap_t fmevs;

    pthread_mutex_t  lock;
    struct event *evsock;
    evutil_socket_t  socks[2];
}neuworker_t;

int neuworker_init(neuworker_t *nw, void *data);
int neuworker_fini(neuworker_t *nw);

int neuworker_dispatch_task(neuworker_t *nw, neutask_t *task);

int neuworker_watch_event(neuworker_t *nw, neuevent_t *ev);
int neuworker_close_event(neuworker_t *nw, neuevent_t *ev);

static inline int neuworker_dispatch(neuworker_t *nw){
    if((nw != NULL) && (nw->base != NULL))
        return event_base_dispatch(nw->base);

    return -1;
}

#ifdef __cpluscplus
}
#endif

#endif // __NEUWORKER_H__


text:
% type = 0 -> train 1 netural network, 6 outputs
% type = 1:6 ->  train 1 netural network for emotion "type" and it has 1
% outputs only (1/0)
% Here, just input x,y don't need to use ANNdata
% Output the best network
function cross_validation_single (datafile, instances, labels,...
                                                index, K)
    version = 1;

    % Initialise average confusion matrix
    avg_c_matrix = zeros (6, 6);

    % Initialise classification rate
    avg_classification_rate = 0;

    layers = [2, 3, 3];
    topology = 3; % Cascade feed forward network
    training_function = 'trainlm';

    avg_f_measure = zeros (10, 1);

    % K-fold
    for i = 1:K
        [trainX, trainY, testX, testY] ...
            = get_data_from_fold (instances, labels, index, i);
        %normal K-fold
        [testX_,testY_] = ANNdata(testX,testY);
        [train_X,train_Y] = ANNdata(trainX,trainY);

        net = createNetwork(layers,train_X,train_Y, ...
                         topology, training_function);
        net = train(net,train_X, train_Y);

        predictions = testANN(net, testX_);

        predictions_title = ...
            strcat(datafile, '_fold_', num2str(i), ...
            '_version_', num2str(version),'_predictions.mat');
        %save(predictions_title, 'predictions');

        c_matrix = confusion_matrix(testY, predictions);
        c_matrix_title = ...
            strcat(datafile, '_fold_', num2str(i),...
            '_version_', num2str(version), '_confusion_matrix.mat');
        %save(c_matrix_title, 'c_matrix');
        avg_c_matrix = avg_c_matrix + c_matrix;

        class_r_p_rate_fa = calculate_r_p_rate_fa(avg_c_matrix);

        for k = 1:6
            avg_f_measure(i) = avg_f_measure(i) + ...
                class_r_p_rate_fa(k).fa_measure;
        end

        avg_f_measure(i) = avg_f_measure(i) / 6;

        avg_classification_rate = ...
            avg_classification_rate + ...
            sum(predictions == testY)/length(testY);

    end

    display(datafile);
    display(version);

    %save(strcat(datafile, '_version_', num2str(version),...
    %'_avg_f_measure.mat'), 'avg_f_measure');

    % calculate the average confusion matrix
    avg_c_matrix = avg_c_matrix/10;
    display(avg_c_matrix);
    %save(strcat(datafile, '_version_', num2str(version),...
    %    '_average_confusion_matrix.mat'), 'avg_c_matrix');

    % calculate the average recall and precision rate per class
    % from the average confusion matrix
    % calculate fa measure with recall and precision rates evenly weighted
    class_r_p_rate_fa = calculate_r_p_rate_fa(avg_c_matrix);
    %save(strcat(datafile, '_version_', num2str(version),...
    %    '_r_p_rate_fa_per_class.mat'), 'class_r_p_rate_fa');

    % calculate the average classification rate
    avg_classification_rate = avg_classification_rate/10;
    display(avg_classification_rate);
    %save(strcat(datafile, '_version_', num2str(version),...
    %    '_avg_classification_rate.mat'), 'avg_classification_rate');

end


text:
@class EXBarCodeScanner;

typedef NS_ENUM(NSInteger, EXBarCodeScannerType) {
  EXBarCodeScannerTypeFront = AVCaptureDevicePositionFront,
  EXBarCodeScannerTypeBack = AVCaptureDevicePositionBack
};

typedef NS_ENUM(NSInteger, EXBarCodeScannerTorchMode) {
  EXBarCodeScannerTorchModeOff = AVCaptureTorchModeOff,
  EXBarCodeScannerTorchModeOn = AVCaptureTorchModeOn,
  EXBarCodeScannerTorchModeAuto = AVCaptureTorchModeAuto
};

@interface EXBarCodeScannerManager
    : RCTViewManager <AVCaptureMetadataOutputObjectsDelegate>

@property(nonatomic, strong) dispatch_queue_t sessionQueue;
@property(nonatomic, strong) AVCaptureSession *session;
@property(nonatomic, strong) AVCaptureDeviceInput *videoCaptureDeviceInput;
@property(nonatomic, strong) AVCaptureMetadataOutput *metadataOutput;
@property(nonatomic, strong) id runtimeErrorHandlingObserver;
@property(nonatomic, assign) NSInteger presetCamera;
@property(nonatomic, strong) AVCaptureVideoPreviewLayer *previewLayer;
@property(nonatomic, strong) NSArray *barCodeTypes;
@property(nonatomic, strong) EXBarCodeScanner *camera;

- (AVCaptureDevice *)deviceWithMediaType:(NSString *)mediaType
                      preferringPosition:(AVCaptureDevicePosition)position;
- (void)initializeCaptureSessionInput:(NSString *)type;
- (void)startSession;
- (void)stopSession;

@end


text:
"use strict";

const nodemailer = require('nodemailer');
const config = require('../config');
const transporter = nodemailer.createTransport(config.mailer.connection);

var sendErrorMail = config.log.sendErrorMail || false;
var sendExitMail = config.log.sendExitMail || false;

function exitManager() {

    process.on('uncaughtException', function (err) {

        if (sendErrorMail) {
            transporter.sendMail({
                from: 'info@sjow.me',
                to: sendErrorMail,
                subject: `SjowMe server error: ${err.message}`,
                html: '' + (new Date()).toUTCString() + ' uncaught exception:
' + err.message + '

' + err.stack + '
',
                text: err.message
            });
            transporter.close();
        }

        console.error((new Date()).toUTCString() + ' uncaught exception:', err.message);
        console.error(err.stack);
        process.nextTick(() => {
            process.exit(1);
        });

    });

    function exitHandler(options, err) {
        if (options.cleanup) {
            console.log('clean');
        }
        if (err) {
            console.log(err.stack);
        }
        if (options.exit) {
            process.exit();
        }
    }

    //do something when app is closing
    process.on('exit', function () {
        if (sendExitMail) {
            transporter.sendMail({
                from: 'info@sjow.me',
                to: sendExitMail,
                subject: 'SjowMe server down !',
                html: '' + (new Date()).toUTCString() + '
Sjow.me is shutting down !! ',
                text: 'Sjow.me is shutting down'
            });
            transporter.close();
        }
        console.log("exiting");
        exitHandler({cleanup: true});
    });

    //catches ctrl+c event
    process.on('SIGINT', function () {
        if (sendExitMail) {
            transporter.sendMail({
                from: 'info@sjow.me',
                to: sendExitMail,
                subject: 'SjowMe server killed !',
                html: '' + (new Date()).toUTCString() + '
Sjow.me is beeing killed ',
                text: 'Sjow.me is beeing killed'
            });
            transporter.close();
        }
        console.log("SIGINT");
        exitHandler({exit: true});
    });
}

module.exports = exitManager;


text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package org.japo.java.main;

/**
 *
 * @author 2016 - Adrián
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        System.out.printf("Hay %d elefantes/s\n", 0);
        System.out.printf("Hay %d elefantes/s\n", 1);
        System.out.printf("Hay %d elefantes/s\n", 2);
        System.out.printf("Hay %d elefantes/s\n", 3);
        System.out.printf("Hay %d elefantes/s\n", 4);
        System.out.printf("Hay %d elefantes/s\n", 5);
        System.out.printf("Hay %d elefantes/s\n", 6);
        System.out.printf("Hay %d elefantes/s\n", 7);
        System.out.printf("Hay %d elefantes/s\n", 8);
        System.out.printf("Hay %d elefantes/s\n", 9);
    }

}


text:
.class public abstract Landroid/speech/tts/ITextToSpeechService$Stub;
.super Landroid/os/Binder;
.source "ITextToSpeechService.java"

# interfaces
.implements Landroid/speech/tts/ITextToSpeechService;

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Landroid/speech/tts/ITextToSpeechService;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x409
    name = "Stub"
.end annotation

.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Landroid/speech/tts/ITextToSpeechService$Stub$Proxy;
    }
.end annotation

# static fields
.field private static final DESCRIPTOR:Ljava/lang/String; = "android.speech.tts.ITextToSpeechService"

.field static final TRANSACTION_getFeaturesForLanguage:I = 0x9

.field static final TRANSACTION_getLanguage:I = 0x7

.field static final TRANSACTION_isLanguageAvailable:I = 0x8

.field static final TRANSACTION_isSpeaking:I = 0x5

.field static final TRANSACTION_loadLanguage:I = 0xa

.field static final TRANSACTION_playAudio:I = 0x3

.field static final TRANSACTION_playSilence:I = 0x4

.field static final TRANSACTION_setCallback:I = 0xb

.field static final TRANSACTION_speak:I = 0x1

.field static final TRANSACTION_stop:I = 0x6

.field static final TRANSACTION_synthesizeToFile:I = 0x2

# direct methods
.method public constructor <init>()V
    .locals 1

    .prologue
    .line 19
    invoke-direct {p0}, Landroid/os/Binder;-><init>()V

    .line 20
    const-string v0, "android.speech.tts.ITextToSpeechService"

    invoke-virtual {p0, p0, v0}, Landroid/speech/tts/ITextToSpeechService$Stub;->attachInterface(Landroid/os/IInterface;Ljava/lang/String;)V

    .line 21
    return-void
.end method

.method public static asInterface(Landroid/os/IBinder;)Landroid/speech/tts/ITextToSpeechService;
    .locals 2
    .parameter "obj"

    .prologue
    .line 28
    if-nez p0, :cond_0

    .line 29
    const/4 v0, 0x0

    .line 35
    :goto_0
    return-object v0

    .line 31
    :cond_0
    const-string v1, "android.speech.tts.ITextToSpeechService"

    invoke-interface {p0, v1}, Landroid/os/IBinder;->queryLocalInterface(Ljava/lang/String;)Landroid/os/IInterface;

    move-result-object v0

    .line 32
    .local v0, iin:Landroid/os/IInterface;
    if-eqz v0, :cond_1

    instance-of v1, v0, Landroid/speech/tts/ITextToSpeechService;

    if-eqz v1, :cond_1

    .line 33
    check-cast v0, Landroid/speech/tts/ITextToSpeechService;

    goto :goto_0

    .line 35
    :cond_1
    new-instance v0, Landroid/speech/tts/ITextToSpeechService$Stub$Proxy;

    .end local v0           #iin:Landroid/os/IInterface;
    invoke-direct {v0, p0}, Landroid/speech/tts/ITextToSpeechService$Stub$Proxy;-><init>(Landroid/os/IBinder;)V

    goto :goto_0
.end method

# virtual methods
.method public asBinder()Landroid/os/IBinder;
    .locals 0

    .prologue
    .line 39
    return-object p0
.end method

.method public onTransact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z
    .locals 8
    .parameter "code"
    .parameter "data"
    .parameter "reply"
    .parameter "flags"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation

    .prologue
    const/4 v7, 0x1

    .line 43
    sparse-switch p1, :sswitch_data_0

    .line 219
    invoke-super {p0, p1, p2, p3, p4}, Landroid/os/Binder;->onTransact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z

    move-result v7

    :goto_0
    return v7

    .line 47
    :sswitch_0
    const-string v0, "android.speech.tts.ITextToSpeechService"

    invoke-virtual {p3, v0}, Landroid/os/Parcel;->writeString(Ljava/lang/String;)V

    goto :goto_0

    .line 52
    :sswitch_1
    const-string v0, "android.speech.tts.ITextToSpeechService"

    invoke-virtual {p2, v0}, Landroid/os/Parcel;->enforceInterface(Ljava/lang/String;)V

    .line 54
    invoke-virtual {p2}, Landroid/os/Parcel;->readStrongBinder()Landroid/os/IBinder;

    move-result-object v1

    .line 56
    .local v1, _arg0:Landroid/os/IBinder;
    invoke-virtual {p2}, Landroid/os/Parcel;->readString()Ljava/lang/String;

    move-result-object v2

    .line 58
    .local v2, _arg1:Ljava/lang/String;
    invoke-virtual {p2}, Landroid/os/Parcel;->readInt()I

    move-result v4

    .line 60
    .local v4, _arg2:I
    invoke-virtual {p2}, Landroid/os/Parcel;->readInt()I

    move-result v0

    if-eqz v0, :cond_0

    .line 61
    sget-object v0, Landroid/os/Bundle;->CREATOR:Landroid/os/Parcelable$Creator;

    invoke-interface {v0, p2}, Landroid/os/Parcelable$Creator;->createFromParcel(Landroid/os/Parcel;)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Landroid/os/Bundle;

    .line 66
    .local v5, _arg3:Landroid/os/Bundle;
    :goto_1
    invoke-virtual {p0, v1, v2, v4, v5}, Landroid/speech/tts/ITextToSpeechService$Stub;->speak(Landroid/os/IBinder;Ljava/lang/String;ILandroid/os/Bundle;)I

    move-result v6

    .line 67
    .local v6, _result:I
    invoke-virtual {p3}, Landroid/os/Parcel;->writeNoException()V

    .line 68
    invoke-virtual {p3, v6}, Landroid/os/Parcel;->writeInt(I)V

    goto :goto_0

    .line 64
    .end local v5           #_arg3:Landroid/os/Bundle;
    .end local v6           #_result:I
    :cond_0
    const/4 v5, 0x0

    .restart local v5       #_arg3:Landroid/os/Bundle;
    goto :goto_1

    .line 73
    .end local v1           #_arg0:Landroid/os/IBinder;
    .end local v2           #_arg1:Ljava/lang/String;
    .end local v4           #_arg2:I
    .end local v5           #_arg3:Landroid/os/Bundle;
    :sswitch_2
    const-string v0, "android.speech.tts.ITextToSpeechService"

    invoke-virtual {p2, v0}, Landroid/os/Parcel;->enforceInterface(Ljava/lang/String;)V

    .line 75
    invoke-virtual {p2}, Landroid/os/Parcel;->readStrongBinder()Landroid/os/IBinder;

    move-result-object v1

    .line 77
    .restart local v1       #_arg0:Landroid/os/IBinder;
    invoke-virtual {p2}, Landroid/os/Parcel;->readString()Ljava/lang/String;

    move-result-object v2

    .line 79
    .restart local v2       #_arg1:Ljava/lang/String;
    invoke-virtual {p2}, Landroid/os/Parcel;->readString()Ljava/lang/String;

    move-result-object v4

    .line 81
    .local v4, _arg2:Ljava/lang/String;
    invoke-virtual {p2}, Landroid/os/Parcel;->readInt()I

    move-result v0

    if-eqz v0, :cond_1

    .line 82
    sget-object v0, Landroid/os/Bundle;->CREATOR:Landroid/os/Parcelable$Creator;

    invoke-interface {v0, p2}, Landroid/os/Parcelable$Creator;->createFromParcel(Landroid/os/Parcel;)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Landroid/os/Bundle;

    .line 87
    .restart local v5       #_arg3:Landroid/os/Bundle;
    :goto_2
    invoke-virtual {p0, v1, v2, v4, v5}, Landroid/speech/tts/ITextToSpeechService$Stub;->synthesizeToFile(Landroid/os/IBinder;Ljava/lang/String;Ljava/lang/String;Landroid/os/Bundle;)I

    move-result v6

    .line 88
    .restart local v6       #_result:I
    invoke-virtual {p3}, Landroid/os/Parcel;->writeNoException()V

    .line 89
    invoke-virtual {p3, v6}, Landroid/os/Parcel;->writeInt(I)V

    goto :goto_0

    .line 85
    .end local v5           #_arg3:Landroid/os/Bundle;
    .end local v6           #_result:I
    :cond_1
    const/4 v5, 0x0

    .restart local v5       #_arg3:Landroid/os/Bundle;
    goto :goto_2

    .line 94
    .end local v1           #_arg0:Landroid/os/IBinder;
    .end local v2           #_arg1:Ljava/lang/String;
    .end local v4           #_arg2:Ljava/lang/String;
    .end local v5           #_arg3:Landroid/os/Bundle;
    :sswitch_3
    const-string v0, "android.speech.tts.ITextToSpeechService"

    invoke-virtual {p2, v0}, Landroid/os/Parcel;->enforceInterface(Ljava/lang/String;)V

    .line 96
    invoke-virtual {p2}, Landroid/os/Parcel;->readStrongBinder()Landroid/os/IBinder;

    move-result-object v1

    .line 98
    .restart local v1       #_arg0:Landroid/os/IBinder;
    invoke-virtual {p2}, Landroid/os/Parcel;->readInt()I

    move-result v0

    if-eqz v0, :cond_2

    .line 99
    sget-object v0, Landroid/net/Uri;->CREATOR:Landroid/os/Parcelable$Creator;

    invoke-interface {v0, p2}, Landroid/os/Parcelable$Creator;->createFromParcel(Landroid/os/Parcel;)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Landroid/net/Uri;

    .line 105
    .local v2, _arg1:Landroid/net/Uri;
    :goto_3
    invoke-virtual {p2}, Landroid/os/Parcel;->readInt()I

    move-result v4

    .line 107
    .local v4, _arg2:I
    invoke-virtual {p2}, Landroid/os/Parcel;->readInt()I

    move-result v0

    if-eqz v0, :cond_3

    .line 108
    sget-object v0, Landroid/os/Bundle;->CREATOR:Landroid/os/Parcelable$Creator;

    invoke-interface {v0, p2}, Landroid/os/Parcelable$Creator;->createFromParcel(Landroid/os/Parcel;)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Landroid/os/Bundle;

    .line 113
    .restart local v5       #_arg3:Landroid/os/Bundle;
    :goto_4
    invoke-virtual {p0, v1, v2, v4, v5}, Landroid/speech/tts/ITextToSpeechService$Stub;->playAudio(Landroid/os/IBinder;Landroid/net/Uri;ILandroid/os/Bundle;)I

    move-result v6

    .line 114
    .restart local v6       #_result:I
    invoke-virtual {p3}, Landroid/os/Parcel;->writeNoException()V

    .line 115
    invoke-virtual {p3, v6}, Landroid/os/Parcel;->writeInt(I)V

    goto/16 :goto_0

    .line 102
    .end local v2           #_arg1:Landroid/net/Uri;
    .end local v4           #_arg2:I
    .end local v5           #_arg3:Landroid/os/Bundle;
    .end local v6           #_result:I
    :cond_2
    const/4 v2, 0x0

    .restart local v2       #_arg1:Landroid/net/Uri;
    goto :goto_3

    .line 111
    .restart local v4       #_arg2:I
    :cond_3
    const/4 v5, 0x0

    .restart local v5       #_arg3:Landroid/os/Bundle;
    goto :goto_4

    .line 120
    .end local v1           #_arg0:Landroid/os/IBinder;
    .end local v2           #_arg1:Landroid/net/Uri;
    .end local v4           #_arg2:I
    .end local v5           #_arg3:Landroid/os/Bundle;
    :sswitch_4
    const-string v0, "android.speech.tts.ITextToSpeechService"

    invoke-virtual {p2, v0}, Landroid/os/Parcel;->enforceInterface(Ljava/lang/String;)V

    .line 122
    invoke-virtual {p2}, Landroid/os/Parcel;->readStrongBinder()Landroid/os/IBinder;

    move-result-object v1

    .line 124
    .restart local v1       #_arg0:Landroid/os/IBinder;
    invoke-virtual {p2}, Landroid/os/Parcel;->readLong()J

    move-result-wide v2

    .line 126
    .local v2, _arg1:J
    invoke-virtual {p2}, Landroid/os/Parcel;->readInt()I

    move-result v4

    .line 128
    .restart local v4       #_arg2:I
    invoke-virtual {p2}, Landroid/os/Parcel;->readInt()I

    move-result v0

    if-eqz v0, :cond_4

    .line 129
    sget-object v0, Landroid/os/Bundle;->CREATOR:Landroid/os/Parcelable$Creator;

    invoke-interface {v0, p2}, Landroid/os/Parcelable$Creator;->createFromParcel(Landroid/os/Parcel;)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Landroid/os/Bundle;

    .restart local v5       #_arg3:Landroid/os/Bundle;
    :goto_5
    move-object v0, p0

    .line 134
    invoke-virtual/range {v0 .. v5}, Landroid/speech/tts/ITextToSpeechService$Stub;->playSilence(Landroid/os/IBinder;JILandroid/os/Bundle;)I

    move-result v6

    .line 135
    .restart local v6       #_result:I
    invoke-virtual {p3}, Landroid/os/Parcel;->writeNoException()V

    .line 136
    invoke-virtual {p3, v6}, Landroid/os/Parcel;->writeInt(I)V

    goto/16 :goto_0

    .line 132
    .end local v5           #_arg3:Landroid/os/Bundle;
    .end local v6           #_result:I
    :cond_4
    const/4 v5, 0x0

    .restart local v5       #_arg3:Landroid/os/Bundle;
    goto :goto_5

    .line 141
    .end local v1           #_arg0:Landroid/os/IBinder;
    .end local v2           #_arg1:J
    .end local v4           #_arg2:I
    .end local v5           #_arg3:Landroid/os/Bundle;
    :sswitch_5
    const-string v0, "android.speech.tts.ITextToSpeechService"

    invoke-virtual {p2, v0}, Landroid/os/Parcel;->enforceInterface(Ljava/lang/String;)V

    .line 142
    invoke-virtual {p0}, Landroid/speech/tts/ITextToSpeechService$Stub;->isSpeaking()Z

    move-result v6

    .line 143
    .local v6, _result:Z
    invoke-virtual {p3}, Landroid/os/Parcel;->writeNoException()V

    .line 144
    if-eqz v6, :cond_5

    move v0, v7

    :goto_6
    invoke-virtual {p3, v0}, Landroid/os/Parcel;->writeInt(I)V

    goto/16 :goto_0

    :cond_5
    const/4 v0, 0x0

    goto :goto_6

    .line 149
    .end local v6           #_result:Z
    :sswitch_6
    const-string v0, "android.speech.tts.ITextToSpeechService"

    invoke-virtual {p2, v0}, Landroid/os/Parcel;->enforceInterface(Ljava/lang/String;)V

    .line 151
    invoke-virtual {p2}, Landroid/os/Parcel;->readStrongBinder()Landroid/os/IBinder;

    move-result-object v1

    .line 152
    .restart local v1       #_arg0:Landroid/os/IBinder;
    invoke-virtual {p0, v1}, Landroid/speech/tts/ITextToSpeechService$Stub;->stop(Landroid/os/IBinder;)I

    move-result v6

    .line 153
    .local v6, _result:I
    invoke-virtual {p3}, Landroid/os/Parcel;->writeNoException()V

    .line 154
    invoke-virtual {p3, v6}, Landroid/os/Parcel;->writeInt(I)V

    goto/16 :goto_0

    .line 159
    .end local v1           #_arg0:Landroid/os/IBinder;
    .end local v6           #_result:I
    :sswitch_7
    const-string v0, "android.speech.tts.ITextToSpeechService"

    invoke-virtual {p2, v0}, Landroid/os/Parcel;->enforceInterface(Ljava/lang/String;)V

    .line 160
    invoke-virtual {p0}, Landroid/speech/tts/ITextToSpeechService$Stub;->getLanguage()[Ljava/lang/String;

    move-result-object v6

    .line 161
    .local v6, _result:[Ljava/lang/String;
    invoke-virtual {p3}, Landroid/os/Parcel;->writeNoException()V

    .line 162
    invoke-virtual {p3, v6}, Landroid/os/Parcel;->writeStringArray([Ljava/lang/String;)V

    goto/16 :goto_0

    .line 167
    .end local v6           #_result:[Ljava/lang/String;
    :sswitch_8
    const-string v0, "android.speech.tts.ITextToSpeechService"

    invoke-virtual {p2, v0}, Landroid/os/Parcel;->enforceInterface(Ljava/lang/String;)V

    .line 169
    invoke-virtual {p2}, Landroid/os/Parcel;->readString()Ljava/lang/String;

    move-result-object v1

    .line 171
    .local v1, _arg0:Ljava/lang/String;
    invoke-virtual {p2}, Landroid/os/Parcel;->readString()Ljava/lang/String;

    move-result-object v2

    .line 173
    .local v2, _arg1:Ljava/lang/String;
    invoke-virtual {p2}, Landroid/os/Parcel;->readString()Ljava/lang/String;

    move-result-object v4

    .line 174
    .local v4, _arg2:Ljava/lang/String;
    invoke-virtual {p0, v1, v2, v4}, Landroid/speech/tts/ITextToSpeechService$Stub;->isLanguageAvailable(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v6

    .line 175
    .local v6, _result:I
    invoke-virtual {p3}, Landroid/os/Parcel;->writeNoException()V

    .line 176
    invoke-virtual {p3, v6}, Landroid/os/Parcel;->writeInt(I)V

    goto/16 :goto_0

    .line 181
    .end local v1           #_arg0:Ljava/lang/String;
    .end local v2           #_arg1:Ljava/lang/String;
    .end local v4           #_arg2:Ljava/lang/String;
    .end local v6           #_result:I
    :sswitch_9
    const-string v0, "android.speech.tts.ITextToSpeechService"

    invoke-virtual {p2, v0}, Landroid/os/Parcel;->enforceInterface(Ljava/lang/String;)V

    .line 183
    invoke-virtual {p2}, Landroid/os/Parcel;->readString()Ljava/lang/String;

    move-result-object v1

    .line 185
    .restart local v1       #_arg0:Ljava/lang/String;
    invoke-virtual {p2}, Landroid/os/Parcel;->readString()Ljava/lang/String;

    move-result-object v2

    .line 187
    .restart local v2       #_arg1:Ljava/lang/String;
    invoke-virtual {p2}, Landroid/os/Parcel;->readString()Ljava/lang/String;

    move-result-object v4

    .line 188
    .restart local v4       #_arg2:Ljava/lang/String;
    invoke-virtual {p0, v1, v2, v4}, Landroid/speech/tts/ITextToSpeechService$Stub;->getFeaturesForLanguage(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v6

    .line 189
    .local v6, _result:[Ljava/lang/String;
    invoke-virtual {p3}, Landroid/os/Parcel;->writeNoException()V

    .line 190
    invoke-virtual {p3, v6}, Landroid/os/Parcel;->writeStringArray([Ljava/lang/String;)V

    goto/16 :goto_0

    .line 195
    .end local v1           #_arg0:Ljava/lang/String;
    .end local v2           #_arg1:Ljava/lang/String;
    .end local v4           #_arg2:Ljava/lang/String;
    .end local v6           #_result:[Ljava/lang/String;
    :sswitch_a
    const-string v0, "android.speech.tts.ITextToSpeechService"

    invoke-virtual {p2, v0}, Landroid/os/Parcel;->enforceInterface(Ljava/lang/String;)V

    .line 197
    invoke-virtual {p2}, Landroid/os/Parcel;->readString()Ljava/lang/String;

    move-result-object v1

    .line 199
    .restart local v1       #_arg0:Ljava/lang/String;
    invoke-virtual {p2}, Landroid/os/Parcel;->readString()Ljava/lang/String;

    move-result-object v2

    .line 201
    .restart local v2       #_arg1:Ljava/lang/String;
    invoke-virtual {p2}, Landroid/os/Parcel;->readString()Ljava/lang/String;

    move-result-object v4

    .line 202
    .restart local v4       #_arg2:Ljava/lang/String;
    invoke-virtual {p0, v1, v2, v4}, Landroid/speech/tts/ITextToSpeechService$Stub;->loadLanguage(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v6

    .line 203
    .local v6, _result:I
    invoke-virtual {p3}, Landroid/os/Parcel;->writeNoException()V

    .line 204
    invoke-virtual {p3, v6}, Landroid/os/Parcel;->writeInt(I)V

    goto/16 :goto_0

    .line 209
    .end local v1           #_arg0:Ljava/lang/String;
    .end local v2           #_arg1:Ljava/lang/String;
    .end local v4           #_arg2:Ljava/lang/String;
    .end local v6           #_result:I
    :sswitch_b
    const-string v0, "android.speech.tts.ITextToSpeechService"

    invoke-virtual {p2, v0}, Landroid/os/Parcel;->enforceInterface(Ljava/lang/String;)V

    .line 211
    invoke-virtual {p2}, Landroid/os/Parcel;->readStrongBinder()Landroid/os/IBinder;

    move-result-object v1

    .line 213
    .local v1, _arg0:Landroid/os/IBinder;
    invoke-virtual {p2}, Landroid/os/Parcel;->readStrongBinder()Landroid/os/IBinder;

    move-result-object v0

    invoke-static {v0}, Landroid/speech/tts/ITextToSpeechCallback$Stub;->asInterface(Landroid/os/IBinder;)Landroid/speech/tts/ITextToSpeechCallback;

    move-result-object v2

    .line 214
    .local v2, _arg1:Landroid/speech/tts/ITextToSpeechCallback;
    invoke-virtual {p0, v1, v2}, Landroid/speech/tts/ITextToSpeechService$Stub;->setCallback(Landroid/os/IBinder;Landroid/speech/tts/ITextToSpeechCallback;)V

    .line 215
    invoke-virtual {p3}, Landroid/os/Parcel;->writeNoException()V

    goto/16 :goto_0

    .line 43
    :sswitch_data_0
    .sparse-switch
        0x1 -> :sswitch_1
        0x2 -> :sswitch_2
        0x3 -> :sswitch_3
        0x4 -> :sswitch_4
        0x5 -> :sswitch_5
        0x6 -> :sswitch_6
        0x7 -> :sswitch_7
        0x8 -> :sswitch_8
        0x9 -> :sswitch_9
        0xa -> :sswitch_a
        0xb -> :sswitch_b
        0x5f4e5446 -> :sswitch_0
    .end sparse-switch
.end method


text:
class SessionsController < ApplicationController
  skip_before_action :require_signin, only: [:new, :create]

  def new
  end

  def create
    student = Student.find_by(email: params[:session][:email].downcase)

    if student && student.authenticate(params[:session][:password])
      sign_in student
      redirect_back_or root_path
    else
      flash[:error] = 'Invalid email or password'
      redirect_to new_session_path
    end
  end

  def destroy
    sign_out
    redirect_to root_url
  end

end


text:
var
    esPhinx;

(function ($, $module) {
    "use strict";

    var
        CSS_CLASS = "esphinx ui",
        CSS_CLASS_QUERY = "." + CSS_CLASS.replace(/ +/g, ".");

    $module.extend({
        selectors: {Select: {}}
    });

    $.Extender.extend($module.selectors.Select, true, {
        new: function (select, options) {
            var
                ConstructorReference = $module.selectors.Select.new,
                originalAbstractOptions,
                wrapper = $("

"),
                caption = $("

"),
                optionsPanel = $("

"),
                searchTextBox = $("<input></input>"),
                abstractSelect = $("

"),
                abstractOptions = [],
                captionText = $("

"),
                selectElement = $(select),
                optionElements = selectElement.find("option"),

                resolveArguments = function (options) {
                    if(!options) {
                        options = {};
                    }

                    if(!options.developmentMode ||
                       typeof options.developmentMode != "boolean") {
                        options.developmentMode = false;
                    }
                },

                selected = function (select) {
                    return select.find("option:checked");
                },

                toggleCaptionClass = function (caption) {
                    caption.toggleClass("expanded-arrow", "retracted-arrow");
                },

                attachFoundListEventListener = function (abstractOptions) {
                    var
                        callback = function (abstractOption) {
                            abstractOption.element().off("click");
                            abstractOption.element().on("click", function () {
                                abstractOption.select();
                            });
                        };

                    abstractOptions.forEach(callback);
                },

                composeOptions = function (optionElements) {
                    var
                        callback = function (option) {
                            var
                                optionObject = Option.new({
                                    option: option,
                                    select: selectElement,
                                    caption: caption,
                                    captionText: captionText,
                                    optionsPanel: optionsPanel,
                                    abstractSelect: abstractSelect
                                });
                            abstractSelect.append(optionObject.element());
                            abstractOptions.push(optionObject);
                        };

                    abstractSelect.clean();
                    if (searchTextBox.value() ||
                        !originalAbstractOptions) {
                        optionElements.each(callback);
                        attachFoundListEventListener(abstractOptions);
                        abstractOptions = [];
                    } else if (originalAbstractOptions) {
                        abstractSelect.append(originalAbstractOptions.clone());
                    }
                },

                compose = function () {
                    if (!options.developmentMode) {
                        selectElement.hide();
                    }

                    wrapper.insertAfter(selectElement);
                    captionText.text(selected(selectElement).text());
                    caption.append(captionText);
                    wrapper.prepend(caption);
                    wrapper.append(optionsPanel);
                    optionsPanel.append(abstractSelect);

                    var

                        composeSearchTextBox = function () {
                            searchTextBox.attribute("type", "text");
                            optionsPanel.prepend(searchTextBox);
                            $.ui.panels.autocomplete.new(searchTextBox,
                                abstractSelect.childElements(),
                                options.autocomplete,
                                function (found) {
                                    composeOptions(found);
                                }
                            );
                        };

                    wrapper.addClass(CSS_CLASS + " select");
                    caption.addClass("caption retracted-arrow");
                    optionsPanel.addClass("options-panel");
                    captionText.addClass("text");

                    // toggle on click on caption
                    caption.on("click", function () {
                        optionsPanel.toggle();
                        toggleCaptionClass($(this));
                    });

                    composeOptions(optionElements);
                    originalAbstractOptions = abstractSelect.childElements()
                        .clone();

                    if (typeof options.searchTextBox == "boolean" &&
                        options.searchTextBox) {
                        composeSearchTextBox();
                    }
                },

                attachClickFromOutsideEventListener = function () {
                    var
                        wrapper = $(CSS_CLASS_QUERY + ".select"),
                        optionsPanels = wrapper.find(".options-panel"),
                        captions = wrapper.find(".caption");

                    // outside clicking
                    $(window.document).on("click", function (e) {
                        if ($(e.target).parent(CSS_CLASS_QUERY + ".select")
                            .empty()) {
                            if (optionsPanels.visible()) {
                                optionsPanels.hide();
                                captions.removeClass("expanded-arrow");
                                captions.addClass("retracted-arrow");
                            }
                        }
                    });
                },

                addOptions = function (select, optionElements) {
                    var
                        callback = function (optionElement) {
                            select.append(optionElement);
                        };

                    $(optionElements).each(callback);
                },

                replaceSelectOptions = function (select, optionElements) {
                    select.clean();
                    addOptions(select, $(optionElements));
                },

                Option = {
                    new: function (data) {
                        var
                            option,
                            abstractOption,
                            ConstructorReference = Option.new,
                            select = data.select,

                            build = function (li, option) {
                                li.text(option.text());
                                li.attribute("data-value", option
                                             .attribute("value"));
                            };

                        if (!(this instanceof ConstructorReference)) {
                            return new ConstructorReference(data);
                        }
                        if ($(data.option).tagName() == "option") {
                            option = $(data.option);
                            abstractOption = $("

");
                            build(abstractOption, option);
                        } else {
                            abstractOption = $(data.option);
                            option = select.find("option[value='" +
                                      abstractOption.data("value") + "']");
                        }

                        this.select = function () {
                            data.captionText.text(abstractOption
                                                     .textContent());
                            select.find("option:checked").unselect();
                            option.select();
                            data.optionsPanel.hide();
                            toggleCaptionClass(data.caption);
                        };

                        this.element = function () {
                            return abstractOption;
                        };
                    }
                };

            if (!(this instanceof ConstructorReference)) {
                return new ConstructorReference(select, options);
            }

            resolveArguments(options);
            select = $(select);
            compose();
            attachClickFromOutsideEventListener();

            this.addOptions = function (optionElements) {
                addOptions(select, optionElements);
                composeOptions(optionElements);
            };

            this.replaceOptions = function (optionElements) {
                abstractSelect.clean();
                replaceSelectOptions(select, optionElements);
                composeOptions(optionElements);
            };

            return this;
        }
    });

}(esPhinx, esPhinx.ui));


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

import com.gemstone.gemfire.internal.cache.tier.MessageType;
import com.gemstone.gemfire.internal.cache.tier.sockets.Message;

import java.util.Iterator;
import java.util.List;

/**
 * Send the primary server acknowledgement on the events this client
 * has received and processed from it.
 * @author darrel
 * @since 5.7
 */
public class PrimaryAckOp {
  /**
   * Send the primary server acknowledgement on the events this client
   * has received and processed from it
   * using connections from the given pool
   * to communicate with the server.
   * @param connection
   * @param pool the pool to use to communicate with the server.
   * @param events list of events to acknowledge
   */
  public static void execute(Connection connection, ExecutablePool pool,
                             List events)
  {
    AbstractOp op = new PrimaryAckOpImpl(events);
    pool.executeOn(connection, op);
  }

  private PrimaryAckOp() {
    // no instances allowed
  }

  private static class PrimaryAckOpImpl extends AbstractOp {
    /**
     * @throws com.gemstone.gemfire.SerializationException if serialization fails
     */
    public PrimaryAckOpImpl(List events) {
      super(MessageType.PERIODIC_ACK, events.size());
      for (Iterator i = events.iterator(); i.hasNext();) {
        getMessage().addObjPart(i.next());
      }
    }

    @Override
    protected void processSecureBytes(Connection cnx, Message message)
        throws Exception {
    }

    @Override
    protected boolean needsUserId() {
      return false;
    }

    @Override
    protected void sendMessage(Connection cnx) throws Exception {
      getMessage().setEarlyAck((byte)(getMessage().getEarlyAckByte() & Message.MESSAGE_HAS_SECURE_PART));
      getMessage().send(false);
    }

    @Override
    protected Object processResponse(Message msg) throws Exception {
      processAck(msg, "primaryAck");
      return null;
    }
    @Override
    protected boolean isErrorResponse(int msgType) {
      return false;
    }
    @Override
    protected long startAttempt(ConnectionStats stats) {
      return stats.startPrimaryAck();
    }
    @Override
    protected void endSendAttempt(ConnectionStats stats, long start) {
      stats.endPrimaryAckSend(start, hasFailed());
    }
    @Override
    protected void endAttempt(ConnectionStats stats, long start) {
      stats.endPrimaryAck(start, hasTimedOut(), hasFailed());
    }
  }
}