text:
jQuery.callback = function(o, m){
  return function(){
    return m.apply(o, arguments);
  };
};
jQuery.closeArgs = function(o, m){
  var args = Array.prototype.slice.call(arguments, 2);
  return function(){
    m.apply(o, args);
  };
};

redpajama_set_name: RedPajamaGithub


text:
@protocol SparkSelectNetworkViewControllerDelegate <NSObject>

-(void)willPopBackToDeviceDiscovery;

@end

@interface SparkSelectNetworkViewController : SparkSetupUIViewController
@property (nonatomic, strong) NSArray *wifiList;
@property (nonatomic, strong) NSString *deviceID;
@property (nonatomic) BOOL needToClaimDevice;
@property (nonatomic, weak) id <SparkSelectNetworkViewControllerDelegate> delegate;
@end


text:
package com.rtg.reader;

import static com.rtg.util.cli.CommonFlagCategories.FILTERING;
import static com.rtg.util.cli.CommonFlagCategories.INPUT_OUTPUT;
import static com.rtg.util.cli.CommonFlagCategories.UTILITY;

import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
import java.util.Map;

import com.rtg.launcher.AbstractCli;
import com.rtg.launcher.CommonFlags;
import com.rtg.mode.DNA;
import com.rtg.mode.DNAFastaSymbolTable;
import com.rtg.mode.ProteinFastaSymbolTable;
import com.rtg.mode.SequenceType;
import com.rtg.util.cli.CFlags;
import com.rtg.util.cli.CommonFlagCategories;
import com.rtg.util.cli.Validator;
import com.rtg.util.diagnostic.ErrorType;
import com.rtg.util.diagnostic.NoTalkbackSlimException;
import com.rtg.util.intervals.RegionRestriction;

/**
 * Class returns a subsequence of the residues in the given sequence.
 *
 */
public final class SdfSubseq extends AbstractCli {

  /** System dependent line separator, as byte array. */
  private static final byte[] LS_BYTES = System.lineSeparator().getBytes();

  private static final String FASTA_FLAG = "fasta";
  private static final String FASTQ_FLAG = "fastq";
  private static final String INPUT_FLAG = "input";
  private static final String SEQ_ID_FLAG = "sequence-id";
  private static final String REVERSE_FLAG = "reverse-complement";
  private static final String PRESERVE_FLAG = "Xpreserve-coordinates";

  private static final Validator VALIDATOR = new Validator() {

    @Override
    public boolean isValid(final CFlags flags) {
      if (!flags.checkNand(FASTA_FLAG, FASTQ_FLAG)) {
        return false;
      }
      if (!flags.checkNand(PRESERVE_FLAG, REVERSE_FLAG)) {
        return false;
      }
      for (Object o : flags.getAnonymousValues(0)) {
        final String restrictionString = (String) o;
        if (!RegionRestriction.validateRegion(restrictionString)) {
          flags.setParseMessage("The region value \"" + restrictionString + "\" is malformed.");
          return false;
        }
        final RegionRestriction restriction = new RegionRestriction(restrictionString);
        if (flags.isSet(SEQ_ID_FLAG)) {
          long seqId;
          try {
            seqId = Long.parseLong(restriction.getSequenceName());
          } catch (NumberFormatException e) {
            seqId = -1;
          }
          if (seqId < 0) {
            flags.setParseMessage("When --" + SEQ_ID_FLAG + " is set the <sequence_name> of the region \"" + restrictionString + "\" must be an integer greater than or equal to 0.");
            return false;
          }
        }
      }
      final File inputFile = (File) flags.getValue(INPUT_FLAG);
      if (ReaderUtils.isPairedEndDirectory(inputFile)) {
        flags.setParseMessage("Paired-end SDF not supported.");
        return false;
      }
      return true;
    }
  };

  private byte[] mCodeToBytes = null;
  private Map<String, Long> mNames = null;
  private final AbstractSdfWriter.SequenceNameHandler mHandler = new AbstractSdfWriter.SequenceNameHandler();

  @Override
  protected void initFlags() {
    CommonFlagCategories.setCategories(mFlags);
    mFlags.setDescription("Prints a subsequence of a given sequence in an SDF.");
    mFlags.registerRequired('i', INPUT_FLAG, File.class, CommonFlags.SDF, "input SDF").setCategory(INPUT_OUTPUT);
    mFlags.registerRequired(String.class, CommonFlags.REGION, "the range to display. " + CommonFlags.REGION_SPEC)
      .setCategory(FILTERING)
      .setMaxCount(Integer.MAX_VALUE);
    mFlags.registerOptional('r', REVERSE_FLAG, "if set, output in reverse complement").setCategory(UTILITY);
    mFlags.registerOptional('f', FASTA_FLAG, "if set, output in FASTA format").setCategory(UTILITY);
    mFlags.registerOptional('q', FASTQ_FLAG, "if set, output in FASTQ format").setCategory(UTILITY);
    mFlags.registerOptional('I', SEQ_ID_FLAG, "if set, use sequence id instead of sequence name in region (0-based)").setCategory(FILTERING);

    mFlags.registerOptional(PRESERVE_FLAG, "if set, pad start of sequence with N's to ensure sequence coordinates are preserved").setCategory(UTILITY);

    mFlags.setValidator(VALIDATOR);
  }

  @Override
  public String moduleName() {
    return "sdfsubseq";
  }

  @Override
  public String description() {
    return "extract a subsequence from an SDF as text";
  }

  @Override
  protected int mainExec(final OutputStream out, final PrintStream err) throws IOException {
    final boolean reverseComplement = mFlags.isSet(REVERSE_FLAG);
    try (SequencesReader reader = SequencesReaderFactory.createDefaultSequencesReaderCheckEmpty((File) mFlags.getValue(INPUT_FLAG))) {
      if (!mFlags.isSet(SEQ_ID_FLAG) && !reader.hasNames()) {
        throw new NoTalkbackSlimException(ErrorType.INFO_ERROR, "The input SDF does not have name data.");
      }
      if (mFlags.isSet(FASTQ_FLAG) && !reader.hasQualityData()) {
        throw new NoTalkbackSlimException(ErrorType.INFO_ERROR, "The input SDF does not have quality data.");
      }
      mCodeToBytes = getByteMapping(reader.type(), reverseComplement);

      if (!mFlags.isSet(SEQ_ID_FLAG)) {
        mNames = ReaderUtils.getSequenceNameMap(reader);
      }

      for (Object o : mFlags.getAnonymousValues(0)) {
        final RegionRestriction restriction = new RegionRestriction((String) o);
        final int result = extractSubseq(reader, restriction, reverseComplement, out, err);
        if (result != 0) {
          return result;
        }
      }
      out.flush();
    }
    return 0;
  }

  private int extractSubseq(final SequencesReader reader, final RegionRestriction restriction, final boolean reverseComplement, final OutputStream out, final PrintStream err) throws IOException {
    final int start = restriction.getStart() == RegionRestriction.MISSING ? 0 : restriction.getStart();
    final long sequenceId;
    if (!mFlags.isSet(SEQ_ID_FLAG)) {
      final String sequence = restriction.getSequenceName();
      final Long seqId = mNames.get(mHandler.handleSequenceName(sequence).label());
      if (seqId == null) {
        err.println("The sequence \"" + sequence + "\" could not be found.");
        return 1;
      }
      sequenceId = seqId;
    } else {
      sequenceId = Long.parseLong(restriction.getSequenceName());
    }
    if (sequenceId < 0 || sequenceId >= reader.numberSequences()) {
      err.println("The sequence id " + sequenceId + " is out of range, must be from 0 to " + (reader.numberSequences() - 1) + ".");
      return 1;
    }
    final int seqlength = reader.length(sequenceId);
    final int endpos = restriction.getEnd() == RegionRestriction.MISSING ? seqlength : restriction.getEnd(); // Convert from 1-based inclusive to 0-based exclusive
    final int length = endpos - start;
    if (start > seqlength) {
      err.println("Supplied start position \"" + (start + 1) + "\" reads past sequence end.");
      return 1;
    } else if (endpos > seqlength) {
      err.println("Supplied end position \"" + endpos + "\" reads past sequence end.");
      return 1;
    }
    final boolean isCoordsAltered = length < seqlength && !mFlags.isSet(PRESERVE_FLAG);
    char sequenceNameIdentifier = '>';
    if (mFlags.isSet(FASTQ_FLAG)) {
      sequenceNameIdentifier = '@';
    }
    if (mFlags.isSet(FASTA_FLAG) || mFlags.isSet(FASTQ_FLAG)) {
      final String name;
      if (reader.hasNames()) {
        name = isCoordsAltered ? reader.name(sequenceId) : reader.fullName(sequenceId);
      } else {
        name = String.valueOf(sequenceId);
      }
      out.write((sequenceNameIdentifier + name).getBytes());
      final String coords = isCoordsAltered ? ":" + (start + 1) + "-" + (start + length) : "";
      out.write(coords.getBytes());
      if (reverseComplement) {
        out.write("-rc".getBytes());
      }
      out.write(LS_BYTES);
    }
    byte[] buff = new byte[length];
    reader.read(sequenceId, buff, start, length);
    if (reverseComplement) {
      for (int i = length - 1; i >= 0; --i) {
        out.write(mCodeToBytes[buff[i]]);
      }
    } else {
      if (mFlags.isSet(PRESERVE_FLAG)) {
        for (int i = 0; i < start; ++i) {
          out.write(mCodeToBytes[0]);
        }
      }
      for (int i = 0; i < length; ++i) {
        out.write(mCodeToBytes[buff[i]]);
      }
    }
    out.write(LS_BYTES);

    if (mFlags.isSet(FASTQ_FLAG)) {
      out.write('+');
      out.write(LS_BYTES);
      buff = new byte[length];
      reader.readQuality(sequenceId, buff, start, length);
      if (reverseComplement) {
        for (int i = length - 1; i >= 0; --i) {
          out.write(buff[i] + 33);
        }
      } else {
        if (mFlags.isSet(PRESERVE_FLAG)) {
          for (int i = 0; i < start; ++i) {
            out.write(33);
          }
        }
        for (int i = 0; i < length; ++i) {
          out.write(buff[i] + 33);
        }
      }
      out.write(LS_BYTES);
    }
    return 0;
  }

  static byte[] getByteMapping(SequenceType type, boolean reverseComplement) {
    if (type == SequenceType.DNA) {
      if (reverseComplement) {
        final byte[] dnaCodes = new DNAFastaSymbolTable().getOrdinalToAsciiTable();
        final byte[] compCodes = new byte[dnaCodes.length];
        for (final DNA d : DNA.values()) {
          compCodes[d.ordinal()] = dnaCodes[d.complement().ordinal()];
        }
        return compCodes;
      } else {
        return new DNAFastaSymbolTable().getOrdinalToAsciiTable();
      }
    } else {
      if (reverseComplement) {
        throw new NoTalkbackSlimException("Reverse complement cannot be used with protein SDFs.");
      }
      return new ProteinFastaSymbolTable().getOrdinalToAsciiTable();
    }
  }

}


