text:
<?php

/* @WebProfiler/Profiler/toolbar.html.twig */
class __TwigTemplate_7ed590789df88e3d3f29b0b660be58755625c52be3c3af7bf7c8bcbc501296bf extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        $this->parent = false;

        $this->blocks = array(
        );
    }

    protected function doDisplay(array $context, array $blocks = array())
    {
        $__internal_77a65387604a2a68987929cb7d6b3814d23b3a7b840e58113fdaef87c32a539c = $this->env->getExtension("Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension");
        $__internal_77a65387604a2a68987929cb7d6b3814d23b3a7b840e58113fdaef87c32a539c->enter($__internal_77a65387604a2a68987929cb7d6b3814d23b3a7b840e58113fdaef87c32a539c_prof = new Twig_Profiler_Profile($this->getTemplateName(), "template", "@WebProfiler/Profiler/toolbar.html.twig"));

        $__internal_c9d2eca30c33ae23db7a78b7668dcd91d8b34985386f49a58ed4c2c8cfea6030 = $this->env->getExtension("Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension");
        $__internal_c9d2eca30c33ae23db7a78b7668dcd91d8b34985386f49a58ed4c2c8cfea6030->enter($__internal_c9d2eca30c33ae23db7a78b7668dcd91d8b34985386f49a58ed4c2c8cfea6030_prof = new Twig_Profiler_Profile($this->getTemplateName(), "template", "@WebProfiler/Profiler/toolbar.html.twig"));

        // line 1
        echo "

env, (isset($context["token"]) ? $context["token"] : $this->getContext($context, "token")), "html", null, true);
        echo "\" class=\"sf-minitoolbar\" data-no-turbolink>
    env, (isset($context["token"]) ? $context["token"] : $this->getContext($context, "token")), "html", null, true);
        echo "\" accesskey=\"D\">
        ";
        // line 4
        echo twig_include($this->env, $context, "@WebProfiler/Icon/symfony.svg");
        echo "

env, (isset($context["token"]) ? $context["token"] : $this->getContext($context, "token")), "html", null, true);
        echo "\" class=\"sf-toolbar-clearer\">

env, (isset($context["token"]) ? $context["token"] : $this->getContext($context, "token")), "html", null, true);
        echo "\" class=\"sf-toolbarreset clear-fix\" data-no-turbolink>
    ";
        // line 10
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable((isset($context["templates"]) ? $context["templates"] : $this->getContext($context, "templates")));
        $context['loop'] = array(
          'parent' => $context['_parent'],
          'index0' => 0,
          'index'  => 1,
          'first'  => true,
        );
        if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof Countable)) {
            $length = count($context['_seq']);
            $context['loop']['revindex0'] = $length - 1;
            $context['loop']['revindex'] = $length;
            $context['loop']['length'] = $length;
            $context['loop']['last'] = 1 === $length;
        }
        foreach ($context['_seq'] as $context["name"] => $context["template"]) {
            // line 11
            echo "        ";
            if (            $this->loadTemplate($context["template"], "@WebProfiler/Profiler/toolbar.html.twig", 11)->hasBlock("toolbar", $context)) {
                // line 12
                echo "            ";
                $__internal_da5a212c3885084b7101b6e9ea53dc8199d6abde75623800ba25cb63ab02fc91 = array("collector" => $this->getAttribute(                // line 13
(isset($context["profile"]) ? $context["profile"] : $this->getContext($context, "profile")), "getcollector", array(0 => $context["name"]), "method"), "profiler_url" =>                 // line 14
(isset($context["profiler_url"]) ? $context["profiler_url"] : $this->getContext($context, "profiler_url")), "token" => $this->getAttribute(                // line 15
(isset($context["profile"]) ? $context["profile"] : $this->getContext($context, "profile")), "token", array()), "name" =>                 // line 16
$context["name"], "profiler_markup_version" =>                 // line 17
(isset($context["profiler_markup_version"]) ? $context["profiler_markup_version"] : $this->getContext($context, "profiler_markup_version")), "csp_script_nonce" =>                 // line 18
(isset($context["csp_script_nonce"]) ? $context["csp_script_nonce"] : $this->getContext($context, "csp_script_nonce")), "csp_style_nonce" =>                 // line 19
(isset($context["csp_style_nonce"]) ? $context["csp_style_nonce"] : $this->getContext($context, "csp_style_nonce")));
                if (!is_array($__internal_da5a212c3885084b7101b6e9ea53dc8199d6abde75623800ba25cb63ab02fc91)) {
                    throw new Twig_Error_Runtime('Variables passed to the "with" tag must be a hash.');
                }
                $context['_parent'] = $context;
                $context = array_merge($context, $__internal_da5a212c3885084b7101b6e9ea53dc8199d6abde75623800ba25cb63ab02fc91);
                // line 21
                echo "                ";
                $this->loadTemplate($context["template"], "@WebProfiler/Profiler/toolbar.html.twig", 21)->displayBlock("toolbar", $context);
                echo "
            ";
                $context = $context['_parent'];
                // line 23
                echo "        ";
            }
            // line 24
            echo "    ";
            ++$context['loop']['index0'];
            ++$context['loop']['index'];
            $context['loop']['first'] = false;
            if (isset($context['loop']['length'])) {
                --$context['loop']['revindex0'];
                --$context['loop']['revindex'];
                $context['loop']['last'] = 0 === $context['loop']['revindex0'];
            }
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['name'], $context['template'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 25
        echo "
    env, (isset($context["token"]) ? $context["token"] : $this->getContext($context, "token")), "html", null, true);
        echo "\" title=\"Close Toolbar\" tabindex=\"-1\" accesskey=\"D\">
        ";
        // line 27
        echo twig_include($this->env, $context, "@WebProfiler/Icon/close.svg");
        echo "

";

        $__internal_77a65387604a2a68987929cb7d6b3814d23b3a7b840e58113fdaef87c32a539c->leave($__internal_77a65387604a2a68987929cb7d6b3814d23b3a7b840e58113fdaef87c32a539c_prof);

        $__internal_c9d2eca30c33ae23db7a78b7668dcd91d8b34985386f49a58ed4c2c8cfea6030->leave($__internal_c9d2eca30c33ae23db7a78b7668dcd91d8b34985386f49a58ed4c2c8cfea6030_prof);

    }

    public function getTemplateName()
    {
        return "@WebProfiler/Profiler/toolbar.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  116 => 27,  112 => 26,  109 => 25,  95 => 24,  92 => 23,  86 => 21,  79 => 19,  78 => 18,  77 => 17,  76 => 16,  75 => 15,  74 => 14,  73 => 13,  71 => 12,  68 => 11,  51 => 10,  47 => 9,  42 => 7,  36 => 4,  32 => 3,  28 => 2,  25 => 1,);
    }

    /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
    public function getSource()
    {
        @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);

        return $this->getSourceContext()->getCode();
    }

    public function getSourceContext()
    {
        return new Twig_Source("

        {{ include('@WebProfiler/Icon/symfony.svg') }}

    {% for name, template in templates %}
        {% if block('toolbar', template) is defined %}
            {% with {
                collector: profile.getcollector(name),
                profiler_url: profiler_url,
                token: profile.token,
                name: name,
                profiler_markup_version: profiler_markup_version,
                csp_script_nonce: csp_script_nonce,
                csp_style_nonce: csp_style_nonce
              } %}
                {{ block('toolbar', template) }}
            {% endwith %}
        {% endif %}
    {% endfor %}

        {{ include('@WebProfiler/Icon/close.svg') }}

", "@WebProfiler/Profiler/toolbar.html.twig", "C:\\wamp64\\www\\exia\\BDExia\\vendor\\symfony\\symfony\\src\\Symfony\\Bundle\\WebProfilerBundle\\Resources\\views\\Profiler\\toolbar.html.twig");
    }
}


text: sudo ./scripts/applyUVCPatch.sh

redpajama_set_name: RedPajamaGithub


text:
: ${PARTICLE_BUILDPACK_VERSION="0.6.0"}
: ${PARTICLE_BUILDPACK_IMAGE="particle/buildpack-particle-firmware:$PARTICLE_BUILDPACK_VERSION"}
: ${PARTICLE_PLATFORM_ID=6} # photon
# : ${PARTICLE_PLATFORM_ID=10} # electron

_start_machine() {
	# ensure the docker machine is running
	docker-machine start default
	eval "$(docker-machine env default)"
}

