answer
stringlengths
15
1.25M
<?php include $_SERVER['DOCUMENT_ROOT'] . '/snippets/document/header/index.php'; ?> <div class="layout-project"> <div class="project project_glow context-content"> <section class="project__layout"> <header class="project__header"> <div class="container"> <h1 class="project__title">Glow</h1> </div> </header> <main class="project__main"> <div class="project__image <API key>"> <div class="container"> <div class="image"> <img class="image__tag" src="../assets/images/<API key>.png" alt="Glowcon Layout Home"> </div> </div> </div> <div class="project__info"> <div class="container"> <div class="project__facts"> <ul class="list list_facts"> <li class="list__item">Project - WordPress Website</li> <li class="list__item">Role - Development</li> <li class="list__item">Agency - Bleech</li> <li class="list__item">Year - 2019</li> </ul> </div> </div> </div> <div class="project__image <API key>"> <div class="container"> <div class="image"> <img class="image__tag" src="../assets/images/<API key>.png" alt="Glowcon Media Example"> </div> </div> </div> </main> <footer class="project__footer"> <div class="container"> <a class="button button_circle" aria-label="Open Project URL" href="https: <svg aria-hidden="true" width="44" height="44" viewBox="0 0 44 44" xmlns="https: </a> </div> </footer> </section> </div> </div> <?php include $_SERVER['DOCUMENT_ROOT'] . '/snippets/document/footer/index.php'; ?>
const ASSERT = require('assert'); describe('SSL Specs', function () { const PATH = require('path'); let Acts = require('./../index'); let testcert = PATH.join(__dirname, 'certs', 'test.cert'); let testkey = PATH.join(__dirname, 'certs', 'test.key'); it('boot with testcertificate without chain', function() { return new Promise((resolve, reject) => { try { Acts.createServer(__dirname, { server: { address: 'localhost', port: 8086, ssl: { usessl: true, <API key>: true, privatekey: testkey, certificate: testcert, <API key>: [] } } }); Acts.start(function () { Acts.shutdown(); resolve(); }); } catch (e) { reject(e); } }); }); it('boot with testcertificate with chain', function() { return new Promise((resolve, reject) => { try { Acts.createServer(__dirname, { server: { address: 'localhost', port: 8086, ssl: { usessl: true, <API key>: true, privatekey: testkey, certificate: testcert, <API key>: [testcert] } } }); Acts.start(function () { Acts.shutdown(); resolve(); }); } catch (e) { reject(e); } }); }); });
<?php require "../zxcd9.php"; //$stmt = $db->prepare("SELECT * from fin_allotments where hrdbid=:id"); //$stmt->bindParam(':id', $_SESSION['id']); //$stmt->execute(); //$rowfa = $stmt->fetch(PDO::FETCH_ASSOC); //echo $rowfa['hrdbid']; // echo $_SESSION['id']; // while ($rowfa = $stmt->fetch(PDO::FETCH_ASSOC)) { // echo $rowfa['hrdbid'].'<br>'; $regionz = array("NCR", "CAR", "REGION I", "REGION II", "REGION III", "REGION IV-A", "REGION IV-B", "REGION V", "REGION VI", "REGION VII", "REGION VIII", "REGION IX", "REGION X", "REGION XI", "REGION XII", "CARAGA", "ARMM", "NIR"); //SELECT COUNT(region)as region,re FROM `fin_allotments` WHERE type="CMF" and region="NCR" $cmf = []; foreach ($regionz as $regvalue) { $stmt = $db->prepare("SELECT COUNT(region) as regioncount FROM fin_allotments WHERE region = '".$regvalue."' and type='CMF' "); $stmt->execute(); $row = $stmt->fetch(); $cmf[] = intval($row['regioncount']); } $dr = []; foreach ($regionz as $regvalue) { $stmt = $db->prepare("SELECT COUNT(region) as regioncount FROM fin_allotments WHERE region = '".$regvalue."' and type='DR'"); $stmt->execute(); $row = $stmt->fetch(); $dr[] = intval($row['regioncount']); } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>SLP Online</title> <meta name="description" content="SLP DSWD Livelihood"/> <meta name="viewport" content="width=1000, initial-scale=1.0, maximum-scale=1.0"> <link rel="shortcut icon" href="../imgs/favicon.ico" type="image/x-icon"> <link rel="icon" href="../imgs/favicon.ico" type="image/x-icon"> <link rel="stylesheet" href="../css/flatbootstrap.css"/> <script src="../js/jquery-1.10.2.min.js"></script> <script src="../js/bootstrap.min.js"></script> <script src="https://code.highcharts.com/highcharts.js"></script> <script type="text/javascript" language="javascript" src="../js/jquery.dataTables.js"></script> <style> body { background-color: #f7f9fb; background-size: cover; font-family: "Lato"; } .navbar-nav > li > a, .navbar-brand { padding-top:15px !important; padding-bottom:0 !important; height: 40px; } .navbar {min-height:45px !important;background-color: #000} #bootstrapSelectForm .selectContainer .<API key> { right: -15px; } .disabled { background:rgba(1,1,1,0.2); border:0px solid; cursor:progress; } .vcenter { min-height: 90%; min-height: 90vh; display: -webkit-box; display: -moz-box; display: -ms-flexbox; display: -webkit-flex; display: flex; -webkit-box-align : center; -webkit-align-items : center; -moz-box-align : center; -ms-flex-align : center; align-items : center; width: 100%; -webkit-box-pack : center; -moz-box-pack : center; -ms-flex-pack : center; -<API key> : center; justify-content : center; } table { border-collapse: inherit; } .slpdrop { margin-bottom:1em; } .slpdropsub { background: #000; color:#fff; } .slpdropsub li a { background: #000; color:#fff; } -<API key>: rgba(0,0,0,0); button { outline: none; } .navbar-default .navbar-nav > .open > a, .navbar-default .navbar-nav > .open > a:hover, .navbar-default .navbar-nav > .open > a:focus { background: #000; } .dashpanel { border:solid 1px #c5d6de;margin:1em;margin-top:0;background:#fff;text-align: center; height:100%; border-radius: 4px; } .bluetext { color: #00ADDe; } .padfix { padding-right: 0; margin-bottom:1em; margin-right: 1em; } .padfix2{ padding-right:0em; padding-left: 1em; } .padfix3 { padding-left:1em; padding-right:0; } .padfix4 { padding: 1em; padding-right:0; } .dashpanelheader { font-weight:900;padding-top:0.5em;padding-left:1em;font-size:18px; margin-bottom: 0;text-align: left; } @media (min-width: 990px) { .slpdrop { font-weight:900; font-size:22px; } .padfix { padding-right: 0; margin-right: 0; margin-bottom: 0; } .padfix2{ padding-right:0em; padding-left: 2em; } .padfix3 { padding-left:0; padding-right: 1em; } .padfix4 { padding: 1em; padding-right:1em; } } .dashpanelsubhead { text-align:left;padding-left:1.2em;margin-bottom:0;padding-bottom:0; } thead th { text-align: center; cursor: pointer; } .dataTables_paginate { line-height:22px; text-align:left; } h3 { font-weight: 400 } .nopad { margin:0; padding:0; padding-top:4px; } .nopad::after { color: #ccc; content: attr(data-bg-text); display: block; font-size: 12px; text-align:right; line-height: 1; padding:0; margin:0; margin-top: 0px; position: relative; bottom: 0px; right: 0px; } .labelhover:hover { background: #000; color: #fff; } tr { text-align: center; } .glyphcenter { font-size:12px; padding-right:2px; } .dataTables_filter, .dataTables_info { display: none; } </style> </head> <body> <?php require "navfin.php"; ?> <script> $(function () { var colors = Highcharts.getOptions().colors; regtot = [2,3,34,5,3,2,3,2,2,2,2,2,2,22,34]; regconf = [2,3,34,5,3,2,3,2,2,2,2,2,2,22,3]; $('#cont1').highcharts({ chart: { type: 'column', backgroundColor: null, height: 150 }, title: { text: '' }, subtitle: { text: '' }, credits: { enabled: false }, legend: { enabled: false }, tooltip: { formatter: function() { var point = this.point, s = '<b>'+this.x+'</b><br>Total: <b>'+point.total+'</b><br>'+point.series.name+': <b>'+point.y.toFixed(0)+'</b>'; return s; }, hideDelay: 0 }, xAxis: { categories: [ 'NCR', 'CAR', 'I', 'II', 'III', 'IV-A', 'IV-B', 'V', 'VI', 'VII', 'VIII', 'IX', 'X', 'XI', 'XII', 'CARAGA', 'ARMM', 'NIR' ], crosshair: true, minorGridLineWidth: 0, minorTickWidth: 0, tickWidth: 0, labels: { enabled: true, style: { fontSize:'5px' } } }, yAxis: { min: 0, gridLineWidth: 0, title: '', labels: { enabled: false } }, plotOptions: { column: { pointPadding: 0, borderWidth: 0 }, series: { stacking: 'normal' } }, // series: [{ // name: 'CMF', // color: colors[3], // data: [23,23,55,23,15,09,18,20,50,33,38,21,12,10,40,20] // name: 'DR', // color: colors[8], // data: [43,12,44,22,10,08,25,67,32,10,29,56,19,10,40,20] series: [{ name: 'CMF', color: colors[3], data: [<?php echo $cmf[0].",".$cmf[1].",".$cmf[2].",".$cmf[3].",".$cmf[4].",".$cmf[5].",".$cmf[6].",".$cmf[7].",".$cmf[8].",".$cmf[9].",".$cmf[10].",".$cmf[11].",".$cmf[12].",".$cmf[13].",".$cmf[14].",".$cmf[15].",".$cmf[16].",".$cmf[17]; ?>] },{ name: 'DR', color: colors[8], data: [<?php echo $dr[0].",".$dr[1].",".$dr[2].",".$dr[3].",".$dr[4].",".$dr[5].",".$dr[6].",".$dr[7].",".$dr[8].",".$dr[9].",".$dr[10].",".$dr[11].",".$dr[12].",".$dr[13].",".$dr[14].",".$dr[15].",".$dr[16].",".$dr[17]; ?>] }] }); }); function delcom(xx) { var r = confirm("This will permanently delete this record. Are you sure?"); if (r == true) { var formData = { 'action' : 'delallo', 'delid' : xx }; $.ajax({ type: "POST", url: "func.php", data: formData, success: function(data) { $("#sucsubtext").html("Record deleted"); $('#myModal').modal(); $('#myModal').on('hidden.bs.modal', function () {location.href = "../finance/allotments_add.php"; }); location.reload(); } }); } } function allotview(ee) { var formData = { 'editid' : ee }; $.ajax({ type: "POST", url: "allotments_view.php?id="+ee, data: formData, success: function(data) { if (data == "visitpage") { location.href="allotments_view.php?id="+ee; } } }); } </script> <script type="text/javascript" language="javascript" class="init"> var oTable = ""; $(document).ready(function() { function toTitleCase(str) { return str.replace(/\w\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();}); } function parselimit(strz) { var m = new String(strz); if (m.length > 32) { m = m.substring(0,32); m = m+".."; } return m; } function com(x) { return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); } function parseStatus(str) { if (str == "0") { status = "<span class='label label-primary'>Open</span>"; } else if (str == "1") { status = "<span class='label label-primary'>Proposed</span>"; } else if (str == "2") { status = "<span class='label label-warning'>In Progress</span>"; } else if (str == "3") { status = "<span class='label label-info'>Completed</span>"; } return status; } $.fn.DataTable.ext.pager.numbers_length = 5; oTable = $('#viewdata').dataTable({ "aProcessing": true, "aServerSide": true, "orderCellsTop": true, "ajax": "dt_allotments.php", "dom": '<"top">rt<"bottom"ip><"clear">', "aaSorting": [9,'desc'], "fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) { $(nRow).attr('id', aData[0]); // $(nRow).attr('subfeed', aData[1]); return nRow; }, "aoColumnDefs": [ { "aTargets":[7], "mData": null, "mRender": function( data, type, full) { return '<td>&#8369;'+com(data[7])+'</td>'; } }, { "aTargets":[9], "mData": null, "mRender": function( data, type, full) { var id='<?php echo $_SESSION['id']; ?>'; var lvl='<?php echo $_SESSION['permlvl']; ?>'; var d9=data[9]; if(lvl>0 || d9==id) { return '<td><span class=" glyphicon glyphicon-search" onclick="allotview('+data[0]+')"></span>&nbsp;<span class="glyphicon glyphicon-remove" onclick="delcom('+data[0]+')"></span></td>'; } else { return '<td><span class=" glyphicon glyphicon-search" onclick="allotview('+data[0]+')"></span></td>'; } } }, { "bVisible": false, "aTargets":[0] } ] }); $(document).ready(function() { tableshown=false; $("#searchme").keyup(function() { if (tableshown==false) { tableshown=true; } oTable.fnFilter(this.value); }); }); }); </script> <div class="row" style="margin:0;padding:0"> <div class="col-md-2"> <?php require "nav_side.php"; ?> </div> <div class="col-md-10"> <div class="row"> <div class="col-md-12"> <div style="border:solid 1px #c5d6de;background:#fff;text-align:left;padding:2em;margin-bottom:2em"> <div class="row"> <div class="col-md-4"> <h2 style="font-size:36px;margin-bottom:0em;margin-top:0em">Fund Allotments</h2> Encoded by SLP-NPMO <br><br> <a href="allotments_add.php"><button class="btn btn-info btn-sm">Add Fund Allotment</button></a> <button class="btn btn-success btn-sm" onclick="showsearch()"><span class="glyphicon glyphicon-search"></span>&nbsp; Search</button> <br> </div> <div class="col-md-8" id="cont1" style=""> </div> </div> <div class="row" style="margin-top:1em;margin-bottom:1em;display:none;" id="searchfields"> <div class="row" style="padding:2em;padding-bottom:1em"> <input class="col-md-12 form-control" placeholder="Search keywords ..." id="searchme"> </div> <div class="col-md-4"> <select class="form-control"> <option>Filter by Region</option> </select> </div> <div class="col-md-4"> <select class="form-control"> <option>Filter by Type</option> <option>CMF</option> <option>DR</option> </select> </div> <div class="col-md-4"> <select class="form-control"> <option>Filter by Fund Source</option> <option>SLP GAA - MD</option> <option>SLP GAA - EF</option> <option>BUB</option> <option>RRP</option> </select> </div> </div> <table class="table table-bordered table-hover" style="margin-top:2em;line-height:0.9;vertical-align:middle;border-top:2;padding-bottom:0;margin-bottom:0" id="viewdata"> <thead style="background:#f6f8fa"> <th></th> <th>Region</th> <th>Type</th> <th>Sub-Type</th> <th>Sub-Aro</th> <th>UACS</th> <th>Fund Source</th> <th>Amount</th> <th>Date</th> <th></th> </thead> <! <td>Region IV-B</td> <td>CMF</td> <td>Grant</td> <td>2348712398</td> <td>-</td> <td>SLP-EF</td> <td>468,232.00</td> <td>06/17/2016</td> <td><span class="glyphicon glyphicon-edit"></span> <span class="glyphicon glyphicon-remove"></span></td> </tr> <tr> <td>Region IV-B</td> <td>CMF</td> <td>Grant</td> <td>3021000003</td> <td>-</td> <td>SLP-MD</td> <td>268,232.00</td> <td>06/17/2016</td> <td><span class="glyphicon glyphicon-edit"></span> <span class="glyphicon glyphicon-remove"></span></td> </tr> <tr> <td>Region IV-B</td> <td>DR</td> <td>Admin</td> <td>-</td> <td>Travelling Expense</td> <td>PAMANA</td> <td>568,232.00</td> <td>06/17/2016</td> <td><span class="glyphicon glyphicon-edit"></span> <span class="glyphicon glyphicon-remove"></span></td> </tr> <tr data-toggle="tooltip" title="<div style='text-align:left'>Realigned to: <span style='font-weight:normal'>Training Expenses</span><br>Amount: <font color=red>-20,000.00</font><br>Original Amount: 188,232.00<br>Date: 09/27/2016</div>" data-html="true" data-placement="left" data-container="body"> <td>Region IV-B</td> <td>DR</td> <td>Admin</td> <td>-</td> <td>Salary</td> <td>BUB</td> <td>168,232.00</td> <td>06/17/2016</td> <td><span class="glyphicon glyphicon-edit"></span> <span class="glyphicon glyphicon-remove"></span></td> </tr> <tr data-toggle="tooltip" title="<div style='text-align:left'>Realigned from: <span style='font-weight:normal'>Salary</span><br>Amount: <span class='colgreen'>+20,000.00</span><br>Original Amount: 1,444,232.00<br>Date: 09/27/2016</div>" data-html="true" data-placement="left" data-container="body"> <td>NCR</td> <td>CMF</td> <td>Admin</td> <td>-</td> <td>Training Expenses</td> <td>RRP</td> <td>1,468,232.00</td> <td>06/17/2016</td> <td><span class="glyphicon glyphicon-edit"></span> <span class="glyphicon glyphicon-remove"></span></td> </tr> <tr> <td>Region X</td> <td>CMF</td> <td>Admin</td> <td>-</td> <td>Mobile</td> <td>RSF</td> <td>868,232.00</td> <td>06/17/2016</td> <td><span class="glyphicon glyphicon-edit"></span> <span class="glyphicon glyphicon-remove"></span></td> </tr> </table> <button class="btn btn-primary btn-xs" style="margin-top:0.5em;margin-left:3px">Export to Excel</button> <div class="clearfix"></div> </div> </div> </div> </div> <!-- Modal --> <div class="modal fade" id="myModal" role="dialog" style="margin-top:3em"> <div class="modal-dialog modal-sm"> <div class="modal-content" style="padding:1em;padding-top:0.5em;"> <h3 style="color:#5cb85c;margin-bottom:6px">Success!</h3> <span style="font-size:13px" id="sucsubtext">Fund Allotments saved!</span><br><br> <button type="button" class="btn btn-primary pull-right" style="background:#5cb85c;border:0;margin-top:0;padding:5px 10px 5px 10px" id="okaybtn" data-dismiss="modal">Okay</button> <div class="clearfix"></div> </div> </div> </div> <!-- Modal --> <script> $('[data-toggle="tooltip"]').tooltip(); shown = false; function showsearch() { if (shown == true) { $('#searchfields').fadeOut(399); shown = false; } else { shown = true; $('#searchfields').slideDown(399); } } function getProv() { var formData = { 'action' : 'province', 'regionid' : $('#region option:selected').val() }; $.ajax({ type: "POST", url: "getLocations.php", data: formData, success: function(data) { $("#province").prop('disabled', false); $("#province").html(data); } }); } </script> </body> </html>
<div class="sv-main-content"><div ui-view=""><div layout="row" layout-wrap="layout-wrap" ng-if="!mapView" style="max-width:1400px;margin: 0px auto"><div flex-sm="100" flex-gt-sm="50" flex-gt-md="33" flex-gt-lg="33" ng-repeat="agent in agents"><<API key> class="m"></<API key>></div></div></div></div>
namespace XHTMLClassLibrary.AttributeDataTypes { <summary> One or more digits. </summary> public class Number : IAttributeDataType { private int? _number = null; public string Value { get { if (_number.HasValue) { return _number.ToString(); } return string.Empty; } set { _number = null; int temp; if(int.TryParse(value, out temp)) { _number = temp; } } } } }
require "houston/releases/engine" require "houston/releases/configuration" module Houston module Releases extend self def dependencies [ :commits ] end def config(&block) @configuration ||= Releases::Configuration.new @configuration.instance_eval(&block) if block_given? @configuration end end # Extension Points # Read more about extending Houston at: # Register events that will be raised by this module register_events {{ "release:create" => params("release").desc("A new release was created") }} # Add a link to feature that can be turned on for projects Houston.add_project_feature :releases do name "Releases" path { |project| Houston::Releases::Engine.routes.url_helpers.releases_path(project) } ability { |ability, project| ability.can?(:read, project.releases.build) } field "releases.environments" do name "Environments" html do |f| if @project.environments.none? "" else html = <<-HTML <p class="instructions"> Generate release notes for these environments: </p> HTML @project.environments.each do |environment| id = :"releases.ignore.#{environment}" value = f.object.public_send(id) || "0" html << f.label(id, class: "checkbox") do f.check_box(id, {checked: value == "0"}, "0", "1") + " #{environment.titleize}" end end html end end end end end
# coding=utf-8 # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. from .sub_resource import SubResource class <API key>(SubResource): """An Ssl predefined policy. :param id: Resource ID. :type id: str :param name: Name of Ssl predefined policy. :type name: str :param cipher_suites: Ssl cipher suites to be enabled in the specified order for application gateway. :type cipher_suites: list[str or ~azure.mgmt.network.v2017_10_01.models.<API key>] :param <API key>: Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv1_0', 'TLSv1_1', 'TLSv1_2' :type <API key>: str or ~azure.mgmt.network.v2017_10_01.models.<API key> """ _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'cipher_suites': {'key': 'properties.cipherSuites', 'type': '[str]'}, '<API key>': {'key': 'properties.minProtocolVersion', 'type': 'str'}, } def __init__(self, **kwargs): super(<API key>, self).__init__(**kwargs) self.name = kwargs.get('name', None) self.cipher_suites = kwargs.get('cipher_suites', None) self.<API key> = kwargs.get('<API key>', None)
const path = require('path'); const inquirer = require('inquirer'); const yargs = require('yargs'); const { sanitizeArgs, ui, invalidGitRepo, ingredients, addIngredients, promiseTimeout } = require('../common'); const { cloneRepo, deleteGitFolder, <API key>, addGitRemote, <API key>, stageChanges } = require('../tasks/git'); const { createEnvFile, <API key>, executeCommand } = require('../tasks/filesystem'); const { <API key>, bakeProject } = require('../tasks/project'); const <API key> = repoURL => { let projectName = path.basename(repoURL).toLowerCase(); projectName = projectName.replace(/\.git$/, ''); projectName = projectName.replace(/\.+/g, '-'); projectName = projectName.replace(/-+/g, '-'); return projectName; }; const getValidProjectName = name => { return name .replace(/\W+/g, ' ') // alphanumerics only .trimRight() .replace(/ /g, '-') .toLowerCase(); }; module.exports = { command: 'prepare', desc: 'creates a new scaffold from an ezbake project in a specified Git source', builder: yargs => { return yargs .option('n', { alias: 'projectName', describe: 'Alphanumeric project name' }) .option('r', { alias: 'gitRepoURL', describe: 'The URL of the source Git repo to ezbake' }) .option('b', { alias: 'gitRepoBranch', describe: 'The branch on the source repo which contains the .ezbake folder' }) .option('o', { alias: 'gitOriginURL', describe: 'The URL of the Git destination repo to push to as a remote origin' }) .option('s', { alias: 'simple', describe: 'Flag to indicate Whether to ask for authorName, authorEmail and projectDescription', type: 'boolean', default: false }); }, handler: async argv => { // console.log(argv); let args = sanitizeArgs(argv); // Sanitize Project Name, if passed in as parameter if (args['projectName']) { args['projectName'] = getValidProjectName(args['projectName']); } let baseIngredients = ingredients; const TIMEOUT = 20000; try { // Mise en place baseIngredients = baseIngredients.filter(ingredient => { if (ingredient.name === 'projectName') { // Override default project name if (!args[ingredient.name] && args['gitOriginURL']) { ingredient.default = <API key>(args['gitOriginURL']); } } // Exclude fields for which the values have already been provided with the command if (args[ingredient.name]) { console.log(`> ${ingredient.name}: ${args[ingredient.name]}`); return false; } // Exclude some fields in case of simple setup if ( args['simple'] && ['authorName', 'authorEmail', 'projectDescription'].includes( ingredient.name ) ) { return false; } return true; }); let projectIngredients = await inquirer.prompt(baseIngredients); projectIngredients = Object.assign(projectIngredients, args); projectIngredients.projectName = await <API key>( ui, projectIngredients.projectName ); // Check if the repo is valid await cloneRepo( ui, projectIngredients.gitRepoURL, projectIngredients.gitRepoBranch, projectIngredients.projectName ).catch(invalidGitRepo); let recipe = <API key>( ui, projectIngredients.projectName, projectIngredients.gitRepoURL, projectIngredients.gitRepoBranch ); // Remove git bindings await promiseTimeout( TIMEOUT, deleteGitFolder(ui, projectIngredients.projectName) ).catch(err => { throw new Error(`Error: ${err} while deleting cloned Git folder.`); }); // Ask away! let ingredients = await inquirer.prompt(recipe.ingredients); let allIngredients = Object.assign( { projectIngredients, ingredients }, { projectNameDocker: projectIngredients.projectName.replace(/-/g, '_'), projectAuthor: projectIngredients.authorName + ' <' + projectIngredients.authorEmail + '>' } ); bakeProject(ui, allIngredients, recipe); // .env file setup if (recipe.env) { let envAnswers = await inquirer.prompt(recipe.env); createEnvFile(ui, projectIngredients.projectName, envAnswers); } // Finally, establish a local .git binding // And optionally add the specified remote await promiseTimeout( TIMEOUT, <API key>(ui, projectIngredients.projectName) ).catch(err => { throw new Error(`Error: ${err} while establishing Git bindings.`); }); if (projectIngredients.gitOriginURL) { await addGitRemote( ui, projectIngredients.gitOriginURL, projectIngredients.projectName ); } if (recipe.icing && Array.isArray(recipe.icing)) { ui.log.write(`. Applying icing...`); let projectDir = path.join( process.cwd(), `./${projectIngredients.projectName}` ); process.chdir(projectDir); for (let icing of recipe.icing) { ui.log.write(` . ${icing.description}`); if (Array.isArray(icing.cmd)) { await executeCommand( addIngredients(icing.cmd, allIngredients), icing.cmdOptions ); } } ui.log.write(`. Icing applied!`); } // Finally, stage and commit the changes. // And optionally push to a remote repo await stageChanges( ui, '[ezbake] - initial commit', projectIngredients.projectName ); if (projectIngredients.gitOriginURL) { await <API key>( ui, projectIngredients.gitOriginURL, projectIngredients.projectName ); } ui.log.write(`. Your project is ready!`); process.exit(0); } catch (error) { ui.log.write(error.message); process.exit(-1); } } };
import React from 'react' import { useSelector } from 'react-redux' import Container from 'react-bootstrap/Container' import Row from 'react-bootstrap/Row' import Col from 'react-bootstrap/Col' import MoveSelector from '../containers/move-selector' import Footer from '../containers/footer' import Player from '../containers/player' import WelcomeDlg from '../containers/welcome-dlg' import History from '../features/history' import { GlobalState } from '../reducers/consts' const Game = () => { const showWelcome = useSelector(state => state.globalState === GlobalState.New) return ( <> <WelcomeDlg show={showWelcome} /> <Container> <Row> <Col> <Player color='white' /> </Col> <Col> <Player color='black' right /> </Col> </Row> <Row> <Col className='px-0'> <MoveSelector /> </Col> <Col sm='3' className='pr-0 pl-1'> <History /> </Col> </Row> <Row> <Col className='px-0'> <Footer /> </Col> </Row> </Container> </> ) } export default Game
namespace EnergyTrading.MDM.Test.Contracts.Validators { using System; using System.Collections.Generic; using System.Linq; using EnergyTrading.MDM.ServiceHost.Unity.Configuration; using global::MDM.ServiceHost.Unity.Sample.Configuration; using Microsoft.Practices.Unity; using NUnit.Framework; using Moq; using EnergyTrading.MDM.Contracts.Validators; using EnergyTrading; using EnergyTrading.Data; using EnergyTrading.Validation; using EnergyTrading.MDM; using Broker = EnergyTrading.MDM.Contracts.Sample.Broker; [TestFixture] public partial class <API key> : Fixture { [Test] public void ValidatorResolution() { var container = CreateContainer(); var meConfig = new <API key>(container); meConfig.Configure(); var repository = new Mock<IRepository>(); container.RegisterInstance(repository.Object); var config = new BrokerConfiguration(container); config.Configure(); var validator = container.Resolve<IValidator<Broker>>("broker"); // Assert Assert.IsNotNull(validator, "Validator resolution failed"); } [Test] public void ValidBrokerPasses() { // Assert var start = new DateTime(1999, 1, 1); var system = new MDM.SourceSystem { Name = "Test" }; var systemList = new List<MDM.SourceSystem> { system }; var systemRepository = new Mock<IRepository>(); var repository = new <API key>(); systemRepository.Setup(x => x.Queryable<MDM.SourceSystem>()).Returns(systemList.AsQueryable()); var identifier = new EnergyTrading.Mdm.Contracts.MdmId { SystemName = "Test", Identifier = "1", StartDate = start.AddHours(-10), EndDate = start.AddHours(-5) }; var validatorEngine = new Mock<IValidatorEngine>(); var validator = new BrokerValidator(validatorEngine.Object, repository); var broker = new Broker { Details = new EnergyTrading.MDM.Contracts.Sample.BrokerDetails{Name = "Test"}, Identifiers = new EnergyTrading.Mdm.Contracts.MdmIdList { identifier } }; this.AddRelatedEntities(broker); // Act var violations = new List<IRule>(); var result = validator.IsValid(broker, violations); // Assert Assert.IsTrue(result, "Validator failed"); Assert.AreEqual(0, violations.Count, "Violation count differs"); } [Test] public void OverlapsRangeFails() { // Assert var start = new DateTime(1999, 1, 1); var finish = new DateTime(2020, 12, 31); var validity = new DateRange(start, finish); var system = new MDM.SourceSystem { Name = "Test" }; var brokerMapping = new PartyRoleMapping { System = system, MappingValue = "1", Validity = validity }; var list = new List<PartyRoleMapping> { brokerMapping }; var repository = new Mock<IRepository>(); repository.Setup(x => x.Queryable<PartyRoleMapping>()).Returns(list.AsQueryable()); var systemList = new List<MDM.SourceSystem>(); var systemRepository = new Mock<IRepository>(); systemRepository.Setup(x => x.Queryable<MDM.SourceSystem>()).Returns(systemList.AsQueryable()); var <API key> = new EnergyTrading.Mdm.Contracts.MdmId { SystemName = "Test", Identifier = "1", StartDate = start.AddHours(10), EndDate = start.AddHours(15) }; var identifierValidator = new NexusIdValidator<PartyRoleMapping>(repository.Object); var validatorEngine = new Mock<IValidatorEngine>(); validatorEngine.Setup(x => x.IsValid(It.IsAny<EnergyTrading.Mdm.Contracts.MdmId>(), It.IsAny<IList<IRule>>())) .Returns((EnergyTrading.Mdm.Contracts.MdmId x, IList<IRule> y) => identifierValidator.IsValid(x, y)); var validator = new BrokerValidator(validatorEngine.Object, repository.Object); var broker = new Broker { Identifiers = new EnergyTrading.Mdm.Contracts.MdmIdList { <API key> } }; // Act var violations = new List<IRule>(); var result = validator.IsValid(broker, violations); // Assert Assert.IsFalse(result, "Validator succeeded"); } [Test] public void BadSystemFails() { // Assert var start = new DateTime(1999, 1, 1); var finish = new DateTime(2020, 12, 31); var validity = new DateRange(start, finish); var system = new MDM.SourceSystem { Name = "Test" }; var brokerMapping = new PartyRoleMapping { System = system, MappingValue = "1", Validity = validity }; var list = new List<PartyRoleMapping> { brokerMapping }; var repository = new Mock<IRepository>(); repository.Setup(x => x.Queryable<PartyRoleMapping>()).Returns(list.AsQueryable()); var badSystemIdentifier = new EnergyTrading.Mdm.Contracts.MdmId { SystemName = "Jim", Identifier = "1", StartDate = start.AddHours(-10), EndDate = start.AddHours(-5) }; var identifierValidator = new NexusIdValidator<PartyRoleMapping>(repository.Object); var validatorEngine = new Mock<IValidatorEngine>(); validatorEngine.Setup(x => x.IsValid(It.IsAny<EnergyTrading.Mdm.Contracts.MdmId>(), It.IsAny<IList<IRule>>())) .Returns((EnergyTrading.Mdm.Contracts.MdmId x, IList<IRule> y) => identifierValidator.IsValid(x, y)); var validator = new BrokerValidator(validatorEngine.Object, repository.Object); var broker = new Broker { Identifiers = new EnergyTrading.Mdm.Contracts.MdmIdList { badSystemIdentifier } }; // Act var violations = new List<IRule>(); var result = validator.IsValid(broker, violations); // Assert Assert.IsFalse(result, "Validator succeeded"); } partial void AddRelatedEntities(EnergyTrading.MDM.Contracts.Sample.Broker contract); } }
# <API key> Elasticsearch Interpreter for [Appache Zeppelin](https://zeppelin.incubator.apache.org/). ![Search pie](/docs/images/search_pie.png) ## Build It's a Maven project, so it's simple: bash mvn clean package You should have a `<API key>.jar` in the _target_ directory. ## Install `ZEPPELIN_HOME` is your Zeppelin installation directory. * Create a directory in <ZEPPELIN_HOME>/interpreters: bash cd <ZEPPELIN_HOME>/interpreters mkdir elasticsearch * Copy the jar of <API key> in the directory `<ZEPPELIN_HOME>/interpreters/elasticsearch`. * In `<ZEPPELIN HOME>/conf/zeppelin-site.xml`, add the interpreter class: xml <property> <name>zeppelin.interpreters</name> <value>__io.millesabords.zeppelin.elasticsearch.<API key>,org.apache.zeppelin.spark.SparkInterpreter,...</value> <description>Comma separated interpreter configurations. First interpreter become a default</description> </property> * Start Zeppelin: bash <ZEPPELIN_HOME>/bin/zeppelin-daemon.sh start ## How to use the interpreter Configuration First, you have to configure the interpreter by setting the values of: * the name of the cluster * the host of a node * the port of node ![Config](/docs/images/config.png) Commands In a paragraph, use `%els` to select the Elasticsearch interpreter and then input all commands. # get With the `get` command, you can get a document. bash | get /index/type/id Example: ![Get](/docs/images/get.png) # search With the `search` command, you can send a search query in Elasticsearch. bash | search /index1,index2,.../type1,type2,... <size of the response> <JSON document containing the query> Example: * With a table containing the results: ![Search - table](/docs/images/search_table.png) * You can also use a predefined diagram: ![Search - table](/docs/images/search_pie.png) # count With the `count` command, you can count documents in Elasticsearch. bash | count /index1,index2,.../type1,type2,... Example: ![Count](/docs/images/count.png) # index With the `index` command, you can index a new document in Elasticsearch. bash | index /index/type/id <JSON document> | index /index/type <JSON document> # get With the `delete` command, you can delete a document. bash | delete /index/type/id Why 'commands' instead of using http methods ? Because, I think it's more easier to understand/write/maintain commands than HTTP requests. And it's closer to the Java API that uses XXXRequest, where XXX is Count, Search or Delete.
package hprose.util.concurrent; public interface Callback<V> {}
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="generator" content="rustdoc"> <meta name="description" content="API documentation for the Rust `mk_bare_fn` fn in crate `rustc_typeck`."> <meta name="keywords" content="rust, rustlang, rust-lang, mk_bare_fn"> <title>rustc_typeck::middle::ty::mk_bare_fn - Rust</title> <link rel="stylesheet" type="text/css" href="../../../main.css"> <link rel="shortcut icon" href="http: </head> <body class="rustdoc"> <!--[if lte IE 8]> <div class="warning"> This old browser is unsupported and will most likely display funky things. </div> <![endif] <section class="sidebar"> <a href='../../../rustc_typeck/index.html'><img src='http: <p class='location'><a href='../../index.html'>rustc_typeck</a>::<wbr><a href='../index.html'>middle</a>::<wbr><a href='index.html'>ty</a></p><script>window.sidebarCurrent = {name: 'mk_bare_fn', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script> </section> <nav class="sub"> <form class="search-form js-only"> <div class="search-container"> <input class="search-input" name="search" autocomplete="off" placeholder="Click or press 'S' to search, '?' for more options..." type="search"> </div> </form> </nav> <section id='main' class="content fn"> <h1 class='fqn'><span class='in-band'>Function <a href='../../index.html'>rustc_typeck</a>::<wbr><a href='../index.html'>middle</a>::<wbr><a href='index.html'>ty</a>::<wbr><a class='fn' href=''>mk_bare_fn</a><wbr><a class='stability Unstable' title=''>Unstable</a></span><span class='out-of-band'><span id='render-detail'> <a id="collapse-all" href="#">[-]</a>&nbsp;<a id="expand-all" href="#">[+]</a> </span><a id='src-218308' href='../../../rustc/middle/ty/fn.mk_bare_fn.html?gotosrc=218308'>[src]</a></span></h1> <pre class='rust fn'>pub fn mk_bare_fn(cx: &amp;<a class='struct' href='../../../rustc_typeck/middle/ty/struct.ctxt.html' title='rustc_typeck::middle::ty::ctxt'>ctxt</a>&lt;'tcx&gt;, opt_def_id: <a class='enum' href='../../../core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='struct' href='http://doc.rust-lang.org/nightly/syntax/ast/struct.DefId.html' title='syntax::ast::DefId'>DefId</a>&gt;, fty: &amp;'tcx <a class='struct' href='../../../rustc_typeck/middle/ty/struct.BareFnTy.html' title='rustc_typeck::middle::ty::BareFnTy'>BareFnTy</a>&lt;'tcx&gt;) -&gt; &amp;'tcx <a class='struct' href='../../../rustc_typeck/middle/ty/struct.TyS.html' title='rustc_typeck::middle::ty::TyS'>TyS</a>&lt;'tcx&gt;</pre></section> <section id='search' class="content hidden"></section> <section class="footer"></section> <div id="help" class="hidden"> <div class="shortcuts"> <h1>Keyboard shortcuts</h1> <dl> <dt>?</dt> <dd>Show this help dialog</dd> <dt>S</dt> <dd>Focus the search field</dd> <dt>&larrb;</dt> <dd>Move up in search results</dd> <dt>&rarrb;</dt> <dd>Move down in search results</dd> <dt>&#9166;</dt> <dd>Go to active search result</dd> </dl> </div> <div class="infos"> <h1>Search tricks</h1> <p> Prefix searches with a type followed by a colon (e.g. <code>fn:</code>) to restrict the search to a given type. </p> <p> Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>typedef</code> (or <code>tdef</code>). </p> </div> </div> <script> window.rootPath = "../../../"; window.currentCrate = "rustc_typeck"; window.playgroundUrl = ""; </script> <script src="../../../jquery.js"></script> <script src="../../../main.js"></script> <script async src="../../../search-index.js"></script> </body> </html>
const fs = require('fs'); const path = require('path'); class Service { constructor() { this.getFileRecursevly = this.getFileRecursevly.bind(this); this.getFiles = this.getFiles.bind(this); } getFileRecursevly(folderPath, shortPath = '') { var files = []; var folder = fs.readdirSync(path.resolve(__dirname, folderPath)); var x = folder.forEach(file => { var filePath = path.resolve(folderPath, file); if (fs.lstatSync(filePath).isDirectory()) { files.push({ folder: file, files: this.getFileRecursevly(filePath, file) }) } else { files.push({ file: file, folder: shortPath }); } }) return files; } getFiles(path) { return new Promise((resolve, reject) => { var files = this.getFileRecursevly(path) resolve(files) }) } } module.exports = Service;
namespace Naos.Database.Domain { using System; using System.Collections.Generic; using System.Linq; using OBeautifulCode.Assertion.Recipes; using OBeautifulCode.Serialization; using static System.FormattableString; public partial class <API key> { <inheritdoc /> public override IReadOnlyCollection<long> Execute( <API key> operation) { throw new <API key>(); /* operation.MustForArg(nameof(operation)).NotBeNull(); var <API key> = operation.<API key><<API key>>() ?? this.TryGetSingleLocator(); lock (this.streamLock) { IReadOnlyCollection<long> <API key>() { switch (operation.<API key>) { case <API key>.ReturnDefault: return new long[0]; case <API key>.Throw: throw new <API key>(Invariant($"Expected stream {this.<API key>} to contain a matching record for {operation}, none was found and {nameof(operation.<API key>)} is '{operation.<API key>}'.")); default: throw new <API key>(Invariant($"{nameof(<API key>)} {operation.<API key>} is not supported.")); } } this.<API key>.TryGetValue(<API key>, out var partition); if (partition == null) { return <API key>(); } var result = partition .Where( _ => _.Metadata.FuzzyMatchTypes( operation.RecordFilter.IdTypes, operation.RecordFilter.ObjectTypes, operation.RecordFilter.<API key>)) .Select(_ => _.InternalRecordId) .Union( operation.RecordFilter.Ids.Any() partition .Where( _ => _.Metadata.<API key>( operation.StringSerializedId, operation.IdentifierType, operation.ObjectType, operation.<API key>)) .Select(_ => _.InternalRecordId)) .ToList(); if (result.Any()) { return result; } else { return <API key>(); } } */ } <inheritdoc /> public override IReadOnlyCollection<<API key>> Execute( <API key> operation) { operation.MustForArg(nameof(operation)).NotBeNull(); var result = new HashSet<<API key>>(); lock (this.streamLock) { var locators = new List<<API key>>(); if (operation.<API key> != null) { locators.Add(operation.<API key><<API key>>()); } else { var allLocators = this.<API key>.Execute(new <API key>()); foreach (var locator in allLocators) { locators.Add(locator.ConfirmAndConvert<<API key>>()); } } foreach (var <API key> in locators) { this.<API key>.TryGetValue(<API key>, out var partition); if (partition != null) { foreach (var streamRecord in partition) { if (streamRecord.Metadata.FuzzyMatchTypes( operation.RecordFilter.IdTypes, operation.RecordFilter.ObjectTypes, operation.RecordFilter.<API key>) && ((!operation.RecordFilter.Tags?.Any() ?? true) || streamRecord.Metadata.Tags.FuzzyMatchTags(operation.RecordFilter.Tags, operation.RecordFilter.TagMatchStrategy))) { result.Add( new <API key>( streamRecord.Metadata.StringSerializedId, streamRecord.Metadata.<API key>.<API key>( operation.RecordFilter.<API key>))); } } } } } return result; } <inheritdoc /> public override StreamRecord Execute( <API key> operation) { throw new <API key>(); /* operation.MustForArg(nameof(operation)).NotBeNull(); var <API key> = operation.<API key><<API key>>() ?? this.TryGetSingleLocator(); lock (this.streamLock) { this.<API key>.TryGetValue(<API key>, out var partition); var result = partition? .OrderByDescending(_ => _.InternalRecordId) .FirstOrDefault( _ => _.Metadata.FuzzyMatchTypes( operation.IdentifierType == null ? null : new[] { operation.IdentifierType, }, operation.ObjectType == null ? null : new[] { operation.ObjectType, }, operation.<API key>)); if (result != null) { return result; } switch (operation.<API key>) { case <API key>.ReturnDefault: return null; case <API key>.Throw: throw new <API key>(Invariant($"Expected stream {this.<API key>} to contain a matching record for {operation}, none was found and {nameof(operation.<API key>)} is '{operation.<API key>}'.")); default: throw new <API key>(Invariant($"{nameof(<API key>)} {operation.<API key>} is not supported.")); } } */ } <inheritdoc /> public override string Execute( <API key> operation) { operation.MustForArg(nameof(operation)).NotBeNull(); var delegatedOp = new <API key>( operation.RecordFilter, operation.<API key>, <API key>.MetadataAndPayload, operation.<API key>); var record = this.Execute(delegatedOp); string result; if (record == null) { result = null; } else { if (record.Payload is <API key> <API key>) { result = <API key>.SerializedPayload; } else { switch (operation.<API key>) { case <API key>.ReturnDefault: result = null; break; case <API key>.Throw: throw new <API key>(Invariant($"record {nameof(SerializationFormat)} not {SerializationFormat.String}, it is {record.Payload.<API key>()}, but {nameof(<API key>)} is not {nameof(<API key>.ReturnDefault)}")); default: throw new <API key>(Invariant($"{nameof(<API key>)} {operation.<API key>} is not supported.")); } } } return result; } } }
package com.falcon.cms.web.rest; import com.falcon.cms.web.rest.vm.LoggerVM; import ch.qos.logback.classic.Level; import ch.qos.logback.classic.LoggerContext; import com.codahale.metrics.annotation.Timed; import org.slf4j.LoggerFactory; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.*; import java.util.List; import java.util.stream.Collectors; /** * Controller for view and managing Log Level at runtime. */ @RestController @RequestMapping("/management") public class LogsResource { @GetMapping("/logs") @Timed public List<LoggerVM> getList() { LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); return context.getLoggerList() .stream() .map(LoggerVM::new) .collect(Collectors.toList()); } @PutMapping("/logs") @ResponseStatus(HttpStatus.NO_CONTENT) @Timed public void changeLevel(@RequestBody LoggerVM jsonLogger) { LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); context.getLogger(jsonLogger.getName()).setLevel(Level.valueOf(jsonLogger.getLevel())); } }
# Change Log All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). Fixed - Add missing exporter service Fixed - Fixed `<API key>` calling protected methods. This class is used by other bundles for testing. Changed - Updated Bootstrap from version 3.3.5 to version 3.3.6 - Updated Font-awesome from version 4.5.0 to version 4.6.3 Fixed - Typo on `choices_as_values` option for `EqualType`
import DateParser from '../date-parser.js'; import ParsedInfo from '../../parsed-info'; import moment from 'moment'; Date.now = jest.fn(() => 1527130897000) test('Parses 12 Jan', () => { const dateParser = new DateParser(); dateParser.parse('12 Jan', ParsedInfo); const { value, startIndex, endIndex } = ParsedInfo.dateParser; expect({ value: value.unix(), startIndex, endIndex }) .toEqual({ value: 1515695400, startIndex: 0, endIndex: 6 }); }); test('Parses 22 May', () => { const dateParser = new DateParser(); dateParser.parse('22 May', ParsedInfo); const { value, startIndex, endIndex } = ParsedInfo.dateParser; expect({ value: value.unix(), startIndex, endIndex }) .toEqual({ value: 1526927400, startIndex: 0, endIndex: 6 }); });
topic: "Turtle Letters: 04" desc: "Planning your letters inside a bounding box (planning P and C)" indent: true {% include <API key>.html %} For each letter that you and your pair partner are going to draw, start by drawing a bounding box like this on on a piece of paper. <img src="BoundingBox.png" title="BoundingBox.png" alt="BoundingBox.png" height="200" /> For example, consider my name: "Phill Conrad". I might plan out bounding boxes like these. Here, I've chosen each of the important points, and labelled them. Note, though, that these are only examples. I don't expect that everyone with a P or a C in their name will make the same choices about how to shape the letters. In fact, I hope each of you will make slightly different choices. <img src="BoundingBoxP1.png" title="fig:BoundingBoxP1.png" alt="BoundingBoxP1.png" height="200" /> <img src="BoundingBoxC1.png" title="fig:BoundingBoxC1.png" alt="BoundingBoxC1.png" height="200" /> For instance, as an alternative, I might use bounding boxes like these: <img src="BoundingBoxP2.png" title="fig:BoundingBoxP2.png" alt="BoundingBoxP2.png" height="200" /> <img src="BoundingBoxC2.png" title="fig:BoundingBoxC2.png" alt="BoundingBoxC2.png" height="200" /> Or even these, if I get ambitious, and want to try to make rounded shapes using the turtle's [circle](http://docs.python.org/3.3/library/turtle.html#turtle.circle) function (note: that's a link to the documentation!) <img src="BoundingBoxP3.png" title="fig:BoundingBoxP3.png" alt="BoundingBoxP3.png" height="200" /> <img src="BoundingBoxC3.png" title="fig:BoundingBoxC3.png" alt="BoundingBoxC3.png" height="200" /> A warning about that last approach: although it may seem like it isn't that tough, there are some subtle traps. For example, in the C, what if we are drawing a short, fat C where height &gt; width? Then h-w will be negative, and there may be "issues". You might find that you would need more than one drawing, one for when (h-w)&gt;0, and a different approach when (h-w)&lt;0, and then use an if/else statement in your drawing code. It might be better to stick to approaches that don't involve interaction between height and width, which probably means straight lines. If you and your partner are up for the challenge of using curves and circles, you are welcome to try, but I advocate trying the straight line approach FIRST just to be safe. Once you've planned your letters on paper, you are ready to start coding.
#include "stdafx.h" #include "record.hpp" namespace tc { namespace log { const char* record::type_acronym( void ) const { switch( type ) { case log::trace: return "T"; case log::debug: return "D"; case log::info: return "I"; case log::warn: return "W"; case log::error: return "E"; case log::fatal: return "F"; case log::all: return "A"; default: return "!"; } return "?"; } record::record( tc::log::type type , const tc::log::tag& tag ) : type(type) , tag(tag) , ts(tc::timestamp::now()) , tid(tc::threading::current_thread_id()) { } record::~record( void ) { } }}
/* Header Styles */ header.main{ background: rgb(252,252,252); /* Old browsers */ /* IE9 SVG, needs conditional override of 'filter' to 'none' */ background: url(data:image/svg+xml;base64,<API key>/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZjZmNmYyIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNmMmViZWEiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); background: -moz-linear-gradient(top, rgba(252,252,252,1) 0%, rgba(242,235,234,1) 100%); /* FF3.6+ */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(252,252,252,1)), color-stop(100%,rgba(242,235,234,1))); /* Chrome,Safari4+ */ background: -<API key>(top, rgba(252,252,252,1) 0%,rgba(242,235,234,1) 100%); /* Chrome10+,Safari5.1+ */ background: -o-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(242,235,234,1) 100%); /* Opera 11.10+ */ background: -ms-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(242,235,234,1) 100%); /* IE10+ */ background: linear-gradient(to bottom, rgba(252,252,252,1) 0%,rgba(242,235,234,1) 100%); /* W3C */ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fcfcfc', endColorstr='#f2ebea',GradientType=0 ); /* IE6-8 */ border-bottom:3px solid #c6065c; } header.main h1{margin:30px 0 0 0} header.main img{border:none;} /*header.main li{border-right:1px solid #222} header.main li:nth-child(1){border-left:1px solid #222} */ header.main nav li{list-style:none;} header.main nav li a{ padding:35px 8px 22px 8px; display:block; color:#ccc; } header.main nav li a:hover{ text-decoration: none; } header.main nav li span.nav-title, header.main nav li span.nav-sub-title{ font:bold 22px Arial, Helvetica, sans-serif; color:#c6065c; display:block; } header.main nav li span.nav-sub-title{ font:normal 11px Arial, Helvetica, sans-serif; color:#333; } header.main nav li.active, header.main nav li a:hover{background:#c6065c;} header.main nav li.active{ border-left:1px solid #e2f846; border-right:1px solid #e2f846; } header.main nav li.active a, header.main nav li.active span, header.main nav li a:hover, header.main nav li a:hover span{color:#fff;} /* Content */ /* General Content Styles */ div.main{ /*background:url(../images/bg-content.jpg) #000;*/ padding:20px 0; color:#333; line-height:22px; } div.main a{ color:#c6065c;} div.main.home .content{ box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset, 0 0 0 1px rgba(0, 0, 0, 0.15) inset, 0 1px 1px rgba(0, 0, 0, 0.2); border-right:1px solid #222; } /* sections default */ div.main section{ padding:10px; border-left:1px solid #999; border-top:1px solid #999; background:#ececec; } div.main section:hover { background:#cacaca; } div.main section.load-more{border-bottom:1px solid #999;} div.main section.load-more:hover{} div.main section.load-more{ padding:20px; margin:0 auto; width:100%; display:block; text-align:center; color:#c6065c; } div.main section.active img{opacity:1;} div.main section.active figure{} div.main section.active figcaption{} div.main section.active figcaption p{} div.main section.active figcaption h3{} div.main section footer{} div.main section footer div.fb-like, div.main section footer nav, div.main section footer address, div.main section footer nav ul{display:inline;} div.main section footer div.fb-like img{border:0;} /*div.main section img{ opacity: 0.9; -moz-opacity: 0.9; filter:alpha(opacity=9); }*/ div.main section.active img{ opacity: 1; -moz-opacity: 1; filter:alpha(opacity=1); } div.main section nav.post-stats{text-align:right;} div.main section nav.post-stats li{display:inline-block;} div.main section nav.post-stats li.star{ background:url(../images/star-sprite.png); height:21px; width:21px; } div.main section nav.post-stats li.star span{display:none;} div.main section nav.post-stats li a{ font:normal 14px Arial, Helvetica, sans-serif; padding:3px 5px; border-radius: 5px; } div.main section nav.post-stats li.pings a{ background:#c6065c; border:1px solid #2b1009; color:#fff; } div.main section nav.post-stats li.comments a{ background:#2b1009; border:1px solid #2b1009; color:#fff; } div.main section footer div.fb-like{ display:none; } /* Homepage Welcome - Social Box */ div.main div.welcome h1{ margin:5px 0; font:bold 24px Helvetica; } div.main div.home-chrome{ margin-bottom:10px; padding:5px; border:1px solid #333; background:#ececec; } /* Carousel Section */ section.carousel{ background:#fce6d3; height:400px; } section.carousel .carousel-button{ position:absolute; top:40%; display:none; /* initally hidden */ } section.carousel .carousel-button a{ display:block; padding:10px; margin:5px; border:1px solid #333; background:#222; color:#fff; font:bold 12px Arial, Helvetica, sans-serif; opacity: 0.7; -moz-opacity: 0.7; filter:alpha(opacity=7); } section.carousel .carousel-button a:hover{ background:#c6065c; border:1px solid #fff; } section.carousel .prev{left:0} section.carousel .next{right:0} section.carousel figure{ margin:0px 10px; border:5px solid #333; } section.carousel.active figure{border:5px solid #222;} section.carousel figcaption{ margin:-64px 0 0 0; background:#2b1009; opacity: 0.8; -moz-opacity: 0.8; filter:alpha(opacity=8); padding:10px; } section.carousel.active figcaption{background:#000;} section.carousel figcaption h3{ font:bold 16px Arial, Helvetica, sans-serif; color:#fff; margin:0; } section.carousel.active figcaption h3{} section.carousel figcaption p{ font:normal 12px Arial, Helvetica, sans-serif; color:#eee; margin:0; text-overflow: ellipsis; /* will make [...] at the end */ white-space: nowrap; /* paragraph to one line */ overflow:hidden; } section.carousel.active figcaption p{} section.carousel footer{ margin:0 15px; padding:2px 15px; } section.carousel footer span, section.carousel footer time, section.carousel footer address{} /* Box Section */ section.box, section.box.active{ height:400px; overflow:hidden; } section.box p{ margin:0; overflow:hidden; } section.box.active p{margin:0;} section.box span.more{ float:right; } section.box h3, section.box.active h3{ font:bold 18px Arial, Helvetica, sans-serif; color:#fff; margin:5px 0; line-height:18px; } section.box.active h3{} section.box div span, section.box div time, section.box div address{display:inline;} section.box footer{ padding:5px 0; width:100%; } section.box figure, section.box.active figure{ width:100%; height:200px; overflow:hidden; } section.box footer div{ position:absolute; top:185px; } section.box div.fb-like{ position:absolute; top:175px; display:none; } section.box div.like-convert{top:370px;} section.box div.details-convert{top:370px;} section.box div.video-thumbs{ display:none; } section.box div.video-thumbs img{padding:5px;} section.box nav.post-stats{ position:absolute; top:365px; right:10px; } /* Small Box Section */ section.small-box{height:200px;} section.small-box p{ line-height:22px; margin:0; display:none; width:200px; } section.small-box.active p{width:200px;} section.small-box h3{ font:bold 16px Arial, Helvetica, sans-serif; color:#fff; margin:5px 0; line-height:18px; } section.small-box nav.post-stats, section.small-box div.fb-like{ position:absolute; top:165px; } section.small-box nav.post-stats{right:10px;} section.small-box div.fb-like{left:10px;} section.small-box div.video-thumbs{display:none;} section.small-box div.post-details{visibility:hidden;} section.small-box span.more{display:none;} /* Skyscraper Section */ section.skyscraper{height:400px;} section.skyscraper h3{ font:bold 16px Arial, Helvetica, sans-serif; color:#fff; margin:5px 0; line-height:22px; } /* Listing Section */ div.main section.listing, div.main section.listing.active, div.main article.post section.load-more{ overflow:hidden; background:none; background:transparent; border:none; border-top:1px solid #cacaca; line-height:22px; } div.main article.post section.load-more{ border-bottom:2px solid #cacaca; } div.main article.post section.load-more:hover{ background:#ececec; } div.main section.listing:hover{ background:#ececec; } section.listing p{ margin:0 0 0 1em; overflow:hidden; } section.listing.active p{margin:0 0 0 1em;} section.listing span.more{display:none;} section.listing.active span.more{ text-align:right; display:block; } section.listing h3, section.listing.active h3{ font:bold 1.5em Arial, Helvetica, sans-serif; color:#fff; margin:5px 10px; line-height:18px; } section.listing.active h3{} section.listing div span, section.listing div time, section.listing div address{display:inline;} section.listing footer{ padding:20px 0 0 0; width:100%; } section.listing figure, section.listing.active figure{overflow:hidden;} section.listing footer div{ } section.listing div.fb-like{display:none;} section.listing div.video-thumbs{width:100%;} section.listing nav.post-stats{right:0;} section.listing footer div{font:italic 11px verdana;} section.listing footer div a{color:#aaa;} nav.post-carousel{ list-style:none; margin:0 auto; text-align:center; } nav.post-carousel ul li{ display:inline-block; font:bold 20px Arial, Helvetica, sans-serif; } /* Widgets Sidebar */ h3.widget-title{ color:#c6065c; } /* Sidebar Styles */ div.main aside.widget-area nav, div.main aside.widget-area div.fb-panel{ background:#000; border-right:5px solid #222; border-bottom::5px solid #222; color:#fff; height:400px; } div.main aside.widget-area ul { list-style: none; } div.main aside.widget-area div.fb-panel{ background:#222; } aside.widget-area h2{ font:bold 15px Arial, Helvetica, sans-serif; padding:5px 10px; margin:0; color:#fff; } aside.widget-area li.widget{ margin:0; } aside.widget-area li.widget{ background:#573615; list-style:none; border:5px solid #222; border-bottom:none; display:block; font:bold 12px Arial, Helvetica, sans-serif; } aside.widget-area li.widget ul{ padding:5px 15px; color:#fff; display:block; font:bold 12px Arial, Helvetica, sans-serif; } aside.widget-area li.widget ul{ margin:0; list-style:none; } aside.widget-area li.widget ul li{ background:#54260d; border:none; border-bottom:none; border-top:none; text-indent:15px; } aside.widget-area li.widget ul li a{ color:#fff; display:block; padding:3px 5px; font:normal 12px Arial, Helvetica, sans-serif; } aside.widget-area li.widget ul li a:hover{ color:#C6065C; } aside.widget-area li.widget.active-subnav{ width:100%; background:#C6065C; border:1px solid #C6065C; border-bottom:2px solid #C6065C; border-top:none; margin-top:5px; } aside.widget-area li.widget.active-subnav a{ color:#fff; } /*aside.widget-area li.widget_categories ul{ margin:0; } aside.widget-area li.widget_categories ul li.cat-item{ background:url(../images/icon-sprite.png) top left no-repeat; padding:0 0 0 25px; } aside.widget-area li.widget_categories ul li.cat-item{ background-position:0 -110px; } aside.widget-area li.widget_categories ul li.cat-item:hover, aside.widget-area li.widget_categories ul li.cat-item.active{ background-position:0 -88px; }*/ /* Single Post/Page Styles */ div.main.single .content{ background:transparent; } article.post{ background:transparent; line-height:18px; padding-right:20px; } div.main article.post section{ padding:10px; } article.post header{ padding:1em 0; } div.main article.post section header{ padding:0; } article.post h1{ color:#c6065c; font:bold 2em arial; margin:0; } article.post div.entry-content{ margin-bottom:50px; } article.post div.entry-content p{ padding:0; } article.post div.post-details{ margin:0 0 20px 0; } article.post footer.entry-meta{ padding:1em 3em 1em 3em; font:italic 11px verdana; } article.post footer.entry-meta a{ color:#aaa; } div#author-info{ border: 1px dotted #222; border-radius: 5px; padding: 1em 2em; margin: 2em 0; background: #ececec; } div#author-info div#author-avatar{ float:left; margin:0 1em 1em 0; } div#author-info div#author-avatar img{ border-radius: 48px; border: 2px solid #333; } div#author-info div#author-description{ padding-left:7em; font:normal 1em arial; line-height: 1.5em; color:#333; } div#author-info div#author-description h2{ font:bold 1em arial; color:#333; margin:0; } div#comments{ padding:10px; } div#comments ol.commentlist{ list-style: none; margin:0 0 0 50px; } div#comments h2{ font:bold 20px arial; color:#fff; margin:20px; } div#comments article.comment{ padding:10px; margin:10px 0; border-radius:5px; } div#comments div.comment-author img{ float:left; margin:0 1em 2em 0; border:2px solid #aaa; -webkit-box-shadow:0 5px 15px rgba(50, 50, 50, 0.75); -moz-box-shadow:0 5px 15px rgba(50, 50, 50, 0.75); box-shadow:0 5px 15px rgba(50, 50, 50, 0.75); background:#fff; } div#comments div.comment-author span.fn{ font:bold 22px arial; margin:0 10px 0 0 ; } div#comments div.comment-author time{ font:normal 12px arial; } div#comments div.comment-content{ min-height:70px; background:#777; padding:5px 5px 1px 5em; margin:0.5em 0 0 1em; color:#000; } div#respond{ padding:2em 4em; float:left; width: 100%; } div#respond h3#reply-title{ margin:0; color:#333; } div#respond form input#author, div#respond form input#email, div#respond form input#url, div#respond form textarea{ background:#ececec; color:#333; margin:0; border:1px dotted #cacaca; } div#respond form input#submit{display:none;} div#respond p.form-allowed-tags{ color:#333; font:normal 11px arial; } div#respond p{margin:0} div#respond code{ display:none; } aside aside{ padding: 0 10px; } ul.posts{ padding: 0 !important; list-style: none !important; } .navbar{ margin: 0; border: none; } /* Misc Styles */ pre{ padding: 10px !important; margin: 10px 0 !important; border: 2px dashed #ccc; background: #ececec; }
#!/bin/bash ## To avoid regression ensure that all of these do not return (unknown) # annot_t.js printf "annot_t.js:9:21 = " assert_ok "$FLOW" type-at-pos annot_t.js 9 21 --strip-root --pretty # any.js printf "any.js:3:15 = " assert_ok "$FLOW" type-at-pos any.js 3 15 --strip-root --pretty printf "any.js:4:2 = " assert_ok "$FLOW" type-at-pos any.js 4 2 --strip-root --pretty printf "any.js:4:6 = " assert_ok "$FLOW" type-at-pos any.js 4 6 --strip-root --pretty printf "any.js:5:5 = " assert_ok "$FLOW" type-at-pos any.js 5 5 --strip-root --pretty printf "any.js:7:13 = " assert_ok "$FLOW" type-at-pos any.js 7 13 --strip-root --pretty printf "any.js:8:5 = " assert_ok "$FLOW" type-at-pos any.js 8 5 --strip-root --pretty printf "any.js:8:10 = " assert_ok "$FLOW" type-at-pos any.js 8 10 --strip-root --pretty printf "any.js:9:10 = " assert_ok "$FLOW" type-at-pos any.js 9 10 --strip-root --pretty # array.js # TODO `Array` is not populated in type_tables # printf "array.js:3:18 = " # assert_ok "$FLOW" type-at-pos array.js 3 18 --strip-root --pretty # TODO `$ReadOnlyArray` is not populated in type_tables # printf "array.js:4:30 = " # assert_ok "$FLOW" type-at-pos array.js 4 30 --strip-root --pretty printf "array.js:6:15 = " assert_ok "$FLOW" type-at-pos array.js 6 15 --strip-root --pretty printf "array.js:10:15 = " assert_ok "$FLOW" type-at-pos array.js 10 15 --strip-root --pretty printf "array.js:15:4 = " assert_ok "$FLOW" type-at-pos array.js 15 4 --strip-root --pretty printf "array.js:19:4 = " assert_ok "$FLOW" type-at-pos array.js 19 4 --strip-root --pretty printf "array.js:23:4 = " assert_ok "$FLOW" type-at-pos array.js 23 4 --strip-root --pretty # new-array.js printf "new-array.js:3:15 = " assert_ok "$FLOW" type-at-pos new-array.js 3 15 --strip-root --pretty # class-0.js printf "class-0.js:3:7 = " assert_ok "$FLOW" type-at-pos class-0.js 3 7 --strip-root --pretty printf "class-0.js:4:3 = " assert_ok "$FLOW" type-at-pos class-0.js 4 3 --strip-root --pretty printf "class-0.js:4:10 = " assert_ok "$FLOW" type-at-pos class-0.js 4 10 --strip-root --pretty printf "class-0.js:9:5 = " assert_ok "$FLOW" type-at-pos class-0.js 9 5 --strip-root --pretty printf "class-0.js:12:5 = " assert_ok "$FLOW" type-at-pos class-0.js 12 5 --strip-root --pretty printf "class-0.js:15:5 = " assert_ok "$FLOW" type-at-pos class-0.js 15 5 --strip-root --pretty printf "class-0.js:21:5 = " assert_ok "$FLOW" type-at-pos class-0.js 21 5 --strip-root --pretty printf "class-0.js:24:5 = " assert_ok "$FLOW" type-at-pos class-0.js 24 5 --strip-root --pretty #class-1.js # TODO this is not the ideal type printf "class-1.js:4:3 = " assert_ok "$FLOW" type-at-pos class-1.js 4 3 --strip-root --pretty printf "class-1.js:8:3 = " assert_ok "$FLOW" type-at-pos class-1.js 8 3 --strip-root --pretty #class-2.js printf "class-2.js:4:3 = " assert_ok "$FLOW" type-at-pos class-2.js 4 3 --strip-root --pretty printf "class-2.js:9:9 = " assert_ok "$FLOW" type-at-pos class-2.js 9 9 --strip-root --pretty printf "class-2.js:10:9 = " assert_ok "$FLOW" type-at-pos class-2.js 10 9 --strip-root --pretty printf "class-2.js:12:7 = " assert_ok "$FLOW" type-at-pos class-2.js 12 7 --strip-root --pretty printf "class-2.js:13:7 = " assert_ok "$FLOW" type-at-pos class-2.js 13 7 --strip-root --pretty #class-3.js printf "class-3.js:4:3 = " assert_ok "$FLOW" type-at-pos class-3.js 4 3 --strip-root --pretty printf "class-3.js:9:9 = " assert_ok "$FLOW" type-at-pos class-3.js 9 9 --strip-root --pretty printf "class-3.js:10:9 = " assert_ok "$FLOW" type-at-pos class-3.js 10 9 --strip-root --pretty # class-bound.js printf "class-bound.js:4:6 = " assert_ok "$FLOW" type-at-pos class-bound.js 4 6 --strip-root --pretty # <API key>.js printf "<API key>.js:6:7 = " assert_ok "$FLOW" type-at-pos <API key>.js 6 7 --strip-root --pretty printf "<API key>.js:9:7 = " assert_ok "$FLOW" type-at-pos <API key>.js 9 7 --strip-root --pretty # class-poly-0.js printf "class-poly-0.js:5:7 = " assert_ok "$FLOW" type-at-pos class-poly-0.js 5 7 --strip-root --pretty printf "class-poly-0.js:5:9 = " assert_ok "$FLOW" type-at-pos class-poly-0.js 5 9 --strip-root --pretty printf "class-poly-0.js:10:26 = " assert_ok "$FLOW" type-at-pos class-poly-0.js 10 26 --strip-root --pretty # TODO constructor # printf "class-poly-0.js:11:10 = " # assert_ok "$FLOW" type-at-pos class-poly-0.js 11 10 --strip-root --pretty printf "class-poly-0.js:12:7 = " assert_ok "$FLOW" type-at-pos class-poly-0.js 12 7 --strip-root --pretty printf "class-poly-0.js:16:7 = " assert_ok "$FLOW" type-at-pos class-poly-0.js 16 7 --strip-root --pretty printf "class-poly-0.js:16:10 = " assert_ok "$FLOW" type-at-pos class-poly-0.js 16 10 --strip-root --pretty printf "class-poly-0.js:17:7 = " assert_ok "$FLOW" type-at-pos class-poly-0.js 17 7 --strip-root --pretty #class-poly-1.js printf "class-poly-1.js:9:5 = " assert_ok "$FLOW" type-at-pos class-poly-1.js 9 5 --strip-root --pretty printf "class-poly-1.js:9:11 = " assert_ok "$FLOW" type-at-pos class-poly-1.js 9 11 --strip-root --pretty # class-statics.js printf "class-statics.js:4:10 = " assert_ok "$FLOW" type-at-pos class-statics.js 4 10 --strip-root --pretty printf "class-statics.js:8:10 = " assert_ok "$FLOW" type-at-pos class-statics.js 8 10 --strip-root --pretty printf "class-statics.js:9:7 = " assert_ok "$FLOW" type-at-pos class-statics.js 9 7 --strip-root --pretty printf "class-statics.js:11:8 = " assert_ok "$FLOW" type-at-pos class-statics.js 11 8 --strip-root --pretty printf "class-statics.js:16:5 = " assert_ok "$FLOW" type-at-pos class-statics.js 16 5 --strip-root --pretty printf "class-statics.js:17:5 = " assert_ok "$FLOW" type-at-pos class-statics.js 17 5 --strip-root --pretty # NOTE here Flow infers 'this', even though this is a static member printf "class-statics.js:20:11 = " assert_ok "$FLOW" type-at-pos class-statics.js 20 11 --strip-root --pretty # class-statics-poly.js printf "class-statics-poly.js:4:10 = " assert_ok "$FLOW" type-at-pos class-statics-poly.js 4 10 --strip-root --pretty printf "class-statics-poly.js:8:10 = " assert_ok "$FLOW" type-at-pos class-statics-poly.js 8 10 --strip-root --pretty # TODO the type 'Class<A>' is not parseable when 'A' is polymorphic printf "class-statics-poly.js:9:7 = " assert_ok "$FLOW" type-at-pos class-statics-poly.js 9 7 --strip-root --pretty printf "class-statics-poly.js:11:8 = " assert_ok "$FLOW" type-at-pos class-statics-poly.js 11 8 --strip-root --pretty printf "class-statics-poly.js:16:5 = " assert_ok "$FLOW" type-at-pos class-statics-poly.js 16 5 --strip-root --pretty printf "class-statics-poly.js:17:5 = " assert_ok "$FLOW" type-at-pos class-statics-poly.js 17 5 --strip-root --pretty # destructuring.js printf "destructuring.js:3:6 = " assert_ok "$FLOW" type-at-pos destructuring.js 3 6 --strip-root --pretty printf "destructuring.js:17:13 = " assert_ok "$FLOW" type-at-pos destructuring.js 17 13 --strip-root --pretty # exact.js printf "exact.js:4:6 = " assert_ok "$FLOW" type-at-pos exact.js 4 6 --strip-root --pretty printf "exact.js:5:13 = " assert_ok "$FLOW" type-at-pos exact.js 5 13 --strip-root --pretty printf "exact.js:6:13 = " assert_ok "$FLOW" type-at-pos exact.js 6 13 --strip-root --pretty printf "exact.js:7:13 = " assert_ok "$FLOW" type-at-pos exact.js 7 13 --strip-root --pretty printf "exact.js:9:17 = " assert_ok "$FLOW" type-at-pos exact.js 9 17 --strip-root --pretty printf "exact.js:10:7 = " assert_ok "$FLOW" type-at-pos exact.js 10 7 --strip-root --pretty printf "exact.js:13:13 = " assert_ok "$FLOW" type-at-pos exact.js 13 13 --strip-root --pretty printf "exact.js:16:13 = " assert_ok "$FLOW" type-at-pos exact.js 16 13 --strip-root --pretty printf "exact.js:18:6 = " assert_ok "$FLOW" type-at-pos exact.js 18 6 --strip-root --pretty printf "exact.js:19:6 = " assert_ok "$FLOW" type-at-pos exact.js 19 6 --strip-root --pretty # facebookism.js printf "facebookism.js:3:8 = " assert_ok "$FLOW" type-at-pos facebookism.js 3 8 --strip-root --pretty # TODO `require` # printf "facebookism.js:3:14 = " # assert_ok "$FLOW" type-at-pos facebookism.js 3 14 --strip-root --pretty # function.js printf "function.js:4:3 = " assert_ok "$FLOW" type-at-pos function.js 4 3 --strip-root --pretty printf "function.js:8:3 = " assert_ok "$FLOW" type-at-pos function.js 8 3 --strip-root --pretty printf "function.js:12:3 = " assert_ok "$FLOW" type-at-pos function.js 12 3 --strip-root --pretty printf "function.js:16:3 = " assert_ok "$FLOW" type-at-pos function.js 16 3 --strip-root --pretty # function-poly-0.js printf "function-poly-0.js:3:10 = " assert_ok "$FLOW" type-at-pos function-poly-0.js 3 10 --strip-root --pretty printf "function-poly-0.js:3:30 = " assert_ok "$FLOW" type-at-pos function-poly-0.js 3 30 --strip-root --pretty printf "function-poly-0.js:4:7 = " assert_ok "$FLOW" type-at-pos function-poly-0.js 4 7 --strip-root --pretty # function-poly-1.js printf "function-poly-1.js:3:10 = " assert_ok "$FLOW" type-at-pos function-poly-1.js 3 10 --strip-root --pretty printf "function-poly-1.js:3:3 = " assert_ok "$FLOW" type-at-pos function-poly-1.js 3 33 --strip-root --pretty printf "function-poly-1.js:4:7 = " assert_ok "$FLOW" type-at-pos function-poly-1.js 4 7 --strip-root --pretty # function-poly-2.js printf "function-poly-2.js:3:10 = " assert_ok "$FLOW" type-at-pos function-poly-2.js 3 10 --strip-root --pretty printf "function-poly-2.js:4:12 = " assert_ok "$FLOW" type-at-pos function-poly-2.js 4 12 --strip-root --pretty printf "function-poly-2.js:5:5 = " assert_ok "$FLOW" type-at-pos function-poly-2.js 5 5 --strip-root --pretty printf "function-poly-2.js:6:5 = " assert_ok "$FLOW" type-at-pos function-poly-2.js 6 5 --strip-root --pretty printf "function-poly-2.js:7:12 = " assert_ok "$FLOW" type-at-pos function-poly-2.js 7 12 --strip-root --pretty printf "function-poly-2.js:9:13 = " assert_ok "$FLOW" type-at-pos function-poly-2.js 9 13 --strip-root --pretty printf "function-poly-2.js:11:12 = " assert_ok "$FLOW" type-at-pos function-poly-2.js 11 12 --strip-root --pretty # function-poly-3.js printf "function-poly-3.js:8:1 = " assert_ok "$FLOW" type-at-pos function-poly-3.js 8 1 --strip-root --pretty # function-poly-4.js printf "function-poly-4.js:3:11 = " assert_ok "$FLOW" type-at-pos function-poly-4.js 3 11 --strip-root --pretty printf "function-poly-4.js:7:7 = " assert_ok "$FLOW" type-at-pos function-poly-4.js 7 7 --strip-root --pretty printf "function-poly-4.js:9:7 = " assert_ok "$FLOW" type-at-pos function-poly-4.js 9 7 --strip-root --pretty # function-poly-5.js printf "function-poly-5.js:3:10 = " assert_ok "$FLOW" type-at-pos function-poly-5.js 3 10 --strip-root --pretty # generics.js printf "generics.js:5:1 = " assert_ok "$FLOW" type-at-pos generics.js 5 1 --strip-root --pretty printf "generics.js:10:1 = " assert_ok "$FLOW" type-at-pos generics.js 10 1 --strip-root --pretty printf "generics.js:14:1 = " assert_ok "$FLOW" type-at-pos generics.js 14 1 --strip-root --pretty printf "generics.js:18:1 = " assert_ok "$FLOW" type-at-pos generics.js 18 1 --strip-root --pretty printf "generics.js:22:1 = " assert_ok "$FLOW" type-at-pos generics.js 22 1 --strip-root --pretty printf "generics.js:26:1 = " assert_ok "$FLOW" type-at-pos generics.js 26 1 --strip-root --pretty printf "generics.js:30:13 = " assert_ok "$FLOW" type-at-pos generics.js 30 13 --strip-root --pretty # implements.js printf "implements.js:7:8 = " assert_ok "$FLOW" type-at-pos implements.js 4 23 --strip-root --pretty # import_lib.js printf "import_lib.js:7:8 = " assert_ok "$FLOW" type-at-pos import_lib.js 7 8 --strip-root --pretty printf "import_lib.js:7:25 (--expand-json-output) = " assert_ok "$FLOW" type-at-pos import_lib.js 7 25 --strip-root --pretty --expand-json-output # import_lib_named.js printf "import_lib_named.js:3:15 (--expand-json-output) = " assert_ok "$FLOW" type-at-pos import_lib_named.js 3 15 --strip-root --pretty --expand-json-output printf "import_lib_named.js:3:27 (--expand-json-output) = " assert_ok "$FLOW" type-at-pos import_lib_named.js 3 27 --strip-root --pretty --expand-json-output # interface.js printf "interface.js:3:12 = " assert_ok "$FLOW" type-at-pos interface.js 3 12 --strip-root --pretty printf "interface.js:9:15 = " assert_ok "$FLOW" type-at-pos interface.js 9 15 --strip-root --pretty printf "interface.js:9:19 = " assert_ok "$FLOW" type-at-pos interface.js 9 19 --strip-root --pretty # # TODO: report specialized type # printf "interface.js:10:6 = " # assert_ok "$FLOW" type-at-pos interface.js 10 6 --strip-root --pretty # printf "interface.js:11:6 = " # assert_ok "$FLOW" type-at-pos interface.js 11 6 --strip-root --pretty # printf "interface.js:13:6 = " # assert_ok "$FLOW" type-at-pos interface.js 13 6 --strip-root --pretty printf "interface.js:17:7 = " assert_ok "$FLOW" type-at-pos interface.js 17 7 --strip-root --pretty printf "interface.js:18:7 = " assert_ok "$FLOW" type-at-pos interface.js 18 7 --strip-root --pretty # declare_class.js printf "declare_class.js:3:15 = " assert_ok "$FLOW" type-at-pos declare_class.js 3 15 --strip-root --pretty # mixed.js printf "mixed.js:18:17 = " assert_ok "$FLOW" type-at-pos mixed.js 18 17 --strip-root --pretty # exports.js printf "exports.js:3:24 = " assert_ok "$FLOW" type-at-pos exports.js 3 24 --strip-root --pretty printf "exports.js:5:25 = " assert_ok "$FLOW" type-at-pos exports.js 5 25 --strip-root --pretty # module-export.js printf "module-export.js:7:13 = " assert_ok "$FLOW" type-at-pos module-export.js 7 13 --strip-root --pretty # module-import.js printf "module-import.js:3:7 = " assert_ok "$FLOW" type-at-pos module-import.js 3 7 --strip-root --pretty # import-default.js printf "import-default.js:3:16 = " assert_ok "$FLOW" type-at-pos import-default.js 3 16 --strip-root --pretty # import-typeof-class.js printf "import-typeof-class.js:6:16 " assert_ok "$FLOW" type-at-pos import-typeof-class.js 6 16 --strip-root --pretty --expand-json-output printf "import-typeof-class.js:7:16 " assert_ok "$FLOW" type-at-pos import-typeof-class.js 7 16 --strip-root --pretty --expand-json-output # object.js printf "object.js:3:15 = " assert_ok "$FLOW" type-at-pos object.js 3 15 --strip-root --pretty printf "object.js:3:19 = " assert_ok "$FLOW" type-at-pos object.js 3 19 --strip-root --pretty printf "object.js:3:24 = " assert_ok "$FLOW" type-at-pos object.js 3 24 --strip-root --pretty printf "object.js:3:29 = " assert_ok "$FLOW" type-at-pos object.js 3 29 --strip-root --pretty printf "object.js:3:40 = " assert_ok "$FLOW" type-at-pos object.js 3 40 --strip-root --pretty printf "object.js:6:5 = " assert_ok "$FLOW" type-at-pos object.js 6 5 --strip-root --pretty printf "object.js:6:7 = " # TODO can we do better with duplication? assert_ok "$FLOW" type-at-pos object.js 6 7 --strip-root --pretty printf "object.js:7:10 = " assert_ok "$FLOW" type-at-pos object.js 7 10 --strip-root --pretty printf "object.js:7:12 = " assert_ok "$FLOW" type-at-pos object.js 7 12 --strip-root --pretty printf "object.js:8:14 = " assert_ok "$FLOW" type-at-pos object.js 8 14 --strip-root --pretty printf "object.js:8:16 = " assert_ok "$FLOW" type-at-pos object.js 8 16 --strip-root --pretty printf "object.js:9:18 = " assert_ok "$FLOW" type-at-pos object.js 9 18 --strip-root --pretty printf "object.js:9:34 = " assert_ok "$FLOW" type-at-pos object.js 9 34 --strip-root --pretty printf "object.js:15:3 = " assert_ok "$FLOW" type-at-pos object.js 15 3 --strip-root --pretty printf "object.js:16:3 = " assert_ok "$FLOW" type-at-pos object.js 16 3 --strip-root --pretty printf "object.js:19:3 = " assert_ok "$FLOW" type-at-pos object.js 19 3 --strip-root --pretty printf "object.js:19:7 = " assert_ok "$FLOW" type-at-pos object.js 19 7 --strip-root --pretty printf "object.js:20:7 = " assert_ok "$FLOW" type-at-pos object.js 20 7 --strip-root --pretty printf "object.js:21:7 = " assert_ok "$FLOW" type-at-pos object.js 21 7 --strip-root --pretty printf "object.js:22:7 = " assert_ok "$FLOW" type-at-pos object.js 22 7 --strip-root --pretty printf "object.js:35:1 = " assert_ok "$FLOW" type-at-pos object.js 35 1 --strip-root --pretty # object-resolution.js printf "object-resolution.js:5:2 = " assert_ok "$FLOW" type-at-pos object-resolution.js 5 2 --strip-root --pretty printf "object-resolution.js:10:2 = " assert_ok "$FLOW" type-at-pos object-resolution.js 10 2 --strip-root --pretty printf "object-resolution.js:13:5 = " assert_ok "$FLOW" type-at-pos object-resolution.js 13 5 --strip-root --pretty # optional.js printf "optional.js:4:10 = " assert_ok "$FLOW" type-at-pos optional.js 4 10 --strip-root --pretty printf "optional.js:7:2 = " assert_ok "$FLOW" type-at-pos optional.js 7 2 --strip-root --pretty printf "optional.js:10:11 = " assert_ok "$FLOW" type-at-pos optional.js 10 11 --strip-root --pretty printf "optional.js:10:14 = " assert_ok "$FLOW" type-at-pos optional.js 10 14 --strip-root --pretty printf "optional.js:14:10 = " assert_ok "$FLOW" type-at-pos optional.js 14 10 --strip-root --pretty # predicates.js # printf "predicates.js:4:12 (null) = " # assert_ok "$FLOW" type-at-pos predicates.js 4 12 --strip-root --pretty printf "predicates.js - undefined: " assert_ok "$FLOW" type-at-pos predicates.js 5 12 --strip-root --pretty printf "predicates.js - Array: " assert_ok "$FLOW" type-at-pos predicates.js 6 6 --strip-root --pretty printf "predicates.js - isArray: " assert_ok "$FLOW" type-at-pos predicates.js 6 15 --strip-root --pretty printf "predicates.js - y (refined obj): " assert_ok "$FLOW" type-at-pos predicates.js 8 5 --strip-root --pretty printf "predicates.js - if (y.FOO) obj: " assert_ok "$FLOW" type-at-pos predicates.js 9 5 --strip-root --pretty printf "predicates.js - if (y.FOO) prop: " assert_ok "$FLOW" type-at-pos predicates.js 9 8 --strip-root --pretty printf "predicates.js - if (y.FOO == '') obj: " assert_ok "$FLOW" type-at-pos predicates.js 10 5 --strip-root --pretty printf "predicates.js - if (y.FOO == '') prop: " assert_ok "$FLOW" type-at-pos predicates.js 10 8 --strip-root --pretty printf "predicates.js - if (y.FOO === '') obj: " assert_ok "$FLOW" type-at-pos predicates.js 11 5 --strip-root --pretty printf "predicates.js - if (y.FOO === '') prop: " assert_ok "$FLOW" type-at-pos predicates.js 11 8 --strip-root --pretty printf "predicates.js - if (y.FOO == null) prop: " assert_ok "$FLOW" type-at-pos predicates.js 12 8 --strip-root --pretty printf "predicates.js - if (y.FOO == undefined) prop: " assert_ok "$FLOW" type-at-pos predicates.js 13 8 --strip-root --pretty printf "predicates.js - if (Array.isArray(y.FOO)): " assert_ok "$FLOW" type-at-pos predicates.js 14 22 --strip-root --pretty # react_component.js printf "react_component.js:3:9 = " assert_ok "$FLOW" type-at-pos react_component.js 3 9 --strip-root --pretty printf "react_component.js:13:33 = " assert_ok "$FLOW" type-at-pos react_component.js 13 33 --strip-root --pretty printf "react_component.js:18:17 = " assert_ok "$FLOW" type-at-pos react_component.js 18 17 --strip-root --pretty printf "react_component.js:31:7 = " assert_ok "$FLOW" type-at-pos react_component.js 31 7 --strip-root --pretty --expand-json-output printf "react_component.js:32:13 = " assert_ok "$FLOW" type-at-pos react_component.js 32 13 --strip-root --pretty --expand-json-output printf "react_component.js:32:29 = " assert_ok "$FLOW" type-at-pos react_component.js 32 29 --strip-root --pretty --expand-json-output # react.js printf "react.js:2:7 = " assert_ok "$FLOW" type-at-pos react.js 2 7 --strip-root --pretty # recursive.js printf "recursive.js:3:25 = " assert_ok "$FLOW" type-at-pos recursive.js 3 25 --strip-root --pretty printf "recursive.js:6:11 = " assert_ok "$FLOW" type-at-pos recursive.js 6 11 --strip-root --pretty printf "recursive.js:13:12 = " assert_ok "$FLOW" type-at-pos recursive.js 13 12 --strip-root --pretty printf "recursive.js:23:12 = " assert_ok "$FLOW" type-at-pos recursive.js 23 12 --strip-root --pretty printf "recursive.js:38:2 = " assert_ok "$FLOW" type-at-pos recursive.js 38 2 --strip-root --pretty printf "recursive.js:41:17 = " assert_ok "$FLOW" type-at-pos recursive.js 41 17 --strip-root --pretty printf "recursive.js:58:1 = " assert_ok "$FLOW" type-at-pos recursive.js 58 1 --strip-root --pretty printf "recursive.js:60:6 = " assert_ok "$FLOW" type-at-pos recursive.js 60 6 --strip-root --pretty printf "recursive.js:60:31 = " assert_ok "$FLOW" type-at-pos recursive.js 60 31 --strip-root --pretty # refinement.js printf "refinement.js:7:25 = " assert_ok "$FLOW" type-at-pos refinement.js 7 25 --strip-root --pretty printf "refinement.js:8:25 = " assert_ok "$FLOW" type-at-pos refinement.js 8 25 --strip-root --pretty # require-class.js printf "require-class.js:5:16 = " assert_ok "$FLOW" type-at-pos require-class.js 5 16 --strip-root --expand-json-output --pretty printf "require-class.js:6:16 = " assert_ok "$FLOW" type-at-pos require-class.js 6 16 --strip-root --expand-json-output --pretty # test.js printf "test.js:5:1 = " assert_ok "$FLOW" type-at-pos test.js 5 1 --strip-root --pretty printf "test.js:8:7 = " assert_ok "$FLOW" type-at-pos test.js 8 7 --strip-root --pretty printf "test.js:10:7 = " assert_ok "$FLOW" type-at-pos test.js 10 7 --strip-root --pretty printf "test.js:12:7 = " assert_ok "$FLOW" type-at-pos test.js 12 7 --strip-root --pretty printf "test.js:14:7 = " assert_ok "$FLOW" type-at-pos test.js 14 7 --strip-root --pretty # templates.js # NOTE: not supported any more # printf "templates.js:2:7 = " # assert_ok "$FLOW" type-at-pos templates.js 2 7 --strip-root --pretty # trycatch.js # TODO track type reaching catch variable # printf "trycatch.js:5:10 = " # assert_ok "$FLOW" type-at-pos trycatch.js 5 10 --strip-root --pretty # type-destructor.js printf "type-destructor.js:3:6 = " assert_ok "$FLOW" type-at-pos type-destructor.js 3 6 --strip-root --pretty printf "type-destructor.js:4:6 = " assert_ok "$FLOW" type-at-pos type-destructor.js 4 6 --strip-root --pretty printf "type-destructor.js:5:6 = " assert_ok "$FLOW" type-at-pos type-destructor.js 5 6 --strip-root --pretty printf "type-destructor.js:8:6 = " assert_ok "$FLOW" type-at-pos type-destructor.js 8 6 --strip-root --pretty printf "type-destructor.js:10:6 = " assert_ok "$FLOW" type-at-pos type-destructor.js 10 6 --strip-root --pretty printf "type-destructor.js:12:6 = " assert_ok "$FLOW" type-at-pos type-destructor.js 12 6 --strip-root --pretty printf "type-destructor.js:13:6 = " assert_ok "$FLOW" type-at-pos type-destructor.js 13 6 --strip-root --pretty printf "type-destructor.js:15:6 = " assert_ok "$FLOW" type-at-pos type-destructor.js 15 6 --strip-root --pretty printf "type-destructor.js:16:6 = " assert_ok "$FLOW" type-at-pos type-destructor.js 16 6 --strip-root --pretty printf "type-destructor.js:17:6 = " assert_ok "$FLOW" type-at-pos type-destructor.js 17 6 --strip-root --pretty printf "type-destructor.js:19:6 = " assert_ok "$FLOW" type-at-pos type-destructor.js 19 6 --strip-root --pretty printf "type-destructor.js:20:6 = " assert_ok "$FLOW" type-at-pos type-destructor.js 20 6 --strip-root --pretty printf "type-destructor.js:21:6 = " assert_ok "$FLOW" type-at-pos type-destructor.js 21 6 --strip-root --pretty printf "type-destructor.js:23:6 = " assert_ok "$FLOW" type-at-pos type-destructor.js 23 6 --strip-root --pretty printf "type-destructor.js:27:5 = " assert_ok "$FLOW" type-at-pos type-destructor.js 27 5 --strip-root --pretty printf "type-destructor.js:28:5 = " assert_ok "$FLOW" type-at-pos type-destructor.js 28 5 --strip-root --pretty printf "type-destructor.js:29:5 = " assert_ok "$FLOW" type-at-pos type-destructor.js 28 5 --strip-root --pretty printf "type-destructor.js:33:6 = " assert_ok "$FLOW" type-at-pos type-destructor.js 33 6 --strip-root --pretty printf "type-destructor.js:34:6 = " assert_ok "$FLOW" type-at-pos type-destructor.js 34 6 --strip-root --pretty printf "type-destructor.js:36:6 = " assert_ok "$FLOW" type-at-pos type-destructor.js 36 6 --strip-root --pretty printf "type-destructor.js:37:6 = " assert_ok "$FLOW" type-at-pos type-destructor.js 37 6 --strip-root --pretty printf "type-destructor.js:41:6 = " assert_ok "$FLOW" type-at-pos type-destructor.js 41 6 --strip-root --pretty printf "type-destructor.js:42:6 = " assert_ok "$FLOW" type-at-pos type-destructor.js 42 6 --strip-root --pretty printf "type-destructor.js:44:6 = " assert_ok "$FLOW" type-at-pos type-destructor.js 44 6 --strip-root --pretty printf "type-destructor.js:45:6 = " assert_ok "$FLOW" type-at-pos type-destructor.js 45 6 --strip-root --pretty printf "type-destructor.js:47:6 = " assert_ok "$FLOW" type-at-pos type-destructor.js 47 6 --strip-root --pretty printf "type-destructor.js:48:6 = " assert_ok "$FLOW" type-at-pos type-destructor.js 48 6 --strip-root --pretty printf "type-destructor.js:62:6 = " assert_ok "$FLOW" type-at-pos type-destructor.js 62 6 --strip-root --pretty printf "type-destructor.js:63:6 = " assert_ok "$FLOW" type-at-pos type-destructor.js 63 6 --strip-root --pretty printf "type-destructor.js:68:13 = " assert_ok "$FLOW" type-at-pos type-destructor.js 68 13 --strip-root --pretty # unions.js printf "unions.js:9:3 = " assert_ok "$FLOW" type-at-pos unions.js 9 3 --strip-root --pretty printf "unions.js:15:2 = " assert_ok "$FLOW" type-at-pos unions.js 15 2 --strip-root --pretty printf "unions.js:24:3 = " assert_ok "$FLOW" type-at-pos unions.js 24 3 --strip-root --pretty printf "unions.js:43:3 = " assert_ok "$FLOW" type-at-pos unions.js 43 3 --strip-root --pretty printf "unions.js:44:3 = " assert_ok "$FLOW" type-at-pos unions.js 44 3 --strip-root --pretty printf "unions.js:49:1 = " assert_ok "$FLOW" type-at-pos unions.js 49 1 --strip-root --pretty printf "unions.js:52:1 = " assert_ok "$FLOW" type-at-pos unions.js 52 1 --strip-root --pretty printf "unions.js:57:5 = " assert_ok "$FLOW" type-at-pos unions.js 57 5 --strip-root --pretty printf "unions.js:59:18 = " assert_ok "$FLOW" type-at-pos unions.js 59 18 --strip-root --pretty # opaque.js printf "opaque.js:3:20 = " assert_ok "$FLOW" type-at-pos opaque.js 3 20 --strip-root --pretty printf "opaque.js:4:14 = " assert_ok "$FLOW" type-at-pos opaque.js 4 14 --strip-root --pretty printf "opaque.js:4:19 = " assert_ok "$FLOW" type-at-pos opaque.js 4 19 --strip-root --pretty printf "opaque.js:6:22 = " assert_ok "$FLOW" type-at-pos opaque.js 6 22 --strip-root --pretty printf "opaque.js:7:13 = " assert_ok "$FLOW" type-at-pos opaque.js 7 13 --strip-root --pretty printf "opaque.js:7:18 = " assert_ok "$FLOW" type-at-pos opaque.js 7 18 --strip-root --pretty printf "opaque.js:9:22 = " assert_ok "$FLOW" type-at-pos opaque.js 9 22 --strip-root --pretty printf "opaque.js:10:13 = " assert_ok "$FLOW" type-at-pos opaque.js 10 13 --strip-root --pretty printf "opaque.js:10:18 = " assert_ok "$FLOW" type-at-pos opaque.js 10 18 --strip-root --pretty printf "opaque.js:12:14 = " assert_ok "$FLOW" type-at-pos opaque.js 12 14 --strip-root --pretty printf "opaque.js:13:14 = " assert_ok "$FLOW" type-at-pos opaque.js 13 14 --strip-root --pretty printf "opaque.js:13:19 = " assert_ok "$FLOW" type-at-pos opaque.js 13 19 --strip-root --pretty printf "opaque.js:15:22 = " assert_ok "$FLOW" type-at-pos opaque.js 15 22 --strip-root --pretty printf "opaque.js:16:14 = " assert_ok "$FLOW" type-at-pos opaque.js 16 14 --strip-root --pretty printf "opaque.js:16:19 = " assert_ok "$FLOW" type-at-pos opaque.js 16 19 --strip-root --pretty printf "opaque.js:19:14 = " assert_ok "$FLOW" type-at-pos opaque.js 19 14 --strip-root --pretty printf "opaque.js:19:22 = " assert_ok "$FLOW" type-at-pos opaque.js 19 22 --strip-root --pretty printf "opaque.js:20:16 = " assert_ok "$FLOW" type-at-pos opaque.js 20 16 --strip-root --pretty printf "opaque.js:20:34 = " assert_ok "$FLOW" type-at-pos opaque.js 20 34 --strip-root --pretty printf "opaque.js:21:19 = " assert_ok "$FLOW" type-at-pos opaque.js 21 19 --strip-root --pretty printf "opaque.js:21:28 = " assert_ok "$FLOW" type-at-pos opaque.js 21 28 --strip-root --pretty printf "opaque.js:24:7 = " assert_ok "$FLOW" type-at-pos opaque.js 24 7 --strip-root --pretty # optional_chaining.js printf "optional_chaining.js:16:7 = " assert_ok "$FLOW" type-at-pos optional_chaining.js 16 7 --strip-root --pretty printf "optional_chaining.js:16:11 = " assert_ok "$FLOW" type-at-pos optional_chaining.js 16 11 --strip-root --pretty printf "optional_chaining.js:16:16 = " assert_ok "$FLOW" type-at-pos optional_chaining.js 16 16 --strip-root --pretty printf "optional_chaining.js:16:20 = " assert_ok "$FLOW" type-at-pos optional_chaining.js 16 20 --strip-root --pretty printf "optional_chaining.js:16:24 = " assert_ok "$FLOW" type-at-pos optional_chaining.js 16 24 --strip-root --pretty # type-alias.js printf "type-alias.js:3:6 = " assert_ok "$FLOW" type-at-pos type-alias.js 3 6 --strip-root --pretty printf "type-alias.js:4:6 = " assert_ok "$FLOW" type-at-pos type-alias.js 4 6 --strip-root --pretty printf "type-alias.js:5:6 = " assert_ok "$FLOW" type-at-pos type-alias.js 5 6 --strip-root --pretty printf "type-alias.js:6:6 = " assert_ok "$FLOW" type-at-pos type-alias.js 6 6 --strip-root --pretty printf "type-alias.js:7:6 = " assert_ok "$FLOW" type-at-pos type-alias.js 7 6 --strip-root --pretty printf "type-alias.js:7:6 (--expand-type-aliases) = " assert_ok "$FLOW" type-at-pos type-alias.js 7 6 --strip-root --pretty --expand-type-aliases printf "type-alias.js:8:6 = " assert_ok "$FLOW" type-at-pos type-alias.js 8 6 --strip-root --pretty printf "type-alias.js:12:12 " assert_ok "$FLOW" type-at-pos type-alias.js 12 12 --strip-root --pretty printf "type-alias.js:12:29 " assert_ok "$FLOW" type-at-pos type-alias.js 12 29 --strip-root --pretty # Test interaction with RPolyTest printf "type-alias.js:15:8 " assert_ok "$FLOW" type-at-pos type-alias.js 15 8 --strip-root --pretty printf "type-alias.js:16:8 " assert_ok "$FLOW" type-at-pos type-alias.js 16 8 --strip-root --pretty printf "type-alias.js:17:8 " assert_ok "$FLOW" type-at-pos type-alias.js 17 8 --strip-root --pretty printf "type-alias.js:18:8 " assert_ok "$FLOW" type-at-pos type-alias.js 18 8 --strip-root --pretty printf "type-alias.js:19:8 " assert_ok "$FLOW" type-at-pos type-alias.js 19 8 --strip-root --pretty printf "type-alias.js:20:8 " assert_ok "$FLOW" type-at-pos type-alias.js 20 8 --strip-root --pretty printf "type-alias.js:24:6 " assert_ok "$FLOW" type-at-pos type-alias.js 24 6 --strip-root --pretty --expand-type-aliases printf "type-alias.js:25:6 " assert_ok "$FLOW" type-at-pos type-alias.js 25 6 --strip-root --pretty --expand-type-aliases printf "type-alias.js:27:6 " assert_ok "$FLOW" type-at-pos type-alias.js 27 6 --strip-root --pretty --expand-type-aliases printf "type-alias.js:29:6 " assert_ok "$FLOW" type-at-pos type-alias.js 29 6 --strip-root --pretty --expand-type-aliases printf "type-alias.js:31:6 " assert_ok "$FLOW" type-at-pos type-alias.js 31 6 --strip-root --pretty --expand-type-aliases printf "type-alias.js:34:6 " assert_ok "$FLOW" type-at-pos type-alias.js 34 6 --strip-root --pretty --expand-json-output
exports.LOADING = "LOADING"; exports.ERROR = "ERROR"; exports.SUCCESS = "SUCCESS"; exports.FETCH = "FETCH"; exports.CREATE = "CREATE"; exports.UPDATE = "UPDATE"; exports.DELETE = "DELETE"; exports.SET_EDIT_MODE = "SET_EDIT_MODE"; exports.SET_ADD_MODE = "SET_ADD_MODE"; exports.CLOSE_FORM = "CLOSE_FORM"; exports.SET_PAGE = "SET_PAGE"
'use strict'; exports.ContainerBuilder = require('./<API key>'); exports.EventStream = require('./EventStream'); exports.CommandBus = require('./CommandBus'); exports.EventStore = require('./EventStore'); exports.AbstractAggregate = require('./AbstractAggregate'); exports.<API key> = require('./<API key>'); exports.AbstractSaga = require('./AbstractSaga'); exports.SagaEventHandler = require('./SagaEventHandler'); exports.AbstractProjection = require('./AbstractProjection'); exports.InMemoryMessageBus = require('./infrastructure/InMemoryMessageBus'); exports.<API key> = require('./infrastructure/<API key>'); exports.<API key> = require('./infrastructure/<API key>'); exports.InMemoryView = require('./infrastructure/InMemoryView'); exports.<API key> = require('./utils/<API key>'); exports.subscribe = require('./subscribe');
<!DOCTYPE html> <html><head> <script type="text/javascript" src="lightgl.js"></script> <script type="text/javascript" src="csg.js"></script> <script type="text/javascript" src="openjscad.js"></script> <script type="text/javascript" src="braille.jscad" charset="utf-8"></script> <script type="text/javascript" src="jquery-1.10.1.min.js"></script> <style> body { font: 14px/20px 'Helvetica Neue Light', HelveticaNeue-Light, 'Helvetica Neue', Helvetica, Arial, sans-serif; max-width: 820px; margin: 0 auto; padding: 10px; } canvas { border: 1px solid black; margin: 0px 8px; } pre, code { font: 12px/20px Monaco, monospace; border: 1px solid #CCC; border-radius: 3px; background: #F9F9F9; padding: 0 3px; color: #555; } pre { padding: 10px; width: 100%; } textarea { font: 12px/20px Monaco, monospace; padding: 5px 8px; width: 300px; height: 100px; } td { vertical-align: top; } canvas { cursor: move; } </style> <link rel="stylesheet" href="openjscad.css" type="text/css" /> <script> var gProcessor=null; var detailsOffset = 4; var detailsAmount = 7; // Show all exceptions to the user: OpenJsCad.<API key>(); function onload() { gProcessor = new OpenJsCad.Processor(document.getElementById("viewer")); jQuery.get('braille.jscad', function(data) { gProcessor.setJsCad(data, "braille.jscad"); showDetails(false); }); adaptControls(); } function adaptControls() { if (gProcessor.viewer != null) gProcessor.viewer.gl.clearColor(1, 1, 0.97, 1); $("#viewer .viewer")[0].style.backgroundColor = "white"; $("#viewer .parametersdiv button")[0].onclick = parseParameters; var moreElement = "<hr/><p><a id='more'></a></p>"; $("#viewer .parametersdiv .parameterstable").after(moreElement); setLanguage("german"); } function setLanguage(lang) { if (lang == "german") { // var $statusBar = $("#viewer .statusdiv"); // $statusBar.children("span")[0].innerHTML = "Fertig." $("#viewer .parametersdiv button")[0].innerHTML = "3D Modell generieren"; } } function showDetails(show) { var tableRows = $("#viewer .parametersdiv .parameterstable tr"); for (var i=detailsOffset; i < tableRows.length && i < detailsOffset+detailsAmount; i++) { tableRows[i].style.display = (show) ? "table-row" : "none"; } var moreLink = $("#more")[0]; moreLink.innerHTML = (show) ? "simple Einstellungen" : "Details einstellen"; moreLink.href = "javascript:showDetails(" + !show + ");"; } function parseParameters() { var param_form_size = $("#viewer .parametersdiv .parameterstable tr:eq(4) td:eq(1) input")[0]; param_form_size.value = Math.min(Math.max(param_form_size.value, 0.0), 10.0); var param_dot_height = $("#viewer .parametersdiv .parameterstable tr:eq(5) td:eq(1) input")[0]; param_dot_height.value = Math.min(Math.max(param_dot_height.value, 0.5), 0.8); var param_dot_diameter = $("#viewer .parametersdiv .parameterstable tr:eq(6) td:eq(1) input")[0]; param_dot_diameter.value = Math.min(Math.max(param_dot_diameter.value, 1.4), 1.6); var <API key> = $("#viewer .parametersdiv .parameterstable tr:eq(7) td:eq(1) input")[0]; <API key>.value = Math.max(<API key>.value, 0.0); var param_resolution = $("#viewer .parametersdiv .parameterstable tr:eq(10) td:eq(1) input")[0]; var isnumber = !isNaN(parseInt(param_resolution.value)) && isFinite(param_resolution.value); var resolution = (isnumber) ? parseInt(param_resolution.value) : 0; resolution = Math.min(Math.max(param_resolution.value, 10), 30); resolution += (resolution % 2); param_resolution.value = resolution; gProcessor.rebuildSolid(); } </script> <title>Text to 3d printable Braille</title> </head> <body onload="onload()"> <h1>Text to 3d printable Braille</h1> <div id="viewer"></div> </body> </html>
# Pull base image with batteries FROM buildpack-deps:jessie MAINTAINER EngageNExecute code@engagenexecute.com # Install packages. RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y \ locales \ python-dev \ cmake \ libpq-dev \ python-pip \ git-core \ libopencv-dev \ postgresql-9.4 \ python-opencv \ python-numpy # Set UTF-8 as locales RUN dpkg-reconfigure locales && \ locale-gen C.UTF-8 && \ /usr/sbin/update-locale LANG=C.UTF-8 # ENV UTF-8 ENV LC_ALL C.UTF-8 # Disable warning driver1394 (camera) RUN ln /dev/null /dev/raw1394
'use strict'; var _ = require('./underscore-mixins.js'); var fnToNode = new Map(); exports.load = function (nodes, prefix) { let uuid = require('uuid'); if (prefix != null && prefix.length > 0) { prefix = prefix + ':'; } else { prefix = ''; } _(nodes).forEach(function (fn, name) { if (_.isFunction(fn)) { fnToNode.set(fn, { name: prefix + name, id: uuid.v4(), fn: fn, ingoingLinks: new Map(), outgoingLinks: new Map(), counter: 0 }); } else { exports.load(fn, name); } }); }; exports.clone = function (fn, name) { var node = fnToNode.get(fn); var newNodeLoader = {}; newNodeLoader[name] = node.fn.bind({}); exports.load(newNodeLoader); return newNodeLoader[name]; }; exports.debug = function () { fnToNode.forEach(function (node) { console.log( _(Array.from(node.ingoingLinks.keys())).pluck('name'), node.name, _(Array.from(node.outgoingLinks.keys())).pluck('name') ); }); }; var defaultLinkOptions = { primary: true }; exports.link = function (fn) { var node = fnToNode.get(fn); return { to: function (toFn, options) { options = _(options || {}).defaults(defaultLinkOptions); var toNode = fnToNode.get(toFn); toNode.ingoingLinks.set(node, options); node.outgoingLinks.set(toNode, options); } }; }; exports.unlink = function (fn) { var node = fnToNode.get(fn); return { from: function (fromFn) { var fromNode = fnToNode.get(fromFn); fromNode.ingoingLinks.delete(node); node.outgoingLinks.delete(fromNode); } }; }; exports.remove = function (fn) { var node = fnToNode.get(fn), todo = []; node.ingoingLinks.forEach(function (inOptions, inNode) { todo.push(function () { exports.unlink(inNode.fn).from(fn); }); node.outgoingLinks.forEach(function (outOptions, outNode) { todo.push(function () { exports.unlink(fn).from(outNode.fn); exports.link(inNode.fn).to(outNode.fn, outOptions); }); }); }); _(todo).invoke('call'); }; exports.replace = function (fn) { var node = fnToNode.get(fn), todo = []; return { by: function (byFn) { node.ingoingLinks.forEach(function (inOptions, inNode) { todo.push(function () { exports.unlink(inNode.fn).from(node.fn); exports.link(inNode.fn).to(byFn, inOptions); }); }); node.outgoingLinks.forEach(function (outOptions, outNode) { todo.push(function () { exports.unlink(node.fn).from(outNode.fn); exports.link(byFn).to(outNode.fn, outOptions); }); }); _(todo).invoke('call'); } } }; exports.before = function (fn) { var node = fnToNode.get(fn), todo = []; return { insert: function (beforeFn) { node.ingoingLinks.forEach(function (inOptions, inNode) { todo.push(function () { exports.unlink(inNode.fn).from(node.fn); exports.link(inNode.fn).to(beforeFn, inOptions); }); }); todo.push(function () { exports.link(beforeFn).to(node.fn); }); _(todo).invoke('call'); } }; }; exports.after = function (fn) { var node = fnToNode.get(fn), todo = []; return { insert: function (afterFn) { node.outgoingLinks.forEach(function (outOptions, outNode) { todo.push(function () { exports.unlink(node.fn).from(outNode.fn); exports.link(afterFn).to(outNode.fn, outOptions); }); }); todo.push(function () { exports.link(node.fn).to(afterFn); }); _(todo).invoke('call'); } }; }; var runEntryNode; function linksToStream(links) { let plumber = require('gulp-plumber'); return _(links).chain() .pluck('fn') .map(exports.run) .compact() .concatVinylStreams() .value() .pipe(plumber()); } exports.run = function (fn) { var result, node = fnToNode.get(fn); runEntryNode = runEntryNode || node; if (node.lastResult != null) { return node.lastResult; } var primaryStreams = [], secondaryStreams = []; node.ingoingLinks.forEach(function (options, node) { if (options.primary) { primaryStreams.push(node); } else { secondaryStreams.push(node); } }); var primaryStream = linksToStream(primaryStreams), secondaryStream = linksToStream(secondaryStreams); result = fn(primaryStream, secondaryStream); if (runEntryNode === node) { fnToNode.forEach(function (node) { delete node.lastResult; }); } else { node.lastResult = result; } return result; }; function isNotAlone(node) { return (node.ingoingLinks.size + node.outgoingLinks.size) > 0; } function isSource(node) { return node.ingoingLinks.size === 0; } function isOutput(node) { return node.outgoingLinks.size === 0; } exports.renderGraph = function (renderer, filepath, callback) { let graphdot = require('./graphdot.js'); var graph = graphdot.digraph('<API key>'); graph.set('label', 'one-gulp streams graph\n\n'); graph.set('fontname', 'sans-serif'); graph.set('fontsize', '20'); graph.set('labelloc', 't'); graph.set('pad', '0.5,0.5'); graph.set('nodesep', '0.3'); graph.set('splines', 'spline'); graph.set('ranksep', '1'); graph.set('rankdir', 'LR'); var promises = []; fnToNode.forEach(function (node) { var nodeOptions = { label: node.name, shape: 'rectangle', fontname: 'sans-serif', style: 'bold', margin: '0.2,0.1' }; if (isSource(node)) { nodeOptions.shape = 'ellipse'; nodeOptions.color = 'lavender'; nodeOptions.fontcolor = 'lavender'; nodeOptions.margin = '0.1,0.1'; } if (isOutput(node)) { nodeOptions.color = 'limegreen'; nodeOptions.fontcolor = 'white'; nodeOptions.style = 'filled'; nodeOptions.margin = '0.25,0.25'; } if (isNotAlone(node)) { node.graphNode = graph.addNode(node.id, nodeOptions); if (isSource(node)) { var donePromise = new Promise(function (resolve, reject) { node.fn() .on('data', function () { node.counter += 1; node.graphNode.set('color', 'mediumslateblue'); node.graphNode.set('fontcolor', 'mediumslateblue'); node.graphNode.set('label', node.name + ' (' + node.counter + ')'); }) .on('error', reject) .on('end', resolve); }); promises.push(donePromise); } } }); Promise.all(promises).then(function () { fnToNode.forEach(function (node) { node.ingoingLinks.forEach(function (options, linkedNode) { var edgeOptions = {}; if (options.primary) { edgeOptions.penwidth = '1.5'; } else { edgeOptions.arrowhead = 'empty'; edgeOptions.style = 'dashed'; } if (isSource(linkedNode)) { edgeOptions.color = linkedNode.graphNode.get('color'); } graph.addEdge(linkedNode.graphNode, node.graphNode, edgeOptions); }); }); graphdot.renderToSvgFile(graph, renderer, filepath, callback); }); };
Text Override v.2.8.4 by: Matthew D. Jordan About A simple interface to modify a dimension's text override value directly. It even features shortcuts for frequently used overrides. Clear a text override by entering an empty string at the command line. If you want to use a chuck of text that includes space characters, use the Literal option. Use: Start Text Override by entering: command: textoverride``` Select dimension(s):``` it will only select dimensions, so feel free to select regular objects, they will not be affected.Β  You can also select your dimensions before you start the command. Enter Override Text:```Β  Guess what happens here?Β  You can also enter shortcuts (upper or lower-case) for commonly used dimension notes. These are listed below and at the prompt.Β  Also, you can clear a text override by entering nothing at the text prompt. Built-In Shortcuts: |Shortcut...|Means...| |: |t|5'-0" TYP| |c|5'-0" OC| |ct|5'-0" OC TYP| |cc|5'-0" CTC| |cct|5'-0" CTC TYP| |nct|5'-0" <newline> OC TYP| |th|5'-0" THRU| |s|5'-0" (Skin)| |p|(5'-0")| |<none>|reset text override| GUI Helpers The file ```<API key>.lsp``` adds specific autocad command functions to allow gui elements (toolbar buttons, menu items, and ribbon controls) to access textOverride shortcuts directly.
#!/bin/sh # MediaWiki Setup Script # This script will install and configure MediaWiki on # an Ubuntu 14.04 droplet export DEBIAN_FRONTEND=noninteractive; # Generate root and wordpress mysql passwords rootmysqlpass=`dd if=/dev/urandom bs=1 count=32 2>/dev/null | base64 -w 0 | rev | cut -b 2- | rev | tr -dc 'a-zA-Z0-9'`; mwmysqlpass=`dd if=/dev/urandom bs=1 count=32 2>/dev/null | base64 -w 0 | rev | cut -b 2- | rev | tr -dc 'a-zA-Z0-9'`; # Write passwords to file echo "MySQL Passwords for this droplet " > /etc/motd.tail; echo " echo "Root MySQL Password: $rootmysqlpass" >> /etc/motd.tail; echo "MediaWiki MySQL Database: mwdb" >> /etc/motd.tail; echo "Mediawiki MySQL Username: mwsql" >> /etc/motd.tail; echo "Mediawiki MySQL Password: $mwmysqlpass" >> /etc/motd.tail; echo " echo "You can remove this information with 'rm -f /etc/motd.tail'" >> /etc/motd.tail; apt-get update; apt-get -y install apache2 mysql-server <API key> php5-mysql php5 libapache2-mod-php5 php5-mcrypt php5-gd php5-intl php-pear php5-dev make libpcre3-dev php-apc; # Set up database user /usr/bin/mysqladmin -u root -h localhost create mwdb; /usr/bin/mysqladmin -u root -h localhost password $rootmysqlpass; /usr/bin/mysql -uroot -p$rootmysqlpass -e "CREATE USER mwsql@localhost IDENTIFIED BY '"$mwmysqlpass"'"; /usr/bin/mysql -uroot -p$rootmysqlpass -e "GRANT ALL PRIVILEGES ON mwdb.* TO mwsql@localhost"; rm -f /var/www/html/index.html; wget http://releases.wikimedia.org/mediawiki/1.25/mediawiki-1.25.1.tar.gz -O /root/mediawiki.tar.gz; cd /root; tar -zxf /root/mediawiki.tar.gz;
# Zensible Mongo Extension library to simplify working with mongo, it uses a builder pattern approach to performing calls to the mongo db, this allows for specific type of calls to be stored. # Motivation We all had to perform simple mongo actions but because of the mindboogling poor api of the offical mongo driver instead gone insane. For instance lets say we want to find a single document by id var filter = Builders<BsonDocument>.Filter.Eq("_id", id); var result = collection.Find(filter); var document = await result.<API key>() Alternative with zensible mongo var document = await collection.ForId(id).PullAsync(); Or lets assume you want to insert a document into mongo and get the id that it got inserted with await collection.InsertOneAsync(document) <--- returns void Hmm thats weired there doesn't seem to be a way to get the id... ofc it changes the id directly on the document you are passing it. Nice unsafe shared memory you got there! Alternative with zensible mongo var documentWithID = await collection.Create(document).PushAsync() documentWithID.ShouldNotBe(document) //pass ahh nice a cloned safe version that is different # How To Query For a look up simply chose a selector such as ForId, ForSingleWhere etc. To Fetch a single document based on a condition. var document = await collection.ForSingleWhere(d => d.IsDue).PullAsync(); ForSingleWhere should be be read: For a Single document Where (predicate) is true.. To fetch all documents based on a condition. var document = await collection.ForAllWhere(d => d.IsDue).PullAsync(); ForAllWhere should be be read: For All document Where (predicate) is true... To fetch all documents var document = await collection.ForAllWhere(d => d.IsDue).PullAsync(); ForAllWhere should be be read: For All document Where (predicate) is true... Update Like with the query we begin by ForId/ForSingleWhere/For.. var document = await collection.ForId(id) .Set(d => d.Field, value) .PushAsync(); BONUS: if the selection only refers to one document that document will be returned. To change multiple fields simply string them together var document = await collection.ForId(id) .Set(d => d.Field1, value1) .Set(d => d.Field2, value2) .Set(d => d.Field3, value3) .. .. .PushAsync(); Delete Like with query simply attach delete and the result will be a delete var document = await collection.ForId(id).Delete().PushAsync(); BONUS: if the selection only refers to one document that document will be returned. Create To insert a document in the mongo collection simply use Create var newDocument = await collection.Create(document).PushAsync(); // newDocument != document For multiple documents var manyNewDocs = await collection.Create(doc1, doc2, ...).PushAsync(); ## What is up with the Pull/Push? One of the features of this extension library is that actions can be stored and then used. for instance lets say I have a mail server and I want to define a query for all read mails. var allReadMailsQuery = collection.ForAllWhere(m => m.IsRead) Now when I need it I can either fetch it, delete it etc etc.. var allReadMails = await allReadMailsQuery.PullAsync(); await allReadMailsQuery.Delete().PushAsync();
import { connect } from 'react-redux'; import Main from './Main'; import * as userActions from '../../state/user/userActions'; const mapStateToProps = (state, ownProps) => { return { activeTab: ownProps.location.pathname.split('/')[2] }; }; const mapDispatchToProps = (dispatch) => { return { getUserData: () => dispatch(userActions.authRequest()) }; }; export default connect(mapStateToProps, mapDispatchToProps)(Main);
import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; import { MembersComponent } from './members/members.component'; import { SeatingMapComponent } from './seating-map/seating-map.component'; const routes: Routes = [ { path: 'members', component: MembersComponent }, { path: 'seating-map', component: SeatingMapComponent }, { path: '', redirectTo: '/members', pathMatch: 'full' } ]; @NgModule({ imports: [RouterModule.forRoot(routes)], exports: [RouterModule] }) export class AppRoutingModule { }
# Update the X font indexes: if [ -x /usr/bin/mkfontdir ]; then /usr/bin/mkfontscale /usr/share/fonts/TTF /usr/bin/mkfontdir /usr/share/fonts/TTF /usr/bin/mkfontscale /usr/share/fonts/OTF /usr/bin/mkfontdir /usr/share/fonts/OTF fi if [ -x /usr/bin/fc-cache ]; then /usr/bin/fc-cache -f fi
(function(angular) { 'use strict'; angular .module('jstube.<API key>.popup') .directive('jstubeNavbar', jstubeNavbar); function jstubeNavbar() { return { restrict: 'E', templateUrl: 'nav/_navbar.html', controller: 'NavbarController', controllerAs: 'nav' }; } } (window.angular));
// Just re-export everything from the other files export * from './base-table-name'; export * from './compound-constraint'; export * from './constraint'; export * from './constraint-type'; export * from './default-value'; export * from './error-response'; export * from './filter-operation'; export * from './filter'; export * from './master-table-name'; export * from './raw-constraint'; export * from './paginated-response'; export * from './session-ping'; export * from './<API key>'; export * from './sql-row'; export * from './table-data-type'; export * from './table-header'; export * from './table-insert'; export * from './table-meta'; export * from './table-tier'; export * from './transformed-name';
package com.dranawhite.mybatis.handler; import com.alibaba.fastjson.JSON; import com.dranawhite.mybatis.model.Address; import com.dranawhite.mybatis.model.FullAddress; import org.apache.ibatis.type.JdbcType; import org.apache.ibatis.type.MappedJdbcTypes; import org.apache.ibatis.type.MappedTypes; import org.apache.ibatis.type.TypeHandler; import java.sql.CallableStatement; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; /** * @author dranawhite 2018/1/2 * @version 1.0 */ @MappedTypes(FullAddress.class) @MappedJdbcTypes(JdbcType.VARCHAR) public class <API key> implements TypeHandler<FullAddress> { @Override public void setParameter(PreparedStatement ps, int i, FullAddress parameter, JdbcType jdbcType) throws SQLException { String address = JSON.toJSONString(parameter); ps.setString(i, address); } @Override public FullAddress getResult(ResultSet rs, String columnName) throws SQLException { String address = rs.getString(columnName); return JSON.parseObject(address, FullAddress.class); } @Override public FullAddress getResult(ResultSet rs, int columnIndex) throws SQLException { String address = rs.getString(columnIndex); return JSON.parseObject(address, FullAddress.class); } @Override public FullAddress getResult(CallableStatement cs, int columnIndex) throws SQLException { String address = cs.getString(columnIndex); return JSON.parseObject(address, FullAddress.class); } }
<!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/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/favicon.ico" /> <link rel="apple-touch-icon" href="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/iosicon.png" /> <!-- DEVELOPMENT LESS --> <!-- <link rel="stylesheet/less" href="css/photon.less" media="all" /> <link rel="stylesheet/less" href="css/photon-responsive.less" media="all" /> --> <!-- PRODUCTION CSS --> <link rel="stylesheet" href="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/css/css_compiled/photon-min.css?v1.1" media="all" /> <link rel="stylesheet" href="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/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/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/css/css_compiled/<API key>.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/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/js/bootstrap/bootstrap.min.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/js/plugins/modernizr.custom.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/js/plugins/jquery.pnotify.min.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/js/plugins/less-1.3.1.min.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/js/plugins/xbreadcrumbs.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/js/plugins/jquery.maskedinput-1.3.min.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/js/plugins/jquery.autotab-1.1b.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/js/plugins/charCount.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/js/plugins/jquery.textareaCounter.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/js/plugins/elrte.min.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/js/plugins/elrte.en.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/js/plugins/select2.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/js/plugins/jquery-picklist.min.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/js/plugins/jquery.validate.min.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/js/plugins/additional-methods.min.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/js/plugins/jquery.form.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/js/plugins/jquery.metadata.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/js/plugins/jquery.mockjax.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/js/plugins/jquery.uniform.min.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/js/plugins/jquery.tagsinput.min.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/js/plugins/jquery.rating.pack.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/js/plugins/farbtastic.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/js/plugins/jquery.timeentry.min.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/js/plugins/jquery.dataTables.min.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/js/plugins/jquery.jstree.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/js/plugins/dataTables.bootstrap.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/js/plugins/jquery.mousewheel.min.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/js/plugins/jquery.mCustomScrollbar.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/js/plugins/jquery.flot.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/js/plugins/jquery.flot.stack.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/js/plugins/jquery.flot.pie.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/js/plugins/jquery.flot.resize.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/js/plugins/raphael.2.1.0.min.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/js/plugins/justgage.1.0.1.min.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/js/plugins/jquery.qrcode.min.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/js/plugins/jquery.clock.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/js/plugins/jquery.countdown.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/js/plugins/jquery.jqtweet.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/js/plugins/jquery.cookie.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/js/plugins/<API key>.min.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/js/plugins/prettify/prettify.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/js/plugins/bootstrapSwitch.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/js/plugins/mfupload.js"></script> <script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/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="<API key>"> <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($('.<API key>').length){ var scrollState = $(window).scrollTop(); if (scrollState > 0) $('.nav-fixed-topright').addClass('nav-released'); else $('.nav-fixed-topright').removeClass('nav-released') } }); $('.<API key>').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="<API key>"> <div class="form-window-login"> <div class="<API key>"> <div class="login-logo"> <img src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/js/plugins/prettify/js/plugins/prettify/css/css_compiled/css/css_compiled/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="photon-min.css-v1.1.html#">Sign Up &#187;</a> <a href="photon-min.css-v1.1.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="photon-min.css-v1.1.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: var s = document.<API key>('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> </body> </html>
from util.tipo import tipo class <API key>(object): def __init__(self, tracker, time, direction, opcode, data): print(str(type(self)).split('.')[3]+'('+str(len(data))+'): '+ str(data.get_array_hex(1))[1:-1])
export hom, hom_check """ `hom_check(G,H,d)` checks if the dictionary `d` is a graph homomorphism from `G` to `H`. """ function hom_check(G::SimpleGraph, H::SimpleGraph, d::Dict)::Bool for e in G.E v, w = e x = d[v] y = d[w] if !H[x, y] return false end end return true end """ `hom(G,H)` finds a graph homomorphism from `G` to `H`. """ function hom(G::SimpleGraph{S}, H::SimpleGraph{T}) where {S,T} m = Model(get_solver()) @variable(m, P[G.V, H.V], Bin) for v in G.V @constraint(m, sum(P[v, x] for x in H.V) == 1) end for e in G.E u, v = e for x in H.V for y in H.V if !H[x, y] @constraint(m, P[u, x] + P[v, y] <= 1) end end end end optimize!(m) status = Int(termination_status(m)) if status != 1 error("No homomorphism") end PP = Int.(value.(P)) result = Dict{S,T}() for v in G.V for x in H.V if PP[v, x] > 0 result[v] = x end end end return result end
"""Auto-generated file, do not edit by hand. BG metadata""" from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_BG = PhoneMetadata(id='BG', country_code=359, <API key>='00', general_desc=PhoneNumberDesc(<API key>='[23567]\\d{5,7}|[489]\\d{6,8}', <API key>='\\d{5,9}'), fixed_line=PhoneNumberDesc(<API key>='2(?:[0-8]\\d{5,6}|9\\d{4,6})|(?:[36]\\d|5[1-9]|8[1-6]|9[1-7])\\d{5,6}|(?:4(?:[124-7]\\d|3[1-6])|7(?:0[1-9]|[1-9]\\d))\\d{4,5}', <API key>='\\d{5,8}', example_number='2123456'), mobile=PhoneNumberDesc(<API key>='(?:8[7-9]|98)\\d{7}|4(?:3[0789]|8\\d)\\d{5}', <API key>='\\d{8,9}', example_number='48123456'), toll_free=PhoneNumberDesc(<API key>='800\\d{5}', <API key>='\\d{8}', example_number='80012345'), premium_rate=PhoneNumberDesc(<API key>='90\\d{6}', <API key>='\\d{8}', example_number='90123456'), shared_cost=PhoneNumberDesc(<API key>='NA', <API key>='NA'), personal_number=PhoneNumberDesc(<API key>='700\\d{5}', <API key>='\\d{5,9}', example_number='70012345'), voip=PhoneNumberDesc(<API key>='NA', <API key>='NA'), pager=PhoneNumberDesc(<API key>='NA', <API key>='NA'), uan=PhoneNumberDesc(<API key>='NA', <API key>='NA'), emergency=PhoneNumberDesc(<API key>='1(?:12|50|6[06])', <API key>='\\d{3}', example_number='112'), voicemail=PhoneNumberDesc(<API key>='NA', <API key>='NA'), short_code=PhoneNumberDesc(<API key>='NA', <API key>='NA'), standard_rate=PhoneNumberDesc(<API key>='NA', <API key>='NA'), <API key>=PhoneNumberDesc(<API key>='NA', <API key>='NA'), national_prefix='0', <API key>='0', number_format=[NumberFormat(pattern='(2)(\\d{5})', format='\\1 \\2', <API key>=['29'], <API key>='0\\1'), NumberFormat(pattern='(2)(\\d{3})(\\d{3,4})', format='\\1 \\2 \\3', <API key>=['2'], <API key>='0\\1'), NumberFormat(pattern='(\\d{3})(\\d{4})', format='\\1 \\2', <API key>=['43[124-7]|70[1-9]'], <API key>='0\\1'), NumberFormat(pattern='(\\d{3})(\\d{3})(\\d{2})', format='\\1 \\2 \\3', <API key>=['43[124-7]|70[1-9]'], <API key>='0\\1'), NumberFormat(pattern='(\\d{3})(\\d{2})(\\d{3})', format='\\1 \\2 \\3', <API key>=['[78]00'], <API key>='0\\1'), NumberFormat(pattern='(\\d{2})(\\d{3})(\\d{2,3})', format='\\1 \\2 \\3', <API key>=['[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]'], <API key>='0\\1'), NumberFormat(pattern='(\\d{2})(\\d{3})(\\d{3,4})', format='\\1 \\2 \\3', <API key>=['48|8[7-9]|9[08]'], <API key>='0\\1')])
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} }
require('babel-polyfill'); /* eslint-disable */ // Webpack config for creating the production bundle. var path = require('path'); var webpack = require('webpack'); var CleanPlugin = require('<API key>'); var ExtractTextPlugin = require('<API key>'); var strip = require('strip-loader'); var projectRootPath = path.resolve(__dirname, '../'); var assetsPath = path.resolve(projectRootPath, './static/dist'); var <API key> = require('<API key>/plugin'); var <API key> = new <API key>(require('./<API key>')); module.exports = { devtool: 'source-map', context: path.resolve(__dirname, '..'), entry: { 'main': [ 'bootstrap-sass!./src/theme/bootstrap.config.prod.js', '<API key>!./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: <API key>.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.<API key>(), new webpack.optimize.UglifyJsPlugin({ compress: { warnings: false } }), <API key> ] };
from itertools import product import numpy as np from sympy import And import pytest from conftest import skipif, opts_tiling from devito import (<API key>, 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, <API key>) from devito.symbolics import indexify, retrieve_functions, IntDiv from devito.types import Array class <API key>(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 <API key>(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 <API key>(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 = <API key>(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 <API key>(self): 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 <API key>(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 <API key>(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 <API key>(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 <API key>(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 <API key>(self): """ Tests application of an Operator consisting of a subdimension defined over different sub-regions, explicitly created through the use of SubDimensions. Different from ``<API key>`` 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 <API key>(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 <API key>(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 <API key>(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 <API key>(object): """ A collection of tests to check the correct functioning of <API key>. """ 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 = <API key>('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 = <API key>('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 <API key>(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([<API key>(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 <API key>(self): nt = 19 grid = Grid(shape=(11, 11)) x, y = grid.dimensions time = grid.time_dim factor = 4 time_subsampled = <API key>('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 = <API key>('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 <API key> """ grid = Grid(shape=(11, 11)) time = grid.time_dim # Creates subsampled spatial dimensions and accordine grid dims = tuple([<API key>(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 <API key>(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 = <API key>('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 = <API key>(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 = <API key>('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 = <API key>('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 <API key> 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 = <API key>('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 <API key>(self): """Test behaviour when the <API key> 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 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 = <API key>('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 <API key>(self): """ Test <API key> 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 = <API key>(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 <API key> 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 = <API key>(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 <API key> fall within the same Conditional. This is a follow up to issue #1610. """ grid = Grid(shape=(10, 10)) time = grid.time_dim cond = <API key>(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(<API key>(conds[0].then_body)) == 2 def <API key>(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 = <API key>(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 <API key>(self): """ Test the lowering of an expr-like <API key>'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 = <API key>(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 <API key>(self, setup_rel, rhs, c1, c2, c3, c4): """ Test <API key> 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 = <API key>(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 <API key>(self): """ Test that Functions appearing in the condition of a <API key> 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 = <API key>(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 <API key>(self): """ If <API key> 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 <API key> 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 <API key>. No fusion, no optimization ctime = <API key>(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 <API key>(self): """ Conceptually like `<API key>`, 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 = <API key>(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 = <API key>('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 <API key>(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 <API key>. """ 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 = <API key>(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 <API key>(self): """ Like `<API key>` 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 = <API key>(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 def <API key>(self): """ Like `<API key>` 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 = <API key>(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
App.SubPhotoInstance = DS.Model.extend({ width: DS.attr('number'), height: DS.attr('number'), url: DS.attr('string'), type: 'sub_photo_instance' });
"""Kytos SDN Platform.""" from pkgutil import extend_path __path__ = extend_path(__path__, __name__)
finApp.directive('brief', function () { return { restrict: 'E', templateUrl: 'views/directives/brief.html', controller: 'BriefController', controllerAs: 'bfc' }; });
// <API key>.h // XCRegex #import <Cocoa/Cocoa.h> @interface <API key> : NSWindowController @end
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); } } }
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); 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 = '<API key>', 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.<API key>.<API key>('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.<API key>.<API key>('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.<API key>().getColumns(); } // Get visible manager function gvm() { return grid.<API key>(); } it("should provide a getColumnManager method", function(){ makeGrid(); expect(gam().$className).toBe('Ext.grid.ColumnManager'); }); it("should provide a <API key> 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, <API key>; groupedHeader = headerCtItems.items[2]; <API key> = 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(<API key>); expect(colMgrHeader.hidden).toBe(<API key>.hidden); expect(colMgrHeader.dataIndex).toBe(<API key>.dataIndex); }); it('should return first sub-header regardless of visibility', function () { var groupedHeader, colMgrHeader, <API key>; groupedHeader = headerCtItems.items[3]; <API key> = 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(<API key>); 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.<API key>.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, <API key>; groupedHeader = headerCtItems.items[2]; <API key> = headerCtItems.items[2].<API key>.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(<API key>); expect(colMgrHeader.hidden).toBe(<API key>.hidden); expect(colMgrHeader.dataIndex).toBe(<API key>.dataIndex); }); it('should not return a hidden sub-header', function () { var groupedHeader, colMgrHeader, <API key>; groupedHeader = headerCtItems.items[3]; <API key> = groupedHeader.<API key>.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(<API key>); 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].<API key>.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 <API key>", 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(' } 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.<API key>().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.<API key>().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.<API key>; getCol('col11').hide(); expect(grid.<API key>).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 | // 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.<API key>(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.<API key>(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.<API key>.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.<API key>.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); });
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("<API key>", "pigame.settings") try: from django.core.management import <API key> 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 <API key>(sys.argv)
// Generated by class-dump 3.5 (64 bit). #import "NSObject.h" @class IBConnection, NSSet, NSString; @interface <API key> : NSObject { NSString *connectionName; long long relationshipType; NSString *sourceClassName; id source; IBConnection *prototype; BOOL <API key>; NSSet *<API key>; } @property(readonly) NSSet *<API key>; // @synthesize <API key>; @property(readonly) BOOL <API key>; // @synthesize <API key>; @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)<API key>:(id)arg1 relationshipType:(long long)arg2 sourceClassName:(id)arg3 <API key>:(id)arg4 <API key>:(BOOL)arg5; - (id)initWithPrototype:(id)arg1 <API key>:(id)arg2; - (id)initWithSource:(id)arg1 <API key>:(id)arg2; @end
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"); } }
<!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>
<?php namespace Akamon\OAuth2\Server\Domain\Service\Token\TokenGranter; use Akamon\OAuth2\Server\Domain\Exception\OAuthError\<API key>; use Akamon\OAuth2\Server\Domain\Exception\OAuthError\Un<API key>; use Akamon\OAuth2\Server\Domain\Exception\OAuthError\<API key>; use Akamon\OAuth2\Server\Domain\Service\Client\ClientObtainer\<API key>; use Akamon\OAuth2\Server\Domain\Service\Token\<API key>\<API key>; use Symfony\Component\HttpFoundation\Request; use felpado as f; class <API key> implements <API key> { private $clientObtainer; private $processors = []; public function __construct(<API key> $clientObtainer, array $processors) { $this->clientObtainer = $clientObtainer; foreach ($processors as $name => $processor) { $this->addProcessor($name, $processor); } } private function addProcessor($name, <API key> $processor) { $this->processors[$name] = $processor; } public function grant(Request $request) { $client = $this->clientObtainer->getClient($request); $grantType = $this-><API key>($request); if (!$client->hasAllowedGrantType($grantType)) { throw new Un<API key>(); } $inputData = $this-><API key>($request); return $this->findProcessor($grantType)->process($client, $inputData); } private function <API key>(Request $request) { if (!$request->request->has('grant_type')) { throw new <API key>(); } return $request->request->get('grant_type'); } /** * @return <API key> */ private function findProcessor($grantType) { if (f\contains($this->processors, $grantType)) { return f\get($this->processors, $grantType); } throw new <API key>(); } private function <API key>(Request $request) { return f\dissoc($request->request->all(), 'grant_type'); } }
<!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 <API key> 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;<API key>&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=<SHA256-like>&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 <API key>.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 <API key>.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 <API key>.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/<API key>.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/<API key>.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/<API key>.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/<API key>.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 <API key>.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: </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>
<!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 <API key> 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: </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>
<!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 <API key> 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: ] 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=<API key>&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: </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>
<!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 <API key> 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& 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=<API key>&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: </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>
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: 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: <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=" <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>
<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="#<API key>" 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="<API key>"> <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.<API key>()"> <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.<API key>(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.<API key>()"> <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.<API key>(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>
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)) } }
// 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 }()
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(); } } }
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)
#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_ */
import formatPhoneNumber, { <API key> } from './<API key>' describe('<API key>', () => { it('should format phone numbers', () => { formatPhoneNumber('+12133734253', 'NATIONAL').should.equal('(213) 373-4253') formatPhoneNumber('+12133734253', 'INTERNATIONAL').should.equal('+1 213 373 4253') <API key>('+12133734253').should.equal('+1 213 373 4253') }) })
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 <API key> from '@material-ui/icons/<API key>'; import <API key> 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={<<API key> fontSize="small" />} checkedIcon={<<API key> fontSize="small" />} /> </div> ); }
// ViewController.h // Examples #import <UIKit/UIKit.h> #import <TLIndexPathTools/<API key>.h> @interface <API key> : <API key> @end
<!DOCTYPE html PUBLIC "- <html lang='en' xml:lang='en' xmlns='http: <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='<API key>.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: </a> <a href='http: </a> </p> </body> </html>
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
<!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 <API key> = true; loadScripts(document, 'script');</script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <header role="banner"> <nav role="navigation"> <div class="fixedNav"> <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="<API key>"> <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("<API key>"); 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> </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#<API key>(com.wrapper.spotify.enums.<API key>)"><API key></a></span>&#8203;(<a href="../../../enums/<API key>.html" title="enum in com.wrapper.spotify.enums"><API key></a>&nbsp;<API key>)</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 <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 <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 <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"> <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="<API key>"> <li><a href="../../../../../../allclasses.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); 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> </nav> <p class="legalCopy"><small>Copyright & </footer> </body> </html>
#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.<API key>(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::<API key>(const SecureString& <API key>, const SecureString& <API key>) { bool fWasLocked = IsLocked(); { LOCK(cs_wallet); Lock(); CCrypter crypter; CKeyingMaterial vMasterKey; BOOST_FOREACH(MasterKeyMap::value_type& pMasterKey, mapMasterKeys) { if(!crypter.<API key>(<API key>, 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.<API key>(<API key>, pMasterKey.second.vchSalt, pMasterKey.second.nDeriveIterations, pMasterKey.second.nDerivationMethod); pMasterKey.second.nDeriveIterations = pMasterKey.second.nDeriveIterations * (100 / ((double)(GetTimeMillis() - nStartTime))); nStartTime = GetTimeMillis(); crypter.<API key>(<API key>, 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.<API key>(<API key>, 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 <API key> 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(<API key>); RAND_bytes(&vMasterKey[0], <API key>); CMasterKey kMasterKey; RandAddSeedPerfmon(); kMasterKey.vchSalt.resize(<API key>); RAND_bytes(&kMasterKey.vchSalt[0], <API key>); CCrypter crypter; int64 nStartTime = GetTimeMillis(); crypter.<API key>(strWalletPassphrase, kMasterKey.vchSalt, 25000, kMasterKey.nDerivationMethod); kMasterKey.nDeriveIterations = 2500000 / ((double)(GetTimeMillis() - nStartTime)); nStartTime = GetTimeMillis(); crypter.<API key>(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.<API key>(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(); <API key>(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 <API key>(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::<API key>(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 <API key> 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 <API key>, allGeneratedMature, allFee; <API key> = allGeneratedMature = allFee = 0; string strSentAccount; list<pair<CTxDestination, int64> > listReceived; list<pair<CTxDestination, int64> > listSent; GetAmounts(<API key>, 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::<API key>(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: <API key>() : 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::<API key>(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 (<API key>(tx, &block, fUpdate)) ret++; } pindex = pindex->pnext; } } return ret; } int CWallet::<API key>(const uint256& hashTx) { CTransaction tx; tx.ReadFromDisk(COutPoint(hashTx, 0)); if (<API key>(tx, NULL, true, true)) return 1; return 0; } void CWallet::<API key>() { 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: <API key>() : 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("<API key> 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.<API key>(txdb, false); } } if (!vMissingTx.empty()) { // TODO: optimize this to scan just part of the block chain? if (<API key>(pindexGenesisBlock)) fRepeat = true; // Found missing transactions: re-do Reaccept. } } } void CWalletTx::<API key>(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::<API key>() { CTxDB txdb("r"); <API key>(txdb); } void CWallet::<API key>() { // 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("<API key>()\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.<API key>(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::<API key>() 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 <API key>(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; <API key>(vValue, nTotalLower, nTargetValue, vfBest, nBest, 1000); if (nBest != nTargetValue && nTotalLower >= nTargetValue + CENT) <API key>(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 <API key> 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.<API key>(txdb); wtxNew.<API key> = 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(); <API key>(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.<API key>(); } 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::<API key>(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; <API key>(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); <API key>(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::<API key>(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("<API key>() : read failed"); if (!HaveKey(keypool.vchPubKey.GetID())) throw runtime_error("<API key>() : 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); <API key>(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::<API key>() { int64 nIndex = 0; CKeyPool keypool; <API key>(nIndex, keypool); if (nIndex == -1) return GetTime(); ReturnKey(nIndex); return keypool.nTime; } CPubKey CReserveKey::GetReservedKey() { if (nIndex == -1) { CKeyPool keypool; pwallet-><API key>(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("<API key>() : read failed"); assert(keypool.vchPubKey.IsValid()); CKeyID keyID = keypool.vchPubKey.GetID(); if (!HaveKey(keyID)) throw runtime_error("<API key>() : 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()) <API key>(this, hashTx, CT_UPDATED); } }
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 <API key>(WORKFLOW_ID) ); CREATE UNIQUE INDEX <API key> 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 <API key>( 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, <API key> 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);
<?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 */ $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); ?>
var final_transcript = ''; var recognizing = false; //socket.emit('client_type', {text: "Speaker"}); if ('<API key>' in window) { var recognition = new <API key>(); 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 = ''; }
/* eslint-disable promise/always-return */ import { <API key>, runQuery } from "schema/v1/test/utils" describe("<API key>", () => { it("updates and returns a collector profile", () => { /* eslint-disable max-len */ const mutation = ` mutation { <API key>(input: { professional_buyer: true, loyalty_applicant: true, <API key>: "trust me i buy art", intents: [BUY_ART_AND_DESIGN] }) { id name email <API key> intents } } ` /* eslint-enable max-len */ const context = { <API key>: () => Promise.resolve({ id: "3", name: "Percy", email: "percy@cat.com", <API key>: "treats", intents: ["buy art & design"], }), } const expectedProfileData = { id: "3", name: "Percy", email: "percy@cat.com", <API key>: "treats", intents: ["buy art & design"], } expect.assertions(1) return <API key>(mutation, context).then( ({ <API key> }) => { expect(<API key>).toEqual(expectedProfileData) } ) }) it("throws error when data loader is missing", () => { /* eslint-disable max-len */ const mutation = ` mutation { <API key>(input: { professional_buyer: true, loyalty_applicant: true, <API key>: "trust me i buy art" }) { id name email <API key> 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) }) }) })
module.exports = require('./src/tracking');
<!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/<TwitterConsumerkey>/2.3.2/css/bootstrap-combined.min.css'> <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="#<API key>"> <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="<API key>"> <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="<API key>"> <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', <API key>: '<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="<API key>.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="<API key>.html">Overview</a></li> <li class="thirdlevel"><a href="<API key>.html">Methods</a></li> <li class="thirdlevel"><a href="<API key>.html">Get Predefined Content Items</a></li> <li class="thirdlevel"><a href="<API key>.html">Get Predefined Content by ID</a></li> <li class="thirdlevel"><a href="<API key>.html">Predefined Content Query Delta</a></li> <li class="thirdlevel"><a href="<API key>.html">Create Predefined Content</a></li> <li class="thirdlevel"><a href="<API key>.html">Update Predefined Content</a></li> <li class="thirdlevel"><a href="<API key>.html">Update Predefined Content Items</a></li> <li class="thirdlevel"><a href="<API key>.html">Delete Predefined Content</a></li> <li class="thirdlevel"><a href="<API key>.html">Delete Predefined Content Items</a></li> <li class="thirdlevel"><a href="<API key>.html">Get Default Predefined Content Items</a></li> <li class="thirdlevel"><a href="<API key>.html">Get Default Predefined Content by ID</a></li> <li class="thirdlevel"><a href="<API key>.html">Appendix</a></li> </ul> </li> <li class="subfolders"> <a href="#">Automatic Messages API</a> <ul> <li class="thirdlevel"><a href="<API key>.html">Overview</a></li> <li class="thirdlevel"><a href="<API key>.html">Methods</a></li> <li class="thirdlevel"><a href="<API key>.html">Get Automatic Messages</a></li> <li class="thirdlevel"><a href="<API key>.html">Get Automatic Message by ID</a></li> <li class="thirdlevel"><a href="<API key>.html">Update an Automatic Message</a></li> <li class="thirdlevel"><a href="<API key>.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="<API key>.html">Overview</a></li> <li class="thirdlevel"><a href="<API key>.html">Methods</a></li> <li class="thirdlevel"><a href="<API key>.html">Get all users</a></li> <li class="thirdlevel"><a href="<API key>.html">Get user by ID</a></li> <li class="thirdlevel"><a href="<API key>.html">Create users</a></li> <li class="thirdlevel"><a href="<API key>.html">Update users</a></li> <li class="thirdlevel"><a href="<API key>.html">Update user</a></li> <li class="thirdlevel"><a href="<API key>.html">Delete users</a></li> <li class="thirdlevel"><a href="<API key>.html">Delete user</a></li> <li class="thirdlevel"><a href="<API key>.html">Change user's password</a></li> <li class="thirdlevel"><a href="<API key>.html">Reset user's password</a></li> <li class="thirdlevel"><a href="<API key>.html">User query delta</a></li> <li class="thirdlevel"><a href="<API key>.html">Appendix</a></li> </ul> </li> <li class="subfolders"> <a href="#">Skills API</a> <ul> <li class="thirdlevel"><a href="<API key>.html">Overview</a></li> <li class="thirdlevel"><a href="<API key>.html">Methods</a></li> <li class="thirdlevel"><a href="<API key>.html">Get all skills</a></li> <li class="thirdlevel"><a href="<API key>.html">Get skill by ID</a></li> <li class="thirdlevel"><a href="<API key>.html">Create skills</a></li> <li class="thirdlevel"><a href="administration.update-skills.html">Update skills</a></li> <li class="thirdlevel"><a href="<API key>.html">Update skill</a></li> <li class="thirdlevel"><a href="<API key>.html">Delete skills</a></li> <li class="thirdlevel"><a href="<API key>.html">Delete skill</a></li> <li class="thirdlevel"><a href="<API key>.html">Skills Query Delta</a></li> <li class="thirdlevel"><a href="<API key>.html">Appendix</a></li> </ul> </li> <li class="subfolders"> <a href="#">Agent Groups API</a> <ul> <li class="thirdlevel"><a href="<API key>.html">Overview</a></li> <li class="thirdlevel"><a href="<API key>.html">Methods</a></li> <li class="thirdlevel"><a href="<API key>.html">Get all agent groups</a></li> <li class="thirdlevel"><a href="<API key>.html">Get agent group by ID</a></li> <li class="thirdlevel"><a href="<API key>.html">Create agent groups</a></li> <li class="thirdlevel"><a href="<API key>.html">Update agent groups</a></li> <li class="thirdlevel"><a href="<API key>.html">Update agent group</a></li> <li class="thirdlevel"><a href="<API key>.html">Delete agent groups</a></li> <li class="thirdlevel"><a href="<API key>.html">Delete agent group</a></li> <li class="thirdlevel"><a href="<API key>.html">Get subgroups and members of an agent group</a></li> <li class="thirdlevel"><a href="<API key>.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="<API key>.html">Getting Started</a></li> <li class="thirdlevel"><a href="<API key>.html">Chat States</a></li> <li class="thirdlevel"><a href="<API key>.html">Surveys</a></li> <li class="thirdlevel"><a href="<API key>.html">Creating an Instance</a></li> <li class="thirdlevel"><a href="<API key>.html">Methods</a></li> <li class="thirdlevel"><a href="<API key>.html"><API key></a></li> <li class="thirdlevel"><a href="<API key>.html">getPreChatSurvey</a></li> <li class="thirdlevel"><a href="<API key>.html">getEngagement</a></li> <li class="thirdlevel"><a href="<API key>.html">requestChat</a></li> <li class="thirdlevel"><a href="<API key>.html">addLine</a></li> <li class="thirdlevel"><a href="<API key>.html">setVisitorTyping</a></li> <li class="thirdlevel"><a href="<API key>.html">setVisitorName</a></li> <li class="thirdlevel"><a href="<API key>.html">endChat</a></li> <li class="thirdlevel"><a href="<API key>.html">requestTranscript</a></li> <li class="thirdlevel"><a href="<API key>.html">getExitSurvey</a></li> <li class="thirdlevel"><a href="<API key>.html">submitExitSurvey</a></li> <li class="thirdlevel"><a href="<API key>.html">getOfflineSurvey</a></li> <li class="thirdlevel"><a href="<API key>.html">submitOfflineSurvey</a></li> <li class="thirdlevel"><a href="<API key>.html">getState</a></li> <li class="thirdlevel"><a href="<API key>.html">getAgentLoginName</a></li> <li class="thirdlevel"><a href="<API key>.html">getVisitorName</a></li> <li class="thirdlevel"><a href="<API key>.html">getAgentId</a></li> <li class="thirdlevel"><a href="<API key>.html">getRtSessionId</a></li> <li class="thirdlevel"><a href="<API key>.html">getSessionKey</a></li> <li class="thirdlevel"><a href="<API key>.html">getAgentTyping</a></li> <li class="thirdlevel"><a href="<API key>.html">Events</a></li> <li class="thirdlevel"><a href="<API key>.html">onLoad</a></li> <li class="thirdlevel"><a href="<API key>.html">onInit</a></li> <li class="thirdlevel"><a href="<API key>.html">onEstimatedWaitTime</a></li> <li class="thirdlevel"><a href="<API key>.html">onEngagement</a></li> <li class="thirdlevel"><a href="<API key>.html">onPreChatSurvey</a></li> <li class="thirdlevel"><a href="<API key>.html">onStart</a></li> <li class="thirdlevel"><a href="<API key>.html">onStop</a></li> <li class="thirdlevel"><a href="<API key>.html">onRequestChat</a></li> <li class="thirdlevel"><a href="<API key>.html">onTranscript</a></li> <li class="thirdlevel"><a href="<API key>.html">onLine</a></li> <li class="thirdlevel"><a href="<API key>.html">onState</a></li> <li class="thirdlevel"><a href="<API key>.html">onInfo</a></li> <li class="thirdlevel"><a href="<API key>.html">onAgentTyping</a></li> <li class="thirdlevel"><a href="<API key>.html">onExitSurvey</a></li> <li class="thirdlevel"><a href="<API key>.html"><API key></a></li> <li class="thirdlevel"><a href="<API key>.html">Engagement Attributes Body Example</a></li> <li class="thirdlevel"><a href="<API key>.html">Demo App</a></li> </ul> </li> <li class="subfolders"> <a href="#">Server Chat API</a> <ul> <li class="thirdlevel"><a href="<API key>.html">Getting Started</a></li> <li class="thirdlevel"><a href="<API key>.html">Methods</a></li> <li class="thirdlevel"><a href="<API key>.html">Retrieve Availability</a></li> <li class="thirdlevel"><a href="<API key>.html">Retrieve Available Slots</a></li> <li class="thirdlevel"><a href="<API key>.html">Retrieve Estimated Wait Time</a></li> <li class="thirdlevel"><a href="<API key>.html">Retrieve an Offline Survey</a></li> <li class="thirdlevel"><a href="<API key>.html">Start a Chat</a></li> <li class="thirdlevel"><a href="<API key>.html">Retrieve Chat Resources, Events and Information</a></li> <li class="thirdlevel"><a href="<API key>.html">Retrieve Chat Events</a></li> <li class="thirdlevel"><a href="<API key>.html">Add Lines / End Chat</a></li> <li class="thirdlevel"><a href="<API key>.html">Retrieve Chat Information</a></li> <li class="thirdlevel"><a href="<API key>.html">Retrieve the Visitor's Name</a></li> <li class="thirdlevel"><a href="<API key>.html">Set the Visitor's Name</a></li> <li class="thirdlevel"><a href="<API key>.html">Retrieve the Agent's Typing Status</a></li> <li class="thirdlevel"><a href="<API key>.html">Retrieve the Visitor's Typing Status</a></li> <li class="thirdlevel"><a href="<API key>.html">Set the Visitor's Typing Status</a></li> <li class="thirdlevel"><a href="<API key>.html">Retrieve Exit Survey Structure</a></li> <li class="thirdlevel"><a href="<API key>.html">Submit Survey Data</a></li> <li class="thirdlevel"><a href="<API key>.html">Send a Transcript</a></li> <li class="thirdlevel"><a href="<API key>.html">Sample Postman Collection</a></li> </ul> </li> <li class="subfolders"> <a href="#">Push Service API</a> <ul> <li class="thirdlevel"><a href="<API key>.html">Overview</a></li> <li class="thirdlevel"><a href="<API key>">TLS Authentication</a></li> <li class="thirdlevel"><a href="<API key>">HTTP Response Codes</a></li> <li class="thirdlevel"><a href="<API key>">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="<API key>.html">Quick Start</a></li> <li class="thirdlevel"><a href="<API key>.html">Advanced Configurations</a></li> <li class="thirdlevel"><a href="<API key>.html">Methods</a></li> <li class="thirdlevel"><a href="<API key>.html">initialize</a></li> <li class="thirdlevel"><a href="<API key>.html">showConversation</a></li> <li class="thirdlevel"><a href="<API key>.html">removeConversation</a></li> <li class="thirdlevel"><a href="<API key>.html">reconnect</a></li> <li class="thirdlevel"><a href="<API key>.html">toggleChatActions</a></li> <li class="thirdlevel"><a href="<API key>.html"><API key></a></li> <li class="thirdlevel"><a href="<API key>.html">markAsUrgent</a></li> <li class="thirdlevel"><a href="<API key>.html">isUrgent</a></li> <li class="thirdlevel"><a href="<API key>.html">dismissUrgent</a></li> <li class="thirdlevel"><a href="<API key>.html">resolveConversation</a></li> <li class="thirdlevel"><a href="<API key>.html">clearHistory</a></li> <li class="thirdlevel"><a href="<API key>.html">logout</a></li> <li class="thirdlevel"><a href="<API key>.html">destruct</a></li> <li class="thirdlevel"><a href="<API key>.html">handlePush</a></li> <li class="thirdlevel"><a href="<API key>.html"><API key></a></li> <li class="thirdlevel"><a href="<API key>.html">setUserProfile</a></li> <li class="thirdlevel"><a href="<API key>.html">getAssignedAgent</a></li> <li class="thirdlevel"><a href="<API key>.html">subscribeLogEvents</a></li> <li class="thirdlevel"><a href="<API key>.html">getSDKVersion</a></li> <li class="thirdlevel"><a href="<API key>.html"><API key></a></li> <li class="thirdlevel"><a href="<API key>.html"><API key></a></li> <li class="thirdlevel"><a href="<API key>.html"><API key></a></li> <li class="thirdlevel"><a href="<API key>.html">Interface and Class Definitions</a></li> <li class="thirdlevel"><a href="<API key>.html">Callbacks index</a></li> <li class="thirdlevel"><a href="<API key>.html">Configuring the SDK</a></li> <li class="thirdlevel"><a href="<API key>.html">Attributes</a></li> <li class="thirdlevel"><a href="<API key>.html">Deprecated Attributes</a></li> <li class="thirdlevel"><a href="<API key>.html">String localization in SDK</a></li> <li class="thirdlevel"><a href="<API key>.html">Localization Keys</a></li> <li class="thirdlevel"><a href="<API key>.html">Timestamps Formatting</a></li> <li class="thirdlevel"><a href="<API key>.html">OS Certificate Creation</a></li> <li class="thirdlevel"><a href="<API key>.html">CSAT UI Content</a></li> <li class="thirdlevel"><a href="<API key>.html">Photo Sharing (Beta)</a></li> <li class="thirdlevel"><a href="<API key>.html">Configuring Push Notifications</a></li> <li class="thirdlevel"><a href="<API key>.html">Open Source List</a></li> <li class="thirdlevel"><a href="<API key>.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="<API key>.html">Prerequisites</a></li> <li class="thirdlevel"><a href="<API key>.html">Step 1: Download and Unzip the SDK</a></li> <li class="thirdlevel"><a href="<API key>.html">Step 2: Configure project settings to connect LiveEngage SDK</a></li> <li class="thirdlevel"><a href="<API key>.html">Step 3: Code integration for basic deployment</a></li> <li class="thirdlevel"><a href="<API key>.html">SDK Initialization and Lifecycle</a></li> <li class="thirdlevel"><a href="<API key>.html">Authentication</a></li> <li class="thirdlevel"><a href="<API key>.html">Conversations Lifecycle</a></li> <li class="thirdlevel"><a href="<API key>.html">LivePerson Callbacks Interface</a></li> <li class="thirdlevel"><a href="<API key>.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="<API key>.html">initialize (Deprecated)</a></li> <li class="thirdlevel"><a href="<API key>.html">initialize (with SDK properties object)</a></li> <li class="thirdlevel"><a href="<API key>.html">showConversation</a></li> <li class="thirdlevel"><a href="<API key>.html">showConversation (with authentication support)</a></li> <li class="thirdlevel"><a href="<API key>.html">hideConversation</a></li> <li class="thirdlevel"><a href="<API key>.html"><API key></a></li> <li class="thirdlevel"><a href="<API key>.html"><API key> with authentication support</a></li> <li class="thirdlevel"><a href="android-reconnect.html">reconnect</a></li> <li class="thirdlevel"><a href="<API key>.html">setUserProfile</a></li> <li class="thirdlevel"><a href="<API key>.html">setUserProfile (Deprecated)</a></li> <li class="thirdlevel"><a href="<API key>.html">registerLPPusher</a></li> <li class="thirdlevel"><a href="<API key>.html">unregisterLPPusher</a></li> <li class="thirdlevel"><a href="android-handlepush.html">handlePush</a></li> <li class="thirdlevel"><a href="<API key>.html">getSDKVersion</a></li> <li class="thirdlevel"><a href="android-setcallback.html">setCallback</a></li> <li class="thirdlevel"><a href="<API key>.html">removeCallBack</a></li> <li class="thirdlevel"><a href="<API key>.html"><API key></a></li> <li class="thirdlevel"><a href="<API key>.html">checkAgentID</a></li> <li class="thirdlevel"><a href="android-markurgent.html"><API key></a></li> <li class="thirdlevel"><a href="android-marknormal.html"><API key></a></li> <li class="thirdlevel"><a href="android-checkurgent.html"><API key></a></li> <li class="thirdlevel"><a href="<API key>.html">resolveConversation</a></li> <li class="thirdlevel"><a href="android-shutdown.html">shutDown</a></li> <li class="thirdlevel"><a href="<API key>.html">shutDown (Deprecated)</a></li> <li class="thirdlevel"><a href="<API key>.html">clearHistory</a></li> <li class="thirdlevel"><a href="android-logout.html">logOut</a></li> <li class="thirdlevel"><a href="<API key>.html">Callbacks Index</a></li> <li class="thirdlevel"><a href="<API key>.html">Configuring the SDK</a></li> <li class="thirdlevel"><a href="android-attributes.html">Attributes</a></li> <li class="thirdlevel"><a href="<API key>.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="<API key>.html">Modifying Strings</a></li> <li class="thirdlevel"><a href="<API key>.html">Modifying Resources</a></li> <li class="thirdlevel"><a href="<API key>.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="<API key>.html">Photo Sharing - Beta</a></li> <li class="thirdlevel"><a href="<API key>.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="<API key>.html">Overview</a></li> <li class="thirdlevel"><a href="<API key>.html">Visit Information</a></li> </ul> </li> <li class="subfolders"> <a href="#">App Engagement API</a> <ul> <li class="thirdlevel"><a href="<API key>.html">Overview</a></li> <li class="thirdlevel"><a href="<API key>.html">Methods</a></li> <li class="thirdlevel"><a href="<API key>.html">Create Session</a></li> <li class="thirdlevel"><a href="<API key>.html">Update Session</a></li> </ul> </li> <li class="subfolders"> <a href="#">Engagement Attributes</a> <ul> <li class="thirdlevel"><a href="<API key>.html">Overview</a></li> <li class="thirdlevel"><a href="<API key>.html">Engagement Attributes</a></li> </ul> </li> <li class="subfolders"> <a href="#">IVR Engagement API</a> <ul> <li class="thirdlevel"><a href="<API key>.html">Overview</a></li> <li class="thirdlevel"><a href="<API key>.html">Methods</a></li> <li class="thirdlevel"><a href="<API key> engagement.html">External Engagement</a></li> </ul> </li> <li class="subfolders"> <a href="#">Validate Engagement</a> <ul> <li class="thirdlevel"><a href="<API key>.html">Overview</a></li> <li class="thirdlevel"><a href="<API key>.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="<API key>.html">Overview</a></li> <li class="thirdlevel"><a href="<API key>.html">Getting Started</a></li> <li class="thirdlevel"><a href="<API key>.html">Limitations</a></li> <li class="thirdlevel"><a href="<API key>.html">Configuration</a></li> <li class="thirdlevel"><a href="<API key>.html">How to use the SDK</a></li> <li class="thirdlevel"><a href="<API key>.html">Code Examples</a></li> <li class="thirdlevel"><a href="<API key>.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="<API key>.html">Overview</a></li> <li class="thirdlevel"><a href="<API key>.html">Getting Started</a></li> <li class="thirdlevel"><a href="<API key>.html">Limitations</a></li> <li class="thirdlevel"><a href="<API key>.html">How to use the SDK</a></li> <li class="thirdlevel"><a href="<API key>.html">Methods</a></li> <li class="thirdlevel"><a href="<API key>.html">Public Model Structure</a></li> <li class="thirdlevel"><a href="<API key>.html">Public Properties</a></li> <li class="thirdlevel"><a href="<API key>.html">Code Examples</a></li> </ul> </li> <li class="subfolders"> <a href="#">LivePerson Domain API</a> <ul> <li class="thirdlevel"><a href="<API key>.html">Domain API</a></li> </ul> </li> <li class="subfolders"> <a href="#">Login Service API</a> <ul> <li class="thirdlevel"><a href="<API key>.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="<API key>.html">Getting Started</a></li> <li class="thirdlevel"><a href="<API key>.html">Methods</a></li> <li class="thirdlevel"><a href="<API key>.html">Start Agent Session</a></li> <li class="thirdlevel"><a href="<API key>.html">Retrieve Current Availability</a></li> <li class="thirdlevel"><a href="<API key>.html">Set Agent Availability</a></li> <li class="thirdlevel"><a href="<API key>.html">Retrieve Available Agents</a></li> <li class="thirdlevel"><a href="<API key>.html">Retrieve Available Slots</a></li> <li class="thirdlevel"><a href="<API key>.html">Retrieve Agent Information</a></li> <li class="thirdlevel"><a href="<API key>.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="<API key>.html">Retrieve Chat Sessions</a></li> <li class="thirdlevel"><a href="<API key>.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="<API key>.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="<API key>.html">Retrieve Chat Information</a></li> <li class="thirdlevel"><a href="">Retrieve Visitor’s Name</a></li> <li class="thirdlevel"><a href="<API key>.html">Retrieve Agent's Typing Status</a></li> <li class="thirdlevel"><a href="<API key>.html">Set Agent’s Typing Status</a></li> <li class="thirdlevel"><a href="<API key>.html">Retrieve Visitor's Typing Status</a></li> <li class="thirdlevel"><a href="<API key>.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="<API key>.html">Retrieve Agent Survey Structure</a></li> </ul> </li> <li class="subfolders"> <a href="#">Messaging Agent SDK</a> <ul> <li class="thirdlevel"><a href="<API key>.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="<API key>.html">Overview</a></li> <li class="thirdlevel"><a href="<API key>.html">Architecture</a></li> <li class="thirdlevel"><a href="<API key>.html">Methods</a></li> <li class="thirdlevel"><a href="<API key>.html">Base Resource</a></li> <li class="thirdlevel"><a href="<API key>.html">Agent Activity</a></li> <li class="thirdlevel"><a href="<API key>.html">Web Session</a></li> <li class="thirdlevel"><a href="<API key>.html">Engagement</a></li> <li class="thirdlevel"><a href="<API key>.html">Survey</a></li> <li class="thirdlevel"><a href="<API key>.html">Schema</a></li> <li class="thirdlevel"><a href="<API key>.html">Appendix</a></li> </ul> </li> <li class="subfolders"> <a href="#">Messaging Operations API</a> <ul> <li class="thirdlevel"><a href="<API key>.html">Overview</a></li> <li class="thirdlevel"><a href="<API key>.html">Methods</a></li> <li class="thirdlevel"><a href="<API key>.html">Messaging Conversation</a></li> <li class="thirdlevel"><a href="<API key>.html">Messaging CSAT Distribution</a></li> <li class="thirdlevel"><a href="<API key>.html">Appendix</a></li> </ul> </li> <li class="subfolders"> <a href="#">Messaging Interactions API (Beta)</a> <ul> <li class="thirdlevel"><a href="<API key>.html">Overview</a></li> <li class="thirdlevel"><a href="<API key>.html">Methods</a></li> <li class="thirdlevel"><a href="<API key>.html">Conversations</a></li> <li class="thirdlevel"><a href="<API key>.html">Get conversation by conversation ID</a></li> <li class="thirdlevel"><a href="<API key>.html">Get Conversations by Consumer ID</a></li> <li class="thirdlevel"><a href="<API key>.html">Sample Code</a></li> <li class="thirdlevel"><a href="<API key>.html">Appendix</a></li> </ul> </li> <li class="subfolders"> <a href="#">Engagement History API</a> <ul> <li class="thirdlevel"><a href="<API key>.html">Overview</a></li> <li class="thirdlevel"><a href="<API key>.html">Methods</a></li> <li class="thirdlevel"><a href="<API key>.html">Retrieve Engagement List by Criteria</a></li> <li class="thirdlevel"><a href="<API key>.html">Sample Code</a></li> <li class="thirdlevel"><a href="<API key>.html">Appendix</a></li> </ul> </li> <li class="subfolders"> <a href="#">Operational Real-time API</a> <ul> <li class="thirdlevel"><a href="<API key>.html">Overview</a></li> <li class="thirdlevel"><a href="<API key>.html">Methods</a></li> <li class="thirdlevel"><a href="<API key>.html">Queue Health</a></li> <li class="thirdlevel"><a href="<API key>.html">Engagement Activity</a></li> <li class="thirdlevel"><a href="<API key>.html">Agent Activity</a></li> <li class="thirdlevel"><a href="<API key>.html">Current Queue State</a></li> <li class="thirdlevel"><a href="<API key>.html">SLA Histogram</a></li> <li class="thirdlevel"><a href="<API key>.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="<API key>.html">Overview</a></li> <li class="thirdlevel"><a href="<API key>.html">How to use these Events</a></li> <li class="thirdlevel"><a href="<API key>.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="<API key>.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="<API key>.html">Home</a></li> <li class="thirdlevel"><a href="<API key>.html">Protocol Overview</a></li> <li class="thirdlevel"><a href="<API key>.html">Getting Started</a></li> </ul> </li> <li class="subfolders"> <a href="#">Tutorials</a> <ul> <li class="thirdlevel"><a href="<API key>.html">Get Messages</a></li> <li class="thirdlevel"><a href="<API key>.html">Conversation Metadata</a></li> <li class="thirdlevel"><a href="<API key>.html">Read/Accept events</a></li> <li class="thirdlevel"><a href="<API key>.html">Authentication</a></li> <li class="thirdlevel"><a href="<API key>.html">Agent Profile</a></li> <li class="thirdlevel"><a href="<API key>.html">Post Conversation Survey</a></li> <li class="thirdlevel"><a href="<API key>.html">Client Properties</a></li> <li class="thirdlevel"><a href="<API key>.html">Avoid Webqasocket Headers</a></li> </ul> </li> <li class="subfolders"> <a href="#">Samples</a> <ul> <li class="thirdlevel"><a href="<API key>.html">JavaScript Messenger</a></li> </ul> </li> <li class="subfolders"> <a href="#">API Reference</a> <ul> <li class="thirdlevel"><a href="<API key>.html">Overview</a></li> <li class="thirdlevel"><a href="<API key>.html">Request Builder</a></li> <li class="thirdlevel"><a href="<API key>.html">Response Builder</a></li> <li class="thirdlevel"><a href="<API key>.html">Notification Builder</a></li> <li class="thirdlevel"><a href="<API key>.html">New Conversation</a></li> <li class="thirdlevel"><a href="<API key>.html">Close Conversation</a></li> <li class="thirdlevel"><a href="<API key>.html">Urgent Conversation</a></li> <li class="thirdlevel"><a href="<API key>.html">Update CSAT</a></li> <li class="thirdlevel"><a href="<API key>.html">Subscribe Conversations Metadata</a></li> <li class="thirdlevel"><a href="<API key>.html">Unsubscribe Conversations Metadata</a></li> <li class="thirdlevel"><a href="<API key>.html">Publish Content</a></li> <li class="active thirdlevel"><a href="<API key>.html">Subscribe Conversation Content</a></li> <li class="thirdlevel"><a href="<API key>.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 <API key>" 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="<API key>"></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.<API key>","id":"2SA2","body":{"fromSeq":0,"dialogId":"<API key>"}}, <API key>: false, disable_edit_json: true, <API key>: 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('<API key>'); // 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 <API key>" 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="<API key>"></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/<API key>.json">assets/schema/types/<API key>.json</a></p> <script src="assets/js/jsoneditor.js"></script> <script> var resp_editor; $.getJSON( "assets/schema/types/<API key>.json" , function( data ) { const fullpath = "assets/schema/types/<API key>.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 }, <API key>: false, disable_edit_json: true, <API key>: 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('<API key>'); // 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 <API key>" 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="<API key>"></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/<API key>.json">assets/schema/ws/<API key>.json</a></p> <script src="assets/js/jsoneditor.js"></script> <script> var notif_editor; $.getJSON( "assets/schema/ws/<API key>.json" , function( data ) { const fullpath = "assets/schema/ws/<API key>.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.<API key>","kind":"notification","body":{"changes":[{"sequence":0,"originatorId":"<API key>","serverTimestamp":1477840831162,"event":{"type":"ContentEvent","message":"message from the agent","contentType":"text/plain"},"dialogId":"<API key>"}]}}, <API key>: false, disable_edit_json: true, <API key>: 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('<API key>'); // 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>
<?php namespace Sellsy\Tests\Sellsy\Criteria; use Sellsy\Criteria\CriteriaInterface; use Sellsy\Criteria\EmptyCriteria; /** * Class EmptyCriteriaTest * * @package Sellsy\Tests\Sellsy\Criteria */ class EmptyCriteriaTest extends \<API key> { /** * @return EmptyCriteria */ public function <API key>() { $criteria = new EmptyCriteria(); $this->assertInstanceOf(CriteriaInterface::class, $criteria); return $criteria; } /** * @param EmptyCriteria $criteria * @return EmptyCriteria * * @depends <API key> * @covers Sellsy\Criteria\EmptyCriteria::getParameters */ public function <API key>(EmptyCriteria $criteria) { $this->assertInternalType('array', $criteria->getParameters()); return $criteria; } /** * @param EmptyCriteria $criteria * @return void * * @depends <API key> * @covers Sellsy\Criteria\EmptyCriteria::getParameters */ public function <API key>(EmptyCriteria $criteria) { $this->assertEquals(0, count($criteria->getParameters())); } }
public class <API key> { 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) { <API key> r = new <API key>(); String str = "I am a Students."; r.reverseSequence(str); } } public class <API key> { 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) { <API key> r = new <API key>(); String str = "i am a students."; System.out.print(r.reverseSequence(str)); } }
<?php class <API key> 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 ; } }
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); } });
/* 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 }) ] }));
/** * 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;
<!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="<API key>"> <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="<API key>" checked /> <label class="tsd-widget" for="<API key>">Inherited</label> <input type="checkbox" id="<API key>" checked /> <label class="tsd-widget" for="<API key>">Externals</label> <input type="checkbox" id="<API key>" /> <label class="tsd-widget" for="<API key>">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 <API key>"><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 <API key>"> <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="<API key>">:</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 <API key>"> <a href="_sendtabletypes_.ctearmorricochet.html" class="tsd-kind-icon">CTEArmor<wbr>Ricochet</a> <ul> <li class=" tsd-kind-property <API key>"> <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="<API key>"><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 <API key>"><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 <API key>"><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 <API key>"><span class="tsd-kind-icon">Interface with type parameter</span></li> <li class="tsd-kind-property <API key>"><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 <API key>"><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>
(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= 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.<API key>?d.<API key>(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.<API key>(),!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:"<API key>",headerSelected:"<API key>"},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("<API key> 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(".<API key>").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("<API key>");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 <API key> 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 <API key> <API key> <API key> 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"]("<API key> 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("<API key>"))}}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("<API key>");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("<API key>");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("<API key>").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("<API key>").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("<API key>");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("<API key>")},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","<API key>":"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.<API key>();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.<API key>())});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()},<API key>: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("<API key>");(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("<API key>");this.buttonElement.removeClass("ui-button ui-widget ui-state-default ui-corner-all ui-state-hover ui-state-active <API key> ui-button-icon-only <API key> <API key> <API key> 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("<API key> ui-button-icon-only <API key> <API key> <API key> 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='<API key> ui-icon "+e.primary+"'></span>"),e.secondary&&a.append("<span class='<API key> ui-icon "+e.secondary+"'></span>"),this.options.text||(h.push(f?"<API key>": "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="<API key>";this._appendClass="<API key>";this._triggerClass="<API key>";this._dialogClass="<API key>";this._disableClass="<API key>";this._unselectableClass="<API key>";this._currentClass="<API key>";this._dayOverClass= "<API key>";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,<API key>:!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, .<API key> td a");a.length&&a.removeClass("ui-state-hover <API key> <API key>")}).bind("mouseover",function(b){b=d(b.target).closest("button, .ui-datepicker-prev, .ui-datepicker-next, .<API key> td a");if(!d.datepicker.<API key>(g.inline?a.parent()[0]:g.input[0])&&b.length)b.parents(".<API key>").find("a").removeClass("ui-state-hover"),b.addClass("ui-state-hover"), b.hasClass("ui-datepicker-prev")&&b.addClass("<API key>"),b.hasClass("ui-datepicker-next")&&b.addClass("<API key>")})}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}},<API key>: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.<API key>(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("<API key> <API key> <API key>").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(".<API key>")},_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.<API key>(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.<API key>(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.<API key>(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.<API key>(b)}, <API key>: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.<API key>(new Date(a.currentYear,a.currentMonth,a.currentDay))},_generateHTML:function(a){var b=new Date,b=this.<API key>(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,"<API key>"),p=this._getNumberOfMonths(a),n=this._get(a,"showCurrentAtPos"),r=this._get(a, "stepMonths"),u=p[0]!=1||p[1]!=1,x=this.<API key>(!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.<API key>(new Date(w.getFullYear(),w.getMonth()-p[0]*p[1]+1,w.getDate())),v=q&&v<q?q:v;this.<API key>(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.<API key>(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 <API key>-'+(e?"e":"w")+'">'+v+"</span></a>":g?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+v+'"><span class="ui-icon <API key>-'+(e?"e":"w")+'">'+v+"</span></a>", z=this._get(a,"nextText"),z=!o?z:this.formatDate(z,this.<API key>(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 <API key>-'+(e?"w":"e")+'">'+z+"</span></a>":g?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+z+'"><span class="ui-icon <API key>-'+ (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="<API key> ui-widget-content">'+(e?o:"")+(this._isInRange(a,z)?'<button type="button" class="<API key> ui-state-default <API key> 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.<API key>(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+=" <API key>";A=" ui-corner-"+(e?"right":"left");break;case p[1]-1:D+=" <API key>";A=" ui-corner-"+(e?"left":"right");break;default:D+=" <API key>",A=""}D+='">'}D+='<div class="<API key> 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.<API key>(a,n,s,q,w,H>0||I>0,F,B)+'</div><table class="<API key>"><thead><tr>';for(var E=r?'<th class="<API key>">'+this._get(a,"weekHeader")+"</th>":"",A=0;A<7;A++){var y=(A+o)%7;E+="<th"+((A+o+6)%7>=5?' class="<API key>"':"")+'><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.<API key>(new Date(s,n,1-A)),R=0;R<E;R++){D+="<tr>";for(var S=!r?"":'<td class="<API key>">'+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?" <API key>":"")+(G?" <API key>":"")+(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?" <API key>":"")+'" href="#">'+y.getDate()+"</a>")+"</td>";y.setDate(y.getDate()+1);y=this.<API key>(y)}D+=S+"</tr>"}n++;n>11&&(n=0,s++);D+="</tbody></table>"+(u?"</div>"+(p[0]>0&&I==p[1]-1?'<div class="<API key>"></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},<API key>: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(' (b=="M"?d:0),d=Math.min(a.selectedDay,this._getDaysInMonth(e,f))+(b=="D"?d:0),e=this._restrictMinMax(a,this.<API key>(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.<API key>(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.<API key>(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.<API key>(new Date(e,b,d)):this.<API key>(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("<API key> 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.<API key>=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(".<API key> :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("<API key> ui-widget-content ui-helper-clearfix"),k=d("<div></div>").addClass("ui-dialog-buttonset").appendTo(j);b.uiDialog.find(".<API key>").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, .<API key>", 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 <API key>")},_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.<API key>.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("<API key>");this._mouseInit()},destroy:function(){if(this.element.data("draggable"))return this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable <API key> <API key>"),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="<API key>" 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.<API key>();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.<API key>(b.cursorAt);b.containment&&this._setContainment();if(this._trigger("start",a)===!1)return this._clear(),!1;this.<API key>();d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.helper.addClass("<API key>");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.<API key>").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(".<API key>")?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},<API key>: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}},<API key>: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("<API key>");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 <API key>").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(".<API key>").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:"<API key>",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:"<API key>",headerIcon:"<API key>",slideRIconClpsd:"<API key>",slideRIcon:"<API key>",slideLIconClpsd:"<API key>",slideLIcon:"<API key>"},_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: 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='<API key> 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,<API key>:[], _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.<API key>.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this.<API key>();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 <API key>");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.<API key>()}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("<API key>").hover(function(){b.disabled||(d(this).removeClass("<API key>"),a._handles.show())},function(){!b.disabled&&!a.resizing&&(d(this).addClass("<API key>"),a._handles.hide())}));this._mouseInit()},destroy:function(){this._mouseDestroy();var a=function(a){d(a).removeClass("ui-resizable <API key> <API key>").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.<API key>={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("<API key>");this._propagate("start",b);return!0},_mouseDrag:function(a){var d=this.helper,b=this.<API key>,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.<API key>(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.<API key>.length&&this.<API key>();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.<API key>,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.<API key>()}d("body").css("cursor","auto"); this.element.removeClass("<API key>");this._propagate("stop",a);this._helper&&this.helper.remove();return!1},<API key>: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},<API key>:function(){if(this.<API key>.length)for(var a=this.helper||this.element,b=0;b<this.<API key>.length;b++){var h= this.<API key>[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("<API key>",{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("<API key>"),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.<API key>=!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("<API key>").position})})}; if(a.<API key>)a.<API key>=!1,typeof b.alsoResize=="object"&&!b.alsoResize.nodeType?d.each(b.alsoResize,function(a){h(a)}):h(b.alsoResize);d(this).removeData("<API key>")}});d.ui.plugin.add("resizable","animate",{stop:function(a){var b=d(this).data("resizable"),h=b.options,g=b.<API key>,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='<API key>'></div>")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable <API key>").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("<API key>",h).toggleClass("<API key>",!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("<API key>",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("<API key>", 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=' 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 <API key> 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("<API key> 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,<API key>:!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 <API key>").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var a=this.items.length-1;a>=0;a b,this.widget()[b?"addClass":"removeClass"]("<API key>")):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.<API key>();return!0},_mouseStart:function(a,b,e){b=this.options;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(a);this.<API key>();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.<API key>(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.<API key>||this.<API key>();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.<API key>(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.<API key>(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.<API key>||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},<API key>: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.<API key>(),e=this.<API key>();return!b?!1:this.floating?e&&e=="right"||a=="down"?2:1:a&&(a=="down"?2:1)},<API key>: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.<API key>(),f=this.<API key>();return this.floating&&f?f=="right"&&a||f=="left"&&!a:e&&(e=="down"&&b||e=="up"&&!b)},<API key>:function(){var a=this.positionAbs.top-this.lastPositionAbs.top;return a!=0&&(a>0?"down":"up")},<API key>: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(".<API key>"),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(".<API key>"),this]);for(a=e.length-1;a>=0;a--)e[a][0].each(function(){b.push(this)});return d(b)},<API key>: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+" <API key>").removeClass("ui-sortable-helper")[0];if(!f)a.style.visibility="hidden";return a},update:function(a,d){if(!f||e.<API key>)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 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},<API key>: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}},<API key>: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=/^ (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=/ "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);
""" 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 *
/* eslint-disable func-names */ const { sampleUrls, shortSampleUrls, E2E_WAIT_TIME: WAIT_TIME, <API key>: PRESENT_WAIT_TIME } = require('../e2e_helper'); module.exports = { after(browser) { browser.end(); }, 'Go to top page': browser => { browser.page.index().navigate().<API key>('body', PRESENT_WAIT_TIME); }, 'Add musics': browser => { browser.page .index() .log('add musics') .setValue('@trackUrlField', sampleUrls.join(',')) .submitForm('@trackSubmitButton') .<API key>('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') .<API key>('@pauseButton', PRESENT_WAIT_TIME) .assert.elementPresent('@pauseButton') .assert.hasPlaylistLength(5) .assert.<API key>(1) .assert.currentTitleEquals(1) .api.pause(WAIT_TIME); }, 'Play next music': browser => { browser.page .index() .click('@nextButton') .<API key>('a.playlist-content:nth-child(5)', PRESENT_WAIT_TIME) // dequeue .assert.elementPresent('@pauseButton') .assert.hasPlaylistLength(4) .assert.<API key>(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') .<API key>('@playButton', PRESENT_WAIT_TIME) .assert.elementPresent('@playButton') .assert.hasPlaylistLength(4) .assert.<API key>(1) .assert.title('jukebox') .api.pause(WAIT_TIME); }, 'Play specified music': browser => { browser.page .index() .click('a.playlist-content:nth-child(3)') .<API key>('@pauseButton', PRESENT_WAIT_TIME) .assert.elementPresent('@pauseButton') .assert.hasPlaylistLength(4) .assert.<API key>(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]') .<API key>('@playButton', PRESENT_WAIT_TIME) .assert.elementPresent('@playButton') .assert.hasPlaylistLength(3) .assert.<API key>(3) .assert.title('jukebox') .api.pause(WAIT_TIME); }, 'Add short music': browser => { browser.page .index() .setValue('@trackUrlField', shortSampleUrls[0]) .submitForm('@trackSubmitButton') .<API key>('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)') .<API key>('@pauseButton', PRESENT_WAIT_TIME); }, 'Wait till end': browser => { browser.page .index() .<API key>( '.playlist-content:nth-child(4) .thumbnail-wrapper i', PRESENT_WAIT_TIME ) .assert.elementPresent('@playButton') .assert.hasPlaylistLength(3); }, 'Clear playlist': browser => { browser.page .index() .click('@<API key>') .<API key>('@clearModal', PRESENT_WAIT_TIME) .click('@clearButton') .<API key>('a.playlist-content', PRESENT_WAIT_TIME) .assert.hasPlaylistLength(0) .api.pause(WAIT_TIME); } };
#!/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
<?php 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} } ';
using System; using Windows.UI.Xaml; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace ManagedUnitTests { public static class TestUtilities { <summary> Handles the difference between <API key> in managed and native. </summary> public static void <API key>(Action action) { Assert.ThrowsException<<API key>>(action); } public static void <API key>(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."); } } }
<?php namespace <API key>\__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 <API key> * @throws <API key> */ 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\<API key>) { $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; <API key>(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\<API key> */ 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-><API key>(); * $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 <API key>() { return $this->delegate-><API key>(); } /** * 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 <API key> 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\<API key> 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 <API key>($name) { return $this->delegate-><API key>($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; } }
<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 * Merge pull request * 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 <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 * Merge pull request * 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 [ * 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 <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 <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 <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 * 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 ( * Fix * 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 * 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 * 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 * first approach of posts ([c33125d](https://github.com/kikobeats/uno-zen/commit/c33125d)) * fixed * 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 * Merge pull request * Merge pull request * 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 * Merge pull request * Merge pull request * 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 * Adjusted aside behavior ([f46c266](https://github.com/kikobeats/uno-zen/commit/f46c266)) * compare operator ([65a3549](https://github.com/kikobeats/uno-zen/commit/65a3549)) * Fixed * 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 * Merge pull request * 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 * Fixed * fixed * 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 * Merge pull request * 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 * Fixes * 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 * 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 * Fixed * Fixes * 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 * 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 * 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 * 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 * 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 <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 * 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))
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);
#! /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 }) }
# -*- 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 <API key>(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 <API key>("No file extension found in filename. That's not okay!") if not extension.lower() in map(lambda x: x.lower(), settings.FILE_EXTENSIONS): raise <API key>("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 <API key>("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.<API key>: 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.<API key>.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)
<!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 <API key> 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=<API key>&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/<API key>.vo</code></li> <li>236 K <code>../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/DepMap/<API key>.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/<API key>.glob</code></li> <li>111 K <code>../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/DepMap/<API key>.vo</code></li> <li>97 K <code>../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/DepMap/<API key>.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/<API key>.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/<API key>.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/<API key>.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/<API key>.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: </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>
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 <API key> extends ScreenManager { private Maze maze = new Maze(); public <API key>(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); } } } }
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
<?php namespace PandaGroup\StoreLocator\Controller\Adminhtml\Index; use Magento\Framework\Exception\LocalizedException; class Save extends \Magento\Backend\App\Action { /** @var \Magento\Framework\App\Request\<API key> */ 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\<API key> $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-><API key>->create(); $data = $this->getRequest()->getPostValue(); if ($data) { $this->logger->info('Start saving new store/edit exist store.'); $id = (int) $this->getRequest()->getParam('id'); $<API key> = $this->getRequest()->getPostValue('state_source_id'); $<API key> = $this->regionsData->load($<API key>)->getData('name'); if (true === empty($<API key>)) { // Empty names of countries states which aren't any states $<API key> = $data['country']; } $<API key> = $this->states->addNewRegion( $<API key>, $<API key>, '', $data['country'] ); $data['state_id'] = $<API key>; /** @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['<API key>'] = $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['<API key>'] = $data['wednesday_open']; $data['<API key>'] = $data['wednesday_open']; $data['thursday_open_break'] = $data['thursday_open']; $data['<API key>'] = $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['<API key>'] = $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; } }