text:
import unittest
from quantum.plugins.openvswitch.ovs_quantum_plugin import VlanMap

class VlanMapTest(unittest.TestCase):

    def setUp(self):
        self.vmap = VlanMap()

    def tearDown(self):
        pass

    def testAddVlan(self):
        vlan_id = self.vmap.acquire("foobar")
        self.assertTrue(vlan_id == 2)

    def testReleaseVlan(self):
        vlan_id = self.vmap.acquire("foobar")
        self.vmap.release("foobar")
        self.assertTrue(self.vmap.get(vlan_id) == None)


text:
module Data.Dar.Get
       (
       getDARFile, getDARIndex, getDARLookup
       ) where

import Control.Applicative
import Control.Monad
import Data.Binary.Get
import qualified Data.ByteString.Lazy.Char8 as BC
import Data.List (find)
import Data.Word

import Data.Dar.Types

--
-- **************************************************
-- Functions for getting a DAR file and its DataNodes from a ByteString.

--
formatError (leftBs, pos, msg) = Left $ msg ++ " at " ++ show pos ++ " bytes"
                                 ++ " and " ++ (show $ BC.length leftBs)
                                 ++ " bytes left to consume."

-- Tries to gets the DataNodes from a DAR file (in ByteString from),
-- If the DAR file can't be parsed an error message is created that
-- includes the position where the error was and the number of bytes
-- remaining unparsed.
getDARFile :: BC.ByteString -> Either String [DataNode]
getDARFile bs =
  case (runGetOrFail getDARFile' bs) of
    -- Combines all the error details in to a single message.
    Left err -> formatError err
    -- Extract the DataNodes from the DAR file.doubleListdoubleList
    Right (_, _, val) -> Right $ dataNodes . dataDAR $ val

getDARFile' :: Get DarFile
getDARFile' = do
  header <- getDARHeader
  (Dar header)
    <$> (getINDEXHeader $ nodeCount header)
    <*> (getDATAHeader $ nodeCount header)

getDARIndex :: BC.ByteString -> Either String [IndexNode]
getDARIndex bs =
  case (runGetOrFail getDARIndex' bs) of
    Left err -> formatError err
    Right (_, _, val) -> Right $ indexNodes . indexDAR $ val

getDARIndex' :: Get DarFile
getDARIndex' = do
  header <- getDARHeader
  (Dar header)
    <$> (getINDEXHeader $ nodeCount header)
    <*> (pure $ dataDAR defaultDar)

getDARLookup :: BC.ByteString -> BC.ByteString -> Either String DataNode
getDARLookup name bs =
  case (runGetOrFail getDARIndex' bs) of
    Left err -> formatError err
    Right (_, _, iNodes) -> do
      let index = find ((==) name . identifyINode) $ indexNodes . indexDAR $ iNodes
      case index of
        Nothing -> Left "No DataNode with that name exists."
        Just iNode -> do
          let nPos = nodePosition iNode
          Right $ runGet getDATANode (BC.drop (fromIntegral nPos) bs)

getDARHeader :: Get DarHeader
getDARHeader = do
  let header = headerDAR defaultDar

  -- Get 3 bytes that identify this as a DAR file and check it.
  dar <- getLazyByteString 3
  when (dar /= (identifyDAR header))
    (fail "Not a DAR file")

  -- Get the DAR file's major and minor version numbers and check them.
  maV <- getWord8
  miV <- getWord8
  when (maV /= majorV header || miV /= minorV header)
    (fail "DAR file version incompatible")

  -- Get the number of DataNodes and the checksum.
  dataNodeNum <- getWord64le
  checksum <- getWord32le

  return $ DarH dar maV miV dataNodeNum checksum

getINDEXHeader :: Word64 -> Get IndexHeader
getINDEXHeader nodeNum = do
  name <- getLazyByteString 6
  when (name /= (identifyINDEX $ indexDAR defaultDar))
    (fail "No index header found in DAR file")

  (IndexH name) <$> replicateM (fromIntegral nodeNum) getINDEXNode

getINDEXNode :: Get IndexNode
getINDEXNode = do
  nNameLen <- getWord32le
  nName <- getLazyByteString $ fromIntegral nNameLen
  nPos <- getWord64le

  return $ IndexN nNameLen nName nPos

getDATAHeader :: Word64 -> Get DataHeader
getDATAHeader nodeNum = do
  -- Get 5 bytes that identify this as the data header of a DAR file and check it.
  name <- getLazyByteString 5
  when (name /= (identifyDATA $ dataDAR defaultDar))
    (fail "No data header found in DAR file")

                   -- Get the DataNodes from the data block.
  (DataH name) <$> replicateM (fromIntegral nodeNum) getDATANode

getDATANode :: Get DataNode
getDATANode = do
  nNameLen <- getWord32le
  nName <- getLazyByteString $ fromIntegral nNameLen
  nDataLen <- getWord64le
  nData <- getLazyByteString $ fromIntegral nDataLen

  return $ DataN nNameLen nName nDataLen nData


text:
/*****************************************************************************
 * PRODUCT OF PT INOVACAO - EST DEPARTMENT and Aveiro University - Portugal)   *
 *****************************************************************************/

package gov.nist.javax.sip.header.ims;

import javax.sip.InvalidArgumentException;
import javax.sip.header.Header;

/**
 * The P-Media-Authorization SIP Private Header - RFC 3313.
 *
 *
Sintax:

 *

 * P-Media-Authorization   = "P-Media-Authorization" HCOLON
 *                            P-Media-Authorization-Token
 *                            *(COMMA P-Media-Authorization-Token)
 * P-Media-Authorization-Token = 1*HEXDIG
 *

 *
 * @author Miguel Freitas (IT) PT-Inovacao
 */

public interface PMediaAuthorizationHeader extends Header
{

    /**
     * Name of PMediaAuthorizationHeader
     */
    public final static String NAME = "P-Media-Authorization";

    /**
     * Set the media authorization token.
     * @param token - media authorization token to set
     * @throws InvalidArgumentException - if token is null or empty
     */
    public void setMediaAuthorizationToken(String token) throws InvalidArgumentException;

    /**
     * Get the media authorization token.
     * @return token
     */
    public String getToken();

}


text:
import { combineReducers } from 'redux';
import { routerReducer as routing } from 'react-router-redux';
import { songs } from './songs.js';
import { playlist } from './playlist.js';
import { comments } from './comments.js';
import { album } from './album.js';
import { lyric } from './lyric.js';
import { songdetail } from './songdetail.js';
import { recommendplaylist } from './recommendplaylist.js';
import { banner } from './banner.js';

const rootReducer = combineReducers({
  routing,
  songs,
  playlist,
  comments,
  album,
  lyric,
  songdetail,
  recommendplaylist,
  banner
});

export default rootReducer;


text:
import { browser, element, by } from 'protractor';

export class AngularPage {
  navigateTo() {
    return browser.get('/');
  }

  getParagraphText() {
    return element(by.css('pdf-root h1')).getText();
  }
}


text:
'use strict';

angular.module('recipes.services', ['ngResource']).
    factory('UserVK', ['$http', '$rootScope', '$q', '$timeout', function($http, $rootScope, $q, $timeout) {

        var user = {
            active: false,
            uid: 0,
            sid: 0,
            firstname: '',
            lastname: '',
            isLogged: false
        };
        var deferred = $q.defer(); //todo:

        var loginInVK = function(response){
            var that = this;

            if (response.status === 'connected') {
                user.uid = response.session.mid;
                user.sid = response.session.sid;
                user.firstname = response.session.user.first_name;
                user.lastname = response.session.user.last_name;
                user.active = true;
                VK.api("users.get", {"uids": response.session.mid, "fields":"photo"}, function(data) {
                    user.isLogged = true;
                    user.avatar = data.response[0].photo;
                    $http.post('http://localhost/recipes/web/app_dev.php/api/users/login', {
                        id: user.uid,
                        firstname: user.firstname,
                        lastname: user.lastname,
                        avatar: user.avatar
                    }).success(function(response){
                        deferred.resolve(user);
                        if(!$rootScope.$$phase){
                            $rootScope.$apply();
                        }
                    });
                });
            } else {
                deferred.resolve(user);
                if(!$rootScope.$$phase){
                    $rootScope.$apply();
                }
            }
        }

        return {
            getUser: function(){
                if (user.active){
                    return $q.when(user);
                }
                VK.Auth.getLoginStatus(loginInVK, true);
                var promise = deferred.promise;
                return promise;
            },
            login: function(){
                if (user.active){
                    return $q.when(user);
                }
                VK.Auth.login(loginInVK, 1027);
                deferred = $q.defer();
                var promise = deferred.promise;
                return promise;
            }
        };
    }]);


text:
<?php

class __ContentContainer {

    protected $_top_content = array();

    protected $_content = array();

    protected $_bottom_content = array();

    protected $_embedded_content = array();

    protected $_filters = array();

    /**
     * Contains the id for current position where to append content to
     *
     * @var string
     */
    protected $_current_content_position = null;

    public function prependContent($content, $id = null) {
        $content = $this->_getStringRepresentation($content);
        if($id == null) {
            $id = uniqid();
        }
        $this->_content = array($id => $content) + $this->_content;
    }

    public function appendContent($content, $id = null) {
        return $this->addContent($content, $id);
    }

    public function dockContentOnTop($content, $id = null) {
        $content = $this->_getStringRepresentation($content);
        if($id == null) {
            $id = uniqid();
        }
        $this->_top_content[$id] = $content;
    }

    public function dockContentAtBottom($content, $id = null) {
        $content = $this->_getStringRepresentation($content);
        if($id == null) {
            $id = uniqid();
        }
        $this->_bottom_content[$id] = $content;
    }

    public function placeContentAfterElement($content, $element, $id = null) {
        $content = $this->_getStringRepresentation($content);
        if($id == null) {
            $id = uniqid();
        }
        $this->_embedded_content[$id] = array($content, $element);
    }

    public function addContent($content, $id = null, $after_content_id = null) {
        $content = $this->_getStringRepresentation($content);
        if($after_content_id != null) {
            if(!key_exists($after_content_id, $this->_content)) {
                throw __ExceptionFactory::getInstance()->createException('ERR_CONTENT_ID_NOT_FOUND', array($after_content_id));
            }
            if($id == null) {
                $id = uniqid();
            }
            $this->_content = $this->_push_after($this->_content, array($id => $content), $after_content_id);
        }
        else if($id != null) {
            $this->_content[$id] = $content;
            $this->_current_content_position = null;
        }
        else {
            if($this->_current_content_position != null && key_exists($this->_current_content_position, $this->_content)) {
                $this->_content[$this->_current_content_position] .= $content;
            }
            else {
                $id = uniqid();
                $this->_content[$id] = $content;
                $this->_current_content_position = $id;
            }
        }
    }

    protected function _getStringRepresentation($content) {
        if(is_string($content)) {
            return $content;
        }
        else if(method_exists($content, '__toString')) {
            return $content->__toString();
        }
        else {
            return print_r($content, true);
        }
    }

    public function addPostFilter($content_container_postfilter) {
        $this->_postfilters[] = $content_container_postfilter;
    }

    public function clearContent($id = null) {
        if($id == null) {
            $this->_top_content    = array();
            $this->_content        = array();
            $this->_bottom_content = array();
            $this->_embedded_content = array();
        }
        else {
            if(key_exists($id, $this->_top_content)) {
                unset($this->_top_content[$id]);
            }
            if(key_exists($id, $this->_content)) {
                unset($this->_content[$id]);
            }
            if(key_exists($id, $this->_bottom_content)) {
                unset($this->_bottom_content[$id]);
            }
            if(key_exists($id, $this->_embedded_content)) {
                unset($this->_embedded_content[$id]);
            }
        }
    }

    /**
     * Alias of clearContent
     *
     * @param unknown_type $id
     */
    public function clear($id = null) {
        $this->clearContent($id);
    }

    /**
     * @return array
     * @param array $src
     * @param array $in
     * @param int|string $pos
    */
    private function _push_before($src,$in,$pos){
        if(is_int($pos)) $R=array_merge(array_slice($src,0,$pos), $in, array_slice($src,$pos));
        else{
            foreach($src as $k=>$v){
                if($k==$pos)$R=array_merge($R,$in);
                $R[$k]=$v;
            }
        }return $R;
    }

    /**
     * @return array
     * @param array $src
     * @param array $in
     * @param int|string $pos
    */
    private function _push_after($src,$in,$pos){
        if(is_int($pos)) $R=array_merge(array_slice($src,0,$pos+1), $in, array_slice($src,$pos+1));
        else{
            foreach($src as $k=>$v){
                $R[$k]=$v;
                if($k==$pos)$R=array_merge($R,$in);
            }
        }return $R;
    }

    public function getContent() {
        $return_value = $this->_doGetContent();
        foreach($this->_postfilters as $postfilter) {
            $return_value = $postfilter->filter($return_value);
        }
        return $return_value;
    }

    protected function _doGetContent() {
        $content = $this->_content;
        foreach($this->_embedded_content as $id => $content_and_element) {
            $content = str_replace($content_and_element[1], $content_and_element[1] . $content_and_element[0], $content);
        }
        //now generate the content:
        $return_value = implode($this->_top_content) .
                        implode($content)     .
                        implode($this->_bottom_content);
        return $return_value;
    }

}


text:
/* required styles */

.leaflet-map-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-pane,
.leaflet-tile-container,
.leaflet-overlay-pane,
.leaflet-shadow-pane,
.leaflet-marker-pane,
.leaflet-popup-pane,
.leaflet-overlay-pane svg,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
	position: absolute;
	left: 0;
	top: 0;
	}
.leaflet-container {
	overflow: hidden;
	-ms-touch-action: none;
	touch-action: none;
	}
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
	-webkit-user-select: none;
	   -moz-user-select: none;
	        user-select: none;
	-webkit-user-drag: none;
	}
.leaflet-marker-icon,
.leaflet-marker-shadow {
	display: block;
	}
/* map is broken in FF if you have max-width: 100% on tiles */
.leaflet-container img {
	max-width: none !important;
	}
/* stupid Android 2 doesn't understand "max-width: none" properly */
.leaflet-container img.leaflet-image-layer {
	max-width: 15000px !important;
	}
.leaflet-tile {
	filter: inherit;
	visibility: hidden;
	}
.leaflet-tile-loaded {
	visibility: inherit;
	}
.leaflet-zoom-box {
	width: 0;
	height: 0;
	}
/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
.leaflet-overlay-pane svg {
	-moz-user-select: none;
	}

.leaflet-tile-pane    { z-index: 2; }
.leaflet-objects-pane { z-index: 3; }
.leaflet-overlay-pane { z-index: 4; }
.leaflet-shadow-pane  { z-index: 5; }
.leaflet-marker-pane  { z-index: 6; }
.leaflet-popup-pane   { z-index: 7; }

.leaflet-vml-shape {
	width: 1px;
	height: 1px;
	}
.lvml {
	behavior: url(#default#VML);
	display: inline-block;
	position: absolute;
	}

/* control positioning */

.leaflet-control {
	position: relative;
	z-index: 7;
	pointer-events: auto;
	}
.leaflet-top,
.leaflet-bottom {
	position: absolute;
	z-index: 1000;
	pointer-events: none;
	}
.leaflet-top {
	top: 0;
	}
.leaflet-right {
	right: 0;
	}
.leaflet-bottom {
	bottom: 0;
	}
.leaflet-left {
	left: 0;
	}
.leaflet-control {
	float: left;
	clear: both;
	}
.leaflet-right .leaflet-control {
	float: right;
	}
.leaflet-top .leaflet-control {
	margin-top: 10px;
	}
.leaflet-bottom .leaflet-control {
	margin-bottom: 10px;
	}
.leaflet-left .leaflet-control {
	margin-left: 10px;
	}
.leaflet-right .leaflet-control {
	margin-right: 10px;
	}

/* zoom and fade animations */

.leaflet-fade-anim .leaflet-tile,
.leaflet-fade-anim .leaflet-popup {
	opacity: 0;
	-webkit-transition: opacity 0.2s linear;
	   -moz-transition: opacity 0.2s linear;
	     -o-transition: opacity 0.2s linear;
	        transition: opacity 0.2s linear;
	}
.leaflet-fade-anim .leaflet-tile-loaded,
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
	opacity: 1;
	}

.leaflet-zoom-anim .leaflet-zoom-animated {
	-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
	   -moz-transition:    -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
	     -o-transition:      -o-transform 0.25s cubic-bezier(0,0,0.25,1);
	        transition:         transform 0.25s cubic-bezier(0,0,0.25,1);
	}
.leaflet-zoom-anim .leaflet-tile,
.leaflet-pan-anim .leaflet-tile,
.leaflet-touching .leaflet-zoom-animated {
	-webkit-transition: none;
	   -moz-transition: none;
	     -o-transition: none;
	        transition: none;
	}

.leaflet-zoom-anim .leaflet-zoom-hide {
	visibility: hidden;
	}

/* cursors */

.leaflet-clickable {
	cursor: pointer;
	}
.leaflet-container {
	cursor: -webkit-grab;
	cursor:    -moz-grab;
	}
.leaflet-popup-pane,
.leaflet-control {
	cursor: auto;
	}
.leaflet-dragging .leaflet-container,
.leaflet-dragging .leaflet-clickable {
	cursor: move;
	cursor: -webkit-grabbing;
	cursor:    -moz-grabbing;
	}

/* visual tweaks */

.leaflet-container {
	background: #ddd;
	outline: 0;
	}
.leaflet-container a {
	color: #0078A8;
	}
.leaflet-container a.leaflet-active {
	outline: 2px solid orange;
	}
.leaflet-zoom-box {
	border: 2px dotted #38f;
	background: rgba(255,255,255,0.5);
	}

/* general typography */
.leaflet-container {
	font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
	}

/* general toolbar styles */

.leaflet-bar {
	box-shadow: 0 1px 5px rgba(0,0,0,0.65);
	border-radius: 4px;
	}
.leaflet-bar a,
.leaflet-bar a:hover {
	background-color: #fff;
	border-bottom: 1px solid #ccc;
	width: 26px;
	height: 26px;
	line-height: 26px;
	display: block;
	text-align: center;
	text-decoration: none;
	color: black;
	}
.leaflet-bar a,
.leaflet-control-layers-toggle {
	background-position: 50% 50%;
	background-repeat: no-repeat;
	display: block;
	}
.leaflet-bar a:hover {
	background-color: #f4f4f4;
	}
.leaflet-bar a:first-child {
	border-top-left-radius: 4px;
	border-top-right-radius: 4px;
	}
.leaflet-bar a:last-child {
	border-bottom-left-radius: 4px;
	border-bottom-right-radius: 4px;
	border-bottom: none;
	}
.leaflet-bar a.leaflet-disabled {
	cursor: default;
	background-color: #f4f4f4;
	color: #bbb;
	}

.leaflet-touch .leaflet-bar a {
	width: 30px;
	height: 30px;
	line-height: 30px;
	}

/* zoom control */

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
	font: bold 18px 'Lucida Console', Monaco, monospace;
	text-indent: 1px;
	}
