text:
package org.sakaiproject.lessonbuildertool.tool.view;

import uk.org.ponder.rsf.viewstate.SimpleViewParameters;

public class GeneralViewParameters extends SimpleViewParameters {
	public static final int COMMENTS = 1;
	public static final int STUDENT_CONTENT = 2;
	public static final int STUDENT_PAGE = 3;

	private String errorMessage = "";
	private long sendingPage = -1;

	private String title = "";
	private String source = "";
	private String id = "";
	private String clearAttr = "";
	private Long itemId = -1L;
    // the word "push", a number to return to that level in the path, or "next" to replace the top level
	// or "none" if this page shouldn't be recorded at all
	private String path = "";
	private String returnView = "";
	private String recheck = "";
	private String backPath = "";
	public boolean newTopLevel = false; // For page picker, whether this should be a new top level or subpage

	public int addTool = -1;
	public boolean postedComment = false;
	public long studentItemId;

	public String author; // An author whose comments should be highlighted
	public String addBefore = ""; // itemid to add a new item before that item
	public String placementId = null;

	public GeneralViewParameters() {
		super();
	}

	public GeneralViewParameters(String VIEW_ID) {
		super(VIEW_ID);
	}

	/**
	 * To be used when creating iFrame pages.
	 *
	 * @param VIEW_ID
	 * @param title
	 * @param source
	 */
	public GeneralViewParameters(String VIEW_ID, String title, String source, String id) {
		super(VIEW_ID);

		this.title = title;
		this.source = source;
		this.id = id;
	}

	public GeneralViewParameters(String VIEW_ID, long sendingPage) {
		super(VIEW_ID);
		this.sendingPage = sendingPage;
	}

	public GeneralViewParameters(String VIEW_ID, String error) {
		super(VIEW_ID);
		errorMessage = error;
	}

	public void setErrorMessage(String error) {
		errorMessage = error;
	}

	public String getErrorMessage() {
		return errorMessage;
	}

	public void setSendingPage(long l) {
		sendingPage = l;
	}

	public long getSendingPage() {
		return sendingPage;
	}

	public void setPath(String p) {
		path = p;
	}

	public String getPath() {
		return path;
	}

	public void setBackPath(String p) {
		backPath = p;
	}

	public String getBackPath() {
		return backPath;
	}

	public void setReturnView(String p) {
		returnView = p;
	}

	public String getReturnView() {
		return returnView;
	}

	public void setRecheck(String p) {
		recheck = p;
	}

	public String getRecheck() {
		return recheck;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getTitle() {
		return title;
	}

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

	public String getSource() {
		return source;
	}

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

	public String getId() {
		return id;
	}

	public void setItemId(Long itemId) {
		this.itemId = itemId;
	}

	public Long getItemId() {
		return itemId;
	}

	public void setClearAttr(String clearAttr) {
		this.clearAttr = clearAttr;
	}

	public String getClearAttr() {
		return clearAttr;
	}

	public void setAddBefore(String s) {
		this.addBefore = s;
	}

	public String getAddBefore() {
	    // don't see how it could be null, but be safe, so calling
	    // code doesn't have to check this
		if (addBefore == null)
		    return "";
		return addBefore;
	}

	public void setPlacementId(String s) {
		this.placementId = s;
	}

	public String getPlacementId() {
		return placementId;
	}

}


text:
<?php

$cacheConfig = array_merge(
	Configure::read('Cache.defaultConfig'),
	array('groups' => array('taxonomy'))
);
CroogoCache::config('croogo_types', $cacheConfig);
CroogoCache::config('croogo_vocabularies', $cacheConfig);

Croogo::hookComponent('*', 'Taxonomy.Taxonomies');

Croogo::hookHelper('*', 'Taxonomy.Taxonomies');

Croogo::mergeConfig('Translate.models.Term', array(
	'fields' => array(
		'title' => 'titleTranslation',
		'description' => 'descriptionTranslation',
	),
	'translateModel' => 'Taxonomy.Term',
));

Croogo::mergeConfig('Translate.models.Type', array(
	'fields' => array(
		'title' => 'titleTranslation',
		'description' => 'descriptionTranslation',
	),
	'translateModel' => 'Taxonomy.Type',
));

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace AppBundle\Service\Credential;

use AppBundle\Entity\User;
use AppBundle\Model\Response\ResponseModel;
use AppBundle\Service\ResponseSerializerService;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\JsonResponse;

/**
 * Class CredentialResponseBuilderService
 * @package AppBundle\Service\Credential
 */
class CredentialResponseBuilderService
{
    /**
     * @var CredentialModelBuilderService
     */
    private $credentialModelBuilderService;

    /**
     * @var ResponseSerializerService
     */
    private $responseSerializerService;

    public function __construct(
        CredentialModelBuilderService $credentialModelBuilderService,
        ResponseSerializerService $responseSerializerService
    )
    {
        $this->credentialModelBuilderService = $credentialModelBuilderService;
        $this->responseSerializerService = $responseSerializerService;
    }

    /**
     * Creates a json response that will contain new credentials for the user.
     *
     * @param User $user
     * @return JsonResponse
     */
    public function createCredentialResponse(User $user)
    {
        $credentialModel = $this->credentialModelBuilderService->createCredentialModel($user);

        return $this->responseSerializerService
                ->serializeResponse(new ResponseModel($credentialModel), [User::USER_PERSONAL_SERIALIZATION_GROUP], Response::HTTP_CREATED);

    }
}


text:
<?php
namespace AppBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity
 */
class ActivityType
{
    /**
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @ORM\Column(type="string", nullable=true)
     */
    private $type;

    /**
     * @ORM\Column(type="string", nullable=true)
     */
    private $color;

    /**
     * @ORM\OneToMany(targetEntity="AppBundle\Entity\Activity", mappedBy="activityType")
     */
    private $activity;
    /**
     * Constructor
     */
    public function __construct()
    {
        $this->activity = new \Doctrine\Common\Collections\ArrayCollection();
    }

    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set type
     *
     * @param string $type
     *
     * @return ActivityType
     */
    public function setType($type)
    {
        $this->type = $type;

        return $this;
    }

    /**
     * Get type
     *
     * @return string
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * Add activity
     *
     * @param \AppBundle\Entity\Activity $activity
     *
     * @return ActivityType
     */
    public function addActivity(\AppBundle\Entity\Activity $activity)
    {
        $this->activity[] = $activity;

        return $this;
    }

    /**
     * Remove activity
     *
     * @param \AppBundle\Entity\Activity $activity
     */
    public function removeActivity(\AppBundle\Entity\Activity $activity)
    {
        $this->activity->removeElement($activity);
    }

    /**
     * Get activity
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getActivity()
    {
        return $this->activity;
    }

    /**
     * Set color
     *
     * @param string $color
     *
     * @return ActivityType
     */
    public function setColor($color)
    {
        $this->color = $color;

        return $this;
    }

