code
stringlengths
4
1.01M
language
stringclasses
2 values
/* * Copyright (C) 2013 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.example.android.bluetoothlegatt; import android.app.Activity; import android.bluetooth.BluetoothGattCharacteristic; import android.bluetooth.BluetoothGattService; import android.content.BroadcastReceiver; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.ServiceConnection; import android.hardware.Sensor; import android.hardware.SensorEvent; import android.hardware.SensorEventListener; import android.hardware.SensorManager; import android.os.Bundle; import android.os.IBinder; import android.os.PowerManager; import android.util.Log; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.CompoundButton; import android.widget.ExpandableListView; import android.widget.SeekBar; import android.widget.SimpleExpandableListAdapter; import android.widget.Switch; import android.widget.TextView; import java.util.ArrayList; import java.util.HashMap; import java.util.List; /** * For a given BLE device, this Activity provides the user interface to connect, display data, * and display GATT services and characteristics supported by the device. The Activity * communicates with {@code BluetoothLeService}, which in turn interacts with the * Bluetooth LE API. */ public class DeviceControlActivity extends Activity implements SeekBar.OnSeekBarChangeListener ,SensorEventListener { private final static String TAG = DeviceControlActivity.class.getSimpleName(); public static final String EXTRAS_DEVICE_NAME = "DEVICE_NAME"; public static final String EXTRAS_DEVICE_ADDRESS = "DEVICE_ADDRESS"; public static String CLIENT_CHARACTERISTIC_MOTOR = "0000fff1-0000-1000-8000-00805f9b34fb"; private TextView mConnectionState; private TextView mDataField; private String mDeviceName; private String mDeviceAddress; private ExpandableListView mGattServicesList; private BluetoothLeService mBluetoothLeService; private ArrayList<ArrayList<BluetoothGattCharacteristic>> mGattCharacteristics = new ArrayList<ArrayList<BluetoothGattCharacteristic>>(); private boolean mConnected = false; private BluetoothGattCharacteristic mNotifyCharacteristic; private final String LIST_NAME = "NAME"; private final String LIST_UUID = "UUID"; private byte[] value = new byte[8]; private boolean motor_run = false; private TextView mShowSpeed0,mShowSpeed1,mShowSpeed2,mShowSpeed3; private SeekBar mSetSpeed0,mSetSpeed1,mSetSpeed2,mSetSpeed3; private BluetoothGattCharacteristic mMotorChars; private SensorManager mSensorManager; private Switch mDevState = null; private Switch mConState = null; private Switch mCtlState = null; private PowerManager pm = null; PowerManager.WakeLock wl = null; // Code to manage Service lifecycle. private final ServiceConnection mServiceConnection = new ServiceConnection() { @Override public void onServiceConnected(ComponentName componentName, IBinder service) { mBluetoothLeService = ((BluetoothLeService.LocalBinder) service).getService(); if (!mBluetoothLeService.initialize()) { Log.e(TAG, "Unable to initialize Bluetooth"); finish(); } // Automatically connects to the device upon successful start-up initialization. mBluetoothLeService.connect(mDeviceAddress); } @Override public void onServiceDisconnected(ComponentName componentName) { mBluetoothLeService = null; } }; // Handles various events fired by the Service. // ACTION_GATT_CONNECTED: connected to a GATT server. // ACTION_GATT_DISCONNECTED: disconnected from a GATT server. // ACTION_GATT_SERVICES_DISCOVERED: discovered GATT services. // ACTION_DATA_AVAILABLE: received data from the device. This can be a result of read // or notification operations. private final BroadcastReceiver mGattUpdateReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { final String action = intent.getAction(); if (BluetoothLeService.ACTION_GATT_CONNECTED.equals(action)) { mConnected = true; updateConnectionState(R.string.connected); invalidateOptionsMenu(); } else if (BluetoothLeService.ACTION_GATT_DISCONNECTED.equals(action)) { mConnected = false; updateConnectionState(R.string.disconnected); invalidateOptionsMenu(); clearUI(); } else if (BluetoothLeService.ACTION_GATT_SERVICES_DISCOVERED.equals(action)) { // Show all the supported services and characteristics on the user interface. displayGattServices(mBluetoothLeService.getSupportedGattServices()); } else if (BluetoothLeService.ACTION_DATA_AVAILABLE.equals(action)) { displayData(intent.getStringExtra(BluetoothLeService.EXTRA_DATA)); } } }; // If a given GATT characteristic is selected, check for supported features. This sample // demonstrates 'Read' and 'Notify' features. See // http://d.android.com/reference/android/bluetooth/BluetoothGatt.html for the complete // list of supported characteristic features. private final ExpandableListView.OnChildClickListener servicesListClickListner = new ExpandableListView.OnChildClickListener() { @Override public boolean onChildClick(ExpandableListView parent, View v, int groupPosition, int childPosition, long id) { if (mGattCharacteristics != null) { final BluetoothGattCharacteristic characteristic = mGattCharacteristics.get(groupPosition).get(childPosition); // final int charaProp = characteristic.getProperties(); // if ((charaProp | BluetoothGattCharacteristic.PROPERTY_READ) > 0) { // // If there is an active notification on a characteristic, clear // // it first so it doesn't update the data field on the user interface. // if (mNotifyCharacteristic != null) { // mBluetoothLeService.setCharacteristicNotification( // mNotifyCharacteristic, false); // mNotifyCharacteristic = null; // } // mBluetoothLeService.readCharacteristic(characteristic); // } // if ((charaProp | BluetoothGattCharacteristic.PROPERTY_NOTIFY) > 0) { // mNotifyCharacteristic = characteristic; // mBluetoothLeService.setCharacteristicNotification( // characteristic, true); // } if(characteristic.getUuid().toString().equals(CLIENT_CHARACTERISTIC_MOTOR)) { mMotorChars = characteristic; value[0] = 0x04; value[5] += 10; value[5] %= 100; value[6] += 10; value[6] %= 100; characteristic.setValue(value); mBluetoothLeService.writeCharacteristic(characteristic); Log.d("BLE_TEST", "Write Begin"); Log.d("BLE_TEST", "value" + value[7]); } return true; } return false; } }; private void clearUI() { mGattServicesList.setAdapter((SimpleExpandableListAdapter) null); mDataField.setText(R.string.no_data); } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.gatt_services_characteristics); mShowSpeed0 = (TextView) findViewById(R.id.ShowSpeed0); mSetSpeed0 = (SeekBar) findViewById(R.id.SetSpeed0); mShowSpeed1 = (TextView) findViewById(R.id.ShowSpeed1); mSetSpeed1 = (SeekBar) findViewById(R.id.SetSpeed1); mShowSpeed2 = (TextView) findViewById(R.id.ShowSpeed2); mSetSpeed2 = (SeekBar) findViewById(R.id.SetSpeed2); mShowSpeed3 = (TextView) findViewById(R.id.ShowSpeed3); mSetSpeed3 = (SeekBar) findViewById(R.id.SetSpeed3); mDevState = (Switch) findViewById(R.id.DevState); mConState = (Switch) findViewById(R.id.ConState); mCtlState = (Switch) findViewById(R.id.CtlState); // mDevState.setEnabled(false); // 玩家模式 // mConState.setEnabled(true); // 连接状态 // mCtlState.setEnabled(false); // 停止控制 // 开发者模式 or 玩家模式 mDevState.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton compoundButton, boolean b) { SetPlayMode(b); } }); // 连接 or 断开 mConState.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton compoundButton, boolean b) { // TODO mBluetoothLeService.disconnect(); AppRun(); } }); // 开始控制 or 停止控制 mCtlState.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton compoundButton, boolean b) { // TODO } }); mShowSpeed0.setText("Ch0 PWM Duty " + 0); mSetSpeed0.setMax(100); mSetSpeed0.setProgress(0); mSetSpeed0.setOnSeekBarChangeListener(this); mShowSpeed1.setText("Ch1 PWM Duty " + 0); mSetSpeed1.setMax(100); mSetSpeed1.setProgress(0); mSetSpeed1.setOnSeekBarChangeListener(this); mShowSpeed2.setText("Ch2 PWM Duty " + 0); mSetSpeed2.setMax(100); mSetSpeed2.setProgress(0); mSetSpeed2.setOnSeekBarChangeListener(this); mShowSpeed3.setText("Ch3 PWM Duty " + 0); mSetSpeed3.setMax(100); mSetSpeed3.setProgress(0); mSetSpeed3.setOnSeekBarChangeListener(this); mSensorManager = (SensorManager) getSystemService(SENSOR_SERVICE); mSensorManager.registerListener(this, mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER), //SensorManager.SENSOR_DELAY_NORMAL); 50000); final Intent intent = getIntent(); mDeviceName = intent.getStringExtra(EXTRAS_DEVICE_NAME); mDeviceAddress = intent.getStringExtra(EXTRAS_DEVICE_ADDRESS); // Sets up UI references. ((TextView) findViewById(R.id.device_address)).setText(mDeviceAddress); mGattServicesList = (ExpandableListView) findViewById(R.id.gatt_services_list); mGattServicesList.setOnChildClickListener(servicesListClickListner); mConnectionState = (TextView) findViewById(R.id.connection_state); mDataField = (TextView) findViewById(R.id.data_value); getActionBar().setTitle(mDeviceName); getActionBar().setDisplayHomeAsUpEnabled(true); Intent gattServiceIntent = new Intent(this, BluetoothLeService.class); bindService(gattServiceIntent, mServiceConnection, BIND_AUTO_CREATE); SetPlayMode(false); } private void AppRun() { Intent intent = new Intent(this, DeviceScanActivity.class); startActivity(intent); finish(); } private void SetPlayMode(boolean mode) { // true----developer mode // false---player mode TextView mText = null; if (true == mode) { // Address mText = (TextView) findViewById(R.id.device_address_0); mText.setVisibility(TextView.VISIBLE); mText = (TextView) findViewById(R.id.device_address); mText.setVisibility(TextView.VISIBLE); // Connect State mText = (TextView) findViewById(R.id.connection_state_0); mText.setVisibility(TextView.VISIBLE); mText = (TextView) findViewById(R.id.connection_state); mText.setVisibility(TextView.VISIBLE); // Data mText = (TextView) findViewById(R.id.data_value_0); mText.setVisibility(TextView.VISIBLE); mText = (TextView) findViewById(R.id.data_value); mText.setVisibility(TextView.VISIBLE); ExpandableListView mList = (ExpandableListView) findViewById(R.id.gatt_services_list); mList.setVisibility(ExpandableListView.VISIBLE); } else { // Address mText = (TextView) findViewById(R.id.device_address_0); mText.setVisibility(TextView.INVISIBLE); mText = (TextView) findViewById(R.id.device_address); mText.setVisibility(TextView.INVISIBLE); // Connect State mText = (TextView) findViewById(R.id.connection_state_0); mText.setVisibility(TextView.INVISIBLE); mText = (TextView) findViewById(R.id.connection_state); mText.setVisibility(TextView.INVISIBLE); // Data mText = (TextView) findViewById(R.id.data_value_0); mText.setVisibility(TextView.INVISIBLE); mText = (TextView) findViewById(R.id.data_value); mText.setVisibility(TextView.INVISIBLE); ExpandableListView mList = (ExpandableListView) findViewById(R.id.gatt_services_list); mList.setVisibility(ExpandableListView.INVISIBLE); } } @Override public void onProgressChanged(SeekBar var1, int var2, boolean var3) { /* value[0] = 0x04; if(mSetSpeed0 == var1) { value[4] = (byte) var1.getProgress(); mShowSpeed0.setText("Ch0 PWM Duty " + var1.getProgress()); } if(mSetSpeed1 == var1) { value[5] = (byte) var1.getProgress(); mShowSpeed1.setText("Ch1 PWM Duty " + var1.getProgress()); } if(mSetSpeed2 == var1) { value[6] = (byte) var1.getProgress(); mShowSpeed2.setText("Ch2 PWM Duty " + var1.getProgress()); } if(mSetSpeed3 == var1) { value[7] = (byte) var1.getProgress(); mShowSpeed3.setText("Ch3 PWM Duty " + var1.getProgress()); } */ //mMotorChars.setValue(value); //mBluetoothLeService.writeCharacteristic(mMotorChars); } @Override public void onStartTrackingTouch(SeekBar var1){ } @Override public void onStopTrackingTouch(SeekBar var1){ } @Override public void onSensorChanged(SensorEvent var1){ if (var1.sensor.getType() == Sensor.TYPE_ACCELEROMETER) { float[] values = var1.values; // Log.d("BLE_SENSOR", "Length" + values.length); // for(int i = 0; i < values.length; i++) { // Log.d("BLE_SENSOR", "value " + i + values[0]); // } // Control Car int speed_fb = (int)(-20*values[1]); int speed_rl = (int)(20*values[0]); //mShowSpeed0.setText("X Acc value " + speed_fb); //mShowSpeed1.setText("Y Acc value " + speed_rl); if(false == mCtlState.isChecked()){ RemoteCar(0, 0); } else { RemoteCar(speed_fb, speed_rl); } } } // Forward-Back +F-B // Right-Left +L-R void RemoteCar(int speed_fb, int speed_rl){ int speed_l = speed_fb+speed_rl/2; int speed_r = speed_fb-speed_rl/2; for(int i = 0; i < value.length; i++) { value[i] = 0; } if(speed_l > 100) speed_l = 100; if(speed_l < -100) speed_l = -100; if(speed_r > 100) speed_r = 100; if(speed_r < -100) speed_r = -100; value[0] = 0x04; if(speed_l > 0) { value[4] = (byte)speed_l; value[5] = 0; } else if(speed_l < 0){ value[4] = 0; value[5] = (byte)-speed_l; } else { // Do nothing } if(speed_r < 0) { value[6] = (byte)-speed_r; value[7] = 0; } else if(speed_r > 0){ value[6] = 0; value[7] = (byte)speed_r; } else { // Do nothing } /////// mShowSpeed0.setText("Ch0 PWM Duty " + value[4]); mShowSpeed1.setText("Ch1 PWM Duty " + value[5]); mShowSpeed2.setText("Ch2 PWM Duty " + value[6]); mShowSpeed3.setText("Ch3 PWM Duty " + value[7]); mSetSpeed0.setProgress(value[4]); mSetSpeed1.setProgress(value[5]); mSetSpeed2.setProgress(value[6]); mSetSpeed3.setProgress(value[7]); // int progress = (int)value[4]; // mSetSpeed0.setProgress(progress); // progress = (int)value[5]; // mSetSpeed1.setProgress(progress); // progress = (int)value[6]; // mSetSpeed2.setProgress(progress); // progress = (int)value[7]; // mSetSpeed3.setProgress(progress); if(null != mMotorChars) { mMotorChars.setValue(value); if(null != mBluetoothLeService) mBluetoothLeService.writeCharacteristic(mMotorChars); } else { Log.d("BLE_SENSOR", "Error"); } Log.d("BLE_SENSOR", "Update"); /////// } @Override public void onAccuracyChanged(Sensor var1, int var2){ // Do Nothing } @Override protected void onResume() { super.onResume(); if(null == pm) { pm = (PowerManager) getSystemService(Context.POWER_SERVICE); wl = pm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK, "My Tag"); wl.acquire(); } registerReceiver(mGattUpdateReceiver, makeGattUpdateIntentFilter()); if (mBluetoothLeService != null) { final boolean result = mBluetoothLeService.connect(mDeviceAddress); Log.d(TAG, "Connect request result=" + result); } if(null != mSensorManager) { mSensorManager.registerListener(this, mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER), //SensorManager.SENSOR_DELAY_NORMAL); 2000000); } } @Override protected void onPause() { super.onPause(); unregisterReceiver(mGattUpdateReceiver); mSensorManager.unregisterListener(this); if(null != wl) { wl.release(); wl = null; } } @Override protected void onDestroy() { super.onDestroy(); unbindService(mServiceConnection); mBluetoothLeService = null; } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.gatt_services, menu); if (mConnected) { menu.findItem(R.id.menu_connect).setVisible(false); menu.findItem(R.id.menu_disconnect).setVisible(true); } else { menu.findItem(R.id.menu_connect).setVisible(true); menu.findItem(R.id.menu_disconnect).setVisible(false); } return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { switch(item.getItemId()) { case R.id.menu_connect: mBluetoothLeService.connect(mDeviceAddress); return true; case R.id.menu_disconnect: mBluetoothLeService.disconnect(); return true; case android.R.id.home: onBackPressed(); return true; } return super.onOptionsItemSelected(item); } private void updateConnectionState(final int resourceId) { runOnUiThread(new Runnable() { @Override public void run() { mConnectionState.setText(resourceId); } }); } private void displayData(String data) { if (data != null) { mDataField.setText(data); } } // Demonstrates how to iterate through the supported GATT Services/Characteristics. // In this sample, we populate the data structure that is bound to the ExpandableListView // on the UI. private void displayGattServices(List<BluetoothGattService> gattServices) { if (gattServices == null) return; String uuid = null; String unknownServiceString = getResources().getString(R.string.unknown_service); String unknownCharaString = getResources().getString(R.string.unknown_characteristic); ArrayList<HashMap<String, String>> gattServiceData = new ArrayList<HashMap<String, String>>(); ArrayList<ArrayList<HashMap<String, String>>> gattCharacteristicData = new ArrayList<ArrayList<HashMap<String, String>>>(); mGattCharacteristics = new ArrayList<ArrayList<BluetoothGattCharacteristic>>(); // Loops through available GATT Services. for (BluetoothGattService gattService : gattServices) { HashMap<String, String> currentServiceData = new HashMap<String, String>(); uuid = gattService.getUuid().toString(); currentServiceData.put( LIST_NAME, SampleGattAttributes.lookup(uuid, unknownServiceString)); currentServiceData.put(LIST_UUID, uuid); gattServiceData.add(currentServiceData); ArrayList<HashMap<String, String>> gattCharacteristicGroupData = new ArrayList<HashMap<String, String>>(); List<BluetoothGattCharacteristic> gattCharacteristics = gattService.getCharacteristics(); ArrayList<BluetoothGattCharacteristic> charas = new ArrayList<BluetoothGattCharacteristic>(); // Loops through available Characteristics. for (BluetoothGattCharacteristic gattCharacteristic : gattCharacteristics) { charas.add(gattCharacteristic); HashMap<String, String> currentCharaData = new HashMap<String, String>(); uuid = gattCharacteristic.getUuid().toString(); currentCharaData.put( LIST_NAME, SampleGattAttributes.lookup(uuid, unknownCharaString)); currentCharaData.put(LIST_UUID, uuid); gattCharacteristicGroupData.add(currentCharaData); // Set if(gattCharacteristic.getUuid().toString().equals(CLIENT_CHARACTERISTIC_MOTOR)) { mMotorChars = gattCharacteristic; } } mGattCharacteristics.add(charas); gattCharacteristicData.add(gattCharacteristicGroupData); } SimpleExpandableListAdapter gattServiceAdapter = new SimpleExpandableListAdapter( this, gattServiceData, android.R.layout.simple_expandable_list_item_2, new String[] {LIST_NAME, LIST_UUID}, new int[] { android.R.id.text1, android.R.id.text2 }, gattCharacteristicData, android.R.layout.simple_expandable_list_item_2, new String[] {LIST_NAME, LIST_UUID}, new int[] { android.R.id.text1, android.R.id.text2 } ); mGattServicesList.setAdapter(gattServiceAdapter); } private static IntentFilter makeGattUpdateIntentFilter() { final IntentFilter intentFilter = new IntentFilter(); intentFilter.addAction(BluetoothLeService.ACTION_GATT_CONNECTED); intentFilter.addAction(BluetoothLeService.ACTION_GATT_DISCONNECTED); intentFilter.addAction(BluetoothLeService.ACTION_GATT_SERVICES_DISCOVERED); intentFilter.addAction(BluetoothLeService.ACTION_DATA_AVAILABLE); return intentFilter; } }
Java
package tasks // This file is generated by methodGenerator. // DO NOT MOTIFY THIS FILE. import ( "net/url" "github.com/kawaken/go-rtm/methods" ) // AddTags returns "rtm.tasks.addTags" method instance. func AddTags(timeline string, listID string, taskseriesID string, taskID string, tags string) *methods.Method { name := "rtm.tasks.addTags" p := url.Values{} p.Add("method", name) p.Add("timeline", timeline) p.Add("list_id", listID) p.Add("taskseries_id", taskseriesID) p.Add("task_id", taskID) p.Add("tags", tags) return &methods.Method{Name: name, Params: p} }
Java
require('babel-polyfill'); /* eslint-disable */ // Webpack config for creating the production bundle. var path = require('path'); var webpack = require('webpack'); var CleanPlugin = require('clean-webpack-plugin'); var ExtractTextPlugin = require('extract-text-webpack-plugin'); var strip = require('strip-loader'); var projectRootPath = path.resolve(__dirname, '../'); var assetsPath = path.resolve(projectRootPath, './static/dist'); // https://github.com/halt-hammerzeit/webpack-isomorphic-tools var WebpackIsomorphicToolsPlugin = require('webpack-isomorphic-tools/plugin'); var webpackIsomorphicToolsPlugin = new WebpackIsomorphicToolsPlugin(require('./webpack-isomorphic-tools')); module.exports = { devtool: 'source-map', context: path.resolve(__dirname, '..'), entry: { 'main': [ 'bootstrap-sass!./src/theme/bootstrap.config.prod.js', 'font-awesome-webpack!./src/theme/font-awesome.config.prod.js', './src/client.js' ] }, output: { path: assetsPath, filename: '[name]-[chunkhash].js', chunkFilename: '[name]-[chunkhash].js', publicPath: '/dist/' }, module: { loaders: [ { test: /\.jsx?$/, exclude: /node_modules/, loaders: [strip.loader('debug'), 'babel']}, { test: /\.json$/, loader: 'json-loader' }, { test: /\.less$/, loader: ExtractTextPlugin.extract('style', 'css?modules&importLoaders=2&sourceMap!autoprefixer?browsers=last 2 version!less?outputStyle=expanded&sourceMap=true&sourceMapContents=true') }, { test: /\.scss$/, loader: ExtractTextPlugin.extract('style', 'css?modules&importLoaders=2&sourceMap!autoprefixer?browsers=last 2 version!sass?outputStyle=expanded&sourceMap=true&sourceMapContents=true') }, { test: /\.woff(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=application/font-woff" }, { test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=application/font-woff" }, { test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=application/octet-stream" }, { test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, loader: "file" }, { test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=image/svg+xml" }, { test: webpackIsomorphicToolsPlugin.regular_expression('images'), loader: 'url-loader?limit=10240' } ] }, progress: true, resolve: { modulesDirectories: [ 'src', 'node_modules' ], extensions: ['', '.json', '.js', '.jsx'] }, plugins: [ new CleanPlugin([assetsPath], { root: projectRootPath }), // css files from the extract-text-plugin loader new ExtractTextPlugin('[name]-[chunkhash].css', {allChunks: true}), new webpack.DefinePlugin({ 'process.env': { NODE_ENV: '"production"' }, __CLIENT__: true, __SERVER__: false, __DEVELOPMENT__: false, __DEVTOOLS__: false }), // ignore dev config new webpack.IgnorePlugin(/\.\/dev/, /\/config$/), // optimizations new webpack.optimize.DedupePlugin(), new webpack.optimize.OccurenceOrderPlugin(), new webpack.optimize.UglifyJsPlugin({ compress: { warnings: false } }), webpackIsomorphicToolsPlugin ] };
Java
from itertools import product import numpy as np from sympy import And import pytest from conftest import skipif, opts_tiling from devito import (ConditionalDimension, Grid, Function, TimeFunction, SparseFunction, # noqa Eq, Operator, Constant, Dimension, SubDimension, switchconfig, SubDomain, Lt, Le, Gt, Ge, Ne, Buffer) from devito.ir.iet import (Conditional, Expression, Iteration, FindNodes, retrieve_iteration_tree) from devito.symbolics import indexify, retrieve_functions, IntDiv from devito.types import Array class TestBufferedDimension(object): def test_multi_buffer(self): grid = Grid((3, 3)) f = TimeFunction(name="f", grid=grid) g = TimeFunction(name="g", grid=grid, save=Buffer(7)) op = Operator([Eq(f.forward, 1), Eq(g, f.forward)]) op(time_M=3) # f looped all time_order buffer and is 1 everywhere assert np.allclose(f.data, 1) # g looped indices 0 to 3, rest is still 0 assert np.allclose(g.data[0:4], 1) assert np.allclose(g.data[4:], 0) def test_multi_buffer_long_time(self): grid = Grid((3, 3)) time = grid.time_dim f = TimeFunction(name="f", grid=grid) g = TimeFunction(name="g", grid=grid, save=Buffer(7)) op = Operator([Eq(f.forward, time), Eq(g, time+1)]) op(time_M=20) # f[0] is time=19, f[1] is time=20 assert np.allclose(f.data[0], 19) assert np.allclose(f.data[1], 20) # g is time 15 to 21 (loop twice the 7 buffer then 15->21) for i in range(7): assert np.allclose(g.data[i], 14+i+1) class TestSubDimension(object): @pytest.mark.parametrize('opt', opts_tiling) def test_interior(self, opt): """ Tests application of an Operator consisting of a single equation over the ``interior`` subdomain. """ grid = Grid(shape=(4, 4, 4)) x, y, z = grid.dimensions interior = grid.interior u = TimeFunction(name='u', grid=grid) eqn = [Eq(u.forward, u + 2, subdomain=interior)] op = Operator(eqn, opt=opt) op.apply(time_M=2) assert np.all(u.data[1, 1:-1, 1:-1, 1:-1] == 6.) assert np.all(u.data[1, :, 0] == 0.) assert np.all(u.data[1, :, -1] == 0.) assert np.all(u.data[1, :, :, 0] == 0.) assert np.all(u.data[1, :, :, -1] == 0.) def test_domain_vs_interior(self): """ Tests application of an Operator consisting of two equations, one over the whole domain (default), and one over the ``interior`` subdomain. """ grid = Grid(shape=(4, 4, 4)) x, y, z = grid.dimensions t = grid.stepping_dim # noqa interior = grid.interior u = TimeFunction(name='u', grid=grid) # noqa eqs = [Eq(u.forward, u + 1), Eq(u.forward, u.forward + 2, subdomain=interior)] op = Operator(eqs, opt='noop') trees = retrieve_iteration_tree(op) assert len(trees) == 2 op.apply(time_M=1) assert np.all(u.data[1, 0, :, :] == 1) assert np.all(u.data[1, -1, :, :] == 1) assert np.all(u.data[1, :, 0, :] == 1) assert np.all(u.data[1, :, -1, :] == 1) assert np.all(u.data[1, :, :, 0] == 1) assert np.all(u.data[1, :, :, -1] == 1) assert np.all(u.data[1, 1:3, 1:3, 1:3] == 3) @pytest.mark.parametrize('opt', opts_tiling) def test_subdim_middle(self, opt): """ Tests that instantiating SubDimensions using the classmethod constructors works correctly. """ grid = Grid(shape=(4, 4, 4)) x, y, z = grid.dimensions t = grid.stepping_dim # noqa u = TimeFunction(name='u', grid=grid) # noqa xi = SubDimension.middle(name='xi', parent=x, thickness_left=1, thickness_right=1) eqs = [Eq(u.forward, u + 1)] eqs = [e.subs(x, xi) for e in eqs] op = Operator(eqs, opt=opt) u.data[:] = 1.0 op.apply(time_M=1) assert np.all(u.data[1, 0, :, :] == 1) assert np.all(u.data[1, -1, :, :] == 1) assert np.all(u.data[1, 1:3, :, :] == 2) def test_symbolic_size(self): """Check the symbolic size of all possible SubDimensions is as expected.""" grid = Grid(shape=(4,)) x, = grid.dimensions thickness = 4 xleft = SubDimension.left(name='xleft', parent=x, thickness=thickness) assert xleft.symbolic_size == xleft.thickness.left[0] xi = SubDimension.middle(name='xi', parent=x, thickness_left=thickness, thickness_right=thickness) assert xi.symbolic_size == (x.symbolic_max - x.symbolic_min - xi.thickness.left[0] - xi.thickness.right[0] + 1) xright = SubDimension.right(name='xright', parent=x, thickness=thickness) assert xright.symbolic_size == xright.thickness.right[0] @pytest.mark.parametrize('opt', opts_tiling) def test_bcs(self, opt): """ Tests application of an Operator consisting of multiple equations defined over different sub-regions, explicitly created through the use of SubDimensions. """ grid = Grid(shape=(20, 20)) x, y = grid.dimensions t = grid.stepping_dim thickness = 4 u = TimeFunction(name='u', save=None, grid=grid, space_order=0, time_order=1) xleft = SubDimension.left(name='xleft', parent=x, thickness=thickness) xi = SubDimension.middle(name='xi', parent=x, thickness_left=thickness, thickness_right=thickness) xright = SubDimension.right(name='xright', parent=x, thickness=thickness) yi = SubDimension.middle(name='yi', parent=y, thickness_left=thickness, thickness_right=thickness) t_in_centre = Eq(u[t+1, xi, yi], 1) leftbc = Eq(u[t+1, xleft, yi], u[t+1, xleft+1, yi] + 1) rightbc = Eq(u[t+1, xright, yi], u[t+1, xright-1, yi] + 1) op = Operator([t_in_centre, leftbc, rightbc], opt=opt) op.apply(time_m=1, time_M=1) assert np.all(u.data[0, :, 0:thickness] == 0.) assert np.all(u.data[0, :, -thickness:] == 0.) assert all(np.all(u.data[0, i, thickness:-thickness] == (thickness+1-i)) for i in range(thickness)) assert all(np.all(u.data[0, -i, thickness:-thickness] == (thickness+2-i)) for i in range(1, thickness + 1)) assert np.all(u.data[0, thickness:-thickness, thickness:-thickness] == 1.) def test_flow_detection_interior(self): """ Test detection of flow directions when SubDimensions are used (in this test they are induced by the ``interior`` subdomain). Stencil uses values at new timestep as well as those at previous ones This forces an evaluation order onto x. Weights are: x=0 x=1 x=2 x=3 t=N 2 ---3 v / t=N+1 o--+----4 Flow dependency should traverse x in the negative direction x=2 x=3 x=4 x=5 x=6 t=0 0 --- 0 -- 1 -- 0 v / v / v / t=1 44 -+--- 11 -+--- 2--+ -- 0 """ grid = Grid(shape=(10, 10)) x, y = grid.dimensions interior = grid.interior u = TimeFunction(name='u', grid=grid, save=10, time_order=1, space_order=0) step = Eq(u.forward, 2*u + 3*u.subs(x, x+x.spacing) + 4*u.forward.subs(x, x+x.spacing), subdomain=interior) op = Operator(step) u.data[0, 5, 5] = 1.0 op.apply(time_M=0) assert u.data[1, 5, 5] == 2 assert u.data[1, 4, 5] == 11 assert u.data[1, 3, 5] == 44 assert u.data[1, 2, 5] == 4*44 assert u.data[1, 1, 5] == 4*4*44 # This point isn't updated because of the `interior` selection assert u.data[1, 0, 5] == 0 assert np.all(u.data[1, 6:, :] == 0) assert np.all(u.data[1, :, 0:5] == 0) assert np.all(u.data[1, :, 6:] == 0) @pytest.mark.parametrize('exprs,expected,', [ # Carried dependence in both /t/ and /x/ (['Eq(u[t+1, x, y], u[t+1, x-1, y] + u[t, x, y])'], 'y'), (['Eq(u[t+1, x, y], u[t+1, x-1, y] + u[t, x, y], subdomain=interior)'], 'i0y'), # Carried dependence in both /t/ and /y/ (['Eq(u[t+1, x, y], u[t+1, x, y-1] + u[t, x, y])'], 'x'), (['Eq(u[t+1, x, y], u[t+1, x, y-1] + u[t, x, y], subdomain=interior)'], 'i0x'), # Carried dependence in /y/, leading to separate /y/ loops, one # going forward, the other backward (['Eq(u[t+1, x, y], u[t+1, x, y-1] + u[t, x, y], subdomain=interior)', 'Eq(u[t+1, x, y], u[t+1, x, y+1] + u[t, x, y], subdomain=interior)'], 'i0x'), ]) def test_iteration_property_parallel(self, exprs, expected): """Tests detection of sequental and parallel Iterations when applying equations over different subdomains.""" grid = Grid(shape=(20, 20)) x, y = grid.dimensions # noqa t = grid.time_dim # noqa interior = grid.interior # noqa u = TimeFunction(name='u', grid=grid, save=10, time_order=1) # noqa # List comprehension would need explicit locals/globals mappings to eval for i, e in enumerate(list(exprs)): exprs[i] = eval(e) op = Operator(exprs, opt='noop') iterations = FindNodes(Iteration).visit(op) assert all(i.is_Sequential for i in iterations if i.dim.name != expected) assert all(i.is_Parallel for i in iterations if i.dim.name == expected) @skipif(['device']) @pytest.mark.parametrize('exprs,expected,', [ # All parallel, the innermost Iteration gets vectorized (['Eq(u[time, x, yleft], u[time, x, yleft] + 1.)'], ['yleft']), # All outers are parallel, carried dependence in `yleft`, so the middle # Iteration over `x` gets vectorized (['Eq(u[time, x, yleft], u[time, x, yleft+1] + 1.)'], ['x']), # Only the middle Iteration is parallel, so no vectorization (the Iteration # is left non-vectorised for OpenMP parallelism) (['Eq(u[time+1, x, yleft], u[time, x, yleft+1] + u[time+1, x, yleft+1])'], []) ]) def test_iteration_property_vector(self, exprs, expected): """Tests detection of vector Iterations when using subdimensions.""" grid = Grid(shape=(20, 20)) x, y = grid.dimensions # noqa time = grid.time_dim # noqa # The leftmost 10 elements yleft = SubDimension.left(name='yleft', parent=y, thickness=10) # noqa u = TimeFunction(name='u', grid=grid, save=10, time_order=0, space_order=1) # noqa # List comprehension would need explicit locals/globals mappings to eval for i, e in enumerate(list(exprs)): exprs[i] = eval(e) op = Operator(exprs, opt='simd') iterations = FindNodes(Iteration).visit(op) vectorized = [i.dim.name for i in iterations if i.is_Vectorized] assert set(vectorized) == set(expected) @pytest.mark.parametrize('opt', opts_tiling) def test_subdimmiddle_parallel(self, opt): """ Tests application of an Operator consisting of a subdimension defined over different sub-regions, explicitly created through the use of SubDimensions. """ grid = Grid(shape=(20, 20)) x, y = grid.dimensions t = grid.stepping_dim thickness = 4 u = TimeFunction(name='u', save=None, grid=grid, space_order=0, time_order=1) xi = SubDimension.middle(name='xi', parent=x, thickness_left=thickness, thickness_right=thickness) yi = SubDimension.middle(name='yi', parent=y, thickness_left=thickness, thickness_right=thickness) # a 5 point stencil that can be computed in parallel centre = Eq(u[t+1, xi, yi], u[t, xi, yi] + u[t, xi-1, yi] + u[t, xi+1, yi] + u[t, xi, yi-1] + u[t, xi, yi+1]) u.data[0, 10, 10] = 1.0 op = Operator([centre], opt=opt) print(op.ccode) iterations = FindNodes(Iteration).visit(op) assert all(i.is_Affine and i.is_Parallel for i in iterations if i.dim in [xi, yi]) op.apply(time_m=0, time_M=0) assert np.all(u.data[1, 9:12, 10] == 1.0) assert np.all(u.data[1, 10, 9:12] == 1.0) # Other than those, it should all be 0 u.data[1, 9:12, 10] = 0.0 u.data[1, 10, 9:12] = 0.0 assert np.all(u.data[1, :] == 0) def test_subdimleft_parallel(self): """ Tests application of an Operator consisting of a subdimension defined over different sub-regions, explicitly created through the use of SubDimensions. This tests that flow direction is not being automatically inferred from whether the subdimension is on the left or right boundary. """ grid = Grid(shape=(20, 20)) x, y = grid.dimensions t = grid.stepping_dim thickness = 4 u = TimeFunction(name='u', save=None, grid=grid, space_order=0, time_order=1) xl = SubDimension.left(name='xl', parent=x, thickness=thickness) yi = SubDimension.middle(name='yi', parent=y, thickness_left=thickness, thickness_right=thickness) # Can be done in parallel eq = Eq(u[t+1, xl, yi], u[t, xl, yi] + 1) op = Operator([eq]) iterations = FindNodes(Iteration).visit(op) assert all(i.is_Affine and i.is_Parallel for i in iterations if i.dim in [xl, yi]) op.apply(time_m=0, time_M=0) assert np.all(u.data[1, 0:thickness, 0:thickness] == 0) assert np.all(u.data[1, 0:thickness, -thickness:] == 0) assert np.all(u.data[1, 0:thickness, thickness:-thickness] == 1) assert np.all(u.data[1, thickness+1:, :] == 0) def test_subdimmiddle_notparallel(self): """ Tests application of an Operator consisting of a subdimension defined over different sub-regions, explicitly created through the use of SubDimensions. Different from ``test_subdimmiddle_parallel`` because an interior dimension cannot be evaluated in parallel. """ grid = Grid(shape=(20, 20)) x, y = grid.dimensions t = grid.stepping_dim thickness = 4 u = TimeFunction(name='u', save=None, grid=grid, space_order=0, time_order=1) xi = SubDimension.middle(name='xi', parent=x, thickness_left=thickness, thickness_right=thickness) yi = SubDimension.middle(name='yi', parent=y, thickness_left=thickness, thickness_right=thickness) # flow dependencies in x and y which should force serial execution # in reverse direction centre = Eq(u[t+1, xi, yi], u[t, xi, yi] + u[t+1, xi+1, yi+1]) u.data[0, 10, 10] = 1.0 op = Operator([centre]) iterations = FindNodes(Iteration).visit(op) assert all(i.is_Affine and i.is_Sequential for i in iterations if i.dim == xi) assert all(i.is_Affine and i.is_Parallel for i in iterations if i.dim == yi) op.apply(time_m=0, time_M=0) for i in range(4, 11): assert u.data[1, i, i] == 1.0 u.data[1, i, i] = 0.0 assert np.all(u.data[1, :] == 0) def test_subdimleft_notparallel(self): """ Tests application of an Operator consisting of a subdimension defined over different sub-regions, explicitly created through the use of SubDimensions. This tests that flow direction is not being automatically inferred from whether the subdimension is on the left or right boundary. """ grid = Grid(shape=(20, 20)) x, y = grid.dimensions t = grid.stepping_dim thickness = 4 u = TimeFunction(name='u', save=None, grid=grid, space_order=1, time_order=0) xl = SubDimension.left(name='xl', parent=x, thickness=thickness) yi = SubDimension.middle(name='yi', parent=y, thickness_left=thickness, thickness_right=thickness) # Flows inward (i.e. forward) rather than outward eq = Eq(u[t+1, xl, yi], u[t+1, xl-1, yi] + 1) op = Operator([eq]) iterations = FindNodes(Iteration).visit(op) assert all(i.is_Affine and i.is_Sequential for i in iterations if i.dim == xl) assert all(i.is_Affine and i.is_Parallel for i in iterations if i.dim == yi) op.apply(time_m=1, time_M=1) assert all(np.all(u.data[0, :thickness, thickness+i] == [1, 2, 3, 4]) for i in range(12)) assert np.all(u.data[0, thickness:] == 0) assert np.all(u.data[0, :, thickness+12:] == 0) def test_subdim_fd(self): """ Test that the FD shortcuts are handled correctly with SubDimensions """ grid = Grid(shape=(20, 20)) x, y = grid.dimensions u = TimeFunction(name='u', save=None, grid=grid, space_order=1, time_order=1) u.data[:] = 2. # Flows inward (i.e. forward) rather than outward eq = [Eq(u.forward, u.dx + u.dy, subdomain=grid.interior)] op = Operator(eq) op.apply(time_M=0) assert np.all(u.data[1, -1, :] == 2.) assert np.all(u.data[1, :, 0] == 2.) assert np.all(u.data[1, :, -1] == 2.) assert np.all(u.data[1, 0, :] == 2.) assert np.all(u.data[1, 1:18, 1:18] == 0.) def test_arrays_defined_over_subdims(self): """ Check code generation when an Array uses a SubDimension. """ grid = Grid(shape=(3,)) x, = grid.dimensions xi, = grid.interior.dimensions f = Function(name='f', grid=grid) a = Array(name='a', dimensions=(xi,), dtype=grid.dtype) op = Operator([Eq(a[xi], 1), Eq(f, f + a[xi + 1], subdomain=grid.interior)], openmp=False) assert len(op.parameters) == 6 # neither `x_size` nor `xi_size` are expected here assert not any(i.name in ('x_size', 'xi_size') for i in op.parameters) # Try running it -- regardless of what it will produce, this should run # ie, this checks this error isn't raised: # "ValueError: No value found for parameter xi_size" op() @pytest.mark.parametrize('opt', opts_tiling) def test_expandingbox_like(self, opt): """ Make sure SubDimensions aren't an obstacle to expanding boxes. """ grid = Grid(shape=(8, 8)) x, y = grid.dimensions u = TimeFunction(name='u', grid=grid) xi = SubDimension.middle(name='xi', parent=x, thickness_left=2, thickness_right=2) yi = SubDimension.middle(name='yi', parent=y, thickness_left=2, thickness_right=2) eqn = Eq(u.forward, u + 1) eqn = eqn.subs({x: xi, y: yi}) op = Operator(eqn, opt=opt) op.apply(time=3, x_m=2, x_M=5, y_m=2, y_M=5, xi_ltkn=0, xi_rtkn=0, yi_ltkn=0, yi_rtkn=0) assert np.all(u.data[0, 2:-2, 2:-2] == 4.) assert np.all(u.data[1, 2:-2, 2:-2] == 3.) assert np.all(u.data[:, :2] == 0.) assert np.all(u.data[:, -2:] == 0.) assert np.all(u.data[:, :, :2] == 0.) assert np.all(u.data[:, :, -2:] == 0.) class TestConditionalDimension(object): """ A collection of tests to check the correct functioning of ConditionalDimensions. """ def test_basic(self): nt = 19 grid = Grid(shape=(11, 11)) time = grid.time_dim u = TimeFunction(name='u', grid=grid) assert(grid.stepping_dim in u.indices) u2 = TimeFunction(name='u2', grid=grid, save=nt) assert(time in u2.indices) factor = 4 time_subsampled = ConditionalDimension('t_sub', parent=time, factor=factor) usave = TimeFunction(name='usave', grid=grid, save=(nt+factor-1)//factor, time_dim=time_subsampled) assert(time_subsampled in usave.indices) eqns = [Eq(u.forward, u + 1.), Eq(u2.forward, u2 + 1.), Eq(usave, u)] op = Operator(eqns) op.apply(t_M=nt-2) assert np.all(np.allclose(u.data[(nt-1) % 3], nt-1)) assert np.all([np.allclose(u2.data[i], i) for i in range(nt)]) assert np.all([np.allclose(usave.data[i], i*factor) for i in range((nt+factor-1)//factor)]) def test_basic_shuffles(self): """ Like ``test_basic``, but with different equation orderings. Nevertheless, we assert against the same exact values as in ``test_basic``, since we save `u`, not `u.forward`. """ nt = 19 grid = Grid(shape=(11, 11)) time = grid.time_dim u = TimeFunction(name='u', grid=grid) u2 = TimeFunction(name='u2', grid=grid, save=nt) factor = 4 time_subsampled = ConditionalDimension('t_sub', parent=time, factor=factor) usave = TimeFunction(name='usave', grid=grid, save=(nt+factor-1)//factor, time_dim=time_subsampled) # Shuffle 1 eqns = [Eq(usave, u), Eq(u.forward, u + 1.), Eq(u2.forward, u2 + 1.)] op = Operator(eqns) op.apply(t_M=nt-2) assert np.all(np.allclose(u.data[(nt-1) % 3], nt-1)) assert np.all([np.allclose(u2.data[i], i) for i in range(nt)]) assert np.all([np.allclose(usave.data[i], i*factor) for i in range((nt+factor-1)//factor)]) # Shuffle 2 usave.data[:] = 0. u.data[:] = 0. u2.data[:] = 0. eqns = [Eq(u.forward, u + 1.), Eq(usave, u), Eq(u2.forward, u2 + 1.)] op = Operator(eqns) op.apply(t_M=nt-2) assert np.all(np.allclose(u.data[(nt-1) % 3], nt-1)) assert np.all([np.allclose(u2.data[i], i) for i in range(nt)]) assert np.all([np.allclose(usave.data[i], i*factor) for i in range((nt+factor-1)//factor)]) @pytest.mark.parametrize('opt', opts_tiling) def test_spacial_subsampling(self, opt): """ Test conditional dimension for the spatial ones. This test saves u every two grid points : u2[x, y] = u[2*x, 2*y] """ nt = 19 grid = Grid(shape=(11, 11)) time = grid.time_dim u = TimeFunction(name='u', grid=grid, save=nt) assert(grid.time_dim in u.indices) # Creates subsampled spatial dimensions and accordine grid dims = tuple([ConditionalDimension(d.name+'sub', parent=d, factor=2) for d in u.grid.dimensions]) grid2 = Grid((6, 6), dimensions=dims, time_dimension=time) u2 = TimeFunction(name='u2', grid=grid2, save=nt) assert(time in u2.indices) eqns = [Eq(u.forward, u + 1.), Eq(u2, u)] op = Operator(eqns, opt=opt) op.apply(time_M=nt-2) # Verify that u2[x,y]= u[2*x, 2*y] assert np.allclose(u.data[:-1, 0::2, 0::2], u2.data[:-1, :, :]) def test_time_subsampling_fd(self): nt = 19 grid = Grid(shape=(11, 11)) x, y = grid.dimensions time = grid.time_dim factor = 4 time_subsampled = ConditionalDimension('t_sub', parent=time, factor=factor) usave = TimeFunction(name='usave', grid=grid, save=(nt+factor-1)//factor, time_dim=time_subsampled, time_order=2) dx2 = [indexify(i) for i in retrieve_functions(usave.dt2.evaluate)] assert dx2 == [usave[time_subsampled - 1, x, y], usave[time_subsampled + 1, x, y], usave[time_subsampled, x, y]] def test_issue_1592(self): grid = Grid(shape=(11, 11)) time = grid.time_dim time_sub = ConditionalDimension('t_sub', parent=time, factor=2) v = TimeFunction(name="v", grid=grid, space_order=4, time_dim=time_sub, save=5) w = Function(name="w", grid=grid, space_order=4) Operator(Eq(w, v.dx))(time=6) op = Operator(Eq(v.forward, v.dx)) op.apply(time=6) exprs = FindNodes(Expression).visit(op) assert exprs[-1].expr.lhs.indices[0] == IntDiv(time, 2) + 1 def test_subsampled_fd(self): """ Test that the FD shortcuts are handled correctly with ConditionalDimensions """ grid = Grid(shape=(11, 11)) time = grid.time_dim # Creates subsampled spatial dimensions and accordine grid dims = tuple([ConditionalDimension(d.name+'sub', parent=d, factor=2) for d in grid.dimensions]) grid2 = Grid((6, 6), dimensions=dims, time_dimension=time) u2 = TimeFunction(name='u2', grid=grid2, space_order=2, time_order=1) u2.data.fill(2.) eqns = [Eq(u2.forward, u2.dx + u2.dy)] op = Operator(eqns) op.apply(time_M=0, x_M=11, y_M=11) # Verify that u2 contains subsampled fd values assert np.all(u2.data[0, :, :] == 2.) assert np.all(u2.data[1, 0, 0] == 0.) assert np.all(u2.data[1, -1, -1] == -20.) assert np.all(u2.data[1, 0, -1] == -10.) assert np.all(u2.data[1, -1, 0] == -10.) assert np.all(u2.data[1, 1:-1, 0] == 0.) assert np.all(u2.data[1, 0, 1:-1] == 0.) assert np.all(u2.data[1, 1:-1, -1] == -10.) assert np.all(u2.data[1, -1, 1:-1] == -10.) assert np.all(u2.data[1, 1:4, 1:4] == 0.) # This test generates an openmp loop form which makes older gccs upset @switchconfig(openmp=False) def test_nothing_in_negative(self): """Test the case where when the condition is false, there is nothing to do.""" nt = 4 grid = Grid(shape=(11, 11)) time = grid.time_dim u = TimeFunction(name='u', save=nt, grid=grid) assert(grid.time_dim in u.indices) factor = 4 time_subsampled = ConditionalDimension('t_sub', parent=time, factor=factor) usave = TimeFunction(name='usave', grid=grid, save=(nt+factor-1)//factor, time_dim=time_subsampled) assert(time_subsampled in usave.indices) eqns = [Eq(usave, u)] op = Operator(eqns) u.data[:] = 1.0 usave.data[:] = 0.0 op.apply(time_m=1, time_M=1) assert np.allclose(usave.data, 0.0) op.apply(time_m=0, time_M=0) assert np.allclose(usave.data, 1.0) def test_laplace(self): grid = Grid(shape=(20, 20, 20)) x, y, z = grid.dimensions time = grid.time_dim t = grid.stepping_dim tsave = ConditionalDimension(name='tsave', parent=time, factor=2) u = TimeFunction(name='u', grid=grid, save=None, time_order=2) usave = TimeFunction(name='usave', grid=grid, time_dim=tsave, time_order=0, space_order=0) steps = [] # save of snapshot steps.append(Eq(usave, u)) # standard laplace-like thing steps.append(Eq(u[t+1, x, y, z], u[t, x, y, z] - u[t-1, x, y, z] + u[t, x-1, y, z] + u[t, x+1, y, z] + u[t, x, y-1, z] + u[t, x, y+1, z] + u[t, x, y, z-1] + u[t, x, y, z+1])) op = Operator(steps) u.data[:] = 0.0 u.data[0, 10, 10, 10] = 1.0 op.apply(time_m=0, time_M=0) assert np.sum(u.data[0, :, :, :]) == 1.0 assert np.sum(u.data[1, :, :, :]) == 7.0 assert np.all(usave.data[0, :, :, :] == u.data[0, :, :, :]) def test_as_expr(self): nt = 19 grid = Grid(shape=(11, 11)) time = grid.time_dim u = TimeFunction(name='u', grid=grid) assert(grid.stepping_dim in u.indices) u2 = TimeFunction(name='u2', grid=grid, save=nt) assert(time in u2.indices) factor = 4 time_subsampled = ConditionalDimension('t_sub', parent=time, factor=factor) usave = TimeFunction(name='usave', grid=grid, save=(nt+factor-1)//factor, time_dim=time_subsampled) assert(time_subsampled in usave.indices) eqns = [Eq(u.forward, u + 1.), Eq(u2.forward, u2 + 1.), Eq(usave, time_subsampled * u)] op = Operator(eqns) op.apply(t=nt-2) assert np.all(np.allclose(u.data[(nt-1) % 3], nt-1)) assert np.all([np.allclose(u2.data[i], i) for i in range(nt)]) assert np.all([np.allclose(usave.data[i], i*factor*i) for i in range((nt+factor-1)//factor)]) def test_shifted(self): nt = 19 grid = Grid(shape=(11, 11)) time = grid.time_dim u = TimeFunction(name='u', grid=grid) assert(grid.stepping_dim in u.indices) u2 = TimeFunction(name='u2', grid=grid, save=nt) assert(time in u2.indices) factor = 4 time_subsampled = ConditionalDimension('t_sub', parent=time, factor=factor) usave = TimeFunction(name='usave', grid=grid, save=2, time_dim=time_subsampled) assert(time_subsampled in usave.indices) t_sub_shift = Constant(name='t_sub_shift', dtype=np.int32) eqns = [Eq(u.forward, u + 1.), Eq(u2.forward, u2 + 1.), Eq(usave.subs(time_subsampled, time_subsampled - t_sub_shift), u)] op = Operator(eqns) # Starting at time_m=10, so time_subsampled - t_sub_shift is in range op.apply(time_m=10, time_M=nt-2, t_sub_shift=3) assert np.all(np.allclose(u.data[0], 8)) assert np.all([np.allclose(u2.data[i], i - 10) for i in range(10, nt)]) assert np.all([np.allclose(usave.data[i], 2+i*factor) for i in range(2)]) def test_no_index(self): """Test behaviour when the ConditionalDimension is used as a symbol in an expression.""" nt = 19 grid = Grid(shape=(11, 11)) time = grid.time_dim u = TimeFunction(name='u', grid=grid) assert(grid.stepping_dim in u.indices) v = Function(name='v', grid=grid) factor = 4 time_subsampled = ConditionalDimension('t_sub', parent=time, factor=factor) eqns = [Eq(u.forward, u + 1), Eq(v, v + u*u*time_subsampled)] op = Operator(eqns) op.apply(t_M=nt-2) assert np.all(np.allclose(u.data[(nt-1) % 3], nt-1)) # expected result is 1024 # v = u[0]**2 * 0 + u[4]**2 * 1 + u[8]**2 * 2 + u[12]**2 * 3 + u[16]**2 * 4 # with u[t] = t # v = 16 * 1 + 64 * 2 + 144 * 3 + 256 * 4 = 1600 assert np.all(np.allclose(v.data, 1600)) def test_no_index_sparse(self): """Test behaviour when the ConditionalDimension is used as a symbol in an expression over sparse data objects.""" grid = Grid(shape=(4, 4), extent=(3.0, 3.0)) time = grid.time_dim f = TimeFunction(name='f', grid=grid, save=1) f.data[:] = 0. coordinates = [(0.5, 0.5), (0.5, 2.5), (2.5, 0.5), (2.5, 2.5)] sf = SparseFunction(name='sf', grid=grid, npoint=4, coordinates=coordinates) sf.data[:] = 1. sd = sf.dimensions[sf._sparse_position] # We want to write to `f` through `sf` so that we obtain the # following 4x4 grid (the '*' show the position of the sparse points) # We do that by emulating an injection # # 0 --- 0 --- 0 --- 0 # | * | | * | # 0 --- 1 --- 1 --- 0 # | | | | # 0 --- 1 --- 1 --- 0 # | * | | * | # 0 --- 0 --- 0 --- 0 radius = 1 indices = [(i, i+radius) for i in sf._coordinate_indices] bounds = [i.symbolic_size - radius for i in grid.dimensions] eqs = [] for e, i in enumerate(product(*indices)): args = [j > 0 for j in i] args.extend([j < k for j, k in zip(i, bounds)]) condition = And(*args, evaluate=False) cd = ConditionalDimension('sfc%d' % e, parent=sd, condition=condition) index = [time] + list(i) eqs.append(Eq(f[index], f[index] + sf[cd])) op = Operator(eqs) op.apply(time=0) assert np.all(f.data[0, 1:-1, 1:-1] == 1.) assert np.all(f.data[0, 0] == 0.) assert np.all(f.data[0, -1] == 0.) assert np.all(f.data[0, :, 0] == 0.) assert np.all(f.data[0, :, -1] == 0.) def test_symbolic_factor(self): """ Test ConditionalDimension with symbolic factor (provided as a Constant). """ g = Grid(shape=(4, 4, 4)) u = TimeFunction(name='u', grid=g, time_order=0) fact = Constant(name='fact', dtype=np.int32, value=4) tsub = ConditionalDimension(name='tsub', parent=g.time_dim, factor=fact) usave = TimeFunction(name='usave', grid=g, time_dim=tsub, save=4) op = Operator([Eq(u, u + 1), Eq(usave, u)]) op.apply(time=7) # Use `fact`'s default value, 4 assert np.all(usave.data[0] == 1) assert np.all(usave.data[1] == 5) u.data[:] = 0. op.apply(time=7, fact=2) assert np.all(usave.data[0] == 1) assert np.all(usave.data[1] == 3) assert np.all(usave.data[2] == 5) assert np.all(usave.data[3] == 7) def test_implicit_dims(self): """ Test ConditionalDimension as an implicit dimension for an equation. """ # This test makes an Operator that should create a vector of increasing # integers, but stop incrementing when a certain stop value is reached shape = (50,) stop_value = 20 time = Dimension(name='time') f = TimeFunction(name='f', shape=shape, dimensions=[time]) # The condition to stop incrementing cond = ConditionalDimension(name='cond', parent=time, condition=f[time] < stop_value) eqs = [Eq(f.forward, f), Eq(f.forward, f.forward + 1, implicit_dims=[cond])] op = Operator(eqs) op.apply(time_M=shape[0] - 2) # Make the same calculation in python to assert the result F = np.zeros(shape[0]) for i in range(shape[0]): F[i] = i if i < stop_value else stop_value assert np.all(f.data == F) def test_grouping(self): """ Test that Clusters over the same set of ConditionalDimensions fall within the same Conditional. This is a follow up to issue #1610. """ grid = Grid(shape=(10, 10)) time = grid.time_dim cond = ConditionalDimension(name='cond', parent=time, condition=time < 5) u = TimeFunction(name='u', grid=grid, space_order=4) # We use a SubDomain only to keep the two Eqs separated eqns = [Eq(u.forward, u + 1, subdomain=grid.interior), Eq(u.forward, u.dx.dx + 1., implicit_dims=[cond])] op = Operator(eqns, opt=('advanced-fsg', {'cire-mincost-sops': 1})) conds = FindNodes(Conditional).visit(op) assert len(conds) == 1 assert len(retrieve_iteration_tree(conds[0].then_body)) == 2 def test_stepping_dim_in_condition_lowering(self): """ Check that the compiler performs lowering on conditions with TimeDimensions and generates the expected code:: if (g[t][x + 1][y + 1] <= 10){ if (g[t0][x + 1][y + 1] <= 10){ ... --> ... } } This test increments a function by one at every timestep until it is less-or-equal to 10 (g<=10) while although operator runs for 13 timesteps. """ grid = Grid(shape=(4, 4)) _, y = grid.dimensions ths = 10 g = TimeFunction(name='g', grid=grid) ci = ConditionalDimension(name='ci', parent=y, condition=Le(g, ths)) op = Operator(Eq(g.forward, g + 1, implicit_dims=ci)) op.apply(time_M=ths+3) assert np.all(g.data[0, :, :] == ths) assert np.all(g.data[1, :, :] == ths + 1) assert 'if (g[t0][x + 1][y + 1] <= 10)\n' '{\n g[t1][x + 1][y + 1] = g[t0][x + 1][y + 1] + 1' in str(op.ccode) def test_expr_like_lowering(self): """ Test the lowering of an expr-like ConditionalDimension's condition. This test makes an Operator that should indexify and lower the condition passed in the Conditional Dimension """ grid = Grid(shape=(3, 3)) g1 = Function(name='g1', grid=grid) g2 = Function(name='g2', grid=grid) g1.data[:] = 0.49 g2.data[:] = 0.49 x, y = grid.dimensions ci = ConditionalDimension(name='ci', parent=y, condition=Le((g1 + g2), 1.01*(g1 + g2))) f = Function(name='f', shape=grid.shape, dimensions=(x, ci)) Operator(Eq(f, g1+g2)).apply() assert np.all(f.data[:] == g1.data[:] + g2.data[:]) @pytest.mark.parametrize('setup_rel, rhs, c1, c2, c3, c4', [ # Relation, RHS, c1 to c4 used as indexes in assert (Lt, 3, 2, 4, 4, -1), (Le, 2, 2, 4, 4, -1), (Ge, 3, 4, 6, 1, 4), (Gt, 2, 4, 6, 1, 4), (Ne, 5, 2, 6, 1, 2) ]) def test_relational_classes(self, setup_rel, rhs, c1, c2, c3, c4): """ Test ConditionalDimension using conditions based on Relations over SubDomains. """ class InnerDomain(SubDomain): name = 'inner' def define(self, dimensions): return {d: ('middle', 2, 2) for d in dimensions} inner_domain = InnerDomain() grid = Grid(shape=(8, 8), subdomains=(inner_domain,)) g = Function(name='g', grid=grid) g2 = Function(name='g2', grid=grid) for i in [g, g2]: i.data[:4, :4] = 1 i.data[4:, :4] = 2 i.data[4:, 4:] = 3 i.data[:4, 4:] = 4 xi, yi = grid.subdomains['inner'].dimensions cond = setup_rel(0.25*g + 0.75*g2, rhs, subdomain=grid.subdomains['inner']) ci = ConditionalDimension(name='ci', parent=yi, condition=cond) f = Function(name='f', shape=grid.shape, dimensions=(xi, ci)) eq1 = Eq(f, 0.4*g + 0.6*g2) eq2 = Eq(f, 5) Operator([eq1, eq2]).apply() assert np.all(f.data[2:6, c1:c2] == 5.) assert np.all(f.data[:, c3:c4] < 5.) def test_from_cond_to_param(self): """ Test that Functions appearing in the condition of a ConditionalDimension but not explicitly in an Eq are actually part of the Operator input (stems from issue #1298). """ grid = Grid(shape=(8, 8)) x, y = grid.dimensions g = Function(name='g', grid=grid) h = Function(name='h', grid=grid) ci = ConditionalDimension(name='ci', parent=y, condition=Lt(g, 2 + h)) f = Function(name='f', shape=grid.shape, dimensions=(x, ci)) for _ in range(5): # issue #1298 was non deterministic Operator(Eq(f, 5)).apply() @skipif('device') def test_no_fusion_simple(self): """ If ConditionalDimensions are present, then Clusters must not be fused so that ultimately Eqs get scheduled to different loop nests. """ grid = Grid(shape=(4, 4, 4)) time = grid.time_dim f = TimeFunction(name='f', grid=grid) g = Function(name='g', grid=grid) h = Function(name='h', grid=grid) # No ConditionalDimensions yet. Will be fused and optimized eqns = [Eq(f.forward, f + 1), Eq(h, f + 1), Eq(g, f + 1)] op = Operator(eqns) exprs = FindNodes(Expression).visit(op._func_table['bf0'].root) assert len(exprs) == 4 assert exprs[1].expr.rhs is exprs[0].output assert exprs[2].expr.rhs is exprs[0].output assert exprs[3].expr.rhs is exprs[0].output # Now with a ConditionalDimension. No fusion, no optimization ctime = ConditionalDimension(name='ctime', parent=time, condition=time > 4) eqns = [Eq(f.forward, f + 1), Eq(h, f + 1), Eq(g, f + 1, implicit_dims=[ctime])] op = Operator(eqns) exprs = FindNodes(Expression).visit(op._func_table['bf0'].root) assert len(exprs) == 3 assert exprs[1].expr.rhs is exprs[0].output assert exprs[2].expr.rhs is exprs[0].output exprs = FindNodes(Expression).visit(op._func_table['bf1'].root) assert len(exprs) == 1 @skipif('device') def test_no_fusion_convoluted(self): """ Conceptually like `test_no_fusion_simple`, but with more expressions and non-trivial data flow. """ grid = Grid(shape=(4, 4, 4)) time = grid.time_dim f = TimeFunction(name='f', grid=grid) g = Function(name='g', grid=grid) h = Function(name='h', grid=grid) ctime = ConditionalDimension(name='ctime', parent=time, condition=time > 4) eqns = [Eq(f.forward, f + 1), Eq(h, f + 1), Eq(g, f + 1, implicit_dims=[ctime]), Eq(f.forward, f + 1, implicit_dims=[ctime]), Eq(f.forward, f + 1), Eq(g, f + 1)] op = Operator(eqns) exprs = FindNodes(Expression).visit(op._func_table['bf0'].root) assert len(exprs) == 3 assert exprs[1].expr.rhs is exprs[0].output assert exprs[2].expr.rhs is exprs[0].output exprs = FindNodes(Expression).visit(op._func_table['bf1'].root) assert len(exprs) == 3 exprs = FindNodes(Expression).visit(op._func_table['bf2'].root) assert len(exprs) == 3 assert exprs[1].expr.rhs is exprs[0].output assert exprs[2].expr.rhs is exprs[0].output def test_affiness(self): """ Test for issue #1616. """ nt = 19 grid = Grid(shape=(11, 11)) time = grid.time_dim factor = 4 time_subsampled = ConditionalDimension('t_sub', parent=time, factor=factor) u = TimeFunction(name='u', grid=grid) usave = TimeFunction(name='usave', grid=grid, save=(nt+factor-1)//factor, time_dim=time_subsampled) eqns = [Eq(u.forward, u + 1.), Eq(usave, u)] op = Operator(eqns) iterations = [i for i in FindNodes(Iteration).visit(op) if i.dim is not time] assert all(i.is_Affine for i in iterations) class TestMashup(object): """ Check the correct functioning of the compiler in presence of many Dimension types. """ def test_topofusion_w_subdims_conddims(self): """ Check that topological fusion works across guarded Clusters over different iteration spaces and in presence of anti-dependences. This test uses both SubDimensions (via SubDomains) and ConditionalDimensions. """ grid = Grid(shape=(4, 4, 4)) time = grid.time_dim f = TimeFunction(name='f', grid=grid, time_order=2) g = TimeFunction(name='g', grid=grid, time_order=2) h = TimeFunction(name='h', grid=grid, time_order=2) fsave = TimeFunction(name='fsave', grid=grid, time_order=2, save=5) gsave = TimeFunction(name='gsave', grid=grid, time_order=2, save=5) ctime = ConditionalDimension(name='ctime', parent=time, condition=time > 4) eqns = [Eq(f.forward, f + 1), Eq(g.forward, g + 1), Eq(fsave, f.dt2, implicit_dims=[ctime]), Eq(h, f + g, subdomain=grid.interior), Eq(gsave, g.dt2, implicit_dims=[ctime])] op = Operator(eqns) # Check generated code -- expect the gsave equation to be scheduled together # in the same loop nest with the fsave equation assert len(op._func_table) == 3 exprs = FindNodes(Expression).visit(op._func_table['bf0'].root) assert len(exprs) == 2 assert exprs[0].write is f assert exprs[1].write is g exprs = FindNodes(Expression).visit(op._func_table['bf1'].root) assert len(exprs) == 3 assert exprs[1].write is fsave assert exprs[2].write is gsave exprs = FindNodes(Expression).visit(op._func_table['bf2'].root) assert len(exprs) == 1 assert exprs[0].write is h def test_topofusion_w_subdims_conddims_v2(self): """ Like `test_topofusion_w_subdims_conddims` but with more SubDomains, so we expect fewer loop nests. """ grid = Grid(shape=(4, 4, 4)) time = grid.time_dim f = TimeFunction(name='f', grid=grid, time_order=2) g = TimeFunction(name='g', grid=grid, time_order=2) h = TimeFunction(name='h', grid=grid, time_order=2) fsave = TimeFunction(name='fsave', grid=grid, time_order=2, save=5) gsave = TimeFunction(name='gsave', grid=grid, time_order=2, save=5) ctime = ConditionalDimension(name='ctime', parent=time, condition=time > 4) eqns = [Eq(f.forward, f + 1, subdomain=grid.interior), Eq(g.forward, g + 1, subdomain=grid.interior), Eq(fsave, f.dt2, implicit_dims=[ctime]), Eq(h, f + g, subdomain=grid.interior), Eq(gsave, g.dt2, implicit_dims=[ctime])] op = Operator(eqns) # Check generated code -- expect the gsave equation to be scheduled together # in the same loop nest with the fsave equation assert len(op._func_table) == 2 assert len(FindNodes(Expression).visit(op._func_table['bf0'].root)) == 3 assert len(FindNodes(Expression).visit(op._func_table['bf1'].root)) == 2 + 1 # r0 def test_topofusion_w_subdims_conddims_v3(self): """ Like `test_topofusion_w_subdims_conddims_v2` but with an extra anti-dependence, which causes scheduling over more loop nests. """ grid = Grid(shape=(4, 4, 4)) time = grid.time_dim f = TimeFunction(name='f', grid=grid, time_order=2) g = TimeFunction(name='g', grid=grid, time_order=2) h = TimeFunction(name='h', grid=grid, time_order=2) fsave = TimeFunction(name='fsave', grid=grid, time_order=2, save=5) gsave = TimeFunction(name='gsave', grid=grid, time_order=2, save=5) ctime = ConditionalDimension(name='ctime', parent=time, condition=time > 4) eqns = [Eq(f.forward, f + 1, subdomain=grid.interior), Eq(g.forward, g + 1, subdomain=grid.interior), Eq(fsave, f.dt2, implicit_dims=[ctime]), Eq(h, f.dt2.dx + g, subdomain=grid.interior), Eq(gsave, g.dt2, implicit_dims=[ctime])] op = Operator(eqns) # Check generated code -- expect the gsave equation to be scheduled together # in the same loop nest with the fsave equation assert len(op._func_table) == 3 exprs = FindNodes(Expression).visit(op._func_table['bf0'].root) assert len(exprs) == 2 assert exprs[0].write is f assert exprs[1].write is g exprs = FindNodes(Expression).visit(op._func_table['bf1'].root) assert len(exprs) == 3 assert exprs[1].write is fsave assert exprs[2].write is gsave exprs = FindNodes(Expression).visit(op._func_table['bf2'].root) assert len(exprs) == 2 assert exprs[1].write is h
Java
App.SubPhotoInstance = DS.Model.extend({ width: DS.attr('number'), height: DS.attr('number'), url: DS.attr('string'), type: 'sub_photo_instance' });
Java
require "sendgrid-parse/version" require "sendgrid-parse/encodable_hash"
Java
"""Kytos SDN Platform.""" from pkgutil import extend_path __path__ = extend_path(__path__, __name__)
Java
finApp.directive('brief', function () { return { restrict: 'E', templateUrl: 'views/directives/brief.html', controller: 'BriefController', controllerAs: 'bfc' }; });
Java
// // XCPreferenceController.h // XCRegex // // Created by alexiuce  on 2017/6/22. // Copyright © 2017年 zhidier. All rights reserved. // #import <Cocoa/Cocoa.h> @interface XCPreferenceController : NSWindowController @end
Java
using OpenTK; using OpenTK.Graphics.OpenGL; namespace p_1 { class Spritebatch { public static void DrawSprite(Texture2D texture, RectangleF rectangle) { DrawSprite(texture, new Vector2(rectangle.X, rectangle.Y), new Vector2(rectangle.Width / texture.Width, rectangle.Height / texture.Height), Color.White, Vector2.Zero); } public static void DrawSprite(Texture2D texture, RectangleF rectangle, Color color, RectangleF? sourceRec = null) { DrawSprite(texture, new Vector2(rectangle.X, rectangle.Y), new Vector2(rectangle.Width / texture.Width, rectangle.Height / texture.Height), color, Vector2.Zero, sourceRec); } public static void DrawSprite(Texture2D texture, Vector2 position) { DrawSprite(texture, position, Vector2.One, Color.White, Vector2.Zero); } public static void DrawSprite(Texture2D texture, Vector2 position, Vector2 scale) { DrawSprite(texture, position, scale, Color.White, Vector2.Zero); } public static void DrawSprite(Texture2D texture, Vector2 position, Vector2 scale, Color color) { DrawSprite(texture, position, scale, color, Vector2.Zero); } public static void DrawSprite(Texture2D texture, Vector2 position, Vector2 scale, Color color, Vector2 origin, RectangleF? sourceRec = null) { Vector2[] verts = new Vector2[4] { new Vector2(0, 0), new Vector2(1, 0), new Vector2(1, 1), new Vector2(0, 1), }; GL.BindTexture(TextureTarget.Texture2D, texture.ID); GL.Begin(PrimitiveType.Quads); for (int i = 0; i < 4; i++) { GL.Color3(color); if (sourceRec == null) { GL.TexCoord2(verts[i].X, verts[i].Y); } else { GL.TexCoord2( (sourceRec.Value.X + verts[i].X * sourceRec.Value.Width) / (float)texture.Width, (sourceRec.Value.Y + verts[i].Y * sourceRec.Value.Height) / (float)texture.Height); } verts[i].X *= texture.Width; verts[i].Y *= texture.Height; verts[i] -= origin; verts[i] *= scale; verts[i] += position; GL.Vertex2(verts[i]); } GL.End(); } public static void Begin(GameWindow window) { GL.MatrixMode(MatrixMode.Projection); GL.LoadIdentity(); GL.Ortho(-window.ClientSize.Width / 2f, window.ClientSize.Width / 2f, window.ClientSize.Height / 2f, -window.ClientSize.Height / 2f, 0, 1); } } }
Java
describe("grid-columns", function() { function createSuite(buffered) { describe(buffered ? "with buffered rendering" : "without buffered rendering", function() { var defaultColNum = 4, totalWidth = 1000, grid, view, colRef, store, column; function spyOnEvent(object, eventName, fn) { var obj = { fn: fn || Ext.emptyFn }, spy = spyOn(obj, "fn"); object.addListener(eventName, obj.fn); return spy; } function makeGrid(numCols, gridCfg, hiddenFn, lockedFn){ var cols, col, i; gridCfg = gridCfg || {}; colRef = []; if (!numCols || typeof numCols === 'number') { cols = []; numCols = numCols || defaultColNum; for (i = 0; i < numCols; ++i) { col = { itemId: 'col' + i, text: 'Col' + i, dataIndex: 'field' + i }; if (hiddenFn && hiddenFn(i)) { col.hidden = true; } if (lockedFn && lockedFn(i)) { col.locked = true; } col = new Ext.grid.column.Column(col); cols.push(col); } } else { cols = numCols; } store = new Ext.data.Store({ model: spec.TestModel, data: [{ field0: 'val1', field1: 'val2', field2: 'val3', field3: 'val4', field4: 'val5' }] }); grid = new Ext.grid.Panel(Ext.apply({ renderTo: Ext.getBody(), columns: cols, width: totalWidth, height: 500, border: false, store: store, bufferedRenderer: buffered, viewConfig: { mouseOverOutBuffer: 0 } }, gridCfg)); view = grid.view; colRef = grid.getColumnManager().getColumns(); } function getCell(rowIdx, colIdx) { return grid.getView().getCellInclusive({ row: rowIdx, column: colIdx }); } function getCellText(rowIdx, colIdx) { return getCellInner(rowIdx, colIdx).innerHTML; } function getCellInner(rowIdx, colIdx) { var cell = getCell(rowIdx, colIdx); return Ext.fly(cell).down(grid.getView().innerSelector).dom; } function hasCls(el, cls) { return Ext.fly(el).hasCls(cls); } function clickHeader(col) { // Offset so we're not on the edges to trigger a drag jasmine.fireMouseEvent(col.titleEl, 'click', 10); } function resizeColumn(column, by) { var colBox = column.el.getBox(), fromMx = colBox.x + colBox.width - 2, fromMy = colBox.y + colBox.height / 2, dragThresh = by > 0 ? Ext.dd.DragDropManager.clickPixelThresh + 1 : -Ext.dd.DragDropManager.clickPixelThresh - 1; // Mousedown on the header to drag jasmine.fireMouseEvent(column.el.dom, 'mouseover', fromMx, fromMy); jasmine.fireMouseEvent(column.el.dom, 'mousemove', fromMx, fromMy); jasmine.fireMouseEvent(column.el.dom, 'mousedown', fromMx, fromMy); // The initial move which tiggers the start of the drag jasmine.fireMouseEvent(column.el.dom, 'mousemove', fromMx + dragThresh, fromMy); // Move to resize jasmine.fireMouseEvent(column.el.dom, 'mousemove', fromMx + by + 2, fromMy); jasmine.fireMouseEvent(column.el.dom, 'mouseup', fromMx + by + 2, fromMy); } function setup() { Ext.define('spec.TestModel', { extend: 'Ext.data.Model', fields: ['field0', 'field1', 'field2', 'field3', 'field4'] }); } function tearDown() { Ext.destroy(grid, store, column); grid = view = store = colRef = column = null; Ext.undefine('spec.TestModel'); Ext.data.Model.schema.clear(); } beforeEach(setup); afterEach(tearDown); // https://sencha.jira.com/browse/EXTJS-19950 describe('force fit columns, shrinking width to where flexes tend to zero', function() { it('should work', function() { makeGrid([{ text : 'Col1', dataIndex : 'foo', flex : 1 }, { text : 'Col2', columns : [{ text : 'Col21', dataIndex : 'foo2', width: 140 }, { text : 'Col22', dataIndex : 'foo4', width : 160 }, { text : 'Col23', dataIndex : 'foo4', width : 100 }, { text : 'Col34', dataIndex : 'foo4', width : 85 }] }, { text : 'Col3', dataIndex : 'foo3', width : 110 }, { text : 'Col4', columns : [ { text : 'Col41', dataIndex : 'foo2', flex: 1 }, { text : 'Col42', dataIndex : 'foo4', width : 120 }] }], { autoScroll: true, forceFit: true, width: 1800 }); expect(function() { grid.setWidth(700); }).not.toThrow(); }); }); describe('as containers', function () { var leafCls = 'x-leaf-column-header', col; afterEach(function () { col = null; }); describe('group headers', function () { beforeEach(function () { makeGrid([{ itemId: 'main1', columns: [{ itemId: 'child1' }, { itemId: 'child2' }, { itemId: 'child3' }] }]); col = grid.down('#main1'); }); it('should be stamped as a container', function () { expect(col.isContainer).toBe(true); }); it('should not give the titleEl the leaf column class', function () { expect(col.titleEl.hasCls(leafCls)).toBe(false); }); }); describe('contains child items', function () { beforeEach(function () { makeGrid([{ text: 'Foo', dataIndex: 'field0', items: [{ xtype: 'textfield', itemId: 'foo' }] }]); col = grid.visibleColumnManager.getHeaderByDataIndex('field0'); }); it('should be stamped as a container', function () { expect(col.isContainer).toBe(true); }); it('should not give the titleEl the leaf column class', function () { expect(col.titleEl.hasCls(leafCls)).toBe(false); }); describe('focusing', function () { // See EXTJS-15757. it('should not throw when focusing', function () { expect(function () { grid.down('#foo').onFocus(); }).not.toThrow(); }); it('should return the items collection', function () { var col = grid.visibleColumnManager.getHeaderByDataIndex('field0'); expect(col.getFocusables()).toBe(col.items.items); }); }); }); }); describe("cell sizing", function() { it("should size the cells to match fixed header sizes", function() { makeGrid([{ width: 200 }, { width: 500 }]); expect(getCell(0, 0).getWidth()).toBe(200); expect(getCell(0, 1).getWidth()).toBe(500); }); it("should size the cells to match flex header sizes", function() { makeGrid([{ flex: 8 }, { flex: 2 }]); expect(getCell(0, 0).getWidth()).toBe(800); expect(getCell(0, 1).getWidth()).toBe(200); }); it("should size the cells to match an the text size in the header", function() { makeGrid([{ width: null, text: '<div style="width: 25px;"></div>' }, { width: null, text: '<div style="width: 75px;"></div>' }]); expect(getCell(0, 0).getWidth()).toBe(colRef[0].titleEl.getWidth() + colRef[0].el.getBorderWidth('lr')); expect(getCell(0, 1).getWidth()).toBe(colRef[1].titleEl.getWidth() + colRef[1].el.getBorderWidth('lr')); }); }); describe("initializing", function() { describe("normal", function() { it("should accept a column array", function() { makeGrid([{ text: 'Foo', dataIndex: 'field0' }]); expect(grid.getColumnManager().getHeaderAtIndex(0).text).toBe('Foo'); }); it("should accept a header config", function() { makeGrid({ margin: 5, items: [{ text: 'Foo', dataIndex: 'field0' }] }); expect(grid.getColumnManager().getHeaderAtIndex(0).text).toBe('Foo'); expect(grid.headerCt.margin).toBe(5); }); }); describe("locking", function() { it("should accept a column array, enabling locking if a column is configured with locked: true", function() { makeGrid([{ text: 'Foo', dataIndex: 'field0', locked: true }, { text: 'Bar', dataIndex: 'field1' }]); expect(grid.lockable).toBe(true); }); it("should accept a header config, enabling locking if any column is configured with locked: true", function() { makeGrid({ items: [{ text: 'Foo', dataIndex: 'field0', locked: true }, { text: 'Bar', dataIndex: 'field1' }] }); expect(grid.lockable).toBe(true); // Top level grid should return columns from both sides expect(grid.getVisibleColumns().length).toBe(2); expect(grid.getColumns().length).toBe(2); }); }); }); describe("column manager", function() { // Get all columns from the grid ref function ga() { return grid.getColumnManager().getColumns(); } // Get all manager function gam() { return grid.getColumnManager(); } // Get all visible columns from the grid ref function gv() { return grid.getVisibleColumnManager().getColumns(); } // Get visible manager function gvm() { return grid.getVisibleColumnManager(); } it("should provide a getColumnManager method", function(){ makeGrid(); expect(gam().$className).toBe('Ext.grid.ColumnManager'); }); it("should provide a getVisibleColumnManager method", function(){ makeGrid(); expect(gvm().$className).toBe('Ext.grid.ColumnManager'); }); describe("simple grid", function(){ beforeEach(function(){ makeGrid(); }); it("should return all leaf columns", function() { expect(gv().length).toBe(defaultColNum); }); it("should have the correct column order", function(){ var cols = gv(), i = 0, len = cols.length; for (; i < len; ++i) { expect(cols[i]).toBe(colRef[i]); } }); it("should update the order when moving columns", function(){ grid.headerCt.move(3, 1); var cols = gv(); expect(cols[0]).toBe(colRef[0]); expect(cols[1]).toBe(colRef[3]); expect(cols[2]).toBe(colRef[1]); expect(cols[3]).toBe(colRef[2]); }); it("should update the columns when removing a column", function(){ grid.headerCt.remove(1); var cols = gv(); expect(cols[0]).toBe(colRef[0]); expect(cols[1]).toBe(colRef[2]); expect(cols[2]).toBe(colRef[3]); }); it("should update the columns when adding a column", function(){ grid.headerCt.add({ text: 'Col4' }); expect(gv()[4].text).toBe('Col4'); }); describe("functions", function() { describe("getHeaderIndex", function() { it("should return the correct index for the header", function() { expect(gam().getHeaderIndex(colRef[3])).toBe(3); }); it("should return -1 if the column doesn't exist", function(){ column = new Ext.grid.column.Column(); expect(gam().getHeaderIndex(column)).toBe(-1); }); }); describe("getHeaderAtIndex", function(){ it("should return the column reference", function(){ expect(gam().getHeaderAtIndex(2)).toBe(colRef[2]); }); it("should return null if the index is out of bounds", function(){ expect(gam().getHeaderAtIndex(10)).toBeNull(); }); }); describe("getHeaderById", function(){ it("should return the column reference by id", function(){ expect(gam().getHeaderById('col1')).toBe(colRef[1]); }); it("should return null if the id doesn't exist", function() { expect(gam().getHeaderById('foo')).toBeNull(); }); }); it("should return the first item", function(){ expect(gam().getFirst()).toBe(colRef[0]); }); it("should return the last item", function(){ expect(gam().getLast()).toBe(colRef[3]); }); describe("getNextSibling", function(){ it("should return the next sibling", function(){ expect(gam().getNextSibling(colRef[1])).toBe(colRef[2]); }); it("should return the null if the next sibling doesn't exist", function(){ expect(gam().getNextSibling(colRef[3])).toBeNull(); }); }); describe("getPreviousSibling", function(){ it("should return the previous sibling", function(){ expect(gam().getPreviousSibling(colRef[2])).toBe(colRef[1]); }); it("should return the null if the previous sibling doesn't exist", function(){ expect(gam().getPreviousSibling(colRef[0])).toBeNull(); }); }); }); }); describe('getHeaderIndex', function () { var index, headerCtItems; beforeEach(function () { makeGrid([{ text: 'Name', width: 100, dataIndex: 'name', hidden: true },{ text: 'Email', width: 100, dataIndex: 'email' }, { text: 'Stock Price', columns: [{ text: 'Price', width: 75, dataIndex: 'price' }, { text: 'Phone', width: 80, dataIndex: 'phone', hidden: true }, { text: '% Change', width: 40, dataIndex: 'pctChange' }] }, { text: 'Foo', columns: [{ text: 'Foo Price', width: 75, dataIndex: 'price', hidden: true }, { text: 'Foo Phone', width: 80, dataIndex: 'phone' }, { text: 'Foo % Change', width: 40, dataIndex: 'pctChange' }] }]); headerCtItems = grid.headerCt.items; }); afterEach(function () { index = headerCtItems = null; }); describe('all columns', function () { describe('when argument is a column', function () { it('should return a valid index', function () { index = gam().getHeaderIndex(headerCtItems.items[0]); expect(index).not.toBe(-1); expect(index).toBe(0); }); it('should return the header regardless of visibility', function () { var header; header = headerCtItems.items[0]; index = gam().getHeaderIndex(header); expect(header.hidden).toBe(true); expect(index).toBe(0); }); it('should return the index of the header in its owner stack - rootHeader', function () { index = gam().getHeaderIndex(headerCtItems.items[3].items.items[0]); expect(index).toBe(5); }); it('should return the index of the header in its owner stack - groupHeader', function () { // Note that this spec is using the same header as the previous spec to demonstrate the difference. var groupHeader = headerCtItems.items[3]; index = groupHeader.columnManager.getHeaderIndex(groupHeader.items.items[0]); expect(index).toBe(0); }); }); describe('when argument is a group header', function () { it('should return a valid index', function () { index = gam().getHeaderIndex(headerCtItems.items[2]); expect(index).not.toBe(-1); expect(index).toBe(2); }); it('should return an index of the first leaf of group header', function () { var colMgrHeader; // First, get the index from the column mgr. It will retrieve it from the group header's column mgr. index = gam().getHeaderIndex(headerCtItems.items[2]); // Next, get a reference to the actual header (top-level col mgr will have a ref to all sub-level headers). colMgrHeader = gam().getHeaderAtIndex(index); // Remember, this is the index of the root header's visible col mgr. expect(index).toBe(2); expect(colMgrHeader.hidden).toBe(false); expect(colMgrHeader.dataIndex).toBe('price'); }); it("should be a reference to the first leaf header in the grouped header's columnn manager", function () { var groupedHeader, colMgrHeader, groupHeaderFirstHeader; groupedHeader = headerCtItems.items[2]; groupHeaderFirstHeader = groupedHeader.columnManager.getHeaderAtIndex(0); // First, get the index from the column mgr. It will retrieve it from the group header's column mgr. index = gam().getHeaderIndex(groupedHeader); // Next, get a reference to the actual header (top-level col mgr will have a ref to all sub-level headers). colMgrHeader = gam().getHeaderAtIndex(index); expect(colMgrHeader).toBe(groupHeaderFirstHeader); expect(colMgrHeader.hidden).toBe(groupHeaderFirstHeader.hidden); expect(colMgrHeader.dataIndex).toBe(groupHeaderFirstHeader.dataIndex); }); it('should return first sub-header regardless of visibility', function () { var groupedHeader, colMgrHeader, groupHeaderFirstHeader; groupedHeader = headerCtItems.items[3]; groupHeaderFirstHeader = groupedHeader.columnManager.getHeaderAtIndex(0); // First, get the index from the column mgr. It will retrieve it from the group header's column mgr. index = gam().getHeaderIndex(groupedHeader); // Next, get a reference to the actual header (top-level col mgr will have a ref to all sub-level headers). colMgrHeader = gam().getHeaderAtIndex(index); expect(colMgrHeader).toBe(groupHeaderFirstHeader); expect(colMgrHeader.hidden).toBe(true); expect(colMgrHeader.text).toBe('Foo Price'); }); }); }); describe('visible only', function () { describe('when argument is a column', function () { it('should return the correct index for the header', function() { expect(gvm().getHeaderIndex(headerCtItems.items[1])).toBe(0); }); it("should return -1 if the column doesn't exist", function() { column = new Ext.grid.column.Column(); expect(gvm().getHeaderIndex(column)).toBe(-1); }); it('should not return a hidden sub-header', function () { var header; header = headerCtItems.items[0]; index = gvm().getHeaderIndex(header); expect(header.hidden).toBe(true); expect(index).toBe(-1); }); it('should return a valid index', function () { index = gvm().getHeaderIndex(headerCtItems.items[1]); expect(index).not.toBe(-1); // Will filter out the first hidden column in the stack. expect(index).toBe(0); }); it('should return the index of the header in its owner stack - rootHeader', function () { index = gvm().getHeaderIndex(headerCtItems.items[3].items.items[2]); expect(index).toBe(4); }); it('should return the index of the header in its owner stack - groupHeader', function () { // Note that this spec is using the same header as the previous spec to demonstrate the difference. var groupHeader = headerCtItems.items[3]; index = groupHeader.visibleColumnManager.getHeaderIndex(groupHeader.items.items[2]); expect(index).toBe(1); }); }); describe('when argument is a group header', function () { it('should return a valid index', function () { index = gvm().getHeaderIndex(headerCtItems.items[2]); expect(index).not.toBe(-1); // Will filter out the second hidden column in the stack. expect(index).toBe(1); }); it('should return an index of the first leaf of group header', function () { var colMgrHeader; // First, get the index from the column mgr. It will retrieve it from the group header's column mgr. index = gvm().getHeaderIndex(headerCtItems.items[2]); // Next, get a reference to the actual header (top-level col mgr will have a ref to all sub-level headers). colMgrHeader = gvm().getHeaderAtIndex(index); // Remember, this is the index of the root header's visible col mgr. expect(index).toBe(1); expect(colMgrHeader.hidden).toBe(false); expect(colMgrHeader.dataIndex).toBe('price'); }); it("should be a reference to the first leaf header in the grouped header's columnn manager", function () { var groupedHeader, colMgrHeader, groupHeaderFirstHeader; groupedHeader = headerCtItems.items[2]; groupHeaderFirstHeader = headerCtItems.items[2].visibleColumnManager.getHeaderAtIndex(0); // First, get the index from the column mgr. It will retrieve it from the group header's column mgr. index = gvm().getHeaderIndex(groupedHeader); // Next, get a reference to the actual header (top-level col mgr will have a ref to all sub-level headers). colMgrHeader = gvm().getHeaderAtIndex(index); expect(colMgrHeader).toBe(groupHeaderFirstHeader); expect(colMgrHeader.hidden).toBe(groupHeaderFirstHeader.hidden); expect(colMgrHeader.dataIndex).toBe(groupHeaderFirstHeader.dataIndex); }); it('should not return a hidden sub-header', function () { var groupedHeader, colMgrHeader, groupHeaderFirstHeader; groupedHeader = headerCtItems.items[3]; groupHeaderFirstHeader = groupedHeader.visibleColumnManager.getHeaderAtIndex(0); // First, get the index from the column mgr. It will retrieve it from the group header's column mgr. index = gvm().getHeaderIndex(groupedHeader); // Next, get a reference to the actual header (top-level col mgr will have a ref to all sub-level headers). colMgrHeader = gvm().getHeaderAtIndex(index); expect(colMgrHeader).toBe(groupHeaderFirstHeader); expect(colMgrHeader.hidden).toBe(false); expect(colMgrHeader.text).toBe('Foo Phone'); }); }); }); }); describe('getHeaderAtIndex', function () { var header, headerCtItems; beforeEach(function () { makeGrid([{ text: 'Name', width: 100, dataIndex: 'name', hidden: true },{ text: 'Email', width: 100, dataIndex: 'email' }, { text: 'Stock Price', columns: [{ text: 'Price', width: 75, dataIndex: 'price' }, { text: 'Phone', width: 80, dataIndex: 'phone', hidden: true }, { text: '% Change', width: 40, dataIndex: 'pctChange' }] }, { text: 'Foo', columns: [{ text: 'Foo Price', width: 75, dataIndex: 'price', hidden: true }, { text: 'Foo Phone', width: 80, dataIndex: 'phone' }, { text: 'Foo % Change', width: 40, dataIndex: 'pctChange' }] }]); headerCtItems = grid.headerCt.items; }); afterEach(function () { header = headerCtItems = null; }); describe('all columns', function () { it('should return a valid header', function () { header = gam().getHeaderAtIndex(0); expect(header).not.toBe(null); expect(header.dataIndex).toBe('name'); }); it('should return the correct header from the index', function() { expect(gam().getHeaderAtIndex(0).dataIndex).toBe('name'); }); it("should return null if the column doesn't exist", function() { expect(gam().getHeaderAtIndex(50)).toBe(null); }); it('should return the header regardless of visibility', function () { var header2; header = gam().getHeaderAtIndex(0); header2 = gam().getHeaderAtIndex(1); expect(header).not.toBe(null); expect(header.hidden).toBe(true); expect(header2).not.toBe(null); expect(header2.hidden).toBe(false); }); it('should return the header in its owner stack - rootHeader', function () { header = gam().getHeaderAtIndex(0); expect(header.text).toBe('Name'); }); it('should return the index of the header in its owner stack - groupHeader', function () { // Note that this spec is using the index as the previous spec to demonstrate the difference. header = headerCtItems.items[3].columnManager.getHeaderAtIndex(0); expect(header.text).toBe('Foo Price'); }); }); describe('visible only', function () { it('should return the correct header from the index', function() { expect(gvm().getHeaderAtIndex(0).dataIndex).toBe('email'); }); it("should return null if the column doesn't exist", function() { expect(gvm().getHeaderAtIndex(50)).toBe(null); }); it('should not return a hidden sub-header', function () { header = gvm().getHeaderAtIndex(2); expect(header.hidden).toBe(false); expect(header.dataIndex).toBe('pctChange'); }); it('should return a valid header', function () { header = gvm().getHeaderAtIndex(0); expect(header).not.toBe(null); expect(header.dataIndex).toBe('email'); }); it('should return the header in its owner stack - rootHeader', function () { header = gvm().getHeaderAtIndex(0); expect(header.text).toBe('Email'); }); it('should return the index of the header in its owner stack - groupHeader', function () { // Note that this spec is using the same header as the previous spec to demonstrate the difference. var groupHeader = headerCtItems.items[3]; header = headerCtItems.items[3].visibleColumnManager.getHeaderAtIndex(0); expect(header.text).toBe('Foo Phone'); }); }); }); describe('hidden columns', function() { // Hidden at index 3/6 beforeEach(function(){ makeGrid(8, null, function(i){ return i > 0 && i % 3 === 0; }); }); it("should return all columns when using getColumnManager", function(){ expect(ga().length).toBe(8); }); it("should return only visible columns when using getVisibleColumnManager", function(){ expect(gv().length).toBe(6); }); it("should update the collection when hiding a column", function(){ colRef[0].hide(); expect(gv().length).toBe(5); }); it("should update the collection when showing a column", function(){ colRef[3].show(); expect(gv().length).toBe(7); }); describe("getHeaderAtIndex", function(){ it("should return the column reference", function(){ expect(gvm().getHeaderAtIndex(3)).toBe(colRef[4]); }); it("should return null if the index is out of bounds", function(){ expect(gvm().getHeaderAtIndex(7)).toBeNull(); }); }); describe("getHeaderById", function(){ it("should return the column reference by id", function(){ expect(gvm().getHeaderById('col1')).toBe(colRef[1]); }); it("should return null if the id doesn't exist", function() { expect(gvm().getHeaderById('col3')).toBeNull(); }); }); it("should return the first item", function(){ expect(gvm().getFirst()).toBe(colRef[0]); }); it("should return the last item", function(){ expect(gvm().getLast()).toBe(colRef[7]); }); describe("getNextSibling", function(){ it("should return the next sibling", function(){ expect(gvm().getNextSibling(colRef[2])).toBe(colRef[4]); }); it("should return the null if the next sibling doesn't exist", function(){ expect(gvm().getNextSibling(colRef[3])).toBeNull(); }); }); describe("getPreviousSibling", function(){ it("should return the previous sibling", function(){ expect(gvm().getPreviousSibling(colRef[7])).toBe(colRef[5]); }); it("should return the null if the previous sibling doesn't exist", function(){ expect(gvm().getPreviousSibling(colRef[6])).toBeNull(); }); }); }); describe("locking", function(){ // first 4 locked beforeEach(function(){ makeGrid(10, null, null, function(i){ return i <= 3; }); }); describe("global manager", function() { it("should return both sets of columns", function(){ expect(ga().length).toBe(10); }); it("should update the collection when adding to the locked side", function(){ grid.lockedGrid.headerCt.add({ text: 'Foo' }); expect(ga().length).toBe(11); }); it("should update the collection when adding to the unlocked side", function(){ grid.normalGrid.headerCt.add({ text: 'Foo' }); expect(ga().length).toBe(11); }); it("should update the collection when removing from the locked side", function(){ grid.lockedGrid.headerCt.remove(0); expect(ga().length).toBe(9); }); it("should update the collection when removing from the unlocked side", function(){ grid.normalGrid.headerCt.remove(0); expect(ga().length).toBe(9); }); it("should maintain the same size when locking an item", function(){ grid.lock(colRef[4]); expect(ga().length).toBe(10); }); it("should maintain the same size when unlocking an item", function(){ grid.unlock(colRef[0]); expect(ga().length).toBe(10); }); }); describe("locked side", function(){ var glm = function(){ return grid.lockedGrid.getColumnManager(); }; it("should only return the columns for this side", function(){ expect(glm().getColumns().length).toBe(4); }); it("should update the collection when adding an item to this side", function(){ grid.lock(colRef[9]); expect(glm().getColumns().length).toBe(5); }); it("should update the collection when removing an item from this side", function(){ grid.unlock(colRef[0]); expect(glm().getColumns().length).toBe(3); }); describe("function", function(){ describe("getHeaderIndex", function() { it("should return the correct index for the header", function() { expect(glm().getHeaderIndex(colRef[2])).toBe(2); }); it("should return -1 if the column doesn't exist", function(){ expect(glm().getHeaderIndex(colRef[5])).toBe(-1); }); }); describe("getHeaderAtIndex", function(){ it("should return the column reference", function(){ expect(glm().getHeaderAtIndex(3)).toBe(colRef[3]); }); it("should return null if the index is out of bounds", function(){ expect(glm().getHeaderAtIndex(6)).toBeNull(); }); }); describe("getHeaderById", function(){ it("should return the column reference by id", function(){ expect(glm().getHeaderById('col1')).toBe(colRef[1]); }); it("should return null if the id doesn't exist", function() { expect(glm().getHeaderById('col5')).toBeNull(); }); }); }); }); describe("unlocked side", function(){ var gum = function(){ return grid.normalGrid.getColumnManager(); }; it("should only return the columns for this side", function(){ expect(gum().getColumns().length).toBe(6); }); it("should update the collection when adding an item to this side", function(){ grid.unlock(colRef[1]); expect(gum().getColumns().length).toBe(7); }); it("should update the collection when removing an item from this side", function(){ grid.lock(colRef[7]); expect(gum().getColumns().length).toBe(5); }); describe("function", function(){ var offset = 4; describe("getHeaderIndex", function() { it("should return the correct index for the header", function() { expect(gum().getHeaderIndex(colRef[offset + 2])).toBe(2); }); it("should return -1 if the column doesn't exist", function(){ expect(gum().getHeaderIndex(colRef[0])).toBe(-1); }); }); describe("getHeaderAtIndex", function(){ it("should return the column reference", function(){ expect(gum().getHeaderAtIndex(3)).toBe(colRef[3 + offset]); }); it("should return null if the index is out of bounds", function(){ expect(gum().getHeaderAtIndex(6)).toBeNull(); }); }); describe("getHeaderById", function(){ it("should return the column reference by id", function(){ expect(gum().getHeaderById('col6')).toBe(colRef[6]); }); it("should return null if the id doesn't exist", function() { expect(gum().getHeaderById('col2')).toBeNull(); }); }); }); }); }); }); describe("menu", function() { it("should not allow menu to be shown when menuDisabled: true", function() { makeGrid([{ dataIndex: 'field0', width: 200, filter: 'string', menuDisabled: true }], { plugins: 'gridfilters' }); // menuDisabled=true, shouldn't have a trigger expect(colRef[0].triggerEl).toBeNull(); }); it("should not allow menu to be shown when grid is configured with enableColumnHide: false and sortableColumns: false", function() { makeGrid([{ dataIndex: 'field0', width: 200 }], { enableColumnHide: false, sortableColumns: false }); expect(colRef[0].triggerEl).toBeNull(); }); it("should allow menu to be shown when requiresMenu: true (from plugin) and grid is configured with enableColumnHide: false and sortableColumns: false", function() { makeGrid([{ dataIndex: 'field0', width: 200, filter: 'string' }], { enableColumnHide: false, sortableColumns: false, plugins: 'gridfilters' }); var col = colRef[0], menu; col.triggerEl.show(); jasmine.fireMouseEvent(col.triggerEl.dom, 'click'); menu = col.activeMenu; expect(menu.isVisible()).toBe(true); expect(col.requiresMenu).toBe(true); }); }); describe("sorting", function() { it("should sort by dataIndex when clicking on the header with sortable: true", function() { makeGrid([{ dataIndex: 'field0', sortable: true }]); clickHeader(colRef[0]); var sorters = store.getSorters(); expect(sorters.getCount()).toBe(1); expect(sorters.first().getProperty()).toBe('field0'); expect(sorters.first().getDirection()).toBe('ASC'); }); it("should invert the sort order when clicking on a sorted column", function() { makeGrid([{ dataIndex: 'field0', sortable: true }]); clickHeader(colRef[0]); var sorters = store.getSorters(); clickHeader(colRef[0]); expect(sorters.getCount()).toBe(1); expect(sorters.first().getProperty()).toBe('field0'); expect(sorters.first().getDirection()).toBe('DESC'); clickHeader(colRef[0]); expect(sorters.getCount()).toBe(1); expect(sorters.first().getProperty()).toBe('field0'); expect(sorters.first().getDirection()).toBe('ASC'); }); it("should not sort when configured with sortable false", function() { makeGrid([{ dataIndex: 'field0', sortable: false }]); clickHeader(colRef[0]); expect(store.getSorters().getCount()).toBe(0); }); it("should not sort when the grid is configured with sortableColumns: false", function() { makeGrid([{ dataIndex: 'field0' }], { sortableColumns: false }); clickHeader(colRef[0]); expect(store.getSorters().getCount()).toBe(0); }); }); describe("grouped columns", function() { var baseCols; function createGrid(cols, stateful) { if (grid) { grid.destroy(); grid = null; } makeGrid(cols, { renderTo: null, stateful: stateful, stateId: 'foo' }); } function getCol(id) { return grid.down('#' + id); } describe('when stateful', function () { var col; beforeEach(function () { new Ext.state.Provider(); makeGrid([{ itemId: 'main1', columns: [{ itemId: 'child1' }, { itemId: 'child2' }, { itemId: 'child3' }] }, { itemId: 'main2', columns: [{ itemId: 'child4' }, { itemId: 'child5' }, { itemId: 'child6' }] }], { stateful: true, stateId: 'foo' }); }); afterEach(function () { Ext.state.Manager.getProvider().clear(); col = null; }); it('should work when toggling visibility on the groups', function () { // See EXTJS-11661. col = grid.down('#main2'); col.hide(); // Trigger the bug. grid.saveState(); col.show(); // Now, select one of the col's children and query its hidden state. // Really, we can check anything here, b/c if the bug wasn't fixed then // a TypeError would be thrown in Ext.view.TableLayout#setColumnWidths. expect(grid.down('#child6').hidden).toBe(false); }); it('should not show a previously hidden subheader when the visibility of its group header is toggled', function () { var subheader = grid.down('#child4'); subheader.hide(); col = grid.down('#main2'); col.hide(); col.show(); expect(subheader.hidden).toBe(true); }); }); describe("column visibility", function() { var cells; afterEach(function () { cells = null; }); describe("hiding/show during construction", function() { it("should be able to show a column during construction", function() { expect(function() { makeGrid([{ dataIndex: 'field1', hidden: true, listeners: { added: function(c) { c.show(); } } }]); }).not.toThrow(); expect(grid.getVisibleColumnManager().getColumns()[0]).toBe(colRef[0]); }); it("should be able to hide a column during construction", function() { expect(function() { makeGrid([{ dataIndex: 'field1', listeners: { added: function(c) { c.hide(); } } }]); }).not.toThrow(); expect(grid.getVisibleColumnManager().getColumns().length).toBe(0); }); }); describe('when groupheader parent is hidden', function () { describe('hidden at config time', function () { beforeEach(function () { makeGrid([{ itemId: 'main1' }, { itemId: 'main2', hidden: true, columns: [{ itemId: 'child1' }, { itemId: 'child2' }] }]); cells = grid.view.body.query('.x-grid-row td'); }); it('should hide child columns at config time if the parent is hidden', function () { expect(grid.down('#child1').getInherited().hidden).toBe(true); expect(grid.down('#child2').getInherited().hidden).toBe(true); // Check the view. expect(cells.length).toBe(1); }); it('should not explicitly hide any child columns (they will be hierarchically hidden)', function () { expect(grid.down('#child1').hidden).toBe(false); expect(grid.down('#child2').hidden).toBe(false); // Check the view. expect(cells.length).toBe(1); }); }); describe('hidden at run time', function () { beforeEach(function () { makeGrid([{ itemId: 'main1' }, { itemId: 'main2', columns: [{ itemId: 'child1' }, { itemId: 'child2' }] }]); grid.down('#main2').hide(); cells = grid.view.body.query('.x-grid-row td'); }); it('should hide child columns at runtime if the parent is hidden', function () { expect(grid.down('#child1').getInherited().hidden).toBe(true); expect(grid.down('#child2').getInherited().hidden).toBe(true); // Check the view. expect(cells.length).toBe(1); }); it('should not explicitly hide any child columns (they will be hierarchically hidden)', function () { expect(grid.down('#child1').hidden).toBe(false); expect(grid.down('#child2').hidden).toBe(false); // Check the view. expect(cells.length).toBe(1); }); }); }); describe('when groupheader parent is shown', function () { describe('shown at config time', function () { beforeEach(function () { makeGrid([{ itemId: 'main1' }, { itemId: 'main2', columns: [{ itemId: 'child1' }, { itemId: 'child2' }] }]); cells = grid.view.body.query('.x-grid-row td'); }); it('should not hide child columns at config time if the parent is shown', function () { expect(grid.down('#child1').getInherited().hidden).not.toBeDefined(); expect(grid.down('#child2').getInherited().hidden).not.toBeDefined(); // Check the view. expect(cells.length).toBe(3); }); it('should not explicitly hide any child columns (they will be hierarchically shown)', function () { expect(grid.down('#child1').hidden).toBe(false); expect(grid.down('#child2').hidden).toBe(false); // Check the view. expect(cells.length).toBe(3); }); }); describe('shown at run time', function () { beforeEach(function () { makeGrid([{ itemId: 'main1' }, { itemId: 'main2', hidden: true, columns: [{ itemId: 'child1' }, { itemId: 'child2' }] }]); grid.down('#main2').show(); cells = grid.view.body.query('.x-grid-row td'); }); it('should show child columns at runtime if the parent is shown', function () { expect(grid.down('#child1').getInherited().hidden).not.toBeDefined(); expect(grid.down('#child2').getInherited().hidden).not.toBeDefined(); // Check the view. expect(cells.length).toBe(3); }); it('should not explicitly hide any child columns (they will be hierarchically shown)', function () { expect(grid.down('#child1').hidden).toBe(false); expect(grid.down('#child2').hidden).toBe(false); // Check the view. expect(cells.length).toBe(3); }); }); }); describe("hiding/showing children", function() { beforeEach(function() { baseCols = [{ itemId: 'col1', columns: [{ itemId: 'col11' }, { itemId: 'col12' }, { itemId: 'col13' }] }, { itemId: 'col2', columns: [{ itemId: 'col21' }, { itemId: 'col22' }, { itemId: 'col23' }] }]; }); it('should not show a previously hidden subheader when the visibility of its group header is toggled', function () { var subheader, col; makeGrid([{ itemId: 'main1' }, { itemId: 'main2', columns: [{ itemId: 'child1' }, { itemId: 'child2' }] }]); subheader = grid.down('#child1'); subheader.hide(); col = grid.down('#main2'); col.hide(); col.show(); expect(subheader.hidden).toBe(true); }); it('should allow any subheader to be reshown when all subheaders are currently hidden', function () { // There was a bug where a subheader could not be reshown when itself and all of its fellows were curently hidden. // See EXTJS-18515. var subheader; makeGrid([{ itemId: 'main1' }, { itemId: 'main2', columns: [{ itemId: 'child1' }, { itemId: 'child2' }, { itemId: 'child3' }] }]); grid.down('#child1').hide(); grid.down('#child2').hide(); subheader = grid.down('#child3'); // Toggling would reveal the bug. subheader.hide(); expect(subheader.hidden).toBe(true); subheader.show(); expect(subheader.hidden).toBe(false); }); it('should show the last hidden subheader if all subheaders are currently hidden when the group is reshown', function () { var groupheader, subheader1, subheader2, subheader3; makeGrid([{ itemId: 'main1' }, { itemId: 'main2', columns: [{ itemId: 'child1' }, { itemId: 'child2' }, { itemId: 'child3' }] }]); groupheader = grid.down('#main2'); subheader1 = grid.down('#child1').hide(); subheader3 = grid.down('#child3').hide(); subheader2 = grid.down('#child2') subheader2.hide(); expect(subheader2.hidden).toBe(true); groupheader.show(); // The last hidden subheader should now be shown. expect(subheader2.hidden).toBe(false); // Let's also demonstrate that the others are still hidden. expect(subheader1.hidden).toBe(true); expect(subheader3.hidden).toBe(true); }); describe("initial configuration", function() { it("should not hide the parent by default", function() { createGrid(baseCols); expect(getCol('col1').hidden).toBe(false); }); it("should not hide the parent if not all children are hidden", function() { baseCols[1].columns[2].hidden = baseCols[1].columns[0].hidden = true; createGrid(baseCols); expect(getCol('col2').hidden).toBe(false); }); it("should hide the parent if all children are hidden", function() { baseCols[1].columns[2].hidden = baseCols[1].columns[1].hidden = baseCols[1].columns[0].hidden = true; createGrid(baseCols); expect(getCol('col2').hidden).toBe(true); }); }); describe("before render", function() { it("should hide the parent when hiding all children", function() { createGrid(baseCols); getCol('col21').hide(); getCol('col22').hide(); getCol('col23').hide(); grid.render(Ext.getBody()); expect(getCol('col2').hidden).toBe(true); }); it("should show the parent when showing a hidden child", function() { baseCols[1].columns[2].hidden = baseCols[1].columns[1].hidden = baseCols[1].columns[0].hidden = true; createGrid(baseCols); getCol('col22').show(); grid.render(Ext.getBody()); expect(getCol('col2').hidden).toBe(false); }); }); describe("after render", function() { it("should hide the parent when hiding all children", function() { createGrid(baseCols); grid.render(Ext.getBody()); getCol('col21').hide(); getCol('col22').hide(); getCol('col23').hide(); expect(getCol('col2').hidden).toBe(true); }); it("should show the parent when showing a hidden child", function() { baseCols[1].columns[2].hidden = baseCols[1].columns[1].hidden = baseCols[1].columns[0].hidden = true; createGrid(baseCols); grid.render(Ext.getBody()); getCol('col22').show(); expect(getCol('col2').hidden).toBe(false); }); it("should only trigger a single layout when hiding the last leaf in a group", function() { baseCols[0].columns.splice(1, 2); createGrid(baseCols); grid.render(Ext.getBody()); var count = grid.componentLayoutCounter; getCol('col11').hide(); expect(grid.componentLayoutCounter).toBe(count + 1); }); it("should only trigger a single refresh when hiding the last leaf in a group", function() { baseCols[0].columns.splice(1, 2); createGrid(baseCols); grid.render(Ext.getBody()); var view = grid.getView(), count = view.refreshCounter; getCol('col11').hide(); expect(view.refreshCounter).toBe(count + 1); }); }); describe('nested stacked columns', function () { // Test stacked group headers where the only child is the next group header in the hierarchy. // The last (lowest in the stack) group header will contain multiple child items. // For example: // // +-----------------------------------+ // | col1 | // |-----------------------------------| // | col2 | // other |-----------------------------------| other // headers | col3 | headers // |-----------------------------------| // | col4 | // |-----------------------------------| // | Field1 | Field2 | Field3 | Field4 | // |===================================| // | view | // +-----------------------------------+ // function assertHiddenState(n, hiddenState) { while (n) { expect(getCol('col' + n).hidden).toBe(hiddenState); --n; } } describe('on hide', function () { beforeEach(function() { baseCols = [{ itemId: 'col1', columns: [{ itemId: 'col2', columns: [{ itemId: 'col3', columns: [{ itemId: 'col4', columns: [{ itemId: 'col41' }, { itemId: 'col42' }, { itemId: 'col43' }, { itemId: 'col44' }] }] }] }] }, { itemId: 'col5' }] }); it('should hide every group header above the target group header', function () { createGrid(baseCols); getCol('col4').hide(); assertHiddenState(4, true); tearDown(); setup(); createGrid(baseCols); getCol('col3').hide(); assertHiddenState(3, true); tearDown(); setup(); createGrid(baseCols); getCol('col2').hide(); assertHiddenState(2, true); }); it('should reshow every group header above the target group header when toggled', function () { createGrid(baseCols); getCol('col4').hide(); assertHiddenState(4, true); getCol('col4').show(); assertHiddenState(4, false); tearDown(); setup(); createGrid(baseCols); getCol('col3').hide(); assertHiddenState(3, true); getCol('col3').show(); assertHiddenState(3, false); tearDown(); setup(); createGrid(baseCols); getCol('col2').hide(); assertHiddenState(2, true); getCol('col2').show(); assertHiddenState(2, false); }); describe('subheaders', function () { it('should hide all ancestor group headers when hiding all subheaders in lowest group header', function () { createGrid(baseCols); getCol('col41').hide(); getCol('col42').hide(); getCol('col43').hide(); getCol('col44').hide(); assertHiddenState(4, true); }); }); }); describe('on show', function () { beforeEach(function() { baseCols = [{ itemId: 'col1', hidden: true, columns: [{ itemId: 'col2', hidden: true, columns: [{ itemId: 'col3', hidden: true, columns: [{ itemId: 'col4', hidden: true, columns: [{ itemId: 'col41' }, { itemId: 'col42' }, { itemId: 'col43' }, { itemId: 'col44' }] }] }] }] }, { itemId: 'col5' }] }); it('should show every group header above the target group header', function () { // Here we're showing that a header that is explicitly shown will have every header // above it shown as well. createGrid(baseCols); getCol('col4').show(); assertHiddenState(4, false); tearDown(); setup(); createGrid(baseCols); getCol('col3').show(); assertHiddenState(3, false); tearDown(); setup(); createGrid(baseCols); getCol('col2').show(); assertHiddenState(2, false); }); it('should show every group header in the chain no matter which group header is checked', function () { // Here we're showing that a header that is explicitly shown will have every header // in the chain shown, no matter which group header was clicked. // // Group headers are special in that they are auto-hidden when their subheaders are all // hidden and auto-shown when the first subheader is reshown. They are the only headers // that should now be auto-shown or -hidden. // // It follows that since group headers are dictated by some automation depending upon the // state of their child items that all group headers should be shown if anyone in the // hierarchy is shown since these special group headers only contain one child, which is // the next group header in the stack. createGrid(baseCols); getCol('col4').show(); assertHiddenState(4, false); tearDown(); setup(); createGrid(baseCols); getCol('col3').show(); assertHiddenState(4, false); tearDown(); setup(); createGrid(baseCols); getCol('col2').show(); assertHiddenState(4, false); tearDown(); setup(); createGrid(baseCols); getCol('col1').show(); assertHiddenState(4, false); }); it('should rehide every group header above the target group header when toggled', function () { createGrid(baseCols); getCol('col4').show(); assertHiddenState(4, false); getCol('col4').hide(); assertHiddenState(4, true); tearDown(); setup(); createGrid(baseCols); getCol('col3').show(); assertHiddenState(3, false); getCol('col3').hide(); assertHiddenState(3, true); tearDown(); setup(); createGrid(baseCols); getCol('col2').show(); assertHiddenState(2, false); getCol('col2').hide(); assertHiddenState(2, true); }); describe('subheaders', function () { it('should not show any ancestor group headers when hiding all subheaders in lowest group header', function () { createGrid(baseCols); getCol('col41').hide(); getCol('col42').hide(); getCol('col43').hide(); getCol('col44').hide(); assertHiddenState(4, true); }); it('should show all ancestor group headers when hiding all subheaders in lowest group header and then showing one', function () { createGrid(baseCols); getCol('col41').hide(); getCol('col42').hide(); getCol('col43').hide(); getCol('col44').hide(); assertHiddenState(4, true); getCol('col42').show(); assertHiddenState(4, false); }); it('should remember which subheader was last checked and restore its state when its group header is rechecked', function () { var col, subheader, headerCt; // Let's hide the 3rd menu item. makeGrid(baseCols); col = getCol('col4'); subheader = getCol('col43'); headerCt = grid.headerCt; getCol('col41').hide(); getCol('col42').hide(); getCol('col44').hide(); subheader.hide(); expect(col.hidden).toBe(true); // Get the menu item. headerCt.getMenuItemForHeader(headerCt.menu, col).setChecked(true); expect(subheader.hidden).toBe(false); // Now let's hide the 2nd menu item. tearDown(); setup(); makeGrid(baseCols); col = getCol('col4'); subheader = getCol('col42'); headerCt = grid.headerCt; getCol('col41').hide(); getCol('col43').hide(); getCol('col44').hide(); subheader.hide(); expect(col.hidden).toBe(true); // Get the menu item. headerCt.getMenuItemForHeader(headerCt.menu, col).setChecked(true); expect(subheader.hidden).toBe(false); }); it('should only show visible subheaders when all group headers are shown', function () { var col; createGrid(baseCols); col = getCol('col4'); // All subheaders are visible. col.show(); expect(col.visibleColumnManager.getColumns().length).toBe(4); // Hide the group header and hide two subheaders. col.hide(); getCol('col42').hide(); getCol('col43').hide(); // Only two subheaders should now be visible. col.show(); expect(col.visibleColumnManager.getColumns().length).toBe(2); }); }); }); }); }); describe("adding/removing children", function() { beforeEach(function() { baseCols = [{ itemId: 'col1', columns: [{ itemId: 'col11' }, { itemId: 'col12' }, { itemId: 'col13' }] }, { itemId: 'col2', columns: [{ itemId: 'col21' }, { itemId: 'col22' }, { itemId: 'col23' }] }]; }); describe("before render", function() { it("should hide the parent if removing the last hidden item", function() { baseCols[0].columns[0].hidden = baseCols[0].columns[1].hidden = true; createGrid(baseCols); getCol('col13').destroy(); grid.render(Ext.getBody()); expect(getCol('col1').hidden).toBe(true); }); it("should show the parent if adding a visible item and all items are hidden", function() { baseCols[0].columns[0].hidden = baseCols[0].columns[1].hidden = baseCols[0].columns[2].hidden = true; createGrid(baseCols); getCol('col1').add({ itemId: 'col14' }); grid.render(Ext.getBody()); expect(getCol('col1').hidden).toBe(false); }); }); describe("after render", function() { it("should hide the parent if removing the last hidden item", function() { baseCols[0].columns[0].hidden = baseCols[0].columns[1].hidden = true; createGrid(baseCols); grid.render(Ext.getBody()); getCol('col13').destroy(); expect(getCol('col1').hidden).toBe(true); }); it("should show the parent if adding a visible item and all items are hidden", function() { baseCols[0].columns[0].hidden = baseCols[0].columns[1].hidden = baseCols[0].columns[2].hidden = true; createGrid(baseCols); grid.render(Ext.getBody()); getCol('col1').add({ itemId: 'col14' }); expect(getCol('col1').hidden).toBe(false); }); }); }); }); describe("removing columns from group", function() { beforeEach(function() { baseCols = [{ itemId: 'col1', columns: [{ itemId: 'col11' }, { itemId: 'col12' }, { itemId: 'col13' }] }, { itemId: 'col2', columns: [{ itemId: 'col21' }, { itemId: 'col22' }, { itemId: 'col23' }] }]; createGrid(baseCols); }); describe("before render", function() { it("should destroy the group header when removing all columns", function() { var headerCt = grid.headerCt, col2 = getCol('col2'); expect(headerCt.items.indexOf(col2)).toBe(1); getCol('col21').destroy(); getCol('col22').destroy(); getCol('col23').destroy(); expect(col2.destroyed).toBe(true); expect(headerCt.items.indexOf(col2)).toBe(-1); }); }); describe("after render", function() { it("should destroy the group header when removing all columns", function() { createGrid(baseCols); grid.render(Ext.getBody()); var headerCt = grid.headerCt, col2 = getCol('col2'); expect(headerCt.items.indexOf(col2)).toBe(1); getCol('col21').destroy(); getCol('col22').destroy(); getCol('col23').destroy(); expect(col2.destroyed).toBe(true); expect(headerCt.items.indexOf(col2)).toBe(-1); }); }); }); }); describe("column operations & the view", function() { describe('', function () { beforeEach(function() { makeGrid(); }); it("should update the view when adding a new header", function() { grid.headerCt.insert(0, { dataIndex: 'field4' }); expect(getCellText(0, 0)).toBe('val5'); }); it("should update the view when moving an existing header", function() { grid.headerCt.insert(0, colRef[1]); expect(getCellText(0, 0)).toBe('val2'); }); it("should update the view when removing a header", function() { grid.headerCt.remove(1); expect(getCellText(0, 1)).toBe('val3'); }); it("should not refresh the view when doing a drag/drop move", function() { var called = false, header; grid.getView().on('refresh', function() { called = true; }); // Simulate a DD here header = colRef[0]; grid.headerCt.move(0, 3); expect(getCellText(0, 3)).toBe('val1'); expect(called).toBe(false); }); }); describe('toggling column visibility', function () { var refreshCounter; beforeEach(function () { makeGrid(); refreshCounter = view.refreshCounter; }); afterEach(function () { refreshCounter = null; }); describe('hiding', function () { it('should update the view', function () { colRef[0].hide(); expect(view.refreshCounter).toBe(refreshCounter + 1); }); }); describe('showing', function () { it('should update the view', function () { colRef[0].hide(); refreshCounter = view.refreshCounter; colRef[0].show(); expect(view.refreshCounter).toBe(refreshCounter + 1); }); }); }); }); describe("locked/normal grid visibility", function() { function expectVisible(locked, normal) { expect(grid.lockedGrid.isVisible()).toBe(locked); expect(grid.normalGrid.isVisible()).toBe(normal); } var failCount; beforeEach(function() { failCount = Ext.failedLayouts; }); afterEach(function() { expect(failCount).toBe(Ext.failedLayouts); failCount = null; }); describe("initial", function() { it("should have both sides visible", function() { makeGrid([{locked: true}, {}], { syncTaskDelay: 0 }); expectVisible(true, true); }); it("should have only the normal side visible if there are no locked columns", function() { makeGrid([{}, {}], { enableLocking: true, syncTaskDelay: 0 }); expectVisible(false, true); }); it("should have only the locked side visible if there are no normal columns", function() { makeGrid([{locked: true}, {locked: true}], { syncTaskDelay: 0 }); expectVisible(true, false); }); }); describe("dynamic", function() { beforeEach(function() { makeGrid([{ locked: true, itemId: 'col0' }, { locked: true, itemId: 'col1' }, { itemId: 'col2' }, { itemId: 'col3' }], { syncTaskDelay: 0 }); }); describe("normal side", function() { it("should not hide when removing a column but there are other normal columns", function() { grid.normalGrid.headerCt.remove('col2'); expectVisible(true, true); }); it("should hide when removing the last normal column", function() { grid.normalGrid.headerCt.remove('col2'); grid.normalGrid.headerCt.remove('col3'); expectVisible(true, false); }); it("should not hide when hiding a column but there are other visible normal columns", function() { colRef[2].hide(); expectVisible(true, true); }); it("should hide when hiding the last normal column", function() { colRef[2].hide(); colRef[3].hide(); expectVisible(true, false); }); }); describe("locked side", function() { it("should not hide when removing a column but there are other locked columns", function() { grid.lockedGrid.headerCt.remove('col0'); expectVisible(true, true); }); it("should hide when removing the last locked column", function() { grid.lockedGrid.headerCt.remove('col0'); grid.lockedGrid.headerCt.remove('col1'); expectVisible(false, true); }); it("should not hide when hiding a column but there are other visible locked columns", function() { colRef[0].hide(); expectVisible(true, true); }); it("should hide when hiding the last locked column", function() { colRef[0].hide(); colRef[1].hide(); expectVisible(false, true); }); }); }); }); describe("rendering", function() { beforeEach(function() { makeGrid(); }); describe("first/last", function() { it("should stamp x-grid-cell-first on the first column cell", function() { var cls = grid.getView().firstCls; expect(hasCls(getCell(0, 0), cls)).toBe(true); expect(hasCls(getCell(0, 1), cls)).toBe(false); expect(hasCls(getCell(0, 2), cls)).toBe(false); expect(hasCls(getCell(0, 3), cls)).toBe(false); }); it("should stamp x-grid-cell-last on the last column cell", function() { var cls = grid.getView().lastCls; expect(hasCls(getCell(0, 0), cls)).toBe(false); expect(hasCls(getCell(0, 1), cls)).toBe(false); expect(hasCls(getCell(0, 2), cls)).toBe(false); expect(hasCls(getCell(0, 3), cls)).toBe(true); }); it("should update the first class when moving the first column", function() { grid.headerCt.insert(0, colRef[1]); var cell = getCell(0, 0), view = grid.getView(), cls = view.firstCls; expect(getCellText(0, 0)).toBe('val2'); expect(hasCls(cell, cls)).toBe(true); expect(hasCls(getCell(0, 1), cls)).toBe(false); }); it("should update the last class when moving the last column", function() { // Suppress console warning about reusing existing id spyOn(Ext.log, 'warn'); grid.headerCt.add(colRef[1]); var cell = getCell(0, 3), view = grid.getView(), cls = view.lastCls; expect(getCellText(0, 3)).toBe('val2'); expect(hasCls(cell, cls)).toBe(true); expect(hasCls(getCell(0, 2), cls)).toBe(false); }); }); describe("id", function() { it("should stamp the id of the column in the cell", function() { expect(hasCls(getCell(0, 0), 'x-grid-cell-col0')).toBe(true); expect(hasCls(getCell(0, 1), 'x-grid-cell-col1')).toBe(true); expect(hasCls(getCell(0, 2), 'x-grid-cell-col2')).toBe(true); expect(hasCls(getCell(0, 3), 'x-grid-cell-col3')).toBe(true); }); }); }); describe("hiddenHeaders", function() { it("should lay out the hidden items so cells obtain correct width", function() { makeGrid([{ width: 100 }, { flex: 1 }, { width: 200 }], { hiddenHeaders: true }); expect(getCell(0, 0).getWidth()).toBe(100); expect(getCell(0, 1).getWidth()).toBe(totalWidth - 200 - 100); expect(getCell(0, 2).getWidth()).toBe(200); }); it("should lay out grouped column headers", function() { makeGrid([{ width: 100 }, { columns: [{ width: 200 }, { width: 400 }, { width: 100 }] }, { width: 200 }], { hiddenHeaders: true }); expect(getCell(0, 0).getWidth()).toBe(100); expect(getCell(0, 1).getWidth()).toBe(200); expect(getCell(0, 2).getWidth()).toBe(400); expect(getCell(0, 3).getWidth()).toBe(100); expect(getCell(0, 4).getWidth()).toBe(200); }); }); describe("emptyCellText config", function () { function expectEmptyText(column, rowIdx, colIdx) { var cell = getCellInner(rowIdx, colIdx), el = document.createElement('div'); // We're doing this because ' ' !== '&#160;'. By letting the browser decode the entity, we // can then do a comparison. el.innerHTML = column.emptyCellText; expect(cell.textContent || cell.innerText).toBe(el.textContent || el.innerText); } describe("rendering", function() { beforeEach(function () { makeGrid([{ width: 100 }, { emptyCellText: 'derp', width: 200 }]); }); it("should use the default html entity for when there is no emptyCellText given", function () { expectEmptyText(colRef[0], 0, 0); }); it("should use the value of emptyCellText when configured", function () { expectEmptyText(colRef[1], 0, 1); }); }); describe("column update", function() { describe("full row update", function() { it("should use the empty text on update", function() { makeGrid([{ width: 100, dataIndex: 'field0', renderer: function(v, meta, rec) { return v; } }]); // Renderer with >1 arg requires a full row redraw store.getAt(0).set('field0', ''); expectEmptyText(colRef[0], 0, 0); }); }); describe("cell update only", function() { describe("producesHTML: true", function() { it("should use the empty text on update", function() { makeGrid([{ width: 100, producesHTML: true, dataIndex: 'field0' }]); store.getAt(0).set('field0', ''); expectEmptyText(colRef[0], 0, 0); }); it("should use the empty text on update with a simple renderer", function() { makeGrid([{ width: 100, producesHTML: true, dataIndex: 'field0', renderer: Ext.identityFn }]); store.getAt(0).set('field0', ''); expectEmptyText(colRef[0], 0, 0); }); }); describe("producesHTML: false", function() { it("should use the empty text on update", function() { makeGrid([{ width: 100, producesHTML: false, dataIndex: 'field0' }]); store.getAt(0).set('field0', ''); expectEmptyText(colRef[0], 0, 0); }); it("should use the empty text on update with a simple renderer", function() { makeGrid([{ width: 100, producesHTML: false, dataIndex: 'field0', renderer: Ext.identityFn }]); store.getAt(0).set('field0', ''); expectEmptyText(colRef[0], 0, 0); }); }); }); }); }); describe("non-column items in the header", function() { it("should show non-columns as children", function() { makeGrid([{ width: 100, items: { xtype: 'textfield', itemId: 'foo' } }]); expect(grid.down('#foo').isVisible(true)).toBe(true); }); it("should have the hidden item as visible after showing an initially hidden column", function() { makeGrid([{ width: 100, items: { xtype: 'textfield' } }, { width: 100, hidden: true, items: { xtype: 'textfield', itemId: 'foo' } }]); var field = grid.down('#foo'); expect(field.isVisible(true)).toBe(false); field.ownerCt.show(); expect(field.isVisible(true)).toBe(true); }); }); describe("reconfiguring", function() { it("should destroy any old columns", function() { var o = {}; makeGrid(4); Ext.Array.forEach(colRef, function(col) { col.on('destroy', function(c) { o[col.getItemId()] = true; }); }); grid.reconfigure(null, []); expect(o).toEqual({ col0: true, col1: true, col2: true, col3: true }); }); describe("with locking", function() { it("should resize the locked part to match the grid size", function() { makeGrid(4, null, null, function(i) { return i === 0; }); var borderWidth = grid.lockedGrid.el.getBorderWidth('lr'); // Default column width expect(grid.lockedGrid.getWidth()).toBe(100 + borderWidth); grid.reconfigure(null, [{ locked: true, width: 120 }, { locked: true, width: 170 }, {}, {}]) expect(grid.lockedGrid.getWidth()).toBe(120 + 170 + borderWidth); }); }); }); describe('column header borders', function() { it('should show header borders by default, and turn them off dynamically', function() { makeGrid(); expect(colRef[0].el.getBorderWidth('r')).toBe(1); expect(colRef[1].el.getBorderWidth('r')).toBe(1); expect(colRef[2].el.getBorderWidth('r')).toBe(1); grid.setHeaderBorders(false); expect(colRef[0].el.getBorderWidth('r')).toBe(0); expect(colRef[1].el.getBorderWidth('r')).toBe(0); expect(colRef[2].el.getBorderWidth('r')).toBe(0); }); it('should have no borders if configured false, and should show them dynamically', function() { makeGrid(null, { headerBorders: false }); expect(colRef[0].el.getBorderWidth('r')).toBe(0); expect(colRef[1].el.getBorderWidth('r')).toBe(0); expect(colRef[2].el.getBorderWidth('r')).toBe(0); grid.setHeaderBorders(true); expect(colRef[0].el.getBorderWidth('r')).toBe(1); expect(colRef[1].el.getBorderWidth('r')).toBe(1); expect(colRef[2].el.getBorderWidth('r')).toBe(1); }); }); describe('column resize', function() { it('should not fire drag events on headercontainer during resize', function() { makeGrid(); var colWidth = colRef[0].getWidth(), dragSpy = spyOnEvent(grid.headerCt.el, 'drag'); resizeColumn(colRef[0], 10); expect(colRef[0].getWidth()).toBe(colWidth + 10); expect(dragSpy).not.toHaveBeenCalled(); }); }); }); } createSuite(false); createSuite(true); });
Java
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pigame.settings") try: from django.core.management import execute_from_command_line except ImportError: # The above import may fail for some other reason. Ensure that the # issue is really that Django is missing to avoid masking other # exceptions on Python 2. try: import django except ImportError: raise ImportError( "Couldn't import Django. Are you sure it's installed and " "available on your PYTHONPATH environment variable? Did you " "forget to activate a virtual environment?" ) raise execute_from_command_line(sys.argv)
Java
// // Generated by class-dump 3.5 (64 bit). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // #import "NSObject.h" @class IBConnection, NSSet, NSString; @interface IBDragConnectionContext : NSObject { NSString *connectionName; long long relationshipType; NSString *sourceClassName; id source; IBConnection *prototype; BOOL limitToInterfaceBuilder; NSSet *endPointProvidingDocuments; } @property(readonly) NSSet *endPointProvidingDocuments; // @synthesize endPointProvidingDocuments; @property(readonly) BOOL limitToInterfaceBuilder; // @synthesize limitToInterfaceBuilder; @property(readonly) NSString *connectionName; // @synthesize connectionName; @property(readonly) long long relationshipType; // @synthesize relationshipType; @property(readonly) NSString *sourceClassName; // @synthesize sourceClassName; @property(readonly) IBConnection *prototype; // @synthesize prototype; @property(readonly) id source; // @synthesize source; - (void).cxx_destruct; - (id)initWithConnectionName:(id)arg1 relationshipType:(long long)arg2 sourceClassName:(id)arg3 endPointProvidingDocuments:(id)arg4 limitedToInterfaceBuilder:(BOOL)arg5; - (id)initWithPrototype:(id)arg1 endPointProvidingDocuments:(id)arg2; - (id)initWithSource:(id)arg1 endPointProvidingDocuments:(id)arg2; @end
Java
/* * Copyright 2011 Matt Crinklaw-Vogt * * 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. */ package com.tantaman.commons.examples; import java.util.Collection; import java.util.LinkedList; import org.debian.alioth.shootout.u32.nbody.NBodySystem; import com.tantaman.commons.concurrent.Parallel; public class ParallelForDemo { public static void main(String[] args) { Collection<Integer> elems = new LinkedList<Integer>(); for (int i = 0; i < 40; ++i) { elems.add(i*55000 + 100); } Parallel.For(elems, new Parallel.Operation<Integer>() { public void perform(Integer pParameter) { // do something with the parameter }; }); Parallel.Operation<Integer> bodiesOp = new Parallel.Operation<Integer>() { @Override public void perform(Integer pParameter) { NBodySystem bodies = new NBodySystem(); for (int i = 0; i < pParameter; ++i) bodies.advance(0.01); } }; System.out.println("RUNNING THE Parallel.For vs Parallel.ForFJ performance comparison"); System.out.println("This could take a while."); // warm up.. it really does have a large impact. Parallel.ForFJ(elems, bodiesOp); long start = System.currentTimeMillis(); Parallel.For(elems, bodiesOp); long stop = System.currentTimeMillis(); System.out.println("DELTA TIME VIA NORMAL PARALLEL FOR: " + (stop - start)); start = System.currentTimeMillis(); Parallel.ForFJ(elems, bodiesOp); stop = System.currentTimeMillis(); System.out.println("DELTA TIME VIA FOR FORK JOIN: " + (stop - start)); System.out.println("Finished"); } }
Java
<!DOCTYPE html> <!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]--> <!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]--> <!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]--> <!--[if (gte IE 9)|!(IE)]><!--><html lang="en"> <!--<![endif]--> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>{{ site.data.theme.name }} - {{ page.title }}</title> <meta name="author" content="{{ site.data.theme.name }}" /> <meta name="description" content="The blog of {{ site.data.theme.name }}" /> <link rel="canonical" href="{{ site.url }}{{ page.url | replace:'index.html','' }}" /> <link href="//fonts.googleapis.com/css?family=Open+Sans:600,800" rel="stylesheet" type="text/css"> <link rel="shortcut icon" href="/favicon.png"> <link rel="alternate" type="application/atom+xml" title="{{ site.data.theme.name }}" href="{{site.url}}/atom.xml" /> <link rel="stylesheet" href="/assets/css/all.css"> <link rel="stylesheet" href="//netdna.bootstrapcdn.com/font-awesome/4.0.1/css/font-awesome.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> <script src="/assets/toc.js"></script> <script type="text/javascript"> $(document).ready(function() { $('#toc').toc({headers: '.content h1, .content h2, .content h3'}); }); </script> </head> <body> <div class="container"> <div class="three columns sidebar"> {% include sidebar.html %} </div> <div class="nine columns content"> {{ content }} <div class="footer"> {% include footer.html %} </div> </div> </div> {% include analytics.html %} </body> </html>
Java
<?php namespace Akamon\OAuth2\Server\Domain\Service\Token\TokenGranter; use Akamon\OAuth2\Server\Domain\Exception\OAuthError\GrantTypeNotFoundOAuthErrorException; use Akamon\OAuth2\Server\Domain\Exception\OAuthError\UnauthorizedClientForGrantTypeOAuthErrorException; use Akamon\OAuth2\Server\Domain\Exception\OAuthError\UnsupportedGrantTypeOAuthErrorException; use Akamon\OAuth2\Server\Domain\Service\Client\ClientObtainer\ClientObtainerInterface; use Akamon\OAuth2\Server\Domain\Service\Token\TokenGrantTypeProcessor\TokenGrantTypeProcessorInterface; use Symfony\Component\HttpFoundation\Request; use felpado as f; class TokenGranterByGrantType implements TokenGranterInterface { private $clientObtainer; private $processors = []; public function __construct(ClientObtainerInterface $clientObtainer, array $processors) { $this->clientObtainer = $clientObtainer; foreach ($processors as $name => $processor) { $this->addProcessor($name, $processor); } } private function addProcessor($name, TokenGrantTypeProcessorInterface $processor) { $this->processors[$name] = $processor; } public function grant(Request $request) { $client = $this->clientObtainer->getClient($request); $grantType = $this->getGrantTypeFromRequest($request); if (!$client->hasAllowedGrantType($grantType)) { throw new UnauthorizedClientForGrantTypeOAuthErrorException(); } $inputData = $this->getInputDataFromRequest($request); return $this->findProcessor($grantType)->process($client, $inputData); } private function getGrantTypeFromRequest(Request $request) { if (!$request->request->has('grant_type')) { throw new GrantTypeNotFoundOAuthErrorException(); } return $request->request->get('grant_type'); } /** * @return TokenGrantTypeProcessorInterface */ private function findProcessor($grantType) { if (f\contains($this->processors, $grantType)) { return f\get($this->processors, $grantType); } throw new UnsupportedGrantTypeOAuthErrorException(); } private function getInputDataFromRequest(Request $request) { return f\dissoc($request->request->all(), 'grant_type'); } }
Java
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>metacoq-safechecker: 6 m 37 s</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.8.1 / metacoq-safechecker - 1.0~alpha+8.8</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> metacoq-safechecker <small> 1.0~alpha+8.8 <span class="label label-success">6 m 37 s</span> </small> </h1> <p><em><script>document.write(moment("2020-09-01 14:15:30 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2020-09-01 14:15:30 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-num base Num library distributed with the OCaml compiler base-threads base base-unix base camlp5 7.12 Preprocessor-pretty-printer of OCaml conf-findutils 1 Virtual package relying on findutils conf-m4 1 Virtual package relying on m4 coq 8.8.1 Formal proof management system. num 0 The Num library for arbitrary-precision integer and rational arithmetic ocaml 4.05.0 The OCaml compiler (virtual package) ocaml-base-compiler 4.05.0 Official 4.05.0 release ocaml-config 1 OCaml Switch Configuration ocamlfind 1.8.1 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;matthieu.sozeau@inria.fr&quot; homepage: &quot;https://metacoq.github.io/metacoq&quot; dev-repo: &quot;git+https://github.com/MetaCoq/metacoq.git#coq-8.8&quot; bug-reports: &quot;https://github.com/MetaCoq/metacoq/issues&quot; authors: [&quot;Abhishek Anand &lt;aa755@cs.cornell.edu&gt;&quot; &quot;Simon Boulier &lt;simon.boulier@inria.fr&gt;&quot; &quot;Cyril Cohen &lt;cyril.cohen@inria.fr&gt;&quot; &quot;Yannick Forster &lt;forster@ps.uni-saarland.de&gt;&quot; &quot;Fabian Kunze &lt;fkunze@fakusb.de&gt;&quot; &quot;Gregory Malecha &lt;gmalecha@gmail.com&gt;&quot; &quot;Matthieu Sozeau &lt;matthieu.sozeau@inria.fr&gt;&quot; &quot;Nicolas Tabareau &lt;nicolas.tabareau@inria.fr&gt;&quot; &quot;Théo Winterhalter &lt;theo.winterhalter@inria.fr&gt;&quot; ] license: &quot;MIT&quot; build: [ [&quot;sh&quot; &quot;./configure.sh&quot;] [make &quot;-j%{jobs}%&quot; &quot;-C&quot; &quot;safechecker&quot;] ] install: [ [make &quot;-C&quot; &quot;safechecker&quot; &quot;install&quot;] ] depends: [ &quot;ocaml&quot; {&gt; &quot;4.02.3&quot;} &quot;coq&quot; {&gt;= &quot;8.8&quot; &amp; &lt; &quot;8.9~&quot;} &quot;coq-metacoq-template&quot; {= version} &quot;coq-metacoq-checker&quot; {= version} &quot;coq-metacoq-pcuic&quot; {= version} ] synopsis: &quot;Implementation and verification of safe conversion and typechecking algorithms for Coq&quot; description: &quot;&quot;&quot; MetaCoq is a meta-programming framework for Coq. The SafeChecker modules provides a correct implementation of weak-head reduction, conversion and typechecking of Coq definitions and global environments. &quot;&quot;&quot; url { src: &quot;https://github.com/MetaCoq/metacoq/archive/1.0-alpha+8.8.tar.gz&quot; checksum: &quot;sha256=c2fe122ad30849e99c1e5c100af5490cef0e94246f8eb83f6df3f2ccf9edfc04&quot; }</pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install</h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-metacoq-safechecker.1.0~alpha+8.8 coq.8.8.1</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam list; echo; ulimit -Sv 4000000; timeout 2h opam install -y --deps-only coq-metacoq-safechecker.1.0~alpha+8.8 coq.8.8.1</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>22 m 44 s</dd> </dl> <h2>Install</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam list; echo; ulimit -Sv 16000000; timeout 2h opam install -y -v coq-metacoq-safechecker.1.0~alpha+8.8 coq.8.8.1</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>6 m 37 s</dd> </dl> <h2>Installation size</h2> <p>Total: 23 M</p> <ul> <li>10 M <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/MetaCoq/SafeChecker/PCUICSafeConversion.vo</code></li> <li>7 M <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/MetaCoq/SafeChecker/PCUICSafeReduce.vo</code></li> <li>2 M <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/MetaCoq/SafeChecker/PCUICSafeChecker.vo</code></li> <li>1 M <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/MetaCoq/SafeChecker/PCUICSafeRetyping.vo</code></li> <li>678 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/MetaCoq/SafeChecker/metacoq_safechecker_plugin.cmxs</code></li> <li>646 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/MetaCoq/SafeChecker/SafeTemplateChecker.vo</code></li> <li>623 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/MetaCoq/SafeChecker/Extraction.vo</code></li> <li>456 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/MetaCoq/SafeChecker/PCUICSafeConversion.glob</code></li> <li>254 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/MetaCoq/SafeChecker/PCUICSafeChecker.glob</code></li> <li>144 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/MetaCoq/SafeChecker/PCUICSafeReduce.glob</code></li> <li>141 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/MetaCoq/SafeChecker/metacoq_safechecker_plugin.cmi</code></li> <li>115 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/MetaCoq/SafeChecker/PCUICSafeConversion.v</code></li> <li>59 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/MetaCoq/SafeChecker/metacoq_safechecker_plugin.cmx</code></li> <li>58 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/MetaCoq/SafeChecker/PCUICSafeChecker.v</code></li> <li>51 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/MetaCoq/SafeChecker/PCUICSafeRetyping.glob</code></li> <li>49 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/MetaCoq/SafeChecker/PCUICSafeReduce.v</code></li> <li>37 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/MetaCoq/SafeChecker/Loader.vo</code></li> <li>17 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/MetaCoq/SafeChecker/SafeTemplateChecker.glob</code></li> <li>11 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/MetaCoq/SafeChecker/PCUICSafeRetyping.v</code></li> <li>6 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/MetaCoq/SafeChecker/metacoq_safechecker_plugin.cmxa</code></li> <li>6 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/MetaCoq/SafeChecker/SafeTemplateChecker.v</code></li> <li>2 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/MetaCoq/SafeChecker/Extraction.v</code></li> <li>1 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/MetaCoq/SafeChecker/Extraction.glob</code></li> <li>1 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/MetaCoq/SafeChecker/Loader.glob</code></li> <li>1 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/MetaCoq/SafeChecker/Loader.v</code></li> </ul> <h2>Uninstall</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq-metacoq-safechecker.1.0~alpha+8.8</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> <small>Sources are on <a href="https://github.com/coq-bench">GitHub</a>. © Guillaume Claret.</small> </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
Java
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>jmlcoq: Not compatible 👼</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.7.0 / jmlcoq - 8.13.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> jmlcoq <small> 8.13.0 <span class="label label-info">Not compatible 👼</span> </small> </h1> <p>📅 <em><script>document.write(moment("2021-12-26 20:28:19 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-12-26 20:28:19 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base camlp5 7.14 Preprocessor-pretty-printer of OCaml conf-findutils 1 Virtual package relying on findutils conf-perl 1 Virtual package relying on perl coq 8.7.0 Formal proof management system num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.08.1 The OCaml compiler (virtual package) ocaml-base-compiler 4.08.1 Official release 4.08.1 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.1 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;palmskog@gmail.com&quot; homepage: &quot;https://github.com/coq-community/jmlcoq&quot; dev-repo: &quot;git+https://github.com/coq-community/jmlcoq.git&quot; bug-reports: &quot;https://github.com/coq-community/jmlcoq/issues&quot; license: &quot;MIT&quot; synopsis: &quot;Coq definition of the JML specification language and a verified runtime assertion checker for JML&quot; description: &quot;&quot;&quot; A Coq formalization of the syntax and semantics of the Java-targeted JML specification language, along with a verified runtime assertion checker for JML.&quot;&quot;&quot; build: [make &quot;-j%{jobs}%&quot;] install: [make &quot;install&quot;] depends: [ &quot;coq&quot; {&gt;= &quot;8.10&quot; &amp; &lt; &quot;8.15~&quot;} ] tags: [ &quot;category:Computer Science/Decision Procedures and Certified Algorithms/Correctness proofs of algorithms&quot; &quot;keyword:JML&quot; &quot;keyword:Java Modeling Language&quot; &quot;keyword:runtime verification&quot; &quot;logpath:JML&quot; &quot;date:2021-08-01&quot; ] authors: [ &quot;Hermann Lehner&quot; &quot;David Pichardie&quot; &quot;Andreas Kägi&quot; ] url { src: &quot;https://github.com/coq-community/jmlcoq/archive/v8.13.0.tar.gz&quot; checksum: &quot;sha512=3d2742d4c8e7f643a35f636aa14292c43b7a91e3d18bcf998c62ee6ee42e9969b59ae803c513d114224725099cb369e62cef8575c3efb0cf26886d8bb8638cca&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install 🏜️</h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-jmlcoq.8.13.0 coq.8.7.0</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.7.0). The following dependencies couldn&#39;t be met: - coq-jmlcoq -&gt; coq &gt;= 8.10 Your request can&#39;t be satisfied: - No available version of coq satisfies the constraints No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-jmlcoq.8.13.0</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install 🚀</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣 </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
Java
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>propcalc: Not compatible 👼</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.6 / propcalc - 8.9.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> propcalc <small> 8.9.0 <span class="label label-info">Not compatible 👼</span> </small> </h1> <p>📅 <em><script>document.write(moment("2022-01-01 06:30:20 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-01-01 06:30:20 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-num base Num library distributed with the OCaml compiler base-threads base base-unix base camlp5 7.14 Preprocessor-pretty-printer of OCaml conf-findutils 1 Virtual package relying on findutils conf-perl 1 Virtual package relying on perl coq 8.6 Formal proof management system num 0 The Num library for arbitrary-precision integer and rational arithmetic ocaml 4.03.0 The OCaml compiler (virtual package) ocaml-base-compiler 4.03.0 Official 4.03.0 release ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.1 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;Hugo.Herbelin@inria.fr&quot; homepage: &quot;http://arxiv.org/abs/1503.08744&quot; license: &quot;BSD&quot; build: [make &quot;-j%{jobs}%&quot;] install: [make &quot;install&quot;] remove: [&quot;rm&quot; &quot;-R&quot; &quot;%{lib}%/coq/user-contrib/PropCalc&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.9&quot; &amp; &lt; &quot;8.10~&quot;} ] tags: [ &quot;keyword: propositional calculus&quot; &quot;keyword: classical logic&quot; &quot;keyword: completeness&quot; &quot;keyword: natural deduction&quot; &quot;keyword: sequent calculus&quot; &quot;keyword: cut elimination&quot; &quot;category: Mathematics/Logic/Foundations&quot; ] authors: [ &quot;Floris van Doorn &lt;fpvdoorn@gmail.com&gt; [http://www.contrib.andrew.cmu.edu/~fpv/]&quot; ] bug-reports: &quot;https://github.com/coq-contribs/propcalc/issues&quot; dev-repo: &quot;git+https://github.com/coq-contribs/propcalc.git&quot; synopsis: &quot;Propositional Calculus&quot; description: &quot;&quot;&quot; Formalization of basic theorems about classical propositional logic. The main theorems are (1) the soundness and completeness of natural deduction calculus, (2) the equivalence between natural deduction calculus, Hilbert systems and sequent calculus and (3) cut elimination for sequent calculus.&quot;&quot;&quot; flags: light-uninstall url { src: &quot;https://github.com/coq-contribs/propcalc/archive/v8.9.0.tar.gz&quot; checksum: &quot;md5=026cadcf7d43c7ed9212266633005efd&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install 🏜️</h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-propcalc.8.9.0 coq.8.6</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.6). The following dependencies couldn&#39;t be met: - coq-propcalc -&gt; coq &gt;= 8.9 -&gt; ocaml &gt;= 4.05.0 base of this switch (use `--unlock-base&#39; to force) Your request can&#39;t be satisfied: - No available version of coq satisfies the constraints No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-propcalc.8.9.0</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install 🚀</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣 </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
Java
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>karatsuba: Not compatible 👼</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.7.1+1 / karatsuba - 8.6.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> karatsuba <small> 8.6.0 <span class="label label-info">Not compatible 👼</span> </small> </h1> <p>📅 <em><script>document.write(moment("2021-12-16 13:27:32 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-12-16 13:27:32 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base camlp5 7.14 Preprocessor-pretty-printer of OCaml conf-findutils 1 Virtual package relying on findutils conf-perl 1 Virtual package relying on perl coq 8.7.1+1 Formal proof management system num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.07.1 The OCaml compiler (virtual package) ocaml-base-compiler 4.07.1 Official release 4.07.1 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.1 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;Hugo.Herbelin@inria.fr&quot; homepage: &quot;https://github.com/coq-contribs/karatsuba&quot; license: &quot;Unknown&quot; build: [make &quot;-j%{jobs}%&quot;] install: [make &quot;install&quot;] remove: [&quot;rm&quot; &quot;-R&quot; &quot;%{lib}%/coq/user-contrib/Karatsuba&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.6&quot; &amp; &lt; &quot;8.7~&quot;} ] tags: [ &quot;keyword: Karatsuba multiplication&quot; &quot;keyword: binary ring&quot; &quot;category: Mathematics/Arithmetic and Number Theory/Number theory&quot; &quot;date: 2005-09-15&quot; ] authors: [ &quot;Russell O&#39;Connor &lt;r.oconnor@cs.ru.nl&gt; [http://r6.ca/]&quot; ] bug-reports: &quot;https://github.com/coq-contribs/karatsuba/issues&quot; dev-repo: &quot;git+https://github.com/coq-contribs/karatsuba.git&quot; synopsis: &quot;Karatsuba&#39;s Multiplication&quot; description: &quot;&quot;&quot; http://r6.ca/Karatsuba/ An implementation of Karatsuba&#39;s Multiplication algorithm&quot;&quot;&quot; flags: light-uninstall url { src: &quot;https://github.com/coq-contribs/karatsuba/archive/v8.6.0.tar.gz&quot; checksum: &quot;md5=2d6f0f166881f47310c6b3f772f747ed&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install 🏜️</h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-karatsuba.8.6.0 coq.8.7.1+1</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.7.1+1). The following dependencies couldn&#39;t be met: - coq-karatsuba -&gt; coq &lt; 8.7~ -&gt; ocaml &lt; 4.06.0 base of this switch (use `--unlock-base&#39; to force) No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-karatsuba.8.6.0</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install 🚀</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣 </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
Java
package com.flockinger.spongeblogSP.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import springfox.documentation.builders.ApiInfoBuilder; import springfox.documentation.builders.RequestHandlerSelectors; import springfox.documentation.service.ApiInfo; import springfox.documentation.spi.DocumentationType; import springfox.documentation.spring.web.plugins.Docket; import springfox.documentation.swagger2.annotations.EnableSwagger2; @Configuration @EnableSwagger2 public class SwaggerConfig { ApiInfo apiInfo() { return new ApiInfoBuilder().title("SpongeblogSP API").description("Spongeblog blogging API") .license("").licenseUrl("http://unlicense.org").termsOfServiceUrl("").version("1.0.0") .build(); } @Bean public Docket customImplementation() { return new Docket(DocumentationType.SWAGGER_2).select() .apis(RequestHandlerSelectors.basePackage("com.flockinger.spongeblogSP.api.impl")).build() .directModelSubstitute(org.joda.time.LocalDate.class, java.sql.Date.class) .directModelSubstitute(org.joda.time.DateTime.class, java.util.Date.class) .apiInfo(apiInfo()); } }
Java
--- title: "Does detecting a Minimally Conscious State in the ICU matter ?" date: 2017-11-22 00:00:00 categories: [Publi] tags: [Disorders of Consciousness, ICU, Consciousness, MyPublications] --- Our paper entitled **"Survival and consciousness recovery are better in the minimally conscious state than in the vegetative state"** showing how much it is important to detect Minimally Conscious State (MCS) even early after a brain injury (here <90 days in the ICU) is available online on [*Brain Injury*](http://www.tandfonline.com.gate2.inist.fr/doi/full/10.1080/02699052.2017.1364421). Survival and, more importantly, **recovery of consciousness with at least a partial autonomy** (GOSE>3) were more frequent if a patient was diagnosed MCS (47%, in comparison to only 3% for patients in a Vegetative State); see figure below). ![Brain_Injury]({{ site.url }}/images/Brain_injury/Brain_Injury.jpeg) ___ ![Fig-1]({{ site.url }}/images/MCS_prognosis/MCS_prog1.jpeg) ***Functional outcome in patients in the vegetative (VS/UWS) and the minimally conscious state (MCS).*** Histograms of vegetative state (aka Unresponsive Wakefulenss Syndrome - VS/UWS) and MCS outcomes evaluated with the [GOSE scale]({{ site.url }}/2017/Post_GOS-E/). Delay from acute brain injury and outcome was ~16 months. GOSE = 4 corresponds to a patient with a severe disability but conscious and who can be left at least 8h during the day without assistance. --- **Reference:** Faugeras F, Rohaut B, Valente M, Sitt J.D, Demeret S, Bolgert F, et al. *Survival and consciousness recovery are better in the minimally conscious state than in the vegetative state*. [Brain Injury](http://www.tandfonline.com.gate2.inist.fr/doi/full/10.1080/02699052.2017.1364421). 2018 Jan;32:72-77. <script type="text/javascript"> reddit_url = "https://doi.org/10.1080/02699052.2017.1364421"; reddit_title = "Survival and consciousness recovery are better in the minimally conscious state than in the vegetative state"; reddit_newwindow='1'; </script> <script type="text/javascript" src="//www.redditstatic.com/button/button3.js"></script> <script type='text/javascript' src='https://d1bxh8uas1mnw7.cloudfront.net/assets/embed.js'></script> <div data-badge-popover="right" class='altmetric-embed' data-badge-type='donut' data-hide-less-than='1' data-doi="/10.1080/02699052.2017.1364421"></div>
Java
<nav class="navbar navbar-default navbar-fixed-top"> <div class="container-fluid"> <!-- Brand and toggle get grouped for better mobile display --> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="/#/"><i class="fa fa-calendar-check-o"></i> BetterMe</a> </div> <div class="collapse navbar-collapse navbar-right" id="bs-example-navbar-collapse-1"> <ul class="nav navbar-nav"> <li><a href="#/profile">Profile <span class="sr-only">(current)</span></a></li> <li><a href="#/calendar">Calendar</a></li> <li><a href="#/regimen">Regimens</a></li> <li><a href="#/invite">Invites</a></li> <li><a href="#/regimen/find">Find Regimens</a></li> <li class="active"><a href="#/admin">Admin</a></li> <li><a href="" ng-click="model.logout()">Logout</a></li> </ul> </div> </div> </nav> <h1>Admin</h1> <ul class="list-group col-md-6"> <input ng-model="model.userSearchTerm" class="form-control" placeholder="Search By User's Email" ng-change="model.updateDisplayedUsers()"> <table ng-if="model.displayedUsers.length" class="table table-hover"> <thead> <tr> <th></th> <th>Email</th> <th>First</th> <th>Last</th> <th>Admin</th> </tr> </thead> <tbody> <tr ng-repeat="user in model.displayedUsers" ng-click="model.redirectToUserDetails(user._id)"> <td ng-click="model.deleteUser(user._id)"><i class="fa fa-trash" aria-hidden="true"></i></td> <td>{{user.email}}</td> <td>{{user.firstName}}</td> <td>{{user.lastName}}</td> <td>{{user.admin}}</td> </tr> </tbody> </table> </ul> <ul class="list-group col-md-6"> <input ng-model="model.regimenSearchTerm" class="form-control" placeholder="Search By Regimen or Coach" ng-change="model.updateDisplayedRegimens()"> <table ng-if="model.displayedRegimens.length" class="table table-hover"> <thead> <tr> <th></th> <th>Title</th> <th>Coach</th> <th>Start</th> <th>End</th> </tr> </thead> <tbody> <tr ng-repeat="regimen in model.displayedRegimens" ng-click="model.redirectToRegimenDetails(regimen._id)"> <td ng-click="model.deleteRegimen(regimen._id)"><i class="fa fa-trash" aria-hidden="true"></i></td> <td>{{regimen.title}}</td> <td>{{regimen._coach.email}}</td> <td>{{model.displayDate(regimen.start)}}</td> <td>{{model.displayDate(regimen.end)}}</td> </tr> </tbody> </table> </ul>
Java
import {keccak256, bufferToHex} from "ethereumjs-util" export default class MerkleTree { constructor(elements) { // Filter empty strings and hash elements this.elements = elements.filter(el => el).map(el => keccak256(el)) // Deduplicate elements this.elements = this.bufDedup(this.elements) // Sort elements this.elements.sort(Buffer.compare) // Create layers this.layers = this.getLayers(this.elements) } getLayers(elements) { if (elements.length === 0) { return [[""]] } const layers = [] layers.push(elements) // Get next layer until we reach the root while (layers[layers.length - 1].length > 1) { layers.push(this.getNextLayer(layers[layers.length - 1])) } return layers } getNextLayer(elements) { return elements.reduce((layer, el, idx, arr) => { if (idx % 2 === 0) { // Hash the current element with its pair element layer.push(this.combinedHash(el, arr[idx + 1])) } return layer }, []) } combinedHash(first, second) { if (!first) { return second } if (!second) { return first } return keccak256(this.sortAndConcat(first, second)) } getRoot() { return this.layers[this.layers.length - 1][0] } getHexRoot() { return bufferToHex(this.getRoot()) } getProof(el) { let idx = this.bufIndexOf(el, this.elements) if (idx === -1) { throw new Error("Element does not exist in Merkle tree") } return this.layers.reduce((proof, layer) => { const pairElement = this.getPairElement(idx, layer) if (pairElement) { proof.push(pairElement) } idx = Math.floor(idx / 2) return proof }, []) } getHexProof(el) { const proof = this.getProof(el) return this.bufArrToHexArr(proof) } getPairElement(idx, layer) { const pairIdx = idx % 2 === 0 ? idx + 1 : idx - 1 if (pairIdx < layer.length) { return layer[pairIdx] } else { return null } } bufIndexOf(el, arr) { let hash // Convert element to 32 byte hash if it is not one already if (el.length !== 32 || !Buffer.isBuffer(el)) { hash = keccak256(el) } else { hash = el } for (let i = 0; i < arr.length; i++) { if (hash.equals(arr[i])) { return i } } return -1 } bufDedup(elements) { return elements.filter((el, idx) => { return this.bufIndexOf(el, elements) === idx }) } bufArrToHexArr(arr) { if (arr.some(el => !Buffer.isBuffer(el))) { throw new Error("Array is not an array of buffers") } return arr.map(el => "0x" + el.toString("hex")) } sortAndConcat(...args) { return Buffer.concat([...args].sort(Buffer.compare)) } }
Java
// // peas.js // // tree data structure in javascript // ////////////////////////// var peas = function() { // "sub" here is used as an object container for // operations related to sub nodes. // Each pea node will have a "sub" property // with an instance of "sub" var sub = function() {} // the current node is accesable as "this.pea", from // methods in the "sub" object sub.prototype.pea = null // first and last sub sub.prototype.first = null sub.prototype.last = null // number of sub nodes sub.prototype.n = 0 // get subnode at index position (0 index) sub.prototype.at = function( index ) { var pik,i if( index > this.pea.sub.n - 1 ) return null pik = this.pea.sub.first for( i=0; i<index; i++ ) pik = pik.next return pik } // add spare node at last position // returns the added node sub.prototype.add = function( spare ) { if( this.pea.sub.last ) { spare.prev = this.pea.sub.last this.pea.sub.last.next = spare this.pea.sub.last = spare } else { spare.prev = null this.pea.sub.first = spare this.pea.sub.last = spare } spare.top = this.pea spare.next = null this.pea.sub.n++ return spare } // insert sub node at index position // returns the inserted node sub.prototype.insertAt = function( spare, index ) { var pik // validate index given if( index < 0 ) throw "node insert failed, invalid index" if( index > this.pea.sub.n ) throw "node insert failed, given index exceeds valid places" // if insert at last+1, then just add if( index == this.pea.sub.n ) { this.pea.add( spare ) return } pik = this.pea.sub.at( index ) spare.prev = pik.prev spare.next = pik // if not inserting at first if( pik.prev ) { pik.prev.next = spare } else { // inserting as first pik.top.sub.first = spare } pik.prev = spare spare.top = this.pea this.pea.sub.n++ return spare } // executes function "action" on each direct // sub node (not recursive) sub.prototype.each = function( action ) { var node = this.pea.sub.first while( node ) { action( node ) node = node.next } } /////////////////////////// // constructor function for pea nodes peas = function( item ) { this.sub = new sub() this.sub.pea = this this.item = item } peas.prototype.item = null // top node peas.prototype.top = null // prev peas.prototype.prev = null // next peas.prototype.next = null // namespace for sub nodes peas.prototype.sub = {} // find the root node, of the tree // of this node peas.prototype.root = function() { var node = this while ( node.top ) node = node.top } // executes function func on all the tree // nodes below (recursively) peas.prototype.onAllBelow = function( action ) { var node = this.sub.first while( node ) { action( node ) if( node.sub.n > 0 ) nodeMethods.each( action ) node = node.next } } // removes this node from tree, leaving // other tree nodes in consistent state peas.prototype.rip = function() { if( ! this.top ) return this if( this.next ) this.next.prev = this.prev if( this.prev ) this.prev.next = this.next if( this.top.sub.last == this ) this.top.sub.last = this.prev if( this.top.sub.first == this ) this.top.sub.first = this.next this.top.sub.n-- this.top = null this.next = null this.prev = null return this } // returns an array containing all nodes below this, in the tree peas.prototype.flat = function() { var flat = [] var grab = function( node ) { flat.push( node ) } root.onAllBelow( grab ) return flat } // puts spare node in the tree, // before of this node. // returns the inserted node peas.prototype.putBefore = function( spare ) { if( ! this.top ) throw "not in a tree" if ( this.prev ) this.prev.next = spare if( this.top.sub.first == this ) this.top.sub.first = spare spare.next = this spare.prev = this.prev this.prev = spare spare.top = this.top this.top.sub.n++ return spare } return peas }()
Java
<!DOCTYPE html><html><head><meta charset="utf-8"><title>Untitled Document</title><style>/* * 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. * * Detailed information about this CSS: h5bp.com/css */ /* * Ported to Stylus * by @flowonyx * * Any changes are released to the Public Domain. * */ [hidden] { display: none; } ::-moz-selection { background: #087185; color: #fff; text-shadow: none; } ::selection { background: #087185; color: #fff; text-shadow: none; } a:visited { color: #551a8b; } b { font-weight: bold; } dfn { font-style: italic; } hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; } ins { background: #ff9; color: #000; text-decoration: none; } mark { background: #ff0; color: #000; font-style: italic; font-weight: bold; } pre, code, kbd, samp { font-family: monospace, serif; _font-family: 'courier new', monospace; } kbd, samp { font-size: 1em; } pre { word-wrap: break-word; } q { quotes: none; } q:before, q:after { content: none; } nav ul, nav ol, list-style: none { list-style-image: none; margin: 0; padding: 0; } img { vertical-align: middle; } svg:not(:root) { overflow: hidden; } figure { margin: 0; } label { cursor: pointer; } legend { *margin-left: -7px; white-space: normal; } button, input[type="button"], input[type="reset"], input[type="submit"] { *overflow: visible; } button[disabled], input[disabled] { cursor: default; } input[type="checkbox"], input[type="radio"] { box-sizing: border-box; padding: 0; *width: 13px; *height: 13px; } textarea { resize: vertical; } input:valid, textarea:valid, input:invalid, textarea:invalid { background-color: #f0dddd; } .chromeframe { margin: 0.2em 0; background: #ccc; color: #000; padding: 0.2em 0; } /* * Bootstrap v2.0.0 * * Copyright 2012 Twitter, Inc * Licensed under the Apache License v2.0 * http://www.apache.org/licenses/LICENSE-2.0 * * Designed and built with all the love in the world @twitter by @mdo and @fat. */ /* * Bootstrap v2.0.1 * * Copyright 2012 Twitter, Inc * Licensed under the Apache License v2.0 * http://www.apache.org/licenses/LICENSE-2.0 * * Designed and built with all the love in the world @twitter by @mdo and @fat. */ .clearfix { zoom: 1; } .clearfix:before, .clearfix:after { display: table; content: ""; zoom: 1; } .clearfix:after { clear: both; } .center-block { display: block; margin-left: auto; margin-right: auto; } .fixed-container { width: siteWidth; margin-left: auto; margin-right: auto; zoom: 1; } .fixed-container:before, .fixed-container:after { display: table; content: ""; zoom: 1; } .fixed-container:after { clear: both; } article, aside, details, figcaption, figure, footer, header, hgroup, nav, section { display: block; } audio, canvas, video { display: inline-block; *display: inline; *zoom: 1; } audio:not([controls]) { display: none; } html { font-size: 100%; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; } a:focus { outline: thin dotted #333; outline: 5px auto -webkit-focus-ring-color; outline-offset: -2px; } a:hover, a:active { outline: 0; } sub, sup { position: relative; font-size: 75%; line-height: 0; vertical-align: baseline; } sup { top: -0.5em; } sub { bottom: -0.25em; } img { max-width: 100%; height: auto; border: 0; -ms-interpolation-mode: bicubic; } button, input, select, textarea { margin: 0; font-size: 100%; vertical-align: middle; } button, input { *overflow: visible; line-height: normal; } button::-moz-focus-inner, input::-moz-focus-inner { padding: 0; border: 0; } button, input[type="button"], input[type="reset"], input[type="submit"] { cursor: pointer; -webkit-appearance: button; } input[type="search"] { -webkit-appearance: textfield; -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; } input[type="search"]::-webkit-search-decoration, input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; } textarea { overflow: auto; vertical-align: top; } .clearfix { *zoom: 1; } .clearfix:before, .clearfix:after { display: table; content: ""; } .clearfix:after { clear: both; } body { margin: 0; font-family: "Arvo", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px; color: #444; background-color: #fff; } a { color: #525252; text-decoration: none; } a:hover { color: #464646; text-decoration: underline; } .row { margin-left: -20px; *zoom: 1; } .row:before, .row:after { display: table; content: ""; } .row:after { clear: both; } [class*="span"] { float: left; margin-left: 20px; } .span1 { width: 60px; } .span2 { width: 140px; } .span3 { width: 220px; } .span4 { width: 300px; } .span5 { width: 380px; } .span6 { width: 460px; } .span7 { width: 540px; } .span8 { width: 620px; } .span9 { width: 700px; } .span10 { width: 780px; } .span11 { width: 860px; } .span12, .container { width: 940px; } .offset1 { margin-left: 100px; } .offset2 { margin-left: 180px; } .offset3 { margin-left: 260px; } .offset4 { margin-left: 340px; } .offset5 { margin-left: 420px; } .offset6 { margin-left: 500px; } .offset7 { margin-left: 580px; } .offset8 { margin-left: 660px; } .offset9 { margin-left: 740px; } .offset10 { margin-left: 820px; } .offset11 { margin-left: 900px; } .row-fluid { width: 100%; *zoom: 1; } .row-fluid:before, .row-fluid:after { display: table; content: ""; } .row-fluid:after { clear: both; } .row-fluid > [class*="span"] { float: left; margin-left: 2.127659574%; } .row-fluid > [class*="span"]:first-child { margin-left: 0; } .row-fluid .span1 { width: 6.382978723%; } .row-fluid .span2 { width: 13.037573561812584%; } .row-fluid .span3 { width: 19.963784516437755%; } .row-fluid .span4 { width: 27.16161158687551%; } .row-fluid .span5 { width: 34.63105477312585%; } .row-fluid .span6 { width: 42.37211407518877%; } .row-fluid .span7 { width: 50.38478949306428%; } .row-fluid .span8 { width: 58.66908102675237%; } .row-fluid .span9 { width: 67.22498867625306%; } .row-fluid .span10 { width: 76.05251244156632%; } .row-fluid .span11 { width: 85.15165232269217%; } .row-fluid .span12 { width: 94.5224083196306%; } .container { width: 940px; margin-left: auto; margin-right: auto; *zoom: 1; } .container:before, .container:after { display: table; content: ""; } .container:after { clear: both; } .container-fluid { padding-left: 20px; padding-right: 20px; *zoom: 1; } .container-fluid:before, .container-fluid:after { display: table; content: ""; } .container-fluid:after { clear: both; } p { margin: 0 0 9px; font-family: "Arvo", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px; } p small { font-size: 11px; color: #999; } .lead { margin-bottom: 18px; font-size: 20px; font-weight: 200; line-height: 27px; } h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: bold; color: #444; text-rendering: optimizelegibility; } h1 small, h2 small, h3 small, h4 small, h5 small, h6 small { font-weight: normal; color: #999; } h1 { font-size: 30px; line-height: 36px; } h1 small { font-size: 18px; } h2 { font-size: 24px; line-height: 36px; } h2 small { font-size: 18px; } h3 { line-height: 27px; font-size: 18px; } h3 small { font-size: 14px; } h4, h5, h6 { line-height: 18px; } h4 { font-size: 14px; } h4 small { font-size: 12px; } h5 { font-size: 12px; } h6 { font-size: 11px; color: #999; text-transform: uppercase; } .page-header { padding-bottom: 17px; margin: 18px 0; border-bottom: 1px solid #eee; } .page-header h1 { line-height: 1; } ul, ol { padding: 0; margin: 0 0 9px 25px; } ul ul, ul ol, ol ol, ol ul { margin-bottom: 0; } ul { list-style: disc; } ol { list-style: decimal; } li { line-height: 18px; } ul.unstyled, ol.unstyled { margin-left: 0; list-style: none; } dl { margin-bottom: 18px; } dt, dd { line-height: 18px; } dt { font-weight: bold; } dd { margin-left: 9px; } hr { margin: 18px 0; border: 0; border-top: 1px solid #eee; border-bottom: 1px solid #fff; } strong { font-weight: bold; } em { font-style: italic; } .muted { color: #999; } abbr { font-size: 90%; text-transform: uppercase; border-bottom: 1px dotted #ddd; cursor: help; } blockquote { padding: 0 0 0 15px; margin: 0 0 18px; border-left: 5px solid #eee; } blockquote p { margin-bottom: 0; font-size: 16px; font-weight: 300; line-height: 22.5px; } blockquote small { display: block; line-height: 18px; color: #999; } blockquote small:before { content: '\2014 \00A0'; } blockquote.pull-right { float: right; padding-left: 0; padding-right: 15px; border-left: 0; border-right: 5px solid #eee; } blockquote.pull-right p, blockquote.pull-right small { text-align: right; } q:before, q:after, blockquote:before, blockquote:after { content: ""; } address { display: block; margin-bottom: 18px; line-height: 18px; font-style: normal; } small { font-size: 100%; } cite { font-style: normal; } code, pre { padding: 0 3px 2px; font-family: Menlo, Monaco, "Courier New", monospace; font-size: 12px; color: #444; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; } code { padding: 3px 4px; color: #d14; background-color: #f7f7f9; border: 1px solid #e1e1e8; } pre { display: block; padding: 8.5px; margin: 0 0 9px; font-size: 12px; line-height: 18px; background-color: #f5f5f5; border: 1px solid #ccc; border: 1px solid rgba(0,0,0,0.15); -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; white-space: pre; white-space: pre-wrap; word-break: break-all; word-wrap: break-word; } pre.prettyprint { margin-bottom: 18px; } pre code { padding: 0; color: inherit; background-color: transparent; border: 0; } .pre-scrollable { max-height: 340px; overflow-y scroll } .hljs { display: block; padding: 0.5em; color: #333; background: #f8f8f8; } .hljs-comment, .hljs-template_comment, .diff .hljs-header, .hljs-javadoc { color: #998; font-style: italic; } .hljs-keyword, .css .rule .hljs-keyword, .hljs-winutils, .javascript .hljs-title, .nginx .hljs-title, .hljs-subst, .hljs-request, .hljs-status { color: #333; font-weight: bold; } .hljs-number, .hljs-hexcolor, .ruby .hljs-constant { color: #099; } .hljs-string, .hljs-tag .hljs-value, .hljs-phpdoc, .tex .hljs-formula { color: #d14; } .hljs-title, .hljs-id, .coffeescript .hljs-params, .scss .hljs-preprocessor { color: #900; font-weight: bold; } .javascript .hljs-title, .lisp .hljs-title, .clojure .hljs-title, .hljs-subst { font-weight: normal; } .hljs-class .hljs-title, .haskell .hljs-type, .vhdl .hljs-literal, .tex .hljs-command { color: #458; font-weight: bold; } .hljs-tag, .hljs-tag .hljs-title, .hljs-rules .hljs-property, .django .hljs-tag .hljs-keyword { color: #000080; font-weight: normal; } .hljs-attribute, .hljs-variable, .lisp .hljs-body { color: #008080; } .hljs-regexp { color: #009926; } .hljs-symbol, .ruby .hljs-symbol .hljs-string, .lisp .hljs-keyword, .tex .hljs-special, .hljs-prompt { color: #990073; } .hljs-built_in, .lisp .hljs-title, .clojure .hljs-built_in { color: #0086b3; } .hljs-preprocessor, .hljs-pragma, .hljs-pi, .hljs-doctype, .hljs-shebang, .hljs-cdata { color: #999; font-weight: bold; } .hljs-deletion { background: #fdd; } .hljs-addition { background: #dfd; } .diff .hljs-change { background: #0086b3; } .hljs-chunk { color: #aaa; } code, pre { font-family: Consolas, "Liberation Mono", Courier, monospace !important; } form { margin: 0 0 18px; } fieldset { padding: 0; margin: 0; border: 0; } legend { display: block; width: 100%; padding: 0; margin-bottom: 27px; font-size: 19.5px; line-height: 36px; color: #444; border: 0; border-bottom: 1px solid #eee; } legend small { font-size: 13.5px; color: #999; } label, input, button, select, textarea { font-size: 13px; font-weight: normal; line-height: 18px; } input, button, select, textarea { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; } label { display: block; margin-bottom: 5px; color: #444; } input, textarea, select, .uneditable-input { display: inline-block; width: 210px; height: 18px; padding: 4px; margin-bottom: 9px; font-size: 13px; line-height: 18px; color: #555; border: 1px solid #ccc; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; } .uneditable-textarea { width: auto; height: auto; } label input, label textarea, label select { display: block; } input[type="image"], input[type="checkbox"], input[type="radio"] { width: auto; height: auto; padding: 0; margin: 3px 0; *margin-top: 0; /* IE7 */ line-height: normal; cursor: pointer; -webkit-border-radius: 0; -moz-border-radius: 0; border-radius: 0; border: 0 \9; /* IE9 and down */ } input[type="image"] { border: 0; } input[type="file"] { width: auto; padding: initial; line-height: initial; border: initial; background-color: #fff; background-color: initial; -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; } input[type="button"], input[type="reset"], input[type="submit"] { width: auto; height: auto; } select, input[type="file"] { height: 28px; /* In IE7, the height of the select element cannot be changed by height, only font-size */ *margin-top: 4px; /* For IE7, add top margin to align select with labels */ line-height: 28px; } input[type="file"] { line-height: 18px \9; } select { width: 220px; background-color: #fff; } select[multiple], select[size] { height: auto; } input[type="image"] { -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; } textarea { height: auto; } input[type="hidden"] { display: none; } .radio, .checkbox { padding-left: 18px; } .radio input[type="radio"], .checkbox input[type="checkbox"] { float: left; margin-left: -18px; } .controls > .radio:first-child, .controls > .checkbox:first-child { padding-top: 5px; } .radio.inline, .checkbox.inline { display: inline-block; padding-top: 5px; margin-bottom: 0; vertical-align: middle; } .radio.inline + .radio.inline, .checkbox.inline + .checkbox.inline { margin-left: 10px; } input, textarea { -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075); -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075); box-shadow: inset 0 1px 1px rgba(0,0,0,0.075); -webkit-transition: border linear 0.2s, box-shadow linear 0.2s; -moz-transition: border linear 0.2s, box-shadow linear 0.2s; -ms-transition: border linear 0.2s, box-shadow linear 0.2s; -o-transition: border linear 0.2s, box-shadow linear 0.2s; transition: border linear 0.2s, box-shadow linear 0.2s; } input:focus, textarea:focus { border-color: rgba(82,168,236,0.8); -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075), 0 0 8px rgba(82,168,236,0.6); -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075), 0 0 8px rgba(82,168,236,0.6); box-shadow: inset 0 1px 1px rgba(0,0,0,0.075), 0 0 8px rgba(82,168,236,0.6); outline: 0; outline: thin dotted \9; /* IE6-9 */ } input[type="file"]:focus, input[type="radio"]:focus, input[type="checkbox"]:focus, select:focus { -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; outline: thin dotted #333; outline: 5px auto -webkit-focus-ring-color; outline-offset: -2px; } .input-mini { width: 60px; } .input-small { width: 90px; } .input-medium { width: 150px; } .input-large { width: 210px; } .input-xlarge { width: 270px; } .input-xxlarge { width: 530px; } input[class*="span"], select[class*="span"], textarea[class*="span"], .uneditable-input { float: none; margin-left: 0; } input.span1, textarea.span1, .uneditable-input.span1 { width: 50px; } input.span2, textarea.span2, .uneditable-input.span2 { width: 130px; } input.span3, textarea.span3, .uneditable-input.span3 { width: 210px; } input.span4, textarea.span4, .uneditable-input.span4 { width: 290px; } input.span5, textarea.span5, .uneditable-input.span5 { width: 370px; } input.span6, textarea.span6, .uneditable-input.span6 { width: 450px; } input.span7, textarea.span7, .uneditable-input.span7 { width: 530px; } input.span8, textarea.span8, .uneditable-input.span8 { width: 610px; } input.span9, textarea.span9, .uneditable-input.span9 { width: 690px; } input.span10, textarea.span10, .uneditable-input.span10 { width: 770px; } input.span11, textarea.span11, .uneditable-input.span11 { width: 850px; } input.span12, textarea.span12, .uneditable-input.span12 { width: 930px; } input[disabled], select[disabled], textarea[disabled], input[readonly], select[readonly], textarea[readonly] { background-color: #f5f5f5; border-color: #ddd; cursor: not-allowed; } .control-group.warning > label, .control-group.warning .help-block, .control-group.warning .help-inline { color: #c09853; } .control-group.warning input, .control-group.warning select, .control-group.warning textarea { color: #c09853; border-color: #c09853; } .control-group.warning input:focus, .control-group.warning select:focus, .control-group.warning textarea:focus { border-color: #b58b42; -webkit-box-shadow: 0 0 6px #cfb07b; -moz-box-shadow: 0 0 6px #cfb07b; box-shadow: 0 0 6px #cfb07b; } .control-group.warning .input-prepend .add-on, .control-group.warning .input-append .add-on { color: #c09853; background-color: #fcf8e3; border-color: #c09853; } .control-group.error > label, .control-group.error .help-block, .control-group.error .help-inline { color: #b94a48; } .control-group.error input, .control-group.error select, .control-group.error textarea { color: #b94a48; border-color: #b94a48; } .control-group.error input:focus, .control-group.error select:focus, .control-group.error textarea:focus { border-color: #a74240; -webkit-box-shadow: 0 0 6px #c76f6d; -moz-box-shadow: 0 0 6px #c76f6d; box-shadow: 0 0 6px #c76f6d; } .control-group.error .input-prepend .add-on, .control-group.error .input-append .add-on { color: #b94a48; background-color: #f2dede; border-color: #b94a48; } .control-group.success > label, .control-group.success .help-block, .control-group.success .help-inline { color: #468847; } .control-group.success input, .control-group.success select, .control-group.success textarea { color: #468847; border-color: #468847; } .control-group.success input:focus, .control-group.success select:focus, .control-group.success textarea:focus { border-color: #3f7a40; -webkit-box-shadow: 0 0 6px #54a355; -moz-box-shadow: 0 0 6px #54a355; box-shadow: 0 0 6px #54a355; } .control-group.success .input-prepend .add-on, .control-group.success .input-append .add-on { color: #468847; background-color: #dff0d8; border-color: #468847; } input:focus:required:invalid, textarea:focus:required:invalid, select:focus:required:invalid { color: #b94a48; border-color: #ee5f5b; } input:focus:required:invalid:focus, textarea:focus:required:invalid:focus, select:focus:required:invalid:focus { border-color: #eb423d; -webkit-box-shadow: 0 0 6px #f49997; -moz-box-shadow: 0 0 6px #f49997; box-shadow: 0 0 6px #f49997; } .form-actions { padding: 17px 20px 18px; margin-top: 18px; margin-bottom: 18px; background-color: #f5f5f5; border-top: 1px solid #ddd; } .uneditable-input { display: block; background-color: #fff; border-color: #eee; -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.025); -moz-box-shadow: inset 0 1px 2px rgba(0,0,0,0.025); box-shadow: inset 0 1px 2px rgba(0,0,0,0.025); cursor: not-allowed; } :-moz-placeholder { color: #999; } ::-webkit-input-placeholder { color: #999; } .help-block { display: block; margin-top: 5px; margin-bottom: 0; color: #999; } .help-inline { display: inline-block; *display: inline; /* IE7 inline-block hack */ *zoom: 1; margin-bottom: 9px; vertical-align: middle; padding-left: 5px; } .input-prepend, .input-append { margin-bottom: 5px; *zoom: 1; } .input-prepend:before, .input-append:before, .input-prepend:after, .input-append:after { display: table; content: ""; } .input-prepend:after, .input-append:after { clear: both; } .input-prepend input, .input-append input, .input-prepend .uneditable-input, .input-append .uneditable-input { -webkit-border-radius: 0 3px 3px 0; -moz-border-radius: 0 3px 3px 0; border-radius: 0 3px 3px 0; } .input-prepend input:focus, .input-append input:focus, .input-prepend .uneditable-input:focus, .input-append .uneditable-input:focus { position: relative; z-index: 2; } .input-prepend .uneditable-input, .input-append .uneditable-input { border-left-color: #ccc; } .input-prepend .add-on, .input-append .add-on { float: left; display: block; width: auto; min-width: 16px; height: 18px; margin-right: -1px; padding: 4px 5px; font-weight: normal; line-height: 18px; color: #999; text-align: center; text-shadow: 0 1px 0 #fff; background-color: #f5f5f5; border: 1px solid #ccc; -webkit-border-radius: 3px 0 0 3px; -moz-border-radius: 3px 0 0 3px; border-radius: 3px 0 0 3px; } .input-prepend .active, .input-append .active { background-color: #a9dba9; border-color: #46a546; } .input-prepend .add-on { *margin-top: 1px; /* IE6-7 */ } .input-append input, .input-append .uneditable-input { float: left; -webkit-border-radius: 3px 0 0 3px; -moz-border-radius: 3px 0 0 3px; border-radius: 3px 0 0 3px; } .input-append .uneditable-input { border-left-color: #eee; border-right-color: #ccc; } .input-append .add-on { margin-right: 0; margin-left: -1px; -webkit-border-radius: 0 3px 3px 0; -moz-border-radius: 0 3px 3px 0; border-radius: 0 3px 3px 0; } .input-append input:first-child { *margin-left: -160px; } .input-append input:first-child+.add-on { *margin-left: -21px; } .search-query { padding-left: 14px; padding-right: 14px; margin-bottom: 0; -webkit-border-radius: 14px; -moz-border-radius: 14px; border-radius: 14px; } .form-search input, .form-inline input, .form-horizontal input, .form-search textarea, .form-inline textarea, .form-horizontal textarea, .form-search select, .form-inline select, .form-horizontal select, .form-search .help-inline, .form-inline .help-inline, .form-horizontal .help-inline, .form-search .uneditable-input, .form-inline .uneditable-input, .form-horizontal .uneditable-input { display: inline-block; margin-bottom: 0; } .form-search .hide, .form-inline .hide, .form-horizontal .hide { display: none; } .form-search label, .form-inline label, .form-search .input-append, .form-inline .input-append, .form-search .input-prepend, .form-inline .input-prepend { display: inline-block; } .form-search .input-append .add-on, .form-inline .input-prepend .add-on, .form-search .input-append .add-on, .form-inline .input-prepend .add-on { vertical-align: middle; } .form-search .radio, .form-inline .radio, .form-search .checkbox, .form-inline .checkbox { margin-bottom: 0; vertical-align: middle; } .control-group { margin-bottom: 9px; } legend + .control-group { margin-top: 18px; -webkit-margin-top-collapse: separate; } .form-horizontal .control-group { margin-bottom: 18px; *zoom: 1; } .form-horizontal .control-group:before, .form-horizontal .control-group:after { display: table; content: ""; } .form-horizontal .control-group:after { clear: both; } .form-horizontal .control-label { float: left; width: 140px; padding-top: 5px; text-align: right; } .form-horizontal .controls { margin-left: 160px; } .form-horizontal .form-actions { padding-left: 160px; } table { max-width: 100%; border-collapse: collapse; border-spacing: 0; } .table { width: 100%; margin-bottom: 18px; } .table th, .table td { padding: 8px; line-height: 18px; text-align: left; vertical-align: top; border-top: 1px solid #ddd; } .table th { font-weight: bold; } .table thead th { vertical-align: bottom; } .table thead:first-child tr th, .table thead:first-child tr td { border-top: 0; } .table tbody + tbody { border-top: 2px solid #ddd; } .table-condensed th, .table-condensed td { padding: 4px 5px; } .table-bordered { border: 1px solid #ddd; border-collapse: separate; *border-collapse: collapsed; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; } .table-bordered th + th, .table-bordered td + td, .table-bordered th + td, .table-bordered td + th { border-left: 1px solid #ddd; } .table-bordered thead:first-child tr:first-child th, .table-bordered tbody:first-child tr:first-child th, .table-bordered tbody:first-child tr:first-child td { border-top: 0; } .table-bordered thead:first-child tr:first-child th:first-child, .table-bordered tbody:first-child tr:first-child td:first-child { -webkit-border-radius: 4px 0 0 0; -moz-border-radius: 4px 0 0 0; border-radius: 4px 0 0 0; } .table-bordered thead:first-child tr:first-child th:last-child, .table-bordered tbody:first-child tr:first-child td:last-child { -webkit-border-radius: 0 4px 0 0; -moz-border-radius: 0 4px 0 0; border-radius: 0 4px 0 0; } .table-bordered thead:last-child tr:last-child th:first-child, .table-bordered tbody:last-child tr:last-child td:first-child { -webkit-border-radius: 0 0 0 4px; -moz-border-radius: 0 0 0 4px; border-radius: 0 0 0 4px; } .table-bordered thead:last-child tr:last-child th:last-child, .table-bordered tbody:last-child tr:last-child td:last-child { -webkit-border-radius: 0 0 4px 0; -moz-border-radius: 0 0 4px 0; border-radius: 0 0 4px 0; } .table-striped tbody tr:nth-child(odd) td, .table-striped tbody tr:nth-child(odd) th { background-color: #f9f9f9; } .table tbody tr:hover td, .table tbody tr:hover th { background-color: #f5f5f5; } table .span1 { float: none; width: 44px; margin-left: 0; } table .span2 { float: none; width: 124px; margin-left: 0; } table .span3 { float: none; width: 204px; margin-left: 0; } table .span4 { float: none; width: 284px; margin-left: 0; } table .span5 { float: none; width: 364px; margin-left: 0; } table .span6 { float: none; width: 444px; margin-left: 0; } table .span7 { float: none; width: 524px; margin-left: 0; } table .span8 { float: none; width: 604px; margin-left: 0; } table .span9 { float: none; width: 684px; margin-left: 0; } table .span10 { float: none; width: 764px; margin-left: 0; } table .span11 { float: none; width: 844px; margin-left: 0; } table .span12 { float: none; width: 924px; margin-left: 0; } [class^="icon-"], [class*=" icon-"] { display: inline-block; width: 14px; height: 14px; line-height: 14px; vertical-align: text-top; background-image: url("../img/glyphicons-halflings.png"); background-position: 14px 14px; background-repeat: no-repeat; *margin-right: 0.3em; } [class^="icon-"]:last-child, [class*=" icon-"]:last-child { *margin-left: 0; } .icon-white { background-image: url("../img/glyphicons-halflings-white.png"); } .icon-glass { background-position: 0 0; } .icon-music { background-position: -24px 0; } .icon-search { background-position: -48px 0; } .icon-envelope { background-position: -72px 0; } .icon-heart { background-position: -96px 0; } .icon-star { background-position: -120px 0; } .icon-star-empty { background-position: -144px 0; } .icon-user { background-position: -168px 0; } .icon-film { background-position: -192px 0; } .icon-th-large { background-position: -216px 0; } .icon-th { background-position: -240px 0; } .icon-th-list { background-position: -264px 0; } .icon-ok { background-position: -288px 0; } .icon-remove { background-position: -312px 0; } .icon-zoom-in { background-position: -336px 0; } .icon-zoom-out { background-position: -360px 0; } .icon-off { background-position: -384px 0; } .icon-signal { background-position: -408px 0; } .icon-cog { background-position: -432px 0; } .icon-trash { background-position: -456px 0; } .icon-home { background-position: 0 -24px; } .icon-file { background-position: -24px -24px; } .icon-time { background-position: -48px -24px; } .icon-road { background-position: -72px -24px; } .icon-download-alt { background-position: -96px -24px; } .icon-download { background-position: -120px -24px; } .icon-upload { background-position: -144px -24px; } .icon-inbox { background-position: -168px -24px; } .icon-play-circle { background-position: -192px -24px; } .icon-repeat { background-position: -216px -24px; } .icon-refresh { background-position: -240px -24px; } .icon-list-alt { background-position: -264px -24px; } .icon-lock { background-position: -287px -24px; } .icon-flag { background-position: -312px -24px; } .icon-headphones { background-position: -336px -24px; } .icon-volume-off { background-position: -360px -24px; } .icon-volume-down { background-position: -384px -24px; } .icon-volume-up { background-position: -408px -24px; } .icon-qrcode { background-position: -432px -24px; } .icon-barcode { background-position: -456px -24px; } .icon-tag { background-position: 0 -48px; } .icon-tags { background-position: -25px -48px; } .icon-book { background-position: -48px -48px; } .icon-bookmark { background-position: -72px -48px; } .icon-print { background-position: -96px -48px; } .icon-camera { background-position: -120px -48px; } .icon-font { background-position: -144px -48px; } .icon-bold { background-position: -167px -48px; } .icon-italic { background-position: -192px -48px; } .icon-text-height { background-position: -216px -48px; } .icon-text-width { background-position: -240px -48px; } .icon-align-left { background-position: -264px -48px; } .icon-align-center { background-position: -288px -48px; } .icon-align-right { background-position: -312px -48px; } .icon-align-justify { background-position: -336px -48px; } .icon-list { background-position: -360px -48px; } .icon-indent-left { background-position: -384px -48px; } .icon-indent-right { background-position: -408px -48px; } .icon-facetime-video { background-position: -432px -48px; } .icon-picture { background-position: -456px -48px; } .icon-pencil { background-position: 0 -72px; } .icon-map-marker { background-position: -24px -72px; } .icon-adjust { background-position: -48px -72px; } .icon-tint { background-position: -72px -72px; } .icon-edit { background-position: -96px -72px; } .icon-share { background-position: -120px -72px; } .icon-check { background-position: -144px -72px; } .icon-move { background-position: -168px -72px; } .icon-step-backward { background-position: -192px -72px; } .icon-fast-backward { background-position: -216px -72px; } .icon-backward { background-position: -240px -72px; } .icon-play { background-position: -264px -72px; } .icon-pause { background-position: -288px -72px; } .icon-stop { background-position: -312px -72px; } .icon-forward { background-position: -336px -72px; } .icon-fast-forward { background-position: -360px -72px; } .icon-step-forward { background-position: -384px -72px; } .icon-eject { background-position: -408px -72px; } .icon-chevron-left { background-position: -432px -72px; } .icon-chevron-right { background-position: -456px -72px; } .icon-plus-sign { background-position: 0 -96px; } .icon-minus-sign { background-position: -24px -96px; } .icon-remove-sign { background-position: -48px -96px; } .icon-ok-sign { background-position: -72px -96px; } .icon-question-sign { background-position: -96px -96px; } .icon-info-sign { background-position: -120px -96px; } .icon-screenshot { background-position: -144px -96px; } .icon-remove-circle { background-position: -168px -96px; } .icon-ok-circle { background-position: -192px -96px; } .icon-ban-circle { background-position: -216px -96px; } .icon-arrow-left { background-position: -240px -96px; } .icon-arrow-right { background-position: -264px -96px; } .icon-arrow-up { background-position: -289px -96px; } .icon-arrow-down { background-position: -312px -96px; } .icon-share-alt { background-position: -336px -96px; } .icon-resize-full { background-position: -360px -96px; } .icon-resize-small { background-position: -384px -96px; } .icon-plus { background-position: -408px -96px; } .icon-minus { background-position: -433px -96px; } .icon-asterisk { background-position: -456px -96px; } .icon-exclamation-sign { background-position: 0 -120px; } .icon-gift { background-position: -24px -120px; } .icon-leaf { background-position: -48px -120px; } .icon-fire { background-position: -72px -120px; } .icon-eye-open { background-position: -96px -120px; } .icon-eye-close { background-position: -120px -120px; } .icon-warning-sign { background-position: -144px -120px; } .icon-plane { background-position: -168px -120px; } .icon-calendar { background-position: -192px -120px; } .icon-random { background-position: -216px -120px; } .icon-comment { background-position: -240px -120px; } .icon-magnet { background-position: -264px -120px; } .icon-chevron-up { background-position: -288px -120px; } .icon-chevron-down { background-position: -313px -119px; } .icon-retweet { background-position: -336px -120px; } .icon-shopping-cart { background-position: -360px -120px; } .icon-folder-close { background-position: -384px -120px; } .icon-folder-open { background-position: -408px -120px; } .icon-resize-vertical { background-position: -432px -119px; } .icon-resize-horizontal { background-position: -456px -118px; } .icon-hdd { background-position: 0 -144px; } .dropdown { position: relative; } .dropdown-toggle { *margin-bottom: -3px; } .dropdown-toggle:active, .open .dropdown-toggle { outline: 0; } .caret { display: inline-block; width: 0; height: 0; text-indent: -99999px; *text-indent: 0; vertical-align: top; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 4px solid #000; opacity: 0.3; -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=30); filter: alpha(opacity=30); content: "\2193"; } .dropdown .caret { margin-top: 8px; margin-left: 2px; } .dropdown:hover .caret, .open.dropdown .caret { opacity: 1; -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); filter: alpha(opacity=100); } .dropdown-menu { position: absolute; top: 100%; left: 0; z-index: 1000; float: left; display: none; min-width: 160px; _width: 160px; padding: 4px 0; margin: 0; list-style: none; background-color: #fff; border-color: #ccc; border-color: rgba(0,0,0,0.2); border-style: solid; border-width: 1px; -webkit-background-clip: padding-box; -moz-background-clip: padding-box; background-clip: padding-box; *border-right-width: 2px; *border-bottom-width: 2px; } .dropdown-menu.bottom-up { top: auto; bottom: 100%; margin-bottom: 2px; } .dropdown-menu .divider { height: 1px; margin: 5px 1px; overflow: hidden; background-color: #e5e5e5; border-bottom: 1px solid #fff; *width: 100%; *margin: -5px 0 5px; } .dropdown-menu a { display: block; padding: 3px 15px; clear: both; font-weight: normal; line-height: 18px; color: #555; white-space: nowrap; } .dropdown-menu li > a:hover, .dropdown-menu .active > a, .dropdown-menu .active > a:hover { color: #fff; text-decoration: none; background-color: #525252; } .dropdown.open { *z-index: 1000; } .dropdown.open .dropdown-toggle { color: #fff; background: #ccc; background: rgba(0,0,0,0.3); } .dropdown.open .dropdown-menu { display: block; } .typeahead { margin-top: 2px; } .well { min-height: 20px; padding: 19px; margin-bottom: 20px; background-color: #f5f5f5; border: 1px solid #eee; border: 1px solid rgba(0,0,0,0.05); -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.05); -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,0.05); box-shadow: inset 0 1px 1px rgba(0,0,0,0.05); } .well blockquote { border-color: #ddd; border-color: rgba(0,0,0,0.15); } .fade { -webkit-transition: opacity 0.15s linear; -moz-transition: opacity 0.15s linear; -ms-transition: opacity 0.15s linear; -o-transition: opacity 0.15s linear; transition: opacity 0.15s linear; opacity: 0; -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0); filter: alpha(opacity=0); } .fade.in { opacity: 1; -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); filter: alpha(opacity=100); } .collapse { -webkit-transition: height 0.35s ease; -moz-transition: height 0.35s ease; -ms-transition: height 0.35s ease; -o-transition: height 0.35s ease; transition: height 0.35s ease; position: relative; overflow: hidden; height: 0; } .collapse.in { height: auto; } .close { float: right; font-size: 20px; font-weight: bold; line-height: 18px; color: #000; text-shadow: 0 1px 0 #fff; opacity: 0.2; -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=20); filter: alpha(opacity=20); } .close:hover { color: #000; text-decoration: none; opacity: 0.4; -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=40); filter: alpha(opacity=40); cursor: pointer; } .btn { display: inline-block; padding: 4px 10px 4px; margin-bottom: 0; font-size: 13px; line-height: 18px; color: #444; text-align: center; text-shadow: 0 1px 1px rgba(255,255,255,0.75); vertical-align: middle; text-shadow: 0 -1px 0 rgba(0,0,0,0.25); border-color: #e6e6e6 #e6e6e6 #c3c3c3; border-color: rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25); filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); border: 1px solid #ccc; border-bottom-color: #bbb; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 1px 2px rgba(0,0,0,0.05); -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 1px 2px rgba(0,0,0,0.05); box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 1px 2px rgba(0,0,0,0.05); cursor: pointer; filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); *margin-left: 0.3em; } .btn:hover, .btn:active, .btn.active, .btn.disabled, .btn[disabled] { background-color: #e6e6e6; } .btn:active, .btn.active { background-color: #cfcfcf \9; } .btn:first-child { *margin-left: 0; } .btn:hover { color: #444; text-decoration: none; background-color: #e6e6e6; background-position: 0 -15px; -webkit-transition: background-position 0.1s linear; -moz-transition: background-position 0.1s linear; -ms-transition: background-position 0.1s linear; -o-transition: background-position 0.1s linear; transition: background-position 0.1s linear; } .btn:focus { outline: thin dotted #333; outline: 5px auto -webkit-focus-ring-color; outline-offset: -2px; } .btn.active, .btn:active { background-image: none; -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,0.15), 0 1px 2px rgba(0,0,0,0.05); -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,0.15), 0 1px 2px rgba(0,0,0,0.05); box-shadow: inset 0 2px 4px rgba(0,0,0,0.15), 0 1px 2px rgba(0,0,0,0.05); background-color: #e6e6e6; background-color: #d9d9d9 \9; outline: 0; } .btn.disabled, .btn[disabled] { cursor: default; background-image: none; background-color: #e6e6e6; opacity: 0.65; -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=65); filter: alpha(opacity=65); -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; } .btn-large { padding: 9px 14px; font-size: 15px; line-height: normal; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; } .btn-large [class^="icon-"] { margin-top: 1px; } .btn-small { padding: 5px 9px; font-size: 11px; line-height: 16px; } .btn-small [class^="icon-"] { margin-top: -1px; } .btn-mini { padding: 2px 6px; font-size: 11px; line-height: 14px; } .btn-primary, .btn-primary:hover, .btn-warning, .btn-warning:hover, .btn-danger, .btn-danger:hover, .btn-success, .btn-success:hover, .btn-info, .btn-info:hover, .btn-inverse, .btn-inverse:hover { text-shadow: 0 -1px 0 rgba(0,0,0,0.25); color: #fff; } .btn-primary.active, .btn-warning.active, .btn-danger.active, .btn-success.active, .btn-info.active, .btn-inverse.active { color: rgba(255,255,255,0.75); } .btn-primary { text-shadow: 0 -1px 0 rgba(0,0,0,0.25); border-color: #525252 #525252 #464646; border-color: rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25); filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); } .btn-primary:hover, .btn-primary:active, .btn-primary.active, .btn-primary.disabled, .btn-primary[disabled] { background-color: #525252; } .btn-primary:active, .btn-primary.active { background-color: #4a4a4a \9; } .btn-warning { text-shadow: 0 -1px 0 rgba(0,0,0,0.25); border-color: #f89406 #f89406 #d37e05; border-color: rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25); filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); } .btn-warning:hover, .btn-warning:active, .btn-warning.active, .btn-warning.disabled, .btn-warning[disabled] { background-color: #f89406; } .btn-warning:active, .btn-warning.active { background-color: #df8505 \9; } .btn-danger { text-shadow: 0 -1px 0 rgba(0,0,0,0.25); border-color: #bd362f #bd362f #a12e28; border-color: rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25); filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); } .btn-danger:hover, .btn-danger:active, .btn-danger.active, .btn-danger.disabled, .btn-danger[disabled] { background-color: #bd362f; } .btn-danger:active, .btn-danger.active { background-color: #aa312a \9; } .btn-success { text-shadow: 0 -1px 0 rgba(0,0,0,0.25); border-color: #51a351 #51a351 #458b45; border-color: rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25); filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); } .btn-success:hover, .btn-success:active, .btn-success.active, .btn-success.disabled, .btn-success[disabled] { background-color: #51a351; } .btn-success:active, .btn-success.active { background-color: #499349 \9; } .btn-info { text-shadow: 0 -1px 0 rgba(0,0,0,0.25); border-color: #2f96b4 #2f96b4 #287f99; border-color: rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25); filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); } .btn-info:hover, .btn-info:active, .btn-info.active, .btn-info.disabled, .btn-info[disabled] { background-color: #2f96b4; } .btn-info:active, .btn-info.active { background-color: #2a87a2 \9; } .btn-inverse { text-shadow: 0 -1px 0 rgba(0,0,0,0.25); border-color: #262626 #262626 #202020; border-color: rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25); filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); } .btn-inverse:hover, .btn-inverse:active, .btn-inverse.active, .btn-inverse.disabled, .btn-inverse[disabled] { background-color: #262626; } .btn-inverse:active, .btn-inverse.active { background-color: #222 \9; } button.btn, input[type="submit"].btn { *padding-top: 2px; *padding-bottom: 2px; } button.btn::-moz-focus-inner, input[type="submit"].btn::-moz-focus-inner { padding: 0; border: 0; } button.btn.large, input[type="submit"].btn.large { *padding-top: 7px; *padding-bottom: 7px; } button.btn.small, input[type="submit"].btn.small { *padding-top: 3px; *padding-bottom: 3px; } .btn-group { position: relative; *zoom: 1; *margin-left: 0.3em; } .btn-group:before, .btn-group:after { display: table; content: ""; } .btn-group:after { clear: both; } .btn-group:first-child { *margin-left: 0; } .btn-group + .btn-group { margin-left: 5px; } .btn-toolbar { margin-top: 9px; margin-bottom: 9px; } .btn-toolbar .btn-group { display: inline-block; *display: inline; /* IE7 inline-block hack */ *zoom: 1; } .btn-group .btn { position: relative; float: left; margin-left: -1px; -webkit-border-radius: 0; -moz-border-radius: 0; border-radius: 0; } .btn-group .btn:first-child { margin-left: 0; -webkit-border-top-left-radius: 4px; -moz-border-radius-topleft: 4px; border-top-left-radius: 4px; -webkit-border-bottom-left-radius: 4px; -moz-border-radius-bottomleft: 4px; border-bottom-left-radius: 4px; } .btn-group .btn:last-child, .btn-group .dropdown-toggle { -webkit-border-top-right-radius: 4px; -moz-border-radius-topright: 4px; border-top-right-radius: 4px; -webkit-border-bottom-right-radius: 4px; -moz-border-radius-bottomright: 4px; border-bottom-right-radius: 4px; } .btn-group .btn.large:first-child { margin-left: 0; -webkit-border-top-left-radius: 6px; -moz-border-radius-topleft: 6px; border-top-left-radius: 6px; -webkit-border-bottom-left-radius: 6px; -moz-border-radius-bottomleft: 6px; border-bottom-left-radius: 6px; } .btn-group .btn.large:last-child, .btn-group .large.dropdown-toggle { -webkit-border-top-right-radius: 6px; -moz-border-radius-topright: 6px; border-top-right-radius: 6px; -webkit-border-bottom-right-radius: 6px; -moz-border-radius-bottomright: 6px; border-bottom-right-radius: 6px; } .btn-group .btn:hover, .btn-group .btn:focus, .btn-group .btn:active, .btn-group .btn.active { z-index: 2; } .btn-group .dropdown-toggle:active, .btn-group.open .dropdown-toggle { outline: 0; } .btn-group .dropdown-toggle { padding-left: 8px; padding-right: 8px; -webkit-box-shadow: inset 1px 0 0 rgba(255,255,255,0.125), inset 0 1px 0 rgba(255,255,255,0.2), 0 1px 2px rgba(0,0,0,0.05); -moz-box-shadow: inset 1px 0 0 rgba(255,255,255,0.125), inset 0 1px 0 rgba(255,255,255,0.2), 0 1px 2px rgba(0,0,0,0.05); box-shadow: inset 1px 0 0 rgba(255,255,255,0.125), inset 0 1px 0 rgba(255,255,255,0.2), 0 1px 2px rgba(0,0,0,0.05); *padding-top: 5px; *padding-bottom: 5px; } .btn-group.open { *z-index: 1000; } .btn-group.open .dropdown-menu { display: block; margin-top: 1px; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; } .btn-group.open .dropdown-toggle { background-image: none; -webkit-box-shadow: inset 0 1px 6px rgba(0,0,0,0.15), 0 1px 2px rgba(0,0,0,0.05); -moz-box-shadow: inset 0 1px 6px rgba(0,0,0,0.15), 0 1px 2px rgba(0,0,0,0.05); box-shadow: inset 0 1px 6px rgba(0,0,0,0.15), 0 1px 2px rgba(0,0,0,0.05); } .btn .caret { margin-top: 7px; margin-left: 0; } .btn:hover .caret, .open.btn-group .caret { opacity: 1; -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); filter: alpha(opacity=100); } .btn-primary .caret, .btn-danger .caret, .btn-info .caret, .btn-success .caret, .btn-inverse .caret { border-top-color: #fff; opacity: 0.75; -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=75); filter: alpha(opacity=75); } .btn-small .caret { margin-top: 4px; } .alert { padding: 8px 35px 8px 14px; margin-bottom: 18px; text-shadow: 0 1px 0 rgba(255,255,255,0.5); background-color: #fcf8e3; border: 1px solid #fbefd6; } .alert, .alert-heading { color: #c09853; } .alert .close { position: relative; top: -2px; right: -21px; line-height: 18px; } .alert-success { background-color: #dff0d8; border-color: #d7eac8; } .alert-success, .alert-success .alert-heading { color: #468847; } .alert-danger, .alert-error { background-color: #f2dede; border-color: #eed4d8; } .alert-danger, .alert-error, .alert-danger .alert-heading, .alert-error .alert-heading { color: #b94a48; } .alert-info { background-color: #d9edf7; border-color: #bee9f1; } .alert-info, .alert-info .alert-heading { color: #3a87ad; } .alert-block { padding-top: 14px; padding-bottom: 14px; } .alert-block > p, .alert-block > ul { margin-bottom: 0; } .alert-block p + p { margin-top: 5px; } .nav { margin-left: 0; margin-bottom: 18px; list-style: none; } .nav > li > a { display: block; } .nav > li > a:hover { text-decoration: none; background-color: #eee; } .nav .nav-header { display: block; padding: 3px 15px; font-size: 11px; font-weight: bold; line-height: 18px; color: #999; text-shadow: 0 1px 0 rgba(255,255,255,0.5); text-transform: uppercase; } .nav li + .nav-header { margin-top: 9px; } .nav-list { padding-left: 14px; padding-right: 14px; margin-bottom: 0; } .nav-list > li > a, .nav-list .nav-header { margin-left: -15px; margin-right: -15px; text-shadow: 0 1px 0 rgba(255,255,255,0.5); } .nav-list > li > a { padding: 3px 15px; } .nav-list .active > a, .nav-list .active > a:hover { color: #fff; text-shadow: 0 -1px 0 rgba(0,0,0,0.2); background-color: #525252; } .nav-list [class^="icon-"] { margin-right: 2px; } .nav-tabs, .nav-pills { *zoom: 1; } .nav-tabs:before, .nav-pills:before, .nav-tabs:after, .nav-pills:after { display: table; content: ""; } .nav-tabs:after, .nav-pills:after { clear: both; } .nav-tabs > li, .nav-pills > li { float: left; } .nav-tabs > li > a, .nav-pills > li > a { padding-right: 12px; padding-left: 12px; margin-right: 2px; line-height: 14px; } .nav-tabs { border-bottom: 1px solid #ddd; } .nav-tabs > li { margin-bottom: -1px; } .nav-tabs > li > a { padding-top: 9px; padding-bottom: 9px; border: 1px solid transparent; } .nav-tabs > li > a:hover { border-color: #eee #eee #ddd; } .nav-tabs > .active > a, .nav-tabs > .active > a:hover { color: #555; background-color: #fff; border: 1px solid #ddd; border-bottom-color: transparent; cursor: default; } .nav-pills > li > a { padding-top: 8px; padding-bottom: 8px; margin-top: 2px; margin-bottom: 2px; } .nav-pills .active > a, .nav-pills .active > a:hover { color: #fff; background-color: #525252; } .nav-stacked > li { float: none; } .nav-stacked > li > a { margin-right: 0; } .nav-tabs.nav-stacked { border-bottom: 0; } .nav-tabs.nav-stacked > li > a { border: 1px solid #ddd; } .nav-tabs.nav-stacked > li > a:hover { border-color: #ddd; z-index: 2; } .nav-pills.nav-stacked > li > a { margin-bottom: 3px; } .nav-pills.nav-stacked > li:last-child > a { margin-bottom: 1px; } .nav-tabs .dropdown-menu, .nav-pills .dropdown-menu { margin-top: 1px; border-width: 1px; } .nav-tabs .dropdown-toggle .caret, .nav-pills .dropdown-toggle .caret { border-top-color: #525252; margin-top: 6px; } .nav-tabs .dropdown-toggle:hover .caret, .nav-pills .dropdown-toggle:hover .caret { border-top-color: #464646; } .nav-tabs .active .dropdown-toggle .caret, .nav-pills .active .dropdown-toggle .caret { border-top-color: #444; } .nav > .dropdown.active > a:hover { color: #000; cursor: pointer; } .nav-tabs .open .dropdown-toggle, .nav-pills .open .dropdown-toggle, .nav > .open.active > a:hover { color: #fff; background-color: #999; border-color: #999; } .nav .open .caret, .nav .open.active .caret, .nav .open a:hover .caret { border-top-color: #fff; opacity: 1; -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); filter: alpha(opacity=100); } .tabs-stacked .open > a:hover { border-color: #999; } .tabbable { *zoom: 1; } .tabbable:before, .tabbable:after { display: table; content: ""; } .tabbable:after { clear: both; } .tab-content { overflow: hidden; } .tabs-below .nav-tabs, .tabs-right .nav-tabs, .tabs-left .nav-tabs { border-bottom: 0; } .tab-content > .tab-pane, .pill-content > .pill-pane { display: none; } .tab-content > .active, .pill-content > .active { display: block; } .tabs-below .nav-tabs { border-top: 1px solid #ddd; } .tabs-below .nav-tabs > li { margin-top: -1px; margin-bottom: 0; } .tabs-below .nav-tabs > li > a { -webkit-border-radius: 0 0 4px 4px; -moz-border-radius: 0 0 4px 4px; border-radius: 0 0 4px 4px; } .tabs-below .nav-tabs > li > a:hover { border-bottom-color: transparent; border-top-color: #ddd; } .tabs-below .nav-tabs .active > a, .tabs-below .nav-tabs .active > a:hover { border-color: transparent #ddd #ddd #ddd; } .tabs-left .nav-tabs > li, .tabs-right .nav-tabs > li { float: none; } .tabs-left .nav-tabs > li > a, .tabs-right .nav-tabs > li > a { min-width: 74px; margin-right: 0; margin-bottom: 3px; } .tabs-left .nav-tabs { float: left; margin-right: 19px; border-right: 1px solid #ddd; } .tabs-left .nav-tabs > li > a { margin-right: -1px; -webkit-border-radius: 4px 0 0 4px; -moz-border-radius: 4px 0 0 4px; border-radius: 4px 0 0 4px; } .tabs-left .nav-tabs > li > a:hover { border-color: #eee #ddd #eee #eee; } .tabs-left .nav-tabs .active > a, .tabs-left .nav-tabs .active > a:hover { border-color: #ddd transparent #ddd #ddd; *border-right-color: #fff; } .tabs-right .nav-tabs { float: right; margin-left: 19px; border-left: 1px solid #ddd; } .tabs-right .nav-tabs > li > a { margin-left: -1px; -webkit-border-radius: 0 4px 4px 0; -moz-border-radius: 0 4px 4px 0; border-radius: 0 4px 4px 0; } .tabs-right .nav-tabs > li > a:hover { border-color: #eee #eee #eee #ddd; } .tabs-right .nav-tabs .active > a, .tabs-right .nav-tabs .active > a:hover { border-color: #ddd #ddd #ddd transparent; *border-left-color: #fff; } .navbar { overflow: visible; margin-bottom: 18px; } .navbar-inner { padding-left: 20px; padding-right: 20px; background: #333; } .btn-navbar { display: none; float: right; padding: 7px 10px; margin-left: 5px; margin-right: 5px; background: #333; } .btn-navbar .icon-bar { display: block; width: 18px; height: 2px; background-color: #f5f5f5; } .btn-navbar .icon-bar + .icon-bar { margin-top: 3px; } .nav-collapse.collapse { height: auto; } .navbar .brand:hover { text-decoration: none; } .navbar .brand { float: left; display: block; padding: 8px 20px 12px; margin-left: -20px; font-size: 20px; font-weight: 200; line-height: 1; color: #fff; } .navbar .navbar-text { margin-bottom: 0; line-height: 40px; color: #999; } .navbar .navbar-text a:hover { color: #fff; background-color: transparent; } .navbar .btn, .navbar .btn-group { margin-top: 5px; } .navbar .btn-group .btn { margin-top: 0; } .navbar-form { margin-bottom: 0; *zoom: 1; } .navbar-form:before, .navbar-form:after { display: table; content: ""; } .navbar-form:after { clear: both; } .navbar-form input, .navbar-form select { display: inline-block; margin-top: 5px; margin-bottom: 0; } .navbar-form .radio, .navbar-form .checkbox { margin-top: 5px; } .navbar-form input[type="image"], .navbar-form input[type="checkbox"], .navbar-form input[type="radio"] { margin-top: 3px; } .navbar-form .input-append, .navbar-form .input-prepend { margin-top: 6px; white-space: nowrap; } .navbar-form .input-append input, .navbar-form .input-prepend input { margin-top: 0; } .navbar-search { position: relative; float: left; margin-top: 6px; margin-bottom: 0; } .navbar-search .search-query { padding: 4px 9px; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 13px; font-weight: normal; line-height: 1; color: #fff; color: rgba(255,255,255,0.75); background: #666; background: rgba(255,255,255,0.3); border: 1px solid #111; -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1), 0 1px 0px rgba(255,255,255,0.15); -moz-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1), 0 1px 0px rgba(255,255,255,0.15); box-shadow: inset 0 1px 2px rgba(0,0,0,0.1), 0 1px 0px rgba(255,255,255,0.15); -webkit-transition: none; -moz-transition: none; -ms-transition: none; -o-transition: none; transition: none; } .navbar-search .search-query :-moz-placeholder { color: #eee; } .navbar-search .search-query ::-webkit-input-placeholder { color: #eee; } .navbar-search .search-query:hover { color: #fff; background-color: #999; background-color: rgba(255,255,255,0.5); } .navbar-search .search-query:focus, .navbar-search .search-query.focused { padding: 5px 10px; color: #444; text-shadow: 0 1px 0 #fff; background-color: #fff; border: 0; -webkit-box-shadow: 0 0 3px rgba(0,0,0,0.15); -moz-box-shadow: 0 0 3px rgba(0,0,0,0.15); box-shadow: 0 0 3px rgba(0,0,0,0.15); outline: 0; } .navbar-fixed-top { position: fixed; top: 0; right: 0; left: 0; z-index: 1030; } .navbar-fixed-top .navbar-inner { padding-left: 0; padding-right: 0; -webkit-border-radius: 0; -moz-border-radius: 0; border-radius: 0; } .navbar .nav { position: relative; left: 0; display: block; float: left; margin: 0 10px 0 0; } .navbar .nav.pull-right { float: right; } .navbar .nav > li { display: block; float: left; } .navbar .nav > li > a { float: none; padding: 10px 10px 11px; line-height: 19px; color: #999; text-decoration: none; text-shadow: 0 -1px 0 rgba(0,0,0,0.25); } .navbar .nav > li > a:hover { background-color: transparent; color: #fff; text-decoration: none; } .navbar .nav .active > a, .navbar .nav .active > a:hover { color: #fff; text-decoration: none; background-color: #333; } .navbar .divider-vertical { height: 40px; width: 1px; margin: 0 9px; overflow: hidden; background-color: #333; border-right: 1px solid #444; } .navbar .nav.pull-right { margin-left: 10px; margin-right: 0; } .navbar .dropdown-menu { margin-top: 1px; } .navbar .dropdown-menu:before { content: ''; display: inline-block; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 7px solid #ccc; border-bottom-color: rgba(0,0,0,0.2); position: absolute; top: -7px; left: 9px; } .navbar .dropdown-menu:after { content: ''; display: inline-block; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 6px solid #fff; position: absolute; top: -6px; left: 10px; } .navbar .nav .dropdown-toggle .caret, .navbar .nav .open.dropdown .caret { border-top-color: #fff; } .navbar .nav .active .caret { opacity: 1; -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); filter: alpha(opacity=100); } .navbar .nav .open > .dropdown-toggle, .navbar .nav .active > .dropdown-toggle, .navbar .nav .open.active > .dropdown-toggle { background-color: transparent; } .navbar .nav .active > .dropdown-toggle:hover { color: #fff; } .navbar .nav.pull-right .dropdown-menu { left: auto; right: 0; } .navbar .nav.pull-right .dropdown-menu:before { left: auto; right: 12px; } .navbar .nav.pull-right .dropdown-menu:after { left: auto; right: 13px; } .breadcrumb { padding: 7px 14px; margin: 0 0 18px; background-color: #f5f5f5; background-repeat: repeat-x; background-image: -khtml-gradient(linear, left top, left bottom, from(#fff), to(#f5f5f5)); background-image: -moz-linear-gradient(top, #fff, #f5f5f5); background-image: -ms-linear-gradient(top, #fff, #f5f5f5); background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fff), color-stop(100%, #f5f5f5)); background-image: -webkit-linear-gradient(top, #fff, #f5f5f5); background-image: -o-linear-gradient(top, #fff, #f5f5f5); background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), color-stop(1, #f5f5f5)); background-image: -webkit-linear-gradient(top, #fff 0%, #f5f5f5 100%); background-image: -moz-linear-gradient(top, #fff 0%, #f5f5f5 100%); background-image: -ms-linear-gradient(top, #fff 0%, #f5f5f5 100%); background-image: -o-linear-gradient(top, #fff 0%, #f5f5f5 100%); background-image: linear-gradient(top, #fff 0%, #f5f5f5 100%); border: 1px solid #ddd; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; -webkit-box-shadow: inset 0 1px 0 #fff; -moz-box-shadow: inset 0 1px 0 #fff; box-shadow: inset 0 1px 0 #fff; } .breadcrumb li { display: inline-block; text-shadow: 0 1px 0 #fff; } .breadcrumb .divider { padding: 0 5px; color: #999; } .breadcrumb .active a { color: #444; } .pagination { height: 36px; margin: 18px 0; } .pagination ul { display: inline-block; *display: inline; /* IE7 inline-block hack */ *zoom: 1; margin-left: 0; margin-bottom: 0; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.05); -moz-box-shadow: 0 1px 2px rgba(0,0,0,0.05); box-shadow: 0 1px 2px rgba(0,0,0,0.05); } .pagination li { display: inline; } .pagination a { float: left; padding: 0 14px; line-height: 34px; text-decoration: none; border: 1px solid #ddd; border-left-width: 0; } .pagination a:hover, .pagination .active a { background-color: #f5f5f5; } .pagination .active a { color: #999; cursor: default; } .pagination .disabled a, .pagination .disabled a:hover { color: #999; background-color: transparent; cursor: default; } .pagination li:first-child a { border-left-width: 1px; -webkit-border-radius: 3px 0 0 3px; -moz-border-radius: 3px 0 0 3px; border-radius: 3px 0 0 3px; } .pagination li:last-child a { -webkit-border-radius: 0 3px 3px 0; -moz-border-radius: 0 3px 3px 0; border-radius: 0 3px 3px 0; } .pagination-centered { text-align: center; } .pagination-right { text-align: right; } .pager { margin-left: 0; margin-bottom: 18px; list-style: none; text-align: center; *zoom: 1; } .pager:before, .pager:after { display: table; content: ""; } .pager:after { clear: both; } .pager li { display: inline; } .pager a { display: inline-block; padding: 5px 14px; background-color: #fff; border: 1px solid #ddd; -webkit-border-radius: 15px; -moz-border-radius: 15px; border-radius: 15px; } .pager a:hover { text-decoration: none; background-color: #f5f5f5; } .pager .next a { float: right; } .pager .previous a { float: left; } .modal-open .dropdown-menu { z-index: 2050; } .modal-open .dropdown.open { *z-index: 2050; } .modal-open .popover { z-index: 2060; } .modal-open .tooltip { z-index: 2070; } .modal-backdrop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1040; background-color: #000; } .modal-backdrop.fade { opacity: 0; -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0); filter: alpha(opacity=0); } .modal-backdrop, .modal-backdrop.fade.in { opacity: 0.8; -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80); filter: alpha(opacity=80); } .modal { position: fixed; left: 50%; z-index: 1050; overflow: auto; width: 600px; margin: 0 0 0 -300px; background-color: #fff; border: 1px solid #999; border: 1px solid rgba(0,0,0,0.3); *border: 1px solid #999; /* IE6-7 */ -webkit-background-clip: padding-box; -moz-background-clip: padding-box; background-clip: padding-box; } .modal.fade { -webkit-transition: opacity .3s linear, top .3s ease-out, bottom .3s ease-out; -moz-transition: opacity .3s linear, top .3s ease-out, bottom .3s ease-out; -ms-transition: opacity .3s linear, top .3s ease-out, bottom .3s ease-out; -o-transition: opacity .3s linear, top .3s ease-out, bottom .3s ease-out; transition: opacity .3s linear, top .3s ease-out, bottom .3s ease-out; top: -25%; bottom: 25%; } .modal.fade.in { top: 20px; bottom: 20px; } .modal-header { padding: 9px 15px; border-bottom: 1px solid #eee; } .modal-header .close { margin-top: 2px; } .modal-body { padding: 15px; } .modal-body ul { list-style-type: none; margin: 0; padding: 0; } .modal-body ul li { border-bottom: 1px solid #ccc; margin: 5px 0; } .modal-body ul li:last-child { border: none; } .modal-body ul li a { text-decoration: none; color: #000; } .modal-body ul li a.delete_local_file { float: right; background: none; } .modal-body ul li a.delete_local_file:hover { background: none; color: #f00; } .modal-body ul li a.delete_local_file:hover:before { content: "Delete "; } .modal-body ul li a:hover { background: #f6f6f6; } #myModalBody { position: absolute; width: 565px; top: 45px; bottom: 10px; } #modalBodyText { width: 100%; height: 100%; background-color: transparent; } .modal-body .modal-form { margin-bottom: 0; } .modal-footer { padding: 14px 15px 15px; margin-bottom: 0; background-color: #f5f5f5; border-top: 1px solid #ddd; *zoom: 1; } .modal-footer:before, .modal-footer:after { display: table; content: ""; } .modal-footer:after { clear: both; } .modal-footer .btn { float: right; margin-left: 5px; margin-bottom: 0; } .tooltip { position: absolute; z-index: 1020; display: block; visibility: visible; padding: 5px; font-size: 11px; opacity: 0; -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0); filter: alpha(opacity=0); } .tooltip.in { opacity: 0.8; -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80); filter: alpha(opacity=80); } .tooltip.top { margin-top: -2px; } .tooltip.right { margin-left: 2px; } .tooltip.bottom { margin-top: 2px; } .tooltip.left { margin-left: -2px; } .tooltip.top .tooltip-arrow { bottom: 0; left: 50%; margin-left: -5px; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 5px solid #000; } .tooltip.left .tooltip-arrow { top: 50%; right: 0; margin-top: -5px; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 5px solid #000; } .tooltip.bottom .tooltip-arrow { top: 0; left: 50%; margin-left: -5px; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 5px solid #000; } .tooltip.right .tooltip-arrow { top: 50%; left: 0; margin-top: -5px; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-right: 5px solid #000; } .tooltip-inner { max-width: 200px; padding: 3px 8px; color: #fff; text-align: center; text-decoration: none; background-color: #000; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; } .tooltip-arrow { position: absolute; width: 0; height: 0; } .popover { position: absolute; top: 0; left: 0; z-index: 1010; display: none; padding: 5px; } .popover.top { margin-top: -5px; } .popover.right { margin-left: 5px; } .popover.bottom { margin-top: 5px; } .popover.left { margin-left: -5px; } .popover.top .arrow { bottom: 0; left: 50%; margin-left: -5px; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 5px solid #000; } .popover.right .arrow { top: 50%; left: 0; margin-top: -5px; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-right: 5px solid #000; } .popover.bottom .arrow { top: 0; left: 50%; margin-left: -5px; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 5px solid #000; } .popover.left .arrow { top: 50%; right: 0; margin-top: -5px; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 5px solid #000; } .popover .arrow { position: absolute; width: 0; height: 0; } .popover-inner { padding: 3px; width: 280px; overflow: hidden; background: #000; background: rgba(0,0,0,0.8); -webkit-border-radius: 6px; -moz-border-radius: 6px; border-radius: 6px; -webkit-box-shadow: 0 3px 7px rgba(0,0,0,0.3); -moz-box-shadow: 0 3px 7px rgba(0,0,0,0.3); box-shadow: 0 3px 7px rgba(0,0,0,0.3); } .popover-title { padding: 9px 15px; line-height: 1; background-color: #f5f5f5; border-bottom: 1px solid #eee; -webkit-border-radius: 3px 3px 0 0; -moz-border-radius: 3px 3px 0 0; border-radius: 3px 3px 0 0; } .popover-content { padding: 14px; background-color: #fff; -webkit-border-radius: 0 0 3px 3px; -moz-border-radius: 0 0 3px 3px; border-radius: 0 0 3px 3px; -webkit-background-clip: padding-box; -moz-background-clip: padding-box; background-clip: padding-box; } .popover-content p, .popover-content ul, .popover-content ol { margin-bottom: 0; } .thumbnails { margin-left: -20px; list-style: none; *zoom: 1; } .thumbnails:before, .thumbnails:after { display: table; content: ""; } .thumbnails:after { clear: both; } .thumbnails > li { float: left; margin: 0 0 18px 20px; } .thumbnail { display: block; padding: 4px; line-height: 1; border: 1px solid #ddd; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; -webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.075); -moz-box-shadow: 0 1px 1px rgba(0,0,0,0.075); box-shadow: 0 1px 1px rgba(0,0,0,0.075); } a.thumbnail:hover { border-color: #525252; -webkit-box-shadow: 0 1px 4px rgba(0,105,214,0.25); -moz-box-shadow: 0 1px 4px rgba(0,105,214,0.25); box-shadow: 0 1px 4px rgba(0,105,214,0.25); } .thumbnail > img { display: block; max-width: 100%; margin-left: auto; margin-right: auto; } .thumbnail .caption { padding: 9px; } .label { padding: 2px 4px 3px; font-size: 11.049999999999999px; font-weight: bold; color: #fff; text-shadow: 0 -1px 0 rgba(0,0,0,0.25); background-color: #999; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; } .label:hover { color: #fff; text-decoration: none; } .label-important { background-color: #b94a48; } .label-important:hover { background-color: #a74240; } .label-warning { background-color: #f89406; } .label-warning:hover { background-color: #df8505; } .label-success { background-color: #468847; } .label-success:hover { background-color: #3f7a40; } .label-info { background-color: #3a87ad; } .label-info:hover { background-color: #347a9c; } .label-inverse { background-color: #444; } .label-inverse:hover { background-color: #3d3d3d; } .badge { padding: 1px 9px 2px; font-size: 11.049999999999999px; font-weight: bold; white-space: nowrap; color: #fff; background-color: #999; -webkit-border-radius: 9px; -moz-border-radius: 9px; border-radius: 9px; } .badge:hover { color: #fff; text-decoration: none; cursor: pointer; } .badge-error { background-color: #b94a48; } .badge-error:hover { background-color: #a74240; } .badge-warning { background-color: #f89406; } .badge-warning:hover { background-color: #df8505; } .badge-success { background-color: #468847; } .badge-success:hover { background-color: #3f7a40; } .badge-info { background-color: #3a87ad; } .badge-info:hover { background-color: #347a9c; } .badge-inverse { background-color: #444; } .badge-inverse:hover { background-color: #3d3d3d; } .progress { overflow: hidden; height: 18px; margin-bottom: 18px; background-color: #f9f9f9; background-repeat: repeat-x; background-image: -khtml-gradient(linear, left top, left bottom, from(#f5f5f5), to(#f9f9f9)); background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9); background-image: -ms-linear-gradient(top, #f5f5f5, #f9f9f9); background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #f5f5f5), color-stop(100%, #f9f9f9)); background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9); background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9); background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #f5f5f5), color-stop(1, #f9f9f9)); background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #f9f9f9 100%); background-image: -moz-linear-gradient(top, #f5f5f5 0%, #f9f9f9 100%); background-image: -ms-linear-gradient(top, #f5f5f5 0%, #f9f9f9 100%); background-image: -o-linear-gradient(top, #f5f5f5 0%, #f9f9f9 100%); background-image: linear-gradient(top, #f5f5f5 0%, #f9f9f9 100%); -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); -moz-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; } .progress .bar { width: 0%; height: 18px; color: #fff; font-size: 12px; text-align: center; text-shadow: 0 -1px 0 rgba(0,0,0,0.25); background-color: #0480be; background-repeat: repeat-x; background-image: -khtml-gradient(linear, left top, left bottom, from(#149bdf), to(#0480be)); background-image: -moz-linear-gradient(top, #149bdf, #0480be); background-image: -ms-linear-gradient(top, #149bdf, #0480be); background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #149bdf), color-stop(100%, #0480be)); background-image: -webkit-linear-gradient(top, #149bdf, #0480be); background-image: -o-linear-gradient(top, #149bdf, #0480be); background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #149bdf), color-stop(1, #0480be)); background-image: -webkit-linear-gradient(top, #149bdf 0%, #0480be 100%); background-image: -moz-linear-gradient(top, #149bdf 0%, #0480be 100%); background-image: -ms-linear-gradient(top, #149bdf 0%, #0480be 100%); background-image: -o-linear-gradient(top, #149bdf 0%, #0480be 100%); background-image: linear-gradient(top, #149bdf 0%, #0480be 100%); -webkit-box-shadow: inset 0 -1px 0 rgba(0,0,0,0.15); -moz-box-shadow: inset 0 -1px 0 rgba(0,0,0,0.15); box-shadow: inset 0 -1px 0 rgba(0,0,0,0.15); -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; -webkit-transition: width 0.6s ease; -moz-transition: width 0.6s ease; -ms-transition: width 0.6s ease; -o-transition: width 0.6s ease; transition: width 0.6s ease; } .progress-striped .bar { background-color: #62c462; background-image: -webkit-gradient(linear, left top, right bottom, color-stop(0.25, rgba(255,255,255,0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255,255,255,0.15)), color-stop(0.75, rgba(255,255,255,0.15)), color-stop(0.75, transparent), color-stop(1, transparent)); background-image: -webkit-linear-gradient(top left, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent 100%); background-image: -moz-linear-gradient(top left, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent 100%); background-image: -ms-linear-gradient(top left, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent 100%); background-image: -o-linear-gradient(top left, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent 100%); background-image: linear-gradient(top left, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent 100%); -webkit-background-size: 40px 40px; -moz-background-size: 40px 40px; -o-background-size: 40px 40px; background-size: 40px 40px; } .progress.active .bar { -webkit-animation: progress-bar-stripes 2s linear infinite; -moz-animation: progress-bar-stripes 2s linear infinite; animation: progress-bar-stripes 2s linear infinite; } .progress-danger .bar { background-color: #c43c35; background-repeat: repeat-x; background-image: -khtml-gradient(linear, left top, left bottom, from(#ee5f5b), to(#c43c35)); background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35); background-image: -ms-linear-gradient(top, #ee5f5b, #c43c35); background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ee5f5b), color-stop(100%, #c43c35)); background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35); background-image: -o-linear-gradient(top, #ee5f5b, #c43c35); background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #ee5f5b), color-stop(1, #c43c35)); background-image: -webkit-linear-gradient(top, #ee5f5b 0%, #c43c35 100%); background-image: -moz-linear-gradient(top, #ee5f5b 0%, #c43c35 100%); background-image: -ms-linear-gradient(top, #ee5f5b 0%, #c43c35 100%); background-image: -o-linear-gradient(top, #ee5f5b 0%, #c43c35 100%); background-image: linear-gradient(top, #ee5f5b 0%, #c43c35 100%); } .progress-danger.progress-striped .bar { background-color: #ee5f5b; background-image: -webkit-gradient(linear, left top, right bottom, color-stop(0.25, rgba(255,255,255,0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255,255,255,0.15)), color-stop(0.75, rgba(255,255,255,0.15)), color-stop(0.75, transparent), color-stop(1, transparent)); background-image: -webkit-linear-gradient(top left, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent 100%); background-image: -moz-linear-gradient(top left, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent 100%); background-image: -ms-linear-gradient(top left, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent 100%); background-image: -o-linear-gradient(top left, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent 100%); background-image: linear-gradient(top left, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent 100%); } .progress-success .bar { background-color: #57a957; background-repeat: repeat-x; background-image: -khtml-gradient(linear, left top, left bottom, from(#62c462), to(#57a957)); background-image: -moz-linear-gradient(top, #62c462, #57a957); background-image: -ms-linear-gradient(top, #62c462, #57a957); background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #62c462), color-stop(100%, #57a957)); background-image: -webkit-linear-gradient(top, #62c462, #57a957); background-image: -o-linear-gradient(top, #62c462, #57a957); background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #62c462), color-stop(1, #57a957)); background-image: -webkit-linear-gradient(top, #62c462 0%, #57a957 100%); background-image: -moz-linear-gradient(top, #62c462 0%, #57a957 100%); background-image: -ms-linear-gradient(top, #62c462 0%, #57a957 100%); background-image: -o-linear-gradient(top, #62c462 0%, #57a957 100%); background-image: linear-gradient(top, #62c462 0%, #57a957 100%); } .progress-success.progress-striped .bar { background-color: #62c462; background-image: -webkit-gradient(linear, left top, right bottom, color-stop(0.25, rgba(255,255,255,0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255,255,255,0.15)), color-stop(0.75, rgba(255,255,255,0.15)), color-stop(0.75, transparent), color-stop(1, transparent)); background-image: -webkit-linear-gradient(top left, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent 100%); background-image: -moz-linear-gradient(top left, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent 100%); background-image: -ms-linear-gradient(top left, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent 100%); background-image: -o-linear-gradient(top left, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent 100%); background-image: linear-gradient(top left, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent 100%); } .progress-info .bar { background-color: #339bb9; background-repeat: repeat-x; background-image: -khtml-gradient(linear, left top, left bottom, from(#5bc0de), to(#339bb9)); background-image: -moz-linear-gradient(top, #5bc0de, #339bb9); background-image: -ms-linear-gradient(top, #5bc0de, #339bb9); background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #5bc0de), color-stop(100%, #339bb9)); background-image: -webkit-linear-gradient(top, #5bc0de, #339bb9); background-image: -o-linear-gradient(top, #5bc0de, #339bb9); background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #5bc0de), color-stop(1, #339bb9)); background-image: -webkit-linear-gradient(top, #5bc0de 0%, #339bb9 100%); background-image: -moz-linear-gradient(top, #5bc0de 0%, #339bb9 100%); background-image: -ms-linear-gradient(top, #5bc0de 0%, #339bb9 100%); background-image: -o-linear-gradient(top, #5bc0de 0%, #339bb9 100%); background-image: linear-gradient(top, #5bc0de 0%, #339bb9 100%); } .progress-info.progress-striped .bar { background-color: #5bc0de; background-image: -webkit-gradient(linear, left top, right bottom, color-stop(0.25, rgba(255,255,255,0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255,255,255,0.15)), color-stop(0.75, rgba(255,255,255,0.15)), color-stop(0.75, transparent), color-stop(1, transparent)); background-image: -webkit-linear-gradient(top left, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent 100%); background-image: -moz-linear-gradient(top left, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent 100%); background-image: -ms-linear-gradient(top left, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent 100%); background-image: -o-linear-gradient(top left, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent 100%); background-image: linear-gradient(top left, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent 100%); } @-moz-keyframes progress-bar-stripes { 0% { background-position: 0 0; } 100% { background-position: 40px 0; } } @-webkit-keyframes progress-bar-stripes { 0% { background-position: 0 0; } 100% { background-position: 40px 0; } } @-o-keyframes progress-bar-stripes { 0% { background-position: 0 0; } 100% { background-position: 40px 0; } } @-ms-keyframes progress-bar-stripes { 0% { background-position: 0 0; } 100% { background-position: 40px 0; } } @keyframes progress-bar-stripes { 0% { background-position: 0 0; } 100% { background-position: 40px 0; } } .accordion { margin-bottom: 18px; } .accordion-group { margin-bottom: 2px; border: 1px solid #e5e5e5; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; } .accordion-heading { border-bottom: 0; } .accordion-heading .accordion-toggle { display: block; padding: 8px 15px; } .accordion-inner { padding: 9px 15px; border-top: 1px solid #e5e5e5; } .carousel { position: relative; margin-bottom: 18px; line-height: 1; } .carousel-inner { overflow: hidden; width: 100%; position: relative; } .carousel .item { display: none; position: relative; -webkit-transition: 0.6s ease-in-out left; -moz-transition: 0.6s ease-in-out left; -ms-transition: 0.6s ease-in-out left; -o-transition: 0.6s ease-in-out left; transition: 0.6s ease-in-out left; } .carousel .item > img { display: block; line-height: 1; } .carousel .active, .carousel .next, .carousel .prev { display: block; } .carousel .active { left: 0; } .carousel .next, .carousel .prev { position: absolute; top: 0; width: 100%; } .carousel .next { left: 100%; } .carousel .prev { left: -100%; } .carousel .next.left, .carousel .prev.right { left: 0; } .carousel .active.left { left: -100%; } .carousel .active.right { left: 100%; } .carousel-control { position: absolute; top: 40%; left: 15px; width: 40px; height: 40px; margin-top: -20px; font-size: 60px; font-weight: 100; line-height: 30px; color: #fff; text-align: center; background: #333; border: 3px solid #fff; -webkit-border-radius: 23px; -moz-border-radius: 23px; border-radius: 23px; opacity: 0.5; -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=50); filter: alpha(opacity=50); } .carousel-control.right { left: auto; right: 15px; } .carousel-control:hover { color: #fff; text-decoration: none; opacity: 0.9; -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=90); filter: alpha(opacity=90); } .carousel-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 15px 5px; background: #444; background: rgba(0,0,0,0.75); } .carousel-caption h4, .carousel-caption p { color: #fff; } .hero-unit { padding: 60px; margin-bottom: 30px; background-color: #f5f5f5; -webkit-border-radius: 6px; -moz-border-radius: 6px; border-radius: 6px; } .hero-unit h1 { margin-bottom: 0; font-size: 60px; line-height: 1; letter-spacing: -1px; } .hero-unit p { font-size: 18px; font-weight: 200; line-height: 27px; } .pull-right { float: right; } .pull-left { float: left; } .hide { display: none; } .show { display: block; } .invisible { visibility: hidden; } /* * Bootstrap Responsive v2.0.1 * * Copyright 2012 Twitter, Inc * Licensed under the Apache License v2.0 * http://www.apache.org/licenses/LICENSE-2.0 * * Designed and built with all the love in the world @twitter by @mdo and @fat. */ .hidden { display: none; visibility: hidden; } @media (max-width: 480px) { .nav-collapse { -webkit-transform: transform: translate(0, 0, 0);; } .page-header h1 small { display: block; line-height: 18px; } input[class*="span"], select[class*="span"], textarea[class*="span"], .uneditable-input { display: block; width: 100%; min-height: 28px; /* Make inputs at least the height of their button counterpart */ /* Makes inputs behave like true block-level elements */ -webkit-box-sizing: border-box; /* Older Webkit */ -moz-box-sizing: border-box; /* Older FF */ -ms-box-sizing: border-box; /* IE8 */ -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; /* CSS3 spec*/ } .input-prepend input[class*="span"], .input-append input[class*="span"] { width: auto; } input[type="checkbox"], input[type="radio"] { border: 1px solid #ccc; } .form-horizontal .control-group > label { float: none; width: auto; padding-top: 0; text-align: left; } .form-horizontal .controls { margin-left: 0; } .form-horizontal .control-list { padding-top: 0; } .form-horizontal .form-actions { padding-left: 10px; padding-right: 10px; } .modal { position: absolute; top: 10px; left: 10px; right: 10px; width: auto; margin: 0; } .modal.fade.in { top: auto; } .modal-header .close { padding: 10px; margin: -10px; } .carousel-caption { position: static; } } @media (max-width: 768px) { .container { width: auto; padding: 0 20px; } .row-fluid { width: 100%; } .row { margin-left: 0; } .row > [class*="span"], .row-fluid > [class*="span"] { float: none; display: block; width: auto; margin: 0; } } @media (min-width: 768px) and (max-width: 979px) { .row { margin-left: -20px; *zoom: 1; } .row:before, .row:after { display: table; content: ""; } .row:after { clear: both; } [class*="span"] { float: left; margin-left: 20px; } .span1 { width: 42px; } .span2 { width: 104px; } .span3 { width: 166px; } .span4 { width: 228px; } .span5 { width: 290px; } .span6 { width: 352px; } .span7 { width: 414px; } .span8 { width: 476px; } .span9 { width: 538px; } .span10 { width: 600px; } .span11 { width: 662px; } .span12, .container { width: 724px; } .offset1 { margin-left: 82px; } .offset2 { margin-left: 144px; } .offset3 { margin-left: 206px; } .offset4 { margin-left: 268px; } .offset5 { margin-left: 330px; } .offset6 { margin-left: 392px; } .offset7 { margin-left: 454px; } .offset8 { margin-left: 516px; } .offset9 { margin-left: 578px; } .offset10 { margin-left: 640px; } .offset11 { margin-left: 702px; } .row-fluid { width: 100%; *zoom: 1; } .row-fluid:before, .row-fluid:after { display: table; content: ""; } .row-fluid:after { clear: both; } .row-fluid > [class*="span"] { float: left; margin-left: 2.762430939%; } .row-fluid > [class*="span"]:first-child { margin-left: 0; } .row-fluid .span1 { width: 5.801104972%; } .row-fluid .span2 { width: 11.92271298110079%; } .row-fluid .span3 { width: 18.364824027302372%; } .row-fluid .span4 { width: 25.127438110604743%; } .row-fluid .span5 { width: 32.21055523100791%; } .row-fluid .span6 { width: 39.61417538851186%; } .row-fluid .span7 { width: 47.338298583116604%; } .row-fluid .span8 { width: 55.38292481482213%; } .row-fluid .span9 { width: 63.74805408362846%; } .row-fluid .span10 { width: 72.43368638953558%; } .row-fluid .span11 { width: 81.43982173254348%; } .row-fluid .span12 { width: 90.76646011265217%; } input.span1, textarea.span1, .uneditable-input.span1 { width: 32px; } input.span2, textarea.span2, .uneditable-input.span2 { width: 94px; } input.span3, textarea.span3, .uneditable-input.span3 { width: 156px; } input.span4, textarea.span4, .uneditable-input.span4 { width: 218px; } input.span5, textarea.span5, .uneditable-input.span5 { width: 280px; } input.span6, textarea.span6, .uneditable-input.span6 { width: 342px; } input.span7, textarea.span7, .uneditable-input.span7 { width: 404px; } input.span8, textarea.span8, .uneditable-input.span8 { width: 466px; } input.span9, textarea.span9, .uneditable-input.span9 { width: 528px; } input.span10, textarea.span10, .uneditable-input.span10 { width: 590px; } input.span11, textarea.span11, .uneditable-input.span11 { width: 652px; } input.span12, textarea.span12, .uneditable-input.span12 { width: 714px; } } @media (max-width: 979px) { body { padding-top: 0; } .navbar-fixed-top { position: static; margin-bottom: 18px; } .navbar-fixed-top .navbar-inner { padding: 5px; } .navbar .container { width: auto; padding: 0; } .navbar .brand { padding-left: 10px; padding-right: 10px; margin: 0 0 0 -5px; } .navbar .nav-collapse { clear: left; } .navbar .nav { float: none; margin: 0 0 9px; } .navbar .nav > li { float: none; } .navbar .nav > li > a { margin-bottom: 2px; } .navbar .nav > .divider-vertical { display: none; } .navbar .nav .nav-header { color: #999; text-shadow: none; } .navbar .nav > li > a, .navbar .dropdown-menu a { padding: 6px 15px; font-weight: bold; color: #999; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; } .navbar .dropdown-menu li + li a { margin-bottom: 2px; } .navbar .nav > li > a:hover, .navbar .dropdown-menu a:hover { background-color: #333; } .navbar .dropdown-menu { position: static; top: auto; left: auto; float: none; display: block; max-width: none; margin: 0 15px; padding: 0; background-color: transparent; border: none; -webkit-border-radius: 0; -moz-border-radius: 0; border-radius: 0; -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; } .navbar .dropdown-menu:before, .navbar .dropdown-menu:after { display: none; } .navbar .dropdown-menu .divider { display: none; } .navbar-form, .navbar-search { float: none; padding: 9px 15px; margin: 9px 0; border-top: 1px solid #333; border-bottom: 1px solid #333; -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 1px 0 rgba(255,255,255,0.1); -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 1px 0 rgba(255,255,255,0.1); box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 1px 0 rgba(255,255,255,0.1); } .navbar .nav.pull-right { float: none; margin-left: 0; } .navbar-static .navbar-inner { padding-left: 10px; padding-right: 10px; } .btn-navbar { display: block; } .nav-collapse { overflow: hidden; height: 0; } } @media (min-width: 980px) { .nav-collapse.collapse { height: auto !important; } } @media (min-width: 1200px) { .row { margin-left: -30px; *zoom: 1; } .row:before, .row:after { display: table; content: ""; } .row:after { clear: both; } [class*="span"] { float: left; margin-left: 30px; } .span1 { width: 70px; } .span2 { width: 170px; } .span3 { width: 270px; } .span4 { width: 370px; } .span5 { width: 470px; } .span6 { width: 570px; } .span7 { width: 670px; } .span8 { width: 770px; } .span9 { width: 870px; } .span10 { width: 970px; } .span11 { width: 1070px; } .span12, .container { width: 1170px; } .offset1 { margin-left: 130px; } .offset2 { margin-left: 230px; } .offset3 { margin-left: 330px; } .offset4 { margin-left: 430px; } .offset5 { margin-left: 530px; } .offset6 { margin-left: 630px; } .offset7 { margin-left: 730px; } .offset8 { margin-left: 830px; } .offset9 { margin-left: 930px; } .offset10 { margin-left: 1030px; } .offset11 { margin-left: 1130px; } .row-fluid { width: 100%; *zoom: 1; } .row-fluid:before, .row-fluid:after { display: table; content: ""; } .row-fluid:after { clear: both; } .row-fluid > [class*="span"] { float: left; margin-left: 2.564102564%; } .row-fluid > [class*="span"]:first-child { margin-left: 0; } .row-fluid .span1 { width: 5.982905983%; } .row-fluid .span2 { width: 12.272627657423625%; } .row-fluid .span3 { width: 18.869165023270874%; } .row-fluid .span4 { width: 25.77251808054175%; } .row-fluid .span5 { width: 32.98268682923625%; } .row-fluid .span6 { width: 40.49967126935437%; } .row-fluid .span7 { width: 48.32347140089612%; } .row-fluid .span8 { width: 56.4540872238615%; } .row-fluid .span9 { width: 64.8915187382505%; } .row-fluid .span10 { width: 73.63576594406312%; } .row-fluid .span11 { width: 82.68682884129936%; } .row-fluid .span12 { width: 92.04470742995923%; } input.span1, textarea.span1, .uneditable-input.span1 { width: 60px; } input.span2, textarea.span2, .uneditable-input.span2 { width: 160px; } input.span3, textarea.span3, .uneditable-input.span3 { width: 260px; } input.span4, textarea.span4, .uneditable-input.span4 { width: 360px; } input.span5, textarea.span5, .uneditable-input.span5 { width: 460px; } input.span6, textarea.span6, .uneditable-input.span6 { width: 560px; } input.span7, textarea.span7, .uneditable-input.span7 { width: 660px; } input.span8, textarea.span8, .uneditable-input.span8 { width: 760px; } input.span9, textarea.span9, .uneditable-input.span9 { width: 860px; } input.span10, textarea.span10, .uneditable-input.span10 { width: 960px; } input.span11, textarea.span11, .uneditable-input.span11 { width: 1060px; } input.span12, textarea.span12, .uneditable-input.span12 { width: 1160px; } .thumbnails { margin-left: -30px; } .thumbnails > li { margin-left: 30px; } } * { outline: 0; } html { overflow-y: hidden; } nav { text-align: left; padding: 12px 20px 12px 9px; } #app_wrap { top: 50px; left: 10px; bottom: 0; right: 10px; position: fixed; } noscript { z-index: 99999; position: absolute; top: 30px; width: 100%; } noscript p { color: #000; font-size: 24px; text-align: center; padding: 10px 0; } #app_wrap > #editor { position: absolute; margin-right: 5px; top: 50px; left: 10px; bottom: 10px; right: 50%; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; -webkit-box-flex: 1; -moz-box-flex: 1; -ms-box-flex: 1; -webkit-box-flex: 1; -moz-box-flex: 1; -ms-box-flex: 1; -o-box-flex: 1; box-flex: 1; } #app_wrap > #preview { position: absolute; margin-left: 5px; padding: 20px; left: 50%; bottom: 10px; right: 10px; top: 50px; overflow: auto; background: rgba(255,255,255,0.9) url("/img/notebook_paper_200x200.gif") repeat scroll top left; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; -webkit-box-flex: 1; -moz-box-flex: 1; -ms-box-flex: 1; -webkit-box-flex: 1; -moz-box-flex: 1; -ms-box-flex: 1; -o-box-flex: 1; box-flex: 1; } #app_wrap > #preview a { text-decoration: underline; color: #00f; } #github-button { margin: 1% -3px 0 0; float: right; } #filename-counter-container { position: absolute; left: 10px; top: 5px; right: 50%; margin-right: 5px; z-index: 0; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } #right-top-pane { font-size: 16px; /* match with filename/wordcount input */ position: absolute; right: 10px; top: 5px; left: 50%; margin-left: 5px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } #filename-counter-container > #filename { width: 100%; } #filename-counter-container > #wordcounter { width: 18.5%; float: right; } #filename-counter-container > #filename > span, #wordcounter { overflow: hidden; font-size: 16px; font-style: normal; background: #f1eeee; height: 30px; line-height: 30px; padding: 0 6px; display: block; float: left; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } #filename-counter-container > #filename > span { width: 100%; } #filename-counter-container > #filename > span:focus { outline: 0; } #filename-counter-container > #filename.show-word-count-filename-adjust { width: 80%; display: block; margin: 0 0 0 0; } #notify_container { -webkit-user-select: none; -moz-user-select: none; position: fixed; top: -2px; width: 100%; height: auto; overflow: auto; text-align: center; z-index: 10001; } #notify { -webkit-user-select: none; -moz-user-select: none; width: 300px; margin: 0 auto; background-color: #6c6; background-repeat: repeat-x; background-image: -khtml-gradient(linear, left top, left bottom, from(#cfc), to(#6c6)); background-image: -moz-linear-gradient(top, #cfc, #6c6); background-image: -ms-linear-gradient(top, #cfc, #6c6); background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #cfc), color-stop(100%, #6c6)); background-image: -webkit-linear-gradient(top, #cfc, #6c6); background-image: -o-linear-gradient(top, #cfc, #6c6); background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #cfc), color-stop(1, #6c6)); background-image: -webkit-linear-gradient(top, #cfc 0%, #6c6 100%); background-image: -moz-linear-gradient(top, #cfc 0%, #6c6 100%); background-image: -ms-linear-gradient(top, #cfc 0%, #6c6 100%); background-image: -o-linear-gradient(top, #cfc 0%, #6c6 100%); background-image: linear-gradient(top, #cfc 0%, #6c6 100%); display: -webkit-box; -webkit-box-orient: horizontal; -webkit-box-pack: center; -webkit-box-align: center; display: -moz-box; -moz-box-orient: horizontal; -moz-box-pack: center; -moz-box-align: center; display: -webkit-box; display: -moz-box; display: -ms-box; display: -o-box; display: box; -webkit-box-orient: horizontal; -moz-box-orient: horizontal; -ms-box-orient: horizontal; -o-box-orient: horizontal; box-orient: horizontal; -webkit-box-pack: center; -moz-box-pack: center; -ms-box-pack: center; -o-box-pack: center; box-pack: center; -webkit-box-align: center; -moz-box-align: center; -ms-box-align: center; -o-box-align: center; box-align: center; border: 1px solid rgba(0,0,0,0.098); color: #444; font-weight: bold; height: auto; line-height: 1.5em; padding: 6px 8px; text-align: center; overflow: auto; display: none; } #main { opacity: 1; -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); filter: alpha(opacity=100); -webkit-transition: opacity 0.15s linear; -moz-transition: opacity 0.15s linear; -ms-transition: opacity 0.15s linear; -o-transition: opacity 0.15s linear; transition: opacity 0.15s linear; -webkit-transition: opacity 0.15s linear; -moz-transition: opacity 0.15s linear; -o-transition: opacity 0.15s linear; -ms-transition: opacity 0.15s linear; } #main.bye { opacity: 0; -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0); filter: alpha(opacity=0); } #loading { position: absolute; top: 0; left: 0; width: 100%; height: 120%; background: #fff; text-align: center; z-index: 99998; } #loading p:first-child { color: #000; margin: 300px auto 0; text-align: center; font-size: 72px; } #loading p:last-child { color: #111; margin: 42px auto; text-align: center; font-size: 18px; } #loading.swift_top { top: -100%; -webkit-transition: top 0.25s ease-out; -moz-transition: top 0.25s ease-out; -ms-transition: top 0.25s ease-out; -o-transition: top 0.25s ease-out; transition: top 0.25s ease-out; -webkit-transition: top 0.25s ease-out; -moz-transition: top 0.25s ease-out; -o-transition: top 0.25s ease-out; -ms-transition: top 0.25s ease-out; } #loading.fade_slow, .fade_slow { -khtml-opacity: 0; -moz-opacity: 0; opacity: 0; -webkit-transition: opacity 0.15s ease-in; -moz-transition: opacity 0.15s ease-in; -o-transition: opacity 0.15s ease-in; -ms-transition: opacity 0.15s ease-in; -webkit-transition: opacity 0.15s ease-in; -moz-transition: opacity 0.15s ease-in; -ms-transition: opacity 0.15s ease-in; -o-transition: opacity 0.15s ease-in; transition: opacity 0.15s ease-in; } .slick { opacity: 1; -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); filter: alpha(opacity=100); -webkit-transition: opacity bodyTransitiontime linear; -moz-transition: opacity bodyTransitiontime linear; -ms-transition: opacity bodyTransitiontime linear; -o-transition: opacity bodyTransitiontime linear; transition: opacity bodyTransitiontime linear; -webkit-transition: opacity 0.2s linear; -moz-transition: opacity 0.2s linear; -o-transition: opacity 0.2s linear; -ms-transition: opacity 0.2s linear; } .bye { opacity: 0; -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0); filter: alpha(opacity=0); } .modal-body ul { margin: 0; padding: 0 0 18px 25px; overflow: auto; } #preview iframe { border: 0px; width: 100%; height: 100%; } .pager .disabled>a, .pager .disabled>a:hover, .pager .disabled>a:focus, .pager .disabled>span { color: #999; background-color: #fff; cursor: not-allowed; } .private_repo { background: transparent url("/img/icon_lock_16x16.png") no-repeat scroll top left; } .private_repo .tree_file { padding-left: 20px; } .private_repo a:hover { background: #f6f6f6; padding-left: 0px; margin-left: 20px; } .topbar div ul { float: none; margin: 2px auto; } .topbar div .core_menu ul li { display: block; float: none; } .shadowbox { margin: 0 auto; } .opacity_ten { -khtml-opacity: 0.1; -moz-opacity: 0.1; opacity: 0.1; } .opacity_thirty { -khtml-opacity: 0.3; -moz-opacity: 0.3; opacity: 0.3; } .set_wrap { color: #ccc; display: block; line-height: 27px; font-size: 0; } .relative { position: relative; } .vendor, .save { padding-left: 30px; } .icon_vendor { position: absolute; } .icon_vendor.github { margin: 3px 0 0 6px; } .icon_vendor.dropbox { margin: 6px 0 0 9px; } .slide_out { margin-top: -60px; -webkit-transition: margin-top 0.2s ease-out; -moz-transition: margin-top 0.2s ease-out; -o-transition: margin-top 0.2s ease-out; -ms-transition: margin-top 0.2s ease-out; -webkit-transition: margin-top 0.2s ease-out; -moz-transition: margin-top 0.2s ease-out; -ms-transition: margin-top 0.2s ease-out; -o-transition: margin-top 0.2s ease-out; transition: margin-top 0.2s ease-out; } .slide_in { margin-top: 0px; -webkit-transition: margin-top 0.2s ease-in; -moz-transition: margin-top 0.2s ease-in; -o-transition: margin-top 0.2s ease-in; -ms-transition: margin-top 0.2s ease-in; -webkit-transition: margin-top 0.2s ease-in; -moz-transition: margin-top 0.2s ease-in; -ms-transition: margin-top 0.2s ease-in; -o-transition: margin-top 0.2s ease-in; transition: margin-top 0.2s ease-in; } .slide_left { margin-top: 0px; -webkit-transition: margin-top 0.2s ease-in; -moz-transition: margin-top 0.2s ease-in; -ms-transition: margin-top 0.2s ease-in; -o-transition: margin-top 0.2s ease-in; transition: margin-top 0.2s ease-in; -webkit-transition: margin-top 0.2s ease-in; -moz-transition: margin-top 0.2s ease-in; -o-transition: margin-top 0.2s ease-in; -ms-transition: margin-top 0.2s ease-in; } .slide_left { right: 25px; -webkit-transition: right 0.2s ease-out; -moz-transition: right 0.2s ease-out; -o-transition: right 0.2s ease-out; -ms-transition: right 0.2s ease-out; -webkit-transition: right 0.2s ease-out; -moz-transition: right 0.2s ease-out; -ms-transition: right 0.2s ease-out; -o-transition: right 0.2s ease-out; transition: right 0.2s ease-out; } .slide_right { right: -40px; -webkit-transition: right 0.2s ease-out; -moz-transition: right 0.2s ease-out; -o-transition: right 0.2s ease-out; -ms-transition: right 0.2s ease-out transition right 0.2s ease-out; } .main-error { margin: 2% auto; max-width: 660px; } .ir { display: block; border: 0; text-indent: -999em; overflow: hidden; background-color: transparent; background-repeat: no-repeat; text-align: left; direction: ltr; *line-height: 0; } .ir br { display: none; } .hidden { display: none; visibility: hidden; } .visuallyhidden.focusable:active, .visuallyhidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; } @media print { * { background: transparent !important; color: #000 !important; -webkit-box-shadow: none !important; -moz-box-shadow: none !important; box-shadow: none !important; text-shadow: none !important; filter: none !important; -ms-filter: none !important; } a, a:visited { text-decoration: underline; } a[href]:after { content: " (" attr(href) ")"; } abbr[title]:after { content: " (" attr(title) ")"; } .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; } tr, img { page-break-inside: avoid; } img { max-width: 100% !important; } @page { margin: 0.5cm; } p, h2, h3 { orphans: 3; widows: 3; } h2, h3 { page-break-after: avoid; } } </style></head><body> <h1 id="third-party-components">Third-party components</h1> <h2 id="sdwebimage">SDWebImage</h2> <p><a href="https://github.com/rs/SDWebImage">https://github.com/rs/SDWebImage</a> Copyright (c) Olivier Poitrey <a href="&#109;&#x61;&#x69;&#108;&#x74;&#x6f;&#58;&#x72;&#x73;&#64;&#x64;&#x61;&#x69;&#108;&#121;&#109;&#111;&#116;&#x69;&#x6f;&#x6e;&#46;&#x63;&#x6f;&#109;">&#x72;&#x73;&#64;&#x64;&#x61;&#x69;&#108;&#121;&#109;&#111;&#116;&#x69;&#x6f;&#x6e;&#46;&#x63;&#x6f;&#109;</a> License : <a href="https://github.com/rs/SDWebImage/blob/master/LICENSE">https://github.com/rs/SDWebImage/blob/master/LICENSE</a></p> <h2 id="toast">Toast</h2> <p><a href="https://github.com/scalessec/toast">https://github.com/scalessec/toast</a> Copyright (c) 2013 Charles Scalesse. MIT license</p> <h2 id="images">Images</h2> <p>If unspecified, all other assets are the property of Noco and used in iNoco with their agreement. You have to contact Noco (noco.tv) before reusing them, and before any new release using these assets.</p> <h3 id="wikimedia-commons">Wikimedia commons</h3> <p>Octicons Set : </p> <ul> <li><a href="http://commons.wikimedia.org/wiki/Category:Octicons?uselang=fr">http://commons.wikimedia.org/wiki/Category:Octicons?uselang=fr</a> Wikicons set : </li> <li><a href="http://commons.wikimedia.org/wiki/Category:Wikicons?uselang=fr">http://commons.wikimedia.org/wiki/Category:Wikicons?uselang=fr</a> Heart icons : </li> <li><a href="http://commons.wikimedia.org/wiki/File:Human-emblem-favorite-black-blue-128.png">http://commons.wikimedia.org/wiki/File:Human-emblem-favorite-black-blue-128.png</a></li> <li><a href="http://commons.wikimedia.org/wiki/File:Human-emblem-favorite-black-128.png">http://commons.wikimedia.org/wiki/File:Human-emblem-favorite-black-128.png</a></li> </ul> <h3 id="nolife">Nolife</h3> <p>Noco logo : </p> <ul> <li><a href="https://api.noco.tv/cdata/images/noco-splash.png">https://api.noco.tv/cdata/images/noco-splash.png</a></li> </ul> </body></html>
Java
using System; using System.Linq; using System.Reflection; using System.Text; namespace Stealer { public class Spy { public string StealFieldInfo(string className, params string[] fieldsNames) { var sb = new StringBuilder(); sb.AppendLine($"Class under investigation: {className}"); var type = typeof(Hacker); var classInstance = Activator.CreateInstance(type, new object[] { }); var fieldsInfo = type.GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static); foreach (FieldInfo field in fieldsInfo.Where(fld => fieldsNames.Contains(fld.Name))) { sb.AppendLine($"{field.Name} = {field.GetValue(classInstance)}"); } return sb.ToString(); } } }
Java
from .. import Provider as CompanyProvider class Provider(CompanyProvider): formats = ( "{{last_name}} {{company_suffix}}", "{{last_name}} {{last_name}} {{company_suffix}}", "{{large_company}}", ) large_companies = ( "AZAL", "Azergold", "SOCAR", "Socar Polymer", "Global Export Fruits", "Baku Steel Company", "Azersun", "Sun Food", "Azərbaycan Şəkər İstehsalat Birliyi", "Azərsu", "Xəzər Dəniz Gəmiçiliyi", "Azərenerji", "Bakıelektrikşəbəkə", "Azəralüminium", "Bravo", "Azərpambıq Aqrar Sənaye Kompleksi", "CTS-Agro", "Azərtütün Aqrar Sənaye Kompleksi", "Azəripək", "Azfruittrade", "AF Holding", "Azinko Holding", "Gilan Holding", "Azpetrol", "Azərtexnolayn", "Bakı Gəmiqayırma Zavodu", "Gəncə Tekstil Fabriki", "Mətanət A", "İrşad Electronics", ) company_suffixes = ( "ASC", "QSC", "MMC", ) def large_company(self): """ :example: 'SOCAR' """ return self.random_element(self.large_companies)
Java
/* * engine.h * * Created on: Mar 9, 2017 * Author: sushil */ #ifndef ENGINE_H_ #define ENGINE_H_ class InputMgr; #include <GfxMgr.h> #include <inputMgr.h> #include <EntityMgr.h> #include <gameMgr.h> #include <Types.h> #include <UiMgr.h> #include <SoundMgr.h> #include <Grid.h> class EntityMgr; class Engine { private: public: Engine(); ~Engine(); EntityMgr* entityMgr; GfxMgr* gfxMgr; InputMgr* inputMgr; GameMgr* gameMgr; UiMgr* uiMgr; SoundMgr* soundMgr; Grid* gridMgr; //ControlMgr* controlMgr; void init(); void run(); void tickAll(float dt); void stop(); void shutdown(); void loadLevel(); // bool keepRunning; bool omegaOn; STATE theState;//Stores the current state that the engine is in float timeSinceLastEvent;//Stores the time (usually) since last state change }; #endif /* ENGINE_H_ */
Java
import formatPhoneNumber, { formatPhoneNumberIntl } from './formatPhoneNumberDefaultMetadata' describe('formatPhoneNumberDefaultMetadata', () => { it('should format phone numbers', () => { formatPhoneNumber('+12133734253', 'NATIONAL').should.equal('(213) 373-4253') formatPhoneNumber('+12133734253', 'INTERNATIONAL').should.equal('+1 213 373 4253') formatPhoneNumberIntl('+12133734253').should.equal('+1 213 373 4253') }) })
Java
import React from 'react'; import { withStyles } from '@material-ui/core/styles'; import { green } from '@material-ui/core/colors'; import Radio, { RadioProps } from '@material-ui/core/Radio'; import RadioButtonUncheckedIcon from '@material-ui/icons/RadioButtonUnchecked'; import RadioButtonCheckedIcon from '@material-ui/icons/RadioButtonChecked'; const GreenRadio = withStyles({ root: { color: green[400], '&$checked': { color: green[600], }, }, checked: {}, })((props: RadioProps) => <Radio color="default" {...props} />); export default function RadioButtons() { const [selectedValue, setSelectedValue] = React.useState('a'); const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => { setSelectedValue(event.target.value); }; return ( <div> <Radio checked={selectedValue === 'a'} onChange={handleChange} value="a" name="radio-button-demo" inputProps={{ 'aria-label': 'A' }} /> <Radio checked={selectedValue === 'b'} onChange={handleChange} value="b" name="radio-button-demo" inputProps={{ 'aria-label': 'B' }} /> <GreenRadio checked={selectedValue === 'c'} onChange={handleChange} value="c" name="radio-button-demo" inputProps={{ 'aria-label': 'C' }} /> <Radio checked={selectedValue === 'd'} onChange={handleChange} value="d" color="default" name="radio-button-demo" inputProps={{ 'aria-label': 'D' }} /> <Radio checked={selectedValue === 'e'} onChange={handleChange} value="e" color="default" name="radio-button-demo" inputProps={{ 'aria-label': 'E' }} icon={<RadioButtonUncheckedIcon fontSize="small" />} checkedIcon={<RadioButtonCheckedIcon fontSize="small" />} /> </div> ); }
Java
// // ViewController.h // Examples // // Created by Tim Moose on 2/11/14. // Copyright (c) 2014 Tractable Labs. All rights reserved. // #import <UIKit/UIKit.h> #import <TLIndexPathTools/TLTableViewController.h> @interface SelectorTableViewController : TLTableViewController @end
Java
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'><head><title>app/helpers/cars_helper.rb - C0 code coverage information</title> <style type='text/css'>body { background-color: rgb(240, 240, 245); }</style> <style type='text/css'>span.cross-ref-title { font-size: 140%; } span.cross-ref a { text-decoration: none; } span.cross-ref { background-color:#f3f7fa; border: 1px dashed #333; margin: 1em; padding: 0.5em; overflow: hidden; } a.crossref-toggle { text-decoration: none; } span.marked0 { background-color: rgb(185, 210, 200); display: block; } span.marked1 { background-color: rgb(190, 215, 205); display: block; } span.inferred0 { background-color: rgb(175, 200, 200); display: block; } span.inferred1 { background-color: rgb(180, 205, 205); display: block; } span.uncovered0 { background-color: rgb(225, 110, 110); display: block; } span.uncovered1 { background-color: rgb(235, 120, 120); display: block; } span.overview { border-bottom: 8px solid black; } div.overview { border-bottom: 8px solid black; } body { font-family: verdana, arial, helvetica; } div.footer { font-size: 68%; margin-top: 1.5em; } h1, h2, h3, h4, h5, h6 { margin-bottom: 0.5em; } h5 { margin-top: 0.5em; } .hidden { display: none; } div.separator { height: 10px; } /* Commented out for better readability, esp. on IE */ /* table tr td, table tr th { font-size: 68%; } td.value table tr td { font-size: 11px; } */ table.percent_graph { height: 12px; border: #808080 1px solid; empty-cells: show; } table.percent_graph td.covered { height: 10px; background: #00f000; } table.percent_graph td.uncovered { height: 10px; background: #e00000; } table.percent_graph td.NA { height: 10px; background: #eaeaea; } table.report { border-collapse: collapse; width: 100%; } table.report td.heading { background: #dcecff; border: #d0d0d0 1px solid; font-weight: bold; text-align: center; } table.report td.heading:hover { background: #c0ffc0; } table.report td.text { border: #d0d0d0 1px solid; } table.report td.value, table.report td.lines_total, table.report td.lines_code { text-align: right; border: #d0d0d0 1px solid; } table.report tr.light { background-color: rgb(240, 240, 245); } table.report tr.dark { background-color: rgb(230, 230, 235); } </style> <script type='text/javascript'> // <![CDATA[ function toggleCode( id ) { if ( document.getElementById ) elem = document.getElementById( id ); else if ( document.all ) elem = eval( "document.all." + id ); else return false; elemStyle = elem.style; if ( elemStyle.display != "block" ) { elemStyle.display = "block" } else { elemStyle.display = "none" } return true; } // Make cross-references hidden by default document.writeln( "<style type=\"text/css\">span.cross-ref { display: none }</style>" ) // ]]> </script> <style type='text/css'>span.run0 { background-color: rgb(178, 204, 255); display: block; } span.run1 { background-color: rgb(178, 206, 255); display: block; } span.run2 { background-color: rgb(178, 209, 255); display: block; } span.run3 { background-color: rgb(178, 211, 255); display: block; } span.run4 { background-color: rgb(178, 214, 255); display: block; } span.run5 { background-color: rgb(178, 218, 255); display: block; } span.run6 { background-color: rgb(178, 220, 255); display: block; } span.run7 { background-color: rgb(178, 223, 255); display: block; } span.run8 { background-color: rgb(178, 225, 255); display: block; } span.run9 { background-color: rgb(178, 228, 255); display: block; } span.run10 { background-color: rgb(178, 232, 255); display: block; } span.run11 { background-color: rgb(178, 234, 255); display: block; } span.run12 { background-color: rgb(178, 237, 255); display: block; } span.run13 { background-color: rgb(178, 239, 255); display: block; } span.run14 { background-color: rgb(178, 242, 255); display: block; } span.run15 { background-color: rgb(178, 246, 255); display: block; } span.run16 { background-color: rgb(178, 248, 255); display: block; } span.run17 { background-color: rgb(178, 251, 255); display: block; } span.run18 { background-color: rgb(178, 253, 255); display: block; } span.run19 { background-color: rgb(178, 255, 253); display: block; } span.run20 { background-color: rgb(178, 255, 249); display: block; } span.run21 { background-color: rgb(178, 255, 247); display: block; } span.run22 { background-color: rgb(178, 255, 244); display: block; } span.run23 { background-color: rgb(178, 255, 242); display: block; } span.run24 { background-color: rgb(178, 255, 239); display: block; } span.run25 { background-color: rgb(178, 255, 235); display: block; } span.run26 { background-color: rgb(178, 255, 233); display: block; } span.run27 { background-color: rgb(178, 255, 230); display: block; } span.run28 { background-color: rgb(178, 255, 228); display: block; } span.run29 { background-color: rgb(178, 255, 225); display: block; } span.run30 { background-color: rgb(178, 255, 221); display: block; } span.run31 { background-color: rgb(178, 255, 219); display: block; } span.run32 { background-color: rgb(178, 255, 216); display: block; } span.run33 { background-color: rgb(178, 255, 214); display: block; } span.run34 { background-color: rgb(178, 255, 211); display: block; } span.run35 { background-color: rgb(178, 255, 207); display: block; } span.run36 { background-color: rgb(178, 255, 205); display: block; } span.run37 { background-color: rgb(178, 255, 202); display: block; } span.run38 { background-color: rgb(178, 255, 200); display: block; } span.run39 { background-color: rgb(178, 255, 197); display: block; } span.run40 { background-color: rgb(178, 255, 193); display: block; } span.run41 { background-color: rgb(178, 255, 191); display: block; } span.run42 { background-color: rgb(178, 255, 188); display: block; } span.run43 { background-color: rgb(178, 255, 186); display: block; } span.run44 { background-color: rgb(178, 255, 183); display: block; } span.run45 { background-color: rgb(178, 255, 179); display: block; } span.run46 { background-color: rgb(179, 255, 178); display: block; } span.run47 { background-color: rgb(182, 255, 178); display: block; } span.run48 { background-color: rgb(184, 255, 178); display: block; } span.run49 { background-color: rgb(187, 255, 178); display: block; } span.run50 { background-color: rgb(191, 255, 178); display: block; } span.run51 { background-color: rgb(193, 255, 178); display: block; } span.run52 { background-color: rgb(196, 255, 178); display: block; } span.run53 { background-color: rgb(198, 255, 178); display: block; } span.run54 { background-color: rgb(201, 255, 178); display: block; } span.run55 { background-color: rgb(205, 255, 178); display: block; } span.run56 { background-color: rgb(207, 255, 178); display: block; } span.run57 { background-color: rgb(210, 255, 178); display: block; } span.run58 { background-color: rgb(212, 255, 178); display: block; } span.run59 { background-color: rgb(215, 255, 178); display: block; } span.run60 { background-color: rgb(219, 255, 178); display: block; } span.run61 { background-color: rgb(221, 255, 178); display: block; } span.run62 { background-color: rgb(224, 255, 178); display: block; } span.run63 { background-color: rgb(226, 255, 178); display: block; } span.run64 { background-color: rgb(229, 255, 178); display: block; } span.run65 { background-color: rgb(233, 255, 178); display: block; } span.run66 { background-color: rgb(235, 255, 178); display: block; } span.run67 { background-color: rgb(238, 255, 178); display: block; } span.run68 { background-color: rgb(240, 255, 178); display: block; } span.run69 { background-color: rgb(243, 255, 178); display: block; } span.run70 { background-color: rgb(247, 255, 178); display: block; } span.run71 { background-color: rgb(249, 255, 178); display: block; } span.run72 { background-color: rgb(252, 255, 178); display: block; } span.run73 { background-color: rgb(255, 255, 178); display: block; } span.run74 { background-color: rgb(255, 252, 178); display: block; } span.run75 { background-color: rgb(255, 248, 178); display: block; } span.run76 { background-color: rgb(255, 246, 178); display: block; } span.run77 { background-color: rgb(255, 243, 178); display: block; } span.run78 { background-color: rgb(255, 240, 178); display: block; } span.run79 { background-color: rgb(255, 238, 178); display: block; } span.run80 { background-color: rgb(255, 234, 178); display: block; } span.run81 { background-color: rgb(255, 232, 178); display: block; } span.run82 { background-color: rgb(255, 229, 178); display: block; } span.run83 { background-color: rgb(255, 226, 178); display: block; } span.run84 { background-color: rgb(255, 224, 178); display: block; } span.run85 { background-color: rgb(255, 220, 178); display: block; } span.run86 { background-color: rgb(255, 218, 178); display: block; } span.run87 { background-color: rgb(255, 215, 178); display: block; } span.run88 { background-color: rgb(255, 212, 178); display: block; } span.run89 { background-color: rgb(255, 210, 178); display: block; } span.run90 { background-color: rgb(255, 206, 178); display: block; } span.run91 { background-color: rgb(255, 204, 178); display: block; } span.run92 { background-color: rgb(255, 201, 178); display: block; } span.run93 { background-color: rgb(255, 198, 178); display: block; } span.run94 { background-color: rgb(255, 196, 178); display: block; } span.run95 { background-color: rgb(255, 192, 178); display: block; } span.run96 { background-color: rgb(255, 189, 178); display: block; } span.run97 { background-color: rgb(255, 187, 178); display: block; } span.run98 { background-color: rgb(255, 184, 178); display: block; } span.run99 { background-color: rgb(255, 182, 178); display: block; } span.run100 { background-color: rgb(255, 178, 178); display: block; } </style> </head> <body><h3>C0 code coverage information</h3> <p>Generated on Mon Jan 07 11:13:53 -0800 2008 with <a href='http://eigenclass.org/hiki/rcov'>rcov 0.8.1.2</a> </p> <hr/> <pre><span class='marked0'>Code reported as executed by Ruby looks like this... </span><span class='marked1'>and this: this line is also marked as covered. </span><span class='inferred0'>Lines considered as run by rcov, but not reported by Ruby, look like this, </span><span class='inferred1'>and this: these lines were inferred by rcov (using simple heuristics). </span><span class='uncovered0'>Finally, here&apos;s a line marked as not executed. </span></pre> <table class='report'><thead><tr><td class='heading'>Name</td> <td class='heading'>Total lines</td> <td class='heading'>Lines of code</td> <td class='heading'>Total coverage</td> <td class='heading'>Code coverage</td> </tr> </thead> <tbody><tr class='light'><td><a href='app-helpers-cars_helper_rb.html'>app/helpers/cars_helper.rb</a> </td> <td class='lines_total'><tt>2</tt> </td> <td class='lines_code'><tt>2</tt> </td> <td><table cellspacing='0' cellpadding='0' align='right'><tr><td><tt class='coverage_total'>100.0%</tt> &nbsp;</td> <td><table cellspacing='0' class='percent_graph' cellpadding='0' width='100'><tr><td class='covered' width='100'/> <td class='uncovered' width='0'/> </tr> </table> </td> </tr> </table> </td> <td><table cellspacing='0' cellpadding='0' align='right'><tr><td><tt class='coverage_code'>100.0%</tt> &nbsp;</td> <td><table cellspacing='0' class='percent_graph' cellpadding='0' width='100'><tr><td class='covered' width='100'/> <td class='uncovered' width='0'/> </tr> </table> </td> </tr> </table> </td> </tr> </tbody> </table> <pre><span class="marked1"><a name="line1"></a>1 module CarsHelper </span><span class="inferred0"><a name="line2"></a>2 end </span></pre><hr/> <p>Generated using the <a href='http://eigenclass.org/hiki.rb?rcov'>rcov code coverage analysis tool for Ruby</a> version 0.8.1.2.</p> <p><a href='http://validator.w3.org/check/referer'><img src='http://www.w3.org/Icons/valid-xhtml10' height='31' alt='Valid XHTML 1.0!' width='88'/> </a> <a href='http://jigsaw.w3.org/css-validator/check/referer'><img src='http://jigsaw.w3.org/css-validator/images/vcss' alt='Valid CSS!' style='border:0;width:88px;height:31px'/> </a> </p> </body> </html>
Java
class JeraPushGenerator < Rails::Generators::NamedBase desc "This generator creates an initializer file at config/initializers" source_root File.expand_path("../templates", __FILE__) MissingModel = Class.new(Thor::Error) def initializer_file template 'jera_push.rb', 'config/initializers/jera_push.rb' inject_into_file 'config/initializers/assets.rb', "\nRails.application.config.assets.precompile += %w( jera_push/jera_push.css jera_push/jera_push.js )", after: '# Precompile additional assets.' end def locale_file copy_file '../../../../config/locale/jera_push.pt-BR.yml', 'config/locales/jera_push.pt-BR.yml' end def generate_migrations unless model_exists? raise MissingModel, "\n\tModel \"#{file_name.titlecase}\" doesn't exists. Please, create your Model and try again." end inject_into_file model_path, "\n\thas_many :devices, as: :pushable, class_name: 'JeraPush::Device'", after: '< ActiveRecord::Base' inject_into_file model_path, "\n\thas_many :devices, as: :pushable, class_name: 'JeraPush::Device'", after: '< ApplicationRecord' case self.behavior when :invoke generate "active_record:jera_push", file_name when :revoke Rails::Generators.invoke "active_record:jera_push", [file_name], behavior: :revoke end end private def model_exists? File.exist?(File.join(destination_root, model_path)) end def model_path @model_path ||= File.join("app", "models", "#{file_path}.rb") end end
Java
<!DOCTYPE HTML> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (11.0.10) on Thu Apr 15 10:34:57 CEST 2021 --> <title>Uses of Class com.wrapper.spotify.model_objects.miscellaneous.CurrentlyPlaying.Builder (Spotify Web API Java Client 6.5.3 API)</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="dc.created" content="2021-04-15"> <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> <link rel="stylesheet" type="text/css" href="../../../../../../jquery/jquery-ui.css" title="Style"> <script type="text/javascript" src="../../../../../../script.js"></script> <script type="text/javascript" src="../../../../../../jquery/jszip/dist/jszip.min.js"></script> <script type="text/javascript" src="../../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script> <!--[if IE]> <script type="text/javascript" src="../../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script> <![endif]--> <script type="text/javascript" src="../../../../../../jquery/jquery-3.5.1.js"></script> <script type="text/javascript" src="../../../../../../jquery/jquery-ui.js"></script> </head> <body> <script type="text/javascript"><!-- try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Class com.wrapper.spotify.model_objects.miscellaneous.CurrentlyPlaying.Builder (Spotify Web API Java Client 6.5.3 API)"; } } catch(err) { } //--> var pathtoroot = "../../../../../../"; var useModuleDirectories = true; loadScripts(document, 'script');</script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <header role="banner"> <nav role="navigation"> <div class="fixedNav"> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a id="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a id="navbar.top.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../index.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../CurrentlyPlaying.Builder.html" title="class in com.wrapper.spotify.model_objects.miscellaneous">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../index-all.html">Index</a></li> <li><a href="../../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../../../allclasses.html">All&nbsp;Classes</a></li> </ul> <ul class="navListSearch"> <li><label for="search">SEARCH:</label> <input type="text" id="search" value="search" disabled="disabled"> <input type="reset" id="reset" value="reset" disabled="disabled"> </li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> </div> <a id="skip.navbar.top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> </div> <div class="navPadding">&nbsp;</div> <script type="text/javascript"><!-- $('.navPadding').css('padding-top', $('.fixedNav').css("height")); //--> </script> </nav> </header> <main role="main"> <div class="header"> <h2 title="Uses of Class com.wrapper.spotify.model_objects.miscellaneous.CurrentlyPlaying.Builder" class="title">Uses of Class<br>com.wrapper.spotify.model_objects.miscellaneous.CurrentlyPlaying.Builder</h2> </div> <div class="classUseContainer"> <ul class="blockList"> <li class="blockList"> <table class="useSummary"> <caption><span>Packages that use <a href="../CurrentlyPlaying.Builder.html" title="class in com.wrapper.spotify.model_objects.miscellaneous">CurrentlyPlaying.Builder</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Package</th> <th class="colLast" scope="col">Description</th> </tr> <tbody> <tr class="altColor"> <th class="colFirst" scope="row"><a href="#com.wrapper.spotify.model_objects.miscellaneous">com.wrapper.spotify.model_objects.miscellaneous</a></th> <td class="colLast">&nbsp;</td> </tr> </tbody> </table> </li> <li class="blockList"> <ul class="blockList"> <li class="blockList"> <section role="region"><a id="com.wrapper.spotify.model_objects.miscellaneous"> <!-- --> </a> <h3>Uses of <a href="../CurrentlyPlaying.Builder.html" title="class in com.wrapper.spotify.model_objects.miscellaneous">CurrentlyPlaying.Builder</a> in <a href="../package-summary.html">com.wrapper.spotify.model_objects.miscellaneous</a></h3> <table class="useSummary"> <caption><span>Methods in <a href="../package-summary.html">com.wrapper.spotify.model_objects.miscellaneous</a> that return <a href="../CurrentlyPlaying.Builder.html" title="class in com.wrapper.spotify.model_objects.miscellaneous">CurrentlyPlaying.Builder</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colSecond" scope="col">Method</th> <th class="colLast" scope="col">Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code><a href="../CurrentlyPlaying.Builder.html" title="class in com.wrapper.spotify.model_objects.miscellaneous">CurrentlyPlaying.Builder</a></code></td> <th class="colSecond" scope="row"><span class="typeNameLabel">CurrentlyPlaying.</span><code><span class="memberNameLink"><a href="../CurrentlyPlaying.html#builder()">builder</a></span>()</code></th> <td class="colLast">&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><code><a href="../CurrentlyPlaying.Builder.html" title="class in com.wrapper.spotify.model_objects.miscellaneous">CurrentlyPlaying.Builder</a></code></td> <th class="colSecond" scope="row"><span class="typeNameLabel">CurrentlyPlaying.Builder.</span><code><span class="memberNameLink"><a href="../CurrentlyPlaying.Builder.html#setActions(com.wrapper.spotify.model_objects.special.Actions)">setActions</a></span>&#8203;(<a href="../../special/Actions.html" title="class in com.wrapper.spotify.model_objects.special">Actions</a>&nbsp;actions)</code></th> <td class="colLast"> <div class="block">The actions setter.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code><a href="../CurrentlyPlaying.Builder.html" title="class in com.wrapper.spotify.model_objects.miscellaneous">CurrentlyPlaying.Builder</a></code></td> <th class="colSecond" scope="row"><span class="typeNameLabel">CurrentlyPlaying.Builder.</span><code><span class="memberNameLink"><a href="../CurrentlyPlaying.Builder.html#setContext(com.wrapper.spotify.model_objects.specification.Context)">setContext</a></span>&#8203;(<a href="../../specification/Context.html" title="class in com.wrapper.spotify.model_objects.specification">Context</a>&nbsp;context)</code></th> <td class="colLast"> <div class="block">The playing context setter.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code><a href="../CurrentlyPlaying.Builder.html" title="class in com.wrapper.spotify.model_objects.miscellaneous">CurrentlyPlaying.Builder</a></code></td> <th class="colSecond" scope="row"><span class="typeNameLabel">CurrentlyPlaying.Builder.</span><code><span class="memberNameLink"><a href="../CurrentlyPlaying.Builder.html#setCurrentlyPlayingType(com.wrapper.spotify.enums.CurrentlyPlayingType)">setCurrentlyPlayingType</a></span>&#8203;(<a href="../../../enums/CurrentlyPlayingType.html" title="enum in com.wrapper.spotify.enums">CurrentlyPlayingType</a>&nbsp;currentlyPlayingType)</code></th> <td class="colLast"> <div class="block">The currently playing type setter.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code><a href="../CurrentlyPlaying.Builder.html" title="class in com.wrapper.spotify.model_objects.miscellaneous">CurrentlyPlaying.Builder</a></code></td> <th class="colSecond" scope="row"><span class="typeNameLabel">CurrentlyPlaying.Builder.</span><code><span class="memberNameLink"><a href="../CurrentlyPlaying.Builder.html#setIs_playing(java.lang.Boolean)">setIs_playing</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html?is-external=true" title="class or interface in java.lang" class="externalLink">Boolean</a>&nbsp;is_playing)</code></th> <td class="colLast"> <div class="block">The playing state setter.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code><a href="../CurrentlyPlaying.Builder.html" title="class in com.wrapper.spotify.model_objects.miscellaneous">CurrentlyPlaying.Builder</a></code></td> <th class="colSecond" scope="row"><span class="typeNameLabel">CurrentlyPlaying.Builder.</span><code><span class="memberNameLink"><a href="../CurrentlyPlaying.Builder.html#setItem(com.wrapper.spotify.model_objects.IPlaylistItem)">setItem</a></span>&#8203;(<a href="../../IPlaylistItem.html" title="interface in com.wrapper.spotify.model_objects">IPlaylistItem</a>&nbsp;item)</code></th> <td class="colLast"> <div class="block">The currently playing item setter.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code><a href="../CurrentlyPlaying.Builder.html" title="class in com.wrapper.spotify.model_objects.miscellaneous">CurrentlyPlaying.Builder</a></code></td> <th class="colSecond" scope="row"><span class="typeNameLabel">CurrentlyPlaying.Builder.</span><code><span class="memberNameLink"><a href="../CurrentlyPlaying.Builder.html#setProgress_ms(java.lang.Integer)">setProgress_ms</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang" class="externalLink">Integer</a>&nbsp;progress_ms)</code></th> <td class="colLast"> <div class="block">The current track progress setter.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code><a href="../CurrentlyPlaying.Builder.html" title="class in com.wrapper.spotify.model_objects.miscellaneous">CurrentlyPlaying.Builder</a></code></td> <th class="colSecond" scope="row"><span class="typeNameLabel">CurrentlyPlaying.Builder.</span><code><span class="memberNameLink"><a href="../CurrentlyPlaying.Builder.html#setTimestamp(java.lang.Long)">setTimestamp</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Long.html?is-external=true" title="class or interface in java.lang" class="externalLink">Long</a>&nbsp;timestamp)</code></th> <td class="colLast"> <div class="block">The timestamp setter.</div> </td> </tr> </tbody> </table> </section> </li> </ul> </li> </ul> </div> </main> <footer role="contentinfo"> <nav role="navigation"> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a id="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a id="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../index.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../CurrentlyPlaying.Builder.html" title="class in com.wrapper.spotify.model_objects.miscellaneous">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../index-all.html">Index</a></li> <li><a href="../../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../../../allclasses.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> </div> <a id="skip.navbar.bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> </nav> <p class="legalCopy"><small>Copyright &#169; 2021. All rights reserved.</small></p> </footer> </body> </html>
Java
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Copyright (c) 2011-2012 Litecoin Developers // Copyright (c) 2013 doriancoin Developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "wallet.h" #include "walletdb.h" #include "crypter.h" #include "ui_interface.h" #include "base58.h" using namespace std; ////////////////////////////////////////////////////////////////////////////// // // mapWallet // struct CompareValueOnly { bool operator()(const pair<int64, pair<const CWalletTx*, unsigned int> >& t1, const pair<int64, pair<const CWalletTx*, unsigned int> >& t2) const { return t1.first < t2.first; } }; CPubKey CWallet::GenerateNewKey() { bool fCompressed = CanSupportFeature(FEATURE_COMPRPUBKEY); // default to compressed public keys if we want 0.6.0 wallets RandAddSeedPerfmon(); CKey key; key.MakeNewKey(fCompressed); // Compressed public keys were introduced in version 0.6.0 if (fCompressed) SetMinVersion(FEATURE_COMPRPUBKEY); if (!AddKey(key)) throw std::runtime_error("CWallet::GenerateNewKey() : AddKey failed"); return key.GetPubKey(); } bool CWallet::AddKey(const CKey& key) { if (!CCryptoKeyStore::AddKey(key)) return false; if (!fFileBacked) return true; if (!IsCrypted()) return CWalletDB(strWalletFile).WriteKey(key.GetPubKey(), key.GetPrivKey()); return true; } bool CWallet::AddCryptedKey(const CPubKey &vchPubKey, const vector<unsigned char> &vchCryptedSecret) { if (!CCryptoKeyStore::AddCryptedKey(vchPubKey, vchCryptedSecret)) return false; if (!fFileBacked) return true; { LOCK(cs_wallet); if (pwalletdbEncryption) return pwalletdbEncryption->WriteCryptedKey(vchPubKey, vchCryptedSecret); else return CWalletDB(strWalletFile).WriteCryptedKey(vchPubKey, vchCryptedSecret); } return false; } bool CWallet::AddCScript(const CScript& redeemScript) { if (!CCryptoKeyStore::AddCScript(redeemScript)) return false; if (!fFileBacked) return true; return CWalletDB(strWalletFile).WriteCScript(Hash160(redeemScript), redeemScript); } bool CWallet::Unlock(const SecureString& strWalletPassphrase) { if (!IsLocked()) return false; CCrypter crypter; CKeyingMaterial vMasterKey; { LOCK(cs_wallet); BOOST_FOREACH(const MasterKeyMap::value_type& pMasterKey, mapMasterKeys) { if(!crypter.SetKeyFromPassphrase(strWalletPassphrase, pMasterKey.second.vchSalt, pMasterKey.second.nDeriveIterations, pMasterKey.second.nDerivationMethod)) return false; if (!crypter.Decrypt(pMasterKey.second.vchCryptedKey, vMasterKey)) return false; if (CCryptoKeyStore::Unlock(vMasterKey)) return true; } } return false; } bool CWallet::ChangeWalletPassphrase(const SecureString& strOldWalletPassphrase, const SecureString& strNewWalletPassphrase) { bool fWasLocked = IsLocked(); { LOCK(cs_wallet); Lock(); CCrypter crypter; CKeyingMaterial vMasterKey; BOOST_FOREACH(MasterKeyMap::value_type& pMasterKey, mapMasterKeys) { if(!crypter.SetKeyFromPassphrase(strOldWalletPassphrase, pMasterKey.second.vchSalt, pMasterKey.second.nDeriveIterations, pMasterKey.second.nDerivationMethod)) return false; if (!crypter.Decrypt(pMasterKey.second.vchCryptedKey, vMasterKey)) return false; if (CCryptoKeyStore::Unlock(vMasterKey)) { int64 nStartTime = GetTimeMillis(); crypter.SetKeyFromPassphrase(strNewWalletPassphrase, pMasterKey.second.vchSalt, pMasterKey.second.nDeriveIterations, pMasterKey.second.nDerivationMethod); pMasterKey.second.nDeriveIterations = pMasterKey.second.nDeriveIterations * (100 / ((double)(GetTimeMillis() - nStartTime))); nStartTime = GetTimeMillis(); crypter.SetKeyFromPassphrase(strNewWalletPassphrase, pMasterKey.second.vchSalt, pMasterKey.second.nDeriveIterations, pMasterKey.second.nDerivationMethod); pMasterKey.second.nDeriveIterations = (pMasterKey.second.nDeriveIterations + pMasterKey.second.nDeriveIterations * 100 / ((double)(GetTimeMillis() - nStartTime))) / 2; if (pMasterKey.second.nDeriveIterations < 25000) pMasterKey.second.nDeriveIterations = 25000; printf("Wallet passphrase changed to an nDeriveIterations of %i\n", pMasterKey.second.nDeriveIterations); if (!crypter.SetKeyFromPassphrase(strNewWalletPassphrase, pMasterKey.second.vchSalt, pMasterKey.second.nDeriveIterations, pMasterKey.second.nDerivationMethod)) return false; if (!crypter.Encrypt(vMasterKey, pMasterKey.second.vchCryptedKey)) return false; CWalletDB(strWalletFile).WriteMasterKey(pMasterKey.first, pMasterKey.second); if (fWasLocked) Lock(); return true; } } } return false; } void CWallet::SetBestChain(const CBlockLocator& loc) { CWalletDB walletdb(strWalletFile); walletdb.WriteBestBlock(loc); } // This class implements an addrIncoming entry that causes pre-0.4 // clients to crash on startup if reading a private-key-encrypted wallet. class CCorruptAddress { public: IMPLEMENT_SERIALIZE ( if (nType & SER_DISK) READWRITE(nVersion); ) }; bool CWallet::SetMinVersion(enum WalletFeature nVersion, CWalletDB* pwalletdbIn, bool fExplicit) { if (nWalletVersion >= nVersion) return true; // when doing an explicit upgrade, if we pass the max version permitted, upgrade all the way if (fExplicit && nVersion > nWalletMaxVersion) nVersion = FEATURE_LATEST; nWalletVersion = nVersion; if (nVersion > nWalletMaxVersion) nWalletMaxVersion = nVersion; if (fFileBacked) { CWalletDB* pwalletdb = pwalletdbIn ? pwalletdbIn : new CWalletDB(strWalletFile); if (nWalletVersion >= 40000) { // Versions prior to 0.4.0 did not support the "minversion" record. // Use a CCorruptAddress to make them crash instead. CCorruptAddress corruptAddress; pwalletdb->WriteSetting("addrIncoming", corruptAddress); } if (nWalletVersion > 40000) pwalletdb->WriteMinVersion(nWalletVersion); if (!pwalletdbIn) delete pwalletdb; } return true; } bool CWallet::SetMaxVersion(int nVersion) { // cannot downgrade below current version if (nWalletVersion > nVersion) return false; nWalletMaxVersion = nVersion; return true; } bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase) { if (IsCrypted()) return false; CKeyingMaterial vMasterKey; RandAddSeedPerfmon(); vMasterKey.resize(WALLET_CRYPTO_KEY_SIZE); RAND_bytes(&vMasterKey[0], WALLET_CRYPTO_KEY_SIZE); CMasterKey kMasterKey; RandAddSeedPerfmon(); kMasterKey.vchSalt.resize(WALLET_CRYPTO_SALT_SIZE); RAND_bytes(&kMasterKey.vchSalt[0], WALLET_CRYPTO_SALT_SIZE); CCrypter crypter; int64 nStartTime = GetTimeMillis(); crypter.SetKeyFromPassphrase(strWalletPassphrase, kMasterKey.vchSalt, 25000, kMasterKey.nDerivationMethod); kMasterKey.nDeriveIterations = 2500000 / ((double)(GetTimeMillis() - nStartTime)); nStartTime = GetTimeMillis(); crypter.SetKeyFromPassphrase(strWalletPassphrase, kMasterKey.vchSalt, kMasterKey.nDeriveIterations, kMasterKey.nDerivationMethod); kMasterKey.nDeriveIterations = (kMasterKey.nDeriveIterations + kMasterKey.nDeriveIterations * 100 / ((double)(GetTimeMillis() - nStartTime))) / 2; if (kMasterKey.nDeriveIterations < 25000) kMasterKey.nDeriveIterations = 25000; printf("Encrypting Wallet with an nDeriveIterations of %i\n", kMasterKey.nDeriveIterations); if (!crypter.SetKeyFromPassphrase(strWalletPassphrase, kMasterKey.vchSalt, kMasterKey.nDeriveIterations, kMasterKey.nDerivationMethod)) return false; if (!crypter.Encrypt(vMasterKey, kMasterKey.vchCryptedKey)) return false; { LOCK(cs_wallet); mapMasterKeys[++nMasterKeyMaxID] = kMasterKey; if (fFileBacked) { pwalletdbEncryption = new CWalletDB(strWalletFile); if (!pwalletdbEncryption->TxnBegin()) return false; pwalletdbEncryption->WriteMasterKey(nMasterKeyMaxID, kMasterKey); } if (!EncryptKeys(vMasterKey)) { if (fFileBacked) pwalletdbEncryption->TxnAbort(); exit(1); //We now probably have half of our keys encrypted in memory, and half not...die and let the user reload their unencrypted wallet. } // Encryption was introduced in version 0.4.0 SetMinVersion(FEATURE_WALLETCRYPT, pwalletdbEncryption, true); if (fFileBacked) { if (!pwalletdbEncryption->TxnCommit()) exit(1); //We now have keys encrypted in memory, but no on disk...die to avoid confusion and let the user reload their unencrypted wallet. delete pwalletdbEncryption; pwalletdbEncryption = NULL; } Lock(); Unlock(strWalletPassphrase); NewKeyPool(); Lock(); // Need to completely rewrite the wallet file; if we don't, bdb might keep // bits of the unencrypted private key in slack space in the database file. CDB::Rewrite(strWalletFile); } NotifyStatusChanged(this); return true; } void CWallet::WalletUpdateSpent(const CTransaction &tx) { // Anytime a signature is successfully verified, it's proof the outpoint is spent. // Update the wallet spent flag if it doesn't know due to wallet.dat being // restored from backup or the user making copies of wallet.dat. { LOCK(cs_wallet); BOOST_FOREACH(const CTxIn& txin, tx.vin) { map<uint256, CWalletTx>::iterator mi = mapWallet.find(txin.prevout.hash); if (mi != mapWallet.end()) { CWalletTx& wtx = (*mi).second; if (!wtx.IsSpent(txin.prevout.n) && IsMine(wtx.vout[txin.prevout.n])) { printf("WalletUpdateSpent found spent coin %sbc %s\n", FormatMoney(wtx.GetCredit()).c_str(), wtx.GetHash().ToString().c_str()); wtx.MarkSpent(txin.prevout.n); wtx.WriteToDisk(); NotifyTransactionChanged(this, txin.prevout.hash, CT_UPDATED); } } } } } void CWallet::MarkDirty() { { LOCK(cs_wallet); BOOST_FOREACH(PAIRTYPE(const uint256, CWalletTx)& item, mapWallet) item.second.MarkDirty(); } } bool CWallet::AddToWallet(const CWalletTx& wtxIn) { uint256 hash = wtxIn.GetHash(); { LOCK(cs_wallet); // Inserts only if not already there, returns tx inserted or tx found pair<map<uint256, CWalletTx>::iterator, bool> ret = mapWallet.insert(make_pair(hash, wtxIn)); CWalletTx& wtx = (*ret.first).second; wtx.BindWallet(this); bool fInsertedNew = ret.second; if (fInsertedNew) wtx.nTimeReceived = GetAdjustedTime(); bool fUpdated = false; if (!fInsertedNew) { // Merge if (wtxIn.hashBlock != 0 && wtxIn.hashBlock != wtx.hashBlock) { wtx.hashBlock = wtxIn.hashBlock; fUpdated = true; } if (wtxIn.nIndex != -1 && (wtxIn.vMerkleBranch != wtx.vMerkleBranch || wtxIn.nIndex != wtx.nIndex)) { wtx.vMerkleBranch = wtxIn.vMerkleBranch; wtx.nIndex = wtxIn.nIndex; fUpdated = true; } if (wtxIn.fFromMe && wtxIn.fFromMe != wtx.fFromMe) { wtx.fFromMe = wtxIn.fFromMe; fUpdated = true; } fUpdated |= wtx.UpdateSpent(wtxIn.vfSpent); } //// debug print printf("AddToWallet %s %s%s\n", wtxIn.GetHash().ToString().substr(0,10).c_str(), (fInsertedNew ? "new" : ""), (fUpdated ? "update" : "")); // Write to disk if (fInsertedNew || fUpdated) if (!wtx.WriteToDisk()) return false; #ifndef QT_GUI // If default receiving address gets used, replace it with a new one CScript scriptDefaultKey; scriptDefaultKey.SetDestination(vchDefaultKey.GetID()); BOOST_FOREACH(const CTxOut& txout, wtx.vout) { if (txout.scriptPubKey == scriptDefaultKey) { CPubKey newDefaultKey; if (GetKeyFromPool(newDefaultKey, false)) { SetDefaultKey(newDefaultKey); SetAddressBookName(vchDefaultKey.GetID(), ""); } } } #endif // since AddToWallet is called directly for self-originating transactions, check for consumption of own coins WalletUpdateSpent(wtx); // Notify UI of new or updated transaction NotifyTransactionChanged(this, hash, fInsertedNew ? CT_NEW : CT_UPDATED); } return true; } // Add a transaction to the wallet, or update it. // pblock is optional, but should be provided if the transaction is known to be in a block. // If fUpdate is true, existing transactions will be updated. bool CWallet::AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pblock, bool fUpdate, bool fFindBlock) { uint256 hash = tx.GetHash(); { LOCK(cs_wallet); bool fExisted = mapWallet.count(hash); if (fExisted && !fUpdate) return false; if (fExisted || IsMine(tx) || IsFromMe(tx)) { CWalletTx wtx(this,tx); // Get merkle branch if transaction was found in a block if (pblock) wtx.SetMerkleBranch(pblock); return AddToWallet(wtx); } else WalletUpdateSpent(tx); } return false; } bool CWallet::EraseFromWallet(uint256 hash) { if (!fFileBacked) return false; { LOCK(cs_wallet); if (mapWallet.erase(hash)) CWalletDB(strWalletFile).EraseTx(hash); } return true; } bool CWallet::IsMine(const CTxIn &txin) const { { LOCK(cs_wallet); map<uint256, CWalletTx>::const_iterator mi = mapWallet.find(txin.prevout.hash); if (mi != mapWallet.end()) { const CWalletTx& prev = (*mi).second; if (txin.prevout.n < prev.vout.size()) if (IsMine(prev.vout[txin.prevout.n])) return true; } } return false; } int64 CWallet::GetDebit(const CTxIn &txin) const { { LOCK(cs_wallet); map<uint256, CWalletTx>::const_iterator mi = mapWallet.find(txin.prevout.hash); if (mi != mapWallet.end()) { const CWalletTx& prev = (*mi).second; if (txin.prevout.n < prev.vout.size()) if (IsMine(prev.vout[txin.prevout.n])) return prev.vout[txin.prevout.n].nValue; } } return 0; } bool CWallet::IsChange(const CTxOut& txout) const { CTxDestination address; // TODO: fix handling of 'change' outputs. The assumption is that any // payment to a TX_PUBKEYHASH that is mine but isn't in the address book // is change. That assumption is likely to break when we implement multisignature // wallets that return change back into a multi-signature-protected address; // a better way of identifying which outputs are 'the send' and which are // 'the change' will need to be implemented (maybe extend CWalletTx to remember // which output, if any, was change). if (ExtractDestination(txout.scriptPubKey, address) && ::IsMine(*this, address)) { LOCK(cs_wallet); if (!mapAddressBook.count(address)) return true; } return false; } int64 CWalletTx::GetTxTime() const { return nTimeReceived; } int CWalletTx::GetRequestCount() const { // Returns -1 if it wasn't being tracked int nRequests = -1; { LOCK(pwallet->cs_wallet); if (IsCoinBase()) { // Generated block if (hashBlock != 0) { map<uint256, int>::const_iterator mi = pwallet->mapRequestCount.find(hashBlock); if (mi != pwallet->mapRequestCount.end()) nRequests = (*mi).second; } } else { // Did anyone request this transaction? map<uint256, int>::const_iterator mi = pwallet->mapRequestCount.find(GetHash()); if (mi != pwallet->mapRequestCount.end()) { nRequests = (*mi).second; // How about the block it's in? if (nRequests == 0 && hashBlock != 0) { map<uint256, int>::const_iterator mi = pwallet->mapRequestCount.find(hashBlock); if (mi != pwallet->mapRequestCount.end()) nRequests = (*mi).second; else nRequests = 1; // If it's in someone else's block it must have got out } } } } return nRequests; } void CWalletTx::GetAmounts(int64& nGeneratedImmature, int64& nGeneratedMature, list<pair<CTxDestination, int64> >& listReceived, list<pair<CTxDestination, int64> >& listSent, int64& nFee, string& strSentAccount) const { nGeneratedImmature = nGeneratedMature = nFee = 0; listReceived.clear(); listSent.clear(); strSentAccount = strFromAccount; if (IsCoinBase()) { if (GetBlocksToMaturity() > 0) nGeneratedImmature = pwallet->GetCredit(*this); else nGeneratedMature = GetCredit(); return; } // Compute fee: int64 nDebit = GetDebit(); if (nDebit > 0) // debit>0 means we signed/sent this transaction { int64 nValueOut = GetValueOut(); nFee = nDebit - nValueOut; } // Sent/received. BOOST_FOREACH(const CTxOut& txout, vout) { CTxDestination address; vector<unsigned char> vchPubKey; if (!ExtractDestination(txout.scriptPubKey, address)) { printf("CWalletTx::GetAmounts: Unknown transaction type found, txid %s\n", this->GetHash().ToString().c_str()); } // Don't report 'change' txouts if (nDebit > 0 && pwallet->IsChange(txout)) continue; if (nDebit > 0) listSent.push_back(make_pair(address, txout.nValue)); if (pwallet->IsMine(txout)) listReceived.push_back(make_pair(address, txout.nValue)); } } void CWalletTx::GetAccountAmounts(const string& strAccount, int64& nGenerated, int64& nReceived, int64& nSent, int64& nFee) const { nGenerated = nReceived = nSent = nFee = 0; int64 allGeneratedImmature, allGeneratedMature, allFee; allGeneratedImmature = allGeneratedMature = allFee = 0; string strSentAccount; list<pair<CTxDestination, int64> > listReceived; list<pair<CTxDestination, int64> > listSent; GetAmounts(allGeneratedImmature, allGeneratedMature, listReceived, listSent, allFee, strSentAccount); if (strAccount == "") nGenerated = allGeneratedMature; if (strAccount == strSentAccount) { BOOST_FOREACH(const PAIRTYPE(CTxDestination,int64)& s, listSent) nSent += s.second; nFee = allFee; } { LOCK(pwallet->cs_wallet); BOOST_FOREACH(const PAIRTYPE(CTxDestination,int64)& r, listReceived) { if (pwallet->mapAddressBook.count(r.first)) { map<CTxDestination, string>::const_iterator mi = pwallet->mapAddressBook.find(r.first); if (mi != pwallet->mapAddressBook.end() && (*mi).second == strAccount) nReceived += r.second; } else if (strAccount.empty()) { nReceived += r.second; } } } } void CWalletTx::AddSupportingTransactions(CTxDB& txdb) { vtxPrev.clear(); const int COPY_DEPTH = 3; if (SetMerkleBranch() < COPY_DEPTH) { vector<uint256> vWorkQueue; BOOST_FOREACH(const CTxIn& txin, vin) vWorkQueue.push_back(txin.prevout.hash); // This critsect is OK because txdb is already open { LOCK(pwallet->cs_wallet); map<uint256, const CMerkleTx*> mapWalletPrev; set<uint256> setAlreadyDone; for (unsigned int i = 0; i < vWorkQueue.size(); i++) { uint256 hash = vWorkQueue[i]; if (setAlreadyDone.count(hash)) continue; setAlreadyDone.insert(hash); CMerkleTx tx; map<uint256, CWalletTx>::const_iterator mi = pwallet->mapWallet.find(hash); if (mi != pwallet->mapWallet.end()) { tx = (*mi).second; BOOST_FOREACH(const CMerkleTx& txWalletPrev, (*mi).second.vtxPrev) mapWalletPrev[txWalletPrev.GetHash()] = &txWalletPrev; } else if (mapWalletPrev.count(hash)) { tx = *mapWalletPrev[hash]; } else if (!fClient && txdb.ReadDiskTx(hash, tx)) { ; } else { printf("ERROR: AddSupportingTransactions() : unsupported transaction\n"); continue; } int nDepth = tx.SetMerkleBranch(); vtxPrev.push_back(tx); if (nDepth < COPY_DEPTH) { BOOST_FOREACH(const CTxIn& txin, tx.vin) vWorkQueue.push_back(txin.prevout.hash); } } } } reverse(vtxPrev.begin(), vtxPrev.end()); } bool CWalletTx::WriteToDisk() { return CWalletDB(pwallet->strWalletFile).WriteTx(GetHash(), *this); } // Scan the block chain (starting in pindexStart) for transactions // from or to us. If fUpdate is true, found transactions that already // exist in the wallet will be updated. int CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate) { int ret = 0; CBlockIndex* pindex = pindexStart; { LOCK(cs_wallet); while (pindex) { CBlock block; block.ReadFromDisk(pindex, true); BOOST_FOREACH(CTransaction& tx, block.vtx) { if (AddToWalletIfInvolvingMe(tx, &block, fUpdate)) ret++; } pindex = pindex->pnext; } } return ret; } int CWallet::ScanForWalletTransaction(const uint256& hashTx) { CTransaction tx; tx.ReadFromDisk(COutPoint(hashTx, 0)); if (AddToWalletIfInvolvingMe(tx, NULL, true, true)) return 1; return 0; } void CWallet::ReacceptWalletTransactions() { CTxDB txdb("r"); bool fRepeat = true; while (fRepeat) { LOCK(cs_wallet); fRepeat = false; vector<CDiskTxPos> vMissingTx; BOOST_FOREACH(PAIRTYPE(const uint256, CWalletTx)& item, mapWallet) { CWalletTx& wtx = item.second; if (wtx.IsCoinBase() && wtx.IsSpent(0)) continue; CTxIndex txindex; bool fUpdated = false; if (txdb.ReadTxIndex(wtx.GetHash(), txindex)) { // Update fSpent if a tx got spent somewhere else by a copy of wallet.dat if (txindex.vSpent.size() != wtx.vout.size()) { printf("ERROR: ReacceptWalletTransactions() : txindex.vSpent.size() %d != wtx.vout.size() %d\n", txindex.vSpent.size(), wtx.vout.size()); continue; } for (unsigned int i = 0; i < txindex.vSpent.size(); i++) { if (wtx.IsSpent(i)) continue; if (!txindex.vSpent[i].IsNull() && IsMine(wtx.vout[i])) { wtx.MarkSpent(i); fUpdated = true; vMissingTx.push_back(txindex.vSpent[i]); } } if (fUpdated) { printf("ReacceptWalletTransactions found spent coin %sbc %s\n", FormatMoney(wtx.GetCredit()).c_str(), wtx.GetHash().ToString().c_str()); wtx.MarkDirty(); wtx.WriteToDisk(); } } else { // Reaccept any txes of ours that aren't already in a block if (!wtx.IsCoinBase()) wtx.AcceptWalletTransaction(txdb, false); } } if (!vMissingTx.empty()) { // TODO: optimize this to scan just part of the block chain? if (ScanForWalletTransactions(pindexGenesisBlock)) fRepeat = true; // Found missing transactions: re-do Reaccept. } } } void CWalletTx::RelayWalletTransaction(CTxDB& txdb) { BOOST_FOREACH(const CMerkleTx& tx, vtxPrev) { if (!tx.IsCoinBase()) { uint256 hash = tx.GetHash(); if (!txdb.ContainsTx(hash)) RelayMessage(CInv(MSG_TX, hash), (CTransaction)tx); } } if (!IsCoinBase()) { uint256 hash = GetHash(); if (!txdb.ContainsTx(hash)) { printf("Relaying wtx %s\n", hash.ToString().substr(0,10).c_str()); RelayMessage(CInv(MSG_TX, hash), (CTransaction)*this); } } } void CWalletTx::RelayWalletTransaction() { CTxDB txdb("r"); RelayWalletTransaction(txdb); } void CWallet::ResendWalletTransactions() { // Do this infrequently and randomly to avoid giving away // that these are our transactions. static int64 nNextTime; if (GetTime() < nNextTime) return; bool fFirst = (nNextTime == 0); nNextTime = GetTime() + GetRand(30 * 60); if (fFirst) return; // Only do it if there's been a new block since last time static int64 nLastTime; if (nTimeBestReceived < nLastTime) return; nLastTime = GetTime(); // Rebroadcast any of our txes that aren't in a block yet printf("ResendWalletTransactions()\n"); CTxDB txdb("r"); { LOCK(cs_wallet); // Sort them in chronological order multimap<unsigned int, CWalletTx*> mapSorted; BOOST_FOREACH(PAIRTYPE(const uint256, CWalletTx)& item, mapWallet) { CWalletTx& wtx = item.second; // Don't rebroadcast until it's had plenty of time that // it should have gotten in already by now. if (nTimeBestReceived - (int64)wtx.nTimeReceived > 5 * 60) mapSorted.insert(make_pair(wtx.nTimeReceived, &wtx)); } BOOST_FOREACH(PAIRTYPE(const unsigned int, CWalletTx*)& item, mapSorted) { CWalletTx& wtx = *item.second; wtx.RelayWalletTransaction(txdb); } } } ////////////////////////////////////////////////////////////////////////////// // // Actions // int64 CWallet::GetBalance() const { int64 nTotal = 0; { LOCK(cs_wallet); for (map<uint256, CWalletTx>::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it) { const CWalletTx* pcoin = &(*it).second; if (pcoin->IsFinal() && pcoin->IsConfirmed()) nTotal += pcoin->GetAvailableCredit(); } } return nTotal; } int64 CWallet::GetUnconfirmedBalance() const { int64 nTotal = 0; { LOCK(cs_wallet); for (map<uint256, CWalletTx>::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it) { const CWalletTx* pcoin = &(*it).second; if (!pcoin->IsFinal() || !pcoin->IsConfirmed()) nTotal += pcoin->GetAvailableCredit(); } } return nTotal; } int64 CWallet::GetImmatureBalance() const { int64 nTotal = 0; { LOCK(cs_wallet); for (map<uint256, CWalletTx>::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it) { const CWalletTx& pcoin = (*it).second; if (pcoin.IsCoinBase() && pcoin.GetBlocksToMaturity() > 0 && pcoin.GetDepthInMainChain() >= 2) nTotal += GetCredit(pcoin); } } return nTotal; } // populate vCoins with vector of spendable COutputs void CWallet::AvailableCoins(vector<COutput>& vCoins, bool fOnlyConfirmed) const { vCoins.clear(); { LOCK(cs_wallet); for (map<uint256, CWalletTx>::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it) { const CWalletTx* pcoin = &(*it).second; if (!pcoin->IsFinal()) continue; if (fOnlyConfirmed && !pcoin->IsConfirmed()) continue; if (pcoin->IsCoinBase() && pcoin->GetBlocksToMaturity() > 0) continue; // If output is less than minimum value, then don't include transaction. // This is to help deal with dust spam clogging up create transactions. for (unsigned int i = 0; i < pcoin->vout.size(); i++) if (!(pcoin->IsSpent(i)) && IsMine(pcoin->vout[i]) && pcoin->vout[i].nValue >= nMinimumInputValue) vCoins.push_back(COutput(pcoin, i, pcoin->GetDepthInMainChain())); } } } static void ApproximateBestSubset(vector<pair<int64, pair<const CWalletTx*,unsigned int> > >vValue, int64 nTotalLower, int64 nTargetValue, vector<char>& vfBest, int64& nBest, int iterations = 1000) { vector<char> vfIncluded; vfBest.assign(vValue.size(), true); nBest = nTotalLower; for (int nRep = 0; nRep < iterations && nBest != nTargetValue; nRep++) { vfIncluded.assign(vValue.size(), false); int64 nTotal = 0; bool fReachedTarget = false; for (int nPass = 0; nPass < 2 && !fReachedTarget; nPass++) { for (unsigned int i = 0; i < vValue.size(); i++) { if (nPass == 0 ? rand() % 2 : !vfIncluded[i]) { nTotal += vValue[i].first; vfIncluded[i] = true; if (nTotal >= nTargetValue) { fReachedTarget = true; if (nTotal < nBest) { nBest = nTotal; vfBest = vfIncluded; } nTotal -= vValue[i].first; vfIncluded[i] = false; } } } } } } bool CWallet::SelectCoinsMinConf(int64 nTargetValue, int nConfMine, int nConfTheirs, vector<COutput> vCoins, set<pair<const CWalletTx*,unsigned int> >& setCoinsRet, int64& nValueRet) const { setCoinsRet.clear(); nValueRet = 0; // List of values less than target pair<int64, pair<const CWalletTx*,unsigned int> > coinLowestLarger; coinLowestLarger.first = std::numeric_limits<int64>::max(); coinLowestLarger.second.first = NULL; vector<pair<int64, pair<const CWalletTx*,unsigned int> > > vValue; int64 nTotalLower = 0; random_shuffle(vCoins.begin(), vCoins.end(), GetRandInt); BOOST_FOREACH(COutput output, vCoins) { const CWalletTx *pcoin = output.tx; if (output.nDepth < (pcoin->IsFromMe() ? nConfMine : nConfTheirs)) continue; int i = output.i; int64 n = pcoin->vout[i].nValue; pair<int64,pair<const CWalletTx*,unsigned int> > coin = make_pair(n,make_pair(pcoin, i)); if (n == nTargetValue) { setCoinsRet.insert(coin.second); nValueRet += coin.first; return true; } else if (n < nTargetValue + CENT) { vValue.push_back(coin); nTotalLower += n; } else if (n < coinLowestLarger.first) { coinLowestLarger = coin; } } if (nTotalLower == nTargetValue) { for (unsigned int i = 0; i < vValue.size(); ++i) { setCoinsRet.insert(vValue[i].second); nValueRet += vValue[i].first; } return true; } if (nTotalLower < nTargetValue) { if (coinLowestLarger.second.first == NULL) return false; setCoinsRet.insert(coinLowestLarger.second); nValueRet += coinLowestLarger.first; return true; } // Solve subset sum by stochastic approximation sort(vValue.rbegin(), vValue.rend(), CompareValueOnly()); vector<char> vfBest; int64 nBest; ApproximateBestSubset(vValue, nTotalLower, nTargetValue, vfBest, nBest, 1000); if (nBest != nTargetValue && nTotalLower >= nTargetValue + CENT) ApproximateBestSubset(vValue, nTotalLower, nTargetValue + CENT, vfBest, nBest, 1000); // If we have a bigger coin and (either the stochastic approximation didn't find a good solution, // or the next bigger coin is closer), return the bigger coin if (coinLowestLarger.second.first && ((nBest != nTargetValue && nBest < nTargetValue + CENT) || coinLowestLarger.first <= nBest)) { setCoinsRet.insert(coinLowestLarger.second); nValueRet += coinLowestLarger.first; } else { for (unsigned int i = 0; i < vValue.size(); i++) if (vfBest[i]) { setCoinsRet.insert(vValue[i].second); nValueRet += vValue[i].first; } //// debug print printf("SelectCoins() best subset: "); for (unsigned int i = 0; i < vValue.size(); i++) if (vfBest[i]) printf("%s ", FormatMoney(vValue[i].first).c_str()); printf("total %s\n", FormatMoney(nBest).c_str()); } return true; } bool CWallet::SelectCoins(int64 nTargetValue, set<pair<const CWalletTx*,unsigned int> >& setCoinsRet, int64& nValueRet) const { vector<COutput> vCoins; AvailableCoins(vCoins); return (SelectCoinsMinConf(nTargetValue, 1, 6, vCoins, setCoinsRet, nValueRet) || SelectCoinsMinConf(nTargetValue, 1, 1, vCoins, setCoinsRet, nValueRet) || SelectCoinsMinConf(nTargetValue, 0, 1, vCoins, setCoinsRet, nValueRet)); } bool CWallet::CreateTransaction(const vector<pair<CScript, int64> >& vecSend, CWalletTx& wtxNew, CReserveKey& reservekey, int64& nFeeRet) { int64 nValue = 0; BOOST_FOREACH (const PAIRTYPE(CScript, int64)& s, vecSend) { if (nValue < 0) return false; nValue += s.second; } if (vecSend.empty() || nValue < 0) return false; wtxNew.BindWallet(this); { LOCK2(cs_main, cs_wallet); // txdb must be opened before the mapWallet lock CTxDB txdb("r"); { nFeeRet = nTransactionFee; loop { wtxNew.vin.clear(); wtxNew.vout.clear(); wtxNew.fFromMe = true; int64 nTotalValue = nValue + nFeeRet; double dPriority = 0; // vouts to the payees BOOST_FOREACH (const PAIRTYPE(CScript, int64)& s, vecSend) wtxNew.vout.push_back(CTxOut(s.second, s.first)); // Choose coins to use set<pair<const CWalletTx*,unsigned int> > setCoins; int64 nValueIn = 0; if (!SelectCoins(nTotalValue, setCoins, nValueIn)) return false; BOOST_FOREACH(PAIRTYPE(const CWalletTx*, unsigned int) pcoin, setCoins) { int64 nCredit = pcoin.first->vout[pcoin.second].nValue; dPriority += (double)nCredit * pcoin.first->GetDepthInMainChain(); } int64 nChange = nValueIn - nValue - nFeeRet; // if sub-cent change is required, the fee must be raised to at least MIN_TX_FEE // or until nChange becomes zero // NOTE: this depends on the exact behaviour of GetMinFee if (nFeeRet < MIN_TX_FEE && nChange > 0 && nChange < CENT) { int64 nMoveToFee = min(nChange, MIN_TX_FEE - nFeeRet); nChange -= nMoveToFee; nFeeRet += nMoveToFee; } if (nChange > 0) { // Note: We use a new key here to keep it from being obvious which side is the change. // The drawback is that by not reusing a previous key, the change may be lost if a // backup is restored, if the backup doesn't have the new private key for the change. // If we reused the old key, it would be possible to add code to look for and // rediscover unknown transactions that were written with keys of ours to recover // post-backup change. // Reserve a new key pair from key pool CPubKey vchPubKey = reservekey.GetReservedKey(); // assert(mapKeys.count(vchPubKey)); // Fill a vout to ourself // TODO: pass in scriptChange instead of reservekey so // change transaction isn't always pay-to-bitcoin-address CScript scriptChange; scriptChange.SetDestination(vchPubKey.GetID()); // Insert change txn at random position: vector<CTxOut>::iterator position = wtxNew.vout.begin()+GetRandInt(wtxNew.vout.size()); wtxNew.vout.insert(position, CTxOut(nChange, scriptChange)); } else reservekey.ReturnKey(); // Fill vin BOOST_FOREACH(const PAIRTYPE(const CWalletTx*,unsigned int)& coin, setCoins) wtxNew.vin.push_back(CTxIn(coin.first->GetHash(),coin.second)); // Sign int nIn = 0; BOOST_FOREACH(const PAIRTYPE(const CWalletTx*,unsigned int)& coin, setCoins) if (!SignSignature(*this, *coin.first, wtxNew, nIn++)) return false; // Limit size unsigned int nBytes = ::GetSerializeSize(*(CTransaction*)&wtxNew, SER_NETWORK, PROTOCOL_VERSION); if (nBytes >= MAX_BLOCK_SIZE_GEN/5) return false; dPriority /= nBytes; // Check that enough fee is included int64 nPayFee = nTransactionFee * (1 + (int64)nBytes / 1000); bool fAllowFree = CTransaction::AllowFree(dPriority); int64 nMinFee = wtxNew.GetMinFee(1, fAllowFree, GMF_SEND); if (nFeeRet < max(nPayFee, nMinFee)) { nFeeRet = max(nPayFee, nMinFee); continue; } // Fill vtxPrev by copying from previous transactions vtxPrev wtxNew.AddSupportingTransactions(txdb); wtxNew.fTimeReceivedIsTxTime = true; break; } } } return true; } bool CWallet::CreateTransaction(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew, CReserveKey& reservekey, int64& nFeeRet) { vector< pair<CScript, int64> > vecSend; vecSend.push_back(make_pair(scriptPubKey, nValue)); return CreateTransaction(vecSend, wtxNew, reservekey, nFeeRet); } // Call after CreateTransaction unless you want to abort bool CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey) { { LOCK2(cs_main, cs_wallet); printf("CommitTransaction:\n%s", wtxNew.ToString().c_str()); { // This is only to keep the database open to defeat the auto-flush for the // duration of this scope. This is the only place where this optimization // maybe makes sense; please don't do it anywhere else. CWalletDB* pwalletdb = fFileBacked ? new CWalletDB(strWalletFile,"r") : NULL; // Take key pair from key pool so it won't be used again reservekey.KeepKey(); // Add tx to wallet, because if it has change it's also ours, // otherwise just for transaction history. AddToWallet(wtxNew); // Mark old coins as spent set<CWalletTx*> setCoins; BOOST_FOREACH(const CTxIn& txin, wtxNew.vin) { CWalletTx &coin = mapWallet[txin.prevout.hash]; coin.BindWallet(this); coin.MarkSpent(txin.prevout.n); coin.WriteToDisk(); NotifyTransactionChanged(this, coin.GetHash(), CT_UPDATED); } if (fFileBacked) delete pwalletdb; } // Track how many getdata requests our transaction gets mapRequestCount[wtxNew.GetHash()] = 0; // Broadcast if (!wtxNew.AcceptToMemoryPool()) { // This must not fail. The transaction has already been signed and recorded. printf("CommitTransaction() : Error: Transaction not valid"); return false; } wtxNew.RelayWalletTransaction(); } return true; } string CWallet::SendMoney(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew, bool fAskFee) { CReserveKey reservekey(this); int64 nFeeRequired; if (IsLocked()) { string strError = _("Error: Wallet locked, unable to create transaction "); printf("SendMoney() : %s", strError.c_str()); return strError; } if (!CreateTransaction(scriptPubKey, nValue, wtxNew, reservekey, nFeeRequired)) { string strError; if (nValue + nFeeRequired > GetBalance()) strError = strprintf(_("Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds "), FormatMoney(nFeeRequired).c_str()); else strError = _("Error: Transaction creation failed "); printf("SendMoney() : %s", strError.c_str()); return strError; } if (fAskFee && !uiInterface.ThreadSafeAskFee(nFeeRequired, _("Sending..."))) return "ABORTED"; if (!CommitTransaction(wtxNew, reservekey)) return _("Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here."); return ""; } string CWallet::SendMoneyToDestination(const CTxDestination& address, int64 nValue, CWalletTx& wtxNew, bool fAskFee) { // Check amount if (nValue <= 0) return _("Invalid amount"); if (nValue + nTransactionFee > GetBalance()) return _("Insufficient funds"); // Parse Bitcoin address CScript scriptPubKey; scriptPubKey.SetDestination(address); return SendMoney(scriptPubKey, nValue, wtxNew, fAskFee); } int CWallet::LoadWallet(bool& fFirstRunRet) { if (!fFileBacked) return false; fFirstRunRet = false; int nLoadWalletRet = CWalletDB(strWalletFile,"cr+").LoadWallet(this); if (nLoadWalletRet == DB_NEED_REWRITE) { if (CDB::Rewrite(strWalletFile, "\x04pool")) { setKeyPool.clear(); // Note: can't top-up keypool here, because wallet is locked. // User will be prompted to unlock wallet the next operation // the requires a new key. } nLoadWalletRet = DB_NEED_REWRITE; } if (nLoadWalletRet != DB_LOAD_OK) return nLoadWalletRet; fFirstRunRet = !vchDefaultKey.IsValid(); CreateThread(ThreadFlushWalletDB, &strWalletFile); return DB_LOAD_OK; } bool CWallet::SetAddressBookName(const CTxDestination& address, const string& strName) { std::map<CTxDestination, std::string>::iterator mi = mapAddressBook.find(address); mapAddressBook[address] = strName; NotifyAddressBookChanged(this, address, strName, ::IsMine(*this, address), (mi == mapAddressBook.end()) ? CT_NEW : CT_UPDATED); if (!fFileBacked) return false; return CWalletDB(strWalletFile).WriteName(CBitcoinAddress(address).ToString(), strName); } bool CWallet::DelAddressBookName(const CTxDestination& address) { mapAddressBook.erase(address); NotifyAddressBookChanged(this, address, "", ::IsMine(*this, address), CT_DELETED); if (!fFileBacked) return false; return CWalletDB(strWalletFile).EraseName(CBitcoinAddress(address).ToString()); } void CWallet::PrintWallet(const CBlock& block) { { LOCK(cs_wallet); if (mapWallet.count(block.vtx[0].GetHash())) { CWalletTx& wtx = mapWallet[block.vtx[0].GetHash()]; printf(" mine: %d %d %d", wtx.GetDepthInMainChain(), wtx.GetBlocksToMaturity(), wtx.GetCredit()); } } printf("\n"); } bool CWallet::GetTransaction(const uint256 &hashTx, CWalletTx& wtx) { { LOCK(cs_wallet); map<uint256, CWalletTx>::iterator mi = mapWallet.find(hashTx); if (mi != mapWallet.end()) { wtx = (*mi).second; return true; } } return false; } bool CWallet::SetDefaultKey(const CPubKey &vchPubKey) { if (fFileBacked) { if (!CWalletDB(strWalletFile).WriteDefaultKey(vchPubKey)) return false; } vchDefaultKey = vchPubKey; return true; } bool GetWalletFile(CWallet* pwallet, string &strWalletFileOut) { if (!pwallet->fFileBacked) return false; strWalletFileOut = pwallet->strWalletFile; return true; } // // Mark old keypool keys as used, // and generate all new keys // bool CWallet::NewKeyPool() { { LOCK(cs_wallet); CWalletDB walletdb(strWalletFile); BOOST_FOREACH(int64 nIndex, setKeyPool) walletdb.ErasePool(nIndex); setKeyPool.clear(); if (IsLocked()) return false; int64 nKeys = max(GetArg("-keypool", 100), (int64)0); for (int i = 0; i < nKeys; i++) { int64 nIndex = i+1; walletdb.WritePool(nIndex, CKeyPool(GenerateNewKey())); setKeyPool.insert(nIndex); } printf("CWallet::NewKeyPool wrote %"PRI64d" new keys\n", nKeys); } return true; } bool CWallet::TopUpKeyPool() { { LOCK(cs_wallet); if (IsLocked()) return false; CWalletDB walletdb(strWalletFile); // Top up key pool unsigned int nTargetSize = max(GetArg("-keypool", 100), 0LL); while (setKeyPool.size() < (nTargetSize + 1)) { int64 nEnd = 1; if (!setKeyPool.empty()) nEnd = *(--setKeyPool.end()) + 1; if (!walletdb.WritePool(nEnd, CKeyPool(GenerateNewKey()))) throw runtime_error("TopUpKeyPool() : writing generated key failed"); setKeyPool.insert(nEnd); printf("keypool added key %"PRI64d", size=%d\n", nEnd, setKeyPool.size()); } } return true; } void CWallet::ReserveKeyFromKeyPool(int64& nIndex, CKeyPool& keypool) { nIndex = -1; keypool.vchPubKey = CPubKey(); { LOCK(cs_wallet); if (!IsLocked()) TopUpKeyPool(); // Get the oldest key if(setKeyPool.empty()) return; CWalletDB walletdb(strWalletFile); nIndex = *(setKeyPool.begin()); setKeyPool.erase(setKeyPool.begin()); if (!walletdb.ReadPool(nIndex, keypool)) throw runtime_error("ReserveKeyFromKeyPool() : read failed"); if (!HaveKey(keypool.vchPubKey.GetID())) throw runtime_error("ReserveKeyFromKeyPool() : unknown key in key pool"); assert(keypool.vchPubKey.IsValid()); printf("keypool reserve %"PRI64d"\n", nIndex); } } int64 CWallet::AddReserveKey(const CKeyPool& keypool) { { LOCK2(cs_main, cs_wallet); CWalletDB walletdb(strWalletFile); int64 nIndex = 1 + *(--setKeyPool.end()); if (!walletdb.WritePool(nIndex, keypool)) throw runtime_error("AddReserveKey() : writing added key failed"); setKeyPool.insert(nIndex); return nIndex; } return -1; } void CWallet::KeepKey(int64 nIndex) { // Remove from key pool if (fFileBacked) { CWalletDB walletdb(strWalletFile); walletdb.ErasePool(nIndex); } printf("keypool keep %"PRI64d"\n", nIndex); } void CWallet::ReturnKey(int64 nIndex) { // Return to key pool { LOCK(cs_wallet); setKeyPool.insert(nIndex); } printf("keypool return %"PRI64d"\n", nIndex); } bool CWallet::GetKeyFromPool(CPubKey& result, bool fAllowReuse) { int64 nIndex = 0; CKeyPool keypool; { LOCK(cs_wallet); ReserveKeyFromKeyPool(nIndex, keypool); if (nIndex == -1) { if (fAllowReuse && vchDefaultKey.IsValid()) { result = vchDefaultKey; return true; } if (IsLocked()) return false; result = GenerateNewKey(); return true; } KeepKey(nIndex); result = keypool.vchPubKey; } return true; } int64 CWallet::GetOldestKeyPoolTime() { int64 nIndex = 0; CKeyPool keypool; ReserveKeyFromKeyPool(nIndex, keypool); if (nIndex == -1) return GetTime(); ReturnKey(nIndex); return keypool.nTime; } CPubKey CReserveKey::GetReservedKey() { if (nIndex == -1) { CKeyPool keypool; pwallet->ReserveKeyFromKeyPool(nIndex, keypool); if (nIndex != -1) vchPubKey = keypool.vchPubKey; else { printf("CReserveKey::GetReservedKey(): Warning: using default key instead of a new key, top up your keypool."); vchPubKey = pwallet->vchDefaultKey; } } assert(vchPubKey.IsValid()); return vchPubKey; } void CReserveKey::KeepKey() { if (nIndex != -1) pwallet->KeepKey(nIndex); nIndex = -1; vchPubKey = CPubKey(); } void CReserveKey::ReturnKey() { if (nIndex != -1) pwallet->ReturnKey(nIndex); nIndex = -1; vchPubKey = CPubKey(); } void CWallet::GetAllReserveKeys(set<CKeyID>& setAddress) { setAddress.clear(); CWalletDB walletdb(strWalletFile); LOCK2(cs_main, cs_wallet); BOOST_FOREACH(const int64& id, setKeyPool) { CKeyPool keypool; if (!walletdb.ReadPool(id, keypool)) throw runtime_error("GetAllReserveKeyHashes() : read failed"); assert(keypool.vchPubKey.IsValid()); CKeyID keyID = keypool.vchPubKey.GetID(); if (!HaveKey(keyID)) throw runtime_error("GetAllReserveKeyHashes() : unknown key in key pool"); setAddress.insert(keyID); } } void CWallet::UpdatedTransaction(const uint256 &hashTx) { { LOCK(cs_wallet); // Only notify UI if this transaction is in this wallet map<uint256, CWalletTx>::const_iterator mi = mapWallet.find(hashTx); if (mi != mapWallet.end()) NotifyTransactionChanged(this, hashTx, CT_UPDATED); } }
Java
CREATE TABLE SM_STATE_DEFINITION( STATE_ID NUMBER NOT NULL, WORKFLOW_ID NUMBER NOT NULL, STATE_NAME VARCHAR2(256) NOT NULL, EMAIL_TO VARCHAR2(2048), PRIMARY KEY(STATE_ID), FOREIGN KEY(WORKFLOW_ID) REFERENCES SM_WORKFLOW_DEFINITION(WORKFLOW_ID) ); CREATE UNIQUE INDEX I_SM_STATE_DEFINITION ON SM_STATE_DEFINITION(WORKFLOW_ID, STATE_NAME); CREATE TABLE SM_WORKFLOW_STATE( STATE_ID NUMBER NOT NULL, NEXT_STATE_ID NUMBER, ACTION VARCHAR2(512), FOREIGN KEY(STATE_ID) REFERENCES STATE_DEFINITION(STATE_ID) FOREIGN KEY(NEXT_STATE_ID) REFERENCES STATE_DEFINITION(STATE_ID) ); CREATE TABLE SM_WORKFLOW_DEFINITION( WORKFLOW_ID NUMBER NOT NULL, WORKFLOW_TYPE VARCHAR2(256) NOT NULL, EMAIL_NOTIFICATION CHAR(1) DEFAULT 'N', EMAIL_SUBJECT VARCHAR2(1024), EMAIL_CONTENT VARCHAR2(2048), PRIMARY KEY(WORKFLOW_ID) ); CREATE TABLE SM_STATE_HISTORY ( ITEM_TYPE VARCHAr2(256) not null, ITEM_ID VARCHAR2(256) NOT NULL, STATE_ID NUMBER NOT NULL, NOTES VARCHAR2(2048), USERID VARCHAR2(100) NOT NULL, STATE_ACTION VARCHAR2(100) NOT NULL, USER_SUBSCRIPTION_NOTIFICATION VARCHAR2(100), INSERT_TS TIMESTAMP NOT NULL, FOREIGN KEY(STATE_ID) REFERENCES STATE_DEFINITION(STATE_ID) ); CREATE INDEX I_SM_STATE_HISTORY ON SM_STATE_HISTORY(ITEM_TYPE, ITEM_ID); CREATE TABLE SM_VERSION ( ITEM_TYPE VARCHAR2(256) NOT NULL, ITEM_ID VARCHAR2(256) NOT NULL, VERSION_NUMBER NUMBER NOT NULL, CREATED_TS DATETIME NOT NULL, PRIMARY KEY (ITEM_TYPE, VERSION_NUMBER) ); CREATE UNIQUE INDEX I_SM_VERSION ON SM_VERSION(ITEM_TYPE, ITEM_ID);
Java
<?php /* Safe sample input : get the field UserData from the variable $_POST sanitize : settype (float) construction : use of sprintf via a %u with simple quote */ /*Copyright 2015 Bertrand STIVALET Permission is hereby granted, without written agreement or royalty fee, to use, copy, modify, and distribute this software and its documentation for any purpose, provided that the above copyright notice and the following three paragraphs appear in all copies of this software. IN NO EVENT SHALL AUTHORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. AUTHORS SPECIFICALLY DISCLAIM ANY WARRANTIES INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THE SOFTWARE IS PROVIDED ON AN "AS-IS" BASIS AND AUTHORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.*/ $tainted = $_POST['UserData']; if(settype($tainted, "float")) $tainted = $tainted ; else $tainted = 0.0 ; $query = sprintf("SELECT * FROM student where id='%u'", $tainted); $conn = mysql_connect('localhost', 'mysql_user', 'mysql_password'); // Connection to the database (address, user, password) mysql_select_db('dbname') ; echo "query : ". $query ."<br /><br />" ; $res = mysql_query($query); //execution while($data =mysql_fetch_array($res)){ print_r($data) ; echo "<br />" ; } mysql_close($conn); ?>
Java
var final_transcript = ''; var recognizing = false; //var socket = io.connect('http://collab.di.uniba.it:48922');//"http://collab.di.uniba.it/~iaffaldano:48922" //socket.emit('client_type', {text: "Speaker"}); if ('webkitSpeechRecognition' in window) { var recognition = new webkitSpeechRecognition(); recognition.continuous = true; recognition.interimResults = true; console.log("MAX ALTERNATIVES = "+ recognition.maxAlternatives); recognition.onstart = function () { recognizing = true; console.log("RECOGNITION STARTED"); }; recognition.onerror = function (event) { console.log("RECOGNITION ERROR: " + event.error); recognition.start(); }; recognition.onend = function () { console.log("RECOGNITION STOPPED"); if(recognizing){ recognition.start(); console.log("RECOGNITION RESTARTED"); } }; recognition.onresult = function (event) { var interim_transcript = ''; for (var i = event.resultIndex; i < event.results.length; ++i) { if (event.results[i].isFinal) { final_transcript += event.results[i][0].transcript; console.log("CONFIDENCE (" + event.results[i][0].transcript + ") = " + event.results[i][0].confidence); //recognition.stop(); //recognition.start(); socket.emit('client_message', {text: event.results[i][0].transcript}); } else { interim_transcript += event.results[i][0].transcript; } } final_transcript = capitalize(final_transcript); final_span.innerHTML = linebreak(final_transcript); interim_span.innerHTML = linebreak(interim_transcript); }; recognition.onaudiostart= function (event) { console.log("AUDIO START"); }; recognition.onsoundstart= function (event) { console.log("SOUND START"); }; recognition.onspeechstart= function (event) { console.log("SPEECH START"); }; recognition.onspeechend= function (event) { console.log("SPEECH END"); }; recognition.onsoundend= function (event) { console.log("SOUND END"); }; recognition.onnomatch= function (event) { console.log("NO MATCH"); }; } var two_line = /\n\n/g; var one_line = /\n/g; function linebreak(s) { return s.replace(two_line, '<p></p>').replace(one_line, '<br>'); } function capitalize(s) { return s.replace(s.substr(0, 1), function (m) { return m.toUpperCase(); }); } function startDictation(event) { if (recognizing) { recognition.stop(); recognizing=false; start_button.innerHTML = "START" return; } final_transcript = ''; recognition.lang = 'it-IT'; recognition.start(); start_button.innerHTML = "STOP" final_span.innerHTML = ''; interim_span.innerHTML = ''; }
Java
/* eslint-disable promise/always-return */ import { runAuthenticatedQuery, runQuery } from "schema/v1/test/utils" describe("UpdateCollectorProfile", () => { it("updates and returns a collector profile", () => { /* eslint-disable max-len */ const mutation = ` mutation { updateCollectorProfile(input: { professional_buyer: true, loyalty_applicant: true, self_reported_purchases: "trust me i buy art", intents: [BUY_ART_AND_DESIGN] }) { id name email self_reported_purchases intents } } ` /* eslint-enable max-len */ const context = { updateCollectorProfileLoader: () => Promise.resolve({ id: "3", name: "Percy", email: "percy@cat.com", self_reported_purchases: "treats", intents: ["buy art & design"], }), } const expectedProfileData = { id: "3", name: "Percy", email: "percy@cat.com", self_reported_purchases: "treats", intents: ["buy art & design"], } expect.assertions(1) return runAuthenticatedQuery(mutation, context).then( ({ updateCollectorProfile }) => { expect(updateCollectorProfile).toEqual(expectedProfileData) } ) }) it("throws error when data loader is missing", () => { /* eslint-disable max-len */ const mutation = ` mutation { updateCollectorProfile(input: { professional_buyer: true, loyalty_applicant: true, self_reported_purchases: "trust me i buy art" }) { id name email self_reported_purchases intents } } ` /* eslint-enable max-len */ const errorResponse = "Missing Update Collector Profile Loader. Check your access token." expect.assertions(1) return runQuery(mutation) .then(() => { throw new Error("An error was not thrown but was expected.") }) .catch(error => { expect(error.message).toEqual(errorResponse) }) }) })
Java
module.exports = require('./src/tracking');
Java
<!DOCTYPE html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <meta name="keywords" content=" "> <title>Subscribe to Messaging Events | LivePerson Technical Documentation</title> <link rel="stylesheet" href="css/syntax.css"> <link rel="stylesheet" type="text/css" href="css/font-awesome-4.7.0/css/font-awesome.min.css"> <!--<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">--> <link rel="stylesheet" href="css/modern-business.css"> <link rel="stylesheet" href="css/lavish-bootstrap.css"> <link rel="stylesheet" href="css/customstyles.css"> <link rel="stylesheet" href="css/theme-blue.css"> <!-- <script src="assets/js/jsoneditor.js"></script> --> <script src="assets/js/jquery-3.1.0.min.js"></script> <!-- <link rel='stylesheet' id='theme_stylesheet' href='//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css'> --> <!-- <link rel='stylesheet' id='theme_stylesheet' href='//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css'> --> <!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> --> <script src="assets/js/jquery.cookie-1.4.1.min.js"></script> <script src="js/jquery.navgoco.min.js"></script> <script src="assets/js/bootstrap-3.3.4.min.js"></script> <script src="assets/js/anchor-2.0.0.min.js"></script> <script src="js/toc.js"></script> <script src="js/customscripts.js"></script> <link rel="shortcut icon" href="images/favicon.ico"> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> <![endif]--> <link rel="alternate" type="application/rss+xml" title="" href="http://0.0.0.0:4005feed.xml"> <script> $(document).ready(function() { // Initialize navgoco with default options $("#mysidebar").navgoco({ caretHtml: '', accordion: true, openClass: 'active', // open save: false, // leave false or nav highlighting doesn't work right cookie: { name: 'navgoco', expires: false, path: '/' }, slide: { duration: 400, easing: 'swing' } }); $("#collapseAll").click(function(e) { e.preventDefault(); $("#mysidebar").navgoco('toggle', false); }); $("#expandAll").click(function(e) { e.preventDefault(); $("#mysidebar").navgoco('toggle', true); }); }); </script> <script> $(function () { $('[data-toggle="tooltip"]').tooltip() }) </script> </head> <body> <!-- Navigation --> <nav class="navbar navbar-inverse navbar-fixed-top"> <div class="container topnavlinks"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="fa fa-home fa-lg navbar-brand" href="index.html">&nbsp;<span class="projectTitle"> LivePerson Technical Documentation</span></a> </div> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> <ul class="nav navbar-nav navbar-right"> <!-- entries without drop-downs appear here --> <!-- entries with drop-downs appear here --> <!-- conditional logic to control which topnav appears for the audience defined in the configuration file.--> <li><a class="email" title="Submit feedback" href="https://github.com/LivePersonInc/dev-hub/issues" ><i class="fa fa-github"></i> Issues</a><li> <!--comment out this block if you want to hide search--> <li> <!--start search--> <div id="search-demo-container"> <input type="text" id="search-input" placeholder="search..."> <ul id="results-container"></ul> </div> <script src="js/jekyll-search.js" type="text/javascript"></script> <script type="text/javascript"> SimpleJekyllSearch.init({ searchInput: document.getElementById('search-input'), resultsContainer: document.getElementById('results-container'), dataSource: 'search.json', searchResultTemplate: '<li><a href="{url}" title="Subscribe to Messaging Events">{title}</a></li>', noResultsText: 'No results found.', limit: 10, fuzzy: true, }) </script> <!--end search--> </li> </ul> </div> </div> <!-- /.container --> </nav> <!-- Page Content --> <div class="container"> <div class="col-lg-12">&nbsp;</div> <!-- Content Row --> <div class="row"> <!-- Sidebar Column --> <div class="col-md-3"> <ul id="mysidebar" class="nav"> <li class="sidebarTitle"> </li> <li> <a href="#">Common Guidelines</a> <ul> <li class="subfolders"> <a href="#">Introduction</a> <ul> <li class="thirdlevel"><a href="index.html">Home</a></li> <li class="thirdlevel"><a href="getting-started.html">Getting Started with LiveEngage APIs</a></li> </ul> </li> <li class="subfolders"> <a href="#">Guides</a> <ul> <li class="thirdlevel"><a href="guides-customizedchat.html">Customized Chat Windows</a></li> </ul> </li> </ul> <li> <a href="#">Account Configuration</a> <ul> <li class="subfolders"> <a href="#">Predefined Content API</a> <ul> <li class="thirdlevel"><a href="account-configuration-predefined-content-overview.html">Overview</a></li> <li class="thirdlevel"><a href="account-configuration-predefined-content-methods.html">Methods</a></li> <li class="thirdlevel"><a href="account-configuration-predefined-content-get-items.html">Get Predefined Content Items</a></li> <li class="thirdlevel"><a href="account-configuration-predefined-content-get-by-id.html">Get Predefined Content by ID</a></li> <li class="thirdlevel"><a href="account-configuration-predefined-content-query-delta.html">Predefined Content Query Delta</a></li> <li class="thirdlevel"><a href="account-configuration-predefined-content-create-content.html">Create Predefined Content</a></li> <li class="thirdlevel"><a href="account-configuration-predefined-content-update-content.html">Update Predefined Content</a></li> <li class="thirdlevel"><a href="account-configuration-predefined-content-update-content-items.html">Update Predefined Content Items</a></li> <li class="thirdlevel"><a href="account-configuration-predefined-content-delete-content.html">Delete Predefined Content</a></li> <li class="thirdlevel"><a href="account-configuration-predefined-content-delete-content-items.html">Delete Predefined Content Items</a></li> <li class="thirdlevel"><a href="account-configuration-predefined-content-get-default-items.html">Get Default Predefined Content Items</a></li> <li class="thirdlevel"><a href="account-configuration-predefined-content-get-default-items-by-id.html">Get Default Predefined Content by ID</a></li> <li class="thirdlevel"><a href="account-configuration-predefined-content-appendix.html">Appendix</a></li> </ul> </li> <li class="subfolders"> <a href="#">Automatic Messages API</a> <ul> <li class="thirdlevel"><a href="account-configuration-automatic-messages-overview.html">Overview</a></li> <li class="thirdlevel"><a href="account-configuration-automatic-messages-methods.html">Methods</a></li> <li class="thirdlevel"><a href="account-configuration-automatic-messages-get-automatic-messages.html">Get Automatic Messages</a></li> <li class="thirdlevel"><a href="account-configuration-automatic-messages-get-automatic-message-by-id.html">Get Automatic Message by ID</a></li> <li class="thirdlevel"><a href="account-configuration-automatic-messages-update-an-automatic-message.html">Update an Automatic Message</a></li> <li class="thirdlevel"><a href="account-configuration-automatic-messages-appendix.html">Appendix</a></li> </ul> </li> </ul> <li> <a href="#">Administration</a> <ul> <li class="subfolders"> <a href="#">Users API</a> <ul> <li class="thirdlevel"><a href="administration-users-overview.html">Overview</a></li> <li class="thirdlevel"><a href="administration-users-methods.html">Methods</a></li> <li class="thirdlevel"><a href="administration-get-all-users.html">Get all users</a></li> <li class="thirdlevel"><a href="administration-get-user-by-id.html">Get user by ID</a></li> <li class="thirdlevel"><a href="administration-create-users.html">Create users</a></li> <li class="thirdlevel"><a href="administration-update-users.html">Update users</a></li> <li class="thirdlevel"><a href="administration-update-user.html">Update user</a></li> <li class="thirdlevel"><a href="administration-delete-users.html">Delete users</a></li> <li class="thirdlevel"><a href="administration-delete-user.html">Delete user</a></li> <li class="thirdlevel"><a href="administration-change-users-password.html">Change user's password</a></li> <li class="thirdlevel"><a href="administration-reset-users-password.html">Reset user's password</a></li> <li class="thirdlevel"><a href="administration-user-query-delta.html">User query delta</a></li> <li class="thirdlevel"><a href="administration-users-appendix.html">Appendix</a></li> </ul> </li> <li class="subfolders"> <a href="#">Skills API</a> <ul> <li class="thirdlevel"><a href="administration-skills-overview.html">Overview</a></li> <li class="thirdlevel"><a href="administration-skills-methods.html">Methods</a></li> <li class="thirdlevel"><a href="administration-get-all-skills.html">Get all skills</a></li> <li class="thirdlevel"><a href="administration-get-skill-by-id.html">Get skill by ID</a></li> <li class="thirdlevel"><a href="administration-create-skills.html">Create skills</a></li> <li class="thirdlevel"><a href="administration.update-skills.html">Update skills</a></li> <li class="thirdlevel"><a href="administration-update-skill.html">Update skill</a></li> <li class="thirdlevel"><a href="administration-delete-skills.html">Delete skills</a></li> <li class="thirdlevel"><a href="administration-delete-skill.html">Delete skill</a></li> <li class="thirdlevel"><a href="administration-skills-query-delta.html">Skills Query Delta</a></li> <li class="thirdlevel"><a href="administration-skills-appendix.html">Appendix</a></li> </ul> </li> <li class="subfolders"> <a href="#">Agent Groups API</a> <ul> <li class="thirdlevel"><a href="administration-agent-groups-overview.html">Overview</a></li> <li class="thirdlevel"><a href="administration-agent-groups-methods.html">Methods</a></li> <li class="thirdlevel"><a href="administration-get-all-agent-groups.html">Get all agent groups</a></li> <li class="thirdlevel"><a href="administration-get-agent-groups-by-id.html">Get agent group by ID</a></li> <li class="thirdlevel"><a href="administration-create-agent-groups.html">Create agent groups</a></li> <li class="thirdlevel"><a href="administration-update-agent-groups.html">Update agent groups</a></li> <li class="thirdlevel"><a href="administration-update-agent-group.html">Update agent group</a></li> <li class="thirdlevel"><a href="administration-delete-agent-groups.html">Delete agent groups</a></li> <li class="thirdlevel"><a href="administration-delete-agent-group.html">Delete agent group</a></li> <li class="thirdlevel"><a href="administration-get-subgroups-and-members.html">Get subgroups and members of an agent group</a></li> <li class="thirdlevel"><a href="administration-agent-groups-query-delta.html">Agent Groups Query Delta</a></li> </ul> </li> </ul> <li> <a href="#">Consumer Experience</a> <ul> <li class="subfolders"> <a href="#">JavaScript Chat API</a> <ul> <li class="thirdlevel"><a href="consumer-experience-javascript-chat-getting-started.html">Getting Started</a></li> <li class="thirdlevel"><a href="consumer-experience-javascript-chat-chat-states.html">Chat States</a></li> <li class="thirdlevel"><a href="consumer-experience-javascript-chat-surveys.html">Surveys</a></li> <li class="thirdlevel"><a href="consumer-experience-javascript-chat-creating-an-instance.html">Creating an Instance</a></li> <li class="thirdlevel"><a href="consumer-experience-javascript-chat-methods.html">Methods</a></li> <li class="thirdlevel"><a href="consumer-experience-javascript-chat-getestimatedwaittime.html">getEstimatedWaitTime</a></li> <li class="thirdlevel"><a href="consumer-experience-javascript-chat-getprechatsurvey.html">getPreChatSurvey</a></li> <li class="thirdlevel"><a href="consumer-experience-javascript-chat-getengagement.html">getEngagement</a></li> <li class="thirdlevel"><a href="consumer-experience-javascript-chat-requestchat.html">requestChat</a></li> <li class="thirdlevel"><a href="consumer-experience-javascript-chat-addline.html">addLine</a></li> <li class="thirdlevel"><a href="consumer-experience-javascript-chat-setvisitortyping.html">setVisitorTyping</a></li> <li class="thirdlevel"><a href="consumer-experience-javascript-chat-setvisitorname.html">setVisitorName</a></li> <li class="thirdlevel"><a href="consumer-experience-javascript-chat-endchat.html">endChat</a></li> <li class="thirdlevel"><a href="consumer-experience-javascript-chat-requesttranscript.html">requestTranscript</a></li> <li class="thirdlevel"><a href="consumer-experience-javascript-chat-getexitsurvey.html">getExitSurvey</a></li> <li class="thirdlevel"><a href="consumer-experience-javascript-chat-submitexitsurvey.html">submitExitSurvey</a></li> <li class="thirdlevel"><a href="consumer-experience-javascript-chat-getofflinesurvey.html">getOfflineSurvey</a></li> <li class="thirdlevel"><a href="consumer-experience-javascript-chat-submitofflinesurvey.html">submitOfflineSurvey</a></li> <li class="thirdlevel"><a href="consumer-experience-javascript-chat-getstate.html">getState</a></li> <li class="thirdlevel"><a href="consumer-experience-javascript-chat-getagentloginname.html">getAgentLoginName</a></li> <li class="thirdlevel"><a href="consumer-experience-javascript-chat-getvisitorname.html">getVisitorName</a></li> <li class="thirdlevel"><a href="consumer-experience-javascript-chat-getagentid.html">getAgentId</a></li> <li class="thirdlevel"><a href="consumer-experience-javascript-chat-getrtsessionid.html">getRtSessionId</a></li> <li class="thirdlevel"><a href="consumer-experience-javascript-chat-getsessionkey.html">getSessionKey</a></li> <li class="thirdlevel"><a href="consumer-experience-javascript-chat-getagenttyping.html">getAgentTyping</a></li> <li class="thirdlevel"><a href="consumer-experience-javascript-chat-events.html">Events</a></li> <li class="thirdlevel"><a href="consumer-experience-javascript-chat-onload.html">onLoad</a></li> <li class="thirdlevel"><a href="consumer-experience-javascript-chat-oninit.html">onInit</a></li> <li class="thirdlevel"><a href="consumer-experience-javascript-chat-onestimatedwaittime.html">onEstimatedWaitTime</a></li> <li class="thirdlevel"><a href="consumer-experience-javascript-chat-onengagement.html">onEngagement</a></li> <li class="thirdlevel"><a href="consumer-experience-javascript-chat-onprechatsurvey.html">onPreChatSurvey</a></li> <li class="thirdlevel"><a href="consumer-experience-javascript-chat-onstart.html">onStart</a></li> <li class="thirdlevel"><a href="consumer-experience-javascript-chat-onstop.html">onStop</a></li> <li class="thirdlevel"><a href="consumer-experience-javascript-chat-onrequestchat.html">onRequestChat</a></li> <li class="thirdlevel"><a href="consumer-experience-javascript-chat-ontranscript.html">onTranscript</a></li> <li class="thirdlevel"><a href="consumer-experience-javascript-chat-online.html">onLine</a></li> <li class="thirdlevel"><a href="consumer-experience-javascript-chat-onstate.html">onState</a></li> <li class="thirdlevel"><a href="consumer-experience-javascript-chat-oninfo.html">onInfo</a></li> <li class="thirdlevel"><a href="consumer-experience-javascript-chat-onagenttyping.html">onAgentTyping</a></li> <li class="thirdlevel"><a href="consumer-experience-javascript-chat-onexitsurvey.html">onExitSurvey</a></li> <li class="thirdlevel"><a href="consumer-experience-javascript-chat-onaccounttoaccounttransfer.html">onAccountToAccountTransfer</a></li> <li class="thirdlevel"><a href="rt-interactions-example.html">Engagement Attributes Body Example</a></li> <li class="thirdlevel"><a href="consumer-experience-javascript-chat-demo.html">Demo App</a></li> </ul> </li> <li class="subfolders"> <a href="#">Server Chat API</a> <ul> <li class="thirdlevel"><a href="consumer-experience-server-chat-getting-started.html">Getting Started</a></li> <li class="thirdlevel"><a href="consumer-experience-server-chat-methods.html">Methods</a></li> <li class="thirdlevel"><a href="consumer-experience-server-chat-retrieve-availability.html">Retrieve Availability</a></li> <li class="thirdlevel"><a href="consumer-experience-server-chat-retrieve-available-slots.html">Retrieve Available Slots</a></li> <li class="thirdlevel"><a href="consumer-experience-server-chat-retrieve-estimated-wait-time.html">Retrieve Estimated Wait Time</a></li> <li class="thirdlevel"><a href="consumer-experience-server-chat-retrieve-offline-survey.html">Retrieve an Offline Survey</a></li> <li class="thirdlevel"><a href="consumer-experience-server-chat-start-chat.html">Start a Chat</a></li> <li class="thirdlevel"><a href="consumer-experience-server-chat-retrieve-chat-resources.html">Retrieve Chat Resources, Events and Information</a></li> <li class="thirdlevel"><a href="consumer-experience-server-chat-retrieve-chat-events.html">Retrieve Chat Events</a></li> <li class="thirdlevel"><a href="consumer-experience-server-chat-add-lines.html">Add Lines / End Chat</a></li> <li class="thirdlevel"><a href="consumer-experience-server-chat-retrieve-chat-information.html">Retrieve Chat Information</a></li> <li class="thirdlevel"><a href="consumer-experience-server-chat-retrieve-visitor-name.html">Retrieve the Visitor's Name</a></li> <li class="thirdlevel"><a href="consumer-experience-server-chat-set-visitor-name.html">Set the Visitor's Name</a></li> <li class="thirdlevel"><a href="consumer-experience-server-chat-retrieve-agent-typing-status.html">Retrieve the Agent's Typing Status</a></li> <li class="thirdlevel"><a href="consumer-experience-server-chat-retrieve-visitor-typing-status.html">Retrieve the Visitor's Typing Status</a></li> <li class="thirdlevel"><a href="consumer-experience-server-chat-set-visitor-typing-status.html">Set the Visitor's Typing Status</a></li> <li class="thirdlevel"><a href="consumer-experience-server-chat-retrieve-exit-survey-structure.html">Retrieve Exit Survey Structure</a></li> <li class="thirdlevel"><a href="consumer-experience-server-chat-submit-survey-data.html">Submit Survey Data</a></li> <li class="thirdlevel"><a href="consumer-experience-server-chat-send-transcript.html">Send a Transcript</a></li> <li class="thirdlevel"><a href="consumer-experience-server-chat-sample.html">Sample Postman Collection</a></li> </ul> </li> <li class="subfolders"> <a href="#">Push Service API</a> <ul> <li class="thirdlevel"><a href="push-service-overview.html">Overview</a></li> <li class="thirdlevel"><a href="push-service-tls-html">TLS Authentication</a></li> <li class="thirdlevel"><a href="push-service-codes-html">HTTP Response Codes</a></li> <li class="thirdlevel"><a href="push-service-configuration-html">Configuration of Push Proxy</a></li> </ul> </li> <li class="subfolders"> <a href="#">In-App Messaging SDK iOS (2.0)</a> <ul> <li class="thirdlevel"><a href="consumer-experience-ios-sdk-quick-start.html">Quick Start</a></li> <li class="thirdlevel"><a href="consumer-experience-ios-sdk-advanced-configurations.html">Advanced Configurations</a></li> <li class="thirdlevel"><a href="consumer-experience-ios-sdk-methods.html">Methods</a></li> <li class="thirdlevel"><a href="consumer-experience-ios-sdk-initialize.html">initialize</a></li> <li class="thirdlevel"><a href="consumer-experience-ios-sdk-showconversation.html">showConversation</a></li> <li class="thirdlevel"><a href="consumer-experience-ios-sdk-removeconversation.html">removeConversation</a></li> <li class="thirdlevel"><a href="consumer-experience-ios-sdk-reconnect.html">reconnect</a></li> <li class="thirdlevel"><a href="consumer-experience-ios-sdk-togglechatactions.html">toggleChatActions</a></li> <li class="thirdlevel"><a href="consumer-experience-ios-sdk-checkactiveconversation.html">checkActiveConversation</a></li> <li class="thirdlevel"><a href="consumer-experience-ios-sdk-markasurgent.html">markAsUrgent</a></li> <li class="thirdlevel"><a href="consumer-experience-ios-sdk-isurgent.html">isUrgent</a></li> <li class="thirdlevel"><a href="consumer-experience-ios-sdk-dismissurgent.html">dismissUrgent</a></li> <li class="thirdlevel"><a href="consumer-experience-ios-sdk-resolveconversation.html">resolveConversation</a></li> <li class="thirdlevel"><a href="consumer-experience-ios-sdk-clearhistory.html">clearHistory</a></li> <li class="thirdlevel"><a href="consumer-experience-ios-sdk-logout.html">logout</a></li> <li class="thirdlevel"><a href="consumer-experience-ios-sdk-destruct.html">destruct</a></li> <li class="thirdlevel"><a href="consumer-experience-ios-sdk-handlepush.html">handlePush</a></li> <li class="thirdlevel"><a href="consumer-experience-ios-sdk-registerpushnotifications.html">registerPushNotifications</a></li> <li class="thirdlevel"><a href="consumer-experience-ios-sdk-setuserprofile.html">setUserProfile</a></li> <li class="thirdlevel"><a href="consumer-experience-ios-sdk-getassignedagent.html">getAssignedAgent</a></li> <li class="thirdlevel"><a href="consumer-experience-ios-sdk-subscribelogevents.html">subscribeLogEvents</a></li> <li class="thirdlevel"><a href="consumer-experience-ios-sdk-getsdkversion.html">getSDKVersion</a></li> <li class="thirdlevel"><a href="consumer-experience-ios-sdk-printalllocalizedkeys.html">printAllLocalizedKeys</a></li> <li class="thirdlevel"><a href="consumer-experience-ios-sdk-printsupportedlanguages.html">printSupportedLanguages</a></li> <li class="thirdlevel"><a href="consumer-experience-ios-sdk-getallsupportedlanguages.html">getAllSupportedLanguages</a></li> <li class="thirdlevel"><a href="consumer-experience-ios-sdk-interfacedefinitions.html">Interface and Class Definitions</a></li> <li class="thirdlevel"><a href="consumer-experience-ios-sdk-callbacks-index.html">Callbacks index</a></li> <li class="thirdlevel"><a href="consumer-experience-ios-sdk-configuring-the-sdk.html">Configuring the SDK</a></li> <li class="thirdlevel"><a href="consumer-experience-ios-sdk-attributes.html">Attributes</a></li> <li class="thirdlevel"><a href="consumer-experience-ios-sdk-deprecated-attributes.html">Deprecated Attributes</a></li> <li class="thirdlevel"><a href="consumer-experience-ios-sdk-stringlocalization.html">String localization in SDK</a></li> <li class="thirdlevel"><a href="consumer-experience-ios-sdk-localizationkeys.html">Localization Keys</a></li> <li class="thirdlevel"><a href="consumer-experience-ios-sdk-timestamps.html">Timestamps Formatting</a></li> <li class="thirdlevel"><a href="consumer-experience-ios-sdk-createcertificate.html">OS Certificate Creation</a></li> <li class="thirdlevel"><a href="consumer-experience-ios-sdk-advanced-csat.html">CSAT UI Content</a></li> <li class="thirdlevel"><a href="consumer-experience-ios-sdk-photosharing.html">Photo Sharing (Beta)</a></li> <li class="thirdlevel"><a href="consumer-experience-ios-sdk-pushnotifications.html">Configuring Push Notifications</a></li> <li class="thirdlevel"><a href="consumer-experience-ios-sdk-opensource.html">Open Source List</a></li> <li class="thirdlevel"><a href="consumer-experience-ios-sdk-security.html">Security</a></li> </ul> </li> <li class="subfolders"> <a href="#">In-App Messaging SDK Android (2.0)</a> <ul> <li class="thirdlevel"><a href="android-overview.html">Overview</a></li> <li class="thirdlevel"><a href="android-prerequisites.html">Prerequisites</a></li> <li class="thirdlevel"><a href="android-download-and-unzip.html">Step 1: Download and Unzip the SDK</a></li> <li class="thirdlevel"><a href="android-configure-project-settings.html">Step 2: Configure project settings to connect LiveEngage SDK</a></li> <li class="thirdlevel"><a href="android-code-integration.html">Step 3: Code integration for basic deployment</a></li> <li class="thirdlevel"><a href="android-initialization.html">SDK Initialization and Lifecycle</a></li> <li class="thirdlevel"><a href="android-authentication.html">Authentication</a></li> <li class="thirdlevel"><a href="android-conversations-lifecycle.html">Conversations Lifecycle</a></li> <li class="thirdlevel"><a href="android-callbacks-interface.html">LivePerson Callbacks Interface</a></li> <li class="thirdlevel"><a href="android-notifications.html">Notifications</a></li> <li class="thirdlevel"><a href="android-user-data.html">User Data</a></li> <li class="thirdlevel"><a href="android-logs.html">Logs and Info</a></li> <li class="thirdlevel"><a href="android-methods.html">Methods</a></li> <li class="thirdlevel"><a href="android-initializedeprecated.html">initialize (Deprecated)</a></li> <li class="thirdlevel"><a href="android-initializeproperties.html">initialize (with SDK properties object)</a></li> <li class="thirdlevel"><a href="android-showconversation.html">showConversation</a></li> <li class="thirdlevel"><a href="android-showconversationauth.html">showConversation (with authentication support)</a></li> <li class="thirdlevel"><a href="android-hideconversation.html">hideConversation</a></li> <li class="thirdlevel"><a href="android-getconversationfrag.html">getConversationFragment</a></li> <li class="thirdlevel"><a href="android-getconversationfragauth.html">getConversationFragment with authentication support</a></li> <li class="thirdlevel"><a href="android-reconnect.html">reconnect</a></li> <li class="thirdlevel"><a href="android-setuserprofile.html">setUserProfile</a></li> <li class="thirdlevel"><a href="android-setuserprofiledeprecated.html">setUserProfile (Deprecated)</a></li> <li class="thirdlevel"><a href="android-registerlppusher.html">registerLPPusher</a></li> <li class="thirdlevel"><a href="android-unregisterlppusher.html">unregisterLPPusher</a></li> <li class="thirdlevel"><a href="android-handlepush.html">handlePush</a></li> <li class="thirdlevel"><a href="android-getsdkversion.html">getSDKVersion</a></li> <li class="thirdlevel"><a href="android-setcallback.html">setCallback</a></li> <li class="thirdlevel"><a href="android-removecallback.html">removeCallBack</a></li> <li class="thirdlevel"><a href="android-checkactiveconversation.html">checkActiveConversation</a></li> <li class="thirdlevel"><a href="android-checkagentid.html">checkAgentID</a></li> <li class="thirdlevel"><a href="android-markurgent.html">markConversationAsUrgent</a></li> <li class="thirdlevel"><a href="android-marknormal.html">markConversationAsNormal</a></li> <li class="thirdlevel"><a href="android-checkurgent.html">checkConversationIsMarkedAsUrgent</a></li> <li class="thirdlevel"><a href="android-resolveconversation.html">resolveConversation</a></li> <li class="thirdlevel"><a href="android-shutdown.html">shutDown</a></li> <li class="thirdlevel"><a href="android-shutdowndeprecated.html">shutDown (Deprecated)</a></li> <li class="thirdlevel"><a href="android-clearhistory.html">clearHistory</a></li> <li class="thirdlevel"><a href="android-logout.html">logOut</a></li> <li class="thirdlevel"><a href="android-callbacks-index.html">Callbacks Index</a></li> <li class="thirdlevel"><a href="android-configuring-sdk.html">Configuring the SDK</a></li> <li class="thirdlevel"><a href="android-attributes.html">Attributes</a></li> <li class="thirdlevel"><a href="android-configuring-edittext.html">Configuring the message’s EditText</a></li> <li class="thirdlevel"><a href="android-proguard.html">Proguard Configuration</a></li> <li class="thirdlevel"><a href="android-modifying-string.html">Modifying Strings</a></li> <li class="thirdlevel"><a href="android-modifying-resources.html">Modifying Resources</a></li> <li class="thirdlevel"><a href="android-plural-string.html">Plural String Resource Example</a></li> <li class="thirdlevel"><a href="android-timestamps.html">Timestamps Formatting</a></li> <li class="thirdlevel"><a href="android-off-hours.html">Date and Time</a></li> <li class="thirdlevel"><a href="android-bubble.html">Bubble Timestamp</a></li> <li class="thirdlevel"><a href="android-separator.html">Separator Timestamp</a></li> <li class="thirdlevel"><a href="android-resolve.html">Resolve Message</a></li> <li class="thirdlevel"><a href="android-csat.html">CSAT Behavior</a></li> <li class="thirdlevel"><a href="android-photo-sharing.html">Photo Sharing - Beta</a></li> <li class="thirdlevel"><a href="android-push-notifications.html">Enable Push Notifications</a></li> <li class="thirdlevel"><a href="android-appendix.html">Appendix</a></li> </ul> </li> </ul> <li> <a href="#">Real-time Interactions</a> <ul> <li class="subfolders"> <a href="#">Visit Information API</a> <ul> <li class="thirdlevel"><a href="rt-interactions-visit-information-overview.html">Overview</a></li> <li class="thirdlevel"><a href="rt-interactions-visit-information-visit-information.html">Visit Information</a></li> </ul> </li> <li class="subfolders"> <a href="#">App Engagement API</a> <ul> <li class="thirdlevel"><a href="rt-interactions-app-engagement-overview.html">Overview</a></li> <li class="thirdlevel"><a href="rt-interactions-app-engagement-methods.html">Methods</a></li> <li class="thirdlevel"><a href="rt-interactions-create-session.html">Create Session</a></li> <li class="thirdlevel"><a href="rt-interactions-update-session.html">Update Session</a></li> </ul> </li> <li class="subfolders"> <a href="#">Engagement Attributes</a> <ul> <li class="thirdlevel"><a href="rt-interactions-engagement-attributes-overview.html">Overview</a></li> <li class="thirdlevel"><a href="rt-interactions-engagement-attributes-engagement-attributes.html">Engagement Attributes</a></li> </ul> </li> <li class="subfolders"> <a href="#">IVR Engagement API</a> <ul> <li class="thirdlevel"><a href="rt-interactions-ivr-engagement-overview.html">Overview</a></li> <li class="thirdlevel"><a href="rt-interactions-ivr-engagement-methods.html">Methods</a></li> <li class="thirdlevel"><a href="rt-interactions-ivr-engagement-external engagement.html">External Engagement</a></li> </ul> </li> <li class="subfolders"> <a href="#">Validate Engagement</a> <ul> <li class="thirdlevel"><a href="rt-interactions-validate-engagement-overview.html">Overview</a></li> <li class="thirdlevel"><a href="rt-interactions-validate-engagement-validate-engagement.html">Validate Engagement API</a></li> </ul> </li> <li class="subfolders"> <a href="#">Engagement Trigger API</a> <ul> <li class="thirdlevel"><a href="trigger-overview.html">Overview</a></li> <li class="thirdlevel"><a href="trigger-methods.html">Methods</a></li> <li class="thirdlevel"><a href="trigger-click.html">Click</a></li> <li class="thirdlevel"><a href="trigger-getinfo.html">getEngagementInfo</a></li> <li class="thirdlevel"><a href="trigger-getstate.html">getEngagementState</a></li> </ul> </li> <li class="subfolders"> <a href="#">Engagement Window Widget SDK</a> <ul> <li class="thirdlevel"><a href="rt-interactions-window-sdk-overview.html">Overview</a></li> <li class="thirdlevel"><a href="rt-interactions-window-sdk-getting-started.html">Getting Started</a></li> <li class="thirdlevel"><a href="rt-interactions-window-sdk-limitations.html">Limitations</a></li> <li class="thirdlevel"><a href="rt-interactions-window-sdk-configuration.html">Configuration</a></li> <li class="thirdlevel"><a href="rt-interactions-window-sdk-how-to-use.html">How to use the SDK</a></li> <li class="thirdlevel"><a href="rt-interactions-window-sdk-code-examples.html">Code Examples</a></li> <li class="thirdlevel"><a href="rt-interactions-window-sdk-event-structure.html">Event Structure</a></li> </ul> </li> </ul> <li> <a href="#">Agent</a> <ul> <li class="subfolders"> <a href="#">Agent Workspace Widget SDK</a> <ul> <li class="thirdlevel"><a href="agent-workspace-sdk-overview.html">Overview</a></li> <li class="thirdlevel"><a href="agent-workspace-sdk-getting-started.html">Getting Started</a></li> <li class="thirdlevel"><a href="agent-workspace-sdk-limitations.html">Limitations</a></li> <li class="thirdlevel"><a href="agent-workspace-sdk-how-to-use.html">How to use the SDK</a></li> <li class="thirdlevel"><a href="agent-workspace-sdk-methods.html">Methods</a></li> <li class="thirdlevel"><a href="agent-workspace-sdk-public-model.html">Public Model Structure</a></li> <li class="thirdlevel"><a href="agent-workspace-sdk-public-properties.html">Public Properties</a></li> <li class="thirdlevel"><a href="agent-workspace-sdk-code-examples.html">Code Examples</a></li> </ul> </li> <li class="subfolders"> <a href="#">LivePerson Domain API</a> <ul> <li class="thirdlevel"><a href="agent-domain-domain-api.html">Domain API</a></li> </ul> </li> <li class="subfolders"> <a href="#">Login Service API</a> <ul> <li class="thirdlevel"><a href="login-getting-started.html">Getting Started</a></li> <li class="thirdlevel"><a href="agent-login-methods.html">Methods</a></li> <li class="thirdlevel"><a href="agent-login.html">Login</a></li> <li class="thirdlevel"><a href="agent-refresh.html">Refresh</a></li> <li class="thirdlevel"><a href="agent-refresh.html">Logout</a></li> </ul> </li> <li class="subfolders"> <a href="#">Chat Agent API</a> <ul> <li class="thirdlevel"><a href="chat-agent-getting-started.html">Getting Started</a></li> <li class="thirdlevel"><a href="agent-chat-agent-methods.html">Methods</a></li> <li class="thirdlevel"><a href="agent-start-agent-session.html">Start Agent Session</a></li> <li class="thirdlevel"><a href="agent-retrieve-current-availability.html">Retrieve Current Availability</a></li> <li class="thirdlevel"><a href="agent-set-agent-availability.html">Set Agent Availability</a></li> <li class="thirdlevel"><a href="agent-retrieve-available-agents.html">Retrieve Available Agents</a></li> <li class="thirdlevel"><a href="agent-retrieve-available-slots.html">Retrieve Available Slots</a></li> <li class="thirdlevel"><a href="agent-retrieve-agent-information.html">Retrieve Agent Information</a></li> <li class="thirdlevel"><a href="agent-determine-incoming.html">Determine Incoming Chat Requests</a></li> <li class="thirdlevel"><a href="agent-accept-chat.html">Accept a Chat</a></li> <li class="thirdlevel"><a href="agent-retrieve-chat-sessions.html">Retrieve Chat Sessions</a></li> <li class="thirdlevel"><a href="agent-retrieve-chat-resources.html">Retrieve Chat Resources, Events and Information</a></li> <li class="thirdlevel"><a href="agent-retrieve-data.html">Retrieve Data for Multiple Chats</a></li> <li class="thirdlevel"><a href="agent-retrieve-chat-events.html">Retrieve Chat Events</a></li> <li class="thirdlevel"><a href="agent-add-lines.html">Add Lines</a></li> <li class="thirdlevel"><a href="agent-end-chat.html">End Chat</a></li> <li class="thirdlevel"><a href="agent-retrieve-chat-info.html">Retrieve Chat Information</a></li> <li class="thirdlevel"><a href="">Retrieve Visitor’s Name</a></li> <li class="thirdlevel"><a href="agent-retrieve-agent-typing.html">Retrieve Agent's Typing Status</a></li> <li class="thirdlevel"><a href="agent-set-agent-typing.html">Set Agent’s Typing Status</a></li> <li class="thirdlevel"><a href="agent-retrieve-visitor-typing.html">Retrieve Visitor's Typing Status</a></li> <li class="thirdlevel"><a href="agent-chat-agent-retrieve-skills.html">Retrieve Available Skills</a></li> <li class="thirdlevel"><a href="agent-transfer-chat.html">Transfer a Chat</a></li> <li class="thirdlevel"><a href="agent-retrieve-survey-structure.html">Retrieve Agent Survey Structure</a></li> </ul> </li> <li class="subfolders"> <a href="#">Messaging Agent SDK</a> <ul> <li class="thirdlevel"><a href="messaging-agent-sdk-overview.html">Overview</a></li> </ul> </li> </ul> <li> <a href="#">Data</a> <ul> <li class="subfolders"> <a href="#">Data Access API (Beta)</a> <ul> <li class="thirdlevel"><a href="data-data-access-overview.html">Overview</a></li> <li class="thirdlevel"><a href="data-data-access-architecture.html">Architecture</a></li> <li class="thirdlevel"><a href="data-data-access-methods.html">Methods</a></li> <li class="thirdlevel"><a href="data-data-access-base-resource.html">Base Resource</a></li> <li class="thirdlevel"><a href="data-data-access-agent-activity.html">Agent Activity</a></li> <li class="thirdlevel"><a href="data-data-access-web-session.html">Web Session</a></li> <li class="thirdlevel"><a href="data-data-access-engagement.html">Engagement</a></li> <li class="thirdlevel"><a href="data-data-access-survey.html">Survey</a></li> <li class="thirdlevel"><a href="data-data-access-schema.html">Schema</a></li> <li class="thirdlevel"><a href="data-data-access-appendix.html">Appendix</a></li> </ul> </li> <li class="subfolders"> <a href="#">Messaging Operations API</a> <ul> <li class="thirdlevel"><a href="data-messaging-operations-overview.html">Overview</a></li> <li class="thirdlevel"><a href="data-messaging-operations-methods.html">Methods</a></li> <li class="thirdlevel"><a href="data-messaging-operations-messaging-conversation.html">Messaging Conversation</a></li> <li class="thirdlevel"><a href="data-messaging-operations-messaging-csat-distribution.html">Messaging CSAT Distribution</a></li> <li class="thirdlevel"><a href="data-messaging-operations-appendix.html">Appendix</a></li> </ul> </li> <li class="subfolders"> <a href="#">Messaging Interactions API (Beta)</a> <ul> <li class="thirdlevel"><a href="data-messaging-interactions-overview.html">Overview</a></li> <li class="thirdlevel"><a href="data-messaging-interactions-methods.html">Methods</a></li> <li class="thirdlevel"><a href="data-messaging-interactions-conversations.html">Conversations</a></li> <li class="thirdlevel"><a href="data-messaging-interactions-get-conversation-by-conversation-id.html">Get conversation by conversation ID</a></li> <li class="thirdlevel"><a href="data-messaging-interactions-get-conversations-by-consumer-id.html">Get Conversations by Consumer ID</a></li> <li class="thirdlevel"><a href="data-messaging-interactions-sample-code.html">Sample Code</a></li> <li class="thirdlevel"><a href="data-messaging-interactions-appendix.html">Appendix</a></li> </ul> </li> <li class="subfolders"> <a href="#">Engagement History API</a> <ul> <li class="thirdlevel"><a href="data-data-access-overview.html">Overview</a></li> <li class="thirdlevel"><a href="data-engagement-history-methods.html">Methods</a></li> <li class="thirdlevel"><a href="data-engagement-history-retrieve-engagement-list-by-criteria.html">Retrieve Engagement List by Criteria</a></li> <li class="thirdlevel"><a href="data-engagement-history-sample-code.html">Sample Code</a></li> <li class="thirdlevel"><a href="data-engagement-history-appendix.html">Appendix</a></li> </ul> </li> <li class="subfolders"> <a href="#">Operational Real-time API</a> <ul> <li class="thirdlevel"><a href="data-operational-realtime-overview.html">Overview</a></li> <li class="thirdlevel"><a href="data-operational-realtime-methods.html">Methods</a></li> <li class="thirdlevel"><a href="data-operational-realtime-queue-health.html">Queue Health</a></li> <li class="thirdlevel"><a href="data-operational-realtime-engagement-activity.html">Engagement Activity</a></li> <li class="thirdlevel"><a href="data-operational-realtime-agent-activity.html">Agent Activity</a></li> <li class="thirdlevel"><a href="data-operational-realtime-current-queue-state.html">Current Queue State</a></li> <li class="thirdlevel"><a href="data-operational-realtime-sla-histogram.html">SLA Histogram</a></li> <li class="thirdlevel"><a href="data-operational-realtime-sample-code.html">Sample Code</a></li> </ul> </li> </ul> <li> <a href="#">LiveEngage Tag</a> <ul> <li class="subfolders"> <a href="#">LE Tag Events</a> <ul> <li class="thirdlevel"><a href="lp-tag-tag-events-overview.html">Overview</a></li> <li class="thirdlevel"><a href="lp-tag-tag-events-how.html">How to use these Events</a></li> <li class="thirdlevel"><a href="lp-tag-tag-events-events.html">Events</a></li> <li class="thirdlevel"><a href="lp-tag-visitor-flow.html">Visitor Flow Events</a></li> <li class="thirdlevel"><a href="lp-tag-engagement.html">Engagement Events</a></li> <li class="thirdlevel"><a href="lp-tag-engagement-window.html">Engagement Window Events</a></li> </ul> </li> </ul> <li> <a href="#">Messaging Window API</a> <ul> <li class="subfolders"> <a href="#">Introduction</a> <ul> <li class="thirdlevel"><a href="consumer-interation-index.html">Home</a></li> <li class="thirdlevel"><a href="consumer-int-protocol-overview.html">Protocol Overview</a></li> <li class="thirdlevel"><a href="consumer-int-getting-started.html">Getting Started</a></li> </ul> </li> <li class="subfolders"> <a href="#">Tutorials</a> <ul> <li class="thirdlevel"><a href="consumer-int-get-msg.html">Get Messages</a></li> <li class="thirdlevel"><a href="consumer-int-conversation-md.html">Conversation Metadata</a></li> <li class="thirdlevel"><a href="consumer-int-readaccept-events.html">Read/Accept events</a></li> <li class="thirdlevel"><a href="consumer-int-authentication.html">Authentication</a></li> <li class="thirdlevel"><a href="consumer-int-agent-profile.html">Agent Profile</a></li> <li class="thirdlevel"><a href="consumer-int-post-survey.html">Post Conversation Survey</a></li> <li class="thirdlevel"><a href="consumer-int-client-props.html">Client Properties</a></li> <li class="thirdlevel"><a href="consumer-int-no-headers.html">Avoid Webqasocket Headers</a></li> </ul> </li> <li class="subfolders"> <a href="#">Samples</a> <ul> <li class="thirdlevel"><a href="consumer-int-js-sample.html">JavaScript Messenger</a></li> </ul> </li> <li class="subfolders"> <a href="#">API Reference</a> <ul> <li class="thirdlevel"><a href="consumer-int-api-reference.html">Overview</a></li> <li class="thirdlevel"><a href="consumer-int-msg-reqs.html">Request Builder</a></li> <li class="thirdlevel"><a href="consumer-int-msg-resps.html">Response Builder</a></li> <li class="thirdlevel"><a href="consumer-int-msg-notifications.html">Notification Builder</a></li> <li class="thirdlevel"><a href="consumer-int-msg-req-conv.html">New Conversation</a></li> <li class="thirdlevel"><a href="consumer-int-msg-close-conv.html">Close Conversation</a></li> <li class="thirdlevel"><a href="consumer-int-msg-conv-ttr.html">Urgent Conversation</a></li> <li class="thirdlevel"><a href="consumer-int-msg-csat-conv.html">Update CSAT</a></li> <li class="thirdlevel"><a href="consumer-int-msg-sub-conv.html">Subscribe Conversations Metadata</a></li> <li class="thirdlevel"><a href="consumer-int-msg-unsub-conv.html">Unsubscribe Conversations Metadata</a></li> <li class="thirdlevel"><a href="consumer-int-msg-text-cont.html">Publish Content</a></li> <li class="active thirdlevel"><a href="consumer-int-msg-sub-events.html">Subscribe Conversation Content</a></li> <li class="thirdlevel"><a href="consumer-int-msg-init-con.html">Browser Init Connection</a></li> </ul> </li> </ul> <!-- if you aren't using the accordion, uncomment this block: <p class="external"> <a href="#" id="collapseAll">Collapse All</a> | <a href="#" id="expandAll">Expand All</a> </p> --> </li> </ul> </div> <!-- this highlights the active parent class in the navgoco sidebar. this is critical so that the parent expands when you're viewing a page. This must appear below the sidebar code above. Otherwise, if placed inside customscripts.js, the script runs before the sidebar code runs and the class never gets inserted.--> <script>$("li.active").parents('li').toggleClass("active");</script> <!-- Content Column --> <div class="col-md-9"> <div class="post-header"> <h1 class="post-title-main">Subscribe to Messaging Events</h1> </div> <div class="post-content"> <!-- this handles the automatic toc. use ## for subheads to auto-generate the on-page minitoc. if you use html tags, you must supply an ID for the heading element in order for it to appear in the minitoc. --> <script> $( document ).ready(function() { // Handler for .ready() called. $('#toc').toc({ minimumHeaders: 0, listType: 'ul', showSpeed: 0, headers: 'h2' }); /* this offset helps account for the space taken up by the floating toolbar. */ $('#toc').on('click', 'a', function() { var target = $(this.getAttribute('href')) , scroll_target = target.offset().top $(window).scrollTop(scroll_target - 10); return false }) }); </script> <div id="toc"></div> <h2>Request </h2> <p><span class="label label-warning"> <i class="fa fa-user" aria-hidden="true"></i> <i class="fa fa-angle-double-right" aria-hidden="true"></i> <i class="fa fa-server" aria-hidden="true"></i> </span></p> <div id="req_editor"></div> <h4>JSON Output</h4> <p><button id="req_editorcopy" onclick=" document.getElementById('req_editoroutput').select(); document.execCommand('copy');">Copy to Clipboard</button> <span id="req_editorvalid_indicator"></span></p> <textarea id="req_editoroutput" style="width: 100%; height: 100px; font-family: monospace;" class="form-control"></textarea> <h4>Json Schema</h4> <p>You can find the json schema definition of this message here: <a href="assets/schema/ws/consumerRequests.json">assets/schema/ws/consumerRequests.json</a></p> <script src="assets/js/jsoneditor.js"></script> <script> var req_editor; $.getJSON( "assets/schema/ws/consumerRequests.json" , function( data ) { const fullpath = "assets/schema/ws/consumerRequests.json"; data.baseUrl = fullpath.substring(0, fullpath.lastIndexOf("/")); JSONEditor.defaults.editors.object.options.collapsed = true; req_editor = new JSONEditor(document.getElementById('req_editor'),{ ajax: true, schema: data, startval: {"type":"ms.SubscribeMessagingEvents","id":"2SA2","body":{"fromSeq":0,"dialogId":"__YOUR_CONVERSATION_ID__"}}, no_additional_properties: false, disable_edit_json: true, display_required_only: true, // form_name_root : "structure", keep_oneof_values: false, theme: 'bootstrap3', iconlib: "fontawesome4" }); req_editor.on('change',function() { if ('') { ''.split(" ").forEach(function(ro){ req_editor.getEditor(ro).disable() }); } if ('root') { 'root'.split(" ").forEach(function(ro){ req_editor.getEditor(ro).switcher.disabled = true }); } // Get an array of errors from the validator var errors = req_editor.validate(); var indicator = document.getElementById('req_editorvalid_indicator'); // Not valid if(errors.length) { indicator.style.color = 'red'; indicator.textContent = "not valid"; document.getElementById('req_editorcopy').disabled = true; document.getElementById('req_editoroutput').value = JSON.stringify(errors,null,2); } // Valid else { indicator.style.color = 'green'; indicator.textContent = "valid"; document.getElementById('req_editorcopy').disabled = false; document.getElementById('req_editoroutput').value = JSON.stringify(req_editor.getValue()); } }); }); </script> <h2>Response </h2> <p><span class="label label-success"> <i class="fa fa-user" aria-hidden="true"></i> <i class="fa fa-angle-double-left" aria-hidden="true"></i> <i class="fa fa-server" aria-hidden="true"></i> </span></p> <div id="resp_editor"></div> <h4>JSON Output</h4> <p><button id="resp_editorcopy" onclick=" document.getElementById('resp_editoroutput').select(); document.execCommand('copy');">Copy to Clipboard</button> <span id="resp_editorvalid_indicator"></span></p> <textarea id="resp_editoroutput" style="width: 100%; height: 100px; font-family: monospace;" class="form-control"></textarea> <h4>Json Schema</h4> <p>You can find the json schema definition of this message here: <a href="assets/schema/types/genericSubscribeResp.json">assets/schema/types/genericSubscribeResp.json</a></p> <script src="assets/js/jsoneditor.js"></script> <script> var resp_editor; $.getJSON( "assets/schema/types/genericSubscribeResp.json" , function( data ) { const fullpath = "assets/schema/types/genericSubscribeResp.json"; data.baseUrl = fullpath.substring(0, fullpath.lastIndexOf("/")); JSONEditor.defaults.editors.object.options.collapsed = true; resp_editor = new JSONEditor(document.getElementById('resp_editor'),{ ajax: true, schema: data, startval: { "reqId":"A3HC", "code":200 }, no_additional_properties: false, disable_edit_json: true, display_required_only: true, // form_name_root : "structure", keep_oneof_values: false, theme: 'bootstrap3', disable_properties: true, iconlib: "fontawesome4" }); resp_editor.on('change',function() { if ('root') { 'root'.split(" ").forEach(function(ro){ resp_editor.getEditor(ro).disable() }); } if ('') { ''.split(" ").forEach(function(ro){ resp_editor.getEditor(ro).switcher.disabled = true }); } // Get an array of errors from the validator var errors = resp_editor.validate(); var indicator = document.getElementById('resp_editorvalid_indicator'); // Not valid if(errors.length) { indicator.style.color = 'red'; indicator.textContent = "not valid"; document.getElementById('resp_editorcopy').disabled = true; document.getElementById('resp_editoroutput').value = JSON.stringify(errors,null,2); } // Valid else { indicator.style.color = 'green'; indicator.textContent = "valid"; document.getElementById('resp_editorcopy').disabled = false; document.getElementById('resp_editoroutput').value = JSON.stringify(resp_editor.getValue()); } }); }); </script> <h2>Notification </h2> <p><span class="label label-info"> <i class="fa fa-user" aria-hidden="true"></i> <i class="fa fa-angle-double-left" aria-hidden="true"></i> <i class="fa fa-server" aria-hidden="true"></i> </span></p> <div id="notif_editor"></div> <h4>JSON Output</h4> <p><button id="notif_editorcopy" onclick=" document.getElementById('notif_editoroutput').select(); document.execCommand('copy');">Copy to Clipboard</button> <span id="notif_editorvalid_indicator"></span></p> <textarea id="notif_editoroutput" style="width: 100%; height: 100px; font-family: monospace;" class="form-control"></textarea> <h4>Json Schema</h4> <p>You can find the json schema definition of this message here: <a href="assets/schema/ws/consumerNotifications.json">assets/schema/ws/consumerNotifications.json</a></p> <script src="assets/js/jsoneditor.js"></script> <script> var notif_editor; $.getJSON( "assets/schema/ws/consumerNotifications.json" , function( data ) { const fullpath = "assets/schema/ws/consumerNotifications.json"; data.baseUrl = fullpath.substring(0, fullpath.lastIndexOf("/")); JSONEditor.defaults.editors.object.options.collapsed = true; notif_editor = new JSONEditor(document.getElementById('notif_editor'),{ ajax: true, schema: data, startval: {"type":"ms.MessagingEventNotification","kind":"notification","body":{"changes":[{"sequence":0,"originatorId":"734d9867-40e3-52b9-a401-07e877676d64","serverTimestamp":1477840831162,"event":{"type":"ContentEvent","message":"message from the agent","contentType":"text/plain"},"dialogId":"__YOUR_CONVERSATION_ID__"}]}}, no_additional_properties: false, disable_edit_json: true, display_required_only: true, // form_name_root : "structure", keep_oneof_values: false, theme: 'bootstrap3', disable_properties: true, iconlib: "fontawesome4" }); notif_editor.on('change',function() { if ('') { ''.split(" ").forEach(function(ro){ notif_editor.getEditor(ro).disable() }); } if ('root') { 'root'.split(" ").forEach(function(ro){ notif_editor.getEditor(ro).switcher.disabled = true }); } // Get an array of errors from the validator var errors = notif_editor.validate(); var indicator = document.getElementById('notif_editorvalid_indicator'); // Not valid if(errors.length) { indicator.style.color = 'red'; indicator.textContent = "not valid"; document.getElementById('notif_editorcopy').disabled = true; document.getElementById('notif_editoroutput').value = JSON.stringify(errors,null,2); } // Valid else { indicator.style.color = 'green'; indicator.textContent = "valid"; document.getElementById('notif_editorcopy').disabled = false; document.getElementById('notif_editoroutput').value = JSON.stringify(notif_editor.getValue()); } }); }); </script> <div class="tags"> </div> </div> <hr class="shaded"/> <footer> <div class="row"> <div class="col-lg-12 footer"> &copy;2017 LivePerson. All rights reserved.<br />This documentation is subject to change without notice.<br /> Site last generated: Mar 9, 2017 <br /> <p><img src="img/company_logo.png" alt="Company logo"/></p> </div> </div> </footer> </div> <!-- /.row --> </div> <!-- /.container --> </div> </body> </html>
Java
<?php namespace Sellsy\Tests\Sellsy\Criteria; use Sellsy\Criteria\CriteriaInterface; use Sellsy\Criteria\EmptyCriteria; /** * Class EmptyCriteriaTest * * @package Sellsy\Tests\Sellsy\Criteria */ class EmptyCriteriaTest extends \PHPUnit_Framework_TestCase { /** * @return EmptyCriteria */ public function testImplementCriteriaInterface() { $criteria = new EmptyCriteria(); $this->assertInstanceOf(CriteriaInterface::class, $criteria); return $criteria; } /** * @param EmptyCriteria $criteria * @return EmptyCriteria * * @depends testImplementCriteriaInterface * @covers Sellsy\Criteria\EmptyCriteria::getParameters */ public function testGetParametersIsArray(EmptyCriteria $criteria) { $this->assertInternalType('array', $criteria->getParameters()); return $criteria; } /** * @param EmptyCriteria $criteria * @return void * * @depends testGetParametersIsArray * @covers Sellsy\Criteria\EmptyCriteria::getParameters */ public function testGetParametersIsEmpty(EmptyCriteria $criteria) { $this->assertEquals(0, count($criteria->getParameters())); } }
Java
/** * Created by Administrator on 2017/3/11. */ public class ReverseWordsInSequence { public void reverseSequence(String str) { if (str == null) return; String[] strArray = str.split(" "); StringBuilder sb = new StringBuilder(); for (int i = strArray.length-1; i >= 0; --i) sb.append(strArray[i] + " "); System.out.println(sb); } public static void main(String[] args) { ReverseWordsInSequence r = new ReverseWordsInSequence(); String str = "I am a Students."; r.reverseSequence(str); } } /** * Created by Administrator on 2017/3/11. */ public class ReverseWordsInSequence { public String reverseSequence(String str) { if (str == null || str.length() <= 1) return str; StringBuilder sb = new StringBuilder(str); reverse(sb, 0, str.length() - 1); int begin = 0, end = 0; while (end < str.length()) { while (end < str.length() && sb.charAt(end) != ' ') end++; reverse(sb, begin, end - 1); begin = end + 1; end = begin; } return sb.toString(); } public void reverse(StringBuilder sb, int start, int end) { if (sb == null || end <= start) return; while (start < end) { char temp = sb.charAt(start); sb.setCharAt(start, sb.charAt(end)); sb.setCharAt(end, temp); start++; end--; } } public static void main(String[] args) { ReverseWordsInSequence r = new ReverseWordsInSequence(); String str = "i am a students."; System.out.print(r.reverseSequence(str)); } }
Java
<?php class Autoreportemail_model extends CI_Model { public function __construct() { parent::__construct(); } public function get_milist($where = array()) { $this->db->select('*'); $this->db->where($where); $query = $this->db->get('autoreport_email'); return $query->result_array(); } public function add_milist($data = array()) { $empty = $this->get_milist(array('email' => $data['email'], 'client' => $data['client'])); if(empty($empty)){ $data['user_c'] = $this->session->userdata('logged_in_data')['id']; $this->db->insert('autoreport_email',$data); if( $this->db->affected_rows() > 0) { return $this->db->insert_id(); } }else{ return false; } } public function edit_milist($data = array()) { $empty = $this->get_milist(array('email' => $data['email'], 'id !=' => $data['id'], 'client' => $data['client'])); if(empty($empty)){ $id = $data['id']; unset($data['id']); $this->db->where('id', $id); $this->db->update('autoreport_email', $data); return $this->db->affected_rows(); }else{ return false; } } public function update_milist($id,$data = array()) { $nempty = $this->get_milist(array('id' => $id)); if(!empty($nempty)){ $this->db->where('id', $id); $this->db->update('autoreport_email', $data); return TRUE; }else{ return false; } } public function remove_milist($id) { $data['status'] = 'inactive'; $this->db->where('id',$id); $this->db->update('phases',$data); if( $this->db->affected_rows() > 0) { return $this->db->affected_rows(); } return ; } public function reactivate_milist($id) { $data['status'] = 'active'; $this->db->where('id',$id); $this->db->update('phases',$data); if( $this->db->affected_rows() > 0) { return $this->db->affected_rows(); } return ; } }
Java
--- layout: page title: Incoming webhooks permalink: /incoming_webhook order: 4 headings: - title: Posting a message with Incoming Webhooks --- ## Posting a message with Incoming Webhooks [Incoming webhooks](https://api.slack.com/incoming-webhooks) are an easy way to send notifications to a Slack channel with a minimum of setup. You'll need a webhook URL from a Slack app or a custom integration to use the `IncomingWebhook` class. ```javascript const { IncomingWebhook } = require('@slack/client'); const url = process.env.SLACK_WEBHOOK_URL; const webhook = new IncomingWebhook(url); // Send simple text to the webhook channel webhook.send('Hello there', function(err, res) { if (err) { console.log('Error:', err); } else { console.log('Message sent: ', res); } }); ```
Java
/* Configures webpack to build only assets required for integration environments. */ const webpack = require('webpack'); const merge = require('webpack-merge'); const { source, sourceAll } = require('../lib/path-helpers'); const ciBuildWorkflow = require('./workflow/build.ci'); const { entries } = require(source('fc-config')); // eslint-disable-line // remove the styleguide dll references const modify = (config) => { config.plugins = config.plugins.slice(1); return config; }; module.exports = modify(merge(ciBuildWorkflow, { entry: sourceAll(entries.ci), plugins: [ new webpack.DefinePlugin({ 'process.env.CI_MODE': true }) ] }));
Java
/** * A null-safe function to repeat the source string the desired amount of times. * @private * @param {String} source * @param {Number} times * @returns {String} */ function _repeat (source, times) { var result = ""; for (var i = 0; i < times; i++) { result += source; } return result; } export default _repeat;
Java
<!doctype html> <html class="default no-js"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>CTEArmorRicochet | demofile</title> <meta name="description" content="Documentation for demofile"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="../assets/css/main.css"> </head> <body> <header> <div class="tsd-page-toolbar"> <div class="container"> <div class="table-wrap"> <div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base=".."> <div class="field"> <label for="tsd-search-field" class="tsd-widget search no-caption">Search</label> <input id="tsd-search-field" type="text" /> </div> <ul class="results"> <li class="state loading">Preparing search index...</li> <li class="state failure">The search index is not available</li> </ul> <a href="../index.html" class="title">demofile</a> </div> <div class="table-cell" id="tsd-widgets"> <div id="tsd-filter"> <a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a> <div class="tsd-filter-group"> <div class="tsd-select" id="tsd-filter-visibility"> <span class="tsd-select-label">All</span> <ul class="tsd-select-list"> <li data-value="public">Public</li> <li data-value="protected">Public/Protected</li> <li data-value="private" class="selected">All</li> </ul> </div> <input type="checkbox" id="tsd-filter-inherited" checked /> <label class="tsd-widget" for="tsd-filter-inherited">Inherited</label> <input type="checkbox" id="tsd-filter-externals" checked /> <label class="tsd-widget" for="tsd-filter-externals">Externals</label> <input type="checkbox" id="tsd-filter-only-exported" /> <label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label> </div> </div> <a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a> </div> </div> </div> </div> <div class="tsd-page-title"> <div class="container"> <ul class="tsd-breadcrumb"> <li> <a href="../globals.html">Globals</a> </li> <li> <a href="../modules/_sendtabletypes_.html">&quot;sendtabletypes&quot;</a> </li> <li> <a href="_sendtabletypes_.ctearmorricochet.html">CTEArmorRicochet</a> </li> </ul> <h1>Interface CTEArmorRicochet</h1> </div> </div> </header> <div class="container container-main"> <div class="row"> <div class="col-8 col-content"> <section class="tsd-panel tsd-hierarchy"> <h3>Hierarchy</h3> <ul class="tsd-hierarchy"> <li> <span class="target">CTEArmorRicochet</span> </li> </ul> </section> <section class="tsd-panel-group tsd-index-group"> <h2>Index</h2> <section class="tsd-panel tsd-index-panel"> <div class="tsd-index-content"> <section class="tsd-index-section "> <h3>Properties</h3> <ul class="tsd-index-list"> <li class="tsd-kind-property tsd-parent-kind-interface"><a href="_sendtabletypes_.ctearmorricochet.html#dt_temetalsparks" class="tsd-kind-icon">DT_<wbr>TEMetal<wbr>Sparks</a></li> </ul> </section> </div> </section> </section> <section class="tsd-panel-group tsd-member-group "> <h2>Properties</h2> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"> <a name="dt_temetalsparks" class="tsd-anchor"></a> <h3>DT_<wbr>TEMetal<wbr>Sparks</h3> <div class="tsd-signature tsd-kind-icon">DT_<wbr>TEMetal<wbr>Sparks<span class="tsd-signature-symbol">:</span> <a href="_sendtabletypes_.dt_temetalsparks.html" class="tsd-signature-type">DT_TEMetalSparks</a></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/saul/demofile/blob/b4d2298/src/sendtabletypes.ts#L13833">src/sendtabletypes.ts:13833</a></li> </ul> </aside> </section> </section> </div> <div class="col-4 col-menu menu-sticky-wrap menu-highlight"> <nav class="tsd-navigation primary"> <ul> <li class="globals "> <a href="../globals.html"><em>Globals</em></a> </li> <li class="current tsd-kind-module"> <a href="../modules/_sendtabletypes_.html">&quot;sendtabletypes&quot;</a> </li> </ul> </nav> <nav class="tsd-navigation secondary menu-sticky"> <ul class="before-current"> </ul> <ul class="current"> <li class="current tsd-kind-interface tsd-parent-kind-module"> <a href="_sendtabletypes_.ctearmorricochet.html" class="tsd-kind-icon">CTEArmor<wbr>Ricochet</a> <ul> <li class=" tsd-kind-property tsd-parent-kind-interface"> <a href="_sendtabletypes_.ctearmorricochet.html#dt_temetalsparks" class="tsd-kind-icon">DT_<wbr>TEMetal<wbr>Sparks</a> </li> </ul> </li> </ul> <ul class="after-current"> </ul> </nav> </div> </div> </div> <footer class="with-border-bottom"> <div class="container"> <h2>Legend</h2> <div class="tsd-legend-group"> <ul class="tsd-legend"> <li class="tsd-kind-object-literal"><span class="tsd-kind-icon">Object literal</span></li> <li class="tsd-kind-variable"><span class="tsd-kind-icon">Variable</span></li> <li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li> <li class="tsd-kind-function tsd-has-type-parameter"><span class="tsd-kind-icon">Function with type parameter</span></li> <li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li> <li class="tsd-kind-type-alias tsd-has-type-parameter"><span class="tsd-kind-icon">Type alias with type parameter</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li> <li class="tsd-kind-interface tsd-has-type-parameter"><span class="tsd-kind-icon">Interface with type parameter</span></li> <li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li> <li class="tsd-kind-class tsd-has-type-parameter"><span class="tsd-kind-icon">Class with type parameter</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-enum"><span class="tsd-kind-icon">Enumeration</span></li> </ul> </div> </div> </footer> <div class="container tsd-generator"> <p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p> </div> <div class="overlay"></div> <script src="../assets/js/main.js"></script> </body> </html>
Java
(function(d,a){function b(a,b){var g=a.nodeName.toLowerCase();if("area"===g){var g=a.parentNode,i=g.name;if(!a.href||!i||g.nodeName.toLowerCase()!=="map")return!1;g=d("img[usemap=#"+i+"]")[0];return!!g&&e(g)}return(/input|select|textarea|button|object/.test(g)?!a.disabled:"a"==g?a.href||b:b)&&e(a)}function e(a){return!d(a).parents().andSelf().filter(function(){return d.curCSS(this,"visibility")==="hidden"||d.expr.filters.hidden(this)}).length}d.ui=d.ui||{};d.ui.version||(d.extend(d.ui,{version:"1.8.16", keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}}),d.fn.extend({propAttr:d.fn.prop||d.fn.attr,_focus:d.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var e= this;setTimeout(function(){d(e).focus();b&&b.call(e)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=d.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(d.curCSS(this,"position",1))&&/(auto|scroll)/.test(d.curCSS(this,"overflow",1)+d.curCSS(this,"overflow-y",1)+d.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(d.curCSS(this, "overflow",1)+d.curCSS(this,"overflow-y",1)+d.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?d(document):a},zIndex:function(b){if(b!==a)return this.css("zIndex",b);if(this.length)for(var b=d(this[0]),e;b.length&&b[0]!==document;){e=b.css("position");if(e==="absolute"||e==="relative"||e==="fixed")if(e=parseInt(b.css("zIndex"),10),!isNaN(e)&&e!==0)return e;b=b.parent()}return 0},disableSelection:function(){return this.bind((d.support.selectstart?"selectstart": "mousedown")+".ui-disableSelection",function(d){d.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),d.each(["Width","Height"],function(b,e){function g(a,b,e,h){d.each(i,function(){b-=parseFloat(d.curCSS(a,"padding"+this,!0))||0;e&&(b-=parseFloat(d.curCSS(a,"border"+this+"Width",!0))||0);h&&(b-=parseFloat(d.curCSS(a,"margin"+this,!0))||0)});return b}var i=e==="Width"?["Left","Right"]:["Top","Bottom"],j=e.toLowerCase(),k={innerWidth:d.fn.innerWidth,innerHeight:d.fn.innerHeight, outerWidth:d.fn.outerWidth,outerHeight:d.fn.outerHeight};d.fn["inner"+e]=function(i){return i===a?k["inner"+e].call(this):this.each(function(){d(this).css(j,g(this,i)+"px")})};d.fn["outer"+e]=function(a,i){return typeof a!=="number"?k["outer"+e].call(this,a):this.each(function(){d(this).css(j,g(this,a,!0,i)+"px")})}}),d.extend(d.expr[":"],{data:function(a,b,e){return!!d.data(a,e[3])},focusable:function(a){return b(a,!isNaN(d.attr(a,"tabindex")))},tabbable:function(a){var e=d.attr(a,"tabindex"),g= isNaN(e);return(g||e>=0)&&b(a,!g)}}),d(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));d.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});d.support.minHeight=b.offsetHeight===100;d.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"}),d.extend(d.ui,{plugin:{add:function(a,b,e){var a=d.ui[a].prototype,i;for(i in e)a.plugins[i]=a.plugins[i]||[],a.plugins[i].push([b,e[i]])},call:function(d,a,b){if((a=d.plugins[a])&&d.element[0].parentNode)for(var i= 0;i<a.length;i++)d.options[a[i][0]]&&a[i][1].apply(d.element,b)}},contains:function(d,a){return document.compareDocumentPosition?d.compareDocumentPosition(a)&16:d!==a&&d.contains(a)},hasScroll:function(a,b){if(d(a).css("overflow")==="hidden")return!1;var e=b&&b==="left"?"scrollLeft":"scrollTop",i=!1;if(a[e]>0)return!0;a[e]=1;i=a[e]>0;a[e]=0;return i},isOverAxis:function(d,a,b){return d>a&&d<a+b},isOver:function(a,b,e,i,j,k){return d.ui.isOverAxis(a,e,j)&&d.ui.isOverAxis(b,i,k)}}))})(jQuery); (function(d,a){if(d.cleanData){var b=d.cleanData;d.cleanData=function(a){for(var e=0,g;(g=a[e])!=null;e++)try{d(g).triggerHandler("remove")}catch(i){}b(a)}}else{var e=d.fn.remove;d.fn.remove=function(a,b){return this.each(function(){b||(!a||d.filter(a,[this]).length)&&d("*",this).add([this]).each(function(){try{d(this).triggerHandler("remove")}catch(a){}});return e.call(d(this),a,b)})}}d.widget=function(a,b,e){var i=a.split(".")[0],j,a=a.split(".")[1];j=i+"-"+a;if(!e)e=b,b=d.Widget;d.expr[":"][j]= function(b){return!!d.data(b,a)};d[i]=d[i]||{};d[i][a]=function(d,a){arguments.length&&this._createWidget(d,a)};b=new b;b.options=d.extend(!0,{},b.options);d[i][a].prototype=d.extend(!0,b,{namespace:i,widgetName:a,widgetEventPrefix:d[i][a].prototype.widgetEventPrefix||a,widgetBaseClass:j},e);d.widget.bridge(a,d[i][a])};d.widget.bridge=function(b,e){d.fn[b]=function(g){var i=typeof g==="string",j=Array.prototype.slice.call(arguments,1),k=this,g=!i&&j.length?d.extend.apply(null,[!0,g].concat(j)):g; if(i&&g.charAt(0)==="_")return k;i?this.each(function(){var i=d.data(this,b),e=i&&d.isFunction(i[g])?i[g].apply(i,j):i;if(e!==i&&e!==a)return k=e,!1}):this.each(function(){var a=d.data(this,b);a?a.option(g||{})._init():d.data(this,b,new e(g,this))});return k}};d.Widget=function(d,a){arguments.length&&this._createWidget(d,a)};d.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:!1},_createWidget:function(a,b){d.data(b,this.widgetName,this);this.element=d(b);this.options=d.extend(!0, {},this.options,this._getCreateOptions(),a);var e=this;this.element.bind("remove."+this.widgetName,function(){e.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return d.metadata&&d.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+ "-disabled ui-state-disabled")},widget:function(){return this.element},option:function(b,e){var g=b;if(arguments.length===0)return d.extend({},this.options);if(typeof b==="string"){if(e===a)return this.options[b];g={};g[b]=e}this._setOptions(g);return this},_setOptions:function(a){var b=this;d.each(a,function(d,a){b._setOption(d,a)});return this},_setOption:function(d,a){this.options[d]=a;d==="disabled"&&this.widget()[a?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled", a);return this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_trigger:function(a,b,e){var i=this.options[a],b=d.Event(b);b.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();e=e||{};if(b.originalEvent)for(var a=d.event.props.length,j;a;)j=d.event.props[--a],b[j]=b.originalEvent[j];this.element.trigger(b,e);return!(d.isFunction(i)&&i.call(this.element[0],b,e)===!1||b.isDefaultPrevented())}}})(jQuery); (function(d){var a=!1;d(document).mouseup(function(){a=!1});d.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var a=this;this.element.bind("mousedown."+this.widgetName,function(d){return a._mouseDown(d)}).bind("click."+this.widgetName,function(e){if(!0===d.data(e.target,a.widgetName+".preventClickEvent"))return d.removeData(e.target,a.widgetName+".preventClickEvent"),e.stopImmediatePropagation(),!1});this.started=!1},_mouseDestroy:function(){this.element.unbind("."+ this.widgetName)},_mouseDown:function(b){if(!a){this._mouseStarted&&this._mouseUp(b);this._mouseDownEvent=b;var e=this,f=b.which==1,h=typeof this.options.cancel=="string"&&b.target.nodeName?d(b.target).closest(this.options.cancel).length:!1;if(!f||h||!this._mouseCapture(b))return!0;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=!0},this.options.delay);if(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)&&(this._mouseStarted= this._mouseStart(b)!==!1,!this._mouseStarted))return b.preventDefault(),!0;!0===d.data(b.target,this.widgetName+".preventClickEvent")&&d.removeData(b.target,this.widgetName+".preventClickEvent");this._mouseMoveDelegate=function(d){return e._mouseMove(d)};this._mouseUpDelegate=function(d){return e._mouseUp(d)};d(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);b.preventDefault();return a=!0}},_mouseMove:function(a){if(d.browser.msie&& !(document.documentMode>=9)&&!a.button)return this._mouseUp(a);if(this._mouseStarted)return this._mouseDrag(a),a.preventDefault();if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==!1)?this._mouseDrag(a):this._mouseUp(a);return!this._mouseStarted},_mouseUp:function(a){d(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted)this._mouseStarted= !1,a.target==this._mouseDownEvent.target&&d.data(a.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(a);return!1},_mouseDistanceMet:function(d){return Math.max(Math.abs(this._mouseDownEvent.pageX-d.pageX),Math.abs(this._mouseDownEvent.pageY-d.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})(jQuery); (function(d){d.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:!0,clearStyle:!1,collapsible:!1,event:"click",fillSpace:!1,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:!1,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var a=this,b=a.options;a.running=0;a.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix"); a.headers=a.element.find(b.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){b.disabled||d(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){b.disabled||d(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){b.disabled||d(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){b.disabled||d(this).removeClass("ui-state-focus")});a.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom"); if(b.navigation){var e=a.element.find("a").filter(b.navigationFilter).eq(0);if(e.length){var f=e.closest(".ui-accordion-header");a.active=f.length?f:e.closest(".ui-accordion-content").prev()}}a.active=a._findActive(a.active||b.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");a.active.next().addClass("ui-accordion-content-active");a._createIcons();a.resize();a.element.attr("role","tablist");a.headers.attr("role","tab").bind("keydown.accordion", function(d){return a._keydown(d)}).next().attr("role","tabpanel");a.headers.not(a.active||"").attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).next().hide();a.active.length?a.active.attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}):a.headers.eq(0).attr("tabIndex",0);d.browser.safari||a.headers.find("a").attr("tabIndex",-1);b.event&&a.headers.bind(b.event.split(" ").join(".accordion ")+".accordion",function(d){a._clickHandler.call(a,d,this);d.preventDefault()})},_createIcons:function(){var a= this.options;a.icons&&(d("<span></span>").addClass("ui-icon "+a.icons.header).prependTo(this.headers),this.active.children(".ui-icon").toggleClass(a.icons.header).toggleClass(a.icons.headerSelected),this.element.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.children(".ui-icon").remove();this.element.removeClass("ui-accordion-icons")},destroy:function(){var a=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("tabIndex"); this.headers.find("a").removeAttr("tabIndex");this._destroyIcons();var b=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");(a.autoHeight||a.fillHeight)&&b.css("height","");return d.Widget.prototype.destroy.call(this)},_setOption:function(a,b){d.Widget.prototype._setOption.apply(this,arguments);a=="active"&&this.activate(b);a=="icons"&&(this._destroyIcons(), b&&this._createIcons());if(a=="disabled")this.headers.add(this.headers.next())[b?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")},_keydown:function(a){if(!this.options.disabled&&!a.altKey&&!a.ctrlKey){var b=d.ui.keyCode,e=this.headers.length,f=this.headers.index(a.target),h=!1;switch(a.keyCode){case b.RIGHT:case b.DOWN:h=this.headers[(f+1)%e];break;case b.LEFT:case b.UP:h=this.headers[(f-1+e)%e];break;case b.SPACE:case b.ENTER:this._clickHandler({target:a.target},a.target),a.preventDefault()}return h? (d(a.target).attr("tabIndex",-1),d(h).attr("tabIndex",0),h.focus(),!1):!0}},resize:function(){var a=this.options,b;if(a.fillSpace){if(d.browser.msie){var e=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}b=this.element.parent().height();d.browser.msie&&this.element.parent().css("overflow",e);this.headers.each(function(){b-=d(this).outerHeight(!0)});this.headers.next().each(function(){d(this).height(Math.max(0,b-d(this).innerHeight()+d(this).height()))}).css("overflow", "auto")}else a.autoHeight&&(b=0,this.headers.next().each(function(){b=Math.max(b,d(this).height("").height())}).height(b));return this},activate:function(d){this.options.active=d;d=this._findActive(d)[0];this._clickHandler({target:d},d);return this},_findActive:function(a){return a?typeof a==="number"?this.headers.filter(":eq("+a+")"):this.headers.not(this.headers.not(a)):a===!1?d([]):this.headers.filter(":eq(0)")},_clickHandler:function(a,b){var e=this.options;if(!e.disabled)if(a.target){var f=d(a.currentTarget|| b),h=f[0]===this.active[0];e.active=e.collapsible&&h?!1:this.headers.index(f);if(!(this.running||!e.collapsible&&h)){var g=this.active,i=f.next(),j=this.active.next(),k={options:e,newHeader:h&&e.collapsible?d([]):f,oldHeader:this.active,newContent:h&&e.collapsible?d([]):i,oldContent:j},l=this.headers.index(this.active[0])>this.headers.index(f[0]);this.active=h?d([]):f;this._toggle(i,j,k,h,l);g.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(e.icons.headerSelected).addClass(e.icons.header); h||(f.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(e.icons.header).addClass(e.icons.headerSelected),f.next().addClass("ui-accordion-content-active"))}}else if(e.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(e.icons.headerSelected).addClass(e.icons.header);this.active.next().addClass("ui-accordion-content-active");var j=this.active.next(), k={options:e,newHeader:d([]),oldHeader:e.active,newContent:d([]),oldContent:j},i=this.active=d([]);this._toggle(i,j,k)}},_toggle:function(a,b,e,f,h){var g=this,i=g.options;g.toShow=a;g.toHide=b;g.data=e;var j=function(){return!g?void 0:g._completed.apply(g,arguments)};g._trigger("changestart",null,g.data);g.running=b.size()===0?a.size():b.size();if(i.animated){e={};e=i.collapsible&&f?{toShow:d([]),toHide:b,complete:j,down:h,autoHeight:i.autoHeight||i.fillSpace}:{toShow:a,toHide:b,complete:j,down:h, autoHeight:i.autoHeight||i.fillSpace};if(!i.proxied)i.proxied=i.animated;if(!i.proxiedDuration)i.proxiedDuration=i.duration;i.animated=d.isFunction(i.proxied)?i.proxied(e):i.proxied;i.duration=d.isFunction(i.proxiedDuration)?i.proxiedDuration(e):i.proxiedDuration;var f=d.ui.accordion.animations,k=i.duration,l=i.animated;l&&!f[l]&&!d.easing[l]&&(l="slide");f[l]||(f[l]=function(d){this.slide(d,{easing:l,duration:k||700})});f[l](e)}else i.collapsible&&f?a.toggle():(b.hide(),a.show()),j(!0);b.prev().attr({"aria-expanded":"false", "aria-selected":"false",tabIndex:-1}).blur();a.prev().attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}).focus()},_completed:function(d){this.running=d?0:--this.running;if(!this.running){this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""});this.toHide.removeClass("ui-accordion-content-active");if(this.toHide.length)this.toHide.parent()[0].className=this.toHide.parent()[0].className;this._trigger("change",null,this.data)}}});d.extend(d.ui.accordion,{version:"1.8.16", animations:{slide:function(a,b){a=d.extend({easing:"swing",duration:300},a,b);if(a.toHide.size())if(a.toShow.size()){var e=a.toShow.css("overflow"),f=0,h={},g={},i,j=a.toShow;i=j[0].style.width;j.width(parseInt(j.parent().width(),10)-parseInt(j.css("paddingLeft"),10)-parseInt(j.css("paddingRight"),10)-(parseInt(j.css("borderLeftWidth"),10)||0)-(parseInt(j.css("borderRightWidth"),10)||0));d.each(["height","paddingTop","paddingBottom"],function(b,i){g[i]="hide";var e=(""+d.css(a.toShow[0],i)).match(/^([\d+-.]+)(.*)$/); h[i]={value:e[1],unit:e[2]||"px"}});a.toShow.css({height:0,overflow:"hidden"}).show();a.toHide.filter(":hidden").each(a.complete).end().filter(":visible").animate(g,{step:function(d,b){b.prop=="height"&&(f=b.end-b.start===0?0:(b.now-b.start)/(b.end-b.start));a.toShow[0].style[b.prop]=f*h[b.prop].value+h[b.prop].unit},duration:a.duration,easing:a.easing,complete:function(){a.autoHeight||a.toShow.css("height","");a.toShow.css({width:i,overflow:e});a.complete()}})}else a.toHide.animate({height:"hide", paddingTop:"hide",paddingBottom:"hide"},a);else a.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},a)},bounceslide:function(d){this.slide(d,{easing:d.down?"easeOutBounce":"swing",duration:d.down?1E3:200})}}})})(jQuery); (function(d){var a=0;d.widget("ui.autocomplete",{options:{appendTo:"body",autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var a=this,e=this.element[0].ownerDocument,f;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(e){if(!a.options.disabled&&!a.element.propAttr("readOnly")){f= !1;var g=d.ui.keyCode;switch(e.keyCode){case g.PAGE_UP:a._move("previousPage",e);break;case g.PAGE_DOWN:a._move("nextPage",e);break;case g.UP:a._move("previous",e);e.preventDefault();break;case g.DOWN:a._move("next",e);e.preventDefault();break;case g.ENTER:case g.NUMPAD_ENTER:a.menu.active&&(f=!0,e.preventDefault());case g.TAB:if(!a.menu.active)break;a.menu.select(e);break;case g.ESCAPE:a.element.val(a.term);a.close(e);break;default:clearTimeout(a.searching),a.searching=setTimeout(function(){if(a.term!= a.element.val())a.selectedItem=null,a.search(null,e)},a.options.delay)}}}).bind("keypress.autocomplete",function(d){f&&(f=!1,d.preventDefault())}).bind("focus.autocomplete",function(){if(!a.options.disabled)a.selectedItem=null,a.previous=a.element.val()}).bind("blur.autocomplete",function(d){if(!a.options.disabled)clearTimeout(a.searching),a.closing=setTimeout(function(){a.close(d);a._change(d)},150)});this._initSource();this.response=function(){return a._response.apply(a,arguments)};this.menu=d("<ul></ul>").addClass("ui-autocomplete").appendTo(d(this.options.appendTo|| "body",e)[0]).mousedown(function(e){var f=a.menu.element[0];d(e.target).closest(".ui-menu-item").length||setTimeout(function(){d(document).one("mousedown",function(i){i.target!==a.element[0]&&i.target!==f&&!d.ui.contains(f,i.target)&&a.close()})},1);setTimeout(function(){clearTimeout(a.closing)},13)}).menu({focus:function(d,e){var i=e.item.data("item.autocomplete");!1!==a._trigger("focus",d,{item:i})&&/^key/.test(d.originalEvent.type)&&a.element.val(i.value)},selected:function(d,f){var i=f.item.data("item.autocomplete"), j=a.previous;if(a.element[0]!==e.activeElement)a.element.focus(),a.previous=j,setTimeout(function(){a.previous=j;a.selectedItem=i},1);!1!==a._trigger("select",d,{item:i})&&a.element.val(i.value);a.term=a.element.val();a.close(d);a.selectedItem=i},blur:function(){a.menu.element.is(":visible")&&a.element.val()!==a.term&&a.element.val(a.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");d.fn.bgiframe&&this.menu.element.bgiframe()},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup"); this.menu.element.remove();d.Widget.prototype.destroy.call(this)},_setOption:function(a,e){d.Widget.prototype._setOption.apply(this,arguments);a==="source"&&this._initSource();a==="appendTo"&&this.menu.element.appendTo(d(e||"body",this.element[0].ownerDocument)[0]);a==="disabled"&&e&&this.xhr&&this.xhr.abort()},_initSource:function(){var b=this,e,f;d.isArray(this.options.source)?(e=this.options.source,this.source=function(a,b){b(d.ui.autocomplete.filter(e,a.term))}):typeof this.options.source==="string"? (f=this.options.source,this.source=function(e,g){b.xhr&&b.xhr.abort();b.xhr=d.ajax({url:f,data:e,dataType:"json",autocompleteRequest:++a,success:function(d){this.autocompleteRequest===a&&g(d)},error:function(){this.autocompleteRequest===a&&g([])}})}):this.source=this.options.source},search:function(d,a){d=d!=null?d:this.element.val();this.term=this.element.val();if(d.length<this.options.minLength)return this.close(a);clearTimeout(this.closing);return this._trigger("search",a)===!1?void 0:this._search(d)}, _search:function(d){this.pending++;this.element.addClass("ui-autocomplete-loading");this.source({term:d},this.response)},_response:function(d){!this.options.disabled&&d&&d.length?(d=this._normalize(d),this._suggest(d),this._trigger("open")):this.close();this.pending--;this.pending||this.element.removeClass("ui-autocomplete-loading")},close:function(d){clearTimeout(this.closing);this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.deactivate(),this._trigger("close",d))},_change:function(d){this.previous!== this.element.val()&&this._trigger("change",d,{item:this.selectedItem})},_normalize:function(a){return a.length&&a[0].label&&a[0].value?a:d.map(a,function(a){return typeof a==="string"?{label:a,value:a}:d.extend({label:a.label||a.value,value:a.value||a.label},a)})},_suggest:function(a){var e=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(e,a);this.menu.deactivate();this.menu.refresh();e.show();this._resizeMenu();e.position(d.extend({of:this.element},this.options.position)); this.options.autoFocus&&this.menu.next(new d.Event("mouseover"))},_resizeMenu:function(){var d=this.menu.element;d.outerWidth(Math.max(d.width("").outerWidth(),this.element.outerWidth()))},_renderMenu:function(a,e){var f=this;d.each(e,function(d,e){f._renderItem(a,e)})},_renderItem:function(a,e){return d("<li></li>").data("item.autocomplete",e).append(d("<a></a>").text(e.label)).appendTo(a)},_move:function(d,a){if(this.menu.element.is(":visible"))if(this.menu.first()&&/^previous/.test(d)||this.menu.last()&& /^next/.test(d))this.element.val(this.term),this.menu.deactivate();else this.menu[d](a);else this.search(null,a)},widget:function(){return this.menu.element}});d.extend(d.ui.autocomplete,{escapeRegex:function(d){return d.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},filter:function(a,e){var f=RegExp(d.ui.autocomplete.escapeRegex(e),"i");return d.grep(a,function(d){return f.test(d.label||d.value||d)})}})})(jQuery); (function(d){d.widget("ui.menu",{_create:function(){var a=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(b){d(b.target).closest(".ui-menu-item a").length&&(b.preventDefault(),a.select(b))});this.refresh()},refresh:function(){var a=this;this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem").children("a").addClass("ui-corner-all").attr("tabindex", -1).mouseenter(function(b){a.activate(b,d(this).parent())}).mouseleave(function(){a.deactivate()})},activate:function(d,b){this.deactivate();if(this.hasScroll()){var e=b.offset().top-this.element.offset().top,f=this.element.scrollTop(),h=this.element.height();e<0?this.element.scrollTop(f+e):e>=h&&this.element.scrollTop(f+e-h+b.height())}this.active=b.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",d,{item:b})},deactivate:function(){if(this.active)this.active.children("a").removeClass("ui-state-hover").removeAttr("id"), this._trigger("blur"),this.active=null},next:function(d){this.move("next",".ui-menu-item:first",d)},previous:function(d){this.move("prev",".ui-menu-item:last",d)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(d,b,e){this.active?(d=this.active[d+"All"](".ui-menu-item").eq(0),d.length?this.activate(e,d):this.activate(e,this.element.children(b))):this.activate(e,this.element.children(b))}, nextPage:function(a){if(this.hasScroll())if(!this.active||this.last())this.activate(a,this.element.children(".ui-menu-item:first"));else{var b=this.active.offset().top,e=this.element.height(),f=this.element.children(".ui-menu-item").filter(function(){var a=d(this).offset().top-b-e+d(this).height();return a<10&&a>-10});f.length||(f=this.element.children(".ui-menu-item:last"));this.activate(a,f)}else this.activate(a,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))}, previousPage:function(a){if(this.hasScroll())if(!this.active||this.first())this.activate(a,this.element.children(".ui-menu-item:last"));else{var b=this.active.offset().top,e=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var a=d(this).offset().top-b+e-d(this).height();return a<10&&a>-10});result.length||(result=this.element.children(".ui-menu-item:first"));this.activate(a,result)}else this.activate(a,this.element.children(".ui-menu-item").filter(!this.active|| this.first()?":last":":first"))},hasScroll:function(){return this.element.height()<this.element[d.fn.prop?"prop":"attr"]("scrollHeight")},select:function(d){this._trigger("selected",d,{item:this.active})}})})(jQuery); (function(d){var a,b,e,f,h=function(){var a=d(this).find(":ui-button");setTimeout(function(){a.button("refresh")},1)},g=function(a){var b=a.name,e=a.form,f=d([]);b&&(f=e?d(e).find("[name='"+b+"']"):d("[name='"+b+"']",a.ownerDocument).filter(function(){return!this.form}));return f};d.widget("ui.button",{options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset.button").bind("reset.button",h);if(typeof this.options.disabled!== "boolean")this.options.disabled=this.element.propAttr("disabled");this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var i=this,j=this.options,k=this.type==="checkbox"||this.type==="radio",l="ui-state-hover"+(!k?" ui-state-active":"");if(j.label===null)j.label=this.buttonElement.html();if(this.element.is(":disabled"))j.disabled=!0;this.buttonElement.addClass("ui-button ui-widget ui-state-default ui-corner-all").attr("role","button").bind("mouseenter.button",function(){j.disabled|| (d(this).addClass("ui-state-hover"),this===a&&d(this).addClass("ui-state-active"))}).bind("mouseleave.button",function(){j.disabled||d(this).removeClass(l)}).bind("click.button",function(d){j.disabled&&(d.preventDefault(),d.stopImmediatePropagation())});this.element.bind("focus.button",function(){i.buttonElement.addClass("ui-state-focus")}).bind("blur.button",function(){i.buttonElement.removeClass("ui-state-focus")});k&&(this.element.bind("change.button",function(){f||i.refresh()}),this.buttonElement.bind("mousedown.button", function(d){if(!j.disabled)f=!1,b=d.pageX,e=d.pageY}).bind("mouseup.button",function(d){if(!j.disabled&&(b!==d.pageX||e!==d.pageY))f=!0}));this.type==="checkbox"?this.buttonElement.bind("click.button",function(){if(j.disabled||f)return!1;d(this).toggleClass("ui-state-active");i.buttonElement.attr("aria-pressed",i.element[0].checked)}):this.type==="radio"?this.buttonElement.bind("click.button",function(){if(j.disabled||f)return!1;d(this).addClass("ui-state-active");i.buttonElement.attr("aria-pressed", "true");var a=i.element[0];g(a).not(a).map(function(){return d(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown.button",function(){if(j.disabled)return!1;d(this).addClass("ui-state-active");a=this;d(document).one("mouseup",function(){a=null})}).bind("mouseup.button",function(){if(j.disabled)return!1;d(this).removeClass("ui-state-active")}).bind("keydown.button",function(a){if(j.disabled)return!1;(a.keyCode==d.ui.keyCode.SPACE|| a.keyCode==d.ui.keyCode.ENTER)&&d(this).addClass("ui-state-active")}).bind("keyup.button",function(){d(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(a){a.keyCode===d.ui.keyCode.SPACE&&d(this).click()}));this._setOption("disabled",j.disabled);this._resetButton()},_determineButtonType:function(){this.type=this.element.is(":checkbox")?"checkbox":this.element.is(":radio")?"radio":this.element.is("input")?"input":"button";if(this.type==="checkbox"|| this.type==="radio"){var d=this.element.parents().filter(":last"),a="label[for='"+this.element.attr("id")+"']";this.buttonElement=d.find(a);if(!this.buttonElement.length&&(d=d.length?d.siblings():this.element.siblings(),this.buttonElement=d.filter(a),!this.buttonElement.length))this.buttonElement=d.find(a);this.element.addClass("ui-helper-hidden-accessible");(d=this.element.is(":checked"))&&this.buttonElement.addClass("ui-state-active");this.buttonElement.attr("aria-pressed",d)}else this.buttonElement= this.element},widget:function(){return this.buttonElement},destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass("ui-button ui-widget ui-state-default ui-corner-all ui-state-hover ui-state-active ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only").removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());this.hasTitle|| this.buttonElement.removeAttr("title");d.Widget.prototype.destroy.call(this)},_setOption:function(a,b){d.Widget.prototype._setOption.apply(this,arguments);a==="disabled"?b?this.element.propAttr("disabled",!0):this.element.propAttr("disabled",!1):this._resetButton()},refresh:function(){var a=this.element.is(":disabled");a!==this.options.disabled&&this._setOption("disabled",a);this.type==="radio"?g(this.element[0]).each(function(){d(this).is(":checked")?d(this).button("widget").addClass("ui-state-active").attr("aria-pressed", "true"):d(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):this.type==="checkbox"&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if(this.type==="input")this.options.label&&this.element.val(this.options.label);else{var a=this.buttonElement.removeClass("ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only"), b=d("<span></span>").addClass("ui-button-text").html(this.options.label).appendTo(a.empty()).text(),e=this.options.icons,f=e.primary&&e.secondary,h=[];e.primary||e.secondary?(this.options.text&&h.push("ui-button-text-icon"+(f?"s":e.primary?"-primary":"-secondary")),e.primary&&a.prepend("<span class='ui-button-icon-primary ui-icon "+e.primary+"'></span>"),e.secondary&&a.append("<span class='ui-button-icon-secondary ui-icon "+e.secondary+"'></span>"),this.options.text||(h.push(f?"ui-button-icons-only": "ui-button-icon-only"),this.hasTitle||a.attr("title",b))):h.push("ui-button-text-only");a.addClass(h.join(" "))}}});d.widget("ui.buttonset",{options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(a,b){a==="disabled"&&this.buttons.button("option",a,b);d.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){var a=this.element.css("direction")==="ltr"; this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return d(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(a?"ui-corner-left":"ui-corner-right").end().filter(":last").addClass(a?"ui-corner-right":"ui-corner-left").end().end()},destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return d(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy"); d.Widget.prototype.destroy.call(this)}})})(jQuery); (function(d,a){function b(){this.debug=!1;this._curInst=null;this._keyEvent=!1;this._disabledInputs=[];this._inDialog=this._datepickerShowing=!1;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass= "ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su", "Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null, maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1};d.extend(this._defaults,this.regional[""]);this.dpDiv=e(d('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}function e(a){return a.bind("mouseout",function(a){a= d(a.target).closest("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a");a.length&&a.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover")}).bind("mouseover",function(b){b=d(b.target).closest("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a");if(!d.datepicker._isDisabledDatepicker(g.inline?a.parent()[0]:g.input[0])&&b.length)b.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),b.addClass("ui-state-hover"), b.hasClass("ui-datepicker-prev")&&b.addClass("ui-datepicker-prev-hover"),b.hasClass("ui-datepicker-next")&&b.addClass("ui-datepicker-next-hover")})}function f(i,b){d.extend(i,b);for(var e in b)if(b[e]==null||b[e]==a)i[e]=b[e];return i}d.extend(d.ui,{datepicker:{version:"1.8.16"}});var h=(new Date).getTime(),g;d.extend(b.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(d){f(this._defaults, d||{});return this},_attachDatepicker:function(a,b){var e=null,f;for(f in this._defaults){var h=a.getAttribute("date:"+f);if(h){e=e||{};try{e[f]=eval(h)}catch(g){e[f]=h}}}f=a.nodeName.toLowerCase();h=f=="div"||f=="span";if(!a.id)this.uuid+=1,a.id="dp"+this.uuid;var p=this._newInst(d(a),h);p.settings=d.extend({},b||{},e||{});f=="input"?this._connectDatepicker(a,p):h&&this._inlineDatepicker(a,p)},_newInst:function(a,b){return{id:a[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1"),input:a,selectedDay:0,selectedMonth:0, selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:!b?this.dpDiv:e(d('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}},_connectDatepicker:function(a,b){var e=d(a);b.append=d([]);b.trigger=d([]);e.hasClass(this.markerClassName)||(this._attachments(e,b),e.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(d,a,i){b.settings[a]=i}).bind("getData.datepicker", function(d,a){return this._get(b,a)}),this._autoSize(b),d.data(a,"datepicker",b),b.settings.disabled&&this._disableDatepicker(a))},_attachments:function(a,b){var e=this._get(b,"appendText"),f=this._get(b,"isRTL");b.append&&b.append.remove();if(e)b.append=d('<span class="'+this._appendClass+'">'+e+"</span>"),a[f?"before":"after"](b.append);a.unbind("focus",this._showDatepicker);b.trigger&&b.trigger.remove();e=this._get(b,"showOn");(e=="focus"||e=="both")&&a.focus(this._showDatepicker);if(e=="button"|| e=="both"){var e=this._get(b,"buttonText"),h=this._get(b,"buttonImage");b.trigger=d(this._get(b,"buttonImageOnly")?d("<img/>").addClass(this._triggerClass).attr({src:h,alt:e,title:e}):d('<button type="button"></button>').addClass(this._triggerClass).html(h==""?e:d("<img/>").attr({src:h,alt:e,title:e})));a[f?"before":"after"](b.trigger);b.trigger.click(function(){d.datepicker._datepickerShowing&&d.datepicker._lastInput==a[0]?d.datepicker._hideDatepicker():d.datepicker._showDatepicker(a[0]);return!1})}}, _autoSize:function(d){if(this._get(d,"autoSize")&&!d.inline){var a=new Date(2009,11,20),b=this._get(d,"dateFormat");if(b.match(/[DM]/)){var e=function(d){for(var a=0,b=0,i=0;i<d.length;i++)if(d[i].length>a)a=d[i].length,b=i;return b};a.setMonth(e(this._get(d,b.match(/MM/)?"monthNames":"monthNamesShort")));a.setDate(e(this._get(d,b.match(/DD/)?"dayNames":"dayNamesShort"))+20-a.getDay())}d.input.attr("size",this._formatDate(d,a).length)}},_inlineDatepicker:function(a,b){var e=d(a);e.hasClass(this.markerClassName)|| (e.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(d,a,i){b.settings[a]=i}).bind("getData.datepicker",function(d,a){return this._get(b,a)}),d.data(a,"datepicker",b),this._setDate(b,this._getDefaultDate(b),!0),this._updateDatepicker(b),this._updateAlternate(b),b.settings.disabled&&this._disableDatepicker(a),b.dpDiv.css("display","block"))},_dialogDatepicker:function(a,b,e,h,g){a=this._dialogInst;if(!a)this.uuid+=1,this._dialogInput=d('<input type="text" id="dp'+this.uuid+ '" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>'),this._dialogInput.keydown(this._doKeyDown),d("body").append(this._dialogInput),a=this._dialogInst=this._newInst(this._dialogInput,!1),a.settings={},d.data(this._dialogInput[0],"datepicker",a);f(a.settings,h||{});b=b&&b.constructor==Date?this._formatDate(a,b):b;this._dialogInput.val(b);this._pos=g?g.length?g:[g.pageX,g.pageY]:null;if(!this._pos)this._pos=[document.documentElement.clientWidth/2-100+(document.documentElement.scrollLeft|| document.body.scrollLeft),document.documentElement.clientHeight/2-150+(document.documentElement.scrollTop||document.body.scrollTop)];this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px");a.settings.onSelect=e;this._inDialog=!0;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);d.blockUI&&d.blockUI(this.dpDiv);d.data(this._dialogInput[0],"datepicker",a);return this},_destroyDatepicker:function(a){var b=d(a),e=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var f= a.nodeName.toLowerCase();d.removeData(a,"datepicker");f=="input"?(e.append.remove(),e.trigger.remove(),b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):(f=="div"||f=="span")&&b.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(a){var b=d(a),e=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var f=a.nodeName.toLowerCase();if(f=="input")a.disabled= !1,e.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""});else if(f=="div"||f=="span")b=b.children("."+this._inlineClass),b.children().removeClass("ui-state-disabled"),b.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled");this._disabledInputs=d.map(this._disabledInputs,function(d){return d==a?null:d})}},_disableDatepicker:function(a){var b=d(a),e=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var f= a.nodeName.toLowerCase();if(f=="input")a.disabled=!0,e.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"});else if(f=="div"||f=="span")b=b.children("."+this._inlineClass),b.children().addClass("ui-state-disabled"),b.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled","disabled");this._disabledInputs=d.map(this._disabledInputs,function(d){return d==a?null:d});this._disabledInputs[this._disabledInputs.length]= a}},_isDisabledDatepicker:function(d){if(!d)return!1;for(var a=0;a<this._disabledInputs.length;a++)if(this._disabledInputs[a]==d)return!0;return!1},_getInst:function(a){try{return d.data(a,"datepicker")}catch(b){throw"Missing instance data for this datepicker";}},_optionDatepicker:function(b,e,h){var g=this._getInst(b);if(arguments.length==2&&typeof e=="string")return e=="defaults"?d.extend({},d.datepicker._defaults):g?e=="all"?d.extend({},g.settings):this._get(g,e):null;var m=e||{};typeof e=="string"&& (m={},m[e]=h);if(g){this._curInst==g&&this._hideDatepicker();var o=this._getDateDatepicker(b,!0),p=this._getMinMaxDate(g,"min"),n=this._getMinMaxDate(g,"max");f(g.settings,m);if(p!==null&&m.dateFormat!==a&&m.minDate===a)g.settings.minDate=this._formatDate(g,p);if(n!==null&&m.dateFormat!==a&&m.maxDate===a)g.settings.maxDate=this._formatDate(g,n);this._attachments(d(b),g);this._autoSize(g);this._setDate(g,o);this._updateAlternate(g);this._updateDatepicker(g)}},_changeDatepicker:function(d,a,b){this._optionDatepicker(d, a,b)},_refreshDatepicker:function(d){(d=this._getInst(d))&&this._updateDatepicker(d)},_setDateDatepicker:function(d,a){var b=this._getInst(d);b&&(this._setDate(b,a),this._updateDatepicker(b),this._updateAlternate(b))},_getDateDatepicker:function(d,a){var b=this._getInst(d);b&&!b.inline&&this._setDateFromField(b,a);return b?this._getDate(b):null},_doKeyDown:function(a){var b=d.datepicker._getInst(a.target),e=!0,f=b.dpDiv.is(".ui-datepicker-rtl");b._keyEvent=!0;if(d.datepicker._datepickerShowing)switch(a.keyCode){case 9:d.datepicker._hideDatepicker(); e=!1;break;case 13:return e=d("td."+d.datepicker._dayOverClass+":not(."+d.datepicker._currentClass+")",b.dpDiv),e[0]&&d.datepicker._selectDay(a.target,b.selectedMonth,b.selectedYear,e[0]),(a=d.datepicker._get(b,"onSelect"))?(e=d.datepicker._formatDate(b),a.apply(b.input?b.input[0]:null,[e,b])):d.datepicker._hideDatepicker(),!1;case 27:d.datepicker._hideDatepicker();break;case 33:d.datepicker._adjustDate(a.target,a.ctrlKey?-d.datepicker._get(b,"stepBigMonths"):-d.datepicker._get(b,"stepMonths"),"M"); break;case 34:d.datepicker._adjustDate(a.target,a.ctrlKey?+d.datepicker._get(b,"stepBigMonths"):+d.datepicker._get(b,"stepMonths"),"M");break;case 35:(a.ctrlKey||a.metaKey)&&d.datepicker._clearDate(a.target);e=a.ctrlKey||a.metaKey;break;case 36:(a.ctrlKey||a.metaKey)&&d.datepicker._gotoToday(a.target);e=a.ctrlKey||a.metaKey;break;case 37:if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,f?1:-1,"D");e=a.ctrlKey||a.metaKey;a.originalEvent.altKey&&d.datepicker._adjustDate(a.target,a.ctrlKey? -d.datepicker._get(b,"stepBigMonths"):-d.datepicker._get(b,"stepMonths"),"M");break;case 38:(a.ctrlKey||a.metaKey)&&d.datepicker._adjustDate(a.target,-7,"D");e=a.ctrlKey||a.metaKey;break;case 39:if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,f?-1:1,"D");e=a.ctrlKey||a.metaKey;a.originalEvent.altKey&&d.datepicker._adjustDate(a.target,a.ctrlKey?+d.datepicker._get(b,"stepBigMonths"):+d.datepicker._get(b,"stepMonths"),"M");break;case 40:(a.ctrlKey||a.metaKey)&&d.datepicker._adjustDate(a.target, 7,"D");e=a.ctrlKey||a.metaKey;break;default:e=!1}else a.keyCode==36&&a.ctrlKey?d.datepicker._showDatepicker(this):e=!1;e&&(a.preventDefault(),a.stopPropagation())},_doKeyPress:function(b){var e=d.datepicker._getInst(b.target);if(d.datepicker._get(e,"constrainInput")){var e=d.datepicker._possibleChars(d.datepicker._get(e,"dateFormat")),f=String.fromCharCode(b.charCode==a?b.keyCode:b.charCode);return b.ctrlKey||b.metaKey||f<" "||!e||e.indexOf(f)>-1}},_doKeyUp:function(a){a=d.datepicker._getInst(a.target); if(a.input.val()!=a.lastVal)try{if(d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,d.datepicker._getFormatConfig(a)))d.datepicker._setDateFromField(a),d.datepicker._updateAlternate(a),d.datepicker._updateDatepicker(a)}catch(b){d.datepicker.log(b)}return!0},_showDatepicker:function(a){a=a.target||a;a.nodeName.toLowerCase()!="input"&&(a=d("input",a.parentNode)[0]);if(!(d.datepicker._isDisabledDatepicker(a)||d.datepicker._lastInput==a)){var b=d.datepicker._getInst(a); d.datepicker._curInst&&d.datepicker._curInst!=b&&(d.datepicker._datepickerShowing&&d.datepicker._triggerOnClose(d.datepicker._curInst),d.datepicker._curInst.dpDiv.stop(!0,!0));var e=d.datepicker._get(b,"beforeShow"),e=e?e.apply(a,[a,b]):{};if(e!==!1){f(b.settings,e);b.lastVal=null;d.datepicker._lastInput=a;d.datepicker._setDateFromField(b);if(d.datepicker._inDialog)a.value="";if(!d.datepicker._pos)d.datepicker._pos=d.datepicker._findPos(a),d.datepicker._pos[1]+=a.offsetHeight;var h=!1;d(a).parents().each(function(){h|= d(this).css("position")=="fixed";return!h});h&&d.browser.opera&&(d.datepicker._pos[0]-=document.documentElement.scrollLeft,d.datepicker._pos[1]-=document.documentElement.scrollTop);e={left:d.datepicker._pos[0],top:d.datepicker._pos[1]};d.datepicker._pos=null;b.dpDiv.empty();b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});d.datepicker._updateDatepicker(b);e=d.datepicker._checkOffset(b,e,h);b.dpDiv.css({position:d.datepicker._inDialog&&d.blockUI?"static":h?"fixed":"absolute",display:"none", left:e.left+"px",top:e.top+"px"});if(!b.inline){var e=d.datepicker._get(b,"showAnim"),g=d.datepicker._get(b,"duration"),o=function(){var a=b.dpDiv.find("iframe.ui-datepicker-cover");if(a.length){var e=d.datepicker._getBorders(b.dpDiv);a.css({left:-e[0],top:-e[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})}};b.dpDiv.zIndex(d(a).zIndex()+1);d.datepicker._datepickerShowing=!0;if(d.effects&&d.effects[e])b.dpDiv.show(e,d.datepicker._get(b,"showOptions"),g,o);else b.dpDiv[e||"show"](e?g:null, o);(!e||!g)&&o();b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus();d.datepicker._curInst=b}}}},_updateDatepicker:function(a){this.maxRows=4;var b=d.datepicker._getBorders(a.dpDiv);g=a;a.dpDiv.empty().append(this._generateHTML(a));var e=a.dpDiv.find("iframe.ui-datepicker-cover");e.length&&e.css({left:-b[0],top:-b[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()});a.dpDiv.find("."+this._dayOverClass+" a").mouseover();b=this._getNumberOfMonths(a);e=b[1];a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""); e>1&&a.dpDiv.addClass("ui-datepicker-multi-"+e).css("width",17*e+"em");a.dpDiv[(b[0]!=1||b[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");a==d.datepicker._curInst&&d.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&a.input[0]!=document.activeElement&&a.input.focus();if(a.yearshtml){var f=a.yearshtml;setTimeout(function(){f===a.yearshtml&&a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml); f=a.yearshtml=null},0)}},_getBorders:function(a){var d=function(a){return{thin:1,medium:2,thick:3}[a]||a};return[parseFloat(d(a.css("border-left-width"))),parseFloat(d(a.css("border-top-width")))]},_checkOffset:function(a,b,e){var f=a.dpDiv.outerWidth(),h=a.dpDiv.outerHeight(),g=a.input?a.input.outerWidth():0,p=a.input?a.input.outerHeight():0,n=document.documentElement.clientWidth+d(document).scrollLeft(),r=document.documentElement.clientHeight+d(document).scrollTop();b.left-=this._get(a,"isRTL")? f-g:0;b.left-=e&&b.left==a.input.offset().left?d(document).scrollLeft():0;b.top-=e&&b.top==a.input.offset().top+p?d(document).scrollTop():0;b.left-=Math.min(b.left,b.left+f>n&&n>f?Math.abs(b.left+f-n):0);b.top-=Math.min(b.top,b.top+h>r&&r>h?Math.abs(h+p):0);return b},_findPos:function(a){for(var b=this._get(this._getInst(a),"isRTL");a&&(a.type=="hidden"||a.nodeType!=1||d.expr.filters.hidden(a));)a=a[b?"previousSibling":"nextSibling"];a=d(a).offset();return[a.left,a.top]},_triggerOnClose:function(a){var d= this._get(a,"onClose");d&&d.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a])},_hideDatepicker:function(a){var b=this._curInst;if(b&&!(a&&b!=d.data(a,"datepicker"))&&this._datepickerShowing){var a=this._get(b,"showAnim"),e=this._get(b,"duration"),f=function(){d.datepicker._tidyDialog(b);this._curInst=null};if(d.effects&&d.effects[a])b.dpDiv.hide(a,d.datepicker._get(b,"showOptions"),e,f);else b.dpDiv[a=="slideDown"?"slideUp":a=="fadeIn"?"fadeOut":"hide"](a?e:null,f);a||f();d.datepicker._triggerOnClose(b); this._datepickerShowing=!1;this._lastInput=null;this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),d.blockUI&&(d.unblockUI(),d("body").append(this.dpDiv)));this._inDialog=!1}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(a){d.datepicker._curInst&&(a=d(a.target),a[0].id!=d.datepicker._mainDivId&&a.parents("#"+d.datepicker._mainDivId).length==0&&!a.hasClass(d.datepicker.markerClassName)&& !a.hasClass(d.datepicker._triggerClass)&&d.datepicker._datepickerShowing&&(!d.datepicker._inDialog||!d.blockUI)&&d.datepicker._hideDatepicker())},_adjustDate:function(a,b,e){var a=d(a),f=this._getInst(a[0]);this._isDisabledDatepicker(a[0])||(this._adjustInstDate(f,b+(e=="M"?this._get(f,"showCurrentAtPos"):0),e),this._updateDatepicker(f))},_gotoToday:function(a){var a=d(a),b=this._getInst(a[0]);if(this._get(b,"gotoCurrent")&&b.currentDay)b.selectedDay=b.currentDay,b.drawMonth=b.selectedMonth=b.currentMonth, b.drawYear=b.selectedYear=b.currentYear;else{var e=new Date;b.selectedDay=e.getDate();b.drawMonth=b.selectedMonth=e.getMonth();b.drawYear=b.selectedYear=e.getFullYear()}this._notifyChange(b);this._adjustDate(a)},_selectMonthYear:function(a,b,e){var a=d(a),f=this._getInst(a[0]);f["selected"+(e=="M"?"Month":"Year")]=f["draw"+(e=="M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10);this._notifyChange(f);this._adjustDate(a)},_selectDay:function(a,b,e,f){var h=d(a);if(!d(f).hasClass(this._unselectableClass)&& !this._isDisabledDatepicker(h[0]))h=this._getInst(h[0]),h.selectedDay=h.currentDay=d("a",f).html(),h.selectedMonth=h.currentMonth=b,h.selectedYear=h.currentYear=e,this._selectDate(a,this._formatDate(h,h.currentDay,h.currentMonth,h.currentYear))},_clearDate:function(a){a=d(a);this._getInst(a[0]);this._selectDate(a,"")},_selectDate:function(a,b){var e=this._getInst(d(a)[0]),b=b!=null?b:this._formatDate(e);e.input&&e.input.val(b);this._updateAlternate(e);var f=this._get(e,"onSelect");f?f.apply(e.input? e.input[0]:null,[b,e]):e.input&&e.input.trigger("change");e.inline?this._updateDatepicker(e):(this._hideDatepicker(),this._lastInput=e.input[0],typeof e.input[0]!="object"&&e.input.focus(),this._lastInput=null)},_updateAlternate:function(a){var b=this._get(a,"altField");if(b){var e=this._get(a,"altFormat")||this._get(a,"dateFormat"),f=this._getDate(a),h=this.formatDate(e,f,this._getFormatConfig(a));d(b).each(function(){d(this).val(h)})}},noWeekends:function(a){a=a.getDay();return[a>0&&a<6,""]},iso8601Week:function(a){a= new Date(a.getTime());a.setDate(a.getDate()+4-(a.getDay()||7));var d=a.getTime();a.setMonth(0);a.setDate(1);return Math.floor(Math.round((d-a)/864E5)/7)+1},parseDate:function(a,b,e){if(a==null||b==null)throw"Invalid arguments";b=typeof b=="object"?b.toString():b+"";if(b=="")return null;for(var f=(e?e.shortYearCutoff:null)||this._defaults.shortYearCutoff,f=typeof f!="string"?f:(new Date).getFullYear()%100+parseInt(f,10),h=(e?e.dayNamesShort:null)||this._defaults.dayNamesShort,g=(e?e.dayNames:null)|| this._defaults.dayNames,p=(e?e.monthNamesShort:null)||this._defaults.monthNamesShort,n=(e?e.monthNames:null)||this._defaults.monthNames,r=e=-1,u=-1,x=-1,q=!1,w=function(d){(d=F+1<a.length&&a.charAt(F+1)==d)&&F++;return d},s=function(a){var d=w(a),a=b.substring(C).match(RegExp("^\\d{1,"+(a=="@"?14:a=="!"?20:a=="y"&&d?4:a=="o"?3:2)+"}"));if(!a)throw"Missing number at position "+C;C+=a[0].length;return parseInt(a[0],10)},v=function(a,e,f){var a=d.map(w(a)?f:e,function(a,d){return[[d,a]]}).sort(function(a, d){return-(a[1].length-d[1].length)}),i=-1;d.each(a,function(a,d){var e=d[1];if(b.substr(C,e.length).toLowerCase()==e.toLowerCase())return i=d[0],C+=e.length,!1});if(i!=-1)return i+1;else throw"Unknown name at position "+C;},z=function(){if(b.charAt(C)!=a.charAt(F))throw"Unexpected literal at position "+C;C++},C=0,F=0;F<a.length;F++)if(q)a.charAt(F)=="'"&&!w("'")?q=!1:z();else switch(a.charAt(F)){case "d":u=s("d");break;case "D":v("D",h,g);break;case "o":x=s("o");break;case "m":r=s("m");break;case "M":r= v("M",p,n);break;case "y":e=s("y");break;case "@":var B=new Date(s("@")),e=B.getFullYear(),r=B.getMonth()+1,u=B.getDate();break;case "!":B=new Date((s("!")-this._ticksTo1970)/1E4);e=B.getFullYear();r=B.getMonth()+1;u=B.getDate();break;case "'":w("'")?z():q=!0;break;default:z()}if(C<b.length)throw"Extra/unparsed characters found in date: "+b.substring(C);e==-1?e=(new Date).getFullYear():e<100&&(e+=(new Date).getFullYear()-(new Date).getFullYear()%100+(e<=f?0:-100));if(x>-1){r=1;u=x;do{f=this._getDaysInMonth(e, r-1);if(u<=f)break;r++;u-=f}while(1)}B=this._daylightSavingAdjust(new Date(e,r-1,u));if(B.getFullYear()!=e||B.getMonth()+1!=r||B.getDate()!=u)throw"Invalid date";return B},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*864E9,formatDate:function(a,d,b){if(!d)return""; var e=(b?b.dayNamesShort:null)||this._defaults.dayNamesShort,f=(b?b.dayNames:null)||this._defaults.dayNames,h=(b?b.monthNamesShort:null)||this._defaults.monthNamesShort,b=(b?b.monthNames:null)||this._defaults.monthNames,g=function(d){(d=q+1<a.length&&a.charAt(q+1)==d)&&q++;return d},n=function(a,d,b){d=""+d;if(g(a))for(;d.length<b;)d="0"+d;return d},r=function(a,d,b,e){return g(a)?e[d]:b[d]},u="",x=!1;if(d)for(var q=0;q<a.length;q++)if(x)a.charAt(q)=="'"&&!g("'")?x=!1:u+=a.charAt(q);else switch(a.charAt(q)){case "d":u+= n("d",d.getDate(),2);break;case "D":u+=r("D",d.getDay(),e,f);break;case "o":u+=n("o",Math.round(((new Date(d.getFullYear(),d.getMonth(),d.getDate())).getTime()-(new Date(d.getFullYear(),0,0)).getTime())/864E5),3);break;case "m":u+=n("m",d.getMonth()+1,2);break;case "M":u+=r("M",d.getMonth(),h,b);break;case "y":u+=g("y")?d.getFullYear():(d.getYear()%100<10?"0":"")+d.getYear()%100;break;case "@":u+=d.getTime();break;case "!":u+=d.getTime()*1E4+this._ticksTo1970;break;case "'":g("'")?u+="'":x=!0;break; default:u+=a.charAt(q)}return u},_possibleChars:function(a){for(var d="",b=!1,e=function(d){(d=f+1<a.length&&a.charAt(f+1)==d)&&f++;return d},f=0;f<a.length;f++)if(b)a.charAt(f)=="'"&&!e("'")?b=!1:d+=a.charAt(f);else switch(a.charAt(f)){case "d":case "m":case "y":case "@":d+="0123456789";break;case "D":case "M":return null;case "'":e("'")?d+="'":b=!0;break;default:d+=a.charAt(f)}return d},_get:function(d,b){return d.settings[b]!==a?d.settings[b]:this._defaults[b]},_setDateFromField:function(a,d){if(a.input.val()!= a.lastVal){var b=this._get(a,"dateFormat"),e=a.lastVal=a.input?a.input.val():null,f,h;f=h=this._getDefaultDate(a);var g=this._getFormatConfig(a);try{f=this.parseDate(b,e,g)||h}catch(n){this.log(n),e=d?"":e}a.selectedDay=f.getDate();a.drawMonth=a.selectedMonth=f.getMonth();a.drawYear=a.selectedYear=f.getFullYear();a.currentDay=e?f.getDate():0;a.currentMonth=e?f.getMonth():0;a.currentYear=e?f.getFullYear():0;this._adjustInstDate(a)}},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a, this._get(a,"defaultDate"),new Date))},_determineDate:function(a,b,e){var i;var f=function(a){var d=new Date;d.setDate(d.getDate()+a);return d};if(i=(b=b==null||b===""?e:typeof b=="string"?function(b){try{return d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),b,d.datepicker._getFormatConfig(a))}catch(e){}for(var f=(b.toLowerCase().match(/^c/)?d.datepicker._getDate(a):null)||new Date,h=f.getFullYear(),g=f.getMonth(),f=f.getDate(),j=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,k=j.exec(b);k;){switch(k[2]|| "d"){case "d":case "D":f+=parseInt(k[1],10);break;case "w":case "W":f+=parseInt(k[1],10)*7;break;case "m":case "M":g+=parseInt(k[1],10);f=Math.min(f,d.datepicker._getDaysInMonth(h,g));break;case "y":case "Y":h+=parseInt(k[1],10),f=Math.min(f,d.datepicker._getDaysInMonth(h,g))}k=j.exec(b)}return new Date(h,g,f)}(b):typeof b=="number"?isNaN(b)?e:f(b):new Date(b.getTime()))&&b.toString()=="Invalid Date"?e:b,b=i)b.setHours(0),b.setMinutes(0),b.setSeconds(0),b.setMilliseconds(0);return this._daylightSavingAdjust(b)}, _daylightSavingAdjust:function(a){if(!a)return null;a.setHours(a.getHours()>12?a.getHours()+2:0);return a},_setDate:function(a,d,b){var e=!d,f=a.selectedMonth,h=a.selectedYear,d=this._restrictMinMax(a,this._determineDate(a,d,new Date));a.selectedDay=a.currentDay=d.getDate();a.drawMonth=a.selectedMonth=a.currentMonth=d.getMonth();a.drawYear=a.selectedYear=a.currentYear=d.getFullYear();(f!=a.selectedMonth||h!=a.selectedYear)&&!b&&this._notifyChange(a);this._adjustInstDate(a);a.input&&a.input.val(e? "":this._formatDate(a))},_getDate:function(a){return!a.currentYear||a.input&&a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay))},_generateHTML:function(a){var b=new Date,b=this._daylightSavingAdjust(new Date(b.getFullYear(),b.getMonth(),b.getDate())),e=this._get(a,"isRTL"),f=this._get(a,"showButtonPanel"),g=this._get(a,"hideIfNoPrevNext"),o=this._get(a,"navigationAsDateFormat"),p=this._getNumberOfMonths(a),n=this._get(a,"showCurrentAtPos"),r=this._get(a, "stepMonths"),u=p[0]!=1||p[1]!=1,x=this._daylightSavingAdjust(!a.currentDay?new Date(9999,9,9):new Date(a.currentYear,a.currentMonth,a.currentDay)),q=this._getMinMaxDate(a,"min"),w=this._getMinMaxDate(a,"max"),n=a.drawMonth-n,s=a.drawYear;n<0&&(n+=12,s--);if(w)for(var v=this._daylightSavingAdjust(new Date(w.getFullYear(),w.getMonth()-p[0]*p[1]+1,w.getDate())),v=q&&v<q?q:v;this._daylightSavingAdjust(new Date(s,n,1))>v;)n--,n<0&&(n=11,s--);a.drawMonth=n;a.drawYear=s;var v=this._get(a,"prevText"),v= !o?v:this.formatDate(v,this._daylightSavingAdjust(new Date(s,n-r,1)),this._getFormatConfig(a)),v=this._canAdjustMonth(a,-1,s,n)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+h+".datepicker._adjustDate('#"+a.id+"', -"+r+", 'M');\" title=\""+v+'"><span class="ui-icon ui-icon-circle-triangle-'+(e?"e":"w")+'">'+v+"</span></a>":g?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+v+'"><span class="ui-icon ui-icon-circle-triangle-'+(e?"e":"w")+'">'+v+"</span></a>", z=this._get(a,"nextText"),z=!o?z:this.formatDate(z,this._daylightSavingAdjust(new Date(s,n+r,1)),this._getFormatConfig(a)),g=this._canAdjustMonth(a,1,s,n)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+h+".datepicker._adjustDate('#"+a.id+"', +"+r+", 'M');\" title=\""+z+'"><span class="ui-icon ui-icon-circle-triangle-'+(e?"w":"e")+'">'+z+"</span></a>":g?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+z+'"><span class="ui-icon ui-icon-circle-triangle-'+ (e?"w":"e")+'">'+z+"</span></a>",r=this._get(a,"currentText"),z=this._get(a,"gotoCurrent")&&a.currentDay?x:b,r=!o?r:this.formatDate(r,z,this._getFormatConfig(a)),o=!a.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+h+'.datepicker._hideDatepicker();">'+this._get(a,"closeText")+"</button>":"",f=f?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(e?o:"")+(this._isInRange(a,z)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+ h+".datepicker._gotoToday('#"+a.id+"');\">"+r+"</button>":"")+(e?"":o)+"</div>":"",o=parseInt(this._get(a,"firstDay"),10),o=isNaN(o)?0:o,r=this._get(a,"showWeek"),z=this._get(a,"dayNames");this._get(a,"dayNamesShort");var C=this._get(a,"dayNamesMin"),F=this._get(a,"monthNames"),B=this._get(a,"monthNamesShort"),N=this._get(a,"beforeShowDay"),K=this._get(a,"showOtherMonths"),T=this._get(a,"selectOtherMonths");this._get(a,"calculateWeek");for(var O=this._getDefaultDate(a),L="",H=0;H<p[0];H++){var P= "";this.maxRows=4;for(var I=0;I<p[1];I++){var Q=this._daylightSavingAdjust(new Date(s,n,a.selectedDay)),A=" ui-corner-all",D="";if(u){D+='<div class="ui-datepicker-group';if(p[1]>1)switch(I){case 0:D+=" ui-datepicker-group-first";A=" ui-corner-"+(e?"right":"left");break;case p[1]-1:D+=" ui-datepicker-group-last";A=" ui-corner-"+(e?"left":"right");break;default:D+=" ui-datepicker-group-middle",A=""}D+='">'}D+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+A+'">'+(/all|left/.test(A)&& H==0?e?g:v:"")+(/all|right/.test(A)&&H==0?e?v:g:"")+this._generateMonthYearHeader(a,n,s,q,w,H>0||I>0,F,B)+'</div><table class="ui-datepicker-calendar"><thead><tr>';for(var E=r?'<th class="ui-datepicker-week-col">'+this._get(a,"weekHeader")+"</th>":"",A=0;A<7;A++){var y=(A+o)%7;E+="<th"+((A+o+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+z[y]+'">'+C[y]+"</span></th>"}D+=E+"</tr></thead><tbody>";E=this._getDaysInMonth(s,n);if(s==a.selectedYear&&n==a.selectedMonth)a.selectedDay=Math.min(a.selectedDay, E);A=(this._getFirstDayOfMonth(s,n)-o+7)%7;E=Math.ceil((A+E)/7);this.maxRows=E=u?this.maxRows>E?this.maxRows:E:E;for(var y=this._daylightSavingAdjust(new Date(s,n,1-A)),R=0;R<E;R++){D+="<tr>";for(var S=!r?"":'<td class="ui-datepicker-week-col">'+this._get(a,"calculateWeek")(y)+"</td>",A=0;A<7;A++){var J=N?N.apply(a.input?a.input[0]:null,[y]):[!0,""],G=y.getMonth()!=n,M=G&&!T||!J[0]||q&&y<q||w&&y>w;S+='<td class="'+((A+o+6)%7>=5?" ui-datepicker-week-end":"")+(G?" ui-datepicker-other-month":"")+(y.getTime()== Q.getTime()&&n==a.selectedMonth&&a._keyEvent||O.getTime()==y.getTime()&&O.getTime()==Q.getTime()?" "+this._dayOverClass:"")+(M?" "+this._unselectableClass+" ui-state-disabled":"")+(G&&!K?"":" "+J[1]+(y.getTime()==x.getTime()?" "+this._currentClass:"")+(y.getTime()==b.getTime()?" ui-datepicker-today":""))+'"'+((!G||K)&&J[2]?' title="'+J[2]+'"':"")+(M?"":' onclick="DP_jQuery_'+h+".datepicker._selectDay('#"+a.id+"',"+y.getMonth()+","+y.getFullYear()+', this);return false;"')+">"+(G&&!K?"&#xa0;":M?'<span class="ui-state-default">'+ y.getDate()+"</span>":'<a class="ui-state-default'+(y.getTime()==b.getTime()?" ui-state-highlight":"")+(y.getTime()==x.getTime()?" ui-state-active":"")+(G?" ui-priority-secondary":"")+'" href="#">'+y.getDate()+"</a>")+"</td>";y.setDate(y.getDate()+1);y=this._daylightSavingAdjust(y)}D+=S+"</tr>"}n++;n>11&&(n=0,s++);D+="</tbody></table>"+(u?"</div>"+(p[0]>0&&I==p[1]-1?'<div class="ui-datepicker-row-break"></div>':""):"");P+=D}L+=P}L+=f+(d.browser.msie&&parseInt(d.browser.version,10)<7&&!a.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>': "");a._keyEvent=!1;return L},_generateMonthYearHeader:function(a,d,b,e,f,g,p,n){var r=this._get(a,"changeMonth"),u=this._get(a,"changeYear"),x=this._get(a,"showMonthAfterYear"),q='<div class="ui-datepicker-title">',w="";if(g||!r)w+='<span class="ui-datepicker-month">'+p[d]+"</span>";else{var p=e&&e.getFullYear()==b,s=f&&f.getFullYear()==b;w+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+h+".datepicker._selectMonthYear('#"+a.id+"', this, 'M');\" >";for(var v=0;v<12;v++)if((!p||v>=e.getMonth())&& (!s||v<=f.getMonth()))w+='<option value="'+v+'"'+(v==d?' selected="selected"':"")+">"+n[v]+"</option>";w+="</select>"}x||(q+=w+(g||!r||!u?"&#xa0;":""));if(!a.yearshtml)if(a.yearshtml="",g||!u)q+='<span class="ui-datepicker-year">'+b+"</span>";else{var n=this._get(a,"yearRange").split(":"),z=(new Date).getFullYear(),p=function(a){a=a.match(/c[+-].*/)?b+parseInt(a.substring(1),10):a.match(/[+-].*/)?z+parseInt(a,10):parseInt(a,10);return isNaN(a)?z:a},d=p(n[0]),n=Math.max(d,p(n[1]||"")),d=e?Math.max(d, e.getFullYear()):d,n=f?Math.min(n,f.getFullYear()):n;for(a.yearshtml+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+h+".datepicker._selectMonthYear('#"+a.id+"', this, 'Y');\" >";d<=n;d++)a.yearshtml+='<option value="'+d+'"'+(d==b?' selected="selected"':"")+">"+d+"</option>";a.yearshtml+="</select>";q+=a.yearshtml;a.yearshtml=null}q+=this._get(a,"yearSuffix");x&&(q+=(g||!r||!u?"&#xa0;":"")+w);q+="</div>";return q},_adjustInstDate:function(a,d,b){var e=a.drawYear+(b=="Y"?d:0),f=a.drawMonth+ (b=="M"?d:0),d=Math.min(a.selectedDay,this._getDaysInMonth(e,f))+(b=="D"?d:0),e=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(e,f,d)));a.selectedDay=e.getDate();a.drawMonth=a.selectedMonth=e.getMonth();a.drawYear=a.selectedYear=e.getFullYear();(b=="M"||b=="Y")&&this._notifyChange(a)},_restrictMinMax:function(a,d){var b=this._getMinMaxDate(a,"min"),e=this._getMinMaxDate(a,"max"),b=b&&d<b?b:d;return e&&b>e?e:b},_notifyChange:function(a){var d=this._get(a,"onChangeMonthYear");d&&d.apply(a.input? a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,d){return this._determineDate(a,this._get(a,d+"Date"),null)},_getDaysInMonth:function(a,d){return 32-this._daylightSavingAdjust(new Date(a,d,32)).getDate()},_getFirstDayOfMonth:function(a,d){return(new Date(a,d,1)).getDay()},_canAdjustMonth:function(a,d,b,e){var f=this._getNumberOfMonths(a),b=this._daylightSavingAdjust(new Date(b, e+(d<0?d:f[0]*f[1]),1));d<0&&b.setDate(this._getDaysInMonth(b.getFullYear(),b.getMonth()));return this._isInRange(a,b)},_isInRange:function(a,d){var b=this._getMinMaxDate(a,"min"),e=this._getMinMaxDate(a,"max");return(!b||d.getTime()>=b.getTime())&&(!e||d.getTime()<=e.getTime())},_getFormatConfig:function(a){var d=this._get(a,"shortYearCutoff"),d=typeof d!="string"?d:(new Date).getFullYear()%100+parseInt(d,10);return{shortYearCutoff:d,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a, "dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,d,b,e){if(!d)a.currentDay=a.selectedDay,a.currentMonth=a.selectedMonth,a.currentYear=a.selectedYear;d=d?typeof d=="object"?d:this._daylightSavingAdjust(new Date(e,b,d)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),d,this._getFormatConfig(a))}});d.fn.datepicker=function(a){if(!this.length)return this; if(!d.datepicker.initialized)d(document).mousedown(d.datepicker._checkExternalClick).find("body").append(d.datepicker.dpDiv),d.datepicker.initialized=!0;var b=Array.prototype.slice.call(arguments,1);return typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget")?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b)):a=="option"&&arguments.length==2&&typeof arguments[1]=="string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b)):this.each(function(){typeof a== "string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this].concat(b)):d.datepicker._attachDatepicker(this,a)})};d.datepicker=new b;d.datepicker.initialized=!1;d.datepicker.uuid=(new Date).getTime();d.datepicker.version="1.8.16";window["DP_jQuery_"+h]=d})(jQuery); (function(d,a){var b={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},e={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},f=d.attrFn||{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0,click:!0};d.widget("ui.dialog",{options:{autoOpen:!0,buttons:{},closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:!1,maxWidth:!1,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",collision:"fit",using:function(a){var b= d(this).css(a).offset().top;b<0&&d(this).css("top",a.top-b)}},resizable:!0,show:null,stack:!0,title:"",width:300,zIndex:1E3},_create:function(){this.originalTitle=this.element.attr("title");if(typeof this.originalTitle!=="string")this.originalTitle="";this.options.title=this.options.title||this.originalTitle;var a=this,b=a.options,e=b.title||"&#160;",f=d.ui.dialog.getTitleId(a.element),k=(a.uiDialog=d("<div></div>")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+ b.dialogClass).css({zIndex:b.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(e){b.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===d.ui.keyCode.ESCAPE&&(a.close(e),e.preventDefault())}).attr({role:"dialog","aria-labelledby":f}).mousedown(function(d){a.moveToTop(!1,d)});a.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(k);var l=(a.uiDialogTitlebar=d("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(k), m=d('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){m.addClass("ui-state-hover")},function(){m.removeClass("ui-state-hover")}).focus(function(){m.addClass("ui-state-focus")}).blur(function(){m.removeClass("ui-state-focus")}).click(function(d){a.close(d);return!1}).appendTo(l);(a.uiDialogTitlebarCloseText=d("<span></span>")).addClass("ui-icon ui-icon-closethick").text(b.closeText).appendTo(m);d("<span></span>").addClass("ui-dialog-title").attr("id", f).html(e).prependTo(l);if(d.isFunction(b.beforeclose)&&!d.isFunction(b.beforeClose))b.beforeClose=b.beforeclose;l.find("*").add(l).disableSelection();b.draggable&&d.fn.draggable&&a._makeDraggable();b.resizable&&d.fn.resizable&&a._makeResizable();a._createButtons(b.buttons);a._isOpen=!1;d.fn.bgiframe&&k.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){this.overlay&&this.overlay.destroy();this.uiDialog.hide();this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"); this.uiDialog.remove();this.originalTitle&&this.element.attr("title",this.originalTitle);return this},widget:function(){return this.uiDialog},close:function(a){var b=this,e,f;if(!1!==b._trigger("beforeClose",a)){b.overlay&&b.overlay.destroy();b.uiDialog.unbind("keypress.ui-dialog");b._isOpen=!1;b.options.hide?b.uiDialog.hide(b.options.hide,function(){b._trigger("close",a)}):(b.uiDialog.hide(),b._trigger("close",a));d.ui.dialog.overlay.resize();if(b.options.modal)e=0,d(".ui-dialog").each(function(){this!== b.uiDialog[0]&&(f=d(this).css("z-index"),isNaN(f)||(e=Math.max(e,f)))}),d.ui.dialog.maxZ=e;return b}},isOpen:function(){return this._isOpen},moveToTop:function(a,b){var e=this.options;if(e.modal&&!a||!e.stack&&!e.modal)return this._trigger("focus",b);if(e.zIndex>d.ui.dialog.maxZ)d.ui.dialog.maxZ=e.zIndex;if(this.overlay)d.ui.dialog.maxZ+=1,this.overlay.$el.css("z-index",d.ui.dialog.overlay.maxZ=d.ui.dialog.maxZ);e={scrollTop:this.element.scrollTop(),scrollLeft:this.element.scrollLeft()};d.ui.dialog.maxZ+= 1;this.uiDialog.css("z-index",d.ui.dialog.maxZ);this.element.attr(e);this._trigger("focus",b);return this},open:function(){if(!this._isOpen){var a=this.options,b=this.uiDialog;this.overlay=a.modal?new d.ui.dialog.overlay(this):null;this._size();this._position(a.position);b.show(a.show);this.moveToTop(!0);a.modal&&b.bind("keypress.ui-dialog",function(a){if(a.keyCode===d.ui.keyCode.TAB){var b=d(":tabbable",this),e=b.filter(":first"),b=b.filter(":last");if(a.target===b[0]&&!a.shiftKey)return e.focus(1), !1;else if(a.target===e[0]&&a.shiftKey)return b.focus(1),!1}});d(this.element.find(":tabbable").get().concat(b.find(".ui-dialog-buttonpane :tabbable").get().concat(b.get()))).eq(0).focus();this._isOpen=!0;this._trigger("open");return this}},_createButtons:function(a){var b=this,e=!1,j=d("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),k=d("<div></div>").addClass("ui-dialog-buttonset").appendTo(j);b.uiDialog.find(".ui-dialog-buttonpane").remove();typeof a==="object"&& a!==null&&d.each(a,function(){return!(e=!0)});e&&(d.each(a,function(a,e){var e=d.isFunction(e)?{click:e,text:a}:e,h=d('<button type="button"></button>').click(function(){e.click.apply(b.element[0],arguments)}).appendTo(k);d.each(e,function(a,d){if(a!=="click")if(a in f)h[a](d);else h.attr(a,d)});d.fn.button&&h.button()}),j.appendTo(b.uiDialog))},_makeDraggable:function(){function a(d){return{position:d.position,offset:d.offset}}var b=this,e=b.options,f=d(document),k;b.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close", handle:".ui-dialog-titlebar",containment:"document",start:function(f,m){k=e.height==="auto"?"auto":d(this).height();d(this).height(d(this).height()).addClass("ui-dialog-dragging");b._trigger("dragStart",f,a(m))},drag:function(d,e){b._trigger("drag",d,a(e))},stop:function(l,m){e.position=[m.position.left-f.scrollLeft(),m.position.top-f.scrollTop()];d(this).removeClass("ui-dialog-dragging").height(k);b._trigger("dragStop",l,a(m));d.ui.dialog.overlay.resize()}})},_makeResizable:function(b){function e(a){return{originalPosition:a.originalPosition, originalSize:a.originalSize,position:a.position,size:a.size}}var b=b===a?this.options.resizable:b,f=this,j=f.options,k=f.uiDialog.css("position"),b=typeof b==="string"?b:"n,e,s,w,se,sw,ne,nw";f.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:f.element,maxWidth:j.maxWidth,maxHeight:j.maxHeight,minWidth:j.minWidth,minHeight:f._minHeight(),handles:b,start:function(a,b){d(this).addClass("ui-dialog-resizing");f._trigger("resizeStart",a,e(b))},resize:function(a,d){f._trigger("resize", a,e(d))},stop:function(a,b){d(this).removeClass("ui-dialog-resizing");j.height=d(this).height();j.width=d(this).width();f._trigger("resizeStop",a,e(b));d.ui.dialog.overlay.resize()}}).css("position",k).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var a=this.options;return a.height==="auto"?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(a){var b=[],e=[0,0],f;if(a){if(typeof a==="string"||typeof a==="object"&&"0"in a)b=a.split?a.split(" "): [a[0],a[1]],b.length===1&&(b[1]=b[0]),d.each(["left","top"],function(a,d){+b[a]===b[a]&&(e[a]=b[a],b[a]=d)}),a={my:b.join(" "),at:b.join(" "),offset:e.join(" ")};a=d.extend({},d.ui.dialog.prototype.options.position,a)}else a=d.ui.dialog.prototype.options.position;(f=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position(d.extend({of:window},a));f||this.uiDialog.hide()},_setOptions:function(a){var f=this,i={},j=!1;d.each(a,function(a,d){f._setOption(a,d);a in b&&(j=!0);a in e&&(i[a]=d)});j&&this._size();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",i)},_setOption:function(a,b){var e=this.uiDialog;switch(a){case "beforeclose":a="beforeClose";break;case "buttons":this._createButtons(b);break;case "closeText":this.uiDialogTitlebarCloseText.text(""+b);break;case "dialogClass":e.removeClass(this.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+b);break;case "disabled":b?e.addClass("ui-dialog-disabled"): e.removeClass("ui-dialog-disabled");break;case "draggable":var f=e.is(":data(draggable)");f&&!b&&e.draggable("destroy");!f&&b&&this._makeDraggable();break;case "position":this._position(b);break;case "resizable":(f=e.is(":data(resizable)"))&&!b&&e.resizable("destroy");f&&typeof b==="string"&&e.resizable("option","handles",b);!f&&b!==!1&&this._makeResizable(b);break;case "title":d(".ui-dialog-title",this.uiDialogTitlebar).html(""+(b||"&#160;"))}d.Widget.prototype._setOption.apply(this,arguments)}, _size:function(){var a=this.options,b,e,f=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0});if(a.minWidth>a.width)a.width=a.minWidth;b=this.uiDialog.css({height:"auto",width:a.width}).height();e=Math.max(0,a.minHeight-b);a.height==="auto"?d.support.minHeight?this.element.css({minHeight:e,height:"auto"}):(this.uiDialog.show(),a=this.element.css("height","auto").height(),f||this.uiDialog.hide(),this.element.height(Math.max(a,e))):this.element.height(Math.max(a.height- b,0));this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}});d.extend(d.ui.dialog,{version:"1.8.16",uuid:0,maxZ:0,getTitleId:function(a){a=a.attr("id");if(!a)this.uuid+=1,a=this.uuid;return"ui-dialog-title-"+a},overlay:function(a){this.$el=d.ui.dialog.overlay.create(a)}});d.extend(d.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:d.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(a){return a+".dialog-overlay"}).join(" "), create:function(a){this.instances.length===0&&(setTimeout(function(){d.ui.dialog.overlay.instances.length&&d(document).bind(d.ui.dialog.overlay.events,function(a){if(d(a.target).zIndex()<d.ui.dialog.overlay.maxZ)return!1})},1),d(document).bind("keydown.dialog-overlay",function(b){a.options.closeOnEscape&&!b.isDefaultPrevented()&&b.keyCode&&b.keyCode===d.ui.keyCode.ESCAPE&&(a.close(b),b.preventDefault())}),d(window).bind("resize.dialog-overlay",d.ui.dialog.overlay.resize));var b=(this.oldInstances.pop()|| d("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});d.fn.bgiframe&&b.bgiframe();this.instances.push(b);return b},destroy:function(a){var b=d.inArray(a,this.instances);b!=-1&&this.oldInstances.push(this.instances.splice(b,1)[0]);this.instances.length===0&&d([document,window]).unbind(".dialog-overlay");a.remove();var e=0;d.each(this.instances,function(){e=Math.max(e,this.css("z-index"))});this.maxZ=e},height:function(){var a,b;return d.browser.msie&& d.browser.version<7?(a=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),b=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight),a<b?d(window).height()+"px":a+"px"):d(document).height()+"px"},width:function(){var a,b;return d.browser.msie?(a=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),b=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth),a<b?d(window).width()+"px":a+"px"):d(document).width()+"px"},resize:function(){var a= d([]);d.each(d.ui.dialog.overlay.instances,function(){a=a.add(this)});a.css({width:0,height:0}).css({width:d.ui.dialog.overlay.width(),height:d.ui.dialog.overlay.height()})}});d.extend(d.ui.dialog.overlay.prototype,{destroy:function(){d.ui.dialog.overlay.destroy(this.$el)}})})(jQuery); (function(d){d.widget("ui.draggable",d.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1},_create:function(){if(this.options.helper=="original"&&!/^(?:r|a|f)/.test(this.element.css("position")))this.element[0].style.position= "relative";this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable"))return this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy(),this},_mouseCapture:function(a){var b=this.options;if(this.helper||b.disabled||d(a.target).is(".ui-resizable-handle"))return!1; this.handle=this._getHandle(a);if(!this.handle)return!1;b.iframeFix&&d(b.iframeFix===!0?"iframe":b.iframeFix).each(function(){d('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(d(this).offset()).appendTo("body")});return!0},_mouseStart:function(a){var b=this.options;this.helper=this._createHelper(a);this._cacheHelperProportions();if(d.ui.ddmanager)d.ui.ddmanager.current= this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(a);this.originalPageX=a.pageX; this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);b.containment&&this._setContainment();if(this._trigger("start",a)===!1)return this._clear(),!1;this._cacheHelperProportions();d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(a,!0);d.ui.ddmanager&&d.ui.ddmanager.dragStart(this,a);return!0},_mouseDrag:function(a,b){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute"); if(!b){var e=this._uiHash();if(this._trigger("drag",a,e)===!1)return this._mouseUp({}),!1;this.position=e.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);return!1},_mouseStop:function(a){var b=!1;d.ui.ddmanager&&!this.options.dropBehaviour&&(b=d.ui.ddmanager.drop(this,a));if(this.dropped)b=this.dropped,this.dropped= !1;if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original")return!1;if(this.options.revert=="invalid"&&!b||this.options.revert=="valid"&&b||this.options.revert===!0||d.isFunction(this.options.revert)&&this.options.revert.call(this.element,b)){var e=this;d(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){e._trigger("stop",a)!==!1&&e._clear()})}else this._trigger("stop",a)!==!1&&this._clear();return!1},_mouseUp:function(a){this.options.iframeFix=== !0&&d("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)});d.ui.ddmanager&&d.ui.ddmanager.dragStop(this,a);return d.ui.mouse.prototype._mouseUp.call(this,a)},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(a){var b=!this.options.handle||!d(this.options.handle,this.element).length?!0:!1;d(this.options.handle,this.element).find("*").andSelf().each(function(){this==a.target&&(b=!0)});return b},_createHelper:function(a){var b= this.options,a=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[a])):b.helper=="clone"?this.element.clone().removeAttr("id"):this.element;a.parents("body").length||a.appendTo(b.appendTo=="parent"?this.element[0].parentNode:b.appendTo);a[0]!=this.element[0]&&!/(fixed|absolute)/.test(a.css("position"))&&a.css("position","absolute");return a},_adjustOffsetFromHelper:function(a){typeof a=="string"&&(a=a.split(" "));d.isArray(a)&&(a={left:+a[0],top:+a[1]||0});if("left"in a)this.offset.click.left= a.left+this.margins.left;if("right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;if("top"in a)this.offset.click.top=a.top+this.margins.top;if("bottom"in a)this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var a=this.offsetParent.offset();this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0])&&(a.left+= this.scrollParent.scrollLeft(),a.top+=this.scrollParent.scrollTop());if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&d.browser.msie)a={top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top-(parseInt(this.helper.css("top"), 10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}}, _setContainment:function(){var a=this.options;if(a.containment=="parent")a.containment=this.helper[0].parentNode;if(a.containment=="document"||a.containment=="window")this.containment=[a.containment=="document"?0:d(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,a.containment=="document"?0:d(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,(a.containment=="document"?0:d(window).scrollLeft())+d(a.containment=="document"?document:window).width()-this.helperProportions.width- this.margins.left,(a.containment=="document"?0:d(window).scrollTop())+(d(a.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)&&a.containment.constructor!=Array){var a=d(a.containment),b=a[0];if(b){a.offset();var e=d(b).css("overflow")!="hidden";this.containment=[(parseInt(d(b).css("borderLeftWidth"),10)||0)+(parseInt(d(b).css("paddingLeft"),10)||0),(parseInt(d(b).css("borderTopWidth"), 10)||0)+(parseInt(d(b).css("paddingTop"),10)||0),(e?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),10)||0)-(parseInt(d(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"),10)||0)-(parseInt(d(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom];this.relative_container=a}}else if(a.containment.constructor== Array)this.containment=a.containment},_convertPositionTo:function(a,b){if(!b)b=this.position;var e=a=="absolute"?1:-1,f=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,h=/(html|body)/i.test(f[0].tagName);return{top:b.top+this.offset.relative.top*e+this.offset.parent.top*e-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop(): h?0:f.scrollTop())*e),left:b.left+this.offset.relative.left*e+this.offset.parent.left*e-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():h?0:f.scrollLeft())*e)}},_generatePosition:function(a){var b=this.options,e=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(e[0].tagName),h=a.pageX,g=a.pageY; if(this.originalPosition){var i;if(this.containment)this.relative_container?(i=this.relative_container.offset(),i=[this.containment[0]+i.left,this.containment[1]+i.top,this.containment[2]+i.left,this.containment[3]+i.top]):i=this.containment,a.pageX-this.offset.click.left<i[0]&&(h=i[0]+this.offset.click.left),a.pageY-this.offset.click.top<i[1]&&(g=i[1]+this.offset.click.top),a.pageX-this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),a.pageY-this.offset.click.top>i[3]&&(g=i[3]+this.offset.click.top); b.grid&&(g=b.grid[1]?this.originalPageY+Math.round((g-this.originalPageY)/b.grid[1])*b.grid[1]:this.originalPageY,g=i?!(g-this.offset.click.top<i[1]||g-this.offset.click.top>i[3])?g:!(g-this.offset.click.top<i[1])?g-b.grid[1]:g+b.grid[1]:g,h=b.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/b.grid[0])*b.grid[0]:this.originalPageX,h=i?!(h-this.offset.click.left<i[0]||h-this.offset.click.left>i[2])?h:!(h-this.offset.click.left<i[0])?h-b.grid[0]:h+b.grid[0]:h)}return{top:g-this.offset.click.top- this.offset.relative.top-this.offset.parent.top+(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:e.scrollTop()),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:e.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");this.helper[0]!= this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove();this.helper=null;this.cancelHelperRemoval=!1},_trigger:function(a,b,e){e=e||this._uiHash();d.ui.plugin.call(this,a,[b,e]);if(a=="drag")this.positionAbs=this._convertPositionTo("absolute");return d.Widget.prototype._trigger.call(this,a,b,e)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});d.extend(d.ui.draggable,{version:"1.8.16"});d.ui.plugin.add("draggable", "connectToSortable",{start:function(a,b){var e=d(this).data("draggable"),f=e.options,h=d.extend({},b,{item:e.element});e.sortables=[];d(f.connectToSortable).each(function(){var b=d.data(this,"sortable");b&&!b.options.disabled&&(e.sortables.push({instance:b,shouldRevert:b.options.revert}),b.refreshPositions(),b._trigger("activate",a,h))})},stop:function(a,b){var e=d(this).data("draggable"),f=d.extend({},b,{item:e.element});d.each(e.sortables,function(){if(this.instance.isOver){this.instance.isOver= 0;e.cancelHelperRemoval=!0;this.instance.cancelHelperRemoval=!1;if(this.shouldRevert)this.instance.options.revert=!0;this.instance._mouseStop(a);this.instance.options.helper=this.instance.options._helper;e.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})}else this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",a,f)})},drag:function(a,b){var e=d(this).data("draggable"),f=this;d.each(e.sortables,function(){this.instance.positionAbs=e.positionAbs; this.instance.helperProportions=e.helperProportions;this.instance.offset.click=e.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver)this.instance.isOver=1,this.instance.currentItem=d(f).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return b.helper[0]},a.target=this.instance.currentItem[0],this.instance._mouseCapture(a, !0),this.instance._mouseStart(a,!0,!0),this.instance.offset.click.top=e.offset.click.top,this.instance.offset.click.left=e.offset.click.left,this.instance.offset.parent.left-=e.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=e.offset.parent.top-this.instance.offset.parent.top,e._trigger("toSortable",a),e.dropped=this.instance.element,e.currentItem=e.element,this.instance.fromOutside=e;this.instance.currentItem&&this.instance._mouseDrag(a)}else if(this.instance.isOver)this.instance.isOver= 0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",a,this.instance._uiHash(this.instance)),this.instance._mouseStop(a,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),e._trigger("fromSortable",a),e.dropped=!1})}});d.ui.plugin.add("draggable","cursor",{start:function(){var a=d("body"),b=d(this).data("draggable").options;if(a.css("cursor"))b._cursor= a.css("cursor");a.css("cursor",b.cursor)},stop:function(){var a=d(this).data("draggable").options;a._cursor&&d("body").css("cursor",a._cursor)}});d.ui.plugin.add("draggable","opacity",{start:function(a,b){var e=d(b.helper),f=d(this).data("draggable").options;if(e.css("opacity"))f._opacity=e.css("opacity");e.css("opacity",f.opacity)},stop:function(a,b){var e=d(this).data("draggable").options;e._opacity&&d(b.helper).css("opacity",e._opacity)}});d.ui.plugin.add("draggable","scroll",{start:function(){var a= d(this).data("draggable");if(a.scrollParent[0]!=document&&a.scrollParent[0].tagName!="HTML")a.overflowOffset=a.scrollParent.offset()},drag:function(a){var b=d(this).data("draggable"),e=b.options,f=!1;if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"){if(!e.axis||e.axis!="x")if(b.overflowOffset.top+b.scrollParent[0].offsetHeight-a.pageY<e.scrollSensitivity)b.scrollParent[0].scrollTop=f=b.scrollParent[0].scrollTop+e.scrollSpeed;else if(a.pageY-b.overflowOffset.top<e.scrollSensitivity)b.scrollParent[0].scrollTop= f=b.scrollParent[0].scrollTop-e.scrollSpeed;if(!e.axis||e.axis!="y")if(b.overflowOffset.left+b.scrollParent[0].offsetWidth-a.pageX<e.scrollSensitivity)b.scrollParent[0].scrollLeft=f=b.scrollParent[0].scrollLeft+e.scrollSpeed;else if(a.pageX-b.overflowOffset.left<e.scrollSensitivity)b.scrollParent[0].scrollLeft=f=b.scrollParent[0].scrollLeft-e.scrollSpeed}else{if(!e.axis||e.axis!="x")a.pageY-d(document).scrollTop()<e.scrollSensitivity?f=d(document).scrollTop(d(document).scrollTop()-e.scrollSpeed): d(window).height()-(a.pageY-d(document).scrollTop())<e.scrollSensitivity&&(f=d(document).scrollTop(d(document).scrollTop()+e.scrollSpeed));if(!e.axis||e.axis!="y")a.pageX-d(document).scrollLeft()<e.scrollSensitivity?f=d(document).scrollLeft(d(document).scrollLeft()-e.scrollSpeed):d(window).width()-(a.pageX-d(document).scrollLeft())<e.scrollSensitivity&&(f=d(document).scrollLeft(d(document).scrollLeft()+e.scrollSpeed))}f!==!1&&d.ui.ddmanager&&!e.dropBehaviour&&d.ui.ddmanager.prepareOffsets(b,a)}}); d.ui.plugin.add("draggable","snap",{start:function(){var a=d(this).data("draggable"),b=a.options;a.snapElements=[];d(b.snap.constructor!=String?b.snap.items||":data(draggable)":b.snap).each(function(){var b=d(this),f=b.offset();this!=a.element[0]&&a.snapElements.push({item:this,width:b.outerWidth(),height:b.outerHeight(),top:f.top,left:f.left})})},drag:function(a,b){for(var e=d(this).data("draggable"),f=e.options,h=f.snapTolerance,g=b.offset.left,i=g+e.helperProportions.width,j=b.offset.top,k=j+e.helperProportions.height, l=e.snapElements.length-1;l>=0;l--){var m=e.snapElements[l].left,o=m+e.snapElements[l].width,p=e.snapElements[l].top,n=p+e.snapElements[l].height;if(m-h<g&&g<o+h&&p-h<j&&j<n+h||m-h<g&&g<o+h&&p-h<k&&k<n+h||m-h<i&&i<o+h&&p-h<j&&j<n+h||m-h<i&&i<o+h&&p-h<k&&k<n+h){if(f.snapMode!="inner"){var r=Math.abs(p-k)<=h,u=Math.abs(n-j)<=h,x=Math.abs(m-i)<=h,q=Math.abs(o-g)<=h;if(r)b.position.top=e._convertPositionTo("relative",{top:p-e.helperProportions.height,left:0}).top-e.margins.top;if(u)b.position.top=e._convertPositionTo("relative", {top:n,left:0}).top-e.margins.top;if(x)b.position.left=e._convertPositionTo("relative",{top:0,left:m-e.helperProportions.width}).left-e.margins.left;if(q)b.position.left=e._convertPositionTo("relative",{top:0,left:o}).left-e.margins.left}var w=r||u||x||q;if(f.snapMode!="outer"){r=Math.abs(p-j)<=h;u=Math.abs(n-k)<=h;x=Math.abs(m-g)<=h;q=Math.abs(o-i)<=h;if(r)b.position.top=e._convertPositionTo("relative",{top:p,left:0}).top-e.margins.top;if(u)b.position.top=e._convertPositionTo("relative",{top:n-e.helperProportions.height, left:0}).top-e.margins.top;if(x)b.position.left=e._convertPositionTo("relative",{top:0,left:m}).left-e.margins.left;if(q)b.position.left=e._convertPositionTo("relative",{top:0,left:o-e.helperProportions.width}).left-e.margins.left}!e.snapElements[l].snapping&&(r||u||x||q||w)&&e.options.snap.snap&&e.options.snap.snap.call(e.element,a,d.extend(e._uiHash(),{snapItem:e.snapElements[l].item}));e.snapElements[l].snapping=r||u||x||q||w}else e.snapElements[l].snapping&&e.options.snap.release&&e.options.snap.release.call(e.element, a,d.extend(e._uiHash(),{snapItem:e.snapElements[l].item})),e.snapElements[l].snapping=!1}}});d.ui.plugin.add("draggable","stack",{start:function(){var a=d(this).data("draggable").options,a=d.makeArray(d(a.stack)).sort(function(a,b){return(parseInt(d(a).css("zIndex"),10)||0)-(parseInt(d(b).css("zIndex"),10)||0)});if(a.length){var b=parseInt(a[0].style.zIndex)||0;d(a).each(function(a){this.style.zIndex=b+a});this[0].style.zIndex=b+a.length}}});d.ui.plugin.add("draggable","zIndex",{start:function(a, b){var e=d(b.helper),f=d(this).data("draggable").options;if(e.css("zIndex"))f._zIndex=e.css("zIndex");e.css("zIndex",f.zIndex)},stop:function(a,b){var e=d(this).data("draggable").options;e._zIndex&&d(b.helper).css("zIndex",e._zIndex)}})})(jQuery); (function(d){d.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect"},_create:function(){var a=this.options,b=a.accept;this.isover=0;this.isout=1;this.accept=d.isFunction(b)?b:function(a){return a.is(b)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};d.ui.ddmanager.droppables[a.scope]=d.ui.ddmanager.droppables[a.scope]||[];d.ui.ddmanager.droppables[a.scope].push(this); a.addClasses&&this.element.addClass("ui-droppable")},destroy:function(){for(var a=d.ui.ddmanager.droppables[this.options.scope],b=0;b<a.length;b++)a[b]==this&&a.splice(b,1);this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");return this},_setOption:function(a,b){if(a=="accept")this.accept=d.isFunction(b)?b:function(a){return a.is(b)};d.Widget.prototype._setOption.apply(this,arguments)},_activate:function(a){var b=d.ui.ddmanager.current;this.options.activeClass&& this.element.addClass(this.options.activeClass);b&&this._trigger("activate",a,this.ui(b))},_deactivate:function(a){var b=d.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass);b&&this._trigger("deactivate",a,this.ui(b))},_over:function(a){var b=d.ui.ddmanager.current;if(b&&(b.currentItem||b.element)[0]!=this.element[0])if(this.accept.call(this.element[0],b.currentItem||b.element))this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over", a,this.ui(b))},_out:function(a){var b=d.ui.ddmanager.current;if(b&&(b.currentItem||b.element)[0]!=this.element[0])if(this.accept.call(this.element[0],b.currentItem||b.element))this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",a,this.ui(b))},_drop:function(a,b){var e=b||d.ui.ddmanager.current;if(!e||(e.currentItem||e.element)[0]==this.element[0])return!1;var f=!1;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var a=d.data(this, "droppable");if(a.options.greedy&&!a.options.disabled&&a.options.scope==e.options.scope&&a.accept.call(a.element[0],e.currentItem||e.element)&&d.ui.intersect(e,d.extend(a,{offset:a.element.offset()}),a.options.tolerance))return f=!0,!1});return f?!1:this.accept.call(this.element[0],e.currentItem||e.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",a,this.ui(e)),this.element): !1},ui:function(a){return{draggable:a.currentItem||a.element,helper:a.helper,position:a.position,offset:a.positionAbs}}});d.extend(d.ui.droppable,{version:"1.8.16"});d.ui.intersect=function(a,b,e){if(!b.offset)return!1;var f=(a.positionAbs||a.position.absolute).left,h=f+a.helperProportions.width,g=(a.positionAbs||a.position.absolute).top,i=g+a.helperProportions.height,j=b.offset.left,k=j+b.proportions.width,l=b.offset.top,m=l+b.proportions.height;switch(e){case "fit":return j<=f&&h<=k&&l<=g&&i<=m; case "intersect":return j<f+a.helperProportions.width/2&&h-a.helperProportions.width/2<k&&l<g+a.helperProportions.height/2&&i-a.helperProportions.height/2<m;case "pointer":return d.ui.isOver((a.positionAbs||a.position.absolute).top+(a.clickOffset||a.offset.click).top,(a.positionAbs||a.position.absolute).left+(a.clickOffset||a.offset.click).left,l,j,b.proportions.height,b.proportions.width);case "touch":return(g>=l&&g<=m||i>=l&&i<=m||g<l&&i>m)&&(f>=j&&f<=k||h>=j&&h<=k||f<j&&h>k);default:return!1}}; d.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(a,b){var e=d.ui.ddmanager.droppables[a.options.scope]||[],f=b?b.type:null,h=(a.currentItem||a.element).find(":data(droppable)").andSelf(),g=0;a:for(;g<e.length;g++)if(!(e[g].options.disabled||a&&!e[g].accept.call(e[g].element[0],a.currentItem||a.element))){for(var i=0;i<h.length;i++)if(h[i]==e[g].element[0]){e[g].proportions.height=0;continue a}e[g].visible=e[g].element.css("display")!="none";if(e[g].visible)f=="mousedown"&& e[g]._activate.call(e[g],b),e[g].offset=e[g].element.offset(),e[g].proportions={width:e[g].element[0].offsetWidth,height:e[g].element[0].offsetHeight}}},drop:function(a,b){var e=!1;d.each(d.ui.ddmanager.droppables[a.options.scope]||[],function(){if(this.options&&(!this.options.disabled&&this.visible&&d.ui.intersect(a,this,this.options.tolerance)&&(e=e||this._drop.call(this,b)),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],a.currentItem||a.element)))this.isout=1,this.isover= 0,this._deactivate.call(this,b)});return e},dragStart:function(a,b){a.element.parents(":not(body,html)").bind("scroll.droppable",function(){a.options.refreshPositions||d.ui.ddmanager.prepareOffsets(a,b)})},drag:function(a,b){a.options.refreshPositions&&d.ui.ddmanager.prepareOffsets(a,b);d.each(d.ui.ddmanager.droppables[a.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var e=d.ui.intersect(a,this,this.options.tolerance);if(e=!e&&this.isover==1?"isout":e&&this.isover== 0?"isover":null){var f;if(this.options.greedy){var h=this.element.parents(":data(droppable):eq(0)");if(h.length)f=d.data(h[0],"droppable"),f.greedyChild=e=="isover"?1:0}if(f&&e=="isover")f.isover=0,f.isout=1,f._out.call(f,b);this[e]=1;this[e=="isout"?"isover":"isout"]=0;this[e=="isover"?"_over":"_out"].call(this,b);if(f&&e=="isout")f.isout=0,f.isover=1,f._over.call(f,b)}}})},dragStop:function(a,b){a.element.parents(":not(body,html)").unbind("scroll.droppable");a.options.refreshPositions||d.ui.ddmanager.prepareOffsets(a, b)}}})(jQuery); (function(d){d.widget("ui.panel",{options:{event:"click",collapsible:!0,collapseType:"default",collapsed:!1,accordion:!1,collapseSpeed:"fast",draggable:!1,trueVerticalText:!0,vHeight:"220px",stackable:!0,width:"auto",controls:!1,cookie:null,widgetClass:"ui-helper-reset ui-widget ui-panel",headerClass:"ui-helper-reset ui-widget-header ui-panel-header ui-corner-top",contentClass:"ui-helper-reset ui-widget-content ui-panel-content ui-corner-bottom",contentTextClass:"ui-panel-content-text",rightboxClass:"ui-panel-rightbox", controlsClass:"ui-panel-controls",titleClass:"ui-panel-title",titleTextClass:"ui-panel-title-text",iconClass:"ui-icon",hoverClass:"ui-state-hover",collapsePnlClass:"ui-panel-clps-pnl",headerIconClpsd:"ui-icon-triangle-1-e",headerIcon:"ui-icon-triangle-1-s",slideRIconClpsd:"ui-icon-arrowthickstop-1-w",slideRIcon:"ui-icon-arrowthickstop-1-e",slideLIconClpsd:"ui-icon-arrowthickstop-1-e",slideLIcon:"ui-icon-arrowthickstop-1-w"},_init:function(){this._panelize()},_panelize:function(){if(this.element.is("div")){var a= this,b=this.options;this.panelBox=this.element;b.width=="auto"?b.width=this.panelBox.css("width"):this.panelBox.css("width",b.width);this.panelBox.attr("role","panel");b.id=this.panelBox.attr("id");this.headerBox=this.element.children(":first");this.contentBox=this.element.children().eq(1);b.content=this.contentBox.html();this.contentBox.wrapInner("<div/>");this.contentTextBox=this.contentBox.children(":first").addClass(b.contentTextClass);this.headerBox.wrapInner("<div><span/></div>");this.titleBox= this.headerBox.children(":first");this.titleTextBox=this.titleBox.children(":first");this.titleText=this.titleTextBox.html();this.headerBox.prepend("<span/>");this.rightBox=this.headerBox.children(":first").addClass(b.rightboxClass);b.controls!=!1?(this.rightBox.append("<span/>"),this.controlsBox=this.rightBox.children(":first").addClass(b.controlsClass).html(b.controls)):this.controlsBox=null;this.panelBox.addClass(b.widgetClass);this.headerBox.addClass(b.headerClass);this.titleBox.addClass(b.titleClass); this.titleTextBox.addClass(b.titleTextClass);this.contentBox.addClass(b.contentClass);if(b.collapsible){switch(b.collapseType){case "slide-right":var e=0;b.controls&&(e=1);this.rightBox.append("<span><span/></span>");this.collapsePanel=this.rightBox.children().eq(e).addClass(b.collapsePnlClass);this.collapseButton=this.collapsePanel.children(":first").addClass(b.slideRIcon);this.iconBtnClpsd=b.slideRIconClpsd;this.iconBtn=b.slideRIcon;this.ctrlBox=this.controlsBox;break;case "slide-left":this.headerBox.prepend("<span><span/></span>"); this.collapsePanel=this.headerBox.children(":first").addClass(b.collapsePnlClass);this.collapseButton=this.collapsePanel.children(":first").addClass(b.slideLIcon);this.iconBtnClpsd=b.slideLIconClpsd;this.iconBtn=b.slideLIcon;this.ctrlBox=this.rightBox;break;default:this.headerBox.prepend("<span><span/></span>"),this.collapseButton=this.headerBox.children(":first").addClass(b.headerIcon),this.iconBtnClpsd=b.headerIconClpsd,this.iconBtn=b.headerIcon,this.ctrlBox=this.controlsBox}this._buttonHover(this.collapseButton); this.collapseButton.addClass(b.iconClass);b.event&&(this.collapseButton.bind(b.event+".panel",function(d){return a._clickHandler.call(a,d,this)}),this.titleTextBox.bind(b.event+".panel",function(d){return a._clickHandler.call(a,d,this)}));if(b.accordion)b.collapsed=!0,b.trueVerticalText=!1;if(b.cookie)b.collapsed=a._cookie()==0?!1:!0;this.panelBox.data("collapsed",b.collapsed);if(b.stackable&&d.inArray(b.collapseType,["slide-right","slide-left"])>-1){this.panelDock=this.panelBox.siblings("div[role=panelDock]:first"); this.panelFrame=this.panelBox.siblings("div[role=panelFrame]:first");if(this.panelDock.length==0)this.panelDock=this.panelBox.parent(0).prepend("<div>").children(":first"),this.panelFrame=this.panelDock.after("<div>").next(":first"),this.panelDock.attr("role","panelDock").css("float",b.collapseType=="slide-left"?"left":"right"),this.panelFrame.attr("role","panelFrame").css({"float":b.collapseType=="slide-left"?"left":"right",overflow:"hidden"});b.collapsed?this.panelDock.append(this.panelBox):this.panelFrame.append(this.panelBox)}b.collapsed&& a.toggle(0,!0)}else this.titleTextBox.css("cursor","default");!b.accordion&&b.draggable&&d.fn.draggable&&this._makeDraggable();this.panelBox.show()}},_cookie:function(){var a=this.cookie||(this.cookie=this.options.cookie.name||"ui-panel-"+this.options.id);return d.cookie.apply(null,[a].concat(d.makeArray(arguments)))},_makeDraggable:function(){this.panelBox.draggable({containment:"document",handle:".ui-panel-header",cancel:".ui-panel-content",cursor:"move"});this.contentBox.css("position","absolute")}, _clickHandler:function(){var a=this.options;if(a.disabled)return!1;this.toggle(a.collapseSpeed);return!1},toggle:function(a,b){var e=this.options,f=this.panelBox,h=this.contentBox,g=this.headerBox,i=this.titleTextBox,j=this.titleText,k=this.ctrlBox,l=this.panelDock,m="";jQuery.support.leadingWhitespace||(m="-ie");h.css("display")=="none"?this._trigger("unfold"):this._trigger("fold");k&&k.toggle(0);e.collapseType=="default"?a==0?(k&&k.hide(),h.hide()):h.slideToggle(a):(a==0?(e.collapsed=!1,k&&k.hide(), h.hide()):h.toggle(),e.collapsed==!1?(e.trueVerticalText?(g.toggleClass("ui-panel-vtitle").css("height",e.vHeight),m==""&&(h="height:"+(parseInt(e.vHeight)-50)+"px;width:100%;position:absolute;bottom:0;left:0;",i.empty().append('<div style="'+h+'z-index:3;"></div><object style="'+h+'z-index:2;" type="image/svg+xml" data="data:image/svg+xml;charset=utf-8,<svg xmlns=\'http://www.w3.org/2000/svg\'><text x=\'-'+(parseInt(e.vHeight)-60)+"px' y='16px' style='font-weight:"+i.css("font-weight")+";font-family:"+ i.css("font-family").replace(/"/g,"")+";font-size:"+i.css("font-size")+";fill:"+i.css("color")+";' transform='rotate(-90)' text-rendering='optimizeSpeed'>"+j+'</text></svg>"></object>').css("height",e.vHeight)),i.toggleClass("ui-panel-vtext"+m)):(g.attr("align","center"),i.html(i.text().replace(/(.)/g,"$1<BR>"))),f.animate({width:"2.4em"},a),e.stackable&&(b?l.append(f):l.prepend(f))):(e.stackable&&this.panelFrame.append(f),e.trueVerticalText?(g.toggleClass("ui-panel-vtitle").css("height","auto"), i.empty().append(j),i.toggleClass("ui-panel-vtext"+m)):(g.attr("align","left"),i.html(i.text().replace(/<BR>/g," "))),f.animate({width:e.width},a)));if((a!=0||e.trueVerticalText)&&e.cookie==null||!b&&e.cookie!=null)e.collapsed=!e.collapsed;this.panelBox.data("collapsed",e.collapsed);b||(e.cookie&&this._cookie(Number(e.collapsed),e.cookie),e.accordion&&d("."+e.accordion+"[role='panel'][id!='"+e.id+"']:not(:data(collapsed))").panel("toggle",a,!0));this.collapseButton.toggleClass(this.iconBtnClpsd).toggleClass(this.iconBtn); g.toggleClass("ui-corner-all")},content:function(a){this.contentTextBox.html(a)},destroy:function(){var a=this.options;this.headerBox.html(this.titleText).removeAttr("align").removeAttr("style").removeClass("ui-panel-vtitle ui-corner-all "+a.headerClass);this.contentBox.removeClass(a.contentClass).removeAttr("style").html(a.content);this.panelBox.removeAttr("role").removeAttr("style").removeData("collapsed").unbind(".panel").removeClass(a.widgetClass);a.stackable&&d.inArray(a.collapseType,["slide-right", "slide-left"])>-1&&(this.panelDock.before(this.panelBox),this.panelDock.children("div[role=panel]").length==0&&this.panelFrame.children("div[role=panel]").length==0&&(this.panelDock.remove(),this.panelFrame.remove()));a.cookie&&this._cookie(null,a.cookie);return this},_buttonHover:function(a){var b=this.options;a.bind({mouseover:function(){d(this).addClass(b.hoverClass)},mouseout:function(){d(this).removeClass(b.hoverClass)}})}});d.extend(d.ui.panel,{version:"0.6"})})(jQuery); (function(d){d.ui=d.ui||{};var a=/left|center|right/,b=/top|center|bottom/,e=d.fn.position,f=d.fn.offset;d.fn.position=function(f){if(!f||!f.of)return e.apply(this,arguments);var f=d.extend({},f),g=d(f.of),i=g[0],j=(f.collision||"flip").split(" "),k=f.offset?f.offset.split(" "):[0,0],l,m,o;i.nodeType===9?(l=g.width(),m=g.height(),o={top:0,left:0}):i.setTimeout?(l=g.width(),m=g.height(),o={top:g.scrollTop(),left:g.scrollLeft()}):i.preventDefault?(f.at="left top",l=m=0,o={top:f.of.pageY,left:f.of.pageX}): (l=g.outerWidth(),m=g.outerHeight(),o=g.offset());d.each(["my","at"],function(){var d=(f[this]||"").split(" ");d.length===1&&(d=a.test(d[0])?d.concat(["center"]):b.test(d[0])?["center"].concat(d):["center","center"]);d[0]=a.test(d[0])?d[0]:"center";d[1]=b.test(d[1])?d[1]:"center";f[this]=d});j.length===1&&(j[1]=j[0]);k[0]=parseInt(k[0],10)||0;k.length===1&&(k[1]=k[0]);k[1]=parseInt(k[1],10)||0;f.at[0]==="right"?o.left+=l:f.at[0]==="center"&&(o.left+=l/2);f.at[1]==="bottom"?o.top+=m:f.at[1]==="center"&& (o.top+=m/2);o.left+=k[0];o.top+=k[1];return this.each(function(){var a=d(this),b=a.outerWidth(),e=a.outerHeight(),g=parseInt(d.curCSS(this,"marginLeft",!0))||0,i=parseInt(d.curCSS(this,"marginTop",!0))||0,q=b+g+(parseInt(d.curCSS(this,"marginRight",!0))||0),w=e+i+(parseInt(d.curCSS(this,"marginBottom",!0))||0),s=d.extend({},o),v;f.my[0]==="right"?s.left-=b:f.my[0]==="center"&&(s.left-=b/2);f.my[1]==="bottom"?s.top-=e:f.my[1]==="center"&&(s.top-=e/2);s.left=Math.round(s.left);s.top=Math.round(s.top); v={left:s.left-g,top:s.top-i};d.each(["left","top"],function(a,g){if(d.ui.position[j[a]])d.ui.position[j[a]][g](s,{targetWidth:l,targetHeight:m,elemWidth:b,elemHeight:e,collisionPosition:v,collisionWidth:q,collisionHeight:w,offset:k,my:f.my,at:f.at})});d.fn.bgiframe&&a.bgiframe();a.offset(d.extend(s,{using:f.using}))})};d.ui.position={fit:{left:function(a,b){var e=d(window),e=b.collisionPosition.left+b.collisionWidth-e.width()-e.scrollLeft();a.left=e>0?a.left-e:Math.max(a.left-b.collisionPosition.left, a.left)},top:function(a,b){var e=d(window),e=b.collisionPosition.top+b.collisionHeight-e.height()-e.scrollTop();a.top=e>0?a.top-e:Math.max(a.top-b.collisionPosition.top,a.top)}},flip:{left:function(a,b){if(b.at[0]!=="center"){var e=d(window),e=b.collisionPosition.left+b.collisionWidth-e.width()-e.scrollLeft(),f=b.my[0]==="left"?-b.elemWidth:b.my[0]==="right"?b.elemWidth:0,k=b.at[0]==="left"?b.targetWidth:-b.targetWidth,l=-2*b.offset[0];a.left+=b.collisionPosition.left<0?f+k+l:e>0?f+k+l:0}},top:function(a, b){if(b.at[1]!=="center"){var e=d(window),e=b.collisionPosition.top+b.collisionHeight-e.height()-e.scrollTop(),f=b.my[1]==="top"?-b.elemHeight:b.my[1]==="bottom"?b.elemHeight:0,k=b.at[1]==="top"?b.targetHeight:-b.targetHeight,l=-2*b.offset[1];a.top+=b.collisionPosition.top<0?f+k+l:e>0?f+k+l:0}}}};if(!d.offset.setOffset)d.offset.setOffset=function(a,b){if(/static/.test(d.curCSS(a,"position")))a.style.position="relative";var e=d(a),f=e.offset(),k=parseInt(d.curCSS(a,"top",!0),10)||0,l=parseInt(d.curCSS(a, "left",!0),10)||0,f={top:b.top-f.top+k,left:b.left-f.left+l};"using"in b?b.using.call(a,f):e.css(f)},d.fn.offset=function(a){var b=this[0];return!b||!b.ownerDocument?null:a?this.each(function(){d.offset.setOffset(this,a)}):f.call(this)}})(jQuery); (function(d,a){d.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()});this.valueDiv=d("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element);this.oldValue=this._value();this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"); this.valueDiv.remove();d.Widget.prototype.destroy.apply(this,arguments)},value:function(d){if(d===a)return this._value();this._setOption("value",d);return this},_setOption:function(a,e){if(a==="value")this.options.value=e,this._refreshValue(),this._value()===this.options.max&&this._trigger("complete");d.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;typeof a!=="number"&&(a=0);return Math.min(this.options.max,Math.max(this.min,a))},_percentage:function(){return 100* this._value()/this.options.max},_refreshValue:function(){var a=this.value(),d=this._percentage();if(this.oldValue!==a)this.oldValue=a,this._trigger("change");this.valueDiv.toggle(a>this.min).toggleClass("ui-corner-right",a===this.options.max).width(d.toFixed(0)+"%");this.element.attr("aria-valuenow",a)}});d.extend(d.ui.progressbar,{version:"1.8.16"})})(jQuery); (function(d){d.widget("ui.resizable",d.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1E3},_create:function(){var a=this,b=this.options;this.element.addClass("ui-resizable");d.extend(this,{_aspectRatio:!!b.aspectRatio,aspectRatio:b.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[], _helper:b.helper||b.ghost||b.animate?b.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i))/relative/.test(this.element.css("position"))&&d.browser.opera&&this.element.css({position:"relative",top:"auto",left:"auto"}),this.element.wrap(d('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})), this.element=this.element.parent().data("resizable",this.element.data("resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize", "none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize();this.handles=b.handles||(!d(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles== "all")this.handles="n,e,s,w,se,sw,ne,nw";var h=this.handles.split(",");this.handles={};for(var g=0;g<h.length;g++){var i=d.trim(h[g]),j=d('<div class="ui-resizable-handle ui-resizable-'+i+'"></div>');/sw|se|ne|nw/.test(i)&&j.css({zIndex:++b.zIndex});"se"==i&&j.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[i]=".ui-resizable-"+i;this.element.append(j)}}this._renderAxis=function(a){var a=a||this.element,b;for(b in this.handles){this.handles[b].constructor==String&&(this.handles[b]=d(this.handles[b], this.element).show());if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var e=d(this.handles[b],this.element),f=0,f=/sw|ne|nw|se|n|s/.test(b)?e.outerHeight():e.outerWidth(),e=["padding",/ne|nw|n/.test(b)?"Top":/se|sw|s/.test(b)?"Bottom":/^e$/.test(b)?"Right":"Left"].join("");a.css(e,f);this._proportionallyResize()}d(this.handles[b])}};this._renderAxis(this.element);this._handles=d(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!a.resizing){if(this.className)var d= this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);a.axis=d&&d[1]?d[1]:"se"}});b.autoHide&&(this._handles.hide(),d(this.element).addClass("ui-resizable-autohide").hover(function(){b.disabled||(d(this).removeClass("ui-resizable-autohide"),a._handles.show())},function(){!b.disabled&&!a.resizing&&(d(this).addClass("ui-resizable-autohide"),a._handles.hide())}));this._mouseInit()},destroy:function(){this._mouseDestroy();var a=function(a){d(a).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()}; if(this.elementIsWrapper){a(this.element);var b=this.element;b.after(this.originalElement.css({position:b.css("position"),width:b.outerWidth(),height:b.outerHeight(),top:b.css("top"),left:b.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);a(this.originalElement);return this},_mouseCapture:function(a){var b=!1,h;for(h in this.handles)d(this.handles[h])[0]==a.target&&(b=!0);return!this.options.disabled&&b},_mouseStart:function(b){var f=this.options,h=this.element.position(), g=this.element;this.resizing=!0;this.documentScroll={top:d(document).scrollTop(),left:d(document).scrollLeft()};(g.is(".ui-draggable")||/absolute/.test(g.css("position")))&&g.css({position:"absolute",top:h.top,left:h.left});d.browser.opera&&/relative/.test(g.css("position"))&&g.css({position:"relative",top:"auto",left:"auto"});this._renderProxy();var h=a(this.helper.css("left")),i=a(this.helper.css("top"));f.containment&&(h+=d(f.containment).scrollLeft()||0,i+=d(f.containment).scrollTop()||0);this.offset= this.helper.offset();this.position={left:h,top:i};this.size=this._helper?{width:g.outerWidth(),height:g.outerHeight()}:{width:g.width(),height:g.height()};this.originalSize=this._helper?{width:g.outerWidth(),height:g.outerHeight()}:{width:g.width(),height:g.height()};this.originalPosition={left:h,top:i};this.sizeDiff={width:g.outerWidth()-g.width(),height:g.outerHeight()-g.height()};this.originalMousePosition={left:b.pageX,top:b.pageY};this.aspectRatio=typeof f.aspectRatio=="number"?f.aspectRatio: this.originalSize.width/this.originalSize.height||1;f=d(".ui-resizable-"+this.axis).css("cursor");d("body").css("cursor",f=="auto"?this.axis+"-resize":f);g.addClass("ui-resizable-resizing");this._propagate("start",b);return!0},_mouseDrag:function(a){var d=this.helper,b=this.originalMousePosition,g=this._change[this.axis];if(!g)return!1;b=g.apply(this,[a,a.pageX-b.left||0,a.pageY-b.top||0]);this._updateVirtualBoundaries(a.shiftKey);if(this._aspectRatio||a.shiftKey)b=this._updateRatio(b,a);b=this._respectSize(b, a);this._propagate("resize",a);d.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();this._updateCache(b);this._trigger("resize",a,this.ui());return!1},_mouseStop:function(a){this.resizing=!1;var b=this.options;if(this._helper){var h=this._proportionallyResizeElements,g=h.length&&/textarea/i.test(h[0].nodeName),h=g&&d.ui.hasScroll(h[0],"left")?0: this.sizeDiff.height,g=g?0:this.sizeDiff.width,g={width:this.helper.width()-g,height:this.helper.height()-h},h=parseInt(this.element.css("left"),10)+(this.position.left-this.originalPosition.left)||null,i=parseInt(this.element.css("top"),10)+(this.position.top-this.originalPosition.top)||null;b.animate||this.element.css(d.extend(g,{top:i,left:h}));this.helper.height(this.size.height);this.helper.width(this.size.width);this._helper&&!b.animate&&this._proportionallyResize()}d("body").css("cursor","auto"); this.element.removeClass("ui-resizable-resizing");this._propagate("stop",a);this._helper&&this.helper.remove();return!1},_updateVirtualBoundaries:function(a){var d=this.options,h,g,i,d={minWidth:b(d.minWidth)?d.minWidth:0,maxWidth:b(d.maxWidth)?d.maxWidth:Infinity,minHeight:b(d.minHeight)?d.minHeight:0,maxHeight:b(d.maxHeight)?d.maxHeight:Infinity};if(this._aspectRatio||a){a=d.minHeight*this.aspectRatio;g=d.minWidth/this.aspectRatio;h=d.maxHeight*this.aspectRatio;i=d.maxWidth/this.aspectRatio;if(a> d.minWidth)d.minWidth=a;if(g>d.minHeight)d.minHeight=g;if(h<d.maxWidth)d.maxWidth=h;if(i<d.maxHeight)d.maxHeight=i}this._vBoundaries=d},_updateCache:function(a){this.offset=this.helper.offset();if(b(a.left))this.position.left=a.left;if(b(a.top))this.position.top=a.top;if(b(a.height))this.size.height=a.height;if(b(a.width))this.size.width=a.width},_updateRatio:function(a){var d=this.position,h=this.size,g=this.axis;if(b(a.height))a.width=a.height*this.aspectRatio;else if(b(a.width))a.height=a.width/ this.aspectRatio;if(g=="sw")a.left=d.left+(h.width-a.width),a.top=null;if(g=="nw")a.top=d.top+(h.height-a.height),a.left=d.left+(h.width-a.width);return a},_respectSize:function(a){var d=this._vBoundaries,h=this.axis,g=b(a.width)&&d.maxWidth&&d.maxWidth<a.width,i=b(a.height)&&d.maxHeight&&d.maxHeight<a.height,j=b(a.width)&&d.minWidth&&d.minWidth>a.width,k=b(a.height)&&d.minHeight&&d.minHeight>a.height;if(j)a.width=d.minWidth;if(k)a.height=d.minHeight;if(g)a.width=d.maxWidth;if(i)a.height=d.maxHeight; var l=this.originalPosition.left+this.originalSize.width,m=this.position.top+this.size.height,o=/sw|nw|w/.test(h),h=/nw|ne|n/.test(h);if(j&&o)a.left=l-d.minWidth;if(g&&o)a.left=l-d.maxWidth;if(k&&h)a.top=m-d.minHeight;if(i&&h)a.top=m-d.maxHeight;if((d=!a.width&&!a.height)&&!a.left&&a.top)a.top=null;else if(d&&!a.top&&a.left)a.left=null;return a},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var a=this.helper||this.element,b=0;b<this._proportionallyResizeElements.length;b++){var h= this._proportionallyResizeElements[b];if(!this.borderDif){var g=[h.css("borderTopWidth"),h.css("borderRightWidth"),h.css("borderBottomWidth"),h.css("borderLeftWidth")],i=[h.css("paddingTop"),h.css("paddingRight"),h.css("paddingBottom"),h.css("paddingLeft")];this.borderDif=d.map(g,function(a,d){var b=parseInt(a,10)||0,e=parseInt(i[d],10)||0;return b+e})}if(!d.browser.msie||!d(a).is(":hidden")&&!d(a).parents(":hidden").length)h.css({height:a.height()-this.borderDif[0]-this.borderDif[2]||0,width:a.width()- this.borderDif[1]-this.borderDif[3]||0})}},_renderProxy:function(){var a=this.options;this.elementOffset=this.element.offset();if(this._helper){this.helper=this.helper||d('<div style="overflow:hidden;"></div>');var b=d.browser.msie&&d.browser.version<7,h=b?1:0,b=b?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+b,height:this.element.outerHeight()+b,position:"absolute",left:this.elementOffset.left-h+"px",top:this.elementOffset.top-h+"px",zIndex:++a.zIndex});this.helper.appendTo("body").disableSelection()}else this.helper= this.element},_change:{e:function(a,d){return{width:this.originalSize.width+d}},w:function(a,d){return{left:this.originalPosition.left+d,width:this.originalSize.width-d}},n:function(a,d,b){return{top:this.originalPosition.top+b,height:this.originalSize.height-b}},s:function(a,d,b){return{height:this.originalSize.height+b}},se:function(a,b,h){return d.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[a,b,h]))},sw:function(a,b,h){return d.extend(this._change.s.apply(this,arguments), this._change.w.apply(this,[a,b,h]))},ne:function(a,b,h){return d.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[a,b,h]))},nw:function(a,b,h){return d.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[a,b,h]))}},_propagate:function(a,b){d.ui.plugin.call(this,a,[b,this.ui()]);a!="resize"&&this._trigger(a,b,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size, originalSize:this.originalSize,originalPosition:this.originalPosition}}});d.extend(d.ui.resizable,{version:"1.8.16"});d.ui.plugin.add("resizable","alsoResize",{start:function(){var a=d(this).data("resizable").options,b=function(a){d(a).each(function(){var a=d(this);a.data("resizable-alsoresize",{width:parseInt(a.width(),10),height:parseInt(a.height(),10),left:parseInt(a.css("left"),10),top:parseInt(a.css("top"),10),position:a.css("position")})})};typeof a.alsoResize=="object"&&!a.alsoResize.parentNode? a.alsoResize.length?(a.alsoResize=a.alsoResize[0],b(a.alsoResize)):d.each(a.alsoResize,function(a){b(a)}):b(a.alsoResize)},resize:function(a,b){var h=d(this).data("resizable"),g=h.options,i=h.originalSize,j=h.originalPosition,k={height:h.size.height-i.height||0,width:h.size.width-i.width||0,top:h.position.top-j.top||0,left:h.position.left-j.left||0},l=function(a,e){d(a).each(function(){var a=d(this),g=d(this).data("resizable-alsoresize"),i={},m=e&&e.length?e:a.parents(b.originalElement[0]).length? ["width","height"]:["width","height","top","left"];d.each(m,function(a,d){var b=(g[d]||0)+(k[d]||0);b&&b>=0&&(i[d]=b||null)});if(d.browser.opera&&/relative/.test(a.css("position")))h._revertToRelativePosition=!0,a.css({position:"absolute",top:"auto",left:"auto"});a.css(i)})};typeof g.alsoResize=="object"&&!g.alsoResize.nodeType?d.each(g.alsoResize,function(a,d){l(a,d)}):l(g.alsoResize)},stop:function(){var a=d(this).data("resizable"),b=a.options,h=function(a){d(a).each(function(){var a=d(this);a.css({position:a.data("resizable-alsoresize").position})})}; if(a._revertToRelativePosition)a._revertToRelativePosition=!1,typeof b.alsoResize=="object"&&!b.alsoResize.nodeType?d.each(b.alsoResize,function(a){h(a)}):h(b.alsoResize);d(this).removeData("resizable-alsoresize")}});d.ui.plugin.add("resizable","animate",{stop:function(a){var b=d(this).data("resizable"),h=b.options,g=b._proportionallyResizeElements,i=g.length&&/textarea/i.test(g[0].nodeName),j=i&&d.ui.hasScroll(g[0],"left")?0:b.sizeDiff.height,i={width:b.size.width-(i?0:b.sizeDiff.width),height:b.size.height- j},j=parseInt(b.element.css("left"),10)+(b.position.left-b.originalPosition.left)||null,k=parseInt(b.element.css("top"),10)+(b.position.top-b.originalPosition.top)||null;b.element.animate(d.extend(i,k&&j?{top:k,left:j}:{}),{duration:h.animateDuration,easing:h.animateEasing,step:function(){var h={width:parseInt(b.element.css("width"),10),height:parseInt(b.element.css("height"),10),top:parseInt(b.element.css("top"),10),left:parseInt(b.element.css("left"),10)};g&&g.length&&d(g[0]).css({width:h.width, height:h.height});b._updateCache(h);b._propagate("resize",a)}})}});d.ui.plugin.add("resizable","containment",{start:function(){var b=d(this).data("resizable"),f=b.element,h=b.options.containment;if(f=h instanceof d?h.get(0):/parent/.test(h)?f.parent().get(0):h)if(b.containerElement=d(f),/document/.test(h)||h==document)b.containerOffset={left:0,top:0},b.containerPosition={left:0,top:0},b.parentData={element:d(document),left:0,top:0,width:d(document).width(),height:d(document).height()||document.body.parentNode.scrollHeight}; else{var g=d(f),i=[];d(["Top","Right","Left","Bottom"]).each(function(d,b){i[d]=a(g.css("padding"+b))});b.containerOffset=g.offset();b.containerPosition=g.position();b.containerSize={height:g.innerHeight()-i[3],width:g.innerWidth()-i[1]};var h=b.containerOffset,j=b.containerSize.height,k=b.containerSize.width,k=d.ui.hasScroll(f,"left")?f.scrollWidth:k,j=d.ui.hasScroll(f)?f.scrollHeight:j;b.parentData={element:f,left:h.left,top:h.top,width:k,height:j}}},resize:function(a){var b=d(this).data("resizable"), h=b.options,g=b.containerOffset,i=b.position,a=b._aspectRatio||a.shiftKey,j={top:0,left:0},k=b.containerElement;k[0]!=document&&/static/.test(k.css("position"))&&(j=g);if(i.left<(b._helper?g.left:0)){b.size.width+=b._helper?b.position.left-g.left:b.position.left-j.left;if(a)b.size.height=b.size.width/h.aspectRatio;b.position.left=h.helper?g.left:0}if(i.top<(b._helper?g.top:0)){b.size.height+=b._helper?b.position.top-g.top:b.position.top;if(a)b.size.width=b.size.height*h.aspectRatio;b.position.top= b._helper?g.top:0}b.offset.left=b.parentData.left+b.position.left;b.offset.top=b.parentData.top+b.position.top;h=Math.abs((b._helper?b.offset.left-j.left:b.offset.left-j.left)+b.sizeDiff.width);g=Math.abs((b._helper?b.offset.top-j.top:b.offset.top-g.top)+b.sizeDiff.height);i=b.containerElement.get(0)==b.element.parent().get(0);j=/relative|absolute/.test(b.containerElement.css("position"));i&&j&&(h-=b.parentData.left);if(h+b.size.width>=b.parentData.width&&(b.size.width=b.parentData.width-h,a))b.size.height= b.size.width/b.aspectRatio;if(g+b.size.height>=b.parentData.height&&(b.size.height=b.parentData.height-g,a))b.size.width=b.size.height*b.aspectRatio},stop:function(){var a=d(this).data("resizable"),b=a.options,h=a.containerOffset,g=a.containerPosition,i=a.containerElement,j=d(a.helper),k=j.offset(),l=j.outerWidth()-a.sizeDiff.width,j=j.outerHeight()-a.sizeDiff.height;a._helper&&!b.animate&&/relative/.test(i.css("position"))&&d(this).css({left:k.left-g.left-h.left,width:l,height:j});a._helper&&!b.animate&& /static/.test(i.css("position"))&&d(this).css({left:k.left-g.left-h.left,width:l,height:j})}});d.ui.plugin.add("resizable","ghost",{start:function(){var a=d(this).data("resizable"),b=a.options,h=a.size;a.ghost=a.originalElement.clone();a.ghost.css({opacity:0.25,display:"block",position:"relative",height:h.height,width:h.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof b.ghost=="string"?b.ghost:"");a.ghost.appendTo(a.helper)},resize:function(){var a=d(this).data("resizable"); a.ghost&&a.ghost.css({position:"relative",height:a.size.height,width:a.size.width})},stop:function(){var a=d(this).data("resizable");a.ghost&&a.helper&&a.helper.get(0).removeChild(a.ghost.get(0))}});d.ui.plugin.add("resizable","grid",{resize:function(){var a=d(this).data("resizable"),b=a.options,h=a.size,g=a.originalSize,i=a.originalPosition,j=a.axis;b.grid=typeof b.grid=="number"?[b.grid,b.grid]:b.grid;var k=Math.round((h.width-g.width)/(b.grid[0]||1))*(b.grid[0]||1),b=Math.round((h.height-g.height)/ (b.grid[1]||1))*(b.grid[1]||1);/^(se|s|e)$/.test(j)?(a.size.width=g.width+k,a.size.height=g.height+b):/^(ne)$/.test(j)?(a.size.width=g.width+k,a.size.height=g.height+b,a.position.top=i.top-b):(/^(sw)$/.test(j)?(a.size.width=g.width+k,a.size.height=g.height+b):(a.size.width=g.width+k,a.size.height=g.height+b,a.position.top=i.top-b),a.position.left=i.left-k)}});var a=function(a){return parseInt(a,10)||0},b=function(a){return!isNaN(parseInt(a,10))}})(jQuery); (function(d){d.widget("ui.selectable",d.ui.mouse,{options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch"},_create:function(){var a=this;this.element.addClass("ui-selectable");this.dragged=!1;var b;this.refresh=function(){b=d(a.options.filter,a.element[0]);b.each(function(){var a=d(this),b=a.offset();d.data(this,"selectable-item",{element:this,$element:a,left:b.left,top:b.top,right:b.left+a.outerWidth(),bottom:b.top+a.outerHeight(),startselected:!1,selected:a.hasClass("ui-selected"), selecting:a.hasClass("ui-selecting"),unselecting:a.hasClass("ui-unselecting")})})};this.refresh();this.selectees=b.addClass("ui-selectee");this._mouseInit();this.helper=d("<div class='ui-selectable-helper'></div>")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy();return this},_mouseStart:function(a){var b=this;this.opos=[a.pageX, a.pageY];if(!this.options.disabled){var e=this.options;this.selectees=d(e.filter,this.element[0]);this._trigger("start",a);d(e.appendTo).append(this.helper);this.helper.css({left:a.clientX,top:a.clientY,width:0,height:0});e.autoRefresh&&this.refresh();this.selectees.filter(".ui-selected").each(function(){var e=d.data(this,"selectable-item");e.startselected=!0;if(!a.metaKey)e.$element.removeClass("ui-selected"),e.selected=!1,e.$element.addClass("ui-unselecting"),e.unselecting=!0,b._trigger("unselecting", a,{unselecting:e.element})});d(a.target).parents().andSelf().each(function(){var e=d.data(this,"selectable-item");if(e){var h=!a.metaKey||!e.$element.hasClass("ui-selected");e.$element.removeClass(h?"ui-unselecting":"ui-selected").addClass(h?"ui-selecting":"ui-unselecting");e.unselecting=!h;e.selecting=h;(e.selected=h)?b._trigger("selecting",a,{selecting:e.element}):b._trigger("unselecting",a,{unselecting:e.element});return!1}})}},_mouseDrag:function(a){var b=this;this.dragged=!0;if(!this.options.disabled){var e= this.options,f=this.opos[0],h=this.opos[1],g=a.pageX,i=a.pageY;if(f>g)var j=g,g=f,f=j;h>i&&(j=i,i=h,h=j);this.helper.css({left:f,top:h,width:g-f,height:i-h});this.selectees.each(function(){var j=d.data(this,"selectable-item");if(j&&j.element!=b.element[0]){var l=!1;e.tolerance=="touch"?l=!(j.left>g||j.right<f||j.top>i||j.bottom<h):e.tolerance=="fit"&&(l=j.left>f&&j.right<g&&j.top>h&&j.bottom<i);if(l){if(j.selected)j.$element.removeClass("ui-selected"),j.selected=!1;if(j.unselecting)j.$element.removeClass("ui-unselecting"), j.unselecting=!1;if(!j.selecting)j.$element.addClass("ui-selecting"),j.selecting=!0,b._trigger("selecting",a,{selecting:j.element})}else{if(j.selecting)if(a.metaKey&&j.startselected)j.$element.removeClass("ui-selecting"),j.selecting=!1,j.$element.addClass("ui-selected"),j.selected=!0;else{j.$element.removeClass("ui-selecting");j.selecting=!1;if(j.startselected)j.$element.addClass("ui-unselecting"),j.unselecting=!0;b._trigger("unselecting",a,{unselecting:j.element})}if(j.selected&&!a.metaKey&&!j.startselected)j.$element.removeClass("ui-selected"), j.selected=!1,j.$element.addClass("ui-unselecting"),j.unselecting=!0,b._trigger("unselecting",a,{unselecting:j.element})}}});return!1}},_mouseStop:function(a){var b=this;this.dragged=!1;d(".ui-unselecting",this.element[0]).each(function(){var e=d.data(this,"selectable-item");e.$element.removeClass("ui-unselecting");e.unselecting=!1;e.startselected=!1;b._trigger("unselected",a,{unselected:e.element})});d(".ui-selecting",this.element[0]).each(function(){var e=d.data(this,"selectable-item");e.$element.removeClass("ui-selecting").addClass("ui-selected"); e.selecting=!1;e.selected=!0;e.startselected=!0;b._trigger("selected",a,{selected:e.element})});this._trigger("stop",a);this.helper.remove();return!1}});d.extend(d.ui.selectable,{version:"1.8.16"})})(jQuery); (function(d){d.widget("ui.selectmenu",{getter:"value",version:"1.8",eventPrefix:"selectmenu",options:{transferClasses:!0,typeAhead:"sequential",style:"dropdown",positionOptions:{my:"left top",at:"left bottom",offset:null},width:null,menuWidth:null,handleWidth:26,maxHeight:null,icons:null,format:null,bgImage:function(){},wrapperElement:"<div />"},_create:function(){var a=this,b=this.options,e=this.element.attr("id")||"ui-selectmenu-"+Math.random().toString(16).slice(2,10);this.ids=[e+"-button",e+"-menu"]; this._safemouseup=!0;this.newelement=d("<a />",{"class":this.widgetBaseClass+" ui-widget ui-state-default ui-corner-all",id:this.ids[0],role:"button",href:"#",tabindex:this.element.attr("disabled")?1:0,"aria-haspopup":!0,"aria-owns":this.ids[1]});this.newelementWrap=d(b.wrapperElement).append(this.newelement).insertAfter(this.element);var f=this.element.attr("tabindex");f&&this.newelement.attr("tabindex",f);this.newelement.data("selectelement",this.element);this.selectmenuIcon=d('<span class="'+this.widgetBaseClass+ '-icon ui-icon"></span>').prependTo(this.newelement);this.newelement.prepend('<span class="'+a.widgetBaseClass+'-status" />');d('label[for="'+e+'"]').attr("for",this.ids[0]).bind("click.selectmenu",function(){a.newelement[0].focus();return!1});this.newelement.bind("mousedown.selectmenu",function(d){a._toggle(d,!0);if(b.style=="popup")a._safemouseup=!1,setTimeout(function(){a._safemouseup=!0},300);return!1}).bind("click.selectmenu",function(){return!1}).bind("keydown.selectmenu",function(b){var e= !1;switch(b.keyCode){case d.ui.keyCode.ENTER:e=!0;break;case d.ui.keyCode.SPACE:a._toggle(b);break;case d.ui.keyCode.UP:b.altKey?a.open(b):a._moveSelection(-1);break;case d.ui.keyCode.DOWN:b.altKey?a.open(b):a._moveSelection(1);break;case d.ui.keyCode.LEFT:a._moveSelection(-1);break;case d.ui.keyCode.RIGHT:a._moveSelection(1);break;case d.ui.keyCode.TAB:e=!0;break;default:e=!0}return e}).bind("keypress.selectmenu",function(b){a._typeAhead(b.which,"mouseup");return!0}).bind("mouseover.selectmenu focus.selectmenu", function(){b.disabled||d(this).addClass(a.widgetBaseClass+"-focus ui-state-hover")}).bind("mouseout.selectmenu blur.selectmenu",function(){b.disabled||d(this).removeClass(a.widgetBaseClass+"-focus ui-state-hover")});d(document).bind("mousedown.selectmenu",function(b){a.close(b)});this.element.bind("click.selectmenu",function(){a._refreshValue()}).bind("focus.selectmenu",function(){a.newelement&&a.newelement[0].focus()});if(!b.width)b.width=this.element.outerWidth();this.newelement.width(b.width); this.element.hide();this.list=d("<ul />",{"class":"ui-widget ui-widget-content","aria-hidden":!0,role:"listbox","aria-labelledby":this.ids[0],id:this.ids[1]});this.listWrap=d(b.wrapperElement).addClass(a.widgetBaseClass+"-menu").append(this.list).appendTo("body");this.list.bind("keydown.selectmenu",function(b){var e=!1;switch(b.keyCode){case d.ui.keyCode.UP:b.altKey?a.close(b,!0):a._moveFocus(-1);break;case d.ui.keyCode.DOWN:b.altKey?a.close(b,!0):a._moveFocus(1);break;case d.ui.keyCode.LEFT:a._moveFocus(-1); break;case d.ui.keyCode.RIGHT:a._moveFocus(1);break;case d.ui.keyCode.HOME:a._moveFocus(":first");break;case d.ui.keyCode.PAGE_UP:a._scrollPage("up");break;case d.ui.keyCode.PAGE_DOWN:a._scrollPage("down");break;case d.ui.keyCode.END:a._moveFocus(":last");break;case d.ui.keyCode.ENTER:case d.ui.keyCode.SPACE:a.close(b,!0);d(b.target).parents("li:eq(0)").trigger("mouseup");break;case d.ui.keyCode.TAB:e=!0;a.close(b,!0);d(b.target).parents("li:eq(0)").trigger("mouseup");break;case d.ui.keyCode.ESCAPE:a.close(b, !0);break;default:e=!0}return e}).bind("keypress.selectmenu",function(b){a._typeAhead(b.which,"focus");return!0}).bind("mousedown.selectmenu mouseup.selectmenu",function(){return!1})},_init:function(){var a=this,b=this.options,e=[];this.element.find("option").each(function(){var f=d(this);e.push({value:f.attr("value"),text:a._formatText(f.text()),selected:f.attr("selected"),disabled:f.attr("disabled"),classes:f.attr("class"),typeahead:f.attr("typeahead"),parentOptGroup:f.parent("optgroup"),bgImage:b.bgImage.call(f)})}); var f=a.options.style=="popup"?" ui-state-active":"";this.list.html("");if(e.length)for(var h=0;h<e.length;h++){var g={role:"presentation"};e[h].disabled&&(g["class"]=this.namespace+"-state-disabled");var i={html:e[h].text,href:"#",tabindex:-1,role:"option","aria-selected":!1};if(e[h].disabled)i["aria-disabled"]=e[h].disabled;if(e[h].typeahead)i.typeahead=e[h].typeahead;i=d("<a/>",i);g=d("<li/>",g).append(i).data("index",h).addClass(e[h].classes).data("optionClasses",e[h].classes||"").bind("mouseup.selectmenu", function(b){if(a._safemouseup&&!a._disabled(b.currentTarget)&&!a._disabled(d(b.currentTarget).parents("ul>li."+a.widgetBaseClass+"-group "))){var e=d(this).data("index")!=a._selectedIndex();a.index(d(this).data("index"));a.select(b);e&&a.change(b);a.close(b,!0)}return!1}).bind("click.selectmenu",function(){return!1}).bind("mouseover.selectmenu focus.selectmenu",function(b){!d(b.currentTarget).hasClass(a.namespace+"-state-disabled")&&!d(b.currentTarget).parent("ul").parent("li").hasClass(a.namespace+ "-state-disabled")&&(a._selectedOptionLi().addClass(f),a._focusedOptionLi().removeClass(a.widgetBaseClass+"-item-focus ui-state-hover"),d(this).removeClass("ui-state-active").addClass(a.widgetBaseClass+"-item-focus ui-state-hover"))}).bind("mouseout.selectmenu blur.selectmenu",function(){d(this).is(a._selectedOptionLi().selector)&&d(this).addClass(f);d(this).removeClass(a.widgetBaseClass+"-item-focus ui-state-hover")});e[h].parentOptGroup.length?(i=a.widgetBaseClass+"-group-"+this.element.find("optgroup").index(e[h].parentOptGroup), this.list.find("li."+i).length?this.list.find("li."+i+":last ul").append(g):d(' <li role="presentation" class="'+a.widgetBaseClass+"-group "+i+(e[h].parentOptGroup.attr("disabled")?" "+this.namespace+'-state-disabled" aria-disabled="true"':'"')+'><span class="'+a.widgetBaseClass+'-group-label">'+e[h].parentOptGroup.attr("label")+"</span><ul></ul></li> ").appendTo(this.list).find("ul").append(g)):g.appendTo(this.list);if(b.icons)for(var j in b.icons)g.is(b.icons[j].find)&&(g.data("optionClasses",e[h].classes+ " "+a.widgetBaseClass+"-hasIcon").addClass(a.widgetBaseClass+"-hasIcon"),i=b.icons[j].icon||"",g.find("a:eq(0)").prepend('<span class="'+a.widgetBaseClass+"-item-icon ui-icon "+i+'"></span>'),e[h].bgImage&&g.find("span").css("background-image",e[h].bgImage))}else d('<li role="presentation"><a href="#" tabindex="-1" role="option"></a></li>').appendTo(this.list);h=b.style=="dropdown";this.newelement.toggleClass(a.widgetBaseClass+"-dropdown",h).toggleClass(a.widgetBaseClass+"-popup",!h);this.list.toggleClass(a.widgetBaseClass+ "-menu-dropdown ui-corner-bottom",h).toggleClass(a.widgetBaseClass+"-menu-popup ui-corner-all",!h).find("li:first").toggleClass("ui-corner-top",!h).end().find("li:last").addClass("ui-corner-bottom");this.selectmenuIcon.toggleClass("ui-icon-triangle-1-s",h).toggleClass("ui-icon-triangle-2-n-s",!h);b.transferClasses&&(h=this.element.attr("class")||"",this.newelement.add(this.list).addClass(h));b.style=="dropdown"?this.list.width(b.menuWidth?b.menuWidth:b.width):this.list.width(b.menuWidth?b.menuWidth: b.width-b.handleWidth);this.list.css("height","auto");h=this.listWrap.height();b.maxHeight&&b.maxHeight<h?this.list.height(b.maxHeight):(j=d(window).height()/3,j<h&&this.list.height(j));this._optionLis=this.list.find("li:not(."+a.widgetBaseClass+"-group)");this.element.attr("disabled")?this.disable():this.enable();this.index(this._selectedIndex());window.setTimeout(function(){a._refreshPosition()},200)},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+ this.namespace+"-state-disabled").removeAttr("aria-disabled").unbind(".selectmenu");d(document).unbind(".selectmenu");d("label[for="+this.newelement.attr("id")+"]").attr("for",this.element.attr("id")).unbind(".selectmenu");this.newelementWrap.remove();this.listWrap.remove();this.element.show();d.Widget.prototype.destroy.apply(this,arguments)},_typeAhead:function(a,b){var e=this,f=!1,h=String.fromCharCode(a).toUpperCase();c=h.toLowerCase();if(e.options.typeAhead=="sequential"){window.clearTimeout("ui.selectmenu-"+ e.selectmenuId);var g=typeof e._prevChar=="undefined"?"":e._prevChar.join(""),i=function(a,h,g){f=!0;d(a).trigger(b);typeof e._prevChar=="undefined"?e._prevChar=[g]:e._prevChar[e._prevChar.length]=g};this.list.find("li a").each(function(a){if(!f){var b=d(this).attr("typeahead")||d(this).text();b.indexOf(g+h)===0?i(this,a,h):b.indexOf(g+c)===0&&i(this,a,c)}});window.setTimeout(function(){e._prevChar=void 0},1E3,e)}else{if(!e._prevChar)e._prevChar=["",0];f=!1;this.list.find("li a").each(function(a){if(!f){var g= d(this).text();if(g.indexOf(h)===0||g.indexOf(c)===0)e._prevChar[0]==h?e._prevChar[1]<a&&(f=!0,d(this).trigger(b),e._prevChar[1]=a):(f=!0,d(this).trigger(b),e._prevChar[1]=a)}});this._prevChar[0]=h}},_uiHash:function(){var a=this.index();return{index:a,option:d("option",this.element).get(a),value:this.element[0].value}},open:function(a){var b=this.options;this.newelement.attr("aria-disabled")!="true"&&(this._closeOthers(a),this.newelement.addClass("ui-state-active"),this.listWrap.appendTo(b.appendTo), this.list.attr("aria-hidden",!1),b.style=="dropdown"&&this.newelement.removeClass("ui-corner-all").addClass("ui-corner-top"),this.listWrap.addClass(this.widgetBaseClass+"-open"),d.browser.msie&&d.browser.version.substr(0,1)==7&&this._refreshPosition(),b=this.list.attr("aria-hidden",!1).find("li:not(."+this.widgetBaseClass+"-group):eq("+this._selectedIndex()+"):visible a"),b.length&&b[0].focus(),this._refreshPosition(),this._trigger("open",a,this._uiHash()))},close:function(a,b){this.newelement.is(".ui-state-active")&& (this.newelement.removeClass("ui-state-active"),this.listWrap.removeClass(this.widgetBaseClass+"-open"),this.list.attr("aria-hidden",!0),this.options.style=="dropdown"&&this.newelement.removeClass("ui-corner-top").addClass("ui-corner-all"),b&&this.newelement.focus(),this._trigger("close",a,this._uiHash()))},change:function(a){this.element.trigger("change");this._trigger("change",a,this._uiHash())},select:function(a){if(this._disabled(a.currentTarget))return!1;this._trigger("select",a,this._uiHash())}, _closeOthers:function(a){d("."+this.widgetBaseClass+".ui-state-active").not(this.newelement).each(function(){d(this).data("selectelement").selectmenu("close",a)});d("."+this.widgetBaseClass+".ui-state-hover").trigger("mouseout")},_toggle:function(a,b){this.list.is("."+this.widgetBaseClass+"-open")?this.close(a,b):this.open(a)},_formatText:function(a){return this.options.format?this.options.format(a):a},_selectedIndex:function(){return this.element[0].selectedIndex},_selectedOptionLi:function(){return this._optionLis.eq(this._selectedIndex())}, _focusedOptionLi:function(){return this.list.find("."+this.widgetBaseClass+"-item-focus")},_moveSelection:function(a,b){if(!this.options.disabled){var d=parseInt(this._selectedOptionLi().data("index")||0,10)+a;d<0&&(d=0);d>this._optionLis.size()-1&&(d=this._optionLis.size()-1);if(d===b)return!1;if(this._optionLis.eq(d).hasClass(this.namespace+"-state-disabled"))a>0?++a:--a,this._moveSelection(a,d);else return this._optionLis.eq(d).trigger("mouseup")}},_moveFocus:function(a,b){var d=isNaN(a)?parseInt(this._optionLis.filter(a).data("index"), 10):parseInt(this._focusedOptionLi().data("index")||0,10)+a;d<0&&(d=0);d>this._optionLis.size()-1&&(d=this._optionLis.size()-1);if(d===b)return!1;var f=this.widgetBaseClass+"-item-"+Math.round(Math.random()*1E3);this._focusedOptionLi().find("a:eq(0)").attr("id","");this._optionLis.eq(d).hasClass(this.namespace+"-state-disabled")?(a>0?++a:--a,this._moveFocus(a,d)):this._optionLis.eq(d).find("a:eq(0)").attr("id",f).focus();this.list.attr("aria-activedescendant",f)},_scrollPage:function(a){var b=Math.floor(this.list.outerHeight()/ this.list.find("li:first").outerHeight());this._moveFocus(a=="up"?-b:b)},_setOption:function(a,b){this.options[a]=b;a=="disabled"&&(this.close(),this.element.add(this.newelement).add(this.list)[b?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",b))},disable:function(a,b){typeof a=="undefined"?this._setOption("disabled",!0):b=="optgroup"?this._disableOptgroup(a):this._disableOption(a)},enable:function(a,b){typeof a=="undefined"?this._setOption("disabled", !1):b=="optgroup"?this._enableOptgroup(a):this._enableOption(a)},_disabled:function(a){return d(a).hasClass(this.namespace+"-state-disabled")},_disableOption:function(a){var b=this._optionLis.eq(a);b&&(b.addClass(this.namespace+"-state-disabled").find("a").attr("aria-disabled",!0),this.element.find("option").eq(a).attr("disabled","disabled"))},_enableOption:function(a){var b=this._optionLis.eq(a);b&&(b.removeClass(this.namespace+"-state-disabled").find("a").attr("aria-disabled",!1),this.element.find("option").eq(a).removeAttr("disabled"))}, _disableOptgroup:function(a){var b=this.list.find("li."+this.widgetBaseClass+"-group-"+a);b&&(b.addClass(this.namespace+"-state-disabled").attr("aria-disabled",!0),this.element.find("optgroup").eq(a).attr("disabled","disabled"))},_enableOptgroup:function(a){var b=this.list.find("li."+this.widgetBaseClass+"-group-"+a);b&&(b.removeClass(this.namespace+"-state-disabled").attr("aria-disabled",!1),this.element.find("optgroup").eq(a).removeAttr("disabled"))},index:function(a){if(arguments.length)if(this._disabled(d(this._optionLis[a])))return!1; else this.element[0].selectedIndex=a,this._refreshValue();else return this._selectedIndex()},value:function(a){if(arguments.length)this.element[0].value=a,this._refreshValue();else return this.element[0].value},_refreshValue:function(){var a=this.options.style=="popup"?" ui-state-active":"",b=this.widgetBaseClass+"-item-"+Math.round(Math.random()*1E3);this.list.find("."+this.widgetBaseClass+"-item-selected").removeClass(this.widgetBaseClass+"-item-selected"+a).find("a").attr("aria-selected","false").attr("id", "");this._selectedOptionLi().addClass(this.widgetBaseClass+"-item-selected"+a).find("a").attr("aria-selected","true").attr("id",b);var a=this.newelement.data("optionClasses")?this.newelement.data("optionClasses"):"",d=this._selectedOptionLi().data("optionClasses")?this._selectedOptionLi().data("optionClasses"):"";this.newelement.removeClass(a).data("optionClasses",d).addClass(d).find("."+this.widgetBaseClass+"-status").html(this._selectedOptionLi().find("a:eq(0)").html());this.list.attr("aria-activedescendant", b)},_refreshPosition:function(){var a=this.options;if(a.style=="popup"&&!a.positionOptions.offset)var b=this._selectedOptionLi(),b="0 -"+(b.outerHeight()+b.offset().top-this.list.offset().top);var d=this.element.zIndex();d&&this.listWrap.css("zIndex",d);this.listWrap.position({of:a.positionOptions.of||this.newelement,my:a.positionOptions.my,at:a.positionOptions.at,offset:a.positionOptions.offset||b,collision:a.positionOptions.collision||"flip"})}})})(jQuery); (function(d){d.widget("ui.slider",d.ui.mouse,{widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null},_create:function(){var a=this,b=this.options,e=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),f=b.values&&b.values.length||1,h=[];this._mouseSliding=this._keySliding=!1;this._animateOff=!0;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+ this.orientation+" ui-widget ui-widget-content ui-corner-all"+(b.disabled?" ui-slider-disabled ui-disabled":""));this.range=d([]);if(b.range){if(b.range===!0){if(!b.values)b.values=[this._valueMin(),this._valueMin()];if(b.values.length&&b.values.length!==2)b.values=[b.values[0],b.values[0]]}this.range=d("<div></div>").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(b.range==="min"||b.range==="max"?" ui-slider-range-"+b.range:""))}for(var g=e.length;g<f;g+=1)h.push("<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>"); this.handles=e.add(d(h.join("")).appendTo(a.element));this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(a){a.preventDefault()}).hover(function(){b.disabled||d(this).addClass("ui-state-hover")},function(){d(this).removeClass("ui-state-hover")}).focus(function(){b.disabled?d(this).blur():(d(".ui-slider .ui-state-focus").removeClass("ui-state-focus"),d(this).addClass("ui-state-focus"))}).blur(function(){d(this).removeClass("ui-state-focus")});this.handles.each(function(a){d(this).data("index.ui-slider-handle", a)});this.handles.keydown(function(b){var e=!0,f=d(this).data("index.ui-slider-handle"),h,g,o;if(!a.options.disabled){switch(b.keyCode){case d.ui.keyCode.HOME:case d.ui.keyCode.END:case d.ui.keyCode.PAGE_UP:case d.ui.keyCode.PAGE_DOWN:case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:if(e=!1,!a._keySliding&&(a._keySliding=!0,d(this).addClass("ui-state-active"),h=a._start(b,f),h===!1))return}o=a.options.step;h=a.options.values&&a.options.values.length?g=a.values(f): g=a.value();switch(b.keyCode){case d.ui.keyCode.HOME:g=a._valueMin();break;case d.ui.keyCode.END:g=a._valueMax();break;case d.ui.keyCode.PAGE_UP:g=a._trimAlignValue(h+(a._valueMax()-a._valueMin())/5);break;case d.ui.keyCode.PAGE_DOWN:g=a._trimAlignValue(h-(a._valueMax()-a._valueMin())/5);break;case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:if(h===a._valueMax())return;g=a._trimAlignValue(h+o);break;case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:if(h===a._valueMin())return;g=a._trimAlignValue(h-o)}a._slide(b, f,g);return e}}).keyup(function(b){var e=d(this).data("index.ui-slider-handle");if(a._keySliding)a._keySliding=!1,a._stop(b,e),a._change(b,e),d(this).removeClass("ui-state-active")});this._refreshValue();this._animateOff=!1},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy();return this},_mouseCapture:function(a){var b= this.options,e,f,h,g,i;if(b.disabled)return!1;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();e=this._normValueFromMouse({x:a.pageX,y:a.pageY});f=this._valueMax()-this._valueMin()+1;g=this;this.handles.each(function(a){var b=Math.abs(e-g.values(a));f>b&&(f=b,h=d(this),i=a)});b.range===!0&&this.values(1)===b.min&&(i+=1,h=d(this.handles[i]));if(this._start(a,i)===!1)return!1;this._mouseSliding=!0;g._handleIndex=i;h.addClass("ui-state-active").focus(); b=h.offset();this._clickOffset=!d(a.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:a.pageX-b.left-h.width()/2,top:a.pageY-b.top-h.height()/2-(parseInt(h.css("borderTopWidth"),10)||0)-(parseInt(h.css("borderBottomWidth"),10)||0)+(parseInt(h.css("marginTop"),10)||0)};this.handles.hasClass("ui-state-hover")||this._slide(a,i,e);return this._animateOff=!0},_mouseStart:function(){return!0},_mouseDrag:function(a){var b=this._normValueFromMouse({x:a.pageX,y:a.pageY});this._slide(a, this._handleIndex,b);return!1},_mouseStop:function(a){this.handles.removeClass("ui-state-active");this._mouseSliding=!1;this._stop(a,this._handleIndex);this._change(a,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=!1},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(a){var b;this.orientation==="horizontal"?(b=this.elementSize.width,a=a.x-this.elementOffset.left-(this._clickOffset? this._clickOffset.left:0)):(b=this.elementSize.height,a=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0));b=a/b;b>1&&(b=1);b<0&&(b=0);this.orientation==="vertical"&&(b=1-b);a=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+b*a)},_start:function(a,b){var d={handle:this.handles[b],value:this.value()};if(this.options.values&&this.options.values.length)d.value=this.values(b),d.values=this.values();return this._trigger("start",a,d)},_slide:function(a, b,d){var f;if(this.options.values&&this.options.values.length){f=this.values(b?0:1);if(this.options.values.length===2&&this.options.range===!0&&(b===0&&d>f||b===1&&d<f))d=f;d!==this.values(b)&&(f=this.values(),f[b]=d,a=this._trigger("slide",a,{handle:this.handles[b],value:d,values:f}),this.values(b?0:1),a!==!1&&this.values(b,d,!0))}else d!==this.value()&&(a=this._trigger("slide",a,{handle:this.handles[b],value:d}),a!==!1&&this.value(d))},_stop:function(a,b){var d={handle:this.handles[b],value:this.value()}; if(this.options.values&&this.options.values.length)d.value=this.values(b),d.values=this.values();this._trigger("stop",a,d)},_change:function(a,b){if(!this._keySliding&&!this._mouseSliding){var d={handle:this.handles[b],value:this.value()};if(this.options.values&&this.options.values.length)d.value=this.values(b),d.values=this.values();this._trigger("change",a,d)}},value:function(a){if(arguments.length)this.options.value=this._trimAlignValue(a),this._refreshValue(),this._change(null,0);else return this._value()}, values:function(a,b){var e,f,h;if(arguments.length>1)this.options.values[a]=this._trimAlignValue(b),this._refreshValue(),this._change(null,a);else if(arguments.length)if(d.isArray(arguments[0])){e=this.options.values;f=arguments[0];for(h=0;h<e.length;h+=1)e[h]=this._trimAlignValue(f[h]),this._change(null,h);this._refreshValue()}else return this.options.values&&this.options.values.length?this._values(a):this.value();else return this._values()},_setOption:function(a,b){var e,f=0;if(d.isArray(this.options.values))f= this.options.values.length;d.Widget.prototype._setOption.apply(this,arguments);switch(a){case "disabled":b?(this.handles.filter(".ui-state-focus").blur(),this.handles.removeClass("ui-state-hover"),this.handles.propAttr("disabled",!0),this.element.addClass("ui-disabled")):(this.handles.propAttr("disabled",!1),this.element.removeClass("ui-disabled"));break;case "orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation); this._refreshValue();break;case "value":this._animateOff=!0;this._refreshValue();this._change(null,0);this._animateOff=!1;break;case "values":this._animateOff=!0;this._refreshValue();for(e=0;e<f;e+=1)this._change(null,e);this._animateOff=!1}},_value:function(){var a=this.options.value;return a=this._trimAlignValue(a)},_values:function(a){var b,d;if(arguments.length)b=this.options.values[a],b=this._trimAlignValue(b);else{b=this.options.values.slice();for(d=0;d<b.length;d+=1)b[d]=this._trimAlignValue(b[d])}return b}, _trimAlignValue:function(a){if(a<=this._valueMin())return this._valueMin();if(a>=this._valueMax())return this._valueMax();var b=this.options.step>0?this.options.step:1,d=(a-this._valueMin())%b;a-=d;Math.abs(d)*2>=b&&(a+=d>0?b:-b);return parseFloat(a.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var a=this.options.range,b=this.options,e=this,f=!this._animateOff?b.animate:!1,h,g={},i,j,k,l;if(this.options.values&&this.options.values.length)this.handles.each(function(a){h= (e.values(a)-e._valueMin())/(e._valueMax()-e._valueMin())*100;g[e.orientation==="horizontal"?"left":"bottom"]=h+"%";d(this).stop(1,1)[f?"animate":"css"](g,b.animate);if(e.options.range===!0)if(e.orientation==="horizontal"){if(a===0)e.range.stop(1,1)[f?"animate":"css"]({left:h+"%"},b.animate);if(a===1)e.range[f?"animate":"css"]({width:h-i+"%"},{queue:!1,duration:b.animate})}else{if(a===0)e.range.stop(1,1)[f?"animate":"css"]({bottom:h+"%"},b.animate);if(a===1)e.range[f?"animate":"css"]({height:h-i+ "%"},{queue:!1,duration:b.animate})}i=h});else{j=this.value();k=this._valueMin();l=this._valueMax();h=l!==k?(j-k)/(l-k)*100:0;g[e.orientation==="horizontal"?"left":"bottom"]=h+"%";this.handle.stop(1,1)[f?"animate":"css"](g,b.animate);if(a==="min"&&this.orientation==="horizontal")this.range.stop(1,1)[f?"animate":"css"]({width:h+"%"},b.animate);if(a==="max"&&this.orientation==="horizontal")this.range[f?"animate":"css"]({width:100-h+"%"},{queue:!1,duration:b.animate});if(a==="min"&&this.orientation=== "vertical")this.range.stop(1,1)[f?"animate":"css"]({height:h+"%"},b.animate);if(a==="max"&&this.orientation==="vertical")this.range[f?"animate":"css"]({height:100-h+"%"},{queue:!1,duration:b.animate})}}});d.extend(d.ui.slider,{version:"1.8.16"})})(jQuery); (function(d){d.widget("ui.sortable",d.ui.mouse,{widgetEventPrefix:"sort",options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1E3},_create:function(){var a=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh(); this.floating=this.items.length?a.axis==="x"||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):!1;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var a=this.items.length-1;a>=0;a--)this.items[a].item.removeData("sortable-item");return this},_setOption:function(a,b){a==="disabled"?(this.options[a]= b,this.widget()[b?"addClass":"removeClass"]("ui-sortable-disabled")):d.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(a,b){if(this.reverting)return!1;if(this.options.disabled||this.options.type=="static")return!1;this._refreshItems(a);var e=null,f=this;d(a.target).parents().each(function(){if(d.data(this,"sortable-item")==f)return e=d(this),!1});d.data(a.target,"sortable-item")==f&&(e=d(a.target));if(!e)return!1;if(this.options.handle&&!b){var h=!1;d(this.options.handle, e).find("*").andSelf().each(function(){this==a.target&&(h=!0)});if(!h)return!1}this.currentItem=e;this._removeCurrentsFromItems();return!0},_mouseStart:function(a,b,e){b=this.options;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(a);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position", "absolute");this.cssPosition=this.helper.css("position");d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};this.helper[0]!=this.currentItem[0]&&this.currentItem.hide(); this._createPlaceholder();b.containment&&this._setContainment();if(b.cursor){if(d("body").css("cursor"))this._storedCursor=d("body").css("cursor");d("body").css("cursor",b.cursor)}if(b.opacity){if(this.helper.css("opacity"))this._storedOpacity=this.helper.css("opacity");this.helper.css("opacity",b.opacity)}if(b.zIndex){if(this.helper.css("zIndex"))this._storedZIndex=this.helper.css("zIndex");this.helper.css("zIndex",b.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML")this.overflowOffset= this.scrollParent.offset();this._trigger("start",a,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!e)for(e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("activate",a,this._uiHash(this));if(d.ui.ddmanager)d.ui.ddmanager.current=this;d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.dragging=!0;this.helper.addClass("ui-sortable-helper");this._mouseDrag(a);return!0},_mouseDrag:function(a){this.position=this._generatePosition(a); this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs)this.lastPositionAbs=this.positionAbs;if(this.options.scroll){var b=this.options,e=!1;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-a.pageY<b.scrollSensitivity)this.scrollParent[0].scrollTop=e=this.scrollParent[0].scrollTop+b.scrollSpeed;else if(a.pageY-this.overflowOffset.top<b.scrollSensitivity)this.scrollParent[0].scrollTop=e=this.scrollParent[0].scrollTop- b.scrollSpeed;if(this.overflowOffset.left+this.scrollParent[0].offsetWidth-a.pageX<b.scrollSensitivity)this.scrollParent[0].scrollLeft=e=this.scrollParent[0].scrollLeft+b.scrollSpeed;else if(a.pageX-this.overflowOffset.left<b.scrollSensitivity)this.scrollParent[0].scrollLeft=e=this.scrollParent[0].scrollLeft-b.scrollSpeed}else a.pageY-d(document).scrollTop()<b.scrollSensitivity?e=d(document).scrollTop(d(document).scrollTop()-b.scrollSpeed):d(window).height()-(a.pageY-d(document).scrollTop())<b.scrollSensitivity&& (e=d(document).scrollTop(d(document).scrollTop()+b.scrollSpeed)),a.pageX-d(document).scrollLeft()<b.scrollSensitivity?e=d(document).scrollLeft(d(document).scrollLeft()-b.scrollSpeed):d(window).width()-(a.pageX-d(document).scrollLeft())<b.scrollSensitivity&&(e=d(document).scrollLeft(d(document).scrollLeft()+b.scrollSpeed));e!==!1&&d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a)}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left= this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";for(b=this.items.length-1;b>=0;b--){var e=this.items[b],f=e.item[0],h=this._intersectsWithPointer(e);if(h&&f!=this.currentItem[0]&&this.placeholder[h==1?"next":"prev"]()[0]!=f&&!d.ui.contains(this.placeholder[0],f)&&(this.options.type=="semi-dynamic"?!d.ui.contains(this.element[0],f):1)){this.direction=h==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(e))this._rearrange(a, e);else break;this._trigger("change",a,this._uiHash());break}}this._contactContainers(a);d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);this._trigger("sort",a,this._uiHash());this.lastPositionAbs=this.positionAbs;return!1},_mouseStop:function(a,b){if(a){d.ui.ddmanager&&!this.options.dropBehaviour&&d.ui.ddmanager.drop(this,a);if(this.options.revert){var e=this,f=e.placeholder.offset();e.reverting=!0;d(this.helper).animate({left:f.left-this.offset.parent.left-e.margins.left+(this.offsetParent[0]==document.body? 0:this.offsetParent[0].scrollLeft),top:f.top-this.offset.parent.top-e.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){e._clear(a)})}else this._clear(a,b);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null});this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var a=this.containers.length-1;a>=0;a--)if(this.containers[a]._trigger("deactivate", null,this._uiHash(this)),this.containers[a].containerCache.over)this.containers[a]._trigger("out",null,this._uiHash(this)),this.containers[a].containerCache.over=0}this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),d.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?d(this.domPosition.prev).after(this.currentItem): d(this.domPosition.parent).prepend(this.currentItem));return this},serialize:function(a){var b=this._getItemsAsjQuery(a&&a.connected),e=[],a=a||{};d(b).each(function(){var b=(d(a.item||this).attr(a.attribute||"id")||"").match(a.expression||/(.+)[-=_](.+)/);b&&e.push((a.key||b[1]+"[]")+"="+(a.key&&a.expression?b[1]:b[2]))});!e.length&&a.key&&e.push(a.key+"=");return e.join("&")},toArray:function(a){var b=this._getItemsAsjQuery(a&&a.connected),e=[],a=a||{};b.each(function(){e.push(d(a.item||this).attr(a.attribute|| "id")||"")});return e},_intersectsWith:function(a){var b=this.positionAbs.left,d=b+this.helperProportions.width,f=this.positionAbs.top,h=f+this.helperProportions.height,g=a.left,i=g+a.width,j=a.top,k=j+a.height,l=this.offset.click.top,m=this.offset.click.left;return this.options.tolerance=="pointer"||this.options.forcePointerForContainers||this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>a[this.floating?"width":"height"]?f+l>j&&f+l<k&&b+m>g&&b+m<i:g<b+this.helperProportions.width/ 2&&d-this.helperProportions.width/2<i&&j<f+this.helperProportions.height/2&&h-this.helperProportions.height/2<k},_intersectsWithPointer:function(a){var b=d.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,a.top,a.height),a=d.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,a.left,a.width),b=b&&a,a=this._getDragVerticalDirection(),e=this._getDragHorizontalDirection();return!b?!1:this.floating?e&&e=="right"||a=="down"?2:1:a&&(a=="down"?2:1)},_intersectsWithSides:function(a){var b= d.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,a.top+a.height/2,a.height),a=d.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,a.left+a.width/2,a.width),e=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();return this.floating&&f?f=="right"&&a||f=="left"&&!a:e&&(e=="down"&&b||e=="up"&&!b)},_getDragVerticalDirection:function(){var a=this.positionAbs.top-this.lastPositionAbs.top;return a!=0&&(a>0?"down":"up")},_getDragHorizontalDirection:function(){var a=this.positionAbs.left- this.lastPositionAbs.left;return a!=0&&(a>0?"right":"left")},refresh:function(a){this._refreshItems(a);this.refreshPositions();return this},_connectWith:function(){var a=this.options;return a.connectWith.constructor==String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(a){var b=[],e=[],f=this._connectWith();if(f&&a)for(a=f.length-1;a>=0;a--)for(var h=d(f[a]),g=h.length-1;g>=0;g--){var i=d.data(h[g],"sortable");i&&i!=this&&!i.options.disabled&&e.push([d.isFunction(i.options.items)?i.options.items.call(i.element): d(i.options.items,i.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),i])}e.push([d.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):d(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(a=e.length-1;a>=0;a--)e[a][0].each(function(){b.push(this)});return d(b)},_removeCurrentsFromItems:function(){for(var a=this.currentItem.find(":data(sortable-item)"),b=0;b<this.items.length;b++)for(var d= 0;d<a.length;d++)a[d]==this.items[b].item[0]&&this.items.splice(b,1)},_refreshItems:function(a){this.items=[];this.containers=[this];var b=this.items,e=[[d.isFunction(this.options.items)?this.options.items.call(this.element[0],a,{item:this.currentItem}):d(this.options.items,this.element),this]],f=this._connectWith();if(f)for(var h=f.length-1;h>=0;h--)for(var g=d(f[h]),i=g.length-1;i>=0;i--){var j=d.data(g[i],"sortable");j&&j!=this&&!j.options.disabled&&(e.push([d.isFunction(j.options.items)?j.options.items.call(j.element[0], a,{item:this.currentItem}):d(j.options.items,j.element),j]),this.containers.push(j))}for(h=e.length-1;h>=0;h--){a=e[h][1];f=e[h][0];i=0;for(g=f.length;i<g;i++)j=d(f[i]),j.data("sortable-item",a),b.push({item:j,instance:a,width:0,height:0,left:0,top:0})}},refreshPositions:function(a){if(this.offsetParent&&this.helper)this.offset.parent=this._getParentOffset();for(var b=this.items.length-1;b>=0;b--){var e=this.items[b];if(!(e.instance!=this.currentContainer&&this.currentContainer&&e.item[0]!=this.currentItem[0])){var f= this.options.toleranceElement?d(this.options.toleranceElement,e.item):e.item;if(!a)e.width=f.outerWidth(),e.height=f.outerHeight();f=f.offset();e.left=f.left;e.top=f.top}}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(b=this.containers.length-1;b>=0;b--)f=this.containers[b].element.offset(),this.containers[b].containerCache.left=f.left,this.containers[b].containerCache.top=f.top,this.containers[b].containerCache.width=this.containers[b].element.outerWidth(), this.containers[b].containerCache.height=this.containers[b].element.outerHeight();return this},_createPlaceholder:function(a){var b=a||this,e=b.options;if(!e.placeholder||e.placeholder.constructor==String){var f=e.placeholder;e.placeholder={element:function(){var a=d(document.createElement(b.currentItem[0].nodeName)).addClass(f||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!f)a.style.visibility="hidden";return a},update:function(a,d){if(!f||e.forcePlaceholderSize)d.height()|| d.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10)),d.width()||d.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")||0,10))}}}b.placeholder=d(e.placeholder.element.call(b.element,b.currentItem));b.currentItem.after(b.placeholder);e.placeholder.update(b,b.placeholder)},_contactContainers:function(a){for(var b=null,e=null,f=this.containers.length- 1;f>=0;f--)if(!d.ui.contains(this.currentItem[0],this.containers[f].element[0]))if(this._intersectsWith(this.containers[f].containerCache)){if(!b||!d.ui.contains(this.containers[f].element[0],b.element[0]))b=this.containers[f],e=f}else if(this.containers[f].containerCache.over)this.containers[f]._trigger("out",a,this._uiHash(this)),this.containers[f].containerCache.over=0;if(b)if(this.containers.length===1)this.containers[e]._trigger("over",a,this._uiHash(this)),this.containers[e].containerCache.over= 1;else if(this.currentContainer!=this.containers[e]){for(var b=1E4,f=null,h=this.positionAbs[this.containers[e].floating?"left":"top"],g=this.items.length-1;g>=0;g--)if(d.ui.contains(this.containers[e].element[0],this.items[g].item[0])){var i=this.items[g][this.containers[e].floating?"left":"top"];Math.abs(i-h)<b&&(b=Math.abs(i-h),f=this.items[g])}if(f||this.options.dropOnEmpty)this.currentContainer=this.containers[e],f?this._rearrange(a,f,null,!0):this._rearrange(a,null,this.containers[e].element, !0),this._trigger("change",a,this._uiHash()),this.containers[e]._trigger("change",a,this._uiHash(this)),this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[e]._trigger("over",a,this._uiHash(this)),this.containers[e].containerCache.over=1}},_createHelper:function(a){var b=this.options,a=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[a,this.currentItem])):b.helper=="clone"?this.currentItem.clone():this.currentItem;a.parents("body").length||d(b.appendTo!= "parent"?b.appendTo:this.currentItem[0].parentNode)[0].appendChild(a[0]);if(a[0]==this.currentItem[0])this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")};(a[0].style.width==""||b.forceHelperSize)&&a.width(this.currentItem.width());(a[0].style.height==""||b.forceHelperSize)&&a.height(this.currentItem.height());return a},_adjustOffsetFromHelper:function(a){typeof a== "string"&&(a=a.split(" "));d.isArray(a)&&(a={left:+a[0],top:+a[1]||0});if("left"in a)this.offset.click.left=a.left+this.margins.left;if("right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;if("top"in a)this.offset.click.top=a.top+this.margins.top;if("bottom"in a)this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var a=this.offsetParent.offset();this.cssPosition== "absolute"&&this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0])&&(a.left+=this.scrollParent.scrollLeft(),a.top+=this.scrollParent.scrollTop());if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&d.browser.msie)a={top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition== "relative"){var a=this.currentItem.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}}, _setContainment:function(){var a=this.options;if(a.containment=="parent")a.containment=this.helper[0].parentNode;if(a.containment=="document"||a.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,d(a.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(d(a.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height- this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)){var b=d(a.containment)[0],a=d(a.containment).offset(),e=d(b).css("overflow")!="hidden";this.containment=[a.left+(parseInt(d(b).css("borderLeftWidth"),10)||0)+(parseInt(d(b).css("paddingLeft"),10)||0)-this.margins.left,a.top+(parseInt(d(b).css("borderTopWidth"),10)||0)+(parseInt(d(b).css("paddingTop"),10)||0)-this.margins.top,a.left+(e?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),10)|| 0)-(parseInt(d(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,a.top+(e?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"),10)||0)-(parseInt(d(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(a,b){if(!b)b=this.position;var e=a=="absolute"?1:-1,f=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))? this.offsetParent:this.scrollParent,h=/(html|body)/i.test(f[0].tagName);return{top:b.top+this.offset.relative.top*e+this.offset.parent.top*e-(d.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():h?0:f.scrollTop())*e),left:b.left+this.offset.relative.left*e+this.offset.parent.left*e-(d.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():h?0:f.scrollLeft())*e)}},_generatePosition:function(a){var b= this.options,e=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(e[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0]))this.offset.relative=this._getRelativeOffset();var h=a.pageX,g=a.pageY;this.originalPosition&&(this.containment&&(a.pageX-this.offset.click.left<this.containment[0]&&(h=this.containment[0]+ this.offset.click.left),a.pageY-this.offset.click.top<this.containment[1]&&(g=this.containment[1]+this.offset.click.top),a.pageX-this.offset.click.left>this.containment[2]&&(h=this.containment[2]+this.offset.click.left),a.pageY-this.offset.click.top>this.containment[3]&&(g=this.containment[3]+this.offset.click.top)),b.grid&&(g=this.originalPageY+Math.round((g-this.originalPageY)/b.grid[1])*b.grid[1],g=this.containment?!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])? g:!(g-this.offset.click.top<this.containment[1])?g-b.grid[1]:g+b.grid[1]:g,h=this.originalPageX+Math.round((h-this.originalPageX)/b.grid[0])*b.grid[0],h=this.containment?!(h-this.offset.click.left<this.containment[0]||h-this.offset.click.left>this.containment[2])?h:!(h-this.offset.click.left<this.containment[0])?h-b.grid[0]:h+b.grid[0]:h));return{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(d.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop(): f?0:e.scrollTop()),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(d.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:e.scrollLeft())}},_rearrange:function(a,b,d,f){d?d[0].appendChild(this.placeholder[0]):b.item[0].parentNode.insertBefore(this.placeholder[0],this.direction=="down"?b.item[0]:b.item[0].nextSibling);this.counter=this.counter?++this.counter:1;var h=this,g=this.counter;window.setTimeout(function(){g== h.counter&&h.refreshPositions(!f)},0)},_clear:function(a,b){this.reverting=!1;var e=[];!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem);this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var f in this._storedCSS)if(this._storedCSS[f]=="auto"||this._storedCSS[f]=="static")this._storedCSS[f]="";this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();this.fromOutside&&!b&&e.push(function(a){this._trigger("receive", a,this._uiHash(this.fromOutside))});(this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!b&&e.push(function(a){this._trigger("update",a,this._uiHash())});if(!d.ui.contains(this.element[0],this.currentItem[0])){b||e.push(function(a){this._trigger("remove",a,this._uiHash())});for(f=this.containers.length-1;f>=0;f--)d.ui.contains(this.containers[f].element[0],this.currentItem[0])&&!b&&(e.push(function(a){return function(b){a._trigger("receive", b,this._uiHash(this))}}.call(this,this.containers[f])),e.push(function(a){return function(b){a._trigger("update",b,this._uiHash(this))}}.call(this,this.containers[f])))}for(f=this.containers.length-1;f>=0;f--)if(b||e.push(function(a){return function(b){a._trigger("deactivate",b,this._uiHash(this))}}.call(this,this.containers[f])),this.containers[f].containerCache.over)e.push(function(a){return function(b){a._trigger("out",b,this._uiHash(this))}}.call(this,this.containers[f])),this.containers[f].containerCache.over= 0;this._storedCursor&&d("body").css("cursor",this._storedCursor);this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);this._storedZIndex&&this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex);this.dragging=!1;if(this.cancelHelperRemoval){if(!b){this._trigger("beforeStop",a,this._uiHash());for(f=0;f<e.length;f++)e[f].call(this,a);this._trigger("stop",a,this._uiHash())}return!1}b||this._trigger("beforeStop",a,this._uiHash());this.placeholder[0].parentNode.removeChild(this.placeholder[0]); this.helper[0]!=this.currentItem[0]&&this.helper.remove();this.helper=null;if(!b){for(f=0;f<e.length;f++)e[f].call(this,a);this._trigger("stop",a,this._uiHash())}this.fromOutside=!1;return!0},_trigger:function(){d.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(a){var b=a||this;return{helper:b.helper,placeholder:b.placeholder||d([]),position:b.position,originalPosition:b.originalPosition,offset:b.positionAbs,item:b.currentItem,sender:a?a.element:null}}});d.extend(d.ui.sortable, {version:"1.8.16"})})(jQuery); (function(d,a){var b=0,e=0;d.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:!1,cookie:null,collapsible:!1,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"<div></div>",remove:null,select:null,show:null,spinner:"<em>Loading&#8230;</em>",tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"},_create:function(){this._tabify(!0)},_setOption:function(a,b){a=="selected"?this.options.collapsible&&b==this.options.selected||this.select(b): (this.options[a]=b,this._tabify())},_tabId:function(a){return a.title&&a.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+ ++b},_sanitizeSelector:function(a){return a.replace(/:/g,"\\:")},_cookie:function(){var a=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+ ++e);return d.cookie.apply(null,[a].concat(d.makeArray(arguments)))},_ui:function(a,b){return{tab:a,panel:b,index:this.anchors.index(a)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var a= d(this);a.html(a.data("label.tabs")).removeData("label.tabs")})},_tabify:function(b){function e(a,b){a.css("display","");!d.support.opacity&&b.opacity&&a[0].style.removeAttribute("filter")}var g=this,i=this.options,j=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=d(" > li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return d("a",this)[0]});this.panels=d([]);this.anchors.each(function(a,b){var e=d(b).attr("href"),f=e.split("#")[0],h;if(f&&(f===location.toString().split("#")[0]|| (h=d("base")[0])&&f===h.href))e=b.hash,b.href=e;j.test(e)?g.panels=g.panels.add(g.element.find(g._sanitizeSelector(e))):e&&e!=="#"?(d.data(b,"href.tabs",e),d.data(b,"load.tabs",e.replace(/#.*$/,"")),e=g._tabId(b),b.href="#"+e,f=g.element.find("#"+e),f.length||(f=d(i.panelTemplate).attr("id",e).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(g.panels[a-1]||g.list),f.data("destroy.tabs",!0)),g.panels=g.panels.add(f)):i.disabled.push(a)});if(b){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all"); this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(i.selected===a){location.hash&&this.anchors.each(function(a,b){if(b.hash==location.hash)return i.selected=a,!1});if(typeof i.selected!=="number"&&i.cookie)i.selected=parseInt(g._cookie(),10);if(typeof i.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length)i.selected= this.lis.index(this.lis.filter(".ui-tabs-selected"));i.selected=i.selected||(this.lis.length?0:-1)}else if(i.selected===null)i.selected=-1;i.selected=i.selected>=0&&this.anchors[i.selected]||i.selected<0?i.selected:0;i.disabled=d.unique(i.disabled.concat(d.map(this.lis.filter(".ui-state-disabled"),function(a){return g.lis.index(a)}))).sort();d.inArray(i.selected,i.disabled)!=-1&&i.disabled.splice(d.inArray(i.selected,i.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active"); i.selected>=0&&this.anchors.length&&(g.element.find(g._sanitizeSelector(g.anchors[i.selected].hash)).removeClass("ui-tabs-hide"),this.lis.eq(i.selected).addClass("ui-tabs-selected ui-state-active"),g.element.queue("tabs",function(){g._trigger("show",null,g._ui(g.anchors[i.selected],g.element.find(g._sanitizeSelector(g.anchors[i.selected].hash))[0]))}),this.load(i.selected));d(window).bind("unload",function(){g.lis.add(g.anchors).unbind(".tabs");g.lis=g.anchors=g.panels=null})}else i.selected=this.lis.index(this.lis.filter(".ui-tabs-selected")); this.element[i.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");i.cookie&&this._cookie(i.selected,i.cookie);for(var b=0,k;k=this.lis[b];b++)d(k)[d.inArray(b,i.disabled)!=-1&&!d(k).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");i.cache===!1&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(i.event!=="mouseover"){var l=function(a,b){b.is(":not(.ui-state-disabled)")&&b.addClass("ui-state-"+a)};this.lis.bind("mouseover.tabs", function(){l("hover",d(this))});this.lis.bind("mouseout.tabs",function(){d(this).removeClass("ui-state-hover")});this.anchors.bind("focus.tabs",function(){l("focus",d(this).closest("li"))});this.anchors.bind("blur.tabs",function(){d(this).closest("li").removeClass("ui-state-focus")})}var m,o;if(i.fx)d.isArray(i.fx)?(m=i.fx[0],o=i.fx[1]):m=o=i.fx;var p=o?function(a,b){d(a).closest("li").addClass("ui-tabs-selected ui-state-active");b.hide().removeClass("ui-tabs-hide").animate(o,o.duration||"normal", function(){e(b,o);g._trigger("show",null,g._ui(a,b[0]))})}:function(a,b){d(a).closest("li").addClass("ui-tabs-selected ui-state-active");b.removeClass("ui-tabs-hide");g._trigger("show",null,g._ui(a,b[0]))},n=m?function(a,b){b.animate(m,m.duration||"normal",function(){g.lis.removeClass("ui-tabs-selected ui-state-active");b.addClass("ui-tabs-hide");e(b,m);g.element.dequeue("tabs")})}:function(a,b){g.lis.removeClass("ui-tabs-selected ui-state-active");b.addClass("ui-tabs-hide");g.element.dequeue("tabs")}; this.anchors.bind(i.event+".tabs",function(){var a=this,b=d(a).closest("li"),e=g.panels.filter(":not(.ui-tabs-hide)"),f=g.element.find(g._sanitizeSelector(a.hash));if(b.hasClass("ui-tabs-selected")&&!i.collapsible||b.hasClass("ui-state-disabled")||b.hasClass("ui-state-processing")||g.panels.filter(":animated").length||g._trigger("select",null,g._ui(this,f[0]))===!1)return this.blur(),!1;i.selected=g.anchors.index(this);g.abort();if(i.collapsible)if(b.hasClass("ui-tabs-selected"))return i.selected= -1,i.cookie&&g._cookie(i.selected,i.cookie),g.element.queue("tabs",function(){n(a,e)}).dequeue("tabs"),this.blur(),!1;else if(!e.length)return i.cookie&&g._cookie(i.selected,i.cookie),g.element.queue("tabs",function(){p(a,f)}),g.load(g.anchors.index(this)),this.blur(),!1;i.cookie&&g._cookie(i.selected,i.cookie);if(f.length)e.length&&g.element.queue("tabs",function(){n(a,e)}),g.element.queue("tabs",function(){p(a,f)}),g.load(g.anchors.index(this));else throw"jQuery UI Tabs: Mismatching fragment identifier."; d.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return!1})},_getIndex:function(a){typeof a=="string"&&(a=this.anchors.index(this.anchors.filter("[href$="+a+"]")));return a},destroy:function(){var a=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var a= d.data(this,"href.tabs");if(a)this.href=a;var b=d(this).unbind(".tabs");d.each(["href","load","cache"],function(a,d){b.removeData(d+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){d.data(this,"destroy.tabs")?d(this).remove():d(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});a.cookie&&this._cookie(null,a.cookie);return this},add:function(b, e,g){if(g===a)g=this.anchors.length;var i=this,j=this.options,e=d(j.tabTemplate.replace(/#\{href\}/g,b).replace(/#\{label\}/g,e)),b=!b.indexOf("#")?b.replace("#",""):this._tabId(d("a",e)[0]);e.addClass("ui-state-default ui-corner-top").data("destroy.tabs",!0);var k=i.element.find("#"+b);k.length||(k=d(j.panelTemplate).attr("id",b).data("destroy.tabs",!0));k.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");g>=this.lis.length?(e.appendTo(this.list),k.appendTo(this.list[0].parentNode)): (e.insertBefore(this.lis[g]),k.insertBefore(this.panels[g]));j.disabled=d.map(j.disabled,function(a){return a>=g?++a:a});this._tabify();if(this.anchors.length==1)j.selected=0,e.addClass("ui-tabs-selected ui-state-active"),k.removeClass("ui-tabs-hide"),this.element.queue("tabs",function(){i._trigger("show",null,i._ui(i.anchors[0],i.panels[0]))}),this.load(0);this._trigger("add",null,this._ui(this.anchors[g],this.panels[g]));return this},remove:function(a){var a=this._getIndex(a),b=this.options,e=this.lis.eq(a).remove(), i=this.panels.eq(a).remove();e.hasClass("ui-tabs-selected")&&this.anchors.length>1&&this.select(a+(a+1<this.anchors.length?1:-1));b.disabled=d.map(d.grep(b.disabled,function(b){return b!=a}),function(b){return b>=a?--b:b});this._tabify();this._trigger("remove",null,this._ui(e.find("a")[0],i[0]));return this},enable:function(a){var a=this._getIndex(a),b=this.options;if(d.inArray(a,b.disabled)!=-1)return this.lis.eq(a).removeClass("ui-state-disabled"),b.disabled=d.grep(b.disabled,function(b){return b!= a}),this._trigger("enable",null,this._ui(this.anchors[a],this.panels[a])),this},disable:function(a){var a=this._getIndex(a),b=this.options;a!=b.selected&&(this.lis.eq(a).addClass("ui-state-disabled"),b.disabled.push(a),b.disabled.sort(),this._trigger("disable",null,this._ui(this.anchors[a],this.panels[a])));return this},select:function(a){a=this._getIndex(a);if(a==-1)if(this.options.collapsible&&this.options.selected!=-1)a=this.options.selected;else return this;this.anchors.eq(a).trigger(this.options.event+ ".tabs");return this},load:function(a){var a=this._getIndex(a),b=this,e=this.options,i=this.anchors.eq(a)[0],j=d.data(i,"load.tabs");this.abort();if(!j||this.element.queue("tabs").length!==0&&d.data(i,"cache.tabs"))this.element.dequeue("tabs");else{this.lis.eq(a).addClass("ui-state-processing");if(e.spinner){var k=d("span",i);k.data("label.tabs",k.html()).html(e.spinner)}this.xhr=d.ajax(d.extend({},e.ajaxOptions,{url:j,success:function(j,m){b.element.find(b._sanitizeSelector(i.hash)).html(j);b._cleanup(); e.cache&&d.data(i,"cache.tabs",!0);b._trigger("load",null,b._ui(b.anchors[a],b.panels[a]));try{e.ajaxOptions.success(j,m)}catch(o){}},error:function(d,j){b._cleanup();b._trigger("load",null,b._ui(b.anchors[a],b.panels[a]));try{e.ajaxOptions.error(d,j,a,i)}catch(o){}}}));b.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(!1,!0);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));this.xhr&&(this.xhr.abort(),delete this.xhr);this._cleanup(); return this},url:function(a,b){this.anchors.eq(a).removeData("cache.tabs").data("load.tabs",b);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.16"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(a,b){var d=this,e=this.options,j=d._rotate||(d._rotate=function(b){clearTimeout(d.rotation);d.rotation=setTimeout(function(){var a=e.selected;d.select(++a<d.anchors.length?a:0)},a);b&&b.stopPropagation()}),k=d._unrotate||(d._unrotate=!b?function(a){a.clientX&& d.rotate(null)}:function(){t=e.selected;j()});a?(this.element.bind("tabsshow",j),this.anchors.bind(e.event+".tabs",k),j()):(clearTimeout(d.rotation),this.element.unbind("tabsshow",j),this.anchors.unbind(e.event+".tabs",k),delete this._rotate,delete this._unrotate);return this}})})(jQuery); jQuery.effects||function(d,a){function b(a){var b;return a&&a.constructor==Array&&a.length==3?a:(b=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(a))?[parseInt(b[1],10),parseInt(b[2],10),parseInt(b[3],10)]:(b=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(a))?[parseFloat(b[1])*2.55,parseFloat(b[2])*2.55,parseFloat(b[3])*2.55]:(b=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(a))?[parseInt(b[1],16),parseInt(b[2], 16),parseInt(b[3],16)]:(b=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(a))?[parseInt(b[1]+b[1],16),parseInt(b[2]+b[2],16),parseInt(b[3]+b[3],16)]:/rgba\(0, 0, 0, 0\)/.exec(a)?j.transparent:j[d.trim(a).toLowerCase()]}function e(){var a=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,b={},d,e;if(a&&a.length&&a[0]&&a[a[0]])for(var f=a.length;f--;)d=a[f],typeof a[d]=="string"&&(e=d.replace(/\-(\w)/g,function(a,b){return b.toUpperCase()}),b[e]=a[d]);else for(d in a)typeof a[d]=== "string"&&(b[d]=a[d]);return b}function f(a){var b,e;for(b in a)e=a[b],(e==null||d.isFunction(e)||b in l||/scrollbar/.test(b)||!/color/i.test(b)&&isNaN(parseFloat(e)))&&delete a[b];return a}function h(a,b){var d={_:0},e;for(e in b)a[e]!=b[e]&&(d[e]=b[e]);return d}function g(a,b,e,f){if(typeof a=="object")f=b,e=null,b=a,a=b.effect;d.isFunction(b)&&(f=b,e=null,b={});if(typeof b=="number"||d.fx.speeds[b])f=e,e=b,b={};d.isFunction(e)&&(f=e,e=null);b=b||{};e=e||b.duration;e=d.fx.off?0:typeof e=="number"? e:e in d.fx.speeds?d.fx.speeds[e]:d.fx.speeds._default;f=f||b.complete;return[a,b,e,f]}function i(a){return!a||typeof a==="number"||d.fx.speeds[a]?!0:typeof a==="string"&&!d.effects[a]?!0:!1}d.effects={};d.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","borderColor","color","outlineColor"],function(a,e){d.fx.step[e]=function(a){if(!a.colorInit){var f;f=a.elem;var g=e,h;do{h=d.curCSS(f,g);if(h!=""&&h!="transparent"||d.nodeName(f,"body"))break;g="backgroundColor"}while(f= f.parentNode);f=b(h);a.start=f;a.end=b(a.end);a.colorInit=!0}a.elem.style[e]="rgb("+Math.max(Math.min(parseInt(a.pos*(a.end[0]-a.start[0])+a.start[0],10),255),0)+","+Math.max(Math.min(parseInt(a.pos*(a.end[1]-a.start[1])+a.start[1],10),255),0)+","+Math.max(Math.min(parseInt(a.pos*(a.end[2]-a.start[2])+a.start[2],10),255),0)+")"}});var j={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139], darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255], maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},k=["add","remove","toggle"],l={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};d.effects.animateClass=function(a,b,g,i){d.isFunction(g)&&(i=g,g=null);return this.queue(function(){var j=d(this),l=j.attr("style")|| " ",x=f(e.call(this)),q,w=j.attr("class");d.each(k,function(b,d){if(a[d])j[d+"Class"](a[d])});q=f(e.call(this));j.attr("class",w);j.animate(h(x,q),{queue:!1,duration:b,easing:g,complete:function(){d.each(k,function(b,d){if(a[d])j[d+"Class"](a[d])});typeof j.attr("style")=="object"?(j.attr("style").cssText="",j.attr("style").cssText=l):j.attr("style",l);i&&i.apply(this,arguments);d.dequeue(this)}})})};d.fn.extend({_addClass:d.fn.addClass,addClass:function(a,b,e,f){return b?d.effects.animateClass.apply(this, [{add:a},b,e,f]):this._addClass(a)},_removeClass:d.fn.removeClass,removeClass:function(a,b,e,f){return b?d.effects.animateClass.apply(this,[{remove:a},b,e,f]):this._removeClass(a)},_toggleClass:d.fn.toggleClass,toggleClass:function(b,e,f,g,h){return typeof e=="boolean"||e===a?f?d.effects.animateClass.apply(this,[e?{add:b}:{remove:b},f,g,h]):this._toggleClass(b,e):d.effects.animateClass.apply(this,[{toggle:b},e,f,g])},switchClass:function(a,b,e,f,g){return d.effects.animateClass.apply(this,[{add:b, remove:a},e,f,g])}});d.extend(d.effects,{version:"1.8.16",save:function(a,b){for(var d=0;d<b.length;d++)b[d]!==null&&a.data("ec.storage."+b[d],a[0].style[b[d]])},restore:function(a,b){for(var d=0;d<b.length;d++)b[d]!==null&&a.css(b[d],a.data("ec.storage."+b[d]))},setMode:function(a,b){b=="toggle"&&(b=a.is(":hidden")?"show":"hide");return b},getBaseline:function(a,b){var d,e;switch(a[0]){case "top":d=0;break;case "middle":d=0.5;break;case "bottom":d=1;break;default:d=a[0]/b.height}switch(a[1]){case "left":e= 0;break;case "center":e=0.5;break;case "right":e=1;break;default:e=a[1]/b.width}return{x:e,y:d}},createWrapper:function(a){if(a.parent().is(".ui-effects-wrapper"))return a.parent();var b={width:a.outerWidth(!0),height:a.outerHeight(!0),"float":a.css("float")},e=d("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),f=document.activeElement;a.wrap(e);(a[0]===f||d.contains(a[0],f))&&d(f).focus();e=a.parent();a.css("position")== "static"?(e.css({position:"relative"}),a.css({position:"relative"})):(d.extend(b,{position:a.css("position"),zIndex:a.css("z-index")}),d.each(["top","left","bottom","right"],function(d,e){b[e]=a.css(e);isNaN(parseInt(b[e],10))&&(b[e]="auto")}),a.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"}));return e.css(b).show()},removeWrapper:function(a){var b,e=document.activeElement;return a.parent().is(".ui-effects-wrapper")?(b=a.parent().replaceWith(a),(a[0]===e||d.contains(a[0],e))&&d(e).focus(), b):a},setTransition:function(a,b,e,f){f=f||{};d.each(b,function(b,d){unit=a.cssUnit(d);unit[0]>0&&(f[d]=unit[0]*e+unit[1])});return f}});d.fn.extend({effect:function(a,b,e,f){var h=g.apply(this,arguments),i={options:h[1],duration:h[2],callback:h[3]},h=i.options.mode,j=d.effects[a];return d.fx.off||!j?h?this[h](i.duration,i.callback):this.each(function(){i.callback&&i.callback.call(this)}):j.call(this,i)},_show:d.fn.show,show:function(a){if(i(a))return this._show.apply(this,arguments);else{var b=g.apply(this, arguments);b[1].mode="show";return this.effect.apply(this,b)}},_hide:d.fn.hide,hide:function(a){if(i(a))return this._hide.apply(this,arguments);else{var b=g.apply(this,arguments);b[1].mode="hide";return this.effect.apply(this,b)}},__toggle:d.fn.toggle,toggle:function(a){if(i(a)||typeof a==="boolean"||d.isFunction(a))return this.__toggle.apply(this,arguments);else{var b=g.apply(this,arguments);b[1].mode="toggle";return this.effect.apply(this,b)}},cssUnit:function(a){var b=this.css(a),e=[];d.each(["em", "px","%","pt"],function(a,d){b.indexOf(d)>0&&(e=[parseFloat(b),d])});return e}});d.easing.jswing=d.easing.swing;d.extend(d.easing,{def:"easeOutQuad",swing:function(a,b,e,f,g){return d.easing[d.easing.def](a,b,e,f,g)},easeInQuad:function(a,b,d,e,f){return e*(b/=f)*b+d},easeOutQuad:function(a,b,d,e,f){return-e*(b/=f)*(b-2)+d},easeInOutQuad:function(a,b,d,e,f){return(b/=f/2)<1?e/2*b*b+d:-e/2*(--b*(b-2)-1)+d},easeInCubic:function(a,b,d,e,f){return e*(b/=f)*b*b+d},easeOutCubic:function(a,b,d,e,f){return e* ((b=b/f-1)*b*b+1)+d},easeInOutCubic:function(a,b,d,e,f){return(b/=f/2)<1?e/2*b*b*b+d:e/2*((b-=2)*b*b+2)+d},easeInQuart:function(a,b,d,e,f){return e*(b/=f)*b*b*b+d},easeOutQuart:function(a,b,d,e,f){return-e*((b=b/f-1)*b*b*b-1)+d},easeInOutQuart:function(a,b,d,e,f){return(b/=f/2)<1?e/2*b*b*b*b+d:-e/2*((b-=2)*b*b*b-2)+d},easeInQuint:function(a,b,d,e,f){return e*(b/=f)*b*b*b*b+d},easeOutQuint:function(a,b,d,e,f){return e*((b=b/f-1)*b*b*b*b+1)+d},easeInOutQuint:function(a,b,d,e,f){return(b/=f/2)<1?e/2* b*b*b*b*b+d:e/2*((b-=2)*b*b*b*b+2)+d},easeInSine:function(a,b,d,e,f){return-e*Math.cos(b/f*(Math.PI/2))+e+d},easeOutSine:function(a,b,d,e,f){return e*Math.sin(b/f*(Math.PI/2))+d},easeInOutSine:function(a,b,d,e,f){return-e/2*(Math.cos(Math.PI*b/f)-1)+d},easeInExpo:function(a,b,d,e,f){return b==0?d:e*Math.pow(2,10*(b/f-1))+d},easeOutExpo:function(a,b,d,e,f){return b==f?d+e:e*(-Math.pow(2,-10*b/f)+1)+d},easeInOutExpo:function(a,b,d,e,f){return b==0?d:b==f?d+e:(b/=f/2)<1?e/2*Math.pow(2,10*(b-1))+d:e/ 2*(-Math.pow(2,-10*--b)+2)+d},easeInCirc:function(a,b,d,e,f){return-e*(Math.sqrt(1-(b/=f)*b)-1)+d},easeOutCirc:function(a,b,d,e,f){return e*Math.sqrt(1-(b=b/f-1)*b)+d},easeInOutCirc:function(a,b,d,e,f){return(b/=f/2)<1?-e/2*(Math.sqrt(1-b*b)-1)+d:e/2*(Math.sqrt(1-(b-=2)*b)+1)+d},easeInElastic:function(a,b,d,e,f){var a=1.70158,g=0,h=e;if(b==0)return d;if((b/=f)==1)return d+e;g||(g=f*0.3);h<Math.abs(e)?(h=e,a=g/4):a=g/(2*Math.PI)*Math.asin(e/h);return-(h*Math.pow(2,10*(b-=1))*Math.sin((b*f-a)*2*Math.PI/ g))+d},easeOutElastic:function(a,b,d,e,f){var a=1.70158,g=0,h=e;if(b==0)return d;if((b/=f)==1)return d+e;g||(g=f*0.3);h<Math.abs(e)?(h=e,a=g/4):a=g/(2*Math.PI)*Math.asin(e/h);return h*Math.pow(2,-10*b)*Math.sin((b*f-a)*2*Math.PI/g)+e+d},easeInOutElastic:function(a,b,d,e,f){var a=1.70158,g=0,h=e;if(b==0)return d;if((b/=f/2)==2)return d+e;g||(g=f*0.3*1.5);h<Math.abs(e)?(h=e,a=g/4):a=g/(2*Math.PI)*Math.asin(e/h);return b<1?-0.5*h*Math.pow(2,10*(b-=1))*Math.sin((b*f-a)*2*Math.PI/g)+d:h*Math.pow(2,-10* (b-=1))*Math.sin((b*f-a)*2*Math.PI/g)*0.5+e+d},easeInBack:function(b,d,e,f,g,h){h==a&&(h=1.70158);return f*(d/=g)*d*((h+1)*d-h)+e},easeOutBack:function(b,d,e,f,g,h){h==a&&(h=1.70158);return f*((d=d/g-1)*d*((h+1)*d+h)+1)+e},easeInOutBack:function(b,d,e,f,h,g){g==a&&(g=1.70158);return(d/=h/2)<1?f/2*d*d*(((g*=1.525)+1)*d-g)+e:f/2*((d-=2)*d*(((g*=1.525)+1)*d+g)+2)+e},easeInBounce:function(a,b,e,f,g){return f-d.easing.easeOutBounce(a,g-b,0,f,g)+e},easeOutBounce:function(a,b,d,e,f){return(b/=f)<1/2.75? e*7.5625*b*b+d:b<2/2.75?e*(7.5625*(b-=1.5/2.75)*b+0.75)+d:b<2.5/2.75?e*(7.5625*(b-=2.25/2.75)*b+0.9375)+d:e*(7.5625*(b-=2.625/2.75)*b+0.984375)+d},easeInOutBounce:function(a,b,e,f,g){return b<g/2?d.easing.easeInBounce(a,b*2,0,f,g)*0.5+e:d.easing.easeOutBounce(a,b*2-g,0,f,g)*0.5+f*0.5+e}})}(jQuery); (function(d){d.effects.blind=function(a){return this.queue(function(){var b=d(this),e=["position","top","bottom","left","right"],f=d.effects.setMode(b,a.options.mode||"hide"),h=a.options.direction||"vertical";d.effects.save(b,e);b.show();var g=d.effects.createWrapper(b).css({overflow:"hidden"}),i=h=="vertical"?"height":"width",h=h=="vertical"?g.height():g.width();f=="show"&&g.css(i,0);var j={};j[i]=f=="show"?h:0;g.animate(j,a.duration,a.options.easing,function(){f=="hide"&&b.hide();d.effects.restore(b, e);d.effects.removeWrapper(b);a.callback&&a.callback.apply(b[0],arguments);b.dequeue()})})}})(jQuery); (function(d){d.effects.bounce=function(a){return this.queue(function(){var b=d(this),e=["position","top","bottom","left","right"],f=d.effects.setMode(b,a.options.mode||"effect"),h=a.options.direction||"up",g=a.options.distance||20,i=a.options.times||5,j=a.duration||250;/show|hide/.test(f)&&e.push("opacity");d.effects.save(b,e);b.show();d.effects.createWrapper(b);var k=h=="up"||h=="down"?"top":"left",h=h=="up"||h=="left"?"pos":"neg",g=a.options.distance||(k=="top"?b.outerHeight({margin:!0})/3:b.outerWidth({margin:!0})/ 3);f=="show"&&b.css("opacity",0).css(k,h=="pos"?-g:g);f=="hide"&&(g/=i*2);f!="hide"&&i--;if(f=="show"){var l={opacity:1};l[k]=(h=="pos"?"+=":"-=")+g;b.animate(l,j/2,a.options.easing);g/=2;i--}for(l=0;l<i;l++){var m={},o={};m[k]=(h=="pos"?"-=":"+=")+g;o[k]=(h=="pos"?"+=":"-=")+g;b.animate(m,j/2,a.options.easing).animate(o,j/2,a.options.easing);g=f=="hide"?g*2:g/2}f=="hide"?(l={opacity:0},l[k]=(h=="pos"?"-=":"+=")+g,b.animate(l,j/2,a.options.easing,function(){b.hide();d.effects.restore(b,e);d.effects.removeWrapper(b); a.callback&&a.callback.apply(this,arguments)})):(m={},o={},m[k]=(h=="pos"?"-=":"+=")+g,o[k]=(h=="pos"?"+=":"-=")+g,b.animate(m,j/2,a.options.easing).animate(o,j/2,a.options.easing,function(){d.effects.restore(b,e);d.effects.removeWrapper(b);a.callback&&a.callback.apply(this,arguments)}));b.queue("fx",function(){b.dequeue()});b.dequeue()})}})(jQuery); (function(d){d.effects.clip=function(a){return this.queue(function(){var b=d(this),e=["position","top","bottom","left","right","height","width"],f=d.effects.setMode(b,a.options.mode||"hide"),h=a.options.direction||"vertical";d.effects.save(b,e);b.show();var g=d.effects.createWrapper(b).css({overflow:"hidden"}),g=b[0].tagName=="IMG"?g:b,i={size:h=="vertical"?"height":"width",position:h=="vertical"?"top":"left"},h=h=="vertical"?g.height():g.width();f=="show"&&(g.css(i.size,0),g.css(i.position,h/2)); var j={};j[i.size]=f=="show"?h:0;j[i.position]=f=="show"?0:h/2;g.animate(j,{queue:!1,duration:a.duration,easing:a.options.easing,complete:function(){f=="hide"&&b.hide();d.effects.restore(b,e);d.effects.removeWrapper(b);a.callback&&a.callback.apply(b[0],arguments);b.dequeue()}})})}})(jQuery); (function(d){d.effects.drop=function(a){return this.queue(function(){var b=d(this),e=["position","top","bottom","left","right","opacity"],f=d.effects.setMode(b,a.options.mode||"hide"),h=a.options.direction||"left";d.effects.save(b,e);b.show();d.effects.createWrapper(b);var g=h=="up"||h=="down"?"top":"left",h=h=="up"||h=="left"?"pos":"neg",i=a.options.distance||(g=="top"?b.outerHeight({margin:!0})/2:b.outerWidth({margin:!0})/2);f=="show"&&b.css("opacity",0).css(g,h=="pos"?-i:i);var j={opacity:f=="show"? 1:0};j[g]=(f=="show"?h=="pos"?"+=":"-=":h=="pos"?"-=":"+=")+i;b.animate(j,{queue:!1,duration:a.duration,easing:a.options.easing,complete:function(){f=="hide"&&b.hide();d.effects.restore(b,e);d.effects.removeWrapper(b);a.callback&&a.callback.apply(this,arguments);b.dequeue()}})})}})(jQuery); (function(d){d.effects.explode=function(a){return this.queue(function(){var b=a.options.pieces?Math.round(Math.sqrt(a.options.pieces)):3,e=a.options.pieces?Math.round(Math.sqrt(a.options.pieces)):3;a.options.mode=a.options.mode=="toggle"?d(this).is(":visible")?"hide":"show":a.options.mode;var f=d(this).show().css("visibility","hidden"),h=f.offset();h.top-=parseInt(f.css("marginTop"),10)||0;h.left-=parseInt(f.css("marginLeft"),10)||0;for(var g=f.outerWidth(!0),i=f.outerHeight(!0),j=0;j<b;j++)for(var k= 0;k<e;k++)f.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-k*(g/e),top:-j*(i/b)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:g/e,height:i/b,left:h.left+k*(g/e)+(a.options.mode=="show"?(k-Math.floor(e/2))*(g/e):0),top:h.top+j*(i/b)+(a.options.mode=="show"?(j-Math.floor(b/2))*(i/b):0),opacity:a.options.mode=="show"?0:1}).animate({left:h.left+k*(g/e)+(a.options.mode=="show"?0:(k-Math.floor(e/2))*(g/e)),top:h.top+ j*(i/b)+(a.options.mode=="show"?0:(j-Math.floor(b/2))*(i/b)),opacity:a.options.mode=="show"?1:0},a.duration||500);setTimeout(function(){a.options.mode=="show"?f.css({visibility:"visible"}):f.css({visibility:"visible"}).hide();a.callback&&a.callback.apply(f[0]);f.dequeue();d("div.ui-effects-explode").remove()},a.duration||500)})}})(jQuery); (function(d){d.effects.fade=function(a){return this.queue(function(){var b=d(this),e=d.effects.setMode(b,a.options.mode||"hide");b.animate({opacity:e},{queue:!1,duration:a.duration,easing:a.options.easing,complete:function(){a.callback&&a.callback.apply(this,arguments);b.dequeue()}})})}})(jQuery); (function(d){d.effects.fold=function(a){return this.queue(function(){var b=d(this),e=["position","top","bottom","left","right"],f=d.effects.setMode(b,a.options.mode||"hide"),h=a.options.size||15,g=!!a.options.horizFirst,i=a.duration?a.duration/2:d.fx.speeds._default/2;d.effects.save(b,e);b.show();var j=d.effects.createWrapper(b).css({overflow:"hidden"}),k=f=="show"!=g,l=k?["width","height"]:["height","width"],k=k?[j.width(),j.height()]:[j.height(),j.width()],m=/([0-9]+)%/.exec(h);m&&(h=parseInt(m[1], 10)/100*k[f=="hide"?0:1]);f=="show"&&j.css(g?{height:0,width:h}:{height:h,width:0});g={};m={};g[l[0]]=f=="show"?k[0]:h;m[l[1]]=f=="show"?k[1]:0;j.animate(g,i,a.options.easing).animate(m,i,a.options.easing,function(){f=="hide"&&b.hide();d.effects.restore(b,e);d.effects.removeWrapper(b);a.callback&&a.callback.apply(b[0],arguments);b.dequeue()})})}})(jQuery); (function(d){d.effects.highlight=function(a){return this.queue(function(){var b=d(this),e=["backgroundImage","backgroundColor","opacity"],f=d.effects.setMode(b,a.options.mode||"show"),h={backgroundColor:b.css("backgroundColor")};if(f=="hide")h.opacity=0;d.effects.save(b,e);b.show().css({backgroundImage:"none",backgroundColor:a.options.color||"#ffff99"}).animate(h,{queue:!1,duration:a.duration,easing:a.options.easing,complete:function(){f=="hide"&&b.hide();d.effects.restore(b,e);f=="show"&&!d.support.opacity&& this.style.removeAttribute("filter");a.callback&&a.callback.apply(this,arguments);b.dequeue()}})})}})(jQuery); (function(d){d.effects.pulsate=function(a){return this.queue(function(){var b=d(this),e=d.effects.setMode(b,a.options.mode||"show");times=(a.options.times||5)*2-1;duration=a.duration?a.duration/2:d.fx.speeds._default/2;isVisible=b.is(":visible");animateTo=0;isVisible||(b.css("opacity",0).show(),animateTo=1);(e=="hide"&&isVisible||e=="show"&&!isVisible)&&times--;for(e=0;e<times;e++)b.animate({opacity:animateTo},duration,a.options.easing),animateTo=(animateTo+1)%2;b.animate({opacity:animateTo},duration, a.options.easing,function(){animateTo==0&&b.hide();a.callback&&a.callback.apply(this,arguments)});b.queue("fx",function(){b.dequeue()}).dequeue()})}})(jQuery); (function(d){d.effects.puff=function(a){return this.queue(function(){var b=d(this),e=d.effects.setMode(b,a.options.mode||"hide"),f=parseInt(a.options.percent,10)||150,h=f/100,g={height:b.height(),width:b.width()};d.extend(a.options,{fade:!0,mode:e,percent:e=="hide"?f:100,from:e=="hide"?g:{height:g.height*h,width:g.width*h}});b.effect("scale",a.options,a.duration,a.callback);b.dequeue()})};d.effects.scale=function(a){return this.queue(function(){var b=d(this),e=d.extend(!0,{},a.options),f=d.effects.setMode(b, a.options.mode||"effect"),h=parseInt(a.options.percent,10)||(parseInt(a.options.percent,10)==0?0:f=="hide"?0:100),g=a.options.direction||"both",i=a.options.origin;if(f!="effect")e.origin=i||["middle","center"],e.restore=!0;i={height:b.height(),width:b.width()};b.from=a.options.from||(f=="show"?{height:0,width:0}:i);h={y:g!="horizontal"?h/100:1,x:g!="vertical"?h/100:1};b.to={height:i.height*h.y,width:i.width*h.x};if(a.options.fade){if(f=="show")b.from.opacity=0,b.to.opacity=1;if(f=="hide")b.from.opacity= 1,b.to.opacity=0}e.from=b.from;e.to=b.to;e.mode=f;b.effect("size",e,a.duration,a.callback);b.dequeue()})};d.effects.size=function(a){return this.queue(function(){var b=d(this),e=["position","top","bottom","left","right","width","height","overflow","opacity"],f=["position","top","bottom","left","right","overflow","opacity"],h=["width","height","overflow"],g=["fontSize"],i=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],j=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"], k=d.effects.setMode(b,a.options.mode||"effect"),l=a.options.restore||!1,m=a.options.scale||"both",o=a.options.origin,p={height:b.height(),width:b.width()};b.from=a.options.from||p;b.to=a.options.to||p;if(o)o=d.effects.getBaseline(o,p),b.from.top=(p.height-b.from.height)*o.y,b.from.left=(p.width-b.from.width)*o.x,b.to.top=(p.height-b.to.height)*o.y,b.to.left=(p.width-b.to.width)*o.x;var n={from:{y:b.from.height/p.height,x:b.from.width/p.width},to:{y:b.to.height/p.height,x:b.to.width/p.width}};if(m== "box"||m=="both"){if(n.from.y!=n.to.y)e=e.concat(i),b.from=d.effects.setTransition(b,i,n.from.y,b.from),b.to=d.effects.setTransition(b,i,n.to.y,b.to);if(n.from.x!=n.to.x)e=e.concat(j),b.from=d.effects.setTransition(b,j,n.from.x,b.from),b.to=d.effects.setTransition(b,j,n.to.x,b.to)}if((m=="content"||m=="both")&&n.from.y!=n.to.y)e=e.concat(g),b.from=d.effects.setTransition(b,g,n.from.y,b.from),b.to=d.effects.setTransition(b,g,n.to.y,b.to);d.effects.save(b,l?e:f);b.show();d.effects.createWrapper(b); b.css("overflow","hidden").css(b.from);if(m=="content"||m=="both")i=i.concat(["marginTop","marginBottom"]).concat(g),j=j.concat(["marginLeft","marginRight"]),h=e.concat(i).concat(j),b.find("*[width]").each(function(){child=d(this);l&&d.effects.save(child,h);var b={height:child.height(),width:child.width()};child.from={height:b.height*n.from.y,width:b.width*n.from.x};child.to={height:b.height*n.to.y,width:b.width*n.to.x};if(n.from.y!=n.to.y)child.from=d.effects.setTransition(child,i,n.from.y,child.from), child.to=d.effects.setTransition(child,i,n.to.y,child.to);if(n.from.x!=n.to.x)child.from=d.effects.setTransition(child,j,n.from.x,child.from),child.to=d.effects.setTransition(child,j,n.to.x,child.to);child.css(child.from);child.animate(child.to,a.duration,a.options.easing,function(){l&&d.effects.restore(child,h)})});b.animate(b.to,{queue:!1,duration:a.duration,easing:a.options.easing,complete:function(){b.to.opacity===0&&b.css("opacity",b.from.opacity);k=="hide"&&b.hide();d.effects.restore(b,l?e: f);d.effects.removeWrapper(b);a.callback&&a.callback.apply(this,arguments);b.dequeue()}})})}})(jQuery); (function(d){d.effects.shake=function(a){return this.queue(function(){var b=d(this),e=["position","top","bottom","left","right"];d.effects.setMode(b,a.options.mode||"effect");var f=a.options.direction||"left",h=a.options.distance||20,g=a.options.times||3,i=a.duration||a.options.duration||140;d.effects.save(b,e);b.show();d.effects.createWrapper(b);var j=f=="up"||f=="down"?"top":"left",k=f=="up"||f=="left"?"pos":"neg",f={},l={},m={};f[j]=(k=="pos"?"-=":"+=")+h;l[j]=(k=="pos"?"+=":"-=")+h*2;m[j]=(k== "pos"?"-=":"+=")+h*2;b.animate(f,i,a.options.easing);for(h=1;h<g;h++)b.animate(l,i,a.options.easing).animate(m,i,a.options.easing);b.animate(l,i,a.options.easing).animate(f,i/2,a.options.easing,function(){d.effects.restore(b,e);d.effects.removeWrapper(b);a.callback&&a.callback.apply(this,arguments)});b.queue("fx",function(){b.dequeue()});b.dequeue()})}})(jQuery); (function(d){d.effects.slide=function(a){return this.queue(function(){var b=d(this),e=["position","top","bottom","left","right"],f=d.effects.setMode(b,a.options.mode||"show"),h=a.options.direction||"left";d.effects.save(b,e);b.show();d.effects.createWrapper(b).css({overflow:"hidden"});var g=h=="up"||h=="down"?"top":"left",h=h=="up"||h=="left"?"pos":"neg",i=a.options.distance||(g=="top"?b.outerHeight({margin:!0}):b.outerWidth({margin:!0}));f=="show"&&b.css(g,h=="pos"?isNaN(i)?"-"+i:-i:i);var j={}; j[g]=(f=="show"?h=="pos"?"+=":"-=":h=="pos"?"-=":"+=")+i;b.animate(j,{queue:!1,duration:a.duration,easing:a.options.easing,complete:function(){f=="hide"&&b.hide();d.effects.restore(b,e);d.effects.removeWrapper(b);a.callback&&a.callback.apply(this,arguments);b.dequeue()}})})}})(jQuery); (function(d){d.effects.transfer=function(a){return this.queue(function(){var b=d(this),e=d(a.options.to),f=e.offset(),e={top:f.top,left:f.left,height:e.innerHeight(),width:e.innerWidth()},f=b.offset(),h=d('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(a.options.className).css({top:f.top,left:f.left,height:b.innerHeight(),width:b.innerWidth(),position:"absolute"}).animate(e,a.duration,a.options.easing,function(){h.remove();a.callback&&a.callback.apply(b[0],arguments);b.dequeue()})})}})(jQuery);
Java
/* * jQuery Cryptography Plug-in * version: 1.0.0 (24 Sep 2008) * copyright 2008 Scott Thompson http://www.itsyndicate.ca - scott@itsyndicate.ca * http://www.opensource.org/licenses/mit-license.php * * A set of functions to do some basic cryptography encoding/decoding * I compiled from some javascripts I found into a jQuery plug-in. * Thanks go out to the original authors. * * Changelog: 1.1.0 * - rewrote plugin to use only one item in the namespace * * --- Base64 Encoding and Decoding code was written by * * Base64 code from Tyler Akins -- http://rumkin.com * and is placed in the public domain * * * --- MD5 and SHA1 Functions based upon Paul Johnston's javascript libraries. * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message * Digest Algorithm, as defined in RFC 1321. * Version 2.1 Copyright (C) Paul Johnston 1999 - 2002. * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet * Distributed under the BSD License * See http://pajhome.org.uk/crypt/md5 for more info. * * xTea Encrypt and Decrypt * copyright 2000-2005 Chris Veness * http://www.movable-type.co.uk * * * Examples: * var md5 = $().crypt({method:"md5",source:$("#phrase").val()}); var sha1 = $().crypt({method:"sha1",source:$("#phrase").val()}); var b64 = $().crypt({method:"b64enc",source:$("#phrase").val()}); var b64dec = $().crypt({method:"b64dec",source:b64}); var xtea = $().crypt({method:"xteaenc",source:$("#phrase").val(),keyPass:$("#passPhrase").val()}); var xteadec = $().crypt({method:"xteadec",source:xtea,keyPass:$("#passPhrase").val()}); var xteab64 = $().crypt({method:"xteab64enc",source:$("#phrase").val(),keyPass:$("#passPhrase").val()}); var xteab64dec = $().crypt({method:"xteab64dec",source:xteab64,keyPass:$("#passPhrase").val()}); You can also pass source this way. var md5 = $("#idOfSource").crypt({method:"md5"}); * */ (function(s){s.fn.crypt=function(m){function t(g){var i="",j,k,f,c,l,a,b=0;do j=g.source.charCodeAt(b++),k=g.source.charCodeAt(b++),f=g.source.charCodeAt(b++),c=j>>2,j=(j&3)<<4|k>>4,l=(k&15)<<2|f>>6,a=f&63,isNaN(k)?l=a=64:isNaN(f)&&(a=64),i+=g.b64Str.charAt(c)+g.b64Str.charAt(j)+g.b64Str.charAt(l)+g.b64Str.charAt(a);while(b<g.source.length);return i}function u(g){var i="",j,k,f,c,l,a=0;g.source=g.source.replace(/[^A-Za-z0-9!_-]/g,"");do j=g.b64Str.indexOf(g.source.charAt(a++)),k=g.b64Str.indexOf(g.source.charAt(a++)), c=g.b64Str.indexOf(g.source.charAt(a++)),l=g.b64Str.indexOf(g.source.charAt(a++)),j=j<<2|k>>4,k=(k&15)<<4|c>>2,f=(c&3)<<6|l,i+=String.fromCharCode(j),64!=c&&(i+=String.fromCharCode(k)),64!=l&&(i+=String.fromCharCode(f));while(a<g.source.length);return i}function x(g){function i(c,f,a,b,d,e){c=o(o(f,c),o(b,e));return o(c<<d|c>>>32-d,a)}function j(c,f,a,b,d,e,h){return i(f&a|~f&b,c,f,d,e,h)}function k(c,f,a,b,d,e,h){return i(f&b|a&~b,c,f,d,e,h)}function f(c,f,a,b,d,e,h){return i(a^(f|~b),c,f,d,e,h)} return function(c){for(var f=g.hexcase?"0123456789ABCDEF":"0123456789abcdef",a="",b=0;b<4*c.length;b++)a+=f.charAt(c[b>>2]>>8*(b%4)+4&15)+f.charAt(c[b>>2]>>8*(b%4)&15);return a}(function(c,g){c[g>>5]|=128<<g%32;c[(g+64>>>9<<4)+14]=g;for(var a=1732584193,b=-271733879,d=-1732584194,e=271733878,h=0;h<c.length;h+=16)var m=a,p=b,q=d,n=e,a=j(a,b,d,e,c[h+0],7,-680876936),e=j(e,a,b,d,c[h+1],12,-389564586),d=j(d,e,a,b,c[h+2],17,606105819),b=j(b,d,e,a,c[h+3],22,-1044525330),a=j(a,b,d,e,c[h+4],7,-176418897), e=j(e,a,b,d,c[h+5],12,1200080426),d=j(d,e,a,b,c[h+6],17,-1473231341),b=j(b,d,e,a,c[h+7],22,-45705983),a=j(a,b,d,e,c[h+8],7,1770035416),e=j(e,a,b,d,c[h+9],12,-1958414417),d=j(d,e,a,b,c[h+10],17,-42063),b=j(b,d,e,a,c[h+11],22,-1990404162),a=j(a,b,d,e,c[h+12],7,1804603682),e=j(e,a,b,d,c[h+13],12,-40341101),d=j(d,e,a,b,c[h+14],17,-1502002290),b=j(b,d,e,a,c[h+15],22,1236535329),a=k(a,b,d,e,c[h+1],5,-165796510),e=k(e,a,b,d,c[h+6],9,-1069501632),d=k(d,e,a,b,c[h+11],14,643717713),b=k(b,d,e,a,c[h+0],20,-373897302), a=k(a,b,d,e,c[h+5],5,-701558691),e=k(e,a,b,d,c[h+10],9,38016083),d=k(d,e,a,b,c[h+15],14,-660478335),b=k(b,d,e,a,c[h+4],20,-405537848),a=k(a,b,d,e,c[h+9],5,568446438),e=k(e,a,b,d,c[h+14],9,-1019803690),d=k(d,e,a,b,c[h+3],14,-187363961),b=k(b,d,e,a,c[h+8],20,1163531501),a=k(a,b,d,e,c[h+13],5,-1444681467),e=k(e,a,b,d,c[h+2],9,-51403784),d=k(d,e,a,b,c[h+7],14,1735328473),b=k(b,d,e,a,c[h+12],20,-1926607734),a=i(b^d^e,a,b,c[h+5],4,-378558),e=i(a^b^d,e,a,c[h+8],11,-2022574463),d=i(e^a^b,d,e,c[h+11],16,1839030562), b=i(d^e^a,b,d,c[h+14],23,-35309556),a=i(b^d^e,a,b,c[h+1],4,-1530992060),e=i(a^b^d,e,a,c[h+4],11,1272893353),d=i(e^a^b,d,e,c[h+7],16,-155497632),b=i(d^e^a,b,d,c[h+10],23,-1094730640),a=i(b^d^e,a,b,c[h+13],4,681279174),e=i(a^b^d,e,a,c[h+0],11,-358537222),d=i(e^a^b,d,e,c[h+3],16,-722521979),b=i(d^e^a,b,d,c[h+6],23,76029189),a=i(b^d^e,a,b,c[h+9],4,-640364487),e=i(a^b^d,e,a,c[h+12],11,-421815835),d=i(e^a^b,d,e,c[h+15],16,530742520),b=i(d^e^a,b,d,c[h+2],23,-995338651),a=f(a,b,d,e,c[h+0],6,-198630844),e= f(e,a,b,d,c[h+7],10,1126891415),d=f(d,e,a,b,c[h+14],15,-1416354905),b=f(b,d,e,a,c[h+5],21,-57434055),a=f(a,b,d,e,c[h+12],6,1700485571),e=f(e,a,b,d,c[h+3],10,-1894986606),d=f(d,e,a,b,c[h+10],15,-1051523),b=f(b,d,e,a,c[h+1],21,-2054922799),a=f(a,b,d,e,c[h+8],6,1873313359),e=f(e,a,b,d,c[h+15],10,-30611744),d=f(d,e,a,b,c[h+6],15,-1560198380),b=f(b,d,e,a,c[h+13],21,1309151649),a=f(a,b,d,e,c[h+4],6,-145523070),e=f(e,a,b,d,c[h+11],10,-1120210379),d=f(d,e,a,b,c[h+2],15,718787259),b=f(b,d,e,a,c[h+9],21,-343485551), a=o(a,m),b=o(b,p),d=o(d,q),e=o(e,n);return[a,b,d,e]}(function(c){for(var f=[],a=(1<<g.chrsz)-1,b=0;b<c.length*g.chrsz;b+=g.chrsz)f[b>>5]|=(c.charCodeAt(b/g.chrsz)&a)<<b%32;return f}(g.source),g.source.length*g.chrsz))}function o(g,i){var j=(g&65535)+(i&65535);return(g>>16)+(i>>16)+(j>>16)<<16|j&65535}function y(g){return function(i){for(var j=g.hexcase?"0123456789ABCDEF":"0123456789abcdef",k="",f=0;f<4*i.length;f++)k+=j.charAt(i[f>>2]>>8*(3-f%4)+4&15)+j.charAt(i[f>>2]>>8*(3-f%4)&15);return k}(function(g, j){g[j>>5]|=128<<24-j%32;g[(j+64>>9<<4)+15]=j;for(var k=Array(80),f=1732584193,c=-271733879,l=-1732584194,a=271733878,b=-1009589776,d=0;d<g.length;d+=16){for(var e=f,h=c,m=l,p=a,q=b,n=0;80>n;n++){k[n]=16>n?g[d+n]:(k[n-3]^k[n-8]^k[n-14]^k[n-16])<<1|(k[n-3]^k[n-8]^k[n-14]^k[n-16])>>>31;var r=f<<5|f>>>27,s;s=20>n?c&l|~c&a:40>n?c^l^a:60>n?c&l|c&a|l&a:c^l^a;r=o(o(r,s),o(o(b,k[n]),20>n?1518500249:40>n?1859775393:60>n?-1894007588:-899497514));b=a;a=l;l=c<<30|c>>>2;c=f;f=r}f=o(f,e);c=o(c,h);l=o(l,m);a=o(a, p);b=o(b,q)}return[f,c,l,a,b]}(function(i){for(var j=[],k=(1<<g.chrsz)-1,f=0;f<i.length*g.chrsz;f+=g.chrsz)j[f>>5]|=(i.charCodeAt(f/g.chrsz)&k)<<32-g.chrsz-f%32;return j}(g.source),g.source.length*g.chrsz))}function v(g){var i=Array(2),j=Array(4),k="",f;g.source=escape(g.source);for(f=0;4>f;f++)j[f]=q(g.strKey.slice(4*f,4*(f+1)));for(f=0;f<g.source.length;f+=8){i[0]=q(g.source.slice(f,f+4));i[1]=q(g.source.slice(f+4,f+8));for(var c=i,l=c[0],a=c[1],b=0;84941944608!=b;)l+=(a<<4^a>>>5)+a^b+j[b&3],b+= 2654435769,a+=(l<<4^l>>>5)+l^b+j[b>>>11&3];c[0]=l;c[1]=a;k+=r(i[0])+r(i[1])}return z(k)}function w(g){var i=Array(2),j=Array(4),k="",f;for(f=0;4>f;f++)j[f]=q(g.strKey.slice(4*f,4*(f+1)));ciphertext=A(g.source);for(f=0;f<ciphertext.length;f+=8){i[0]=q(ciphertext.slice(f,f+4));i[1]=q(ciphertext.slice(f+4,f+8));for(var g=i,c=g[0],l=g[1],a=84941944608;0!=a;)l-=(c<<4^c>>>5)+c^a+j[a>>>11&3],a-=2654435769,c-=(l<<4^l>>>5)+l^a+j[a&3];g[0]=c;g[1]=l;k+=r(i[0])+r(i[1])}k=k.replace(/\0+$/,"");return unescape(k)} function q(g){for(var i=0,j=0;4>j;j++)i|=g.charCodeAt(j)<<8*j;return isNaN(i)?0:i}function r(g){return String.fromCharCode(g&255,g>>8&255,g>>16&255,g>>24&255)}function z(g){return g.replace(/[\0\t\n\v\f\r\xa0'"!]/g,function(g){return"!"+g.charCodeAt(0)+"!"})}function A(g){return g.replace(/!\d\d?\d?!/g,function(g){return String.fromCharCode(g.slice(1,-1))})}m=s.extend({b64Str:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!-_",strKey:"123",method:"md5",source:"",chrsz:8,hexcase:0}, m);if(!m.source){var p=s(this);if(p.html())m.source=p.html();else if(p.val())m.source=p.val();else return alert("Please provide source text"),!1}if("md5"==m.method)return x(m);if("sha1"==m.method)return y(m);if("b64enc"==m.method)return t(m);if("b64dec"==m.method)return u(m);if("xteaenc"==m.method)return v(m);if("xteadec"==m.method)return w(m);if("xteab64enc"==m.method)return p=v(m),m.method="b64enc",m.source=p,t(m);if("xteab64dec"==m.method)return p=u(m),m.method="xteadec",m.source=p,w(m)}})(jQuery);
Java
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Handles backports of the standard library's `fractions.py`. The fractions module in 2.6 does not handle being instantiated using a float and then calculating an approximate fraction based on that. This functionality is required by the FITS unit format generator, since the FITS unit format handles only rational, not decimal point, powers. """ from __future__ import absolute_import import sys if sys.version_info[:2] == (2, 6): from ._fractions_py2 import * else: from fractions import *
Java
/* eslint-disable func-names */ const { sampleUrls, shortSampleUrls, E2E_WAIT_TIME: WAIT_TIME, E2E_PRESENT_WAIT_TIME: PRESENT_WAIT_TIME } = require('../e2e_helper'); module.exports = { after(browser) { browser.end(); }, 'Go to top page': browser => { browser.page.index().navigate().waitForElementVisible('body', PRESENT_WAIT_TIME); }, 'Add musics': browser => { browser.page .index() .log('add musics') .setValue('@trackUrlField', sampleUrls.join(',')) .submitForm('@trackSubmitButton') .waitForElementPresent('a.playlist-content:nth-child(5)', PRESENT_WAIT_TIME) .assert.elementPresent('@playButton') .assert.hasPlaylistLength(5) .api.pause(WAIT_TIME); }, 'Play music': browser => { browser.page .index() .moveToElement('@playerBlock', 10, 10) .click('@playButton') .waitForElementPresent('@pauseButton', PRESENT_WAIT_TIME) .assert.elementPresent('@pauseButton') .assert.hasPlaylistLength(5) .assert.currentTrackNumEquals(1) .assert.currentTitleEquals(1) .api.pause(WAIT_TIME); }, 'Play next music': browser => { browser.page .index() .click('@nextButton') .waitForElementNotPresent('a.playlist-content:nth-child(5)', PRESENT_WAIT_TIME) // dequeue .assert.elementPresent('@pauseButton') .assert.hasPlaylistLength(4) .assert.currentTrackNumEquals(1) .assert.currentTitleEquals(1) .api.pause(WAIT_TIME); }, 'Has play prev music button?': browser => { browser.page.index().assert.cssClassPresent('@prevButton', 'deactivate'); }, 'Stop music': browser => { browser.page .index() .click('@pauseButton') .waitForElementPresent('@playButton', PRESENT_WAIT_TIME) .assert.elementPresent('@playButton') .assert.hasPlaylistLength(4) .assert.currentTrackNumEquals(1) .assert.title('jukebox') .api.pause(WAIT_TIME); }, 'Play specified music': browser => { browser.page .index() .click('a.playlist-content:nth-child(3)') .waitForElementPresent('@pauseButton', PRESENT_WAIT_TIME) .assert.elementPresent('@pauseButton') .assert.hasPlaylistLength(4) .assert.currentTrackNumEquals(3) .assert.currentTitleEquals(3) .api.pause(WAIT_TIME); }, 'Delete current music': browser => { browser.page .index() .click('a.playlist-content:nth-child(3) i[title=Delete]') .waitForElementPresent('@playButton', PRESENT_WAIT_TIME) .assert.elementPresent('@playButton') .assert.hasPlaylistLength(3) .assert.currentTrackNumEquals(3) .assert.title('jukebox') .api.pause(WAIT_TIME); }, 'Add short music': browser => { browser.page .index() .setValue('@trackUrlField', shortSampleUrls[0]) .submitForm('@trackSubmitButton') .waitForElementPresent('a.playlist-content:nth-child(4)', PRESENT_WAIT_TIME) .assert.hasPlaylistLength(4); }, 'Play short music': browser => { browser.page .index() .click('a.playlist-content:nth-child(4)') .waitForElementPresent('@pauseButton', PRESENT_WAIT_TIME); }, 'Wait till end': browser => { browser.page .index() .waitForElementNotPresent( '.playlist-content:nth-child(4) .thumbnail-wrapper i', PRESENT_WAIT_TIME ) .assert.elementPresent('@playButton') .assert.hasPlaylistLength(3); }, 'Clear playlist': browser => { browser.page .index() .click('@openClearModalButton') .waitForElementPresent('@clearModal', PRESENT_WAIT_TIME) .click('@clearButton') .waitForElementNotPresent('a.playlist-content', PRESENT_WAIT_TIME) .assert.hasPlaylistLength(0) .api.pause(WAIT_TIME); } };
Java
/*! * Bootstrap v3.3.7 (http://getbootstrap.com) * Copyright 2011-2016 Twitter, Inc. * Licensed under the MIT license */ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript requires jQuery') } +function ($) { 'use strict'; var version = $.fn.jquery.split(' ')[0].split('.') if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 3)) { throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4') } }(jQuery); /* ======================================================================== * Bootstrap: transition.js v3.3.7 * http://getbootstrap.com/javascript/#transitions * ======================================================================== * Copyright 2011-2016 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * ======================================================================== */ +function ($) { 'use strict'; // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) // ============================================================ function transitionEnd() { var el = document.createElement('bootstrap') var transEndEventNames = { WebkitTransition : 'webkitTransitionEnd', MozTransition : 'transitionend', OTransition : 'oTransitionEnd otransitionend', transition : 'transitionend' } for (var name in transEndEventNames) { if (el.style[name] !== undefined) { return { end: transEndEventNames[name] } } } return false // explicit for ie8 ( ._.) } // http://blog.alexmaccaw.com/css-transitions $.fn.emulateTransitionEnd = function (duration) { var called = false var $el = this $(this).one('bsTransitionEnd', function () { called = true }) var callback = function () { if (!called) $($el).trigger($.support.transition.end) } setTimeout(callback, duration) return this } $(function () { $.support.transition = transitionEnd() if (!$.support.transition) return $.event.special.bsTransitionEnd = { bindType: $.support.transition.end, delegateType: $.support.transition.end, handle: function (e) { if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments) } } }) }(jQuery); /* ======================================================================== * Bootstrap: alert.js v3.3.7 * http://getbootstrap.com/javascript/#alerts * ======================================================================== * Copyright 2011-2016 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * ======================================================================== */ +function ($) { 'use strict'; // ALERT CLASS DEFINITION // ====================== var dismiss = '[data-dismiss="alert"]' var Alert = function (el) { $(el).on('click', dismiss, this.close) } Alert.VERSION = '3.3.7' Alert.TRANSITION_DURATION = 150 Alert.prototype.close = function (e) { var $this = $(this) var selector = $this.attr('data-target') if (!selector) { selector = $this.attr('href') selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 } var $parent = $(selector === '#' ? [] : selector) if (e) e.preventDefault() if (!$parent.length) { $parent = $this.closest('.alert') } $parent.trigger(e = $.Event('close.bs.alert')) if (e.isDefaultPrevented()) return $parent.removeClass('in') function removeElement() { // detach from parent, fire event then clean up data $parent.detach().trigger('closed.bs.alert').remove() } $.support.transition && $parent.hasClass('fade') ? $parent .one('bsTransitionEnd', removeElement) .emulateTransitionEnd(Alert.TRANSITION_DURATION) : removeElement() } // ALERT PLUGIN DEFINITION // ======================= function Plugin(option) { return this.each(function () { var $this = $(this) var data = $this.data('bs.alert') if (!data) $this.data('bs.alert', (data = new Alert(this))) if (typeof option == 'string') data[option].call($this) }) } var old = $.fn.alert $.fn.alert = Plugin $.fn.alert.Constructor = Alert // ALERT NO CONFLICT // ================= $.fn.alert.noConflict = function () { $.fn.alert = old return this } // ALERT DATA-API // ============== $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close) }(jQuery); /* ======================================================================== * Bootstrap: button.js v3.3.7 * http://getbootstrap.com/javascript/#buttons * ======================================================================== * Copyright 2011-2016 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * ======================================================================== */ +function ($) { 'use strict'; // BUTTON PUBLIC CLASS DEFINITION // ============================== var Button = function (element, options) { this.$element = $(element) this.options = $.extend({}, Button.DEFAULTS, options) this.isLoading = false } Button.VERSION = '3.3.7' Button.DEFAULTS = { loadingText: 'loading...' } Button.prototype.setState = function (state) { var d = 'disabled' var $el = this.$element var val = $el.is('input') ? 'val' : 'html' var data = $el.data() state += 'Text' if (data.resetText == null) $el.data('resetText', $el[val]()) // push to event loop to allow forms to submit setTimeout($.proxy(function () { $el[val](data[state] == null ? this.options[state] : data[state]) if (state == 'loadingText') { this.isLoading = true $el.addClass(d).attr(d, d).prop(d, true) } else if (this.isLoading) { this.isLoading = false $el.removeClass(d).removeAttr(d).prop(d, false) } }, this), 0) } Button.prototype.toggle = function () { var changed = true var $parent = this.$element.closest('[data-toggle="buttons"]') if ($parent.length) { var $input = this.$element.find('input') if ($input.prop('type') == 'radio') { if ($input.prop('checked')) changed = false $parent.find('.active').removeClass('active') this.$element.addClass('active') } else if ($input.prop('type') == 'checkbox') { if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false this.$element.toggleClass('active') } $input.prop('checked', this.$element.hasClass('active')) if (changed) $input.trigger('change') } else { this.$element.attr('aria-pressed', !this.$element.hasClass('active')) this.$element.toggleClass('active') } } // BUTTON PLUGIN DEFINITION // ======================== function Plugin(option) { return this.each(function () { var $this = $(this) var data = $this.data('bs.button') var options = typeof option == 'object' && option if (!data) $this.data('bs.button', (data = new Button(this, options))) if (option == 'toggle') data.toggle() else if (option) data.setState(option) }) } var old = $.fn.button $.fn.button = Plugin $.fn.button.Constructor = Button // BUTTON NO CONFLICT // ================== $.fn.button.noConflict = function () { $.fn.button = old return this } // BUTTON DATA-API // =============== $(document) .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) { var $btn = $(e.target).closest('.btn') Plugin.call($btn, 'toggle') if (!($(e.target).is('input[type="radio"], input[type="checkbox"]'))) { // Prevent double click on radios, and the double selections (so cancellation) on checkboxes e.preventDefault() // The target component still receive the focus if ($btn.is('input,button')) $btn.trigger('focus') else $btn.find('input:visible,button:visible').first().trigger('focus') } }) .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) { $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type)) }) }(jQuery); /* ======================================================================== * Bootstrap: carousel.js v3.3.7 * http://getbootstrap.com/javascript/#carousel * ======================================================================== * Copyright 2011-2016 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * ======================================================================== */ +function ($) { 'use strict'; // CAROUSEL CLASS DEFINITION // ========================= var Carousel = function (element, options) { this.$element = $(element) this.$indicators = this.$element.find('.carousel-indicators') this.options = options this.paused = null this.sliding = null this.interval = null this.$active = null this.$items = null this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this)) this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element .on('mouseenter.bs.carousel', $.proxy(this.pause, this)) .on('mouseleave.bs.carousel', $.proxy(this.cycle, this)) } Carousel.VERSION = '3.3.7' Carousel.TRANSITION_DURATION = 600 Carousel.DEFAULTS = { interval: 5000, pause: 'hover', wrap: true, keyboard: true } Carousel.prototype.keydown = function (e) { if (/input|textarea/i.test(e.target.tagName)) return switch (e.which) { case 37: this.prev(); break case 39: this.next(); break default: return } e.preventDefault() } Carousel.prototype.cycle = function (e) { e || (this.paused = false) this.interval && clearInterval(this.interval) this.options.interval && !this.paused && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) return this } Carousel.prototype.getItemIndex = function (item) { this.$items = item.parent().children('.item') return this.$items.index(item || this.$active) } Carousel.prototype.getItemForDirection = function (direction, active) { var activeIndex = this.getItemIndex(active) var willWrap = (direction == 'prev' && activeIndex === 0) || (direction == 'next' && activeIndex == (this.$items.length - 1)) if (willWrap && !this.options.wrap) return active var delta = direction == 'prev' ? -1 : 1 var itemIndex = (activeIndex + delta) % this.$items.length return this.$items.eq(itemIndex) } Carousel.prototype.to = function (pos) { var that = this var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active')) if (pos > (this.$items.length - 1) || pos < 0) return if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid" if (activeIndex == pos) return this.pause().cycle() return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos)) } Carousel.prototype.pause = function (e) { e || (this.paused = true) if (this.$element.find('.next, .prev').length && $.support.transition) { this.$element.trigger($.support.transition.end) this.cycle(true) } this.interval = clearInterval(this.interval) return this } Carousel.prototype.next = function () { if (this.sliding) return return this.slide('next') } Carousel.prototype.prev = function () { if (this.sliding) return return this.slide('prev') } Carousel.prototype.slide = function (type, next) { var $active = this.$element.find('.item.active') var $next = next || this.getItemForDirection(type, $active) var isCycling = this.interval var direction = type == 'next' ? 'left' : 'right' var that = this if ($next.hasClass('active')) return (this.sliding = false) var relatedTarget = $next[0] var slideEvent = $.Event('slide.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) this.$element.trigger(slideEvent) if (slideEvent.isDefaultPrevented()) return this.sliding = true isCycling && this.pause() if (this.$indicators.length) { this.$indicators.find('.active').removeClass('active') var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)]) $nextIndicator && $nextIndicator.addClass('active') } var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid" if ($.support.transition && this.$element.hasClass('slide')) { $next.addClass(type) $next[0].offsetWidth // force reflow $active.addClass(direction) $next.addClass(direction) $active .one('bsTransitionEnd', function () { $next.removeClass([type, direction].join(' ')).addClass('active') $active.removeClass(['active', direction].join(' ')) that.sliding = false setTimeout(function () { that.$element.trigger(slidEvent) }, 0) }) .emulateTransitionEnd(Carousel.TRANSITION_DURATION) } else { $active.removeClass('active') $next.addClass('active') this.sliding = false this.$element.trigger(slidEvent) } isCycling && this.cycle() return this } // CAROUSEL PLUGIN DEFINITION // ========================== function Plugin(option) { return this.each(function () { var $this = $(this) var data = $this.data('bs.carousel') var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option) var action = typeof option == 'string' ? option : options.slide if (!data) $this.data('bs.carousel', (data = new Carousel(this, options))) if (typeof option == 'number') data.to(option) else if (action) data[action]() else if (options.interval) data.pause().cycle() }) } var old = $.fn.carousel $.fn.carousel = Plugin $.fn.carousel.Constructor = Carousel // CAROUSEL NO CONFLICT // ==================== $.fn.carousel.noConflict = function () { $.fn.carousel = old return this } // CAROUSEL DATA-API // ================= var clickHandler = function (e) { var href var $this = $(this) var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7 if (!$target.hasClass('carousel')) return var options = $.extend({}, $target.data(), $this.data()) var slideIndex = $this.attr('data-slide-to') if (slideIndex) options.interval = false Plugin.call($target, options) if (slideIndex) { $target.data('bs.carousel').to(slideIndex) } e.preventDefault() } $(document) .on('click.bs.carousel.data-api', '[data-slide]', clickHandler) .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler) $(window).on('load', function () { $('[data-ride="carousel"]').each(function () { var $carousel = $(this) Plugin.call($carousel, $carousel.data()) }) }) }(jQuery); /* ======================================================================== * Bootstrap: collapse.js v3.3.7 * http://getbootstrap.com/javascript/#collapse * ======================================================================== * Copyright 2011-2016 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * ======================================================================== */ /* jshint latedef: false */ +function ($) { 'use strict'; // COLLAPSE PUBLIC CLASS DEFINITION // ================================ var Collapse = function (element, options) { this.$element = $(element) this.options = $.extend({}, Collapse.DEFAULTS, options) this.$trigger = $('[data-toggle="collapse"][href="#' + element.id + '"],' + '[data-toggle="collapse"][data-target="#' + element.id + '"]') this.transitioning = null if (this.options.parent) { this.$parent = this.getParent() } else { this.addAriaAndCollapsedClass(this.$element, this.$trigger) } if (this.options.toggle) this.toggle() } Collapse.VERSION = '3.3.7' Collapse.TRANSITION_DURATION = 350 Collapse.DEFAULTS = { toggle: true } Collapse.prototype.dimension = function () { var hasWidth = this.$element.hasClass('width') return hasWidth ? 'width' : 'height' } Collapse.prototype.show = function () { if (this.transitioning || this.$element.hasClass('in')) return var activesData var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing') if (actives && actives.length) { activesData = actives.data('bs.collapse') if (activesData && activesData.transitioning) return } var startEvent = $.Event('show.bs.collapse') this.$element.trigger(startEvent) if (startEvent.isDefaultPrevented()) return if (actives && actives.length) { Plugin.call(actives, 'hide') activesData || actives.data('bs.collapse', null) } var dimension = this.dimension() this.$element .removeClass('collapse') .addClass('collapsing')[dimension](0) .attr('aria-expanded', true) this.$trigger .removeClass('collapsed') .attr('aria-expanded', true) this.transitioning = 1 var complete = function () { this.$element .removeClass('collapsing') .addClass('collapse in')[dimension]('') this.transitioning = 0 this.$element .trigger('shown.bs.collapse') } if (!$.support.transition) return complete.call(this) var scrollSize = $.camelCase(['scroll', dimension].join('-')) this.$element .one('bsTransitionEnd', $.proxy(complete, this)) .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize]) } Collapse.prototype.hide = function () { if (this.transitioning || !this.$element.hasClass('in')) return var startEvent = $.Event('hide.bs.collapse') this.$element.trigger(startEvent) if (startEvent.isDefaultPrevented()) return var dimension = this.dimension() this.$element[dimension](this.$element[dimension]())[0].offsetHeight this.$element .addClass('collapsing') .removeClass('collapse in') .attr('aria-expanded', false) this.$trigger .addClass('collapsed') .attr('aria-expanded', false) this.transitioning = 1 var complete = function () { this.transitioning = 0 this.$element .removeClass('collapsing') .addClass('collapse') .trigger('hidden.bs.collapse') } if (!$.support.transition) return complete.call(this) this.$element [dimension](0) .one('bsTransitionEnd', $.proxy(complete, this)) .emulateTransitionEnd(Collapse.TRANSITION_DURATION) } Collapse.prototype.toggle = function () { this[this.$element.hasClass('in') ? 'hide' : 'show']() } Collapse.prototype.getParent = function () { return $(this.options.parent) .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]') .each($.proxy(function (i, element) { var $element = $(element) this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element) }, this)) .end() } Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) { var isOpen = $element.hasClass('in') $element.attr('aria-expanded', isOpen) $trigger .toggleClass('collapsed', !isOpen) .attr('aria-expanded', isOpen) } function getTargetFromTrigger($trigger) { var href var target = $trigger.attr('data-target') || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7 return $(target) } // COLLAPSE PLUGIN DEFINITION // ========================== function Plugin(option) { return this.each(function () { var $this = $(this) var data = $this.data('bs.collapse') var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option) if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false if (!data) $this.data('bs.collapse', (data = new Collapse(this, options))) if (typeof option == 'string') data[option]() }) } var old = $.fn.collapse $.fn.collapse = Plugin $.fn.collapse.Constructor = Collapse // COLLAPSE NO CONFLICT // ==================== $.fn.collapse.noConflict = function () { $.fn.collapse = old return this } // COLLAPSE DATA-API // ================= $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) { var $this = $(this) if (!$this.attr('data-target')) e.preventDefault() var $target = getTargetFromTrigger($this) var data = $target.data('bs.collapse') var option = data ? 'toggle' : $this.data() Plugin.call($target, option) }) }(jQuery); /* ======================================================================== * Bootstrap: dropdown.js v3.3.7 * http://getbootstrap.com/javascript/#dropdowns * ======================================================================== * Copyright 2011-2016 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * ======================================================================== */ +function ($) { 'use strict'; // DROPDOWN CLASS DEFINITION // ========================= var backdrop = '.dropdown-backdrop' var toggle = '[data-toggle="dropdown"]' var Dropdown = function (element) { $(element).on('click.bs.dropdown', this.toggle) } Dropdown.VERSION = '3.3.7' function getParent($this) { var selector = $this.attr('data-target') if (!selector) { selector = $this.attr('href') selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 } var $parent = selector && $(selector) return $parent && $parent.length ? $parent : $this.parent() } function clearMenus(e) { if (e && e.which === 3) return $(backdrop).remove() $(toggle).each(function () { var $this = $(this) var $parent = getParent($this) var relatedTarget = { relatedTarget: this } if (!$parent.hasClass('open')) return if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget)) if (e.isDefaultPrevented()) return $this.attr('aria-expanded', 'false') $parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget)) }) } Dropdown.prototype.toggle = function (e) { var $this = $(this) if ($this.is('.disabled, :disabled')) return var $parent = getParent($this) var isActive = $parent.hasClass('open') clearMenus() if (!isActive) { if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) { // if mobile we use a backdrop because click events don't delegate $(document.createElement('div')) .addClass('dropdown-backdrop') .insertAfter($(this)) .on('click', clearMenus) } var relatedTarget = { relatedTarget: this } $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget)) if (e.isDefaultPrevented()) return $this .trigger('focus') .attr('aria-expanded', 'true') $parent .toggleClass('open') .trigger($.Event('shown.bs.dropdown', relatedTarget)) } return false } Dropdown.prototype.keydown = function (e) { if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return var $this = $(this) e.preventDefault() e.stopPropagation() if ($this.is('.disabled, :disabled')) return var $parent = getParent($this) var isActive = $parent.hasClass('open') if (!isActive && e.which != 27 || isActive && e.which == 27) { if (e.which == 27) $parent.find(toggle).trigger('focus') return $this.trigger('click') } var desc = ' li:not(.disabled):visible a' var $items = $parent.find('.dropdown-menu' + desc) if (!$items.length) return var index = $items.index(e.target) if (e.which == 38 && index > 0) index-- // up if (e.which == 40 && index < $items.length - 1) index++ // down if (!~index) index = 0 $items.eq(index).trigger('focus') } // DROPDOWN PLUGIN DEFINITION // ========================== function Plugin(option) { return this.each(function () { var $this = $(this) var data = $this.data('bs.dropdown') if (!data) $this.data('bs.dropdown', (data = new Dropdown(this))) if (typeof option == 'string') data[option].call($this) }) } var old = $.fn.dropdown $.fn.dropdown = Plugin $.fn.dropdown.Constructor = Dropdown // DROPDOWN NO CONFLICT // ==================== $.fn.dropdown.noConflict = function () { $.fn.dropdown = old return this } // APPLY TO STANDARD DROPDOWN ELEMENTS // =================================== $(document) .on('click.bs.dropdown.data-api', clearMenus) .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle) .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown) .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown) }(jQuery); /* ======================================================================== * Bootstrap: modal.js v3.3.7 * http://getbootstrap.com/javascript/#modals * ======================================================================== * Copyright 2011-2016 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * ======================================================================== */ +function ($) { 'use strict'; // MODAL CLASS DEFINITION // ====================== var Modal = function (element, options) { this.options = options this.$body = $(document.body) this.$element = $(element) this.$dialog = this.$element.find('.modal-dialog') this.$backdrop = null this.isShown = null this.originalBodyPad = null this.scrollbarWidth = 0 this.ignoreBackdropClick = false if (this.options.remote) { this.$element .find('.modal-content') .load(this.options.remote, $.proxy(function () { this.$element.trigger('loaded.bs.modal') }, this)) } } Modal.VERSION = '3.3.7' Modal.TRANSITION_DURATION = 300 Modal.BACKDROP_TRANSITION_DURATION = 150 Modal.DEFAULTS = { backdrop: true, keyboard: true, show: true } Modal.prototype.toggle = function (_relatedTarget) { return this.isShown ? this.hide() : this.show(_relatedTarget) } Modal.prototype.show = function (_relatedTarget) { var that = this var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget }) this.$element.trigger(e) if (this.isShown || e.isDefaultPrevented()) return this.isShown = true this.checkScrollbar() this.setScrollbar() this.$body.addClass('modal-open') this.escape() this.resize() this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this)) this.$dialog.on('mousedown.dismiss.bs.modal', function () { that.$element.one('mouseup.dismiss.bs.modal', function (e) { if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true }) }) this.backdrop(function () { var transition = $.support.transition && that.$element.hasClass('fade') if (!that.$element.parent().length) { that.$element.appendTo(that.$body) // don't move modals dom position } that.$element .show() .scrollTop(0) that.adjustDialog() if (transition) { that.$element[0].offsetWidth // force reflow } that.$element.addClass('in') that.enforceFocus() var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget }) transition ? that.$dialog // wait for modal to slide in .one('bsTransitionEnd', function () { that.$element.trigger('focus').trigger(e) }) .emulateTransitionEnd(Modal.TRANSITION_DURATION) : that.$element.trigger('focus').trigger(e) }) } Modal.prototype.hide = function (e) { if (e) e.preventDefault() e = $.Event('hide.bs.modal') this.$element.trigger(e) if (!this.isShown || e.isDefaultPrevented()) return this.isShown = false this.escape() this.resize() $(document).off('focusin.bs.modal') this.$element .removeClass('in') .off('click.dismiss.bs.modal') .off('mouseup.dismiss.bs.modal') this.$dialog.off('mousedown.dismiss.bs.modal') $.support.transition && this.$element.hasClass('fade') ? this.$element .one('bsTransitionEnd', $.proxy(this.hideModal, this)) .emulateTransitionEnd(Modal.TRANSITION_DURATION) : this.hideModal() } Modal.prototype.enforceFocus = function () { $(document) .off('focusin.bs.modal') // guard against infinite focus loop .on('focusin.bs.modal', $.proxy(function (e) { if (document !== e.target && this.$element[0] !== e.target && !this.$element.has(e.target).length) { this.$element.trigger('focus') } }, this)) } Modal.prototype.escape = function () { if (this.isShown && this.options.keyboard) { this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) { e.which == 27 && this.hide() }, this)) } else if (!this.isShown) { this.$element.off('keydown.dismiss.bs.modal') } } Modal.prototype.resize = function () { if (this.isShown) { $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this)) } else { $(window).off('resize.bs.modal') } } Modal.prototype.hideModal = function () { var that = this this.$element.hide() this.backdrop(function () { that.$body.removeClass('modal-open') that.resetAdjustments() that.resetScrollbar() that.$element.trigger('hidden.bs.modal') }) } Modal.prototype.removeBackdrop = function () { this.$backdrop && this.$backdrop.remove() this.$backdrop = null } Modal.prototype.backdrop = function (callback) { var that = this var animate = this.$element.hasClass('fade') ? 'fade' : '' if (this.isShown && this.options.backdrop) { var doAnimate = $.support.transition && animate this.$backdrop = $(document.createElement('div')) .addClass('modal-backdrop ' + animate) .appendTo(this.$body) this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) { if (this.ignoreBackdropClick) { this.ignoreBackdropClick = false return } if (e.target !== e.currentTarget) return this.options.backdrop == 'static' ? this.$element[0].focus() : this.hide() }, this)) if (doAnimate) this.$backdrop[0].offsetWidth // force reflow this.$backdrop.addClass('in') if (!callback) return doAnimate ? this.$backdrop .one('bsTransitionEnd', callback) .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) : callback() } else if (!this.isShown && this.$backdrop) { this.$backdrop.removeClass('in') var callbackRemove = function () { that.removeBackdrop() callback && callback() } $.support.transition && this.$element.hasClass('fade') ? this.$backdrop .one('bsTransitionEnd', callbackRemove) .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) : callbackRemove() } else if (callback) { callback() } } // these following methods are used to handle overflowing modals Modal.prototype.handleUpdate = function () { this.adjustDialog() } Modal.prototype.adjustDialog = function () { var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight this.$element.css({ paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '', paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : '' }) } Modal.prototype.resetAdjustments = function () { this.$element.css({ paddingLeft: '', paddingRight: '' }) } Modal.prototype.checkScrollbar = function () { var fullWindowWidth = window.innerWidth if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8 var documentElementRect = document.documentElement.getBoundingClientRect() fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left) } this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth this.scrollbarWidth = this.measureScrollbar() } Modal.prototype.setScrollbar = function () { var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10) this.originalBodyPad = document.body.style.paddingRight || '' if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth) } Modal.prototype.resetScrollbar = function () { this.$body.css('padding-right', this.originalBodyPad) } Modal.prototype.measureScrollbar = function () { // thx walsh var scrollDiv = document.createElement('div') scrollDiv.className = 'modal-scrollbar-measure' this.$body.append(scrollDiv) var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth this.$body[0].removeChild(scrollDiv) return scrollbarWidth } // MODAL PLUGIN DEFINITION // ======================= function Plugin(option, _relatedTarget) { return this.each(function () { var $this = $(this) var data = $this.data('bs.modal') var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option) if (!data) $this.data('bs.modal', (data = new Modal(this, options))) if (typeof option == 'string') data[option](_relatedTarget) else if (options.show) data.show(_relatedTarget) }) } var old = $.fn.modal $.fn.modal = Plugin $.fn.modal.Constructor = Modal // MODAL NO CONFLICT // ================= $.fn.modal.noConflict = function () { $.fn.modal = old return this } // MODAL DATA-API // ============== $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) { var $this = $(this) var href = $this.attr('href') var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7 var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data()) if ($this.is('a')) e.preventDefault() $target.one('show.bs.modal', function (showEvent) { if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown $target.one('hidden.bs.modal', function () { $this.is(':visible') && $this.trigger('focus') }) }) Plugin.call($target, option, this) }) }(jQuery); /* ======================================================================== * Bootstrap: tooltip.js v3.3.7 * http://getbootstrap.com/javascript/#tooltip * Inspired by the original jQuery.tipsy by Jason Frame * ======================================================================== * Copyright 2011-2016 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * ======================================================================== */ +function ($) { 'use strict'; // TOOLTIP PUBLIC CLASS DEFINITION // =============================== var Tooltip = function (element, options) { this.type = null this.options = null this.enabled = null this.timeout = null this.hoverState = null this.$element = null this.inState = null this.init('tooltip', element, options) } Tooltip.VERSION = '3.3.7' Tooltip.TRANSITION_DURATION = 150 Tooltip.DEFAULTS = { animation: true, placement: 'top', selector: false, template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>', trigger: 'hover focus', title: '', delay: 0, html: false, container: false, viewport: { selector: 'body', padding: 0 } } Tooltip.prototype.init = function (type, element, options) { this.enabled = true this.type = type this.$element = $(element) this.options = this.getOptions(options) this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport)) this.inState = { click: false, hover: false, focus: false } if (this.$element[0] instanceof document.constructor && !this.options.selector) { throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!') } var triggers = this.options.trigger.split(' ') for (var i = triggers.length; i--;) { var trigger = triggers[i] if (trigger == 'click') { this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this)) } else if (trigger != 'manual') { var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin' var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout' this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this)) this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this)) } } this.options.selector ? (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) : this.fixTitle() } Tooltip.prototype.getDefaults = function () { return Tooltip.DEFAULTS } Tooltip.prototype.getOptions = function (options) { options = $.extend({}, this.getDefaults(), this.$element.data(), options) if (options.delay && typeof options.delay == 'number') { options.delay = { show: options.delay, hide: options.delay } } return options } Tooltip.prototype.getDelegateOptions = function () { var options = {} var defaults = this.getDefaults() this._options && $.each(this._options, function (key, value) { if (defaults[key] != value) options[key] = value }) return options } Tooltip.prototype.enter = function (obj) { var self = obj instanceof this.constructor ? obj : $(obj.currentTarget).data('bs.' + this.type) if (!self) { self = new this.constructor(obj.currentTarget, this.getDelegateOptions()) $(obj.currentTarget).data('bs.' + this.type, self) } if (obj instanceof $.Event) { self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true } if (self.tip().hasClass('in') || self.hoverState == 'in') { self.hoverState = 'in' return } clearTimeout(self.timeout) self.hoverState = 'in' if (!self.options.delay || !self.options.delay.show) return self.show() self.timeout = setTimeout(function () { if (self.hoverState == 'in') self.show() }, self.options.delay.show) } Tooltip.prototype.isInStateTrue = function () { for (var key in this.inState) { if (this.inState[key]) return true } return false } Tooltip.prototype.leave = function (obj) { var self = obj instanceof this.constructor ? obj : $(obj.currentTarget).data('bs.' + this.type) if (!self) { self = new this.constructor(obj.currentTarget, this.getDelegateOptions()) $(obj.currentTarget).data('bs.' + this.type, self) } if (obj instanceof $.Event) { self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false } if (self.isInStateTrue()) return clearTimeout(self.timeout) self.hoverState = 'out' if (!self.options.delay || !self.options.delay.hide) return self.hide() self.timeout = setTimeout(function () { if (self.hoverState == 'out') self.hide() }, self.options.delay.hide) } Tooltip.prototype.show = function () { var e = $.Event('show.bs.' + this.type) if (this.hasContent() && this.enabled) { this.$element.trigger(e) var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0]) if (e.isDefaultPrevented() || !inDom) return var that = this var $tip = this.tip() var tipId = this.getUID(this.type) this.setContent() $tip.attr('id', tipId) this.$element.attr('aria-describedby', tipId) if (this.options.animation) $tip.addClass('fade') var placement = typeof this.options.placement == 'function' ? this.options.placement.call(this, $tip[0], this.$element[0]) : this.options.placement var autoToken = /\s?auto?\s?/i var autoPlace = autoToken.test(placement) if (autoPlace) placement = placement.replace(autoToken, '') || 'top' $tip .detach() .css({ top: 0, left: 0, display: 'block' }) .addClass(placement) .data('bs.' + this.type, this) this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element) this.$element.trigger('inserted.bs.' + this.type) var pos = this.getPosition() var actualWidth = $tip[0].offsetWidth var actualHeight = $tip[0].offsetHeight if (autoPlace) { var orgPlacement = placement var viewportDim = this.getPosition(this.$viewport) placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top' : placement == 'top' && pos.top - actualHeight < viewportDim.top ? 'bottom' : placement == 'right' && pos.right + actualWidth > viewportDim.width ? 'left' : placement == 'left' && pos.left - actualWidth < viewportDim.left ? 'right' : placement $tip .removeClass(orgPlacement) .addClass(placement) } var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight) this.applyPlacement(calculatedOffset, placement) var complete = function () { var prevHoverState = that.hoverState that.$element.trigger('shown.bs.' + that.type) that.hoverState = null if (prevHoverState == 'out') that.leave(that) } $.support.transition && this.$tip.hasClass('fade') ? $tip .one('bsTransitionEnd', complete) .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) : complete() } } Tooltip.prototype.applyPlacement = function (offset, placement) { var $tip = this.tip() var width = $tip[0].offsetWidth var height = $tip[0].offsetHeight // manually read margins because getBoundingClientRect includes difference var marginTop = parseInt($tip.css('margin-top'), 10) var marginLeft = parseInt($tip.css('margin-left'), 10) // we must check for NaN for ie 8/9 if (isNaN(marginTop)) marginTop = 0 if (isNaN(marginLeft)) marginLeft = 0 offset.top += marginTop offset.left += marginLeft // $.fn.offset doesn't round pixel values // so we use setOffset directly with our own function B-0 $.offset.setOffset($tip[0], $.extend({ using: function (props) { $tip.css({ top: Math.round(props.top), left: Math.round(props.left) }) } }, offset), 0) $tip.addClass('in') // check to see if placing tip in new offset caused the tip to resize itself var actualWidth = $tip[0].offsetWidth var actualHeight = $tip[0].offsetHeight if (placement == 'top' && actualHeight != height) { offset.top = offset.top + height - actualHeight } var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight) if (delta.left) offset.left += delta.left else offset.top += delta.top var isVertical = /top|bottom/.test(placement) var arrowDelta = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight' $tip.offset(offset) this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical) } Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) { this.arrow() .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%') .css(isVertical ? 'top' : 'left', '') } Tooltip.prototype.setContent = function () { var $tip = this.tip() var title = this.getTitle() $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title) $tip.removeClass('fade in top bottom left right') } Tooltip.prototype.hide = function (callback) { var that = this var $tip = $(this.$tip) var e = $.Event('hide.bs.' + this.type) function complete() { if (that.hoverState != 'in') $tip.detach() if (that.$element) { // TODO: Check whether guarding this code with this `if` is really necessary. that.$element .removeAttr('aria-describedby') .trigger('hidden.bs.' + that.type) } callback && callback() } this.$element.trigger(e) if (e.isDefaultPrevented()) return $tip.removeClass('in') $.support.transition && $tip.hasClass('fade') ? $tip .one('bsTransitionEnd', complete) .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) : complete() this.hoverState = null return this } Tooltip.prototype.fixTitle = function () { var $e = this.$element if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') { $e.attr('data-original-title', $e.attr('title') || '').attr('title', '') } } Tooltip.prototype.hasContent = function () { return this.getTitle() } Tooltip.prototype.getPosition = function ($element) { $element = $element || this.$element var el = $element[0] var isBody = el.tagName == 'BODY' var elRect = el.getBoundingClientRect() if (elRect.width == null) { // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093 elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top }) } var isSvg = window.SVGElement && el instanceof window.SVGElement // Avoid using $.offset() on SVGs since it gives incorrect results in jQuery 3. // See https://github.com/twbs/bootstrap/issues/20280 var elOffset = isBody ? { top: 0, left: 0 } : (isSvg ? null : $element.offset()) var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() } var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null return $.extend({}, elRect, scroll, outerDims, elOffset) } Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) { return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } : placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } : placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } : /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width } } Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) { var delta = { top: 0, left: 0 } if (!this.$viewport) return delta var viewportPadding = this.options.viewport && this.options.viewport.padding || 0 var viewportDimensions = this.getPosition(this.$viewport) if (/right|left/.test(placement)) { var topEdgeOffset = pos.top - viewportPadding - viewportDimensions.scroll var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight if (topEdgeOffset < viewportDimensions.top) { // top overflow delta.top = viewportDimensions.top - topEdgeOffset } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset } } else { var leftEdgeOffset = pos.left - viewportPadding var rightEdgeOffset = pos.left + viewportPadding + actualWidth if (leftEdgeOffset < viewportDimensions.left) { // left overflow delta.left = viewportDimensions.left - leftEdgeOffset } else if (rightEdgeOffset > viewportDimensions.right) { // right overflow delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset } } return delta } Tooltip.prototype.getTitle = function () { var title var $e = this.$element var o = this.options title = $e.attr('data-original-title') || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title) return title } Tooltip.prototype.getUID = function (prefix) { do prefix += ~~(Math.random() * 1000000) while (document.getElementById(prefix)) return prefix } Tooltip.prototype.tip = function () { if (!this.$tip) { this.$tip = $(this.options.template) if (this.$tip.length != 1) { throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!') } } return this.$tip } Tooltip.prototype.arrow = function () { return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow')) } Tooltip.prototype.enable = function () { this.enabled = true } Tooltip.prototype.disable = function () { this.enabled = false } Tooltip.prototype.toggleEnabled = function () { this.enabled = !this.enabled } Tooltip.prototype.toggle = function (e) { var self = this if (e) { self = $(e.currentTarget).data('bs.' + this.type) if (!self) { self = new this.constructor(e.currentTarget, this.getDelegateOptions()) $(e.currentTarget).data('bs.' + this.type, self) } } if (e) { self.inState.click = !self.inState.click if (self.isInStateTrue()) self.enter(self) else self.leave(self) } else { self.tip().hasClass('in') ? self.leave(self) : self.enter(self) } } Tooltip.prototype.destroy = function () { var that = this clearTimeout(this.timeout) this.hide(function () { that.$element.off('.' + that.type).removeData('bs.' + that.type) if (that.$tip) { that.$tip.detach() } that.$tip = null that.$arrow = null that.$viewport = null that.$element = null }) } // TOOLTIP PLUGIN DEFINITION // ========================= function Plugin(option) { return this.each(function () { var $this = $(this) var data = $this.data('bs.tooltip') var options = typeof option == 'object' && option if (!data && /destroy|hide/.test(option)) return if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options))) if (typeof option == 'string') data[option]() }) } var old = $.fn.tooltip $.fn.tooltip = Plugin $.fn.tooltip.Constructor = Tooltip // TOOLTIP NO CONFLICT // =================== $.fn.tooltip.noConflict = function () { $.fn.tooltip = old return this } }(jQuery); /* ======================================================================== * Bootstrap: popover.js v3.3.7 * http://getbootstrap.com/javascript/#popovers * ======================================================================== * Copyright 2011-2016 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * ======================================================================== */ +function ($) { 'use strict'; // POPOVER PUBLIC CLASS DEFINITION // =============================== var Popover = function (element, options) { this.init('popover', element, options) } if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js') Popover.VERSION = '3.3.7' Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, { placement: 'right', trigger: 'click', content: '', template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>' }) // NOTE: POPOVER EXTENDS tooltip.js // ================================ Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype) Popover.prototype.constructor = Popover Popover.prototype.getDefaults = function () { return Popover.DEFAULTS } Popover.prototype.setContent = function () { var $tip = this.tip() var title = this.getTitle() var content = this.getContent() $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title) $tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text' ](content) $tip.removeClass('fade top bottom left right in') // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do // this manually by checking the contents. if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide() } Popover.prototype.hasContent = function () { return this.getTitle() || this.getContent() } Popover.prototype.getContent = function () { var $e = this.$element var o = this.options return $e.attr('data-content') || (typeof o.content == 'function' ? o.content.call($e[0]) : o.content) } Popover.prototype.arrow = function () { return (this.$arrow = this.$arrow || this.tip().find('.arrow')) } // POPOVER PLUGIN DEFINITION // ========================= function Plugin(option) { return this.each(function () { var $this = $(this) var data = $this.data('bs.popover') var options = typeof option == 'object' && option if (!data && /destroy|hide/.test(option)) return if (!data) $this.data('bs.popover', (data = new Popover(this, options))) if (typeof option == 'string') data[option]() }) } var old = $.fn.popover $.fn.popover = Plugin $.fn.popover.Constructor = Popover // POPOVER NO CONFLICT // =================== $.fn.popover.noConflict = function () { $.fn.popover = old return this } }(jQuery); /* ======================================================================== * Bootstrap: scrollspy.js v3.3.7 * http://getbootstrap.com/javascript/#scrollspy * ======================================================================== * Copyright 2011-2016 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * ======================================================================== */ +function ($) { 'use strict'; // SCROLLSPY CLASS DEFINITION // ========================== function ScrollSpy(element, options) { this.$body = $(document.body) this.$scrollElement = $(element).is(document.body) ? $(window) : $(element) this.options = $.extend({}, ScrollSpy.DEFAULTS, options) this.selector = (this.options.target || '') + ' .nav li > a' this.offsets = [] this.targets = [] this.activeTarget = null this.scrollHeight = 0 this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this)) this.refresh() this.process() } ScrollSpy.VERSION = '3.3.7' ScrollSpy.DEFAULTS = { offset: 10 } ScrollSpy.prototype.getScrollHeight = function () { return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight) } ScrollSpy.prototype.refresh = function () { var that = this var offsetMethod = 'offset' var offsetBase = 0 this.offsets = [] this.targets = [] this.scrollHeight = this.getScrollHeight() if (!$.isWindow(this.$scrollElement[0])) { offsetMethod = 'position' offsetBase = this.$scrollElement.scrollTop() } this.$body .find(this.selector) .map(function () { var $el = $(this) var href = $el.data('target') || $el.attr('href') var $href = /^#./.test(href) && $(href) return ($href && $href.length && $href.is(':visible') && [[$href[offsetMethod]().top + offsetBase, href]]) || null }) .sort(function (a, b) { return a[0] - b[0] }) .each(function () { that.offsets.push(this[0]) that.targets.push(this[1]) }) } ScrollSpy.prototype.process = function () { var scrollTop = this.$scrollElement.scrollTop() + this.options.offset var scrollHeight = this.getScrollHeight() var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height() var offsets = this.offsets var targets = this.targets var activeTarget = this.activeTarget var i if (this.scrollHeight != scrollHeight) { this.refresh() } if (scrollTop >= maxScroll) { return activeTarget != (i = targets[targets.length - 1]) && this.activate(i) } if (activeTarget && scrollTop < offsets[0]) { this.activeTarget = null return this.clear() } for (i = offsets.length; i--;) { activeTarget != targets[i] && scrollTop >= offsets[i] && (offsets[i + 1] === undefined || scrollTop < offsets[i + 1]) && this.activate(targets[i]) } } ScrollSpy.prototype.activate = function (target) { this.activeTarget = target this.clear() var selector = this.selector + '[data-target="' + target + '"],' + this.selector + '[href="' + target + '"]' var active = $(selector) .parents('li') .addClass('active') if (active.parent('.dropdown-menu').length) { active = active .closest('li.dropdown') .addClass('active') } active.trigger('activate.bs.scrollspy') } ScrollSpy.prototype.clear = function () { $(this.selector) .parentsUntil(this.options.target, '.active') .removeClass('active') } // SCROLLSPY PLUGIN DEFINITION // =========================== function Plugin(option) { return this.each(function () { var $this = $(this) var data = $this.data('bs.scrollspy') var options = typeof option == 'object' && option if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options))) if (typeof option == 'string') data[option]() }) } var old = $.fn.scrollspy $.fn.scrollspy = Plugin $.fn.scrollspy.Constructor = ScrollSpy // SCROLLSPY NO CONFLICT // ===================== $.fn.scrollspy.noConflict = function () { $.fn.scrollspy = old return this } // SCROLLSPY DATA-API // ================== $(window).on('load.bs.scrollspy.data-api', function () { $('[data-spy="scroll"]').each(function () { var $spy = $(this) Plugin.call($spy, $spy.data()) }) }) }(jQuery); /* ======================================================================== * Bootstrap: tab.js v3.3.7 * http://getbootstrap.com/javascript/#tabs * ======================================================================== * Copyright 2011-2016 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * ======================================================================== */ +function ($) { 'use strict'; // TAB CLASS DEFINITION // ==================== var Tab = function (element) { // jscs:disable requireDollarBeforejQueryAssignment this.element = $(element) // jscs:enable requireDollarBeforejQueryAssignment } Tab.VERSION = '3.3.7' Tab.TRANSITION_DURATION = 150 Tab.prototype.show = function () { var $this = this.element var $ul = $this.closest('ul:not(.dropdown-menu)') var selector = $this.data('target') if (!selector) { selector = $this.attr('href') selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 } if ($this.parent('li').hasClass('active')) return var $previous = $ul.find('.active:last a') var hideEvent = $.Event('hide.bs.tab', { relatedTarget: $this[0] }) var showEvent = $.Event('show.bs.tab', { relatedTarget: $previous[0] }) $previous.trigger(hideEvent) $this.trigger(showEvent) if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return var $target = $(selector) this.activate($this.closest('li'), $ul) this.activate($target, $target.parent(), function () { $previous.trigger({ type: 'hidden.bs.tab', relatedTarget: $this[0] }) $this.trigger({ type: 'shown.bs.tab', relatedTarget: $previous[0] }) }) } Tab.prototype.activate = function (element, container, callback) { var $active = container.find('> .active') var transition = callback && $.support.transition && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length) function next() { $active .removeClass('active') .find('> .dropdown-menu > .active') .removeClass('active') .end() .find('[data-toggle="tab"]') .attr('aria-expanded', false) element .addClass('active') .find('[data-toggle="tab"]') .attr('aria-expanded', true) if (transition) { element[0].offsetWidth // reflow for transition element.addClass('in') } else { element.removeClass('fade') } if (element.parent('.dropdown-menu').length) { element .closest('li.dropdown') .addClass('active') .end() .find('[data-toggle="tab"]') .attr('aria-expanded', true) } callback && callback() } $active.length && transition ? $active .one('bsTransitionEnd', next) .emulateTransitionEnd(Tab.TRANSITION_DURATION) : next() $active.removeClass('in') } // TAB PLUGIN DEFINITION // ===================== function Plugin(option) { return this.each(function () { var $this = $(this) var data = $this.data('bs.tab') if (!data) $this.data('bs.tab', (data = new Tab(this))) if (typeof option == 'string') data[option]() }) } var old = $.fn.tab $.fn.tab = Plugin $.fn.tab.Constructor = Tab // TAB NO CONFLICT // =============== $.fn.tab.noConflict = function () { $.fn.tab = old return this } // TAB DATA-API // ============ var clickHandler = function (e) { e.preventDefault() Plugin.call($(this), 'show') } $(document) .on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler) .on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler) }(jQuery); /* ======================================================================== * Bootstrap: affix.js v3.3.7 * http://getbootstrap.com/javascript/#affix * ======================================================================== * Copyright 2011-2016 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * ======================================================================== */ +function ($) { 'use strict'; // AFFIX CLASS DEFINITION // ====================== var Affix = function (element, options) { this.options = $.extend({}, Affix.DEFAULTS, options) this.$target = $(this.options.target) .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this)) .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this)) this.$element = $(element) this.affixed = null this.unpin = null this.pinnedOffset = null this.checkPosition() } Affix.VERSION = '3.3.7' Affix.RESET = 'affix affix-top affix-bottom' Affix.DEFAULTS = { offset: 0, target: window } Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) { var scrollTop = this.$target.scrollTop() var position = this.$element.offset() var targetHeight = this.$target.height() if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false if (this.affixed == 'bottom') { if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom' return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom' } var initializing = this.affixed == null var colliderTop = initializing ? scrollTop : position.top var colliderHeight = initializing ? targetHeight : height if (offsetTop != null && scrollTop <= offsetTop) return 'top' if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom' return false } Affix.prototype.getPinnedOffset = function () { if (this.pinnedOffset) return this.pinnedOffset this.$element.removeClass(Affix.RESET).addClass('affix') var scrollTop = this.$target.scrollTop() var position = this.$element.offset() return (this.pinnedOffset = position.top - scrollTop) } Affix.prototype.checkPositionWithEventLoop = function () { setTimeout($.proxy(this.checkPosition, this), 1) } Affix.prototype.checkPosition = function () { if (!this.$element.is(':visible')) return var height = this.$element.height() var offset = this.options.offset var offsetTop = offset.top var offsetBottom = offset.bottom var scrollHeight = Math.max($(document).height(), $(document.body).height()) if (typeof offset != 'object') offsetBottom = offsetTop = offset if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element) if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element) var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom) if (this.affixed != affix) { if (this.unpin != null) this.$element.css('top', '') var affixType = 'affix' + (affix ? '-' + affix : '') var e = $.Event(affixType + '.bs.affix') this.$element.trigger(e) if (e.isDefaultPrevented()) return this.affixed = affix this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null this.$element .removeClass(Affix.RESET) .addClass(affixType) .trigger(affixType.replace('affix', 'affixed') + '.bs.affix') } if (affix == 'bottom') { this.$element.offset({ top: scrollHeight - height - offsetBottom }) } } // AFFIX PLUGIN DEFINITION // ======================= function Plugin(option) { return this.each(function () { var $this = $(this) var data = $this.data('bs.affix') var options = typeof option == 'object' && option if (!data) $this.data('bs.affix', (data = new Affix(this, options))) if (typeof option == 'string') data[option]() }) } var old = $.fn.affix $.fn.affix = Plugin $.fn.affix.Constructor = Affix // AFFIX NO CONFLICT // ================= $.fn.affix.noConflict = function () { $.fn.affix = old return this } // AFFIX DATA-API // ============== $(window).on('load', function () { $('[data-spy="affix"]').each(function () { var $spy = $(this) var data = $spy.data() data.offset = data.offset || {} if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom if (data.offsetTop != null) data.offset.top = data.offsetTop Plugin.call($spy, data) }) }) }(jQuery); $(function () { $('.button-checkbox').each(function () { // Settings var $widget = $(this), $button = $widget.find('button'), $checkbox = $widget.find('input:checkbox'), color = $button.data('color'), settings = { on: { icon: 'glyphicon glyphicon-check' }, off: { icon: 'fa fa-square-o' } }; // Event Handlers $button.on('click', function () { $checkbox.prop('checked', !$checkbox.is(':checked')); $checkbox.triggerHandler('change'); updateDisplay(); }); $checkbox.on('change', function () { updateDisplay(); }); // Actions function updateDisplay() { var isChecked = $checkbox.is(':checked'); // Set the button's state $button.data('state', (isChecked) ? "on" : "off"); // Set the button's icon $button.find('.state-icon') .removeClass() .addClass('state-icon ' + settings[$button.data('state')].icon); // Update the button's color if (isChecked) { $button .removeClass('btn-default') .addClass('btn-' + color + ' active'); } else { $button .removeClass('btn-' + color + ' active') .addClass('btn-default'); } } // Initialization function init() { updateDisplay(); // Inject the icon if applicable if ($button.find('.state-icon').length == 0) { $button.prepend('<i class="state-icon ' + settings[$button.data('state')].icon + '"></i> '); } } init(); }); });
Java
#!/bin/sh -e usage() { echo "Usage: ${0} [--structure-only] DATABASE_NAME" } STRUCTURE_ONLY=false if [ "${1}" = --structure-only ]; then STRUCTURE_ONLY=true shift fi DATABASE_NAME="${1}" if [ "${DATABASE_NAME}" = "" ]; then usage exit 1 fi if [ "${STRUCTURE_ONLY}" = true ]; then FILE="${DATABASE_NAME}-structure.sql" else FILE="${DATABASE_NAME}-full.sql" fi if [ -f "${FILE}" ]; then echo "File exists: ${FILE}" exit 1 fi if [ "${STRUCTURE_ONLY}" = true ]; then mysqldump --user=root --password --protocol=tcp --no-data --databases "${DATABASE_NAME}" > "${FILE}" else mysqldump --user=root --password --protocol=tcp --databases "${DATABASE_NAME}" > "${FILE}" fi
Java
<?php /** * @package AcyMailing for Joomla! * @version 5.6.5 * @author acyba.com * @copyright (C) 2009-2017 ACYBA S.A.R.L. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?><?php $name = 'Technology'; $thumb = 'media/com_acymailing/templates/technology_resp/thumb.jpg'; $body = JFile::read(dirname(__FILE__).DS.'index.html'); $styles['tag_h1'] = 'font-size:20px; margin:0px; margin-bottom:15px; padding:0px; font-weight:bold; color:#01bbe5 !important;'; $styles['tag_h2'] = 'font-size:12px; font-weight:bold; color:#565656 !important; text-transform:uppercase; margin:10px 0px; padding:0px; padding-bottom:5px; border-bottom:1px solid #ddd;'; $styles['tag_h3'] = 'color:#565656 !important; font-weight:bold; font-size:12px; margin:0px; margin-bottom:10px; padding:0px;'; $styles['tag_h4'] = ''; $styles['color_bg'] = '#575757'; $styles['tag_a'] = 'cursor:pointer;color:#01bbe5;text-decoration:none;border:none;'; $styles['acymailing_online'] = 'color:#d2d1d1; cursor:pointer;'; $styles['acymailing_unsub'] = 'color:#d2d1d1; cursor:pointer;'; $styles['acymailing_readmore'] = 'cursor:pointer; font-weight:bold; color:#fff; background-color:#01bbe5; padding:2px 5px;'; $stylesheet = 'table, div, p, td { font-family:Arial, Helvetica, sans-serif; font-size:12px; } p{margin:0px; padding:0px} .special h2{font-size:18px; margin:0px; margin-bottom:15px; padding:0px; font-weight:bold; color:#01bbe5 !important; text-transform:none; border:none} .links a{color:#ababab} @media (min-width:10px){ .w600 { width:320px !important;} .w540 { width:260px !important;} .w30 { width:30px !important;} .w600 img {max-width:320px; height:auto !important} .w540 img {max-width:260px; height:auto !important} } @media (min-width: 480px){ .w600 { width:480px !important;} .w540 { width:420px !important;} .w30 { width:30px !important;} .w600 img {max-width:480px; height:auto !important} .w540 img {max-width:420px; height:auto !important} } @media (min-width:600px){ .w600 { width:600px !important;} .w540 { width:540px !important;} .w30 { width:30px !important;} .w600 img {max-width:600px; height:auto !important} .w540 img {max-width:540px; height:auto !important} } ';
Java
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using Windows.UI.Xaml; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace ManagedUnitTests { public static class TestUtilities { /// <summary> /// Handles the difference between InvalidOperationException in managed and native. /// </summary> public static void AssertThrowsInvalidOperationException(Action action) { Assert.ThrowsException<InvalidOperationException>(action); } public static void AssertThrowsArgumentException(Action action) { Assert.ThrowsException<ArgumentException>(action); } public static void AssertDetached(StubBehavior behavior) { Assert.AreEqual(1, behavior.DetachCount, "The Behavior should be detached."); Assert.IsNull(behavior.AssociatedObject, "A Detached Behavior should have a null AssociatedObject."); } public static void AssertNotDetached(StubBehavior behavior) { Assert.AreEqual(0, behavior.DetachCount, "The Behavior should not be detached."); } public static void AssertAttached(StubBehavior behavior, DependencyObject associatedObject) { Assert.AreEqual(1, behavior.AttachCount, "The behavior should be attached."); Assert.AreEqual(associatedObject, behavior.AssociatedObject, "The AssociatedObject of the Behavior should be what it was attached to."); } public static void AssertNotAttached(StubBehavior behavior) { Assert.AreEqual(0, behavior.AttachCount, "The behavior should not be attached."); Assert.IsNull(behavior.AssociatedObject, "The AssociatedObject should be null for a non-attached Behavior."); } } }
Java
<?php namespace EntityManager5178714d05176_546a8d27f194334ee012bfe64f629947b07e4919\__CG__\Doctrine\ORM; /** * CG library enhanced proxy class. * * This code was generated automatically by the CG library, manual changes to it * will be lost upon next generation. */ class EntityManager extends \Doctrine\ORM\EntityManager { private $delegate; private $container; /** * Executes a function in a transaction. * * The function gets passed this EntityManager instance as an (optional) parameter. * * {@link flush} is invoked prior to transaction commit. * * If an exception occurs during execution of the function or flushing or transaction commit, * the transaction is rolled back, the EntityManager closed and the exception re-thrown. * * @param callable $func The function to execute transactionally. * @return mixed Returns the non-empty value returned from the closure or true instead */ public function transactional($func) { return $this->delegate->transactional($func); } /** * Performs a rollback on the underlying database connection. */ public function rollback() { return $this->delegate->rollback(); } /** * Removes an entity instance. * * A removed entity will be removed from the database at or before transaction commit * or as a result of the flush operation. * * @param object $entity The entity instance to remove. */ public function remove($entity) { return $this->delegate->remove($entity); } /** * Refreshes the persistent state of an entity from the database, * overriding any local changes that have not yet been persisted. * * @param object $entity The entity to refresh. */ public function refresh($entity) { return $this->delegate->refresh($entity); } /** * Tells the EntityManager to make an instance managed and persistent. * * The entity will be entered into the database at or before transaction * commit or as a result of the flush operation. * * NOTE: The persist operation always considers entities that are not yet known to * this EntityManager as NEW. Do not pass detached entities to the persist operation. * * @param object $object The instance to make managed and persistent. */ public function persist($entity) { return $this->delegate->persist($entity); } /** * Create a new instance for the given hydration mode. * * @param int $hydrationMode * @return \Doctrine\ORM\Internal\Hydration\AbstractHydrator */ public function newHydrator($hydrationMode) { return $this->delegate->newHydrator($hydrationMode); } /** * Merges the state of a detached entity into the persistence context * of this EntityManager and returns the managed copy of the entity. * The entity passed to merge will not become associated/managed with this EntityManager. * * @param object $entity The detached entity to merge into the persistence context. * @return object The managed copy of the entity. */ public function merge($entity) { return $this->delegate->merge($entity); } /** * Acquire a lock on the given entity. * * @param object $entity * @param int $lockMode * @param int $lockVersion * @throws OptimisticLockException * @throws PessimisticLockException */ public function lock($entity, $lockMode, $lockVersion = NULL) { return $this->delegate->lock($entity, $lockMode, $lockVersion); } /** * Check if the Entity manager is open or closed. * * @return bool */ public function isOpen() { return $this->delegate->isOpen(); } /** * Checks whether the state of the filter collection is clean. * * @return boolean True, if the filter collection is clean. */ public function isFiltersStateClean() { return $this->delegate->isFiltersStateClean(); } /** * Helper method to initialize a lazy loading proxy or persistent collection. * * This method is a no-op for other objects * * @param object $obj */ public function initializeObject($obj) { return $this->delegate->initializeObject($obj); } /** * Checks whether the Entity Manager has filters. * * @return True, if the EM has a filter collection. */ public function hasFilters() { return $this->delegate->hasFilters(); } /** * Gets the UnitOfWork used by the EntityManager to coordinate operations. * * @return \Doctrine\ORM\UnitOfWork */ public function getUnitOfWork() { return $this->delegate->getUnitOfWork(); } /** * Gets the repository for an entity class. * * @param string $entityName The name of the entity. * @return EntityRepository The repository class. */ public function getRepository($className) { $repository = $this->delegate->getRepository($className); if ($repository instanceof \Symfony\Component\DependencyInjection\ContainerAwareInterface) { $repository->setContainer($this->container); return $repository; } if (null !== $metadata = $this->container->get("jms_di_extra.metadata.metadata_factory")->getMetadataForClass(get_class($repository))) { foreach ($metadata->classMetadata as $classMetadata) { foreach ($classMetadata->methodCalls as $call) { list($method, $arguments) = $call; call_user_func_array(array($repository, $method), $this->prepareArguments($arguments)); } } } return $repository; } /** * Gets a reference to the entity identified by the given type and identifier * without actually loading it, if the entity is not yet loaded. * * @param string $entityName The name of the entity type. * @param mixed $id The entity identifier. * @return object The entity reference. */ public function getReference($entityName, $id) { return $this->delegate->getReference($entityName, $id); } /** * Gets the proxy factory used by the EntityManager to create entity proxies. * * @return ProxyFactory */ public function getProxyFactory() { return $this->delegate->getProxyFactory(); } /** * Gets a partial reference to the entity identified by the given type and identifier * without actually loading it, if the entity is not yet loaded. * * The returned reference may be a partial object if the entity is not yet loaded/managed. * If it is a partial object it will not initialize the rest of the entity state on access. * Thus you can only ever safely access the identifier of an entity obtained through * this method. * * The use-cases for partial references involve maintaining bidirectional associations * without loading one side of the association or to update an entity without loading it. * Note, however, that in the latter case the original (persistent) entity data will * never be visible to the application (especially not event listeners) as it will * never be loaded in the first place. * * @param string $entityName The name of the entity type. * @param mixed $identifier The entity identifier. * @return object The (partial) entity reference. */ public function getPartialReference($entityName, $identifier) { return $this->delegate->getPartialReference($entityName, $identifier); } /** * Gets the metadata factory used to gather the metadata of classes. * * @return \Doctrine\ORM\Mapping\ClassMetadataFactory */ public function getMetadataFactory() { return $this->delegate->getMetadataFactory(); } /** * Gets a hydrator for the given hydration mode. * * This method caches the hydrator instances which is used for all queries that don't * selectively iterate over the result. * * @param int $hydrationMode * @return \Doctrine\ORM\Internal\Hydration\AbstractHydrator */ public function getHydrator($hydrationMode) { return $this->delegate->getHydrator($hydrationMode); } /** * Gets the enabled filters. * * @return FilterCollection The active filter collection. */ public function getFilters() { return $this->delegate->getFilters(); } /** * Gets an ExpressionBuilder used for object-oriented construction of query expressions. * * Example: * * <code> * $qb = $em->createQueryBuilder(); * $expr = $em->getExpressionBuilder(); * $qb->select('u')->from('User', 'u') * ->where($expr->orX($expr->eq('u.id', 1), $expr->eq('u.id', 2))); * </code> * * @return \Doctrine\ORM\Query\Expr */ public function getExpressionBuilder() { return $this->delegate->getExpressionBuilder(); } /** * Gets the EventManager used by the EntityManager. * * @return \Doctrine\Common\EventManager */ public function getEventManager() { return $this->delegate->getEventManager(); } /** * Gets the database connection object used by the EntityManager. * * @return \Doctrine\DBAL\Connection */ public function getConnection() { return $this->delegate->getConnection(); } /** * Gets the Configuration used by the EntityManager. * * @return \Doctrine\ORM\Configuration */ public function getConfiguration() { return $this->delegate->getConfiguration(); } /** * Returns the ORM metadata descriptor for a class. * * The class name must be the fully-qualified class name without a leading backslash * (as it is returned by get_class($obj)) or an aliased class name. * * Examples: * MyProject\Domain\User * sales:PriceRequest * * @return \Doctrine\ORM\Mapping\ClassMetadata * @internal Performance-sensitive method. */ public function getClassMetadata($className) { return $this->delegate->getClassMetadata($className); } /** * Flushes all changes to objects that have been queued up to now to the database. * This effectively synchronizes the in-memory state of managed objects with the * database. * * If an entity is explicitly passed to this method only this entity and * the cascade-persist semantics + scheduled inserts/removals are synchronized. * * @param object $entity * @throws \Doctrine\ORM\OptimisticLockException If a version check on an entity that * makes use of optimistic locking fails. */ public function flush($entity = NULL) { return $this->delegate->flush($entity); } /** * Finds an Entity by its identifier. * * @param string $entityName * @param mixed $id * @param integer $lockMode * @param integer $lockVersion * * @return object */ public function find($entityName, $id, $lockMode = 0, $lockVersion = NULL) { return $this->delegate->find($entityName, $id, $lockMode, $lockVersion); } /** * Detaches an entity from the EntityManager, causing a managed entity to * become detached. Unflushed changes made to the entity if any * (including removal of the entity), will not be synchronized to the database. * Entities which previously referenced the detached entity will continue to * reference it. * * @param object $entity The entity to detach. */ public function detach($entity) { return $this->delegate->detach($entity); } /** * Create a QueryBuilder instance * * @return QueryBuilder $qb */ public function createQueryBuilder() { return $this->delegate->createQueryBuilder(); } /** * Creates a new Query object. * * @param string $dql The DQL string. * @return \Doctrine\ORM\Query */ public function createQuery($dql = '') { return $this->delegate->createQuery($dql); } /** * Creates a native SQL query. * * @param string $sql * @param ResultSetMapping $rsm The ResultSetMapping to use. * @return NativeQuery */ public function createNativeQuery($sql, \Doctrine\ORM\Query\ResultSetMapping $rsm) { return $this->delegate->createNativeQuery($sql, $rsm); } /** * Creates a Query from a named query. * * @param string $name * @return \Doctrine\ORM\Query */ public function createNamedQuery($name) { return $this->delegate->createNamedQuery($name); } /** * Creates a NativeQuery from a named native query. * * @param string $name * @return \Doctrine\ORM\NativeQuery */ public function createNamedNativeQuery($name) { return $this->delegate->createNamedNativeQuery($name); } /** * Creates a copy of the given entity. Can create a shallow or a deep copy. * * @param object $entity The entity to copy. * @return object The new entity. * @todo Implementation need. This is necessary since $e2 = clone $e1; throws an E_FATAL when access anything on $e: * Fatal error: Maximum function nesting level of '100' reached, aborting! */ public function copy($entity, $deep = false) { return $this->delegate->copy($entity, $deep); } /** * Determines whether an entity instance is managed in this EntityManager. * * @param object $entity * @return boolean TRUE if this EntityManager currently manages the given entity, FALSE otherwise. */ public function contains($entity) { return $this->delegate->contains($entity); } /** * Commits a transaction on the underlying database connection. */ public function commit() { return $this->delegate->commit(); } /** * Closes the EntityManager. All entities that are currently managed * by this EntityManager become detached. The EntityManager may no longer * be used after it is closed. */ public function close() { return $this->delegate->close(); } /** * Clears the EntityManager. All entities that are currently managed * by this EntityManager become detached. * * @param string $entityName if given, only entities of this type will get detached */ public function clear($entityName = NULL) { return $this->delegate->clear($entityName); } /** * Starts a transaction on the underlying database connection. */ public function beginTransaction() { return $this->delegate->beginTransaction(); } public function __construct($objectManager, \Symfony\Component\DependencyInjection\ContainerInterface $container) { $this->delegate = $objectManager; $this->container = $container; } private function prepareArguments(array $arguments) { $processed = array(); foreach ($arguments as $arg) { if ($arg instanceof \Symfony\Component\DependencyInjection\Reference) { $processed[] = $this->container->get((string) $arg, $arg->getInvalidBehavior()); } else if ($arg instanceof \Symfony\Component\DependencyInjection\Parameter) { $processed[] = $this->container->getParameter((string) $arg); } else { $processed[] = $arg; } } return $processed; } }
Java
<a name="2.7.8"></a> ## 2.7.8 (2016-03-20) * Added new blog to showcase ([d7be966](https://github.com/kikobeats/uno-zen/commit/d7be966)) * Apply effect in tag version as well. ([266f331](https://github.com/kikobeats/uno-zen/commit/266f331)) * Merge pull request #183 from binaryfever/patch-1 ([93ff62a](https://github.com/kikobeats/uno-zen/commit/93ff62a)) * Merge pull request #184 from Mooash/master ([4e1db0c](https://github.com/kikobeats/uno-zen/commit/4e1db0c)) * Removing blog ([5c92c32](https://github.com/kikobeats/uno-zen/commit/5c92c32)) * Update ([db0c527](https://github.com/kikobeats/uno-zen/commit/db0c527)) <a name="2.7.7"></a> ## 2.7.7 (2016-03-11) * 2.7.7 releases ([509a564](https://github.com/kikobeats/uno-zen/commit/509a564)) * Add more stuff ([5c0ac0a](https://github.com/kikobeats/uno-zen/commit/5c0ac0a)) * Add Uno Urban announcement 🎉 ([5702f48](https://github.com/kikobeats/uno-zen/commit/5702f48)) * Update README.md ([8fc16c8](https://github.com/kikobeats/uno-zen/commit/8fc16c8)) <a name="2.7.6"></a> ## 2.7.6 (2016-02-23) * 2.7.6 releases ([b139bba](https://github.com/kikobeats/uno-zen/commit/b139bba)) * Fix typo ([4624cff](https://github.com/kikobeats/uno-zen/commit/4624cff)) * Remove unnecessary ([7a8567b](https://github.com/kikobeats/uno-zen/commit/7a8567b)) <a name="2.7.5"></a> ## 2.7.5 (2016-02-22) * 2.7.5 releases ([780d021](https://github.com/kikobeats/uno-zen/commit/780d021)) * Fix line height ([6fb493a](https://github.com/kikobeats/uno-zen/commit/6fb493a)) * Fix paged views ([6fee7d0](https://github.com/kikobeats/uno-zen/commit/6fee7d0)) * Remove unnecessary ([c21188f](https://github.com/kikobeats/uno-zen/commit/c21188f)) * Setup correctly font weight ([f95cdf6](https://github.com/kikobeats/uno-zen/commit/f95cdf6)) * Setup correctly line-height ([1881c5d](https://github.com/kikobeats/uno-zen/commit/1881c5d)) * setup root directory ([b4685cb](https://github.com/kikobeats/uno-zen/commit/b4685cb)) * Use bold keyword ([9199dfd](https://github.com/kikobeats/uno-zen/commit/9199dfd)) <a name="2.7.4"></a> ## 2.7.4 (2016-02-20) * 2.7.4 releases ([58c7dac](https://github.com/kikobeats/uno-zen/commit/58c7dac)) * adjust font base ([2bfbadc](https://github.com/kikobeats/uno-zen/commit/2bfbadc)) * fix build ([6ed5cb2](https://github.com/kikobeats/uno-zen/commit/6ed5cb2)) * Fix build ([26cd27a](https://github.com/kikobeats/uno-zen/commit/26cd27a)) * Fix travis ([1392630](https://github.com/kikobeats/uno-zen/commit/1392630)) * improve template ([45ca19d](https://github.com/kikobeats/uno-zen/commit/45ca19d)) * upgrade node ([90e3564](https://github.com/kikobeats/uno-zen/commit/90e3564)) <a name="2.7.3"></a> ## 2.7.3 (2016-02-02) * 2.7.3 releases ([d4ab6cd](https://github.com/kikobeats/uno-zen/commit/d4ab6cd)) * Adjust cover margins ([e9d257f](https://github.com/kikobeats/uno-zen/commit/e9d257f)) * Adjust sidebar margins ([7e7ca13](https://github.com/kikobeats/uno-zen/commit/7e7ca13)) * move into scripts ([72e9522](https://github.com/kikobeats/uno-zen/commit/72e9522)) * Update README.md ([e4ca41a](https://github.com/kikobeats/uno-zen/commit/e4ca41a)) <a name="2.7.2"></a> ## 2.7.2 (2016-01-19) * 2.7.2 releases ([275a187](https://github.com/kikobeats/uno-zen/commit/275a187)) * Fic W3C Validations ([7a45489](https://github.com/kikobeats/uno-zen/commit/7a45489)) * Move external font into link tag ([cb1869a](https://github.com/kikobeats/uno-zen/commit/cb1869a)) <a name="2.7.1"></a> ## 2.7.1 (2016-01-19) * 2.7.1 releases ([27fe347](https://github.com/kikobeats/uno-zen/commit/27fe347)) * edit readme for clarity ([0dc5cb5](https://github.com/kikobeats/uno-zen/commit/0dc5cb5)) * fix grammar errors and edit for clarity ([524df2a](https://github.com/kikobeats/uno-zen/commit/524df2a)) * Fix highlights code blocks ([220e75c](https://github.com/kikobeats/uno-zen/commit/220e75c)) * Merge pull request #171 from martinms-usc/master ([fa245d0](https://github.com/kikobeats/uno-zen/commit/fa245d0)) <a name="2.7.0"></a> # 2.7.0 (2016-01-09) * 2.7.0 releases ([e36ef50](https://github.com/kikobeats/uno-zen/commit/e36ef50)) * Add 4ts.io blog as a showcase ([3e60322](https://github.com/kikobeats/uno-zen/commit/3e60322)) * Add travis ([ef69dac](https://github.com/kikobeats/uno-zen/commit/ef69dac)) * Add travis tests ([a09c269](https://github.com/kikobeats/uno-zen/commit/a09c269)) * Delete unnecessary css ([c7b5936](https://github.com/kikobeats/uno-zen/commit/c7b5936)) * Little refactor ([349ff87](https://github.com/kikobeats/uno-zen/commit/349ff87)) * Little refactor ([11a62e5](https://github.com/kikobeats/uno-zen/commit/11a62e5)) * Merge pull request #164 from apolikamixitos/master ([0b3c5b1](https://github.com/kikobeats/uno-zen/commit/0b3c5b1)) * Merge pull request #168 from waja/post_list_headline ([c43f0dc](https://github.com/kikobeats/uno-zen/commit/c43f0dc)) * Replace the https with http of 4ts.io blog ([7d7bf0f](https://github.com/kikobeats/uno-zen/commit/7d7bf0f)) * This makes the headline of the post list page customizable. ([e81896c](https://github.com/kikobeats/uno-zen/commit/e81896c)), closes [#166](https://github.com/kikobeats/uno-zen/issues/166) * Update README.md ([a0b0185](https://github.com/kikobeats/uno-zen/commit/a0b0185)) * Update README.md ([260960d](https://github.com/kikobeats/uno-zen/commit/260960d)) * Update showcase section ([4fceeab](https://github.com/kikobeats/uno-zen/commit/4fceeab)) * Update SHOWCASE.md ([a48fb41](https://github.com/kikobeats/uno-zen/commit/a48fb41)) * Update SHOWCASE.md ([108285f](https://github.com/kikobeats/uno-zen/commit/108285f)) * Update SHOWCASE.md ([0727494](https://github.com/kikobeats/uno-zen/commit/0727494)) <a name="2.6.10"></a> ## 2.6.10 (2016-01-06) * 2.6.10 releases ([231370f](https://github.com/kikobeats/uno-zen/commit/231370f)) * Add gulp-shortand dep ([3e46534](https://github.com/kikobeats/uno-zen/commit/3e46534)) * Add Related section ([c35a0d3](https://github.com/kikobeats/uno-zen/commit/c35a0d3)) * Add Setup section ([01073c1](https://github.com/kikobeats/uno-zen/commit/01073c1)) * Adjust prism build ([7bdbdc6](https://github.com/kikobeats/uno-zen/commit/7bdbdc6)) * Better JS minification ([c68fa03](https://github.com/kikobeats/uno-zen/commit/c68fa03)) * Fix typo ([a6fedf8](https://github.com/kikobeats/uno-zen/commit/a6fedf8)) * Refactor footer ([7219ada](https://github.com/kikobeats/uno-zen/commit/7219ada)) * Remove unnecessary dependency ([3da45d5](https://github.com/kikobeats/uno-zen/commit/3da45d5)) <a name="2.6.9"></a> ## 2.6.9 (2015-12-31) * 2.6.9 releases ([57f63f8](https://github.com/kikobeats/uno-zen/commit/57f63f8)) * Add default static page template ([0d102d8](https://github.com/kikobeats/uno-zen/commit/0d102d8)) * Added brief description of build.sh script. ([e6420f8](https://github.com/kikobeats/uno-zen/commit/e6420f8)) * Added build script to create archive for usage with Ghost(pro). ([bb67bc5](https://github.com/kikobeats/uno-zen/commit/bb67bc5)) * Merge pull request #157 from devillex/kikobeats-master ([3225bd2](https://github.com/kikobeats/uno-zen/commit/3225bd2)) <a name="2.6.8"></a> ## 2.6.8 (2015-12-30) * 2.6.8 releases ([62bf4d2](https://github.com/kikobeats/uno-zen/commit/62bf4d2)) * Extract post-author into a partial ([430f4f3](https://github.com/kikobeats/uno-zen/commit/430f4f3)) * Fix #153 ([d63d508](https://github.com/kikobeats/uno-zen/commit/d63d508)), closes [#153](https://github.com/kikobeats/uno-zen/issues/153) <a name="2.6.7"></a> ## 2.6.7 (2015-12-28) * 2.6.7 releases ([71db207](https://github.com/kikobeats/uno-zen/commit/71db207)) * Fix #151 ([b4337d1](https://github.com/kikobeats/uno-zen/commit/b4337d1)), closes [#151](https://github.com/kikobeats/uno-zen/issues/151) <a name="2.6.6"></a> ## 2.6.6 (2015-12-26) * 2.6.6 releases ([ed1553a](https://github.com/kikobeats/uno-zen/commit/ed1553a)) * Removed wait for DOM ([6f5e8f2](https://github.com/kikobeats/uno-zen/commit/6f5e8f2)) * Update to include inline version ([9c9e757](https://github.com/kikobeats/uno-zen/commit/9c9e757)) <a name="2.6.5"></a> ## 2.6.5 (2015-12-22) * _mixins.scss doesn't exist. The variables $cover-primary and $cover-secondary are in _variables.scs ([f4ac947](https://github.com/kikobeats/uno-zen/commit/f4ac947)) * 2.6.5 releases ([06cf240](https://github.com/kikobeats/uno-zen/commit/06cf240)) * Fix timeAgo function ([398e691](https://github.com/kikobeats/uno-zen/commit/398e691)) * Merge pull request #146 from alexlovescoding/patch-1 ([49ae326](https://github.com/kikobeats/uno-zen/commit/49ae326)) * Remove twemoji ([161bd5c](https://github.com/kikobeats/uno-zen/commit/161bd5c)) * Update DOCUMENTATION.md ([04f89a1](https://github.com/kikobeats/uno-zen/commit/04f89a1)) <a name="2.6.4"></a> ## 2.6.4 (2015-12-16) * 2.6.4 releases ([09500d9](https://github.com/kikobeats/uno-zen/commit/09500d9)) * 2.6.4 releases ([3662203](https://github.com/kikobeats/uno-zen/commit/3662203)) <a name="2.6.3"></a> ## 2.6.3 (2015-12-13) * 2.6.3 releases ([51476d9](https://github.com/kikobeats/uno-zen/commit/51476d9)) * Add mail template ([c70fe70](https://github.com/kikobeats/uno-zen/commit/c70fe70)) * Add Zepto as recommendation (#144) ([03b3d61](https://github.com/kikobeats/uno-zen/commit/03b3d61)) * Fix #140 ([191ac93](https://github.com/kikobeats/uno-zen/commit/191ac93)), closes [#140](https://github.com/kikobeats/uno-zen/issues/140) * Update DOCUMENTATION.md ([f308683](https://github.com/kikobeats/uno-zen/commit/f308683)) <a name="2.6.2"></a> ## 2.6.2 (2015-12-10) * 2.6.2 releases ([20c2774](https://github.com/kikobeats/uno-zen/commit/20c2774)) * added prism ([c1a2371](https://github.com/kikobeats/uno-zen/commit/c1a2371)) * Adjust margins and deleted duplicated rules ([2c081fe](https://github.com/kikobeats/uno-zen/commit/2c081fe)) <a name="2.6.1"></a> ## 2.6.1 (2015-12-04) * 2.6.1 releases ([fa953e3](https://github.com/kikobeats/uno-zen/commit/fa953e3)) * fixed highlight syntax for non detected language ([abb2212](https://github.com/kikobeats/uno-zen/commit/abb2212)) <a name="2.6.0"></a> # 2.6.0 (2015-12-03) * 2.6.0 releases ([7e6736a](https://github.com/kikobeats/uno-zen/commit/7e6736a)) * adjust blockquotes margins ([4ae9f7e](https://github.com/kikobeats/uno-zen/commit/4ae9f7e)) * deleted some duplicate rules and format files ([3851935](https://github.com/kikobeats/uno-zen/commit/3851935)) * improved mobile view ([6ab6ad5](https://github.com/kikobeats/uno-zen/commit/6ab6ad5)) * Merge pull request #135 from Kikobeats/beta ([ce0ac71](https://github.com/kikobeats/uno-zen/commit/ce0ac71)) * updated bumped settings ([5a911c6](https://github.com/kikobeats/uno-zen/commit/5a911c6)) <a name="2.6.0-rc.4"></a> # 2.6.0-rc.4 (2015-11-23) * Added node version badge ([efa7ba4](https://github.com/kikobeats/uno-zen/commit/efa7ba4)) * added to automatically change the version ([997cfa0](https://github.com/kikobeats/uno-zen/commit/997cfa0)) * little improvement in inline code style ([1a0c6db](https://github.com/kikobeats/uno-zen/commit/1a0c6db)) * refactor margins and font from titles ([8dec9ea](https://github.com/kikobeats/uno-zen/commit/8dec9ea)) * refactor margins to be constant ([7a003fb](https://github.com/kikobeats/uno-zen/commit/7a003fb)) * refactor prism theme to be similar to github gist ([dc65f71](https://github.com/kikobeats/uno-zen/commit/dc65f71)) * refactor quotes style ([3362c0b](https://github.com/kikobeats/uno-zen/commit/3362c0b)) <a name="2.6.0-rc.3"></a> # 2.6.0-rc.3 (2015-11-20) * Fixed #124 ([fca6b83](https://github.com/kikobeats/uno-zen/commit/fca6b83)), closes [#124](https://github.com/kikobeats/uno-zen/issues/124) * Tag view similar to index view ([3f2160c](https://github.com/kikobeats/uno-zen/commit/3f2160c)) <a name="2.6.0-rc.2"></a> # 2.6.0-rc.2 (2015-11-15) * 2.6.0-rc.2 ([427d429](https://github.com/kikobeats/uno-zen/commit/427d429)) * add prism as dependency ([2f8aaf5](https://github.com/kikobeats/uno-zen/commit/2f8aaf5)) * Added twemoji as dependency ([f150cdc](https://github.com/kikobeats/uno-zen/commit/f150cdc)) * adjust breadcrumbs on mobile ([673d0af](https://github.com/kikobeats/uno-zen/commit/673d0af)) * adjust margins...again. ([570d08c](https://github.com/kikobeats/uno-zen/commit/570d08c)) * adjust padding in links ([b77b378](https://github.com/kikobeats/uno-zen/commit/b77b378)) * adjust post list media queries ([58fa32d](https://github.com/kikobeats/uno-zen/commit/58fa32d)) * adjust read time for post lists ([fad1086](https://github.com/kikobeats/uno-zen/commit/fad1086)) * be posible to setup a different open button ([af17af5](https://github.com/kikobeats/uno-zen/commit/af17af5)) * changed twitter share link. Fixed #108 ([014dac8](https://github.com/kikobeats/uno-zen/commit/014dac8)), closes [#108](https://github.com/kikobeats/uno-zen/issues/108) * first approach of posts ([c33125d](https://github.com/kikobeats/uno-zen/commit/c33125d)) * fixed #114 #112 #111 #109 ([86dc8e0](https://github.com/kikobeats/uno-zen/commit/86dc8e0)), closes [#114](https://github.com/kikobeats/uno-zen/issues/114) [#112](https://github.com/kikobeats/uno-zen/issues/112) [#111](https://github.com/kikobeats/uno-zen/issues/111) [#109](https://github.com/kikobeats/uno-zen/issues/109) * fixed pagination extra space ([561d5a4](https://github.com/kikobeats/uno-zen/commit/561d5a4)) * fixed post list margins ([fe7a001](https://github.com/kikobeats/uno-zen/commit/fe7a001)) * improved a:hover style ([e8610a4](https://github.com/kikobeats/uno-zen/commit/e8610a4)) * mark and selection color based in $secondary-color ([3810a2c](https://github.com/kikobeats/uno-zen/commit/3810a2c)) * Merge pull request #105 from foorb/patch-1 ([42a4631](https://github.com/kikobeats/uno-zen/commit/42a4631)) * Merge pull request #113 from foorb/master ([7c83395](https://github.com/kikobeats/uno-zen/commit/7c83395)) * Merge pull request #127 from foorb/master ([ddc76a3](https://github.com/kikobeats/uno-zen/commit/ddc76a3)) * mixins renamed into utils ([4747b0a](https://github.com/kikobeats/uno-zen/commit/4747b0a)) * Refactor meta tags in the same place ([244e9a5](https://github.com/kikobeats/uno-zen/commit/244e9a5)) * Update DOCUMENTATION.md ([57953a2](https://github.com/kikobeats/uno-zen/commit/57953a2)) * Update README.md ([6ce84ef](https://github.com/kikobeats/uno-zen/commit/6ce84ef)) * Update showcase ([1e374cf](https://github.com/kikobeats/uno-zen/commit/1e374cf)) <a name="2.5.7"></a> ## 2.5.7 (2015-10-11) * 2.5.7 releases ([3c54914](https://github.com/kikobeats/uno-zen/commit/3c54914)) * Fix some styles errors with the scroll bars ([2f3b578](https://github.com/kikobeats/uno-zen/commit/2f3b578)) * Merge pull request #101 from ManRueda/master ([95d0b8b](https://github.com/kikobeats/uno-zen/commit/95d0b8b)) * Merge pull request #103 from foorb/patch-1 ([ba968b1](https://github.com/kikobeats/uno-zen/commit/ba968b1)) * Merge pull request #104 from foorb/patch-2 ([c7a8ddf](https://github.com/kikobeats/uno-zen/commit/c7a8ddf)) * selection color ([d790df5](https://github.com/kikobeats/uno-zen/commit/d790df5)) * Update README.md ([4a012a3](https://github.com/kikobeats/uno-zen/commit/4a012a3)) <a name="2.5.6"></a> ## 2.5.6 (2015-10-08) * 2.5.6 releases ([fd225da](https://github.com/kikobeats/uno-zen/commit/fd225da)) * Added IFTT recipe for know new releases ([936e4fd](https://github.com/kikobeats/uno-zen/commit/936e4fd)) * added scrollbar behavior. Adjusted z-index ([d3b998e](https://github.com/kikobeats/uno-zen/commit/d3b998e)) * added ToC ([0636bc2](https://github.com/kikobeats/uno-zen/commit/0636bc2)) * adjust aside shadow. Fixed #72 ([54a693e](https://github.com/kikobeats/uno-zen/commit/54a693e)), closes [#72](https://github.com/kikobeats/uno-zen/issues/72) * Adjusted aside behavior ([f46c266](https://github.com/kikobeats/uno-zen/commit/f46c266)) * compare operator ([65a3549](https://github.com/kikobeats/uno-zen/commit/65a3549)) * Fixed #97 ([b329940](https://github.com/kikobeats/uno-zen/commit/b329940)), closes [#97](https://github.com/kikobeats/uno-zen/issues/97) * improve install/update ([b7a01e6](https://github.com/kikobeats/uno-zen/commit/b7a01e6)) * little improvements ([30cad77](https://github.com/kikobeats/uno-zen/commit/30cad77)) * Merge pull request #98 from foorb/master ([1136f56](https://github.com/kikobeats/uno-zen/commit/1136f56)) * Merge pull request #99 from foorb/master ([3db5355](https://github.com/kikobeats/uno-zen/commit/3db5355)) * Merge remote-tracking branch 'Kikobeats/master' ([16cb4d6](https://github.com/kikobeats/uno-zen/commit/16cb4d6)) * removed unnecessary file ([69f25ea](https://github.com/kikobeats/uno-zen/commit/69f25ea)) * update README ([3507855](https://github.com/kikobeats/uno-zen/commit/3507855)) * update README.md ([b2fd76e](https://github.com/kikobeats/uno-zen/commit/b2fd76e)) * update README.md ([6175a95](https://github.com/kikobeats/uno-zen/commit/6175a95)) * update README.md ([c9c3254](https://github.com/kikobeats/uno-zen/commit/c9c3254)) * update README.md ([c377cea](https://github.com/kikobeats/uno-zen/commit/c377cea)) * update README.md ([61a84a3](https://github.com/kikobeats/uno-zen/commit/61a84a3)) * update README.md ([83ca7ae](https://github.com/kikobeats/uno-zen/commit/83ca7ae)) * update README.md ([5a19e2a](https://github.com/kikobeats/uno-zen/commit/5a19e2a)) * update README.md ([4a61614](https://github.com/kikobeats/uno-zen/commit/4a61614)) * Update README.md ([d0a56f0](https://github.com/kikobeats/uno-zen/commit/d0a56f0)) * Update README.md ([714f4e3](https://github.com/kikobeats/uno-zen/commit/714f4e3)) * Update README.md ([7d594c4](https://github.com/kikobeats/uno-zen/commit/7d594c4)) * Update README.md ([ffc6d89](https://github.com/kikobeats/uno-zen/commit/ffc6d89)) <a name="2.5.5"></a> ## 2.5.5 (2015-10-04) * 2.5.5 releases ([a3357b8](https://github.com/kikobeats/uno-zen/commit/a3357b8)) * adjust scripts ([0dfb6b2](https://github.com/kikobeats/uno-zen/commit/0dfb6b2)) * first commit ([92ba10b](https://github.com/kikobeats/uno-zen/commit/92ba10b)) * Fixed #88 ([696d98a](https://github.com/kikobeats/uno-zen/commit/696d98a)), closes [#88](https://github.com/kikobeats/uno-zen/issues/88) * Fixed #91 ([6be573b](https://github.com/kikobeats/uno-zen/commit/6be573b)), closes [#91](https://github.com/kikobeats/uno-zen/issues/91) * fixed #96 ([a5ea9e6](https://github.com/kikobeats/uno-zen/commit/a5ea9e6)), closes [#96](https://github.com/kikobeats/uno-zen/issues/96) * Fixed how to setup cover ([6decadc](https://github.com/kikobeats/uno-zen/commit/6decadc)) * git clone first ([d7f0a35](https://github.com/kikobeats/uno-zen/commit/d7f0a35)) * improve scripts ([cc04a44](https://github.com/kikobeats/uno-zen/commit/cc04a44)) * Merge pull request #93 from Loo7Oopeit/patch-1 ([07f741f](https://github.com/kikobeats/uno-zen/commit/07f741f)) * Merge pull request #94 from Loo7Oopeit/patch-2 ([974de7a](https://github.com/kikobeats/uno-zen/commit/974de7a)) * Update install.sh ([c388147](https://github.com/kikobeats/uno-zen/commit/c388147)) * Update README.md ([c2f05af](https://github.com/kikobeats/uno-zen/commit/c2f05af)) * Update README.md ([6fbb42b](https://github.com/kikobeats/uno-zen/commit/6fbb42b)) * Update README.md ([32e7bbc](https://github.com/kikobeats/uno-zen/commit/32e7bbc)) * updated ([5339968](https://github.com/kikobeats/uno-zen/commit/5339968)) * using git https ([758acde](https://github.com/kikobeats/uno-zen/commit/758acde)) <a name="2.5.4"></a> ## 2.5.4 (2015-09-24) * 2.5.4 releases ([d5b0a40](https://github.com/kikobeats/uno-zen/commit/d5b0a40)) * Fixes #82 ([4beffad](https://github.com/kikobeats/uno-zen/commit/4beffad)), closes [#82](https://github.com/kikobeats/uno-zen/issues/82) * Fixes #84 ([1374e31](https://github.com/kikobeats/uno-zen/commit/1374e31)), closes [#84](https://github.com/kikobeats/uno-zen/issues/84) * order properties ([7ce8ab9](https://github.com/kikobeats/uno-zen/commit/7ce8ab9)) * Update README.md ([949ec4a](https://github.com/kikobeats/uno-zen/commit/949ec4a)) * Update README.md ([e5c7a73](https://github.com/kikobeats/uno-zen/commit/e5c7a73)) <a name="2.5.3"></a> ## 2.5.3 (2015-09-18) * 2.5.3 releases ([1413b36](https://github.com/kikobeats/uno-zen/commit/1413b36)) * Added a note about how to inject jQuery ([b83c9ed](https://github.com/kikobeats/uno-zen/commit/b83c9ed)) * Added installation script ([fe12f5f](https://github.com/kikobeats/uno-zen/commit/fe12f5f)) * Fixed #77 ([50d01a2](https://github.com/kikobeats/uno-zen/commit/50d01a2)), closes [#77](https://github.com/kikobeats/uno-zen/issues/77) * little refactor ([0fca530](https://github.com/kikobeats/uno-zen/commit/0fca530)) * Moved documentation section ([05a9f70](https://github.com/kikobeats/uno-zen/commit/05a9f70)) * Update README.md ([c0c0574](https://github.com/kikobeats/uno-zen/commit/c0c0574)) <a name="2.5.2"></a> ## 2.5.2 (2015-09-11) * 2.5.2 releases ([e697c12](https://github.com/kikobeats/uno-zen/commit/e697c12)) * Fixed #50 ([074f743](https://github.com/kikobeats/uno-zen/commit/074f743)), closes [#50](https://github.com/kikobeats/uno-zen/issues/50) * Fixed #68 ([fe8b32d](https://github.com/kikobeats/uno-zen/commit/fe8b32d)), closes [#68](https://github.com/kikobeats/uno-zen/issues/68) * Fixes #70 ([7110954](https://github.com/kikobeats/uno-zen/commit/7110954)), closes [#70](https://github.com/kikobeats/uno-zen/issues/70) * jQuery injection from ghost_foot instead of inline ([1b2e852](https://github.com/kikobeats/uno-zen/commit/1b2e852)) <a name="2.5.1"></a> ## 2.5.1 (2015-09-09) * 2.5.1 releases ([a7dab00](https://github.com/kikobeats/uno-zen/commit/a7dab00)) * fixed 404 page style ([60e2f18](https://github.com/kikobeats/uno-zen/commit/60e2f18)) <a name="2.5.0"></a> # 2.5.0 (2015-09-09) * 2.5.0 releases ([28bb310](https://github.com/kikobeats/uno-zen/commit/28bb310)) * added #64 and #65 into showcase ([5541b0d](https://github.com/kikobeats/uno-zen/commit/5541b0d)) * added jQuery dependency ([b8b815f](https://github.com/kikobeats/uno-zen/commit/b8b815f)) * fixed hamburguer button space in tablet ([10acd12](https://github.com/kikobeats/uno-zen/commit/10acd12)) * linted using CSSOrder ([9121c68](https://github.com/kikobeats/uno-zen/commit/9121c68)) * replace behavior for event ([43bf742](https://github.com/kikobeats/uno-zen/commit/43bf742)) * separated background from filter ([1beb4fe](https://github.com/kikobeats/uno-zen/commit/1beb4fe)) * Update README.md ([b7d8e7a](https://github.com/kikobeats/uno-zen/commit/b7d8e7a)) * updated ([a0a162d](https://github.com/kikobeats/uno-zen/commit/a0a162d)) * updated information. Now compatible with Ghost 0.7 🎉 ([fe343d1](https://github.com/kikobeats/uno-zen/commit/fe343d1)) <a name="2.4.0"></a> # 2.4.0 (2015-08-31) * 2.4.0 releases ([033fd58](https://github.com/kikobeats/uno-zen/commit/033fd58)) * Improve twitter share. rel me tag for social links ([eef7556](https://github.com/kikobeats/uno-zen/commit/eef7556)) <a name="2.3.5"></a> ## 2.3.5 (2015-08-24) * 2.3.5 releases ([3ec3d83](https://github.com/kikobeats/uno-zen/commit/3ec3d83)) * Added gln blog ([e8887b1](https://github.com/kikobeats/uno-zen/commit/e8887b1)) * added iayon blog ([44db987](https://github.com/kikobeats/uno-zen/commit/44db987)) * Fixed navigation URLs ([fe64b69](https://github.com/kikobeats/uno-zen/commit/fe64b69)) * Merge pull request #54 from jcdenton/navigation_urls_fix ([58dc121](https://github.com/kikobeats/uno-zen/commit/58dc121)) * renamed partial links into navigation ([fdfc2bc](https://github.com/kikobeats/uno-zen/commit/fdfc2bc)) * search hover also for focus ([2f6905f](https://github.com/kikobeats/uno-zen/commit/2f6905f)) <a name="2.3.4"></a> ## 2.3.4 (2015-08-15) * 2.3.4 releases ([8eba3af](https://github.com/kikobeats/uno-zen/commit/8eba3af)) * 2.3.4 releases (again) ([ec8352c](https://github.com/kikobeats/uno-zen/commit/ec8352c)) * Add Blog link by default. ([1198895](https://github.com/kikobeats/uno-zen/commit/1198895)) * Added customize aside title and subtitle ([4755ace](https://github.com/kikobeats/uno-zen/commit/4755ace)) * disable multiaccount support by default ([82c91d4](https://github.com/kikobeats/uno-zen/commit/82c91d4)) * Improve multiaccount support ([2f71d11](https://github.com/kikobeats/uno-zen/commit/2f71d11)) * Improve twitter share link based in a url native helper. ([6328b03](https://github.com/kikobeats/uno-zen/commit/6328b03)) * Include URL as-is. ([533f796](https://github.com/kikobeats/uno-zen/commit/533f796)) * little details in title and readTime ([eb95489](https://github.com/kikobeats/uno-zen/commit/eb95489)) * Make Google Analytics and Disqus use variables from admin panel. ([2aebfbe](https://github.com/kikobeats/uno-zen/commit/2aebfbe)) * Merge pull request #47 from RReverser/out-of-the-box ([efcb4e3](https://github.com/kikobeats/uno-zen/commit/efcb4e3)) * removed dot from post title ([33786a5](https://github.com/kikobeats/uno-zen/commit/33786a5)) * removed dot from title ([64c6d4c](https://github.com/kikobeats/uno-zen/commit/64c6d4c)) * Revert author in aside (Ghost doesn't provide it for entire blog). ([9b26637](https://github.com/kikobeats/uno-zen/commit/9b26637)) * Update DOCUMENTATION.md ([4aaa2ed](https://github.com/kikobeats/uno-zen/commit/4aaa2ed)) * Use blog title and author's name by default on main page. ([7ffad11](https://github.com/kikobeats/uno-zen/commit/7ffad11)) * Use links from Ghost navigation settings. ([4d9bfb3](https://github.com/kikobeats/uno-zen/commit/4d9bfb3)) <a name="2.3.3"></a> ## 2.3.3 (2015-08-14) * 2.3.3 releases ([78603e5](https://github.com/kikobeats/uno-zen/commit/78603e5)) * Added robinz blog ([0508ca9](https://github.com/kikobeats/uno-zen/commit/0508ca9)) * main overflow based in a class instead of css inline ([ffa9893](https://github.com/kikobeats/uno-zen/commit/ffa9893)) * Merge branch 'robincsamuel-master' ([4090e2b](https://github.com/kikobeats/uno-zen/commit/4090e2b)) <a name="2.3.2"></a> ## 2.3.2 (2015-08-14) * 2.3.2 releases ([d2484ff](https://github.com/kikobeats/uno-zen/commit/d2484ff)) * added rel attribute in pagination elements ([530174e](https://github.com/kikobeats/uno-zen/commit/530174e)) <a name="2.3.1"></a> ## 2.3.1 (2015-08-12) * 2.3.1 releases ([f953974](https://github.com/kikobeats/uno-zen/commit/f953974)) * compiled again ([b877428](https://github.com/kikobeats/uno-zen/commit/b877428)) * fixed little bug in blog button selector ([e9c9a5c](https://github.com/kikobeats/uno-zen/commit/e9c9a5c)) * Update README.md ([79546b7](https://github.com/kikobeats/uno-zen/commit/79546b7)) <a name="2.3.0"></a> # 2.3.0 (2015-08-07) * 2.3.0 releases ([0b04906](https://github.com/kikobeats/uno-zen/commit/0b04906)) * added next and prev buttons ([3c1ddd2](https://github.com/kikobeats/uno-zen/commit/3c1ddd2)) * adjust error page margins ([cb39bef](https://github.com/kikobeats/uno-zen/commit/cb39bef)) <a name="2.2.7"></a> ## 2.2.7 (2015-08-07) * 2.2.7 releases ([f02fd1f](https://github.com/kikobeats/uno-zen/commit/f02fd1f)) * better way to generate post font size and margins ([49a6e49](https://github.com/kikobeats/uno-zen/commit/49a6e49)) * little improvements ([d23b3aa](https://github.com/kikobeats/uno-zen/commit/d23b3aa)) <a name="2.2.6"></a> ## 2.2.6 (2015-08-07) * 2.2.6 releases ([635d176](https://github.com/kikobeats/uno-zen/commit/635d176)) * fixed code block in lists ([dd734bd](https://github.com/kikobeats/uno-zen/commit/dd734bd)) * Merge pull request #41 from Kikobeats/list_code_block ([47e8622](https://github.com/kikobeats/uno-zen/commit/47e8622)) * updated preview ([325b602](https://github.com/kikobeats/uno-zen/commit/325b602)) <a name="2.2.5"></a> ## 2.2.5 (2015-08-02) * 2.2.5 releases ([8ff45c8](https://github.com/kikobeats/uno-zen/commit/8ff45c8)) * added bumped settings for the next time ([2dce395](https://github.com/kikobeats/uno-zen/commit/2dce395)) * new look 💄 and little refactor 😎 ([829208c](https://github.com/kikobeats/uno-zen/commit/829208c)) * updated ([a77f336](https://github.com/kikobeats/uno-zen/commit/a77f336)) <a name="2.2.4"></a> ## 2.2.4 (2015-07-24) * 2.2.4 releases. ([e70b282](https://github.com/kikobeats/uno-zen/commit/e70b282)) * Update README.md ([67b0e80](https://github.com/kikobeats/uno-zen/commit/67b0e80)) * Update README.md ([0ebd385](https://github.com/kikobeats/uno-zen/commit/0ebd385)) * Update README.md ([9e710fc](https://github.com/kikobeats/uno-zen/commit/9e710fc)) * Update README.md ([d39172f](https://github.com/kikobeats/uno-zen/commit/d39172f)) * Update README.md ([e229e5b](https://github.com/kikobeats/uno-zen/commit/e229e5b)) <a name="2.2.3"></a> ## 2.2.3 (2015-06-19) * 2.2.3 releases ([c2bc650](https://github.com/kikobeats/uno-zen/commit/c2bc650)) * Fixes overflow below 1024px ([d598d74](https://github.com/kikobeats/uno-zen/commit/d598d74)) * Merge pull request #28 from kutyel/overflow ([1177c24](https://github.com/kikobeats/uno-zen/commit/1177c24)) <a name="2.2.2"></a> ## 2.2.2 (2015-06-12) * 2.2.2 releases ([07a1486](https://github.com/kikobeats/uno-zen/commit/07a1486)) * added moar blogs into showcase 🙌 ([ec5edcf](https://github.com/kikobeats/uno-zen/commit/ec5edcf)) * Fix profile center in IE ([55a04ad](https://github.com/kikobeats/uno-zen/commit/55a04ad)) * Merge pull request #27 from kutyel/explorer ([91d3af0](https://github.com/kikobeats/uno-zen/commit/91d3af0)) * Update DOCUMENTATION.md ([34b14f2](https://github.com/kikobeats/uno-zen/commit/34b14f2)) * updated ([a355ab0](https://github.com/kikobeats/uno-zen/commit/a355ab0)) * updated ([5c72df8](https://github.com/kikobeats/uno-zen/commit/5c72df8)) <a name="2.2.1"></a> ## 2.2.1 (2015-05-17) * 2.2.1 releases – added about template and fixed little issues ([1181e34](https://github.com/kikobeats/uno-zen/commit/1181e34)) * Update README.md ([409b3de](https://github.com/kikobeats/uno-zen/commit/409b3de)) * Update README.md ([be6bdae](https://github.com/kikobeats/uno-zen/commit/be6bdae)) * Update README.md ([64b5b43](https://github.com/kikobeats/uno-zen/commit/64b5b43)) * Update README.md ([f8b9c6f](https://github.com/kikobeats/uno-zen/commit/f8b9c6f)) * Update README.md ([64febfb](https://github.com/kikobeats/uno-zen/commit/64febfb)) * Update README.md ([a1b9f83](https://github.com/kikobeats/uno-zen/commit/a1b9f83)) * Update README.md ([d284104](https://github.com/kikobeats/uno-zen/commit/d284104)) * Update README.md ([a3226c5](https://github.com/kikobeats/uno-zen/commit/a3226c5)) * Update README.md ([cc485a7](https://github.com/kikobeats/uno-zen/commit/cc485a7)) * Update README.md ([e71f2a9](https://github.com/kikobeats/uno-zen/commit/e71f2a9)) * updated ([b0f6b2f](https://github.com/kikobeats/uno-zen/commit/b0f6b2f)) <a name="2.2.0"></a> # 2.2.0 (2015-05-02) * 2.2.0 releases ([657b473](https://github.com/kikobeats/uno-zen/commit/657b473)) * avoid animate cover in blog post ([34daa8b](https://github.com/kikobeats/uno-zen/commit/34daa8b)) * improved aside behavior ([c0b8897](https://github.com/kikobeats/uno-zen/commit/c0b8897)) * only use blank target in blog links in desktop version ([c909eae](https://github.com/kikobeats/uno-zen/commit/c909eae)) * revert email from author ([8c350bd](https://github.com/kikobeats/uno-zen/commit/8c350bd)) * Update README.md ([d9f9ad4](https://github.com/kikobeats/uno-zen/commit/d9f9ad4)) <a name="2.1.3"></a> ## 2.1.3 (2015-04-10) * 2.1.3 releases ([1465f05](https://github.com/kikobeats/uno-zen/commit/1465f05)) * fixed blog button behavior under mobile/tablet ([b4f9ce6](https://github.com/kikobeats/uno-zen/commit/b4f9ce6)) <a name="2.1.2"></a> ## 2.1.2 (2015-04-02) * first commit ([5406ac6](https://github.com/kikobeats/uno-zen/commit/5406ac6)) * fixed encode url in twitter share button ([698f48b](https://github.com/kikobeats/uno-zen/commit/698f48b)) * post video are now responsive ([8040c5f](https://github.com/kikobeats/uno-zen/commit/8040c5f)) * updated ([e09dc1d](https://github.com/kikobeats/uno-zen/commit/e09dc1d)) <a name="2.1.1"></a> ## 2.1.1 (2015-03-20) * added gittip ([61d4e30](https://github.com/kikobeats/uno-zen/commit/61d4e30)) * added showcase section ([eff30a1](https://github.com/kikobeats/uno-zen/commit/eff30a1)) * fixed links style in list inside post view ([90a14de](https://github.com/kikobeats/uno-zen/commit/90a14de)) * fixed styleguide link ([5fd5273](https://github.com/kikobeats/uno-zen/commit/5fd5273)) * some improves ([157c02b](https://github.com/kikobeats/uno-zen/commit/157c02b)) * updated ([8f42f36](https://github.com/kikobeats/uno-zen/commit/8f42f36)) * updated ([cc6d866](https://github.com/kikobeats/uno-zen/commit/cc6d866)) <a name="2.1.0"></a> # 2.1.0 (2015-03-08) * 2.1.0 releases ([05579f1](https://github.com/kikobeats/uno-zen/commit/05579f1)) * added support for more buttons ([16c807e](https://github.com/kikobeats/uno-zen/commit/16c807e)) * fixed link style in post without affect tags ([e1183dd](https://github.com/kikobeats/uno-zen/commit/e1183dd)) * improve aside ([5da32fb](https://github.com/kikobeats/uno-zen/commit/5da32fb)) * merged ([2faf9df](https://github.com/kikobeats/uno-zen/commit/2faf9df)) <a name="2.0.3"></a> ## 2.0.3 (2015-03-08) * deleted unnecessary button ([7a35681](https://github.com/kikobeats/uno-zen/commit/7a35681)) * experimenting ([5836cfe](https://github.com/kikobeats/uno-zen/commit/5836cfe)) * fixed a style in list elements ([e66c9e6](https://github.com/kikobeats/uno-zen/commit/e66c9e6)) * little improvements ([0a9cd91](https://github.com/kikobeats/uno-zen/commit/0a9cd91)) <a name="2.0.2"></a> ## 2.0.2 (2015-02-27) * 2.0.2 released ([cd1d5c6](https://github.com/kikobeats/uno-zen/commit/cd1d5c6)) * fixed responsive tags in mobile ([5b525e8](https://github.com/kikobeats/uno-zen/commit/5b525e8)) * fixed tags in post view under mobile ([f950a01](https://github.com/kikobeats/uno-zen/commit/f950a01)) * refactor mobile behavior ([ba8b428](https://github.com/kikobeats/uno-zen/commit/ba8b428)) * Update aside.hbs ([90cd34a](https://github.com/kikobeats/uno-zen/commit/90cd34a)) * Update main.coffee ([72ed9cf](https://github.com/kikobeats/uno-zen/commit/72ed9cf)) * Update README.md ([5622963](https://github.com/kikobeats/uno-zen/commit/5622963)) <a name="2.0.1"></a> ## 2.0.1 (2015-02-26) * adjust separator ([d2c82a4](https://github.com/kikobeats/uno-zen/commit/d2c82a4)) * deleted unnecessary dependencies ([b002d24](https://github.com/kikobeats/uno-zen/commit/b002d24)) * deleted unnecessary file ([3378763](https://github.com/kikobeats/uno-zen/commit/3378763)) * fixed some little issues ([f387745](https://github.com/kikobeats/uno-zen/commit/f387745)) * fixing spaces in aside ([92466d0](https://github.com/kikobeats/uno-zen/commit/92466d0)) * Improved device experience ([c61dd55](https://github.com/kikobeats/uno-zen/commit/c61dd55)) * improved documentation ([5a8aa5f](https://github.com/kikobeats/uno-zen/commit/5a8aa5f)) * little refactor ([b6b760a](https://github.com/kikobeats/uno-zen/commit/b6b760a)) * Merge branch 'master' of github.com:Kikobeats/uno-zen ([cbd6219](https://github.com/kikobeats/uno-zen/commit/cbd6219)) * Merge branch 'master' of github.com:Kikobeats/uno-zen ([04542c5](https://github.com/kikobeats/uno-zen/commit/04542c5)) * released 2.0.1 ([dd50f60](https://github.com/kikobeats/uno-zen/commit/dd50f60)) * setup gulp with browserSync ([2e06d19](https://github.com/kikobeats/uno-zen/commit/2e06d19)) * Update README.md ([ee94b22](https://github.com/kikobeats/uno-zen/commit/ee94b22)) * WIP – Added social buttons in post view ([b9d6330](https://github.com/kikobeats/uno-zen/commit/b9d6330)) * WIP – Added styleguide for more things ([c939c1e](https://github.com/kikobeats/uno-zen/commit/c939c1e)) * WIP – Adjust mobile and refactored ([f8d6e19](https://github.com/kikobeats/uno-zen/commit/f8d6e19)) * WIP – adjust search markup ([44801e1](https://github.com/kikobeats/uno-zen/commit/44801e1)) * WIP – Changed into only one share button ([eab7a04](https://github.com/kikobeats/uno-zen/commit/eab7a04)) * WIP – Deleted unnecessary code ([c0369ea](https://github.com/kikobeats/uno-zen/commit/c0369ea)) * WIP – fixed little issues ([f5db7a6](https://github.com/kikobeats/uno-zen/commit/f5db7a6)) * WIP – Fixed search icon ([ee8ca5f](https://github.com/kikobeats/uno-zen/commit/ee8ca5f)) * WIP – fixed social expanded ([b2df5d5](https://github.com/kikobeats/uno-zen/commit/b2df5d5)) * WIP – improved experience in large desktops ([98b0880](https://github.com/kikobeats/uno-zen/commit/98b0880)) * WIP – Improved mobile experience ([4847cd2](https://github.com/kikobeats/uno-zen/commit/4847cd2)) * WIP – little refactor ([dde3c67](https://github.com/kikobeats/uno-zen/commit/dde3c67)) * WIP – Refactor aside into off canvas (table and mobile ([c9149c6](https://github.com/kikobeats/uno-zen/commit/c9149c6)) * WIP – refactor CSS scaffold ([c710928](https://github.com/kikobeats/uno-zen/commit/c710928)) * WIP – refactored 404 view ([63eaef6](https://github.com/kikobeats/uno-zen/commit/63eaef6)) * WIP – refactored and delete unnecessary code ([a3fad93](https://github.com/kikobeats/uno-zen/commit/a3fad93)) * WIP – refactored aside & index ([21e2f3f](https://github.com/kikobeats/uno-zen/commit/21e2f3f)) * WIP – Refactored post views ([db930bb](https://github.com/kikobeats/uno-zen/commit/db930bb)) * WIP – refactored search view ([d7406b3](https://github.com/kikobeats/uno-zen/commit/d7406b3)) * WIP – Refactored tags view and improve style ([dd2f0cf](https://github.com/kikobeats/uno-zen/commit/dd2f0cf)) * WIP – refactored using rem as basic metric ([08bfca2](https://github.com/kikobeats/uno-zen/commit/08bfca2)) * WIP – split scripts in two files ([a109b64](https://github.com/kikobeats/uno-zen/commit/a109b64)) <a name="1.3.2"></a> ## 1.3.2 (2015-02-15) * improved mobile experience ([ca5cc5b](https://github.com/kikobeats/uno-zen/commit/ca5cc5b)) * Update RODAMAP.md ([ee07464](https://github.com/kikobeats/uno-zen/commit/ee07464)) <a name="1.3.1"></a> ## 1.3.1 (2015-02-15) * fixed form in home ([b64489e](https://github.com/kikobeats/uno-zen/commit/b64489e)) <a name="1.3.0"></a> # 1.3.0 (2015-02-15) * improved mobile experience and little refactor ([8074ba0](https://github.com/kikobeats/uno-zen/commit/8074ba0)) <a name="1.2.2"></a> ## 1.2.2 (2015-02-15) * Merge branch 'master' of github.com:Kikobeats/uno-zen ([e5ad9a0](https://github.com/kikobeats/uno-zen/commit/e5ad9a0)) * new build ([506cb0c](https://github.com/kikobeats/uno-zen/commit/506cb0c)) * refactor background filter ([fa4ee2d](https://github.com/kikobeats/uno-zen/commit/fa4ee2d)) * Update README.md ([cb56f93](https://github.com/kikobeats/uno-zen/commit/cb56f93)) <a name="1.2.1"></a> ## 1.2.1 (2015-02-14) * added context function and glitch effect ([d5b2c0f](https://github.com/kikobeats/uno-zen/commit/d5b2c0f)) * added error page ([f572957](https://github.com/kikobeats/uno-zen/commit/f572957)) * added minimal page error css ([7d37e47](https://github.com/kikobeats/uno-zen/commit/7d37e47)) * american style ([bb9d8b5](https://github.com/kikobeats/uno-zen/commit/bb9d8b5)) * fixed back button in high screen resolutions ([36324dc](https://github.com/kikobeats/uno-zen/commit/36324dc)) * formated all css ([3e48c1b](https://github.com/kikobeats/uno-zen/commit/3e48c1b)) <a name="1.1.24"></a> ## 1.1.24 (2015-01-24) * https is better ([646e642](https://github.com/kikobeats/uno-zen/commit/646e642)) * new build ([7a6ce18](https://github.com/kikobeats/uno-zen/commit/7a6ce18)) * removed google analytics meta ([7991a31](https://github.com/kikobeats/uno-zen/commit/7991a31)) * Update bower.json ([9964387](https://github.com/kikobeats/uno-zen/commit/9964387)) * Update package.json ([c5c5ed2](https://github.com/kikobeats/uno-zen/commit/c5c5ed2)) * Update social.hbs ([3d942d8](https://github.com/kikobeats/uno-zen/commit/3d942d8)) * updated google track code ([fe2a544](https://github.com/kikobeats/uno-zen/commit/fe2a544)) <a name="1.1.18"></a> ## 1.1.18 (2015-01-18) * convert post day in days ([8af7134](https://github.com/kikobeats/uno-zen/commit/8af7134)) * Date in days in index page ([1c7105a](https://github.com/kikobeats/uno-zen/commit/1c7105a)) * Update README.md ([8834194](https://github.com/kikobeats/uno-zen/commit/8834194)) <a name="1.1.11"></a> ## 1.1.11 (2015-01-10) * changed how to load google analytics script ([0653e8a](https://github.com/kikobeats/uno-zen/commit/0653e8a)) * CSSCombo is your friend ([85c014a](https://github.com/kikobeats/uno-zen/commit/85c014a)) * fixed button padding ([cd6e493](https://github.com/kikobeats/uno-zen/commit/cd6e493)) * jshint is your friend ([04a3f85](https://github.com/kikobeats/uno-zen/commit/04a3f85)) * new build ([d8b51bb](https://github.com/kikobeats/uno-zen/commit/d8b51bb)) * refactor css scaffold ([746a526](https://github.com/kikobeats/uno-zen/commit/746a526)) * removed bourbon ([52a1011](https://github.com/kikobeats/uno-zen/commit/52a1011)) * renamed using underscore ([e9eca6b](https://github.com/kikobeats/uno-zen/commit/e9eca6b)) * welcome comments ([c9fcb02](https://github.com/kikobeats/uno-zen/commit/c9fcb02)) <a name="1.1.8"></a> ## 1.1.8 (2015-01-08) * merged with develop branch ([350a639](https://github.com/kikobeats/uno-zen/commit/350a639)) <a name="1.1.5"></a> ## 1.1.5 (2015-01-05) * first commit ([5a128ec](https://github.com/kikobeats/uno-zen/commit/5a128ec)) * updated and deleted unnecessary assets ([8b6dd00](https://github.com/kikobeats/uno-zen/commit/8b6dd00))
Java
import {statementType} from "../_utils"; import * as Statements from "../../../src/abap/statements/"; const tests = [ "METHOD zfoobar.", "METHOD foobar by kernel module foobar fail.", "METHOD foobar by kernel module foobar ignore.", "METHOD if_foo~write BY KERNEL MODULE foobar.", "METHOD foobar BY DATABASE PROCEDURE FOR HDB LANGUAGE SQLSCRIPT.", "METHOD blah BY DATABASE PROCEDURE FOR HDB LANGUAGE SQLSCRIPT OPTIONS READ-ONLY.", ]; statementType(tests, "METHOD", Statements.Method);
Java
#! /usr/bin/env node import minimist from 'minimist' import Avifors from './Avifors' import YamlModelBuilder from './model/YamlModelBuilder' import Configuration from './Configuration' import {helpMessage} from './help' import YamlHelper from './tools/YamlHelper' const avifors = new Avifors() const corePlugins = ['./model/plugin', './template/plugin', './commands/plugin'] corePlugins.forEach(plugin => require(plugin).default(avifors)) const argv = minimist(process.argv.slice(2)) const userCommand = argv._[0] if (userCommand === undefined || userCommand === 'help') { console.log(helpMessage) } else { const yamlHelper = new YamlHelper() const config = new Configuration(argv.config, yamlHelper) avifors.loadPlugins(config.plugins) const modelBuilder = new YamlModelBuilder(avifors, yamlHelper) const model = modelBuilder.build(config.modelFiles) avifors.setModel(model) avifors.getCommand(userCommand)({ avifors: avifors, model: model, argv: argv }) }
Java
# ipregex Simple python script to read apache log file and strip out the IP's
Java
# -*- coding: utf-8 -*- import os.path from django.db import models from django.utils.translation import ugettext_lazy as _ from django.conf import settings as django_settings from django.db.models import signals from know.plugins.attachments import settings from know import managers from know.models.pluginbase import ReusablePlugin from know.models.article import BaseRevisionMixin class IllegalFileExtension(Exception): """File extension on upload is not allowed""" pass class Attachment(ReusablePlugin): objects = managers.ArticleFkManager() current_revision = models.OneToOneField( 'AttachmentRevision', verbose_name=_(u'current revision'), blank=True, null=True, related_name='current_set', help_text=_(u'The revision of this attachment currently in use (on all articles using the attachment)'), ) original_filename = models.CharField( max_length=256, verbose_name=_(u'original filename'), blank=True, null=True, ) def can_write(self, **kwargs): user = kwargs.get('user', None) if not settings.ANONYMOUS and (not user or user.is_anonymous()): return False return ReusablePlugin.can_write(self, **kwargs) def can_delete(self, user): return self.can_write(user=user) class Meta: verbose_name = _(u'attachment') verbose_name_plural = _(u'attachments') app_label = settings.APP_LABEL def __unicode__(self): return "%s: %s" % (self.article.current_revision.title, self.original_filename) def extension_allowed(filename): try: extension = filename.split(".")[-1] except IndexError: # No extension raise IllegalFileExtension("No file extension found in filename. That's not okay!") if not extension.lower() in map(lambda x: x.lower(), settings.FILE_EXTENSIONS): raise IllegalFileExtension("The following filename is illegal: %s. Extension has to be one of %s" % (filename, ", ".join(settings.FILE_EXTENSIONS))) return extension def upload_path(instance, filename): from os import path extension = extension_allowed(filename) # Has to match original extension filename if instance.id and instance.attachment and instance.attachment.original_filename: original_extension = instance.attachment.original_filename.split(".")[-1] if not extension.lower() == original_extension: raise IllegalFileExtension("File extension has to be '%s', not '%s'." % (original_extension, extension.lower())) elif instance.attachment: instance.attachment.original_filename = filename upload_path = settings.UPLOAD_PATH upload_path = upload_path.replace('%aid', str(instance.attachment.article.id)) if settings.UPLOAD_PATH_OBSCURIFY: import random import hashlib m = hashlib.md5(str(random.randint(0, 100000000000000))) upload_path = path.join(upload_path, m.hexdigest()) if settings.APPEND_EXTENSION: filename += '.upload' return path.join(upload_path, filename) class AttachmentRevision(BaseRevisionMixin, models.Model): attachment = models.ForeignKey('Attachment') file = models.FileField( upload_to=upload_path, max_length=255, verbose_name=_(u'file'), storage=settings.STORAGE_BACKEND, ) description = models.TextField( blank=True, ) class Meta: verbose_name = _(u'attachment revision') verbose_name_plural = _(u'attachment revisions') ordering = ('created',) get_latest_by = ('revision_number',) app_label = settings.APP_LABEL def get_filename(self): """Used to retrieve the filename of a revision. But attachment.original_filename should always be used in the frontend such that filenames stay consistent.""" # TODO: Perhaps we can let file names change when files are replaced? if not self.file: return None filename = self.file.name.split("/")[-1] return ".".join(filename.split(".")[:-1]) def get_size(self): """Used to retrieve the file size and not cause exceptions.""" try: return self.file.size except OSError: return None except ValueError: return None def save(self, *args, **kwargs): if (not self.id and not self.previous_revision and self.attachment and self.attachment.current_revision and self.attachment.current_revision != self): self.previous_revision = self.attachment.current_revision if not self.revision_number: try: previous_revision = self.attachment.attachmentrevision_set.latest() self.revision_number = previous_revision.revision_number + 1 # NB! The above should not raise the below exception, but somehow it does. except AttachmentRevision.DoesNotExist, Attachment.DoesNotExist: self.revision_number = 1 super(AttachmentRevision, self).save(*args, **kwargs) if not self.attachment.current_revision: # If I'm saved from Django admin, then article.current_revision is me! self.attachment.current_revision = self self.attachment.save() def __unicode__(self): return "%s: %s (r%d)" % (self.attachment.article.current_revision.title, self.attachment.original_filename, self.revision_number) def on_revision_delete(instance, *args, **kwargs): if not instance.file: return # Remove file path = instance.file.path.split("/")[:-1] instance.file.delete(save=False) # Clean up empty directories # Check for empty folders in the path. Delete the first two. if len(path[-1]) == 32: # Path was (most likely) obscurified so we should look 2 levels down max_depth = 2 else: max_depth = 1 for depth in range(0, max_depth): delete_path = "/".join(path[:-depth] if depth > 0 else path) try: if len(os.listdir(os.path.join(django_settings.MEDIA_ROOT, delete_path))) == 0: os.rmdir(delete_path) except OSError: # Raised by os.listdir if directory is missing pass signals.pre_delete.connect(on_revision_delete, AttachmentRevision)
Java
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>dep-map: 32 s 🏆</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.7.1+1 / dep-map - 8.7.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> dep-map <small> 8.7.0 <span class="label label-success">32 s 🏆</span> </small> </h1> <p>📅 <em><script>document.write(moment("2022-01-05 11:27:21 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-01-05 11:27:21 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base camlp5 7.14 Preprocessor-pretty-printer of OCaml conf-findutils 1 Virtual package relying on findutils conf-perl 1 Virtual package relying on perl coq 8.7.1+1 Formal proof management system num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.09.1 The OCaml compiler (virtual package) ocaml-base-compiler 4.09.1 Official release 4.09.1 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.1 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;Hugo.Herbelin@inria.fr&quot; homepage: &quot;https://github.com/coq-contribs/dep-map&quot; license: &quot;CeCILL-B&quot; build: [make &quot;-j%{jobs}%&quot;] install: [make &quot;install&quot;] remove: [&quot;rm&quot; &quot;-R&quot; &quot;%{lib}%/coq/user-contrib/DepMap&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.7&quot; &amp; &lt; &quot;8.8~&quot;} ] tags: [ &quot;keyword: maps&quot; &quot;keyword: dependent maps&quot; &quot;category: Computer Science/Data Types and Data Structures&quot; ] authors: [ &quot;Lionel Rieg &lt;lionel.rieg@college-de-france.fr&gt;&quot; ] bug-reports: &quot;https://github.com/coq-contribs/dep-map/issues&quot; dev-repo: &quot;git+https://github.com/coq-contribs/dep-map.git&quot; synopsis: &quot;Dependent Maps&quot; description: &quot;A rudimentary library for dependent maps that contain their domain in the type.&quot; flags: light-uninstall url { src: &quot;https://github.com/coq-contribs/dep-map/archive/v8.7.0.tar.gz&quot; checksum: &quot;md5=6576a2b104407940b6b4ca38ffdcd041&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install 🏜️</h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-dep-map.8.7.0 coq.8.7.1+1</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam list; echo; ulimit -Sv 4000000; timeout 4h opam install -y --deps-only coq-dep-map.8.7.0 coq.8.7.1+1</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>13 s</dd> </dl> <h2>Install 🚀</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam list; echo; ulimit -Sv 16000000; timeout 4h opam install -y -v coq-dep-map.8.7.0 coq.8.7.1+1</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>32 s</dd> </dl> <h2>Installation size</h2> <p>Total: 2 M</p> <ul> <li>801 K <code>../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/DepMap/DepMapImplementation.vo</code></li> <li>236 K <code>../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/DepMap/DepMapFactsImplementation.vo</code></li> <li>192 K <code>../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/DepMap/DepMap.vo</code></li> <li>128 K <code>../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/DepMap/DepMapImplementation.glob</code></li> <li>111 K <code>../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/DepMap/DepMapFactsInterface.vo</code></li> <li>97 K <code>../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/DepMap/DepMapFactsImplementation.glob</code></li> <li>84 K <code>../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/DepMap/DepMapInterface.vo</code></li> <li>40 K <code>../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/DepMap/DepMapFactsInterface.glob</code></li> <li>29 K <code>../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/DepMap/DepMapInterface.glob</code></li> <li>29 K <code>../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/DepMap/DepMapImplementation.v</code></li> <li>21 K <code>../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/DepMap/Coqlib.vo</code></li> <li>15 K <code>../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/DepMap/DepMapFactsImplementation.v</code></li> <li>6 K <code>../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/DepMap/DepMapInterface.v</code></li> <li>6 K <code>../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/DepMap/DepMapFactsInterface.v</code></li> <li>4 K <code>../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/DepMap/Coqlib.glob</code></li> <li>2 K <code>../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/DepMap/Coqlib.v</code></li> <li>1 K <code>../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/DepMap/DepMap.glob</code></li> <li>1 K <code>../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/DepMap/DepMap.v</code></li> </ul> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq-dep-map.8.7.0</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣 </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
Java
package h1z1.screens; import h1z1.MainFrame; import h1z1.game.GameState; import h1z1.input.ButtonHandler; import h1z1.input.InputButton; import h1z1.input.InputProvider; import h1z1.io.ResourceManager; import javax.imageio.ImageIO; import java.awt.*; import java.util.List; import h1z1.game.Maze; public class PlayGameScreenManager extends ScreenManager { private Maze maze = new Maze(); public PlayGameScreenManager(MainFrame mainFrame) throws Exception { super(mainFrame); } @Override public void update(List<InputProvider> inputs) { } @Override public void paint(Frame frame, Graphics2D graphics) { for(int x = 0; x < Maze.WIDTH; x++){ for(int y = 0; y < Maze.HEIGHT; y++) { boolean value = maze.getValue(x, y); if (value) {graphics.setColor(Color.RED);} else{ graphics.setColor(Color.WHITE); } graphics.fillRect(Maze.OFFSET + Maze.SIZE * x, Maze.OFFSET + Maze.SIZE * y, Maze.SIZE, Maze.SIZE); } } } }
Java
import express from 'express' import cors from 'cors' import bodyParser from 'body-parser' import helmet from 'helmet' import httpStatus from 'http-status' import path from 'path' import routes from './routes' import logger from './helpers/logger.js' const app = express() // Pug app.set('view engine', 'pug') app.set('views', path.join(__dirname, 'views')) // Helmet helps you secure your Express apps by setting various HTTP headers. app.use(helmet()) // Enable CORS app.use(cors()) // To use with Nginx // app.enable('trust proxy') // Parse incoming request bodies in a middleware before your handlers, available under the req.body property. app.use(bodyParser.urlencoded({ extended: true })) app.use(bodyParser.json()) // API Routes app.use('/', routes) // Catch 404 app.get('*', (req, res) => { res.status(404).send({ message: 'Not found' }) }) // Error log app.use((err, req, res, next) => { logger.log(err.level || 'error', err.message) next(err) }) // Error handler app.use((err, req, res, next) => { res.status(err.status || 500).send({ status: err.status || 500, message: err.status ? err.message : httpStatus[500], }) }) export default app
Java
<?php namespace PandaGroup\StoreLocator\Controller\Adminhtml\Index; use Magento\Framework\Exception\LocalizedException; class Save extends \Magento\Backend\App\Action { /** @var \Magento\Framework\App\Request\DataPersistorInterface */ protected $dataPersistor; /** @var \PandaGroup\StoreLocator\Model\RegionsData */ protected $regionsData; /** @var \PandaGroup\StoreLocator\Model\States */ protected $states; /** @var \PandaGroup\StoreLocator\Model\StatesFactory */ protected $statesFactory; /** @var \PandaGroup\StoreLocator\Logger\Logger */ protected $logger; public function __construct( \Magento\Backend\App\Action\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\App\Request\DataPersistorInterface $dataPersistor, \PandaGroup\StoreLocator\Model\RegionsData $regionsData, \PandaGroup\StoreLocator\Model\States $states, \PandaGroup\StoreLocator\Model\StatesFactory $statesFactory, \PandaGroup\StoreLocator\Logger\Logger $logger ) { $this->dataPersistor = $dataPersistor; $this->regionsData = $regionsData; $this->states = $states; $this->statesFactory = $statesFactory; $this->logger = $logger; parent::__construct($context); } public function execute() { /** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */ $resultRedirect = $this->resultRedirectFactory->create(); $data = $this->getRequest()->getPostValue(); if ($data) { $this->logger->info('Start saving new store/edit exist store.'); $id = (int) $this->getRequest()->getParam('id'); $stateIdFromStatesDataSource = $this->getRequest()->getPostValue('state_source_id'); $nameFromStatesDataSource = $this->regionsData->load($stateIdFromStatesDataSource)->getData('name'); if (true === empty($nameFromStatesDataSource)) { // Empty names of countries states which aren't any states $nameFromStatesDataSource = $data['country']; } $newStateIdFromStoreLocatorStates = $this->states->addNewRegion( $stateIdFromStatesDataSource, $nameFromStatesDataSource, '', $data['country'] ); $data['state_id'] = $newStateIdFromStoreLocatorStates; /** @var \PandaGroup\StoreLocator\Model\StoreLocator $model */ $model = $this->_objectManager->create('PandaGroup\StoreLocator\Model\StoreLocator')->load($id); if (!$model->getId() && $id) { $this->messageManager->addErrorMessage(__('This store no longer exists.')); return $resultRedirect->setPath('*/*/'); } if ($data['storelocator_id'] === '') { $data['storelocator_id'] = null; // Bug with saving new store } $data['rewrite_request_path'] = $this->toSafeUrl($data['name']); $data['state'] = null; $data['link'] = null; if (true === empty($data['fax'])) { $data['fax'] = null; } if (true === empty($data['image_icon'])) { $data['image_icon'] = null; } $data['monday_open_break'] = $data['monday_open']; $data['monday_close_break'] = $data['monday_open']; $data['tuesday_open_break'] = $data['tuesday_open']; $data['tuesday_close_break'] = $data['tuesday_open']; $data['wednesday_open_break'] = $data['wednesday_open']; $data['wednesday_close_break'] = $data['wednesday_open']; $data['thursday_open_break'] = $data['thursday_open']; $data['thursday_close_break'] = $data['thursday_open']; $data['friday_open_break'] = $data['friday_open']; $data['friday_close_break'] = $data['friday_open']; $data['saturday_open_break'] = $data['saturday_open']; $data['saturday_close_break'] = $data['saturday_open']; $data['sunday_open_break'] = $data['sunday_open']; $data['sunday_close_break'] = $data['sunday_open']; $model->setData($data); try { $model->getResource()->save($model); $this->messageManager->addSuccessMessage(__('You saved the store.')); $this->logger->info(' Saving new store/edit exist store was successful.'); $this->dataPersistor->clear('storelocator'); if ($this->getRequest()->getParam('back')) { $this->logger->info('Finish saving new store/edit exist store.'); return $resultRedirect->setPath('*/*/edit', ['id' => $model->getId()]); } $this->logger->info('Finish saving new store/edit exist store.'); return $resultRedirect->setPath('*/*/'); } catch (LocalizedException $e) { $this->messageManager->addErrorMessage($e->getMessage()); $this->logger->error(' Error while saving new store/edit exist store.', $e->getMessage()); } catch (\Exception $e) { $this->messageManager->addExceptionMessage($e, __('Something went wrong while saving the store.')); $this->logger->error(' Error while saving new store/edit exist store.', $e->getMessage()); } $this->dataPersistor->set('storelocator', $data); $this->logger->info('Finish saving new store/edit exist store.'); return $resultRedirect->setPath('*/*/edit', ['storelocator_id' => $this->getRequest()->getParam('storelocator_id')]); } return $resultRedirect->setPath('*/*/'); } /** * @param $str * @param array $replace * @param string $delimiter * @return mixed|string */ protected function toSafeUrl($str, $replace=array(), $delimiter='-') { $baseStr = $str; if( !empty($replace) ) { $str = str_replace((array)$replace, ' ', $str); } $clean = iconv('UTF-8', 'ASCII//TRANSLIT', $str); $clean = preg_replace("/[^a-zA-Z0-9\/_|+ -]/", '', $clean); $clean = strtolower(trim($clean, '-')); $clean = preg_replace("/[\/_|+ -]+/", $delimiter, $clean); $this->logger->info(' Store Name was replaced by safe url link: '.$baseStr.'->'.$clean); return $clean; } }
Java
using TwinTechs.Controls; using TekConf.Core.Data.Dtos; namespace TekConf.Forms.Cells { public partial class ConferenceListSessionsListCell : FastCell { protected override void InitializeCell () { InitializeComponent (); } protected override void SetupCell (bool isRecycled) { var session = BindingContext as SessionDto; if (session != null) { // logoImage.ImageUrl = conference.ImageUrl ?? ""; title.Text = session.Title; date.Text = session.Date; } } } }
Java
--- layout: post title: LeetCode 77 category: 技术 tags: LeetCode Medium keywords: LeetCode description: 2019 每天一道题 #77 --- #### 77. [Combinations](https://leetcode.com/problems/combinations/) --- Given two integers *n* and *k*, return all possible combinations of k numbers out of *1* ... *n*. **Example:** ``` Input: n = 4, k = 2 Output: [ [2,4], [3,4], [2,3], [1,2], [1,3], [1,4], ] ``` #### Thoughts --- The requirement is easy to understand, we count from *1* to *n* within *k* numbers. **First try:** ```Java class Solution { public List<List<Integer>> combine(int n, int k) { List<List<Integer>> res = new ArrayList<>(); if (n == 0 || k == 0 || k > n) return res; combieHelper(res, new ArrayList<>(), n, 0, k); return res; } private static void combineHelper(List<List<Integer>> res, List<Integer> tmp, int max, int start, int remain) { if (remain == 0) res.add(new ArrayList<>(tmp)); else { for (int i = start + 1; i <= max; i++) { tmp.add(i); combieHelper(res, tmp, max, i, remain - 1); tmp.remove(tmp.size() - 1); } } } } ``` **Result 1:** > Runtime: **28 ms**, faster than **57.69%** of Java online submissions for Combinations. The result is just fine, may take sometime to see how others solve this question. **Second try:** **Result 2:**
Java
job === set timeout job or cron job to call a url. with nsq,this can sent a message in the special time.
Java
<?php namespace SilexMarkdown\Parser; use SilexMarkdown\Filter\FilterInterface; interface ParserInterface { public function transform($source); public function registerFilter($method, FilterInterface $filter); public function getFilters(); public function hasFilter($method); public function useFilter($method, $content, $params); }
Java
import Lab from 'lab'; import server from '../../server'; import data from '../data'; const expect = Lab.assertions.expect; export const lab = Lab.script(); lab.experiment('ProfileCtrl', function() { lab.before(done => { data.sync().then(done, done); }); lab.test('[getAuthenticated] returns the current profile', function(done) { const options = { method: 'GET', url: '/profile', headers: { 'Authorization': `Bearer ${data.fp.token.value}` } }; server.inject(options, function(response) { const result = response.result; expect(response.statusCode).to.equal(200); expect(result.email).to.equal(data.fp.account.profile.email); done(); }); }); lab.test('[getAuthenticated] returns 401 without a token', function(done) { const options = { method: 'GET', url: '/profile' }; server.inject(options, function(response) { expect(response.statusCode).to.equal(401); done(); }); }); lab.test('[get] returns the correct profile by id', function(done) { const options = { method: 'GET', url: `/profile/${data.tp.account.profile.id}`, headers: { 'Authorization': `Bearer ${data.fp.token.value}` } }; server.inject(options, function(response) { const result = response.result; expect(response.statusCode).to.equal(200); expect(result.id).to.equal(data.tp.account.profile.id); done(); }); }); lab.test('[get] returns the correct profile by email', function(done) { const options = { method: 'GET', url: `/profile/${encodeURIComponent(data.tp.account.profile.email)}`, headers: { 'Authorization': `Bearer ${data.fp.token.value}` } }; server.inject(options, function(response) { const result = response.result; expect(response.statusCode).to.equal(200); expect(result.email).to.equal(data.tp.account.profile.email); done(); }); }); lab.test('[get] returns 404 if not found by id', function(done) { const options = { method: 'GET', url: `/profile/123-456`, headers: { 'Authorization': `Bearer ${data.fp.token.value}` } }; server.inject(options, function(response) { expect(response.statusCode).to.equal(404); done(); }); }); lab.test('[get] returns 404 if not found by email', function(done) { const options = { method: 'GET', url: `/profile/${encodeURIComponent('not@found.com')}`, headers: { 'Authorization': `Bearer ${data.fp.token.value}` } }; server.inject(options, function(response) { expect(response.statusCode).to.equal(404); done(); }); }); lab.test('[update] returns the profile with a new first name (by id)', function(done) { const options = { method: 'PUT', url: `/profile/${data.tp.account.profile.id}`, headers: { 'Authorization': `Bearer ${data.tp.token.value}` }, payload: { firstName: 'Gargantua' } }; server.inject(options, function(response) { const result = response.result; expect(response.statusCode).to.equal(200); expect(result.name.first).to.equal('Gargantua'); done(); }); }); lab.test('[update] returns the profile with a new last name (by email)', function(done) { const options = { method: 'PUT', url: `/profile/${data.tp.account.profile.email}`, headers: { 'Authorization': `Bearer ${data.tp.token.value}` }, payload: { lastName: 'Batman' } }; server.inject(options, function(response) { const result = response.result; expect(response.statusCode).to.equal(200); expect(result.name.last).to.equal('Batman'); done(); }); }); lab.test('[update] returns 401 if trying to update someone else\'s profile', function(done) { const options = { method: 'PUT', url: `/profile/${data.tp.account.profile.email}`, headers: { 'Authorization': `Bearer ${data.fp.token.value}` }, payload: { lastName: 'Batman' } }; server.inject(options, function(response) { expect(response.statusCode).to.equal(401); done(); }); }); });
Java
package net.glowstone.net.message.play.entity; import com.flowpowered.network.Message; import java.util.List; import lombok.Data; @Data public final class DestroyEntitiesMessage implements Message { private final List<Integer> ids; }
Java
// ArduinoJson - https://arduinojson.org // Copyright © 2014-2022, Benoit BLANCHON // MIT License #include <ArduinoJson.h> #include <catch.hpp> #define SHOULD_WORK(expression) REQUIRE(DeserializationError::Ok == expression); #define SHOULD_FAIL(expression) \ REQUIRE(DeserializationError::TooDeep == expression); TEST_CASE("JsonDeserializer nesting") { DynamicJsonDocument doc(4096); SECTION("Input = const char*") { SECTION("limit = 0") { DeserializationOption::NestingLimit nesting(0); SHOULD_WORK(deserializeJson(doc, "\"toto\"", nesting)); SHOULD_WORK(deserializeJson(doc, "123", nesting)); SHOULD_WORK(deserializeJson(doc, "true", nesting)); SHOULD_FAIL(deserializeJson(doc, "[]", nesting)); SHOULD_FAIL(deserializeJson(doc, "{}", nesting)); SHOULD_FAIL(deserializeJson(doc, "[\"toto\"]", nesting)); SHOULD_FAIL(deserializeJson(doc, "{\"toto\":1}", nesting)); } SECTION("limit = 1") { DeserializationOption::NestingLimit nesting(1); SHOULD_WORK(deserializeJson(doc, "[\"toto\"]", nesting)); SHOULD_WORK(deserializeJson(doc, "{\"toto\":1}", nesting)); SHOULD_FAIL(deserializeJson(doc, "{\"toto\":{}}", nesting)); SHOULD_FAIL(deserializeJson(doc, "{\"toto\":[]}", nesting)); SHOULD_FAIL(deserializeJson(doc, "[[\"toto\"]]", nesting)); SHOULD_FAIL(deserializeJson(doc, "[{\"toto\":1}]", nesting)); } } SECTION("char* and size_t") { SECTION("limit = 0") { DeserializationOption::NestingLimit nesting(0); SHOULD_WORK(deserializeJson(doc, "\"toto\"", 6, nesting)); SHOULD_WORK(deserializeJson(doc, "123", 3, nesting)); SHOULD_WORK(deserializeJson(doc, "true", 4, nesting)); SHOULD_FAIL(deserializeJson(doc, "[]", 2, nesting)); SHOULD_FAIL(deserializeJson(doc, "{}", 2, nesting)); SHOULD_FAIL(deserializeJson(doc, "[\"toto\"]", 8, nesting)); SHOULD_FAIL(deserializeJson(doc, "{\"toto\":1}", 10, nesting)); } SECTION("limit = 1") { DeserializationOption::NestingLimit nesting(1); SHOULD_WORK(deserializeJson(doc, "[\"toto\"]", 8, nesting)); SHOULD_WORK(deserializeJson(doc, "{\"toto\":1}", 10, nesting)); SHOULD_FAIL(deserializeJson(doc, "{\"toto\":{}}", 11, nesting)); SHOULD_FAIL(deserializeJson(doc, "{\"toto\":[]}", 11, nesting)); SHOULD_FAIL(deserializeJson(doc, "[[\"toto\"]]", 10, nesting)); SHOULD_FAIL(deserializeJson(doc, "[{\"toto\":1}]", 12, nesting)); } } SECTION("Input = std::string") { SECTION("limit = 0") { DeserializationOption::NestingLimit nesting(0); SHOULD_WORK(deserializeJson(doc, std::string("\"toto\""), nesting)); SHOULD_WORK(deserializeJson(doc, std::string("123"), nesting)); SHOULD_WORK(deserializeJson(doc, std::string("true"), nesting)); SHOULD_FAIL(deserializeJson(doc, std::string("[]"), nesting)); SHOULD_FAIL(deserializeJson(doc, std::string("{}"), nesting)); SHOULD_FAIL(deserializeJson(doc, std::string("[\"toto\"]"), nesting)); SHOULD_FAIL(deserializeJson(doc, std::string("{\"toto\":1}"), nesting)); } SECTION("limit = 1") { DeserializationOption::NestingLimit nesting(1); SHOULD_WORK(deserializeJson(doc, std::string("[\"toto\"]"), nesting)); SHOULD_WORK(deserializeJson(doc, std::string("{\"toto\":1}"), nesting)); SHOULD_FAIL(deserializeJson(doc, std::string("{\"toto\":{}}"), nesting)); SHOULD_FAIL(deserializeJson(doc, std::string("{\"toto\":[]}"), nesting)); SHOULD_FAIL(deserializeJson(doc, std::string("[[\"toto\"]]"), nesting)); SHOULD_FAIL(deserializeJson(doc, std::string("[{\"toto\":1}]"), nesting)); } } SECTION("Input = std::istream") { SECTION("limit = 0") { DeserializationOption::NestingLimit nesting(0); std::istringstream good("true"); std::istringstream bad("[]"); SHOULD_WORK(deserializeJson(doc, good, nesting)); SHOULD_FAIL(deserializeJson(doc, bad, nesting)); } SECTION("limit = 1") { DeserializationOption::NestingLimit nesting(1); std::istringstream good("[\"toto\"]"); std::istringstream bad("{\"toto\":{}}"); SHOULD_WORK(deserializeJson(doc, good, nesting)); SHOULD_FAIL(deserializeJson(doc, bad, nesting)); } } }
Java
const fs = require('fs') const path = require('path') const LRU = require('lru-cache') const express = require('express') const favicon = require('serve-favicon') const compression = require('compression') const resolve = file => path.resolve(__dirname, file) const { createBundleRenderer } = require('vue-server-renderer') const isProd = process.env.NODE_ENV === 'production' const useMicroCache = process.env.MICRO_CACHE !== 'false' const serverInfo = `express/${require('express/package.json').version} ` + `vue-server-renderer/${require('vue-server-renderer/package.json').version}` const app = express() const template = fs.readFileSync(resolve('./src/index.html'), 'utf-8'); function createRenderer (bundle, options) { // https://github.com/vuejs/vue/blob/dev/packages/vue-server-renderer/README.md#why-use-bundlerenderer return createBundleRenderer(bundle, Object.assign(options, { template, // for component caching cache: LRU({ max: 1000, maxAge: 1000 * 60 * 15 }), // this is only needed when vue-server-renderer is npm-linked basedir: resolve('./dist'), // recommended for performance runInNewContext: false })) } let renderer let readyPromise if (isProd) { // In production: create server renderer using built server bundle. // The server bundle is generated by vue-ssr-webpack-plugin. const bundle = require('./dist/vue-ssr-server-bundle.json') // The client manifests are optional, but it allows the renderer // to automatically infer preload/prefetch links and directly add <script> // tags for any async chunks used during render, avoiding waterfall requests. const clientManifest = require('./dist/vue-ssr-client-manifest.json') renderer = createRenderer(bundle, { clientManifest }) } else { // In development: setup the dev server with watch and hot-reload, // and create a new renderer on bundle / index template update. readyPromise = require('./build/setup-dev-server')(app, (bundle, options) => { renderer = createRenderer(bundle, options) }) } const serve = (path, cache) => express.static(resolve(path), { maxAge: cache && isProd ? 1000 * 60 * 60 * 24 * 30 : 0 }) app.use(compression({ threshold: 0 })) //app.use(favicon('./public/logo-48.png')) app.use('/dist', serve('./dist', true)) app.use('/public', serve('./public', true)) app.use('/manifest.json', serve('./manifest.json', true)) app.use('/service-worker.js', serve('./dist/service-worker.js')) // 1-second microcache. // https://www.nginx.com/blog/benefits-of-microcaching-nginx/ const microCache = LRU({ max: 100, maxAge: 1000 }) // since this app has no user-specific content, every page is micro-cacheable. // if your app involves user-specific content, you need to implement custom // logic to determine whether a request is cacheable based on its url and // headers. const isCacheable = req => useMicroCache function render (req, res) { const s = Date.now() res.setHeader("Content-Type", "text/html") res.setHeader("Server", serverInfo) const handleError = err => { if (err.url) { res.redirect(err.url) } else if(err.code === 404) { res.status(404).end('404 | Page Not Found') } else { // Render Error Page or Redirect res.status(500).end('500 | Internal Server Error') console.error(`error during render : ${req.url}`) console.error(err.stack) } } const cacheable = isCacheable(req) if (cacheable) { const hit = microCache.get(req.url) if (hit) { if (!isProd) { console.log(`cache hit!`) } return res.end(hit) } } const context = { title: '交易虎_手机游戏交易平台_手游交易_帐号交易_游戏币交易_装备交易_道具交易_jiaoyihu', // default title url: req.url } renderer.renderToString(context, (err, html) => { debugger; if (err) { return handleError(err) } res.end(html) if (cacheable) { microCache.set(req.url, html) } if (!isProd) { console.log(`whole request: ${Date.now() - s}ms`) } }) } app.get('*', isProd ? render : (req, res) => { readyPromise.then(() => render(req, res)) }) const port = process.env.PORT || 80; app.listen(port, () => { console.log(`server started at localhost:${port}`) })
Java
## async modes ### constant broadcast mode * `STATE A` `encoding` * agent broadcasts and performs signaling at a constant rate Agent does not listen for any signals. ### passive listen mode * `STATE A` `decoding` * agent polls for signaling and decodes bytes as they arrive This mode is for listening to a constant broadcast mode transmitter. ## sync modes ### triggered broadcast mode * `STATE A` `idle` `listening for connection` * agent broadcasts full gain on all frequencies * each tick * agent listens for identifying bands on input * if agent hears client transmit on identifying bands * `GOTO` `STATE B` * `STATE B` `encoding` * agent encodes bytes and performs signaling at a constant rate. ### triggered listen mode * `STATE A` `idle` `polling for signaling` * agent broadcasts full gain on all frequencies * each tick * agent polls for signaling and decodes bytes as they arrive * if agent finds signaling * agent zeros gain on all broadcast frequencies * `GOTO` `STATE B` * `STATE B` `decoding` * agent polls for signaling and decodes bytes as they arrive ### mutual stepped broadcast mode (active) ### mutual stepped listen mode (active) ### error checked mode
Java
import * as _ from 'lodash'; import * as AWS from 'aws-sdk'; import * as config from './config'; export interface Secrets { REDDIT_CLIENT_ID: string; REDDIT_CLIENT_TOKEN: string; REDDIT_USERNAME: string; REDDIT_PASSWORD: string; STEAM_API_KEY: string; } export async function resolve(): Promise<Secrets> { if (config.isLocalDev() && !process.env.USE_SECRETS) { console.info('Getting secrets from ENV instead of encrypted bundle.'); return _.pick(process.env, [ 'REDDIT_CLIENT_ID', 'REDDIT_CLIENT_TOKEN', 'REDDIT_PASSWORD', 'STEAM_API_KEY', ]) as any; } const kms = new AWS.KMS({ region: 'us-west-2', }); console.log('Resolving secrets.'); const secrets = await kms.decrypt({ CiphertextBlob: Buffer.from(process.env.SECRETS, 'base64'), }).promise(); return JSON.parse(secrets.Plaintext.toString()); }
Java
<!DOCTYPE html > <html> <head> <title></title> <meta name="description" content="" /> <meta name="keywords" content="" /> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <link href="../lib/ref-index.css" media="screen" type="text/css" rel="stylesheet" /> <script type="text/javascript" src="../lib/jquery.js"></script> </head> <body><div class="entry"> <div class="name">ReversibleScaler</div> <div class="occurrences"><a href="../io/github/mandar2812/dynaml/pipes/package.html" class="extype" name="io.github.mandar2812.dynaml.pipes">pipes</a> </div> </div><div class="entry"> <div class="name">run</div> <div class="occurrences"><a href="../io/github/mandar2812/dynaml/pipes/DataPipe.html" class="extype" name="io.github.mandar2812.dynaml.pipes.DataPipe">DataPipe</a> <a href="../io/github/mandar2812/dynaml/pipes/StreamDataPipe.html" class="extype" name="io.github.mandar2812.dynaml.pipes.StreamDataPipe">StreamDataPipe</a> <a href="../io/github/mandar2812/dynaml/pipes/StreamFilterPipe.html" class="extype" name="io.github.mandar2812.dynaml.pipes.StreamFilterPipe">StreamFilterPipe</a> <a href="../io/github/mandar2812/dynaml/pipes/StreamMapPipe.html" class="extype" name="io.github.mandar2812.dynaml.pipes.StreamMapPipe">StreamMapPipe</a> <a href="../io/github/mandar2812/dynaml/pipes/StreamPartitionPipe.html" class="extype" name="io.github.mandar2812.dynaml.pipes.StreamPartitionPipe">StreamPartitionPipe</a> <a href="../io/github/mandar2812/dynaml/pipes/StreamSideEffectPipe.html" class="extype" name="io.github.mandar2812.dynaml.pipes.StreamSideEffectPipe">StreamSideEffectPipe</a> </div> </div></body> </html>
Java
FROM ubuntu ADD a.out /a.out
Java
#!/bin/bash cd "$(dirname "${BASH_SOURCE[0]}")" \ && . "utils.sh" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - tohome() { sourceFile="$(cd .. && pwd)/$1" targetFile="$HOME/.$(printf "%s" "$1" | sed "s/.*\/\(.*\)/\1/g")" if [ ! -e "$targetFile" ] || $skipQuestions; then execute \ "ln -fs $sourceFile $targetFile" \ "$targetFile → $sourceFile" elif [ "$(readlink "$targetFile")" == "$sourceFile" ]; then print_success "$targetFile → $sourceFile" else if ! $skipQuestions; then ask_for_confirmation "'$targetFile' already exists, do you want to overwrite it?" if answer_is_yes; then rm -rf "$targetFile" execute \ "ln -fs $sourceFile $targetFile" \ "$targetFile → $sourceFile" else print_error "$targetFile → $sourceFile" fi fi fi } # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - toother() { sourceFile="$(cd .. && pwd)/$1" targetFile="$HOME/$2" targetdir=$(dirname "$targetFile") mkdir -p "$targetdir" if [ ! -e "$targetFile" ] || $skipQuestions; then execute \ "ln -fs $sourceFile $targetFile" \ "$targetFile → $sourceFile" elif [ "$(readlink "$targetFile")" == "$sourceFile" ]; then print_success "$targetFile → $sourceFile" else if ! $skipQuestions; then ask_for_confirmation "'$targetFile' already exists, do you want to overwrite it?" if answer_is_yes; then rm -rf "$targetFile" execute \ "ln -fs $sourceFile $targetFile" \ "$targetFile → $sourceFile" else print_error "$targetFile → $sourceFile" fi fi fi } # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - create_symlinks() { declare -a FILES_TO_SYMLINK=( "shell/bash_logout" "shell/bash_profile" "shell/bashrc" "shell/tmux.conf" "git/gitconfig" "conky/conkyrc" "R/Rprofile" "zsh/zshrc" ) local i="" local sourceFile="" local targetFile="" local skipQuestions=false # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - skip_questions "$@" \ && skipQuestions=true # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - for i in "${FILES_TO_SYMLINK[@]}"; do tohome "$i" done toother "xfce4/terminal/terminalrc" ".config/xfce4/terminal/terminalrc" toother "xfce4/panel/whiskermenu-1.rc" ".config/xfce4/panel/whiskermenu-1.rc" toother "sublime-text/Package\ Control.sublime-settings" ".config/sublime-text-3/Packages/User/Package\ Control.sublime-settings" toother "sublime-text/Preferences.sublime-settings" ".config/sublime-text-3/Packages/User/Preferences.sublime-settings" toother "sublime-text/bash.sublime-build" ".config/sublime-text-3/Packages/User/bash.sublime-build" toother "sublime-text/xetex.sublime-build" ".config/sublime-text-3/Packages/User/xetex.sublime-build" } # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - main() { print_info "Create symbolic links" create_symlinks "$@" } main "$@"
Java
module FinancialStatementHelper include HyaccConst def colspan( node_level ) @max_node_level - node_level + 1 end def is_visible_on_report( account, branch_id ) # 削除された科目は表示しない return false if account.deleted? # 決算書科目以外は表示しない return false unless account.is_settlement_report_account # 検索条件に部門指定がない場合は全社での出力なので内部取引は表示しない if branch_id.to_i == 0 return false if account.internal_trade? end true end end
Java
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Login Page - Photon Admin Panel Theme</title> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0"> <link rel="shortcut icon" href="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/favicon.ico"/> <link rel="apple-touch-icon" href="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/iosicon.png"/> <link rel="stylesheet" href="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/css/css_compiled/photon-min.css?v1.1" media="all"/> <link rel="stylesheet" href="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/css/css_compiled/photon-min-part2.css?v1.1" media="all"/> <link rel="stylesheet" href="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/css/css_compiled/photon-responsive-min.css?v1.1" media="all"/> <!--[if IE]> <link rel="stylesheet" type="text/css" href="css/css_compiled/ie-only-min.css?v1.1" /> <![endif]--> <!--[if lt IE 9]> <link rel="stylesheet" type="text/css" href="css/css_compiled/ie8-only-min.css?v1.1" /> <script type="text/javascript" src="js/plugins/excanvas.js"></script> <script type="text/javascript" src="js/plugins/html5shiv.js"></script> <script type="text/javascript" src="js/plugins/respond.min.js"></script> <script type="text/javascript" src="js/plugins/fixFontIcons.js"></script> <![endif]--> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.0/jquery-ui.min.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/bootstrap/bootstrap.min.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/plugins/modernizr.custom.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/plugins/jquery.pnotify.min.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/plugins/less-1.3.1.min.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/plugins/xbreadcrumbs.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/plugins/jquery.maskedinput-1.3.min.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/plugins/jquery.autotab-1.1b.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/plugins/charCount.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/plugins/jquery.textareaCounter.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/plugins/elrte.min.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/plugins/elrte.en.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/plugins/select2.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/plugins/jquery-picklist.min.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/plugins/jquery.validate.min.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/plugins/additional-methods.min.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/plugins/jquery.form.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/plugins/jquery.metadata.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/plugins/jquery.mockjax.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/plugins/jquery.uniform.min.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/plugins/jquery.tagsinput.min.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/plugins/jquery.rating.pack.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/plugins/farbtastic.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/plugins/jquery.timeentry.min.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/plugins/jquery.dataTables.min.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/plugins/jquery.jstree.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/plugins/dataTables.bootstrap.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/plugins/jquery.mousewheel.min.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/plugins/jquery.mCustomScrollbar.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/plugins/jquery.flot.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/plugins/jquery.flot.stack.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/plugins/jquery.flot.pie.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/plugins/jquery.flot.resize.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/plugins/raphael.2.1.0.min.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/plugins/justgage.1.0.1.min.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/plugins/jquery.qrcode.min.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/plugins/jquery.clock.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/plugins/jquery.countdown.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/plugins/jquery.jqtweet.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/plugins/jquery.cookie.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/plugins/bootstrap-fileupload.min.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/plugins/prettify/prettify.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/plugins/bootstrapSwitch.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/plugins/mfupload.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/js/common.js"></script> </head> <body class="body-login"> <div class="nav-fixed-topright" style="visibility: hidden"> <ul class="nav nav-user-menu"> <li class="user-sub-menu-container"> <a href="javascript:;"> <i class="user-icon"></i><span class="nav-user-selection">Theme Options</span><i class="icon-menu-arrow"></i> </a> <ul class="nav user-sub-menu"> <li class="light"> <a href="javascript:;"> <i class='icon-photon stop'></i>Light Version </a> </li> <li class="dark"> <a href="javascript:;"> <i class='icon-photon stop'></i>Dark Version </a> </li> </ul> </li> <li> <a href="javascript:;"> <i class="icon-photon mail"></i> </a> </li> <li> <a href="javascript:;"> <i class="icon-photon comment_alt2_stroke"></i> <div class="notification-count">12</div> </a> </li> </ul> </div> <script> $(function(){ setTimeout(function(){ $('.nav-fixed-topright').removeAttr('style'); }, 300); $(window).scroll(function(){ if($('.breadcrumb-container').length){ var scrollState = $(window).scrollTop(); if (scrollState > 0) $('.nav-fixed-topright').addClass('nav-released'); else $('.nav-fixed-topright').removeClass('nav-released') } }); $('.user-sub-menu-container').on('click', function(){ $(this).toggleClass('active-user-menu'); }); $('.user-sub-menu .light').on('click', function(){ if ($('body').is('.light-version')) return; $('body').addClass('light-version'); setTimeout(function() { $.cookie('themeColor', 'light', { expires: 7, path: '/' }); }, 500); }); $('.user-sub-menu .dark').on('click', function(){ if ($('body').is('.light-version')) { $('body').removeClass('light-version'); $.cookie('themeColor', 'dark', { expires: 7, path: '/' }); } }); }); </script> <div class="container-login"> <div class="form-centering-wrapper"> <div class="form-window-login"> <div class="form-window-login-logo"> <div class="login-logo"> <img src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/css/css_compiled/js/plugins/prettify/images/photon/login-logo@2x.png" alt="Photon UI"/> </div> <h2 class="login-title">Welcome to Photon UI!</h2> <div class="login-member">Not a Member?&nbsp;<a href="prettify.js.html#">Sign Up &#187;</a> <a href="prettify.js.html#" class="btn btn-facebook"><i class="icon-fb"></i>Login with Facebook<i class="icon-fb-arrow"></i></a> </div> <div class="login-or">Or</div> <div class="login-input-area"> <form method="POST" action="dashboard.php"> <span class="help-block">Login With Your Photon Account</span> <input type="text" name="email" placeholder="Email"> <input type="password" name="password" placeholder="Password"> <button type="submit" class="btn btn-large btn-success btn-login">Login</button> </form> <a href="prettify.js.html#" class="forgot-pass">Forgot Your Password?</a> </div> </div> </div> </div> </div> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-1936460-27']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> </body> </html>
Java
#include "Common.h" #include "CacheAdapters/Redis.h" #include "SSEConfig.h" #include "SSEEvent.h" #include <string> #include <vector> #include <iostream> #include <boost/asio/io_service.hpp> #include <boost/asio/ip/address.hpp> using namespace std; extern int stop; Redis::Redis(const string key, const ChannelConfig& config) : _config(config), _key(key) { Connect(); } void Redis::Connect() { string host = Lookup(_config.server->GetValue("redis.host")); const unsigned short port = _config.server->GetValueInt("redis.port"); const unsigned int NUM_CONNECTIONS = _config.server->GetValueInt("redis.numConnections"); if (host.empty()) { LOG(ERROR) << "Failed to look up host for redis adapter " << _config.server->GetValue("redis.host") << " Retrying in 5 seconds."; Reconnect(5); return; } boost::asio::ip::address address = boost::asio::ip::address::from_string(host); boost::asio::io_service ioService; string errmsg; LOG(INFO) << "Creating redis pool of " << _config.server->GetValue("redis.numConnections") << " connections."; for (unsigned int i = 0; i < NUM_CONNECTIONS; i++) { RedisSyncClient* client = new RedisSyncClient(ioService); if(client->connect(address, port, errmsg)) { _clients.push_back(RedisSyncClientPtr(client)); LOG(INFO) << "Connected to redis server " << _config.server->GetValue("redis.host") << ":" << _config.server->GetValue("redis.port"); } else { LOG(ERROR) << "Failed to connect to redis:" << errmsg << ". Retrying in 5 seconds."; Reconnect(5); return; } } _curclient = _clients.begin(); } void Redis::Disconnect() { while(_clients.size() > 0) { _clients.pop_back(); } } void Redis::Reconnect(int delay) { if (!stop) { Disconnect(); sleep(delay); Connect(); } } RedisSyncClient* Redis::GetClient() { RedisSyncClient* client = (*_curclient).get(); _curclient++; if (_curclient == _clients.end()) _curclient = _clients.begin(); return client; } void Redis::CacheEvent(SSEEvent* event) { RedisValue result; try { result = GetClient()->command("HSET", _key, event->getid(), event->get()); } catch (const runtime_error& error) { LOG(ERROR) << "Redis::CacheEvent: " << error.what(); } if (result.isError()) { LOG(ERROR) << "SET error: " << result.toString(); } result = GetClient()->command("HLEN", _key); if (result.isError()) { LOG(ERROR) << "HLEN error" << result.toString(); } if (result.isOk()) { if (result.toInt() > _config.cacheLength) { result = GetClient()->command("HKEYS", _key); if (result.isError()) { LOG(ERROR) << "HKEYS error: " << result.toString(); } if (result.isOk()) { GetClient()->command("HDEL", _key, result.toArray().front().toString()); } } } } deque<string> Redis::GetEventsSinceId(string lastId) { deque<string> events; RedisValue result; try { result = GetClient()->command("HGETALL", _key); } catch (const runtime_error& error) { LOG(ERROR) << "Redis::GetEventsSinceId: " << error.what(); } if (result.isError()) { LOG(ERROR) << "GET error: " << result.toString(); } if (result.isOk() && result.isArray()) { std::vector<RedisValue> resultArray = result.toArray(); string id = ""; string data = ""; while (!resultArray.empty()) { RedisValue eventResult = resultArray.back(); if (eventResult.isString()) { if (data == "") { data = eventResult.toString(); } else { id = eventResult.toString(); if (id >= lastId) { events.push_front(data); } id = ""; data = ""; } } resultArray.pop_back(); } } return events; } deque<string> Redis::GetAllEvents() { RedisValue result; deque<string> events; try { result = GetClient()->command("HGETALL", _key); } catch (const runtime_error& error) { LOG(ERROR) << "Redis::GetEventsSinceId: " << error.what(); } if (result.isError()) { LOG(ERROR) << "GET error: " << result.toString(); } if (result.isOk() && result.isArray()) { std::vector<RedisValue> resultArray = result.toArray(); string data = ""; while (!resultArray.empty()) { RedisValue eventResult = resultArray.back(); if (eventResult.isString()) { if (data == "") { data = eventResult.toString(); } else { events.push_front(data); data = ""; } } resultArray.pop_back(); } } return events; } int Redis::GetSizeOfCachedEvents() { int size = 0; RedisValue result; try { result = GetClient()->command("HLEN", _key); } catch (const runtime_error& error) { LOG(ERROR) << "Redis::GetEventsSinceId: " << error.what(); } if (result.isError()) { LOG(ERROR) << "GET error: " << result.toString(); } if (result.isOk()) { size = result.toInt(); } return size; } string Redis::Lookup(string hostname) { hostent * record = gethostbyname(hostname.c_str()); if(record == NULL) { return ""; } in_addr * address = (in_addr * )record->h_addr; string ip_address = inet_ntoa(* address); return ip_address; }
Java
SPEC = Password.hs CC= gcc CFLAGS = -fPIC GHC = ghc %.o: %.c $(CC) -c -o $@ $< $(CFLAGS) example% : solution%.o $(SPEC) $(GHC) -o $@ $(SPEC) $< all : example1 example2
Java
<?php class kml_TimeSpan extends kml_TimePrimitive { protected $tagName = 'TimeSpan'; var $begin; var $end; /* Constructor */ function kml_TimeSpan($begin = null, $end = null) { parent::kml_TimePrimitive(); if ($begin !== null) $this->set_begin($begin); if ($end !== null) $this->set_end($end); } /* Assignments */ function set_begin($begin) { $this->begin = $begin; } function set_end($end) { $this->end = $end; } /* Render */ function render($doc) { $X = parent::render($doc); if (isset($this->begin)) $X->appendChild(XML_create_text_element($doc, 'begin', $this->begin)); if (isset($this->end)) $X->appendChild(XML_create_text_element($doc, 'end', $this->end)); return $X; } } /* $a = new kml_TimeSpan(); $a->dump(false); */
Java
using System.ComponentModel; using System.Runtime.CompilerServices; namespace NAudioUniversalDemo { internal class ViewModelBase : INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) { PropertyChangedEventHandler handler = PropertyChanged; if (handler != null) handler(this, new PropertyChangedEventArgs(propertyName)); } } }
Java
# Rollup <p align="center"> <a href="https://travis-ci.org/rollup/rollup"> <img src="https://api.travis-ci.org/rollup/rollup.svg?branch=master" alt="build status"> </a> <a href="https://www.npmjs.com/package/rollup"> <img src="https://img.shields.io/npm/v/rollup.svg" alt="npm version"> </a> <a href="#backers" alt="sponsors on Open Collective"> <img src="https://opencollective.com/rollup/backers/badge.svg" /> </a> <a href="#sponsors" alt="Sponsors on Open Collective"> <img src="https://opencollective.com/rollup/sponsors/badge.svg" /> </a> <a href="https://github.com/rollup/rollup/blob/master/LICENSE.md"> <img src="https://img.shields.io/npm/l/rollup.svg" alt="license"> </a> <a href="https://david-dm.org/rollup/rollup"> <img src="https://david-dm.org/rollup/rollup/status.svg" alt="dependency status"> </a> <a href='https://gitter.im/rollup/rollup?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge'> <img src='https://badges.gitter.im/rollup/rollup.svg' alt='Join the chat at https://gitter.im/rollup/rollup'> </a> </p> ## Overview Rollup is a module bundler for JavaScript which compiles small pieces of code into something larger and more complex, such as a library or application. It uses the new standardized format for code modules included in the ES6 revision of JavaScript, instead of previous idiosyncratic solutions such as CommonJS and AMD. ES6 modules let you freely and seamlessly combine the most useful individual functions from your favorite libraries. This will eventually be possible natively, but Rollup lets you do it today. ## Quick Start Guide Install with `npm install --global rollup`. Rollup can be used either through a [command line interface](https://rollupjs.org/#command-line-reference) with an optional configuration file, or else through its [JavaScript API](https://rollupjs.org/#javascript-api). Run `rollup --help` to see the available options and parameters. The starter project templates, [rollup-starter-lib](https://github.com/rollup/rollup-starter-lib) and [rollup-starter-app](https://github.com/rollup/rollup-starter-app), demonstrate common configuration options, and more detailed instructions are available throughout the [user guide](http://rollupjs.org/). ### Commands These commands assume the entry point to your application is named main.js, and that you'd like all imports compiled into a single file named bundle.js. For browsers: ```bash # compile to a <script> containing a self-executing function $ rollup main.js --format iife --name "myBundle" --file bundle.js ``` For Node.js: ```bash # compile to a CommonJS module $ rollup main.js --format cjs --file bundle.js ``` For both browsers and Node.js: ```bash # UMD format requires a bundle name $ rollup main.js --format umd --name "myBundle" --file bundle.js ``` ## Why Developing software is usually easier if you break your project into smaller separate pieces, since that often removes unexpected interactions and dramatically reduces the complexity of the problems you'll need to solve, and simply writing smaller projects in the first place [isn't necessarily the answer](https://medium.com/@Rich_Harris/small-modules-it-s-not-quite-that-simple-3ca532d65de4). Unfortunately, JavaScript has not historically included this capability as a core feature in the language. This finally changed with the ES6 revision of JavaScript, which includes a syntax for importing and exporting functions and data so they can be shared between separate scripts. The specification is now fixed, but it is not yet implemented in browsers or Node.js. Rollup allows you to write your code using the new module system, and will then compile it back down to existing supported formats such as CommonJS modules, AMD modules, and IIFE-style scripts. This means that you get to *write future-proof code*, and you also get the tremendous benefits of... ## Tree Shaking In addition to enabling the use of ES6 modules, Rollup also statically analyzes the code you are importing, and will exclude anything that isn't actually used. This allows you to build on top of existing tools and modules without adding extra dependencies or bloating the size of your project. For example, with CommonJS, the *entire tool or library must be imported*. ```js // import the entire utils object with CommonJS var utils = require( 'utils' ); var query = 'Rollup'; // use the ajax method of the utils object utils.ajax( 'https://api.example.com?search=' + query ).then( handleResponse ); ``` But with ES6 modules, instead of importing the whole `utils` object, we can just import the one `ajax` function we need: ```js // import the ajax function with an ES6 import statement import { ajax } from 'utils'; var query = 'Rollup'; // call the ajax function ajax( 'https://api.example.com?search=' + query ).then( handleResponse ); ``` Because Rollup includes the bare minimum, it results in lighter, faster, and less complicated libraries and applications. Since this approach is based on explicit `import` and `export` statements, it is vastly more effective than simply running an automated minifier to detect unused variables in the compiled output code. ## Compatibility ### Importing CommonJS Rollup can import existing CommonJS modules [through a plugin](https://github.com/rollup/rollup-plugin-commonjs). ### Publishing ES6 Modules To make sure your ES6 modules are immediately usable by tools that work with CommonJS such as Node.js and webpack, you can use Rollup to compile to UMD or CommonJS format, and then point to that compiled version with the `main` property in your `package.json` file. If your `package.json` file also has a `module` field, ES6-aware tools like Rollup and [webpack 2](https://webpack.js.org/) will [import the ES6 module version](https://github.com/rollup/rollup/wiki/pkg.module) directly. ## Links - step-by-step [tutorial video series](https://code.lengstorf.com/learn-rollup-js/), with accompanying written walkthrough - miscellaneous issues in the [wiki](https://github.com/rollup/rollup/wiki) ## Contributors This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)]. <a href="https://github.com/rollup/rollup/graphs/contributors"><img src="https://opencollective.com/rollup/contributors.svg?width=890" /></a> ## Backers Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/rollup#backer)] <a href="https://opencollective.com/rollup#backers" target="_blank"><img src="https://opencollective.com/rollup/backers.svg?width=890"></a> ## Sponsors Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/rollup#sponsor)] <a href="https://opencollective.com/rollup/sponsor/0/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/0/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/1/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/1/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/2/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/2/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/3/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/3/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/4/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/4/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/5/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/5/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/6/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/6/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/7/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/7/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/8/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/8/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/9/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/9/avatar.svg"></a> ## License [MIT](https://github.com/rollup/rollup/blob/master/LICENSE.md)
Java
$(function(){ $("#addCompanyForm").validate({ rules: { name : { required : true }, email: { required: true, email: true }, url : { required : true, url : true } }, messages: { name : { required : "Please enter your company name" }, url : { required : "Please enter your company website", url : "Please enter a valid url" }, email: { required: "Enter your Company email address", email: "Please enter a valid email address", } } }); $('#addCompanyDialog').on('hide.bs.modal', function (e) { refresh(); }); $('#addCompanyDialog').on('shown.bs.modal', function (e) { $('#name').focus(); $('#id').val(''); var id = $(e.relatedTarget).attr('id'); var isEdit = $(e.relatedTarget).hasClass('fa-edit'); console.log(isEdit); if(isEdit){ $('#id').val(id); $.getJSON('/account/companies/' + id, function(data){ if(data.result){ $('#name').val(data.result.name); $('#email').val(data.result.email); $('#url').val(data.result.url); } }); } var validator = $( "#addCompanyForm" ).validate(); validator.resetForm(); }); $('#confirm-delete').on('show.bs.modal', function(e) { var id = $(e.relatedTarget).attr('id'); $(this).find('.btn-ok').on('click', function(){ $.ajax({ url: '/account/companies/' + id, type: 'delete', dataType: 'json', success: function(data) { $('#message ').html('<div class="error" style="text-align:center;padding:5px;">' + data.message + '</div>') $('#confirm-delete').modal('hide'); if(data.result) getCompanies(); } }); }); }); $("#addCompanyForm").submit(function(e) { e.preventDefault(); if($( "#addCompanyForm" ).valid()){ var actionurl = '/account/companies'; var type = 'post'; console.log($('#id').val() != ''); if($('#id').val() != ''){ type = 'put'; actionurl = '/account/companies/' + $('#id').val(); } //var actionurl = e.currentTarget.action; $.ajax({ url: actionurl, type: type, dataType: 'json', data: $("#addCompanyForm").serialize(), success: function(data) { $('#message ').html('<div class="error" style="text-align:center;padding:5px;">' + data.message + '</div>') $('#addCompanyDialog').modal('hide'); if(data.result) getCompanies(); } }); } }); var getCompanies= function(){ $('#companylist').html('<div class="loader"><i class="fa fa-spinner fa-pulse"></i></div>'); $.get('/account/companies/list', function(data){ $('#companylist').html(data); $('#message ').html(''); }); }; $('#refresh').on('click', function () { $('#message ').html(''); getCompanies(); }); var refresh = function () { $('#id').val(''); $('#name').val(''); $('#url').val(''); $('#email').val(''); }; getCompanies(); });
Java
package com.github.aureliano.evtbridge.converter; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import java.util.HashMap; import java.util.Map; import org.junit.Test; import com.github.aureliano.evtbridge.core.config.EventCollectorConfiguration; import com.github.aureliano.evtbridge.core.helper.DataHelper; public class ConfigurationConverterTest { @Test public void testConvert() { Map<String, Object> map = this.createConfigurationMap(); EventCollectorConfiguration configuration = new ConfigurationConverter().convert(map); assertEquals("xpto-collector", configuration.getCollectorId()); assertFalse(configuration.isPersistExecutionLog()); assertTrue(configuration.isMultiThreadingEnabled()); assertEquals(DataHelper.mapToProperties(this.createMetadata()), configuration.getMetadata()); } private Map<String, Object> createConfigurationMap() { Map<String, Object> map = new HashMap<String, Object>(); map.put("collectorId", "xpto-collector"); map.put("persistExecutionLog", false); map.put("multiThreadingEnabled", "true"); map.put("metadata", this.createMetadata()); return map; } private Map<String, Object> createMetadata() { Map<String, Object> map = new HashMap<String, Object>(); map.put("test", true); map.put("host", "127.0.0.1"); return map; } }
Java
<HTML><HEAD> <TITLE>Review for Can't Hardly Wait (1998)</TITLE> <LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css"> </HEAD> <BODY BGCOLOR="#FFFFFF" TEXT="#000000"> <H1 ALIGN="CENTER" CLASS="title"><A HREF="/Title?0127723">Can't Hardly Wait (1998)</A></H1><H3 ALIGN=CENTER>reviewed by<BR><A HREF="/ReviewsBy?Josh+Schirmer">Josh Schirmer</A></H3><HR WIDTH="40%" SIZE="4"> <PRE>CAN'T HARDLY WAIT a review by Josh Schirmer ===</PRE> <PRE>* * * * out of * * * * *</PRE> <P>Maybe my review is unfair, me being a teenager and this being a teen movie. It's a well known fact that every teen movie that comes down the pike is hailed by our generation as, "Like, the most kick-a** movie ever!" (For those of you unfamiliar with the way teenagers talk, that's like giving it 'a very enthusiastic thumbs up' -- eat your out, Gene and Roger.) And that review holds it's ground until the next one comes along. We started with Empire Records, then Scream, I Know What You Did Last Summer, Scream 2, Titanic and so on. And now that summer is in full swing and reruns have set it, we need something new to keep us entertained. How about another "most kick-a**" teen movie?</P> <P>Now, I'll be honest. Out of the movies listed above, the only one I REALLY enjoyed was Titanic. Parents and teachers always tell me I'm mature for my age, and that makes me proud. They have their reasons, too -- I'm the kind of kid that actually focuses during class, keeps myself busy with sports and other extra-curricular activities, and lists my favorite movie as "As Good As It Gets". And teen movies rarely excite me. Nevertheless, I joined a group of my friends and headed off to see "Can't Hardly Wait".</P> <P>And to tell the truth, I actually had fun.</P> <P>At first glance, Can't Hardly Wait is a simple pageant of "boy is in love with girl that doesn't know he exists". But a viewing proves that the movie is more than that -- rather, it's a simple pageant of growing up and reaching your peak. And it approaches it humorously, barraged with heaping honesty.</P> <P>Many critics have pointed out that the characters have no depth -- if you ask me, this was the story's intention. I think to truly enjoy the movie, you have to look at the characters for who they most resemble in your own little group of high-school friends. From there, you yourself can determine their back stories and what they're feeling.</P> <P>And (coming as a REAL shocker in a teen movie), there is a lesson in diguise. The movie simply states live for the moment, because the moment is all that should matter. That, and (to borrow a line from the film), "Fate works in some f---ed up ways."</P> <P>There have been better movies this summer (Truman Show comes to mind), but there have been worse -- like Godzilla. Give this one a shot. Your kids are guarateed to think that it's the "most kick-a**" film ever (or until the next one), but you might actually find something in it you enjoy.</P> <PRE>--Josh Schirmer <A HREF="mailto:josh_phile@yahoo.com">josh_phile@yahoo.com</A></PRE> <HR><P CLASS=flush><SMALL>The review above was posted to the <A HREF="news:rec.arts.movies.reviews">rec.arts.movies.reviews</A> newsgroup (<A HREF="news:de.rec.film.kritiken">de.rec.film.kritiken</A> for German reviews).<BR> The Internet Movie Database accepts no responsibility for the contents of the review and has no editorial control. Unless stated otherwise, the copyright belongs to the author.<BR> Please direct comments/criticisms of the review to relevant newsgroups.<BR> Broken URLs inthe reviews are the responsibility of the author.<BR> The formatting of the review is likely to differ from the original due to ASCII to HTML conversion. </SMALL></P> <P ALIGN=CENTER>Related links: <A HREF="/Reviews/">index of all rec.arts.movies.reviews reviews</A></P> </P></BODY></HTML>
Java
<?php namespace Kendo\Dataviz\UI; class DiagramShapeConnectorDefaultsStroke extends \Kendo\SerializableObject { //>> Properties /** * Defines the stroke color. * @param string $value * @return \Kendo\Dataviz\UI\DiagramShapeConnectorDefaultsStroke */ public function color($value) { return $this->setProperty('color', $value); } /** * The dash type of the stroke. * @param string $value * @return \Kendo\Dataviz\UI\DiagramShapeConnectorDefaultsStroke */ public function dashType($value) { return $this->setProperty('dashType', $value); } /** * Defines the thickness or width of the shape connectors stroke. * @param float $value * @return \Kendo\Dataviz\UI\DiagramShapeConnectorDefaultsStroke */ public function width($value) { return $this->setProperty('width', $value); } //<< Properties } ?>
Java
# reads uniprot core file and generates core features from features_helpers import score_differences def build_uniprot_to_index_to_core(sable_db_obj): uniprot_to_index_to_core = {} for line in sable_db_obj: tokens = line.split() try: # PARSING ID prot = tokens[0] index = int(tokens[1]) core = tokens[2] # PARSING ID if uniprot_to_index_to_core.has_key(prot): uniprot_to_index_to_core[prot][index] = core else: uniprot_to_index_to_core[prot] = {index: core} except ValueError: print "Cannot parse: " + line[0:len(line) - 1] return uniprot_to_index_to_core def get_sable_scores(map_file, f_sable_db_location, uniprot_core_output_location): map_file_obj = open(map_file, 'r') sable_db_obj = open(f_sable_db_location, 'r') write_to = open(uniprot_core_output_location, 'w') uniprot_to_index_to_core = build_uniprot_to_index_to_core(sable_db_obj) for line in map_file_obj: tokens = line.split() asid = tokens[0].split("_")[0] prot = tokens[1] sstart = int(tokens[2]) start = int(tokens[3]) end = int(tokens[4]) eend = int(tokens[5]) rough_a_length = int(int(tokens[0].split("_")[-1].split("=")[1]) / 3) if asid[0] == "I": rough_a_length = 0 c1_count = 0 a_count = 0 c2_count = 0 canonical_absolute = 0 if prot in uniprot_to_index_to_core: c1_count = score_differences(uniprot_to_index_to_core, prot, sstart, start) a_count = score_differences(uniprot_to_index_to_core, prot, start, end) c2_count = score_differences(uniprot_to_index_to_core, prot, end, eend) prot_len = int(line.split("\t")[7].strip()) canonical_absolute = score_differences(uniprot_to_index_to_core, prot, 1, prot_len) print >> write_to, tokens[0] + "\t" + prot + "\t" + repr(c1_count) + "\t" + repr(a_count) + "\t" + repr( c2_count) + "\t" + repr(canonical_absolute) write_to.close()
Java
--- published: true title: Oops. layout: post --- Just testing this out.
Java
using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace Project.Models { public enum WordRel { None, Synonym, Similar, Related, Antonym } }
Java
#include <string.hpp> #include "yatf/include/yatf.hpp" using namespace yacppl; TEST(string, can_be_created) { string str; REQUIRE(str == ""); REQUIRE(str.empty()); REQUIRE_EQ(str.length(), 0u); REQUIRE_EQ(str.size(), 0u); REQUIRE_FALSE(str == "abc"); } TEST(string, can_be_constructed_from_cstring) { { string str("test_string"); REQUIRE(str == "test_string"); REQUIRE_EQ(str.length(), 11u); REQUIRE_EQ(str.size(), 11u); REQUIRE_EQ(*(str.cend() - 1), 'g'); REQUIRE_EQ(*(str.end() - 1), 'g'); REQUIRE_EQ(*(str.cbegin()), 't'); REQUIRE_EQ(*(str.begin()), 't'); } { string str("test_string", 4); REQUIRE(str == "test"); REQUIRE_EQ(str.length(), 4u); REQUIRE_EQ(str.size(), 4u); REQUIRE_EQ(*(str.cend() - 1), 't'); REQUIRE_EQ(*(str.end() - 1), 't'); REQUIRE_EQ(*(str.cbegin()), 't'); REQUIRE_EQ(*(str.begin()), 't'); } } string get_string() { return "some_string"; } TEST(string, can_be_created_from_other_string) { string str("test_string"); { auto str2 = str; REQUIRE(not str.empty()); REQUIRE(not str2.empty()); REQUIRE(str == "test_string"); REQUIRE(str2 == "test_string"); } { string str2(str); REQUIRE(not str.empty()); REQUIRE(not str2.empty()); REQUIRE(str == "test_string"); REQUIRE(str2 == "test_string"); } { string str2; string str3(str2); REQUIRE_EQ(str3.operator const char *(), nullptr); } { string str2("some_string"); string str3(move(str2)); REQUIRE_EQ(str2.operator const char *(), nullptr); REQUIRE(str3 == "some_string"); } str = string("some"); REQUIRE(str == "some"); str = string("some very, very, very long string"); REQUIRE(str == "some very, very, very long string"); str = nullptr; REQUIRE(!str); str = "something"; REQUIRE(str == "something"); auto str2 = get_string(); REQUIRE(str2 == "some_string"); str = str2; REQUIRE(str == "some_string"); // FIXME str = string(); str = string(str2); str = string(); str = string(string("some other")); } TEST(string, can_be_iterated) { string str("test_string"); size_t i = 0; for (auto c : str) { REQUIRE_EQ(c, "test_string"[i++]); } } TEST(string, can_be_appended) { { string str("hello "); str.append("world"); REQUIRE_EQ((const char *)str, "hello world"); } { string str; str.append("world"); REQUIRE_EQ((const char *)str, "world"); str.append("hello hello hello"); REQUIRE_EQ((const char *)str, "worldhello hello hello"); REQUIRE_EQ(str.length(), 22u); str.append(" test test"); REQUIRE_EQ((const char *)str, "worldhello hello hello test test"); REQUIRE_EQ(str.length(), 32u); } } TEST(string, can_get_substring) { string str("hello world"); auto str2 = str.substring(6, 5); REQUIRE_EQ((const char *)str2, "world"); auto str3 = str.substring(6, 1024); REQUIRE_EQ((const char *)str3, "world"); auto str4 = str.substring(11, 1024); REQUIRE_EQ((const char *)str4, ""); } TEST(string, can_be_erased) { string str("hello world"); str.erase(str.begin() + 5, str.end()); REQUIRE_EQ((const char *)str, "hello"); REQUIRE_EQ(str.length(), 5u); REQUIRE_EQ(str.size(), 11u); REQUIRE(not str.empty()); str.erase(str.end() - 1, str.end()); REQUIRE_EQ((const char *)str, "hell"); REQUIRE_EQ(str.length(), 4u); REQUIRE_EQ(str.size(), 11u); REQUIRE(not str.empty()); } TEST(string, cannot_be_erased_if_begin_after_end) { string str("hello world"); str.erase(str.end(), str.begin()); REQUIRE_EQ((const char *)str, "hello world"); } TEST(string, can_append_chars) { string str; for (auto i = 0u; i < 1024u; ++i) { str.append('a'); REQUIRE_EQ(str.length(), i + 1); } } TEST(string, can_reserve_size) { string str; str.reserve(1024); REQUIRE_EQ(str.size(), 1024u); for (auto i = 0u; i < 1023u; ++i) { str.append('a'); REQUIRE_EQ(str.length(), i + 1); REQUIRE_EQ(str.size(), 1024u); } str.append('c'); REQUIRE(str.size() != 1024u); str.reserve(4096); REQUIRE_EQ(str.size(), 4096u); } TEST(string, split_on_empty_string_should_return_empty_vec) { string str; const auto splitted = str.split(); REQUIRE_EQ(splitted.size(), 0u); } TEST(string, can_split) { { string str("some"); const auto splitted = str.split(); REQUIRE_EQ(splitted.size(), 1u); REQUIRE_EQ((const char *)splitted[0], "some"); } { string str("some string"); const auto splitted = str.split(); REQUIRE_EQ(splitted.size(), 2u); REQUIRE_EQ((const char *)splitted[0], "some"); REQUIRE_EQ((const char *)splitted[1], "string"); } { string str("some string "); const auto splitted = str.split(); REQUIRE_EQ(splitted.size(), 2u); REQUIRE_EQ((const char *)splitted[0], "some"); REQUIRE_EQ((const char *)splitted[1], "string"); } { string str("some string "); const auto splitted = str.split(); REQUIRE_EQ(splitted.size(), 2u); REQUIRE_EQ((const char *)splitted[0], "some"); REQUIRE_EQ((const char *)splitted[1], "string"); } { string str(" some string "); const auto splitted = str.split(); REQUIRE_EQ(splitted.size(), 2u); REQUIRE_EQ((const char *)splitted[0], "some"); REQUIRE_EQ((const char *)splitted[1], "string"); } { string str(" some string "); const auto splitted = str.split(); REQUIRE_EQ(splitted.size(), 2u); REQUIRE_EQ((const char *)splitted[0], "some"); REQUIRE_EQ((const char *)splitted[1], "string"); } { string str(" some string "); const auto splitted = str.split(); REQUIRE_EQ(splitted.size(), 2u); REQUIRE_EQ((const char *)splitted[0], "some"); REQUIRE_EQ((const char *)splitted[1], "string"); } { string str(" some other string "); const auto splitted = str.split(); REQUIRE_EQ(splitted.size(), 3u); REQUIRE_EQ((const char *)splitted[0], "some"); REQUIRE_EQ((const char *)splitted[1], "other"); REQUIRE_EQ((const char *)splitted[2], "string"); } }
Java
module.exports = { entry: { 'public/js/bundle.js': ['./index.js'], }, output: { filename: '[name]', }, devtool: 'eval', module: { loaders: [ { test: /.js$/, exclude: /node_modules/, loaders: ['babel'], } ] } }
Java
// Copyright (c) 2014-2015 The AsturCoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "asturcoinamountfield.h" #include "asturcoinunits.h" #include "guiconstants.h" #include "qvaluecombobox.h" #include <QApplication> #include <QDoubleSpinBox> #include <QHBoxLayout> #include <QKeyEvent> #include <qmath.h> // for qPow() AsturCoinAmountField::AsturCoinAmountField(QWidget *parent) : QWidget(parent), amount(0), currentUnit(-1) { nSingleStep = 100000; // satoshis amount = new QDoubleSpinBox(this); amount->setLocale(QLocale::c()); amount->installEventFilter(this); amount->setMaximumWidth(170); QHBoxLayout *layout = new QHBoxLayout(this); layout->addWidget(amount); unit = new QValueComboBox(this); unit->setModel(new AsturCoinUnits(this)); layout->addWidget(unit); layout->addStretch(1); layout->setContentsMargins(0,0,0,0); setLayout(layout); setFocusPolicy(Qt::TabFocus); setFocusProxy(amount); // If one if the widgets changes, the combined content changes as well connect(amount, SIGNAL(valueChanged(QString)), this, SIGNAL(textChanged())); connect(unit, SIGNAL(currentIndexChanged(int)), this, SLOT(unitChanged(int))); // Set default based on configuration unitChanged(unit->currentIndex()); } void AsturCoinAmountField::setText(const QString &text) { if (text.isEmpty()) amount->clear(); else amount->setValue(text.toDouble()); } void AsturCoinAmountField::clear() { amount->clear(); unit->setCurrentIndex(0); } bool AsturCoinAmountField::validate() { bool valid = true; if (amount->value() == 0.0) valid = false; else if (!AsturCoinUnits::parse(currentUnit, text(), 0)) valid = false; else if (amount->value() > AsturCoinUnits::maxAmount(currentUnit)) valid = false; setValid(valid); return valid; } void AsturCoinAmountField::setValid(bool valid) { if (valid) amount->setStyleSheet(""); else amount->setStyleSheet(STYLE_INVALID); } QString AsturCoinAmountField::text() const { if (amount->text().isEmpty()) return QString(); else return amount->text(); } bool AsturCoinAmountField::eventFilter(QObject *object, QEvent *event) { if (event->type() == QEvent::FocusIn) { // Clear invalid flag on focus setValid(true); } else if (event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease) { QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event); if (keyEvent->key() == Qt::Key_Comma) { // Translate a comma into a period QKeyEvent periodKeyEvent(event->type(), Qt::Key_Period, keyEvent->modifiers(), ".", keyEvent->isAutoRepeat(), keyEvent->count()); QApplication::sendEvent(object, &periodKeyEvent); return true; } } return QWidget::eventFilter(object, event); } QWidget *AsturCoinAmountField::setupTabChain(QWidget *prev) { QWidget::setTabOrder(prev, amount); QWidget::setTabOrder(amount, unit); return unit; } qint64 AsturCoinAmountField::value(bool *valid_out) const { qint64 val_out = 0; bool valid = AsturCoinUnits::parse(currentUnit, text(), &val_out); if (valid_out) { *valid_out = valid; } return val_out; } void AsturCoinAmountField::setValue(qint64 value) { setText(AsturCoinUnits::format(currentUnit, value)); } void AsturCoinAmountField::setReadOnly(bool fReadOnly) { amount->setReadOnly(fReadOnly); unit->setEnabled(!fReadOnly); } void AsturCoinAmountField::unitChanged(int idx) { // Use description tooltip for current unit for the combobox unit->setToolTip(unit->itemData(idx, Qt::ToolTipRole).toString()); // Determine new unit ID int newUnit = unit->itemData(idx, AsturCoinUnits::UnitRole).toInt(); // Parse current value and convert to new unit bool valid = false; qint64 currentValue = value(&valid); currentUnit = newUnit; // Set max length after retrieving the value, to prevent truncation amount->setDecimals(AsturCoinUnits::decimals(currentUnit)); amount->setMaximum(qPow(10, AsturCoinUnits::amountDigits(currentUnit)) - qPow(10, -amount->decimals())); amount->setSingleStep((double)nSingleStep / (double)AsturCoinUnits::factor(currentUnit)); if (valid) { // If value was valid, re-place it in the widget with the new unit setValue(currentValue); } else { // If current value is invalid, just clear field setText(""); } setValid(true); } void AsturCoinAmountField::setDisplayUnit(int newUnit) { unit->setValue(newUnit); } void AsturCoinAmountField::setSingleStep(qint64 step) { nSingleStep = step; unitChanged(unit->currentIndex()); }
Java
<html> <head> <title>Basic</title> <meta name="description" content="Large red-brown mountain terrain with <a-mountain>"> <meta property="og:image" content="https://raw.githubusercontent.com/ngokevin/kframe/master/components/mountain/examples/basic/preview.png"></meta> <script src="../build.js"></script> </head> <body> <a-scene> <a-mountain></a-mountain> <a-sky color="#5F818A"></a-sky> </a-scene> <!--githubcorner--> <a href="https://github.com/ngokevin/kframe/tree/master/components/mountain/examples/basic/" class="github-corner"> <svg width="80" height="80" viewBox="0 0 250 250" style="fill: #111; color: #EFEFEF; position: fixed; bottom: 0; border: 0; left: 0; transform: rotate(180deg); opacity: 0.8"> <path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path> </svg> </a> <style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}} </style> <!--endgithubcorner--> </body> </html>
Java
using System.Collections.Generic; using System.Linq; namespace ComputerAlgebra { public static class Combinatorics { /// <summary> /// Enumerate the permutations of x. /// </summary> /// <typeparam name="T"></typeparam> /// <param name="n"></param> /// <returns></returns> public static IEnumerable<IList<T>> Permutations<T>(this IEnumerable<T> n) { List<T> l = n.ToList(); return Permutations(l, l.Count); } private static IEnumerable<IList<T>> Permutations<T>(IList<T> n, int r) { if (r == 1) { yield return n; } else { for (int i = 0; i < r; i++) { foreach (var j in Permutations(n, r - 1)) yield return j; T t = n[r - 1]; n.RemoveAt(r - 1); n.Insert(0, t); } } } /// <summary> /// Enumerate the combinations of n of length r. /// From: http://www.extensionmethod.net/csharp/ienumerable-t/combinations /// </summary> /// <typeparam name="T"></typeparam> /// <param name="n"></param> /// <param name="r"></param> /// <returns></returns> public static IEnumerable<IEnumerable<T>> Combinations<T>(this IEnumerable<T> n, int r) { if (r == 0) return new[] { new T[0] }; else return n.SelectMany((e, i) => n.Skip(i + 1).Combinations(r - 1).Select(c => new[] { e }.Concat(c))); } } }
Java
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SimpleStatePattern { public class StateB : StateBase { char currentLetter = 'B'; public void Change(Context context) { Console.Write(System.Environment.NewLine + "The current letter is: " + currentLetter + System.Environment.NewLine); Console.WriteLine("Inc:1;Dec:2;Rst;3: "); ConsoleKeyInfo name = Console.ReadKey(); switch (name.KeyChar) { case '1': context.State = new StateC(); break; case '2': context.State = new StateA(); break; case '3': context.State = new StateA(); break; default: context.State = new StateB(); break; } } } }
Java