.leaflet-control-zoom-out {
	font-size: 20px;
	}

.leaflet-touch .leaflet-control-zoom-in {
	font-size: 22px;
	}
.leaflet-touch .leaflet-control-zoom-out {
	font-size: 24px;
	}

/* layers control */

.leaflet-control-layers {
	box-shadow: 0 1px 5px rgba(0,0,0,0.4);
	background: #fff;
	border-radius: 5px;
	}
.leaflet-control-layers-toggle {
	background-image: url(images/layers.png);
	width: 36px;
	height: 36px;
	}
.leaflet-retina .leaflet-control-layers-toggle {
	background-image: url(images/layers-2x.png);
	background-size: 26px 26px;
	}
.leaflet-touch .leaflet-control-layers-toggle {
	width: 44px;
	height: 44px;
	}
.leaflet-control-layers .leaflet-control-layers-list,
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
	display: none;
	}
.leaflet-control-layers-expanded .leaflet-control-layers-list {
	display: block;
	position: relative;
	}
.leaflet-control-layers-expanded {
	padding: 6px 10px 6px 6px;
	color: #333;
	background: #fff;
	}
.leaflet-control-layers-selector {
	margin-top: 2px;
	position: relative;
	top: 1px;
	}
.leaflet-control-layers label {
	display: block;
	}
.leaflet-control-layers-separator {
	height: 0;
	border-top: 1px solid #ddd;
	margin: 5px -10px 5px -6px;
	}

/* attribution and scale controls */

.leaflet-container .leaflet-control-attribution {
	background: #fff;
	background: rgba(255, 255, 255, 0.7);
	margin: 0;
	}
.leaflet-control-attribution,
.leaflet-control-scale-line {
	padding: 0 5px;
	color: #333;
	}
.leaflet-control-attribution a {
	text-decoration: none;
	}
.leaflet-control-attribution a:hover {
	text-decoration: underline;
	}