_init_build() {
	# flatten all the source files in the build directory
	rm -rf build
	mkdir build
	cp src/* build
	for f in "$@"; do cp $f build; done
	echo "========================="
	ls -l build
}

_build() {
	# clean out and setup the target for build artifacts
	rm -rf target
	mkdir target

	# call the particle buildpack
	#   on osx this assumes that `pwd` results in a directory under /Users which is shared by default with docker-machine
	echo "========================="
	docker run -v `pwd`/build:/input -v `pwd`/target:/output -e PLATFORM_ID=$PARTICLE_PLATFORM_ID $PARTICLE_BUILDPACK_IMAGE
}

_post_build() {
	# check results and flash if success
	echo "========================="
	if [ -s target/firmware.bin ]; then
		echo "SUCCESS"
		if [ "$PARTICLE_DEVICE" != "" ]; then
			particle flash $PARTICLE_DEVICE target/firmware.bin
		else
			echo "use: 'particle flash NAME target/firmware.bin' to upload"
		fi
	else
		echo "FAILED"
	fi
}

#_start_machine
_init_build $@
_build
_post_build


text:
package edu.avans.hartigehap.domain;

import java.util.List;

public class ReviewCollectionProxy implements IReviewCollection{
	private double averageRating;
	private int medianRating;

	@Override
	public List<Review> getReviews() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void setReview(ReviewCollection review) {
		// TODO Auto-generated method stub

	}

	@Override
	public double getMedian() {
		// TODO Auto-generated method stub
		return medianRating;
	}

	@Override
	public double getAverage() {
		// TODO Auto-generated method stub
		return averageRating;
	}
}


text:
"""Display VAS ratings of mood."""
# VasTask.py
# Created 8/20/18 by DJ.
# Updated 8/22/18 by DJ - added vasStepSize param to control slider speed
# Updated 9/5/18 by DJ - removed AppKit calls, updated GUI filters (|-->;;), removed parallel import

from psychopy import visual # visual must be called first to prevent a bug where a movie won't appear.
from psychopy import core, gui, data, event, logging # experiment
from psychopy.tools.filetools import fromFile, toFile # saving and loading parameter files
import time as ts, numpy as np # for timing and array operations
import os # for monitor size detection, files
# import AppKit # for monitor size detection (on Macs only)
import BasicPromptTools # for loading/presenting prompts and questions
import RatingScales # for VAS sliding scale

# ====================== #
# ===== PARAMETERS ===== #
# ====================== #
# Save the parameters declared below?
saveParams = True; # SET THIS TO TRUE IF YOU WANT TO CHANGE PARAMETERS!
newParamsFilename = 'VasParams.psydat'

# Declare primary task parameters.
params = {
# declare VAS question files
    'questionFile': 'Questions/ScaryMovieVasQuestions.txt', # Name of text file containing Q&As
    'questionDownKey': '1',
    'questionUpKey':'2',
    'questionSelectKey':'3',
    'questionSelectAdvances': True,
    'questionDur': 999.0,
    'vasStepSize': 0.5, # how far the slider moves with a keypress (increase to move faster)
# declare display parameters
    'fullScreen': True,       # run in full screen mode?
    'screenToShow': 0,        # display on primary screen (0) or secondary (1)?
    'screenColor':(0,0,0), # gray #(-0.46667, -0.10588, 0.53725), # a neutral blue
    'textColor':(1,1,1) # white
}

# save parameters
if saveParams:
    dlgResult = gui.fileSaveDlg(prompt='Save Params...',initFilePath = os.getcwd() + '/Params', initFileName = newParamsFilename,
        allowed="PSYDAT files (*.psydat);;All files (*.*)")
    newParamsFilename = dlgResult
    if newParamsFilename is None: # keep going, but don't save
        saveParams = False
    else:
        toFile(newParamsFilename, params) # save it!

# ========================== #
# ===== SET UP LOGGING ===== #
# ========================== #
scriptName = os.path.basename(__file__)
scriptName = os.path.splitext(scriptName)[0] # remove extension
try: # try to get a previous parameters file
    expInfo = fromFile('%s-lastExpInfo.psydat'%scriptName)
    expInfo['session'] +=1 # automatically increment session number
    expInfo['paramsFile'] = [expInfo['paramsFile'],'Load...']
except: # if not there then use a default set
    expInfo = {
        'subject':'1',
        'session': 1,
        'paramsFile':['DEFAULT','Load...']}
# overwrite params struct if you just saved a new parameter set
if saveParams:
    expInfo['paramsFile'] = [newParamsFilename,'Load...']

#present a dialogue to change select params
dlg = gui.DlgFromDict(expInfo, title=scriptName, order=['subject','session','paramsFile'])
if not dlg.OK:
    core.quit() # the user hit cancel, so exit

# find parameter file
if expInfo['paramsFile'] == 'Load...':
    dlgResult = gui.fileOpenDlg(prompt='Select parameters file',tryFilePath=os.getcwd(),
        allowed="PSYDAT files (*.psydat);;All files (*.*)")
    expInfo['paramsFile'] = dlgResult[0]
# load parameter file
if expInfo['paramsFile'] not in ['DEFAULT', None]: # otherwise, just use defaults.
    # load params file
    params = fromFile(expInfo['paramsFile'])

# print params to Output
print 'params = {'
for key in sorted(params.keys()):
    print "   '%s': %s"%(key,params[key]) # print each value as-is (no quotes)
print '}'

# save experimental info
toFile('%s-lastExpInfo.psydat'%scriptName, expInfo)#save params to file for next time

#make a log file to save parameter/event  data
dateStr = ts.strftime("%b_%d_%H%M", ts.localtime()) # add the current time
filename = 'Logs/%s-%s-%d-%s'%(scriptName,expInfo['subject'], expInfo['session'], dateStr) # log filename
logging.LogFile((filename+'.log'), level=logging.INFO)#, mode='w') # w=overwrite
logging.log(level=logging.INFO, msg='---START PARAMETERS---')
logging.log(level=logging.INFO, msg='filename: %s'%filename)
logging.log(level=logging.INFO, msg='subject: %s'%expInfo['subject'])
logging.log(level=logging.INFO, msg='session: %s'%expInfo['session'])
logging.log(level=logging.INFO, msg='date: %s'%dateStr)
# log everything in the params struct
for key in sorted(params.keys()): # in alphabetical order
    logging.log(level=logging.INFO, msg='%s: %s'%(key,params[key])) # log each parameter

logging.log(level=logging.INFO, msg='---END PARAMETERS---')

# ========================== #
# ===== GET SCREEN RES ===== #
# ========================== #

# kluge for secondary monitor
#if params['fullScreen']:
#    screens = AppKit.NSScreen.screens()
#    screenRes = (int(screens[params['screenToShow']].frame().size.width), int(screens[params['screenToShow']].frame().size.height))
##    screenRes = [1920, 1200]
#    if params['screenToShow']>0:
#        params['fullScreen'] = False
#else:
#    screenRes = [800,600]
screenRes = (1280,760)
print "screenRes = [%d,%d]"%screenRes

# ========================== #
# ===== SET UP STIMULI ===== #
# ========================== #
#from psychopy import visual

# Initialize deadline for displaying next frame
tNextFlip = [0.0] # put in a list to make it mutable (weird quirk of python variables)

#create clocks and window
globalClock = core.Clock()#to keep track of time
trialClock = core.Clock()#to keep track of time
win = visual.Window(screenRes, fullscr=params['fullScreen'], allowGUI=False, monitor='testMonitor', screen=params['screenToShow'], units='deg', name='win',color=params['screenColor'])
# create text stimuli
message1 = visual.TextStim(win, pos=[0,+.5], wrapWidth=1.5, color=params['textColor'], alignHoriz='center', name='topMsg', text="aaa",units='norm')
message2 = visual.TextStim(win, pos=[0,-.5], wrapWidth=1.5, color=params['textColor'], alignHoriz='center', name='bottomMsg', text="bbb",units='norm')

# load VAS Qs & options
[questions,options,answers] = BasicPromptTools.ParseQuestionFile(params['questionFile'])
print('%d questions loaded from %s'%(len(questions),params['questionFile']))

# ============================ #
# ======= SUBFUNCTIONS ======= #
# ============================ #

# increment time of next window flip
def AddToFlipTime(tIncrement=1.0):
    tNextFlip[0] += tIncrement

# flip window as soon as possible
def SetFlipTimeToNow():
    tNextFlip[0] = globalClock.getTime()

def RunVas(questions,options):

    # Show questions and options
    [rating,decisionTime,choiceHistory] = RatingScales.ShowVAS(questions,options,win, questionDur=params['questionDur'], \
        upKey=params['questionUpKey'],downKey=params['questionDownKey'],selectKey=params['questionSelectKey'],\
        isEndedByKeypress=params['questionSelectAdvances'],textColor=params['textColor'],name='Vas',stepSize=params['vasStepSize'])

    # Print results
    print('===VAS Responses:===')
    for iQ in range(len(rating)):
        print('Scale #%d: %.1f'%(iQ,rating[iQ]))

# Handle end of a session
def CoolDown():

    # display cool-down message
    message1.setText("That's the end! ")
    message2.setText("Press 'q' or 'escape' to end the session.")
    win.logOnFlip(level=logging.EXP, msg='Display TheEnd')
    message1.draw()
    message2.draw()
    win.flip()
    thisKey = event.waitKeys(keyList=['q','escape'])

    # exit
    core.quit()

# ==== MAIN EXPERIMENT ===== #

# Display VAS
RunVas(questions,options)

# exit experiment
CoolDown()


text:
import sbt._
import sbt.Keys._
import org.portablescala.sbtplatformdeps.PlatformDepsPlugin.autoImport._
import org.scalajs.jsdependencies.sbtplugin.JSDependenciesPlugin
import org.scalajs.jsdependencies.sbtplugin.JSDependenciesPlugin.autoImport._

object Dependencies {

  object Ver {

    // Exported
    val scala2          = "2.13.6"
    val scala3          = "3.0.1"
    val scalaJsDom      = "2.0.0"
    val scalaJsReact    = "2.0.0"
    val scalatags       = "0.10.0"
    val univEq          = "2.0.0"

    // Internal
    val cats            = "2.6.1"
    val microlibs       = "4.0.0"
    val nyaya           = "1.0.0"
    val reactJs         = "17.0.2"
    val utest           = "0.7.10"
  }

  object Dep {
    val cats                 = Def.setting("org.typelevel"                     %%% "cats-core"               % Ver.cats)
    val microlibsCompileTime = Def.setting("com.github.japgolly.microlibs"     %%% "compile-time"            % Ver.microlibs)
    val microlibsTestUtil    = Def.setting("com.github.japgolly.microlibs"     %%% "test-util"               % Ver.microlibs)
    val nyayaGen             = Def.setting("com.github.japgolly.nyaya"         %%% "nyaya-gen"               % Ver.nyaya)
    val nyayaProp            = Def.setting("com.github.japgolly.nyaya"         %%% "nyaya-prop"              % Ver.nyaya)
    val nyayaTest            = Def.setting("com.github.japgolly.nyaya"         %%% "nyaya-test"              % Ver.nyaya)
    val scalaCompiler        = Def.setting("org.scala-lang"                      % "scala-compiler"          % scalaVersion.value)
    val scalaJsDom           = Def.setting("org.scala-js"                      %%% "scalajs-dom"             % Ver.scalaJsDom)
    val scalaJsReactCore     = Def.setting("com.github.japgolly.scalajs-react" %%% "core"                    % Ver.scalaJsReact)
    val scalaJsReactCoreGen  = Def.setting("com.github.japgolly.scalajs-react" %%% "core-generic"            % Ver.scalaJsReact)
    val scalaJsReactDummy    = Def.setting("com.github.japgolly.scalajs-react" %%% "util-dummy-defaults"     % Ver.scalaJsReact)
    val scalaJsReactTest     = Def.setting("com.github.japgolly.scalajs-react" %%% "test"                    % Ver.scalaJsReact)
    val scalaReflect         = Def.setting("org.scala-lang"                      % "scala-reflect"           % scalaVersion.value)
    val scalatags            = Def.setting("com.lihaoyi"                       %%% "scalatags"               % Ver.scalatags cross CrossVersion.for3Use2_13)
    val univEq               = Def.setting("com.github.japgolly.univeq"        %%% "univeq"                  % Ver.univEq)
    val utest                = Def.setting("com.lihaoyi"                       %%% "utest"                   % Ver.utest)
  }

  def addReactJsDependencies(scope: Configuration): Project => Project =
    _.enablePlugins(JSDependenciesPlugin)
      .settings(
        jsDependencies ++= Seq(

          "org.webjars.npm" % "react" % Ver.reactJs % scope
            /        "umd/react.development.js"
            minified "umd/react.production.min.js"
            commonJSName "React",

          "org.webjars.npm" % "react-dom" % Ver.reactJs % scope
            /         "umd/react-dom.development.js"
            minified  "umd/react-dom.production.min.js"
            dependsOn "umd/react.development.js"
            commonJSName "ReactDOM",

          "org.webjars.npm" % "react-dom" % Ver.reactJs % scope
            /         "umd/react-dom-server.browser.development.js"
            minified  "umd/react-dom-server.browser.production.min.js"
            dependsOn "umd/react-dom.development.js"
            commonJSName "ReactDOMServer",
        ),
      )
}


text:
(function($) { // block scope

$.extend({
    tabs: {
        remoteCount: 0 // TODO in Tabs 3 this is going to be more cleanly in one single namespace
    }
});

/**
 * Create an accessible, unobtrusive tab interface based on a particular HTML structure.
 *
 * The underlying HTML has to look like this:
 *
 *

 *

 *
Section 1

 *
Section 2

 *
Section 3

 *

 *

 *
 *

 *

 *
 *

 *

 *
 *

 *

 *
 * Each anchor in the unordered list points directly to a section below represented by one of the
 * divs (the URI in the anchor's href attribute refers to the fragment with the corresponding id).
 * Because such HTML structure is fully functional on its own, e.g. without JavaScript, the tab
 * interface is accessible and unobtrusive.
 *
 * A tab is also bookmarkable via hash in the URL. Use the History/Remote plugin (Tabs will
 * auto-detect its presence) to fix the back (and forward) button.
 *
 * @example $('#container').tabs();
 * @desc Create a basic tab interface.
 * @example $('#container').tabs(2);
 * @desc Create a basic tab interface with the second tab initially activated.
 * @example $('#container').tabs({disabled: [3, 4]});
 * @desc Create a tab interface with the third and fourth tab being disabled.
 * @example $('#container').tabs({fxSlide: true});
 * @desc Create a tab interface that uses slide down/up animations for showing/hiding tab
 *       content upon tab switching.
 *
 * @param Number initial An integer specifying the position of the tab (no zero-based index) that
 *                       gets activated at first (on page load). Two alternative ways to specify
 *                       the active tab will overrule this argument. First a li element
 *                       (representing one single tab) belonging to the selected tab class, e.g.
 *                       set the selected tab class (default: "tabs-selected", see option
 *                       selectedClass) for one of the unordered li elements in the HTML source.
 *                       In addition if a fragment identifier/hash in the URL of the page refers
 *                       to the id of a tab container of a tab interface the corresponding tab will
 *                       be activated and both the initial argument as well as an eventually
 *                       declared class attribute will be overruled. Defaults to 1 if omitted.
 * @param Object settings An object literal containing key/value pairs to provide optional settings.
 * @option Array<Number> disabled An array containing the position of the tabs (no zero-based index)
 *                                that should be disabled on initialization. Default value: null.
 *                                A tab can also be disabled by simply adding the disabling class
 *                                (default: "tabs-disabled", see option disabledClass) to the li
 *                                element representing that particular tab.
 * @option Boolean bookmarkable Boolean flag indicating if support for bookmarking and history (via
 *                              changing hash in the URL of the browser) is enabled. Default value:
 *                              false, unless the History/Remote plugin is included. In that case the
 *                              default value becomes true. @see $.ajaxHistory.initialize
 * @option Boolean remote Boolean flag indicating that tab content has to be loaded remotely from
 *                        the url given in the href attribute of the tab menu anchor elements.
 * @option String spinner The content of this string is shown in a tab while remote content is loading.
 *                        Insert plain text as well as an img here. To turn off this notification
 *                        pass an empty string or null. Default: "Loading…".
 * @option String hashPrefix A String that is used for constructing the hash the link's href attribute
 *                           of a remote tab gets altered to, such as "#remote-1".
 *                           Default value: "remote-tab-".
 * @option Boolean fxFade Boolean flag indicating whether fade in/out animations are used for tab
 *                        switching. Can be combined with fxSlide. Will overrule fxShow/fxHide.
 *                        Default value: false.
 * @option Boolean fxSlide Boolean flag indicating whether slide down/up animations are used for tab
 *                         switching. Can be combined with fxFade. Will overrule fxShow/fxHide.
 *                         Default value: false.
 * @option String|Number fxSpeed A string representing one of the three predefined speeds ("slow",
 *                               "normal", or "fast") or the number of milliseconds (e.g. 1000) to
 *                               run an animation. Default value: "normal".
 * @option Object fxShow An object literal of the form jQuery's animate function expects for making
 *                       your own, custom animation to reveal a tab upon tab switch. Unlike fxFade
 *                       or fxSlide this animation is independent from an optional hide animation.
 *                       Default value: null. @see animate
 * @option Object fxHide An object literal of the form jQuery's animate function expects for making
 *                       your own, custom animation to hide a tab upon tab switch. Unlike fxFade
 *                       or fxSlide this animation is independent from an optional show animation.
 *                       Default value: null. @see animate
 * @option String|Number fxShowSpeed A string representing one of the three predefined speeds
 *                                   ("slow", "normal", or "fast") or the number of milliseconds
 *                                   (e.g. 1000) to run the animation specified in fxShow.
 *                                   Default value: fxSpeed.
 * @option String|Number fxHideSpeed A string representing one of the three predefined speeds
 *                                   ("slow", "normal", or "fast") or the number of milliseconds
 *                                   (e.g. 1000) to run the animation specified in fxHide.
 *                                   Default value: fxSpeed.
 * @option Boolean fxAutoHeight Boolean flag that if set to true causes all tab heights
 *                              to be constant (being the height of the tallest tab).
 *                              Default value: false.
 * @option Function onClick A function to be invoked upon tab switch, immediatly after a tab has
 *                          been clicked, e.g. before the other's tab content gets hidden. The
 *                          function gets passed three arguments: the first one is the clicked
 *                          tab (e.g. an anchor element), the second one is the DOM element
 *                          containing the content of the clicked tab (e.g. the div), the third
 *                          argument is the one of the tab that gets hidden. If this callback
 *                          returns false, the tab switch is canceled (use to disallow tab
 *                          switching for the reason of a failed form validation for example).
 *                          Default value: null.
 * @option Function onHide A function to be invoked upon tab switch, immediatly after one tab's
 *                         content got hidden (with or without an animation) and right before the
 *                         next tab is revealed. The function gets passed three arguments: the
 *                         first one is the clicked tab (e.g. an anchor element), the second one
 *                         is the DOM element containing the content of the clicked tab, (e.g. the
 *                         div), the third argument is the one of the tab that gets hidden.
 *                         Default value: null.
 * @option Function onShow A function to be invoked upon tab switch. This function is invoked
 *                         after the new tab has been revealed, e.g. after the switch is completed.
 *                         The function gets passed three arguments: the first one is the clicked
 *                         tab (e.g. an anchor element), the second one is the DOM element
 *                         containing the content of the clicked tab, (e.g. the div), the third
 *                         argument is the one of the tab that gets hidden. Default value: null.
 * @option String navClass A CSS class that is used to identify the tabs unordered list by class if
 *                         the required HTML structure differs from the default one.
 *                         Default value: "tabs-nav".
 * @option String selectedClass The CSS class attached to the li element representing the
 *                              currently selected (active) tab. Default value: "tabs-selected".
 * @option String disabledClass The CSS class attached to the li element representing a disabled
 *                              tab. Default value: "tabs-disabled".
 * @option String containerClass A CSS class that is used to identify tab containers by class if
 *                               the required HTML structure differs from the default one.
 *                               Default value: "tabs-container".
 * @option String hideClass The CSS class used for hiding inactive tabs. A class is used instead
 *                          of "display: none" in the style attribute to maintain control over
 *                          visibility in other media types than screen, most notably print.
 *                          Default value: "tabs-hide".
 * @option String loadingClass The CSS class used for indicating that an Ajax tab is currently
 *                             loading, for example by showing a spinner.
 *                             Default value: "tabs-loading".
 * @option String tabStruct @deprecated A CSS selector or basic XPath expression reflecting a
 *                          nested HTML structure that is different from the default single div
 *                          structure (one div with an id inside the overall container holds one
 *                          tab's content). If for instance an additional div is required to wrap
 *                          up the several tab containers such a structure is expressed by "div>div".
 *                          Default value: "div".
 * @type jQuery
 *
 * @name tabs
 * @cat Plugins/Tabs
 * @author Klaus Hartl/klaus.hartl@stilbuero.de
 */
$.fn.tabs = function(initial, settings) {

    // settings
    if (typeof initial == 'object') settings = initial; // no initial tab given but a settings object
    settings = $.extend({
        initial: (initial && typeof initial == 'number' && initial > 0) ? --initial : 0,
        disabled: null,
        bookmarkable: $.ajaxHistory ? true : false,
        remote: false,
        spinner: 'Loading…',
        hashPrefix: 'remote-tab-',
        fxFade: null,
        fxSlide: null,
        fxShow: null,
        fxHide: null,
        fxSpeed: 'normal',
        fxShowSpeed: null,
        fxHideSpeed: null,
        fxAutoHeight: false,
        onClick: null,
        onHide: null,
        onShow: null,
        navClass: 'tabs-nav',
        selectedClass: 'tabs-selected',
        disabledClass: 'tabs-disabled',
        containerClass: 'tabs-container',
        hideClass: 'tabs-hide',
        loadingClass: 'tabs-loading',
        tabStruct: 'div'
    }, settings || {});

    $.browser.msie6 = $.browser.msie && ($.browser.version && $.browser.version < 7 || /MSIE 6.0/.test(navigator.userAgent)); // do not check for 6.0 alone, userAgent in Windows Vista has "Windows NT 6.0"

    // helper to prevent scroll to fragment
    function unFocus() {
        scrollTo(0, 0);
    }

    // initialize tabs
    return this.each(function() {

        // remember wrapper for later
        var container = this;

        // setup nav
        var nav = $('ul.' + settings.navClass, container);
        nav = nav.size() && nav || $('>ul:eq(0)', container); // fallback to default structure
        var tabs = $('a', nav);

        // prepare remote tabs
        if (settings.remote) {
            tabs.each(function() {
                var id = settings.hashPrefix + (++$.tabs.remoteCount), hash = '#' + id, url = this.href;
                this.href = hash;
                $('

').appendTo(container);

                $(this).bind('loadRemoteTab', function(e, callback) {
                    var $$ = $(this).addClass(settings.loadingClass), span = $('span', this)[0], tabTitle = span.innerHTML;
                    if (settings.spinner) {
                        // TODO if spinner is image
                        span.innerHTML = '' + settings.spinner + ''; // WARNING: html(...) crashes Safari with jQuery 1.1.2
                    }
                    setTimeout(function() { // Timeout is again required in IE, "wait" for id being restored
                        $(hash).load(url, function() {
                            if (settings.spinner) {
                                span.innerHTML = tabTitle; // WARNING: html(...) crashes Safari with jQuery 1.1.2
                            }
                            $$.removeClass(settings.loadingClass);
                            callback && callback();
                        });
                    }, 0);
                });

            });
        }

        // set up containers
        var containers = $('div.' + settings.containerClass, container);
        containers = containers.size() && containers || $('>' + settings.tabStruct, container); // fallback to default structure

        // attach classes for styling if not present
        nav.is('.' + settings.navClass) || nav.addClass(settings.navClass);
        containers.each(function() {
            var $$ = $(this);
            $$.is('.' + settings.containerClass) || $$.addClass(settings.containerClass);
        });

        // try to retrieve active tab from class in HTML
        var hasSelectedClass = $('li', nav).index( $('li.' + settings.selectedClass, nav)[0] );
        if (hasSelectedClass >= 0) {
           settings.initial = hasSelectedClass;
        }

        // try to retrieve active tab from hash in url, will override class in HTML
        if (location.hash) {
            tabs.each(function(i) {
                if (this.hash == location.hash) {
                    settings.initial = i;
                    // prevent page scroll to fragment
                    if (($.browser.msie || $.browser.opera) && !settings.remote) {
                        var toShow = $(location.hash);
                        var toShowId = toShow.attr('id');
                        toShow.attr('id', '');
                        setTimeout(function() {
                            toShow.attr('id', toShowId); // restore id
                        }, 500);
                    }
                    unFocus();
                    return false; // break
                }
            });
        }
        if ($.browser.msie) {
            unFocus(); // fix IE focussing bottom of the page for some unknown reason
        }

        // highlight tab accordingly
        containers.filter(':eq(' + settings.initial + ')').show().end().not(':eq(' + settings.initial + ')').addClass(settings.hideClass);
        $('li', nav).removeClass(settings.selectedClass).eq(settings.initial).addClass(settings.selectedClass); // we need to remove classes eventually if hash takes precedence over class
        // trigger load of initial tab
        tabs.eq(settings.initial).trigger('loadRemoteTab').end();

        // setup auto height
        if (settings.fxAutoHeight) {
            // helper
            var _setAutoHeight = function(reset) {
                // get tab heights in top to bottom ordered array
                var heights = $.map(containers.get(), function(el) {
                    var h, jq = $(el);
                    if (reset) {
                        if ($.browser.msie6) {
                            el.style.removeExpression('behaviour');
                            el.style.height = '';
                            el.minHeight = null;
                        }
                        h = jq.css({'min-height': ''}).height(); // use jQuery's height() to get hidden element values
                    } else {
                        h = jq.height(); // use jQuery's height() to get hidden element values
                    }
                    return h;
                }).sort(function(a, b) {
                    return b - a;
                });
                if ($.browser.msie6) {
                    containers.each(function() {
                        this.minHeight = heights[0] + 'px';
                        this.style.setExpression('behaviour', 'this.style.height = this.minHeight ? this.minHeight : "1px"'); // using an expression to not make print styles useless
                    });
                } else {
                    containers.css({'min-height': heights[0] + 'px'});
                }
            };
            // call once for initialization
            _setAutoHeight();
            // trigger auto height adjustment if needed
            var cachedWidth = container.offsetWidth;
            var cachedHeight = container.offsetHeight;
            var watchFontSize = $('#tabs-watch-font-size').get(0) || $('M').css({display: 'block', position: 'absolute', visibility: 'hidden'}).appendTo(document.body).get(0);
            var cachedFontSize = watchFontSize.offsetHeight;
            setInterval(function() {
                var currentWidth = container.offsetWidth;
                var currentHeight = container.offsetHeight;
                var currentFontSize = watchFontSize.offsetHeight;
                if (currentHeight > cachedHeight || currentWidth != cachedWidth || currentFontSize != cachedFontSize) {
                    _setAutoHeight((currentWidth > cachedWidth || currentFontSize < cachedFontSize)); // if heights gets smaller reset min-height
                    cachedWidth = currentWidth;
                    cachedHeight = currentHeight;
                    cachedFontSize = currentFontSize;
                }
            }, 50);
        }

        // setup animations
        var showAnim = {}, hideAnim = {}, showSpeed = settings.fxShowSpeed || settings.fxSpeed, hideSpeed = settings.fxHideSpeed || settings.fxSpeed;
        if (settings.fxSlide || settings.fxFade) {
            if (settings.fxSlide) {
                showAnim['height'] = 'show';
                hideAnim['height'] = 'hide';
            }
            if (settings.fxFade) {
                showAnim['opacity'] = 'show';
                hideAnim['opacity'] = 'hide';
            }
        } else {
            if (settings.fxShow) {
                showAnim = settings.fxShow;
            } else { // use some kind of animation to prevent browser scrolling to the tab
                showAnim['min-width'] = 0; // avoid opacity, causes flicker in Firefox
                showSpeed = 1; // as little as 1 is sufficient
            }
            if (settings.fxHide) {
                hideAnim = settings.fxHide;
            } else { // use some kind of animation to prevent browser scrolling to the tab
                hideAnim['min-width'] = 0; // avoid opacity, causes flicker in Firefox
                hideSpeed = 1; // as little as 1 is sufficient
            }
        }

        // callbacks
        var onClick = settings.onClick, onHide = settings.onHide, onShow = settings.onShow;

        // attach activateTab event, required for activating a tab programmatically
        tabs.bind('triggerTab', function() {

            // if the tab is already selected or disabled or animation is still running stop here
            var li = $(this).parents('li:eq(0)');
            if (container.locked || li.is('.' + settings.selectedClass) || li.is('.' + settings.disabledClass)) {
                return false;
            }

            var hash = this.hash;

            if ($.browser.msie) {

                $(this).trigger('click');
                if (settings.bookmarkable) {
                    $.ajaxHistory.update(hash);
                    location.hash = hash.replace('#', '');
                }

            } else if ($.browser.safari) {

                // Simply setting location.hash puts Safari into the eternal load state... ugh! Submit a form instead.
                var tempForm = $('<form action="' + hash + '">
<input type="submit" value="h" />
</form>').get(0); // no need to append it to the body
                tempForm.submit(); // does not trigger the form's submit event...
                $(this).trigger('click'); // ...thus do stuff here
                if (settings.bookmarkable) {
                    $.ajaxHistory.update(hash);
                }

            } else {

                if (settings.bookmarkable) {
                    location.hash = hash.replace('#', '');
                } else {
                    $(this).trigger('click');
                }

            }

        });

        // attach disable event, required for disabling a tab
        tabs.bind('disableTab', function() {
            var li = $(this).parents('li:eq(0)');
            if ($.browser.safari) { /* fix opacity of tab after disabling in Safari... */
                li.animate({ opacity: 0 }, 1, function() {
                   li.css({opacity: ''});
                });
            }
            li.addClass(settings.disabledClass);

        });

        // disabled from settings
        if (settings.disabled && settings.disabled.length) {
            for (var i = 0, k = settings.disabled.length; i < k; i++) {
                tabs.eq(--settings.disabled[i]).trigger('disableTab').end();
            }
        };

        // attach enable event, required for reenabling a tab
        tabs.bind('enableTab', function() {
            var li = $(this).parents('li:eq(0)');
            li.removeClass(settings.disabledClass);
            if ($.browser.safari) { /* fix disappearing tab after enabling in Safari... */
                li.animate({ opacity: 1 }, 1, function() {
                    li.css({opacity: ''});
                });
            }
        });

        // attach click event
        tabs.bind('click', function(e) {

            var trueClick = e.clientX; // add to history only if true click occured, not a triggered click
            var clicked = this, li = $(this).parents('li:eq(0)'), toShow = $(this.hash), toHide = containers.filter(':visible');

            // if animation is still running, tab is selected or disabled or onClick callback returns false stop here
            // check if onClick returns false last so that it is not executed for a disabled tab
            if (container['locked'] || li.is('.' + settings.selectedClass) || li.is('.' + settings.disabledClass) || typeof onClick == 'function' && onClick(this, toShow[0], toHide[0]) === false) {
                this.blur();
                return false;
            }

            container['locked'] = true;

            // show new tab
            if (toShow.size()) {

                // prevent scrollbar scrolling to 0 and than back in IE7, happens only if bookmarking/history is enabled
                if ($.browser.msie && settings.bookmarkable) {
                    var toShowId = this.hash.replace('#', '');
                    toShow.attr('id', '');
                    setTimeout(function() {
                        toShow.attr('id', toShowId); // restore id
                    }, 0);
                }

                var resetCSS = { display: '', overflow: '', height: '' };
                if (!$.browser.msie) { // not in IE to prevent ClearType font issue
                    resetCSS['opacity'] = '';
                }

                // switch tab, animation prevents browser scrolling to the fragment
                function switchTab() {
                    if (settings.bookmarkable && trueClick) { // add to history only if true click occured, not a triggered click
                        $.ajaxHistory.update(clicked.hash);
                    }
                    toHide.animate(hideAnim, hideSpeed, function() { //
                        $(clicked).parents('li:eq(0)').addClass(settings.selectedClass).siblings().removeClass(settings.selectedClass);
                        toHide.addClass(settings.hideClass).css(resetCSS); // maintain flexible height and accessibility in print etc.
                        if (typeof onHide == 'function') {
                            onHide(clicked, toShow[0], toHide[0]);
                        }
                        if (!(settings.fxSlide || settings.fxFade || settings.fxShow)) {
                            toShow.css('display', 'block'); // prevent occasionally occuring flicker in Firefox cause by gap between showing and hiding the tab containers
                        }
                        toShow.animate(showAnim, showSpeed, function() {
                            toShow.removeClass(settings.hideClass).css(resetCSS); // maintain flexible height and accessibility in print etc.
                            if ($.browser.msie) {
                                toHide[0].style.filter = '';
                                toShow[0].style.filter = '';
                            }
                            if (typeof onShow == 'function') {
                                onShow(clicked, toShow[0], toHide[0]);
                            }
                            container['locked'] = null;
                        });
                    });
                }

                if (!settings.remote) {
                    switchTab();
                } else {
                    $(clicked).trigger('loadRemoteTab', [switchTab]);
                }

            } else {
                alert('There is no such container.');
            }

            // Set scrollbar to saved position - need to use timeout with 0 to prevent browser scroll to target of hash
            var scrollX = window.pageXOffset || document.documentElement && document.documentElement.scrollLeft || document.body.scrollLeft || 0;
            var scrollY = window.pageYOffset || document.documentElement && document.documentElement.scrollTop || document.body.scrollTop || 0;
            setTimeout(function() {
                window.scrollTo(scrollX, scrollY);
            }, 0);

            this.blur(); // prevent IE from keeping other link focussed when using the back button

            return settings.bookmarkable && !!trueClick; // convert undefined to Boolean for IE

        });

        // enable history support if bookmarking and history is turned on
        if (settings.bookmarkable) {
            $.ajaxHistory.initialize(function() {
                tabs.eq(settings.initial).trigger('click').end();
            });
        }

    });

};

/**
 * Activate a tab programmatically with the given position (no zero-based index)
 * or its id, e.g. the URL's fragment identifier/hash representing a tab, as if the tab
 * itself were clicked.
 *
 * @example $('#container').triggerTab(2);
 * @desc Activate the second tab of the tab interface contained in
.
 * @example $('#container').triggerTab(1);
 * @desc Activate the first tab of the tab interface contained in
.
 * @example $('#container').triggerTab();
 * @desc Activate the first tab of the tab interface contained in
.
 * @example $('#container').triggerTab('fragment-2');
 * @desc Activate a tab via its URL fragment identifier representation.
 *
 * @param String|Number tab Either a string that matches the id of the tab (the URL's
 *                          fragment identifier/hash representing a tab) or an integer
 *                          specifying the position of the tab (no zero-based index) to
 *                          be activated. If this parameter is omitted, the first tab
 *                          will be activated.
 * @type jQuery
 *
 * @name triggerTab
 * @cat Plugins/Tabs
 * @author Klaus Hartl/klaus.hartl@stilbuero.de
 */

/**
 * Disable a tab, so that clicking it has no effect.
 *
 * @example $('#container').disableTab(2);
 * @desc Disable the second tab of the tab interface contained in
.
 *
 * @param String|Number tab Either a string that matches the id of the tab (the URL's
 *                          fragment identifier/hash representing a tab) or an integer
 *                          specifying the position of the tab (no zero-based index) to
 *                          be disabled. If this parameter is omitted, the first tab
 *                          will be disabled.
 * @type jQuery
 *
 * @name disableTab
 * @cat Plugins/Tabs
 * @author Klaus Hartl/klaus.hartl@stilbuero.de
 */

/**
 * Enable a tab that has been disabled.
 *
 * @example $('#container').enableTab(2);
 * @desc Enable the second tab of the tab interface contained in
.
 *
 * @param String|Number tab Either a string that matches the id of the tab (the URL's
 *                          fragment identifier/hash representing a tab) or an integer
 *                          specifying the position of the tab (no zero-based index) to
 *                          be enabled. If this parameter is omitted, the first tab
 *                          will be enabled.
 * @type jQuery
 *
 * @name enableTab
 * @cat Plugins/Tabs
 * @author Klaus Hartl/klaus.hartl@stilbuero.de
 */

var tabEvents = ['triggerTab', 'disableTab', 'enableTab'];
for (var i = 0; i < tabEvents.length; i++) {
    $.fn[tabEvents[i]] = (function(tabEvent) {
        return function(tab) {
            return this.each(function() {
                var nav = $('ul.tabs-nav' , this);
                nav = nav.size() && nav || $('>ul:eq(0)', this); // fallback to default structure
                var a;
                if (!tab || typeof tab == 'number') {
                    a = $('li a', nav).eq((tab && tab > 0 && tab - 1 || 0)); // fall back to 0
                } else if (typeof tab == 'string') {
                    a = $('li a[@href$="#' + tab + '"]', nav);
                }
                a.trigger(tabEvent);
            });
        };
    })(tabEvents[i]);
}

/**
 * Get the position of the currently selected tab (no zero-based index).
 *
 * @example $('#container').activeTab();
 * @desc Get the position of the currently selected tab of an interface
 * contained in
.
 *
 * @type Number
 *
 * @name activeTab
 * @cat Plugins/Tabs
 * @author Klaus Hartl/klaus.hartl@stilbuero.de
 */

$.fn.activeTab = function() {
    var selectedTabs = [];
    this.each(function() {
        var nav = $('ul.tabs-nav' , this);
        nav = nav.size() && nav || $('>ul:eq(0)', this); //fallback to default structure
        var lis = $('li', nav);
        selectedTabs.push(lis.index( lis.filter('.tabs-selected')[0] ) + 1);
    });
    return selectedTabs[0];
};

})(jQuery);


text:
<?php namespace Fungku\NetSuite\Classes;

class PartnerCategorySearch extends SearchRecord {
	public $basic;
	public $userJoin;
	static $paramtypesmap = array(
		"basic" => "PartnerCategorySearchBasic",
		"userJoin" => "EmployeeSearchBasic",
	);
}


text:
<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Welcome extends CI_Controller
{

    /**
     * Index Page for this controller.
     *
     * Maps to the following URL
     *        http://example.com/index.php/welcome
     *    - or -
     *        http://example.com/index.php/welcome/index
     *    - or -
     * Since this controller is set as the default controller in
     * config/routes.php, it's displayed at http://example.com/
     *
     * So any other public methods not prefixed with an underscore will
     * map to /index.php/welcome/<method_name>
     * @see https://codeigniter.com/user_guide/general/urls.html
     */
    public function index()
    {
        $this->load->view('welcome_message');
    }

    public function comments($sandals, $id){
        echo 'test';
        echo $sandals;
        echo $id;
    }
}


text:
package ucar.nc2.ogc.gml;

import net.opengis.gml.x32.DirectPositionType;
import ucar.nc2.ft.StationTimeSeriesFeature;
import java.util.Arrays;

/**
 * Created by cwardgar on 2014/02/28.
 */
public abstract class NcDirectPositionType {
  // wml2:Collection/wml2:observationMember/om:OM_Observation/om:featureOfInterest/wml2:MonitoringPoint/sams:shape/
  // gml:Point/gml:pos
  public static DirectPositionType initPos(DirectPositionType pos, StationTimeSeriesFeature stationFeat) {
    // TEXT
    pos.setListValue(Arrays.asList(stationFeat.getLatitude(), stationFeat.getLongitude(), stationFeat.getAltitude()));

    return pos;
  }

  private NcDirectPositionType() {}
}


text:
package net.lingala.zip4j.model;

public class EndCentralDirRecord {

	private long signature;

	private int noOfThisDisk;

	private int noOfThisDiskStartOfCentralDir;

	private int totNoOfEntriesInCentralDirOnThisDisk;

	private int totNoOfEntriesInCentralDir;

	private int sizeOfCentralDir;

	private long offsetOfStartOfCentralDir;

	private int commentLength;

	private String comment;

	private byte[] commentBytes;

	public long getSignature() {
		return signature;
	}

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

	public int getNoOfThisDisk() {
		return noOfThisDisk;
	}

	public void setNoOfThisDisk(int noOfThisDisk) {
		this.noOfThisDisk = noOfThisDisk;
	}

	public int getNoOfThisDiskStartOfCentralDir() {
		return noOfThisDiskStartOfCentralDir;
	}

	public void setNoOfThisDiskStartOfCentralDir(int noOfThisDiskStartOfCentralDir) {
		this.noOfThisDiskStartOfCentralDir = noOfThisDiskStartOfCentralDir;
	}

	public int getTotNoOfEntriesInCentralDirOnThisDisk() {
		return totNoOfEntriesInCentralDirOnThisDisk;
	}

	public void setTotNoOfEntriesInCentralDirOnThisDisk(
			int totNoOfEntriesInCentralDirOnThisDisk) {
		this.totNoOfEntriesInCentralDirOnThisDisk = totNoOfEntriesInCentralDirOnThisDisk;
	}

	public int getTotNoOfEntriesInCentralDir() {
		return totNoOfEntriesInCentralDir;
	}

	public void setTotNoOfEntriesInCentralDir(int totNoOfEntrisInCentralDir) {
		this.totNoOfEntriesInCentralDir = totNoOfEntrisInCentralDir;
	}

	public int getSizeOfCentralDir() {
		return sizeOfCentralDir;
	}

	public void setSizeOfCentralDir(int sizeOfCentralDir) {
		this.sizeOfCentralDir = sizeOfCentralDir;
	}

	public long getOffsetOfStartOfCentralDir() {
		return offsetOfStartOfCentralDir;
	}

	public void setOffsetOfStartOfCentralDir(long offSetOfStartOfCentralDir) {
		this.offsetOfStartOfCentralDir = offSetOfStartOfCentralDir;
	}

	public int getCommentLength() {
		return commentLength;
	}

	public void setCommentLength(int commentLength) {
		this.commentLength = commentLength;
	}

	public String getComment() {
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	public byte[] getCommentBytes() {
		return commentBytes;
	}

	public void setCommentBytes(byte[] commentBytes) {
		this.commentBytes = commentBytes;
	}

}


text:
START_ATF_NAMESPACE
    #pragma pack(push, 8)
    struct CQuestMgr
    {
        struct CPlayer *m_pMaster;
        struct _QUEST_DB_BASE *m_pQuestData;
        _happen_event_cont m_LastHappenEvent;
        struct _happen_event_cont *m_pTempHappenEvent;
        unsigned int m_dwOldTimeoutChecktime;
    public:
        CQuestMgr();
        void ctor_CQuestMgr();
        static bool CalcStartNPCQuestCnt(unsigned int* pdwCnt);
        bool CanGiveupQuest(char byQuestDBSlot);
        bool CheckFailCondition(char byQuestDBSlot, int nFailCond, char* pszCode);
        void CheckFailLoop(int nFailCond, char* pszCode);
        struct _quest_fail_result* CheckLimLv(int nNewLv);
        void CheckNPCQuestList(char* pszEventCode, char byRaceCode, struct _NPCQuestIndexTempData* pQuestIndexData);
        struct _happen_event_cont* CheckNPCQuestStartable(char* pszEventCode, char byRaceCode, unsigned int dwQuestIndex, unsigned int dwHappenIndex);
        struct _happen_event_cont* CheckQuestHappenEvent(QUEST_HAPPEN HappenType, char* pszEventCode, char byRaceCode);
        struct _quest_check_result* CheckReqAct(int nActCode, char* pszReqCode, uint16_t wActCount, bool bPartyState);
        static bool CheckRewardMasteryData(int iInx, int iNth, struct _quest_reward_mastery* pData);
        void DeleteQuestData(char bySlot);
        bool DeleteQuestItem(char* pszItemCode, uint16_t wCount);
        int GetCountQuestType(int nType);
        struct _happen_event_cont* GetLastHappenEvent();
        struct _Quest_fld* GetQuestFromEvent(char bySelect);
        bool GiveItem(char byQuestDBSlot, struct _action_node* pActionNode, bool bCheckOnly);
        void InitMgr(struct CPlayer* pMaster, struct _QUEST_DB_BASE* pQuestData);
        char InsertNpcQuestHistory(char* pszQuestCode, char byLevel, long double dRepeatTime);
        bool IsCompleteNpcQuest(char* pszCode, int bQuestRepeat);
        bool IsPossibleRepeatNpcQuest(char* pszCode, int nLinkQuestGroupID);
        bool IsProcLinkNpcQuest(char* pszCode, int nLinkQuestGroupID);
        bool IsProcNpcQuest(char* pszCode);
        bool IsRecvedQuestByNPC(char* pszNPCCode);
        bool IsRecvedQuestByNPC(int nEventIndex);
        static bool LoadQuestData();
        void Loop();
        bool ReturnItem(char* pszItemCode, int nEndReturnItemCnt, char byQuestDBSlot, bool bCheckOnly);
        void SendMsgToMaster_NoCompleteQuestFromNPC(char byQuestDBSlot);
        void SendMsgToMaster_NoHaveGiveItem(char byQuestDBSlot);
        void SendMsgToMaster_NoHaveReturnItem(char byQuestDBSlot);
        void SendMsgToMaster_ReturnItemAfterQuest(uint16_t wItemSerial, char byNum, char byQuestDBSlot);
        bool _CheckCondition(struct _happen_event_condition_node* pCond);
        bool __CheckCond_Class(char* pszClassCode);
        bool __CheckCond_Dalant(char byCompare, int nDalant);
        bool __CheckCond_Dummy(int bInclude, char* pszDummyCode);
        bool __CheckCond_Equip(char* pszItemCode);
        bool __CheckCond_Gold(char byCompare, int nGold);
        bool __CheckCond_Grade(char byCompare, int nGrade);
        bool __CheckCond_Guild(int belong);
        bool __CheckCond_Have(int nAmonut, char* pszItemCode);
        bool __CheckCond_LV(char byCompare, int nLv);
        bool __CheckCond_Mastery(char byCompare, char* pszMasteryPack);
        bool __CheckCond_Nation(int belong);
        bool __CheckCond_Party(int belong);
        bool __CheckCond_Race(char* pszRaceSexFlag);
        ~CQuestMgr();
        void dtor_CQuestMgr();
    };
    #pragma pack(pop)
    static_assert(ATF::checkSize<CQuestMgr, 56>(), "CQuestMgr");
END_ATF_NAMESPACE


text:
package de.flexiprovider.core.dsa;

import de.flexiprovider.api.Registry;
import de.flexiprovider.api.SecureRandom;
import de.flexiprovider.api.exceptions.InvalidAlgorithmParameterException;
import de.flexiprovider.api.parameters.AlgorithmParameterGenerator;
import de.flexiprovider.api.parameters.AlgorithmParameterSpec;
import de.flexiprovider.api.parameters.AlgorithmParameters;
import de.flexiprovider.common.math.FlexiBigInt;

/**
 * This class implements the DSAAlgorithmParameterGenerator. The parameter
 * generation follows the proposal of the FIPS 186-2 standard,
 * except for the generation of the random numbers.
 *

 * The default bit length of the prime <tt>p</tt> is 1024 bits.
 *
 * @author Thomas Wahrenbruch
 */
public class DSAParameterGenerator extends AlgorithmParameterGenerator {

    /**
     * The OID of DSA.
     */
    public static final String OID = DSAKeyFactory.OID;

    /**
     * An alternative OID of DSA.
     */
    public static final String OID2 = DSAKeyFactory.OID2;

    // certainties for prime number generation
    private static final int LO_CERTAINTY = 20;
    private static final int HI_CERTAINTY = 80;

    private static final FlexiBigInt TWO = FlexiBigInt.valueOf(2);

    // the source of randomness
    private SecureRandom random;

    // the bit length of the prime p
    private int L;

    // the bit length of the subprime q
    private int N;

    // flag indicating whether the parameter generator has been initialized
    private boolean initialized;

    /**
     * @return an instance of the {@link AlgorithmParameters} class
     *         corresponding to the generated parameters
     */
    protected AlgorithmParameters getAlgorithmParameters() {
	return new DSAParameters();
    }

    /**
     * Initialize the parameter generator with parameters and a source of
     * randomness. If the parameters are <tt>null</tt>, the
     * {@link DSAParamGenParameterSpec#DSAParamGenParameterSpec() default parameters}
     * are used.
     *
     * @param genParams
     *                the parameters
     * @param random
     *                the source of randomness
     * @throws InvalidAlgorithmParameterException
     *                 if the parameters are not an instance of
     *                 {@link DSAParamGenParameterSpec}.
     */
    public void init(AlgorithmParameterSpec genParams, SecureRandom random)
	    throws InvalidAlgorithmParameterException {

	DSAParamGenParameterSpec dsaGenParams;
	if (genParams == null) {
	    dsaGenParams = new DSAParamGenParameterSpec();
	} else if (genParams instanceof DSAParamGenParameterSpec) {
	    dsaGenParams = (DSAParamGenParameterSpec) genParams;
	} else {
	    throw new InvalidAlgorithmParameterException("unsupported type");
	}

	L = dsaGenParams.getL();
	N = dsaGenParams.getN();
	this.random = random != null ? random : Registry.getSecureRandom();

	initialized = true;
    }

    /**
     * Initialize the parameter generator with the size of the prime <tt>p</tt>
     * and a source of randomness.
     *

     * If the size is not a multiple of 64, the next smaller multiple of 64 is
     * used as size. If the size is > 1024 or < 512, the
     * {@link DSAParamGenParameterSpec#DEFAULT_L default size} is used.
     *
     * @param size
     *                the bit length of the prime p
     * @param random
     *                the source of randomness
     */
    public void init(int size, SecureRandom random) {
	DSAParamGenParameterSpec genParams = new DSAParamGenParameterSpec(size);
	try {
	    init(genParams, random);
	} catch (InvalidAlgorithmParameterException e) {
	    // the parameters are correct and must be accepted
	    throw new RuntimeException("internal error");
	}
    }

    private void initDefault() {
	DSAParamGenParameterSpec defaultGenParams = new DSAParamGenParameterSpec();
	try {
	    init(defaultGenParams, Registry.getSecureRandom());
	} catch (InvalidAlgorithmParameterException e) {
	    // the parameters are correct and must be accepted
	    throw new RuntimeException("internal error");
	}
    }

    /**
     * Generate DSA algorithm parameters.
     *
     * @return the generated DSA parameters
     *
     * @see DSAParameterSpec
     */
    public AlgorithmParameterSpec generateParameters() {
	if (!initialized) {
	    initDefault();
	}

	// the maximum number of tries to find a prime p given the subprime q
	int maxTries;
	FlexiBigInt q, x, c, p, qMultTwo;

	// TODO: speed up
	out: while (true) {
	    maxTries = 4096;
	    q = new FlexiBigInt(N, HI_CERTAINTY, random);

	    do {
		x = generateX();
		qMultTwo = q.multiply(TWO);
		c = x.mod(qMultTwo);
		p = x.subtract(c).add(FlexiBigInt.ONE);
		// if p is long enough
		if (p.bitLength() >= L) {
		    // do fast primality test
		    if (p.isProbablePrime(LO_CERTAINTY)) {
			// do slow primality tests
			if (p.isProbablePrime(HI_CERTAINTY)) {
			    // p is prime - we're done
			    break out;
			}
		    }
		}
	    } while (--maxTries > 0);
	}

	FlexiBigInt pMinusOne = p.subtract(FlexiBigInt.ONE);
	FlexiBigInt pMinusOneModQ = pMinusOne.divide(q);

	// generate random h with 1 < h < p-1
	FlexiBigInt h, g;
	do {
	    h = new FlexiBigInt(L - 1, random);
	    g = h.modPow(pMinusOneModQ, p);
	} while ((h.compareTo(FlexiBigInt.ONE) <= 0)
		|| (h.compareTo(pMinusOne) >= 0)
		|| (g.compareTo(FlexiBigInt.ONE) <= 0));

	return new DSAParameterSpec(p, q, g);
    }

    /**
     * Generate a random number <tt>r</tt> with
     * <tt>size-1 <= |r| < size</tt>.
     *
     * @return the generated random number
     */
    private FlexiBigInt generateX() {
	byte[] xBytes = new byte[L >> 3];
	random.nextBytes(xBytes);
	xBytes[0] = (byte) (xBytes[0] | 0x80);

	return new FlexiBigInt(1, xBytes);
    }

}


text:
package org.directwebremoting;

/**
 * @author Joe Walker [joe at getahead dot ltd dot uk]
 */
public class TestMethods
{
    public static void main(String[] args) {
        String normalized = "http://www.test.com:8181;jsessionid=234234324?param=1";
        String normalized2 = "http://www.test.com:8181;JSESSIONID=234234324?param=1";
        String normalized3 = "http://www.test.com:8181?param=1;jsessionid=234234324";
        String session = "jsessionid";
        if(normalized.matches("(?i).*;" + session + "=.*"))
        {
            normalized = normalized.replaceFirst(";" + session + "=.*","");
        }
        System.out.println(normalized);
        if(normalized2.matches("(?i).*(?i);" + session + "=.*"))
        {
            normalized2 = normalized2.replaceFirst("(?i);" + session + "=.*","");
        }
        System.out.println(normalized2);
        if(normalized3.matches("(?i).*;" + session + "=.*"))
        {
            normalized3 = normalized3.replaceFirst("(?i);" + session + "=.*","");
        }
        System.out.println(normalized3);
    }
}


text:
package router

import (
	"fmt"
	"net/http"

	"github.com/justinas/alice"
)

// Chain returns an array of middleware.
func (s *Item) Chain(c ...alice.Constructor) []alice.Constructor {
	return c
}

// ChainHandler returns a handler of chained middleware.
func (s *Item) ChainHandler(h http.Handler, c ...alice.Constructor) http.Handler {
	return alice.New(c...).Then(h)
}

// record stores the method and path.
func (s *Item) record(method, path string) {
	s.listMutex.Lock()
	s.routeList = append(s.routeList, fmt.Sprintf("%v\t%v", method, path))
	s.listMutex.Unlock()
}

// RouteList returns a list of the HTTP methods and paths.
func (s *Item) RouteList() []string {
	s.listMutex.RLock()
	list := s.routeList
	s.listMutex.RUnlock()
	return list
}

// Delete is a shortcut for router.Handle("DELETE", path, handle).
func (s *Item) Delete(path string, fn http.HandlerFunc, c ...alice.Constructor) {
	s.record("DELETE", path)
	s.r.Delete(path, alice.New(c...).ThenFunc(fn).(http.HandlerFunc))
}

// Get is a shortcut for router.Handle("GET", path, handle).
func (s *Item) Get(path string, fn http.HandlerFunc, c ...alice.Constructor) {
	s.record("GET", path)
	s.r.Get(path, alice.New(c...).ThenFunc(fn).(http.HandlerFunc))
}

// Patch is a shortcut for router.Handle("PATCH", path, handle).
func (s *Item) Patch(path string, fn http.HandlerFunc, c ...alice.Constructor) {
	s.record("PATCH", path)
	s.r.Patch(path, alice.New(c...).ThenFunc(fn).(http.HandlerFunc))
}

// Post is a shortcut for router.Handle("POST", path, handle).
func (s *Item) Post(path string, fn http.HandlerFunc, c ...alice.Constructor) {
	s.record("POST", path)
	s.r.Post(path, alice.New(c...).ThenFunc(fn).(http.HandlerFunc))
}

// Put is a shortcut for router.Handle("PUT", path, handle).
func (s *Item) Put(path string, fn http.HandlerFunc, c ...alice.Constructor) {
	s.record("PUT", path)
	s.r.Put(path, alice.New(c...).ThenFunc(fn).(http.HandlerFunc))
}


text:
class UsersController < ApplicationController

  before_action :authenticate_user!

  def index
    @years = [2018, 2017, 2016, 2015, 2014, 2013, 2012, 2011, 2010, 2009, 2008, 2007, 2006, 2005, 2004, 2003, 2002, 2001, 2000, 1999, 1998, 1997, 1996, 1995, 1994, 1993, 1992]

    if params[:search]
        @users = User.search(params[:search].downcase)
        @users += User.search(params[:search].capitalize)
        @users.uniq!
    else
        @users = User.all
    end
  end

  def show
    @user = User.find(params[:id])
    @posts = Post.where(user_id: params[:id])
  end

  def edit
    @user = current_user
  end

  def update
    @user = User.find(params[:user_id])

    if @user.update_attributes(user_params)
      redirect_to user_profile_path(@user), notice: 'User updated.'
    else
      render :edit, alert: 'Unable to update user.'
    end
  end

  def import
    uploaded_file = params[:file]
    importer = UserImporter.new(uploaded_file.path.to_s)
    if importer.valid_headers?
      importer.import_by_row
    else
      header_mismatch = importer.compare_headers
      flash[:error] = "Headers in spreadsheet do not match the expected layout. We expect: #{header_mismatch[:expected]}, and received #{header_mismatch[:actual]}"
      redirect_back(fallback_location: users_import_path)
    end
  end

  def upload
  end

  private

  def user_params
    params.require(:user).permit(
    :admin,
    :city,
    :country,
    :email,
    :facebook_username,
    :first_name,
    :instagram_username,
    :last_name,
    :linkedin_username,
    :maiden_name,
    :nickname,
    :password,
    :phone,
    :pinterest_name,
    :privacy_settings,
    :profile_photo_content_type,
    :profile_photo_file_name,
    :profile_photo_file_size,
    :profile_photo,
    :salutation,
    :state,
    :street_address,
    :tumblr_name,
    :twitter_handle,
    :zip_code,
    )
  end

end


text:
/*
 * Swaggy Jenkins
 * Jenkins API clients generated from Swagger / Open API specification
 *
 * The version of the OpenAPI document: 1.5.1-pre.0
 * Contact: blah@cliffano.com
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

package org.openapitools.model;

import java.util.Objects;
import java.util.Arrays;
import org.openapitools.model.Link;
import com.fasterxml.jackson.annotation.*;

import javax.validation.constraints.*;
import javax.validation.Valid;
import io.micronaut.core.annotation.*;
import javax.annotation.Generated;

/**
 * PipelineRunImpllinks
 */
@JsonPropertyOrder({
  PipelineRunImpllinks.JSON_PROPERTY_NODES,
  PipelineRunImpllinks.JSON_PROPERTY_LOG,
  PipelineRunImpllinks.JSON_PROPERTY_SELF,
  PipelineRunImpllinks.JSON_PROPERTY_ACTIONS,
  PipelineRunImpllinks.JSON_PROPERTY_STEPS,
  PipelineRunImpllinks.JSON_PROPERTY_PROPERTY_CLASS
})
@JsonTypeName("PipelineRunImpllinks")
@Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen", date="2022-06-04T08:08:17.621469Z[Etc/UTC]")
@Introspected
public class PipelineRunImpllinks {
    public static final String JSON_PROPERTY_NODES = "nodes";
    private Link nodes;

    public static final String JSON_PROPERTY_LOG = "log";
    private Link log;

    public static final String JSON_PROPERTY_SELF = "self";
    private Link self;

    public static final String JSON_PROPERTY_ACTIONS = "actions";
    private Link actions;

    public static final String JSON_PROPERTY_STEPS = "steps";
    private Link steps;

    public static final String JSON_PROPERTY_PROPERTY_CLASS = "_class";
    private String propertyClass;

    public PipelineRunImpllinks() {
    }

    public PipelineRunImpllinks nodes(Link nodes) {
        this.nodes = nodes;
        return this;
    }

    /**
     * Get nodes
     * @return nodes
     **/
    @Valid
    @Nullable
    @JsonProperty(JSON_PROPERTY_NODES)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public Link getNodes() {
        return nodes;
    }

    @JsonProperty(JSON_PROPERTY_NODES)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setNodes(Link nodes) {
        this.nodes = nodes;
    }

    public PipelineRunImpllinks log(Link log) {
        this.log = log;
        return this;
    }

    /**
     * Get log
     * @return log
     **/
    @Valid
    @Nullable
    @JsonProperty(JSON_PROPERTY_LOG)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public Link getLog() {
        return log;
    }

    @JsonProperty(JSON_PROPERTY_LOG)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setLog(Link log) {
        this.log = log;
    }

    public PipelineRunImpllinks self(Link self) {
        this.self = self;
        return this;
    }

    /**
     * Get self
     * @return self
     **/
    @Valid
    @Nullable
    @JsonProperty(JSON_PROPERTY_SELF)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public Link getSelf() {
        return self;
    }

    @JsonProperty(JSON_PROPERTY_SELF)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setSelf(Link self) {
        this.self = self;
    }

    public PipelineRunImpllinks actions(Link actions) {
        this.actions = actions;
        return this;
    }

    /**
     * Get actions
     * @return actions
     **/
    @Valid
    @Nullable
    @JsonProperty(JSON_PROPERTY_ACTIONS)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public Link getActions() {
        return actions;
    }

    @JsonProperty(JSON_PROPERTY_ACTIONS)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setActions(Link actions) {
        this.actions = actions;
    }

    public PipelineRunImpllinks steps(Link steps) {
        this.steps = steps;
        return this;
    }

    /**
     * Get steps
     * @return steps
     **/
    @Valid
    @Nullable
    @JsonProperty(JSON_PROPERTY_STEPS)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public Link getSteps() {
        return steps;
    }

    @JsonProperty(JSON_PROPERTY_STEPS)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setSteps(Link steps) {
        this.steps = steps;
    }

    public PipelineRunImpllinks propertyClass(String propertyClass) {
        this.propertyClass = propertyClass;
        return this;
    }

    /**
     * Get propertyClass
     * @return propertyClass
     **/
    @Nullable
    @JsonProperty(JSON_PROPERTY_PROPERTY_CLASS)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getPropertyClass() {
        return propertyClass;
    }

    @JsonProperty(JSON_PROPERTY_PROPERTY_CLASS)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setPropertyClass(String propertyClass) {
        this.propertyClass = propertyClass;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        PipelineRunImpllinks pipelineRunImpllinks = (PipelineRunImpllinks) o;
        return Objects.equals(this.nodes, pipelineRunImpllinks.nodes) &&
            Objects.equals(this.log, pipelineRunImpllinks.log) &&
            Objects.equals(this.self, pipelineRunImpllinks.self) &&
            Objects.equals(this.actions, pipelineRunImpllinks.actions) &&
            Objects.equals(this.steps, pipelineRunImpllinks.steps) &&
            Objects.equals(this.propertyClass, pipelineRunImpllinks.propertyClass);
    }

    @Override
    public int hashCode() {
        return Objects.hash(nodes, log, self, actions, steps, propertyClass);
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("class PipelineRunImpllinks {\n");
        sb.append("    nodes: ").append(toIndentedString(nodes)).append("\n");
        sb.append("    log: ").append(toIndentedString(log)).append("\n");
        sb.append("    self: ").append(toIndentedString(self)).append("\n");
        sb.append("    actions: ").append(toIndentedString(actions)).append("\n");
        sb.append("    steps: ").append(toIndentedString(steps)).append("\n");
        sb.append("    propertyClass: ").append(toIndentedString(propertyClass)).append("\n");
        sb.append("}");
        return sb.toString();
    }

    /**
     * Convert the given object to string with each line indented by 4 spaces
     * (except the first line).
     */
    private String toIndentedString(Object o) {
        if (o == null) {
            return "null";
        }
        return o.toString().replace("\n", "\n    ");
    }

}


text:
<?xml version="1.0" encoding="utf-8"?>
<!--

-->
<resources>

    <!-- ### ACTION MODE ======================================================================= -->

    <dimen name="ui_action_button_close_mode_margin_start">8dp</dimen>
    <dimen name="ui_action_button_close_mode_margin_end">16dp</dimen>
</resources>


text:
<?xml version="1.0" encoding="UTF-8"?>
<actions>
        <action>
            <actionName>test</actionName>
            <packagings>
                <packaging>*</packaging>
            </packagings>
            <goals>
                <goal>test</goal>
            </goals>
            <properties>
                <maven.surefire.debug>-agentlib:jdwp=transport=dt_socket,server=n,address=${jpda.address}</maven.surefire.debug>
                <jpda.listen>true</jpda.listen>
            </properties>
        </action>
        <action>
            <actionName>build</actionName>
            <packagings>
                <packaging>*</packaging>
            </packagings>
            <goals>
                <goal>install</goal>
            </goals>
            <properties>
                <skipTests>true</skipTests>
            </properties>
        </action>
    </actions>


text:
using System;
using System.Collections.Generic;
using Moq;
using NUnit.Framework;
using Sonneville.Investing.Accounting.Cash.Transactions;
using Sonneville.Investing.Accounting.Securities;
using Sonneville.Investing.Accounting.Securities.Transactions;
using Sonneville.Investing.Accounting.ShareStrategies;

namespace Sonneville.Investing.Test.Accounting.ShareStrategies
{
    [TestFixture]
    public class CannotSellMoreSharesThanOwnedStrategyTests
    {
        private CannotSellMoreSharesThanOwnedStrategy _strategy;

        private Mock<IShareAccount> _shareAccountMock;
        private Mock<IHeldSharesCalculator> _shareAccountHeldSharesCalculatorMock;
        private IReadOnlyCollection<IShareTransaction> _shareTransactions;

        [SetUp]
        public void Setup()
        {
            _shareAccountMock = new Mock<IShareAccount>();
            _shareTransactions = _shareAccountMock.Object.ShareTransactions;

            _shareAccountHeldSharesCalculatorMock = new Mock<IHeldSharesCalculator>();

            _strategy = new CannotSellMoreSharesThanOwnedStrategy(_shareAccountHeldSharesCalculatorMock.Object);
        }

        [Test]
        public void ShouldNotThrowIfSufficientSharesAvailable()
        {
            const string ticker = "DE";
            _shareAccountHeldSharesCalculatorMock.Setup(
                calculator => calculator.CountHeldShares(ticker, _shareTransactions))
                .Returns(10);
            var sell = new Sell(DateTime.Today, ticker, 2.5m, 1, 1);

            _strategy.ProcessTransaction(_shareAccountMock.Object, sell);
            _shareAccountMock.Verify(
                account => account.Deposit(It.Is<IDeposit>(deposit => VerifyDepositForSell(deposit, sell))));
        }

        private static bool VerifyDepositForSell(IDeposit deposit, ISell sell)
        {
            Assert.AreEqual(sell.SettlementDate, deposit.SettlementDate);
            Assert.AreEqual(sell.Amount, deposit.Amount);
            return true;
        }

        [Test]
        public void ShouldThrowIfInsufficientSharesAvailable()
        {
            const string ticker = "DE";
            _shareAccountHeldSharesCalculatorMock.Setup(
                calculator => calculator.CountHeldShares(ticker, _shareTransactions)).Returns(0);
            var sell = new Sell(DateTime.Today, ticker, 2.5m, 1, 1);

            Assert.Throws<InvalidOperationException>(() => _strategy.ProcessTransaction(_shareAccountMock.Object, sell));
            _shareAccountMock.Verify(account => account.Deposit(It.IsAny<IDeposit>()), Times.Never());
        }
    }
}


text:
package actions

import java.util.TimeZone

import akka.actor._
import akka.actor.Actor.Receive
import akka.util.Timeout
import cmwell.ctrl.config.Jvms
import cmwell.domain.{FileContent, FileInfoton, VirtualInfoton}
import com.typesafe.scalalogging.LazyLogging
import k.grid.Grid
import akka.pattern.{ask, pipe}
import org.joda.time.{DateTime, DateTimeZone}
import org.joda.time.format.{DateTimeFormat, DateTimeFormatter, ISODateTimeFormat}
import play.api.mvc.{AnyContent, Request, Result}

import scala.concurrent.{Await, Future}
import scala.concurrent.duration._
import cmwell.util.concurrent.successes
import cmwell.util.string.{dateStringify, Base64}

import scala.concurrent.ExecutionContext.Implicits.global
import scala.language.postfixOps

/**
  * Created by michael on 7/14/15.
  */
case object GetRequest
case object GetRequestShort
class RequestMonitor(cmwellRequest: CmwellRequest) extends Actor with LazyLogging {
  implicit val timeout = Timeout(30.seconds)

  val deathWatch = 30.seconds

  context.system.scheduler.scheduleOnce(deathWatch, self, PoisonPill)

  override def receive: Receive = {
    case GetRequest =>
      logger.debug("Got GetRequest")
      sender ! cmwellRequest
    case GetRequestShort =>
      logger.debug("Got GetRequestShort")
      sender ! cmwellRequest.copy(requestBody = cmwellRequest.requestBody.take(100))
  }
}

case class CmwellRequest(requestType: String,
                         path: String,
                         queryString: String,
                         generationTime: Long,
                         requestBody: String)
case object GetRequestActors

object RequestMonitor extends LazyLogging {
  implicit val timeout = Timeout(30.seconds)
  private[this] var requestContainer: ActorRef = _

  def getRequestContainer = requestContainer

  def init: Unit = {
    requestContainer = Grid.create(classOf[RequestsContainer], "RequestsContainer")
  }

  def add(requestType: String, path: String, queryString: String, requestBody: String, now: Long): Unit = {
    requestContainer ! CmwellRequest(requestType, path, queryString, now, requestBody)
  }

  def getAllRequestPaths: Future[Map[String, Iterable[(String, CmwellRequest)]]] = {
    startMonitoring

    val webHosts = Grid.jvms(Jvms.WS)
    logger.info(s"webHosts: $webHosts")
    val futures = webHosts.map { host =>
      logger.info(s"host: $host")
      (Grid.selectActor("RequestsContainer", host) ? GetRequestActors)
        .mapTo[Iterable[(String, CmwellRequest)]]
        .map(it => host -> it)
    }
    successes(futures).map(vec => vec.map(el => el._1.host -> el._2).toMap)
  }

  def requestsInfoton(path: String, dc: String): Future[Option[VirtualInfoton]] = {
    val res = getAllRequestPaths.map { m =>
      logger.info(s"GOT MAP: $m")
      val bd = m.toSeq
        .sortBy(_._1)
        .map { tuple =>
          s"""***${tuple._1}***

               |
               |""".stripMargin +
            MarkdownTable(
              MarkdownTuple("Details", "Type", "Path", "Query String", "Generation Time"),
              tuple._2.map { c =>
                val jodaTime = dateStringify(new DateTime(c._2.generationTime))

                MarkdownTuple(s"Details",
                              c._2.requestType,
                              c._2.path,
                              c._2.queryString,
                              jodaTime)
              }.toSeq
            ).get
        }
        .mkString("\n\n\n")
      Some(VirtualInfoton(FileInfoton(path, dc, None, content = Some(FileContent(bd.getBytes, "text/x-markdown")))))
    }
    res
  }

  def startMonitoring {
    Grid.jvms(Jvms.WS).foreach { host =>
      Grid.selectActor("RequestsContainer", host) ! StartRequestMonitoring
    }
  }

  def stopMonitoring {
    Grid.jvms(Jvms.WS).foreach { host =>
      Grid.selectActor("RequestsContainer", host) ! StopRequestMonitoring
    }
  }

}

case object StartRequestMonitoring
case object StopRequestMonitoring

class RequestsContainer extends Actor with LazyLogging {
  implicit val timeout = Timeout(30.seconds)
  var actors = Map.empty[String, ActorRef]

  private[this] var doMonitoring: Boolean = false
  private[this] var taskCanceller: Option[Cancellable] = None

  override def receive: Actor.Receive = {
    case cmwr: CmwellRequest =>
      if (doMonitoring) {
        logger.info(s"adding CmwellRequest: $cmwr")
        context.actorOf(Props(classOf[RequestMonitor], cmwr))
        logger.info(s"current amount of children: ${context.children.size}")
      }

    case GetRequestActors =>
      logger.info(s"Received GetRequestActors has (${context.children.size}) children")
      val s = sender()
      val x = context.children.map { c =>
        logger.debug(s"path: ${c.path.toSerializationFormatWithAddress(Grid.me)}")
        val pathB64 = Base64.encodeBase64String(c.path.toSerializationFormatWithAddress(Grid.me))
        //logger.info(s"pathB64: $pathB64")
        (c ? GetRequestShort).mapTo[CmwellRequest].map { f =>
          (pathB64, f)
        }
      }

      //val y = context.children.map(c => c.path.toSerializationFormatWithAddress(Grid.me))
      successes(x).foreach { xx =>
        logger.debug(s"Request contents: ${xx.toString}")
        s ! xx
      }

    case StartRequestMonitoring =>
      logger.info("Starting request monitoring")
      doMonitoring = true

      taskCanceller.map(_.cancel())
      taskCanceller = Some(context.system.scheduler.scheduleOnce(5 minutes, self, StopRequestMonitoring))

    case StopRequestMonitoring =>
      logger.info("Stopping request monitoring")
      taskCanceller = None
      doMonitoring = false
  }
}


text:
typedef void (cl_error_handler_t)(NSError *error, char const *file, int line, char const *function);

/// Error handler block type.
typedef void (^cl_error_handler_block_t)(NSError *error, char const *file, int line, char const *function);

#if defined(__cplusplus)
#include <functional>

/// Generic error-catcher macro.
/// @param handler Error handler of type cl_error_handler_t or cl_error_handler_block_t.
/// @param ... Empty or an expression of type: NSError* (__autoreleasing|__strong) *?
#define CL_ERR_CATCH(handler, ...) (cl_error_catcher(handler, {__FILE__, __LINE__, __FUNCTION__}, ##__VA_ARGS__))

// ---- Magic starts here ----

/// Generic NSError pointer wrapper that tracks changes to the pointer over its lifetime
/// and signals a configured handler or changes.
class cl_error_catcher
{
private:
    typedef std::function<cl_error_handler_t> cl_error_handler_t;
    struct cl_error_context
    {
        char const *file;
        int line;
        char const *function;
    };

    cl_error_handler_t m_handler = nil;
    cl_error_context m_context = {};

    NSError * __autoreleasing * m_pError = nil; // autoreleasing pointer; may be heap allocated and owned by us.
    NSError * __strong * m_spError = nil; // strong pointer, if we were constructed with one.
    NSError * m_initial_error = nil; // initial value of whatever was given to us.

    bool m_owns_pointer = false; /// delete m_pError on destruction?

    // NOTE: Any conversion from __strong to __autorelease creates a transient __autorelease object.
    // Do NOT store pointers to these!

public:
    /// Store or create an __autoreleasing pointer; will be checked on destruction.
    cl_error_catcher(cl_error_handler_t handler, cl_error_context context, NSError * __autoreleasing * pError = nil);

    /// Store a __strong pointer; will be assigned to on destruction.
    cl_error_catcher(cl_error_handler_t handler, cl_error_context context, NSError * __strong * pError);

    /// Unwrap an __autoreleasing reference.
    cl_error_catcher(cl_error_handler_t handler, cl_error_context context, NSError * __autoreleasing &error);

    /// Unwrap a __strong reference.
    cl_error_catcher(cl_error_handler_t handler, cl_error_context context, NSError * __strong &error);

    /// Handle objective-c block handlers, as they need an explicit copy if they are to be stored.
    cl_error_catcher(cl_error_handler_block_t handler, cl_error_context context, NSError * __autoreleasing &error);

    /// Handle objective-c block handlers, as they need an explicit copy if they are to be stored.
    cl_error_catcher(cl_error_handler_block_t handler, cl_error_context context, NSError * __strong &error);

    cl_error_catcher(cl_error_catcher &&) = delete;
    cl_error_catcher(cl_error_catcher const &) = delete;

    // Implicitly convert to pointer to error so that this object can be used in place of &error.
    operator NSError * __autoreleasing *();

    // Assign an error.  This allows for doing a manual check of an error you may already have.
    NSError * __autoreleasing & operator=(NSError * __autoreleasing error);

    // Check the error state and run handlers if changed.
    ~cl_error_catcher() noexcept(false);
};

#endif


text:
using System;

namespace FlickrNet
{
    /// <summary>
    /// Exception thrown when method requires authentication but no authentication token is supplied.
    /// </summary>
    [Serializable]
    public class AuthenticationRequiredException : FlickrException
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="AuthenticationRequiredException"/> class.
        /// </summary>
        public AuthenticationRequiredException() : base("Method requires authentication but no token supplied.")
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="AuthenticationRequiredException"/> class with a specified error message.
        /// </summary>
        /// <param name="message"></param>
        public AuthenticationRequiredException(string message)
            : base(message)
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="AuthenticationRequiredException"/> class with a specified error message and a reference to the inner exception that is the cause of this exception.
        /// </summary>
        /// <param name="message"></param>
        /// <param name="innerException"></param>
        public AuthenticationRequiredException(string message, Exception innerException)
            : base(message, innerException)
        {
        }

    }
}


text:
import hashlib
import sha3

## Ethereum uses the keccak-256 hash algorithm
def keccak256(s):
    k = sha3.keccak_256()
    k.update(s)
    return k.digest()


text:
<%= title %> (Zoom In)

View Details >>

    <%= frequency %> reference<%= frequency == 1 ? "" : "s" %>:

        << prev |
        next >>


text:
/**
*============================================================================
*  The Ohio State University Research Foundation, The University of Chicago -
*  Argonne National Laboratory, Emory University, SemanticBits LLC,
*  and Ekagra Software Technologies Ltd.
*
*  Distributed under the OSI-approved BSD 3-Clause License.
*  See http://ncip.github.com/cagrid-portal/LICENSE.txt for details.
*============================================================================
**/
package gov.nih.nci.cagrid.portal.aggr.catalog;

import gov.nih.nci.cagrid.portal.dao.PortalUserDao;
import gov.nih.nci.cagrid.portal.dao.catalog.PersonCatalogEntryDao;
import gov.nih.nci.cagrid.portal.domain.PortalUser;
import org.springframework.beans.factory.annotation.Required;
import org.springframework.transaction.annotation.Transactional;

/**
 * User: kherm
 *
 * @author kherm manav.kher@semanticbits.com
 */
@Transactional
public class PersonCatalogCreator extends AbstractCatalogCreator {

    PersonCatalogEntryDao personCatalogEntryDao;
    PortalUserDao portalUserDao;

    public void afterPropertiesSet() throws Exception {

        for (PortalUser user : portalUserDao.getAll()) {

            if (personCatalogEntryDao.isAbout(user) == null) {
                logger.info("Person catalog not found. WIll create for id " + user.getId());
                try {
                    personCatalogEntryDao.createCatalogAbout(user);
                } catch (Exception e) {
                    logger.warn("Error cresting Person catalog for ID " + user.getId() + ". Will skip");
                }

            }
        }
    }

    public PersonCatalogEntryDao getPersonCatalogEntryDao() {
        return personCatalogEntryDao;
    }

    @Required
    public void setPersonCatalogEntryDao(PersonCatalogEntryDao personCatalogEntryDao) {
        this.personCatalogEntryDao = personCatalogEntryDao;
    }

    public PortalUserDao getPortalUserDao() {
        return portalUserDao;
    }

    @Required
    public void setPortalUserDao(PortalUserDao portalUserDao) {
        this.portalUserDao = portalUserDao;
    }
}


text:
const stencila = require('../lib/index.js')
stencila.run()
process.once('SIGUSR2', stencila.stop)


text:
//----------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation.
// All rights reserved.
//
// This code is licensed under the MIT License.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files(the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions :
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
//------------------------------------------------------------------------------

using System;
using System.Xml.Linq;

namespace Microsoft.IdentityModel.Clients.ActiveDirectory.Internal
{

    internal static class Constant
    {
        public const string MsAppScheme = "ms-app";
    }

    internal static class XmlNamespace
    {
        public static readonly XNamespace Wsdl = "http://schemas.xmlsoap.org/wsdl/";
        public static readonly XNamespace Wsp = "http://schemas.xmlsoap.org/ws/2004/09/policy";
        public static readonly XNamespace Http = "http://schemas.microsoft.com/ws/06/2004/policy/http";
        public static readonly XNamespace Sp = "http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702";
        public static readonly XNamespace Sp2005 = "http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";

        public static readonly XNamespace Wsu =
            "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";

        public static readonly XNamespace Soap12 = "http://schemas.xmlsoap.org/wsdl/soap12/";
        public static readonly XNamespace Wsa10 = "http://www.w3.org/2005/08/addressing";
        public static readonly XNamespace Trust = "http://docs.oasis-open.org/ws-sx/ws-trust/200512";
        public static readonly XNamespace Trust2005 = "http://schemas.xmlsoap.org/ws/2005/02/trust";
        public static readonly XNamespace Issue = "http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue";
        public static readonly XNamespace Issue2005 = "http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue";
        public static readonly XNamespace SoapEnvelope = "http://www.w3.org/2003/05/soap-envelope";
    }

}


text:
Spree::Payment.class_eval do
  def method_alipay?
    payment_method.kind_of? Spree::Gateway::AlipayBase
  end

  # walk around gateway purchase.
  # order/payments, payment/processing
  # order.process_payments!  => payment.process!  => handle_payment_preconditions { process_purchase }
  def handle_payment_preconditions(&block)
    unless block_given?
      raise ArgumentError.new("handle_payment_preconditions must be called with a block")
    end

    if payment_method && payment_method.source_required?
      if source
        if !processing?
          if payment_method.supports?(source) || token_based?
            yield
          else
            invalidate!
            raise Core::GatewayError.new(Spree.t(:payment_method_not_supported))
          end
        end
      elsif method_alipay? # continue to complete alipay payment.
        yield
      else
        raise Core::GatewayError.new(Spree.t(:payment_processing_failed))
      end
    end
  end

end


text:
https://plex-4-life.firebaseapp.com/

## About
This project was generated with [Create React App](https://facebook.github.io/react/docs/installation.html#creating-a-new-application).

Used Technos
- [React](https://facebook.github.io/react/) for the front-end
- [Firebase](https://firebase.google.com/) for the back-end (Realtime database) and hosting
- [Travis-CI](https://travis-ci.org/) for Continious Integration and deployment
- [Recharts](http://recharts.org) to generate beautiful charts
- [Material-UI](http://www.material-ui.com) to implement Google's Material Design

## Objective
TODO

## TODOs
- [ ] Translation (english-french)
- [ ] Secure database

## How to
* `npm install -g create-react-app` to install create-react-app
* `create-react-app plex4life` to create a react app named `plex4life`

In the react app directory :
* `npm install --save firebase` to install firebase and add it to the app dependencies (package.json)
* `npm install -g firebase-tools` to install firebase-tools (firebase CLI)
* `firebase init` to initialize firebase (setup database rules, hosting via firebase.json)
* `npm run build` to build the app
* `firebase deploy --token "$FIREBASE_TOKEN";` to deploy the app in firebase
* `npm start` to start the app locally (for testing purpose)