    /**
     * Get color
     *
     * @return string
     */
    public function getColor()
    {
        return $this->color;
    }
}


text:
using System;
using System.Text;

namespace MultBigNumbers
{
    public class Multiply
    {
        public static void Main()
        {
            string firstNum = Console.ReadLine().TrimStart('0');
            string secondNum = Console.ReadLine();

            if (firstNum == "0" || secondNum == "0")
            {
                Console.WriteLine(0);
                return;
            }

            if (firstNum.Length < secondNum.Length)
            {
                string temp = firstNum;
                firstNum = secondNum;
                secondNum = temp;
            }

            int inMind = 0;
            int currentSum = 0;
            var result = new StringBuilder();

            for (int i = firstNum.Length - 1; i >= 0; i--)
            {
                int sum = int.Parse(firstNum[i].ToString()) * int.Parse(secondNum) + inMind;
                inMind = sum / 10;
                currentSum = sum % 10;
                result.Insert(0, currentSum);
                if (i == 0 && inMind!=0)
                {
                    result.Insert(0, inMind);
                }
            }

            Console.WriteLine(result);
        }
    }
}


text:
Downloads are available on a per operating system basis:

* Windows
* OS X
* Linux

## Package manager

If you are using an operating system which has an up-to-date package
set, you may be able to simply install everything via that.

* [Arch Linux Haskell package guidelines](https://wiki.archlinux.org/index.php/Haskell_Package_Guidelines)

## Haskell Platform

The Haskell Platform is a comprehensive, robust development
environment for programming in Haskell. For new users the platform
makes it trivial to get up and running with a full Haskell development
environment.

For experienced developers, the platform provides a comprehensive,
standard base for commercial and open source Haskell development that
maximises interoperability and stability of your code.

[Download now →](http://www.haskell.org/platform/)

## Advanced setup

Alternatively one can manually install GHC and Cabal packages, but
note, is particularly easier on POSIX (e.g. Linux, BSD, OS X) systems.

### 1. Install GHC

GHC has its own web site with license information, FAQ, download links
and changelogs. Depending on your operating system, there should be a
package made for its package manager, otherwise (e.g. Windows) it will
be an installer.

You can also download the .tar.gz/.zip and unpack and install the
executables and so forth manually.

Or you can even install from source, for which
[there is documentation](https://ghc.haskell.org/trac/ghc/wiki/Building).

[Download GHC now →](https://www.haskell.org/ghc/download)

### 2. Install Cabal-install

After installing GHC, you will want the Haskell package manager:

[Get the Cabal archive →](http://hackage.haskell.org/package/cabal-install)

Download the tar.gz file, extract and inside the resulting directory,
run:

    $ sh ./bootstrap.sh

This will automatically download and install all the packages
necessary to setup Cabal install.

Once complete, you should add `$HOME/.cabal/bin` to your PATH. A
simple way to do this is to edit your `~/.bashrc` and place in there:

    export PATH=$HOME/.cabal/bin:$PATH

Now you should be able to run cabal:

    $ cabal --version
    cabal-install version 1.18.0.2
    using version 1.18.1.2 of the Cabal library

And can start writing Haskell programs and installing packages!


text:
/**
 * @author pandyas
 *
 * $Id:$
 *
 * $Log$
 *
 */

package gov.nih.nci.camod.webapp.form;

import gov.nih.nci.camod.webapp.form.cibase.*;

/**
 * Interface for Plasmid data
 */
public interface PlasmidData extends NameData, DoseData, AgeGenderData, TreatmentData,
AdministrationData {
}


text:
<?php
// Example tiny tool

// modify this to conform with your class-loading strategy:
use dface\tito\Tito;

include_once 'vendor/autoload.php';

class Param implements JsonSerializable
{

	private string $val;

	public function __construct(string $val)
	{
		$this->val = $val;
	}

	public static function deserialize($val) : self
	{
		return new static($val);
	}

	public function jsonSerialize()
	{
		return $this->val;
	}

}

class Param2 implements JsonSerializable
{

	private string $val;

	public function __construct(string $val)
	{
		$this->val = $val;
	}

	public function jsonSerialize()
	{
		return $this->val;
	}

}

// example service class
class Test
{

	public function process($val)
	{
		return $val;
	}

	public function processObj(Param $val) : \Param
	{
		return $val;
	}

	public function processObj2(Param2 $val) : \Param2
	{
		return $val;
	}

	public function info()
	{
		return $_SERVER['argv'];
	}

}

// kinda container
$container = [
	'service1' => new Test(),
	'service2' => new Test(),
];

// Initialize tito - pass in description and service-locator callback:
$tito = new Tito(
	'X-system command line tool.',
	static function ($service_name) use ($container) {
		return $container[$service_name];
	}
);

// ask tito to make the rest
$tito->call();


text:
namespace autofill {
struct PasswordForm;
}

class PasswordEditDelegate;
class Profile;

// A bridge that allows communication between Android UI and the native
// side. It can be used to launch the password editing activity from the
// native side or when the credential change made in the UI needs to
// arrive to the native side to be saved.
class PasswordEditingBridge {
 public:
  // This is must be called when the view is destroyed, as it's the only way to
  // destroy the bridge and the delegate with it.
  void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);

  // Creates a new PasswordEditingBridge and connects it with a new delegate.
  // |forms_to_change| contains all the password forms that share a sort key
  // with the form that will be edited. |existing_usernames| belong to other
  // saved credentials for the same site and are used to check if the edited
  // username conflicts with any previously existing ones.
  static void LaunchPasswordEntryEditor(
      JNIEnv* env,
      const base::android::JavaParamRef<jobject>& context,
      Profile* profile,
      base::span<const std::unique_ptr<autofill::PasswordForm>> forms_to_change,
      std::vector<base::string16> existing_usernames);

  void HandleEditSavedPasswordEntry(
      JNIEnv* env,
      const base::android::JavaParamRef<jobject>& java_object,
      const base::android::JavaParamRef<jstring>& new_username,
      const base::android::JavaParamRef<jstring>& new_password);

 private:
  explicit PasswordEditingBridge(
      std::unique_ptr<PasswordEditDelegate> password_edit_delegate);
  ~PasswordEditingBridge();

  // The corresponding java object.
  base::android::ScopedJavaGlobalRef<jobject> java_object_;

  // The delegate belonging to the bridge.
  std::unique_ptr<PasswordEditDelegate> password_edit_delegate_;

  DISALLOW_COPY_AND_ASSIGN(PasswordEditingBridge);
};

#endif  // CHROME_BROWSER_ANDROID_PASSWORD_EDITING_BRIDGE_H_


text:
export { SelfbitsAngular, SelfbitsAngularModule } from './src/angularselfbits'
export { SelfbitsAppConfig, SelfbitsAuthConfig, SelfbitsHttp } from './src/utils/interfaces'
export { SELFBITS_CONFIG } from './src/utils/tokens'


text:
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

/**
 * Updates the Connectivity Status section.
 * @param {String} connStatus Dictionary containing connectivity status.
 */
function updateConnectivityStatus(connStatus) {
  var deviceTypes = ['wlan0', 'wwan0', 'eth0', 'eth1'];
  var deviceNames = ['Wi-Fi', '3G', 'Ethernet0', 'Ethernet1'];
  for (var i = 0; i < deviceTypes.length; i++) {
    var deviceName = deviceNames[i];
    var nameElement = document.createElement('h2');
    nameElement.appendChild(document.createTextNode(deviceName));
    $('connectivity-status').appendChild(nameElement);

    var deviceType = deviceTypes[i];
    var deviceStatus = connStatus[deviceType];
    var statusMessage;
    if (!deviceStatus) {
      statusMessage = 'Device not found.';
    } else if (!deviceStatus.flags ||
               deviceStatus.flags.indexOf('up') == -1) {
      statusMessage = 'Device disabled.';
    } else if (!deviceStatus.ipv4) {
      statusMessage = 'IPv4 address unavailable.';
    } else {
      statusMessage = 'IPv4 address: ' + deviceStatus.ipv4.addrs;
    }
    var statusElement = document.createElement('p');
    statusElement.appendChild(document.createTextNode(statusMessage));
    $('connectivity-status').appendChild(statusElement);
  }
}

document.addEventListener('DOMContentLoaded', function() {
  chrome.send('pageLoaded');
});


text:
#include <XnStatusRegister.h>
#include <XnStatusCodes.h>


text:
@interface PodsDummy_Pods_Conduction_Tests : NSObject
@end
@implementation PodsDummy_Pods_Conduction_Tests
@end


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title> Site AMS Test </title>

    <link href="Public/css/bootstrap.min.css" rel="stylesheet">

AMS Builders


text:
import unittest
from proj_1.bool_re.token import TokenParser

class TestTokenParser(unittest.TestCase):
    '''Test the TokenParser class.
    '''

    def test_token(self):
        '''Test the nested class Token.
        '''

        token = TokenParser.Token()
        self.assertIsNone(token.literal)
        self.assertIsNone(token.kind)

        token = TokenParser.Token('test')
        self.assertEqual(token.literal, 'test')
        self.assertIsNone(token.kind)

        token = TokenParser.Token('test', TokenParser.TokenKind.WORD_TOKEN)
        self.assertIs(token.kind, TokenParser.TokenKind.WORD_TOKEN)

        token_str = 'Token: test | WORD_TOKEN'
        self.assertEqual(str(token), token_str)

    def test_parser_init(self):
        '''Test TokenParser constructor.
        '''

        command = 'a  & \t the \n | test'
        command_str = 'a&the'
        parser = TokenParser(command)
        self.assertEqual(parser.command, command_str)
        self.assertEqual(len(parser.token_list), 0)

    def test_parse(self):
        '''Test TokenParser.parse method.
        '''
        parser = TokenParser('a the dog')
        parser.parse()
        token = TokenParser.Token('athedog', TokenParser.TokenKind.WORD_TOKEN)
        token_end = TokenParser.Token('\0', TokenParser.TokenKind.EOL_TOKEN)
        result = [token, token_end]
        self.assertSequenceEqual(parser.token_list, result)

        parser.command = 'a&the'
        parser.parse()
        token_a = TokenParser.Token('a', TokenParser.TokenKind.WORD_TOKEN)
        token_and = TokenParser.Token('&', TokenParser.TokenKind.AND_TOKEN)
        token_the = TokenParser.Token('the', TokenParser.TokenKind.WORD_TOKEN)
        result = [token_a, token_and, token_the, token_end]
        self.assertSequenceEqual(parser.token_list, result)

        parser.command = '(a | the ^ dog)'
        parser.parse(overwrite=False)
        token_dog = TokenParser.Token('dog', TokenParser.TokenKind.WORD_TOKEN)
        l_par_kind = TokenParser.TokenKind.LEFT_PAREN_TOKEN
        r_par_kind = TokenParser.TokenKind.RIGHT_PAREN_TOKEN
        token_lpar = TokenParser.Token('(', l_par_kind)
        token_rpar = TokenParser.Token(')', r_par_kind)
        token_or = TokenParser.Token('|', TokenParser.TokenKind.OR_TOKEN)
        token_not = TokenParser.Token('^', TokenParser.TokenKind.NOT_TOKEN)
        result += [token_lpar, token_a, token_or, token_the, token_not,
                   token_dog, token_rpar, token_end]
        self.assertSequenceEqual(parser.token_list, result)

        parser.command = 'a ? the'
        with self.assertRaises(ValueError) as value_error:
            parser.parse()

        error_message = 'Unknown Character: ?.'
        self.assertEqual(str(value_error.exception), error_message)

        del parser.command
        self.assertFalse(hasattr(parser, '_command'))


text:
module.exports = function (math) {
  var util = require('../../util/index'),

      BigNumber = math.type.BigNumber,
      Complex = require('../../type/Complex'),
      collection = require('../../type/collection'),

      isNumber = util.number.isNumber,
      isBoolean = util['boolean'].isBoolean,
      isComplex = Complex.isComplex,
      isCollection = collection.isCollection;

  /**
   * Calculate the inverse tangent function with two arguments, y/x.
   * By providing two arguments, the right quadrant of the computed angle can be
   * determined.
   *
   * For matrices, the function is evaluated element wise.
   *
   * Syntax:
   *
   *    math.atan2(y, x)
   *
   * Examples:
   *
   *    math.atan2(2, 2) / math.pi;       // returns number 0.25
   *
   *    var angle = math.unit(60, 'deg'); // returns Unit 60 deg
   *    var x = math.cos(angle);
   *    var y = math.sin(angle);
   *
   *    math.atan(2);             // returns Complex 1.5707963267948966 -1.3169578969248166 i
   *
   * See also:
   *
   *    tan, atan, sin, cos
   *
   * @param {Number | Boolean | Complex | Array | Matrix} y  Second dimension
   * @param {Number | Boolean | Complex | Array | Matrix} x  First dimension
   * @return {Number | Complex | Array | Matrix} Four-quadrant inverse tangent
   */
  math.atan2 = function atan2(y, x) {
    if (arguments.length != 2) {
      throw new math.error.ArgumentsError('atan2', arguments.length, 2);
    }

    if (isNumber(y)) {
      if (isNumber(x)) {
        return Math.atan2(y, x);
      }
    }

    // TODO: support for complex computation of atan2

    if (isCollection(y) || isCollection(x)) {
      return collection.deepMap2(y, x, atan2);
    }

    if (isBoolean(y)) {
      return atan2(+y, x);
    }
    if (isBoolean(x)) {
      return atan2(y, +x);
    }

    // TODO: implement bignumber support
    if (y instanceof BigNumber) {
      return atan2(y.toNumber(), x);
    }
    if (x instanceof BigNumber) {
      return atan2(y, x.toNumber());
    }

    throw new math.error.UnsupportedTypeError('atan2', math['typeof'](y), math['typeof'](x));
  };
};


text:
'use strict';

var events = require('events'),
    util = require('util'),
    validPayload = require('./etcd-valid-payload-1.json'),
    setPayload = require('./etcd-set-payload.json'),
    deletePayload = require('./etcd-delete-payload.json');

module.exports.validMock = function (host, port) {
  var watcherInstance = new Watcher();

  var client = {
    get: function (key, opt, cb) {
      cb(null, validPayload);
    },
    watcher: function (key, opt) {
      return watcherInstance;
    },
    watcherInstance: watcherInstance
  };

  return client;
};

module.exports.errorMock = function (host, port) {
  var watcherInstance = new Watcher();

  var client = {
    get: function (key, opt, cb) {
      cb(new Error('error'));
    },
    watcher: function (key, opt) {
      return watcherInstance;
    },
    watcherInstance: watcherInstance
  };

  return client;
};

function Watcher () {
  events.EventEmitter.call(this);
}

util.inherits(Watcher, events.EventEmitter);

Watcher.prototype.trigger = function () {
  this.emit('set', setPayload);
  this.emit('delete', deletePayload);
}


text:
import java.util.Random;

public class Cave {

  public int chooseTreasureCave() {
    Random rand = new Random();
    int treasureCaveNo = rand.nextInt(3);
    return treasureCaveNo;

  }

  public boolean resolveChoice(int choice) {
    int treasureCaveNo = chooseTreasureCave();

    return choice == treasureCaveNo;

    }
}


text:
/*
 * This file is part of the DITA Open Toolkit project.
 * See the accompanying license.txt file for applicable licenses.
 */
package org.dita.dost.exception;

import org.junit.Test;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
import org.dita.dost.TestUtils.TestLogger;
import org.dita.dost.log.DITAOTLogger;

public class DITAOTXMLErrorHandlerTest {

    private final DITAOTLogger logger = new TestLogger();
    private final DITAOTXMLErrorHandler e = new DITAOTXMLErrorHandler("path", logger);
    private final SAXParseException se = new SAXParseException("message", "publicId", "systemId", 3, 1,
            new RuntimeException("msg"));

    @Test
    public void testDITAOTXMLErrorHandler() {
        new DITAOTXMLErrorHandler("path", logger);
        new DITAOTXMLErrorHandler(null, logger);
    }

    @Test(expected = SAXExceptionWrapper.class)
    public void testError() throws SAXException {
        e.error(se);
    }

    @Test(expected = SAXExceptionWrapper.class)
    public void testFatalError() throws SAXException {
        e.fatalError(se);
    }

    @Test
    public void testWarning() throws SAXException {
        e.warning(se);
    }

}


text:
package com.taptrack.tcmptappy.ui.modules.sendtcmpmessage.vistas.prettysheet.prettyadapterimpl.detailadaptercommands;

import com.taptrack.tcmptappy.tcmp.TCMPMessage;
import com.taptrack.tcmptappy.tcmp.commandfamilies.basicnfc.commands.WriteNdefTextRecordCommand;
import com.taptrack.tcmptappy.ui.modules.sendtcmpmessage.vistas.prettysheet.CommandItem;
import com.taptrack.tcmptappy.ui.modules.sendtcmpmessage.vistas.prettysheet.prettyadapterimpl.detailadapters.TextCommandAdapter;

public class NdefTextWriteCommand implements TextCommandAdapter.TextCommand {
    private CommandItem item;

    public NdefTextWriteCommand(CommandItem item) {
        this.item = item;
    }

    @Override
    public TCMPMessage getMessage(byte timeout, String text) {
        return new WriteNdefTextRecordCommand((byte) timeout,false,text.getBytes());
    }

    @Override
    public CommandItem getItem() {
        return item;
    }
}


text:
package com.thoughtworks.go.server.cronjob;

import com.thoughtworks.go.server.service.ArtifactsDiskCleaner;
import com.thoughtworks.go.server.service.ArtifactsDiskSpaceFullChecker;
import com.thoughtworks.go.server.service.ArtifactsDiskSpaceWarningChecker;
import com.thoughtworks.go.server.service.ArtifactsService;
import com.thoughtworks.go.server.service.ConfigDbStateRepository;
import com.thoughtworks.go.server.service.GoConfigService;
import com.thoughtworks.go.server.service.DatabaseDiskSpaceWarningChecker;
import com.thoughtworks.go.server.service.DiskSpaceChecker;
import com.thoughtworks.go.server.service.EmailSender;
import com.thoughtworks.go.server.service.StageService;
import com.thoughtworks.go.server.service.SystemDiskSpaceChecker;
import com.thoughtworks.go.server.service.DatabaseDiskSpaceFullChecker;
import com.thoughtworks.go.server.service.result.DiskSpaceOperationResult;
import com.thoughtworks.go.server.service.result.OperationResult;
import com.thoughtworks.go.serverhealth.ServerHealthService;
import com.thoughtworks.go.util.SystemEnvironment;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class GoDiskSpaceMonitor {
    private static final Logger LOG = Logger.getLogger(GoDiskSpaceMonitor.class);
    private GoConfigService goConfigService;
    private SystemEnvironment systemEnvironment;
    private ServerHealthService serverHealthService;
    private EmailSender emailSender;
    private SystemDiskSpaceChecker systemDiskSpaceChecker;
    private ArtifactsService artifactsService;
    private StageService stageService;
    private ConfigDbStateRepository configDbStateRepository;
    private DiskSpaceChecker[] checkers;
    private volatile boolean lowOnDisk;

    @Autowired
    public GoDiskSpaceMonitor(GoConfigService goConfigService,
                              SystemEnvironment systemEnvironment,
                              ServerHealthService serverHealthService,
                              EmailSender emailSender,
                              ArtifactsService artifactsService,
                              StageService stageService,
                              ConfigDbStateRepository configDbStateRepository) {
        this(goConfigService, systemEnvironment, serverHealthService, emailSender, new SystemDiskSpaceChecker(), artifactsService, stageService, configDbStateRepository);
    }

    public GoDiskSpaceMonitor(GoConfigService goConfigService, SystemEnvironment systemEnvironment, ServerHealthService serverHealthService, EmailSender emailSender,
                              SystemDiskSpaceChecker systemDiskSpaceChecker, ArtifactsService artifactsService, StageService stageService, ConfigDbStateRepository configDbStateRepository) {
        this.goConfigService = goConfigService;
        this.systemEnvironment = systemEnvironment;
        this.serverHealthService = serverHealthService;
        this.emailSender = emailSender;
        this.systemDiskSpaceChecker = systemDiskSpaceChecker;
        this.artifactsService = artifactsService;
        this.stageService = stageService;
        this.configDbStateRepository = configDbStateRepository;
    }

    public void initialize() {
        checkers = new DiskSpaceChecker[]{
                new ArtifactsDiskSpaceFullChecker(systemEnvironment, emailSender, goConfigService, systemDiskSpaceChecker),
                new ArtifactsDiskSpaceWarningChecker(systemEnvironment, emailSender, goConfigService, systemDiskSpaceChecker, serverHealthService),
                new DatabaseDiskSpaceFullChecker(emailSender, systemEnvironment, goConfigService, systemDiskSpaceChecker),
                new DatabaseDiskSpaceWarningChecker(emailSender, systemEnvironment, goConfigService, systemDiskSpaceChecker, serverHealthService),
                new ArtifactsDiskCleaner(systemEnvironment, goConfigService, systemDiskSpaceChecker, artifactsService, stageService, configDbStateRepository)};
    }

    //Note: This method is called from a Spring timer task
    public void onTimer() {
        OperationResult result = new DiskSpaceOperationResult(serverHealthService);
        try {
            boolean outOfDisk = false;
            for (DiskSpaceChecker checker : checkers) {
                OperationResult callResult = checker.resultFor(result);
                checker.check(callResult);
                outOfDisk = outOfDisk || !result.canContinue();
            }
            lowOnDisk = outOfDisk;
        } catch (Exception e) {
            LOG.error("Error occured during checking filesystems low disk space", e);
        }
    }

    public boolean isLowOnDisk() {
        return lowOnDisk;
    }
}


text:
package com.taobao.tddl.optimizer.core.ast.dml;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;

import com.taobao.tddl.common.jdbc.Parameters;
import com.taobao.tddl.optimizer.OptimizerContext;
import com.taobao.tddl.optimizer.core.ASTNodeFactory;
import com.taobao.tddl.optimizer.core.ast.DMLNode;
import com.taobao.tddl.optimizer.core.ast.query.KVIndexNode;
import com.taobao.tddl.optimizer.core.ast.query.TableNode;
import com.taobao.tddl.optimizer.core.expression.ISelectable;
import com.taobao.tddl.optimizer.core.plan.IPut;
import com.taobao.tddl.optimizer.core.plan.IQueryTree;
import com.taobao.tddl.optimizer.core.plan.dml.IInsert;
import com.taobao.tddl.optimizer.rule.OptimizerRule;
import com.taobao.tddl.optimizer.utils.OptimizerToString;
import com.taobao.tddl.optimizer.utils.OptimizerUtils;

public class InsertNode extends DMLNode<InsertNode> {

    private boolean           createPk = true;       // 是否为自增长字段,暂时不支持
    private List<Object>      duplicateUpdateValues;
    private List<ISelectable> duplicateUpdateColumns;

    public InsertNode(TableNode table){
        super(table);
    }

    @Override
    public IPut toDataNodeExecutor(int shareIndex) {
        IInsert insert = ASTNodeFactory.getInstance().createInsert();
        if (this.getDuplicateUpdateColumns() != null) {
            List<String> partitionColumns = OptimizerContext.getContext()
                .getRule()
                .getSharedColumns(this.getNode().getTableMeta().getTableName());

            for (ISelectable updateColumn : this.getDuplicateUpdateColumns()) {
                if (partitionColumns.contains(updateColumn.getColumnName())) {
                    throw new IllegalArgumentException("column :" + updateColumn.getColumnName()
                                                       + " is partition key , can't be modify");
                }

                if (this.getNode().getTableMeta().getPrimaryKeyMap().containsKey(updateColumn.getColumnName())) {
                    throw new IllegalArgumentException("column :" + updateColumn.getColumnName()
                                                       + " is primary key , can't be modify");
                }
            }
        }

        if (this.getNode().getActualTableName() != null) {
            insert.setTableName(this.getNode().getActualTableName());
        } else if (this.getNode() instanceof KVIndexNode) {
            insert.setTableName(((KVIndexNode) this.getNode()).getIndexName());
        } else {
            insert.setTableName(this.getNode().getTableName());
        }
        insert.setIndexName((this.getNode()).getIndexUsed().getName());
        insert.setConsistent(true);
        insert.setUpdateColumns(this.getColumns());
        insert.setUpdateValues(this.getValues());
        if (this.getSelectNode() != null) {
            insert.setQueryTree((IQueryTree) this.getSelectNode().toDataNodeExecutor());
        }

        insert.setIgnore(this.isIgnore());
        insert.setQuick(this.isQuick());
        insert.setLowPriority(this.lowPriority);
        insert.setHighPriority(this.highPriority);
        insert.setDelayed(this.isDelayed());

        insert.setDuplicateUpdateColumns(this.getDuplicateUpdateColumns());
        insert.setDuplicateUpdateValues(this.getDuplicateUpdateValues());
        insert.setMultiValues(this.isMultiValues());
        insert.setMultiValues(this.getMultiValues());

        insert.executeOn(this.getNode().getDataNode());
        insert.setBatchIndexs(this.getBatchIndexs());
        insert.setExistSequenceVal(this.isExistSequenceVal());
        return insert;
    }

    @Override
    public InsertNode deepCopy() {
        InsertNode insert = new InsertNode(null);
        super.deepCopySelfTo(insert);
        insert.setCreatePk(this.isCreatePk());

        insert.setDuplicateUpdateColumns(OptimizerUtils.copySelectables(this.duplicateUpdateColumns));
        insert.setDuplicateUpdateValues(OptimizerUtils.copyValues(this.duplicateUpdateValues));
        return insert;
    }

    @Override
    public InsertNode copy() {
        InsertNode insert = new InsertNode(null);
        super.copySelfTo(insert);
        insert.setCreatePk(this.isCreatePk());
        insert.setDuplicateUpdateColumns(this.getDuplicateUpdateColumns());
        insert.setDuplicateUpdateValues(this.getDuplicateUpdateValues());
        insert.setMultiValues(this.isMultiValues());
        insert.setMultiValues(multiValues);
        return insert;
    }

    public boolean isCreatePk() {
        return createPk;
    }

    public InsertNode setCreatePk(boolean createPk) {
        this.createPk = createPk;
        return this;
    }

    public void duplicateUpdate(String[] updateColumns, Object[] updateValues) {
        List<ISelectable> cs = new LinkedList<ISelectable>();
        for (String name : updateColumns) {
            ISelectable s = OptimizerUtils.createColumnFromString(name);
            cs.add(s);
        }

        List<Object> valueList = new ArrayList<Object>(Arrays.asList(updateValues));

        this.setDuplicateUpdateColumns(cs);
        this.setDuplicateUpdateValues(valueList);

    }

    public void setDuplicateUpdateColumns(List<ISelectable> cs) {
        this.duplicateUpdateColumns = cs;

    }

    public List<Object> getDuplicateUpdateValues() {
        return duplicateUpdateValues;
    }

    public List<ISelectable> getDuplicateUpdateColumns() {
        return duplicateUpdateColumns;
    }

    public void setDuplicateUpdateValues(List<Object> valueList) {
        this.duplicateUpdateValues = valueList;

    }

    @Override
    public void assignment(Parameters parameterSettings) {
        super.assignment(parameterSettings);
        if (duplicateUpdateValues != null) {
            this.setDuplicateUpdateValues(assignmentValues(duplicateUpdateValues, parameterSettings));
        }
    }

    @Override
    public void build() {
        super.build();
        if (this.getDuplicateUpdateColumns() != null) {
            for (ISelectable s : this.getDuplicateUpdateColumns()) {
                ISelectable res = null;
                for (Object obj : table.getColumnsReferedForParent()) {
                    ISelectable querySelected = (ISelectable) obj;
                    if (s.isSameName(querySelected)) { // 尝试查找对应的字段信息
                        res = querySelected;
                        break;
                    }
                }

                if (res == null) {
                    throw new IllegalArgumentException("column: " + s.getColumnName() + " is not existed in "
                                                       + table.getName());
                }

                s.setTableName(res.getTableName());
                s.setDataType(res.getDataType());
                s.setAutoIncrement(res.isAutoIncrement());
            }

            convertTypeToSatifyColumnMeta(this.getDuplicateUpdateColumns(), this.getDuplicateUpdateValues());
        }
    }

    @Override
    public String toString(int inden, int shareIndex) {
        String tabContent = OptimizerToString.getTab(inden + 1);
        String str = super.toString(inden, shareIndex);
        StringBuilder sb = new StringBuilder(str);
        OptimizerToString.appendField(sb, "duplicateUpdateColumns", this.getDuplicateUpdateColumns(), tabContent);
        OptimizerToString.appendField(sb, "duplicateUpdateValues", this.getDuplicateUpdateValues(), tabContent);
        return sb.toString();
    }

    public boolean processAutoIncrement() {
        if (!super.processAutoIncrement()) {
            return false;
        }

        // 针对分库分表进行处理,广播表进行处理
        String tableName = getTableMeta().getTableName();
        OptimizerRule rule = OptimizerContext.getContext().getRule();
        return !rule.isTableInSingleDb(tableName) || rule.isBroadCast(tableName);
    }
}


text:
package at.fh_hagenberg.s1520237047.tictactoe.service;

import java.io.IOException;

import at.fh_hagenberg.s1520237047.tictactoe.model.Field;
import at.fh_hagenberg.s1520237047.tictactoe.model.Move;
import at.fh_hagenberg.s1520237047.tictactoe.model.MoveNotPossibleException;
import at.fh_hagenberg.s1520237047.tictactoe.model.Player;
import at.fh_hagenberg.s1520237047.tictactoe.service.exceptions.ConnectionLostException;
import at.fh_hagenberg.s1520237047.tictactoe.service.exceptions.NoObserverSetException;
import at.fh_hagenberg.s1520237047.tictactoe.service.exceptions.NotConnectedException;
import at.fh_hagenberg.s1520237047.tictactoe.service.exceptions.OpponentSurrenderedException;

/**
 * @author Kai Takac
 */

public class Game {

    private TicTacToeGameObserver observer;
    private Field field;
    private Player localPlayer;
    private Player remotePlayer;
    private GameConnector connector;
    private boolean myTurn;
    private boolean running = true;

    public boolean isMyTurn() {
        return myTurn;
    }

    public void setObserver(TicTacToeGameObserver observer) {
        this.observer = observer;
    }

    public interface TicTacToeGameObserver {
        void onMyMoveComplete(Game game, Move move);

        void onSurrenderSuccessful(Game game);

        void onOpponentsMoveComplete(Game game, Move move);

        void onOpponentSurrendered(Game game, Player player);

        void onConnectionClosed(Game game);

        void onMatchDraw(Game game);

        void onMatchWin(Game game, Player winner);
    }

    public Game(Field field, Player localPlayer, Player remotePlayer, GameConnector connector, boolean myTurn) {
        this.field = field;
        this.localPlayer = localPlayer;
        this.remotePlayer = remotePlayer;
        this.connector = connector;
        this.myTurn = myTurn;
    }

    public void playMove(int x, int y) throws MoveNotPossibleException, NotConnectedException, NoObserverSetException {
        this.checkMovePreconditions();

        Move move = new Move(this.localPlayer, x, y);
        field.setMove(move);
        this.myTurn = false;

        this.sendMoveAsynchronously(move);
    }

    private void sendMoveAsynchronously(final Move move) {
        new Thread(new Runnable() {
            @Override
            public void run() {
                try {
                    connector.sendMove(move);
                    observer.onMyMoveComplete(Game.this, move);
                    checkForEnd();
                } catch (IOException | ConnectionLostException e) {
                    onConnectionClosed();
                }
            }
        }).start();
    }

    private void checkForEnd() {
        Player winner;
        if(this.field.isFull()) {
            this.myTurn = false;
            this.running = false;
            this.close(false);
            this.observer.onMatchDraw(this);
        } else if ((winner = this.field.getWinner()) != null) {
            this.myTurn = false;
            this.running = false;
            this.close(false);
            this.observer.onMatchWin(this, winner);
        }
    }

    public void waitForOpponentsMove() throws NotConnectedException, MoveNotPossibleException, NoObserverSetException {
        if (connector.isClosed()) {
            throw new NotConnectedException();
        } else if (this.isMyTurn()) {
            throw new MoveNotPossibleException();
        } else if (this.observer == null) {
            throw new NoObserverSetException();
        }

        waitForOpponentsMoveAsynchronously();
    }

    private void waitForOpponentsMoveAsynchronously() {
        new Thread(new Runnable() {
            @Override
            public void run() {
                try {
                    Move move = connector.getOpponentsMove();
                    if (move == null) {
                        throw new RuntimeException("Move may never be null");
                    }
                    move.player = remotePlayer;
                    field.setMove(move);
                    myTurn = true;
                    observer.onOpponentsMoveComplete(Game.this, move);
                    checkForEnd();
                } catch (OpponentSurrenderedException e) {
                    onOpponentSurrendered();
                } catch (IOException | ConnectionLostException e) {
                    onConnectionClosed();
                } catch (MoveNotPossibleException e) {
                    //If the move is not possible something is terribly wrong -> close the connection
                    try {
                        connector.close();
                    } catch (IOException e1) {
                        e1.printStackTrace();
                    }
                    onConnectionClosed();
                }
            }
        }).start();
    }

    private void onOpponentSurrendered() {
        this.running = false;
        this.observer.onOpponentSurrendered(this, this.remotePlayer);
    }

    private void onConnectionClosed() {
        this.running = false;
        this.observer.onConnectionClosed(this);
    }

    public void surrender() throws MoveNotPossibleException, NotConnectedException, NoObserverSetException {
        this.checkMovePreconditions();

        new Thread(new Runnable() {
            @Override
            public void run() {
                try {
                    connector.surrender();
                    running = false;
                    observer.onSurrenderSuccessful(Game.this);
                } catch (IOException | ConnectionLostException e) {
                    onConnectionClosed();
                }
            }
        }).start();
    }

    private void checkMovePreconditions() throws MoveNotPossibleException, NotConnectedException, NoObserverSetException {
        if (connector == null || connector.isClosed()) {
            throw new NotConnectedException();
        } else if (!this.isMyTurn() && running) {
            throw new MoveNotPossibleException();
        } else if (this.observer == null) {
            throw new NoObserverSetException();
        }
    }

    public void close (boolean fireEvent) {
        try {
            if (this.connector != null)
                this.connector.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
        this.running = false;

        if(fireEvent){
            onConnectionClosed();
        }
    }

    public void close() {
        close(true);
    }

    public boolean isRunning() {
        return running;
    }

    public Field getField() {
        return field;
    }

    public Player getLocalPlayer() {
        return localPlayer;
    }

    public Player getRemotePlayer() {
        return remotePlayer;
    }
}


text:
var SideScroller = SideScroller || {};

//loading the game assets
SideScroller.Preload = function(){};

SideScroller.Preload.prototype = {
  preload: function() {
    //show loading screen
    this.preloadBar = this.add.sprite(this.game.world.centerX, this.game.world.centerY, 'preloadbar');
    this.preloadBar.anchor.setTo(0.5);
    this.preloadBar.scale.setTo(3);

    this.load.setPreloadSprite(this.preloadBar);

    //load game assets
    this.load.tilemap('level1', 'assets/tilemaps/level1.json', null, Phaser.Tilemap.TILED_JSON);
    this.load.image('gameTiles', 'assets/images/tiles_spritesheet.png');

    // bgStuff
    this.load.image('cloud1', 'assets/images/platformerGraphicsDeluxe_Updated/Items/cloud1.png');
    this.load.image('bush', 'assets/images/platformerGraphicsDeluxe_Updated/Items/bush.png');
    this.load.image('mushroomRed', 'assets/images/platformerGraphicsDeluxe_Updated/Items/mushroomRed.png');
    this.load.image('plant', 'assets/images/platformerGraphicsDeluxe_Updated/Items/plant.png');
    this.load.image('rock', 'assets/images/platformerGraphicsDeluxe_Updated/Items/rock.png');
    this.load.image('cactus', 'assets/images/platformerGraphicsDeluxe_Updated/Items/cactus.png');
    this.load.image('hill_smallAlt', 'assets/images/platformerGraphicsDeluxe_Updated/Tiles/hill_smallAlt.png');
    this.load.image('signExit', 'assets/images/platformerGraphicsDeluxe_Updated/Tiles/signExit.png');

    this.load.image('player', 'assets/images/player.png');
    this.load.image('playerDuck', 'assets/images/player_duck.png');
    this.load.image('playerDead', 'assets/images/player_dead.png');

    this.load.image('player2', 'assets/images/player2.png');
    this.load.image('playerDuck2', 'assets/images/player2_duck.png');
    this.load.image('playerDead2', 'assets/images/player2_dead.png');

    this.load.image('dad', 'assets/images/dad.png');

    this.game.load.spritesheet('p1', 'assets/images/p1.png', 75, 92, 2)
    this.game.load.spritesheet('p2', 'assets/images/p2.png', 87, 92, 2)
    this.game.load.spritesheet('d', 'assets/images/d.png', 75, 92, 2)

    this.load.image('goldCoin', 'assets/images/goldCoin.png');
    this.load.audio('coin', ['assets/audio/coin.ogg', 'assets/audio/coin.mp3']);
  },
  create: function() {
    this.state.start('Game');
  }
};


text:
<?php

namespace App\Http\Requests;

use Carbon\Carbon;
use Illuminate\Foundation\Http\FormRequest;

class StorePostRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return $this->user()->hasPermission('perms.writer');
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'title'             => 'required|max:255|unique:posts,id,'.$this->id,
            'subtitle'          => 'required',
            'content'           => 'required',
            'post_image'        => 'required',
            'meta_description'  => 'required|max:255',
            'is_draft'          => 'nullable',
            'author'            => 'required',
            'slug'              => 'required|unique:posts,id,'.$this->id,
            'publish_date'      => 'required',
            'publish_time'      => 'required',
            'layout'            => 'required',
        ];
    }

    /**
     * Return the fields and values to create a new post.
     *
     * @return array
     */
    public function postFillData()
    {
        $published_at = new Carbon(
            $this->publish_date.' '.$this->publish_time
        );

        return [
            'title'             => $this->title,
            'subtitle'          => $this->subtitle,
            'post_image'        => $this->post_image,
            'content_raw'       => $this->get('content'),
            'meta_description'  => $this->meta_description,
            'is_draft'          => (bool) $this->is_draft,
            'author'            => $this->author,
            'slug'              => $this->slug,
            'published_at'      => $published_at,
            'layout'            => $this->layout,
        ];
    }
}


text:
package com.elminster.retrieve.xbox.constants;

public interface PropertyKey {

  // The URLs
  String USER_PROFILE_URL = "USER_PROFILE_URL";
  String USER_GAME_LIST_URL = "USER_GAME_LIST_URL";
  String USER_GAME_ACHIEVE_URL = "USER_GAME_ACHIEVE_URL";

  // User Profile XPath
  String USER_PROFILE_GAME_TAG = "USER_PROFILE_GAME_TAG";
  String USER_PROFILE_GAME_PIC = "USER_PROFILE_GAME_PIC";
  String USER_PROFILE_RECENT_ACTIVE = "USER_PROFILE_RECENT_ACTIVE";
  String USER_PROFILE_GAME_SCORE = "USER_PROFILE_GAME_SCORE";
  String USER_PROFILE_REPUTATION_LEVEL = "USER_PROFILE_REPUTATION_LEVEL";
  String USER_PROFILE_LOCATION = "USER_PROFILE_LOCATION";
  String USER_PROFILE_BIO = "USER_PROFILE_BIO";

  // User Game List XPath
  String GAME_ACHIEVE_EARNED = "GAME_ACHIEVE_EARNED";
  String GAME_COMPLETION = "GAME_COMPLETION";
  String GAME_POINT_COMPLETION = "GAME_POINT_COMPLETION";
  String GAME_IMAGE = "GAME_IMAGE";
  String GAME_TITLE = "GAME_TITLE";
  String GAME_COLLECTION_LIST = "GAME_COLLECTION_LIST";
  String GAME_URL = "GAME_URL";

  // User Game Achievement XPath
  String ACHIEVE_GAME_TITLE = "ACHIEVE_GAME_TITLE";
  String ACHIEVE_POINT = "ACHIEVE_POINT";
  String ACHIEVE_COLLECTION_ITEM = "ACHIEVE_COLLECTION_ITEM";
  String ACHIEVE_DESCRIPTION = "ACHIEVE_DESCRIPTION";
  String ACHIEVE_UNLOCKED_DATE = "ACHIEVE_UNLOCKED_DATE";
  String ACHIEVE_IMAGE = "ACHIEVE_IMAGE";
  String ACHIEVE_TITLE1 = "ACHIEVE_TITLE1";
  String ACHIEVE_TITLE2 = "ACHIEVE_TITLE2";
  String ACHIEVE_DATE_FORMAT = "ACHIEVE_DATE_FORMAT";
}


text:
<default>
	<prerequisites>
		<tag type="System" />
	</prerequisites>
        <info>
		<author>Realtek</author>
		<name>Realtek r8712u</name>
		<packagename>r8712u</packagename>
		<needsRestart>Yes</needsRestart>
		<shortdescription>driver for Realtek USB wireless devices</shortdescription>
		<description>Driver for Realtek r8712u based wireless-n USB devices.</description>
	</info>
	<files type="package"> <!-- without version, without .ipk -->
		<file type="package" name="r8712u" />
	</files>
</default>


text:
/*!
 *  Liquid Slider v2.0.12
 *  http://liquidslider.com
 *  GPL license
 */

// See https://github.com/KevinBatdorf/liquidslider for version updates

/*jslint bitwise: true, browser: true */
/*global $, jQuery */
/*jshint unused:false, curly:false */

// Utility for creating objects in older browsers
if (typeof Object.create !== 'function') {
  Object.create = function(obj) {
    "use strict";
    function F() {}
    F.prototype = obj;
    return new F();
  };
}
(function($, window, document, undefined) {
  "use strict";
  var Slider = {
    //initialize

    makeResponsive: function() {
      var self = this;
      // Adjust widths and add classes to make responsive
      $(self.sliderId + '-wrapper').addClass('ls-responsive').css({
        'max-width': $(self.sliderId + ' .panel:first-child').width(),
        'width': '100%'
      });
      // Update widths
      $(self.sliderId + ' .panel-container').css('width', 100 * self.panelCountTotal + self.pSign);
      $(self.sliderId + ' .panel').css('width', 100 / self.panelCountTotal + self.pSign);

      // Cache the padding for add/removing arrows
      if (self.options.hideArrowsWhenMobile) {
        self.leftWrapperPadding = $(self.sliderId + '-wrapper').css('padding-left');
        self.rightWrapperPadding = (self.$sliderWrap).css('padding-right');
      }
      // Set events and fire on browser resize
      self.responsiveEvents();
      $(window).bind('resize', function() {
        self.responsiveEvents();

        clearTimeout(self.resizingTimeout);
        self.resizingTimeout = setTimeout(function() {
          var height = (self.options.autoHeight) ? self.getHeight() : self.getHeighestPanel(self.nextPanel);
          self.adjustHeight(false, height);
        }, 500);
      });
    },

    responsiveEvents: function() {
      var self = this,
        mobileNavChangeOver = (self.options.hideArrowsThreshold ||
          self.options.mobileUIThreshold ||
          (self.totalNavWidth + 10));
      // Since we are resizing, let's simply test the width
      if ((self.$sliderId).outerWidth() < mobileNavChangeOver) {
        if (self.options.mobileNavigation) {
          (self.navigation).css('display', 'none');
          (self.dropdown).css('display', 'block');
          (self.dropdownSelect).css('display', 'block');
          // Update the navigation
          $(self.sliderId + '-nav-select').val(self.options.mobileNavDefaultText);
        }
        if (self.options.dynamicArrows) {
          if (self.options.hideArrowsWhenMobile) {
            (self.leftArrow).remove().length = 0;
            (self.rightArrow).remove().length = 0;
          } else if (!self.options.dynamicArrowsGraphical) {
            // If using text arrows, let's move them to the top
            (self.leftArrow).css('margin-' + self.options.dynamicTabsPosition, '0');
            (self.rightArrow).css('margin-' + self.options.dynamicTabsPosition, '0');
          }
        }
      } else {
        if (self.options.mobileNavigation) {
          (self.navigation).css('display', 'block');
          (self.dropdown).css('display', 'none');
          (self.dropdownSelect).css('display', 'none');
        }
        if (self.options.dynamicArrows) {
          if (self.options.hideArrowsWhenMobile &&
            (!(self.leftArrow).length || !(self.rightArrow).length)) {
            self.addArrows();
            self.registerArrows();
          } else if (!self.options.dynamicArrowsGraphical) {
            // Reposition the text arrows
            (self.leftArrow).css('margin-' +
              self.options.dynamicTabsPosition, (self.navigation).css('height'));
            (self.rightArrow).css('margin-' +
              self.options.dynamicTabsPosition, (self.navigation).css('height'));
          }
        }
      }
      // While resizing, set the width to 100%
      $(self.sliderId + '-wrapper').css('width', '100%');

      // Update when the select box changes
      if (self.options.mobileNavigation) {
        (self.dropdownSelect).change(function() {
          self.setNextPanel(parseInt($(this).val().split('tab')[1], 10) - 1);
        });
      }
    },

    addNavigation: function(navClass) {
      var self = this,
        dynamicTabsElm = '<' + self.options.navElementTag + ' class="ls-nav">

</' + self.options.navElementTag + '>';
      // Add basic frame
      if (self.options.dynamicTabsPosition === 'bottom') {
        (self.$sliderId).after(dynamicTabsElm);
      } else {
        (self.$sliderId).before(dynamicTabsElm);
      }

      // Add responsive navigation
      if (self.options.mobileNavigation) {
        var selectBoxDefault = (self.options.mobileNavDefaultText) ?
          '<option disabled="disabled" selected="selected">' +
          self.options.mobileNavDefaultText + '</option>' :
          null,
          dropDownList = '
<select id="' +
            (self.$elem).attr('id') + '-nav-select" name="navigation">' +
            selectBoxDefault + '</select>
';
        // cache elements
        self.navigation = $(self.sliderId + '-nav-ul').before(dropDownList);
        self.dropdown = $(self.sliderId + '-wrapper .ls-select-box');
        self.dropdownSelect = $(self.sliderId + '-nav-select');

        $.each(
          (self.$elem).find(self.options.panelTitleSelector),
          function(n) {
            $((self.$sliderWrap)).find('.ls-select-box select')
              .append('<option value="tab' + (n + 1) + '">' +
              $(this).text() + '</option>');
          }
        );
      }
      // Add standard navigation
      $.each(
        (self.$elem).find(self.options.panelTitleSelector),
        function(n) {
          $((self.$sliderWrap)).find('.ls-nav ul').append('
' + self.getNavInsides(this) + '
');
          if (!self.options.includeTitle) $(this).remove();
        }
      );
    },

    getNavInsides: function(input) {
      return (this.options.dynamicTabsHtml) ? $(input).html() : $(input).text();
    },

    alignNavigation: function() {
      var self = this,
        arrow = (self.options.dynamicArrowsGraphical) ? '-arrow' : '';
      // Set the alignment, adjusting for margins
      if (self.options.dynamicTabsAlign !== 'center') {
        if (!self.options.responsive) {
          $((self.$sliderWrap)).find('.ls-nav ul').css(
            'margin-' + self.options.dynamicTabsAlign,
            // Finds the width of the arrows and the margin
            $((self.$sliderWrap)).find(
              '.ls-nav-' +
              self.options.dynamicTabsAlign +
              arrow
            ).outerWidth(true) + parseInt((self.$sliderId)
              .css('margin-' + self.options.dynamicTabsAlign), 10)
          );
        }
        $((self.$sliderWrap)).find('.ls-nav ul').css('float', self.options.dynamicTabsAlign);
      }
      self.totalNavWidth = $((self.$sliderWrap)).find('.ls-nav ul').outerWidth(true);
      if (self.options.dynamicTabsAlign === 'center') {
        // Get total width of the navigation tabs and center it
        self.totalNavWidth = 0;
        $((self.$sliderWrap)).find('.ls-nav li a').each(function() {
          self.totalNavWidth += $(this).outerWidth(true);
        });
        $((self.$sliderWrap)).find('.ls-nav ul').css('width', self.totalNavWidth + 1);
      }
    },

    registerNav: function() {
      var self = this;
      (self.$sliderWrap).find('[class^=ls-nav] li').on('click', function() {
        self.setNextPanel(parseInt($(this).attr('class').split('tab')[1], 10) - 1);
        return false;
      });
    },

    addArrows: function(arrowClass) {
      var self = this,
        arrow = (self.options.dynamicArrowsGraphical) ? "-arrow " : ' ';
      (self.$sliderWrap).addClass("arrows");

      if (self.options.dynamicArrowsGraphical) {
        self.options.dynamicArrowLeftText = '';
        self.options.dynamicArrowRightText = '';
      }
      // Build the arrows
      (self.$sliderId).before('
' +
        self.options.dynamicArrowLeftText + '
');
      (self.$sliderId).after('
' +
        self.options.dynamicArrowRightText + '
');

      self.leftArrow = $(self.sliderId + '-wrapper [class^=ls-nav-left]')
        .css('visibility', "hidden").addClass('ls-hidden');
      self.rightArrow = $(self.sliderId + '-wrapper [class^=ls-nav-right]')
        .css('visibility', "hidden").addClass('ls-hidden');
      if (!self.options.hoverArrows) self.hideShowArrows(undefined, true, true, false);
    },

    hideShowArrows: function(speed, forceVisibility, showBoth, hideBoth) {
      var self = this,
        fadeOut = (typeof speed !== 'undefined') ? speed : self.options.fadeOutDuration,
        fadeIn = (typeof speed !== 'undefined') ? speed : self.options.fadeInDuration,
        visibility = forceVisibility ? "visible" : "hidden";

      if (!showBoth && (hideBoth || (self.sanatizeNumber(self.nextPanel) === 1))) {
        self.leftArrow.stop().fadeTo(fadeOut, 0, function() {
          $(this).css('visibility', visibility).addClass('ls-hidden');
        });
      } else if (showBoth || self.leftArrow.hasClass('ls-hidden')) {
        self.leftArrow.stop().css('visibility', "visible").fadeTo(fadeIn, 1).removeClass('ls-hidden');
      }
      if (!showBoth && (hideBoth || (self.sanatizeNumber(self.nextPanel) === self.panelCount))) {
        self.rightArrow.stop().fadeTo(fadeOut, 0, function() {
          $(this).css('visibility', visibility).addClass('ls-hidden');
        });
      } else if (showBoth || self.rightArrow.hasClass('ls-hidden')) {
        self.rightArrow.stop().css('visibility', "visible").fadeTo(fadeIn, 1).removeClass('ls-hidden');
      }
    },

    registerArrows: function() {
      var self = this;
      $((self.$sliderWrap).find('[class^=ls-nav-]')).on('click', function() {
        self.setNextPanel($(this).attr('class').split(' ')[0].split('-')[2]);
      });
    },

    registerCrossLinks: function() {
      var self = this;
      // Find cross links
      self.crosslinks = $('[data-liquidslider-ref*=' + (self.sliderId).split('#')[1] + ']');
      (self.crosslinks).on('click', function(e) {
        if (self.options.autoSlide === true)
          self.startAutoSlide(true);
        self.setNextPanel(self.getPanelNumber(($(this).attr('href').split('#')[1]), self.options.panelTitleSelector));
        e.preventDefault();
      });
      self.updateClass();
    },

    registerTouch: function() {
      var self = this,
      args = self.options.swipeArgs || {
        fallbackToMouseEvents: false,
        allowPageScroll: "vertical",
        swipe: function(e, dir) {
          if (dir === 'up' || dir === 'down')
            return false;
          // Reverse the swipe direction
          self.swipeDir = (dir === 'left') ? 'right' : 'left';
          self.setNextPanel(self.swipeDir);
        }};
      $(self.sliderId + ' .panel').swipe(args);
    },

    registerKeyboard: function() {
      var self = this;
      $(document).keydown(function(event) {
        var key = event.keyCode || event.which;
        if (event.target.type !== 'textarea' && event.target.type !== 'textbox') {
          // Off the autoSlider
          if (!self.options.forceAutoSlide)
            $(this).trigger('click');
          if (key === self.options.leftKey)
            self.setNextPanel('right');
          if (key === self.options.rightKey)
            self.setNextPanel('left');
          $.each(self.options.panelKeys, function(index, value) {
            if (key === value) {
              self.setNextPanel(index - 1);
            }
          });
        }
      });
    },

    autoSlide: function() {
      var self = this;
      // Can't set the autoSlide slower than the easing ;-)
      if (self.options.autoSlideInterval < self.options.slideEaseDuration) {
        self.options.autoSlideInterval =
          (self.options.slideEaseDuration > self.options.heightEaseDuration) ?
          self.options.slideEaseDuration : self.options.heightEaseDuration;
      }
      self.autoSlideTimeout = setTimeout(function() {
        // Slide left or right
        self.setNextPanel(self.options.autoSlideDirection);
        self.autoSlide();
      }, self.options.autoSlideInterval);
    },

    stopAutoSlide: function() {
      var self = this;
      self.options.autoSlide = false;
      clearTimeout(self.autoSlideTimeout);
    },

    startAutoSlide: function(reset) {
      var self = this;
      self.options.autoSlide = true;
      if (!reset) self.setNextPanel(self.options.autoSlideDirection);
      self.autoSlide(clearTimeout(self.autoSlideTimeout));
    },

    updateHashTags: function() {
      var self = this,
        filtered = (self.nextPanel === self.panelCount) ? 0 : self.nextPanel;
      window.location.hash = self.getFromPanel(self.options.hashTitleSelector, filtered);
    },

    adjustHeight: function(noAnimation, height, easing, duration) {
      var self = this;
      if (noAnimation || self.useCSS) {
        if (noAnimation) self.configureCSSTransitions('0', '0');
        (self.$sliderId).height(height);
        if (noAnimation) self.configureCSSTransitions();
        return;
      }
      (self.$sliderId).animate({
        'height': height + 'px'
      }, {
        easing: easing || self.options.heightEaseFunction,
        duration: duration || self.options.heightEaseDuration,
        queue: false
      });
    },

    getHeight: function(height) {
      var self = this;
      height = height || self.$panelClass.eq(self.sanatizeNumber(self.nextPanel) - 1).outerHeight(true);
      // If the height in the settings be higher, honor thy
      height = (height < self.options.minHeight) ? self.options.minHeight : height;
      return height;
    },

    addPreloader: function() {
      var self = this;
      $(self.sliderId + '-wrapper').append('

');
    },

    removePreloader: function() {
      var self = this;
      $(self.sliderId + '-wrapper .ls-preloader').fadeTo('slow', 0, function() {
        $(this).remove();
      });
    },

    init: function(options, elem) {
      var self = this;
      // Cache the element
      self.elem = elem;
      self.$elem = $(elem);

      $('body').removeClass('no-js');

      // Cache the ID and class. This allows for multiple instances with any ID name supplied
      self.sliderId = '#' + (self.$elem).attr('id');
      self.$sliderId = $(self.sliderId);

      // Set the options
      self.options = $.extend({}, $.fn.liquidSlider.options, options);

      // Variable for the % sign if needed (responsive), otherwise px
      self.pSign = (self.options.responsive) ? '%' : 'px';

      if (self.options.responsive) {
        // jQuery or CSS3 ?
        self.determineAnimationType();
      } else {
        // Disable some stuff
        self.options.mobileNavigation = false;
        self.options.hideArrowsWhenMobile = false;
      }

      // If using animate.css, add the class here and disable other options.
      if (self.options.slideEaseFunction === "animate.css") {
        if (!self.useCSS) {
          self.options.slideEaseFunction = self.options.slideEaseFunctionFallback;
        } else {
          self.options.continuous = false;
          self.animateCSS = true;
        }
      }
      // Build the tabs and navigation
      self.build();

      // Register events
      self.events();
      // Fix width
      if (!self.options.responsive && self.options.dynamicArrows)
        self.$sliderWrap.width(self.$sliderId.outerWidth(true) +
          self.leftArrow.outerWidth(true) +
          self.rightArrow.outerWidth(true));

      self.loaded = true;

      $(window).bind("load", function() {
        self.options.preload.call(self);
      });
    },

    build: function() {
      var self = this,
        isAbsolute;
      // Wrap the entire slider unless manually there
      if ((self.$sliderId).parent().attr('class') !== 'ls-wrapper') {
        (self.$sliderId).wrap('

');
      }
      // Cache the wrapper
      self.$sliderWrap = $(self.sliderId + '-wrapper');

      if (self.options.preloader) self.addPreloader();

      // Add the .panel class to the individual panels
      $(self.sliderId).children().addClass((self.$elem).attr('id') + '-panel panel');
      self.panelClass = self.sliderId + ' .' + (self.$elem).attr('id') + '-panel:not(.clone)';
      self.$panelClass = $(self.panelClass);

      // Wrap all panels in a div, and wrap inner content in a div (not backwards compatible)
      (self.$panelClass).wrapAll('

');
      (self.$panelClass).wrapInner('

');
      self.panelContainer = (self.$panelClass).parent();
      self.$panelContainer = self.panelContainer;

      // If using fade transition, add the class here and disable other options.
      if (self.options.slideEaseFunction === "fade") {
        (self.$panelClass).addClass('fade');
        self.options.continuous = false;
        self.fade = true;
      }

      // Build navigation tabs
      if (self.options.dynamicTabs)
        self.addNavigation();
      else
        self.options.mobileNavigation = false;

      // Build navigation arrows or disable features
      if (self.options.dynamicArrows) {
        self.addArrows();
      } else {
        self.options.hoverArrows = false;
        self.options.hideSideArrows = false;
        self.options.hideArrowsWhenMobile = false;
      }
      // Create a container width to allow for a smooth float right. Won't calculate arrows if absolute
      isAbsolute = ((self.$leftArrow) && (self.$leftArrow).css('position') === 'absolute') ? 0 : 1;

      // Set slider width
      self.totalSliderWidth = (self.$sliderId).outerWidth(true) +
        ($(self.$leftArrow).outerWidth(true)) * isAbsolute +
        ($(self.$rightArrow).outerWidth(true)) * isAbsolute;
      $((self.$sliderWrap)).css('width', self.totalSliderWidth);

      // Align navigation tabs
      if (self.options.dynamicTabs) self.alignNavigation();

      if (self.options.hideSideArrows) self.options.continuous = false;

      // Clone panels if continuous is enabled
      if (self.options.continuous) {
        (self.$panelContainer).prepend((self.$panelContainer).children().last().clone().addClass('clone'));
        (self.$panelContainer).append((self.$panelContainer).children().eq(1).clone().addClass('clone'));
      }
      var clonedCount = (self.options.continuous) ? 2 : 0;

      // Count the number of panels and get the combined width
      self.panelCount = $(self.panelClass).length;
      self.panelCountTotal = (self.fade) ? 1 : self.panelCount + clonedCount;
      self.panelWidth = $(self.panelClass).outerWidth();
      self.totalWidth = self.panelCountTotal * self.panelWidth;

      // Apply the width to the panel container
      $(self.sliderId + ' .panel-container').css('width', self.totalWidth);

      //How far should we slide?
      self.slideDistance = (self.options.responsive) ? 100 : $(self.sliderId).outerWidth();
      if (self.useCSS) {
        self.totalWidth = 100 * self.panelCountTotal;
        self.slideDistance = 100 / self.panelCountTotal;
      }
      // Make responsive
      if (self.options.responsive) self.makeResponsive();

      // Apply starting position
      self.prepareTransition(self.getFirstPanel(), true);

      // Update the class
      self.updateClass();
    },

    determineAnimationType: function() {
      var self = this,
        animationstring = 'animation',
        keyframeprefix = '',
        domPrefixes = 'Webkit Moz O ms Khtml'.split(' '),
        pfx = '',
        i = 0;
      // Decide whether or not to use CSS transitions or jQuery
      // https://developer.mozilla.org/en-US/docs/CSS/CSS_animations/Detecting_CSS_animation_support
      self.useCSS = false;
      if (self.elem.style.animationName) {
        self.useCSS = true;
      }
      if (self.useCSS === false) {
        for (i = 0; i < domPrefixes.length; i++) {
          if (self.elem.style[domPrefixes[i] + 'AnimationName'] !== undefined) {
            pfx = domPrefixes[i];
            animationstring = pfx + 'Animation';
            keyframeprefix = '-' + pfx.toLowerCase() + '-';
            self.useCSS = true;
            break;
          }
        }
      }
      if (document.documentElement.clientWidth > self.options.useCSSMaxWidth) {
        self.useCSS = false;
      }
    },

    configureCSSTransitions: function(slide, height) {
      var self = this,
        slideTransition,
        heightTransition;
      self.easing = {
        // Penner equations
        easeOutCubic: 'cubic-bezier(.215,.61,.355,1)',
        easeInOutCubic: 'cubic-bezier(.645,.045,.355,1)',
        easeInCirc: 'cubic-bezier(.6,.04,.98,.335)',
        easeOutCirc: 'cubic-bezier(.075,.82,.165,1)',
        easeInOutCirc: 'cubic-bezier(.785,.135,.15,.86)',
        easeInExpo: 'cubic-bezier(.95,.05,.795,.035)',
        easeOutExpo: 'cubic-bezier(.19,1,.22,1)',
        easeInOutExpo: 'cubic-bezier(1,0,0,1)',
        easeInQuad: 'cubic-bezier(.55,.085,.68,.53)',
        easeOutQuad: 'cubic-bezier(.25,.46,.45,.94)',
        easeInOutQuad: 'cubic-bezier(.455,.03,.515,.955)',
        easeInQuart: 'cubic-bezier(.895,.03,.685,.22)',
        easeOutQuart: 'cubic-bezier(.165,.84,.44,1)',
        easeInOutQuart: 'cubic-bezier(.77,0,.175,1)',
        easeInQuint: 'cubic-bezier(.755,.05,.855,.06)',
        easeOutQuint: 'cubic-bezier(.23,1,.32,1)',
        easeInOutQuint: 'cubic-bezier(.86,0,.07,1)',
        easeInSine: 'cubic-bezier(.47,0,.745,.715)',
        easeOutSine: 'cubic-bezier(.39,.575,.565,1)',
        easeInOutSine: 'cubic-bezier(.445,.05,.55,.95)',
        easeInBack: 'cubic-bezier(.6,-.28,.735,.045)',
        easeOutBack: 'cubic-bezier(.175,.885,.32,1.275)',
        easeInOutBack: 'cubic-bezier(.68,-.55,.265,1.55)'
      };
      // Build a CSS class depending on the type of transition
      if (self.useCSS) {
        slideTransition = 'all ' + (slide || self.options.slideEaseDuration) + 'ms ' +
          self.easing[self.options.slideEaseFunction];
        heightTransition = 'all ' + (height || self.options.heightEaseDuration) + 'ms ' +
          self.easing[self.options.heightEaseFunction];
        // Build the width transition rules
        $(self.panelContainer).css({
          '-webkit-transition': slideTransition,
          '-moz-transition': slideTransition,
          '-ms-transition': slideTransition,
          '-o-transition': slideTransition,
          'transition': slideTransition
        });
        // Build the height transition rules
        if (self.options.autoHeight) {
          (self.$sliderId).css({
            '-webkit-transition': heightTransition,
            '-moz-transition': heightTransition,
            '-ms-transition': heightTransition,
            '-o-transition': heightTransition,
            'transition': heightTransition
          });
        }
      }
    },

    transitionFade: function() {
      var self = this;
      $(self.panelClass).eq(self.nextPanel)
        .fadeTo(self.options.fadeInDuration, 1.0).css('z-index', 1);
      $(self.panelClass).eq(self.prevPanel)
        .fadeTo(self.options.fadeOutDuration, 0).css('z-index', 0);
      self.callback(self.options.callback, true);
    },

    hover: function() {
      var self = this;

      (self.$sliderWrap).hover(
        function() {
          if (self.options.hoverArrows)
            self.hideShowArrows(self.options.fadeInDuration, true, true, false);

          if (self.options.pauseOnHover)
            clearTimeout(self.autoSlideTimeout);
        },
        function() {
          if (self.options.hoverArrows)
            self.hideShowArrows(self.options.fadeOutnDuration, true, false, true);

          if (self.options.pauseOnHover && self.options.autoSlide)
            self.startAutoSlide();
        }
      );
    },

    events: function() {
      var self = this;

      if (self.options.dynamicArrows) self.registerArrows();
      if (self.options.crossLinks) self.registerCrossLinks();
      if (self.options.dynamicTabs) self.registerNav();
      if (self.options.swipe) self.registerTouch();
      if (self.options.keyboardNavigation) self.registerKeyboard();

      // Click to stop autoSlider
      (self.$sliderWrap).find('*').on('click', function() {
        if (self.options.forceAutoSlide)
          self.startAutoSlide(true);
        else if (self.options.autoSlide)
          self.stopAutoSlide();
      });
      self.hover();
    },

    setNextPanel: function(direction) {
      var self = this;
      if (direction === self.nextPanel)
        return;
      self.prevPanel = self.nextPanel;
      if (self.loaded) {
        if (typeof direction === 'number') {
          self.nextPanel = direction;
        } else {
          // "left" = -1; "right" = 1;
          self.nextPanel += (~~(direction === 'right') || -1);
          // If not continuous, slide back at the last or first panel
          if (!self.options.continuous)
            self.nextPanel = (self.nextPanel < 0) ? self.panelCount - 1 : (self.nextPanel % self.panelCount);
        }
      if (self.fade || self.animateCSS)
        self.prepareTransition(self.nextPanel);
      else
        self.verifyPanel();
      }
    },

    getFirstPanel: function() {
      var self = this,
        output;
      // is there a hash tag?
      if (self.options.hashLinking) {
        output = self.getPanelNumber(window.location.hash, self.options.hashTitleSelector);
        // Default to panel 1 if mistyped
        if (typeof(output) !== 'number') {
          output = 0;
        }
      }
      return (output) ? output : self.options.firstPanelToLoad - 1;
    },

    getPanelNumber: function(input, searchTerm) {
      var self = this,
        title,
        output = input.replace('#', '').toLowerCase();
      // Return the num that matches the panel, or return whats given.
      (self.$panelClass).each(function(i) {
        title = self.convertRegex($(this).find(searchTerm).text());
        if (title === output) {
          output = i + 1;
        }
      });
      return (parseInt(output, 10) ? parseInt(output, 10) - 1 : output);
    },

    getFromPanel: function(searchTerm, panelNumber) {
      var self = this;
      // Return string that matches selector.
      return self.convertRegex(self.$panelClass.find(searchTerm).eq(panelNumber).text());
    },

    convertRegex: function(input) {
      return input
      .replace(/[^\w -]+/g,'')
      .replace(/ +/g,'-')
      .toLowerCase();
    },

    updateClass: function() {
      var self = this;
      if (self.options.dynamicTabs) {
        $((self.$sliderWrap)).find('.tab' + self.sanatizeNumber(self.nextPanel) + ':first a')
          .addClass('current')
          .parent().siblings().children().removeClass('current');
      }
      // Add current class to cross linked Tabs
      if (self.options.crossLinks && self.crosslinks) {
        (self.crosslinks).not(self.nextPanel).removeClass('currentCrossLink');
        (self.crosslinks).each(function() {
          if ($(this).attr('href') === ('#' +
            self.getFromPanel(self.options.panelTitleSelector, self.sanatizeNumber(self.nextPanel) - 1))) {
              $(this).addClass('currentCrossLink');
          }
       });
      }
      // Set current panel class
      self.$panelClass.eq(self.nextPanel)
          .addClass('currentPanel')
          .siblings().removeClass('currentPanel');
    },

    sanatizeNumber: function(panel) {
      var self = this;
      // spits out real numbers, 1-based
      if (panel >= self.panelCount) {
        return 1;
      } else if (panel <= -1) {
        return self.panelCount;
      } else {
        return panel + 1;
      }
    },

    finalize: function() {
      var self = this;
      // Adjust the height again
      var height = (self.options.autoHeight) ? self.getHeight() : self.getHeighestPanel(self.nextPanel);
      if (self.options.autoHeight)
        self.adjustHeight(true, height);
      if (self.options.autoSlide) self.autoSlide();
      if (self.options.preloader) self.removePreloader();
      self.onload();
    },

    callback: function(callbackFn, isFade) {
      var self = this;
      if (callbackFn && self.loaded) {
        if (self.useCSS && typeof isFade !== 'undefined') {
          $('.panel-container').one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend',
            function(e) {
              callbackFn.call(self);
            });
        } else {
          setTimeout(function() {
            callbackFn.call(self);
          }, self.options.slideEaseDuration + 50);
        }
      }
    },

    onload: function() {
      var self = this;
      self.options.onload.call(self);
    },

    prepareTransition: function(nextPanel, noAnimation, noPretransition, noPosttransition) {
      var self = this;
      // Override panel
      self.nextPanel = nextPanel || 0;
      // Option to not update classes, etc
      if (!noPretransition) self.pretransition(self.options.pretransition);
      // stores some variables, then sends to pretransition hook
      self.noAnimation = noAnimation;
      self.noPosttransition = noPosttransition;
      if (!self.loaded)
        self.transition();
      else
        self.options.pretransition.call(self);
    },

    pretransition: function() {
      var self = this,
        marginLeft;
      if (self.options.hashLinking) self.updateHashTags();
      if (self.options.mobileNavigation) self.dropdownSelect.val('tab' + (self.nextPanel + 1));
      if (self.options.hideSideArrows) self.hideShowArrows();
      self.updateClass();
    },

    getTransitionMargin: function() {
      var self = this;
      return -(self.nextPanel * self.slideDistance) -
        (self.slideDistance * ~~(self.options.continuous));
    },

    transition: function() {
      var self = this,
          marginLeft = self.getTransitionMargin();

      if(self.animateCSS && self.loaded) {
        self.transitionOutAnimateCSS();
        return false;
      }

      if ((marginLeft + self.pSign) !== (self.panelContainer).css('margin-left') || (marginLeft !== -100)) {
        if (self.options.autoHeight && !self.animateCSS)
          self.adjustHeight(true, self.getHeight());
        // SLIDE!
        if (self.fade)
          self.transitionFade();
        else if (self.animateCSS)
          self.transitionInAnimateCSS(marginLeft);
        else if (self.useCSS)
          self.transitionCSS(marginLeft, self.noAnimation);
        else
          self.transitionjQuery(marginLeft, self.noAnimation);
      }
      if (!self.noPosttransition) self.callback(self.options.callback);
    },

    transitionOutAnimateCSS: function() {
      var self = this;
      $(self.panelClass).removeClass(self.options.animateIn + ' animated');
      $(self.panelClass).eq(self.prevPanel).addClass('animated ' + self.options.animateOut);
      self.callback(self.transitionInAnimateCSS, undefined);
    },

    transitionInAnimateCSS: function() {
      var self = this;
      if (self.options.autoHeight)
        self.adjustHeight(false, self.getHeight());
      self.transitionCSS(self.getTransitionMargin(), !self.loaded);
      $(self.panelClass).removeClass(self.options.animateOut + ' animated');
      $(self.panelClass).eq(self.nextPanel).addClass('animated ' + self.options.animateIn);
      self.callback(self.options.callback, undefined);
    },

    transitionCSS: function(marginLeft, noAnimation) {
      var self = this;
      if (noAnimation) self.configureCSSTransitions('0', '0');
      (self.panelContainer).css({
        '-webkit-transform': 'translate3d(' + marginLeft + self.pSign + ', 0, 0)',
        '-moz-transform': 'translate3d(' + marginLeft + self.pSign + ', 0, 0)',
        '-ms-transform': 'translate3d(' + marginLeft + self.pSign + ', 0, 0)',
        '-o-transform': 'translate3d(' + marginLeft + self.pSign + ', 0, 0)',
        'transform': 'translate3d(' + marginLeft + self.pSign + ', 0, 0)'
      });
      // Reset transitions
      if (noAnimation)
        self.callback(function() {
          self.configureCSSTransitions();
        });
      else
        self.configureCSSTransitions();
    },

    transitionjQuery: function(marginLeft, noAnimation) {
      var self = this;
      if (noAnimation) {
        (self.panelContainer).css('margin-left', marginLeft + self.pSign);
      } else {
        (self.panelContainer).animate({
          'margin-left': marginLeft + self.pSign
        }, {
          easing: self.options.slideEaseFunction,
          duration: self.options.slideEaseDuration,
          queue: false //,
          //complete: function () {

          //}
        });
      }
    },

    getHeighestPanel: function() {
      var self = this, height, heighest = 0;
      self.$panelClass.each(function() {
        height = $(this).outerHeight(true);
        heighest = (height > heighest) ? height : heighest;
      });
      if (!self.options.autoHeight) return heighest;
    },

    verifyPanel: function() {
      // Basically checks if we need to jump panels
      var self = this,
        clickable = false;

      // Continuous slide required careful clicking
      if (self.options.continuous) {
        // If they click beyond, run it through again.
        if (self.nextPanel > self.panelCount) {
          self.nextPanel = self.panelCount;
          self.setNextPanel(self.panelCount);
        } else if (self.nextPanel < -1) {
          self.nextPanel = -1;
          self.setNextPanel(-1);
        } else if ((!clickable) && ((self.nextPanel === self.panelCount) || (self.nextPanel === -1))) {
          // If on the edge, transport them across
          self.prepareTransition(self.nextPanel);
          self.updateClass();
          clearTimeout(cloneJumper);
          var cloneJumper = setTimeout(function() {
            // But wait first until all is rested
            if (self.nextPanel === self.panelCount) {
              self.prepareTransition(0, true, true, true);
            } else if (self.nextPanel === -1) {
              self.prepareTransition(self.panelCount - 1, true, true, true);
            }
          }, self.options.slideEaseDuration + 50);
        } else {
          clickable = true;
          self.prepareTransition(self.nextPanel);
        }
      } else {
        // Non-continuous just needs to stay in bounds
        if (self.nextPanel === self.panelCount) {
          self.nextPanel = 0;
        } else if (self.nextPanel === -1) {
          self.nextPanel = (self.panelCount - 1);
        }
        self.prepareTransition(self.nextPanel);
      }
    }
  };

  $.fn.liquidSlider = function(options) {
    return this.each(function() {
      var slider = Object.create(Slider);
      slider.init(options, this);
      $.data(this, 'liquidSlider', slider);
    });
  };

  $.fn.liquidSlider.options = {
    autoHeight: true,
    minHeight: 0,
    heightEaseDuration: 1500,
    heightEaseFunction: "easeInOutExpo",

    slideEaseDuration: 1500,
    slideEaseFunction: "easeInOutExpo",
    slideEaseFunctionFallback: "easeInOutExpo",
    animateIn: "bounceInRight",
    animateOut: "bounceOutRight",
    continuous: true,
    fadeInDuration: 500,
    fadeOutDuration: 500,

    autoSlide: false,
    autoSlideDirection: 'right',
    autoSlideInterval: 6000,
    forceAutoSlide: false,
    pauseOnHover: false,

    dynamicArrows: true,
    dynamicArrowsGraphical: true,
    dynamicArrowLeftText: "« left",
    dynamicArrowRightText: "right »",
    hideSideArrows: false,
    hideSideArrowsDuration: 750,
    hoverArrows: true,
    hoverArrowDuration: 250,

    dynamicTabs: true,
    dynamicTabsHtml: true,
    includeTitle: true,
    panelTitleSelector: ".title",
    dynamicTabsAlign: "left",
    dynamicTabsPosition: "top",
    navElementTag: "div",

    firstPanelToLoad: 1,
    crossLinks: false,
    hashLinking: false,
    hashTitleSelector: ".title",

    keyboardNavigation: false,
    leftKey: 39,
    rightKey: 37,
    panelKeys: {
      1: 49,
      2: 50,
      3: 51,
      4: 52
    },

    responsive: true,
    mobileNavigation: true,
    mobileNavDefaultText: 'Menu',
    mobileUIThreshold: 0,
    hideArrowsWhenMobile: true,
    hideArrowsThreshold: 0,
    useCSSMaxWidth: 2200,

    preload: function() {
      this.finalize();
    },
    onload: function() {},
    pretransition: function() {
      this.transition();
    },
    callback: function() {},

    preloader: false,
    swipe: true,
    swipeArgs: undefined
  };

})(jQuery, window, document);


text:
package jadx.core.dex.visitors.rename;

import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

import org.jetbrains.annotations.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import jadx.api.data.ICodeData;
import jadx.api.data.ICodeRename;
import jadx.api.data.IJavaCodeRef;
import jadx.api.data.IJavaNodeRef;
import jadx.core.dex.instructions.args.RegisterArg;
import jadx.core.dex.instructions.args.SSAVar;
import jadx.core.dex.nodes.ClassNode;
import jadx.core.dex.nodes.MethodNode;
import jadx.core.dex.nodes.RootNode;
import jadx.core.dex.visitors.AbstractVisitor;
import jadx.core.dex.visitors.InitCodeVariables;
import jadx.core.dex.visitors.JadxVisitor;
import jadx.core.dex.visitors.debuginfo.DebugInfoApplyVisitor;
import jadx.core.utils.exceptions.JadxException;

@JadxVisitor(
		name = "ApplyCodeRename",
		desc = "Rename variables and other entities in methods",
		runAfter = {
				InitCodeVariables.class,
				DebugInfoApplyVisitor.class
		}
)
public class CodeRenameVisitor extends AbstractVisitor {

	private static final Logger LOG = LoggerFactory.getLogger(CodeRenameVisitor.class);

	private Map<String, List<ICodeRename>> clsRenamesMap;

	@Override
	public void init(RootNode root) throws JadxException {
		updateRenamesMap(root.getArgs().getCodeData());
		root.registerCodeDataUpdateListener(this::updateRenamesMap);
	}

	@Override
	public boolean visit(ClassNode cls) {
		List<ICodeRename> renames = getRenames(cls);
		if (!renames.isEmpty()) {
			applyRenames(cls, renames);
		}
		cls.getInnerClasses().forEach(this::visit);
		return false;
	}

	private static void applyRenames(ClassNode cls, List<ICodeRename> renames) {
		for (ICodeRename rename : renames) {
			IJavaNodeRef nodeRef = rename.getNodeRef();
			if (nodeRef.getType() == IJavaNodeRef.RefType.METHOD) {
				MethodNode methodNode = cls.searchMethodByShortId(nodeRef.getShortId());
				if (methodNode == null) {
					LOG.warn("Method reference not found: {}", nodeRef);
				} else {
					IJavaCodeRef codeRef = rename.getCodeRef();
					if (codeRef != null) {
						processRename(methodNode, codeRef, rename);
					}
				}
			}
		}
	}

	private static void processRename(MethodNode mth, IJavaCodeRef codeRef, ICodeRename rename) {
		switch (codeRef.getAttachType()) {
			case MTH_ARG: {
				List<RegisterArg> argRegs = mth.getArgRegs();
				int argNum = codeRef.getIndex();
				if (argNum < argRegs.size()) {
					argRegs.get(argNum).getSVar().getCodeVar().setName(rename.getNewName());
				} else {
					LOG.warn("Incorrect method arg ref {}, should be less than {}", argNum, argRegs.size());
				}
				break;
			}
			case VAR: {
				int regNum = codeRef.getIndex() >> 16;
				int ssaVer = codeRef.getIndex() & 0xFFFF;
				for (SSAVar ssaVar : mth.getSVars()) {
					if (ssaVar.getRegNum() == regNum && ssaVar.getVersion() == ssaVer) {
						ssaVar.getCodeVar().setName(rename.getNewName());
						return;
					}
				}
				LOG.warn("Can't find variable ref by {}_{}", regNum, ssaVer);
				break;
			}

			default:
				LOG.warn("Rename code ref type {} not yet supported", codeRef.getAttachType());
				break;
		}
	}

	private List<ICodeRename> getRenames(ClassNode cls) {
		if (clsRenamesMap == null) {
			return Collections.emptyList();
		}
		List<ICodeRename> clsComments = clsRenamesMap.get(cls.getClassInfo().getFullName());
		if (clsComments == null) {
			return Collections.emptyList();
		}
		return clsComments;
	}

	private void updateRenamesMap(@Nullable ICodeData data) {
		if (data == null) {
			this.clsRenamesMap = Collections.emptyMap();
		} else {
			this.clsRenamesMap = data.getRenames().stream()
					.filter(r -> r.getCodeRef() != null)
					.collect(Collectors.groupingBy(r -> r.getNodeRef().getDeclaringClass()));
		}
	}
}


text:
.SUFFIXES:
#---------------------------------------------------------------------------------
ifeq ($(strip $(DEVKITARM)),)
$(error "Please set DEVKITARM in your environment. export DEVKITARM=<path to>devkitARM")
endif

include $(DEVKITARM)/ds_rules

#---------------------------------------------------------------------------------
# CONFIG-specific values
#---------------------------------------------------------------------------------
BUILD_DIR := build_r

CONFIG := RELEASE
ifeq ($(CONFIG), DEBUG)
	BUILD_DIR := build_d
else
	OPTFLAGS := -O2 -fomit-frame-pointer -ffast-math
	PREPRO_DEFS := -DNDEBUG
endif

#---------------------------------------------------------------------------------
# BUILD is the directory where object files & intermediate files will be placed
# SOURCES is a list of directories containing source code
# INCLUDES is a list of directories containing extra header files
# DATA is a list of directories containing binary files
# all directories are relative to this makefile
#---------------------------------------------------------------------------------
BUILD		:=	$(BUILD_DIR)
SOURCES		:=	source
INCLUDES	:=	include $(BUILD) ../arm9/source
DATA		:=

#---------------------------------------------------------------------------------
# options for code generation
#---------------------------------------------------------------------------------
ARCH	:=	-mthumb-interwork

CFLAGS	:=	-g -Wall $(OPTFLAGS) \
		-mcpu=arm7tdmi -mtune=arm7tdmi \
		$(ARCH)

CFLAGS	+=	$(INCLUDE) -DARM7
CFLAGS  +=	$(PREPRO_DEFS)

#CXXFLAGS	:=	$(CFLAGS) -fno-rtti -fno-exceptions
CXXFLAGS	:=	$(CFLAGS) -fno-exceptions

ASFLAGS	:=	-g $(ARCH)
LDFLAGS	=	-specs=ds_arm7.specs -g $(ARCH) -Wl,-Map,$(notdir $*).map

LIBS	:=	-ldswifi7 -lmm7 -lnds7

#---------------------------------------------------------------------------------
# list of directories containing libraries, this must be the top level containing
# include and lib
#---------------------------------------------------------------------------------
LIBDIRS	:=	$(LIBNDS)

#---------------------------------------------------------------------------------
# no real need to edit anything past this point unless you need to add additional
# rules for different file extensions
#---------------------------------------------------------------------------------
ifneq ($(BUILD),$(notdir $(CURDIR)))
#---------------------------------------------------------------------------------

export ARM7BIN	:=	$(TOPDIR)/$(TARGET).arm7
export ARM7ELF	:=	$(CURDIR)/$(TARGET).arm7.elf
export DEPSDIR	:=	$(CURDIR)/$(BUILD)

export VPATH	:=	$(foreach dir,$(SOURCES),$(CURDIR)/$(dir))

CFILES		:=	$(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
CPPFILES	:=	$(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
SFILES		:=	$(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
BINFILES	:=	$(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))

export OFILES	:=	$(addsuffix .o,$(BINFILES)) \
			$(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o)

export INCLUDE	:=	$(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
			$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
			-I$(CURDIR)/$(BUILD)

export LIBPATHS	:=	$(foreach dir,$(LIBDIRS),-L$(dir)/lib)

#---------------------------------------------------------------------------------
# use CXX for linking C++ projects, CC for standard C
#---------------------------------------------------------------------------------
ifeq ($(strip $(CPPFILES)),)
#---------------------------------------------------------------------------------
	export LD	:=	$(CC)
#---------------------------------------------------------------------------------
else
#---------------------------------------------------------------------------------
	export LD	:=	$(CXX)
#---------------------------------------------------------------------------------
endif
#---------------------------------------------------------------------------------

.PHONY: $(BUILD) clean

#---------------------------------------------------------------------------------
$(BUILD):
	@[ -d $@ ] || mkdir -p $@
	@make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile

#---------------------------------------------------------------------------------
clean:
	@echo clean ...
	@rm -fr $(BUILD) *.elf

#---------------------------------------------------------------------------------
else

DEPENDS	:=	$(OFILES:.o=.d)

#---------------------------------------------------------------------------------
# main targets
#---------------------------------------------------------------------------------
$(ARM7BIN)	:	$(ARM7ELF)
	@$(OBJCOPY) -O binary $< $@
	@echo built ... $(notdir $@)

$(ARM7ELF)	:	$(OFILES)
	@echo linking $(notdir $@)
	@$(LD)  $(LDFLAGS) $(OFILES) $(LIBPATHS) $(LIBS) -o $@

#---------------------------------------------------------------------------------
# you need a rule like this for each extension you use as binary data
#---------------------------------------------------------------------------------
%.bin.o	:	%.bin
#---------------------------------------------------------------------------------
	@echo $(notdir $<)
	@$(bin2o)

-include $(DEPENDS)

#---------------------------------------------------------------------------------------
endif
#---------------------------------------------------------------------------------------


text:
import ExtendedVersionHandler_Default
import ExtendedVersionHandler_Offset
import ExtendedVersionHandler_Reciprocal
import ExtendedVersionHandler_ReciprocalWithOffset
import ExtendedVersionHandler_Inverse
import ExtendedVersionHandler_InverseWithOffset
import ExtendedVersionHandler_LinearDecay
import ExtendedVersionHandler_LinearDecayAndOffset
import ExtendedVersionHandler_LinearGrowth
import ExtendedVersionHandler_LinearGrowthAndOffset
import ExtendedVersionHandler_ExponentialGrowth
import ExtendedVersionHandler_ExponentialGrowthAndOffset
import ExtendedVersionHandler_ExponentialDecay
import ExtendedVersionHandler_ExponentialDecayAndOffset

extendedVersionHandlerNameList = []
for i in dir():
    splitted = i.split('_')
    if splitted[0] == 'ExtendedVersionHandler':
        extendedVersionHandlerNameList.append(splitted[1])