.leaflet-container .leaflet-control-attribution,
.leaflet-container .leaflet-control-scale {
	font-size: 11px;
	}
.leaflet-left .leaflet-control-scale {
	margin-left: 5px;
	}
.leaflet-bottom .leaflet-control-scale {
	margin-bottom: 5px;
	}
.leaflet-control-scale-line {
	border: 2px solid #777;
	border-top: none;
	line-height: 1.1;
	padding: 2px 5px 1px;
	font-size: 11px;
	white-space: nowrap;
	overflow: hidden;
	-moz-box-sizing: content-box;
	     box-sizing: content-box;

	background: #fff;
	background: rgba(255, 255, 255, 0.5);
	}
.leaflet-control-scale-line:not(:first-child) {
	border-top: 2px solid #777;
	border-bottom: none;
	margin-top: -2px;
	}
.leaflet-control-scale-line:not(:first-child):not(:last-child) {
	border-bottom: 2px solid #777;
	}

.leaflet-touch .leaflet-control-attribution,
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
	box-shadow: none;
	}
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
	border: 2px solid rgba(0,0,0,0.2);
	background-clip: padding-box;
	}

/* popup */

.leaflet-popup {
	position: absolute;
	text-align: center;
	}
.leaflet-popup-content-wrapper {
	padding: 1px;
	text-align: left;
	border-radius: 12px;
	}
.leaflet-popup-content {
	margin: 13px 19px;
	line-height: 1.4;
	}
.leaflet-popup-content p {
	margin: 18px 0;
	}
.leaflet-popup-tip-container {
	margin: 0 auto;
	width: 40px;
	height: 20px;
	position: relative;
	overflow: hidden;
	}
.leaflet-popup-tip {
	width: 17px;
	height: 17px;
	padding: 1px;

	margin: -10px auto 0;

	-webkit-transform: rotate(45deg);
	   -moz-transform: rotate(45deg);
	    -ms-transform: rotate(45deg);
	     -o-transform: rotate(45deg);
	        transform: rotate(45deg);
	}
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
	background: white;

	box-shadow: 0 3px 14px rgba(0,0,0,0.4);
	}
.leaflet-container a.leaflet-popup-close-button {
	position: absolute;
	top: 0;
	right: 0;
	padding: 4px 4px 0 0;
	text-align: center;
	width: 18px;
	height: 14px;
	font: 16px/14px Tahoma, Verdana, sans-serif;
	color: #c3c3c3;
	text-decoration: none;
	font-weight: bold;
	background: transparent;
	}
.leaflet-container a.leaflet-popup-close-button:hover {
	color: #999;
	}
.leaflet-popup-scrolled {
	overflow: auto;
	border-bottom: 1px solid #ddd;
	border-top: 1px solid #ddd;
	}

.leaflet-oldie .leaflet-popup-content-wrapper {
	zoom: 1;
	}
.leaflet-oldie .leaflet-popup-tip {
	width: 24px;
	margin: 0 auto;

	-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
	filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
	}
.leaflet-oldie .leaflet-popup-tip-container {
	margin-top: -1px;
	}

.leaflet-oldie .leaflet-control-zoom,
.leaflet-oldie .leaflet-control-layers,
.leaflet-oldie .leaflet-popup-content-wrapper,
.leaflet-oldie .leaflet-popup-tip {
	border: 1px solid #999;
	}

/* div icon */

.leaflet-div-icon {
	background: #fff;
	border: 1px solid #666;
	}

.leaflet-gmx-icons {
    margin-left: 50px;
}
.leaflet-gmx-icon-sprite {
    background-image: url("img/gmxSprite.png");
}

.leaflet-left .leaflet-gmx-icon.leaflet-control {
    margin-left: 4px;
}
.leaflet-gmx-icon-text {
    width: auto;
}
.leaflet-gmx-icon-img {
    width: 32px;
}
.leaflet-gmx-icon {
    background-color: rgba(154, 154, 154, 0.7);
    height: 32px;
    border-radius: 4px;
    clear: none;
    cursor: pointer;
    display: block;
    float: left;
    margin-left: 4px;
    position: relative;
}
.leaflet-gmx-icon-active, .leaflet-gmx-icon:hover {
    background-color: rgba(154, 154, 154, 1);
}
.leaflet-gmx-icon > img {
    max-width: 32px !important;
    position: absolute !important;
    bottom: 0;
    left: 0;
    margin: auto;
    right: 0;
    top: 0;
}
.leaflet-gmx-icon > span {
    color: white;
    display: block;
    font-family: tahoma;
    margin: 6px 6px 0;
}
.leaflet-gmx-icon > img ~ span {
    margin-left: 36px;
}
.leaflet-gmx-iconSvg {
	text-align: center;
    height: 32px;

	border-radius: 4px;
	background-color: rgb(255, 255, 255);
	box-shadow: 0px 3px 4.7px 0.3px rgba(0, 0, 0, 0.24);
	fill: #757575;

    clear: none;
    cursor: pointer;
    display: block;
    float: left;
    margin-left: 4px;
    position: relative;
}
.leaflet-gmx-iconSvg svg {
    height: 24px;
    width: 24px;
    margin-left: 4px;
    margin-right: 4px;
    margin-top: 4px;
	pointer-events: none;
}
.leaflet-gmx-iconSvg:hover {
	background-color: #eee;
}
.leaflet-gmx-iconSvg-active {
	fill: #f57c00;
}

.leaflet-left .leaflet-gmx-iconSvg.leaflet-control {
    margin-left: 4px;
}

.leaflet-gmx-icon-group {
    clear: none;
    margin-left: 0px;
    cursor: pointer;
}
.icons-vertical {
    display: block;
    position: absolute;
    z-index: -100;
}

.leaflet-gmx-icon-group-horizontal div {
    float: left !important;
    clear: none !important;
}
.leaflet-gmx-icon-group-vertical {
    position: relative;
}
.leaflet-gmx-icon-group-vertical div {
    margin-bottom: 4px;
    clear: both;
}

.leaflet-gmx-icon-group-vertical .triangle {
    position: absolute;
    top: 24px;
    left: 24px;
    margin-left: 4px;
    width: 8px;
    height: 8px;
    z-index: 10;
    pointer-events: none;
    background-position: -12px 116px;
}
.leaflet-gmx-icon-group-vertical .triangle-active {
    background-position: -12px 84px;
}
.leaflet-gmx-icon-groupSvg {
	border-radius: 4px;
	box-shadow: 3px 3px 4.7px 0.3px rgba(0, 0, 0, 0.24);
}
.triangleSvg {
    z-index: 10;
    position: absolute;
    top: 9px;
    right: -1px;
    pointer-events: none;
}
.triangleSvg .svgIcon {
	width: 24px;
    height: 24px;
}
.triangleSvg.triangle-active {
	fill: #f57c00;
}
.leaflet-gmx-icon-group-maximum {
	box-shadow: none;
}

.leaflet-gmx-icon-Point {
    background-position: -235px 2px;
}
.leaflet-gmx-icon-Point-active {
    background-position: -235px -24px;
}
.leaflet-gmx-icon-Polygon {
    background-position: -499px 2px;
}
.leaflet-gmx-icon-Polygon-active {
    background-position: -499px -24px;
}
.leaflet-gmx-icon-Rectangle {
    background-position: -266px 2px;
}
.leaflet-gmx-icon-Rectangle-active {
    background-position: -266px -24px;
}
.leaflet-gmx-icon-Polyline {
    background-position: -389px 2px;
}
.leaflet-gmx-icon-Polyline-active {
    background-position: -389px -25px;
}

.leaflet-gmx-center {
    height: 100%;
    width: 100%;
    margin-left: 6px;
    margin-top: 6px;
    pointer-events: none;
    position: absolute;
}
.leaflet-gmx-center div {
    height: 12px;
    width: 12px;
    margin-bottom: 5px;
    margin-right: 5px;
    margin-right: 3px;
    bottom: 50%;
    right: 50%;
    position: absolute;
}

.leaflet-gmx-icon-hide {
    background-position: -592px 1px;
    margin-right: 10px;
    background-image: url("img/gmxSprite.png");
}
.leaflet-left .leaflet-gmx-icon-hide.leaflet-control {
    margin-left: 12px;
}
.leaflet-left .leaflet-gmx-iconSvg-hide.leaflet-control {
    margin-left: 12px;
}

.leaflet-gmx-icon-hide:hover {
    background-color: rgba(154, 154, 154, 1);
}

.leaflet-control-container .leaflet-control.leaflet-control-gmx-hidden {
    display: none;
}
.leaflet-gmx-iconSvg-hide {
    margin-right: 10px;
}

.leaflet-control-layers {
    background-color: rgba(255, 255, 255, 0.7);
}

.gmxLocation-input {
    text-align: center;
	width: 210px;
}
.leaflet-gmx-coordFormatChange {
    background-image: url("img/coords.png");
    cursor: pointer;
    width: 10px;
    height: 9px;
    display: block;
    float: left;
    clear: none;
    margin-right: 5px;
    margin-top: 5px;
}
.leaflet-gmx-location {
    font-size: 11px;
    right: 0px;
    bottom: -9px;
    margin-bottom: 0px;
}
.leaflet-gmx-locationTxt {
    color: black;
    float: left;
    cursor: pointer;
    font-size: 9pt;
    font-family: Tahoma;
    margin-right: 8px;
}
.leaflet-gmx-scaleBar {
    cursor: pointer;
    background-color: white;
    border: 1px solid black;
    display: inline-block;
    margin-bottom: 1px;
    height: 4px;
    width: 40px;
}
.leaflet-gmx-scaleBarTxt {
    cursor: pointer;
    color: black;
    margin-left: 2px;
    font-size: 9pt;
    font-family: Tahoma;
}
.leaflet-gmx-location-window {
    box-shadow: rgba(100, 100, 100, 0.7) 0px 0px 3px;
    border: none;
    margin: 3px 0px 3px 3px;
    background-color: #FFFFFF;
	border-radius: 4px;
    padding: 10px;
    width: 260px;
    position: absolute;
    right: 0px;
    bottom: 20px;
}
.leaflet-gmx-location-window .closeButton {
    position: absolute;
    font: 16px/14px Tahoma, Verdana, sans-serif;
    font-weight: bold;
    color: #c3c3c3;
    top: 4px;
	right: 4px;
    cursor: pointer;
}
.leaflet-gmx-location-window button {
    cursor: pointer;
    border: 1px solid #d3d3d3;
    background: #e6e6e6;
    color: #555555;
    border-radius: 2px;
    padding: 2px 6px;
	margin-left: 4px;
}

