answer
stringlengths
15
1.25M
<?php namespace Sonata\MediaBundle\Form\DataTransformer; use Symfony\Component\Form\<API key>; use Sonata\MediaBundle\Provider\Pool; use Sonata\MediaBundle\Model\MediaInterface; class <API key> implements <API key> { protected $pool; protected $options; /** * @param Pool $pool * @param string $class * @param array $options */ public function __construct(Pool $pool, $class, array $options = array()) { $this->pool = $pool; $this->options = $this->getOptions($options); $this->class = $class; } /** * Define the default options for the DataTransformer * * @param array $options * @return array */ protected function getOptions(array $options) { return array_merge(array( 'provider' => false, 'context' => false, 'empty_on_new' => true, 'new_on_update' => true, ), $options); } /** * {@inheritdoc} */ public function transform($value) { if ($value === null) { return new $this->class; } return $value; } /** * {@inheritdoc} */ public function reverseTransform($media) { if (!$media instanceof MediaInterface) { return $media; } $binaryContent = $media->getBinaryContent(); // no binary if (empty($binaryContent)){ // and no media id if ($media->getId() === null && $this->options['empty_on_new']) { return null; } elseif ($media->getId()) { return $media; } $media->setProviderStatus(MediaInterface::STATUS_PENDING); $media-><API key>(MediaInterface::<API key>); return $media; } // create a new media to avoid erasing other media or not ... $newMedia = $this->options['new_on_update'] ? new $this->class : $media; $newMedia->setProviderName($media->getProviderName()); $newMedia->setContext($media->getContext()); $newMedia->setBinaryContent($binaryContent); if (!$newMedia->getProviderName() && $this->options['provider']) { $newMedia->setProviderName($this->options['provider']); } if (!$newMedia->getContext() && $this->options['context']) { $newMedia->setContext($this->options['context']); } $provider = $this->pool->getProvider($newMedia->getProviderName()); $provider->transform($newMedia); return $newMedia; } }
#include "math.h" /** * @param {number} x * @return {number} */ float smash::math::square(float x) { return x * x; }; /** * @param {number} x1 * @param {number} y1 * @param {number} z1 * @param {number} x2 * @param {number} y2 * @param {number} z2 * @return {number} */ float smash::math::vectorDistance(float x1, float y1, float z1, float x2, float y2, float z2) { return sqrt(smash::math::square(x1 - x2) + smash::math::square(y1 - y2) + smash::math::square(z1 - z2)); }; /** * @param {number} x * @param {number} y * @param {number} z * @return {number} */ float smash::math::vectorLength(float x, float y, float z) { return sqrt(smash::math::square(x) + smash::math::square(y) + smash::math::square(z)); }; /** * @param {number} x * @param {number} y * @param {number} z * @return {number} */ float smash::math::dot(float x1, float y1, float z1, float x2, float y2, float z2) { return x1 * x2 + y1 * y2 + z1 * z2; }; /** * @param {!smash.Sphere} sphere1 * @param {!smash.Sphere} sphere2 * @return {boolean} */ bool smash::math::<API key>(smash::Sphere* sphere1, smash::Sphere* sphere2) { return smash::math::vectorDistance( sphere1->positionX, sphere1->positionY, sphere1->positionZ, sphere2->positionX, sphere2->positionY, sphere2->positionZ) < sphere1->radius + sphere2->radius; };
package org.deri.iris.basics; import org.deri.iris.api.basics.IPredicate; public class Predicate implements IPredicate { private final String symbol; /** A (unique) string containing the predicate name and arity. */ private final String symbolPlusArity; private final int arity; Predicate(final String symbol, final int arity) { this.symbol = symbol; this.arity = arity; StringBuilder b = new StringBuilder(); b.append(symbol).append('$').append(arity); symbolPlusArity = b.toString(); } public String getPredicateSymbol() { return symbol; } public int getArity() { return arity; } public int hashCode() { return symbolPlusArity.hashCode(); } public boolean equals(final Object o) { if (o == this) { return true; } if (!(o instanceof Predicate)) { return false; } Predicate p = (Predicate) o; return symbolPlusArity.equals(p.symbolPlusArity); } public int compareTo(IPredicate o) { Predicate predicate = (Predicate) o; return symbolPlusArity.compareTo(predicate.symbolPlusArity); } public String toString() { return symbol; } }
Copyright (c) 2016 Dropbox, Inc. All rights reserved. Auto-generated by Stone, do not modify. #import <Foundation/Foundation.h> #import "<API key>.h" @class <API key>; <API key> #pragma mark - API Object The `<API key>` struct. Transfer files added. This class implements the `DBSerializable` protocol (serialize and deserialize instance methods), which is required for all Obj-C SDK API route objects. @interface <API key> : NSObject <DBSerializable, NSCopying> #pragma mark - Instance fields Transfer id. @property (nonatomic, readonly, copy) NSString *fileTransferId; #pragma mark - Constructors Full constructor for the struct (exposes all instance variables). @param fileTransferId Transfer id. @return An initialized instance. - (instancetype)<API key>:(NSString *)fileTransferId; - (instancetype)init NS_UNAVAILABLE; @end #pragma mark - Serializer Object The serialization class for the `<API key>` struct. @interface <API key> : NSObject Serializes `<API key>` instances. @param instance An instance of the `<API key>` API object. @return A json-compatible dictionary representation of the `<API key>` API object. + (nullable NSDictionary<NSString *, id> *)serialize:(<API key> *)instance; Deserializes `<API key>` instances. @param dict A json-compatible dictionary representation of the `<API key>` API object. @return An instantiation of the `<API key>` object. + (<API key> *)deserialize:(NSDictionary<NSString *, id> *)dict; @end <API key>
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Kemel.Orm.Entity.Attributes { [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] public sealed class TextValueAttribute : Attribute { public TextValueAttribute(string strTextField, string strValueField) { this.TextField = strTextField; this.ValueField = strValueField; } public string TextField { get; private set; } public string ValueField { get; private set; } } }
<div ng-controller="SidebarCtrl"> <md-sidenav class="Sidebar md-sidenav-left md-whiteframe-z2" md-component-id="left" md-is-locked-open="true"> <md-toolbar class=""> <h1 class="md-toolbar-tools Sidebar-title">Laravel 5 angular material starter</h1> <h6 class="Sidebar-version">v 2.2.0</h6> </md-toolbar> <md-content class="Sidebar-pages md-default-theme"> <md-list> <md-list-item ng-click="noop()" ui-sref-active="active" class="Sidebar-page"> <div ui-sref="app.landing">Overview</div> </md-list-item> <md-list-item ng-click="noop()" ui-sref-active="active" class="Sidebar-page"> <div ui-sref="app.install">Install</div> </md-list-item> <md-list-item ng-click="noop()" ui-sref-active="active" class="Sidebar-page"> <div ui-sref="app.tabs">Features</div> </md-list-item> </md-list> </md-content> </md-sidenav> </div>
var assert = require('assert'); var WebSocket = require('ws'); var zetta = require('./..'); var zettacluster = require('zetta-cluster'); var Driver = require('./fixture/example_driver'); var MemRegistry = require('./fixture/mem_registry'); var MemPeerRegistry = require('./fixture/mem_peer_registry'); describe('Peering Event Streams', function() { var cloud = null; var cloudUrl = null; var baseUrl = '/events'; beforeEach(function(done) { cloud = zetta({ registry: new MemRegistry(), peerRegistry: new MemPeerRegistry() }); cloud.silent(); cloud.listen(0, function(err) { if(err) { return done(err); } cloudUrl = 'http://localhost:' + cloud.httpServer.server.address().port; done(); }); }); afterEach(function(done) { cloud.httpServer.server.close(); done(); }); it('will receive a _peer/connect event when subscribed', function(done) { var z = zetta({ registry: new MemRegistry(), peerRegistry: new MemPeerRegistry() }); z.silent(); z.listen(0, function(err) { if(err) { return done(err); } var zPort = z.httpServer.server.address().port; var endpoint = 'localhost:' + zPort; var ws = new WebSocket('ws://' + endpoint + baseUrl); ws.on('open', function() { var msg = { type: 'subscribe', topic: '_peer/connect' }; ws.send(JSON.stringify(msg)); ws.on('message', function(buffer) { var json = JSON.parse(buffer); if(json.type === 'subscribe-ack') { assert.equal(json.type, 'subscribe-ack'); assert(json.timestamp); assert.equal(json.topic, '_peer/connect'); assert(json.subscriptionId); } else if(json.type === 'event') { assert.equal(json.topic, '_peer/connect'); done(); } }); }); ws.on('error', done); z.link(cloudUrl); }); }); it('will receive a _peer/connect event when subscribed to **', function(done) { var z = zetta({ registry: new MemRegistry(), peerRegistry: new MemPeerRegistry() }); z.silent(); z.listen(0, function(err) { if(err) { return done(err); } var zPort = z.httpServer.server.address().port; var endpoint = 'localhost:' + zPort; var ws = new WebSocket('ws://' + endpoint + baseUrl); ws.on('open', function() { var msg = { type: 'subscribe', topic: '**' }; ws.send(JSON.stringify(msg)); ws.on('message', function(buffer) { var json = JSON.parse(buffer); if(json.type === 'subscribe-ack') { assert.equal(json.type, 'subscribe-ack'); assert(json.timestamp); assert.equal(json.topic, '**'); assert(json.subscriptionId); } else if(json.type === 'event') { assert.equal(json.topic, '_peer/connect'); done(); } }); }); ws.on('error', done); z.link(cloudUrl); }); }); it('will receive a _peer/disconnect event when subscribed', function(done) { var z = zetta({ registry: new MemRegistry(), peerRegistry: new MemPeerRegistry() }); z.silent(); z.pubsub.subscribe('_peer/connect', function(topic, data) { var peer = data.peer; peer.close(); }); z.listen(0, function(err) { if(err) { return done(err); } var zPort = z.httpServer.server.address().port; var endpoint = 'localhost:' + zPort; var ws = new WebSocket('ws://' + endpoint + baseUrl); ws.on('open', function() { var msg = { type: 'subscribe', topic: '_peer/disconnect' }; ws.send(JSON.stringify(msg)); ws.on('message', function(buffer) { var json = JSON.parse(buffer); if(json.type === 'subscribe-ack') { assert.equal(json.type, 'subscribe-ack'); assert(json.timestamp); assert.equal(json.topic, '_peer/disconnect'); assert(json.subscriptionId); } else if(json.type === 'event') { assert.equal(json.topic, '_peer/disconnect'); done(); } }); }); ws.on('error', done); z.link(cloudUrl); }); }); it('will receive a _peer/connect event when subscribed with wildcards', function(done) { var z = zetta({ registry: new MemRegistry(), peerRegistry: new MemPeerRegistry() }); z.silent(); z.pubsub.subscribe('_peer/connect', function(topic, data) { var peer = data.peer; }); z.listen(0, function(err) { if(err) { return done(err); } var zPort = z.httpServer.server.address().port; var endpoint = 'localhost:' + zPort; var ws = new WebSocket('ws://' + endpoint + baseUrl); ws.on('open', function() { var msg = { type: 'subscribe', topic: 'hub/testdriver/*/state' }; msg = { type: 'subscribe', topic: 'hub/testdriver/*/state' }; var topic = 'hub/testdriver/*/state'; var topic = 'hub/testdriver/*/state'; var topic = '*/testdriver/*/state'; var topic = 'hub/testdriver/*/state'; var endpoint = urls[idx]; var ws = new WebSocket('ws://' + endpoint + baseUrl); var subscriptionId = null; var topic = validTopics[0].replace('hub/', '**/'); ws.on('open', function() { var msg = { type: 'subscribe', topic: topic }; ws.send(JSON.stringify(msg)); ws.on('message', function(buffer) { var json = JSON.parse(buffer); if(json.type === 'subscribe-ack') { assert.equal(json.type, 'subscribe-ack'); assert(json.timestamp); assert.equal(json.topic, topic); assert(json.subscriptionId); subscriptionId = json.subscriptionId; setTimeout(function() { devices[1].call('change'); devices[0].call('change'); }, 50); } else { assert.equal(json.type, 'event'); assert(json.timestamp); assert.equal(json.topic, validTopics[0]); assert.equal(json.subscriptionId, subscriptionId); assert(json.data); done(); } }); }); ws.on('error', done); }); itBoth('**/<device_id>/state will match valid topic from device', function(idx, done) { var endpoint = urls[idx]; var ws = new WebSocket('ws://' + endpoint + baseUrl); var subscriptionId = null; var topic = validTopics[0].replace('hub/', '**/'); ws.on('open', function() { var msg = { type: 'subscribe', topic: topic }; ws.send(JSON.stringify(msg)); ws.on('message', function(buffer) { var json = JSON.parse(buffer); if(json.type === 'subscribe-ack') { assert.equal(json.type, 'subscribe-ack'); assert(json.timestamp); assert.equal(json.topic, topic); assert(json.subscriptionId); subscriptionId = json.subscriptionId; setTimeout(function() { devices[1].call('change'); devices[0].call('change'); }, 50); } else { assert.equal(json.type, 'event'); assert(json.timestamp); assert.equal(json.topic, validTopics[0]); assert.equal(json.subscriptionId, subscriptionId); assert(json.data); done(); } }); }); ws.on('error', done); }); itBoth('**/state will match valid topic from device', function(idx, done) { var endpoint = urls[idx]; var ws = new WebSocket('ws://' + endpoint + baseUrl); var subscriptionId = null; var topic = validTopics[0].replace('hub/', '**/'); ws.on('open', function() { var msg = { type: 'subscribe', topic: topic }; ws.send(JSON.stringify(msg)); ws.on('message', function(buffer) { var json = JSON.parse(buffer); if(json.type === 'subscribe-ack') { assert.equal(json.type, 'subscribe-ack'); assert(json.timestamp); assert.equal(json.topic, topic); assert(json.subscriptionId); subscriptionId = json.subscriptionId; setTimeout(function() { devices[0].call('change'); }, 50); } else { assert.equal(json.type, 'event'); assert(json.timestamp); assert.equal(json.topic, validTopics[0]); assert.equal(json.subscriptionId, subscriptionId); assert(json.data); done(); } }); }); ws.on('error', done); }); itBoth('subscribing to logs topic on device will get properly formated response', function(idx, done) { var endpoint = urls[idx]; var ws = new WebSocket('ws://' + endpoint + baseUrl); var subscriptionId = null; var topic = 'hub/testdriver/*/logs'; var lastTopic = null; ws.on('open', function() { var msg = { type: 'subscribe', topic: topic }; ws.send(JSON.stringify(msg)); ws.on('message', function(buffer) { var json = JSON.parse(buffer); if(json.type === 'subscribe-ack') { assert.equal(json.type, 'subscribe-ack'); assert(json.timestamp); assert.equal(json.topic, topic); assert(json.subscriptionId); subscriptionId = json.subscriptionId; setTimeout(function() { devices[0].call('change'); }, 50); } else { assert.equal(json.type, 'event'); assert(json.timestamp); assert(json.topic); assert.notEqual(json.topic, lastTopic); lastTopic = json.topic; assert.equal(json.subscriptionId, subscriptionId); assert(json.data); assert.equal(json.data.transition, 'change'); assert(!json.data.transitions); assert.deepEqual(json.data.input, []); assert(json.data.properties); assert(json.data.actions); done(); } }); }); ws.on('error', done); }); itBoth('topic that doesnt exist still opens stream', function(idx, done) { var endpoint = urls[idx]; var ws = new WebSocket('ws://' + endpoint + baseUrl); var topic = 'blah/foo/1/blah'; ws.on('open', function() { var msg = { type: 'subscribe', topic: topic }; ws.send(JSON.stringify(msg)); ws.on('message', function(buffer) { var json = JSON.parse(buffer); assert.equal(json.type, 'subscribe-ack'); assert(json.timestamp); assert.equal(json.topic, topic); assert(json.subscriptionId); done(); }); }); ws.on('error', done); }); it('subscription cloud will get _peer/connect events from hub', function(done) { var endpoint = urls[0]; var topicTwo = 'hub/testdriver/*/state'; <API key>('**/'); <API key>('hub/'); <API key>('{hub.+}/'); itBoth('invalid stream query should result in a 400 error', function(idx, done){ var endpoint = urls[idx]; var ws = new WebSocket('ws://' + endpoint + baseUrl); var subscriptionId = null; var count = 0; var topic = 'hub/testdriver/' + devices[0].id + '/fooobject?invalid stream query'; var data = { foo: 'bar', val: 2 }; ws.on('open', function() { var msg = { type: 'subscribe', topic: topic }; ws.send(JSON.stringify(msg)); ws.on('message', function(buffer) { var json = JSON.parse(buffer); assert(json.timestamp); assert.equal(json.topic, topic); assert.equal(json.code, 400); assert(json.message); done(); }); }); ws.on('error', done); }); itBoth('invalid subscribe should result in a 400 error', function(idx, done){ var endpoint = urls[idx]; var ws = new WebSocket('ws://' + endpoint + baseUrl); var subscriptionId = null; var count = 0; var topic = 'hub/testdriver/' + devices[0].id + '/fooobject'; ws.on('open', function() { var msg = { type: 'subscribe' }; ws.send(JSON.stringify(msg)); ws.on('message', function(buffer) { var json = JSON.parse(buffer); assert(json.timestamp); assert.equal(json.code, 400); assert(json.message); done(); }); }); ws.on('error', done); }); itBoth('unsubscribing from an invalid subscriptionId should result in a 400 error', function(idx, done){ var endpoint = urls[idx]; var ws = new WebSocket('ws://' + endpoint + baseUrl); var subscriptionId = null; var count = 0; ws.on('open', function() { var msg = { type: 'unsubscribe', subscriptionId: 123 }; ws.send(JSON.stringify(msg)); ws.on('message', function(buffer) { var json = JSON.parse(buffer); assert(json.timestamp); assert.equal(json.code, 405); assert(json.message); done(); }); }); ws.on('error', done); }); itBoth('unsubscribing from a missing subscriptionId should result in a 400 error', function(idx, done){ var endpoint = urls[idx]; var ws = new WebSocket('ws://' + endpoint + baseUrl); var subscriptionId = null; var count = 0; ws.on('open', function() { var msg = { type: 'unsubscribe' }; ws.send(JSON.stringify(msg)); ws.on('message', function(buffer) { var json = JSON.parse(buffer); assert(json.timestamp); assert.equal(json.code, 400); assert(json.message); done(); }); }); ws.on('error', done); }); itBoth('on invalid message should result in a 400 error', function(idx, done){ var endpoint = urls[idx]; var ws = new WebSocket('ws://' + endpoint + baseUrl); var subscriptionId = null; var count = 0; ws.on('open', function() { var msg = { test: 123 }; ws.send(JSON.stringify(msg)); ws.on('message', function(buffer) { var json = JSON.parse(buffer); assert(json.timestamp); assert.equal(json.code, 400); assert(json.message); done(); }); }); ws.on('error', done); }); }) }); describe('SPDY API', function() { }); });
require "test_helper" class SubscriptionTest < ActiveSupport::TestCase should belong_to :rubygem should belong_to :user should <API key>(:rubygem_id).scoped_to(:user_id) should <API key>(:rubygem) should <API key>(:user) should "be valid with factory" do assert build(:ownership).valid? end end
import random import string import cherrypy class StringGenerator(object): @cherrypy.expose def index(self): return "Hello world!" @cherrypy.expose def generate(self, length=8): return ''.join(random.sample(string.hexdigits, int(length))) if __name__ == '__main__': cherrypy.quickstart(StringGenerator())
# AGQueryString [![CI Status](http: [![Version](https: [![License](https: [![Platform](https: Dictionary extension to create query string from it ## Usage To run the example project, clone the repo, and run `pod install` from the Example directory first. ## Requirements ## Installation AGQueryString is available through [CocoaPods](http://cocoapods.org). To install it, simply add the following line to your Podfile: ruby pod "AGQueryString" ## Author Ayush Goel, ayushgoel111@gmail.com AGQueryString is available under the MIT license. See the LICENSE file for more info.
//Problem 4. Appearance count //Write a method that counts how many times given number appears in given array. //Write a test program to check if the method is workings correctly. using System; public class AppearanceCountApp { public static void Main() { Console.WriteLine("Please enter an array!"); Console.Write("Please enter length of the array: "); int n = int.Parse(Console.ReadLine()); int[] numbers = new int[n]; for (int i = 0; i < n; i++) { Console.Write("[{0}] - ", i); numbers[i] = int.Parse(Console.ReadLine()); } Console.Write("Please enter number, to check how many times it appears in: "); int k = int.Parse(Console.ReadLine()); Console.WriteLine("\nNumber {0} appers {1} times in this array.", k, AppearanceCount(numbers, k)); } public static int AppearanceCount(int[] nums, int n) { int counter = 0; foreach (int num in nums) { if (num == n) { counter++; } else { continue; } } return counter; } }
package android.support.loader; public final class R { private R() {} public static final class attr { private attr() {} public static final int alpha = 0x7f020027; public static final int font = 0x7f02007a; public static final int <API key> = 0x7f02007c; public static final int fontProviderCerts = 0x7f02007d; public static final int <API key> = 0x7f02007e; public static final int <API key> = 0x7f02007f; public static final int fontProviderPackage = 0x7f020080; public static final int fontProviderQuery = 0x7f020081; public static final int fontStyle = 0x7f020082; public static final int <API key> = 0x7f020083; public static final int fontWeight = 0x7f020084; public static final int ttcIndex = 0x7f02013c; } public static final class color { private color() {} public static final int <API key> = 0x7f04003f; public static final int <API key> = 0x7f040040; public static final int <API key> = 0x7f04004a; public static final int <API key> = 0x7f04004c; } public static final class dimen { private dimen() {} public static final int <API key> = 0x7f05004b; public static final int <API key> = 0x7f05004c; public static final int <API key> = 0x7f05004d; public static final int <API key> = 0x7f05004e; public static final int <API key> = 0x7f05004f; public static final int <API key> = 0x7f050050; public static final int <API key> = 0x7f050051; public static final int <API key> = 0x7f05005b; public static final int <API key> = 0x7f05005c; public static final int <API key> = 0x7f05005d; public static final int <API key> = 0x7f05005e; public static final int <API key> = 0x7f05005f; public static final int <API key> = 0x7f050060; public static final int <API key> = 0x7f050061; public static final int <API key> = 0x7f050062; public static final int <API key> = 0x7f050063; public static final int <API key> = 0x7f050064; public static final int <API key> = 0x7f050065; public static final int <API key> = 0x7f050066; public static final int <API key> = 0x7f050067; public static final int <API key> = 0x7f050068; public static final int <API key> = 0x7f050069; } public static final class drawable { private drawable() {} public static final int <API key> = 0x7f060057; public static final int notification_bg = 0x7f060058; public static final int notification_bg_low = 0x7f060059; public static final int <API key> = 0x7f06005a; public static final int <API key> = 0x7f06005b; public static final int <API key> = 0x7f06005c; public static final int <API key> = 0x7f06005d; public static final int <API key> = 0x7f06005e; public static final int <API key> = 0x7f06005f; public static final int <API key> = 0x7f060060; public static final int <API key> = 0x7f060061; public static final int <API key> = 0x7f060062; } public static final class id { private id() {} public static final int action_container = 0x7f07000d; public static final int action_divider = 0x7f07000f; public static final int action_image = 0x7f070010; public static final int action_text = 0x7f070016; public static final int actions = 0x7f070017; public static final int async = 0x7f07001d; public static final int blocking = 0x7f070020; public static final int chronometer = 0x7f070028; public static final int forever = 0x7f07003c; public static final int icon = 0x7f070042; public static final int icon_group = 0x7f070043; public static final int info = 0x7f070046; public static final int italic = 0x7f070048; public static final int line1 = 0x7f07004a; public static final int line3 = 0x7f07004b; public static final int normal = 0x7f070053; public static final int <API key> = 0x7f070054; public static final int <API key> = 0x7f070055; public static final int <API key> = 0x7f070056; public static final int right_icon = 0x7f07005f; public static final int right_side = 0x7f070060; public static final int <API key> = 0x7f070080; public static final int <API key> = 0x7f070081; public static final int <API key> = 0x7f070082; public static final int text = 0x7f070083; public static final int text2 = 0x7f070084; public static final int time = 0x7f070088; public static final int title = 0x7f070089; } public static final class integer { private integer() {} public static final int <API key> = 0x7f080004; } public static final class layout { private layout() {} public static final int notification_action = 0x7f09001d; public static final int <API key> = 0x7f09001e; public static final int <API key> = 0x7f09001f; public static final int <API key> = 0x7f090020; public static final int <API key> = 0x7f090021; public static final int <API key> = 0x7f090022; } public static final class string { private string() {} public static final int <API key> = 0x7f0b0029; } public static final class style { private style() {} public static final int <API key> = 0x7f0c00ec; public static final int <API key> = 0x7f0c00ed; public static final int <API key> = 0x7f0c00ee; public static final int <API key> = 0x7f0c00ef; public static final int <API key> = 0x7f0c00f0; public static final int <API key> = 0x7f0c0158; public static final int <API key> = 0x7f0c0159; } public static final class styleable { private styleable() {} public static final int[] ColorStateListItem = { 0x10101a5, 0x101031f, 0x7f020027 }; public static final int <API key> = 0; public static final int <API key> = 1; public static final int <API key> = 2; public static final int[] FontFamily = { 0x7f02007c, 0x7f02007d, 0x7f02007e, 0x7f02007f, 0x7f020080, 0x7f020081 }; public static final int <API key> = 0; public static final int <API key> = 1; public static final int <API key> = 2; public static final int <API key> = 3; public static final int <API key> = 4; public static final int <API key> = 5; public static final int[] FontFamilyFont = { 0x1010532, 0x1010533, 0x101053f, 0x101056f, 0x1010570, 0x7f02007a, 0x7f020082, 0x7f020083, 0x7f020084, 0x7f02013c }; public static final int <API key> = 0; public static final int <API key> = 1; public static final int <API key> = 2; public static final int <API key> = 3; public static final int <API key> = 4; public static final int FontFamilyFont_font = 5; public static final int <API key> = 6; public static final int <API key> = 7; public static final int <API key> = 8; public static final int <API key> = 9; public static final int[] GradientColor = { 0x101019d, 0x101019e, 0x10101a1, 0x10101a2, 0x10101a3, 0x10101a4, 0x1010201, 0x101020b, 0x1010510, 0x1010511, 0x1010512, 0x1010513 }; public static final int <API key> = 0; public static final int <API key> = 1; public static final int <API key> = 2; public static final int <API key> = 3; public static final int <API key> = 4; public static final int <API key> = 5; public static final int <API key> = 6; public static final int <API key> = 7; public static final int <API key> = 8; public static final int <API key> = 9; public static final int <API key> = 10; public static final int <API key> = 11; public static final int[] GradientColorItem = { 0x10101a5, 0x1010514 }; public static final int <API key> = 0; public static final int <API key> = 1; } }
from .nvd3 import NVD3 from flask import jsonify, request import numpy as np class TwoAxisFocus(NVD3): _allowed_axes = ["sigma", "minmax"] def __init__(self, x, y1, y2, data_source, init_params={}, chart_id="new_chart", url="/new_chart/", colors=[], auto_scale="sigma", y1_axis_range=[], y2_axis_range=[], sigma=3, x_label="", y1_label="", y2_label="", margin={"top": 30, "right": 60, "bottom": 50, "left": 70}): self.x = x self.y1 = y1 self.y2 = y2 self.auto_scale = auto_scale if auto_scale in self._allowed_axes else "sigma" self.sigma = 3 self.y1_axis_range = y1_axis_range self.y2_axis_range = y2_axis_range self.options = { "type": "TwoAxisFocus", "chartid": chart_id, "url": url, "colors": colors, "init_params": init_params, "labels": { "xAxis": x_label, "yAxis1": y1_label, "yAxis2": y2_label }, "margin": margin, "type": "TwoAxisFocus" } def get_data(): args = {} for c in init_params: if request.args.get(c): args[c] = request.args[c] else: args[c] = init_params[c] return jsonify(self.to_json( self.apply_filters(data_source, args) )) super(TwoAxisFocus, self).__init__(self.options, get_data) def get_bounds(self, y, method="sigma"): if self.auto_scale == "sigma": m_, s_ = y.mean(), y.std() l = m_ - self.sigma*s_ u = m_ + self.sigma*s_ else: l = y.min() u = y.max() return [l, u] def to_json(self, df): if df.empty: return { "data": [], "yAxis1": {"lower": 0, "upper": 1}, "yAxis2": {"lower": 0, "upper": 1} } if not self.y1_axis_range: bounds1 = self.get_bounds(df[self.y1], method=self.auto_scale) else: bounds1 = self.y1_axis_range if not self.y2_axis_range: bounds2 = self.get_bounds(df[self.y2], method=self.auto_scale) else: bounds2 = self.y2_axis_range records = [ {"key": self.y1, "values": [], "yAxis": 1, "type": "line"}, {"key": self.y2, "values": [], "yAxis": 2, "type": "line"} ] for n, r in df.iterrows(): records[0]["values"].append({"x": r[self.x], "y": r[self.y1]}) records[1]["values"].append({"x": r[self.x], "y": r[self.y2]}) return { "data": records, "yAxis1": {"bounds": bounds1}, "yAxis2": {"bounds": bounds2} }
#include <sstream> #include <limits> #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" #include "ifcpp/reader/ReaderUtil.h" #include "ifcpp/writer/WriterUtil.h" #include "ifcpp/IFC4/include/<API key>.h" #include "ifcpp/IFC4/include/IfcForceMeasure.h" #include "ifcpp/IFC4/include/IfcLabel.h" // ENTITY <API key> <API key>::<API key>( int id ) { m_entity_id = id; } shared_ptr<BuildingObject> <API key>::getDeepCopy( BuildingCopyOptions& options ) { shared_ptr<<API key>> copy_self( new <API key>() ); if( m_Name ) { copy_self->m_Name = <API key><IfcLabel>( m_Name->getDeepCopy(options) ); } if( m_TensionFailureX ) { copy_self->m_TensionFailureX = <API key><IfcForceMeasure>( m_TensionFailureX->getDeepCopy(options) ); } if( m_TensionFailureY ) { copy_self->m_TensionFailureY = <API key><IfcForceMeasure>( m_TensionFailureY->getDeepCopy(options) ); } if( m_TensionFailureZ ) { copy_self->m_TensionFailureZ = <API key><IfcForceMeasure>( m_TensionFailureZ->getDeepCopy(options) ); } if( <API key> ) { copy_self-><API key> = <API key><IfcForceMeasure>( <API key>->getDeepCopy(options) ); } if( <API key> ) { copy_self-><API key> = <API key><IfcForceMeasure>( <API key>->getDeepCopy(options) ); } if( <API key> ) { copy_self-><API key> = <API key><IfcForceMeasure>( <API key>->getDeepCopy(options) ); } return copy_self; } void <API key>::getStepLine( std::stringstream& stream ) const { stream << "#" << m_entity_id << "= <API key>" << "("; if( m_Name ) { m_Name->getStepParameter( stream ); } else { stream << "$"; } stream << ","; if( m_TensionFailureX ) { m_TensionFailureX->getStepParameter( stream ); } else { stream << "$"; } stream << ","; if( m_TensionFailureY ) { m_TensionFailureY->getStepParameter( stream ); } else { stream << "$"; } stream << ","; if( m_TensionFailureZ ) { m_TensionFailureZ->getStepParameter( stream ); } else { stream << "$"; } stream << ","; if( <API key> ) { <API key>->getStepParameter( stream ); } else { stream << "$"; } stream << ","; if( <API key> ) { <API key>->getStepParameter( stream ); } else { stream << "$"; } stream << ","; if( <API key> ) { <API key>->getStepParameter( stream ); } else { stream << "$"; } stream << ");"; } void <API key>::getStepParameter( std::stringstream& stream, bool /*is_select_type*/ ) const { stream << "#" << m_entity_id; } const std::wstring <API key>::toString() const { return L"<API key>"; } void <API key>::readStepArguments( const std::vector<std::wstring>& args, const std::map<int,shared_ptr<BuildingEntity> >& map ) { const size_t num_args = args.size(); if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity <API key>, expecting 7, having " << num_args << ". Entity ID: " << m_entity_id << std::endl; throw BuildingException( err.str().c_str() ); } m_Name = IfcLabel::<API key>( args[0], map ); m_TensionFailureX = IfcForceMeasure::<API key>( args[1], map ); m_TensionFailureY = IfcForceMeasure::<API key>( args[2], map ); m_TensionFailureZ = IfcForceMeasure::<API key>( args[3], map ); <API key> = IfcForceMeasure::<API key>( args[4], map ); <API key> = IfcForceMeasure::<API key>( args[5], map ); <API key> = IfcForceMeasure::<API key>( args[6], map ); } void <API key>::getAttributes( std::vector<std::pair<std::string, shared_ptr<BuildingObject> > >& vec_attributes ) const { <API key>::getAttributes( vec_attributes ); vec_attributes.emplace_back( std::make_pair( "TensionFailureX", m_TensionFailureX ) ); vec_attributes.emplace_back( std::make_pair( "TensionFailureY", m_TensionFailureY ) ); vec_attributes.emplace_back( std::make_pair( "TensionFailureZ", m_TensionFailureZ ) ); vec_attributes.emplace_back( std::make_pair( "CompressionFailureX", <API key> ) ); vec_attributes.emplace_back( std::make_pair( "CompressionFailureY", <API key> ) ); vec_attributes.emplace_back( std::make_pair( "CompressionFailureZ", <API key> ) ); } void <API key>::<API key>( std::vector<std::pair<std::string, shared_ptr<BuildingObject> > >& <API key> ) const { <API key>::<API key>( <API key> ); } void <API key>::<API key>( shared_ptr<BuildingEntity> ptr_self_entity ) { <API key>::<API key>( ptr_self_entity ); } void <API key>::<API key>() { <API key>::<API key>(); }
/*can@2.2.7#view/parser/parser*/ steal('can/view', function (can) { function makeMap(str) { var obj = {}, items = str.split(','); for (var i = 0; i < items.length; i++) { obj[items[i]] = true; } return obj; } function handleIntermediate(intermediate, handler) { for (var i = 0, len = intermediate.length; i < len; i++) { var item = intermediate[i]; handler[item.tokenType].apply(handler, item.args); } return intermediate; } var alphaNumericHU = '-:A-Za-z0-9_', attributeNames = '[a-zA-Z_:][' + alphaNumericHU + ':.]*', spaceEQspace = '\\s*=\\s*', dblQuote2dblQuote = '"((?:\\\\.|[^"])*)"', quote2quote = '\'((?:\\\\.|[^\'])*)\'', attributeEqAndValue = '(?:' + spaceEQspace + '(?:' + '(?:"[^"]*")|(?:\'[^\']*\')|[^>\\s]+))?', matchStash = '\\{\\{[^\\}]*\\}\\}\\}?', stash = '\\{\\{([^\\}]*)\\}\\}\\}?', startTag = new RegExp('^<([' + alphaNumericHU + ']+)' + '(' + '(?:\\s*' + '(?:(?:' + '(?:' + attributeNames + ')?' + attributeEqAndValue + ')|' + '(?:' + matchStash + ')+)' + ')*' + ')\\s*(\\/?)>'), endTag = new RegExp('^<\\/([' + alphaNumericHU + ']+)[^>]*>'), attr = new RegExp('(?:' + '(?:(' + attributeNames + ')|' + stash + ')' + '(?:' + spaceEQspace + '(?:' + '(?:' + dblQuote2dblQuote + ')|(?:' + quote2quote + ')|([^>\\s]+)' + ')' + ')?)', 'g'), mustache = new RegExp(stash, 'g'), txtBreak = /<|\{\{/; var empty = makeMap('area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed'); var block = makeMap('a,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video'); var inline = makeMap('abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var'); var closeSelf = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr'); var fillAttrs = makeMap('checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected'); var special = makeMap('script,style'); var tokenTypes = 'start,end,close,attrStart,attrEnd,attrValue,chars,comment,special,done'.split(','); var fn = function () { }; var HTMLParser = function (html, handler, returnIntermediate) { if (typeof html === 'object') { return handleIntermediate(html, handler); } var intermediate = []; handler = handler || {}; if (returnIntermediate) { can.each(tokenTypes, function (name) { var callback = handler[name] || fn; handler[name] = function () { if (callback.apply(this, arguments) !== false) { intermediate.push({ tokenType: name, args: can.makeArray(arguments) }); } }; }); } function parseStartTag(tag, tagName, rest, unary) { tagName = tagName.toLowerCase(); if (block[tagName]) { while (stack.last() && inline[stack.last()]) { parseEndTag('', stack.last()); } } if (closeSelf[tagName] && stack.last() === tagName) { parseEndTag('', tagName); } unary = empty[tagName] || !!unary; handler.start(tagName, unary); if (!unary) { stack.push(tagName); } HTMLParser.parseAttrs(rest, handler); handler.end(tagName, unary); } function parseEndTag(tag, tagName) { var pos; if (!tagName) { pos = 0; } else { for (pos = stack.length - 1; pos >= 0; pos if (stack[pos] === tagName) { break; } } } if (pos >= 0) { for (var i = stack.length - 1; i >= pos; i if (handler.close) { handler.close(stack[i]); } } stack.length = pos; } } function parseMustache(mustache, inside) { if (handler.special) { handler.special(inside); } } var index, chars, match, stack = [], last = html; stack.last = function () { return this[this.length - 1]; }; while (html) { chars = true; if (!stack.last() || !special[stack.last()]) { if (html.indexOf('<! index = html.indexOf(' if (index >= 0) { if (handler.comment) { handler.comment(html.substring(4, index)); } html = html.substring(index + 3); chars = false; } } else if (html.indexOf('</') === 0) { match = html.match(endTag); if (match) { html = html.substring(match[0].length); match[0].replace(endTag, parseEndTag); chars = false; } } else if (html.indexOf('<') === 0) { match = html.match(startTag); if (match) { html = html.substring(match[0].length); match[0].replace(startTag, parseStartTag); chars = false; } } else if (html.indexOf('{{') === 0) { match = html.match(mustache); if (match) { html = html.substring(match[0].length); match[0].replace(mustache, parseMustache); } } if (chars) { index = html.search(txtBreak); var text = index < 0 ? html : html.substring(0, index); html = index < 0 ? '' : html.substring(index); if (handler.chars && text) { handler.chars(text); } } } else { html = html.replace(new RegExp('([\\s\\S]*?)</' + stack.last() + '[^>]*>'), function (all, text) { text = text.replace(/|<!\[CDATA\[([\s\S]*?)]]>/g, '$1$2'); if (handler.chars) { handler.chars(text); } return ''; }); parseEndTag('', stack.last()); } if (html === last) { throw 'Parse Error: ' + html; } last = html; } parseEndTag(); handler.done(); return intermediate; }; HTMLParser.parseAttrs = function (rest, handler) { (rest != null ? rest : '').replace(attr, function (text, name, special, dblQuote, singleQuote, val) { if (special) { handler.special(special); } if (name || dblQuote || singleQuote || val) { var value = arguments[3] ? arguments[3] : arguments[4] ? arguments[4] : arguments[5] ? arguments[5] : fillAttrs[name.toLowerCase()] ? name : ''; handler.attrStart(name || ''); var last = mustache.lastIndex = 0, res = mustache.exec(value), chars; while (res) { chars = value.substring(last, mustache.lastIndex - res[0].length); if (chars.length) { handler.attrValue(chars); } handler.special(res[1]); last = mustache.lastIndex; res = mustache.exec(value); } chars = value.substr(last, value.length); if (chars) { handler.attrValue(chars); } handler.attrEnd(name || ''); } }); }; can.view.parser = HTMLParser; return HTMLParser; });
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Treeful</title> <style type="text/css"> body { font-family: "arial"; } </style> </head> <body> <h1>Vanilla Counter</h1> <button id='inc'>Increment</button> <button id='dec'>Decrement</button> <h3 id='count'>0</h3> <script src="bundle.vanilla-counter.js"></script> </body> </html>
# Installation > `npm install --save @types/jasminewd2` # Summary This package contains type definitions for jasminewd2 (https://github.com/angular/jasminewd). # Details Files were exported from https: Additional Details * Last updated: Thu, 16 Mar 2017 14:36:10 GMT * Dependencies: jasmine * Global values: afterAll, afterEach, beforeAll, beforeEach, fit, it, jasmine, xit # Credits These definitions were written by Sammy Jelin <https://github.com/sjelin>.
package aima.test.core.unit.environment.map; import java.util.ArrayList; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import aima.core.agent.Action; import aima.core.environment.map.ExtendableMap; import aima.core.environment.map.MapFunctionFactory; import aima.core.environment.map.MoveToAction; import aima.core.search.framework.problem.ActionsFunction; import aima.core.search.framework.problem.ResultFunction; /** * @author Ciaran O'Reilly * */ public class <API key> { ActionsFunction af; ResultFunction rf; @Before public void setUp() { ExtendableMap aMap = new ExtendableMap(); aMap.<API key>("A", "B", 5.0); aMap.<API key>("A", "C", 6.0); aMap.<API key>("B", "C", 4.0); aMap.<API key>("C", "D", 7.0); aMap.<API key>("B", "E", 14.0); af = MapFunctionFactory.getActionsFunction(aMap); rf = MapFunctionFactory.getResultFunction(); } @Test public void testSuccessors() { ArrayList<String> locations = new ArrayList<String>(); locations.clear(); locations.add("B"); locations.add("C"); for (Action a : af.actions("A")) { Assert.assertTrue(locations.contains(((MoveToAction) a) .getToLocation())); Assert.assertTrue(locations.contains(rf.result("A", a))); } locations.clear(); locations.add("A"); locations.add("C"); locations.add("E"); for (Action a : af.actions("B")) { Assert.assertTrue(locations.contains(((MoveToAction) a) .getToLocation())); Assert.assertTrue(locations.contains(rf.result("B", a))); } locations.clear(); locations.add("A"); locations.add("B"); locations.add("D"); for (Action a : af.actions("C")) { Assert.assertTrue(locations.contains(((MoveToAction) a) .getToLocation())); Assert.assertTrue(locations.contains(rf.result("C", a))); } locations.clear(); locations.add("C"); for (Action a : af.actions("D")) { Assert.assertTrue(locations.contains(((MoveToAction) a) .getToLocation())); Assert.assertTrue(locations.contains(rf.result("D", a))); } locations.clear(); Assert.assertTrue(0 == af.actions("E").size()); } }
package elasta.orm.event; import elasta.core.promise.intfs.Promise; import elasta.orm.event.builder.<API key>; import io.vertx.core.json.JsonObject; public interface EventProcessor { Promise<JsonObject> processDelete(String entityName, JsonObject entity); Promise<JsonObject> processUpsert(String entityName, JsonObject entity); Promise<JsonObject> <API key>(String entityName, JsonObject entity); static void main(String[] asdf) { } }
import { TestBed, async } from '@angular/core/testing'; import { RouterTestingModule } from '@angular/router/testing'; import { AppComponent } from './app.component'; describe('AppComponent', () => { beforeEach(async(() => { TestBed.<API key>({ imports: [ RouterTestingModule ], declarations: [ AppComponent ], }).compileComponents(); })); it('should create the app', () => { const fixture = TestBed.createComponent(AppComponent); const app = fixture.debugElement.componentInstance; expect(app).toBeTruthy(); }); it(`should have as title 'movie-finder'`, () => { const fixture = TestBed.createComponent(AppComponent); const app = fixture.debugElement.componentInstance; expect(app.title).toEqual('movie-finder'); }); it('should render title in a h1 tag', () => { const fixture = TestBed.createComponent(AppComponent); fixture.detectChanges(); const compiled = fixture.debugElement.nativeElement; expect(compiled.querySelector('h1').textContent).toContain('Welcome to movie-finder!'); }); });
<?php /** * Sidebar/Widgets. */ class MDG_Sidebar { private $conditionals; /** * Page template checks (via is_page_template()) * * @var array */ private $templates; /** * If the sidebar should be displayed. * * @var boolean */ public $display = true; /** * Class constructor. * * @param array $conditionals WordPress conditional tags to check against. * @param array $templates Page template checks (via is_page_template()) */ function __construct( $conditionals = array(), $templates = array() ) { $this->conditionals = $conditionals; $this->templates = $templates; $conditionals = array_map( array( $this, '<API key>' ), $this->conditionals ); $templates = array_map( array( $this, 'check_page_template' ), $this->templates ); if ( in_array( true, $conditionals ) || in_array( true, $templates ) ) { $this->display = false; } } // __construct() /** * Checks the supplied conditional tag. * * @param string $conditional_tag The conditional tag to check against. * * @return boolean The conditional tag check result. */ private function <API key>( $conditional_tag ) { if ( is_array( $conditional_tag ) ) { return $conditional_tag[0]( $conditional_tag[1] ); } else { return $conditional_tag(); } // if/else() } // <API key>() /** * Checks the supplied page template. * * @param string $page_template Page template to check against. * * @return boolean The page template check result. */ private function check_page_template( $page_template ) { return is_page_template( $page_template ); } // check_page_template() } // MDG_Sidebar()
/** * Load the specified relations for the given instance. * * @param resourceName The name of the type of resource of the instance for which to load relations. * @param instance The instance or the primary key of the instance. * @param relations An array of the relations to load. * @param options Optional configuration. * @returns The instance, now with its relations loaded. */ module.exports = function loadRelations (resourceName, instance, relations, options) { let _this = this let {utils: DSUtils, errors: DSErrors} = _this let definition = _this.definitions[resourceName] let _options return new DSUtils.Promise(function (resolve, reject) { if (DSUtils._sn(instance)) { instance = definition.get(instance) } if (DSUtils._s(relations)) { relations = [relations] } relations = relations || [] if (!definition) { reject(new DSErrors.NER(resourceName)) } else if (!DSUtils._o(instance)) { reject(new DSErrors.IA('"instance(id)" must be a string, number or object!')) } else if (!DSUtils._a(relations)) { reject(new DSErrors.IA('"relations" must be a string or an array!')) } else { _options = DSUtils._(definition, options) _options.logFn('loadRelations', instance, relations, _options) let tasks = [] DSUtils.forEach(definition.relationList, function (def) { let relationName = def.relation let relationDef = definition.getResource(relationName) let __options = DSUtils._(relationDef, options) // relations can be loaded based on resource name or field name if (!relations.length || DSUtils.contains(relations, relationName) || DSUtils.contains(relations, def.localField)) { let task let params = {} if (__options.allowSimpleWhere) { params[def.foreignKey] = instance[definition.idAttribute] } else { params.where = {} params.where[def.foreignKey] = { '==': instance[definition.idAttribute] } } let orig = __options.orig() let defKey = def.localKey ? DSUtils.get(instance, def.localKey) : null let hasDefKey = !!(defKey || defKey === 0) if (typeof def.load === 'function') { task = def.load(definition, def, instance, orig) } else { if (def.type === 'hasMany') { if (def.localKeys) { delete params[def.foreignKey] let keys = DSUtils.get(instance, def.localKeys) || [] keys = DSUtils._a(keys) ? keys : DSUtils.keys(keys) params.where = { [relationDef.idAttribute]: { 'in': keys } } orig.localKeys = keys } else if (def.foreignKeys) { delete params[def.foreignKey] params.where = { [def.foreignKeys]: { contains: instance[definition.idAttribute] } } } task = relationDef.findAll(params, orig) } else if (def.type === 'hasOne') { if (def.localKey && hasDefKey) { task = relationDef.find(defKey, orig) } else if (def.foreignKey) { task = relationDef.findAll(params, orig).then(function (hasOnes) { return hasOnes.length ? hasOnes[0] : null }) } } else if (hasDefKey) { task = relationDef.find(defKey, orig) } } if (task) { tasks.push(task) } } }) resolve(tasks) } }).then(function (tasks) { return DSUtils.Promise.all(tasks) }) .then(function () { return _options.afterLoadRelations.call(instance, _options, instance) }) .catch(_this.errorFn('loadRelations', resourceName, instance, relations, options)) }
package com.microsoft.azure.management.mediaservices.v2019_05_01_preview; import java.util.Collection; import com.fasterxml.jackson.annotation.JsonCreator; import com.microsoft.rest.<API key>; /** * Defines values for TrackPropertyType. */ public final class TrackPropertyType extends <API key><TrackPropertyType> { /** Static value Unknown for TrackPropertyType. */ public static final TrackPropertyType UNKNOWN = fromString("Unknown"); /** Static value FourCC for TrackPropertyType. */ public static final TrackPropertyType FOUR_CC = fromString("FourCC"); /** * Creates or finds a TrackPropertyType from its string representation. * @param name a name to look for * @return the corresponding TrackPropertyType */ @JsonCreator public static TrackPropertyType fromString(String name) { return fromString(name, TrackPropertyType.class); } /** * @return known TrackPropertyType values */ public static Collection<TrackPropertyType> values() { return values(TrackPropertyType.class); } }
package expr import ( "fmt" "net/url" "testing" "goa.design/goa/v3/eval" ) func <API key>(t *testing.T) { cases := []struct { name string kind FlowKind expected string }{ {"authorization-code", <API key>, "flow authorization_code"}, {"implicit", ImplicitFlowKind, "flow implicit"}, {"client-credentials", <API key>, "flow client_credentials"}, {"password", PasswordFlowKind, "flow password"}, } for _, tc := range cases { t.Run(tc.name, func(t *testing.T) { fe := &FlowExpr{Kind: tc.kind} if actual := fe.EvalName(); actual != tc.expected { t.Errorf("got %#v, expected %#v", actual, tc.expected) } }) } } func TestFlowExprType(t *testing.T) { var noKind FlowKind cases := map[string]struct { kind FlowKind expected string }{ "authorization code": { kind: <API key>, expected: "authorization_code", }, "implicit": { kind: ImplicitFlowKind, expected: "implicit", }, "password": { kind: PasswordFlowKind, expected: "password", }, "client credentials": { kind: <API key>, expected: "client_credentials", }, "no kind": { kind: noKind, expected: "", // should have panicked! }, } for k, tc := range cases { func() { // panic recover defer func() { if k != "no kind" { return } if recover() == nil { t.Errorf("should have panicked!") } }() f := &FlowExpr{Kind: tc.kind} if actual := f.Type(); actual != tc.expected { t.Errorf("%s: got %#v, expected %#v", k, actual, tc.expected) } }() } } func <API key>(t *testing.T) { var ( tokenURL = "http: refreshURL = "http://example.com/refresh" invalidURL = "http: escapeError = url.EscapeError("%") parseError = url.Error{Op: "parse", URL: invalidURL, Err: escapeError} errInvalidTokenURL = fmt.Errorf("invalid token URL %q: %s", invalidURL, parseError.Error()) <API key> = fmt.Errorf("invalid authorization URL %q: %s", invalidURL, parseError.Error()) <API key> = fmt.Errorf("invalid refresh URL %q: %s", invalidURL, parseError.Error()) ) cases := map[string]struct { tokenURL string authorizationURL string refreshURL string expected *eval.ValidationErrors }{ "no error": { tokenURL: tokenURL, authorizationURL: authorizationURL, refreshURL: refreshURL, expected: &eval.ValidationErrors{ Errors: []error{}, }, }, "invalid token url": { tokenURL: invalidURL, authorizationURL: authorizationURL, refreshURL: refreshURL, expected: &eval.ValidationErrors{ Errors: []error{ errInvalidTokenURL, }, }, }, "invalid authorization url": { tokenURL: tokenURL, authorizationURL: invalidURL, refreshURL: refreshURL, expected: &eval.ValidationErrors{ Errors: []error{ <API key>, }, }, }, "invalid refresh url": { tokenURL: tokenURL, authorizationURL: authorizationURL, refreshURL: invalidURL, expected: &eval.ValidationErrors{ Errors: []error{ <API key>, }, }, }, "invalid token url, authorization url and refresh url": { tokenURL: invalidURL, authorizationURL: invalidURL, refreshURL: invalidURL, expected: &eval.ValidationErrors{ Errors: []error{ errInvalidTokenURL, <API key>, <API key>, }, }, }, } for k, tc := range cases { f := FlowExpr{ TokenURL: tc.tokenURL, AuthorizationURL: tc.authorizationURL, RefreshURL: tc.refreshURL, } if actual := f.Validate(); len(tc.expected.Errors) != len(actual.Errors) { t.Errorf("%s: expected the number of error values to match %d got %d ", k, len(tc.expected.Errors), len(actual.Errors)) } else { for i, err := range actual.Errors { if err.Error() != tc.expected.Errors[i].Error() { t.Errorf("%s: got %#v, expected %#v at index %d", k, err, tc.expected.Errors[i], i) } } } } } func <API key>(t *testing.T) { cases := map[string]struct { kind SchemeKind expected string }{ "OAuth2Kind": {kind: OAuth2Kind, expected: "OAuth2Security"}, "BasicAuthKind": {kind: BasicAuthKind, expected: "BasicAuthSecurity"}, "APIKeyKind": {kind: APIKeyKind, expected: "APIKeySecurity"}, "JWTKind": {kind: JWTKind, expected: "JWTSecurity"}, "NoKind": {kind: NoKind, expected: "This case is panic"}, } for k, tc := range cases { func() { // panic recover defer func() { if k != "NoKind" { return } if recover() == nil { t.Errorf("should have panicked!") } }() se := &SchemeExpr{Kind: tc.kind} if actual := se.EvalName(); actual != tc.expected { t.Errorf("%s: got %#v, expected %#v", k, actual, tc.expected) } }() } } func TestSchemeExprType(t *testing.T) { cases := map[string]struct { kind SchemeKind expected string }{ "oauth2": { kind: OAuth2Kind, expected: "OAuth2", }, "basic auth": { kind: BasicAuthKind, expected: "BasicAuth", }, "api key": { kind: APIKeyKind, expected: "APIKey", }, "jwt": { kind: JWTKind, expected: "JWT", }, "NoKind": { kind: NoKind, expected: "", // should have panicked! }, } for k, tc := range cases { func() { // panic recover defer func() { if k != "NoKind" { return } if recover() == nil { t.Errorf("should have panicked!") } }() f := &SchemeExpr{Kind: tc.kind} if actual := f.Type(); actual != tc.expected { t.Errorf("%s: got %#v, expected %#v", k, actual, tc.expected) } }() } } func <API key>(t *testing.T) { scheme1 := &SchemeExpr{SchemeName: "A"} scheme2 := &SchemeExpr{SchemeName: ""} cases := map[string]struct { schemes []*SchemeExpr expected string }{ "security with suffix": {schemes: []*SchemeExpr{scheme1}, expected: "Securityscheme A"}, "empty string are security only": {schemes: []*SchemeExpr{scheme2}, expected: "Security"}, "in case of security only": {schemes: nil, expected: "Security"}, "also in case of security only": {schemes: []*SchemeExpr{}, expected: "Security"}, } for k, tc := range cases { se := &SecurityExpr{Schemes: tc.schemes} if actual := se.EvalName(); actual != tc.expected { t.Errorf("%s: got %#v, expected %#v", k, actual, tc.expected) } } } func <API key>(t *testing.T) { var ( tokenURL = "http: refreshURL = "http://example.com/refresh" invalidURL = "http: escapeError = url.EscapeError("%") parseError = url.Error{Op: "parse", URL: invalidURL, Err: escapeError} validFlow = &FlowExpr{ TokenURL: tokenURL, AuthorizationURL: authorizationURL, RefreshURL: refreshURL, } invalidTokenURLFlow = &FlowExpr{ TokenURL: invalidURL, AuthorizationURL: authorizationURL, RefreshURL: refreshURL, } invalid<API key> = &FlowExpr{ TokenURL: tokenURL, AuthorizationURL: invalidURL, RefreshURL: refreshURL, } errInvalidTokenURL = fmt.Errorf("invalid token URL %q: %s", invalidURL, parseError.Error()) <API key> = fmt.Errorf("invalid authorization URL %q: %s", invalidURL, parseError.Error()) ) cases := map[string]struct { flows []*FlowExpr expected *eval.ValidationErrors }{ "no error": { flows: []*FlowExpr{ validFlow, }, expected: &eval.ValidationErrors{ Errors: []error{}, }, }, "single error": { flows: []*FlowExpr{ invalidTokenURLFlow, }, expected: &eval.ValidationErrors{ Errors: []error{ errInvalidTokenURL, }, }, }, "multiple errors": { flows: []*FlowExpr{ invalidTokenURLFlow, invalid<API key>, }, expected: &eval.ValidationErrors{ Errors: []error{ errInvalidTokenURL, <API key>, }, }, }, } for k, tc := range cases { s := SchemeExpr{ Flows: tc.flows, } if actual := s.Validate(); len(tc.expected.Errors) != len(actual.Errors) { t.Errorf("%s: expected the number of error values to match %d got %d ", k, len(tc.expected.Errors), len(actual.Errors)) } else { for i, err := range actual.Errors { if err.Error() != tc.expected.Errors[i].Error() { t.Errorf("%s: got %#v, expected %#v at index %d", k, err, tc.expected.Errors[i], i) } } } } } func <API key>(t *testing.T) { var unknownKind SchemeKind cases := map[string]struct { kind SchemeKind expected string }{ "basic auth": { kind: BasicAuthKind, expected: "Basic", }, "api key": { kind: APIKeyKind, expected: "APIKey", }, "jwt": { kind: JWTKind, expected: "JWT", }, "oauth2": { kind: OAuth2Kind, expected: "OAuth2", }, "no kind": { kind: NoKind, expected: "None", }, "unknown kind": { kind: unknownKind, expected: "", // should have panicked! }, } for k, tc := range cases { func() { // panic recover defer func() { if k != "unknown kind" { return } if recover() == nil { t.Errorf("should have panicked!") } }() if actual := tc.kind.String(); actual != tc.expected { t.Errorf("%s: got %#v, expected %#v", k, actual, tc.expected) } }() } }
package com.dmdirc.addons.nickcolours; import com.dmdirc.config.GlobalConfig; import com.dmdirc.ui.messages.ColourManager; import com.dmdirc.util.io.yaml.BaseYamlStore; import java.awt.Color; import java.nio.file.Path; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.Map; import java.util.Optional; import javax.inject.Inject; import javax.inject.Singleton; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import static com.dmdirc.util.io.yaml.YamlReaderUtils.asMap; import static com.dmdirc.util.io.yaml.YamlReaderUtils.requiredString; @Singleton public class NickColourYamlStore extends BaseYamlStore<NickColourEntry> { private static final Logger LOG = LoggerFactory.getLogger(NickColourYamlStore.class); private final ColourManager colourManager; @Inject public NickColourYamlStore(@GlobalConfig final ColourManager colourManager) { this.colourManager = colourManager; } public Map<String, Color> <API key>(final Path path) { final Map<String, Color> nickColours = new HashMap<>(); final Collection<NickColourEntry> nickColourEntries = read(path); nickColourEntries.forEach(e -> nickColours.put(e.getNetwork() + ':' + e.getUser(), e.getColor())); return nickColours; } public void <API key>(final Path path, final Map<String, Color> nickColours) { final Collection<NickColourEntry> nickColourEntries = new ArrayList<>(); nickColours.forEach((description, colour) -> nickColourEntries.add(NickColourEntry .create(description.split(":")[0], description.split(":")[1], colour))); write(path, nickColourEntries); } @Override protected Optional<NickColourEntry> convertFromYaml(final Object object) { try { final Map<Object, Object> map = asMap(object); final String network = requiredString(map, "network"); final String user = requiredString(map, "user"); final String colour = requiredString(map, "colour"); return Optional.of(NickColourEntry.create(network, user, NickColourUtils.getColorFromString(colourManager, colour))); } catch (<API key> ex) { LOG.info("Unable to read profile", ex); return Optional.empty(); } } @Override protected Object convertToYaml(final NickColourEntry object) { final Map<Object, Object> map = new HashMap<>(); map.put("network", object.getNetwork()); map.put("user", object.getUser()); map.put("colour", NickColourUtils.getStringFromColor(object.getColor())); return map; } }
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. package <API key> import ( "testing" "github.com/awslabs/aws-sdk-go/service/cloudsearchdomain" "github.com/awslabs/aws-sdk-go/service/cloudsearchdomain/<API key>" "github.com/stretchr/testify/assert" ) func TestInterface(t *testing.T) { assert.Implements(t, (*<API key>.<API key>)(nil), cloudsearchdomain.New(nil)) }
<?php namespace App\Model\Interfaces; interface TitleInterface { public function getTitlesByType(int $type); }
<?php return unserialize('a:1:{i:0;O:30:"Doctrine\\ORM\\Mapping\\OneToMany":6:{s:8:"mappedBy";s:12:"articleImage";s:12:"targetEntity";s:19:"ArticleImageCaption";s:7:"cascade";a:1:{i:0;s:7:"persist";}s:5:"fetch";s:4:"LAZY";s:13:"orphanRemoval";b:0;s:7:"indexBy";s:10:"languageId";}}');
#!/bin/bash if [[ "${CI}" == 'true' && "${TRAVIS}" == 'true' ]]; then echo "Objective-Clean will not be executed on Travis" exit 0 fi if [[ -z "${SKIP_OBJCLEAN}" || "${SKIP_OBJCLEAN}" != 1 ]]; then if [[ -d "${LOCAL_APPS_DIR}/Objective-Clean.app" ]]; then "${LOCAL_APPS_DIR}"/Objective-Clean.app/Contents/Resources/ObjClean.app/Contents/MacOS/ObjClean \ "${SRCROOT}"?!!___PACKAGENAME___/Scripts,!!___PACKAGENAME___/Categories/UIImage+AssetCatalog,!!fastlane else echo "error: You have to install and set up Objective-Clean to use its features!" exit 1 fi fi
<?php namespace PHPAlgorithms\Dijkstra\Tests; use PHPAlgorithms\Dijkstra; use PHPAlgorithms\Dijkstra\Creator; use <API key>; class PointTest extends <API key> { public function testLabels() { $point0 = $point1 = $point2 = null; new Dijkstra(function (Creator $creator) use (&$point0, &$point1, &$point2) { $point0 = $creator->addPoint('point0'); $point1 = $creator->addPoint('point1'); $point2 = $creator->addPoint(); }); $this->assertTrue(isset($point0->label)); $this->assertEquals('point0', $point0->label); $this->assertTrue(isset($point1->label)); $this->assertEquals('point1', $point1->label); $this->assertTrue(isset($point2->label)); $this->assertEmpty($point2->label); } }
#ifndef __FILEDATA_H #define __FILEDATA_H #if !defined( __SORTABLE_H ) #include <Sortable.h> #endif // __SORTABLE_H #if !defined( __STRNG_H ) #include <Strng.h> #endif // __STRNG_H #if !defined( __LDATE_H ) #include <LDate.h> #endif // __LDATE_H #if !defined( __LTIME_H ) #include <LTime.h> #endif // __LTIME_H #ifndef __DIR_H #include <dir.h> #endif const fileDataClass = __firstUserClass; const filesByNameClass = fileDataClass+1; const filesByDateClass = filesByNameClass+1; const filesBySizeClass = filesByDateClass+1; class FileData: public Sortable { public: FileData( ffblk& ); virtual classType isA() const { return fileDataClass; } virtual char *nameOf() const { return "FileData"; } virtual int isEqual( const Object& ) const = 0; virtual int isLessThan( const Object& ) const = 0; virtual hashValueType hashValue() const { return 0; } virtual void printOn( ostream& ) const; protected: String fileName; Date fileDate; Time fileTime; long fileSize; }; class FilesByName: public FileData { public: FilesByName( ffblk& blk ) : FileData( blk ) {} virtual classType isA() const { return filesByNameClass; } virtual char *nameOf() const { return "FilesByName"; } virtual int isEqual( const Object& ) const; virtual int isLessThan( const Object& ) const; }; class FilesByDate: public FileData { public: FilesByDate( ffblk& blk ) : FileData( blk ) {} virtual classType isA() const { return filesByDateClass; } virtual char *nameOf() const { return "FilesByDate"; } virtual isEqual( const Object& ) const; virtual isLessThan( const Object& ) const; }; class FilesBySize: public FileData { public: FilesBySize( ffblk& blk ) : FileData( blk ) {} virtual classType isA() const { return filesBySizeClass; } virtual char *nameOf() const { return "FilesBySize"; } virtual isEqual( const Object& ) const; virtual isLessThan( const Object& ) const; }; #endif
var ProgressBarClassic = require('./lib/ProgressBarClassic') module.exports = ProgressBarClassic
// Initializes the `messages` service on path `/messages` const createService = require('feathers-sequelize'); const createModel = require('../../models/messages.model'); const hooks = require('./messages.hooks'); const filters = require('./messages.filters'); module.exports = function () { const app = this; const Model = createModel(app); const paginate = app.get('paginate'); const options = { name: 'messages', Model, paginate }; // Initialize our service with any options it requires app.use('/messages', createService(options)); // Get our initialized service so that we can register hooks and filters const service = app.service('messages'); service.hooks(hooks); if (service.filter) { service.filter(filters); } };
# -*- coding: utf-8 -*- # This software may be modified and distributed under the terms from __future__ import print_function from datetime import datetime from importlib import import_module from itertools import chain, islice import sys import traceback import six def ichunked(seq, chunksize): iterable = iter(seq) while True: yield list(chain([next(iterable)], islice(iterable, chunksize - 1))) def safe_log_via_print(log_level, message, *args, **kwargs): timestamp = datetime.now().strftime('%Y-%m-%d %H:%M:%S') log_message = u'{}: {}: {}'.format(timestamp, log_level, message) print(log_message % args, file=sys.stderr) # print stack trace if available exc_info = kwargs.get('exc_info', None) if exc_info or log_level == 'exception': if not isinstance(exc_info, tuple): exc_info = sys.exc_info() stack_trace = ''.join(traceback.format_exception(*exc_info)) print(stack_trace, file=sys.stderr) def import_string(dotted_path): """ Import a dotted module path and return the attribute/class designated by the last name in the path. Raise ImportError if the import failed. (stolen from Django) """ try: module_path, class_name = dotted_path.rsplit('.', 1) except ValueError: msg = "{} doesn't look like a module path".format(dotted_path) six.reraise(ImportError, ImportError(msg), sys.exc_info()[2]) module = import_module(module_path) try: return getattr(module, class_name) except AttributeError: msg = 'Module "{}" does not define a "{}" attribute/class'.format(module_path, class_name) six.reraise(ImportError, ImportError(msg), sys.exc_info()[2])
<a href='https://github.com/angular/angular.js/edit/v1.5.x/src/ng/directive/ngEventDirs.js?message=docs(ngClick)%3A%20describe%20your%20change...#L3' class='improve-docs btn btn-primary'><i class="glyphicon glyphicon-edit">&nbsp;</i>Improve this Doc</a> <a href='https://github.com/angular/angular.js/tree/v1.5.2/src/ng/directive/ngEventDirs.js#L3' class='view-source pull-right btn btn-primary'> <i class="glyphicon glyphicon-zoom-in">&nbsp;</i>View Source </a> <header class="api-profile-header"> <h1 class="<API key>">ngClick</h1> <ol class="<API key> naked-list step-list"> <li> - directive in module <a href="api/ng">ng</a> </li> </ol> </header> <div class="<API key>"> <p>The ngClick directive allows you to specify custom behavior when an element is clicked.</p> </div> <div> <h2>Directive Info</h2> <ul> <li>This directive executes at priority level 0.</li> </ul> <h2 id="usage">Usage</h2> <div class="usage"> <ul> <li>as attribute: <pre><code>&lt;ANY&#10; ng-click=&quot;expression&quot;&gt;&#10;...&#10;&lt;/ANY&gt;</code></pre> </li> </div> <section class="api-section"> <h3>Arguments</h3> <table class="variables-matrix input-arguments"> <thead> <tr> <th>Param</th> <th>Type</th> <th>Details</th> </tr> </thead> <tbody> <tr> <td> ngClick </td> <td> <a href="" class="label type-hint <API key>">expression</a> </td> <td> <p><a href="guide/expression">Expression</a> to evaluate upon click. (<a href="guide/expression#-event-">Event object is available as <code>$event</code></a>)</p> </td> </tr> </tbody> </table> </section> <h2 id="example">Example</h2><p> <div> <plnkr-opener example-path="examples/example-example69"></plnkr-opener> <div class="runnable-example" path="examples/example-example69"> <div class="<API key>" name="index.html" language="html" type="html"> <pre><code>&lt;button ng-click=&quot;count = count + 1&quot; ng-init=&quot;count=0&quot;&gt;&#10; Increment&#10;&lt;/button&gt;&#10;&lt;span&gt;&#10; count: {{count}}&#10;&lt;/span&gt;</code></pre> </div> <div class="<API key>" name="protractor.js" type="protractor" language="js"> <pre><code>it(&#39;should check ng-click&#39;, function() {&#10; expect(element(by.binding(&#39;count&#39;)).getText()).toMatch(&#39;0&#39;);&#10; element(by.css(&#39;button&#39;)).click();&#10; expect(element(by.binding(&#39;count&#39;)).getText()).toMatch(&#39;1&#39;);&#10;});</code></pre> </div> <iframe class="<API key>" src="examples/example-example69/index.html" name="example-example69"></iframe> </div> </div> </p> </div>
package edu.gemini.xml; import java.io.FileWriter; import java.io.IOException; import javax.xml.stream.XMLOutputFactory; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; public class StaxExample { public static void main(String[] args) { try { XMLOutputFactory output = XMLOutputFactory.newInstance(); XMLStreamWriter writer = output.<API key>(new FileWriter("result.xml")); writer.writeStartDocument(); writer.writeStartElement("a"); writer.writeAttribute("b", "blah"); writer.setPrefix("d", "http: writer.writeEmptyElement("d"); writer.writeAttribute("chris", "fry"); writer.writeCharacters("Jean Arp"); writer.writeEndElement(); writer.flush(); } catch (XMLStreamException ex) { ex.printStackTrace(); } catch (IOException ex) { ex.printStackTrace(); } } }
require('mocha'); const should = require('should'); const mongoose = require('mongoose'); const lockdown = require('..'); const Schema = mongoose.Schema; // make database connection mongoose.connect('mongodb://localhost', { useNewUrlParser: true, useMongoClient: true, }); mongoose.connection.on('error', function(err) { console.error( 'Make sure a mongoDB server is running and accessible by this application.', ); throw err; }); // create an example schema const UserSchema = new Schema({ name: { type: String, lockdown: true, }, email: { type: String, lockdown: 2, lockdownMessage: 'TOO MANY EMAIL DUDE', }, username: { type: String, lockdown: true, lockdownReset: { length: 1, period: 'seconds', }, }, outter: { inner: { type: String, lockdown: true, }, }, posts: [ { title: { type: String, lockdown: true, lockdownDirect: true, }, }, ], }).plugin(lockdown); const User = mongoose.model('User', UserSchema); describe('lockdown', function() { it('should not allow a save to the name', function(done) { const user1 = new User({ name: 'bombsheltersoftware', username: 'thebomb', email: 'colin@thebomb.com', }); user1.save(function(err) { should.not.exist(err); user1.name = 'Colin'; user1.save(function(err) { should.exist(err); return done(); }); }); }); it('should allow a save to the username because the reset time period has passed', function(done) { const user2 = new User({ name: 'Colin', username: 'thebomb', email: 'colin@thebomb.com', }); user2.save(function(err) { should.not.exist(err); setTimeout(function() { user2.username = 'bombsheltersoftware'; user2.save(function(err) { should.not.exist(err); return done(); }); }, 1200); }); }); it('should allow two saves on email then prevent the third', function(done) { const user3 = new User({ name: 'Colin', username: 'thebomb', email: 'colin+1@bombsheltersoftware.com', }); user3.save(function(err) { should.not.exist(err); user3.email = 'colin+2@bombsheltersoftware.com'; user3.save(function(err) { should.not.exist(err); user3.email = 'colin+3@bombsheltersoftware.com'; user3.save(function(err) { console.log( '\tSave prevented on email field. Should be a custom error message:', ); console.error('\t' + err); should.exist(err); return done(); }); }); }); }); it('should allow changes to posts, but not post titles', function(done) { let posts = [ { title: 'First Post', }, ]; const user4 = new User({ name: 'bombsheltersoftware', username: 'thebomb', email: 'colin@thebomb.com', posts: posts, }); user4.save(function(err) { should.not.exist(err); posts = posts.concat([ { title: 'My Second Post', }, ]); user4.save(function(err) { should.not.exist(err); return done(); }); }); }); it('should not allow a save to an inner field', function(done) { const user5 = new User({ name: 'bombsheltersoftware', username: 'thebomb', email: 'colin@thebomb.com', outter: { inner: 'i blew up before we supported `.`s in fieldname', }, posts: [ { title: 'First Post', }, ], }); user5.save(function(err) { should.not.exist(err); user5.outter.inner = 'new val'; user5.save(function(err) { should.exist(err); return done(); }); }); }); });
<div class="container"> <div class="leftRightContent"> <div class="leftContent"> <div class="leftTitleDisable">NEWS & MEDIA //</div> </div> <div id="newsRightContent" class="rightContent"> <div class="newsInner" id="newsNode"> <div class="listing"> <div class="news"> <div class="img"><img src="img/news/news-00.jpg" alt=""></div> <div class="year">2012-11-14/</div> <div class="title">Leigh & Orange winning MIPIM Asia Special Jury Award</div> <div class="content"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. </div> <div class="clearfix"></div> </div> <div class="news"> <div class="img"></div> <div class="year">2012-10-30/</div> <div class="title">Leigh & Orange is delighted to showcase our portfolio in<br />MIPIM Asia Retail Summit Exhibition</div> <div class="content">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.<br /><br /> It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).<br /><br /> Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32.<br /><br /> The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.<br /><br /> There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.</div> <div class="clearfix"></div> </div> <div class="news"> <div class="img"></div> <div class="year">2012-10-29/</div> <div class="title">L&O has been awarded HK Beam Eco Building Platinum Standard</div> <div class="content">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</div> <div class="clearfix"></div> </div> <div class="news"> <div class="img"></div> <div class="year">2012-06-21/</div> <div class="title">L&O has been awarded Quality Architect Award<br />and Grand Award at Quality Building Award 2012</div> <div class="content">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</div> <div class="clearfix"></div> </div> <div class="news"> <div class="img"></div> <div class="year">2012-06-20/</div> <div class="title">HL&O has been awarded “Hong Kong's Top 10 for Architecture Firms”</div> <div class="content">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</div> <div class="clearfix"></div> </div> <div class="news"> <div class="img"></div> <div class="year">2012-02-14/</div> <div class="title">L&O has been awarded Certificate of Finalist at Quality Building Award</div> <div class="content">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</div> <div class="clearfix"></div> </div> <div class="news"> <div class="img"></div> <div class="year">2011-12-30/</div> <div class="title">L&O has been awarded The Hong Kong Institute of Architects<br />Merit Award of Hong Kong</div> <div class="content">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</div> <div class="clearfix"></div> </div> <div class="news"> <div class="img"></div> <div class="year">2012-10-29/</div> <div class="title">Run Run Shaw Creative Media Centre was awarded<br />China Green Building (2 Star Rating)</div> <div class="content">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</div> <div class="clearfix"></div> </div> <div class="news"> <div class="img"></div> <div class="year">2012-09-12/</div> <div class="title">L&O has been named as Caring Company</div> <div class="content">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</div> <div class="clearfix"></div> </div> <div class="news"> <div class="img"></div> <div class="year">2012-08-28/</div> <div class="title">Thrill Mountain of Hong Kong Ocean Park Corporation</div> <div class="content">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</div> <div class="clearfix"></div> </div> <div class="news"> <div class="img"></div> <div class="year">2012-03-13/</div> <div class="title">Al Shaqab Arena, Doha, Qatar</div> <div class="content">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</div> <div class="clearfix"></div> </div> <div class="news"> <div class="img"></div> <div class="year">2012-02-28/</div> <div class="title">Cityscape Awards for Architecture in the Emerging Markets</div> <div class="content">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</div> <div class="clearfix"></div> </div> <div class="news"> <div class="img"></div> <div class="year">2012-01-09/</div> <div class="title">Shanghai’s Top-10 Landmarks & Best Business Performance Award</div> <div class="content">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</div> <div class="clearfix"></div> </div> </div> <div class="preview"> </div> </div> </div> <div class="clearfix"></div> </div> </div> <script type="template" id="newsImageType"> <a href="javascript:void(0)" onclick="lno.news.closePreview()"><div class="closeBtn"></div></a> <div class="img"><img src="<%=img%>" alt=""></div> <div class="desc"> <div class="title"> <div><%=year%></div> <div><%=title%></div> </div> <div class="clearfix"></div> <div class="content"><%=content%></div> </div> </script> <script type="template" id="newsTextType"> <a href="javascript:void(0)" onclick="lno.news.closePreview()"><div class="closeBtn"></div></a> <div class="plainText"> <div class="textwrapper"> <div class="title"> <div><%=year%></div> <div><%=title%></div> </div> <div class="clearfix"></div> <div class="content"><%=content%></div> </div> </div> </script> <script type="text/javascript"> window.lno = (window.lno) ? window.lno : {}; window.lno.news = {}; window.lno.news.scrollPane = $("#newsRightContent").jScrollPane(); window.lno.news.refreshPane = function(){ window.lno.news.scrollPane.data('jsp').reinitialise(); }; window.lno.news.closePreview = function(){ $("#newsNode>.listing").show(); $("#newsNode>.preview").hide(); $("#newsNode>.preview").empty(); window.lno.news.refreshPane(); }; $("#newsNode>.listing>.news").click(function(){ var dataObj = {}; dataObj.title = $(this).children(".title").html(); dataObj.year = $(this).children(".year").html(); dataObj.img = $(this).children(".img").children("img").attr("src"); dataObj.content = $(this).children(".content").html(); if(dataObj.img){ $("#newsNode>.preview").html(_.template($("#newsImageType").html(), dataObj)); $("#newsNode>.listing").hide(); $("#newsNode>.preview").show(); } else { $("#newsNode>.preview").html(_.template($("#newsTextType").html(), dataObj)); $("#newsNode>.listing").hide(); $("#newsNode>.preview").show(); } window.lno.news.refreshPane(); }); </script>
#ifndef QPIC_H #define QPIC_H #include <stdint.h> #include "qtypes.h" typedef struct { int width; int height; int stride; const byte *pixels; } qpic8_t; typedef union { uint32_t rgba; struct { byte red; byte green; byte blue; byte alpha; }; } qpixel32_t; typedef struct { int width; int height; qpixel32_t pixels[]; } qpic32_t; /* Allocate hunk space for a texture */ qpic32_t *QPic32_Alloc(int width, int height); /* Create 32 bit texture from 8 bit source, alpha is palette index to mask */ void QPic_8to32(const qpic8_t *in, qpic32_t *out); void QPic_8to32_Alpha(const qpic8_t *in, qpic32_t *out, byte alpha); /* Stretch from in size to out size */ void QPic32_Stretch(const qpic32_t *in, qpic32_t *out); /* Shrink texture in place to next mipmap level */ void QPic32_MipMap(qpic32_t *pic); #endif /* QPIC_H */
var assert = require('assert') var specifications = require('./specifications.json') var compressible = require('./') // None of these should be actual types so that the lookup will never include them. var example_types = [ { type: 'something/text', should: true }, { type: 'thingie/dart', should: true }, { type: 'type/json', should: true }, { type: 'ecmascript/6', should: true }, { type: 'data/beans+xml', should: true }, { type: 'asdf/nope', should: false }, { type: 'cats', should: false } ] var invalid_types = [ undefined, null, 0, 1, false, true ] var object_true = { compressible: true, sources: ["compressible.regex"], notes: "Automatically generated via regex." }, object_false = { compressible: false, sources: ["compressible.regex"], notes: "Automatically generated via regex." } describe('Testing if spec lookups are correct.', function () { for (var type in specifications) { var value = specifications[type].compressible it(type + ' should' + (value ? ' ' : ' not ') + 'be compressible', function () { assert.equal(compressible(type), value) }) } }) describe('Testing if the regex works as intended.', function () { example_types.forEach(function (example) { it(example.type + ' should' + (example.should ? ' ' : ' not ') + 'be compressible', function () { assert.equal(compressible(example.type), example.should) }) }) }) describe('Testing if getter returns the correct objects.', function () { it('All spec objects should be get-able', function () { for (var type in specifications) { assert.equal(compressible.get(type), specifications[type]) } }) example_types.forEach(function (example) { it(example.type + ' should generate a ' + (example.should ? 'true' : 'false') + ' object', function () { assert.deepEqual(compressible.get(example.type), example.should ? object_true: object_false) }) }) }) describe('Testing if charsets are handled correctly.', function () { it('Charsets should be stripped off without issue', function () { for (var type in specifications) { var value = specifications[type].compressible assert.equal(compressible(type + '; charset=utf-8'), value) } }) it('Types with charsets should be get-able', function () { for (var type in specifications) { assert.equal(compressible.get(type + '; charset=utf-8'), specifications[type]) } }) }) describe('Ensuring invalid types do not cause errors.', function () { it('No arguments should return false without error', function () { assert.equal(compressible(), false) }) invalid_types.forEach(function (invalid) { it(invalid + ' should return false without error', function () { assert.doesNotThrow(function () { assert.equal(compressible(invalid), false) }) }) }) })
// <API key>.h // RescueMe #import <UIKit/UIKit.h> #import "<API key>.h" @interface <API key> : UIViewController <UITextFieldDelegate> @property (nonatomic, strong) IBOutlet UITextField *txtFirstName; @property (nonatomic, strong) IBOutlet UITextField *txtLastName; @property (nonatomic, strong) IBOutlet UITextField *txtPassword; @property (nonatomic, strong) IBOutlet UITextField *txtPhoneNumber; @property (nonatomic, strong) IBOutlet UIButton *btnCreateAccount; - (IBAction)<API key>:(id)sender; @end
require 'rails_helper' require '<API key>' describe <API key> do describe '.format' do context 'duty amount present' do it 'result includes duty amount' do expect( <API key>.format(duty_amount: '55') ).to match /55/ end end context 'monetary unit, measurement unit & <API key> are present ' do subject { <API key>.format(measurement_unit: 'Tonne', <API key>: 'L', monetary_unit: 'EUR') } it 'properly formats output' do expect(subject).to match /EUR\/\(Tonne\/L\)/ end end context 'monetary unit and measurement unit are present' do subject { <API key>.format(monetary_unit: 'EUR', measurement_unit: 'KG') } it 'properly formats result' do expect(subject).to match /EUR\/KG/ end end context 'measurement unit is present' do subject { <API key>.format(measurement_unit: 'KG') } it 'properly formats output' do expect(subject).to match /KG/ end end end describe '.prettify' do context 'has less than 4 decimal places' do it 'returns number with insignificant zeros stripped up to 2 decimal points' do expect(<API key>.prettify(1.2)).to eq '1.20' end end context 'has 4 or more decimal places' do it 'returns formatted number with 4 decimal places' do expect(<API key>.prettify(1.23456)).to eq '1.2346' end end end end
var app, viewModel; viewModel = { dt1: new u.DataTable({ meta: { f1: {}, f2: {} } }), }; /** * app * el DOM * model */ app = u.createApp({ el: 'body', model: viewModel }); var r = viewModel.dt1.createEmptyRow(); r.setValue('f1', "2015-12");
/** * UI classes. */ package com.dmdirc.addons.ui_swing;
import logging import socket import voluptuous as vol from homeassistant.components.climate import (ClimateDevice, PLATFORM_SCHEMA) from homeassistant.const import ( CONF_PASSWORD, CONF_USERNAME, TEMP_CELSIUS, TEMP_FAHRENHEIT, ATTR_TEMPERATURE) import homeassistant.helpers.config_validation as cv REQUIREMENTS = ['evohomeclient==0.2.5', 'somecomfort==0.3.2'] _LOGGER = logging.getLogger(__name__) ATTR_FAN = 'fan' ATTR_FANMODE = 'fanmode' ATTR_SYSTEM_MODE = 'system_mode' <API key> = 'away_temperature' CONF_REGION = 'region' <API key> = 16 DEFAULT_REGION = 'eu' REGIONS = ['eu', 'us'] PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({ vol.Required(CONF_USERNAME): cv.string, vol.Required(CONF_PASSWORD): cv.string, vol.Optional(<API key>, default=<API key>): vol.Coerce(float), vol.Optional(CONF_REGION, default=DEFAULT_REGION): vol.In(REGIONS), }) def setup_platform(hass, config, add_devices, discovery_info=None): """Setup the HoneywelL thermostat.""" username = config.get(CONF_USERNAME) password = config.get(CONF_PASSWORD) region = config.get(CONF_REGION) if region == 'us': return _setup_us(username, password, config, add_devices) else: return _setup_round(username, password, config, add_devices) def _setup_round(username, password, config, add_devices): """Setup rounding function.""" from evohomeclient import EvohomeClient away_temp = config.get(<API key>) evo_api = EvohomeClient(username, password) try: zones = evo_api.temperatures(force_refresh=True) for i, zone in enumerate(zones): add_devices( [RoundThermostat(evo_api, zone['id'], i == 0, away_temp)] ) except socket.error: _LOGGER.error( "Connection error logging into the honeywell evohome web service") return False return True # config will be used later def _setup_us(username, password, config, add_devices): """Setup user.""" import somecomfort try: client = somecomfort.SomeComfort(username, password) except somecomfort.AuthError: _LOGGER.error('Failed to login to honeywell account %s', username) return False except somecomfort.SomeComfortError as ex: _LOGGER.error('Failed to initialize honeywell client: %s', str(ex)) return False dev_id = config.get('thermostat') loc_id = config.get('location') add_devices([<API key>(client, device) for location in client.locations_by_id.values() for device in location.devices_by_id.values() if ((not loc_id or location.locationid == loc_id) and (not dev_id or device.deviceid == dev_id))]) return True class RoundThermostat(ClimateDevice): """Representation of a Honeywell Round Connected thermostat.""" # pylint: disable=<API key>, abstract-method def __init__(self, device, zone_id, master, away_temp): """Initialize the thermostat.""" self.device = device self.<API key> = None self._target_temperature = None self._name = 'round connected' self._id = zone_id self._master = master self._is_dhw = False self._away_temp = away_temp self._away = False self.update() @property def name(self): """Return the name of the honeywell, if any.""" return self._name @property def temperature_unit(self): """Return the unit of measurement.""" return TEMP_CELSIUS @property def current_temperature(self): """Return the current temperature.""" return self.<API key> @property def target_temperature(self): """Return the temperature we try to reach.""" if self._is_dhw: return None return self._target_temperature def set_temperature(self, **kwargs): """Set new target temperature.""" temperature = kwargs.get(ATTR_TEMPERATURE) if temperature is None: return self.device.set_temperature(self._name, temperature) @property def current_operation(self: ClimateDevice) -> str: """Get the current operation of the system.""" return getattr(self.device, ATTR_SYSTEM_MODE, None) @property def is_away_mode_on(self): """Return true if away mode is on.""" return self._away def set_operation_mode(self: ClimateDevice, operation_mode: str) -> None: """Set the HVAC mode for the thermostat.""" if hasattr(self.device, ATTR_SYSTEM_MODE): self.device.system_mode = operation_mode def turn_away_mode_on(self): self._away = True self.device.set_temperature(self._name, self._away_temp) def turn_away_mode_off(self): """Turn away off.""" self._away = False self.device.<API key>(self._name) def update(self): """Get the latest date.""" try: # Only refresh if this is the "master" device, # others will pick up the cache for val in self.device.temperatures(force_refresh=self._master): if val['id'] == self._id: data = val except StopIteration: _LOGGER.error("Did not receive any temperature data from the " "evohomeclient API.") return self.<API key> = data['temp'] self._target_temperature = data['setpoint'] if data['thermostat'] == 'DOMESTIC_HOT_WATER': self._name = 'Hot Water' self._is_dhw = True else: self._name = data['name'] self._is_dhw = False # pylint: disable=abstract-method class <API key>(ClimateDevice): """Representation of a Honeywell US Thermostat.""" def __init__(self, client, device): """Initialize the thermostat.""" self._client = client self._device = device @property def is_fan_on(self): """Return true if fan is on.""" return self._device.fan_running @property def name(self): """Return the name of the honeywell, if any.""" return self._device.name @property def temperature_unit(self): """Return the unit of measurement.""" return (TEMP_CELSIUS if self._device.temperature_unit == 'C' else TEMP_FAHRENHEIT) @property def current_temperature(self): """Return the current temperature.""" self._device.refresh() return self._device.current_temperature @property def target_temperature(self): """Return the temperature we try to reach.""" if self._device.system_mode == 'cool': return self._device.setpoint_cool else: return self._device.setpoint_heat @property def current_operation(self: ClimateDevice) -> str: """Return current operation ie. heat, cool, idle.""" return getattr(self._device, ATTR_SYSTEM_MODE, None) def set_temperature(self, **kwargs): """Set target temperature.""" temperature = kwargs.get(ATTR_TEMPERATURE) if temperature is None: return import somecomfort try: if self._device.system_mode == 'cool': self._device.setpoint_cool = temperature else: self._device.setpoint_heat = temperature except somecomfort.SomeComfortError: _LOGGER.error('Temperature %.1f out of range', temperature) @property def <API key>(self): """Return the device specific state attributes.""" return { ATTR_FAN: (self.is_fan_on and 'running' or 'idle'), ATTR_FANMODE: self._device.fan_mode, ATTR_SYSTEM_MODE: self._device.system_mode, } def turn_away_mode_on(self): """Turn away on.""" pass def turn_away_mode_off(self): """Turn away off.""" pass def set_operation_mode(self: ClimateDevice, operation_mode: str) -> None: """Set the system mode (Cool, Heat, etc).""" if hasattr(self._device, ATTR_SYSTEM_MODE): self._device.system_mode = operation_mode
order: 3 title: `animConfig` `jsx import { QueueAnim, Button } from 'antd'; const Test = React.createClass({ getInitialState() { return { show: true, }; }, onClick() { this.setState({ show: !this.state.show, }); }, render() { const list = this.state.show ? [ <div className="demo-kp" key="a"> <ul> <li></li> <li></li> <li></li> </ul> </div>, <div className="demo-listBox" key="b"> <div className="demo-list"> <div className="title"></div> <ul> <li></li> <li></li> <li></li> </ul> </div> </div>, ] : null; return ( <div> <p className="buttons"> <Button type="primary" onClick={this.onClick}></Button> </p> <QueueAnim className="demo-content" animConfig={[ { opacity: [1, 0], translateY: [0, 50] }, { opacity: [1, 0], translateY: [0, -50] }, ]} > {list} </QueueAnim> </div> ); }, }); ReactDOM.render(<Test />, mountNode); `
# Swift2048 Clone of the popular game 2048 for iOS, originally created by Gabriele Cirulli (http://gabrielecirulli.github.io/2048/). ## Screenshot ![Screenshot](https://cloud.githubusercontent.com/assets/2101850/22176013/<API key>.png) ## Features * Persisted game state * Support for external keyboards * Custom color schemes
require 'capistrano/upload' module Capistrano class Configuration module Actions module FileTransfer # Store the given data at the given location on all servers targetted # by the current task. If <tt>:mode</tt> is specified it is used to # set the mode on the file. def put(data, path, options={}) execute_on_servers(options) do |servers| targets = servers.map { |s| sessions[s] } Upload.process(targets, path, :data => data, :mode => options[:mode], :logger => logger) end end # Get file remote_path from FIRST server targetted by # the current task and transfer it to local machine as path. # get "#{deploy_to}/current/log/production.log", "log/production.log.web" def get(remote_path, path, options = {}) execute_on_servers(options.merge(:once => true)) do |servers| logger.info "downloading `#{servers.first.host}:#{remote_path}' to `#{path}'" sftp = sessions[servers.first].sftp sftp.connect unless sftp.state == :open sftp.get_file remote_path, path logger.debug "download finished" end end end end end end
using System; namespace HyperFastCgi.Interfaces { public interface IListenerTransport { void Configure (IWebListener listener, object config); bool Process (ulong requestId, int requestNumber, byte[] header, byte[] body); void SendOutput (ulong requestId, int requestNumber, byte[] data, int len); void EndRequest (ulong requestId, int requestNumber, int appStatus); } }
<?php /** * @package go\DB * @subpackage Tests */ namespace go\Tests\DB\Exceptions; use go\DB\DB; use go\DB\Exceptions\Connect; /** * coversDefaultClass go\DB\Exceptions\Runtime * @author Oleg Grigoriev <go.vasac@gmail.com> */ final class RuntimeTest extends \<API key> { public function testBacktraceLogic() { $params = array( '_adapter' => 'test', 'host' => 'invalid', ); $line = null; try { $db = DB::create($params); $line = __LINE__ + 1; $db->forcedConnect(); $this->fail('not thrown'); } catch (Connect $e) { $this->assertEquals(__FILE__, $e->getFile()); $this->assertEquals($line, $e->getLine()); } } }
{ "posts": [ { "url": "/life/car/2018/01/02/carM.1514863588.A.644.html", "title": "Lugexn s3?", "image": "http://img.chinatimes.com/newsphoto/2017-04-21/656/a78a00_p_02_02.jpg", "push": "28", "boo": "7", "date": "2018-01-02 11:26:25 +0800", "boardName": "", "boardLink": "/category/car" } ] }
#!/usr/bin/env python import os import os.path import platform import sys def isPythonFrozen(): return hasattr( sys, "frozen" ) def getMainModulePath(): if isPythonFrozen(): p = os.path.dirname(unicode(sys.executable, sys.<API key>())) if platform.system() == u'Darwin': return os.environ.get('JUMA_IDE_PATH') or os.path.realpath( p + '/../../..' ) elif platform.system() == u'Windows': return p else: return p if __name__ == 'main': mainfile = os.path.realpath( __file__ ) return os.path.dirname( mainfile ) else: import __main__ if hasattr( __main__, "__gii_path__" ): return __main__.__gii_path__ else: mainfile = os.path.realpath( __main__.__file__ ) return os.path.dirname( mainfile ) jumapath = getMainModulePath() + '/editor/lib' thirdPartyPathBase = getMainModulePath() + '/editor/lib/3rdparty' <API key> = thirdPartyPathBase + '/common' if platform.system() == u'Darwin': <API key> = thirdPartyPathBase + '/osx' else: <API key> = thirdPartyPathBase + '/windows' sys.path.insert( 0, jumapath ) sys.path.insert( 2, <API key> ) sys.path.insert( 1, <API key> ) import juma def main(): juma.startup() if __name__ == '__main__': main()
{% extends 'template.html' %} {% block title %} {{ pagename }} {% endblock %} {% block content %} <h2>{{ pagename }}</h2> <div class="panel panel-default"> <!-- Default panel contents --> <div class="panel-heading"> <!-- Table --> <table> <tr> <td><a href="/inicio"> <button type="button" class="btn btn-primary">Atras</button></a></td> </tr> </table> </div> <div class="row"> <div class="col-xs-12"> <table class="table table-striped"> <thead> <tr> <th>Version</th> <th>Fecha</th> <th>Novedad</th> </tr> </thead> <tbody> {% for novedad in novedades %} <tr> <td>{{ novedad.release }}</td> <td>{{ novedad.fecha|date('d/m/Y') }}</td> <td>{{ novedad.descripcion }}</td> </tr> {% endfor %} </tbody> </table> </div><!--div col xs12 </div><!--div row </div> {% endblock %}
import createSvgIcon from './utils/createSvgIcon'; import { jsx as _jsx } from "react/jsx-runtime"; export default createSvgIcon( /*#__PURE__*/_jsx("path", { d: "M2 20h20v4H2v-4zm3.49-3h2.42l1.27-3.58h5.65L16.09 17h2.42L13.25 3h-2.5L5.49 17zm4.42-5.61 2.03-5.79h.12l2.03 5.79H9.91z" }), 'FormatColorText');
<?php namespace Pantheon\Terminus\Commands\Domain; use Consolidation\OutputFormatters\StructuredData\RowsOfFields; use Pantheon\Terminus\Commands\TerminusCommand; use Pantheon\Terminus\Commands\StructuredListTrait; use Pantheon\Terminus\Site\SiteAwareInterface; use Pantheon\Terminus\Site\SiteAwareTrait; /** * Class ListCommand * @package Pantheon\Terminus\Commands\Domain */ class ListCommand extends TerminusCommand implements SiteAwareInterface { use SiteAwareTrait; use StructuredListTrait; /** * Displays domains associated with the environment. * * @authorize * @filter-output * * @command domain:list * @aliases domains * * @field-labels * id: Domain/ID * type: Type * primary: Is Primary * deletable: Is Deletable * status: status * @return RowsOfFields * * @param string $site_env Site & environment in the format `site-name.env` * * @usage <site>.<env> Displays domains associated with <site>'s <env> environment. */ public function listDomains($site_env) { list(, $env) = $this->getSiteEnv($site_env); return $this->getRowsOfFields($env->getDomains()); } }
# Time: O(n) ~ O(n^2) # Space: O(1) from random import randint class Solution: # @param {integer[]} nums # @param {integer} k # @return {integer} def findKthLargest(self, nums, k): left, right = 0, len(nums) - 1 while left <= right: pivot_idx = randint(left, right) new_pivot_idx = self.<API key>(left, right, pivot_idx, nums) if new_pivot_idx == k - 1: return nums[new_pivot_idx] elif new_pivot_idx > k - 1: right = new_pivot_idx - 1 else: # new_pivot_idx < k - 1. left = new_pivot_idx + 1 def <API key>(self, left, right, pivot_idx, nums): pivot_value = nums[pivot_idx] new_pivot_idx = left nums[pivot_idx], nums[right] = nums[right], nums[pivot_idx] for i in xrange(left, right): if nums[i] > pivot_value: nums[i], nums[new_pivot_idx] = nums[new_pivot_idx], nums[i] new_pivot_idx += 1 nums[right], nums[new_pivot_idx] = nums[new_pivot_idx], nums[right] return new_pivot_idx
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; namespace Gearset.Components.InspectorWPF { <summary> Interaction logic for Spinner.xaml </summary> public partial class VisualItemBase : UserControl { <summary> The InspectorTreeNode that this float spinner affetcs. </summary> public InspectorNode TreeNode { get { return (InspectorNode)GetValue(TreeNodeProperty); } set { SetValue(TreeNodeProperty, value); } } <summary> This will make the TreeNode stop calling UpdateUI on this node if we're expanded. Ussually used for the genericItem because the ToString() representation of a variable is the same as watching it's children updating. </summary> public bool UpdateIfExpanded { get; set; } <summary> Defines a way to move the focus out of the textbox when enter is pressed. </summary> protected static readonly TraversalRequest traversalRequest = new TraversalRequest(<API key>.Next); <summary> Registers a dependency property as backing store for the FloatValue property </summary> public static readonly DependencyProperty TreeNodeProperty = DependencyProperty.Register("TreeNode", typeof(InspectorNode), typeof(VisualItemBase), new <API key>(null, <API key>.None, <API key>)); public static void <API key>(DependencyObject d, <API key> e) { VisualItemBase item = d as VisualItemBase; if (item != null && item.TreeNode != null) { item.TreeNode.VisualItem = item; item.OnTreeNodeChanged(); } } <summary> Empty constructor </summary> public VisualItemBase() { } public virtual void OnTreeNodeChanged() { } <summary> Override this method and add logic to update the control to reflect the new value. </summary> <param name="value"></param> public virtual void UpdateUI(Object value) { // Do nothing } <summary> Override this method and add logic to update the value of the variable of the treenode. </summary> public virtual void UpdateVariable() { // Do nothing } } }
import test.support # Skip tests if _multiprocessing wasn't built. test.support.import_module('_multiprocessing') # Skip tests if sem_open implementation is broken. test.support.import_module('multiprocessing.synchronize') # import threading after _multiprocessing to raise a more revelant error # message: "No module named _multiprocessing". _multiprocessing is not compiled # without thread support. test.support.import_module('threading') import threading import time import unittest from concurrent import futures from concurrent.futures._base import ( PENDING, RUNNING, CANCELLED, <API key>, FINISHED, Future) import concurrent.futures.process def create_future(state=PENDING, exception=None, result=None): f = Future() f._state = state f._exception = exception f._result = result return f PENDING_FUTURE = create_future(state=PENDING) RUNNING_FUTURE = create_future(state=RUNNING) CANCELLED_FUTURE = create_future(state=CANCELLED) <API key> = create_future(state=<API key>) EXCEPTION_FUTURE = create_future(state=FINISHED, exception=IOError()) SUCCESSFUL_FUTURE = create_future(state=FINISHED, result=42) def mul(x, y): return x * y def sleep_and_raise(t): time.sleep(t) raise Exception('this is an exception') class ExecutorMixin: worker_count = 5 def _prime_executor(self): # Make sure that the executor is ready to do work before running the # tests. This should reduce the probability of timeouts in the tests. futures = [self.executor.submit(time.sleep, 0.1) for _ in range(self.worker_count)] for f in futures: f.result() class ThreadPoolMixin(ExecutorMixin): def setUp(self): self.executor = futures.ThreadPoolExecutor(max_workers=5) self._prime_executor() def tearDown(self): self.executor.shutdown(wait=True) class ProcessPoolMixin(ExecutorMixin): def setUp(self): try: self.executor = futures.ProcessPoolExecutor(max_workers=5) except NotImplementedError as e: self.skipTest(str(e)) self._prime_executor() def tearDown(self): self.executor.shutdown(wait=True) class <API key>(unittest.TestCase): def <API key>(self): self.executor.shutdown() self.assertRaises(RuntimeError, self.executor.submit, pow, 2, 5) class <API key>(ThreadPoolMixin, <API key>): def _prime_executor(self): pass def <API key>(self): self.executor.submit(mul, 21, 2) self.executor.submit(mul, 6, 7) self.executor.submit(mul, 3, 14) self.assertEqual(len(self.executor._threads), 3) self.executor.shutdown() for t in self.executor._threads: t.join() def <API key>(self): with futures.ThreadPoolExecutor(max_workers=5) as e: executor = e self.assertEqual(list(e.map(abs, range(-5, 5))), [5, 4, 3, 2, 1, 0, 1, 2, 3, 4]) for t in executor._threads: t.join() def test_del_shutdown(self): executor = futures.ThreadPoolExecutor(max_workers=5) executor.map(abs, range(-5, 5)) threads = executor._threads del executor for t in threads: t.join() class <API key>(ProcessPoolMixin, <API key>): def _prime_executor(self): pass def <API key>(self): self.executor.submit(mul, 21, 2) self.executor.submit(mul, 6, 7) self.executor.submit(mul, 3, 14) self.assertEqual(len(self.executor._processes), 5) processes = self.executor._processes self.executor.shutdown() for p in processes: p.join() def <API key>(self): with futures.ProcessPoolExecutor(max_workers=5) as e: processes = e._processes self.assertEqual(list(e.map(abs, range(-5, 5))), [5, 4, 3, 2, 1, 0, 1, 2, 3, 4]) for p in processes: p.join() def test_del_shutdown(self): executor = futures.ProcessPoolExecutor(max_workers=5) list(executor.map(abs, range(-5, 5))) <API key> = executor.<API key> processes = executor._processes del executor <API key>.join() for p in processes: p.join() class WaitTests(unittest.TestCase): def <API key>(self): future1 = self.executor.submit(mul, 21, 2) future2 = self.executor.submit(time.sleep, 5) done, not_done = futures.wait( [CANCELLED_FUTURE, future1, future2], return_when=futures.FIRST_COMPLETED) self.assertEqual(set([future1]), done) self.assertEqual(set([CANCELLED_FUTURE, future2]), not_done) def <API key>(self): future1 = self.executor.submit(time.sleep, 2) finished, pending = futures.wait( [<API key>, SUCCESSFUL_FUTURE, future1], return_when=futures.FIRST_COMPLETED) self.assertEqual( set([<API key>, SUCCESSFUL_FUTURE]), finished) self.assertEqual(set([future1]), pending) def <API key>(self): future1 = self.executor.submit(mul, 2, 21) future2 = self.executor.submit(sleep_and_raise, 5) future3 = self.executor.submit(time.sleep, 10) finished, pending = futures.wait( [future1, future2, future3], return_when=futures.FIRST_EXCEPTION) self.assertEqual(set([future1, future2]), finished) self.assertEqual(set([future3]), pending) def <API key>(self): future1 = self.executor.submit(divmod, 21, 0) future2 = self.executor.submit(time.sleep, 5) finished, pending = futures.wait( [SUCCESSFUL_FUTURE, CANCELLED_FUTURE, <API key>, future1, future2], return_when=futures.FIRST_EXCEPTION) self.assertEqual(set([SUCCESSFUL_FUTURE, <API key>, future1]), finished) self.assertEqual(set([CANCELLED_FUTURE, future2]), pending) def <API key>(self): future1 = self.executor.submit(time.sleep, 2) finished, pending = futures.wait( [EXCEPTION_FUTURE, future1], return_when=futures.FIRST_EXCEPTION) self.assertEqual(set([EXCEPTION_FUTURE]), finished) self.assertEqual(set([future1]), pending) def test_all_completed(self): future1 = self.executor.submit(divmod, 2, 0) future2 = self.executor.submit(mul, 2, 21) finished, pending = futures.wait( [SUCCESSFUL_FUTURE, <API key>, EXCEPTION_FUTURE, future1, future2], return_when=futures.ALL_COMPLETED) self.assertEqual(set([SUCCESSFUL_FUTURE, <API key>, EXCEPTION_FUTURE, future1, future2]), finished) self.assertEqual(set(), pending) def test_timeout(self): future1 = self.executor.submit(mul, 6, 7) future2 = self.executor.submit(time.sleep, 10) finished, pending = futures.wait( [<API key>, EXCEPTION_FUTURE, SUCCESSFUL_FUTURE, future1, future2], timeout=5, return_when=futures.ALL_COMPLETED) self.assertEqual(set([<API key>, EXCEPTION_FUTURE, SUCCESSFUL_FUTURE, future1]), finished) self.assertEqual(set([future2]), pending) class ThreadPoolWaitTests(ThreadPoolMixin, WaitTests): pass class <API key>(ProcessPoolMixin, WaitTests): pass class AsCompletedTests(unittest.TestCase): # TODO(brian@sweetapp.com): Should have a test with a non-zero timeout. def test_no_timeout(self): future1 = self.executor.submit(mul, 2, 21) future2 = self.executor.submit(mul, 7, 6) completed = set(futures.as_completed( [<API key>, EXCEPTION_FUTURE, SUCCESSFUL_FUTURE, future1, future2])) self.assertEqual(set( [<API key>, EXCEPTION_FUTURE, SUCCESSFUL_FUTURE, future1, future2]), completed) def test_zero_timeout(self): future1 = self.executor.submit(time.sleep, 2) completed_futures = set() try: for future in futures.as_completed( [<API key>, EXCEPTION_FUTURE, SUCCESSFUL_FUTURE, future1], timeout=0): completed_futures.add(future) except futures.TimeoutError: pass self.assertEqual(set([<API key>, EXCEPTION_FUTURE, SUCCESSFUL_FUTURE]), completed_futures) class <API key>(ThreadPoolMixin, AsCompletedTests): pass class <API key>(ProcessPoolMixin, AsCompletedTests): pass class ExecutorTest(unittest.TestCase): # Executor.shutdown() and context manager usage is tested by # <API key>. def test_submit(self): future = self.executor.submit(pow, 2, 8) self.assertEqual(256, future.result()) def test_submit_keyword(self): future = self.executor.submit(mul, 2, y=8) self.assertEqual(16, future.result()) def test_map(self): self.assertEqual( list(self.executor.map(pow, range(10), range(10))), list(map(pow, range(10), range(10)))) def test_map_exception(self): i = self.executor.map(divmod, [1, 1, 1, 1], [2, 3, 0, 5]) self.assertEqual(i.__next__(), (0, 1)) self.assertEqual(i.__next__(), (0, 1)) self.assertRaises(ZeroDivisionError, i.__next__) def test_map_timeout(self): results = [] try: for i in self.executor.map(time.sleep, [0, 0, 10], timeout=5): results.append(i) except futures.TimeoutError: pass else: self.fail('expected TimeoutError') self.assertEqual([None, None], results) class <API key>(ThreadPoolMixin, ExecutorTest): pass class <API key>(ProcessPoolMixin, ExecutorTest): pass class FutureTests(unittest.TestCase): def <API key>(self): callback_result = None def fn(callback_future): nonlocal callback_result callback_result = callback_future.result() f = Future() f.add_done_callback(fn) f.set_result(5) self.assertEqual(5, callback_result) def <API key>(self): callback_exception = None def fn(callback_future): nonlocal callback_exception callback_exception = callback_future.exception() f = Future() f.add_done_callback(fn) f.set_exception(Exception('test')) self.assertEqual(('test',), callback_exception.args) def <API key>(self): was_cancelled = None def fn(callback_future): nonlocal was_cancelled was_cancelled = callback_future.cancelled() f = Future() f.add_done_callback(fn) self.assertTrue(f.cancel()) self.assertTrue(was_cancelled) def <API key>(self): with test.support.captured_stderr() as stderr: raising_was_called = False fn_was_called = False def raising_fn(callback_future): nonlocal raising_was_called raising_was_called = True raise Exception('doh!') def fn(callback_future): nonlocal fn_was_called fn_was_called = True f = Future() f.add_done_callback(raising_fn) f.add_done_callback(fn) f.set_result(5) self.assertTrue(raising_was_called) self.assertTrue(fn_was_called) self.assertIn('Exception: doh!', stderr.getvalue()) def <API key>(self): callback_result = None def fn(callback_future): nonlocal callback_result callback_result = callback_future.result() f = Future() f.set_result(5) f.add_done_callback(fn) self.assertEqual(5, callback_result) def <API key>(self): callback_exception = None def fn(callback_future): nonlocal callback_exception callback_exception = callback_future.exception() f = Future() f.set_exception(Exception('test')) f.add_done_callback(fn) self.assertEqual(('test',), callback_exception.args) def <API key>(self): was_cancelled = None def fn(callback_future): nonlocal was_cancelled was_cancelled = callback_future.cancelled() f = Future() self.assertTrue(f.cancel()) f.add_done_callback(fn) self.assertTrue(was_cancelled) def test_repr(self): self.assertRegex(repr(PENDING_FUTURE), '<Future at 0x[0-9a-f]+ state=pending>') self.assertRegex(repr(RUNNING_FUTURE), '<Future at 0x[0-9a-f]+ state=running>') self.assertRegex(repr(CANCELLED_FUTURE), '<Future at 0x[0-9a-f]+ state=cancelled>') self.assertRegex(repr(<API key>), '<Future at 0x[0-9a-f]+ state=cancelled>') self.assertRegex( repr(EXCEPTION_FUTURE), '<Future at 0x[0-9a-f]+ state=finished raised IOError>') self.assertRegex( repr(SUCCESSFUL_FUTURE), '<Future at 0x[0-9a-f]+ state=finished returned int>') def test_cancel(self): f1 = create_future(state=PENDING) f2 = create_future(state=RUNNING) f3 = create_future(state=CANCELLED) f4 = create_future(state=<API key>) f5 = create_future(state=FINISHED, exception=IOError()) f6 = create_future(state=FINISHED, result=5) self.assertTrue(f1.cancel()) self.assertEqual(f1._state, CANCELLED) self.assertFalse(f2.cancel()) self.assertEqual(f2._state, RUNNING) self.assertTrue(f3.cancel()) self.assertEqual(f3._state, CANCELLED) self.assertTrue(f4.cancel()) self.assertEqual(f4._state, <API key>) self.assertFalse(f5.cancel()) self.assertEqual(f5._state, FINISHED) self.assertFalse(f6.cancel()) self.assertEqual(f6._state, FINISHED) def test_cancelled(self): self.assertFalse(PENDING_FUTURE.cancelled()) self.assertFalse(RUNNING_FUTURE.cancelled()) self.assertTrue(CANCELLED_FUTURE.cancelled()) self.assertTrue(<API key>.cancelled()) self.assertFalse(EXCEPTION_FUTURE.cancelled()) self.assertFalse(SUCCESSFUL_FUTURE.cancelled()) def test_done(self): self.assertFalse(PENDING_FUTURE.done()) self.assertFalse(RUNNING_FUTURE.done()) self.assertTrue(CANCELLED_FUTURE.done()) self.assertTrue(<API key>.done()) self.assertTrue(EXCEPTION_FUTURE.done()) self.assertTrue(SUCCESSFUL_FUTURE.done()) def test_running(self): self.assertFalse(PENDING_FUTURE.running()) self.assertTrue(RUNNING_FUTURE.running()) self.assertFalse(CANCELLED_FUTURE.running()) self.assertFalse(<API key>.running()) self.assertFalse(EXCEPTION_FUTURE.running()) self.assertFalse(SUCCESSFUL_FUTURE.running()) def <API key>(self): self.assertRaises(futures.TimeoutError, PENDING_FUTURE.result, timeout=0) self.assertRaises(futures.TimeoutError, RUNNING_FUTURE.result, timeout=0) self.assertRaises(futures.CancelledError, CANCELLED_FUTURE.result, timeout=0) self.assertRaises(futures.CancelledError, <API key>.result, timeout=0) self.assertRaises(IOError, EXCEPTION_FUTURE.result, timeout=0) self.assertEqual(SUCCESSFUL_FUTURE.result(timeout=0), 42) def <API key>(self): # TODO(brian@sweetapp.com): This test is timing dependant. def notification(): # Wait until the main thread is waiting for the result. time.sleep(1) f1.set_result(42) f1 = create_future(state=PENDING) t = threading.Thread(target=notification) t.start() self.assertEqual(f1.result(timeout=5), 42) def <API key>(self): # TODO(brian@sweetapp.com): This test is timing dependant. def notification(): # Wait until the main thread is waiting for the result. time.sleep(1) f1.cancel() f1 = create_future(state=PENDING) t = threading.Thread(target=notification) t.start() self.assertRaises(futures.CancelledError, f1.result, timeout=5) def <API key>(self): self.assertRaises(futures.TimeoutError, PENDING_FUTURE.exception, timeout=0) self.assertRaises(futures.TimeoutError, RUNNING_FUTURE.exception, timeout=0) self.assertRaises(futures.CancelledError, CANCELLED_FUTURE.exception, timeout=0) self.assertRaises(futures.CancelledError, <API key>.exception, timeout=0) self.assertTrue(isinstance(EXCEPTION_FUTURE.exception(timeout=0), IOError)) self.assertEqual(SUCCESSFUL_FUTURE.exception(timeout=0), None) def <API key>(self): def notification(): # Wait until the main thread is waiting for the exception. time.sleep(1) with f1._condition: f1._state = FINISHED f1._exception = IOError() f1._condition.notify_all() f1 = create_future(state=PENDING) t = threading.Thread(target=notification) t.start() self.assertTrue(isinstance(f1.exception(timeout=5), IOError)) def test_main(): test.support.run_unittest(<API key>, <API key>, <API key>, ThreadPoolWaitTests, <API key>, <API key>, FutureTests, <API key>, <API key>) if __name__ == "__main__": test_main()
#pragma once #include <gtksourceviewmm.h> #include <mutex> #include <set> #include <boost/filesystem.hpp> namespace Source { class BaseView : public Gsv::View { public: BaseView(const boost::filesystem::path &file_path, const Glib::RefPtr<Gsv::Language> &language); ~BaseView() override; boost::filesystem::path file_path; Glib::RefPtr<Gsv::Language> language; bool load(bool not_undoable_action=false); Set new text more optimally and without unnecessary scrolling void replace_text(const std::string &new_text); virtual void rename(const boost::filesystem::path &path); virtual bool save() = 0; Glib::RefPtr<Gio::FileMonitor> monitor; sigc::connection <API key>; sigc::connection <API key>; virtual void configure() = 0; virtual void hide_tooltips() = 0; virtual void hide_dialogs() = 0; std::function<void(BaseView* view, bool center, bool show_tooltips)> <API key>=[](BaseView* view, bool center, bool show_tooltips) {}; Safely returns iter given line and an offset using either byte index or character offset. Defaults to using byte index. virtual Gtk::TextIter <API key>(int line, int pos); Safely returns iter given line and character offset Gtk::TextIter <API key>(int line, int offset); Safely returns iter given line and byte index Gtk::TextIter <API key>(int line, int index); Gtk::TextIter <API key>(int line_nr); Gtk::TextIter get_iter_for_dialog(); Safely places cursor at line using <API key>. void <API key>(int line, int pos); Safely places cursor at line offset void <API key>(int line, int offset); Safely places cursor at line index void <API key>(int line, int index); protected: std::time_t last_write_time; void monitor_file(); void <API key>(std::time_t last_write_time_=static_cast<std::time_t>(-1)); Move iter to line start. Depending on iter position, before or after indentation. Works with wrapped lines. Gtk::TextIter get_smart_home_iter(const Gtk::TextIter &iter); Move iter to line end. Depending on iter position, before or after indentation. Works with wrapped lines. Note that smart end goes FIRST to end of line to avoid hiding empty chars after expressions. Gtk::TextIter get_smart_end_iter(const Gtk::TextIter &iter); std::string get_line(const Gtk::TextIter &iter); std::string get_line(const Glib::RefPtr<Gtk::TextBuffer::Mark> &mark); std::string get_line(int line_nr); std::string get_line(); std::string get_line_before(const Gtk::TextIter &iter); std::string get_line_before(const Glib::RefPtr<Gtk::TextBuffer::Mark> &mark); std::string get_line_before(); Gtk::TextIter get_tabs_end_iter(const Gtk::TextIter &iter); Gtk::TextIter get_tabs_end_iter(const Glib::RefPtr<Gtk::TextBuffer::Mark> &mark); Gtk::TextIter get_tabs_end_iter(int line_nr); Gtk::TextIter get_tabs_end_iter(); std::set<int> diagnostic_offsets; void <API key>(); public: std::function<void(BaseView *view)> update_tab_label; std::function<void(BaseView *view)> <API key>; std::function<void(BaseView *view)> <API key>; std::function<void(BaseView *view)> <API key>; std::function<void(BaseView *view)> update_status_state; std::tuple<size_t, size_t, size_t> status_diagnostics; std::string status_state; std::function<void(BaseView *view)> <API key>; std::string status_branch; bool disable_spellcheck=false; }; }
<?php use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateMessagesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('messages', function (Blueprint $table) { $table->increments('id'); $table->integer('sender_id')->unsigned(); $table->foreign('sender_id')->references('id')->on('users'); $table->integer('receiver_id')->unsigned(); $table->foreign('receiver_id')->references('id')->on('users'); $table->text('content'); $table->timestamp('created_at')->default(DB::raw('CURRENT_TIMESTAMP')); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::drop('messages'); } }
using System.Collections.Generic; using System.Windows; using MarkdownEdit.Models; namespace MarkdownEdit.Controls { public partial class EncodingComboBox { public static readonly DependencyProperty <API key> = DependencyProperty.Register( "SelectedEncoding", typeof(MyEncodingInfo), typeof(EncodingComboBox), new PropertyMetadata(default(MyEncodingInfo))); public EncodingComboBox() { InitializeComponent(); } public MyEncodingInfo SelectedEncoding { get => (MyEncodingInfo)GetValue(<API key>); set => SetValue(<API key>, value); } public ICollection<MyEncodingInfo> SystemEncodings => MyEncodingInfo.GetEncodings(); } }
<?php namespace Proxies\__CG__\webStudent\EtudiantBundle\Entity; /** * THIS CLASS WAS GENERATED BY THE DOCTRINE ORM. DO NOT EDIT THIS FILE. */ class Section extends \webStudent\EtudiantBundle\Entity\Section implements \Doctrine\ORM\Proxy\Proxy { private $_entityPersister; private $_identifier; public $__isInitialized__ = false; public function __construct($entityPersister, $identifier) { $this->_entityPersister = $entityPersister; $this->_identifier = $identifier; } /** @private */ public function __load() { if (!$this->__isInitialized__ && $this->_entityPersister) { $this->__isInitialized__ = true; if (method_exists($this, "__wakeup")) { // call this after __isInitialized__to avoid infinite recursion // but before loading to emulate what ClassMetadata::newInstance() // provides. $this->__wakeup(); } if ($this->_entityPersister->load($this->_identifier, $this) === null) { throw new \Doctrine\ORM\<API key>(); } unset($this->_entityPersister, $this->_identifier); } } /** @private */ public function __isInitialized() { return $this->__isInitialized__; } public function getId() { if ($this->__isInitialized__ === false) { return (int) $this->_identifier["id"]; } $this->__load(); return parent::getId(); } public function setCode($code) { $this->__load(); return parent::setCode($code); } public function getCode() { $this->__load(); return parent::getCode(); } public function setNom($nom) { $this->__load(); return parent::setNom($nom); } public function getNom() { $this->__load(); return parent::getNom(); } public function setUtilisateur(\webStudent\EtudiantBundle\Entity\Utilisateur $utilisateur) { $this->__load(); return parent::setUtilisateur($utilisateur); } public function getUtilisateur() { $this->__load(); return parent::getUtilisateur(); } public function addUtilisateur(\webStudent\EtudiantBundle\Entity\Utilisateur $utilisateurs) { $this->__load(); return parent::addUtilisateur($utilisateurs); } public function removeUtilisateur(\webStudent\EtudiantBundle\Entity\Utilisateur $utilisateurs) { $this->__load(); return parent::removeUtilisateur($utilisateurs); } public function getUtilisateurs() { $this->__load(); return parent::getUtilisateurs(); } public function __sleep() { return array('__isInitialized__', 'id', 'code', 'nom', 'utilisateurs'); } public function __clone() { if (!$this->__isInitialized__ && $this->_entityPersister) { $this->__isInitialized__ = true; $class = $this->_entityPersister->getClassMetadata(); $original = $this->_entityPersister->load($this->_identifier); if ($original === null) { throw new \Doctrine\ORM\<API key>(); } foreach ($class->reflFields as $field => $reflProperty) { $reflProperty->setValue($this, $reflProperty->getValue($original)); } unset($this->_entityPersister, $this->_identifier); } } }
// Broad Institute. All rights are reserved. This software is supplied // // Institute is not responsible for its use, misuse, or functionality. // #ifndef FASTG_TOOLS_H #define FASTG_TOOLS_H #include "CoreTools.h" #include "efasta/EfastaTools.h" // class specifying all FASTG specifications class fastg_meta{ public: static size_t GetDefaultGapSize(); //the number of 'N' in a gap's canonical sequence static String GetVersion(); static String GetFileHeader(const String assembly_name); static String GetFileFooter(); // For FASTG<->EFASTA conversion, 3 modes are required due to legacy reasons // Mode 0 yields to correct value, Mode 1/2 are used to accommodate old code // MODE_0 == 0: variation in length according to actual FASTG spec // MODE_1 == 1: the variation of 'gaps' are ignore; // instead, the gap equals to max( average gap width, 1) // MODE_2 == 2: the variation of 'gaps' are ignore; // instead, the gap equals to max( average gap width,0) // Future work should stick with MODE_0 enum efasta_mode {MODE_0,MODE_1,MODE_2,N_MODE}; private: //these are implmenetation dependent and are defined in the implementation file FastgTools.cc static const String sVersion_; static const size_t uDefaultGapSize_; //the number of 'N' in the canonical sequence }; class recfastg; // Class basefastg represents bases record in fastg string. class basefastg : public String { public: basefastg( ); basefastg( const String& s ); basefastg( const efasta& ef ); basefastg( const int& sep, const int& dev ); basefastg( const superb& s, const VecEFasta& econtigs); basefastg( const superb& s, const vec<basefastg>& fcontigs); basefastg( const superb& s, const vec<recfastg>& fcontigs); void AsSections( vec<String>& sections ) const; int Length1(const Bool count_Ns = false) const; // Three modes are required due to legacy reasons // Mode 0 yields to correct value, Mode 1/2 are used to accommodate old code // fastg_meta::MODE_0 == 0: variation in length according to actual FASTG spec // fastg_meta::MODE_1 == 1: the variation of 'gaps' are ignore; // instead, the gap equals to max( average gap width, 1) // fastg_meta::MODE_2 == 2: the variation of 'gaps' are ignore; // instead, the gap equals to max( average gap width,0) int MinLength(const fastg_meta::efasta_mode uMode ) const; int MaxLength(const fastg_meta::efasta_mode uMode ) const; Bool IsGapless() const; }; class headfastg : public String { public: headfastg( ); headfastg( const String& id ); headfastg( const String& id, const vec<String>& next_ids ); headfastg( const String& id, const vec<int>& next_ids ); }; class recfastg { private: headfastg header_; basefastg bases_; public: recfastg(); recfastg( const headfastg& header, const basefastg& bases); void Set( const headfastg& header, const basefastg& bases); int Length1() const; // Three modes are required due to legacy reasons // Mode 0 yields to correct value, Mode 1/2 are used to accommodate old code // fastg_meta::MODE_0 == 0: variation in length according to actual FASTG spec // fastg_meta::MODE_1 == 1: the variation of 'gaps' are ignore; // instead, the gap equals to max( average gap width, 1) // fastg_meta::MODE_2 == 2: the variation of 'gaps' are ignore; // instead, the gap equals to max( average gap width,0) int MinLength(const fastg_meta::efasta_mode uMode ) const; int MaxLength(const fastg_meta::efasta_mode uMode ) const; Bool IsGapless() const; Bool ReadRecord( ifstream& in ); const basefastg& bases() const; const headfastg& header() const; // Prints in a following format: "><header_>;\n" followed by the full bases // sequence and ambiguity information; breaks // long sequences nicely into 80-character lines void Print( ostream& out ) const; void Print( ostream& out, const String& id ) const; void AsScaffold( superb& s, vec<recfastg>& fcontigs, int& lastTid ) const; void AsFasta( fastavector& fa ) const; void AsFastb( basevector& fb ) const; // convert to EFASTA, MODE_0==MODE_1, with gap=max(1,avg-gap), and MODE_2 for gap=max(0,avg-gap) void AsEfasta( efasta& fe , const fastg_meta::efasta_mode uMode) const; }; void LoadFastg( const String& fn, vec<recfastg>& records ); void WriteFastg( const String& fn, const vec<recfastg>& records ); // take a vec of recfastg and convert and create FASTA and EFASTA files void WriteFastaEfasta( const String& fasta_file, const String& efasta_file , const vec<recfastg>& records, const Bool ncbi_format=false); #endif
using System.ComponentModel.Composition; using System.Linq; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.Diagnostics; using Microsoft.VisualStudio.LanguageServices.Implementation.TableDataSource; using Microsoft.VisualStudio.Shell; using Microsoft.VisualStudio.Shell.TableManager; namespace Microsoft.VisualStudio.LanguageServices.LiveShare.Client { <summary> An error list provider that gets diagnostics from the Roslyn diagnostics service. </summary> [Export] internal class <API key> : <API key> { internal const string IdentifierString = nameof(<API key>); private readonly LiveTableDataSource _source; private bool <API key> = false; [<API key>] public <API key>( SVsServiceProvider serviceProvider, <API key> workspace, IDiagnosticService diagnosticService, <API key> provider) : this(workspace, diagnosticService, provider) { <API key>(); } private <API key>(CodeAnalysis.Workspace workspace, IDiagnosticService diagnosticService, <API key> provider) : base(workspace, provider) { _source = new LiveTableDataSource(workspace, diagnosticService, IdentifierString); <API key>(workspace.CurrentSolution, _source); } public void <API key>(bool diagnosticsPresent) { <API key> = diagnosticsPresent; } protected override void <API key>(Solution solution) { if (solution.ProjectIds.Count == 0 || TableManager.Sources.Any(s => s == _source)) { return; } // If there's no workspace diagnostic service, we should populate the diagnostics table via language services. // Otherwise, the workspace diagnostic service will handle it. if (<API key>) { return; } AddTableSource(_source); } protected override void <API key>(Solution solution) { if (solution.ProjectIds.Count > 0 || !TableManager.Sources.Any(s => s == _source)) { return; } TableManager.RemoveSource(_source); } protected override void ShutdownSource() { _source.Shutdown(); } } }
/** * The Carousel module provides a widget for browsing among a set of like * objects represented pictorially. * * @module carousel * @requires yahoo, dom, event, element * @optional animation * @namespace YAHOO.widget * @title Carousel Widget * @beta */ (function () { var WidgetName; // forward declaration /** * The Carousel widget. * * @class Carousel * @extends YAHOO.util.Element * @constructor * @param el {HTMLElement | String} The HTML element that represents the * the container that houses the Carousel. * @param cfg {Object} (optional) The configuration values */ YAHOO.widget.Carousel = function (el, cfg) { YAHOO.log("Component creation", WidgetName); YAHOO.widget.Carousel.superclass.constructor.call(this, el, cfg); }; /* * Private variables of the Carousel component */ /* Some abbreviations to avoid lengthy typing and lookups. */ var Carousel = YAHOO.widget.Carousel, Dom = YAHOO.util.Dom, Event = YAHOO.util.Event, JS = YAHOO.lang; /** * The widget name. * @private * @static */ WidgetName = "Carousel"; /** * The internal table of Carousel instances. * @private * @static */ var instances = {}, /* * Custom events of the Carousel component */ /** * @event afterScroll * @description Fires when the Carousel has scrolled to the previous or * next page. Passes back the index of the first and last visible items in * the Carousel. See * <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> * for more information on listening for this event. * @type YAHOO.util.CustomEvent */ afterScrollEvent = "afterScroll", /** * @event <API key> * @description Fires when all items have been removed from the Carousel. * See * <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> * for more information on listening for this event. * @type YAHOO.util.CustomEvent */ <API key> = "allItemsRemoved", /** * @event beforeHide * @description Fires before the Carousel is hidden. See * <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> * for more information on listening for this event. * @type YAHOO.util.CustomEvent */ beforeHideEvent = "beforeHide", /** * @event beforePageChange * @description Fires when the Carousel is about to scroll to the previous * or next page. Passes back the page number of the current page. Note * that the first page number is zero. See * <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> * for more information on listening for this event. * @type YAHOO.util.CustomEvent */ <API key> = "beforePageChange", /** * @event beforeScroll * @description Fires when the Carousel is about to scroll to the previous * or next page. Passes back the index of the first and last visible items * in the Carousel and the direction (backward/forward) of the scroll. See * <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> * for more information on listening for this event. * @type YAHOO.util.CustomEvent */ beforeScrollEvent = "beforeScroll", /** * @event beforeShow * @description Fires when the Carousel is about to be shown. See * <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> * for more information on listening for this event. * @type YAHOO.util.CustomEvent */ beforeShowEvent = "beforeShow", /** * @event blur * @description Fires when the Carousel loses focus. See * <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> * for more information on listening for this event. * @type YAHOO.util.CustomEvent */ blurEvent = "blur", /** * @event focus * @description Fires when the Carousel gains focus. See * <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> * for more information on listening for this event. * @type YAHOO.util.CustomEvent */ focusEvent = "focus", /** * @event hide * @description Fires when the Carousel is hidden. See * <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> * for more information on listening for this event. * @type YAHOO.util.CustomEvent */ hideEvent = "hide", /** * @event itemAdded * @description Fires when an item has been added to the Carousel. Passes * back the content of the item that would be added, the index at which the * item would be added, and the event itself. See * <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> * for more information on listening for this event. * @type YAHOO.util.CustomEvent */ itemAddedEvent = "itemAdded", /** * @event itemRemoved * @description Fires when an item has been removed from the Carousel. * Passes back the content of the item that would be removed, the index * from which the item would be removed, and the event itself. See * <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> * for more information on listening for this event. * @type YAHOO.util.CustomEvent */ itemRemovedEvent = "itemRemoved", /** * @event itemReplaced * @description Fires when an item has been replaced in the Carousel. * Passes back the content of the item that was replaced, the content * of the new item, the index where the replacement occurred, and the event * itself. See * <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> * for more information on listening for this event. * @type YAHOO.util.CustomEvent */ itemReplacedEvent = "itemReplaced", /** * @event itemSelected * @description Fires when an item has been selected in the Carousel. * Passes back the index of the selected item in the Carousel. Note, that * the index begins from zero. See * <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> * for more information on listening for this event. * @type YAHOO.util.CustomEvent */ itemSelectedEvent = "itemSelected", /** * @event loadItems * @description Fires when the Carousel needs more items to be loaded for * displaying them. Passes back the first and last visible items in the * Carousel, and the number of items needed to be loaded. See * <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> * for more information on listening for this event. * @type YAHOO.util.CustomEvent */ loadItemsEvent = "loadItems", /** * @event <API key> * @description Fires when the state of either one of the navigation * buttons are changed from enabled to disabled or vice versa. Passes back * the state (true/false) of the previous and next buttons. The value true * signifies the button is enabled, false signifies disabled. See * <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> * for more information on listening for this event. * @type YAHOO.util.CustomEvent */ <API key> = "<API key>", /** * @event pageChange * @description Fires after the Carousel has scrolled to the previous or * next page. Passes back the page number of the current page. Note * that the first page number is zero. See * <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> * for more information on listening for this event. * @type YAHOO.util.CustomEvent */ pageChangeEvent = "pageChange", /* * Internal event. * @event render * @description Fires when the Carousel is rendered. See * <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> * for more information on listening for this event. * @type YAHOO.util.CustomEvent */ renderEvent = "render", /** * @event show * @description Fires when the Carousel is shown. See * <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> * for more information on listening for this event. * @type YAHOO.util.CustomEvent */ showEvent = "show", /** * @event startAutoPlay * @description Fires when the auto play has started in the Carousel. See * <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> * for more information on listening for this event. * @type YAHOO.util.CustomEvent */ startAutoPlayEvent = "startAutoPlay", /** * @event stopAutoPlay * @description Fires when the auto play has been stopped in the Carousel. * See * <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> * for more information on listening for this event. * @type YAHOO.util.CustomEvent */ stopAutoPlayEvent = "stopAutoPlay", /* * Internal event. * @event uiUpdateEvent * @description Fires when the UI has been updated. * See * <a href="YAHOO.util.Element.html#addListener">Element.addListener</a> * for more information on listening for this event. * @type YAHOO.util.CustomEvent */ uiUpdateEvent = "uiUpdate"; /* * Private helper functions used by the Carousel component */ /** * Set multiple styles on one element. * @method setStyles * @param el {HTMLElement} The element to set styles on * @param style {Object} top:"10px", left:"0px", etc. * @private */ function setStyles(el, styles) { var which; for (which in styles) { if (styles.hasOwnProperty(which)) { Dom.setStyle(el, which, styles[which]); } } } /** * Create an element, set its class name and optionally install the element * to its parent. * @method createElement * @param el {String} The element to be created * @param attrs {Object} Configuration of parent, class and id attributes. * If the content is specified, it is inserted after creation of the * element. The content can also be an HTML element in which case it would * be appended as a child node of the created element. * @private */ function createElement(el, attrs) { var newEl = document.createElement(el); attrs = attrs || {}; if (attrs.className) { Dom.addClass(newEl, attrs.className); } if (attrs.styles) { setStyles(newEl, attrs.styles); } if (attrs.parent) { attrs.parent.appendChild(newEl); } if (attrs.id) { newEl.setAttribute("id", attrs.id); } if (attrs.content) { if (attrs.content.nodeName) { newEl.appendChild(attrs.content); } else { newEl.innerHTML = attrs.content; } } return newEl; } /** * Get the computed style of an element. * * @method getStyle * @param el {HTMLElement} The element for which the style needs to be * returned. * @param style {String} The style attribute * @param type {String} "int", "float", etc. (defaults to int) * @private */ function getStyle(el, style, type) { var value; if (!el) { return 0; } function getStyleIntVal(el, style) { var val; if (style == "marginRight" && YAHOO.env.ua.webkit) { val = parseInt(Dom.getStyle(el, "marginLeft"), 10); } else { val = parseInt(Dom.getStyle(el, style), 10); } return JS.isNumber(val) ? val : 0; } function getStyleFloatVal(el, style) { var val; if (style == "marginRight" && YAHOO.env.ua.webkit) { val = parseFloat(Dom.getStyle(el, "marginLeft")); } else { val = parseFloat(Dom.getStyle(el, style)); } return JS.isNumber(val) ? val : 0; } if (typeof type == "undefined") { type = "int"; } switch (style) { case "height": value = el.offsetHeight; if (value > 0) { value += getStyleIntVal(el, "marginTop") + getStyleIntVal(el, "marginBottom"); } else { value = getStyleFloatVal(el, "height") + getStyleIntVal(el, "marginTop") + getStyleIntVal(el, "marginBottom") + getStyleIntVal(el, "borderTopWidth") + getStyleIntVal(el, "borderBottomWidth") + getStyleIntVal(el, "paddingTop") + getStyleIntVal(el, "paddingBottom"); } break; case "width": value = el.offsetWidth; if (value > 0) { value += getStyleIntVal(el, "marginLeft") + getStyleIntVal(el, "marginRight"); } else { value = getStyleFloatVal(el, "width") + getStyleIntVal(el, "marginLeft") + getStyleIntVal(el, "marginRight") + getStyleIntVal(el, "borderLeftWidth") + getStyleIntVal(el, "borderRightWidth") + getStyleIntVal(el, "paddingLeft") + getStyleIntVal(el, "paddingRight"); } break; default: if (type == "int") { value = getStyleIntVal(el, style); } else if (type == "float") { value = getStyleFloatVal(el, style); } else { value = Dom.getStyle(el, style); } break; } return value; } /** * Compute and return the height or width of a single Carousel item * depending upon the orientation. * * @method getCarouselItemSize * @param which {String} "height" or "width" to be returned. If this is * passed explicitly, the calculated size is not cached. * @private */ function getCarouselItemSize(which) { var carousel = this, child, item, size = 0, first = carousel.get("firstVisible"), vertical = false; if (carousel._itemsTable.numItems === 0) { return 0; } item = carousel._itemsTable.items[first] || carousel._itemsTable.loading[first]; if (JS.isUndefined(item)) { return 0; } child = Dom.get(item.id); if (typeof which == "undefined") { vertical = carousel.get("isVertical"); } else { vertical = which == "height"; } if (this._itemAttrCache[which]) { return this._itemAttrCache[which]; } if (vertical) { size = getStyle(child, "height"); } else { size = getStyle(child, "width"); } this._itemAttrCache[which] = size; return size; } /** * Return the size of a part of the item (reveal). * * @method getRevealSize * @private */ function getRevealSize() { var carousel = this, isVertical, sz; isVertical = carousel.get("isVertical"); sz = getCarouselItemSize.call(carousel, isVertical ? "height" : "width"); return (sz * carousel.get("revealAmount") / 100); } /** * Compute and return the position of a Carousel item based on its * position. * * @method <API key> * @param position {Number} The position of the Carousel item. * @private */ function <API key>(pos) { var carousel = this, itemsPerRow = carousel._cols, itemsPerCol = carousel._rows, page, sz, isVertical, itemsCol, itemsRow, sentinel, delta = 0, top, left, rsz, styles = {}, index = 0, itemsTable = carousel._itemsTable, items = itemsTable.items, loading = itemsTable.loading; isVertical = carousel.get("isVertical"); sz = getCarouselItemSize.call(carousel, isVertical ? "height" : "width"); rsz = getRevealSize.call(carousel); // adjust for items not yet loaded while (index < pos) { if (!items[index] && !loading[index]) { delta++; } index++; } pos -= delta; if (itemsPerCol) { page = this.getPageForItem(pos); if (isVertical) { itemsRow = Math.floor(pos/itemsPerRow); delta = itemsRow; top = delta * sz; styles.top = (top + rsz) + "px"; sz = getCarouselItemSize.call(carousel, "width"); itemsCol = pos % itemsPerRow; delta = itemsCol; left = delta * sz; styles.left = left + "px"; } else { itemsCol = pos % itemsPerRow; sentinel = (page - 1) * itemsPerRow; delta = itemsCol + sentinel; left = delta * sz; styles.left = (left + rsz) + "px"; sz = getCarouselItemSize.call(carousel, "height"); itemsRow = Math.floor(pos/itemsPerRow); sentinel = (page - 1) * itemsPerCol; delta = itemsRow - sentinel; top = delta * sz; styles.top = top + "px"; } } else { if (isVertical) { styles.left = 0; styles.top = ((pos * sz) + rsz) + "px"; } else { styles.top = 0; styles.left = ((pos * sz) + rsz) + "px"; } } return styles; } /** * Return the index of the first item in the view port for displaying item * in "pos". * * @method <API key> * @param pos {Number} The position of the item to be displayed * @private */ function <API key>(pos) { var num = this.get("numVisible"); return Math.floor(pos / num) * num; } /** * Return the scrolling offset size given the number of elements to * scroll. * * @method getScrollOffset * @param delta {Number} The delta number of elements to scroll by. * @private */ function getScrollOffset(delta) { var itemSize = 0, size = 0; itemSize = getCarouselItemSize.call(this); size = itemSize * delta; return size; } /** * Scroll the Carousel by a page backward. * * @method scrollPageBackward * @param {Event} ev The event object * @param {Object} obj The context object * @private */ function scrollPageBackward(ev, obj) { obj.scrollPageBackward(); Event.preventDefault(ev); } /** * Scroll the Carousel by a page forward. * * @method scrollPageForward * @param {Event} ev The event object * @param {Object} obj The context object * @private */ function scrollPageForward(ev, obj) { obj.scrollPageForward(); Event.preventDefault(ev); } /** * Set the selected item. * * @method setItemSelection * @param {Number} newpos The index of the new position * @param {Number} oldpos The index of the previous position * @private */ function setItemSelection(newpos, oldpos) { var carousel = this, cssClass = carousel.CLASSES, el, firstItem = carousel._firstItem, isCircular = carousel.get("isCircular"), numItems = carousel.get("numItems"), numVisible = carousel.get("numVisible"), position = oldpos, sentinel = firstItem + numVisible - 1; if (position >= 0 && position < numItems) { if (!JS.isUndefined(carousel._itemsTable.items[position])) { el = Dom.get(carousel._itemsTable.items[position].id); if (el) { Dom.removeClass(el, cssClass.SELECTED_ITEM); } } } if (JS.isNumber(newpos)) { newpos = parseInt(newpos, 10); newpos = JS.isNumber(newpos) ? newpos : 0; } else { newpos = firstItem; } if (JS.isUndefined(carousel._itemsTable.items[newpos])) { newpos = <API key>.call(carousel, newpos); carousel.scrollTo(newpos); // still loading the item } if (!JS.isUndefined(carousel._itemsTable.items[newpos])) { el = Dom.get(carousel._itemsTable.items[newpos].id); if (el) { Dom.addClass(el, cssClass.SELECTED_ITEM); } } if (newpos < firstItem || newpos > sentinel) { // out of focus newpos = <API key>.call(carousel, newpos); carousel.scrollTo(newpos); } } /** * Fire custom events for enabling/disabling navigation elements. * * @method syncNavigation * @private */ function syncNavigation() { var attach = false, carousel = this, cssClass = carousel.CLASSES, i, navigation, sentinel; // Don't do anything if the Carousel is not rendered if (!carousel._hasRendered) { return; } navigation = carousel.get("navigation"); sentinel = carousel._firstItem + carousel.get("numVisible"); if (navigation.prev) { if (carousel.get("numItems") === 0 || carousel._firstItem === 0) { if (carousel.get("numItems") === 0 || !carousel.get("isCircular")) { Event.removeListener(navigation.prev, "click", scrollPageBackward); Dom.addClass(navigation.prev, cssClass.FIRST_NAV_DISABLED); for (i = 0; i < carousel._navBtns.prev.length; i++) { carousel._navBtns.prev[i].setAttribute("disabled", "true"); } carousel._prevEnabled = false; } else { attach = !carousel._prevEnabled; } } else { attach = !carousel._prevEnabled; } if (attach) { Event.on(navigation.prev, "click", scrollPageBackward, carousel); Dom.removeClass(navigation.prev, cssClass.FIRST_NAV_DISABLED); for (i = 0; i < carousel._navBtns.prev.length; i++) { carousel._navBtns.prev[i].removeAttribute("disabled"); } carousel._prevEnabled = true; } } attach = false; if (navigation.next) { if (sentinel >= carousel.get("numItems")) { if (!carousel.get("isCircular")) { Event.removeListener(navigation.next, "click", scrollPageForward); Dom.addClass(navigation.next, cssClass.DISABLED); for (i = 0; i < carousel._navBtns.next.length; i++) { carousel._navBtns.next[i].setAttribute("disabled", "true"); } carousel._nextEnabled = false; } else { attach = !carousel._nextEnabled; } } else { attach = !carousel._nextEnabled; } if (attach) { Event.on(navigation.next, "click", scrollPageForward, carousel); Dom.removeClass(navigation.next, cssClass.DISABLED); for (i = 0; i < carousel._navBtns.next.length; i++) { carousel._navBtns.next[i].removeAttribute("disabled"); } carousel._nextEnabled = true; } } carousel.fireEvent(<API key>, { next: carousel._nextEnabled, prev: carousel._prevEnabled }); } /** * Synchronize and redraw the Pager UI if necessary. * * @method syncPagerUi * @private */ function syncPagerUi(page) { var carousel = this, numPages, numVisible; // Don't do anything if the Carousel is not rendered if (!carousel._hasRendered) { return; } numVisible = carousel.get("numVisible"); if (!JS.isNumber(page)) { page = Math.floor(carousel.get("selectedItem") / numVisible); } numPages = Math.ceil(carousel.get("numItems") / numVisible); carousel._pages.num = numPages; carousel._pages.cur = page; if (numPages > carousel.CONFIG.MAX_PAGER_BUTTONS) { carousel._updatePagerMenu(); } else { carousel._updatePagerButtons(); } } /** * Get full dimensions of an element. * * @method getDimensions * @param {Object} el The element to get the dimensions of * @param {String} which Get the height or width of an element * @private */ function getDimensions(el, which) { switch (which) { case 'height': return getStyle(el, "marginTop") + getStyle(el, "marginBottom") + getStyle(el, "paddingTop") + getStyle(el, "paddingBottom") + getStyle(el, "borderTopWidth") + getStyle(el, "borderBottomWidth"); case 'width': return getStyle(el, "marginLeft") + getStyle(el, "marginRight") + getStyle(el, "paddingLeft") + getStyle(el, "paddingRight") + getStyle(el, "borderLeftWidth") + getStyle(el, "borderRightWidth"); default: break; } return getStyle(el, which); } /** * Handle UI update. * Call the appropriate methods on events fired when an item is added, or * removed for synchronizing the DOM. * * @method syncUi * @param {Object} o The item that needs to be added or removed * @private */ function syncUi(o) { var carousel = this; if (!JS.isObject(o)) { return; } switch (o.ev) { case itemAddedEvent: carousel._syncUiForItemAdd(o); break; case itemRemovedEvent: carousel.<API key>(o); break; case itemReplacedEvent: carousel.<API key>(o); break; case loadItemsEvent: carousel.<API key>(o); break; } carousel.fireEvent(uiUpdateEvent); } /** * Update the state variables after scrolling the Carousel view port. * * @method <API key> * @param {Integer} item The index to which the Carousel has scrolled to. * @param {Integer} sentinel The last element in the view port. * @private */ function <API key>(item, sentinel) { var carousel = this, page = carousel.get("currentPage"), newPage, numPerPage = carousel.get("numVisible"); newPage = parseInt(carousel._firstItem / numPerPage, 10); if (newPage != page) { carousel.setAttributeConfig("currentPage", { value: newPage }); carousel.fireEvent(pageChangeEvent, newPage); } if (carousel.get("selectOnScroll")) { if (carousel.get("selectedItem") != carousel._selectedItem) { carousel.set("selectedItem", carousel._selectedItem); } } clearTimeout(carousel._autoPlayTimer); delete carousel._autoPlayTimer; if (carousel.isAutoPlayOn()) { carousel.startAutoPlay(); } carousel.fireEvent(afterScrollEvent, { first: carousel._firstItem, last: sentinel }, carousel); } /* * Static members and methods of the Carousel component */ /** * Return the appropriate Carousel object based on the id associated with * the Carousel element or false if none match. * @method getById * @public * @static */ Carousel.getById = function (id) { return instances[id] ? instances[id].object : false; }; YAHOO.extend(Carousel, YAHOO.util.Element, { /* * Internal variables used within the Carousel component */ /** * Number of rows for a multirow carousel. * * @property _rows * @private */ _rows: null, /** * Number of cols for a multirow carousel. * * @property _cols * @private */ _cols: null, /** * The Animation object. * * @property _animObj * @private */ _animObj: null, /** * The Carousel element. * * @property _carouselEl * @private */ _carouselEl: null, /** * The Carousel clipping container element. * * @property _clipEl * @private */ _clipEl: null, /** * The current first index of the Carousel. * * @property _firstItem * @private */ _firstItem: 0, /** * Does the Carousel element have focus? * * @property _hasFocus * @private */ _hasFocus: false, /** * Is the Carousel rendered already? * * @property _hasRendered * @private */ _hasRendered: false, /** * Is the animation still in progress? * * @property <API key> * @private */ <API key>: false, /** * Is the auto-scrolling of Carousel in progress? * * @property <API key> * @private */ <API key>: false, /** * The table of items in the Carousel. * The numItems is the number of items in the Carousel, items being the * array of items in the Carousel. The size is the size of a single * item in the Carousel. It is cached here for efficiency (to avoid * computing the size multiple times). * * @property _itemsTable * @private */ _itemsTable: null, /** * The Carousel navigation buttons. * * @property _navBtns * @private */ _navBtns: null, /** * The Carousel navigation. * * @property _navEl * @private */ _navEl: null, /** * Status of the next navigation item. * * @property _nextEnabled * @private */ _nextEnabled: true, /** * The Carousel pages structure. * This is an object of the total number of pages and the current page. * * @property _pages * @private */ _pages: null, /** * The Carousel pagination structure. * * @property _pagination * @private */ _pagination: {}, /** * Status of the previous navigation item. * * @property _prevEnabled * @private */ _prevEnabled: true, /** * Whether the Carousel size needs to be recomputed or not? * * @property _recomputeSize * @private */ _recomputeSize: true, /** * Cache the Carousel item attributes. * * @property _itemAttrCache * @private */ _itemAttrCache: {}, /* * CSS classes used by the Carousel component */ CLASSES: { /** * The class name of the Carousel navigation buttons. * * @property BUTTON * @default "yui-carousel-button" */ BUTTON: "yui-carousel-button", /** * The class name of the Carousel element. * * @property CAROUSEL * @default "yui-carousel" */ CAROUSEL: "yui-carousel", /** * The class name of the container of the items in the Carousel. * * @property CAROUSEL_EL * @default "<API key>" */ CAROUSEL_EL: "<API key>", /** * The class name of the Carousel's container element. * * @property CONTAINER * @default "<API key>" */ CONTAINER: "<API key>", /** * The class name of the Carousel's container element. * * @property CONTENT * @default "<API key>" */ CONTENT: "<API key>", /** * The class name of a disabled navigation button. * * @property DISABLED * @default "<API key>" */ DISABLED: "<API key>", /** * The class name of the first Carousel navigation button. * * @property FIRST_NAV * @default " <API key>" */ FIRST_NAV: " <API key>", /** * The class name of a first disabled navigation button. * * @property FIRST_NAV_DISABLED * @default "<API key>" */ FIRST_NAV_DISABLED: "<API key>", /** * The class name of a first page element. * * @property FIRST_PAGE * @default "<API key>" */ FIRST_PAGE: "<API key>", /** * The class name of the Carousel navigation button that has focus. * * @property FOCUSSED_BUTTON * @default "<API key>" */ FOCUSSED_BUTTON: "<API key>", /** * The class name of a horizontally oriented Carousel. * * @property HORIZONTAL * @default "<API key>" */ HORIZONTAL: "<API key>", /** * The element to be used as the progress indicator when the item * is still being loaded. * * @property ITEM_LOADING * @default The progress indicator (spinner) image CSS class */ ITEM_LOADING: "<API key>", /** * The class name that will be set if the Carousel adjusts itself * for a minimum width. * * @property MIN_WIDTH * @default "<API key>" */ MIN_WIDTH: "<API key>", /** * The navigation element container class name. * * @property NAVIGATION * @default "yui-carousel-nav" */ NAVIGATION: "yui-carousel-nav", /** * The class name of the next Carousel navigation button. * * @property NEXT_NAV * @default " <API key>" */ NEXT_NAV: " <API key>", /** * The class name of the next navigation link. This variable is * not only used for styling, but also for identifying the link * within the Carousel container. * * @property NEXT_PAGE * @default "yui-carousel-next" */ NEXT_PAGE: "yui-carousel-next", /** * The class name for the navigation container for prev/next. * * @property NAV_CONTAINER * @default "<API key>" */ NAV_CONTAINER: "<API key>", /** * The class name for an item in the pager UL or dropdown menu. * * @property PAGER_ITEM * @default "<API key>" */ PAGER_ITEM: "<API key>", /** * The class name for the pagination container * * @property PAGINATION * @default "<API key>" */ PAGINATION: "<API key>", /** * The class name of the focussed page navigation. This class is * specifically used for the ugly focus handling in Opera. * * @property PAGE_FOCUS * @default "<API key>" */ PAGE_FOCUS: "<API key>", /** * The class name of the previous navigation link. This variable * is not only used for styling, but also for identifying the link * within the Carousel container. * * @property PREV_PAGE * @default "yui-carousel-prev" */ PREV_PAGE: "yui-carousel-prev", /** * The class name of the selected item. * * @property SELECTED_ITEM * @default "<API key>" */ SELECTED_ITEM: "<API key>", /** * The class name of the selected paging navigation. * * @property SELECTED_NAV * @default "<API key>" */ SELECTED_NAV: "<API key>", /** * The class name of a vertically oriented Carousel. * * @property VERTICAL * @default "<API key>" */ VERTICAL: "<API key>", /** * The class name of a multirow Carousel. * * @property MULTI_ROW * @default "<API key>" */ MULTI_ROW: "<API key>", /** * The class name of a row in a multirow Carousel. * * @property ROW * @default "<API key>" */ ROW: "yui-carousel-row", /** * The class name of a vertical Carousel's container element. * * @property VERTICAL_CONTAINER * @default "<API key>" */ VERTICAL_CONTAINER: "<API key>", /** * The class name of a visible Carousel. * * @property VISIBLE * @default "<API key>" */ VISIBLE: "<API key>" }, /* * Configuration attributes for configuring the Carousel component */ CONFIG: { /** * The offset of the first visible item in the Carousel. * * @property FIRST_VISIBLE * @default 0 */ FIRST_VISIBLE: 0, /** * The minimum width of the horizontal Carousel container to support * the navigation buttons. * * @property HORZ_MIN_WIDTH * @default 180 */ HORZ_MIN_WIDTH: 180, /** * The maximum number of pager buttons allowed beyond which the UI * of the pager would be a drop-down of pages instead of buttons. * * @property MAX_PAGER_BUTTONS * @default 5 */ MAX_PAGER_BUTTONS: 5, /** * The minimum width of the vertical Carousel container to support * the navigation buttons. * * @property VERT_MIN_WIDTH * @default 155 */ VERT_MIN_WIDTH: 115, /** * The number of visible items in the Carousel. * * @property NUM_VISIBLE * @default 3 */ NUM_VISIBLE: 3 }, /* * Internationalizable strings in the Carousel component */ STRINGS: { /** * The content to be used as the progress indicator when the item * is still being loaded. * * @property <API key> * @default "Loading" */ <API key>: "Loading", /** * The next navigation button name/text. * * @property NEXT_BUTTON_TEXT * @default "Next Page" */ NEXT_BUTTON_TEXT: "Next Page", /** * The prefix text for the pager in case the UI is a drop-down. * * @property PAGER_PREFIX_TEXT * @default "Go to page " */ PAGER_PREFIX_TEXT: "Go to page ", /** * The previous navigation button name/text. * * @property <API key> * @default "Previous Page" */ <API key>: "Previous Page" }, /* * Public methods of the Carousel component */ /** * Insert or append an item to the Carousel. * E.g. if Object: ({content:"Your Content", id:"", className:""}, index) * * @method addItem * @public * @param item {String | Object | HTMLElement} The item to be appended * to the Carousel. If the parameter is a string, it is assumed to be * the content of the newly created item. If the parameter is an * object, it is assumed to supply the content and an optional class * and an optional id of the newly created item. * @param index {Number} optional The position to where in the list * (starts from zero). * @return {Boolean} Return true on success, false otherwise */ addItem: function (item, index) { var carousel = this, className, content, elId, replaceItems = 0, newIndex, // Add newIndex as workaround for undefined pos numItems = carousel.get("numItems"); if (!item) { return false; } if (JS.isString(item) || item.nodeName) { content = item.nodeName ? item.innerHTML : item; } else if (JS.isObject(item)) { content = item.content; } else { YAHOO.log("Invalid argument to addItem", "error", WidgetName); return false; } className = item.className || ""; elId = item.id ? item.id : Dom.generateId(); if (JS.isUndefined(index)) { carousel._itemsTable.items.push({ item : content, className : className, id : elId }); // Add newIndex as workaround for undefined pos newIndex = carousel._itemsTable.items.length-1; } else { if (index < 0 || index > numItems) { YAHOO.log("Index out of bounds", "error", WidgetName); return false; } // make sure we splice into the correct position if(!carousel._itemsTable.items[index]){ carousel._itemsTable.items[index] = undefined; replaceItems = 1; } carousel._itemsTable.items.splice(index, replaceItems, { item : content, className : className, id : elId }); } carousel._itemsTable.numItems++; if (numItems < carousel._itemsTable.items.length) { carousel.set("numItems", carousel._itemsTable.items.length); } // Add newPos as workaround for undefined pos carousel.fireEvent(itemAddedEvent, { pos: index, ev: itemAddedEvent, newPos:newIndex }); return true; }, /** * Insert or append multiple items to the Carousel. * * @method addItems * @public * @param items {Array} An array containing an array of new items each linked to the * index where the insertion should take place. * E.g. [[{content:'<img/>'}, index1], [{content:'<img/>'}, index2]] * NOTE: An item at index must already exist. * @return {Boolean} Return true on success, false otherwise */ addItems: function (items) { var i, n, rv = true; if (!JS.isArray(items)) { return false; } for (i = 0, n = items.length; i < n; i++) { if (this.addItem(items[i][0], items[i][1]) === false) { rv = false; } } return rv; }, /** * Remove focus from the Carousel. * * @method blur * @public */ blur: function () { this._carouselEl.blur(); this.fireEvent(blurEvent); }, /** * Clears the items from Carousel. * * @method clearItems * @public */ clearItems: function () { var carousel = this, n = carousel.get("numItems"); while (n > 0) { if (!carousel.removeItem(0)) { YAHOO.log("Item could not be removed - missing?", "warn", WidgetName); } /* For dynamic loading, the numItems may be much larger than the actual number of items in the table. So, set the numItems to zero, and break out of the loop if the table is already empty. */ if (carousel._itemsTable.numItems === 0) { carousel.set("numItems", 0); break; } n } carousel.fireEvent(<API key>); }, /** * Set focus on the Carousel. * * @method focus * @public */ focus: function () { var carousel = this, first, focusEl, <API key>, itemsTable, last, numVisible, selectOnScroll, selected, selItem; // Don't do anything if the Carousel is not rendered if (!carousel._hasRendered) { return; } if (carousel.isAnimating()) { // this messes up real bad! return; } selItem = carousel.get("selectedItem"); numVisible = carousel.get("numVisible"); selectOnScroll = carousel.get("selectOnScroll"); selected = (selItem >= 0) ? carousel.getItem(selItem) : null; first = carousel.get("firstVisible"); last = first + numVisible - 1; <API key> = (selItem < first || selItem > last); focusEl = (selected && selected.id) ? Dom.get(selected.id) : null; itemsTable = carousel._itemsTable; if (!selectOnScroll && <API key>) { focusEl = (itemsTable && itemsTable.items && itemsTable.items[first]) ? Dom.get(itemsTable.items[first].id) : null; } if (focusEl) { try { focusEl.focus(); } catch (ex) { // ignore focus errors } } carousel.fireEvent(focusEvent); }, /** * Hide the Carousel. * * @method hide * @public */ hide: function () { var carousel = this; if (carousel.fireEvent(beforeHideEvent) !== false) { carousel.removeClass(carousel.CLASSES.VISIBLE); carousel.fireEvent(hideEvent); } }, /** * Initialize the Carousel. * * @method init * @public * @param el {HTMLElement | String} The html element that represents * the Carousel container. * @param attrs {Object} The set of configuration attributes for * creating the Carousel. */ init: function (el, attrs) { var carousel = this, elId = el, // save for a rainy day parse = false, selected; if (!el) { YAHOO.log(el + " is neither an HTML element, nor a string", "error", WidgetName); return; } carousel._hasRendered = false; carousel._navBtns = { prev: [], next: [] }; carousel._pages = { el: null, num: 0, cur: 0 }; carousel._pagination = {}; carousel._itemAttrCache = {}; carousel._itemsTable = { loading: {}, numItems: 0, items: [], size: 0 }; YAHOO.log("Component initialization", WidgetName); if (JS.isString(el)) { el = Dom.get(el); } else if (!el.nodeName) { YAHOO.log(el + " is neither an HTML element, nor a string", "error", WidgetName); return; } Carousel.superclass.init.call(carousel, el, attrs); // check if we're starting somewhere in the middle selected = carousel.get("selectedItem"); if(selected > 0){ carousel.set("firstVisible",<API key>.call(carousel,selected)); } if (el) { if (!el.id) { // in case the HTML element is passed el.setAttribute("id", Dom.generateId()); } parse = carousel._parseCarousel(el); if (!parse) { carousel._createCarousel(elId); } } else { el = carousel._createCarousel(elId); } elId = el.id; carousel.initEvents(); if (parse) { carousel._parseCarouselItems(); } // add the selected class if(selected > 0){ setItemSelection.call(carousel,selected,0); } if (!attrs || typeof attrs.isVertical == "undefined") { carousel.set("isVertical", false); } carousel.<API key>(el); carousel._navEl = carousel.<API key>(); instances[elId] = { object: carousel }; carousel._loadItems(Math.min(carousel.get("firstVisible")+carousel.get("numVisible"),carousel.get("numItems"))-1); }, /** * Initialize the configuration attributes used to create the Carousel. * * @method initAttributes * @public * @param attrs {Object} The set of configuration attributes for * creating the Carousel. */ initAttributes: function (attrs) { var carousel = this; attrs = attrs || {}; Carousel.superclass.initAttributes.call(carousel, attrs); /** * @attribute carouselEl * @description The type of the Carousel element. * @default OL * @type Boolean */ carousel.setAttributeConfig("carouselEl", { validator : JS.isString, value : attrs.carouselEl || "OL" }); /** * @attribute carouselItemEl * @description The type of the list of items within the Carousel. * @default LI * @type Boolean */ carousel.setAttributeConfig("carouselItemEl", { validator : JS.isString, value : attrs.carouselItemEl || "LI" }); /** * @attribute currentPage * @description The current page number (read-only.) * @type Number */ carousel.setAttributeConfig("currentPage", { readOnly : true, value : 0 }); /** * @attribute firstVisible * @description The index to start the Carousel from (indexes begin * from zero) * @default 0 * @type Number */ carousel.setAttributeConfig("firstVisible", { method : carousel._setFirstVisible, validator : carousel.<API key>, value : attrs.firstVisible || carousel.CONFIG.FIRST_VISIBLE }); /** * @attribute selectOnScroll * @description Set this to true to automatically set focus to * follow scrolling in the Carousel. * @default true * @type Boolean */ carousel.setAttributeConfig("selectOnScroll", { validator : JS.isBoolean, value : attrs.selectOnScroll || true }); /** * @attribute numVisible * @description The number of visible items in the Carousel's * viewport. * @default 3 * @type Number */ carousel.setAttributeConfig("numVisible", { setter : carousel._numVisibleSetter, method : carousel._setNumVisible, validator : carousel._validateNumVisible, value : attrs.numVisible || carousel.CONFIG.NUM_VISIBLE }); /** * @attribute numItems * @description The number of items in the Carousel. * @type Number */ carousel.setAttributeConfig("numItems", { method : carousel._setNumItems, validator : carousel._validateNumItems, value : carousel._itemsTable.numItems }); /** * @attribute scrollIncrement * @description The number of items to scroll by for arrow keys. * @default 1 * @type Number */ carousel.setAttributeConfig("scrollIncrement", { validator : carousel.<API key>, value : attrs.scrollIncrement || 1 }); /** * @attribute selectedItem * @description The index of the selected item. * @type Number */ carousel.setAttributeConfig("selectedItem", { setter : carousel._selectedItemSetter, method : carousel._setSelectedItem, validator : JS.isNumber, value : -1 }); /** * @attribute revealAmount * @description The percentage of the item to be revealed on each * side of the Carousel (before and after the first and last item * in the Carousel's viewport.) * @default 0 * @type Number */ carousel.setAttributeConfig("revealAmount", { method : carousel._setRevealAmount, validator : carousel.<API key>, value : attrs.revealAmount || 0 }); /** * @attribute isCircular * @description Set this to true to wrap scrolling of the contents * in the Carousel. * @default false * @type Boolean */ carousel.setAttributeConfig("isCircular", { validator : JS.isBoolean, value : attrs.isCircular || false }); /** * @attribute isVertical * @description True if the orientation of the Carousel is vertical * @default false * @type Boolean */ carousel.setAttributeConfig("isVertical", { method : carousel._setOrientation, validator : JS.isBoolean, value : attrs.isVertical || false }); /** * @attribute navigation * @description The set of navigation controls for Carousel * @default <br> * { prev: null, // the previous navigation element<br> * next: null } // the next navigation element * @type Object */ carousel.setAttributeConfig("navigation", { method : carousel._setNavigation, validator : carousel._validateNavigation, value : attrs.navigation || {prev: null,next: null,page: null} }); /** * @attribute animation * @description The optional animation attributes for the Carousel. * @default <br> * { speed: 0, // the animation speed (in seconds)<br> * effect: null } // the animation effect (like * YAHOO.util.Easing.easeOut) * @type Object */ carousel.setAttributeConfig("animation", { validator : carousel._validateAnimation, value : attrs.animation || { speed: 0, effect: null } }); /** * @attribute autoPlay * @description Set this to time in milli-seconds to have the * Carousel automatically scroll the contents. * @type Number * @deprecated Use autoPlayInterval instead. */ carousel.setAttributeConfig("autoPlay", { validator : JS.isNumber, value : attrs.autoPlay || 0 }); /** * @attribute autoPlayInterval * @description The delay in milli-seconds for scrolling the * Carousel during auto-play. * Note: The startAutoPlay() method needs to be invoked to trigger * automatic scrolling of Carousel. * @type Number */ carousel.setAttributeConfig("autoPlayInterval", { validator : JS.isNumber, value : attrs.autoPlayInterval || 0 }); /** * @attribute numPages * @description The number of pages in the carousel. * @type Number */ carousel.setAttributeConfig("numPages", { readOnly : true, getter : carousel._getNumPages }); /** * @attribute lastVisible * @description The last item visible in the carousel. * @type Number */ carousel.setAttributeConfig("lastVisible", { readOnly : true, getter : carousel._getLastVisible }); }, /** * Initialize and bind the event handlers. * * @method initEvents * @public */ initEvents: function () { var carousel = this, cssClass = carousel.CLASSES, focussedLi; carousel.on("keydown", carousel.<API key>); carousel.on(afterScrollEvent, syncNavigation); carousel.on(itemAddedEvent, syncUi); carousel.on(itemRemovedEvent, syncUi); carousel.on(itemReplacedEvent, syncUi); carousel.on(itemSelectedEvent, function () { if (carousel._hasFocus) { carousel.focus(); } }); carousel.on(loadItemsEvent, syncUi); carousel.on(<API key>, function (ev) { carousel.scrollTo(0); syncNavigation.call(carousel); syncPagerUi.call(carousel); }); carousel.on(pageChangeEvent, syncPagerUi, carousel); carousel.on(renderEvent, function (ev) { if (carousel.get("selectedItem") === null || carousel.get("selectedItem") <= 0) { //in either case carousel.set("selectedItem", carousel.get("firstVisible")); } syncNavigation.call(carousel, ev); syncPagerUi.call(carousel, ev); carousel.<API key>(); carousel.show(); }); carousel.on("selectedItemChange", function (ev) { setItemSelection.call(carousel, ev.newValue, ev.prevValue); if (ev.newValue >= 0) { carousel._updateTabIndex( carousel.getElementForItem(ev.newValue)); } carousel.fireEvent(itemSelectedEvent, ev.newValue); }); carousel.on(uiUpdateEvent, function (ev) { syncNavigation.call(carousel, ev); syncPagerUi.call(carousel, ev); }); carousel.on("firstVisibleChange", function (ev) { if (!carousel.get("selectOnScroll")) { if (ev.newValue >= 0) { carousel._updateTabIndex( carousel.getElementForItem(ev.newValue)); } } }); // Handle item selection on mouse click carousel.on("click", function (ev) { if (carousel.isAutoPlayOn()) { carousel.stopAutoPlay(); } carousel._itemClickHandler(ev); carousel._pagerClickHandler(ev); }); // Restore the focus on the navigation buttons Event.onFocus(carousel.get("element"), function (ev, obj) { var target = Event.getTarget(ev); if (target && target.nodeName.toUpperCase() == "A" && Dom.<API key>(target, cssClass.NAVIGATION)) { if (focussedLi) { Dom.removeClass(focussedLi, cssClass.PAGE_FOCUS); } focussedLi = target.parentNode; Dom.addClass(focussedLi, cssClass.PAGE_FOCUS); } else { if (focussedLi) { Dom.removeClass(focussedLi, cssClass.PAGE_FOCUS); } } obj._hasFocus = true; obj._updateNavButtons(Event.getTarget(ev), true); }, carousel); Event.onBlur(carousel.get("element"), function (ev, obj) { obj._hasFocus = false; obj._updateNavButtons(Event.getTarget(ev), false); }, carousel); }, /** * Return true if the Carousel is still animating, or false otherwise. * * @method isAnimating * @return {Boolean} Return true if animation is still in progress, or * false otherwise. * @public */ isAnimating: function () { return this.<API key>; }, /** * Return true if the auto-scrolling of Carousel is "on", or false * otherwise. * * @method isAutoPlayOn * @return {Boolean} Return true if autoPlay is "on", or false * otherwise. * @public */ isAutoPlayOn: function () { return this.<API key>; }, /** * Return the carouselItemEl at index or null if the index is not * found. * * @method getElementForItem * @param index {Number} The index of the item to be returned * @return {Element} Return the item at index or null if not found * @public */ getElementForItem: function (index) { var carousel = this; if (index < 0 || index >= carousel.get("numItems")) { YAHOO.log("Index out of bounds", "error", WidgetName); return null; } if (carousel._itemsTable.items[index]) { return Dom.get(carousel._itemsTable.items[index].id); } return null; }, /** * Return the carouselItemEl for all items in the Carousel. * * @method getElementForItems * @return {Array} Return all the items * @public */ getElementForItems: function () { var carousel = this, els = [], i; for (i = 0; i < carousel._itemsTable.numItems; i++) { els.push(carousel.getElementForItem(i)); } return els; }, /** * Return the item at index or null if the index is not found. * * @method getItem * @param index {Number} The index of the item to be returned * @return {Object} Return the item at index or null if not found * @public */ getItem: function (index) { var carousel = this; if (index < 0 || index >= carousel.get("numItems")) { YAHOO.log("Index out of bounds", "error", WidgetName); return null; } if (carousel._itemsTable.numItems > index) { if (!JS.isUndefined(carousel._itemsTable.items[index])) { return carousel._itemsTable.items[index]; } } return null; }, /** * Return all items as an array. * * @method getItems * @return {Array} Return all items in the Carousel * @public */ getItems: function () { return this._itemsTable.items; }, /** * Return all loading items as an array. * * @method getLoadingItems * @return {Array} Return all items that are loading in the Carousel. * @public */ getLoadingItems: function () { return this._itemsTable.loading; }, /** * For a multirow carousel, return the number of rows specified by user. * * @method getItems * @return {Number} Number of rows * @public */ getRows: function () { return this._rows; }, /** * For a multirow carousel, return the number of cols specified by user. * * @method getItems * @return {Array} Return all items in the Carousel * @public */ getCols: function () { return this._cols; }, /** * Return the position of the Carousel item that has the id "id", or -1 * if the id is not found. * * @method getItemPositionById * @param index {Number} The index of the item to be returned * @public */ getItemPositionById: function (id) { var carousel = this, n = carousel.get("numItems"), i = 0, items = carousel._itemsTable.items, item; while (i < n) { item = items[i] || {}; if(item.id == id) { return i; } i++; } return -1; }, /** * Return all visible items as an array. * * @method getVisibleItems * @return {Array} The array of visible items * @public */ getVisibleItems: function () { var carousel = this, i = carousel.get("firstVisible"), n = i + carousel.get("numVisible"), r = []; while (i < n) { r.push(carousel.getElementForItem(i)); i++; } return r; }, /** * Remove an item at index from the Carousel. * * @method removeItem * @public * @param index {Number} The position to where in the list (starts from * zero). * @return {Boolean} Return true on success, false otherwise */ removeItem: function (index) { var carousel = this, item, num = carousel.get("numItems"); if (index < 0 || index >= num) { YAHOO.log("Index out of bounds", "error", WidgetName); return false; } item = carousel._itemsTable.items.splice(index, 1); if (item && item.length == 1) { carousel._itemsTable.numItems carousel.set("numItems", num - 1); carousel.fireEvent(itemRemovedEvent, { item: item[0], pos: index, ev: itemRemovedEvent }); return true; } return false; }, /** * Replace an item at index witin Carousel. * * @method replaceItem * @public * @param item {String | Object | HTMLElement} The item to be appended * to the Carousel. If the parameter is a string, it is assumed to be * the content of the newly created item. If the parameter is an * object, it is assumed to supply the content and an optional class * and an optional id of the newly created item. * @param index {Number} The position to where in the list (starts from * zero). * @return {Boolean} Return true on success, false otherwise */ replaceItem: function (item, index) { var carousel = this, className, content, elId, numItems = carousel.get("numItems"), oel, el = item; if (!item) { return false; } if (JS.isString(item) || item.nodeName) { content = item.nodeName ? item.innerHTML : item; } else if (JS.isObject(item)) { content = item.content; } else { YAHOO.log("Invalid argument to replaceItem", "error", WidgetName); return false; } if (JS.isUndefined(index)) { YAHOO.log("Index must be defined for replaceItem", "error", WidgetName); return false; } else { if (index < 0 || index >= numItems) { YAHOO.log("Index out of bounds in replaceItem", "error", WidgetName); return false; } oel = carousel._itemsTable.items[index]; if(!oel){ oel = carousel._itemsTable.loading[index]; carousel._itemsTable.items[index] = undefined; } carousel._itemsTable.items.splice(index, 1, { item : content, className : item.className || "", id : Dom.generateId() }); el = carousel._itemsTable.items[index]; } carousel.fireEvent(itemReplacedEvent, { newItem: el, oldItem: oel, pos: index, ev: itemReplacedEvent }); return true; }, /** * Replace multiple items at specified indexes. * NOTE: item at index must already exist. * * @method replaceItems * @public * @param items {Array} An array containing an array of replacement items each linked to the * index where the substitution should take place. * E.g. [[{content:'<img/>'}, index1], [{content:'<img/>'}, index2]] * @return {Boolean} Return true on success, false otherwise */ replaceItems: function (items) { var i, n, rv = true; if (!JS.isArray(items)) { return false; } for (i = 0, n = items.length; i < n; i++) { if (this.replaceItem(items[i][0], items[i][1]) === false) { rv = false; } } return rv; }, /** * Render the Carousel. * * @method render * @public * @param appendTo {HTMLElement | String} The element to which the * Carousel should be appended prior to rendering. * @return {Boolean} Status of the operation */ render: function (appendTo) { var carousel = this, cssClass = carousel.CLASSES, rows = carousel._rows; carousel.addClass(cssClass.CAROUSEL); if (!carousel._clipEl) { carousel._clipEl = carousel._createCarouselClip(); carousel._clipEl.appendChild(carousel._carouselEl); } if (appendTo) { carousel.appendChild(carousel._clipEl); carousel.appendTo(appendTo); } else { if (!Dom.inDocument(carousel.get("element"))) { YAHOO.log("Nothing to render. The container should be " + "within the document if appendTo is not " + "specified", "error", WidgetName); return false; } carousel.appendChild(carousel._clipEl); } if (rows) { Dom.addClass(carousel._clipEl, cssClass.MULTI_ROW); } if (carousel.get("isVertical")) { carousel.addClass(cssClass.VERTICAL); } else { carousel.addClass(cssClass.HORIZONTAL); } if (carousel.get("numItems") < 1) { YAHOO.log("No items in the Carousel to render", "warn", WidgetName); return false; } carousel._refreshUi(); return true; }, /** * Scroll the Carousel by an item backward. * * @method scrollBackward * @public */ scrollBackward: function () { var carousel = this; carousel.scrollTo(carousel._firstItem - carousel.get("scrollIncrement")); }, /** * Scroll the Carousel by an item forward. * * @method scrollForward * @public */ scrollForward: function () { var carousel = this; carousel.scrollTo(carousel._firstItem + carousel.get("scrollIncrement")); }, /** * Scroll the Carousel by a page backward. * * @method scrollPageBackward * @public */ scrollPageBackward: function () { var carousel = this, isVertical = carousel.get("isVertical"), cols = carousel._cols, item = carousel._firstItem - carousel.get("numVisible"); if (item < 0) { // only account for multi-row when scrolling backwards from item 0 if (cols) { item = carousel._firstItem - cols; } } if (carousel.get("selectOnScroll")) { carousel._selectedItem = carousel._getSelectedItem(item); } carousel.scrollTo(item); }, /** * Scroll the Carousel by a page forward. * * @method scrollPageForward * @public */ scrollPageForward: function () { var carousel = this, item = carousel._firstItem + carousel.get("numVisible"); if (item > carousel.get("numItems")) { item = 0; } if (carousel.get("selectOnScroll")) { carousel._selectedItem = carousel._getSelectedItem(item); } carousel.scrollTo(item); }, /** * Scroll the Carousel to make the item the first visible item. * * @method scrollTo * @public * @param item Number The index of the element to position at. * @param dontSelect Boolean True if select should be avoided */ scrollTo: function (item, dontSelect) { var carousel = this, animate, animCfg, isCircular, isVertical, rows, delta, direction, firstItem, lastItem, itemsPerRow, itemsPerCol, numItems, numPerPage, offset, page, rv, sentinel, index, stopAutoScroll, itemsTable = carousel._itemsTable, items = itemsTable.items, loading = itemsTable.loading; if (JS.isUndefined(item) || item == carousel._firstItem || carousel.isAnimating()) { return; // nothing to do! } animCfg = carousel.get("animation"); isCircular = carousel.get("isCircular"); isVertical = carousel.get("isVertical"); itemsPerRow = carousel._cols; itemsPerCol = carousel._rows; firstItem = carousel._firstItem; numItems = carousel.get("numItems"); numPerPage = carousel.get("numVisible"); page = carousel.get("currentPage"); stopAutoScroll = function () { if (carousel.isAutoPlayOn()) { carousel.stopAutoPlay(); } }; if (item < 0) { if (isCircular) { item = numItems + item; } else { stopAutoScroll.call(carousel); return; } } else if (numItems > 0 && item > numItems - 1) { if (carousel.get("isCircular")) { item = numItems - item; } else { stopAutoScroll.call(carousel); return; } } if (isNaN(item)) { return; } direction = (carousel._firstItem > item) ? "backward" : "forward"; sentinel = firstItem + numPerPage; sentinel = (sentinel > numItems - 1) ? numItems - 1 : sentinel; rv = carousel.fireEvent(beforeScrollEvent, { dir: direction, first: firstItem, last: sentinel }); if (rv === false) { // scrolling is prevented return; } carousel.fireEvent(<API key>, { page: page }); // call loaditems to check if we have all the items to display lastItem = item + numPerPage - 1; carousel._loadItems(lastItem > numItems-1 ? numItems-1 : lastItem); // Calculate the delta relative to the first item, the delta is // always negative. delta = 0 - item; if (itemsPerCol) { // offset calculations for multirow Carousel if (isVertical) { delta = parseInt(delta / itemsPerRow, 10); } else { delta = parseInt(delta / itemsPerCol, 10); } } // adjust for items not yet loaded index = 0; while (delta < 0 && index < item+numPerPage-1 && index < numItems) { if (!items[index] && !loading[index]) { delta++; } index += itemsPerCol ? itemsPerCol : 1; } carousel._firstItem = item; carousel.set("firstVisible", item); YAHOO.log("Scrolling to " + item + " delta = " + delta, WidgetName); sentinel = item + numPerPage; sentinel = (sentinel > numItems - 1) ? numItems - 1 : sentinel; offset = getScrollOffset.call(carousel, delta); YAHOO.log("Scroll offset = " + offset, WidgetName); animate = animCfg.speed > 0; if (animate) { carousel.<API key>(offset, item, sentinel, dontSelect); } else { carousel._setCarouselOffset(offset); <API key>.call(carousel, item, sentinel); } }, /** * Get the page an item is on within carousel. * * @method getPageForItem * @public * @param index {Number} Index of item * @return {Number} Page item is on */ getPageForItem : function(item) { return Math.ceil( (item+1) / parseInt(this.get("numVisible"),10) ); }, /** * Get the first visible item's index on any given page. * * @method <API key> * @public * @param page {Number} Page * @return {Number} First item's index */ <API key> : function(page) { return (page - 1) * this.get("numVisible"); }, /** * Select the previous item in the Carousel. * * @method selectPreviousItem * @public */ selectPreviousItem: function () { var carousel = this, newpos = 0, selected = carousel.get("selectedItem"); if (selected == this._firstItem) { newpos = selected - carousel.get("numVisible"); carousel._selectedItem = carousel._getSelectedItem(selected-1); carousel.scrollTo(newpos); } else { newpos = carousel.get("selectedItem") - carousel.get("scrollIncrement"); carousel.set("selectedItem",carousel._getSelectedItem(newpos)); } }, /** * Select the next item in the Carousel. * * @method selectNextItem * @public */ selectNextItem: function () { var carousel = this, newpos = 0; newpos = carousel.get("selectedItem") + carousel.get("scrollIncrement"); carousel.set("selectedItem", carousel._getSelectedItem(newpos)); }, /** * Display the Carousel. * * @method show * @public */ show: function () { var carousel = this, cssClass = carousel.CLASSES; if (carousel.fireEvent(beforeShowEvent) !== false) { carousel.addClass(cssClass.VISIBLE); carousel.fireEvent(showEvent); } }, /** * Start auto-playing the Carousel. * * @method startAutoPlay * @public */ startAutoPlay: function () { var carousel = this, timer; if (JS.isUndefined(carousel._autoPlayTimer)) { timer = carousel.get("autoPlayInterval"); if (timer <= 0) { return; } carousel.<API key> = true; carousel.fireEvent(startAutoPlayEvent); carousel._autoPlayTimer = setTimeout(function () { carousel._autoScroll(); }, timer); } }, /** * Stop auto-playing the Carousel. * * @method stopAutoPlay * @public */ stopAutoPlay: function () { var carousel = this; if (!JS.isUndefined(carousel._autoPlayTimer)) { clearTimeout(carousel._autoPlayTimer); delete carousel._autoPlayTimer; carousel.<API key> = false; carousel.fireEvent(stopAutoPlayEvent); } }, /** * Update interface's pagination data within a registered template. * * @method updatePagination * @public */ updatePagination: function () { var carousel = this, pagination = carousel._pagination; if(!pagination.el){ return false; } var numItems = carousel.get('numItems'), numVisible = carousel.get('numVisible'), firstVisible = carousel.get('firstVisible')+1, currentPage = carousel.get('currentPage')+1, numPages = carousel.get('numPages'), replacements = { 'numVisible' : numVisible, 'numPages' : numPages, 'numItems' : numItems, 'selectedItem' : carousel.get('selectedItem')+1, 'currentPage' : currentPage, 'firstVisible' : firstVisible, 'lastVisible' : carousel.get("lastVisible")+1 }, cb = pagination.callback || {}, scope = cb.scope && cb.obj ? cb.obj : carousel; pagination.el.innerHTML = JS.isFunction(cb.fn) ? cb.fn.apply(scope, [pagination.template, replacements]) : YAHOO.lang.substitute(pagination.template, replacements); }, /** * Register carousels pagination template, append to interface, and populate. * * @method registerPagination * @param template {String} Pagination template as passed to lang.substitute * @public */ registerPagination: function (tpl, pos, cb) { var carousel = this; carousel._pagination.template = tpl; carousel._pagination.callback = cb || {}; if(!carousel._pagination.el){ carousel._pagination.el = createElement('DIV', {className:carousel.CLASSES.PAGINATION}); if(pos == "before"){ carousel._navEl.insertBefore(carousel._pagination.el, carousel._navEl.firstChild); } else { carousel._navEl.appendChild(carousel._pagination.el); } carousel.on('itemSelected', carousel.updatePagination); carousel.on('pageChange', carousel.updatePagination); } carousel.updatePagination(); }, /** * Return the string representation of the Carousel. * * @method toString * @public * @return {String} */ toString: function () { return WidgetName + (this.get ? " (#" + this.get("id") + ")" : ""); }, /* * Protected methods of the Carousel component */ /** * Set the Carousel offset to the passed offset after animating. * * @method <API key> * @param {Integer} offset The offset to which the Carousel has to be * scrolled to. * @param {Integer} item The index to which the Carousel will scroll. * @param {Integer} sentinel The last element in the view port. * @protected */ <API key>: function (offset, item, sentinel) { var carousel = this, animCfg = carousel.get("animation"), animObj = null; if (carousel.get("isVertical")) { animObj = new YAHOO.util.Motion(carousel._carouselEl, { top: { to: offset } }, animCfg.speed, animCfg.effect); } else { animObj = new YAHOO.util.Motion(carousel._carouselEl, { left: { to: offset } }, animCfg.speed, animCfg.effect); } carousel.<API key> = true; animObj.onComplete.subscribe(carousel.<API key>, { scope: carousel, item: item, last: sentinel }); animObj.animate(); }, /** * Handle the animation complete event. * * @method <API key> * @param {Event} ev The event. * @param {Array} p The event parameters. * @param {Object} o The object that has the state of the Carousel * @protected */ <API key>: function (ev, p, o) { o.scope.<API key> = false; <API key>.call(o.scope, o.item, o.last); }, /** * Automatically scroll the contents of the Carousel. * @method _autoScroll * @protected */ _autoScroll: function() { var carousel = this, currIndex = carousel._firstItem, index; if (currIndex >= carousel.get("numItems") - 1) { if (carousel.get("isCircular")) { index = 0; } else { carousel.stopAutoPlay(); } } else { index = currIndex + carousel.get("numVisible"); } carousel._selectedItem = carousel._getSelectedItem(index); carousel.scrollTo.call(carousel, index); }, /** * Create the Carousel. * * @method createCarousel * @param elId {String} The id of the element to be created * @protected */ _createCarousel: function (elId) { var carousel = this, cssClass = carousel.CLASSES, el = Dom.get(elId); if (!el) { el = createElement("DIV", { className : cssClass.CAROUSEL, id : elId }); } if (!carousel._carouselEl) { carousel._carouselEl=createElement(carousel.get("carouselEl"), { className: cssClass.CAROUSEL_EL }); } return el; }, /** * Create the Carousel clip container. * * @method createCarouselClip * @protected */ _createCarouselClip: function () { return createElement("DIV", { className: this.CLASSES.CONTENT }); }, /** * Create the Carousel item. * * @method createCarouselItem * @param obj {Object} The attributes of the element to be created * @protected */ _createCarouselItem: function (obj) { var attr, carousel = this, styles = <API key>.call(carousel, obj.pos); return createElement(carousel.get("carouselItemEl"), { className : obj.className, styles : obj.styles, content : obj.content, id : obj.id }); }, /** * Return a valid item for a possibly out of bounds index considering * the isCircular property. * * @method _getValidIndex * @param index {Number} The index of the item to be returned * @return {Object} Return a valid item index * @protected */ _getValidIndex: function (index) { var carousel = this, isCircular = carousel.get("isCircular"), numItems = carousel.get("numItems"), numVisible = carousel.get("numVisible"), sentinel = numItems - 1; if (index < 0) { index = isCircular ? Math.ceil(numItems/numVisible)*numVisible + index : 0; } else if (index > sentinel) { index = isCircular ? 0 : sentinel; } return index; }, /** * Get the value for the selected item. * * @method _getSelectedItem * @param val {Number} The new value for "selected" item * @return {Number} The new value that would be set * @protected */ _getSelectedItem: function (val) { var carousel = this, isCircular = carousel.get("isCircular"), numItems = carousel.get("numItems"), sentinel = numItems - 1; if (val < 0) { if (isCircular) { val = numItems + val; } else { val = carousel.get("selectedItem"); } } else if (val > sentinel) { if (isCircular) { val = val - numItems; } else { val = carousel.get("selectedItem"); } } return val; }, /** * The "click" handler for the item. * * @method _itemClickHandler * @param {Event} ev The event object * @protected */ _itemClickHandler: function (ev) { var carousel = this, carouselItem = carousel.get("carouselItemEl"), container = carousel.get("element"), el, item, target = Event.getTarget(ev), tag = target.tagName.toUpperCase(); if(tag === "INPUT" || tag === "SELECT" || tag === "TEXTAREA") { return; } while (target && target != container && target.id != carousel._carouselEl) { el = target.nodeName; if (el.toUpperCase() == carouselItem) { break; } target = target.parentNode; } if ((item = carousel.getItemPositionById(target.id)) >= 0) { YAHOO.log("Setting selection to " + item, WidgetName); carousel.set("selectedItem", carousel._getSelectedItem(item)); carousel.focus(); } }, /** * The keyboard event handler for Carousel. * * @method <API key> * @param ev {Event} The event that is being handled. * @protected */ <API key>: function (ev) { var carousel = this, key = Event.getCharCode(ev), target = Event.getTarget(ev), prevent = false; // do not mess while animation is in progress or naving via select if (carousel.isAnimating() || target.tagName.toUpperCase() === "SELECT") { return; } switch (key) { case 0x25: // left arrow case 0x26: // up arrow carousel.selectPreviousItem(); prevent = true; break; case 0x27: // right arrow case 0x28: // down arrow carousel.selectNextItem(); prevent = true; break; case 0x21: // page-up carousel.scrollPageBackward(); prevent = true; break; case 0x22: // page-down carousel.scrollPageForward(); prevent = true; break; } if (prevent) { if (carousel.isAutoPlayOn()) { carousel.stopAutoPlay(); } Event.preventDefault(ev); } }, /** * The load the required set of items that are needed for display. * * @method _loadItems * @protected */ _loadItems: function(last) { var carousel = this, numItems = carousel.get("numItems"), numVisible = carousel.get("numVisible"), reveal = carousel.get("revealAmount"), first = carousel._itemsTable.items.length, lastVisible = carousel.get("lastVisible"); // adjust if going backwards if(first > last && last+1 >= numVisible){ // need to get first a bit differently for the last page first = last % numVisible || last == lastVisible ? last - last % numVisible : last - numVisible + 1; } if(reveal && last < numItems - 1){ last++; } if (last >= first && (!carousel.getItem(first) || !carousel.getItem(last))) { carousel.fireEvent(loadItemsEvent, { ev: loadItemsEvent, first: first, last: last, num: last - first + 1 }); } }, /** * The "onchange" handler for select box pagination. * * @method _pagerChangeHandler * @param {Event} ev The event object * @protected */ _pagerChangeHandler: function (ev) { var carousel = this, target = Event.getTarget(ev), page = target.value, item; if (page) { item = carousel.<API key>(page); carousel._selectedItem = item; carousel.scrollTo(item); carousel.focus(); } }, /** * The "click" handler for anchor pagination. * * @method _pagerClickHandler * @param {Event} ev The event object * @protected */ _pagerClickHandler: function (ev) { var carousel = this, css = carousel.CLASSES, target = Event.getTarget(ev), elNode = target.nodeName.toUpperCase(), val, stringIndex, page, item; if (Dom.hasClass(target, css.PAGER_ITEM) || Dom.hasClass(target.parentNode, css.PAGER_ITEM)) { if (elNode == "EM") { target = target.parentNode;// item is an em and not an anchor (when text is visible) } val = target.href; stringIndex = val.lastIndexOf(" page = parseInt(val.substring(stringIndex+1), 10); if (page != -1) { item = carousel.<API key>(page); carousel._selectedItem = item; carousel.scrollTo(item); carousel.focus(); } Event.preventDefault(ev); } }, /** * Find the Carousel within a container. The Carousel is identified by * the first element that matches the carousel element tag or the * element that has the Carousel class. * * @method parseCarousel * @param parent {HTMLElement} The parent element to look under * @return {Boolean} True if Carousel is found, false otherwise * @protected */ _parseCarousel: function (parent) { var carousel = this, child, cssClass, domEl, found, node; cssClass = carousel.CLASSES; domEl = carousel.get("carouselEl"); found = false; for (child = parent.firstChild; child; child = child.nextSibling) { if (child.nodeType == 1) { node = child.nodeName; if (node.toUpperCase() == domEl) { carousel._carouselEl = child; Dom.addClass(carousel._carouselEl, carousel.CLASSES.CAROUSEL_EL); YAHOO.log("Found Carousel - " + node + (child.id ? " (#" + child.id + ")" : ""), WidgetName); found = true; } } } return found; }, /** * Find the items within the Carousel and add them to the items table. * A Carousel item is identified by elements that matches the carousel * item element tag. * * @method parseCarouselItems * @protected */ _parseCarouselItems: function () { var carousel = this, cssClass = carousel.CLASSES, i=0, rows, child, domItemEl, elId, node, index = carousel.get("firstVisible"), parent = carousel._carouselEl; rows = carousel._rows; domItemEl = carousel.get("carouselItemEl"); for (child = parent.firstChild; child; child = child.nextSibling) { if (child.nodeType == 1) { node = child.nodeName; if (node.toUpperCase() == domItemEl) { if (child.id) { elId = child.id; } else { elId = Dom.generateId(); child.setAttribute("id", elId); } carousel.addItem(child,index); index++; } } } }, /** * Find the Carousel navigation within a container. The navigation * elements need to match the carousel navigation class names. * * @method <API key> * @param parent {HTMLElement} The parent element to look under * @return {Boolean} True if at least one is found, false otherwise * @protected */ <API key>: function (parent) { var carousel = this, cfg, cssClass = carousel.CLASSES, el, i, j, nav, rv = false; nav = Dom.<API key>(cssClass.PREV_PAGE, "*", parent); if (nav.length > 0) { for (i in nav) { if (nav.hasOwnProperty(i)) { el = nav[i]; YAHOO.log("Found Carousel previous page navigation - " + el + (el.id ? " (#" + el.id + ")" : ""), WidgetName); if (el.nodeName == "INPUT" || el.nodeName == "BUTTON" || el.nodeName == "A") {// Anchor support in Nav (for SEO) carousel._navBtns.prev.push(el); } else { j = el.<API key>("INPUT"); if (JS.isArray(j) && j.length > 0) { carousel._navBtns.prev.push(j[0]); } else { j = el.<API key>("BUTTON"); if (JS.isArray(j) && j.length > 0) { carousel._navBtns.prev.push(j[0]); } } } } } cfg = { prev: nav }; } nav = Dom.<API key>(cssClass.NEXT_PAGE, "*", parent); if (nav.length > 0) { for (i in nav) { if (nav.hasOwnProperty(i)) { el = nav[i]; YAHOO.log("Found Carousel next page navigation - " + el + (el.id ? " (#" + el.id + ")" : ""), WidgetName); if (el.nodeName == "INPUT" || el.nodeName == "BUTTON" || el.nodeName == "A") {// Anchor support in Nav (for SEO) carousel._navBtns.next.push(el); } else { j = el.<API key>("INPUT"); if (JS.isArray(j) && j.length > 0) { carousel._navBtns.next.push(j[0]); } else { j = el.<API key>("BUTTON"); if (JS.isArray(j) && j.length > 0) { carousel._navBtns.next.push(j[0]); } } } } } if (cfg) { cfg.next = nav; } else { cfg = { next: nav }; } } if (cfg) { carousel.set("navigation", cfg); rv = true; } return rv; }, /** * Refresh the widget UI if it is not already rendered, on first item * addition. * * @method _refreshUi * @protected */ _refreshUi: function () { var carousel = this, i, isVertical = carousel.get("isVertical"), firstVisible = carousel.get("firstVisible"), item, n, rsz, sz; if (carousel._itemsTable.numItems < 1) { return; } sz = getCarouselItemSize.call(carousel, isVertical ? "height" : "width"); // This fixes the widget to auto-adjust height/width for absolute // positioned children. item = carousel._itemsTable.items[firstVisible].id; sz = isVertical ? getStyle(item, "width") : getStyle(item, "height"); Dom.setStyle(carousel._carouselEl, isVertical ? "width" : "height", sz + "px"); // Set the rendered state appropriately. carousel._hasRendered = true; carousel.fireEvent(renderEvent); }, /** * Set the Carousel offset to the passed offset. * * @method _setCarouselOffset * @protected */ _setCarouselOffset: function (offset) { var carousel = this, which; which = carousel.get("isVertical") ? "top" : "left"; Dom.setStyle(carousel._carouselEl, which, offset + "px"); }, /** * Setup/Create the Carousel navigation element (if needed). * * @method <API key> * @protected */ <API key>: function () { var carousel = this, btn, cfg, cssClass, nav, navContainer, nextButton, prevButton; cssClass = carousel.CLASSES; // TODO: can the _navBtns be tested against instead? navContainer = Dom.<API key>(cssClass.NAVIGATION, "DIV", carousel.get("element")); if (navContainer.length === 0) { navContainer = createElement("DIV", { className: cssClass.NAVIGATION }); carousel.insertBefore(navContainer, Dom.getFirstChild(carousel.get("element"))); } else { navContainer = navContainer[0]; } carousel._pages.el = createElement("UL"); navContainer.appendChild(carousel._pages.el); nav = carousel.get("navigation"); if (JS.isString(nav.prev) || JS.isArray(nav.prev)) { if (JS.isString(nav.prev)) { nav.prev = [nav.prev]; } for (btn in nav.prev) { if (nav.prev.hasOwnProperty(btn)) { carousel._navBtns.prev.push(Dom.get(nav.prev[btn])); } } } else { // TODO: separate method for creating a navigation button prevButton = createElement("SPAN", { className: cssClass.BUTTON + cssClass.FIRST_NAV }); // XXX: for IE 6.x Dom.setStyle(prevButton, "visibility", "visible"); btn = Dom.generateId(); prevButton.innerHTML = "<button type=\"button\" " + "id=\"" + btn + "\" name=\"" + carousel.STRINGS.<API key> + "\">" + carousel.STRINGS.<API key> + "</button>"; navContainer.appendChild(prevButton); btn = Dom.get(btn); carousel._navBtns.prev = [btn]; cfg = { prev: [prevButton] }; } if (JS.isString(nav.next) || JS.isArray(nav.next)) { if (JS.isString(nav.next)) { nav.next = [nav.next]; } for (btn in nav.next) { if (nav.next.hasOwnProperty(btn)) { carousel._navBtns.next.push(Dom.get(nav.next[btn])); } } } else { // TODO: separate method for creating a navigation button nextButton = createElement("SPAN", { className: cssClass.BUTTON + cssClass.NEXT_NAV }); // XXX: for IE 6.x Dom.setStyle(nextButton, "visibility", "visible"); btn = Dom.generateId(); nextButton.innerHTML = "<button type=\"button\" " + "id=\"" + btn + "\" name=\"" + carousel.STRINGS.NEXT_BUTTON_TEXT + "\">" + carousel.STRINGS.NEXT_BUTTON_TEXT + "</button>"; navContainer.appendChild(nextButton); btn = Dom.get(btn); carousel._navBtns.next = [btn]; if (cfg) { cfg.next = [nextButton]; } else { cfg = { next: [nextButton] }; } } if (cfg) { carousel.set("navigation", cfg); } return navContainer; }, /** * Set the clip container size (based on the new numVisible value). * * @method <API key> * @param clip {HTMLElement} The clip container element. * @param num {Number} optional The number of items per page. * @protected */ <API key>: function (clip, num) { var carousel = this, isVertical = carousel.get("isVertical"), rows = carousel._rows, cols = carousel._cols, reveal = carousel.get("revealAmount"), itemHeight = getCarouselItemSize.call(carousel, "height"), itemWidth = getCarouselItemSize.call(carousel, "width"), containerHeight, containerWidth; clip = clip || carousel._clipEl; if (rows) { containerHeight = itemHeight * rows; containerWidth = itemWidth * cols; } else { num = num || carousel.get("numVisible"); if (isVertical) { containerHeight = itemHeight * num; } else { containerWidth = itemWidth * num; } } // TODO: try to re-use the _hasRendered indicator carousel._recomputeSize = (containerHeight === 0); // bleh! if (carousel._recomputeSize) { carousel._hasRendered = false; return; // no use going further, bail out! } reveal = getRevealSize.call(carousel); if (isVertical) { containerHeight += (reveal * 2); } else { containerWidth += (reveal * 2); } if (isVertical) { containerHeight += getDimensions(carousel._carouselEl,"height"); Dom.setStyle(clip, "height", containerHeight + "px"); // For multi-row Carousel if (cols) { containerWidth += getDimensions(carousel._carouselEl, "width"); Dom.setStyle(clip, "width", containerWidth + (0) + "px"); } } else { containerWidth += getDimensions(carousel._carouselEl, "width"); Dom.setStyle(clip, "width", containerWidth + "px"); // For multi-row Carousel if (rows) { containerHeight += getDimensions(carousel._carouselEl, "height"); Dom.setStyle(clip, "height", containerHeight + "px"); } } carousel._setContainerSize(clip); // adjust the container size too }, /** * Set the container size. * * @method _setContainerSize * @param clip {HTMLElement} The clip container element. * @param attr {String} Either set the height or width. * @protected */ _setContainerSize: function (clip, attr) { var carousel = this, config = carousel.CONFIG, cssClass = carousel.CLASSES, isVertical, rows, cols, size; isVertical = carousel.get("isVertical"); rows = carousel._rows; cols = carousel._cols; clip = clip || carousel._clipEl; attr = attr || (isVertical ? "height" : "width"); size = parseFloat(Dom.getStyle(clip, attr), 10); size = JS.isNumber(size) ? size : 0; if (isVertical) { size += getDimensions(carousel._carouselEl, "height") + getStyle(carousel._navEl, "height"); } else { size += getDimensions(carousel._carouselEl, "width"); } if (!isVertical) { if (size < config.HORZ_MIN_WIDTH) { size = config.HORZ_MIN_WIDTH; carousel.addClass(cssClass.MIN_WIDTH); } } carousel.setStyle(attr, size + "px"); // Additionally the width of the container should be set for // the vertical Carousel if (isVertical) { size = getCarouselItemSize.call(carousel, "width"); if(cols) { size = size * cols; } Dom.setStyle(carousel._carouselEl, "width", size + "px");// Bug fix for vertical carousel (goes in conjunction with .<API key> {... 3200px removed from styles), and allows for multirows in IEs). if (size < config.VERT_MIN_WIDTH) { size = config.VERT_MIN_WIDTH; carousel.addClass(cssClass.MIN_WIDTH);// set a min width on vertical carousel, don't see why this shouldn't always be set... } carousel.setStyle("width", size + "px"); } else { if(rows) { size = getCarouselItemSize.call(carousel, "height"); size = size * rows; Dom.setStyle(carousel._carouselEl, "height", size + "px"); } } }, /** * Set the value for the Carousel's first visible item. * * @method _setFirstVisible * @param val {Number} The new value for firstVisible * @return {Number} The new value that would be set * @protected */ _setFirstVisible: function (val) { var carousel = this; if (val >= 0 && val < carousel.get("numItems")) { carousel.scrollTo(val); } else { val = carousel.get("firstVisible"); } return val; }, /** * Set the value for the Carousel's navigation. * * @method _setNavigation * @param cfg {Object} The navigation configuration * @return {Object} The new value that would be set * @protected */ _setNavigation: function (cfg) { var carousel = this; if (cfg.prev) { Event.on(cfg.prev, "click", scrollPageBackward, carousel); } if (cfg.next) { Event.on(cfg.next, "click", scrollPageForward, carousel); } }, /** * Clip the container size every time numVisible is set. * * @method _setNumVisible * @param val {Number} The new value for numVisible * @return {Number} The new value that would be set * @protected */ _setNumVisible: function (val) { // TODO: _setNumVisible should just be reserved for setting numVisible. var carousel = this; carousel.<API key>(carousel._clipEl, val); }, /** * Set the value for the number of visible items in the Carousel. * * @method _numVisibleSetter * @param val {Number} The new value for numVisible * @return {Number} The new value that would be set * @protected */ _numVisibleSetter: function (val) { var carousel = this, numVisible = val; if(JS.isArray(val)) { carousel._cols = val[0]; carousel._rows = val[1]; numVisible = val[0] * val[1]; } return numVisible; }, /** * Set the value for selectedItem. * * @method _selectedItemSetter * @param val {Number} The new value for selectedItem * @return {Number} The new value that would be set * @protected */ _selectedItemSetter: function (val) { var carousel = this; return (val < carousel.get("numItems")) ? val : 0; }, /** * Set the number of items in the Carousel. * Warning: Setting this to a lower number than the current removes * items from the end. * * @method _setNumItems * @param val {Number} The new value for numItems * @return {Number} The new value that would be set * @protected */ _setNumItems: function (val) { var carousel = this, num = carousel._itemsTable.numItems; if (JS.isArray(carousel._itemsTable.items)) { if (carousel._itemsTable.items.length != num) { // out of sync num = carousel._itemsTable.items.length; carousel._itemsTable.numItems = num; } } if (val < num) { while (num > val) { carousel.removeItem(num - 1); num } } return val; }, /** * Set the orientation of the Carousel. * * @method _setOrientation * @param val {Boolean} The new value for isVertical * @return {Boolean} The new value that would be set * @protected */ _setOrientation: function (val) { var carousel = this, cssClass = carousel.CLASSES; if (val) { carousel.replaceClass(cssClass.HORIZONTAL, cssClass.VERTICAL); } else { carousel.replaceClass(cssClass.VERTICAL, cssClass.HORIZONTAL); } this._itemAttrCache = {}; // force recomputed next time return val; }, /** * Set the value for the reveal amount percentage in the Carousel. * * @method _setRevealAmount * @param val {Number} The new value for revealAmount * @return {Number} The new value that would be set * @protected */ _setRevealAmount: function (val) { var carousel = this; if (val >= 0 && val <= 100) { val = parseInt(val, 10); val = JS.isNumber(val) ? val : 0; carousel.<API key>(); } else { val = carousel.get("revealAmount"); } return val; }, /** * Set the value for the selected item. * * @method _setSelectedItem * @param val {Number} The new value for "selected" item * @protected */ _setSelectedItem: function (val) { this._selectedItem = val; }, /** * Get the total number of pages. * * @method _getNumPages * @protected */ _getNumPages: function () { return Math.ceil( parseInt(this.get("numItems"),10) / parseInt(this.get("numVisible"),10) ); }, /** * Get the index of the last visible item * * @method _getLastVisible * @protected */ _getLastVisible: function () { var carousel = this; return carousel.get("currentPage") + 1 == carousel.get("numPages") ? carousel.get("numItems") - 1: carousel.get("firstVisible") + carousel.get("numVisible") - 1; }, /** * Synchronize and redraw the UI after an item is added. * * @method _syncUiForItemAdd * @protected */ _syncUiForItemAdd: function (obj) { var attr, carousel = this, carouselEl = carousel._carouselEl, el, item, itemsTable = carousel._itemsTable, oel, pos, sibling, styles; pos = JS.isUndefined(obj.pos) ? obj.newPos || itemsTable.numItems - 1 : obj.pos; if (!oel) { item = itemsTable.items[pos] || {}; el = carousel._createCarouselItem({ className : item.className, styles : item.styles, content : item.item, id : item.id, pos : pos }); if (JS.isUndefined(obj.pos)) { if (!JS.isUndefined(itemsTable.loading[pos])) { oel = itemsTable.loading[pos]; // if oel is null, it is a problem ... } if (oel) { // replace the node carouselEl.replaceChild(el, oel); // ... and remove the item from the data structure delete itemsTable.loading[pos]; } else { carouselEl.appendChild(el); } } else { if (!JS.isUndefined(itemsTable.items[obj.pos + 1])) { sibling = Dom.get(itemsTable.items[obj.pos + 1].id); } if (sibling) { carouselEl.insertBefore(el, sibling); } else { YAHOO.log("Unable to find sibling","error",WidgetName); } } } else { if (JS.isUndefined(obj.pos)) { if (!Dom.isAncestor(carousel._carouselEl, oel)) { carouselEl.appendChild(oel); } } else { if (!Dom.isAncestor(carouselEl, oel)) { if (!JS.isUndefined(itemsTable.items[obj.pos + 1])) { carouselEl.insertBefore(oel, Dom.get(itemsTable.items[obj.pos + 1].id)); } } } } if (!carousel._hasRendered) { carousel._refreshUi(); } if (carousel.get("selectedItem") < 0) { carousel.set("selectedItem", carousel.get("firstVisible")); } carousel._syncUiItems(); }, /** * Synchronize and redraw the UI after an item is replaced. * * @method <API key> * @protected */ <API key>: function (o) { var carousel = this, carouselEl = carousel._carouselEl, itemsTable = carousel._itemsTable, pos = o.pos, item = o.newItem, oel = o.oldItem, el; el = carousel._createCarouselItem({ className : item.className, styles : item.styles, content : item.item, id : item.id, pos : pos }); if(el && oel) { Event.purgeElement(oel, true); carouselEl.replaceChild(el, Dom.get(oel.id)); if (!JS.isUndefined(itemsTable.loading[pos])) { itemsTable.numItems++; delete itemsTable.loading[pos]; } } // TODO: should we add the item if oel is undefined? if (!carousel._hasRendered) { carousel._refreshUi(); } carousel._syncUiItems(); }, /** * Synchronize and redraw the UI after an item is removed. * * @method _syncUiForItemAdd * @protected */ <API key>: function (obj) { var carousel = this, carouselEl = carousel._carouselEl, el, item, num, pos; num = carousel.get("numItems"); item = obj.item; pos = obj.pos; if (item && (el = Dom.get(item.id))) { if (el && Dom.isAncestor(carouselEl, el)) { Event.purgeElement(el, true); carouselEl.removeChild(el); } if (carousel.get("selectedItem") == pos) { pos = pos >= num ? num - 1 : pos; } } else { YAHOO.log("Unable to find item", "warn", WidgetName); } carousel._syncUiItems(); }, /** * Synchronize and redraw the UI for lazy loading. * * @method <API key> * @protected */ <API key>: function (obj) { var carousel = this, carouselEl = carousel._carouselEl, itemsTable = carousel._itemsTable, len = itemsTable.items.length, sibling = itemsTable.items[obj.last + 1], el, j; // attempt to find the next closest sibling if(!sibling && obj.last < len){ j = obj.first; do { sibling = itemsTable.items[j]; j++; } while (j<len && !sibling); } for (var i = obj.first; i <= obj.last; i++) { if(JS.isUndefined(itemsTable.loading[i]) && JS.isUndefined(itemsTable.items[i])){ el = carousel._createCarouselItem({ className : carousel.CLASSES.ITEM_LOADING, content : carousel.STRINGS.<API key>, id : Dom.generateId(), pos : i }); if (el) { if (sibling) { sibling = Dom.get(sibling.id); if (sibling) { carouselEl.insertBefore(el, sibling); } else { YAHOO.log("Unable to find sibling", "error", WidgetName); } } else { carouselEl.appendChild(el); } } itemsTable.loading[i] = el; } } carousel._syncUiItems(); }, /** * Redraw the UI for item positioning. * * @method _syncUiItems * @protected */ _syncUiItems: function () { var attr, carousel = this, numItems = carousel.get("numItems"), i, itemsTable = carousel._itemsTable, items = itemsTable.items, loading = itemsTable.loading, item, styles; for (i = 0; i < numItems; i++) { item = items[i] || loading[i]; if (item && item.id) { styles = <API key>.call(carousel, i); item.styles = item.styles || {}; for (attr in styles) { if (styles.hasOwnProperty(attr)) { item.styles[attr] = styles[attr]; } } setStyles(Dom.get(item.id), styles); } } }, /** * Set the correct class for the navigation buttons. * * @method _updateNavButtons * @param el {Object} The target button * @param setFocus {Boolean} True to set focus ring, false otherwise. * @protected */ _updateNavButtons: function (el, setFocus) { var children, cssClass = this.CLASSES, grandParent, parent = el.parentNode; if (!parent) { return; } grandParent = parent.parentNode; if (el.nodeName.toUpperCase() == "BUTTON" && Dom.hasClass(parent, cssClass.BUTTON)) { if (setFocus) { if (grandParent) { children = Dom.getChildren(grandParent); if (children) { Dom.removeClass(children, cssClass.FOCUSSED_BUTTON); } } Dom.addClass(parent, cssClass.FOCUSSED_BUTTON); } else { Dom.removeClass(parent, cssClass.FOCUSSED_BUTTON); } } }, /** * Update the UI for the pager buttons based on the current page and * the number of pages. * * @method _updatePagerButtons * @protected */ _updatePagerButtons: function () { var carousel = this, css = carousel.CLASSES, cur = carousel._pages.cur, // current page el, html, i, item, n = carousel.get("numVisible"), num = carousel._pages.num, // total pages pager = carousel._pages.el; // the pager container element if (num === 0 || !pager) { return; // don't do anything if number of pages is 0 } // Hide the pager before redrawing it Dom.setStyle(pager, "visibility", "hidden"); // Remove all nodes from the pager while (pager.firstChild) { pager.removeChild(pager.firstChild); } for (i = 0; i < num; i++) { el = document.createElement("LI"); if (i === 0) { Dom.addClass(el, css.FIRST_PAGE); } if (i == cur) { Dom.addClass(el, css.SELECTED_NAV); } html = "<a class=" + css.PAGER_ITEM + " href=\"#" + (i+1) + "\" tabindex=\"0\"><em>" + carousel.STRINGS.PAGER_PREFIX_TEXT + " " + (i+1) + "</em></a>"; el.innerHTML = html; pager.appendChild(el); } // Show the pager now Dom.setStyle(pager, "visibility", "visible"); }, /** * Update the UI for the pager menu based on the current page and * the number of pages. If the number of pages is greater than * MAX_PAGER_BUTTONS, then the selection of pages is provided by a drop * down menu instead of a set of buttons. * * @method _updatePagerMenu * @protected */ _updatePagerMenu: function () { var carousel = this, css = carousel.CLASSES, cur = carousel._pages.cur, // current page el, i, item, n = carousel.get("numVisible"), num = carousel._pages.num, // total pages pager = carousel._pages.el, // the pager container element sel; if (num === 0) { return;// don't do anything if number of pages is 0 } sel = document.createElement("SELECT"); if (!sel) { YAHOO.log("Unable to create the pager menu", "error", WidgetName); return; } // Hide the pager before redrawing it Dom.setStyle(pager, "visibility", "hidden"); // Remove all nodes from the pager while (pager.firstChild) { pager.removeChild(pager.firstChild); } for (i = 0; i < num; i++) { el = document.createElement("OPTION"); el.value = i+1; el.innerHTML = carousel.STRINGS.PAGER_PREFIX_TEXT+" "+(i+1); if (i == cur) { el.setAttribute("selected", "selected"); } sel.appendChild(el); } el = document.createElement("FORM"); if (!el) { YAHOO.log("Unable to create the pager menu", "error", WidgetName); } else { el.appendChild(sel); pager.appendChild(el); } // Show the pager now Event.addListener(sel, "change", carousel._pagerChangeHandler, this, true); Dom.setStyle(pager, "visibility", "visible"); }, /** * Set the correct tab index for the Carousel items. * * @method _updateTabIndex * @param el {Object} The element to be focussed * @protected */ _updateTabIndex: function (el) { var carousel = this; if (el) { if (carousel._focusableItemEl) { carousel._focusableItemEl.tabIndex = -1; } carousel._focusableItemEl = el; el.tabIndex = 0; } }, /** * Validate animation parameters. * * @method _validateAnimation * @param cfg {Object} The animation configuration * @return {Boolean} The status of the validation * @protected */ _validateAnimation: function (cfg) { var rv = true; if (JS.isObject(cfg)) { if (cfg.speed) { rv = rv && JS.isNumber(cfg.speed); } if (cfg.effect) { rv = rv && JS.isFunction(cfg.effect); } else if (!JS.isUndefined(YAHOO.util.Easing)) { cfg.effect = YAHOO.util.Easing.easeOut; } } else { rv = false; } return rv; }, /** * Validate the firstVisible value. * * @method <API key> * @param val {Number} The first visible value * @return {Boolean} The status of the validation * @protected */ <API key>: function (val) { var carousel = this, numItems = carousel.get("numItems"); if (JS.isNumber(val)) { if (numItems === 0 && val == numItems) { return true; } else { return (val >= 0 && val < numItems); } } return false; }, /** * Validate and navigation parameters. * * @method _validateNavigation * @param cfg {Object} The navigation configuration * @return {Boolean} The status of the validation * @protected */ _validateNavigation : function (cfg) { var i; if (!JS.isObject(cfg)) { return false; } if (cfg.prev) { if (!JS.isArray(cfg.prev)) { return false; } for (i in cfg.prev) { if (cfg.prev.hasOwnProperty(i)) { if (!JS.isString(cfg.prev[i].nodeName)) { return false; } } } } if (cfg.next) { if (!JS.isArray(cfg.next)) { return false; } for (i in cfg.next) { if (cfg.next.hasOwnProperty(i)) { if (!JS.isString(cfg.next[i].nodeName)) { return false; } } } } return true; }, /** * Validate the numItems value. * * @method _validateNumItems * @param val {Number} The numItems value * @return {Boolean} The status of the validation * @protected */ _validateNumItems: function (val) { return JS.isNumber(val) && (val >= 0); }, /** * Validate the numVisible value. * * @method _validateNumVisible * @param val {Number} The numVisible value * @return {Boolean} The status of the validation * @protected */ _validateNumVisible: function (val) { var rv = false; if (JS.isNumber(val)) { rv = val > 0 && val <= this.get("numItems"); } else if (JS.isArray(val)) { if (JS.isNumber(val[0]) && JS.isNumber(val[1])) { rv = val[0] * val[1] > 0 && val.length == 2; } } return rv; }, /** * Validate the revealAmount value. * * @method <API key> * @param val {Number} The revealAmount value * @return {Boolean} The status of the validation * @protected */ <API key>: function (val) { var rv = false; if (JS.isNumber(val)) { rv = val >= 0 && val < 100; } return rv; }, /** * Validate the scrollIncrement value. * * @method <API key> * @param val {Number} The scrollIncrement value * @return {Boolean} The status of the validation * @protected */ <API key>: function (val) { var rv = false; if (JS.isNumber(val)) { rv = (val > 0 && val < this.get("numItems")); } return rv; } }); })(); /* ;; Local variables: ** ;; mode: js2 ** ;; indent-tabs-mode: nil ** ;; End: ** */ YAHOO.register("carousel", YAHOO.widget.Carousel, {version: "2.8.2r1", build: "8"});
WebsocketRails::EventMap.describe do # You can use this file to map incoming events to controller actions. # One event can be mapped to any number of controller actions. The # actions will be executed in the order they were subscribed. subscribe :update_stock_user, to: SocketController, with_method: :update_stock_user subscribe :update_stock_all, to: SocketController, with_method: :update_stock_all subscribe :notification_update, to: SocketController, with_method: :notification_update subscribe :stock_ajax_handler, to: SocketController, with_method: :stock_ajax_handler subscribe :company_handler, to: SocketController, with_method: :company_handler subscribe :<API key>, to: SocketController, with_method: :<API key> subscribe :<API key>, to: SocketController, with_method: :<API key> subscribe :<API key>, to: SocketController, with_method: :<API key> subscribe :<API key>, to: SocketController, with_method: :<API key> subscribe :<API key>, to: SocketController, with_method: :<API key> subscribe :index_updater, to: SocketController, with_method: :index_updater subscribe :<API key>, to: SocketController, with_method: :<API key> # Uncomment and edit the next line to handle the client connected event: # subscribe :client_connected, :to => Controller, :with_method => :method_name # Here is an example of mapping namespaced events: # namespace :product do # subscribe :new, :to => ProductController, :with_method => :new_product # end # The above will handle an event triggered on the client like `product.new`. end
## Aspose.OCR for Java Examples This directory contains examples for [Aspose.OCR for Java](https://products.aspose.com/ocr/java). ## How to use the examples? Download the code and use your favourite IDE to open/import the examples. See our [documentation](https://docs.aspose.com/display/OCRJAVA/Home) for more details.
/* * HTML5 Boilerplate * * What follows is the result of much research on cross-browser styling. * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal, * Kroc Camen, and the H5BP dev community and team. */ /* /////////////////////////////////////////////// HOMEPAGE /////////////////////////////////////////////// */ #home-page #container { pointer-events: none; } #home-page #container a { pointer-events: all !important; } #lockup > a { position: relative; display: block; width: 200px; height: 90px; } #logo_image { position: absolute; top: 0; } /*#p5_logo { position: absolute; }*/ .tagline { display: none; } #menu.top_menu, #menu { list-style: none; font-family: "<API key>"; width:100%; margin: 0 0 1em 0; padding: 0; height: 100%; font-size: 1.3em; } #menu.top_menu li { display: inline; } #home-sketch { position: absolute; top: 0; left: 0; z-index: -2; } #home-sketch-frame { position: fixed; width: 100%; height: 100%; left: 0; top: 0; z-index: -2; overflow: hidden; pointer-events: all; border: 0; } #credits { position: fixed; bottom: 0; left: 0; z-index: 2; padding: 1em; font-size: 0.75em; } .focus { border: 1px solid #ED225D; padding: 0.4em; margin: 4em 1.75em 0 0; padding: 0.5em 1em 0em 1em; color: #333 !important; } .focus_blue { border: 1px solid #2D7BB6; padding: 0.4em; margin: 4em 1.75em 0 0; padding: 0.5em 1em 0em 1em; color: #333 !important; } /* /////////////////////////////////////////////// DOWNLOAD PAGE /////////////////////////////////////////////// */ .download_box { border: 1px solid #ED225D; padding: 0.4em; margin: 0 1.75em 0 0; width: 18.65em; color: #333 !important; height:7.45em; position: relative; } .download_box:hover { border: 1px solid #ED225D; background: #ED225D; color: #FFF !important; } .download_box.half_box { width:10.83em; margin-right: 1.75em; float: left; } .download_box.half_box.last_box { margin-right: 0; } .download_box h4 { font-size: 1em; margin: 0; padding-bottom: 0.3em; border-bottom: 0.09em dashed; border-bottom-color: #ED225D; } .download_box:hover h4 { -<API key>: 0; border-bottom-color: #FFF; } .download_box p { font-size: 0.65em; margin: 0; position:absolute; bottom:1em; } .download_box svg { height:0.65em; width:0.65em; position: absolute; bottom: 3.5em; } .download_box:hover svg { fill: white; } .download_box h4 + p {display: block;} #download-page .link_group { width: 100%; margin-bottom: 3em; } .download_box { margin-top: 1em; } .support div.download_box { margin-top: 1em; margin-bottom: 1em; } #download-page .support p { font-size: 0.8em; position: static; margin-top: .3em; } #slideshow { margin: 1em 0; } #slideshow p { font-size: 0.8em; color: #ABABAB; line-height: 1.2em; margin-top: 0.5em; } .extra { color: white; position: absolute; bottom: 0.65em; right: 0.9em; font-weight: bold; -ms-transform: rotate(-12deg); -webkit-transform: rotate(-12deg); transform: rotate(-12deg); font-size: 0.8em; } /* /////////////////////////////////////////////// GET STARTED /////////////////////////////////////////////// */ /*.tutorial-btn { background: white; color: black !important; padding: 7px; width: 500px; text-align: center; border: 1px solid #ccc; border-radius: 4px; } .tutorial-btn:hover { background: #AFAFAF; color: white !important; padding: 7px; width: 500px; text-align: center; border-radius: 4px; cursor: pointer; }*/ .tutorial-title { border-bottom: 4px dotted #ed225d; padding-bottom: 10px; margin-bottom: 10px; } /* /////////////////////////////////////////////// EXAMPLES /////////////////////////////////////////////// */ #learn-page h3 { font-weight: bold; font-size: 1.2em; font-family: times; margin: 0.5em 0 0 0; } .topic-link { font-weight: bold; } /* /////////////////////////////////////////////// REFERENCE /////////////////////////////////////////////// */ #reference section h1 { float:left; } /* EXAMPLES IN REF */ .example-content .edit_space, .example-content pre { position: absolute !important; top: 0.5em !important; left: 120px !important; padding-top: 0 !important; border: none !important; } pre.norender { left: 0px !important; margin-left: 0 !important; } .example-content pre { margin-top: 0 !important; width: 30.5em !important; } .example-content .edit_space { margin: -0.5em 0 0 -0.5em !important; } .example_container .edit_space { position: absolute !important; top: 0; left: 0; } .example_container pre { top: 0; left: 0; width: 100%; } .example div { position: relative; } .example_container button { position: absolute; top: 0.25em; } .edit_space button { font-family: "<API key>"; font-size: 1em; color: #ccc; border: 1px solid rgba(200, 200, 200, .15); background: transparent; outline: none; } .example_container button:hover, .example_container.editing button { color: #2D7BB6; border-color: rgba(45,123,182, .25); } .edit_button { left: 24.5em; } .reset_button { left: 27.5em; } .display_button { margin-bottom: 2em; font-family: "<API key>"; font-size: 1em; color: #2D7BB6; border: 1px solid rgba(45,123,182, .25); background: transparent; outline: none; } .example_container { width: 36em; border-top: 0.09em dashed; border-top-color: #333; padding-top: 0.5em; margin-top: 1em; } #search { margin: 0.5em 0 0 0; } #search input, #search input[type="password"], #search input[type="search"] { border: 1px solid rgba(200, 200, 200, .15); font-family: "<API key>"; } #search ::-<API key>, #search .<TwitterConsumerkey> .tt-hint { color: #ccc; } :-moz-placeholder { /* Firefox 18- */ color: #ccc; } ::-moz-placeholder { /* Firefox 19+ */ color: #ccc; } :-<API key> { color: #ccc; } #search input:focus { color:#ED225D; outline-color:#3796D1; outline-width: 1px; outline-style: solid; } #search .<TwitterConsumerkey> .tt-dropdown-menu { background-color: #fff; border: 1px solid rgba(0, 0, 0, 0.2); overflow-y: auto; font-size: 1em; line-height: 1.4em; } #search .<TwitterConsumerkey> .tt-suggestion.tt-cursor { color: #333; background-color: #eee; } #search .<TwitterConsumerkey> .tt-suggestion p { margin: 0; } #search .<TwitterConsumerkey> .tt-suggestion p .small { font-size: 12px; color: #666; } .item { display:block; width:100%; } .description { clear:both; display:block; width:100%; } .item-wrapper, .list-wrapper { float: left; outline: none !important; } #reference .core, #reference .addon { color: #704F21; } html, button, input, select { color: #222; } textarea { line-height: 1.45em; padding: 0.5em 1em 0.5em 1em; border:none; } textarea:focus { outline: none; } body { font-size: 1em; line-height: 1.4; } td { vertical-align: top; font-size: 1.2em; padding-bottom: 0.75em; } td:first-child { padding-right: 0.5em; } /* * Remove text-shadow in selection highlight: h5bp.com/i * These selection rule sets have to be separate. * Customize the background color to match your design. */ ::-moz-selection { background: #b3d4fc; text-shadow: none; } ::selection { background: #b3d4fc; text-shadow: none; } /* * A better looking default horizontal rule */ hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; } /* * Remove the gap between images and the bottom of their containers: h5bp.com/i/440 */ img { vertical-align: middle; } img.med_left { width: 300px; float: left; } img.med_right { width: 300px; float: right; } img.small_left { width: 200px; float: left; } img.smaller_left { width: 140px; float: left; } img.small_right { width: 200px; float: right; } img.smaller_right { width: 140px; float: right; } img.small_center { width: 200px; margin-left:250px; } img.small { width: 160px; } img.med { width: 400px; } img.med_center { width: 400px; margin-left: 150px; } /* * Remove default fieldset styles. */ fieldset { border: 0; margin: 0; padding: 0; } /* * Allow only vertical resizing of textareas. */ textarea { resize: vertical; } /* /////////////////////////////////////////////// CONTRIBUTORS FORM /////////////////////////////////////////////// */ .contribute-form { font-family:"<API key>"; } .contribute-form input, textarea{ border: 1px solid #ccc; border-radius: 4px; padding: 5px; font-size: 14px; } .contribute-form textarea{ border: 1px solid #ccc; border-radius: 4px; padding: 5px; font-size: 14px; width: 350px; } .contribute-form #form-help{ font-size: small; color: #ABABAB; } .contribute-form #required-asterisk{ color: #EC245E; } .contribute-form #input-title{ font-size: medium; margin-top: 15px; } .contribute-form #hide-message{ display: none; } .contribute-button { color: #333; background-color: #fff; border-color: #ccc; margin-bottom: 0; font-size: medium; border: 1px solid transparent; } .contribution-info li{ margin-bottom: 2px; margin-left: 20px; font-size: medium; } .contribution-info ul{ margin-bottom: 15px; } /* /////////////////////////////////////////////// Contributors /////////////////////////////////////////////// */ #<API key>{ } #contribute-item { font-size: .75em; text-align: left; display: inline-block; width: 320px; height: 250px; float: left; border: 1px solid #ED225D; margin: 0 25px 25px 0; position: relative; } .<API key>{ position: absolute; z-index: 20; margin: 0; padding: 10px; } /* #<API key>{ display:none; } #<API key>{ display:none; } #<API key>{ display:none; } #<API key>{ display:none; }*/ /*#<API key>:hover{ display: block; } #<API key>:hover{ display:block; } #<API key>:hover{ display:block; } #<API key>:hover{ display:block; }*/ .container {/* width: 100px;*/ height: 100px; position: relative; } #navi, #infoi { width: 100%; height: 100%; position: absolute; top: 0; left: 0; } #infoi { z-index: 10; } /*#contribute-item:hover { background-color: rgba(190, 190, 190, 0.5); }*/ h3.contribute-title{ font-size: 1.3em; margin: 0 0 27px 0; padding-bottom: 0.3em; border-bottom: 0.09em dashed; border-bottom-color: #ED225D; } /* /////////////////////////////////////////////// LIBRARIES / LEARN /////////////////////////////////////////////// */ .label { position: relative; } .label h4 { color: white; position: absolute; top: 0; margin: 1em; } .label:hover h4 { color:#ED225D; } #exampleDisplay, #exampleFrame, #exampleEditor { width: 36em; border: none; } #popupExampleFrame { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 1000; /*display: none;*/ border: none; } /*#popupExampleFrame #exampleFrame { width: 100%; height: 100%; position: fixed; top: 0; left: 0; z-index: 999; }*/ #exampleDisplay button { color: #2D7BB6; border-color: rgba(45,123,182, .25); float: right; margin: 0.5em 0 0 0.5em; background: rgba(255, 255, 255, 0.7); position: absolute; left: 0; z-index: 2; } #exampleDisplay .edit_button { left: 29em; top: -2.5em; } #exampleDisplay .reset_button { left: 32em; top: -2.5em; } #exampleDisplay button:hover { background: #fff; } #exampleDisplay .edit_space { position: relative; } #exampleFrame { height: 22em; } #exampleEditor { height: 500em; width: 710px; overflow: hidden; margin-top: 0.5em; color: #222; font-family: inconsolatamedium, Consolas, Monaco, 'Andale Mono', monospace; font-size: 1em !important; background-color: #FFF; line-height: 1em; } .ace_info { background-color: #D7E5F5 !important; } .ace_warning { background-color: #FFD700 !important; color: #ffffff !important; } .ace_error { background-color: #FF6347 !important; color: #ffffff !important; } /* property, tag, boolean, number, function-name, constant, symbol */ .ace_numeric, .ace_tag { color: #DC3787 !important; /* not p5 pink, but related */ } /* atrule, attr-value, keyword, class-name */ .ace_type, .ace_class, .ace_attribute-name { color: #704F21 !important; /* darker brown */ } /* selector, attr-name, function, builtin */ .ace_function, .ace_keyword, .ace_support { color: #00A1D3 !important; /* not p5 blue, but related */ } /* comment, block-comment, prolog, doctype, cdata */ .ace_comment { color: #A0A0A0 !important; /* light gray */ } /* operator, entity, url, variable */ .ace_string { color: #a67f59 !important; /* og coy a67f59 a light brown */ } .ace_operator { color: #333 !important; } /* regex, important */ .ace_regexp { color: #e90 !important; /* og coy e90 orange */ } .ace-gutter { color: #333 !important; } .ace-gutter-layer { color: #333 !important; } .ace_folding-enabled { width: 10px !important; color: #333 !important; } .ace_gutter-cell { background-image: none !important; padding-left: 10px !important; overflow: hidden !important; background-color: #AFAFAF !important; } .ace_content { padding: 0em 0.5em !important; } .attribution { background-color: #eee; font-size: 15px; padding: 10px; margin:30px 0px 30px 0px; } /* /////////////////////////////////////////////// GALLERY /////////////////////////////////////////////// */ .gallery-item { font-size: .75em; text-align: center; display: inline-block; margin: 10px; } .gallery-item a:hover { border: none; opacity: .8; } .gallery-item p { margin: 5px; } img.gallery-img { width: 200px; height: 200px; } .gallery-source { color: #AFAFAF; font-size: 1em; margin: 0px !important; } /* /////////////////////////////////////////////// COMMUNITY /////////////////////////////////////////////// */ ul.statement-list { margin-left: 45px; } .bullets li { margin-bottom: 0 !important; padding: none !important; } .chromeframe { margin: 0.2em 0; background: #ccc; color: #000; padding: 0.2em 0; } /* font-family:'<API key>'; */ /* while local dev */ @font-face{ font-family:"<API key>"; src:url("fonts/<API key>.eot?#iefix"); src:url("fonts/<API key>.eot?#iefix") format("eot"), url("fonts/<API key>.woff") format("woff"), url("fonts/<API key>.ttf") format("truetype"), url("fonts/<API key>.svg#<API key>") format("svg"); font-weight: normal; font-style: normal; } /* always */ @font-face { font-family: 'inconsolatamedium'; src: url('fonts/inconsolata.eot'); src: url('fonts/inconsolata.eot?#iefix') format('embedded-opentype'), url('fonts/inconsolata.woff') format('woff'), url('fonts/inconsolata.ttf') format('truetype'), url('fonts/inconsolata.svg#inconsolatamedium') format('svg'); font-weight: normal; font-style: normal; } /* apply a natural box layout model to all elements */ *, *:before, *:after { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } html { font-size: 1.25em; /* 1.25em ~ 20px if times, 1.0em if body text is avenir */ } body { margin:0; background-color: #fff; font-family: times; font-weight: 400; line-height: 1.45; color: #333; } .freeze { overflow: hidden; } /* menu links */ #menu li a:link, #menu li a:visited, /*#menu li a:focus:link,*/ #menu li a:focus:active, #menu li a:focus:hover { color: #ED225D; outline: none !important; background: transparent; -<API key>: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } /*#menu li a:focus { outline-style: solid; outline-color: #ed225d; outline-width: 2px; outline-offset: 0; background: #ed225d; color: #fff; }*/ /* body links */ a:link, a:visited { color: #2D7BB6; text-decoration: none; outline: none !important; } /*a:focus { outline-style: solid; outline-color: #2D7BB6; outline-width: 1px; outline-offset: 1px; }*/ a:active, a:hover, #reference a:hover { color:#ED225D; text-decoration: none; padding-bottom: 0.11em; border-bottom: 0.11em dashed; border-bottom-color: #ED225D; transition: border-bottom 30ms linear; } a.anchor { color: #222 !important; outline: none; } a.anchor:hover { color:#ED225D !important; } a.nounderline:hover { border: none; } .skip { position: absolute; top: -1000px; height: 1px; width: 1px; text-align: left; overflow: hidden; font-family: <API key>; font-size: 0.75em; font-weight: normal; border: 0; padding: 5px 10px 3px; background: #ed225d; color: #fff !important; outline: 0 !important; } a.skip:active, a.skip:focus, a.skip:hover { width: auto; height: auto; overflow: visible; } @media (min-width: 720px) { .skip { left: -1000px; } a.skip:active, a.skip:focus, a.skip:hover { top: 52px; left: 28px; } } .here { color:#ED225D !important; text-decoration: none; padding-bottom: 0.1em; border-bottom: transparent; border-bottom-color: #ED225D; } /*p { margin-top:0.5em; margin-bottom: 1.3em; }*/ .highlight {background-color: rgba(237,34,93,0.15);} h1, h2, h3, h4, h5{ margin: 1.414em 0 0.5em 0; font-weight: inherit; line-height: 1.2; font-family: "<API key>"; } h1 { font-size: 2.25em; /* 2.369em */ margin: 0.25em 0 0 0; } h2 { font-size: 1.5em; /* 1.777em */ margin: 1em 0 0 0; } #item h3 { margin: 0.777em 0 0 0; font-size: 1.444em; font-weight: inherit; /*line-height: 1.2;*/ font-family: inconsolatamedium, consolas, monospace; color: #00A1D3 !important; /* 2D7BB6, 4A90E2 */ } /* probably needs to be more specific, like with a class selector, in case there are other links inside #item that are not code (or those exceptions could just be handled with a class of .notcode */ #item a { font-family: inconsolatamedium, consolas, monospace; } #backlink { margin: 1.2em 0.444em 0 0; font: 1em <API key>; float:right; } #backlink a { color:#AFAFAF; } #backlink a:hover { color:#ED225D; border-bottom:none; } h4 { font-size: 1.33em; margin: 1em 0 0 0; } h4 + p {display: inline;} #family a:link, #family a:visited { margin: 0.5em; } #family a:hover, #family a:active { margin: 0.5em; border:none; } #family { position:absolute; z-index: 9999; top:0; left:0; /*padding: 0.5em 2em;*/ width:100%; /* 96, 100% if fixed*/ border-bottom: 1px solid; overflow:none; margin:0; border-bottom-color: rgba(51,51,51,0.5); -webkit-box-shadow: 0px 0px 10px #333; -moz-box-shadow: 0px 0px 10px #333; box-shadow: 0px 0px 10px #333; background-color: rgba(255,255,255,0.85); } #family span { margin: 0.5em; color:#333 !important; } #family p.left { float: left; margin:0.375em 0 0.375em 2em; } #family p.right { float: right; margin:0.375em 0 0.375em 0; } #family form { float: right; padding:0.375em 0.75em 0.375em 0.75em; margin-right: 0.25em; } #family form input[type="text"] { visibility: hidden; width: 0; margin: 0; color: #333; border: 1px solid #3796D1; font-family: times !important; font-weight: 400; font-size: 1em; transition: width 100ms; outline: none; } #family form.form__open input[type="text"] { visibility: visible; width: 9.75em; } #family form input[type="submit"] { background: url('../img/search.png') center center no-repeat; border: none; outline: none; } .code-snippet { margin:0 0 0 1em; width: 90%; clear:both; } .column-span { margin:0 0 0 1em; padding:0; float:left; } section { padding:0; /* margin:0 auto; clear:both; */ } section p, section li { font-size: 1.20em; } .spacer { clear: both; } ul { margin:0.5em 0 0 0; padding: 0; list-style: disc; list-style-position: outside; } li { margin: 0 0 1em 0; } section li { margin: 0 0 1em 0.04em; } ul.nobullet, div.params ul { margin:0.5em 0 0 0; padding: 0; list-style: none; list-style-position: outside; } div.params ul li { margin-left: -0.23em; } ul.inside { margin:0 0 0 2em; padding: 0; list-style: disc; list-style-position: inside; } .image-row img { width:48%; height:14.3%; } .image-row img+img { float:right; margin-right: 0; margin-bottom: 0.25em; } img, section div img { margin: 0.5em 0.5em 0 0; width:100%; } p+img { margin-top: 0; } .video { width:100%; } #lockup { position: absolute; top: -5.75em; left: 1.25em; height: 0px; -<API key>: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } #lockup object { margin:0; padding:0; border: none; } #lockup a:focus { outline: 0; } .logo { margin:0; padding:0; border: none; margin-bottom: 0.4em; height:4.5em; width:9.75em; } #lockup p { color: #ED225D; font: 0.75em "<API key>"; margin: 0.5em 0 0 8.5em; } #lockup a:link { border: transparent; height:4.5em; width:9.75em; } .caption { margin-bottom: 2.5em; } .caption span, .caption p { text-align:right; font: 0.75em "<API key>"; padding-top: 0.25em; } footer { clear:both; border-top: 0.1em dashed; border-top-color: #ED225D; margin-top: 2em; } /* * Image replacement */ .ir { background-color: transparent; border: 0; overflow: hidden; /* IE 6/7 fallback */ *text-indent: -9999px; } .ir:before { content: ""; display: block; width: 0; height: 150%; } /* * Hide from both screenreaders and browsers: h5bp.com/u */ .hidden { display: none !important; visibility: hidden; } /* * Hide only visually, but have it available for screenreaders: h5bp.com/v */ .visuallyhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; } /* * Extends the .visuallyhidden class to allow the element to be focusable * when navigated to via the keyboard: h5bp.com/p */ .visuallyhidden.focusable:active, .visuallyhidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; } /* * Hide visually and from screenreaders, but maintain layout */ .invisible { visibility: hidden; } /* * Clearfix: contain floats * * For modern browsers * 1. The space content is one way to avoid an Opera bug when the * `contenteditable` attribute is included anywhere else in the document. * Otherwise it causes space to appear at the top and bottom of elements * that receive the `clearfix` class. * 2. The use of `table` rather than `block` is only necessary if using * `:before` to contain the top-margins of child elements. */ .clearfix:before, .clearfix:after { content: " "; display: table; } .clearfix:after { clear: both; } /* * For IE 6/7 only * Include this rule to trigger hasLayout and contain floats. */ .clearfix { *zoom: 1; } #notMobile-message { display: none; } #<API key> { display: none; } #<API key>, .<API key> { display: none; } .pointerevents #<API key>, .pointerevents .<API key> { pointer-events: none; display: inline-block; } @media only screen and (min-width: 35em) { /* Style adjustments for viewports that meet the condition */ } /* initial responsive, if window is over 720 px in width put these rules into play */ @media (max-width: 719px) { /* #home-sketch-frame { display: none; }*/ #family form { display: none; } #family p.left { margin:0.375em 0 0.375em 1em !important; } #i18n-btn { position: absolute; top: 1.5em; right: 0.75em; display: none; } #lockup { position: absolute; top: 2em; left: 1em; } .column-span { margin:0 1em 0 1em; padding:0; float:left; } #menu.top_menu, #menu { margin: 6em 0 0.5em 0; font-size: 1.3em; -<API key>: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } #menu li { display: inline; } #contribute-item:first-child { margin-left: 0px; } .download_box { width: 96%; } .download_box.half_box { width: 46%; margin-right: 4%; float: left; } #<API key>, .<API key> { display: none; pointer-events: none; } pre[class*="language-"] { padding: 0.5em 0.5em; width: 14em; } code { word-wrap: break-word; word-break: break-all; } #credits { position: relative !important; z-index: 2; margin-top: -7em; padding: 0 2em 3em 1em; font-size: 0.5em; float: right; width: 100%; text-align: right; display: none; /* HIDDEN SKETCH */ } #home-sketch-frame { display: none; /* HIDDEN SKETCH */ } #exampleDisplay, #exampleFrame, #exampleEditor { width: 100%; } #exampleDisplay .edit_button { left: -0.5em; } #exampleDisplay .reset_button { left: 2.5em; } #exampleEditor { margin-top: 3em; width: 100%; } small, .small, footer, #family { font-size: 0.5em; } } @media (min-width: 720px) { .container { margin:10em auto; width:49em; padding:0.8em 0 0 0; height: auto; min-height: 100%; background-color: rgba(51,51,51,0.0); } #home-page #container { padding:0; margin-top: -0.8em; } section { width:36em; /* 36-38 em for about 10-14 words at this size */ } small, .small, footer, #family { font-size: 0.75em; } footer { clear:both; /*margin: 4em 0 2em -.75em;*/ width:48em; } #i18n-btn { position: absolute; top: 2.5em; right: 1em; display: none; } #menu { list-style: none; font-family: "<API key>"; margin:0 0.75em 0 -1.85em; /* margin-right: 0.75em; */ width:7.3em; height:100%; /*float:left;*/ border-top: transparent; border-bottom: transparent; height: 14.25em; padding:1.25em 0; font-size: 0.92em; z-index: 100; } #menu li { float:none; margin: 0 0 1em 0; text-align: right; } #menu li:last-child { /* margin: 0;*/ } #menu .other-link::after { /* content:"\2192"; margin-right: -0.98em; */ } #menu li:nth-child(11) { margin-top:3em; padding-top: 0.5em; /*border-top: 0.06em solid rgba(51,51,51,0.25);*/ } #home-page .column-span { /*margin:0 0.75em 0 -1.85em; /* margin-right: 0.75em; */ margin-left:7.7em; } .left-column { width:48%; float: left; } .right-column { width:48%; float:right; margin-right: 0; margin-bottom: 0.25em; } .narrow-left-column { width:32%; float: left; } .wide-right-column { width:64%; float:right; margin-right: 0; margin-bottom: 0.25em; } .book { font-size: 0.75em; } .column_0, .column_1, .column_2 { float: left; width: 11.333em; } .column_0, .column_1 { margin-right: 1.0em; } #collection-list-nav dl, .reference-group dl, #list .column { float: left; width:7.68em; margin:0 1.75em 0 0; font-size: 1em; } #collection-list-nav dl:nth-child(4), .reference-group dl:nth-child(4), #list .column.col_3 { margin-right:0; } .reference-group dl:nth-child(n+5) { margin-top:1em; } #collection-list-nav dd, .reference-group dd { margin:0; } #collection-list-nav { width:100%; height:12.25em; list-style-type: none; font-family: "<API key>"; clear:both; margin:0 0 0.5em 0; padding:0; border-bottom: 1px dashed rgba(0,0,0,.2) } #collection-list { margin: 0; } .group-name.first { margin-top: 0 !important; } .column.group-name { margin-bottom: 1em; } #library-page .group-name:hover { color: #ED225D; } #library-page .group-name { margin: 2em 0 0.5em 0; } #library-page .column { margin-top: 1em; } div.reference-group { margin: 1em 0; padding: 0 0 0.5em 0; } div.reference-group:nth-child(1) { margin: 0 0 1em 0; } div.reference-group:nth-child(1) h4 { margin-top: 0.5em; } div.reference-group:nth-child(even) { background-color: rgba(69, 142, 209, 0.02); } div.reference-group:nth-child(even) h4 { margin-top: 0.25em; } #search { float:right; } #search input, #search input[type="password"], #search input[type="search"] { font-size: 2.25em; width:7.70em; } #search input:focus { transition: width 0.65s ease; width:9.75em; } #search .<TwitterConsumerkey> .tt-dropdown-menu { border: 1px solid rgba(0, 0, 0, 0.2); padding: 0.5em; max-height: 200px; overflow-y: auto; font-size: 1em; line-height: 1.4em; } #search .<TwitterConsumerkey> .tt-suggestion { padding: 3px 20px; line-height: 24px; cursor: pointer; } #search .<TwitterConsumerkey> .empty-message { padding: 8px 20px 1px 20px; font-size: 14px; line-height: 24px; } /* constants for the asterisk */ #<API key> { position:fixed; z-index: -1 !important; opacity: 0.6; pointer-events: none; } /* variations for asterisks on pages */ .<API key> { width: 0.33em; height: 0.33em; margin: 0 0.09em 0.18em 0.09em; display: inline-block; overflow: hidden; text-indent: -100%; background: transparent url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyOCIgaGVpZ2h0PSIyOCIgdmlld0JveD0iMCAwIDI4IDI4Ij48cGF0aCBkPSJNMTYuOSAxMC4zbDguNS0yLjYgMS43IDUuMiAtOC41IDIuOSA1LjMgNy41IC00LjQgMy4yIC01LjYtNy4zTDguNSAyNi4zbC00LjMtMy4zIDUuMy03LjJMMC45IDEyLjZsMS43LTUuMiA4LjYgMi44VjEuNGg1LjhWMTAuM3oiIHN0eWxlPSJmaWxsOiNFRDIyNUQ7c3Ryb2tlOiNFRDIyNUQiLz48L3N2Zz4="); background-size: 0.33em; } #home-page #<API key> { bottom:-8%; right:20%; height:12em; width:12em; opacity: 1; } #learn-page #<API key>, #<API key> #<API key> { bottom:-14%; left:-20%; height:25em; width:25em; -webkit-transform:rotate(-1deg); -moz-transform:rotate(-1deg); -ms-transform:rotate(-1deg); -o-transform:rotate(-1deg); transform: rotate(-1deg); } #libraries-page #<API key>, #books-page #<API key> { bottom:-19%; right:-16%; height:28em; width:28em; -webkit-transform:rotate(2deg); -moz-transform:rotate(2deg); -ms-transform:rotate(2deg); -o-transform:rotate(2deg); transform: rotate(2deg); } #get-started-page #<API key>, #community-page #<API key> { top:-30%; right:-40%; height:44em; width:44em; -webkit-transform:rotate(9deg); -moz-transform:rotate(9deg); -ms-transform:rotate(9deg); -o-transform:rotate(9deg); transform: rotate(9deg); } #reference-page #<API key>, #download-page #<API key> { top:7%; left:1%; height:10em; width:10em; -webkit-transform:rotate(-21deg); -moz-transform:rotate(-21deg); -ms-transform:rotate(-21deg); -o-transform:rotate(-21deg); transform: rotate(-21deg); } } /* Style adjustments for high resolution devices (commented out as dpi unit throws unwanted error in inspector) @media print, (-<API key>: 5/4), (-<API key>: 1.25), (min-resolution: 120dpi) { } */ @media print { * { background: transparent !important; color: #000 !important; /* Black prints faster: h5bp.com/s */ box-shadow: none !important; text-shadow: none !important; } a, a:visited { text-decoration: underline; } a[href]:after { content: " (" attr(href) ")"; } abbr[title]:after { content: " (" attr(title) ")"; } /* * Don't show links for images, or javascript/internal links */ .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; } pre, blockquote { border: 1px solid #999; page-break-inside: avoid; } thead { display: table-header-group; /* h5bp.com/t */ } tr, img { page-break-inside: avoid; } img { max-width: 100% !important; } @page { margin: 0.5cm; } p, h1, h2, h3 { orphans: 3; widows: 3; } h1, h2, h3 { page-break-after: avoid; } } iframe { border: none; } .cnv_div { /* This ensures that all canvases from example code snippets are only * the width of their actual canvases, rather than the width of * the entire page, potentially obscuring the example code and * preventing it from being selected. */ display: inline-block; } /* /////////////////////////////////////////////// LANGUAGE BUTTONS /////////////////////////////////////////////// */ #i18n-btn button { border: none !important; outline: none !important; background: none !important; font-size: 0.75em; color: #ABABAB; cursor: pointer !important; } #i18n-btn button:hover { color: #ED225D; } #i18n-btn button:disabled { color: #ED225D !important; cursor: default !important; }
// RMG - Reaction Mechanism Generator // RMG Team (rmg_dev@mit.edu) // copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation // and/or sell copies of the Software, and to permit persons to whom the // Software is furnished to do so, subject to the following conditions: // all copies or substantial portions of the Software. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. package jing.mathTool; import java.util.*; //## package jing::mathTool // jing\mathTool\<API key>.java //## class <API key> public class <API key> extends RuntimeException{ // Constructors //## operation <API key>(String) public <API key>(String s) { //#[ operation <API key>(String) super(s); // } public <API key>() { } }
namespace Steam.Models.GameEconomy { public class <API key> { public bool Nameable { get; set; } public bool? Decodable { get; set; } public bool? Paintable { get; set; } public bool? CanCustomizeTexture { get; set; } public bool? CanGiftWrap { get; set; } public bool? PaintableTeamColors { get; set; } public bool? CanStrangify { get; set; } public bool? CanKillstreakify { get; set; } public bool? DuckUpgradable { get; set; } public bool? StrangeParts { get; set; } public bool? CanCardUpgrade { get; set; } public bool? CanSpellPage { get; set; } public bool? CanConsume { get; set; } } }
/// <reference path="D:\GE\GE.WebUI\bower_components/jquery/dist/jquery.min.js" /> (function ($) { $.fn.geGameMenu = function () { this.each(function () { var $this = $(this); $this.find('[data-toggle="tooltip"]').tooltip({ container: $this }); }); }; })(jQuery);
import BasePlugin from './../_base.js'; import Handsontable from './../../browser'; import {addClass, hasClass, removeClass, outerHeight} from './../../helpers/dom/element'; import {arrayEach, arrayMap} from './../../helpers/array'; import {rangeEach} from './../../helpers/number'; import {eventManager as eventManagerObject} from './../../eventManager'; import {pageX} from './../../helpers/dom/event'; import {registerPlugin} from './../../plugins'; const privatePool = new WeakMap(); /** * @description * Handsontable ManualColumnMove * * Has 2 UI components: * * handle - the draggable element that sets the desired position of the column, * * guide - the helper guide that shows the desired position as a vertical guide * * Warning! Whenever you make a change in this file, make an analogous change in manualRowMove.js * * @class ManualColumnMove * @plugin ManualColumnMove */ class ManualColumnMove extends BasePlugin { constructor(hotInstance) { super(hotInstance); privatePool.set(this, { guideClassName: '<API key>', handleClassName: 'manualColumnMover', startOffset: null, pressed: null, startCol: null, endCol: null, currentCol: null, startX: null, startY: null }); /** * DOM element representing the vertical guide line. * * @type {HTMLElement} */ this.guideElement = null; /** * DOM element representing the move handle. * * @type {HTMLElement} */ this.handleElement = null; /** * Currently processed TH element. * * @type {HTMLElement} */ this.currentTH = null; /** * Manual column positions array. * * @type {Array} */ this.columnPositions = []; /** * Event Manager object. * * @type {Object} */ this.eventManager = eventManagerObject(this); // Needs to be in the constructor instead of enablePlugin, because the position array needs to be filled regardless of the plugin state. this.addHook('init', () => this.onInit()); } /** * Check if plugin is enabled. * * @returns {boolean} */ isEnabled() { return !!this.hot.getSettings().manualColumnMove; } /** * Enable the plugin. */ enablePlugin() { let priv = privatePool.get(this); let initialSettings = this.hot.getSettings().manualColumnMove; let <API key> = this.<API key>(); this.handleElement = document.createElement('DIV'); this.handleElement.className = priv.handleClassName; this.guideElement = document.createElement('DIV'); this.guideElement.className = priv.guideClassName; this.addHook('modifyCol', (col) => this.onModifyCol(col)); this.addHook('unmodifyCol', (col) => this.onUnmodifyCol(col)); this.addHook('afterRemoveCol', (index, amount) => this.onAfterRemoveCol(index, amount)); this.addHook('afterCreateCol', (index, amount) => this.onAfterCreateCol(index, amount)); this.registerEvents(); if (typeof <API key> != 'undefined') { this.columnPositions = <API key>; } else if (Array.isArray(initialSettings)) { this.columnPositions = initialSettings; } else if (!initialSettings || this.columnPositions === void 0) { this.columnPositions = []; } super.enablePlugin(); } /** * Updates the plugin to use the latest options you have specified. */ updatePlugin() { this.disablePlugin(); this.enablePlugin(); super.updatePlugin(); } /** * Disable the plugin. */ disablePlugin() { let pluginSetting = this.hot.getSettings().manualColumnMove; if (Array.isArray(pluginSetting)) { this.unregisterEvents(); this.columnPositions = []; } super.disablePlugin(); } /** * Bind the events used by the plugin. * * @private */ registerEvents() { this.eventManager.addEventListener(this.hot.rootElement, 'mouseover', (event) => this.onMouseOver(event)); this.eventManager.addEventListener(this.hot.rootElement, 'mousedown', (event) => this.onMouseDown(event)); this.eventManager.addEventListener(window, 'mousemove', (event) => this.onMouseMove(event)); this.eventManager.addEventListener(window, 'mouseup', (event) => this.onMouseUp(event)); } /** * Unbind the events used by the plugin. * * @private */ unregisterEvents() { this.eventManager.clear(); } /** * Save the manual column positions. */ <API key>() { Handsontable.hooks.run(this.hot, 'persistentStateSave', '<API key>', this.columnPositions); } /** * Load the manual column positions. * * @returns {Object} Stored state. */ <API key>() { let storedState = {}; Handsontable.hooks.run(this.hot, 'persistentStateLoad', '<API key>', storedState); return storedState.value; } /** * Complete the manual column positions array to match its length to the column count. */ <API key>() { let columnCount = this.hot.countCols(); if (this.columnPositions.length === columnCount) { return; } rangeEach(0, columnCount - 1, (i) => { if (this.columnPositions.indexOf(i) === -1) { this.columnPositions.push(i); } }); } /** * Setup the moving handle position. * * @param {HTMLElement} TH Currently processed TH element. */ setupHandlePosition(TH) { this.currentTH = TH; let priv = privatePool.get(this); let col = this.hot.view.wt.wtTable.getCoords(TH).col; // getCoords returns <API key> let headerHeight = outerHeight(this.currentTH); if (col >= 0) { // if not row header let box = this.currentTH.<API key>(); priv.currentCol = col; priv.startOffset = box.left; this.handleElement.style.top = box.top + 'px'; this.handleElement.style.left = priv.startOffset + 'px'; this.handleElement.style.height = headerHeight + 'px'; this.hot.rootElement.appendChild(this.handleElement); } } /** * Refresh the moving handle position. * * @param {HTMLElement} TH TH element with the handle. * @param {Number} delta Difference between the related columns. */ <API key>(TH, delta) { let box = TH.<API key>(); let handleWidth = 6; if (delta > 0) { this.handleElement.style.left = (box.left + box.width - handleWidth) + 'px'; } else { this.handleElement.style.left = box.left + 'px'; } } /** * Setup the moving handle position. */ setupGuidePosition() { let box = this.currentTH.<API key>(); let priv = privatePool.get(this); let handleHeight = parseInt(outerHeight(this.handleElement), 10); let <API key> = parseInt(this.handleElement.style.top, 10) + handleHeight; let <API key> = parseInt(this.hot.view.<API key>(0), 10); addClass(this.handleElement, 'active'); addClass(this.guideElement, 'active'); this.guideElement.style.width = box.width + 'px'; this.guideElement.style.height = (<API key> - handleHeight) + 'px'; this.guideElement.style.top = <API key> + 'px'; this.guideElement.style.left = priv.startOffset + 'px'; this.hot.rootElement.appendChild(this.guideElement); } /** * Refresh the moving guide position. * * @param {Number} diff Difference between the starting and current cursor position. */ <API key>(diff) { let priv = privatePool.get(this); this.guideElement.style.left = priv.startOffset + diff + 'px'; } /** * Hide both the moving handle and the moving guide. */ hideHandleAndGuide() { removeClass(this.handleElement, 'active'); removeClass(this.guideElement, 'active'); } /** * Check if the provided element is in the column header. * * @param {HTMLElement} element The DOM element to be checked. * @returns {Boolean} */ checkColumnHeader(element) { if (element != this.hot.rootElement) { let parent = element.parentNode; if (parent.tagName === 'THEAD') { return true; } return this.checkColumnHeader(parent); } return false; } /** * Create the initial column position data. * * @param {Number} len The desired length of the array. */ createPositionData(len) { let positionArr = this.columnPositions; if (positionArr.length < len) { rangeEach(positionArr.length, len - 1, (i) => { positionArr[i] = i; }); } } /** * Get the TH parent element from the provided DOM element. * * @param {HTMLElement} element The DOM element to work on. * @returns {HTMLElement|null} The TH element or null, if element has no TH parents. */ <API key>(element) { if (element.tagName != 'TABLE') { if (element.tagName == 'TH') { return element; } else { return this.<API key>(element.parentNode); } } return null; } /** * Change the column position. It puts the `columnIndex` column after the `destinationIndex` column. * * @param {Number} columnIndex Index of the column to move. * @param {Number} destinationIndex Index of the destination column. */ <API key>(columnIndex, destinationIndex) { let maxLength = Math.max(columnIndex, destinationIndex); if (maxLength > this.columnPositions.length - 1) { this.createPositionData(maxLength + 1); } this.columnPositions.splice(destinationIndex, 0, this.columnPositions.splice(columnIndex, 1)[0]); } /** * Get the visible column index from the provided logical index. * * @param {Number} column Logical column index. * @returns {Number|undefined} Visible column index. */ <API key>(column) { const position = this.columnPositions.indexOf(column); return position === -1 ? void 0 : position; } /** * Get the logical column index from the provided visible index. * * @param {Number} column Visible column index. * @returns {Number|undefined} Logical column index. */ <API key>(column) { return this.columnPositions[column]; } /** * 'mouseover' event callback. * * @private * @param {MouseEvent} event The event object. */ onMouseOver(event) { let priv = privatePool.get(this); if (this.checkColumnHeader(event.target)) { let th = this.<API key>(event.target); if (th) { if (priv.pressed) { let col = this.hot.view.wt.wtTable.getCoords(th).col; if (col >= 0) { // not TH above row header priv.endCol = col; this.<API key>(th, priv.endCol - priv.startCol); } } else { this.setupHandlePosition(th); } } } } /** * 'mousedown' event callback. * * @private * @param {MouseEvent} event The event object. */ onMouseDown(event) { let priv = privatePool.get(this); if (hasClass(event.target, priv.handleClassName)) { priv.startX = pageX(event); this.setupGuidePosition(); priv.pressed = this.hot; priv.startCol = priv.currentCol; priv.endCol = priv.currentCol; } } /** * 'mousemove' event callback. * * @private * @param {MouseEvent} event The event object. */ onMouseMove(event) { let priv = privatePool.get(this); if (priv.pressed) { this.<API key>(pageX(event) - priv.startX); } } /** * 'mouseup' event callback. * * @private * @param {MouseEvent} event The event object. */ onMouseUp(event) { let priv = privatePool.get(this); if (priv.pressed) { this.hideHandleAndGuide(); priv.pressed = false; this.createPositionData(this.hot.countCols()); this.<API key>(priv.startCol, priv.endCol); Handsontable.hooks.run(this.hot, 'beforeColumnMove', priv.startCol, priv.endCol); this.hot.forceFullRender = true; this.hot.view.render(); // updates all this.<API key>(); Handsontable.hooks.run(this.hot, 'afterColumnMove', priv.startCol, priv.endCol); this.setupHandlePosition(this.currentTH); } } /** * 'modifyCol' hook callback. * * @private * @param {Number} col Column index. * @returns {Number} Modified column index. */ onModifyCol(col) { return this.<API key>(col); } /** * 'unmodifyCol' hook callback. * * @private * @param {Number} col Column index. * @returns {Number} Unmodified column index. */ onUnmodifyCol(col) { return this.<API key>(col); } /** * `afterRemoveCol` hook callback. * * @private * @param {Number} index Index of the removed column. * @param {Number} amount Amount of removed columns. */ onAfterRemoveCol(index, amount) { if (!this.isEnabled()) { return; } let rmindx; let colpos = this.columnPositions; // We have removed columns, we also need to remove the indicies from manual column array rmindx = colpos.splice(index, amount); // We need to remap manualColPositions so it remains constant linear from 0->ncols colpos = arrayMap(colpos, function(value, index) { let i, newpos = value; arrayEach(rmindx, (elem, index) => { if (value > elem) { newpos } }); return newpos; }); this.columnPositions = colpos; } /** * `afterCreateCol` hook callback. * * @private * @param {Number} index Index of the created column. * @param {Number} amount Amount of created columns. */ onAfterCreateCol(index, amount) { if (!this.isEnabled()) { return; } let colpos = this.columnPositions; if (!colpos.length) { return; } let addindx = []; rangeEach(0, amount - 1, (i) => { addindx.push(index + i); }); if (index >= colpos.length) { colpos = colpos.concat(addindx); } else { // We need to remap manualColPositions so it remains constant linear from 0->ncols colpos = arrayMap(colpos, function(value, ind) { return (value >= index) ? (value + amount) : value; }); // We have added columns, we also need to add new indicies to column position array colpos.splice.apply(colpos, [index, 0].concat(addindx)); } this.columnPositions = colpos; } /** * `init` hook callback. */ onInit() { this.<API key>(); } } export {ManualColumnMove}; registerPlugin('manualColumnMove', ManualColumnMove); Handsontable.hooks.register('beforeColumnMove'); Handsontable.hooks.register('afterColumnMove'); Handsontable.hooks.register('unmodifyCol');
import { __extends } from "tslib"; import { Container } from "./Container"; import { List, ListDisposer } from "./utils/List"; import { OrderedListTemplate } from "./utils/SortedList"; import { Dictionary } from "./utils/Dictionary"; import { Disposer, MultiDisposer } from "./utils/Disposer"; import { DataSource } from "./data/DataSource"; import { Responsive } from "./utils/Responsive"; import { system } from "./System"; import { DataItem } from "./DataItem"; import { registry } from "./Registry"; import * as $math from "./utils/Math"; import * as $array from "./utils/Array"; import * as $ease from "./utils/Ease"; import * as $utils from "./utils/Utils"; import * as $iter from "./utils/Iterator"; import * as $object from "./utils/Object"; import * as $type from "./utils/Type"; /** * A Component represents an independent functional element or control, that * can have it's own behavior, children, data, etc. * * A few examples of a Component: [[Legend]], [[Series]], [[Scrollbar]]. * * @see {@link IComponentEvents} for a list of available events * @see {@link IComponentAdapters} for a list of available Adapters * @important */ var Component = /** @class */ (function (_super) { __extends(Component, _super); /** * Constructor */ function Component() { var _this = // Init _super.call(this) || this; /** * Holds data field names. * * Data fields define connection beween [[DataItem]] and actual properties * in raw data. */ _this.dataFields = {}; /** * A list of [[DataSource]] definitions of external data source. * * @ignore Exclude from docs */ _this._dataSources = {}; /** * This is used when only new data is invalidated (if added using `addData` * method). * * @ignore Exclude from docs */ _this._parseDataFrom = 0; /** * Holds the disposers for the dataItems and dataUsers * * @ignore Exclude from docs */ _this._dataDisposers = []; /** * Currently selected "data set". * * If it's set to `""`, main data set (unaggregated data) is used. */ _this._currentDataSetId = ""; /** * [_start description] * * @ignore Exclude from docs */ _this._start = 0; /** * [_end description] * * @ignore Exclude from docs */ _this._end = 1; /** * If set to `true`, changing data range in element will not trigger * `daterangechanged` event. */ _this.skipRangeEvent = false; _this.rangeChangeDuration = 0; _this.rangeChangeEasing = $ease.cubicOut; /** * A duration (ms) of each data parsing step. A Component parses its data in * chunks in order to avoid completely freezing the machine when large data * sets are used. This setting will control how many milliseconds should pass * when parsing data until parser stops for a brief moment to let other * processes catch up. */ _this.parsingStepDuration = 50; /** * [dataInvalid description] * * @ignore Exclude from docs * @todo Description */ _this.dataInvalid = false; /** * * @ignore Exclude from docs */ _this.rawDataInvalid = false; /** * [dataRangeInvalid description] * * @ignore Exclude from docs * @todo Description */ _this.dataRangeInvalid = false; /** * [dataItemsInvalid description] * * @ignore Exclude from docs * @todo Description */ _this.dataItemsInvalid = false; _this.<API key> = 0; _this.interpolationEasing = $ease.cubicOut; _this.<API key> = true; _this.<API key> = 0; /** * A progress (0-1) for the data validation process. * * @ignore Exclude from docs */ _this.<API key> = 0; _this._addAllDataItems = true; _this._usesData = true; _this.className = "Component"; _this.minZoomCount = 1; _this.maxZoomCount = 0; _this._dataItems = new OrderedListTemplate(_this.createDataItem()); _this._dataItems.events.on("inserted", _this.handleDataItemAdded, _this, false); _this._dataItems.events.on("removed", _this.<API key>, _this, false); _this._disposers.push(new ListDisposer(_this._dataItems)); _this._disposers.push(_this._dataItems.template); _this.invalidateData(); // TODO what about remove ? _this.dataUsers.events.on("inserted", _this.handleDataUserAdded, _this, false); // Set up disposers _this._disposers.push(new MultiDisposer(_this._dataDisposers)); _this._start = 0; _this._end = 1; _this.maxZoomDeclination = 1; // Apply theme _this.applyTheme(); return _this; } /** * Returns a new/empty DataItem of the type appropriate for this object. * * @see {@link DataItem} * @return Data Item */ Component.prototype.createDataItem = function () { return new DataItem(); }; /** * [handleDataUserAdded description] * * @ignore Exclude from docs * @todo Description * @param event Event object */ Component.prototype.handleDataUserAdded = function (event) { var dataUser = event.newValue; dataUser.dataProvider = this; }; /** * [<API key> description] * * @ignore Exclude from docs * @todo Description */ Component.prototype.<API key> = function (dataItem, name) { if (!this.dataItemsInvalid) { this.invalidateDataItems(); } }; /** * [<API key> description] * * @ignore Exclude from docs */ Component.prototype.<API key> = function (dataItem, name) { }; /** * [<API key> description] * * @ignore Exclude from docs */ Component.prototype.<API key> = function (dataItem, name) { }; /** * [<API key> description] * * @ignore Exclude from docs */ Component.prototype.<API key> = function (dataItem, name) { }; /** * [<API key> description] * * @ignore Exclude from docs */ Component.prototype.<API key> = function (dataItem, name) { }; /** * Populates a [[DataItem]] width data from data source. * * Loops through all the fields and if such a field is found in raw data * object, a corresponding value on passed in `dataItem` is set. * * @ignore Exclude from docs * @param item */ Component.prototype.processDataItem = function (dataItem, dataContext) { var _this = this; if (dataItem) { if (!dataContext) { dataContext = {}; } // store reference to original data item dataItem.dataContext = dataContext; var hasSomeValues_1 = false; $object.each(this.dataFields, function (key, fieldValue) { var fieldName = key; var value = dataContext[fieldValue]; // Apply adapters to a retrieved value if (_this._adapterO) { if (_this._adapterO.isEnabled("dataContextValue")) { value = _this._adapterO.apply("dataContextValue", { field: fieldName, value: value, dataItem: dataItem }).value; } } if ($type.hasValue(value)) { hasSomeValues_1 = true; if (dataItem.hasChildren[fieldName]) { var template = _this.createDataItem(); template.copyFrom(_this.mainDataSet.template); var children = new OrderedListTemplate(template); children.events.on("inserted", _this.handleDataItemAdded, _this, false); children.events.on("removed", _this.<API key>, _this, false); _this._dataDisposers.push(new ListDisposer(children)); var count = value.length; for (var i = 0; i < count; i++) { var rawDataItem = value[i]; var childDataItem = children.create(); childDataItem.parent = dataItem; _this.processDataItem(childDataItem, rawDataItem); } var anyDataItem = dataItem; anyDataItem[fieldName] = children; } else { // data is converted to numbers/dates in each dataItem dataItem[fieldName] = value; } } }); $object.each(this.propertyFields, function (key, fieldValue) { var f = key; var value = dataContext[fieldValue]; if ($type.hasValue(value)) { hasSomeValues_1 = true; dataItem.setProperty(f, value); } }); // @todo we might need some flag which would tell whether we should create empty data items or not. if (!this._addAllDataItems && !hasSomeValues_1) { this.mainDataSet.remove(dataItem); } } }; /** * * When validating raw data, instead of processing data item, we update it * * @ignore Exclude from docs * @param item */ Component.prototype.updateDataItem = function (dataItem) { var _this = this; if (dataItem) { var dataContext_1 = dataItem.dataContext; $object.each(this.dataFields, function (key, fieldValue) { var fieldName = key; var value = dataContext_1[fieldValue]; // Apply adapters to a retrieved value if (_this._adapterO) { value = _this._adapterO.apply("dataContextValue", { field: fieldName, value: value, dataItem: dataItem }).value; } if ($type.hasValue(value)) { if (dataItem.hasChildren[fieldName]) { var anyDataItem = dataItem; var children = (anyDataItem[fieldName]); children.each(function (child) { _this.updateDataItem(child); }); } else { // data is converted to numbers/dates in each dataItem dataItem[fieldName] = value; } } }); $object.each(this.propertyFields, function (key, fieldValue) { var f = key; var value = dataContext_1[fieldValue]; if ($type.hasValue(value)) { dataItem.setProperty(f, value); } }); } }; /** * [<API key> description] * * @ignore Exclude from docs * @todo Description */ Component.prototype.<API key> = function () { var count = this.endIndex; for (var i = this.startIndex; i < count; i++) { var dataItem = this.dataItems.getIndex(i); // TODO is this correct if (dataItem) { this.validateDataElement(dataItem); } } }; /** * Validates this element and its related elements. * * @ignore Exclude from docs */ Component.prototype.validate = function () { this.<API key>(); _super.prototype.validate.call(this); }; /** * [validateDataElement description] * * @ignore Exclude from docs * @param dataItem [description] */ Component.prototype.validateDataElement = function (dataItem) { }; /** * Adds one or several (array) of data items to the existing data. * * @param rawDataItem One or many raw data item objects */ Component.prototype.addData = function (rawDataItem, removeCount, skipRaw) { var _this = this; // need to check if data is invalid, as addData might be called multiple times if (!this.dataInvalid && this.inited) { this._parseDataFrom = this.data.length; // save length of parsed data } if (!skipRaw) { if (rawDataItem instanceof Array) { // can't use concat because new array is returned $array.each(rawDataItem, function (dataItem) { _this.data.push(dataItem); }); } else { this.data.push(rawDataItem); // add to raw data array } } if (this.inited) { this.removeData(removeCount, skipRaw); } else { if ($type.isNumber(removeCount)) { while (removeCount > 0) { this.data.shift(); removeCount } } } this.invalidateData(); }; /** * Removes elements from the beginning of data * * @param count number of elements to remove */ Component.prototype.removeData = function (count, skipRaw) { if ($type.isNumber(count) && count > 0) { while (count > 0) { var dataItem = this.mainDataSet.getIndex(0); if (dataItem) { this.mainDataSet.remove(dataItem); } this.dataUsers.each(function (dataUser) { if (!dataUser.data || dataUser.data.length == 0) { var dataItem_1 = dataUser.mainDataSet.getIndex(0); if (dataItem_1) { dataUser.mainDataSet.remove(dataItem_1); } } }); if (!skipRaw) { this.data.shift(); } if (this._parseDataFrom > 0) { this._parseDataFrom } count } // changed from invalidateData since 4.7.19 to solve #51551 this.invalidateDataItems(); } }; /** * Triggers a data (re)parsing. * * @ignore Exclude from docs */ Component.prototype.invalidateData = function () { if (this.disabled || this.isTemplate) { return; } //if(!this.dataInvalid){ registry.<API key>(this); system.requestFrame(); this.dataInvalid = true; $iter.each(this.dataUsers.iterator(), function (x) { x.invalidateDataItems(); }); }; /** * [invalidateDataUsers description] * * @ignore Exclude from docs * @todo Description */ Component.prototype.invalidateDataUsers = function () { $iter.each(this.dataUsers.iterator(), function (x) { x.invalidate(); }); }; /** * Invalidates data values. When data array is not changed, but values within * it changes, we invalidate data so that component would process changes. * * @ignore Exclude from docs */ Component.prototype.invalidateDataItems = function () { if (this.disabled || this.isTemplate) { return; } //if(!this.dataItemsInvalid){ $array.move(registry.invalidDataItems, this); system.requestFrame(); this.dataItemsInvalid = true; $iter.each(this.dataUsers.iterator(), function (x) { x.invalidateDataItems(); }); }; /** * Invalidates data range. This is done when data which must be shown * changes (chart is zoomed for example). * * @ignore Exclude from docs */ Component.prototype.invalidateDataRange = function () { if (this.disabled || this.isTemplate) { return; } //if(!this.dataRangeInvalid){ this.dataRangeInvalid = true; $array.move(registry.invalidDataRange, this); system.requestFrame(); }; /** * Processes data range. * * @todo Description * @ignore Exclude from docs */ Component.prototype.validateDataRange = function () { $array.remove(registry.invalidDataRange, this); this.dataRangeInvalid = false; if (this.startIndex != this._prevStartIndex || this.endIndex != this._prevEndIndex) { this.rangeChangeUpdate(); this.appendDataItems(); this.invalidate(); this.dispatchImmediately("datarangechanged"); } }; /** * [sliceData description] * * @todo Description * @ignore Exclude from docs */ Component.prototype.sliceData = function () { this._workingStartIndex = this.startIndex; this._workingEndIndex = this.endIndex; }; /** * [rangeChangeUpdate description] * * @todo Description * @ignore Exclude from docs */ Component.prototype.rangeChangeUpdate = function () { this.sliceData(); this._prevStartIndex = this.startIndex; this._prevEndIndex = this.endIndex; }; /** * [appendDataItems description] * * @todo Description * @ignore Exclude from docs */ Component.prototype.appendDataItems = function () { // TODO use an iterator instead var count = this.endIndex; for (var i = this.startIndex; i < count; i++) { // data item var dataItem = this.dataItems.getIndex(i); if (dataItem) { dataItem.__disabled = false; } } for (var i = 0; i < this.startIndex; i++) { var dataItem = this.dataItems.getIndex(i); if (dataItem) { dataItem.__disabled = true; } } for (var i = this.endIndex; i < this.dataItems.length; i++) { var dataItem = this.dataItems.getIndex(i); if (dataItem) { dataItem.__disabled = true; } } }; /** * If you want to have a smooth transition from one data values to another, you change your raw data and then you must call this method. * then instead of redrawing everything, the chart will check raw data and smoothly transit from previous to new data */ Component.prototype.invalidateRawData = function () { if (this.disabled || this.isTemplate) { return; } //if(!this.rawDataInvalid){ $array.move(registry.invalidRawDatas, this); system.requestFrame(); this.rawDataInvalid = true; $iter.each(this.dataUsers.iterator(), function (x) { x.invalidateRawData(); }); }; /** * @ignore */ Component.prototype.validateRawData = function () { var _this = this; $array.remove(registry.invalidRawDatas, this); $iter.each(this.mainDataSet.iterator(), function (dataItem) { if (dataItem) { _this.updateDataItem(dataItem); } }); }; /** * Destroys this object and all related data. */ Component.prototype.dispose = function () { var _this = this; this.mainDataSet.template.clones.clear(); $object.each(this._dataSources, function (key, source) { _this.removeDispose(source); }); this.disposeData(); _super.prototype.dispose.call(this); }; /** * @ignore */ Component.prototype.disposeData = function () { this.mainDataSet.template.clones.clear(); $array.each(this._dataDisposers, function (x) { x.dispose(); }); // and for all components $iter.each(this.dataUsers.iterator(), function (dataUser) { dataUser.disposeData(); }); this._dataDisposers.length = 0; this._startIndex = undefined; this._endIndex = undefined; // dispose old this.mainDataSet.clear(); this.mainDataSet.template.clones.clear(); if (this._dataSets) { this._dataSets.clear(); } }; Component.prototype.getDataItem = function (dataContext) { return this.mainDataSet.create(); }; /** * Validates (processes) data. * * @ignore Exclude from docs */ Component.prototype.validateData = function () { this.dispatchImmediately("beforedatavalidated"); this.dataInvalid = false; registry.<API key>(this); if (this.__disabled) { return; } this.<API key> = 0; // need this to slice new data this._prevStartIndex = undefined; this._prevEndIndex = undefined; // todo: this needs some overthinking, maybe some extra settings like zoomOotonDataupdate like in v3 or so. some charts like pie chart probably should act like this always this._startIndex = undefined; this._endIndex = undefined; if (this.dataFields.data && this.dataItem) { var dataContext = this.dataItem.dataContext; this._data = dataContext[this.dataFields.data]; } // data items array is reset only if all data is validated, if _parseDataFrom is not 0, we append new data only // check heatmap demo if uncommented // fixed both issues by adding && this.data.length > 0 // check adding series example if changed if (this._parseDataFrom === 0 && this.data.length > 0) { this.disposeData(); } if (this.data.length > 0) { var preloader = this.preloader; // and for all components $iter.each(this.dataUsers.iterator(), function (dataUser) { // todo: this needs some overthinking, maybe some extra settings like zoomOUtonDataupdate like in v3 or so. some charts like pie chart probably should act like this always dataUser._startIndex = undefined; dataUser._endIndex = undefined; }); var counter = 0; var startTime = Date.now(); // parse data var i = this._parseDataFrom; var n = this.data.length; var _loop_1 = function () { var rawDataItem = this_1.data[i]; if (this_1._usesData) { var dataItem = this_1.getDataItem(rawDataItem); this_1.processDataItem(dataItem, rawDataItem); } this_1.dataUsers.each(function (dataUser) { if (dataUser.data.length == 0) { // checking if data is not set directly var dataUserDataItem = dataUser.getDataItem(rawDataItem); dataUser.processDataItem(dataUserDataItem, rawDataItem); } }); counter++; // show preloader if this takes too many time if (counter == 100) { // no need to check it on each data item counter = 0; var elapsed = Date.now() - startTime; if (elapsed > this_1.parsingStepDuration) { if (i < this_1.data.length - 10) { this_1._parseDataFrom = i + 1; // update preloader if (preloader) { if (i / this_1.data.length > 0.5 && !preloader.visible) { // do not start showing } else { preloader.progress = i / this_1.data.length; } } this_1.<API key> = i / this_1.data.length; i = this_1.data.length; // stops cycle this_1.invalidateData(); return { value: void 0 }; } } } }; var this_1 = this; for (i; i < n; i++) { var state_1 = _loop_1(); if (typeof state_1 === "object") return state_1.value; } if (preloader) { preloader.progress = 1; } this.dataUsers.each(function (dataUser) { if (dataUser.hidden) { dataUser.hide(0); } }); } this.<API key> = 1; this._parseDataFrom = 0; // reset this index, it is set to dataItems.length if addData() method was used. this.invalidateDataItems(); if (!this.<API key>) { this.<API key>(); } this.dispatch("datavalidated"); // can't zoom chart if dispatched immediately }; /** * Validates (processes) data items. * * @ignore Exclude from docs */ Component.prototype.validateDataItems = function () { $array.remove(registry.invalidDataItems, this); this.dataItemsInvalid = false; this.invalidateDataRange(); this.invalidate(); this.dispatch("dataitemsvalidated"); }; Object.defineProperty(Component.prototype, "data", { /** * Returns element's source (raw) data. * * @return Data */ get: function () { if (!this._data) { this._data = []; } if (!this._adapterO) { return this._data; } else { return this._adapterO.apply("data", this._data); } }, set: function (value) { this.setData(value); }, enumerable: true, configurable: true }); Component.prototype.setData = function (value) { // array might be the same, but there might be items added // todo: check if array changed, toString maybe? if (!this.isDisposed()) { this._parseDataFrom = 0; this.disposeData(); this._data = value; if (value && value.length > 0) { this.invalidateData(); } else { this.dispatchImmediately("beforedatavalidated"); this.dispatch("datavalidated"); } } }; /** * Returns (creates if necessary) a [[DataSource]] bound to any specific * property. * * For example if I want to bind `data` to an external JSON file, I'd create * a DataSource for it. * * @param property Property to bind external data to * @return A DataSource for property */ Component.prototype.getDataSource = function (property) { var _this = this; if (!$type.hasValue(this._dataSources[property])) { this._dataSources[property] = new DataSource(); this._dataSources[property].component = this; this.setDataSourceEvents(this._dataSources[property], property); this._dataSources[property].adapter.add("dateFields", function (val) { return _this.<API key>(val); }); this._dataSources[property].adapter.add("numberFields", function (val) { return _this.<API key>(val); }); this.events.on("inited", function () { _this.loadData(property); }, this, false); } return this._dataSources[property]; }; Object.defineProperty(Component.prototype, "dataSource", { /** * @return Data source */ get: function () { if (!this._dataSources["data"]) { this.getDataSource("data"); } return this._dataSources["data"]; }, set: function (value) { var _this = this; if (this._dataSources["data"]) { this.removeDispose(this._dataSources["data"]); } this._dataSources["data"] = value; this._dataSources["data"].component = this; this.events.on("inited", function () { _this.loadData("data"); }, this, false); this.setDataSourceEvents(value, "data"); }, enumerable: true, configurable: true }); /** * Initiates loading of the external data via [[DataSource]]. * * @ignore Exclude from docs */ Component.prototype.loadData = function (property) { this._dataSources[property].load(); }; /** * This function is called by the [[DataSource]]'s `dateFields` adapater * so that particular chart types can popuplate this setting with their * own type-specific data fields so they are parsed properly. * * @ignore Exclude from docs * @param value Array of date fields * @return Array of date fields populated with chart's date fields */ Component.prototype.<API key> = function (value) { return value; }; /** * This function is called by the [[DataSource]]'s `numberFields` adapater * so that particular chart types can popuplate this setting with their * own type-specific data fields so they are parsed properly. * * @ignore Exclude from docs * @param value Array of number fields * @return Array of number fields populated with chart's number fields */ Component.prototype.<API key> = function (value) { return value; }; /** * * @ignore Exclude from docs * @todo Description * @param list [description] * @param dataFields [description] * @param targetList [description] * @return [description] */ Component.prototype.<API key> = function (list, dataFields, targetList) { $array.each(targetList, function (value) { if (dataFields[value] && $array.indexOf(list, dataFields[value]) === -1) { list.push(dataFields[value]); } }); return list; }; /** * Sets events on a [[DataSource]]. * * @ignore Exclude from docs */ Component.prototype.setDataSourceEvents = function (ds, property) { var _this = this; ds.events.on("started", function (ev) { var preloader = _this.preloader; if (preloader) { preloader.progress = 0; //preloader.label.text = this.language.translate("Loading"); } }, undefined, false); ds.events.on("loadstarted", function (ev) { var preloader = _this.preloader; if (preloader) { preloader.progress = 0.25; } }, undefined, false); ds.events.on("loadended", function (ev) { var preloader = _this.preloader; if (preloader) { preloader.progress = 0.5; } }, undefined, false); ds.events.on("parseended", function (ev) { var preloader = _this.preloader; if (preloader) { preloader.progress = 0.75; } }, undefined, false); ds.events.on("ended", function (ev) { var preloader = _this.preloader; if (preloader) { preloader.progress = 1; } }, undefined, false); ds.events.on("error", function (ev) { var preloader = _this.preloader; if (preloader) { preloader.progress = 1; } _this.openModal(ev.message); }, undefined, false); if (property) { ds.events.on("done", function (ev) { var preloader = _this.preloader; if (preloader) { preloader.progress = 1; } if (property == "data" && !$type.isArray(ev.data)) { ev.data = [ev.data]; } if (ds.incremental && property == "data" && _this.data.length) { _this.addData(ev.data, ds.keepCount ? ev.data.length : 0); } else if (ds.updateCurrentData && property == "data" && _this.data.length) { // cycle through existing data items $array.each(_this.data, function (item, index) { if ($type.hasValue(ev.data[index])) { $object.each(item, function (key, val) { if ($type.hasValue(ev.data[index][key])) { item[key] = ev.data[index][key]; } }); } }); _this.invalidateRawData(); } else { _this[property] = ev.data; } }); } }; Object.defineProperty(Component.prototype, "responsive", { /** * @return Responsive rules handler */ get: function () { if (!this._responsive) { this._responsive = new Responsive(); this._responsive.component = this; } return this._responsive; }, /** * A [[Responsive]] instance to be used when applying conditional * property values. * * NOTE: Responsive features are currently in development and may not work * as expected, if at all. * * @param value Responsive rules handler */ set: function (value) { this._responsive = value; this._responsive.component = this; }, enumerable: true, configurable: true }); /** * Sets current zoom. * * The range uses relative values from 0 to 1, with 0 marking beginning and 1 * marking end of the available data range. * * This method will not have any effect when called on a chart object. * Since the chart can have a number of axes and series, each with its own * data, the meaning of "range" is very ambiguous. * * To zoom the chart use `zoom*` methods on its respective axes. * * @param range Range * @param skipRangeEvent Should rangechanged event not be triggered? * @param instantly Do not animate? * @return Actual modidied range (taking `maxZoomFactor` into account) */ Component.prototype.zoom = function (range, skipRangeEvent, instantly, declination) { var _this = this; if (skipRangeEvent === void 0) { skipRangeEvent = false; } if (instantly === void 0) { instantly = false; } var start = range.start; var end = range.end; var priority = range.priority; if (range.start == range.end) { range.start = range.start - 0.5 / this.maxZoomFactor; range.end = range.end + 0.5 / this.maxZoomFactor; } if (priority == "end" && end == 1 && start != 0) { if (start < this.start) { priority = "start"; } } if (priority == "start" && start == 0) { if (end > this.end) { priority = "end"; } } if (!$type.isNumber(declination)) { declination = this.maxZoomDeclination; } if (!$type.isNumber(start) || !$type.isNumber(end)) { return { start: this.start, end: this.end }; } if (this._finalStart != start || this._finalEnd != end) { var maxZoomFactor = this.maxZoomFactor / this.minZoomCount; var minZoomFactor = this.maxZoomFactor / this.maxZoomCount; // most likely we are dragging left scrollbar grip here, so we tend to modify end if (priority == "start") { if (this.maxZoomCount > 0) { // add to the end if (1 / (end - start) < minZoomFactor) { end = start + 1 / minZoomFactor; } } // add to the end if (1 / (end - start) > maxZoomFactor) { end = start + 1 / maxZoomFactor; } //unless end is > 0 if (end > 1 && end - start < 1 / maxZoomFactor) { //end = 1; start = end - 1 / maxZoomFactor; } } // most likely we are dragging right, so we modify left else { if (this.maxZoomCount > 0) { // add to the end if (1 / (end - start) < minZoomFactor) { start = end - 1 / minZoomFactor; } } // remove from start if (1 / (end - start) > maxZoomFactor) { start = end - 1 / maxZoomFactor; } if (start < 0 && end - start < 1 / maxZoomFactor) { //start = 0; end = start + 1 / maxZoomFactor; } } if (start < -declination) { start = -declination; } if (1 / (end - start) > maxZoomFactor) { end = start + 1 / maxZoomFactor; } if (end > 1 + declination) { end = 1 + declination; } if (1 / (end - start) > maxZoomFactor) { start = end - 1 / maxZoomFactor; } this._finalEnd = end; this._finalStart = start; this.skipRangeEvent = skipRangeEvent; this.dispatchImmediately("rangechangestarted"); if (this.rangeChangeDuration > 0 && !instantly) { // todo: maybe move this to Animation var <API key> = this.<API key>; if (<API key> && <API key>.progress < 1) { var options = <API key>.animationOptions; if (options.length > 1) { if (options[0].to == start && options[1].to == end) { return { start: start, end: end }; } else { if (!<API key>.isDisposed()) { <API key>.stop(); } } } } if (this.<API key>) { this.<API key>.kill(); } <API key> = this.animate([{ property: "start", to: start }, { property: "end", to: end }], this.rangeChangeDuration, this.rangeChangeEasing); this.<API key> = <API key>; if (<API key> && !<API key>.isFinished()) { <API key>.events.on("animationended", function () { _this.dispatchImmediately("rangechangeended"); }); } else { this.dispatchImmediately("rangechangeended"); } } else { this.start = start; this.end = end; this.dispatch("rangechangeended"); } } return { start: start, end: end }; }; /** * Zooms to specific data items using their index in data. * * This method will not have any effect when called on a chart object. * Since the chart can have a number of axes and series, each with its own * data, the meaning of "index" is very ambiguous. * * To zoom the chart use `zoom*` methods on its respective axes. * * @param startIndex Index of the starting data item * @param endIndex Index of the ending data item * @param skipRangeEvent Should rangechanged event not be triggered? * @param instantly Do not animate? */ Component.prototype.zoomToIndexes = function (startIndex, endIndex, skipRangeEvent, instantly) { if (!$type.isNumber(startIndex) || !$type.isNumber(endIndex)) { return; } var start = startIndex / this.dataItems.length; var end = endIndex / this.dataItems.length; this.zoom({ start: start, end: end }, skipRangeEvent, instantly); }; Object.defineProperty(Component.prototype, "zoomFactor", { /** * A current zoom factor (0-1). 1 meaning fully zoomed out. (showing all of * the available data) * * @return Zoom factor */ get: function () { return $math.fitToRange(1 / (this.end - this.start), 1, this.maxZoomFactor); }, enumerable: true, configurable: true }); Object.defineProperty(Component.prototype, "maxZoomFactor", { /** * @return Maximum zoomFactor */ get: function () { return this.getPropertyValue("maxZoomFactor"); }, /** * Max available `zoomFactor`. * * The element will not allow zoom to occur beyond this factor. * * [[DateAxis]] and [[CategoryAxis]] calculate this atutomatically so that * category axis could be zoomed to one category and date axis allows to be * zoomed up to one base interval. * * In case you want to restrict category or date axis to be zoomed to more * than one category or more than one base interval, use `minZoomCount` * property (set it to `> 1`). * * Default value of [[ValueAxis]]'s `maxZoomFactor` is `1000`. * * Feel free to modify it to allow bigger zoom or to restrict zooming. * * @param value Maximum zoomFactor */ set: function (value) { if (this.setPropertyValue("maxZoomFactor", value)) { if (value == 1) { this.maxZoomDeclination = 0; } this.invalidateDataRange(); } }, enumerable: true, configurable: true }); Object.defineProperty(Component.prototype, "maxZoomDeclination", { /** * @ignore * @return Maximum zoom declination */ get: function () { return this.getPropertyValue("maxZoomDeclination"); }, /** * Max zoom declination. * * @ignore * @default 1 * @param value Maximum zoom declination */ set: function (value) { if (this.setPropertyValue("maxZoomDeclination", value)) { this.invalidateDataRange(); } }, enumerable: true, configurable: true }); Object.defineProperty(Component.prototype, "startIndex", { /** * Current starting index. * * @return Start index */ get: function () { if (!$type.isNumber(this._startIndex)) { this._startIndex = 0; } return this._startIndex; }, /** * Sets current starting index. * * @ignore Exclude from docs * @param value Start index */ set: function (value) { this._startIndex = $math.fitToRange(Math.round(value), 0, this.dataItems.length); //this._workingStartIndex = this._startIndex; // not good, breaks adjusted working start index of line series this.start = this.indexToPosition(this._startIndex); }, enumerable: true, configurable: true }); /** * @ignore * @todo:review description * returns item's relative position by the index of the item * @param index */ Component.prototype.indexToPosition = function (index) { return index / this.dataItems.length; }; Object.defineProperty(Component.prototype, "endIndex", { /** * Current ending index. * * @return End index */ get: function () { var count = this.dataItems.length; if (!$type.isNumber(this._endIndex) || this._endIndex > count) { this._endIndex = count; } return this._endIndex; }, /** * Sets current ending index. * * @ignore Exclude from docs * @param value End index */ set: function (value) { this._endIndex = $math.fitToRange(Math.round(value), 0, this.dataItems.length); //this._workingEndIndex = this._endIndex; // not good, breaks adjusted workingend index of line series this.end = this.indexToPosition(this._endIndex); }, enumerable: true, configurable: true }); Object.defineProperty(Component.prototype, "start", { /** * @return Start (0-1) */ get: function () { if (!this._adapterO) { return this._start; } else { return this._adapterO.apply("start", this._start); } }, /** * Start of the current data range (zoom). * * These are relative values from 0 (beginning) to 1 (end). * * @param value Start (0-1) */ set: function (value) { // value = $math.round(value, 10); not good //if (1 / (this.end - value) > this.maxZoomFactor) { // value = this.end - 1 / this.maxZoomFactor; if (this._start != value) { this._start = value; var startIndex = Math.max(0, Math.floor(this.dataItems.length * value) || 0); this._startIndex = Math.min(startIndex, this.dataItems.length); this.invalidateDataRange(); this.invalidate(); this.dispatchImmediately("startchanged"); this.dispatch("startendchanged"); } }, enumerable: true, configurable: true }); Object.defineProperty(Component.prototype, "end", { /** * @return End (0-1) */ get: function () { if (!this._adapterO) { return this._end; } else { return this._adapterO.apply("end", this._end); } }, /** * End of the current data range (zoom). * * These are relative values from 0 (beginning) to 1 (end). * * @param value End (0-1) */ set: function (value) { // value = $math.round(value, 10); // not good //if (1 / (value - this.start) > this.maxZoomFactor) { // value = 1 / this.maxZoomFactor + this.start; if (this._end != value) { this._end = value; this._endIndex = Math.min(this.dataItems.length, Math.ceil(this.dataItems.length * value) || 0); this.invalidateDataRange(); this.invalidate(); this.dispatchImmediately("endchanged"); this.dispatch("startendchanged"); } }, enumerable: true, configurable: true }); /** * [removeFromInvalids description] * * @ignore Exclude from docs * @todo Description */ Component.prototype.removeFromInvalids = function () { _super.prototype.removeFromInvalids.call(this); registry.<API key>(this); $array.remove(registry.invalidDataItems, this); $array.remove(registry.invalidDataRange, this); $array.remove(registry.invalidRawDatas, this); }; Object.defineProperty(Component.prototype, "dataItems", { /** * Returns a list of source [[DataItem]] objects currently used in the chart. * * @return List of data items */ get: function () { if (this._currentDataSetId != "") { var dataItems = this.dataSets.getKey(this._currentDataSetId); if (dataItems) { return dataItems; } } return this._dataItems; }, enumerable: true, configurable: true }); Object.defineProperty(Component.prototype, "dataSets", { /** * Holds data items for data sets (usually aggregated data). * * @ignore * @since 4.7.0 * @return Data sets */ get: function () { if (!this._dataSets) { this._dataSets = new Dictionary(); } return this._dataSets; }, enumerable: true, configurable: true }); /** * Makes the chart use particular data set. * * If `id` is not provided or there is no such data set, main data will be * used. * * @ignore * @since 4.7.0 * @param id Data set id */ Component.prototype.setDataSet = function (id) { if (this._currentDataSetId != id) { var dataSet = this.dataSets.getKey(id); if (!dataSet) { if (this._currentDataSetId != "") { this.dataItems.each(function (dataItem) { dataItem.__disabled = true; }); this._currentDataSetId = ""; this.invalidateDataRange(); this._prevStartIndex = undefined; this.dataItems.each(function (dataItem) { dataItem.__disabled = false; }); return true; } } else { this.dataItems.each(function (dataItem) { dataItem.__disabled = true; }); this._currentDataSetId = id; this.invalidateDataRange(); this._prevStartIndex = undefined; this.dataItems.each(function (dataItem) { dataItem.__disabled = false; }); return true; } } return false; }; Object.defineProperty(Component.prototype, "currentDataSetId", { /** * Returns id of the currently used data set, or `undefined` if main data set * is in use. * * @since 4.7.0 * @return Current data set id */ get: function () { return this._currentDataSetId; }, enumerable: true, configurable: true }); Object.defineProperty(Component.prototype, "mainDataSet", { /** * Returns reference to "main" data set (unaggregated data as it was supplied * in `data`). * * @since 4.7.0 * @return Main data set */ get: function () { return this._dataItems; }, enumerable: true, configurable: true }); /** * Updates the indexes for the dataItems * * @ignore Exclude from docs */ Component.prototype.<API key> = function (startIndex) { var dataItems = this.mainDataSet.values; var length = dataItems.length; for (var i = startIndex; i < length; ++i) { dataItems[i]._index = i; } }; /** * Processes newly added [[DataItem]] as well as triggers data re-validation. * * @ignore Exclude from docs * @param event [description] */ Component.prototype.handleDataItemAdded = function (event) { event.newValue.component = this; this.<API key>(event.index); if (!this.dataItemsInvalid) { this.invalidateDataItems(); } }; /** * removes [[DataItem]] as well as triggers data re-validation. * * @ignore Exclude from docs * @param event [description] */ Component.prototype.<API key> = function (event) { // event.oldValue.component = undefined; // not good, as some items might be not removed from component lists this.<API key>(event.index); if (!this.dataItemsInvalid) { this.invalidateDataItems(); } }; /** * Binds a data element's field to a specific field in raw data. * For example, for the very basic column chart you'd want to bind a `value` * field to a field in data, such as `price`. * * Some more advanced Components, like [[CandlestickSeries]] need several * data fields bound to data, such as ones for open, high, low and close * values. * * @todo Example * @param field Field name * @param value Field name in data */ Component.prototype.bindDataField = function (field, value) { this.dataFields[field] = value; this.invalidateDataRange(); }; /** * Invalidates processed data. * * @ignore Exclude from docs */ Component.prototype.<API key> = function () { this.resetProcessedRange(); this.invalidateDataRange(); }; /** * [resetProcessedRange description] * * @ignore Exclude from docs * @todo Description */ Component.prototype.resetProcessedRange = function () { this._prevEndIndex = null; this._prevStartIndex = null; }; Object.defineProperty(Component.prototype, "dataUsers", { /** * Returns all other [[Component]] objects that are using this element's * data. * * @ignore Exclude from docs * @todo Description (review) * @return [description] */ get: function () { var _this = this; if (!this._dataUsers) { this._dataUsers = new List(); //this._disposers.push(new ListDisposer(this._dataUsers)); // TODO better way of handling this? e.g. move into another module ? this._disposers.push(new Disposer(function () { // TODO clear the list ? $iter.each(_this._dataUsers.iterator(), function (x) { x.dispose(); }); })); } return this._dataUsers; }, enumerable: true, configurable: true }); /** * Returns a clone of this element. * * @return Clone */ Component.prototype.clone = function () { var component = _super.prototype.clone.call(this); component.dataFields = $utils.copyProperties(this.dataFields, {}); return component; }; /** * Copies all parameters from another [[Component]]. * * @param source Source Component */ Component.prototype.copyFrom = function (source) { _super.prototype.copyFrom.call(this, source); this.data = source.data; this.<API key> = source.<API key>; this.<API key> = source.<API key>; this.<API key> = source.<API key>; this.interpolationEasing = source.interpolationEasing; }; /** * Invalidates the whole element, including all its children, causing * complete re-parsing of data and redraw. * * Use sparingly! */ Component.prototype.reinit = function () { this._inited = false; this.deepInvalidate(); }; /** * Add an adapter for data. * * @return Exporting */ Component.prototype.getExporting = function () { var _export = _super.prototype.getExporting.call(this); if (!_export.adapter.has("data", this._exportData, -1, this)) { _export.adapter.add("data", this._exportData, -1, this); this.events.on("datavalidated", function (ev) { _export.handleDataUpdated(); }); } return _export; }; Component.prototype._exportData = function (arg) { arg.data = this.data; return arg; }; Component.prototype.setDisabled = function (value) { var changed = _super.prototype.setDisabled.call(this, value); if (changed) { this.invalidateData(); } return changed; }; /** * @ignore */ Component.prototype.setShowOnInit = function (value) { if (value != this.getPropertyValue("showOnInit")) { if (value && !this.inited && !this.hidden) { this.<API key> = this.events.once("dataitemsvalidated", this.hideInitially, this, false); this._disposers.push(this.<API key>); } else { if (this.<API key>) { this.removeDispose(this.<API key>); } } } // important order here _super.prototype.setShowOnInit.call(this, value); }; Component.prototype.setBaseId = function (value) { if (value != this._baseId) { if (this.dataInvalid) { this.dataInvalid = false; registry.<API key>(this); this._baseId = value; this.invalidateData(); } } _super.prototype.setBaseId.call(this, value); }; Object.defineProperty(Component.prototype, "minZoomCount", { /** * @return Min zoom count */ get: function () { return this.getPropertyValue("minZoomCount"); }, /** * Use this for [[CategoryAxis]] or [[DateAxis]]. * * Allows restricting zoom in beyond certain number of categories or base * intervals. * * @default 1 * @param value Min zoom count */ set: function (value) { this.setPropertyValue("minZoomCount", value); }, enumerable: true, configurable: true }); Object.defineProperty(Component.prototype, "maxZoomCount", { /** * @return Max zoom count */ get: function () { return this.getPropertyValue("maxZoomCount"); }, /** * Use this for [[CategoryAxis]] or [[DateAxis]]. * * Limits how many categories or base intervals can be shown at the same * time. * * If there are more items in the chart, the chart will auto-zoom. * * @default 0 (no limit) * @since 4.6.2 * @param value Max zoom count */ set: function (value) { this.setPropertyValue("maxZoomCount", value); }, enumerable: true, configurable: true }); /** * Called during the System.update method * * @ignore Exclude from docs */ Component.prototype.<API key> = function () { if (this.dataInvalid || (this.dataProvider && this.dataProvider.dataInvalid)) { return false; } else { return true; } }; /** * Adds easing functions to "function" fields. * * @param field Field name * @return Assign as function? */ Component.prototype.asFunction = function (field) { return field == "interpolationEasing" || field == "rangeChangeEasing" || _super.prototype.asIs.call(this, field); }; return Component; }(Container)); export { Component }; /** * Register class in system, so that it can be instantiated using its name from * anywhere. * * @ignore */ registry.registeredClasses["Component"] = Component; //# sourceMappingURL=Component.js.map
# Integrations ## Fastly Feed - Added the Traffic Light Protocol integration parameter. - Updated docker image to the latest version.
<?php class Secure extends Front_Controller { var $customer; function __construct() { parent::__construct(); $this->load->model(array('location_model')); $this->customer = $this->go_cart->customer(); } function index() { show_404(); } function login($ajax = false) { //find out if they're already logged in, if they are redirect them to the my account page $redirect = $this->Customer_model->is_logged_in(false, false); //if they are logged in, we send them back to the my_account by default, if they are not logging in if ($redirect) { redirect('secure/my_account/'); } $data['page_title'] = 'Login'; $data['gift_cards_enabled'] = $this->gift_cards_enabled; $this->load->helper('form'); $data['redirect'] = $this->session->flashdata('redirect'); $submitted = $this->input->post('submitted'); if ($submitted) { $email = $this->input->post('email'); $password = $this->input->post('password'); $remember = $this->input->post('remember'); $redirect = $this->input->post('redirect'); $login = $this->Customer_model->login($email, $password, $remember); if ($login) { if ($redirect == '') { //if there is not a redirect link, send them to the my account page $redirect = 'secure/my_account'; } //to login via ajax if($ajax) { die(json_encode(array('result'=>true))); } else { redirect($redirect); } } else { //this adds the redirect back to flash data if they provide an incorrect credentials //to login via ajax if($ajax) { die(json_encode(array('result'=>false))); } else { $this->session->set_flashdata('redirect', $redirect); $this->session->set_flashdata('error', lang('login_failed')); redirect('secure/login'); } } } // load other page content //$this->load->model('banner_model'); $this->load->helper('directory'); //if they want to limit to the top 5 banners and use the enable/disable on dates, add true to the get_banners function //$data['banners'] = $this->banner_model->get_banners(); //$data['ads'] = $this->banner_model->get_banners(true); $data['categories'] = $this->Category_model-><API key>(0); $this->view('login', $data); } function logout() { $this->Customer_model->logout(); redirect('secure/login'); } function register() { $redirect = $this->Customer_model->is_logged_in(false, false); //if they are logged in, we send them back to the my_account by default if ($redirect) { redirect('secure/my_account'); } $this->load->library('form_validation'); $this->form_validation-><API key>('<div>', '</div>'); /* we're going to set this up early. we can set a redirect on this, if a customer is checking out, they need an account. this will allow them to register and then complete their checkout, or it will allow them to register at anytime and by default, redirect them to the homepage. */ $data['redirect'] = $this->session->flashdata('redirect'); $data['page_title'] = lang('<API key>'); $data['gift_cards_enabled'] = $this->gift_cards_enabled; //default values are empty if the customer is new $data['company'] = ''; $data['firstname'] = ''; $data['lastname'] = ''; $data['email'] = ''; $data['phone'] = ''; $data['address1'] = ''; $data['address2'] = ''; $data['city'] = ''; $data['state'] = ''; $data['zip'] = ''; $this->form_validation->set_rules('company', 'lang:address_company', 'trim|max_length[128]'); $this->form_validation->set_rules('firstname', 'lang:address_firstname', 'trim|required|max_length[32]'); $this->form_validation->set_rules('lastname', 'lang:address_lastname', 'trim|required|max_length[32]'); $this->form_validation->set_rules('email', 'lang:address_email', 'trim|required|valid_email|max_length[128]|<API key>'); $this->form_validation->set_rules('phone', 'lang:address_phone', 'trim|required|max_length[32]'); $this->form_validation->set_rules('password', 'lang:password', 'required|min_length[6]|sha1'); $this->form_validation->set_rules('confirm', 'lang:confirm_password', 'required|matches[password]'); $this->form_validation->set_rules('email_subscribe', 'lang:<API key>', 'trim|numeric|max_length[1]'); if ($this->form_validation->run() == FALSE) { //if they have submitted the form already and it has returned with errors, reset the redirect if ($this->input->post('submitted')) { $data['redirect'] = $this->input->post('redirect'); } // load other page content //$this->load->model('banner_model'); $this->load->helper('directory'); $data['categories'] = $this->Category_model-><API key>(0); $data['error'] = validation_errors(); $this->view('register', $data); } else { $save['id'] = false; $save['firstname'] = $this->input->post('firstname'); $save['lastname'] = $this->input->post('lastname'); $save['email'] = $this->input->post('email'); $save['phone'] = $this->input->post('phone'); $save['company'] = $this->input->post('company'); $save['active'] = $this->config->item('new_customer_status'); $save['email_subscribe'] = intval((bool)$this->input->post('email_subscribe')); $save['password'] = $this->input->post('password'); $redirect = $this->input->post('redirect'); //if we don't have a value for redirect if ($redirect == '') { $redirect = 'secure/my_account'; } // save the customer info and get their new id $id = $this->Customer_model->save($save); /* send an email */ // get the email template $res = $this->db->where('id', '6')->get('canned_messages'); $row = $res->row_array(); // set replacement values for subject & body // {customer_name} $row['subject'] = str_replace('{customer_name}', $this->input->post('firstname').' '. $this->input->post('lastname'), $row['subject']); $row['content'] = str_replace('{customer_name}', $this->input->post('firstname').' '. $this->input->post('lastname'), $row['content']); // {url} $row['subject'] = str_replace('{url}', $this->config->item('base_url'), $row['subject']); $row['content'] = str_replace('{url}', $this->config->item('base_url'), $row['content']); // {site_name} $row['subject'] = str_replace('{site_name}', $this->config->item('company_name'), $row['subject']); $row['content'] = str_replace('{site_name}', $this->config->item('company_name'), $row['content']); $this->load->library('email'); $config['mailtype'] = 'html'; $this->email->initialize($config); $this->email->from($this->config->item('email'), $this->config->item('company_name')); $this->email->to($save['email']); $this->email->bcc($this->config->item('email')); $this->email->subject($row['subject']); $this->email->message(html_entity_decode($row['content'])); $this->email->send(); $this->session->set_flashdata('message', sprintf( lang('registration_thanks'), $this->input->post('firstname') ) ); //lets automatically log them in $this->Customer_model->login($save['email'], $this->input->post('confirm')); //we're just going to make this secure regardless, because we don't know if they are //wanting to redirect to an insecure location, if it needs to be secured then we can use the secure redirect in the controller //to redirect them, if there is no redirect, the it should redirect to the homepage. redirect($redirect); } } function check_email($str) { if(!empty($this->customer['id'])) { $email = $this->Customer_model->check_email($str, $this->customer['id']); } else { $email = $this->Customer_model->check_email($str); } if ($email) { $this->form_validation->set_message('check_email', lang('error_email')); return FALSE; } else { return TRUE; } } function forgot_password() { $data['page_title'] = lang('forgot_password'); $data['gift_cards_enabled'] = $this->gift_cards_enabled; $submitted = $this->input->post('submitted'); if ($submitted) { $this->load->helper('string'); $email = $this->input->post('email'); $reset = $this->Customer_model->reset_password($email); if ($reset) { $this->session->set_flashdata('message', lang('<API key>')); } else { $this->session->set_flashdata('error', lang('<API key>')); } redirect('secure/forgot_password'); } // load other page content //$this->load->model('banner_model'); $this->load->helper('directory'); //if they want to limit to the top 5 banners and use the enable/disable on dates, add true to the get_banners function //$data['banners'] = $this->banner_model->get_banners(); //$data['ads'] = $this->banner_model->get_banners(true); $data['categories'] = $this->Category_model-><API key>(); $this->view('forgot_password', $data); } function my_account($offset=0) { //make sure they're logged in $this->Customer_model->is_logged_in('secure/my_account/'); $data['gift_cards_enabled'] = $this->gift_cards_enabled; $data['customer'] = (array)$this->Customer_model->get_customer($this->customer['id']); $data['addresses'] = $this->Customer_model->get_address_list($this->customer['id']); $data['page_title'] = 'Welcome '.$data['customer']['firstname'].' '.$data['customer']['lastname']; $data['customer_addresses'] = $this->Customer_model->get_address_list($data['customer']['id']); // load other page content //$this->load->model('banner_model'); $this->load->model('order_model'); $this->load->helper('directory'); $this->load->helper('date'); //if they want to limit to the top 5 banners and use the enable/disable on dates, add true to the get_banners function // $data['banners'] = $this->banner_model->get_banners(); // $data['ads'] = $this->banner_model->get_banners(true); $data['categories'] = $this->Category_model-><API key>(0); // paginate the orders $this->load->library('pagination'); $config['base_url'] = site_url('secure/my_account'); $config['total_rows'] = $this->order_model-><API key>($this->customer['id']); $config['per_page'] = '15'; $config['first_link'] = 'First'; $config['first_tag_open'] = '<li>'; $config['first_tag_close'] = '</li>'; $config['last_link'] = 'Last'; $config['last_tag_open'] = '<li>'; $config['last_tag_close'] = '</li>'; $config['full_tag_open'] = '<div class="pagination"><ul>'; $config['full_tag_close'] = '</ul></div>'; $config['cur_tag_open'] = '<li class="active"><a href=" $config['cur_tag_close'] = '</a></li>'; $config['num_tag_open'] = '<li>'; $config['num_tag_close'] = '</li>'; $config['prev_link'] = '&laquo;'; $config['prev_tag_open'] = '<li>'; $config['prev_tag_close'] = '</li>'; $config['next_link'] = '&raquo;'; $config['next_tag_open'] = '<li>'; $config['next_tag_close'] = '</li>'; $this->pagination->initialize($config); $data['orders_pagination'] = $this->pagination->create_links(); $data['orders'] = $this->order_model->get_customer_orders($this->customer['id'], $offset); //if they're logged in, then we have all their acct. info in the cookie. /* This is for the customers to be able to edit their account information */ $this->load->library('form_validation'); $this->form_validation->set_rules('company', 'lang:address_company', 'trim|max_length[128]'); $this->form_validation->set_rules('firstname', 'lang:address_firstname', 'trim|required|max_length[32]'); $this->form_validation->set_rules('lastname', 'lang:address_lastname', 'trim|required|max_length[32]'); $this->form_validation->set_rules('email', 'lang:address_email', 'trim|required|valid_email|max_length[128]|<API key>'); $this->form_validation->set_rules('phone', 'lang:address_phone', 'trim|required|max_length[32]'); $this->form_validation->set_rules('email_subscribe', 'lang:<API key>', 'trim|numeric|max_length[1]'); if($this->input->post('password') != '' || $this->input->post('confirm') != '') { $this->form_validation->set_rules('password', 'Password', 'required|min_length[6]|sha1'); $this->form_validation->set_rules('confirm', 'Confirm Password', 'required|matches[password]'); } else { $this->form_validation->set_rules('password', 'Password'); $this->form_validation->set_rules('confirm', 'Confirm Password'); } if ($this->form_validation->run() == FALSE) { $this->view('my_account', $data); } else { $customer = array(); $customer['id'] = $this->customer['id']; $customer['company'] = $this->input->post('company'); $customer['firstname'] = $this->input->post('firstname'); $customer['lastname'] = $this->input->post('lastname'); $customer['email'] = $this->input->post('email'); $customer['phone'] = $this->input->post('phone'); $customer['email_subscribe'] = intval((bool)$this->input->post('email_subscribe')); if($this->input->post('password') != '') { $customer['password'] = $this->input->post('password'); } $this->go_cart->save_customer($this->customer); $this->Customer_model->save($customer); $this->session->set_flashdata('message', lang('<API key>')); redirect('secure/my_account'); } } function my_downloads($code=false) { if($code!==false) { $data['downloads'] = $this-><API key>-><API key>($code); } else { $this->Customer_model->is_logged_in(); $customer = $this->go_cart->customer(); $data['downloads'] = $this-><API key>->get_user_downloads($customer['id']); } $data['gift_cards_enabled'] = $this->gift_cards_enabled; $data['page_title'] = lang('my_downloads'); $this->view('my_downloads', $data); } function download($link) { $filedata = $this-><API key>-><API key>($link); // missing file (bad link) if(!$filedata) { show_404(); } // validate download counter if($filedata->max_downloads > 0) { if(intval($filedata->downloads) >= intval($filedata->max_downloads)) { show_404(); } } // increment downloads counter $this-><API key>->touch_download($link); // Deliver file $this->load->helper('download'); force_download('uploads/digital_uploads/', $filedata->filename); } function set_default_address() { $id = $this->input->post('id'); $type = $this->input->post('type'); $customer = $this->go_cart->customer(); $save['id'] = $customer['id']; if($type=='bill') { $save['<API key>'] = $id; $customer['bill_address'] = $this->Customer_model->get_address($id); $customer['<API key>'] = $id; } else { $save['<API key>'] = $id; $customer['ship_address'] = $this->Customer_model->get_address($id); $customer['<API key>'] = $id; } //update customer db record $this->Customer_model->save($save); //update customer session info $this->go_cart->save_customer($customer); echo "1"; } function address_form($id = 0) { $customer = $this->go_cart->customer(); //grab the address if it's available $data['id'] = false; $data['company'] = $customer['company']; $data['firstname'] = $customer['firstname']; $data['lastname'] = $customer['lastname']; $data['email'] = $customer['email']; $data['phone'] = $customer['phone']; $data['address1'] = ''; $data['address2'] = ''; $data['city'] = ''; $data['country_id'] = ''; $data['zone_id'] = ''; $data['zip'] = ''; if($id != 0) { $a = $this->Customer_model->get_address($id); if($a['customer_id'] == $this->customer['id']) { //notice that this is replacing all of the data array //if anything beyond this form data needs to be added to //the data array, do so after this portion of code $data = $a['field_data']; $data['id'] = $id; } else { redirect('/'); // don't allow cross-customer editing } $data['zones_menu'] = $this->location_model->get_zones_menu($data['country_id']); } //get the countries list for the dropdown $data['countries_menu'] = $this->location_model->get_countries_menu(); if($id==0) { //if there is no set ID, the get the zones of the first country in the countries menu $data['zones_menu'] = $this->location_model->get_zones_menu(array_shift(array_keys($data['countries_menu']))); } else { $data['zones_menu'] = $this->location_model->get_zones_menu($data['country_id']); } $this->load->library('form_validation'); $this->form_validation->set_rules('company', 'lang:address_company', 'trim|max_length[128]'); $this->form_validation->set_rules('firstname', 'lang:address_firstname', 'trim|required|max_length[32]'); $this->form_validation->set_rules('lastname', 'lang:address_lastname', 'trim|required|max_length[32]'); $this->form_validation->set_rules('email', 'lang:address_email', 'trim|required|valid_email|max_length[128]'); $this->form_validation->set_rules('phone', 'lang:address_phone', 'trim|required|max_length[32]'); $this->form_validation->set_rules('address1', 'lang:address:address', 'trim|required|max_length[128]'); $this->form_validation->set_rules('address2', 'lang:address:address', 'trim|max_length[128]'); $this->form_validation->set_rules('city', 'lang:address:city', 'trim|required|max_length[32]'); $this->form_validation->set_rules('country_id', 'lang:address:country', 'trim|required|numeric'); $this->form_validation->set_rules('zone_id', 'lang:address:state', 'trim|required|numeric'); $this->form_validation->set_rules('zip', 'lang:address:zip', 'trim|required|max_length[32]'); if ($this->form_validation->run() == FALSE) { if(validation_errors() != '') { echo validation_errors(); } else { $this->partial('address_form', $data); } } else { $a = array(); $a['id'] = ($id==0) ? '' : $id; $a['customer_id'] = $this->customer['id']; $a['field_data']['company'] = $this->input->post('company'); $a['field_data']['firstname'] = $this->input->post('firstname'); $a['field_data']['lastname'] = $this->input->post('lastname'); $a['field_data']['email'] = $this->input->post('email'); $a['field_data']['phone'] = $this->input->post('phone'); $a['field_data']['address1'] = $this->input->post('address1'); $a['field_data']['address2'] = $this->input->post('address2'); $a['field_data']['city'] = $this->input->post('city'); $a['field_data']['zip'] = $this->input->post('zip'); // get zone / country data using the zone id submitted as state $country = $this->location_model->get_country(set_value('country_id')); $zone = $this->location_model->get_zone(set_value('zone_id')); if(!empty($country)) { $a['field_data']['zone'] = $zone->code; // save the state for output formatted addresses $a['field_data']['country'] = $country->name; // some shipping libraries require country name $a['field_data']['country_code'] = $country->iso_code_2; // some shipping libraries require the code $a['field_data']['country_id'] = $this->input->post('country_id'); $a['field_data']['zone_id'] = $this->input->post('zone_id'); } $this->Customer_model->save_address($a); $this->session->set_flashdata('message', lang('<API key>')); echo 1; } } function delete_address() { $id = $this->input->post('id'); // use the customer id with the addr id to prevent a random number from being sent in and deleting an address $customer = $this->go_cart->customer(); $this->Customer_model->delete_address($id, $customer['id']); echo $id; } }
<?php return unserialize('a:3:{i:0;O:27:"Doctrine\\ORM\\Mapping\\Column":9:{s:4:"name";s:8:"username";s:4:"type";s:6:"string";s:6:"length";i:25;s:9:"precision";i:0;s:5:"scale";i:0;s:6:"unique";b:0;s:8:"nullable";b:0;s:7:"options";a:0:{}s:16:"columnDefinition";N;}i:1;O:48:"Symfony\\Component\\Validator\\Constraints\\NotBlank":2:{s:7:"message";s:31:"This value should not be blank.";s:6:"groups";a:1:{i:0;s:7:"Default";}}i:2;O:49:"Symfony\\Component\\Validator\\Constraints\\MinLength":4:{s:7:"message";s:51:"Username must have at least {{ limit }} characters.";s:5:"limit";i:4;s:7:"charset";s:5:"UTF-8";s:6:"groups";a:1:{i:0;s:7:"Default";}}}');
# NOTICE: THIS FILE IS AUTOGENERATED # MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY # PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Ship() result.template = "object/ship/<API key>.iff" result.<API key> = -1 result.stfName("","") return result
'use strict' var XML = require('xmlbuilder') var YAML = require('yamljs') var moment = require('moment') module.exports = function (req, res, next) { res.bodyXmlObj = { response: res.body } // am I pretty? var spaces = req.headers['x-pretty-print'] ? parseInt(req.headers['x-pretty-print'], 10) : 2 function YAMLResponse () { if (typeof res.body === 'string') { return res.send(res.body) } res.send(YAML.stringify(res.body, 6, spaces)) } function JSONResponse () { req.app.set('json spaces', spaces) res.jsonp(res.body) } function XMLResponse () { res.send(XML.create(res.bodyXmlObj || res.body).end({ pretty: spaces ? true : false, indent: new Array(spaces).join(' '), newline: '\n' })) } function HTMLResponse () { req.app.locals.moment = moment res.render(res.view || 'default', { req: req, res: res, data: { raw: res.body, yaml: YAML.stringify(res.body, res.yamlInline || 3, 2), json: JSON.stringify(res.body, null, 2), xml: XML.create(res.bodyXmlObj || res.body).end({ pretty: true, indent: ' ', newline: '\n' }) } }) } res.format({ 'application/json': JSONResponse, 'text/json': JSONResponse, 'text/x-json': JSONResponse, 'application/x-json': JSONResponse, 'text/javascript': JSONResponse, 'application/javascript': JSONResponse, 'application/x-javascript': JSONResponse, 'text/xml': XMLResponse, 'application/xml': XMLResponse, 'application/x-xml': XMLResponse, 'text/html': HTMLResponse, 'application/xhtml+xml': HTMLResponse, 'text/yaml': YAMLResponse, 'text/x-yaml': YAMLResponse, 'application/yaml': YAMLResponse, 'application/x-yaml': YAMLResponse, 'text/plain': YAMLResponse, default: JSONResponse }) next() }
require 'rails_helper' RSpec.describe AboutController, type: :controller do describe "GET #index" do it "returns http success" do get :index expect(response).to have_http_status(:success) end end end
[![Travic CI Build Status](https: # JUserManagement The JUserManagement offers a user management support to the JEngine to enable a role feature within PCM ## Setup Update APT sudo apt-get update Installing Tomcat, MySQL Server, Maven (>3,2), Java (>1,7), git sudo apt-get install tomcat7 mysql-server maven git default-jdk Cloning of this repo git clone https://github.com/BP2014W1/JUserManagement Further an MySQL Database should be created named as "JUserManagement" & import SQL file from mysql -u username -p -h localhost JUserManagement < JEngine\src\main\resources\JUserManagement.sql Please be aware of the database settings inside the web.xml . For the tests you may want to adapt also the database_connection in JEngine/blob/dev/src/main/resources/database_connection ## Deployment In order to deploy the JUserManagement install [Maven](http://maven.apache.org/ Maven). Then execute the following commands in your command line: mvn install -Dmaven.test.skip=true A war file will be created which can be executed using tomcat. Stop tomcat service tomcat7 stop copy the JEngine.war in the tomcat webapp dir cp target/JUserManagement.war /var/lib/tomcat7/webapps/ remove old JEngine folder in case of an update rm -r /var/lib/tomcat7/webapps/JUserManagement and start tomcat again service tomcat7 start Now, you may access the REST Interface. ## REST creating new resources (like users or roles) PUT http://ip:port/JUserManagement/api/interface/v1/{user|role}/ retrieving informations about all resources (like users or roles) GET http://ip:port/JUserManagement/api/interface/v1/{user|role}/ retrieving informations about a specific resource (like users or roles) GET http://ip:port/JUserManagement/api/interface/v1/{user|role}/{id} updating already existing resource (like a user or a role) PUT http://ip:port/JUserManagement/api/interface/v1/{user|role}/{id} deleting a resource (like a user or a role) DELETE http://ip:port/JUserManagement/api/interface/v1/{user|role}/{id} An example JSON structure for a user is json { "name":"MaxMustermann", "description":"Max is a Manager", "role_id":1 } and for a role the structure is analog json { "name":"ServiceManager", "description":"Answering Calls and Questions", "admin_id":1 } ## Features We currently support the * creation * modification * deletion of * users * roles :)
<?php namespace SumoCoders\FrameworkCoreBundle\Tests\Composer; use SumoCoders\FrameworkCoreBundle\Composer\ScriptHandler; class ScriptHandlerTest extends \<API key> { /** * Test ScriptHandler-><API key>() */ public function <API key>() { $io = $this->getMockBuilder('\Composer\IO\ConsoleIO') -><API key>() ->getMock(); $io->method('isDecorated') ->willReturn(true); $this->expectOutputString('foo' . "\n"); ScriptHandler::<API key>('echo "foo"', $io, true); } }
const moment = require('moment-timezone'); const { LOCALE_TIMEZONE } = process.env; const pgTimeToDate = time => new Date(`2000-01-01 ${time}`); const dateTime = (date, time) => new Date([date, time].join('T')); function getDuration(start, end) { const diffMS = end.getTime() - start.getTime(); const diffMinutes = diffMS / (60 * 1000); const hours = Math.floor(diffMinutes / 60); const mins = diffMinutes % 60; return [hours ? `${hours}h` : '', mins ? ` ${mins}m` : ''].join(''); } function parseSchedule(slot) { const { startDate, startTime, endTime } = slot; const data = {}; const now = new Date(); if (startDate) { const date = dateTime(startDate, startTime || '00:00:00'); data.date = moment(date).format(date.getFullYear() === now.getFullYear() ? 'dddd D MMM' : 'dddd D MMM YYYY'); data.hasOccurred = date.getTime() <= now.getTime(); } if (startTime) { data.time = startTime.slice(0, 5); if (endTime) { data.duration = getDuration(pgTimeToDate(startTime), pgTimeToDate(endTime)); } } return data; } function sortSchedule(slots) { if (!(slots && slots.length)) return []; const now = new Date(); const defaultTime = { start: '00:00:00', end: '23:59:59' }; return slots.map(slot => Object.assign({}, { start: dateTime(slot.startDate, slot.startTime), end: dateTime(slot.startDate, slot.endTime), points: ['start', 'end'].map(point => moment.tz(`${slot.startDate}T${slot[`${point}Time`] || defaultTime[point]}`, LOCALE_TIMEZONE).utc().format()), hasOccurred: dateTime(slot.startDate, slot.startTime || '00:00:00').getTime() <= now.getTime() }, slot)).sort((a, b) => a.start - b.start); } function nextSchedule(slots) { return sortSchedule(slots).find(slot => slot.start > Date.now()); } function calendarLinks(schedule, title, description, location) { const { startDate, startTime, endTime } = schedule; const dates = [startTime, endTime].map(time => [startDate, time].join('T').replace(/-|:|\.\d\d\d/g, '')); return { googleCalendar: `https: }; } module.exports = { pgTimeToDate, getDuration, parseSchedule, calendarLinks, sortSchedule, nextSchedule };
var api = require("./api"); function getRevision(id, body, callback) { if (body.revision) { return callback(null, body.revision); } api.get("/tasks/" + id, function(error, response, body) { if (error) { return callback(error); } callback(null, body.revision); }); } module.exports = function updateTask(id, body, callback) { getRevision(id, body, function(error, revision) { if (error) { return callback(error); } body.revision = revision; api.patch( "/tasks/" + id, { json: true, body: body }, function(error, response, body) { if (error) { return callback(error); } return callback(null, body); } ); }); };
'use strict'; import React, { AppRegistry } from 'react-native'; import Main from './src/containers/Main/Main'; AppRegistry.registerComponent('gainsville', () => Main);
#include "lib.h" #include "settings-parser.h" #include "<API key>.h" #include "<API key>.h" #include <stddef.h> #undef DEF #define DEF(type, name) \ { type, #name, offsetof(struct <API key>, name), NULL } static bool <API key>(void *_set, pool_t pool, const char **error_r); static const struct setting_define <API key>[] = { DEF(SET_ENUM, ssl), DEF(SET_STR, ssl_ca), DEF(SET_STR, ssl_cert), DEF(SET_STR, ssl_key), DEF(SET_STR, ssl_key_password), DEF(SET_STR, ssl_cipher_list), DEF(SET_STR, ssl_protocols), DEF(SET_STR, <API key>), DEF(SET_STR, ssl_crypto_device), DEF(SET_BOOL, <API key>), DEF(SET_BOOL, ssl_require_crl), DEF(SET_BOOL, verbose_ssl), <API key> }; static const struct <API key> <API key> = { #ifdef HAVE_SSL .ssl = "yes:no:required", #else .ssl = "no:yes:required", #endif .ssl_ca = "", .ssl_cert = "", .ssl_key = "", .ssl_key_password = "", .ssl_cipher_list = "ALL:!LOW:!SSLv2:!EXP:!aNULL", .ssl_protocols = "!SSLv2", .<API key> = "commonName", .ssl_crypto_device = "", .<API key> = FALSE, .ssl_require_crl = TRUE, .verbose_ssl = FALSE }; const struct setting_parser_info <API key> = { .module_name = "ssl", .defines = <API key>, .defaults = &<API key>, .type_offset = (size_t)-1, .struct_size = sizeof(struct <API key>), .parent_offset = (size_t)-1, .check_func = <API key> }; /* <settings checks> */ static bool <API key>(void *_set, pool_t pool ATTR_UNUSED, const char **error_r) { struct <API key> *set = _set; if (strcmp(set->ssl, "no") == 0) { /* disabled */ return TRUE; } #ifndef HAVE_SSL *error_r = t_strdup_printf("SSL support not compiled in but ssl=%s", set->ssl); return FALSE; #else /* we get called from many different tools, possibly with -O parameter, and few of those tools care about SSL settings. so don't check ssl_cert/ssl_key/etc validity here except in doveconf, because it usually is just an extra annoyance. */ #ifdef CONFIG if (*set->ssl_cert == '\0') { *error_r = "ssl enabled, but ssl_cert not set"; return FALSE; } if (*set->ssl_key == '\0') { *error_r = "ssl enabled, but ssl_key not set"; return FALSE; } #endif if (set-><API key> && *set->ssl_ca == '\0') { *error_r = "<API key> set, but ssl_ca not"; return FALSE; } return TRUE; #endif } /* </settings checks> */ const struct <API key> * <API key>(struct master_service *service) { void **sets; sets = <API key>(service->set_parser); return sets[1]; }
using System; using System.ComponentModel; namespace Nettiers.AdventureWorks.Entities { <summary> The data structure representation of the 'ProductCostHistory' table via interface. </summary> <remarks> This struct is generated by a tool and should never be modified. </remarks> public interface IProductCostHistory { <summary> ProductID : Product identification number. Foreign key to Product.ProductID </summary> <remarks>Member of the primary key of the underlying table "ProductCostHistory"</remarks> System.Int32 ProductId { get; set; } <summary> keep a copy of the original so it can be used for editable primary keys. </summary> System.Int32 OriginalProductId { get; set; } <summary> StartDate : Product cost start date. </summary> <remarks>Member of the primary key of the underlying table "ProductCostHistory"</remarks> System.DateTime StartDate { get; set; } <summary> keep a copy of the original so it can be used for editable primary keys. </summary> System.DateTime OriginalStartDate { get; set; } <summary> EndDate : Product cost end date. </summary> System.DateTime? EndDate { get; set; } <summary> StandardCost : Standard cost of the product. </summary> System.Decimal StandardCost { get; set; } <summary> ModifiedDate : Date and time the record was last updated. </summary> System.DateTime ModifiedDate { get; set; } <summary> Creates a new object that is a copy of the current instance. </summary> <returns>A new object that is a copy of this instance.</returns> System.Object Clone(); #region Data Properties #endregion Data Properties } }
<!DOCTYPE html PUBLIC "- <html xmlns="http: <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>SoundBankPlayer: File Index</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javaScript" src="search/search.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body onload='searchBox.OnSelectItem(0);'> <!-- Generated by Doxygen 1.7.2 --> <script type="text/javascript"><! var searchBox = new SearchBox("searchBox", "search",false,'Search'); --></script> <div class="navigation" id="top"> <div class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main&#160;Page</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li id="searchli"> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> <div class="tabs2"> <ul class="tablist"> <li class="current"><a href="files.html"><span>File&#160;List</span></a></li> <li><a href="globals.html"><span>File&#160;Members</span></a></li> </ul> </div> </div> <div class="header"> <div class="headertitle"> <h1>File List</h1> </div> </div> <div class="contents"> Here is a list of all documented files with brief descriptions:<table> <tr><td class="indexkey">Classes/<a class="el" href="<API key>.html">SoundBankPlayer.h</a> <a href="<API key>.html">[code]</a></td><td class="indexvalue"></td></tr> </table> </div> <!--- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Properties</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Defines</a></div> <!-- iframe showing the search results (closed by default) --> <div id="<API key>"> <iframe src="" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <hr class="footer"/><address class="footer"><small>Generated on Sun Oct 9 2011 13:46:35 for SoundBankPlayer by&#160; <a href="http: <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address> </body> </html>
# Acknowledgements This application makes use of the following third party libraries: ## PGLContacts Copyright (c) 2015 PGLongo <piergiuseppe.longo@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Generated by CocoaPods - http://cocoapods.org
// AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from libunity.djinni #pragma once #include <string> struct BalanceRecord; struct MutationRecord; struct TransactionRecord; /** Interface to receive events from the core */ #ifdef DJINNI_NODEJS #include "NJSILibraryListener.hpp" #define ILibraryListener NJSILibraryListener #else class ILibraryListener { public: virtual ~ILibraryListener() {} /** * Fraction of work done since session start or last progress reset [0..1] * Unified progress combines connection state, header and block sync */ virtual void <API key>(float progress) = 0; virtual void notifyBalanceChange(const BalanceRecord & new_balance) = 0; /** * Notification of new mutations. * If self_committed it is due to a call to <API key>, else it is because of a transaction * reached us in another way. In general this will be because we received funds from someone, hower there are * also cases where funds is send from our wallet while !self_committed (for example by a linked desktop wallet * or another wallet instance using the same keys as ours). */ virtual void notifyNewMutation(const MutationRecord & mutation, bool self_committed) = 0; virtual void <API key>(const TransactionRecord & transaction) = 0; virtual void <API key>() = 0; virtual void <API key>() = 0; virtual void notifyShutdown() = 0; virtual void notifyCoreReady() = 0; virtual void logPrint(const std::string & str) = 0; }; #endif
> POST /v1/mobile/signinbyverifycode | | | | | | |randomCode|String|true| sendverifycode | |verifyCode|String|true|| |action|String|true| action=resetpassword| json { "_id":"<API key>", "__v":0, "updatedAt":"2015-11-06T01:43:34.861Z", "createdAt":"2015-11-06T01:43:34.861Z", "showname":"15700000000", "phoneNumber":"15700000000", "unions":[], "wasNew":false, "account<API key>.eyJsb2dpbiI6Im1vYmlsZSIsIl9pZCI6IjU2M2MwNWM2Y2QzYWU0NGUyMGExZWFkOSIsImV4cCI6MTQ0OTM2NjIxNH0.<API key>", "id":"<API key>" }
// Minimal amount of configuration required for running Jasmine // specs in an headless environment // You may choose to use a slighly different environment with // reporters like a jasmine.TrivialReporter or jasmine.HtmlReporter // to see the results py pointing your browser to your spec runner. // If you are on Unix or Windows, notice that there are a few issues // running Jasmine specs via grunt-jasmine-task and PhantomJS if you // change this default environment. // See: (function() { jasmine.getEnv().execute(); })();
html { font-family: sans-serif; -<API key>: 100%; -ms-text-size-adjust: 100%; } body { margin: 0; } article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary { display: block; } audio, canvas, progress, video { display: inline-block; vertical-align: baseline; } audio:not([controls]) { display: none; height: 0; } [hidden], template { display: none; } a { background-color: transparent; } a:active, a:hover { outline: 0; } abbr[title] { border-bottom: 1px dotted; } b, strong { font-weight: bold; } dfn { font-style: italic; } h1 { margin: .67em 0; font-size: 2em; } mark { color: #000; background: #ff0; } small { font-size: 80%; } sub, sup { position: relative; font-size: 75%; line-height: 0; vertical-align: baseline; } sup { top: -.5em; } sub { bottom: -.25em; } img { border: 0; } svg:not(:root) { overflow: hidden; } figure { margin: 1em 40px; } hr { height: 0; -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; } pre { overflow: auto; } code, kbd, pre, samp { font-family: monospace, monospace; font-size: 1em; } button, input, optgroup, select, textarea { margin: 0; font: inherit; color: inherit; } button { overflow: visible; } button, select { text-transform: none; } button, html input[type="button"], input[type="reset"], input[type="submit"] { -webkit-appearance: button; cursor: pointer; } button[disabled], html input[disabled] { cursor: default; } button::-moz-focus-inner, input::-moz-focus-inner { padding: 0; border: 0; } input { line-height: normal; } input[type="checkbox"], input[type="radio"] { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; padding: 0; } input[type="number"]::-<API key>, input[type="number"]::-<API key> { height: auto; } input[type="search"] { -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; -webkit-appearance: textfield; } input[type="search"]::-<API key>, input[type="search"]::-<API key> { -webkit-appearance: none; } fieldset { padding: .35em .625em .75em; margin: 0 2px; border: 1px solid #c0c0c0; } legend { padding: 0; border: 0; } textarea { overflow: auto; } optgroup { font-weight: bold; } table { border-spacing: 0; border-collapse: collapse; } td, th { padding: 0; } @media print { *, *:before, *:after { color: #000 !important; text-shadow: none !important; background: transparent !important; -webkit-box-shadow: none !important; box-shadow: none !important; } a, a:visited { text-decoration: underline; } a[href]:after { content: " (" attr(href) ")"; } abbr[title]:after { content: " (" attr(title) ")"; } a[href^="#"]:after, a[href^="javascript:"]:after { content: ""; } pre, blockquote { border: 1px solid #999; page-break-inside: avoid; } thead { display: table-header-group; } tr, img { page-break-inside: avoid; } img { max-width: 100% !important; } p, h2, h3 { orphans: 3; widows: 3; } h2, h3 { page-break-after: avoid; } select { background: #fff !important; } .navbar { display: none; } .btn > .caret, .dropup > .btn > .caret { border-top-color: #000 !important; } .label { border: 1px solid #000; } .table { border-collapse: collapse !important; } .table td, .table th { background-color: #fff !important; } .table-bordered th, .table-bordered td { border: 1px solid #ddd !important; } } @font-face { font-family: 'Glyphicons Halflings'; src: url('../fonts/<API key>.eot'); src: url('../fonts/<API key>.eot?#iefix') format('embedded-opentype'), url('../fonts/<API key>.woff2') format('woff2'), url('../fonts/<API key>.woff') format('woff'), url('../fonts/<API key>.ttf') format('truetype'), url('../fonts/<API key>.svg#<API key>') format('svg'); } .glyphicon { position: relative; top: 1px; display: inline-block; font-family: 'Glyphicons Halflings'; font-style: normal; font-weight: normal; line-height: 1; -<API key>: antialiased; -<API key>: grayscale; } .glyphicon-asterisk:before { content: "\2a"; } .glyphicon-plus:before { content: "\2b"; } .glyphicon-euro:before, .glyphicon-eur:before { content: "\20ac"; } .glyphicon-minus:before { content: "\2212"; } .glyphicon-cloud:before { content: "\2601"; } .glyphicon-envelope:before { content: "\2709"; } .glyphicon-pencil:before { content: "\270f"; } .glyphicon-glass:before { content: "\e001"; } .glyphicon-music:before { content: "\e002"; } .glyphicon-search:before { content: "\e003"; } .glyphicon-heart:before { content: "\e005"; } .glyphicon-star:before { content: "\e006"; } .<API key>:before { content: "\e007"; } .glyphicon-user:before { content: "\e008"; } .glyphicon-film:before { content: "\e009"; } .glyphicon-th-large:before { content: "\e010"; } .glyphicon-th:before { content: "\e011"; } .glyphicon-th-list:before { content: "\e012"; } .glyphicon-ok:before { content: "\e013"; } .glyphicon-remove:before { content: "\e014"; } .glyphicon-zoom-in:before { content: "\e015"; } .glyphicon-zoom-out:before { content: "\e016"; } .glyphicon-off:before { content: "\e017"; } .glyphicon-signal:before { content: "\e018"; } .glyphicon-cog:before { content: "\e019"; } .glyphicon-trash:before { content: "\e020"; } .glyphicon-home:before { content: "\e021"; } .glyphicon-file:before { content: "\e022"; } .glyphicon-time:before { content: "\e023"; } .glyphicon-road:before { content: "\e024"; } .<API key>:before { content: "\e025"; } .glyphicon-download:before { content: "\e026"; } .glyphicon-upload:before { content: "\e027"; } .glyphicon-inbox:before { content: "\e028"; } .<API key>:before { content: "\e029"; } .glyphicon-repeat:before { content: "\e030"; } .glyphicon-refresh:before { content: "\e031"; } .glyphicon-list-alt:before { content: "\e032"; } .glyphicon-lock:before { content: "\e033"; } .glyphicon-flag:before { content: "\e034"; } .<API key>:before { content: "\e035"; } .<API key>:before { content: "\e036"; } .<API key>:before { content: "\e037"; } .glyphicon-volume-up:before { content: "\e038"; } .glyphicon-qrcode:before { content: "\e039"; } .glyphicon-barcode:before { content: "\e040"; } .glyphicon-tag:before { content: "\e041"; } .glyphicon-tags:before { content: "\e042"; } .glyphicon-book:before { content: "\e043"; } .glyphicon-bookmark:before { content: "\e044"; } .glyphicon-print:before { content: "\e045"; } .glyphicon-camera:before { content: "\e046"; } .glyphicon-font:before { content: "\e047"; } .glyphicon-bold:before { content: "\e048"; } .glyphicon-italic:before { content: "\e049"; } .<API key>:before { content: "\e050"; } .<API key>:before { content: "\e051"; } .<API key>:before { content: "\e052"; } .<API key>:before { content: "\e053"; } .<API key>:before { content: "\e054"; } .<API key>:before { content: "\e055"; } .glyphicon-list:before { content: "\e056"; } .<API key>:before { content: "\e057"; } .<API key>:before { content: "\e058"; } .<API key>:before { content: "\e059"; } .glyphicon-picture:before { content: "\e060"; } .<API key>:before { content: "\e062"; } .glyphicon-adjust:before { content: "\e063"; } .glyphicon-tint:before { content: "\e064"; } .glyphicon-edit:before { content: "\e065"; } .glyphicon-share:before { content: "\e066"; } .glyphicon-check:before { content: "\e067"; } .glyphicon-move:before { content: "\e068"; } .<API key>:before { content: "\e069"; } .<API key>:before { content: "\e070"; } .glyphicon-backward:before { content: "\e071"; } .glyphicon-play:before { content: "\e072"; } .glyphicon-pause:before { content: "\e073"; } .glyphicon-stop:before { content: "\e074"; } .glyphicon-forward:before { content: "\e075"; } .<API key>:before { content: "\e076"; } .<API key>:before { content: "\e077"; } .glyphicon-eject:before { content: "\e078"; } .<API key>:before { content: "\e079"; } .<API key>:before { content: "\e080"; } .glyphicon-plus-sign:before { content: "\e081"; } .<API key>:before { content: "\e082"; } .<API key>:before { content: "\e083"; } .glyphicon-ok-sign:before { content: "\e084"; } .<API key>:before { content: "\e085"; } .glyphicon-info-sign:before { content: "\e086"; } .<API key>:before { content: "\e087"; } .<API key>:before { content: "\e088"; } .glyphicon-ok-circle:before { content: "\e089"; } .<API key>:before { content: "\e090"; } .<API key>:before { content: "\e091"; } .<API key>:before { content: "\e092"; } .glyphicon-arrow-up:before { content: "\e093"; } .<API key>:before { content: "\e094"; } .glyphicon-share-alt:before { content: "\e095"; } .<API key>:before { content: "\e096"; } .<API key>:before { content: "\e097"; } .<API key>:before { content: "\e101"; } .glyphicon-gift:before { content: "\e102"; } .glyphicon-leaf:before { content: "\e103"; } .glyphicon-fire:before { content: "\e104"; } .glyphicon-eye-open:before { content: "\e105"; } .glyphicon-eye-close:before { content: "\e106"; } .<API key>:before { content: "\e107"; } .glyphicon-plane:before { content: "\e108"; } .glyphicon-calendar:before { content: "\e109"; } .glyphicon-random:before { content: "\e110"; } .glyphicon-comment:before { content: "\e111"; } .glyphicon-magnet:before { content: "\e112"; } .<API key>:before { content: "\e113"; } .<API key>:before { content: "\e114"; } .glyphicon-retweet:before { content: "\e115"; } .<API key>:before { content: "\e116"; } .<API key>:before { content: "\e117"; } .<API key>:before { content: "\e118"; } .<API key>:before { content: "\e119"; } .<API key>:before { content: "\e120"; } .glyphicon-hdd:before { content: "\e121"; } .glyphicon-bullhorn:before { content: "\e122"; } .glyphicon-bell:before { content: "\e123"; } .<API key>:before { content: "\e124"; } .glyphicon-thumbs-up:before { content: "\e125"; } .<API key>:before { content: "\e126"; } .<API key>:before { content: "\e127"; } .glyphicon-hand-left:before { content: "\e128"; } .glyphicon-hand-up:before { content: "\e129"; } .glyphicon-hand-down:before { content: "\e130"; } .<API key>:before { content: "\e131"; } .<API key>:before { content: "\e132"; } .<API key>:before { content: "\e133"; } .<API key>:before { content: "\e134"; } .glyphicon-globe:before { content: "\e135"; } .glyphicon-wrench:before { content: "\e136"; } .glyphicon-tasks:before { content: "\e137"; } .glyphicon-filter:before { content: "\e138"; } .glyphicon-briefcase:before { content: "\e139"; } .<API key>:before { content: "\e140"; } .glyphicon-dashboard:before { content: "\e141"; } .glyphicon-paperclip:before { content: "\e142"; } .<API key>:before { content: "\e143"; } .glyphicon-link:before { content: "\e144"; } .glyphicon-phone:before { content: "\e145"; } .glyphicon-pushpin:before { content: "\e146"; } .glyphicon-usd:before { content: "\e148"; } .glyphicon-gbp:before { content: "\e149"; } .glyphicon-sort:before { content: "\e150"; } .<API key>:before { content: "\e151"; } .<API key>:before { content: "\e152"; } .<API key>:before { content: "\e153"; } .<API key>:before { content: "\e154"; } .<API key>:before { content: "\e155"; } .<API key>:before { content: "\e156"; } .glyphicon-unchecked:before { content: "\e157"; } .glyphicon-expand:before { content: "\e158"; } .<API key>:before { content: "\e159"; } .<API key>:before { content: "\e160"; } .glyphicon-log-in:before { content: "\e161"; } .glyphicon-flash:before { content: "\e162"; } .glyphicon-log-out:before { content: "\e163"; } .<API key>:before { content: "\e164"; } .glyphicon-record:before { content: "\e165"; } .glyphicon-save:before { content: "\e166"; } .glyphicon-open:before { content: "\e167"; } .glyphicon-saved:before { content: "\e168"; } .glyphicon-import:before { content: "\e169"; } .glyphicon-export:before { content: "\e170"; } .glyphicon-send:before { content: "\e171"; } .<API key>:before { content: "\e172"; } .<API key>:before { content: "\e173"; } .<API key>:before { content: "\e174"; } .<API key>:before { content: "\e175"; } .<API key>:before { content: "\e176"; } .<API key>:before { content: "\e177"; } .glyphicon-transfer:before { content: "\e178"; } .glyphicon-cutlery:before { content: "\e179"; } .glyphicon-header:before { content: "\e180"; } .<API key>:before { content: "\e181"; } .glyphicon-earphone:before { content: "\e182"; } .glyphicon-phone-alt:before { content: "\e183"; } .glyphicon-tower:before { content: "\e184"; } .glyphicon-stats:before { content: "\e185"; } .glyphicon-sd-video:before { content: "\e186"; } .glyphicon-hd-video:before { content: "\e187"; } .glyphicon-subtitles:before { content: "\e188"; } .<API key>:before { content: "\e189"; } .<API key>:before { content: "\e190"; } .glyphicon-sound-5-1:before { content: "\e191"; } .glyphicon-sound-6-1:before { content: "\e192"; } .glyphicon-sound-7-1:before { content: "\e193"; } .<API key>:before { content: "\e194"; } .<API key>:before { content: "\e195"; } .<API key>:before { content: "\e197"; } .<API key>:before { content: "\e198"; } .<API key>:before { content: "\e199"; } .<API key>:before { content: "\e200"; } .glyphicon-cd:before { content: "\e201"; } .glyphicon-save-file:before { content: "\e202"; } .glyphicon-open-file:before { content: "\e203"; } .glyphicon-level-up:before { content: "\e204"; } .glyphicon-copy:before { content: "\e205"; } .glyphicon-paste:before { content: "\e206"; } .glyphicon-alert:before { content: "\e209"; } .glyphicon-equalizer:before { content: "\e210"; } .glyphicon-king:before { content: "\e211"; } .glyphicon-queen:before { content: "\e212"; } .glyphicon-pawn:before { content: "\e213"; } .glyphicon-bishop:before { content: "\e214"; } .glyphicon-knight:before { content: "\e215"; } .<API key>:before { content: "\e216"; } .glyphicon-tent:before { content: "\26fa"; } .<API key>:before { content: "\e218"; } .glyphicon-bed:before { content: "\e219"; } .glyphicon-apple:before { content: "\f8ff"; } .glyphicon-erase:before { content: "\e221"; } .glyphicon-hourglass:before { content: "\231b"; } .glyphicon-lamp:before { content: "\e223"; } .glyphicon-duplicate:before { content: "\e224"; } .<API key>:before { content: "\e225"; } .glyphicon-scissors:before { content: "\e226"; } .glyphicon-bitcoin:before { content: "\e227"; } .glyphicon-btc:before { content: "\e227"; } .glyphicon-xbt:before { content: "\e227"; } .glyphicon-yen:before { content: "\00a5"; } .glyphicon-jpy:before { content: "\00a5"; } .glyphicon-ruble:before { content: "\20bd"; } .glyphicon-rub:before { content: "\20bd"; } .glyphicon-scale:before { content: "\e230"; } .glyphicon-ice-lolly:before { content: "\e231"; } .<API key>:before { content: "\e232"; } .glyphicon-education:before { content: "\e233"; } .<API key>:before { content: "\e234"; } .<API key>:before { content: "\e235"; } .<API key>:before { content: "\e236"; } .<API key>:before { content: "\e237"; } .glyphicon-oil:before { content: "\e238"; } .glyphicon-grain:before { content: "\e239"; } .<API key>:before { content: "\e240"; } .glyphicon-text-size:before { content: "\e241"; } .<API key>:before { content: "\e242"; } .<API key>:before { content: "\e243"; } .<API key>:before { content: "\e244"; } .<API key>:before { content: "\e245"; } .<API key>:before { content: "\e246"; } .<API key>:before { content: "\e247"; } .<API key>:before { content: "\e248"; } .<API key>:before { content: "\e249"; } .<API key>:before { content: "\e250"; } .<API key>:before { content: "\e251"; } .<API key>:before { content: "\e252"; } .<API key>:before { content: "\e253"; } .glyphicon-console:before { content: "\e254"; } .<API key>:before { content: "\e255"; } .glyphicon-subscript:before { content: "\e256"; } .glyphicon-menu-left:before { content: "\e257"; } .<API key>:before { content: "\e258"; } .glyphicon-menu-down:before { content: "\e259"; } .glyphicon-menu-up:before { content: "\e260"; } * { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } *:before, *:after { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } html { font-size: 10px; -<API key>: rgba(0, 0, 0, 0); } body { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.42857143; color: #333; background-color: #fff; } input, button, select, textarea { font-family: inherit; font-size: inherit; line-height: inherit; } a { color: #337ab7; text-decoration: none; } a:hover, a:focus { color: #23527c; text-decoration: underline; } a:focus { outline: thin dotted; outline: 5px auto -<API key>; outline-offset: -2px; } figure { margin: 0; } img { vertical-align: middle; } .img-responsive, .thumbnail > img, .thumbnail a > img, .carousel-inner > .item > img, .carousel-inner > .item > a > img { display: block; max-width: 100%; height: auto; } .img-rounded { border-radius: 6px; } .img-thumbnail { display: inline-block; max-width: 100%; height: auto; padding: 4px; line-height: 1.42857143; background-color: #fff; border: 1px solid #ddd; border-radius: 4px; -webkit-transition: all .2s ease-in-out; -o-transition: all .2s ease-in-out; transition: all .2s ease-in-out; } .img-circle { border-radius: 50%; } hr { margin-top: 20px; margin-bottom: 20px; border: 0; border-top: 1px solid #eee; } .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; } .sr-only-focusable:active, .sr-only-focusable:focus { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; } [role="button"] { cursor: pointer; } h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-family: inherit; font-weight: 500; line-height: 1.1; color: inherit; } h1 small, h2 small, h3 small, h4 small, h5 small, h6 small, .h1 small, .h2 small, .h3 small, .h4 small, .h5 small, .h6 small, h1 .small, h2 .small, h3 .small, h4 .small, h5 .small, h6 .small, .h1 .small, .h2 .small, .h3 .small, .h4 .small, .h5 .small, .h6 .small { font-weight: normal; line-height: 1; color: #777; } h1, .h1, h2, .h2, h3, .h3 { margin-top: 20px; margin-bottom: 10px; } h1 small, .h1 small, h2 small, .h2 small, h3 small, .h3 small, h1 .small, .h1 .small, h2 .small, .h2 .small, h3 .small, .h3 .small { font-size: 65%; } h4, .h4, h5, .h5, h6, .h6 { margin-top: 10px; margin-bottom: 10px; } h4 small, .h4 small, h5 small, .h5 small, h6 small, .h6 small, h4 .small, .h4 .small, h5 .small, .h5 .small, h6 .small, .h6 .small { font-size: 75%; } h1, .h1 { font-size: 36px; } h2, .h2 { font-size: 30px; } h3, .h3 { font-size: 24px; } h4, .h4 { font-size: 18px; } h5, .h5 { font-size: 14px; } h6, .h6 { font-size: 12px; } p { margin: 0 0 10px; } .lead { margin-bottom: 20px; font-size: 16px; font-weight: 300; line-height: 1.4; } @media (min-width: 768px) { .lead { font-size: 21px; } } small, .small { font-size: 85%; } mark, .mark { padding: .2em; background-color: #fcf8e3; } .text-left { text-align: left; } .text-right { text-align: right; } .text-center { text-align: center; } .text-justify { text-align: justify; } .text-nowrap { white-space: nowrap; } .text-lowercase { text-transform: lowercase; } .text-uppercase { text-transform: uppercase; } .text-capitalize { text-transform: capitalize; } .text-muted { color: #777; } .text-primary { color: #337ab7; } a.text-primary:hover { color: #286090; } .text-success { color: #3c763d; } a.text-success:hover { color: #2b542c; } .text-info { color: #31708f; } a.text-info:hover { color: #245269; } .text-warning { color: #8a6d3b; } a.text-warning:hover { color: #66512c; } .text-danger { color: #a94442; } a.text-danger:hover { color: #843534; } .bg-primary { color: #fff; background-color: #337ab7; } a.bg-primary:hover { background-color: #286090; } .bg-success { background-color: #dff0d8; } a.bg-success:hover { background-color: #c1e2b3; } .bg-info { background-color: #d9edf7; } a.bg-info:hover { background-color: #afd9ee; } .bg-warning { background-color: #fcf8e3; } a.bg-warning:hover { background-color: #f7ecb5; } .bg-danger { background-color: #f2dede; } a.bg-danger:hover { background-color: #e4b9b9; } .page-header { padding-bottom: 9px; margin: 40px 0 20px; border-bottom: 1px solid #eee; } ul, ol { margin-top: 0; margin-bottom: 10px; } ul ul, ol ul, ul ol, ol ol { margin-bottom: 0; } .list-unstyled { padding-left: 0; list-style: none; } .list-inline { padding-left: 0; margin-left: -5px; list-style: none; } .list-inline > li { display: inline-block; padding-right: 5px; padding-left: 5px; } dl { margin-top: 0; margin-bottom: 20px; } dt, dd { line-height: 1.42857143; } dt { font-weight: bold; } dd { margin-left: 0; } @media (min-width: 768px) { .dl-horizontal dt { float: left; width: 160px; overflow: hidden; clear: left; text-align: right; text-overflow: ellipsis; white-space: nowrap; } .dl-horizontal dd { margin-left: 180px; } } abbr[title], abbr[data-original-title] { cursor: help; border-bottom: 1px dotted #777; } .initialism { font-size: 90%; text-transform: uppercase; } blockquote { padding: 10px 20px; margin: 0 0 20px; font-size: 17.5px; border-left: 5px solid #eee; } blockquote p:last-child, blockquote ul:last-child, blockquote ol:last-child { margin-bottom: 0; } blockquote footer, blockquote small, blockquote .small { display: block; font-size: 80%; line-height: 1.42857143; color: #777; } blockquote footer:before, blockquote small:before, blockquote .small:before { content: '\2014 \00A0'; } .blockquote-reverse, blockquote.pull-right { padding-right: 15px; padding-left: 0; text-align: right; border-right: 5px solid #eee; border-left: 0; } .blockquote-reverse footer:before, blockquote.pull-right footer:before, .blockquote-reverse small:before, blockquote.pull-right small:before, .blockquote-reverse .small:before, blockquote.pull-right .small:before { content: ''; } .blockquote-reverse footer:after, blockquote.pull-right footer:after, .blockquote-reverse small:after, blockquote.pull-right small:after, .blockquote-reverse .small:after, blockquote.pull-right .small:after { content: '\00A0 \2014'; } address { margin-bottom: 20px; font-style: normal; line-height: 1.42857143; } code, kbd, pre, samp { font-family: Menlo, Monaco, Consolas, "Courier New", monospace; } code { padding: 2px 4px; font-size: 90%; color: #c7254e; background-color: #f9f2f4; border-radius: 4px; } kbd { padding: 2px 4px; font-size: 90%; color: #fff; background-color: #333; border-radius: 3px; -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25); } kbd kbd { padding: 0; font-size: 100%; font-weight: bold; -webkit-box-shadow: none; box-shadow: none; } pre { display: block; padding: 9.5px; margin: 0 0 10px; font-size: 13px; line-height: 1.42857143; color: #333; word-break: break-all; word-wrap: break-word; background-color: #f5f5f5; border: 1px solid #ccc; border-radius: 4px; } pre code { padding: 0; font-size: inherit; color: inherit; white-space: pre-wrap; background-color: transparent; border-radius: 0; } .pre-scrollable { max-height: 340px; overflow-y: scroll; } .container { padding-right: 15px; padding-left: 15px; margin-right: auto; margin-left: auto; } @media (min-width: 768px) { .container { width: 750px; } } @media (min-width: 992px) { .container { width: 970px; } } @media (min-width: 1200px) { .container { width: 1170px; } } .container-fluid { padding-right: 15px; padding-left: 15px; margin-right: auto; margin-left: auto; } .row { margin-right: -15px; margin-left: -15px; } .col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 { position: relative; min-height: 1px; padding-right: 15px; padding-left: 15px; } .col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 { float: left; } .col-xs-12 { width: 100%; } .col-xs-11 { width: 91.66666667%; } .col-xs-10 { width: 83.33333333%; } .col-xs-9 { width: 75%; } .col-xs-8 { width: 66.66666667%; } .col-xs-7 { width: 58.33333333%; } .col-xs-6 { width: 50%; } .col-xs-5 { width: 41.66666667%; } .col-xs-4 { width: 33.33333333%; } .col-xs-3 { width: 25%; } .col-xs-2 { width: 16.66666667%; } .col-xs-1 { width: 8.33333333%; } .col-xs-pull-12 { right: 100%; } .col-xs-pull-11 { right: 91.66666667%; } .col-xs-pull-10 { right: 83.33333333%; } .col-xs-pull-9 { right: 75%; } .col-xs-pull-8 { right: 66.66666667%; } .col-xs-pull-7 { right: 58.33333333%; } .col-xs-pull-6 { right: 50%; } .col-xs-pull-5 { right: 41.66666667%; } .col-xs-pull-4 { right: 33.33333333%; } .col-xs-pull-3 { right: 25%; } .col-xs-pull-2 { right: 16.66666667%; } .col-xs-pull-1 { right: 8.33333333%; } .col-xs-pull-0 { right: auto; } .col-xs-push-12 { left: 100%; } .col-xs-push-11 { left: 91.66666667%; } .col-xs-push-10 { left: 83.33333333%; } .col-xs-push-9 { left: 75%; } .col-xs-push-8 { left: 66.66666667%; } .col-xs-push-7 { left: 58.33333333%; } .col-xs-push-6 { left: 50%; } .col-xs-push-5 { left: 41.66666667%; } .col-xs-push-4 { left: 33.33333333%; } .col-xs-push-3 { left: 25%; } .col-xs-push-2 { left: 16.66666667%; } .col-xs-push-1 { left: 8.33333333%; } .col-xs-push-0 { left: auto; } .col-xs-offset-12 { margin-left: 100%; } .col-xs-offset-11 { margin-left: 91.66666667%; } .col-xs-offset-10 { margin-left: 83.33333333%; } .col-xs-offset-9 { margin-left: 75%; } .col-xs-offset-8 { margin-left: 66.66666667%; } .col-xs-offset-7 { margin-left: 58.33333333%; } .col-xs-offset-6 { margin-left: 50%; } .col-xs-offset-5 { margin-left: 41.66666667%; } .col-xs-offset-4 { margin-left: 33.33333333%; } .col-xs-offset-3 { margin-left: 25%; } .col-xs-offset-2 { margin-left: 16.66666667%; } .col-xs-offset-1 { margin-left: 8.33333333%; } .col-xs-offset-0 { margin-left: 0; } @media (min-width: 768px) { .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 { float: left; } .col-sm-12 { width: 100%; } .col-sm-11 { width: 91.66666667%; } .col-sm-10 { width: 83.33333333%; } .col-sm-9 { width: 75%; } .col-sm-8 { width: 66.66666667%; } .col-sm-7 { width: 58.33333333%; } .col-sm-6 { width: 50%; } .col-sm-5 { width: 41.66666667%; } .col-sm-4 { width: 33.33333333%; } .col-sm-3 { width: 25%; } .col-sm-2 { width: 16.66666667%; } .col-sm-1 { width: 8.33333333%; } .col-sm-pull-12 { right: 100%; } .col-sm-pull-11 { right: 91.66666667%; } .col-sm-pull-10 { right: 83.33333333%; } .col-sm-pull-9 { right: 75%; } .col-sm-pull-8 { right: 66.66666667%; } .col-sm-pull-7 { right: 58.33333333%; } .col-sm-pull-6 { right: 50%; } .col-sm-pull-5 { right: 41.66666667%; } .col-sm-pull-4 { right: 33.33333333%; } .col-sm-pull-3 { right: 25%; } .col-sm-pull-2 { right: 16.66666667%; } .col-sm-pull-1 { right: 8.33333333%; } .col-sm-pull-0 { right: auto; } .col-sm-push-12 { left: 100%; } .col-sm-push-11 { left: 91.66666667%; } .col-sm-push-10 { left: 83.33333333%; } .col-sm-push-9 { left: 75%; } .col-sm-push-8 { left: 66.66666667%; } .col-sm-push-7 { left: 58.33333333%; } .col-sm-push-6 { left: 50%; } .col-sm-push-5 { left: 41.66666667%; } .col-sm-push-4 { left: 33.33333333%; } .col-sm-push-3 { left: 25%; } .col-sm-push-2 { left: 16.66666667%; } .col-sm-push-1 { left: 8.33333333%; } .col-sm-push-0 { left: auto; } .col-sm-offset-12 { margin-left: 100%; } .col-sm-offset-11 { margin-left: 91.66666667%; } .col-sm-offset-10 { margin-left: 83.33333333%; } .col-sm-offset-9 { margin-left: 75%; } .col-sm-offset-8 { margin-left: 66.66666667%; } .col-sm-offset-7 { margin-left: 58.33333333%; } .col-sm-offset-6 { margin-left: 50%; } .col-sm-offset-5 { margin-left: 41.66666667%; } .col-sm-offset-4 { margin-left: 33.33333333%; } .col-sm-offset-3 { margin-left: 25%; } .col-sm-offset-2 { margin-left: 16.66666667%; } .col-sm-offset-1 { margin-left: 8.33333333%; } .col-sm-offset-0 { margin-left: 0; } } @media (min-width: 992px) { .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 { float: left; } .col-md-12 { width: 100%; } .col-md-11 { width: 91.66666667%; } .col-md-10 { width: 83.33333333%; } .col-md-9 { width: 75%; } .col-md-8 { width: 66.66666667%; } .col-md-7 { width: 58.33333333%; } .col-md-6 { width: 50%; } .col-md-5 { width: 41.66666667%; } .col-md-4 { width: 33.33333333%; } .col-md-3 { width: 25%; } .col-md-2 { width: 16.66666667%; } .col-md-1 { width: 8.33333333%; } .col-md-pull-12 { right: 100%; } .col-md-pull-11 { right: 91.66666667%; } .col-md-pull-10 { right: 83.33333333%; } .col-md-pull-9 { right: 75%; } .col-md-pull-8 { right: 66.66666667%; } .col-md-pull-7 { right: 58.33333333%; } .col-md-pull-6 { right: 50%; } .col-md-pull-5 { right: 41.66666667%; } .col-md-pull-4 { right: 33.33333333%; } .col-md-pull-3 { right: 25%; } .col-md-pull-2 { right: 16.66666667%; } .col-md-pull-1 { right: 8.33333333%; } .col-md-pull-0 { right: auto; } .col-md-push-12 { left: 100%; } .col-md-push-11 { left: 91.66666667%; } .col-md-push-10 { left: 83.33333333%; } .col-md-push-9 { left: 75%; } .col-md-push-8 { left: 66.66666667%; } .col-md-push-7 { left: 58.33333333%; } .col-md-push-6 { left: 50%; } .col-md-push-5 { left: 41.66666667%; } .col-md-push-4 { left: 33.33333333%; } .col-md-push-3 { left: 25%; } .col-md-push-2 { left: 16.66666667%; } .col-md-push-1 { left: 8.33333333%; } .col-md-push-0 { left: auto; } .col-md-offset-12 { margin-left: 100%; } .col-md-offset-11 { margin-left: 91.66666667%; } .col-md-offset-10 { margin-left: 83.33333333%; } .col-md-offset-9 { margin-left: 75%; } .col-md-offset-8 { margin-left: 66.66666667%; } .col-md-offset-7 { margin-left: 58.33333333%; } .col-md-offset-6 { margin-left: 50%; } .col-md-offset-5 { margin-left: 41.66666667%; } .col-md-offset-4 { margin-left: 33.33333333%; } .col-md-offset-3 { margin-left: 25%; } .col-md-offset-2 { margin-left: 16.66666667%; } .col-md-offset-1 { margin-left: 8.33333333%; } .col-md-offset-0 { margin-left: 0; } } @media (min-width: 1600px) { .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 { float: left; } .col-lg-12 { width: 100%; } .col-lg-11 { width: 91.66666667%; } .col-lg-10 { width: 83.33333333%; } .col-lg-9 { width: 75%; } .col-lg-8 { width: 66.66666667%; } .col-lg-7 { width: 58.33333333%; } .col-lg-6 { width: 50%; } .col-lg-5 { width: 41.66666667%; } .col-lg-4 { width: 33.33333333%; } .col-lg-3 { width: 25%; } .col-lg-2 { width: 16.66666667%; } .col-lg-1 { width: 8.33333333%; } .col-lg-pull-12 { right: 100%; } .col-lg-pull-11 { right: 91.66666667%; } .col-lg-pull-10 { right: 83.33333333%; } .col-lg-pull-9 { right: 75%; } .col-lg-pull-8 { right: 66.66666667%; } .col-lg-pull-7 { right: 58.33333333%; } .col-lg-pull-6 { right: 50%; } .col-lg-pull-5 { right: 41.66666667%; } .col-lg-pull-4 { right: 33.33333333%; } .col-lg-pull-3 { right: 25%; } .col-lg-pull-2 { right: 16.66666667%; } .col-lg-pull-1 { right: 8.33333333%; } .col-lg-pull-0 { right: auto; } .col-lg-push-12 { left: 100%; } .col-lg-push-11 { left: 91.66666667%; } .col-lg-push-10 { left: 83.33333333%; } .col-lg-push-9 { left: 75%; } .col-lg-push-8 { left: 66.66666667%; } .col-lg-push-7 { left: 58.33333333%; } .col-lg-push-6 { left: 50%; } .col-lg-push-5 { left: 41.66666667%; } .col-lg-push-4 { left: 33.33333333%; } .col-lg-push-3 { left: 25%; } .col-lg-push-2 { left: 16.66666667%; } .col-lg-push-1 { left: 8.33333333%; } .col-lg-push-0 { left: auto; } .col-lg-offset-12 { margin-left: 100%; } .col-lg-offset-11 { margin-left: 91.66666667%; } .col-lg-offset-10 { margin-left: 83.33333333%; } .col-lg-offset-9 { margin-left: 75%; } .col-lg-offset-8 { margin-left: 66.66666667%; } .col-lg-offset-7 { margin-left: 58.33333333%; } .col-lg-offset-6 { margin-left: 50%; } .col-lg-offset-5 { margin-left: 41.66666667%; } .col-lg-offset-4 { margin-left: 33.33333333%; } .col-lg-offset-3 { margin-left: 25%; } .col-lg-offset-2 { margin-left: 16.66666667%; } .col-lg-offset-1 { margin-left: 8.33333333%; } .col-lg-offset-0 { margin-left: 0; } } table { background-color: transparent; } caption { padding-top: 8px; padding-bottom: 8px; color: #777; text-align: left; } th { text-align: left; } .table { width: 100%; max-width: 100%; margin-bottom: 20px; } .table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td { padding: 8px; line-height: 1.42857143; vertical-align: top; border-top: 1px solid #ddd; } .table > thead > tr > th { vertical-align: bottom; border-bottom: 2px solid #ddd; } .table > caption + thead > tr:first-child > th, .table > colgroup + thead > tr:first-child > th, .table > thead:first-child > tr:first-child > th, .table > caption + thead > tr:first-child > td, .table > colgroup + thead > tr:first-child > td, .table > thead:first-child > tr:first-child > td { border-top: 0; } .table > tbody + tbody { border-top: 2px solid #ddd; } .table .table { background-color: #fff; } .table-condensed > thead > tr > th, .table-condensed > tbody > tr > th, .table-condensed > tfoot > tr > th, .table-condensed > thead > tr > td, .table-condensed > tbody > tr > td, .table-condensed > tfoot > tr > td { padding: 5px; } .table-bordered { border: 1px solid #ddd; } .table-bordered > thead > tr > th, .table-bordered > tbody > tr > th, .table-bordered > tfoot > tr > th, .table-bordered > thead > tr > td, .table-bordered > tbody > tr > td, .table-bordered > tfoot > tr > td { border: 1px solid #ddd; } .table-bordered > thead > tr > th, .table-bordered > thead > tr > td { border-bottom-width: 2px; } .table-striped > tbody > tr:nth-of-type(odd) { background-color: #f9f9f9; } .table-hover > tbody > tr:hover { background-color: #f5f5f5; } table col[class*="col-"] { position: static; display: table-column; float: none; } table td[class*="col-"], table th[class*="col-"] { position: static; display: table-cell; float: none; } .table > thead > tr > td.active, .table > tbody > tr > td.active, .table > tfoot > tr > td.active, .table > thead > tr > th.active, .table > tbody > tr > th.active, .table > tfoot > tr > th.active, .table > thead > tr.active > td, .table > tbody > tr.active > td, .table > tfoot > tr.active > td, .table > thead > tr.active > th, .table > tbody > tr.active > th, .table > tfoot > tr.active > th { background-color: #f5f5f5; } .table-hover > tbody > tr > td.active:hover, .table-hover > tbody > tr > th.active:hover, .table-hover > tbody > tr.active:hover > td, .table-hover > tbody > tr:hover > .active, .table-hover > tbody > tr.active:hover > th { background-color: #e8e8e8; } .table > thead > tr > td.success, .table > tbody > tr > td.success, .table > tfoot > tr > td.success, .table > thead > tr > th.success, .table > tbody > tr > th.success, .table > tfoot > tr > th.success, .table > thead > tr.success > td, .table > tbody > tr.success > td, .table > tfoot > tr.success > td, .table > thead > tr.success > th, .table > tbody > tr.success > th, .table > tfoot > tr.success > th { background-color: #dff0d8; } .table-hover > tbody > tr > td.success:hover, .table-hover > tbody > tr > th.success:hover, .table-hover > tbody > tr.success:hover > td, .table-hover > tbody > tr:hover > .success, .table-hover > tbody > tr.success:hover > th { background-color: #d0e9c6; } .table > thead > tr > td.info, .table > tbody > tr > td.info, .table > tfoot > tr > td.info, .table > thead > tr > th.info, .table > tbody > tr > th.info, .table > tfoot > tr > th.info, .table > thead > tr.info > td, .table > tbody > tr.info > td, .table > tfoot > tr.info > td, .table > thead > tr.info > th, .table > tbody > tr.info > th, .table > tfoot > tr.info > th { background-color: #d9edf7; } .table-hover > tbody > tr > td.info:hover, .table-hover > tbody > tr > th.info:hover, .table-hover > tbody > tr.info:hover > td, .table-hover > tbody > tr:hover > .info, .table-hover > tbody > tr.info:hover > th { background-color: #c4e3f3; } .table > thead > tr > td.warning, .table > tbody > tr > td.warning, .table > tfoot > tr > td.warning, .table > thead > tr > th.warning, .table > tbody > tr > th.warning, .table > tfoot > tr > th.warning, .table > thead > tr.warning > td, .table > tbody > tr.warning > td, .table > tfoot > tr.warning > td, .table > thead > tr.warning > th, .table > tbody > tr.warning > th, .table > tfoot > tr.warning > th { background-color: #fcf8e3; } .table-hover > tbody > tr > td.warning:hover, .table-hover > tbody > tr > th.warning:hover, .table-hover > tbody > tr.warning:hover > td, .table-hover > tbody > tr:hover > .warning, .table-hover > tbody > tr.warning:hover > th { background-color: #faf2cc; } .table > thead > tr > td.danger, .table > tbody > tr > td.danger, .table > tfoot > tr > td.danger, .table > thead > tr > th.danger, .table > tbody > tr > th.danger, .table > tfoot > tr > th.danger, .table > thead > tr.danger > td, .table > tbody > tr.danger > td, .table > tfoot > tr.danger > td, .table > thead > tr.danger > th, .table > tbody > tr.danger > th, .table > tfoot > tr.danger > th { background-color: #f2dede; } .table-hover > tbody > tr > td.danger:hover, .table-hover > tbody > tr > th.danger:hover, .table-hover > tbody > tr.danger:hover > td, .table-hover > tbody > tr:hover > .danger, .table-hover > tbody > tr.danger:hover > th { background-color: #ebcccc; } .table-responsive { min-height: .01%; overflow-x: auto; } @media screen and (max-width: 767px) { .table-responsive { width: 100%; margin-bottom: 15px; overflow-y: hidden; -ms-overflow-style: -<API key>; border: 1px solid #ddd; } .table-responsive > .table { margin-bottom: 0; } .table-responsive > .table > thead > tr > th, .table-responsive > .table > tbody > tr > th, .table-responsive > .table > tfoot > tr > th, .table-responsive > .table > thead > tr > td, .table-responsive > .table > tbody > tr > td, .table-responsive > .table > tfoot > tr > td { white-space: nowrap; } .table-responsive > .table-bordered { border: 0; } .table-responsive > .table-bordered > thead > tr > th:first-child, .table-responsive > .table-bordered > tbody > tr > th:first-child, .table-responsive > .table-bordered > tfoot > tr > th:first-child, .table-responsive > .table-bordered > thead > tr > td:first-child, .table-responsive > .table-bordered > tbody > tr > td:first-child, .table-responsive > .table-bordered > tfoot > tr > td:first-child { border-left: 0; } .table-responsive > .table-bordered > thead > tr > th:last-child, .table-responsive > .table-bordered > tbody > tr > th:last-child, .table-responsive > .table-bordered > tfoot > tr > th:last-child, .table-responsive > .table-bordered > thead > tr > td:last-child, .table-responsive > .table-bordered > tbody > tr > td:last-child, .table-responsive > .table-bordered > tfoot > tr > td:last-child { border-right: 0; } .table-responsive > .table-bordered > tbody > tr:last-child > th, .table-responsive > .table-bordered > tfoot > tr:last-child > th, .table-responsive > .table-bordered > tbody > tr:last-child > td, .table-responsive > .table-bordered > tfoot > tr:last-child > td { border-bottom: 0; } } fieldset { min-width: 0; padding: 0; margin: 0; border: 0; } legend { display: block; width: 100%; padding: 0; margin-bottom: 20px; font-size: 21px; line-height: inherit; color: #333; border: 0; border-bottom: 1px solid #e5e5e5; } label { display: inline-block; max-width: 100%; margin-bottom: 5px; font-weight: bold; } input[type="search"] { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } input[type="radio"], input[type="checkbox"] { margin: 4px 0 0; margin-top: 1px \9; line-height: normal; } input[type="file"] { display: block; } input[type="range"] { display: block; width: 100%; } select[multiple], select[size] { height: auto; } input[type="file"]:focus, input[type="radio"]:focus, input[type="checkbox"]:focus { outline: thin dotted; outline: 5px auto -<API key>; outline-offset: -2px; } output { display: block; padding-top: 7px; font-size: 14px; line-height: 1.42857143; color: #555; } .form-control { display: block; width: 100%; height: 34px; padding: 6px 12px; font-size: 14px; line-height: 1.42857143; color: #555; background-color: #fff; background-image: none; border: 1px solid #ccc; border-radius: 4px; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s; -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; } .form-control:focus { border-color: #66afe9; outline: 0; -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6); box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6); } .form-control::-moz-placeholder { color: #999; opacity: 1; } .form-control:-<API key> { color: #999; } .form-control::-<API key> { color: #999; } .form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control { background-color: #eee; opacity: 1; } .form-control[disabled], fieldset[disabled] .form-control { cursor: not-allowed; } textarea.form-control { height: auto; } input[type="search"] { -webkit-appearance: none; } @media screen and (-<API key>: 0) { input[type="date"], input[type="time"], input[type="datetime-local"], input[type="month"] { line-height: 34px; } input[type="date"].input-sm, input[type="time"].input-sm, input[type="datetime-local"].input-sm, input[type="month"].input-sm, .input-group-sm input[type="date"], .input-group-sm input[type="time"], .input-group-sm input[type="datetime-local"], .input-group-sm input[type="month"] { line-height: 30px; } input[type="date"].input-lg, input[type="time"].input-lg, input[type="datetime-local"].input-lg, input[type="month"].input-lg, .input-group-lg input[type="date"], .input-group-lg input[type="time"], .input-group-lg input[type="datetime-local"], .input-group-lg input[type="month"] { line-height: 46px; } } .form-group { margin-bottom: 15px; } .radio, .checkbox { position: relative; display: block; margin-top: 10px; margin-bottom: 10px; } .radio label, .checkbox label { min-height: 20px; padding-left: 20px; margin-bottom: 0; font-weight: normal; cursor: pointer; } .radio input[type="radio"], .radio-inline input[type="radio"], .checkbox input[type="checkbox"], .checkbox-inline input[type="checkbox"] { position: absolute; margin-top: 4px \9; margin-left: -20px; } .radio + .radio, .checkbox + .checkbox { margin-top: -5px; } .radio-inline, .checkbox-inline { position: relative; display: inline-block; padding-left: 20px; margin-bottom: 0; font-weight: normal; vertical-align: middle; cursor: pointer; } .radio-inline + .radio-inline, .checkbox-inline + .checkbox-inline { margin-top: 0; margin-left: 10px; } input[type="radio"][disabled], input[type="checkbox"][disabled], input[type="radio"].disabled, input[type="checkbox"].disabled, fieldset[disabled] input[type="radio"], fieldset[disabled] input[type="checkbox"] { cursor: not-allowed; } .radio-inline.disabled, .checkbox-inline.disabled, fieldset[disabled] .radio-inline, fieldset[disabled] .checkbox-inline { cursor: not-allowed; } .radio.disabled label, .checkbox.disabled label, fieldset[disabled] .radio label, fieldset[disabled] .checkbox label { cursor: not-allowed; } .form-control-static { min-height: 34px; padding-top: 7px; padding-bottom: 7px; margin-bottom: 0; } .form-control-static.input-lg, .form-control-static.input-sm { padding-right: 0; padding-left: 0; } .input-sm { height: 30px; padding: 5px 10px; font-size: 12px; line-height: 1.5; border-radius: 3px; } select.input-sm { height: 30px; line-height: 30px; } textarea.input-sm, select[multiple].input-sm { height: auto; } .form-group-sm .form-control { height: 30px; padding: 5px 10px; font-size: 12px; line-height: 1.5; border-radius: 3px; } select.form-group-sm .form-control { height: 30px; line-height: 30px; } textarea.form-group-sm .form-control, select[multiple].form-group-sm .form-control { height: auto; } .form-group-sm .form-control-static { height: 30px; min-height: 32px; padding: 5px 10px; font-size: 12px; line-height: 1.5; } .input-lg { height: 46px; padding: 10px 16px; font-size: 18px; line-height: 1.3333333; border-radius: 6px; } select.input-lg { height: 46px; line-height: 46px; } textarea.input-lg, select[multiple].input-lg { height: auto; } .form-group-lg .form-control { height: 46px; padding: 10px 16px; font-size: 18px; line-height: 1.3333333; border-radius: 6px; } select.form-group-lg .form-control { height: 46px; line-height: 46px; } textarea.form-group-lg .form-control, select[multiple].form-group-lg .form-control { height: auto; } .form-group-lg .form-control-static { height: 46px; min-height: 38px; padding: 10px 16px; font-size: 18px; line-height: 1.3333333; } .has-feedback { position: relative; } .has-feedback .form-control { padding-right: 42.5px; } .<API key> { position: absolute; top: 0; right: 0; z-index: 2; display: block; width: 34px; height: 34px; line-height: 34px; text-align: center; pointer-events: none; } .input-lg + .<API key> { width: 46px; height: 46px; line-height: 46px; } .input-sm + .<API key> { width: 30px; height: 30px; line-height: 30px; } .has-success .help-block, .has-success .control-label, .has-success .radio, .has-success .checkbox, .has-success .radio-inline, .has-success .checkbox-inline, .has-success.radio label, .has-success.checkbox label, .has-success.radio-inline label, .has-success.checkbox-inline label { color: #3c763d; } .has-success .form-control { border-color: #3c763d; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); } .has-success .form-control:focus { border-color: #2b542c; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168; } .has-success .input-group-addon { color: #3c763d; background-color: #dff0d8; border-color: #3c763d; } .has-success .<API key> { color: #3c763d; } .has-warning .help-block, .has-warning .control-label, .has-warning .radio, .has-warning .checkbox, .has-warning .radio-inline, .has-warning .checkbox-inline, .has-warning.radio label, .has-warning.checkbox label, .has-warning.radio-inline label, .has-warning.checkbox-inline label { color: #8a6d3b; } .has-warning .form-control { border-color: #8a6d3b; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); } .has-warning .form-control:focus { border-color: #66512c; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b; } .has-warning .input-group-addon { color: #8a6d3b; background-color: #fcf8e3; border-color: #8a6d3b; } .has-warning .<API key> { color: #8a6d3b; } .has-error .help-block, .has-error .control-label, .has-error .radio, .has-error .checkbox, .has-error .radio-inline, .has-error .checkbox-inline, .has-error.radio label, .has-error.checkbox label, .has-error.radio-inline label, .has-error.checkbox-inline label { color: #a94442; } .has-error .form-control { border-color: #a94442; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); } .has-error .form-control:focus { border-color: #843534; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483; } .has-error .input-group-addon { color: #a94442; background-color: #f2dede; border-color: #a94442; } .has-error .<API key> { color: #a94442; } .has-feedback label ~ .<API key> { top: 25px; } .has-feedback label.sr-only ~ .<API key> { top: 0; } .help-block { display: block; margin-top: 5px; margin-bottom: 10px; color: #737373; } @media (min-width: 768px) { .form-inline .form-group { display: inline-block; margin-bottom: 0; vertical-align: middle; } .form-inline .form-control { display: inline-block; width: auto; vertical-align: middle; } .form-inline .form-control-static { display: inline-block; } .form-inline .input-group { display: inline-table; vertical-align: middle; } .form-inline .input-group .input-group-addon, .form-inline .input-group .input-group-btn, .form-inline .input-group .form-control { width: auto; } .form-inline .input-group > .form-control { width: 100%; } .form-inline .control-label { margin-bottom: 0; vertical-align: middle; } .form-inline .radio, .form-inline .checkbox { display: inline-block; margin-top: 0; margin-bottom: 0; vertical-align: middle; } .form-inline .radio label, .form-inline .checkbox label { padding-left: 0; } .form-inline .radio input[type="radio"], .form-inline .checkbox input[type="checkbox"] { position: relative; margin-left: 0; } .form-inline .has-feedback .<API key> { top: 0; } } .form-horizontal .radio, .form-horizontal .checkbox, .form-horizontal .radio-inline, .form-horizontal .checkbox-inline { padding-top: 7px; margin-top: 0; margin-bottom: 0; } .form-horizontal .radio, .form-horizontal .checkbox { min-height: 27px; } .form-horizontal .form-group { margin-right: -15px; margin-left: -15px; } @media (min-width: 768px) { .form-horizontal .control-label { padding-top: 7px; margin-bottom: 0; text-align: right; } } .form-horizontal .has-feedback .<API key> { right: 15px; } @media (min-width: 768px) { .form-horizontal .form-group-lg .control-label { padding-top: 14.333333px; } } @media (min-width: 768px) { .form-horizontal .form-group-sm .control-label { padding-top: 6px; } } .btn { display: inline-block; padding: 6px 12px; margin-bottom: 0; font-size: 14px; font-weight: normal; line-height: 1.42857143; text-align: center; white-space: nowrap; vertical-align: middle; -ms-touch-action: manipulation; touch-action: manipulation; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; background-image: none; border: 1px solid transparent; border-radius: 4px; } .btn:focus, .btn:active:focus, .btn.active:focus, .btn.focus, .btn:active.focus, .btn.active.focus { outline: thin dotted; outline: 5px auto -<API key>; outline-offset: -2px; } .btn:hover, .btn:focus, .btn.focus { color: #333; text-decoration: none; } .btn:active, .btn.active { background-image: none; outline: 0; -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); } .btn.disabled, .btn[disabled], fieldset[disabled] .btn { pointer-events: none; cursor: not-allowed; filter: alpha(opacity=65); -webkit-box-shadow: none; box-shadow: none; opacity: .65; } .btn-default { color: #333; background-color: #fff; border-color: #ccc; } .btn-default:hover, .btn-default:focus, .btn-default.focus, .btn-default:active, .btn-default.active, .open > .dropdown-toggle.btn-default { color: #333; background-color: #e6e6e6; border-color: #adadad; } .btn-default:active, .btn-default.active, .open > .dropdown-toggle.btn-default { background-image: none; } .btn-default.disabled, .btn-default[disabled], fieldset[disabled] .btn-default, .btn-default.disabled:hover, .btn-default[disabled]:hover, fieldset[disabled] .btn-default:hover, .btn-default.disabled:focus, .btn-default[disabled]:focus, fieldset[disabled] .btn-default:focus, .btn-default.disabled.focus, .btn-default[disabled].focus, fieldset[disabled] .btn-default.focus, .btn-default.disabled:active, .btn-default[disabled]:active, fieldset[disabled] .btn-default:active, .btn-default.disabled.active, .btn-default[disabled].active, fieldset[disabled] .btn-default.active { background-color: #fff; border-color: #ccc; } .btn-default .badge { color: #fff; background-color: #333; } .btn-primary { color: #fff; background-color: #337ab7; border-color: #2e6da4; } .btn-primary:hover, .btn-primary:focus, .btn-primary.focus, .btn-primary:active, .btn-primary.active, .open > .dropdown-toggle.btn-primary { color: #fff; background-color: #286090; border-color: #204d74; } .btn-primary:active, .btn-primary.active, .open > .dropdown-toggle.btn-primary { background-image: none; } .btn-primary.disabled, .btn-primary[disabled], fieldset[disabled] .btn-primary, .btn-primary.disabled:hover, .btn-primary[disabled]:hover, fieldset[disabled] .btn-primary:hover, .btn-primary.disabled:focus, .btn-primary[disabled]:focus, fieldset[disabled] .btn-primary:focus, .btn-primary.disabled.focus, .btn-primary[disabled].focus, fieldset[disabled] .btn-primary.focus, .btn-primary.disabled:active, .btn-primary[disabled]:active, fieldset[disabled] .btn-primary:active, .btn-primary.disabled.active, .btn-primary[disabled].active, fieldset[disabled] .btn-primary.active { background-color: #337ab7; border-color: #2e6da4; } .btn-primary .badge { color: #337ab7; background-color: #fff; } .btn-success { color: #fff; background-color: #5cb85c; border-color: #4cae4c; } .btn-success:hover, .btn-success:focus, .btn-success.focus, .btn-success:active, .btn-success.active, .open > .dropdown-toggle.btn-success { color: #fff; background-color: #449d44; border-color: #398439; } .btn-success:active, .btn-success.active, .open > .dropdown-toggle.btn-success { background-image: none; } .btn-success.disabled, .btn-success[disabled], fieldset[disabled] .btn-success, .btn-success.disabled:hover, .btn-success[disabled]:hover, fieldset[disabled] .btn-success:hover, .btn-success.disabled:focus, .btn-success[disabled]:focus, fieldset[disabled] .btn-success:focus, .btn-success.disabled.focus, .btn-success[disabled].focus, fieldset[disabled] .btn-success.focus, .btn-success.disabled:active, .btn-success[disabled]:active, fieldset[disabled] .btn-success:active, .btn-success.disabled.active, .btn-success[disabled].active, fieldset[disabled] .btn-success.active { background-color: #5cb85c; border-color: #4cae4c; } .btn-success .badge { color: #5cb85c; background-color: #fff; } .btn-info { color: #fff; background-color: #5bc0de; border-color: #46b8da; } .btn-info:hover, .btn-info:focus, .btn-info.focus, .btn-info:active, .btn-info.active, .open > .dropdown-toggle.btn-info { color: #fff; background-color: #31b0d5; border-color: #269abc; } .btn-info:active, .btn-info.active, .open > .dropdown-toggle.btn-info { background-image: none; } .btn-info.disabled, .btn-info[disabled], fieldset[disabled] .btn-info, .btn-info.disabled:hover, .btn-info[disabled]:hover, fieldset[disabled] .btn-info:hover, .btn-info.disabled:focus, .btn-info[disabled]:focus, fieldset[disabled] .btn-info:focus, .btn-info.disabled.focus, .btn-info[disabled].focus, fieldset[disabled] .btn-info.focus, .btn-info.disabled:active, .btn-info[disabled]:active, fieldset[disabled] .btn-info:active, .btn-info.disabled.active, .btn-info[disabled].active, fieldset[disabled] .btn-info.active { background-color: #5bc0de; border-color: #46b8da; } .btn-info .badge { color: #5bc0de; background-color: #fff; } .btn-warning { color: #fff; background-color: #f0ad4e; border-color: #eea236; } .btn-warning:hover, .btn-warning:focus, .btn-warning.focus, .btn-warning:active, .btn-warning.active, .open > .dropdown-toggle.btn-warning { color: #fff; background-color: #ec971f; border-color: #d58512; } .btn-warning:active, .btn-warning.active, .open > .dropdown-toggle.btn-warning { background-image: none; } .btn-warning.disabled, .btn-warning[disabled], fieldset[disabled] .btn-warning, .btn-warning.disabled:hover, .btn-warning[disabled]:hover, fieldset[disabled] .btn-warning:hover, .btn-warning.disabled:focus, .btn-warning[disabled]:focus, fieldset[disabled] .btn-warning:focus, .btn-warning.disabled.focus, .btn-warning[disabled].focus, fieldset[disabled] .btn-warning.focus, .btn-warning.disabled:active, .btn-warning[disabled]:active, fieldset[disabled] .btn-warning:active, .btn-warning.disabled.active, .btn-warning[disabled].active, fieldset[disabled] .btn-warning.active { background-color: #f0ad4e; border-color: #eea236; } .btn-warning .badge { color: #f0ad4e; background-color: #fff; } .btn-danger { color: #fff; background-color: #d9534f; border-color: #d43f3a; } .btn-danger:hover, .btn-danger:focus, .btn-danger.focus, .btn-danger:active, .btn-danger.active, .open > .dropdown-toggle.btn-danger { color: #fff; background-color: #c9302c; border-color: #ac2925; } .btn-danger:active, .btn-danger.active, .open > .dropdown-toggle.btn-danger { background-image: none; } .btn-danger.disabled, .btn-danger[disabled], fieldset[disabled] .btn-danger, .btn-danger.disabled:hover, .btn-danger[disabled]:hover, fieldset[disabled] .btn-danger:hover, .btn-danger.disabled:focus, .btn-danger[disabled]:focus, fieldset[disabled] .btn-danger:focus, .btn-danger.disabled.focus, .btn-danger[disabled].focus, fieldset[disabled] .btn-danger.focus, .btn-danger.disabled:active, .btn-danger[disabled]:active, fieldset[disabled] .btn-danger:active, .btn-danger.disabled.active, .btn-danger[disabled].active, fieldset[disabled] .btn-danger.active { background-color: #d9534f; border-color: #d43f3a; } .btn-danger .badge { color: #d9534f; background-color: #fff; } .btn-link { font-weight: normal; color: #337ab7; border-radius: 0; } .btn-link, .btn-link:active, .btn-link.active, .btn-link[disabled], fieldset[disabled] .btn-link { background-color: transparent; -webkit-box-shadow: none; box-shadow: none; } .btn-link, .btn-link:hover, .btn-link:focus, .btn-link:active { border-color: transparent; } .btn-link:hover, .btn-link:focus { color: #23527c; text-decoration: underline; background-color: transparent; } .btn-link[disabled]:hover, fieldset[disabled] .btn-link:hover, .btn-link[disabled]:focus, fieldset[disabled] .btn-link:focus { color: #777; text-decoration: none; } .btn-lg, .btn-group-lg > .btn { padding: 10px 16px; font-size: 18px; line-height: 1.3333333; border-radius: 6px; } .btn-sm, .btn-group-sm > .btn { padding: 5px 10px; font-size: 12px; line-height: 1.5; border-radius: 3px; } .btn-xs, .btn-group-xs > .btn { padding: 1px 5px; font-size: 12px; line-height: 1.5; border-radius: 3px; } .btn-block { display: block; width: 100%; } .btn-block + .btn-block { margin-top: 5px; } input[type="submit"].btn-block, input[type="reset"].btn-block, input[type="button"].btn-block { width: 100%; } .fade { opacity: 0; -webkit-transition: opacity .15s linear; -o-transition: opacity .15s linear; transition: opacity .15s linear; } .fade.in { opacity: 1; } .collapse { display: none; } .collapse.in { display: block; } tr.collapse.in { display: table-row; } tbody.collapse.in { display: table-row-group; } .collapsing { position: relative; height: 0; overflow: hidden; -<API key>: ease; -<API key>: ease; <API key>: ease; -<API key>: .35s; -<API key>: .35s; transition-duration: .35s; -<API key>: height, visibility; -<API key>: height, visibility; transition-property: height, visibility; } .caret { display: inline-block; width: 0; height: 0; margin-left: 2px; vertical-align: middle; border-top: 4px dashed; border-right: 4px solid transparent; border-left: 4px solid transparent; } .dropup, .dropdown { position: relative; } .dropdown-toggle:focus { outline: 0; } .dropdown-menu { position: absolute; top: 100%; left: 0; z-index: 1000; display: none; float: left; min-width: 160px; padding: 5px 0; margin: 2px 0 0; font-size: 14px; text-align: left; list-style: none; background-color: #fff; -<API key>: padding-box; background-clip: padding-box; border: 1px solid #ccc; border: 1px solid rgba(0, 0, 0, .15); border-radius: 4px; -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175); box-shadow: 0 6px 12px rgba(0, 0, 0, .175); } .dropdown-menu.pull-right { right: 0; left: auto; } .dropdown-menu .divider { height: 1px; margin: 9px 0; overflow: hidden; background-color: #e5e5e5; } .dropdown-menu > li > a { display: block; padding: 3px 20px; clear: both; font-weight: normal; line-height: 1.42857143; color: #333; white-space: nowrap; } .dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus { color: #262626; text-decoration: none; background-color: #f5f5f5; } .dropdown-menu > .active > a, .dropdown-menu > .active > a:hover, .dropdown-menu > .active > a:focus { color: #fff; text-decoration: none; background-color: #337ab7; outline: 0; } .dropdown-menu > .disabled > a, .dropdown-menu > .disabled > a:hover, .dropdown-menu > .disabled > a:focus { color: #777; } .dropdown-menu > .disabled > a:hover, .dropdown-menu > .disabled > a:focus { text-decoration: none; cursor: not-allowed; background-color: transparent; background-image: none; filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); } .open > .dropdown-menu { display: block; } .open > a { outline: 0; } .dropdown-menu-right { right: 0; left: auto; } .dropdown-menu-left { right: auto; left: 0; } .dropdown-header { display: block; padding: 3px 20px; font-size: 12px; line-height: 1.42857143; color: #777; white-space: nowrap; } .dropdown-backdrop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 990; } .pull-right > .dropdown-menu { right: 0; left: auto; } .dropup .caret, .navbar-fixed-bottom .dropdown .caret { content: ""; border-top: 0; border-bottom: 4px solid; } .dropup .dropdown-menu, .navbar-fixed-bottom .dropdown .dropdown-menu { top: auto; bottom: 100%; margin-bottom: 2px; } @media (min-width: 768px) { .navbar-right .dropdown-menu { right: 0; left: auto; } .navbar-right .dropdown-menu-left { right: auto; left: 0; } } .btn-group, .btn-group-vertical { position: relative; display: inline-block; vertical-align: middle; } .btn-group > .btn, .btn-group-vertical > .btn { position: relative; float: left; } .btn-group > .btn:hover, .btn-group-vertical > .btn:hover, .btn-group > .btn:focus, .btn-group-vertical > .btn:focus, .btn-group > .btn:active, .btn-group-vertical > .btn:active, .btn-group > .btn.active, .btn-group-vertical > .btn.active { z-index: 2; } .btn-group .btn + .btn, .btn-group .btn + .btn-group, .btn-group .btn-group + .btn, .btn-group .btn-group + .btn-group { margin-left: -1px; } .btn-toolbar { margin-left: -5px; } .btn-toolbar .btn-group, .btn-toolbar .input-group { float: left; } .btn-toolbar > .btn, .btn-toolbar > .btn-group, .btn-toolbar > .input-group { margin-left: 5px; } .btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) { border-radius: 0; } .btn-group > .btn:first-child { margin-left: 0; } .btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) { <API key>: 0; <API key>: 0; } .btn-group > .btn:last-child:not(:first-child), .btn-group > .dropdown-toggle:not(:first-child) { <API key>: 0; <API key>: 0; } .btn-group > .btn-group { float: left; } .btn-group > .btn-group:not(:first-child):not(:last-child) > .btn { border-radius: 0; } .btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child, .btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle { <API key>: 0; <API key>: 0; } .btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child { <API key>: 0; <API key>: 0; } .btn-group .dropdown-toggle:active, .btn-group.open .dropdown-toggle { outline: 0; } .btn-group > .btn + .dropdown-toggle { padding-right: 8px; padding-left: 8px; } .btn-group > .btn-lg + .dropdown-toggle { padding-right: 12px; padding-left: 12px; } .btn-group.open .dropdown-toggle { -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); } .btn-group.open .dropdown-toggle.btn-link { -webkit-box-shadow: none; box-shadow: none; } .btn .caret { margin-left: 0; } .btn-lg .caret { border-width: 5px 5px 0; border-bottom-width: 0; } .dropup .btn-lg .caret { border-width: 0 5px 5px; } .btn-group-vertical > .btn, .btn-group-vertical > .btn-group, .btn-group-vertical > .btn-group > .btn { display: block; float: none; width: 100%; max-width: 100%; } .btn-group-vertical > .btn-group > .btn { float: none; } .btn-group-vertical > .btn + .btn, .btn-group-vertical > .btn + .btn-group, .btn-group-vertical > .btn-group + .btn, .btn-group-vertical > .btn-group + .btn-group { margin-top: -1px; margin-left: 0; } .btn-group-vertical > .btn:not(:first-child):not(:last-child) { border-radius: 0; } .btn-group-vertical > .btn:first-child:not(:last-child) { <API key>: 4px; <API key>: 0; <API key>: 0; } .btn-group-vertical > .btn:last-child:not(:first-child) { <API key>: 0; <API key>: 0; <API key>: 4px; } .btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn { border-radius: 0; } .btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child, .btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle { <API key>: 0; <API key>: 0; } .btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child { <API key>: 0; <API key>: 0; } .btn-group-justified { display: table; width: 100%; table-layout: fixed; border-collapse: separate; } .btn-group-justified > .btn, .btn-group-justified > .btn-group { display: table-cell; float: none; width: 1%; } .btn-group-justified > .btn-group .btn { width: 100%; } .btn-group-justified > .btn-group .dropdown-menu { left: auto; } [data-toggle="buttons"] > .btn input[type="radio"], [data-toggle="buttons"] > .btn-group > .btn input[type="radio"], [data-toggle="buttons"] > .btn input[type="checkbox"], [data-toggle="buttons"] > .btn-group > .btn input[type="checkbox"] { position: absolute; clip: rect(0, 0, 0, 0); pointer-events: none; } .input-group { position: relative; display: table; border-collapse: separate; } .input-group[class*="col-"] { float: none; padding-right: 0; padding-left: 0; } .input-group .form-control { position: relative; z-index: 2; float: left; width: 100%; margin-bottom: 0; } .input-group-lg > .form-control, .input-group-lg > .input-group-addon, .input-group-lg > .input-group-btn > .btn { height: 46px; padding: 10px 16px; font-size: 18px; line-height: 1.3333333; border-radius: 6px; } select.input-group-lg > .form-control, select.input-group-lg > .input-group-addon, select.input-group-lg > .input-group-btn > .btn { height: 46px; line-height: 46px; } textarea.input-group-lg > .form-control, textarea.input-group-lg > .input-group-addon, textarea.input-group-lg > .input-group-btn > .btn, select[multiple].input-group-lg > .form-control, select[multiple].input-group-lg > .input-group-addon, select[multiple].input-group-lg > .input-group-btn > .btn { height: auto; } .input-group-sm > .form-control, .input-group-sm > .input-group-addon, .input-group-sm > .input-group-btn > .btn { height: 30px; padding: 5px 10px; font-size: 12px; line-height: 1.5; border-radius: 3px; } select.input-group-sm > .form-control, select.input-group-sm > .input-group-addon, select.input-group-sm > .input-group-btn > .btn { height: 30px; line-height: 30px; } textarea.input-group-sm > .form-control, textarea.input-group-sm > .input-group-addon, textarea.input-group-sm > .input-group-btn > .btn, select[multiple].input-group-sm > .form-control, select[multiple].input-group-sm > .input-group-addon, select[multiple].input-group-sm > .input-group-btn > .btn { height: auto; } .input-group-addon, .input-group-btn, .input-group .form-control { display: table-cell; } .input-group-addon:not(:first-child):not(:last-child), .input-group-btn:not(:first-child):not(:last-child), .input-group .form-control:not(:first-child):not(:last-child) { border-radius: 0; } .input-group-addon, .input-group-btn { width: 1%; white-space: nowrap; vertical-align: middle; } .input-group-addon { padding: 6px 12px; font-size: 14px; font-weight: normal; line-height: 1; color: #555; text-align: center; background-color: #eee; border: 1px solid #ccc; border-radius: 4px; } .input-group-addon.input-sm { padding: 5px 10px; font-size: 12px; border-radius: 3px; } .input-group-addon.input-lg { padding: 10px 16px; font-size: 18px; border-radius: 6px; } .input-group-addon input[type="radio"], .input-group-addon input[type="checkbox"] { margin-top: 0; } .input-group .form-control:first-child, .input-group-addon:first-child, .input-group-btn:first-child > .btn, .input-group-btn:first-child > .btn-group > .btn, .input-group-btn:first-child > .dropdown-toggle, .input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle), .input-group-btn:last-child > .btn-group:not(:last-child) > .btn { <API key>: 0; <API key>: 0; } .input-group-addon:first-child { border-right: 0; } .input-group .form-control:last-child, .input-group-addon:last-child, .input-group-btn:last-child > .btn, .input-group-btn:last-child > .btn-group > .btn, .input-group-btn:last-child > .dropdown-toggle, .input-group-btn:first-child > .btn:not(:first-child), .input-group-btn:first-child > .btn-group:not(:first-child) > .btn { <API key>: 0; <API key>: 0; } .input-group-addon:last-child { border-left: 0; } .input-group-btn { position: relative; font-size: 0; white-space: nowrap; } .input-group-btn > .btn { position: relative; } .input-group-btn > .btn + .btn { margin-left: -1px; } .input-group-btn > .btn:hover, .input-group-btn > .btn:focus, .input-group-btn > .btn:active { z-index: 2; } .input-group-btn:first-child > .btn, .input-group-btn:first-child > .btn-group { margin-right: -1px; } .input-group-btn:last-child > .btn, .input-group-btn:last-child > .btn-group { margin-left: -1px; } .nav { padding-left: 0; margin-bottom: 0; list-style: none; } .nav > li { position: relative; display: block; } .nav > li > a { position: relative; display: block; padding: 10px 15px; } .nav > li > a:hover, .nav > li > a:focus { text-decoration: none; background-color: #eee; } .nav > li.disabled > a { color: #777; } .nav > li.disabled > a:hover, .nav > li.disabled > a:focus { color: #777; text-decoration: none; cursor: not-allowed; background-color: transparent; } .nav .open > a, .nav .open > a:hover, .nav .open > a:focus { background-color: #eee; border-color: #337ab7; } .nav .nav-divider { height: 1px; margin: 9px 0; overflow: hidden; background-color: #e5e5e5; } .nav > li > a > img { max-width: none; } .nav-tabs { border-bottom: 1px solid #ddd; } .nav-tabs > li { float: left; margin-bottom: -1px; } .nav-tabs > li > a { margin-right: 2px; line-height: 1.42857143; border: 1px solid transparent; border-radius: 4px 4px 0 0; } .nav-tabs > li > a:hover { border-color: #eee #eee #ddd; } .nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus { color: #555; cursor: default; background-color: #fff; border: 1px solid #ddd; border-bottom-color: transparent; } .nav-tabs.nav-justified { width: 100%; border-bottom: 0; } .nav-tabs.nav-justified > li { float: none; } .nav-tabs.nav-justified > li > a { margin-bottom: 5px; text-align: center; } .nav-tabs.nav-justified > .dropdown .dropdown-menu { top: auto; left: auto; } @media (min-width: 768px) { .nav-tabs.nav-justified > li { display: table-cell; width: 1%; } .nav-tabs.nav-justified > li > a { margin-bottom: 0; } } .nav-tabs.nav-justified > li > a { margin-right: 0; border-radius: 4px; } .nav-tabs.nav-justified > .active > a, .nav-tabs.nav-justified > .active > a:hover, .nav-tabs.nav-justified > .active > a:focus { border: 1px solid #ddd; } @media (min-width: 768px) { .nav-tabs.nav-justified > li > a { border-bottom: 1px solid #ddd; border-radius: 4px 4px 0 0; } .nav-tabs.nav-justified > .active > a, .nav-tabs.nav-justified > .active > a:hover, .nav-tabs.nav-justified > .active > a:focus { border-bottom-color: #fff; } } .nav-pills > li { float: left; } .nav-pills > li > a { border-radius: 4px; } .nav-pills > li + li { margin-left: 2px; } .nav-pills > li.active > a, .nav-pills > li.active > a:hover, .nav-pills > li.active > a:focus { color: #fff; background-color: #337ab7; } .nav-stacked > li { float: none; } .nav-stacked > li + li { margin-top: 2px; margin-left: 0; } .nav-justified { width: 100%; } .nav-justified > li { float: none; } .nav-justified > li > a { margin-bottom: 5px; text-align: center; } .nav-justified > .dropdown .dropdown-menu { top: auto; left: auto; } @media (min-width: 768px) { .nav-justified > li { display: table-cell; width: 1%; } .nav-justified > li > a { margin-bottom: 0; } } .nav-tabs-justified { border-bottom: 0; } .nav-tabs-justified > li > a { margin-right: 0; border-radius: 4px; } .nav-tabs-justified > .active > a, .nav-tabs-justified > .active > a:hover, .nav-tabs-justified > .active > a:focus { border: 1px solid #ddd; } @media (min-width: 768px) { .nav-tabs-justified > li > a { border-bottom: 1px solid #ddd; border-radius: 4px 4px 0 0; } .nav-tabs-justified > .active > a, .nav-tabs-justified > .active > a:hover, .nav-tabs-justified > .active > a:focus { border-bottom-color: #fff; } } .tab-content > .tab-pane { display: none; } .tab-content > .active { display: block; } .nav-tabs .dropdown-menu { margin-top: -1px; <API key>: 0; <API key>: 0; } .navbar { position: relative; min-height: 50px; margin-bottom: 20px; border: 1px solid transparent; } @media (min-width: 768px) { .navbar { border-radius: 4px; } } @media (min-width: 768px) { .navbar-header { float: left; } } .navbar-collapse { padding-right: 15px; padding-left: 15px; overflow-x: visible; -<API key>: touch; border-top: 1px solid transparent; -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); } .navbar-collapse.in { overflow-y: auto; } @media (min-width: 768px) { .navbar-collapse { width: auto; border-top: 0; -webkit-box-shadow: none; box-shadow: none; } .navbar-collapse.collapse { display: block !important; height: auto !important; padding-bottom: 0; overflow: visible !important; } .navbar-collapse.in { overflow-y: visible; } .navbar-fixed-top .navbar-collapse, .navbar-static-top .navbar-collapse, .navbar-fixed-bottom .navbar-collapse { padding-right: 0; padding-left: 0; } } .navbar-fixed-top .navbar-collapse, .navbar-fixed-bottom .navbar-collapse { max-height: 340px; } @media (max-device-width: 480px) and (orientation: landscape) { .navbar-fixed-top .navbar-collapse, .navbar-fixed-bottom .navbar-collapse { max-height: 200px; } } .container > .navbar-header, .container-fluid > .navbar-header, .container > .navbar-collapse, .container-fluid > .navbar-collapse { margin-right: -15px; margin-left: -15px; } @media (min-width: 768px) { .container > .navbar-header, .container-fluid > .navbar-header, .container > .navbar-collapse, .container-fluid > .navbar-collapse { margin-right: 0; margin-left: 0; } } .navbar-static-top { z-index: 1000; border-width: 0 0 1px; } @media (min-width: 768px) { .navbar-static-top { border-radius: 0; } } .navbar-fixed-top, .navbar-fixed-bottom { position: fixed; right: 0; left: 0; z-index: 1030; } @media (min-width: 768px) { .navbar-fixed-top, .navbar-fixed-bottom { border-radius: 0; } } .navbar-fixed-top { top: 0; border-width: 0 0 1px; } .navbar-fixed-bottom { bottom: 0; margin-bottom: 0; border-width: 1px 0 0; } .navbar-brand { float: left; height: 50px; padding: 15px 15px; font-size: 18px; line-height: 20px; } .navbar-brand:hover, .navbar-brand:focus { text-decoration: none; } .navbar-brand > img { display: block; } @media (min-width: 768px) { .navbar > .container .navbar-brand, .navbar > .container-fluid .navbar-brand { margin-left: -15px; } } .navbar-toggle { position: relative; float: right; padding: 9px 10px; margin-top: 8px; margin-right: 15px; margin-bottom: 8px; background-color: transparent; background-image: none; border: 1px solid transparent; border-radius: 4px; } .navbar-toggle:focus { outline: 0; } .navbar-toggle .icon-bar { display: block; width: 22px; height: 2px; border-radius: 1px; } .navbar-toggle .icon-bar + .icon-bar { margin-top: 4px; } @media (min-width: 768px) { .navbar-toggle { display: none; } } .navbar-nav { margin: 7.5px -15px; } .navbar-nav > li > a { padding-top: 10px; padding-bottom: 10px; line-height: 20px; } @media (max-width: 767px) { .navbar-nav .open .dropdown-menu { position: static; float: none; width: auto; margin-top: 0; background-color: transparent; border: 0; -webkit-box-shadow: none; box-shadow: none; } .navbar-nav .open .dropdown-menu > li > a, .navbar-nav .open .dropdown-menu .dropdown-header { padding: 5px 15px 5px 25px; } .navbar-nav .open .dropdown-menu > li > a { line-height: 20px; } .navbar-nav .open .dropdown-menu > li > a:hover, .navbar-nav .open .dropdown-menu > li > a:focus { background-image: none; } } @media (min-width: 768px) { .navbar-nav { float: left; margin: 0; } .navbar-nav > li { float: left; } .navbar-nav > li > a { padding-top: 15px; padding-bottom: 15px; } } .navbar-form { padding: 10px 15px; margin-top: 8px; margin-right: -15px; margin-bottom: 8px; margin-left: -15px; border-top: 1px solid transparent; border-bottom: 1px solid transparent; -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1); } @media (min-width: 768px) { .navbar-form .form-group { display: inline-block; margin-bottom: 0; vertical-align: middle; } .navbar-form .form-control { display: inline-block; width: auto; vertical-align: middle; } .navbar-form .form-control-static { display: inline-block; } .navbar-form .input-group { display: inline-table; vertical-align: middle; } .navbar-form .input-group .input-group-addon, .navbar-form .input-group .input-group-btn, .navbar-form .input-group .form-control { width: auto; } .navbar-form .input-group > .form-control { width: 100%; } .navbar-form .control-label { margin-bottom: 0; vertical-align: middle; } .navbar-form .radio, .navbar-form .checkbox { display: inline-block; margin-top: 0; margin-bottom: 0; vertical-align: middle; } .navbar-form .radio label, .navbar-form .checkbox label { padding-left: 0; } .navbar-form .radio input[type="radio"], .navbar-form .checkbox input[type="checkbox"] { position: relative; margin-left: 0; } .navbar-form .has-feedback .<API key> { top: 0; } } @media (max-width: 767px) { .navbar-form .form-group { margin-bottom: 5px; } .navbar-form .form-group:last-child { margin-bottom: 0; } } @media (min-width: 768px) { .navbar-form { width: auto; padding-top: 0; padding-bottom: 0; margin-right: 0; margin-left: 0; border: 0; -webkit-box-shadow: none; box-shadow: none; } } .navbar-nav > li > .dropdown-menu { margin-top: 0; <API key>: 0; <API key>: 0; } .navbar-fixed-bottom .navbar-nav > li > .dropdown-menu { margin-bottom: 0; <API key>: 4px; <API key>: 4px; <API key>: 0; <API key>: 0; } .navbar-btn { margin-top: 8px; margin-bottom: 8px; } .navbar-btn.btn-sm { margin-top: 10px; margin-bottom: 10px; } .navbar-btn.btn-xs { margin-top: 14px; margin-bottom: 14px; } .navbar-text { margin-top: 15px; margin-bottom: 15px; } @media (min-width: 768px) { .navbar-text { float: left; margin-right: 15px; margin-left: 15px; } } @media (min-width: 768px) { .navbar-left { float: left !important; } .navbar-right { float: right !important; margin-right: -15px; } .navbar-right ~ .navbar-right { margin-right: 0; } } .navbar-default { background-color: rgba(255, 255, 255, 0.9); border-color: #e7e7e7; } .navbar-default .navbar-brand { color: #777; } .navbar-default .navbar-brand:hover, .navbar-default .navbar-brand:focus { color: #5e5e5e; background-color: transparent; } .navbar-default .navbar-text { color: #777; } .navbar-default .navbar-nav > li > a { color: #777; } .navbar-default .navbar-nav > li > a:hover, .navbar-default .navbar-nav > li > a:focus { color: #333; background-color: transparent; } .navbar-default .navbar-nav > .active > a, .navbar-default .navbar-nav > .active > a:hover, .navbar-default .navbar-nav > .active > a:focus { color: #555; background-color: #e7e7e7; } .navbar-default .navbar-nav > .disabled > a, .navbar-default .navbar-nav > .disabled > a:hover, .navbar-default .navbar-nav > .disabled > a:focus { color: #ccc; background-color: transparent; } .navbar-default .navbar-toggle { border-color: #ddd; } .navbar-default .navbar-toggle:hover, .navbar-default .navbar-toggle:focus { background-color: #ddd; } .navbar-default .navbar-toggle .icon-bar { background-color: #888; } .navbar-default .navbar-collapse, .navbar-default .navbar-form { border-color: #e7e7e7; } .navbar-default .navbar-nav > .open > a, .navbar-default .navbar-nav > .open > a:hover, .navbar-default .navbar-nav > .open > a:focus { color: #555; background-color: #e7e7e7; } @media (max-width: 767px) { .navbar-default .navbar-nav .open .dropdown-menu > li > a { color: #777; } .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus { color: #333; background-color: transparent; } .navbar-default .navbar-nav .open .dropdown-menu > .active > a, .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus { color: #555; background-color: #e7e7e7; } .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a, .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus { color: #ccc; background-color: transparent; } } .navbar-default .navbar-link { color: #777; } .navbar-default .navbar-link:hover { color: #333; } .navbar-default .btn-link { color: #777; } .navbar-default .btn-link:hover, .navbar-default .btn-link:focus { color: #333; } .navbar-default .btn-link[disabled]:hover, fieldset[disabled] .navbar-default .btn-link:hover, .navbar-default .btn-link[disabled]:focus, fieldset[disabled] .navbar-default .btn-link:focus { color: #ccc; } .navbar-inverse { background-color: #222; border-color: #080808; } .navbar-inverse .navbar-brand { color: #9d9d9d; } .navbar-inverse .navbar-brand:hover, .navbar-inverse .navbar-brand:focus { color: #fff; background-color: transparent; } .navbar-inverse .navbar-text { color: #9d9d9d; } .navbar-inverse .navbar-nav > li > a { color: #9d9d9d; } .navbar-inverse .navbar-nav > li > a:hover, .navbar-inverse .navbar-nav > li > a:focus { color: #fff; background-color: transparent; } .navbar-inverse .navbar-nav > .active > a, .navbar-inverse .navbar-nav > .active > a:hover, .navbar-inverse .navbar-nav > .active > a:focus { color: #fff; background-color: #080808; } .navbar-inverse .navbar-nav > .disabled > a, .navbar-inverse .navbar-nav > .disabled > a:hover, .navbar-inverse .navbar-nav > .disabled > a:focus { color: #444; background-color: transparent; } .navbar-inverse .navbar-toggle { border-color: #333; } .navbar-inverse .navbar-toggle:hover, .navbar-inverse .navbar-toggle:focus { background-color: #333; } .navbar-inverse .navbar-toggle .icon-bar { background-color: #fff; } .navbar-inverse .navbar-collapse, .navbar-inverse .navbar-form { border-color: #101010; } .navbar-inverse .navbar-nav > .open > a, .navbar-inverse .navbar-nav > .open > a:hover, .navbar-inverse .navbar-nav > .open > a:focus { color: #fff; background-color: #080808; } @media (max-width: 767px) { .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header { border-color: #080808; } .navbar-inverse .navbar-nav .open .dropdown-menu .divider { background-color: #080808; } .navbar-inverse .navbar-nav .open .dropdown-menu > li > a { color: #9d9d9d; } .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover, .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus { color: #fff; background-color: transparent; } .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a, .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover, .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus { color: #fff; background-color: #080808; } .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a, .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover, .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus { color: #444; background-color: transparent; } } .navbar-inverse .navbar-link { color: #9d9d9d; } .navbar-inverse .navbar-link:hover { color: #fff; } .navbar-inverse .btn-link { color: #9d9d9d; } .navbar-inverse .btn-link:hover, .navbar-inverse .btn-link:focus { color: #fff; } .navbar-inverse .btn-link[disabled]:hover, fieldset[disabled] .navbar-inverse .btn-link:hover, .navbar-inverse .btn-link[disabled]:focus, fieldset[disabled] .navbar-inverse .btn-link:focus { color: #444; } .breadcrumb { padding: 8px 15px; margin-bottom: 20px; list-style: none; background-color: #f5f5f5; border-radius: 4px; } .breadcrumb > li { display: inline-block; } .breadcrumb > li + li:before { padding: 0 5px; color: #ccc; content: "/\00a0"; } .breadcrumb > .active { color: #777; } .pagination { display: inline-block; padding-left: 0; margin: 20px 0; border-radius: 4px; } .pagination > li { display: inline; } .pagination > li > a, .pagination > li > span { position: relative; float: left; padding: 6px 12px; margin-left: -1px; line-height: 1.42857143; color: #337ab7; text-decoration: none; background-color: #fff; border: 1px solid #ddd; } .pagination > li:first-child > a, .pagination > li:first-child > span { margin-left: 0; <API key>: 4px; <API key>: 4px; } .pagination > li:last-child > a, .pagination > li:last-child > span { <API key>: 4px; <API key>: 4px; } .pagination > li > a:hover, .pagination > li > span:hover, .pagination > li > a:focus, .pagination > li > span:focus { color: #23527c; background-color: #eee; border-color: #ddd; } .pagination > .active > a, .pagination > .active > span, .pagination > .active > a:hover, .pagination > .active > span:hover, .pagination > .active > a:focus, .pagination > .active > span:focus { z-index: 2; color: #fff; cursor: default; background-color: #337ab7; border-color: #337ab7; } .pagination > .disabled > span, .pagination > .disabled > span:hover, .pagination > .disabled > span:focus, .pagination > .disabled > a, .pagination > .disabled > a:hover, .pagination > .disabled > a:focus { color: #777; cursor: not-allowed; background-color: #fff; border-color: #ddd; } .pagination-lg > li > a, .pagination-lg > li > span { padding: 10px 16px; font-size: 18px; } .pagination-lg > li:first-child > a, .pagination-lg > li:first-child > span { <API key>: 6px; <API key>: 6px; } .pagination-lg > li:last-child > a, .pagination-lg > li:last-child > span { <API key>: 6px; <API key>: 6px; } .pagination-sm > li > a, .pagination-sm > li > span { padding: 5px 10px; font-size: 12px; } .pagination-sm > li:first-child > a, .pagination-sm > li:first-child > span { <API key>: 3px; <API key>: 3px; } .pagination-sm > li:last-child > a, .pagination-sm > li:last-child > span { <API key>: 3px; <API key>: 3px; } .pager { padding-left: 0; margin: 20px 0; text-align: center; list-style: none; } .pager li { display: inline; } .pager li > a, .pager li > span { display: inline-block; padding: 5px 14px; background-color: #fff; border: 1px solid #ddd; border-radius: 15px; } .pager li > a:hover, .pager li > a:focus { text-decoration: none; background-color: #eee; } .pager .next > a, .pager .next > span { float: right; } .pager .previous > a, .pager .previous > span { float: left; } .pager .disabled > a, .pager .disabled > a:hover, .pager .disabled > a:focus, .pager .disabled > span { color: #777; cursor: not-allowed; background-color: #fff; } .label { display: inline; padding: .2em .6em .3em; font-size: 75%; font-weight: bold; line-height: 1; color: #fff; text-align: center; white-space: nowrap; vertical-align: baseline; border-radius: .25em; } a.label:hover, a.label:focus { color: #fff; text-decoration: none; cursor: pointer; } .label:empty { display: none; } .btn .label { position: relative; top: -1px; } .label-default { background-color: #777; } .label-default[href]:hover, .label-default[href]:focus { background-color: #5e5e5e; } .label-primary { background-color: #337ab7; } .label-primary[href]:hover, .label-primary[href]:focus { background-color: #286090; } .label-success { background-color: #5cb85c; } .label-success[href]:hover, .label-success[href]:focus { background-color: #449d44; } .label-info { background-color: #5bc0de; } .label-info[href]:hover, .label-info[href]:focus { background-color: #31b0d5; } .label-warning { background-color: #f0ad4e; } .label-warning[href]:hover, .label-warning[href]:focus { background-color: #ec971f; } .label-danger { background-color: #d9534f; } .label-danger[href]:hover, .label-danger[href]:focus { background-color: #c9302c; } .badge { display: inline-block; min-width: 10px; padding: 3px 7px; font-size: 12px; font-weight: bold; line-height: 1; color: #fff; text-align: center; white-space: nowrap; vertical-align: baseline; background-color: #777; border-radius: 10px; } .badge:empty { display: none; } .btn .badge { position: relative; top: -1px; } .btn-xs .badge, .btn-group-xs > .btn .badge { top: 0; padding: 1px 5px; } a.badge:hover, a.badge:focus { color: #fff; text-decoration: none; cursor: pointer; } .list-group-item.active > .badge, .nav-pills > .active > a > .badge { color: #337ab7; background-color: #fff; } .list-group-item > .badge { float: right; } .list-group-item > .badge + .badge { margin-right: 5px; } .nav-pills > li > a > .badge { margin-left: 3px; } .jumbotron { padding: 30px 15px; margin-bottom: 30px; color: inherit; background-color: #eee; } .jumbotron h1, .jumbotron .h1 { color: inherit; } .jumbotron p { margin-bottom: 15px; font-size: 21px; font-weight: 200; } .jumbotron > hr { border-top-color: #d5d5d5; } .container .jumbotron, .container-fluid .jumbotron { border-radius: 6px; } .jumbotron .container { max-width: 100%; } @media screen and (min-width: 768px) { .jumbotron { padding: 48px 0; } .container .jumbotron, .container-fluid .jumbotron { padding-right: 60px; padding-left: 60px; } .jumbotron h1, .jumbotron .h1 { font-size: 63px; } } .thumbnail { display: block; padding: 4px; margin-bottom: 20px; line-height: 1.42857143; background-color: #fff; border: 1px solid #ddd; border-radius: 4px; -webkit-transition: border .2s ease-in-out; -o-transition: border .2s ease-in-out; transition: border .2s ease-in-out; } .thumbnail > img, .thumbnail a > img { margin-right: auto; margin-left: auto; } a.thumbnail:hover, a.thumbnail:focus, a.thumbnail.active { border-color: #337ab7; } .thumbnail .caption { padding: 9px; color: #333; } .alert { padding: 15px; margin-bottom: 20px; border: 1px solid transparent; border-radius: 4px; } .alert h4 { margin-top: 0; color: inherit; } .alert .alert-link { font-weight: bold; } .alert > p, .alert > ul { margin-bottom: 0; } .alert > p + p { margin-top: 5px; } .alert-dismissable, .alert-dismissible { padding-right: 35px; } .alert-dismissable .close, .alert-dismissible .close { position: relative; top: -2px; right: -21px; color: inherit; } .alert-success { color: #3c763d; background-color: #dff0d8; border-color: #d6e9c6; } .alert-success hr { border-top-color: #c9e2b3; } .alert-success .alert-link { color: #2b542c; } .alert-info { color: #31708f; background-color: #d9edf7; border-color: #bce8f1; } .alert-info hr { border-top-color: #a6e1ec; } .alert-info .alert-link { color: #245269; } .alert-warning { color: #8a6d3b; background-color: #fcf8e3; border-color: #faebcc; } .alert-warning hr { border-top-color: #f7e1b5; } .alert-warning .alert-link { color: #66512c; } .alert-danger { color: #a94442; background-color: #f2dede; border-color: #ebccd1; } .alert-danger hr { border-top-color: #e4b9c0; } .alert-danger .alert-link { color: #843534; } @-webkit-keyframes <API key> { from { background-position: 40px 0; } to { background-position: 0 0; } } @-o-keyframes <API key> { from { background-position: 40px 0; } to { background-position: 0 0; } } @keyframes <API key> { from { background-position: 40px 0; } to { background-position: 0 0; } } .progress { height: 20px; margin-bottom: 20px; overflow: hidden; background-color: #f5f5f5; border-radius: 4px; -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); } .progress-bar { float: left; width: 0; height: 100%; font-size: 12px; line-height: 20px; color: #fff; text-align: center; background-color: #337ab7; -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); -webkit-transition: width .6s ease; -o-transition: width .6s ease; transition: width .6s ease; } .progress-striped .progress-bar, .<API key> { background-image: -<API key>(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); -<API key>: 40px 40px; background-size: 40px 40px; } .progress.active .progress-bar, .progress-bar.active { -webkit-animation: <API key> 2s linear infinite; -o-animation: <API key> 2s linear infinite; animation: <API key> 2s linear infinite; } .<API key> { background-color: #5cb85c; } .progress-striped .<API key> { background-image: -<API key>(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); } .progress-bar-info { background-color: #5bc0de; } .progress-striped .progress-bar-info { background-image: -<API key>(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); } .<API key> { background-color: #f0ad4e; } .progress-striped .<API key> { background-image: -<API key>(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); } .progress-bar-danger { background-color: #d9534f; } .progress-striped .progress-bar-danger { background-image: -<API key>(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); } .media { margin-top: 15px; } .media:first-child { margin-top: 0; } .media, .media-body { overflow: hidden; zoom: 1; } .media-body { width: 10000px; } .media-object { display: block; } .media-right, .media > .pull-right { padding-left: 10px; } .media-left, .media > .pull-left { padding-right: 10px; } .media-left, .media-right, .media-body { display: table-cell; vertical-align: top; } .media-middle { vertical-align: middle; } .media-bottom { vertical-align: bottom; } .media-heading { margin-top: 0; margin-bottom: 5px; } .media-list { padding-left: 0; list-style: none; } .list-group { padding-left: 0; margin-bottom: 20px; } .list-group-item { position: relative; display: block; padding: 10px 15px; margin-bottom: -1px; background-color: #fff; border: 1px solid #ddd; } .list-group-item:first-child { <API key>: 4px; <API key>: 4px; } .list-group-item:last-child { margin-bottom: 0; <API key>: 4px; <API key>: 4px; } a.list-group-item { color: #555; } a.list-group-item .<API key> { color: #333; } a.list-group-item:hover, a.list-group-item:focus { color: #555; text-decoration: none; background-color: #f5f5f5; } .list-group-item.disabled, .list-group-item.disabled:hover, .list-group-item.disabled:focus { color: #777; cursor: not-allowed; background-color: #eee; } .list-group-item.disabled .<API key>, .list-group-item.disabled:hover .<API key>, .list-group-item.disabled:focus .<API key> { color: inherit; } .list-group-item.disabled .<API key>, .list-group-item.disabled:hover .<API key>, .list-group-item.disabled:focus .<API key> { color: #777; } .list-group-item.active, .list-group-item.active:hover, .list-group-item.active:focus { z-index: 2; color: #fff; background-color: #337ab7; border-color: #337ab7; } .list-group-item.active .<API key>, .list-group-item.active:hover .<API key>, .list-group-item.active:focus .<API key>, .list-group-item.active .<API key> > small, .list-group-item.active:hover .<API key> > small, .list-group-item.active:focus .<API key> > small, .list-group-item.active .<API key> > .small, .list-group-item.active:hover .<API key> > .small, .list-group-item.active:focus .<API key> > .small { color: inherit; } .list-group-item.active .<API key>, .list-group-item.active:hover .<API key>, .list-group-item.active:focus .<API key> { color: #c7ddef; } .<API key> { color: #3c763d; background-color: #dff0d8; } a.<API key> { color: #3c763d; } a.<API key> .<API key> { color: inherit; } a.<API key>:hover, a.<API key>:focus { color: #3c763d; background-color: #d0e9c6; } a.<API key>.active, a.<API key>.active:hover, a.<API key>.active:focus { color: #fff; background-color: #3c763d; border-color: #3c763d; } .<API key> { color: #31708f; background-color: #d9edf7; } a.<API key> { color: #31708f; } a.<API key> .<API key> { color: inherit; } a.<API key>:hover, a.<API key>:focus { color: #31708f; background-color: #c4e3f3; } a.<API key>.active, a.<API key>.active:hover, a.<API key>.active:focus { color: #fff; background-color: #31708f; border-color: #31708f; } .<API key> { color: #8a6d3b; background-color: #fcf8e3; } a.<API key> { color: #8a6d3b; } a.<API key> .<API key> { color: inherit; } a.<API key>:hover, a.<API key>:focus { color: #8a6d3b; background-color: #faf2cc; } a.<API key>.active, a.<API key>.active:hover, a.<API key>.active:focus { color: #fff; background-color: #8a6d3b; border-color: #8a6d3b; } .<API key> { color: #a94442; background-color: #f2dede; } a.<API key> { color: #a94442; } a.<API key> .<API key> { color: inherit; } a.<API key>:hover, a.<API key>:focus { color: #a94442; background-color: #ebcccc; } a.<API key>.active, a.<API key>.active:hover, a.<API key>.active:focus { color: #fff; background-color: #a94442; border-color: #a94442; } .<API key> { margin-top: 0; margin-bottom: 5px; } .<API key> { margin-bottom: 0; line-height: 1.3; } .panel { margin-bottom: 20px; background-color: #fff; border: 1px solid transparent; border-radius: 4px; -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05); box-shadow: 0 1px 1px rgba(0, 0, 0, .05); } .panel-body { padding: 15px; } .panel-heading { padding: 10px 15px; border-bottom: 1px solid transparent; <API key>: 3px; <API key>: 3px; } .panel-heading > .dropdown .dropdown-toggle { color: inherit; } .panel-title { margin-top: 0; margin-bottom: 0; font-size: 16px; color: inherit; } .panel-title > a, .panel-title > small, .panel-title > .small, .panel-title > small > a, .panel-title > .small > a { color: inherit; } .panel-footer { padding: 10px 15px; background-color: #f5f5f5; border-top: 1px solid #ddd; <API key>: 3px; <API key>: 3px; } .panel > .list-group, .panel > .panel-collapse > .list-group { margin-bottom: 0; } .panel > .list-group .list-group-item, .panel > .panel-collapse > .list-group .list-group-item { border-width: 1px 0; border-radius: 0; } .panel > .list-group:first-child .list-group-item:first-child, .panel > .panel-collapse > .list-group:first-child .list-group-item:first-child { border-top: 0; <API key>: 3px; <API key>: 3px; } .panel > .list-group:last-child .list-group-item:last-child, .panel > .panel-collapse > .list-group:last-child .list-group-item:last-child { border-bottom: 0; <API key>: 3px; <API key>: 3px; } .panel-heading + .list-group .list-group-item:first-child { border-top-width: 0; } .list-group + .panel-footer { border-top-width: 0; } .panel > .table, .panel > .table-responsive > .table, .panel > .panel-collapse > .table { margin-bottom: 0; } .panel > .table caption, .panel > .table-responsive > .table caption, .panel > .panel-collapse > .table caption { padding-right: 15px; padding-left: 15px; } .panel > .table:first-child, .panel > .table-responsive:first-child > .table:first-child { <API key>: 3px; <API key>: 3px; } .panel > .table:first-child > thead:first-child > tr:first-child, .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child, .panel > .table:first-child > tbody:first-child > tr:first-child, .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child { <API key>: 3px; <API key>: 3px; } .panel > .table:first-child > thead:first-child > tr:first-child td:first-child, .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child, .panel > .table:first-child > tbody:first-child > tr:first-child td:first-child, .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child, .panel > .table:first-child > thead:first-child > tr:first-child th:first-child, .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child, .panel > .table:first-child > tbody:first-child > tr:first-child th:first-child, .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child { <API key>: 3px; } .panel > .table:first-child > thead:first-child > tr:first-child td:last-child, .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child, .panel > .table:first-child > tbody:first-child > tr:first-child td:last-child, .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child, .panel > .table:first-child > thead:first-child > tr:first-child th:last-child, .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child, .panel > .table:first-child > tbody:first-child > tr:first-child th:last-child, .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child { <API key>: 3px; } .panel > .table:last-child, .panel > .table-responsive:last-child > .table:last-child { <API key>: 3px; <API key>: 3px; } .panel > .table:last-child > tbody:last-child > tr:last-child, .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child, .panel > .table:last-child > tfoot:last-child > tr:last-child, .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child { <API key>: 3px; <API key>: 3px; } .panel > .table:last-child > tbody:last-child > tr:last-child td:first-child, .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child, .panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child, .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child, .panel > .table:last-child > tbody:last-child > tr:last-child th:first-child, .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child, .panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child, .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child { <API key>: 3px; } .panel > .table:last-child > tbody:last-child > tr:last-child td:last-child, .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child, .panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child, .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child, .panel > .table:last-child > tbody:last-child > tr:last-child th:last-child, .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child, .panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child, .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child { <API key>: 3px; } .panel > .panel-body + .table, .panel > .panel-body + .table-responsive, .panel > .table + .panel-body, .panel > .table-responsive + .panel-body { border-top: 1px solid #ddd; } .panel > .table > tbody:first-child > tr:first-child th, .panel > .table > tbody:first-child > tr:first-child td { border-top: 0; } .panel > .table-bordered, .panel > .table-responsive > .table-bordered { border: 0; } .panel > .table-bordered > thead > tr > th:first-child, .panel > .table-responsive > .table-bordered > thead > tr > th:first-child, .panel > .table-bordered > tbody > tr > th:first-child, .panel > .table-responsive > .table-bordered > tbody > tr > th:first-child, .panel > .table-bordered > tfoot > tr > th:first-child, .panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child, .panel > .table-bordered > thead > tr > td:first-child, .panel > .table-responsive > .table-bordered > thead > tr > td:first-child, .panel > .table-bordered > tbody > tr > td:first-child, .panel > .table-responsive > .table-bordered > tbody > tr > td:first-child, .panel > .table-bordered > tfoot > tr > td:first-child, .panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child { border-left: 0; } .panel > .table-bordered > thead > tr > th:last-child, .panel > .table-responsive > .table-bordered > thead > tr > th:last-child, .panel > .table-bordered > tbody > tr > th:last-child, .panel > .table-responsive > .table-bordered > tbody > tr > th:last-child, .panel > .table-bordered > tfoot > tr > th:last-child, .panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child, .panel > .table-bordered > thead > tr > td:last-child, .panel > .table-responsive > .table-bordered > thead > tr > td:last-child, .panel > .table-bordered > tbody > tr > td:last-child, .panel > .table-responsive > .table-bordered > tbody > tr > td:last-child, .panel > .table-bordered > tfoot > tr > td:last-child, .panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child { border-right: 0; } .panel > .table-bordered > thead > tr:first-child > td, .panel > .table-responsive > .table-bordered > thead > tr:first-child > td, .panel > .table-bordered > tbody > tr:first-child > td, .panel > .table-responsive > .table-bordered > tbody > tr:first-child > td, .panel > .table-bordered > thead > tr:first-child > th, .panel > .table-responsive > .table-bordered > thead > tr:first-child > th, .panel > .table-bordered > tbody > tr:first-child > th, .panel > .table-responsive > .table-bordered > tbody > tr:first-child > th { border-bottom: 0; } .panel > .table-bordered > tbody > tr:last-child > td, .panel > .table-responsive > .table-bordered > tbody > tr:last-child > td, .panel > .table-bordered > tfoot > tr:last-child > td, .panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td, .panel > .table-bordered > tbody > tr:last-child > th, .panel > .table-responsive > .table-bordered > tbody > tr:last-child > th, .panel > .table-bordered > tfoot > tr:last-child > th, .panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th { border-bottom: 0; } .panel > .table-responsive { margin-bottom: 0; border: 0; } .panel-group { margin-bottom: 20px; } .panel-group .panel { margin-bottom: 0; border-radius: 4px; } .panel-group .panel + .panel { margin-top: 5px; } .panel-group .panel-heading { border-bottom: 0; } .panel-group .panel-heading + .panel-collapse > .panel-body, .panel-group .panel-heading + .panel-collapse > .list-group { border-top: 1px solid #ddd; } .panel-group .panel-footer { border-top: 0; } .panel-group .panel-footer + .panel-collapse .panel-body { border-bottom: 1px solid #ddd; } .panel-default { border-color: #ddd; } .panel-default > .panel-heading { color: #333; background-color: #f5f5f5; border-color: #ddd; } .panel-default > .panel-heading + .panel-collapse > .panel-body { border-top-color: #ddd; } .panel-default > .panel-heading .badge { color: #f5f5f5; background-color: #333; } .panel-default > .panel-footer + .panel-collapse > .panel-body { border-bottom-color: #ddd; } .panel-primary { border-color: #337ab7; } .panel-primary > .panel-heading { color: #fff; background-color: #337ab7; border-color: #337ab7; } .panel-primary > .panel-heading + .panel-collapse > .panel-body { border-top-color: #337ab7; } .panel-primary > .panel-heading .badge { color: #337ab7; background-color: #fff; } .panel-primary > .panel-footer + .panel-collapse > .panel-body { border-bottom-color: #337ab7; } .panel-success { border-color: #d6e9c6; } .panel-success > .panel-heading { color: #3c763d; background-color: #dff0d8; border-color: #d6e9c6; } .panel-success > .panel-heading + .panel-collapse > .panel-body { border-top-color: #d6e9c6; } .panel-success > .panel-heading .badge { color: #dff0d8; background-color: #3c763d; } .panel-success > .panel-footer + .panel-collapse > .panel-body { border-bottom-color: #d6e9c6; } .panel-info { border-color: #bce8f1; } .panel-info > .panel-heading { color: #31708f; background-color: #d9edf7; border-color: #bce8f1; } .panel-info > .panel-heading + .panel-collapse > .panel-body { border-top-color: #bce8f1; } .panel-info > .panel-heading .badge { color: #d9edf7; background-color: #31708f; } .panel-info > .panel-footer + .panel-collapse > .panel-body { border-bottom-color: #bce8f1; } .panel-warning { border-color: #faebcc; } .panel-warning > .panel-heading { color: #8a6d3b; background-color: #fcf8e3; border-color: #faebcc; } .panel-warning > .panel-heading + .panel-collapse > .panel-body { border-top-color: #faebcc; } .panel-warning > .panel-heading .badge { color: #fcf8e3; background-color: #8a6d3b; } .panel-warning > .panel-footer + .panel-collapse > .panel-body { border-bottom-color: #faebcc; } .panel-danger { border-color: #ebccd1; } .panel-danger > .panel-heading { color: #a94442; background-color: #f2dede; border-color: #ebccd1; } .panel-danger > .panel-heading + .panel-collapse > .panel-body { border-top-color: #ebccd1; } .panel-danger > .panel-heading .badge { color: #f2dede; background-color: #a94442; } .panel-danger > .panel-footer + .panel-collapse > .panel-body { border-bottom-color: #ebccd1; } .embed-responsive { position: relative; display: block; height: 0; padding: 0; overflow: hidden; } .embed-responsive .<API key>, .embed-responsive iframe, .embed-responsive embed, .embed-responsive object, .embed-responsive video { position: absolute; top: 0; bottom: 0; left: 0; width: 100%; height: 100%; border: 0; } .<API key> { padding-bottom: 56.25%; } .<API key> { padding-bottom: 75%; } .well { min-height: 20px; padding: 19px; margin-bottom: 20px; background-color: #f5f5f5; border: 1px solid #e3e3e3; border-radius: 4px; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05); box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05); } .well blockquote { border-color: #ddd; border-color: rgba(0, 0, 0, .15); } .well-lg { padding: 24px; border-radius: 6px; } .well-sm { padding: 9px; border-radius: 3px; } .close { float: right; font-size: 21px; font-weight: bold; line-height: 1; color: #000; text-shadow: 0 1px 0 #fff; filter: alpha(opacity=20); opacity: .2; } .close:hover, .close:focus { color: #000; text-decoration: none; cursor: pointer; filter: alpha(opacity=50); opacity: .5; } button.close { -webkit-appearance: none; padding: 0; cursor: pointer; background: transparent; border: 0; } .modal-open { overflow: hidden; } .modal { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1050; display: none; overflow: hidden; -<API key>: touch; outline: 0; } .modal.fade .modal-dialog { -webkit-transition: -webkit-transform .3s ease-out; -o-transition: -o-transform .3s ease-out; transition: transform .3s ease-out; -webkit-transform: translate(0, -25%); -ms-transform: translate(0, -25%); -o-transform: translate(0, -25%); transform: translate(0, -25%); } .modal.in .modal-dialog { -webkit-transform: translate(0, 0); -ms-transform: translate(0, 0); -o-transform: translate(0, 0); transform: translate(0, 0); } .modal-open .modal { overflow-x: hidden; overflow-y: auto; } .modal-dialog { position: relative; width: auto; margin: 10px; } .modal-content { position: relative; background-color: #fff; -<API key>: padding-box; background-clip: padding-box; border: 1px solid #999; border: 1px solid rgba(0, 0, 0, .2); border-radius: 6px; outline: 0; -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, .5); box-shadow: 0 3px 9px rgba(0, 0, 0, .5); } .modal-backdrop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1040; background-color: #000; } .modal-backdrop.fade { filter: alpha(opacity=0); opacity: 0; } .modal-backdrop.in { filter: alpha(opacity=50); opacity: .5; } .modal-header { min-height: 16.42857143px; padding: 15px; border-bottom: 1px solid #e5e5e5; } .modal-header .close { margin-top: -2px; } .modal-title { margin: 0; line-height: 1.42857143; } .modal-body { position: relative; padding: 15px; } .modal-footer { padding: 15px; text-align: right; border-top: 1px solid #e5e5e5; } .modal-footer .btn + .btn { margin-bottom: 0; margin-left: 5px; } .modal-footer .btn-group .btn + .btn { margin-left: -1px; } .modal-footer .btn-block + .btn-block { margin-left: 0; } .<API key> { position: absolute; top: -9999px; width: 50px; height: 50px; overflow: scroll; } @media (min-width: 768px) { .modal-dialog { width: 600px; margin: 30px auto; } .modal-content { -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .5); box-shadow: 0 5px 15px rgba(0, 0, 0, .5); } .modal-sm { width: 300px; } } @media (min-width: 992px) { .modal-lg { width: 900px; } } .tooltip { position: absolute; z-index: 1070; display: block; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 12px; font-weight: normal; line-height: 1.4; filter: alpha(opacity=0); opacity: 0; } .tooltip.in { filter: alpha(opacity=90); opacity: .9; } .tooltip.top { padding: 5px 0; margin-top: -3px; } .tooltip.right { padding: 0 5px; margin-left: 3px; } .tooltip.bottom { padding: 5px 0; margin-top: 3px; } .tooltip.left { padding: 0 5px; margin-left: -3px; } .tooltip-inner { max-width: 200px; padding: 3px 8px; color: #fff; text-align: center; text-decoration: none; background-color: #000; border-radius: 4px; } .tooltip-arrow { position: absolute; width: 0; height: 0; border-color: transparent; border-style: solid; } .tooltip.top .tooltip-arrow { bottom: 0; left: 50%; margin-left: -5px; border-width: 5px 5px 0; border-top-color: #000; } .tooltip.top-left .tooltip-arrow { right: 5px; bottom: 0; margin-bottom: -5px; border-width: 5px 5px 0; border-top-color: #000; } .tooltip.top-right .tooltip-arrow { bottom: 0; left: 5px; margin-bottom: -5px; border-width: 5px 5px 0; border-top-color: #000; } .tooltip.right .tooltip-arrow { top: 50%; left: 0; margin-top: -5px; border-width: 5px 5px 5px 0; border-right-color: #000; } .tooltip.left .tooltip-arrow { top: 50%; right: 0; margin-top: -5px; border-width: 5px 0 5px 5px; border-left-color: #000; } .tooltip.bottom .tooltip-arrow { top: 0; left: 50%; margin-left: -5px; border-width: 0 5px 5px; border-bottom-color: #000; } .tooltip.bottom-left .tooltip-arrow { top: 0; right: 5px; margin-top: -5px; border-width: 0 5px 5px; border-bottom-color: #000; } .tooltip.bottom-right .tooltip-arrow { top: 0; left: 5px; margin-top: -5px; border-width: 0 5px 5px; border-bottom-color: #000; } .popover { position: absolute; top: 0; left: 0; z-index: 1060; display: none; max-width: 276px; padding: 1px; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; line-height: 1.42857143; text-align: left; white-space: normal; background-color: #fff; -<API key>: padding-box; background-clip: padding-box; border: 1px solid #ccc; border: 1px solid rgba(0, 0, 0, .2); border-radius: 6px; -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2); box-shadow: 0 5px 10px rgba(0, 0, 0, .2); } .popover.top { margin-top: -10px; } .popover.right { margin-left: 10px; } .popover.bottom { margin-top: 10px; } .popover.left { margin-left: -10px; } .popover-title { padding: 8px 14px; margin: 0; font-size: 14px; background-color: #f7f7f7; border-bottom: 1px solid #ebebeb; border-radius: 5px 5px 0 0; } .popover-content { padding: 9px 14px; } .popover > .arrow, .popover > .arrow:after { position: absolute; display: block; width: 0; height: 0; border-color: transparent; border-style: solid; } .popover > .arrow { border-width: 11px; } .popover > .arrow:after { content: ""; border-width: 10px; } .popover.top > .arrow { bottom: -11px; left: 50%; margin-left: -11px; border-top-color: #999; border-top-color: rgba(0, 0, 0, .25); border-bottom-width: 0; } .popover.top > .arrow:after { bottom: 1px; margin-left: -10px; content: " "; border-top-color: #fff; border-bottom-width: 0; } .popover.right > .arrow { top: 50%; left: -11px; margin-top: -11px; border-right-color: #999; border-right-color: rgba(0, 0, 0, .25); border-left-width: 0; } .popover.right > .arrow:after { bottom: -10px; left: 1px; content: " "; border-right-color: #fff; border-left-width: 0; } .popover.bottom > .arrow { top: -11px; left: 50%; margin-left: -11px; border-top-width: 0; border-bottom-color: #999; border-bottom-color: rgba(0, 0, 0, .25); } .popover.bottom > .arrow:after { top: 1px; margin-left: -10px; content: " "; border-top-width: 0; border-bottom-color: #fff; } .popover.left > .arrow { top: 50%; right: -11px; margin-top: -11px; border-right-width: 0; border-left-color: #999; border-left-color: rgba(0, 0, 0, .25); } .popover.left > .arrow:after { right: 1px; bottom: -10px; content: " "; border-right-width: 0; border-left-color: #fff; } .carousel { position: relative; } .carousel-inner { position: relative; width: 100%; overflow: hidden; } .carousel-inner > .item { position: relative; display: none; -webkit-transition: .6s ease-in-out left; -o-transition: .6s ease-in-out left; transition: .6s ease-in-out left; } .carousel-inner > .item > img, .carousel-inner > .item > a > img { line-height: 1; } @media all and (transform-3d), (-webkit-transform-3d) { .carousel-inner > .item { -webkit-transition: -webkit-transform .6s ease-in-out; -o-transition: -o-transform .6s ease-in-out; transition: transform .6s ease-in-out; -<API key>: hidden; backface-visibility: hidden; -webkit-perspective: 1000; perspective: 1000; } .carousel-inner > .item.next, .carousel-inner > .item.active.right { left: 0; -webkit-transform: translate3d(100%, 0, 0); transform: translate3d(100%, 0, 0); } .carousel-inner > .item.prev, .carousel-inner > .item.active.left { left: 0; -webkit-transform: translate3d(-100%, 0, 0); transform: translate3d(-100%, 0, 0); } .carousel-inner > .item.next.left, .carousel-inner > .item.prev.right, .carousel-inner > .item.active { left: 0; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } } .carousel-inner > .active, .carousel-inner > .next, .carousel-inner > .prev { display: block; } .carousel-inner > .active { left: 0; } .carousel-inner > .next, .carousel-inner > .prev { position: absolute; top: 0; width: 100%; } .carousel-inner > .next { left: 100%; } .carousel-inner > .prev { left: -100%; } .carousel-inner > .next.left, .carousel-inner > .prev.right { left: 0; } .carousel-inner > .active.left { left: -100%; } .carousel-inner > .active.right { left: 100%; } .carousel-control { position: absolute; top: 0; bottom: 0; left: 0; width: 15%; font-size: 20px; color: #fff; text-align: center; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); filter: alpha(opacity=50); opacity: .5; } .carousel-control.left { background-image: -<API key>(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); background-image: -o-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .5)), to(rgba(0, 0, 0, .0001))); background-image: linear-gradient(to right, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1); background-repeat: repeat-x; } .carousel-control.right { right: 0; left: auto; background-image: -<API key>(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); background-image: -o-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .0001)), to(rgba(0, 0, 0, .5))); background-image: linear-gradient(to right, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1); background-repeat: repeat-x; } .carousel-control:hover, .carousel-control:focus { color: #fff; text-decoration: none; filter: alpha(opacity=90); outline: 0; opacity: .9; } .carousel-control .icon-prev, .carousel-control .icon-next, .carousel-control .<API key>, .carousel-control .<API key> { position: absolute; top: 50%; z-index: 5; display: inline-block; } .carousel-control .icon-prev, .carousel-control .<API key> { left: 50%; margin-left: -10px; } .carousel-control .icon-next, .carousel-control .<API key> { right: 50%; margin-right: -10px; } .carousel-control .icon-prev, .carousel-control .icon-next { width: 20px; height: 20px; margin-top: -10px; font-family: serif; line-height: 1; } .carousel-control .icon-prev:before { content: '\2039'; } .carousel-control .icon-next:before { content: '\203a'; } .carousel-indicators { position: absolute; bottom: 10px; left: 50%; z-index: 15; width: 60%; padding-left: 0; margin-left: -30%; text-align: center; list-style: none; } .carousel-indicators li { display: inline-block; width: 10px; height: 10px; margin: 1px; text-indent: -999px; cursor: pointer; background-color: #000 \9; background-color: rgba(0, 0, 0, 0); border: 1px solid #fff; border-radius: 10px; } .carousel-indicators .active { width: 12px; height: 12px; margin: 0; background-color: #fff; } .carousel-caption { position: absolute; right: 15%; bottom: 20px; left: 15%; z-index: 10; padding-top: 20px; padding-bottom: 20px; color: #fff; text-align: center; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); } .carousel-caption .btn { text-shadow: none; } @media screen and (min-width: 768px) { .carousel-control .<API key>, .carousel-control .<API key>, .carousel-control .icon-prev, .carousel-control .icon-next { width: 30px; height: 30px; margin-top: -15px; font-size: 30px; } .carousel-control .<API key>, .carousel-control .icon-prev { margin-left: -15px; } .carousel-control .<API key>, .carousel-control .icon-next { margin-right: -15px; } .carousel-caption { right: 20%; left: 20%; padding-bottom: 30px; } .carousel-indicators { bottom: 20px; } } .clearfix:before, .clearfix:after, .dl-horizontal dd:before, .dl-horizontal dd:after, .container:before, .container:after, .container-fluid:before, .container-fluid:after, .row:before, .row:after, .form-horizontal .form-group:before, .form-horizontal .form-group:after, .btn-toolbar:before, .btn-toolbar:after, .btn-group-vertical > .btn-group:before, .btn-group-vertical > .btn-group:after, .nav:before, .nav:after, .navbar:before, .navbar:after, .navbar-header:before, .navbar-header:after, .navbar-collapse:before, .navbar-collapse:after, .pager:before, .pager:after, .panel-body:before, .panel-body:after, .modal-footer:before, .modal-footer:after { display: table; content: " "; } .clearfix:after, .dl-horizontal dd:after, .container:after, .container-fluid:after, .row:after, .form-horizontal .form-group:after, .btn-toolbar:after, .btn-group-vertical > .btn-group:after, .nav:after, .navbar:after, .navbar-header:after, .navbar-collapse:after, .pager:after, .panel-body:after, .modal-footer:after { clear: both; } .center-block { display: block; margin-right: auto; margin-left: auto; } .pull-right { float: right !important; } .pull-left { float: left !important; } .hide { display: none !important; } .show { display: block !important; } .invisible { visibility: hidden; } .text-hide { font: 0/0 a; color: transparent; text-shadow: none; background-color: transparent; border: 0; } .hidden { display: none !important; } .affix { position: fixed; } @-ms-viewport { width: device-width; } .visible-xs, .visible-sm, .visible-md, .visible-lg { display: none !important; } .visible-xs-block, .visible-xs-inline, .<API key>, .visible-sm-block, .visible-sm-inline, .<API key>, .visible-md-block, .visible-md-inline, .<API key>, .visible-lg-block, .visible-lg-inline, .<API key> { display: none !important; } @media (max-width: 767px) { .visible-xs { display: block !important; } table.visible-xs { display: table; } tr.visible-xs { display: table-row !important; } th.visible-xs, td.visible-xs { display: table-cell !important; } } @media (max-width: 767px) { .visible-xs-block { display: block !important; } } @media (max-width: 767px) { .visible-xs-inline { display: inline !important; } } @media (max-width: 767px) { .<API key> { display: inline-block !important; } } @media (min-width: 768px) and (max-width: 991px) { .visible-sm { display: block !important; } table.visible-sm { display: table; } tr.visible-sm { display: table-row !important; } th.visible-sm, td.visible-sm { display: table-cell !important; } } @media (min-width: 768px) and (max-width: 991px) { .visible-sm-block { display: block !important; } } @media (min-width: 768px) and (max-width: 991px) { .visible-sm-inline { display: inline !important; } } @media (min-width: 768px) and (max-width: 991px) { .<API key> { display: inline-block !important; } } @media (min-width: 992px) and (max-width: 1199px) { .visible-md { display: block !important; } table.visible-md { display: table; } tr.visible-md { display: table-row !important; } th.visible-md, td.visible-md { display: table-cell !important; } } @media (min-width: 992px) and (max-width: 1199px) { .visible-md-block { display: block !important; } } @media (min-width: 992px) and (max-width: 1199px) { .visible-md-inline { display: inline !important; } } @media (min-width: 992px) and (max-width: 1199px) { .<API key> { display: inline-block !important; } } @media (min-width: 1200px) { .visible-lg { display: block !important; } table.visible-lg { display: table; } tr.visible-lg { display: table-row !important; } th.visible-lg, td.visible-lg { display: table-cell !important; } } @media (min-width: 1200px) { .visible-lg-block { display: block !important; } } @media (min-width: 1200px) { .visible-lg-inline { display: inline !important; } } @media (min-width: 1200px) { .<API key> { display: inline-block !important; } } @media (max-width: 767px) { .hidden-xs { display: none !important; } } @media (min-width: 768px) and (max-width: 991px) { .hidden-sm { display: none !important; } } @media (min-width: 992px) and (max-width: 1199px) { .hidden-md { display: none !important; } } @media (min-width: 1200px) { .hidden-lg { display: none !important; } } .visible-print { display: none !important; } @media print { .visible-print { display: block !important; } table.visible-print { display: table; } tr.visible-print { display: table-row !important; } th.visible-print, td.visible-print { display: table-cell !important; } } .visible-print-block { display: none !important; } @media print { .visible-print-block { display: block !important; } } .<API key> { display: none !important; } @media print { .<API key> { display: inline !important; } } .<API key> { display: none !important; } @media print { .<API key> { display: inline-block !important; } } @media print { .hidden-print { display: none !important; } } /*# sourceMappingURL=bootstrap.css.map */
package org.elkoserver.objdb.store.mongostore; import org.elkoserver.foundation.boot.BootProperties; import org.elkoserver.json.JSONArray; import org.elkoserver.json.<API key>; import org.elkoserver.json.JSONObject; import org.elkoserver.json.Parser; import org.elkoserver.json.SyntaxError; import org.elkoserver.objdb.store.GetResultHandler; import org.elkoserver.objdb.store.ObjectDesc; import org.elkoserver.objdb.store.ObjectStore; import org.elkoserver.objdb.store.PutDesc; import org.elkoserver.objdb.store.QueryDesc; import org.elkoserver.objdb.store.RequestDesc; import org.elkoserver.objdb.store.UpdateDesc; import org.elkoserver.objdb.store.<API key>; import org.elkoserver.objdb.store.ResultDesc; import org.elkoserver.objdb.store.UpdateResultDesc; import org.elkoserver.util.trace.Trace; import com.mongodb.BasicDBList; import com.mongodb.BasicDBObject; import com.mongodb.DB; import com.mongodb.DBCollection; import com.mongodb.DBCursor; import com.mongodb.DBObject; import com.mongodb.Mongo; import com.mongodb.MongoException; import com.mongodb.WriteResult; import org.bson.types.ObjectId; import java.net.<API key>; import java.util.ArrayList; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Map; /** * An {@link ObjectStore} implementation that stores objects in a MongoDB NoSQL * object database. */ public class MongoObjectStore implements ObjectStore { /** Trace object for diagnostics. */ private Trace tr; /** The MongoDB instance in which the objects are stored. */ private Mongo myMongo; /** The Mongo database we are using */ private DB myDB; /** The default Mongo collection holding the normal objects */ private DBCollection myODBCollection; /** * Constructor. Currently there is nothing to do, since all the real * initialization work happens in {@link #initialize initialize()}. */ public MongoObjectStore() { } /** * Do the initialization required to begin providing object store * services. * * <p>The property <tt>"<i>propRoot</i>.odb.mongo.hostport"</tt> should * specify the address of the MongoDB server holding the objects. * * <p>The optional property <tt>"<i>propRoot</i>.odb.mongo.dbname"</tt> * allows the Mongo database name to be specified. If omitted, this * defaults to <tt>"elko"</tt>. * * <p>The optional property <tt>"<i>propRoot</i>.odb.mongo.collname"</tt> * allows the collection containing the object repository to be specified. * If omitted, this defaults to <tt>"odb"</tt>. * * @param props Properties describing configuration information. * @param propRoot Prefix string for selecting relevant properties. * @param appTrace Trace object for use in logging. */ public void initialize(BootProperties props, String propRoot, Trace appTrace) { tr = appTrace; propRoot = propRoot + ".odb.mongo"; String addressStr = props.getProperty(propRoot + ".hostport"); if (addressStr == null) { tr.fatalError("no mongo database server address specified"); } int colon = addressStr.indexOf(':'); int port; String host; if (colon < 0) { port = 27017; host = addressStr; } else { port = Integer.parseInt(addressStr.substring(colon + 1)) ; host = addressStr.substring(0, colon); } //try { myMongo = new Mongo(host, port); //} catch (<API key> e) { // tr.fatalError("mongodb server " + addressStr + ": unknown host"); String dbName = props.getProperty(propRoot + ".dbname", "elko"); myDB = myMongo.getDB(dbName); String collName = props.getProperty(propRoot + ".collname", "odb"); myODBCollection = myDB.getCollection(collName); } /** * Obtain the object or objects that a field value references. * * @param value The value to dereference. * @param collection The collection to fetch from. * @param results List in which to place the object or objects obtained. */ private void dereferenceValue(Object value, DBCollection collection, List<ObjectDesc> results) { if (value instanceof JSONArray) { for (Object elem : (JSONArray) value) { if (elem instanceof String) { results.addAll(doGet((String) elem, collection)); } } } else if (value instanceof String) { results.addAll(doGet((String) value, collection)); } } /** * Perform a single 'get' operation on the local object store. * * @param ref Object reference string of the object to be gotten. * @param collection Collection to get from. * * @return a list of ObjectDesc objects, the first of which will be * the result of getting 'ref' and the remainder, if any, will be the * results of getting any contents objects. */ private List<ObjectDesc> doGet(String ref, DBCollection collection) { List<ObjectDesc> results = new LinkedList<ObjectDesc>(); String failure = null; String obj = null; List<ObjectDesc> contents = null; try { DBObject query = new BasicDBObject(); query.put("ref", ref); DBObject dbObj = collection.findOne(query); if (dbObj != null) { JSONObject jsonObj = <API key>(dbObj); obj = jsonObj.sendableString(); contents = doGetContents(jsonObj, collection); } else { failure = "not found"; } } catch (Exception e) { obj = null; failure = e.getMessage(); } results.add(new ObjectDesc(ref, obj, failure)); if (contents != null) { results.addAll(contents); } return results; } private JSONObject <API key>(DBObject dbObj) { JSONObject result = new JSONObject(); for (String key : dbObj.keySet()) { if (!key.startsWith("_")) { Object value = dbObj.get(key); if (value instanceof BasicDBList) { value = dbListToJSONArray((BasicDBList) value); } else if (value instanceof DBObject) { value = <API key>((DBObject) value); } result.addProperty(key, value); } else if (key.equals("_id")) { ObjectId oid = (ObjectId) dbObj.get(key); result.addProperty(key, oid.toString()); } } return result; } private JSONArray dbListToJSONArray(BasicDBList dbList) { JSONArray result = new JSONArray(); for (Object elem : dbList) { if (elem instanceof BasicDBList) { elem = dbListToJSONArray((BasicDBList) elem); } else if (elem instanceof DBObject) { elem = <API key>((DBObject) elem); } result.add(elem); } return result; } private DBObject <API key>(String objStr, String ref) { JSONObject obj; try { obj = JSONObject.parse(objStr); } catch (SyntaxError e) { return null; } DBObject result = <API key>(obj); result.put("ref", ref); // WARNING: the following is a rather profound and obnoxious modularity // boundary violation, but as ugly as it is, it appears to be the least // bad way to accomodate some of the limitations of Mongodb's // geo-indexing feature. In order to spatially index an object, // Mongodb requires the 2D coordinate information to be stored in a // 2-element object or array property at the top level of the object to // be indexed. In the case of a 2-element object, the order the // properties appear in the JSON encoding is meaningful, which totally // violates the definition of JSON but that's what they did. // Unfortunately, the rest of our object encoding/decoding // infrastructure requires object-valued properties whose values are // polymorphic classes to contain a "type" property to indicate what // class they are. Since there's no way to control the order in which // properties will be encoded when the object is serialized to JSON, we // risk having Mongodb mistake the type tag for the latitude or // longitude. Even if we could overcome this, we'd still risk having // Mongodb mix the latitude and longitude up with each other. // Consequently, what we do is notice if an object being written has a // "pos" property of type "geopos", and if so we manually generate an // additional "_qpos_" property that is well formed according to // Mondodb's 2D coordinate encoding rules, and have Mongodb index // *that*. When an object is read from the database, we strip this // property off again before we return the object to the application. try { JSONObject pos = obj.optObject("pos", null); if (pos != null) { String type = pos.optString("type", null); if ("geopos".equals(type)) { double lat = pos.optDouble("lat", 0.0); double lon = pos.optDouble("lon", 0.0); DBObject qpos = new BasicDBObject(); qpos.put("lat", lat); qpos.put("lon", lon); result.put("_qpos_", qpos); } } } catch (<API key> e) { // this can't actually happen } // End of ugly modularity boundary violation return result; } private Object valueToDBValue(Object value) { if (value instanceof JSONObject) { value = <API key>((JSONObject) value); } else if (value instanceof JSONArray) { value = jsonArrayToDBArray((JSONArray) value); } else if (value instanceof Long) { long intValue = ((Long) value).longValue(); if (Integer.MIN_VALUE <= intValue && intValue <= Integer.MAX_VALUE) { value = new Integer((int) intValue); } } return value; } private ArrayList<Object> jsonArrayToDBArray(JSONArray arr) { ArrayList<Object> result = new ArrayList<Object>(arr.size()); for (Object elem : arr) { result.add(valueToDBValue(elem)); } return result; } private DBObject <API key>(JSONObject obj) { DBObject result = new BasicDBObject(); for (Map.Entry<String, Object> prop : obj.properties()) { result.put(prop.getKey(), valueToDBValue(prop.getValue())); } return result; } /** * Fetch the contents of an object. * * @param obj The object whose contents are sought. * * @return a List of ObjectDesc objects for the contents as * requested. */ private List<ObjectDesc> doGetContents(JSONObject obj, DBCollection collection) { List<ObjectDesc> results = new LinkedList<ObjectDesc>(); for (Map.Entry<String, Object> entry : obj.properties()) { String propName = entry.getKey(); if (propName.startsWith("ref$")) { dereferenceValue(entry.getValue(), collection, results); } } return results; } /** * Perform a single 'put' operation on the local object store. * * @param ref Object reference string of the object to be written. * @param obj JSON string encoding the object to be written. * @param collection Collection to put to. * * @return a ResultDesc object describing the success or failure of the * operation. */ private ResultDesc doPut(String ref, String obj, DBCollection collection, boolean requireNew) { String failure = null; if (obj == null) { failure = "no object data given"; } else { try { DBObject objectToWrite = <API key>(obj, ref); if (requireNew) { WriteResult wr = collection.insert(objectToWrite); } else { DBObject query = new BasicDBObject(); query.put("ref", ref); collection.update(query, objectToWrite, true, false); } } catch (Exception e) { failure = e.getMessage(); } } return new ResultDesc(ref, failure); } /** * Perform a single 'update' operation on the local object store. * * @param ref Object reference string of the object to be written. * @param version Expected version number of object before updating. * @param obj JSON string encoding the object to be written. * @param collection Collection to put to. * * @return an UpdateResultDesc object describing the success or failure of * the operation. */ private UpdateResultDesc doUpdate(String ref, int version, String obj, DBCollection collection) { String failure = null; boolean atomicFailure = false; if (obj == null) { failure = "no object data given"; } else { try { DBObject objectToWrite = <API key>(obj, ref); DBObject query = new BasicDBObject(); query.put("ref", ref); query.put("version", version); WriteResult result = collection.update(query, objectToWrite, false, false); if (result.getN() != 1) { failure = "stale version number on update"; atomicFailure = true; } } catch (Exception e) { failure = e.getMessage(); } } return new UpdateResultDesc(ref, failure, atomicFailure); } /** * Perform a single 'remove' operation on the local object store. * * @param ref Object reference string of the object to be deleted. * @param collection Collection to remove from. * * @return a ResultDesc object describing the success or failure of the * operation. */ private ResultDesc doRemove(String ref, DBCollection collection) { String failure = null; try { DBObject query = new BasicDBObject(); query.put("ref", ref); collection.remove(query); } catch (Exception e) { failure = e.getMessage(); } return new ResultDesc(ref, failure); } /** * Service a 'get' request. This is a request to retrieve one or more * objects from the object store. * * @param what The objects sought. * @param handler Object to receive results (i.e., the objects retrieved * or failure indicators), when available. */ public void getObjects(RequestDesc what[], GetResultHandler handler) { List<ObjectDesc> resultList = new LinkedList<ObjectDesc>(); for (RequestDesc req : what) { resultList.addAll(doGet(req.ref(), getCollection(req.collectionName()))); } ObjectDesc results[] = new ObjectDesc[resultList.size()]; results = (ObjectDesc[]) resultList.toArray(results); if (handler != null) { handler.handle(results); } } /** * Service a 'put' request. This is a request to write one or more objects * to the object store. * * @param what The objects to be written. * @param handler Object to receive results (i.e., operation success or * failure indicators), when available. */ public void putObjects(PutDesc what[], <API key> handler) { ResultDesc results[] = new ResultDesc[what.length]; for (int i = 0; i < what.length; ++i) { DBCollection collection = getCollection(what[i].collectionName()); results[i] = doPut(what[i].ref(), what[i].obj(), collection, what[i].isRequireNew()); } if (handler != null) { handler.handle(results); } } /** * Service an 'update' request. This is a request to write one or more * objects to the store, subject to a version number check to assure * atomicity. * * @param what The objects to be written. * @param handler Object to receive results (i.e., operation success or * failure indicators), when available. */ public void updateObjects(UpdateDesc what[], <API key> handler) { UpdateResultDesc results[] = new UpdateResultDesc[what.length]; for (int i = 0; i < what.length; ++i) { DBCollection collection = getCollection(what[i].collectionName()); results[i] = doUpdate(what[i].ref(), what[i].version(), what[i].obj(), collection); } if (handler != null) { handler.handle(results); } } /** * Perform a single 'query' operation on the local object store. * * @param template Query template indicating what objects are sought. * @param collection Collection to query. * @param maxResults Maximum number of result objects to return, or 0 to * indicate no fixed limit. * * @return a list of ObjectDesc objects for objects matching the query. */ private List<ObjectDesc> doQuery(JSONObject template, DBCollection collection, int maxResults) { List<ObjectDesc> results = new LinkedList<ObjectDesc>(); try { DBObject query = <API key>(template); DBCursor cursor; if (maxResults > 0) { cursor = collection.find(query, null, 0, -maxResults); } else { cursor = collection.find(query); } for (DBObject dbObj : cursor) { JSONObject jsonObj = <API key>(dbObj); String obj = jsonObj.sendableString(); results.add(new ObjectDesc("query", obj, null)); } } catch (Exception e) { results.add(new ObjectDesc("query", null, e.getMessage())); } return results; } /** * Map from a collection name to a Mongo collection object. * * @param collectionName Name of the collection desired, or null to get * the configured default (whatever that may be). * * @return the DBCollection object corresponding to collectionName. */ private DBCollection getCollection(String collectionName) { if (collectionName == null) { return myODBCollection; } else { return myDB.getCollection(collectionName); } } /** * Service a 'query' request. This is a request to query one or more * objects from the store. * * @param what Query templates for the objects sought. * @param handler Object to receive results (i.e., the objects retrieved * or failure indicators), when available. */ public void queryObjects(QueryDesc what[], GetResultHandler handler) { List<ObjectDesc> resultList = new LinkedList<ObjectDesc>(); for (QueryDesc req : what) { DBCollection collection = getCollection(req.collectionName()); resultList.addAll(doQuery(req.template(), collection, req.maxResults())); } ObjectDesc results[] = new ObjectDesc[resultList.size()]; results = (ObjectDesc[]) resultList.toArray(results); if (handler != null) { handler.handle(results); } } /** * Service a 'remove' request. This is a request to delete one or more * objects from the object store. * * @param what The objects to be removed. * @param handler Object to receive results (i.e., operation success or * failure indicators), when available. */ public void removeObjects(RequestDesc what[], <API key> handler) { ResultDesc results[] = new ResultDesc[what.length]; for (int i = 0; i < what.length; ++i) { results[i] = doRemove(what[i].ref(), getCollection(what[i].collectionName())); } if (handler != null) { handler.handle(results); } } /** * Do any work required immediately prior to shutting down the server. * This method gets invoked at most once, at server shutdown time. */ public void shutdown() { /* nothing to do in this implementation */ } }
// <auto-generated> // This code was generated by a tool. // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> namespace _02.<API key>.Account { public partial class Manage { <summary> successMessage control. </summary> <remarks> Auto-generated field. To modify move field declaration from designer file to code-behind file. </remarks> protected global::System.Web.UI.WebControls.PlaceHolder successMessage; <summary> ChangePassword control. </summary> <remarks> Auto-generated field. To modify move field declaration from designer file to code-behind file. </remarks> protected global::System.Web.UI.WebControls.HyperLink ChangePassword; <summary> CreatePassword control. </summary> <remarks> Auto-generated field. To modify move field declaration from designer file to code-behind file. </remarks> protected global::System.Web.UI.WebControls.HyperLink CreatePassword; <summary> PhoneNumber control. </summary> <remarks> Auto-generated field. To modify move field declaration from designer file to code-behind file. </remarks> protected global::System.Web.UI.WebControls.Label PhoneNumber; } }
// UIView+MLInputDodger.h // MLInputDodger #import <UIKit/UIKit.h> @interface UIView (MLInputDodger) /** * the shift height as dodger */ @property (nonatomic, assign) CGFloat <API key>; /** * the shift height as first responder , higher priority */ @property (nonatomic, assign) CGFloat <API key>; /** * The config of original y. When `<API key>`, if value of the property is 0, it's will be set with current y. */ @property (nonatomic, assign) CGFloat <API key>; /** * register as a dodger conveniently */ - (void)<API key>; /** * unregister conveniently */ - (void)<API key>; @end
package main.model; import java.awt.Point; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import main.model.map.*; import main.model.tower.*; import main.model.critter.*; public class GameLogic { private CritterManager critterManager; private TowerManager towerManager; private Player player; private Map map; private List<View> views; private AttackThread attack_thread; private CritterGenerator critter_thread; boolean init = true; boolean waiting = false; int STEAL_FACTOR = 50; int previousPlayerMoney = 0; public GameLogic(Map m) { critterManager = new CritterManager(); towerManager = new TowerManager(); player = new Player(); map = m; map.getFirstTile().<API key>(); views = new ArrayList<View>(); map.getLastTile().getPosition(); attack_thread = new AttackThread(critterManager,towerManager,player); critter_thread = new CritterGenerator(critterManager,player,map); } public List<Critter> getCrittersList() { return critterManager.getCrittersList(); } public List<Tower> getTowersList() { return towerManager.getTowersList(); } public List<Tile> getTilesList() { return map.getTilesList(); } private void moveCritter() { LinkedList<Critter> critters = critterManager.getCrittersList(); for (Critter c : critters) { Tile tile = map.getTileAt(c.getPosition()); Tile nextTile = ((Path)tile).getNext(); if(nextTile==null){ int newAmmount = (int) (player.getGold()-c.getLevel()*STEAL_FACTOR); if(newAmmount<0){ player.setGold(0); } else{ //Use the makePurchase Method to notify player.makePurchase(c.getLevel()*STEAL_FACTOR); } critterManager.removeCritter(c); continue; } Vector2D nextTileVector = new Vector2D (nextTile.<API key>().getX()+13, nextTile.<API key>().getY()+13); Vector2D directionVector = nextTileVector.<API key>(c.getPosition()); Vector2D velocityVector = directionVector.getNormalizedVector().<API key>(c.getSpeed()/5); Vector2D newPosition = c.getPosition().getVectorAddition(velocityVector); c.setPosition(newPosition); //System.out.println(c.getPosition().getX() + " , " + c.getPosition().getY() + " health: " + c.getHitPoints()); } } private void checkEndOfPath() { List<Critter> critters = critterManager.getCrittersList(); for(Critter c: critters) { Tile tile = map.getTileAt(c.getPosition()); if(((Path)tile).getNext() == null) { int strength = c.getStrength(); player.setGold(player.getGold() - strength); player.setHealth(player.getHealth() - strength); critterManager.removeCritter(c); } } } private void checkDeadCritters() { List<Critter> critters = critterManager.getCrittersList(); for(Critter c: critters) { if(c.getHitPoints() <= 0) { int reward = c.getReward(); critterManager.removeCritter(c); player.addGold(reward); } } } private boolean areAllCrittersDead(){ LinkedList<Critter> critterList = critterManager.getCrittersList(); if(critterList.size()==0){ return true; } return false; } private boolean isPlayerDead(){ if(player.getGold() <= 0){ return true; } return false; } public void updateFrame() { if(waiting){ return; } if(init){ previousPlayerMoney = player.getGold(); if(player.getLevel()==1){ critter_thread.start(); attack_thread.start(); } else{ critter_thread = new CritterGenerator(critterManager,player,map); attack_thread = new AttackThread(critterManager, towerManager, player); critter_thread.start(); attack_thread.start(); } init = false; } if(previousPlayerMoney != player.getGold()){ updateViews(); previousPlayerMoney = player.getGold(); } else if(isPlayerDead()){ //TODO: deal with game over updateViews(); waiting = true; } //If no critters are present and the generator has finished generating new ones, the wave is finished else if(areAllCrittersDead()&&!critter_thread.isAlive()){ player.setLevel(player.getLevel()+1); updateViews(); init = true; waiting = true; } moveCritter(); checkDeadCritters(); checkEndOfPath(); } /* * Button actions */ public void selectTile(Point p) { Vector2D v = new Vector2D(p.x, p.y); System.out.println(v.getX() + " , " + v.getY()); map.selectTile(v); System.out.println(map.getSelectedTile().getPosition().getX() + " , " + map.getSelectedTile().getPosition().getY()); } public void purchaseTower(int towerType) { Tower t; Vector2D position = map.getSelectedTile().<API key>(); System.out.println(position.getX() + " , " + position.getY()); switch(towerType) { case 0: t = new CanonTower(position); break; case 1: t = new MachineGunTower(position); break; case 2: t = new MortarTower(position); break; case 3: t = new SpellTower(position); break; default: t = new CanonTower(position); break; } towerManager.addTower(t); map.getSelectedTile().addTower(t); int cost = t.getBuyingCost(); player.makePurchase(cost); updateViews(); } public void sellTower() { Tower t = map.getSelectedTile().getTower(); player.addGold(t.getRefundValue()); towerManager.removeTower(t); map.getSelectedTile().removeTower(t); updateViews(); } public void upgradeTower() { Tower t = map.getSelectedTile().getTower(); player.makePurchase(t.getUpgradeCost()); t.upgrade(); updateViews(); } int crittersToSpawn; public void startWave() { crittersToSpawn = player.getLevel() * 2; waiting = false; } public Tile getSelectedTile() { return map.getSelectedTile(); } public Player getPlayer() { return player; } public void addView(View view) { views.add(view); } public void updateViews() { for (View v: views) { v.update(); } } public Map getMap() { return map; } }
@lombok.experimental.SuperBuilder class <API key> { public static abstract @java.lang.SuppressWarnings("all") class <API key><C extends <API key>, B extends <API key><C, B>> { private @java.lang.SuppressWarnings("all") int field; private @java.lang.SuppressWarnings("all") int otherField; private @java.lang.SuppressWarnings("all") java.util.ArrayList<String> items; public <API key>() { super(); } protected abstract @java.lang.SuppressWarnings("all") B self(); public abstract @java.lang.SuppressWarnings("all") C build(); public @java.lang.SuppressWarnings("all") B field(final int field) { this.field = field; return self(); } public @java.lang.SuppressWarnings("all") B otherField(final int otherField) { this.otherField = otherField; return self(); } public @java.lang.SuppressWarnings("all") B item(final String item) { if ((this.items == null)) this.items = new java.util.ArrayList<String>(); this.items.add(item); return self(); } public @java.lang.SuppressWarnings("all") B items(final java.util.Collection<? extends String> items) { if ((this.items == null)) this.items = new java.util.ArrayList<String>(); this.items.addAll(items); return self(); } public @java.lang.SuppressWarnings("all") B clearItems() { if ((this.items != null)) this.items.clear(); return self(); } public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { return (((((("<API key>.<API key>(field=" + this.field) + ", otherField=") + this.otherField) + ", items=") + this.items) + ")"); } } private static final @java.lang.SuppressWarnings("all") class <API key> extends <API key><<API key>, <API key>> { private <API key>() { super(); } protected @java.lang.Override @java.lang.SuppressWarnings("all") <API key> self() { return this; } public @java.lang.Override @java.lang.SuppressWarnings("all") <API key> build() { return new <API key>(this); } } int mField; int xOtherField; @lombok.Singular java.util.List<String> mItems; protected @java.lang.SuppressWarnings("all") <API key>(final <API key><?, ?> b) { super(); this.mField = b.field; this.xOtherField = b.otherField; java.util.List<String> items; switch (((b.items == null) ? 0 : b.items.size())) { case 0 : items = java.util.Collections.emptyList(); break; case 1 : items = java.util.Collections.singletonList(b.items.get(0)); break; default : items = java.util.Collections.unmodifiableList(new java.util.ArrayList<String>(b.items)); } this.mItems = items; } public static @java.lang.SuppressWarnings("all") <API key><?, ?> builder() { return new <API key>(); } }
'use strict'; require('babel/register')({ optional: ["es7.classProperties"] }); /** * Bootstrap our server process. This is responsible for * pre-rendering React views for our templates. */ var app = require('../resources/assets/js/server'); app.listen(3000, function() { console.log('React renderer started on port 3000'); });
using System; using ZKWeb.Database; using ZKWebStandard.Ioc; namespace ZKWeb.Plugins.Shopping.Product.src.Domain.Entities { <summary> </summary> [ExportMany] public class <API key> : IEntity<Guid>, <API key><<API key>> { <summary> Id Id </summary> public virtual Guid Id { get; set; } <summary> </summary> public virtual Product Product { get; set; } <summary> </summary> public virtual ProductProperty Property { get; set; } <summary> null </summary> public virtual <API key> PropertyValue { get; set; } <summary> </summary> public virtual string PropertyValueName { get; set; } <summary> </summary> public virtual void Configure(<API key><<API key>> builder) { builder.Id(v => v.Id); builder.References(v => v.Product); builder.References(v => v.Property); builder.References(v => v.PropertyValue); builder.Map(v => v.PropertyValueName); } } }
<div class="example"> <form class="form-horizontal"> <div class="form_row"> <label for="username_horizontal">Username</label> <div class="field"> <input type="email" id="username_horizontal" name="username_horizontal"> <em class="field_helper">Your username is typically your email address</em> </div> </div> <div class="form_row"> <label for="password_horizontal">Password</label> <div class="field"> <input type="password" id="password_horizontal" name="password_horizontal"> <em class="field_helper">Your password can not contain naughty characters</em> <em class="field_helper">If you've forgotten your password, try to <a href="#section_form_rows">reset your password</a>.</em> </div> </div> <div class="form_actions"> <input type="submit" class="button button_primary" value="Log in"> </div> </form> </div>