.gmxControlPopup {
    position: absolute;
    border-radius: 12px;
    background: white;
    box-shadow: 0 3px 14px rgba(0,0,0,0.4);
}
.gmxControlPopup  .content-wrapper {
    margin: 10px;
    padding: 1px;
    text-align: left;
    cursor: default;
}
.gmxControlPopup  .closeButton {
    position: absolute;
    font: 16px/14px Tahoma, Verdana, sans-serif;
    font-weight: bold;
    color: #c3c3c3;
    top: 4px;
    right: 4px;
    cursor: pointer;
}
.gmxControlPopup .tip-container {
    width: 100%;
    height: 20px;
    position: absolute;
    overflow: hidden;
}
.gmxControlPopup .tip {
    background: white;
    box-shadow: 0 3px 14px rgba(0,0,0,0.4);
    width: 17px;
    height: 17px;
    padding: 1px;
    margin: -10px auto 0;
    -webkit-transform: rotate(45deg);
    -moz-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    -o-transform: rotate(45deg);
    transform: rotate(45deg);
}
.gmxLocation-popup {
	font-weight: bold;
}

.leaflet-gmx-copyright {
    margin-bottom: 1px !important;
    overflow-x: hidden;
    white-space: nowrap;
}
.leaflet-gmx-copyright-window {
    background-color: rgba(255, 255, 255, 0.7);
    border: thin solid black;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 3px;
}
.leaflet-gmx-copyright-window .closeButton {
    position: absolute;
    font: 16px/14px Tahoma, Verdana, sans-serif;
    font-weight: bold;
    color: #c3c3c3;
    top: 4px;
	right: 4px;
    cursor: pointer;
}

.leaflet-gmx-copyrights {
    cursor: pointer;
    text-decoration: underline;
    font-family: Tahoma;
    font-size: 9pt;
}
.leaflet-gmx-copyright-window a,
.leaflet-gmx-copyrights a
{
    color: inherit;
}

.leaflet-gmx-copyright .leaflet-gmx-cursorposition {
	padding-left: 8px;
}

.leaflet-gmx-zoomParent {
    padding-bottom: 2px;
    margin-left: 10px;
    margin-top: 10px;
    position: absolute;
    left: 2px;
    top: 45px;
}
.leaflet-gmx-zoom-in {
    background-position: 5px 0px;
    margin-left: 0px;
}
.leaflet-gmx-zoom-out {
    background-position: -21px -2px;
    clear: both;
    margin-left: 0px;
    margin-top: 4px;
}
.leaflet-gmx-zoomPointer {
    background-image: url("img/gmxSprite.png");
    background-position: 131px 128px;
    position: relative;
    margin-left: 0px;
    width: 29px;
    height: 7px;
}
.leaflet-gmx-zoomVal {
    background-position: 102px 133px;
    font-family: Tahoma;
    font-size: 9pt;
    font-weight: bold;
    height: 17px;
    left: 25px;
    pointer-events: none;
    position: absolute;
    text-align: center;
    top: -7px;
    width: 22px;
}
.leaflet-gmx-sliderCont {
    position: relative;
    top: 61px;
    left: 3px;
    display: none;
}
.leaflet-gmx-sliderBG {
    background-image: url("img/band.png");
    cursor: pointer;
    position: absolute;
    top: 10px;
    left: 7px;
    height: 28px;
    width: 11px;
}
.leaflet-gmx-zoomPlaque {
    display: none;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
    background-color: white;
    opacity: 0.3;
    position: absolute;
    width: 32px;
    height: 68px;
}
.leaflet-gmxSvg-zoom-in {
    margin-left: 0px;
}
.leaflet-gmxSvg-zoom-out {
    clear: both;
    margin-left: 0px;
    margin-top: 4px;
}

.leaflet-bottom .leaflet-gmx-copyright-location.leaflet-control {
    margin: 0;
}

.leaflet-gmx-copyright-location {
    bottom: 0px;
    right: 0px;
    left: 0px;
    height: 20px;
    position: absolute;
    color: #000000;
    font-family: Tahoma;
    font-size: 9pt;
    word-break: break-all;
    overflow: hidden;
}

.leaflet-gmx-copyright-location-bg {
    height: 20px;
    opacity: 0.5;
    width: 100%;
    background-color: white;
}

.leaflet-bottom.gmx-bottom-shift {
    bottom: 20px;
}
.leaflet-gmx-logo {
    background-image: url("img/logo_footer.png");
}
.leaflet-gmx-logo-color {
    background-image: url("img/logo_footer_color.png");
}
.leaflet-control.leaflet-gmx-logo,
.leaflet-control.leaflet-gmx-logo-color {
    position: absolute;
    bottom: -8px;
    height: 16px;
    margin-left: 48%;
    margin-left: calc(50% - 50px);
    margin-left: -webkit-calc(50% - 50px);
    margin-left: -moz-calc(50% - 50px);
    width: 100px;
    cursor: pointer;
    z-index: 100;
}
.leaflet-gmx-logo.leaflet-gmx-logo-shift,
.leaflet-gmx-logo-color.leaflet-gmx-logo-color-shift {
    bottom: 12px;
}

.leaflet-gmx-sidebar {
    border: 1px solid rgba(0,0,0,0.25);
    background: #efefef;
    padding: 5px;
}

.leaflet-gmx-sidebar_expanded {
    position: absolute;
    height: auto;
    bottom: 0;
    top: 0;
    left: 0;
    right: 0;
}
.leaflet-gmx-loaderStatus {
    position: absolute;
    left: 5px;
    top: 117px;
    text-align: center;
    padding: 4px;
    border-radius: 4px;
    box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.2);
    background-color: rgba(255, 255, 255, 0.3);
    z-index: -1;
}
.leaflet-gmx-loaderStatus-vector {
  color: grey;
}
.leaflet-gmx-loaderStatus-image {
  color: black;
}

.leaflet-gmx-visibility-hidden {
  visibility: hidden;
}
.icon-refresh-gif {
    background-image: url("img/progress.gif");
    width: 16px;
    height: 16px;
}

/*
   Animation example, for spinners
*/
.animate-spin {
  -moz-animation: spin 2s infinite linear;
  -o-animation: spin 2s infinite linear;
  -webkit-animation: spin 2s infinite linear;
  animation: spin 2s infinite linear;
  display: inline-block;
}
@-moz-keyframes spin {
  0% {
    -moz-transform: rotate(0deg);
    -o-transform: rotate(0deg);
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }

  100% {
    -moz-transform: rotate(359deg);
    -o-transform: rotate(359deg);
    -webkit-transform: rotate(359deg);
    transform: rotate(359deg);
  }
}
@-webkit-keyframes spin {
  0% {
    -moz-transform: rotate(0deg);
    -o-transform: rotate(0deg);
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }

  100% {
    -moz-transform: rotate(359deg);
    -o-transform: rotate(359deg);
    -webkit-transform: rotate(359deg);
    transform: rotate(359deg);
  }
}
@-o-keyframes spin {
  0% {
    -moz-transform: rotate(0deg);
    -o-transform: rotate(0deg);
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }

  100% {
    -moz-transform: rotate(359deg);
    -o-transform: rotate(359deg);
    -webkit-transform: rotate(359deg);
    transform: rotate(359deg);
  }
}
@-ms-keyframes spin {
  0% {
    -moz-transform: rotate(0deg);
    -o-transform: rotate(0deg);
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }

  100% {
    -moz-transform: rotate(359deg);
    -o-transform: rotate(359deg);
    -webkit-transform: rotate(359deg);
    transform: rotate(359deg);
  }
}
@keyframes spin {
  0% {
    -moz-transform: rotate(0deg);
    -o-transform: rotate(0deg);
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }

  100% {
    -moz-transform: rotate(359deg);
    -o-transform: rotate(359deg);
    -webkit-transform: rotate(359deg);
    transform: rotate(359deg);
  }
}

.leaflet-popup-content textarea {
    outline: none;
    -moz-appearance: none;
    border: 1px solid white;
}
.leaflet-popup-content textarea:hover {
    border: 1px solid #999;
}
.gmxTooltipBG {
    fill: white;
    stroke: black;
    stroke-width: 1;
    opacity: 0.85;
}
.leaflet-drawing-lines {
   pointer-events: visiblestroke;
}
.leaflet-drawing-lines-fill {
    pointer-events: visiblepainted;
}
.leaflet-drawing-points {
    pointer-events: visible;
}

.leaflet-contextmenu {
    display: none;
	box-shadow: 0 1px 7px rgba(0,0,0,0.4);
	-webkit-border-radius: 4px;
	border-radius: 4px;
    padding: 4px 0;
    background-color: #fff;
    cursor: default;
	-webkit-user-select: none;
	-moz-user-select: none;
	user-select: none;
}

.leaflet-contextmenu a.leaflet-contextmenu-item {
    display: block;
    color: #222;
    font-size: 12px;
    line-height: 20px;
    text-decoration: none;
    padding: 0 12px;
    border-top: 1px solid transparent;
    border-bottom: 1px solid transparent;
    cursor: default;
    outline: none;
}

.leaflet-contextmenu a.leaflet-contextmenu-item-disabled {
    opacity: 0.5;
}

.leaflet-contextmenu a.leaflet-contextmenu-item.over {
    background-color: #f4f4f4;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.leaflet-contextmenu a.leaflet-contextmenu-item-disabled.over {
    background-color: inherit;
    border-top: 1px solid transparent;
    border-bottom: 1px solid transparent;
}

.leaflet-contextmenu-icon {
    margin: 2px 8px 0 0;
    width: 16px;
    height: 16px;
    float: left;
    border: 0;
}

.leaflet-contextmenu-separator {
    border-bottom: 1px solid #ccc;
    margin: 5px 0;
}

.leaflet-cluster-anim .leaflet-marker-icon, .leaflet-cluster-anim .leaflet-marker-shadow {
	-webkit-transition: -webkit-transform 0.3s ease-out, opacity 0.3s ease-in;
	-moz-transition: -moz-transform 0.3s ease-out, opacity 0.3s ease-in;
	-o-transition: -o-transform 0.3s ease-out, opacity 0.3s ease-in;
	transition: transform 0.3s ease-out, opacity 0.3s ease-in;
}

.leaflet-cluster-spider-leg {
	/* stroke-dashoffset (duration and function) should match with leaflet-marker-icon transform in order to track it exactly */
	-webkit-transition: -webkit-stroke-dashoffset 0.3s ease-out, -webkit-stroke-opacity 0.3s ease-in;
	-moz-transition: -moz-stroke-dashoffset 0.3s ease-out, -moz-stroke-opacity 0.3s ease-in;
	-o-transition: -o-stroke-dashoffset 0.3s ease-out, -o-stroke-opacity 0.3s ease-in;
	transition: stroke-dashoffset 0.3s ease-out, stroke-opacity 0.3s ease-in;
}

.marker-cluster-small {
	background-color: rgba(181, 226, 140, 0.6);
	}
.marker-cluster-small div {
	background-color: rgba(110, 204, 57, 0.6);
	}

.marker-cluster-medium {
	background-color: rgba(241, 211, 87, 0.6);
	}
.marker-cluster-medium div {
	background-color: rgba(240, 194, 12, 0.6);
	}

.marker-cluster-large {
	background-color: rgba(253, 156, 115, 0.6);
	}
.marker-cluster-large div {
	background-color: rgba(241, 128, 23, 0.6);
	}

	/* IE 6-8 fallback colors */
.leaflet-oldie .marker-cluster-small {
	background-color: rgb(181, 226, 140);
	}
.leaflet-oldie .marker-cluster-small div {
	background-color: rgb(110, 204, 57);
	}

.leaflet-oldie .marker-cluster-medium {
	background-color: rgb(241, 211, 87);
	}
.leaflet-oldie .marker-cluster-medium div {
	background-color: rgb(240, 194, 12);
	}

.leaflet-oldie .marker-cluster-large {
	background-color: rgb(253, 156, 115);
	}
.leaflet-oldie .marker-cluster-large div {
	background-color: rgb(241, 128, 23);
}

.marker-cluster {
	background-clip: padding-box;
	border-radius: 20px;
	}
.marker-cluster div {
	width: 30px;
	height: 30px;
	margin-left: 5px;
	margin-top: 5px;

	text-align: center;
	border-radius: 15px;
	font: 12px "Helvetica Neue", Arial, Helvetica, sans-serif;
	}
.marker-cluster span {
	line-height: 30px;
	}


text:
<title>
The "tougher-on-terror" Democrats
</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<?php include "../../legacy-includes/Script.htmlf" ?>

<?php include "../../legacy-includes/TopLogo.htmlf" ?>

<?php include "../../legacy-includes/TopAd.htmlf" ?>

<?php include "../../legacy-includes/LeftButtons.htmlf" ?>

<?php include "../../legacy-includes/BodyInsert.htmlf" ?>

READING BETWEEN THE LINES

The "tougher-on-terror" Democrats

By Lance Selfa | March 10, 2006 | Page 7

IT DIDN'T take long after the flap over the Dubai ports deal broke for media pundits to claim that this issue might just be the push the Democrats need to win back Congress later this year.

Pollster Scott Rasmussen wrote that the Dubai ports controversy gave Democrats the opening to make their case. "It's important to note that the Dubai Ports story is far more significant politically than the issue itself," said pollster Scott Rasmussen. "That's because it gives people an opportunity to re-evaluate the president on a whole range of issues relating to national security.

"Our latest survey finds the number who think the U.S. and its allies are winning the 'war on terror' has dipped below 40 percent and is near the lowest levels ever recorded. By a 2-to-1 margin, Americans think things in Iraq are likely to get worse in the next six months. That's the bleakest assessment since the first votes were cast in Iraq over a year ago."

As the University of Virginia's Larry Sabato put it, "Since 9/11, Bush's consistent political advantage has been the public's confidence in him to handle the terrorist threat. The Iraq war has weakened Bush's edge, and now the Dubai ports misstep may destroy it. This has become a troubled and tone-deaf presidency."

While there is still a long way to go before the November mid-term elections, there is no denying that the Democrats are feeling more confident these days. In the Dubai deal, they feel that they have painted the president into a corner--hanging a tangible "flip flop" on "national security" around his neck.

After putting up with years of Bush and the Republicans bashing them for being soft on "national security," Democrats feel they can return the favor. And many of their partisans, including most liberal bloggers and commentators, went along with them.

Yet the fact that Democrats could win support by adopting an openly racist and jingoist position on the ports deal is hardly a cause for celebration. It was yet another example of how confusing support for the Democrats with advancing a progressive agenda leads in the wrong direction.

The key factors driving opposition to Bush are the war in Iraq, declining wages and living standards, and the perception of the administration's corruption and incompetence, as demonstrated by its inaction around Hurricane Katrina.

But Democrats are loath to promise an end to the war, better jobs and health care. And any promises to reform the "culture of corruption" in Washington are likely to evaporate if they become the congressional majority.

So the Dubai controversy gives them a way to talk about something else: how they're tougher than Bush when it comes to the "war on terror." If they listen to the pundits and convince themselves that the Dubai flap helped them, then expect more jingoism and racism from leading Democratic candidates.

In 2004, John Kerry's pro-war message didn't work as well when Bush could still draw on just enough voters who were willing to give him the benefit of the doubt. In 2006, with Bush widely seen as a failure, the Democrats may indeed gain some support for their hard-line positions on the "war on terror."

But if this is the case, then the millions who most hate what Bush and his administration represent will end up voting for politicians who don't really want to put an end to Bush's disastrous policies as much as they would like to make them work better.

As in the recent tussle over the USA PATRIOT Act--where Democrats waged a brief filibuster, only to drop their opposition after the administration gave them a few meaningless changes to the law--they don't seek to stop the administration so much as give its policies a bipartisan seal of approval.

Democrats aren't aligning themselves with the huge majorities who oppose the war and question the "war on terror" so much as they are rehabilitating these discredited Bush initiatives.

<?php include "../../legacy-includes/BottomNavLinks.htmlf" ?>

<?php include "../../legacy-includes/RightAdFolder.htmlf" ?>


text:
import { DateConstraint } from '../../../src/validator/directives';
import { DateValidator } from '../../../src/validator/model';

const TOGGLE_VALIDATOR_ERROR = {toggleValidator: true};

class ToggleValidator implements DateValidator {
  private valid = true;

  private fakeValidate() {
    return this.valid ? null : TOGGLE_VALIDATOR_ERROR;
  }

  validateDate(date: Date) {
    return this.fakeValidate();
  }

  validate(): { [key: string]: any; } {
    return this.fakeValidate();
  }

  private onChange = () => {};

  registerOnValidatorChange(fn: () => void): void {
    this.onChange = fn;
  }

  toggle() {
    this.valid = !this.valid;
    this.onChange();
  }
}

describe('DateConstraint', () => {
  let validator: ToggleValidator;
  let dateConstraint: DateConstraint;

  let changeSpy: jasmine.Spy;

  beforeEach(() => {
    validator = new ToggleValidator();

    dateConstraint = new DateConstraint([validator]);

    changeSpy = spyOn(dateConstraint.constraintChange, 'emit');
  })

  it('should validate date according to validator', () => {
    expect(dateConstraint.validate(new Date())).toBe(null);
  })

  it('should emit and update validation when a validator changes', () => {
    validator.toggle();

    expect(changeSpy).toHaveBeenCalled();
    expect(dateConstraint.validate(new Date())).toEqual(TOGGLE_VALIDATOR_ERROR);
  })
})


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

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
  Class: AutoShop

    — Documentation by YARD 0.7.5

</title>

  <link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />

  <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />

    Index (A) »

    AutoShop

(no frames)

    Class List

    Method List

    File List

Class: AutoShop

Inherits:

      Object

Object

AutoShop

        show all

Defined in:

auto_shop.rb

State Machines

This class contains 1 state machine(s).

state

Instance Attribute Summary (collapse)

      - (Object) state

Gets the current attribute value for the machine.

      Class Method Summary
      (collapse)

      + (String) human_state_event_name(event)

Gets the humanized name for the given event.

      + (String) human_state_name(state)

Gets the humanized name for the given state.

      Instance Method Summary
      (collapse)

      - (Boolean) available?

Checks whether :available is the current state.

      - (Boolean) busy?

Checks whether :busy is the current state.

      - (Boolean) can_fix_vehicle?(requirements = {})

Checks whether :fix_vehicle can be fired.

      - (Boolean) can_tow_vehicle?(requirements = {})

Checks whether :tow_vehicle can be fired.

      - (Boolean) fire_state_event(event, *args)

Fires an arbitrary state event with the given argument list.

      - (Boolean) fix_vehicle(*args)

Fires the :fix_vehicle event.

      - (Boolean) fix_vehicle!(*args)

Fires the :fix_vehicle event, raising an exception if it fails.

      - (StateMachine::Transition) fix_vehicle_transition(requirements = {})

Gets the next transition that would be performed if :fix_vehicle were to be
fired.

      - (String) human_state_name

Gets the human-readable name of the state for the current value.

      - (Boolean) state?(state_name)

Checks the given state name against the current state.

      - (Array<Symbol>) state_events(requirements = {})

Gets the list of events that can be fired on the current state (uses the
unqualified event names).

      - (Symbol) state_name

Gets the internal name of the state for the current value.

      - (StateMachine::PathCollection) state_paths(requirements = {})

Gets the list of sequences of transitions that can be run for the current
state.

      - (Array<StateMachine::Transition>) state_transitions(requirements = {})

Gets the list of transitions that can be made for the current state.

      - (Boolean) tow_vehicle(*args)

Fires the :tow_vehicle event.

      - (Boolean) tow_vehicle!(*args)

Fires the :tow_vehicle event, raising an exception if it fails.

      - (StateMachine::Transition) tow_vehicle_transition(requirements = {})

Gets the next transition that would be performed if :tow_vehicle were to be
fired.

Instance Attribute Details

    - (<tt>Object</tt>) state

Gets the current attribute value for the machine

Returns:

The attribute value

4
5
6
7
8
9
10
11
12

# File 'auto_shop.rb', line 4

state_machine :initial => :available do
  event :tow_vehicle do
    transition :available => :busy
  end

  event :fix_vehicle do
    transition :busy => :available
  end
end

Class Method Details

    + (<tt>String</tt>) human_state_event_name(event)

Gets the humanized name for the given event.

Parameters:

        event

        (<tt>Symbol</tt>)

        —

The event to look up

Returns:

        (<tt>String</tt>)

        —

The human event name

4
5
6
7
8
9
10
11
12

# File 'auto_shop.rb', line 4

state_machine :initial => :available do
  event :tow_vehicle do
    transition :available => :busy
  end

  event :fix_vehicle do
    transition :busy => :available
  end
end

    + (<tt>String</tt>) human_state_name(state)

Gets the humanized name for the given state.

Parameters:

        state

        (<tt>Symbol</tt>)

        —

The state to look up

Returns:

        (<tt>String</tt>)

        —

The human state name

4
5
6
7
8
9
10
11
12

# File 'auto_shop.rb', line 4

state_machine :initial => :available do
  event :tow_vehicle do
    transition :available => :busy
  end

  event :fix_vehicle do
    transition :busy => :available
  end
end

Instance Method Details

    - (<tt>Boolean</tt>) available?

Checks whether :available is the current state.

Returns:

        (<tt>Boolean</tt>)

        —

<tt>true</tt> if this is the current state, otherwise <tt>false</tt>

4
5
6
7
8
9
10
11
12

# File 'auto_shop.rb', line 4

state_machine :initial => :available do
  event :tow_vehicle do
    transition :available => :busy
  end

  event :fix_vehicle do
    transition :busy => :available
  end
end

    - (<tt>Boolean</tt>) busy?

Checks whether :busy is the current state.

Returns:

        (<tt>Boolean</tt>)

        —

<tt>true</tt> if this is the current state, otherwise <tt>false</tt>

4
5
6
7
8
9
10
11
12

# File 'auto_shop.rb', line 4

state_machine :initial => :available do
  event :tow_vehicle do
    transition :available => :busy
  end

  event :fix_vehicle do
    transition :busy => :available
  end
end

    - (<tt>Boolean</tt>) can_fix_vehicle?(requirements = {})

Checks whether :fix_vehicle can be fired.

Parameters:

        requirements

        (<tt>Hash</tt>)

        (defaults to: <tt>{}</tt>)

        —

The transition requirements to test against

Options Hash (<tt>requirements</tt>):

          :from
          (<tt>Symbol</tt>)

              — default:
              <tt>the current state</tt>

          —

One or more initial states

          :to
          (<tt>Symbol</tt>)

          —

One or more target states

          :guard
          (<tt>Boolean</tt>)

          —

Whether to guard transitions with conditionals

Returns:

        (<tt>Boolean</tt>)

        —

<tt>true</tt> if :fix_vehicle can be fired, otherwise <tt>false</tt>

4
5
6
7
8
9
10
11
12

# File 'auto_shop.rb', line 4

state_machine :initial => :available do
  event :tow_vehicle do
    transition :available => :busy
  end

  event :fix_vehicle do
    transition :busy => :available
  end
end

    - (<tt>Boolean</tt>) can_tow_vehicle?(requirements = {})

Checks whether :tow_vehicle can be fired.

Parameters:

        requirements

        (<tt>Hash</tt>)

        (defaults to: <tt>{}</tt>)

        —

The transition requirements to test against

Options Hash (<tt>requirements</tt>):

          :from
          (<tt>Symbol</tt>)

              — default:
              <tt>the current state</tt>

          —

One or more initial states

          :to
          (<tt>Symbol</tt>)

          —

One or more target states

          :guard
          (<tt>Boolean</tt>)

          —

Whether to guard transitions with conditionals

Returns:

        (<tt>Boolean</tt>)

        —

<tt>true</tt> if :tow_vehicle can be fired, otherwise <tt>false</tt>

4
5
6
7
8
9
10
11
12

# File 'auto_shop.rb', line 4

state_machine :initial => :available do
  event :tow_vehicle do
    transition :available => :busy
  end

  event :fix_vehicle do
    transition :busy => :available
  end
end

    - (<tt>Boolean</tt>) fire_state_event(event, *args)

Fires an arbitrary state event with the given argument list

Parameters:

        event

        (<tt>Symbol</tt>)

        —

The name of the event to fire

        args

        —

Optional arguments to include in the transition

Returns:

        (<tt>Boolean</tt>)

        —

<tt>true</tt> if the event succeeds, otherwise <tt>false</tt>

4
5
6
7
8
9
10
11
12

# File 'auto_shop.rb', line 4

state_machine :initial => :available do
  event :tow_vehicle do
    transition :available => :busy
  end

  event :fix_vehicle do
    transition :busy => :available
  end
end

    - (<tt>Boolean</tt>) fix_vehicle(*args)

Fires the :fix_vehicle event.

Parameters:

        args

        (<tt>Array</tt>)

        —

Optional arguments to include in transition callbacks

Returns:

        (<tt>Boolean</tt>)

        —

<tt>true</tt> if the transition succeeds, otherwise <tt>false</tt>

4
5
6
7
8
9
10
11
12

# File 'auto_shop.rb', line 4

state_machine :initial => :available do
  event :tow_vehicle do
    transition :available => :busy
  end

  event :fix_vehicle do
    transition :busy => :available
  end
end

    - (<tt>Boolean</tt>) fix_vehicle!(*args)

Fires the :fix_vehicle event, raising an exception if it fails.

Parameters:

        args

        (<tt>Array</tt>)

        —

Optional arguments to include in transition callbacks

Returns:

        (<tt>Boolean</tt>)

        —

<tt>true</tt> if the transition succeeds

Raises:

        (<tt>StateMachine::InvalidTransition</tt>)

        —

If the transition fails

4
5
6
7
8
9
10
11
12

# File 'auto_shop.rb', line 4

state_machine :initial => :available do
  event :tow_vehicle do
    transition :available => :busy
  end

  event :fix_vehicle do
    transition :busy => :available
  end
end

    - (<tt>StateMachine::Transition</tt>) fix_vehicle_transition(requirements = {})

Gets the next transition that would be performed if :fix_vehicle were to be
fired.

Parameters:

        requirements

        (<tt>Hash</tt>)

        (defaults to: <tt>{}</tt>)

        —

The transition requirements to test against

Options Hash (<tt>requirements</tt>):

          :from
          (<tt>Symbol</tt>)

              — default:
              <tt>the current state</tt>

          —

One or more initial states

          :to
          (<tt>Symbol</tt>)

          —

One or more target states

          :guard
          (<tt>Boolean</tt>)

          —

Whether to guard transitions with conditionals

Returns:

        (<tt>StateMachine::Transition</tt>)

        —

The transition that would be performed or <tt>nil</tt>

4
5
6
7
8
9
10
11
12

# File 'auto_shop.rb', line 4

state_machine :initial => :available do
  event :tow_vehicle do
    transition :available => :busy
  end

  event :fix_vehicle do
    transition :busy => :available
  end
end

    - (<tt>String</tt>) human_state_name

Gets the human-readable name of the state for the current value.

Returns:

        (<tt>String</tt>)

        —

The human-readable state name

4
5
6
7
8
9
10
11
12

# File 'auto_shop.rb', line 4

state_machine :initial => :available do
  event :tow_vehicle do
    transition :available => :busy
  end

  event :fix_vehicle do
    transition :busy => :available
  end
end

    - (<tt>Boolean</tt>) state?(state_name)

Checks the given state name against the current state.

Parameters:

        state_name

        (<tt>Symbol</tt>)

        —

The name of the state to check

Returns:

        (<tt>Boolean</tt>)

        —

True if they are the same state, otherwise false

Raises:

        (<tt>IndexError</tt>)

        —

If the state name is invalid

4
5
6
7
8
9
10
11
12

# File 'auto_shop.rb', line 4

state_machine :initial => :available do
  event :tow_vehicle do
    transition :available => :busy
  end

  event :fix_vehicle do
    transition :busy => :available
  end
end

    - (<tt>Array<Symbol></tt>) state_events(requirements = {})

Gets the list of events that can be fired on the current state (uses the
unqualified event names)

Parameters:

        requirements

        (<tt>Hash</tt>)

        (defaults to: <tt>{}</tt>)

        —

The transition requirements to test against

Options Hash (<tt>requirements</tt>):

          :from
          (<tt>Symbol</tt>)

              — default:
              <tt>the current state</tt>

          —

One or more initial states

          :to
          (<tt>Symbol</tt>)

          —

One or more target states

          :on
          (<tt>Symbol</tt>)

          —

One or more events that fire the transition

          :guard
          (<tt>Boolean</tt>)

          —

Whether to guard transitions with conditionals

Returns:

        (<tt>Array<Symbol></tt>)

        —

The list of event names

4
5
6
7
8
9
10
11
12

# File 'auto_shop.rb', line 4

state_machine :initial => :available do
  event :tow_vehicle do
    transition :available => :busy
  end

  event :fix_vehicle do
    transition :busy => :available
  end
end

    - (<tt>Symbol</tt>) state_name

Gets the internal name of the state for the current value.

Returns:

        (<tt>Symbol</tt>)

        —

The internal name of the state

4
5
6
7
8
9
10
11
12

# File 'auto_shop.rb', line 4

state_machine :initial => :available do
  event :tow_vehicle do
    transition :available => :busy
  end

  event :fix_vehicle do
    transition :busy => :available
  end
end

    - (<tt>StateMachine::PathCollection</tt>) state_paths(requirements = {})

Gets the list of sequences of transitions that can be run for the current
state

Parameters:

        requirements

        (<tt>Hash</tt>)

        (defaults to: <tt>{}</tt>)

        —

The transition requirements to test against

Options Hash (<tt>requirements</tt>):

          :from
          (<tt>Symbol</tt>)

              — default:
              <tt>the current state</tt>

          —

The initial state

          :to
          (<tt>Symbol</tt>)

          —

The target state

          :deep
          (<tt>Boolean</tt>)

          —

Whether to enable deep searches for the target state

          :guard
          (<tt>Boolean</tt>)

          —

Whether to guard transitions with conditionals

Returns:

        (<tt>StateMachine::PathCollection</tt>)

        —

The collection of paths

4
5
6
7
8
9
10
11
12

# File 'auto_shop.rb', line 4

state_machine :initial => :available do
  event :tow_vehicle do
    transition :available => :busy
  end

  event :fix_vehicle do
    transition :busy => :available
  end
end

    - (<tt>Array<StateMachine::Transition></tt>) state_transitions(requirements = {})

Gets the list of transitions that can be made for the current state

Parameters:

        requirements

        (<tt>Hash</tt>)

        (defaults to: <tt>{}</tt>)

        —

The transition requirements to test against

Options Hash (<tt>requirements</tt>):

          :from
          (<tt>Symbol</tt>)

              — default:
              <tt>the current state</tt>

          —

One or more initial states

          :to
          (<tt>Symbol</tt>)

          —

One or more target states

          :on
          (<tt>Symbol</tt>)

          —

One or more events that fire the transition

          :guard
          (<tt>Boolean</tt>)

          —

Whether to guard transitions with conditionals

Returns:

        (<tt>Array<StateMachine::Transition></tt>)

        —

The available transitions

4
5
6
7
8
9
10
11
12

# File 'auto_shop.rb', line 4

state_machine :initial => :available do
  event :tow_vehicle do
    transition :available => :busy
  end

  event :fix_vehicle do
    transition :busy => :available
  end
end

    - (<tt>Boolean</tt>) tow_vehicle(*args)

Fires the :tow_vehicle event.

Parameters:

        args

        (<tt>Array</tt>)

        —

Optional arguments to include in transition callbacks

Returns:

        (<tt>Boolean</tt>)

        —

<tt>true</tt> if the transition succeeds, otherwise <tt>false</tt>

4
5
6
7
8
9
10
11
12

# File 'auto_shop.rb', line 4

state_machine :initial => :available do
  event :tow_vehicle do
    transition :available => :busy
  end

  event :fix_vehicle do
    transition :busy => :available
  end
end

    - (<tt>Boolean</tt>) tow_vehicle!(*args)

Fires the :tow_vehicle event, raising an exception if it fails.

Parameters:

        args

        (<tt>Array</tt>)

        —

Optional arguments to include in transition callbacks

Returns:

        (<tt>Boolean</tt>)

        —

<tt>true</tt> if the transition succeeds

Raises:

        (<tt>StateMachine::InvalidTransition</tt>)

        —

If the transition fails

4
5
6
7
8
9
10
11
12

# File 'auto_shop.rb', line 4

state_machine :initial => :available do
  event :tow_vehicle do
    transition :available => :busy
  end

  event :fix_vehicle do
    transition :busy => :available
  end
end

    - (<tt>StateMachine::Transition</tt>) tow_vehicle_transition(requirements = {})

Gets the next transition that would be performed if :tow_vehicle were to be
fired.

Parameters:

        requirements

        (<tt>Hash</tt>)

        (defaults to: <tt>{}</tt>)

        —

The transition requirements to test against

Options Hash (<tt>requirements</tt>):

          :from
          (<tt>Symbol</tt>)

              — default:
              <tt>the current state</tt>

          —

One or more initial states

          :to
          (<tt>Symbol</tt>)

          —

One or more target states

          :guard
          (<tt>Boolean</tt>)

          —

Whether to guard transitions with conditionals

Returns:

        (<tt>StateMachine::Transition</tt>)

        —

The transition that would be performed or <tt>nil</tt>

4
5
6
7
8
9
10
11
12

# File 'auto_shop.rb', line 4

state_machine :initial => :available do
  event :tow_vehicle do
    transition :available => :busy
  end

  event :fix_vehicle do
    transition :busy => :available
  end
end

  Generated on Fri Feb 17 08:30:35 2012 by
  yard
  0.7.5 (ruby-1.9.2).


text:
using OmniXaml.Metadata;

namespace OmniXaml.Services
{
    public class TemplatePipeline : ValuePipeline
    {
        private readonly IMetadataProvider metadataProvider;

        public TemplatePipeline(IValuePipeline pipeline, IMetadataProvider metadataProvider) : base(pipeline)
        {
            this.metadataProvider = metadataProvider;
        }

        protected override void HandleCore(object parent, Member member, MutablePipelineUnit mutable, INodeToObjectBuilder builder, BuilderContext context)
        {
            var deferringLoader = metadataProvider.Get(parent.GetType()).FragmentLoaderInfo;

            if (deferringLoader == null)
            {
                return;
            }

            if (IsApplicable(deferringLoader, parent, member))
            {
                mutable.Value = deferringLoader.Loader.Load(mutable.ParentNode, builder, context);
            }
        }

        private static bool IsApplicable(FragmentLoaderInfo loader, object parent, Member member)
        {
            return loader.Type == parent.GetType() && string.Equals(member.MemberName, loader.PropertyName);
        }
    }
}


text:
package it.mighe.ssbi.instructions

import it.mighe.ssbi.Instruction
import it.mighe.ssbi.Tape

class ClosingBracketInstruction() extends Instruction {

  var matching: OpeningBracketInstruction = null

  override def execute(tape: Tape): Instruction = {
    if (tape.current != 0) matching.next else next
  }

  override def toString = {
    s"ClosingBracketInstruction"
  }
}


text:
module ApplicationHelper
  include Application::TagHelper
end


text:
<?php

/**
 * BaseServicePrincipal
 *
 * This class has been auto-generated by the Doctrine ORM Framework
 *
 * @property integer $id
 * @property integer $service_id
 * @property integer $principal_id
 * @property Service $Service
 * @property Principal $Principal
 *
 * @method integer          getId()           Returns the current record's "id" value
 * @method integer          getServiceId()    Returns the current record's "service_id" value
 * @method integer          getPrincipalId()  Returns the current record's "principal_id" value
 * @method Service          getService()      Returns the current record's "Service" value
 * @method Principal        getPrincipal()    Returns the current record's "Principal" value
 * @method ServicePrincipal setId()           Sets the current record's "id" value
 * @method ServicePrincipal setServiceId()    Sets the current record's "service_id" value
 * @method ServicePrincipal setPrincipalId()  Sets the current record's "principal_id" value
 * @method ServicePrincipal setService()      Sets the current record's "Service" value
 * @method ServicePrincipal setPrincipal()    Sets the current record's "Principal" value
 *
 * @package    sf_sandbox
 * @subpackage model
 * @author     gyufi@sztaki.hu
 * @version    SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
 */
abstract class BaseServicePrincipal extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('service_principal');
        $this->hasColumn('id', 'integer', null, array(
             'type' => 'integer',
             'primary' => true,
             'autoincrement' => true,
             ));
        $this->hasColumn('service_id', 'integer', null, array(
             'type' => 'integer',
             'notnull' => true,
             ));
        $this->hasColumn('principal_id', 'integer', null, array(
             'type' => 'integer',
             'notnull' => true,
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasOne('Service', array(
             'local' => 'service_id',
             'foreign' => 'id',
             'onDelete' => 'CASCADE'));

        $this->hasOne('Principal', array(
             'local' => 'principal_id',
             'foreign' => 'id',
             'onDelete' => 'CASCADE'));
    }
}


text:
import { DDBaseImplement, HTMLElementExtendOpt } from './dd-base-impl';
import { DDUIData } from './types';
export interface DDResizableOpt {
    autoHide?: boolean;
    handles?: string;
    maxHeight?: number;
    maxWidth?: number;
    minHeight?: number;
    minWidth?: number;
    start?: (event: Event, ui: DDUIData) => void;
    stop?: (event: Event) => void;
    resize?: (event: Event, ui: DDUIData) => void;
}
export declare class DDResizable extends DDBaseImplement implements HTMLElementExtendOpt<DDResizableOpt> {
    el: HTMLElement;
    option: DDResizableOpt;
    constructor(el: HTMLElement, opts?: DDResizableOpt);
    on(event: 'resizestart' | 'resize' | 'resizestop', callback: (event: DragEvent) => void): void;
    off(event: 'resizestart' | 'resize' | 'resizestop'): void;
    enable(): void;
    disable(): void;
    destroy(): void;
    updateOption(opts: DDResizableOpt): DDResizable;
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MathPower
{
    class MathPower
    {
        static void Main(string[] args)
        {
            double number = double.Parse(Console.ReadLine());
            int power = int.Parse(Console.ReadLine());
            Console.WriteLine(MathPow(number, power));
        }
        public static double MathPow(double number, int power)
        {
            double result = 1;
            for (int i = 0; i < power; i++)
            {
                result *= number;
            }
            return result;
        }
    }
}


text:
package org.apache.maven.artifact.metadata;

@Deprecated
public interface ArtifactMetadata
    extends org.apache.maven.repository.legacy.metadata.ArtifactMetadata
{
    void merge( ArtifactMetadata metadata );
}


text:
<?php
/**
 * @license MIT
 */

namespace eugenejk\customFields\widgets\buttons;

use Yii;
use yii\helpers\Html;
use yii\widgets\InputWidget;
use eugenejk\customFields\assets\CustomFieldsAsset;

/**
 * Custom File Input button.
 * Replacement of file input to be able customize button
 *
 * @author Eugene Lazarchuk <shadyjk@yandex.ru>
 */
class FileUploadButton extends InputWidget
{
    /**
     * @var string Button display name
     */
    public $title = 'browse...';

    /**
     * @var array Button tag options
     */
    public $buttonOptions = [];

    /**
     * @var array Upoad Input Button tag options
     */
    public $options = [];

    /**
     * @var string layout
     */
    public $layout = "{button}{selected_file_name}";

    /**
     * @var string empty file name string
     */
    public $fileName = "No file chosen";

    /**
     * @var string empty file name tag
     */
    public $fileNameTag = "div";

    /**
     * @var string empty file name tag
     */
    public $fileNameOptions = [];

    /**
     * @var string empty file name tag
     */
    public $javascriptVarName;

    /**
     * @inheritdoc
     */
    public function init()
    {
        parent::init();
        $uid = uniqid();
        if (!array_key_exists('id', $this->buttonOptions)) {
            $this->buttonOptions['id'] = 'upload-button-' . $uid;
        }
        if (!array_key_exists('class', $this->buttonOptions)) {
            $this->buttonOptions['class'] = ['btn', 'btn-default'];
        }

        if (!array_key_exists('style', $this->options)) {
            $this->options['style'] = ['display' => 'none'];
        } else {
            $this->options['style']['display'] = 'none';
        }

        if (!array_key_exists('id', $this->fileNameOptions)) {
            $this->fileNameOptions['id'] = 'file-name-' . $uid;
        }
        if (!array_key_exists('style', $this->fileNameOptions)) {
            $this->fileNameOptions['style'] = ['display' => 'inline'];
        }

        if (!$this->javascriptVarName) {
            $this->javascriptVarName = 'fileUploadButton_' . $uid;
        }
    }

    /**
     * @inheritdoc
     */
    public function run()
    {
        $this->registerJs();
        return $this->render();
    }

    /**
     * Registers scripts
     */
    public function registerJs()
    {
        $initObject = json_encode([
            'uploadButtonId' => $this->buttonOptions['id'],
            'fileNameAreaId' => $this->fileNameOptions['id'],
            'fileInputId' => $this->options['id'],
        ]);
        CustomFieldsAsset::register($this->view);
        $this->view->registerJs("{$this->javascriptVarName} = new FileUploadButton($initObject)");
    }

    /**
     * Renders widget
     * @return string
     */
    public function render($view = null, $params = array())
    {
        $content = preg_replace_callback("/{\\w+}/", function ($matches) {
            $content = $this->renderSection($matches[0]);
            return $content === false ? $matches[0] : $content;
        }, $this->layout);

        return $content;
    }

    /**
     * Renders a section of the specified name.
     * If the named section is not supported, false will be returned.
     * @param string $name the section name, e.g., `{image}`, `{thumbnail}`.
     * @return string|boolean the rendering result of the section, or false if the named section is not supported.
     */
    public function renderSection($name)
    {
        switch ($name) {
            case '{selected_file_name}':
                return $this->renderFileName();
            case '{button}':
                return $this->renderButton();
            default:
                return false;
        }
    }

    /**
     * Render output seleted file name
     * @return string
     */
    public function renderFileName()
    {
        return Html::tag($this->fileNameTag, $this->fileName, $this->fileNameOptions);
    }

    /**
     * Render Button
     * @return string
     */
    public function renderButton()
    {
        return $this->renderField() . Html::button($this->title, $this->buttonOptions);
    }

    /**
     * Render file input
     * @return string
     */
    public function renderField()
    {
        if ($this->hasModel()) {
            return Html::activeFileInput($this->model, $this->attribute, $this->options);
        } else {
            return Html::fileInput($this->name, $this->value, $this->options);
        }
    }

}