code
stringlengths
3
1.01M
repo_name
stringlengths
5
116
path
stringlengths
3
311
language
stringclasses
30 values
license
stringclasses
15 values
size
int64
3
1.01M
/* * Phamhilator. A .Net based bot network catching spam/low quality posts for Stack Exchange. * Copyright © 2015, ArcticEcho. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ using System; using System.Text.RegularExpressions; namespace Phamhilator.Updater { public struct Version { private static Regex formatCheck = new Regex(@"^\d+\.\d+\.\d+\.\d+$", RegexOptions.Compiled | RegexOptions.CultureInvariant); public int Major { get; private set; } public int Minor { get; private set; } public int Build { get; private set; } public int Patch { get; private set; } public Version(string version) { if (string.IsNullOrWhiteSpace(version)) throw new ArgumentException("'version' cannot be null or empty.", "version"); if (!formatCheck.IsMatch(version)) throw new ArgumentException("'version' is not of a supported format.", "version"); var split = version.Split('.'); Major = int.Parse(split[0]); Minor = int.Parse(split[1]); Build = int.Parse(split[2]); Patch = int.Parse(split[3]); } public static bool MatchesFormat(string version) { return !string.IsNullOrWhiteSpace(version) && formatCheck.IsMatch(version); } public override int GetHashCode() { return Build.GetHashCode(); } public override bool Equals(object obj) { if (obj == null) return false; var ver = obj as Version?; if (ver == null) return false; return ver == this; } public override string ToString() { return $"{Major}.{Minor}.{Build}.{Patch}"; } public static bool operator ==(Version x, Version y) { return x.Major == y.Major && x.Minor == y.Minor && x.Patch == y.Patch; } public static bool operator !=(Version x, Version y) { return x.Major != y.Major && x.Minor != y.Minor && x.Patch != y.Patch; } public static bool operator >(Version x, Version y) { return x.Build > y.Build; } public static bool operator <(Version x, Version y) { return x.Build < y.Build; } } }
ArcticEcho/Phamhilator
Updater/Version.cs
C#
gpl-3.0
2,956
<html> <head> <meta charset="utf-8"/> </head> <body> <textarea rows="4" cols="50" id="textbox">314,west 34 street,manhattan</textarea> <button type="button" id="my-button">Geocode!</button> <script type="text/javascript" src="out/main.js"></script> </body> </html
aepyornis/nyc-geocoder
index.html
HTML
gpl-3.0
303
package org.exreco.liff.core; import java.util.LinkedList; import java.util.List; public class Cell { private List<Replicator> replicators = new LinkedList<Replicator>(); public List<Replicator> getReplicators() { return replicators; } public void setReplicators(List<Replicator> replicators) { this.replicators = replicators; } }
bekisz/exreco
src/main/java/org/exreco/liff/core/Cell.java
Java
gpl-3.0
349
/*********************************************************************** Copyright (c) 2012 "Marco Gulino <marco.gulino@gmail.com>" This file is part of Touché: https://github.com/rockman81/Touche Touché is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details (included the COPYING file). You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. ***********************************************************************/ #include "EditProfiles.h" #include "touchecore.h" #include <QSettings> #include <QVBoxLayout> #include <KEditListBox> #include <QApplication> #include <QLabel> #include <QDebug> EditProfiles::EditProfiles(ToucheCore *core, QSettings *settings, QWidget *parent) : QWidget(parent), settings(settings) { QVBoxLayout *vlayout = new QVBoxLayout(this); // setCaption(QString("%1 profiles").arg(i18n(Touche::displayName() ))); profilesList = new KEditListBox(); vlayout->addWidget(new QLabel(i18n("You can add new profiles here.\nEach profile will have its own key bindings."))); vlayout->addWidget(profilesList); profilesList->setButtons(KEditListBox::Add | KEditListBox::Remove); profilesList->insertStringList(core->availableProfiles()); } void EditProfiles::accept() { qDebug() << "Saving profiles list..."; foreach(QString profile, settings->childGroups()) { if(!profile.startsWith("bindings_")) continue; if(profilesList->items().contains(QString(profile).replace("bindings_", ""))) continue; settings->beginGroup(profile); settings->remove(""); settings->endGroup(); } foreach(QString profile, profilesList->items()) { if(settings->childGroups().contains(QString("bindings_%1").arg(profile))) continue; settings->beginGroup(QString("bindings_%1").arg(profile)); settings->setValue("name", profile); settings->endGroup(); } settings->sync(); }
GuLinux/Touche
GUI/EditProfiles.cpp
C++
gpl-3.0
2,382
# -*-coding: utf-8-*- import logging from pyramid.view import view_config, view_defaults from pyramid.httpexceptions import HTTPFound from . import BaseView from ..models import DBSession from ..models.account_item import AccountItem from ..lib.bl.subscriptions import subscribe_resource from ..lib.utils.common_utils import translate as _ from ..forms.accounts_items import ( AccountItemForm, AccountItemSearchForm ) from ..lib.events.resources import ( ResourceCreated, ResourceChanged, ResourceDeleted, ) log = logging.getLogger(__name__) @view_defaults( context='..resources.accounts_items.AccountsItemsResource', ) class AccountsItemsView(BaseView): @view_config( request_method='GET', renderer='travelcrm:templates/accounts_items/index.mako', permission='view' ) def index(self): return { 'title': self._get_title(), } @view_config( name='list', xhr='True', request_method='POST', renderer='json', permission='view' ) def list(self): form = AccountItemSearchForm(self.request, self.context) form.validate() qb = form.submit() return qb.get_serialized() @view_config( name='view', request_method='GET', renderer='travelcrm:templates/accounts_items/form.mako', permission='view' ) def view(self): if self.request.params.get('rid'): resource_id = self.request.params.get('rid') account_item = AccountItem.by_resource_id(resource_id) return HTTPFound( location=self.request.resource_url( self.context, 'view', query={'id': account_item.id} ) ) result = self.edit() result.update({ 'title': self._get_title(_(u'View')), 'readonly': True, }) return result @view_config( name='add', request_method='GET', renderer='travelcrm:templates/accounts_items/form.mako', permission='add' ) def add(self): return { 'title': self._get_title(_(u'Add')), } @view_config( name='add', request_method='POST', renderer='json', permission='add' ) def _add(self): form = AccountItemForm(self.request) if form.validate(): account_item = form.submit() DBSession.add(account_item) DBSession.flush() event = ResourceCreated(self.request, account_item) event.registry() return { 'success_message': _(u'Saved'), 'response': account_item.id } else: return { 'error_message': _(u'Please, check errors'), 'errors': form.errors } @view_config( name='edit', request_method='GET', renderer='travelcrm:templates/accounts_items/form.mako', permission='edit' ) def edit(self): account_item = AccountItem.get(self.request.params.get('id')) return { 'item': account_item, 'title': self._get_title(_(u'Edit')), } @view_config( name='edit', request_method='POST', renderer='json', permission='edit' ) def _edit(self): account_item = AccountItem.get(self.request.params.get('id')) form = AccountItemForm(self.request) if form.validate(): form.submit(account_item) event = ResourceChanged(self.request, account_item) event.registry() return { 'success_message': _(u'Saved'), 'response': account_item.id } else: return { 'error_message': _(u'Please, check errors'), 'errors': form.errors } @view_config( name='copy', request_method='GET', renderer='travelcrm:templates/accounts_items/form.mako', permission='add' ) def copy(self): account_item = AccountItem.get_copy(self.request.params.get('id')) return { 'action': self.request.path_url, 'item': account_item, 'title': self._get_title(_(u'Copy')), } @view_config( name='copy', request_method='POST', renderer='json', permission='add' ) def _copy(self): return self._add() @view_config( name='delete', request_method='GET', renderer='travelcrm:templates/accounts_items/delete.mako', permission='delete' ) def delete(self): return { 'title': self._get_title(_(u'Delete')), 'rid': self.request.params.get('rid') } @view_config( name='delete', request_method='POST', renderer='json', permission='delete' ) def _delete(self): errors = False ids = self.request.params.getall('id') if ids: try: items = DBSession.query(AccountItem).filter( AccountItem.id.in_(ids) ) for item in items: DBSession.delete(item) event = ResourceDeleted(self.request, item) event.registry() DBSession.flush() except: errors=True DBSession.rollback() if errors: return { 'error_message': _( u'Some objects could not be delete' ), } return {'success_message': _(u'Deleted')} @view_config( name='subscribe', request_method='GET', renderer='travelcrm:templates/accounts_items/subscribe.mako', permission='view' ) def subscribe(self): return { 'id': self.request.params.get('id'), 'title': self._get_title(_(u'Subscribe')), } @view_config( name='subscribe', request_method='POST', renderer='json', permission='view' ) def _subscribe(self): ids = self.request.params.getall('id') for id in ids: account_item = AccountItem.get(id) subscribe_resource(self.request, account_item.resource) return { 'success_message': _(u'Subscribed'), }
mazvv/travelcrm
travelcrm/views/accounts_items.py
Python
gpl-3.0
6,534
<?php if(!isset($nojs) || !$nojs) require('funcwm.php'); if(!$is_connected) exit('<div id=notcon>Vous devez être connecté pour accéder au contenu de cette page</div>'); ?> <div id=ctn-trade> <h1><i class="fa fa-building"></i> Bureau des échanges</h1> <h4><i class="fa fa-exchange"></i> Consultez la <a class="faq white" href="/faq">FAQ</a> pour la description des services ci-dessous</h4> <table> <tr> <td><div id="ba27" class="groupe-4" data-gr="4" data-title="<span class=substy>Premier contact</span><br>Tout le monde y passe.<br><i class=listl>niveau 5</i>"><i class="fa fa-male"></i> Approuvé</div></td> <td><div id="ba11" class="groupe-8" data-gr="8" data-title="<span class=substy>Café poster</span><br>En permanence dans le café<br><i class=listl>niveau 4</i>"><i class="fa fa-weixin"></i> Citoyen</div></td> <td><i class="fa fa-recycle"></i> Nouveau pseudo</td> </tr> <tr> <td><i class="fa fa-trophy"></i> 5 points</td> <td><i class="fa fa-trophy"></i> 10 points</td> <td><i class="fa fa-trophy"></i> Prochainement</td> </tr> <tr> <td class="send-trade ck">Echanger</td> <td class="send-trade cy">Echanger</td> <td class=send-trade>Echanger</td> </tr> <tr class=td-cc> <td> <div class="hide ctn-ck"> <input type="text" name="trade-ck" class=trade-ck placeholder="Pseudo..."> <input type="submit" name="sbm-ck" class=sbm-ck value="Confirmer"> </div> </td> <td> <div class="hide ctn-cy"> <p class=trade-cy>Assigner le badge Citoyen à votre compte ?</p> <input type="submit" name="sbm-cy" class=sbm-cy value="Confirmer"> </div> </td> </tr> </table> </div>
Anyon3/ninjacms
php/trade.php
PHP
gpl-3.0
1,697
/* * File: app/view/createBucketWindow.js * * This file was generated by Sencha Architect version 3.0.4. * http://www.sencha.com/products/architect/ * * This file requires use of the Ext JS 4.2.x library, under independent license. * License of Sencha Architect does not include license for Ext JS 4.2.x. For more * details see http://www.sencha.com/license or contact license@sencha.com. * * This file will be auto-generated each and everytime you save your project. * * Do NOT hand edit this file. */ Ext.define('MyApp.view.createBucketWindow', { extend: 'Ext.window.Window', alias: 'widget.createBucketWindow', requires: [ 'Ext.form.Panel', 'Ext.form.FieldSet', 'Ext.form.field.Text', 'Ext.toolbar.Toolbar', 'Ext.button.Button' ], height: 172, width: 400, resizable: false, layout: 'border', title: 'Create Bucket', modal: true, initComponent: function() { var me = this; Ext.applyIf(me, { items: [ { xtype: 'panel', region: 'center', id: 'createBucketTopPanel', itemId: 'createBucketTopPanel', items: [ { xtype: 'form', height: 156, id: 'createBucketFormPanel', itemId: 'createBucketFormPanel', bodyPadding: 10, items: [ { xtype: 'fieldset', padding: 10, title: 'Bucket Data ', items: [ { xtype: 'textfield', anchor: '100%', id: 'createBucketName', itemId: 'createBucketName', fieldLabel: 'Name', labelAlign: 'right', labelWidth: 54, name: 'bucketName', allowBlank: false, allowOnlyWhitespace: false, enforceMaxLength: true, maskRe: /[a-z0-9\-]/, maxLength: 32, regex: /[a-z0-9\-]/ } ] } ] } ], dockedItems: [ { xtype: 'toolbar', dock: 'bottom', id: 'createBucketToolbar', itemId: 'createBucketToolbar', layout: { type: 'hbox', pack: 'center' }, items: [ { xtype: 'button', handler: function(button, e) { objectConstants.me.createObjectBucket(); }, padding: '2 20 2 20', text: 'Ok' }, { xtype: 'button', handler: function(button, e) { var myForm = Ext.getCmp("createBucketFormPanel"); myForm.getForm().findField("createBucketName").setValue(''); }, padding: '2 12 2 12', text: 'Clear' } ] } ] } ] }); me.callParent(arguments); } });
OpenSourceConsulting/athena-peacock
console/app/view/createBucketWindow.js
JavaScript
gpl-3.0
4,523
<?php defined('SYSPATH') OR die('No direct access allowed.'); // DO NOT EDIT // This file is automatically generated from the matching PO file // Updates should be made through Transifex // I18n generated at: 2013-06-27 06:19+0000 // PO revision date: 2013-06-26 08:07+0000 $lang = array( 'incident_id' => array( 'required' => 'Controleer of er een keuze is aangevinkt', 'numeric' => 'Controleer of er een keuze is aangevinkt', 'categories_required' => 'Rapporten dienen aan een categorie te zijn toegekend alvorens ze kunnen worden goedgekeurd', ) , 'action' => array( 'permission' => 'Onvoldoende rechten om de handeling uit te voeren', ) , 'uploadfile' => array( 'required' => 'Selecteer een bestand om te uploaden', 'type' => 'Het formaat voor het te uploaden bestand moet .csv of .xml zijn', 'valid' => 'Er is geen geldig bestand opgegeven in het upload veld', ) , );
deyperez/ati
application/i18n/nl_NL/reports.php
PHP
gpl-3.0
894
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package gumga.framework.domain.domains; import java.util.Objects; /** * Representa um CNPJ * * @author munif */ public class GumgaCNPJ extends GumgaDomain { private String value; public GumgaCNPJ() { } public GumgaCNPJ(String value) { this.value = value; } public GumgaCNPJ(GumgaCNPJ other) { if (other != null) { this.value = other.value; } } public String getValue() { return value; } public void setValue(String value) { this.value = value; } @Override public int hashCode() { int hash = 3; hash = 89 * hash + Objects.hashCode(this.value); return hash; } @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final GumgaCNPJ other = (GumgaCNPJ) obj; if (!Objects.equals(this.value, other.value)) { return false; } return true; } @Override public String toString() { return value; } }
GUMGA/framework-backend
gumga-domain/src/main/java/gumga/framework/domain/domains/GumgaCNPJ.java
Java
gpl-3.0
1,331
/* * Copyright (c) 2012 Nicholas Okunew * All rights reserved. * * This file is part of the com.atomicleopard.expressive library * * The com.atomicleopard.expressive library is free software: you * can redistribute it and/or modify it under the terms of the GNU * Lesser General Public License as published by the Free Software Foundation, * either version 3 of the License, or (at your option) any later version. * * The com.atomicleopard.expressive library is distributed in the hope * that it will be useful, but WITHOUT ANY WARRANTY; without even * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with the com.atomicleopard.expressive library. If not, see * http://www.gnu.org/licenses/lgpl-3.0.html. */ package com.atomicleopard.expressive.collection; /** * <p> * {@link Pair} describes a simple tuple. * </p> * <p> * This is useful in scenarios where two items need to be grouped, or a method requires two return values. In these scenarios, Pair reduces code bloat by avoiding the creation of small simple DTO * classes. * </p> * * @param <A> * @param <B> */ public class Pair<A, B> { private A a; private B b; public Pair(A a, B b) { super(); this.a = a; this.b = b; } public A getA() { return a; } public B getB() { return b; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((a == null) ? 0 : a.hashCode()); result = prime * result + ((b == null) ? 0 : b.hashCode()); return result; } @SuppressWarnings("rawtypes") @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Pair other = (Pair) obj; if (a == null) { if (other.a != null) return false; } else if (!a.equals(other.a)) return false; if (b == null) { if (other.b != null) return false; } else if (!b.equals(other.b)) return false; return true; } @Override public String toString() { return String.format("Pair of %s and %s", a, b); } }
atomicleopard/Expressive
src/main/java/com/atomicleopard/expressive/collection/Pair.java
Java
gpl-3.0
2,369
<HTML > <HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252" /> <TITLE>InvY Attribute</TITLE> <LINK REL="stylesheet" TYPE="text/css" HREF="../common/ie4.css" /> <LINK REL="stylesheet" TYPE="text/css" HREF="../common/ie5.css" /> <style> BODY { font-family:verdana,arial,helvetica; margin:0; } </style> <SCRIPT LANGUAGE="javascript" SRC="../common/common.js"></SCRIPT> <SCRIPT LANGUAGE="javascript" SRC="../common/browdata.js"></SCRIPT> <SCRIPT LANGUAGE="javascript" SRC="../common/appliesto2.js"></SCRIPT> <SCRIPT LANGUAGE="javascript" SRC="../common/dhtmlobj.js"></SCRIPT> <SCRIPT LANGUAGE="javascript" SRC="../common/members.js"></SCRIPT> <SCRIPT LANGUAGE="javascript" SRC="../common/toolbar.js"></SCRIPT> <LINK REL="stylesheet" TYPE="text/css" HREF="../common/ie4.css" /> <LINK REL="stylesheet" TYPE="text/css" HREF="../common/inetsdk.css" /> <LINK REL="stylesheet" TYPE="text/css" HREF="../common/advSDKATIE4.css" /> <LINK REL="stylesheet" TYPE="text/css" HREF="../common/default.css" /> <SCRIPT> var gbDBG = true; </SCRIPT> <SCRIPT LANGUAGE="JavaScript1.2"> var gsHTCPath = "../common/"; var gsGraphicsPath = "../common/"; var gsCodePath = "../common/"; </SCRIPT> <SCRIPT LANGUAGE="JavaScript1.2"> var gsContextMenuPath = gsHTCPath + "contextmenu.htc"; var gsCodeDecoPath = gsHTCPath + "codedeco.htc"; var gsStoreName="workshop"; var gsGraphicsPath = "../common/"; </SCRIPT> <SCRIPT LANGUAGE="JavaScript1.2"> function CMemberInfo() { this.defView = 'all'; } var g_oMemberInfo = new CMemberInfo(); </SCRIPT> <SCRIPT LANGUAGE="JavaScript1.2"> function InitPage() { if (!assert( (typeof(oBD) == 'object' && oBD != null), "browdata object unavailable!") ) { return; } if ("MSIE" == oBD.browser && oBD.majorVer >= 5 && (oBD.platform.toLowerCase()!="x" && oBD.platform!="Mac" && oBD.platform!="PPC" )) { if (typeof(PostGBInit) == 'function') PostGBInit(); if (typeof(PostInit) == 'function') PostInit(); if (typeof(initTabbedMembers) == 'function') initTabbedMembers(); if (typeof(hideExamples) == 'function') hideExamples(); } if (oBD.getsNavBar && oBD.platform!="PPC" ) { if (typeof(SetShowMes) == 'function') SetShowMes(); } } function assert(bCond, sMsg) { if (bCond) { return true; } else { if (gbDBG) { alert(sMsg); } return false; } } window.onload = InitPage; </SCRIPT> <SCRIPT LANGUAGE="JavaScript1.2"> </SCRIPT> <SCRIPT LANGUAGE="JavaScript"> </script> </HEAD> <BODY TOPMARGIN="0" LEFTMARGIN="0" MARGINHEIGHT="0" MARGINWIDTH="0" BGCOLOR="#FFFFFF" TEXT="#000000"> <DIV CLASS="clsDocBody"> <TABLE WIDTH="97%" CELLPADDING="0" CELLSPACING="0"><TR><TD><H1>InvY Attribute</H1></TD><TD ALIGN="right"><A HREF="../default.html" TITLE="This index is only for content formerly found in the Web Workshop." TARGET="_top">Internet Development Index</A></TD></TR></TABLE> <HR size = "1" /> <P></P> <P>Determines whether the <EM>y </EM>position of the handle is inverted. Read/write <B>VgTriState</B>.</P> <P><B>Applies To</B></P> <P><A href="H.html"><B>H</B></A> (subelement of <A href="handles.html"><B>Handles</B></A>) </P> <P><STRONG>Tag Syntax</STRONG> </P> <P><P><B>&lt;v: </B><I>element</I><B> invy="</B><I>expression</I><B>"&gt;</B></P> <P><B>Remarks</B></P> <P class=T>If <STRONG>True</STRONG>, the <EM>y </EM>position of the handle is inverted by subtracting the&nbsp;<EM>y </EM>value from the&nbsp;<EM>y </EM> value of <STRONG>CoordOrigin </STRONG>added to the <EM>y </EM>value of <STRONG>CoordSize</STRONG>. The default value is <STRONG>False</STRONG>.</P> <P class=T>This attribute is the equivalent of</P> <PRE class="clsCode">coordorigin.y + coordsize.y - h.position.y</PRE> <P class=T><I>VML Standard Attribute</I></P> <P></P> </DI </DIV> </TD> </TR> </TABLE> </BODY> </HTML>
gucong3000/handbook
dhtml/DHTML/DHTMLref/vml/hand_invy.html
HTML
gpl-3.0
3,715
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <META http-equiv="Content-Type" content="text/html; charset=gb2312"> <META http-equiv="Content-Language" content="zh-cn"> <TITLE>STRIKE ÔªËØ | strike</TITLE> <STYLE TYPE="text/css"> @import url("../common/common.css"); </style> <SCRIPT TYPE="text/jscript" language="JScript" src="../common/browdata.js"></SCRIPT> <SCRIPT TYPE="text/jscript" language="JScript"> var gbDBG = true; var gsContextMenuPath = "../common/contextmenu.htc"; var gsCodeDecoPath = "../common/codedeco.htc"; function assert(bCond, sMsg) { if (bCond) { return true; } else { if (gbDBG) { alert(sMsg); } return false; } } function InitPage() { if (!assert( (typeof(oBD) == 'object' && oBD != null), "browdata object unavailable!") ) { return; } if ("MSIE" == oBD.browser && oBD.majorVer >= 5 && (oBD.platform.toLowerCase()!="x" && oBD.platform!="Mac" && oBD.platform!="PPC" )) { if (typeof(AddObjTables) == 'function') AddObjTables(typeof(g_oMemberInfo) != 'undefined' ? g_oMemberInfo : null); if (typeof(PostGBInit) == 'function') PostGBInit(); if (typeof(PostInit) == 'function') PostInit(); if (typeof(initTabbedMembers) == 'function') initTabbedMembers(); if (typeof(hideExamples) == 'function') hideExamples(); } if (oBD.getsNavBar && oBD.platform!="PPC" ) { if (typeof(SetShowMes) == 'function') SetShowMes(); } } window.onload = InitPage; </SCRIPT> <SCRIPT TYPE="text/jscript" language="JScript" src="../common/members.js"></SCRIPT> <SCRIPT TYPE="text/jscript" language="JScript" src="../common/common.js"></SCRIPT> </HEAD> <BODY> <P><A HREF="SPAN.html" title="SPAN ÔªËØ | span ¶ÔÏó"><IMG SRC="../common/prev.gif" WIDTH="17" HEIGHT="13" BORDER=0>SPAN ÔªËØ | span ¶ÔÏó</A> <A HREF="STRONG.html" title="STRONG ÔªËØ | strong ¶ÔÏó"><IMG SRC="../common/next.gif" WIDTH="17" HEIGHT="13" BORDER=0>STRONG ÔªËØ | strong ¶ÔÏó</A> <A HREF="../objects.html" title="DHTML ¶ÔÏó"><IMG SRC="../common/uplv.gif" WIDTH="17" HEIGHT="13" BORDER=0>DHTML ¶ÔÏó</A></P> <DIV CLASS="clsDocBody"> <H1>STRIKE ÔªËØ | strike ¶ÔÏó</H1> <HR SIZE="1"><P>ÒÔɾ³ýÏß×ÖÌåäÖȾÎı¾¡£</P> <P CLASS="clsRef">³ÉÔ±±í</P> <BLOCKQUOTE> <DIV id="oMTExplanation" style="display:none"> <P>ÏÂÃæµÄ±í¸ñÁгöÁË <B>strike</B> ¶ÔÏóÒý³öµÄ³ÉÔ±¡£Çëµ¥»÷×ó²àµÄ±êÇ©À´Ñ¡ÔñÄãÏëÒª²é¿´µÄ³ÉÔ±ÀàÐÍ¡£</P></DIV> <DIV id="oMT"> <P CLASS="clsRef" STYLE="display:none">±êÇ©ÊôÐÔ/ÊôÐÔ</P> <DIV tabName="±êÇ©ÊôÐÔ/ÊôÐÔ" style="visibility:visible"> <TABLE CLASS="clsStd" width="100%" STYLE="BACKGROUND: #FFFFFF"> <TR><TH width=52>±êÇ©ÊôÐÔ</TH><TH>ÊôÐÔ</TH><TH>ÃèÊö</TH></TR> <TR> <TD><A HREF="../properties/accessKey.html">ACCESSKEY</A></TD> <TD><A HREF="../properties/accessKey.html">accessKey</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>µÄ¿ì½Ý¼ü¡£</TD> </TR> <TR> <TD><A HREF="../properties/atomicSelection.html">ATOMICSELECTION</A></TD> <TD><A HREF="../properties/atomicSelection.html"></A></TD> <TD>Ö¸¶¨<span replace="1">ÔªËØ</span>¼°ÆäÄÚÈÝÊÇ·ñ¿ÉÒÔÒ»²»¿É¼ûµ¥Î»Í³Ò»Ñ¡Ôñ¡£</TD> </TR> <TR> <TD><A HREF="../time2/properties/begin.html">BEGIN</A></TD> <TD><A HREF="../time2/properties/begin.html">begin</A></TD> <TD>ÉèÖûò»ñȡʱ¼äÏßÔÚ¸ÃÔªËØÉϲ¥·ÅǰµÄÑÓ³Ùʱ¼ä¡£</TD> </TR> <TR> <TD><A HREF="../properties/canHaveChildren.html"></A></TD> <TD><A HREF="../properties/canHaveChildren.html">canHaveChildren</A></TD> <TD>»ñÈ¡±íÃ÷¶ÔÏóÊÇ·ñ¿ÉÒÔ°üº¬×Ó¶ÔÏóµÄÖµ¡£</TD> </TR> <TR> <TD><A HREF="../properties/canHaveHTML.html"></A></TD> <TD><A HREF="../properties/canHaveHTML.html">canHaveHTML</A></TD> <TD>»ñÈ¡±íÃ÷<span replace="1">¶ÔÏó</span>ÊÇ·ñ¿ÉÒÔ°üº¬·á¸»µÄ HTML ±êÇ©µÄÖµ¡£</TD> </TR> <TR> <TD><A HREF="../properties/className.html">CLASS</A></TD> <TD><A HREF="../properties/className.html">className</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>µÄÀà¡£</TD> </TR> <TR> <TD><A HREF="../properties/clientHeight.html"></A></TD> <TD><A HREF="../properties/clientHeight.html">clientHeight</A></TD> <TD>»ñÈ¡<span replace="1">¶ÔÏó</span>µÄ¸ß¶È£¬²»¼ÆËãÈκα߾ࡢ±ß¿ò¡¢¹ö¶¯Ìõ»ò¿ÉÄÜÓ¦Óõ½¸Ã<span replace="1">¶ÔÏó</span>µÄ²¹°×¡£</TD> </TR> <TR> <TD><A HREF="../properties/clientLeft.html"></A></TD> <TD><A HREF="../properties/clientLeft.html">clientLeft</A></TD> <TD>»ñÈ¡ <A HREF="../properties/offsetLeft.html">offsetLeft</A> ÊôÐԺͿͻ§ÇøÓòµÄʵ¼Ê×ó±ßÖ®¼äµÄ¾àÀë¡£</TD> </TR> <TR> <TD><A HREF="../properties/clientTop.html"></A></TD> <TD><A HREF="../properties/clientTop.html">clientTop</A></TD> <TD>»ñÈ¡ <A HREF="../properties/offsetTop.html">offsetTop</A> ÊôÐԺͿͻ§ÇøÓòµÄʵ¼Ê¶¥¶ËÖ®¼äµÄ¾àÀë¡£</TD> </TR> <TR> <TD><A HREF="../properties/clientWidth.html"></A></TD> <TD><A HREF="../properties/clientWidth.html">clientWidth</A></TD> <TD>»ñÈ¡<span replace="1">¶ÔÏó</span>µÄ¿í¶È£¬²»¼ÆËãÈκα߾ࡢ±ß¿ò¡¢¹ö¶¯Ìõ»ò¿ÉÄÜÓ¦Óõ½¸Ã<span replace="1">¶ÔÏó</span>µÄ²¹°×¡£</TD> </TR> <TR> <TD><A HREF="../properties/contentEditable.html">CONTENTEDITABLE</A></TD> <TD><A HREF="../properties/contentEditable.html">contentEditable</A></TD> <TD>ÉèÖûò»ñÈ¡±íÃ÷Óû§ÊÇ·ñ¿É±à¼­<span replace="1">¶ÔÏó</span>ÄÚÈݵÄ×Ö·û´®¡£</TD> </TR> <TR> <TD><A HREF="../properties/dir.html">DIR</A></TD> <TD><A HREF="../properties/dir.html">dir</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>µÄÔĶÁ˳Ðò¡£</TD> </TR> <TR> <TD><A HREF="../properties/disabled_0.html">DISABLED</A></TD> <TD><A HREF="../properties/disabled_0.html">disabled</A></TD> <TD>ÉèÖûò»ñÈ¡¿Ø¼þµÄ״̬¡£</TD> </TR> <TR> <TD><A HREF="../time2/properties/end.html">END</A></TD> <TD><A HREF="../time2/properties/end.html">end</A></TD> <TD>ÉèÖûò»ñÈ¡±íÃ÷ÔªËØ½áÊøÊ±¼äµÄÖµ£¬»òÕßÔªËØÉèÖÃÎªÖØ¸´µÄ¼òµ¥³ÖÐøÖÕֹʱ¼ä¡£</TD> </TR> <TR> <TD><A HREF="../properties/firstChild.html"></A></TD> <TD><A HREF="../properties/firstChild.html">firstChild</A></TD> <TD>»ñÈ¡<span replace="1">¶ÔÏó</span>µÄ <A HREF="../collections/childNodes.html">childNodes</A> ¼¯ºÏµÄµÚÒ»¸ö×Ó¶ÔÏóµÄÒýÓá£</TD> </TR> <TR> <TD><A HREF="../time2/properties/hasMedia.html"></A></TD> <TD><A HREF="../time2/properties/hasMedia.html">hasMedia</A></TD> <TD>»ñȡһ¸ö±íÃ÷ÔªËØÊÇ·ñΪ <A HREF="../../../behaviors/time.html">HTML+TIME</A> ýÌåÔªËØµÄ Boolean Öµ¡£</TD> </TR> <TR> <TD><A HREF="../properties/hideFocus.html">HIDEFOCUS</A></TD> <TD><A HREF="../properties/hideFocus.html">hideFocus</A></TD> <TD>ÉèÖûò»ñÈ¡±íÃ÷<span replace="1">¶ÔÏó</span>ÊÇ·ñÏÔʽ±êÃ÷½¹µãµÄÖµ¡£</TD> </TR> <TR> <TD><A HREF="../properties/id.html">ID</A></TD> <TD><A HREF="../properties/id.html">id</A></TD> <TD>»ñÈ¡±êʶ<span replace="1">¶ÔÏó</span>µÄ×Ö·û´®¡£</TD> </TR> <TR> <TD><A HREF="../properties/innerHTML.html"></A></TD> <TD><A HREF="../properties/innerHTML.html">innerHTML</A></TD> <TD>ÉèÖûò»ñȡλÓÚ<span replace="1">¶ÔÏó</span>ÆðʼºÍ½áÊø±êÇ©ÄÚµÄ HTML¡£</TD> </TR> <TR> <TD><A HREF="../properties/innerText.html"></A></TD> <TD><A HREF="../properties/innerText.html">innerText</A></TD> <TD>ÉèÖûò»ñȡλÓÚ<span replace="1">¶ÔÏó</span>ÆðʼºÍ½áÊø±êÇ©ÄÚµÄÎı¾¡£</TD> </TR> <TR> <TD><A HREF="../properties/isContentEditable.html"></A></TD> <TD><A HREF="../properties/isContentEditable.html">isContentEditable</A></TD> <TD>»ñÈ¡±íÃ÷Óû§ÊÇ·ñ¿É±à¼­<span replace="1">¶ÔÏó</span>ÄÚÈݵÄÖµ¡£</TD> </TR> <TR> <TD><A HREF="../properties/isDisabled.html"></A></TD> <TD><A HREF="../properties/isDisabled.html">isDisabled</A></TD> <TD>»ñÈ¡±íÃ÷Óû§ÊÇ·ñ¿ÉÓë¸Ã<span replace="1">¶ÔÏó</span>½»»¥µÄÖµ¡£</TD> </TR> <TR> <TD><A HREF="../properties/ismultiline.html"></A></TD> <TD><A href="../properties/ismultiline.html">isMultiLine</A></TD> <TD>»ñÈ¡±íÃ÷<span replace="1">¶ÔÏó</span>µÄÄÚÈÝÊǰüº¬Ò»Ðл¹ÊǶàÐеÄÖµ¡£</TD> </TR> <TR> <TD><A HREF="../properties/isTextEdit.html"></A></TD> <TD><A HREF="../properties/isTextEdit.html">isTextEdit</A></TD> <TD>»ñÈ¡ÊÇ·ñ¿ÉʹÓøöÔÏó´´½¨Ò»¸ö <A HREF="obj_TextRange.html">TextRange</A> <span replace="1">¶ÔÏó</span>¡£</TD> </TR> <TR> <TD><A HREF="../properties/lang.html">LANG</A></TD> <TD><A HREF="../properties/lang.html">lang</A></TD> <TD>ÉèÖûò»ñȡҪʹÓõÄÓïÑÔ¡£</TD> </TR> <TR> <TD><A HREF="../properties/language.html">LANGUAGE</A></TD> <TD><A HREF="../properties/language.html">language</A></TD> <TD>ÉèÖûò»ñÈ¡µ±Ç°½Å±¾±àдÓõÄÓïÑÔ¡£</TD> </TR> <TR> <TD><A HREF="../properties/lastChild.html"></A></TD> <TD><A HREF="../properties/lastChild.html">lastChild</A></TD> <TD>»ñÈ¡¸Ã¶ÔÏó <B>childNodes</B> ¼¯ºÏÖÐ×îºóÒ»¸ö×Ó¶ÔÏóµÄÒýÓá£</TD> </TR> <TR> <TD><A HREF="../properties/nextSibling.html"></A></TD> <TD><A HREF="../properties/nextSibling.html">nextSibling</A></TD> <TD>»ñÈ¡¶Ô´Ë¶ÔÏóµÄÏÂÒ»¸öÐֵܶÔÏóµÄÒýÓá£</TD> </TR> <TR> <TD><A HREF="../properties/nodeName.html"></A></TD> <TD><A HREF="../properties/nodeName.html">nodeName</A></TD> <TD>»ñÈ¡ÌØ¶¨½áµãÀàÐ͵ÄÃû³Æ¡£</TD> </TR> <TR> <TD><A HREF="../properties/nodeType.html"></A></TD> <TD><A HREF="../properties/nodeType.html">nodeType</A></TD> <TD>»ñÈ¡ËùÐè½áµãµÄÀàÐÍ¡£</TD> </TR> <TR> <TD><A HREF="../properties/nodeValue.html"></A></TD> <TD><A HREF="../properties/nodeValue.html">nodeValue</A></TD> <TD>ÉèÖûò»ñÈ¡½áµãµÄÖµ¡£</TD> </TR> <TR> <TD><A HREF="../properties/offsetHeight.html"></A></TD> <TD><A HREF="../properties/offsetHeight.html">offsetHeight</A></TD> <TD>»ñÈ¡<span replace="1">¶ÔÏó</span>Ïà¶ÔÓÚ°æÃæ»òÓɸ¸×ø±ê <A HREF="../properties/offsetParent.html">offsetParent</A> ÊôÐÔÖ¸¶¨µÄ¸¸×ø±êµÄ¸ß¶È¡£</TD> </TR> <TR> <TD><A HREF="../properties/offsetLeft.html"></A></TD> <TD><A HREF="../properties/offsetLeft.html">offsetLeft</A></TD> <TD>»ñÈ¡<span replace="1">¶ÔÏó</span>Ïà¶ÔÓÚ°æÃæ»òÓÉ <B>offsetParent</B> ÊôÐÔÖ¸¶¨µÄ¸¸×ø±êµÄ¼ÆËã×ó²àλÖá£</TD> </TR> <TR> <TD><A HREF="../properties/offsetParent.html"></A></TD> <TD><A HREF="../properties/offsetParent.html">offsetParent</A></TD> <TD>»ñÈ¡¶¨Òå¶ÔÏó <B>offsetTop</B> ºÍ <B>offsetLeft</B> ÊôÐÔµÄÈÝÆ÷¶ÔÏóµÄÒýÓá£</TD> </TR> <TR> <TD><A HREF="../properties/offsetTop.html"></A></TD> <TD><A HREF="../properties/offsetTop.html">offsetTop</A></TD> <TD>»ñÈ¡<span replace="1">¶ÔÏó</span>Ïà¶ÔÓÚ°æÃæ»òÓÉ <B>offsetTop</B> ÊôÐÔÖ¸¶¨µÄ¸¸×ø±êµÄ¼ÆËã¶¥¶ËλÖá£</TD> </TR> <TR> <TD><A HREF="../properties/offsetWidth.html"></A></TD> <TD><A HREF="../properties/offsetWidth.html">offsetWidth</A></TD> <TD>»ñÈ¡<span replace="1">¶ÔÏó</span>Ïà¶ÔÓÚ°æÃæ»òÓɸ¸×ø±ê <B>offsetParent</B> ÊôÐÔÖ¸¶¨µÄ¸¸×ø±êµÄ¿í¶È¡£</TD> </TR> <TR> <TD><A HREF="../time/properties/onOffBehavior.html"></A></TD> <TD><A HREF="../time/properties/onOffBehavior.html">onOffBehavior</A></TD> <TD>»ñÈ¡±íÃ÷Ö¸¶¨µÄ Microsoft<SUP>&reg;</SUP> DirectAnimation<SUP>&reg;</SUP> ÐÐΪÊÇ·ñÕýÔÚÔËÐеĶÔÏó¡£</TD> </TR> <TR> <TD><A HREF="../properties/outerHTML.html"></A></TD> <TD><A HREF="../properties/outerHTML.html">outerHTML</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>¼°ÆäÄÚÈÝµÄ HTML ÐÎʽ¡£</TD> </TR> <TR> <TD><A HREF="../properties/outerText.html"></A></TD> <TD><A HREF="../properties/outerText.html">outerText</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>µÄÎı¾¡£</TD> </TR> <TR> <TD><A HREF="../properties/ownerDocument.html"></A></TD> <TD><A HREF="../properties/ownerDocument.html">ownerDocument</A><IMG SRC="../common/new.gif" WIDTH="21" HEIGHT="11" BORDER=0 ALT="Microsoft&reg; Internet Explorer 6 ÐÂÔö"></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">½áµã</span>¹ØÁªµÄ <A href="obj_document.html">document</A> ¶ÔÏó¡£</TD> </TR> <TR> <TD><A HREF="../properties/parentElement.html"></A></TD> <TD><A HREF="../properties/parentElement.html">parentElement</A></TD> <TD>»ñÈ¡¶ÔÏó²ã´ÎÖеĸ¸¶ÔÏó¡£</TD> </TR> <TR> <TD><A HREF="../properties/parentNode.html"></A></TD> <TD><A HREF="../properties/parentNode.html">parentNode</A></TD> <TD>»ñÈ¡Îĵµ²ã´ÎÖеĸ¸¶ÔÏó¡£</TD> </TR> <TR> <TD><A HREF="../properties/parentTextEdit.html"></A></TD> <TD><A HREF="../properties/parentTextEdit.html">parentTextEdit</A></TD> <TD>»ñÈ¡Îĵµ²ã´ÎÖпÉÓÃÓÚ´´½¨°üº¬Ô­Ê¼<span replace="1">¶ÔÏó</span>µÄ <B>TextRange</B> µÄÈÝÆ÷¶ÔÏó¡£</TD> </TR> <TR> <TD><A HREF="../properties/previousSibling.html"></A></TD> <TD><A HREF="../properties/previousSibling.html">previousSibling</A></TD> <TD>»ñÈ¡¶Ô´Ë¶ÔÏóµÄÉÏÒ»¸öÐֵܶÔÏóµÄÒýÓá£</TD> </TR> <TR> <TD><A HREF="../properties/readystate.html"></A></TD> <TD><A HREF="../properties/readystate.html">readyState</A></TD> <TD>»ñÈ¡<span replace="1">¶ÔÏó</span>µÄµ±Ç°×´Ì¬¡£</TD> </TR> <TR> <TD><A HREF="../properties/scopeName.html"></A></TD> <TD><A HREF="../properties/scopeName.html">scopeName</A></TD> <TD>»ñȡΪ¸ÃÔªËØ¶¨ÒåµÄ<A HREF="/library/en-us/xmlsdk30/htm/xmtuttut5usingnamespaces.html">ÃüÃû¿Õ¼ä</A>¡£</TD> </TR> <TR> <TD><A HREF="../properties/scrollHeight.html"></A></TD> <TD><A HREF="../properties/scrollHeight.html">scrollHeight</A></TD> <TD>»ñÈ¡<span replace="1">¶ÔÏó</span>µÄ¹ö¶¯¸ß¶È¡£</TD> </TR> <TR> <TD><A HREF="../properties/scrollLeft.html"></A></TD> <TD><A HREF="../properties/scrollLeft.html">scrollLeft</A></TD> <TD>ÉèÖûò»ñȡλÓÚ<span replace="1">¶ÔÏó</span>×ó±ß½çºÍ´°¿ÚÖÐĿǰ¿É¼ûÄÚÈݵÄ×î×ó¶ËÖ®¼äµÄ¾àÀë¡£</TD> </TR> <TR> <TD><A HREF="../properties/scrollTop.html"></A></TD> <TD><A HREF="../properties/scrollTop.html">scrollTop</A></TD> <TD>ÉèÖûò»ñȡλÓÚ<span replace="1">¶ÔÏó</span>×î¶¥¶ËºÍ´°¿ÚÖпɼûÄÚÈݵÄ×î¶¥¶ËÖ®¼äµÄ¾àÀë¡£</TD> </TR> <TR> <TD><A HREF="../properties/scrollWidth.html"></A></TD> <TD><A HREF="../properties/scrollWidth.html">scrollWidth</A></TD> <TD>»ñÈ¡<span replace="1">¶ÔÏó</span>µÄ¹ö¶¯¿í¶È¡£</TD> </TR> <TR> <TD><A HREF="../properties/sourceIndex.html"></A></TD> <TD><A HREF="../properties/sourceIndex.html">sourceIndex</A></TD> <TD>»ñÈ¡<span replace="1">¶ÔÏó</span>ÔÚÔ´ÐòÖеÄÒÀ´ÎλÖ㬼´<span replace="1">¶ÔÏó</span>³öÏÖÔÚ document µÄ <A HREF="../collections/all.html">all</A> ¼¯ºÏÖеÄ˳Ðò¡£</TD> </TR> <TR> <TD><A HREF="../properties/style.html">STYLE</A></TD> <TD><A HREF="../properties/style.html"></A></TD> <TD>Ϊ¸ÃÉèÖÃ<span replace="1">ÔªËØ</span>ÉèÖÃÄÚǶÑùʽ¡£</TD> </TR> <TR> <TD><A HREF="../time2/properties/syncMaster.html">SYNCMASTER</A></TD> <TD><A HREF="../time2/properties/syncMaster.html">syncMaster</A></TD> <TD>ÉèÖûò»ñȡʱ¼äÈÝÆ÷ÊÇ·ñ±ØÐëÔÚ´ËÔªËØÉÏͬ²½»Ø·Å¡£</TD> </TR> <TR> <TD><A HREF="../time2/properties/systemBitrate.html">SYSTEMBITRATE</A></TD> <TD><A HREF="../time2/properties/systemBitrate.html"></A></TD> <TD>»ñȡϵͳÖдóÔ¼¿ÉÓôø¿íµÄ bps¡£</TD> </TR> <TR> <TD><A HREF="../time2/properties/systemCaptions.html">SYSTEMCAPTION</A></TD> <TD><A HREF="../time2/properties/systemCaptions.html"></A></TD> <TD>±íÃ÷ÊÇ·ñÒªÏÔʾÎı¾À´´úÌæÑÝʾµÄµÄÒôƵ²¿·Ö¡£</TD> </TR> <TR> <TD><A HREF="../time2/properties/systemLanguage.html">SYSTEMLANGUAGE</A></TD> <TD><A HREF="../time2/properties/systemLanguage.html"></A></TD> <TD>±íÃ÷ÊÇ·ñÔÚÓû§¼ÆËã»úÉϵÄÑ¡ÏîÉèÖÃÖÐÑ¡ÖÐÁ˸ø¶¨ÓïÑÔ¡£</TD> </TR> <TR> <TD><A HREF="../time2/properties/systemOverdubOrSubtitle.html">SYSTEMOVERDUBORSUBTITLE</A></TD> <TD><A HREF="../time2/properties/systemOverdubOrSubtitle.html"></A></TD> <TD>Ö¸¶¨Õë¶ÔÄÇЩÕýÔÚ¹Û¿´ÑÝʾµ«¶Ô±»²¥·ÅµÄÒôƵËùʹÓõÄÓïÑÔ²¢²»ÊìϤµÄÓû§À´ËµÊÇ·ñÒªäÖȾ<B>ÅäÒô</B>»ò<B>×ÖÄ»</B>¡£</TD> </TR> <TR> <TD><A HREF="../properties/tabIndex.html">TABINDEX</A></TD> <TD><A HREF="../properties/tabIndex.html">tabIndex</A></TD> <TD>ÉèÖûò»ñÈ¡¶¨Òå<span replace="1">¶ÔÏó</span>µÄ Tab ˳ÐòµÄË÷Òý¡£</TD> </TR> <TR> <TD><A HREF="../properties/tagName.html"></A></TD> <TD><A HREF="../properties/tagName.html">tagName</A></TD> <TD>»ñÈ¡<span replace="1">¶ÔÏó</span>µÄ±êÇ©Ãû³Æ¡£</TD> </TR> <TR> <TD><A HREF="../properties/tagUrn.html"></A></TD> <TD><A HREF="../properties/tagUrn.html">tagUrn</A></TD> <TD>ÉèÖûò»ñÈ¡ÔÚÃüÃû¿Õ¼äÉùÃ÷ÖÐÖ¸¶¨µÄͳһ×ÊÔ´Ãû³Æ(URN)¡£</TD> </TR> <TR> <TD><A HREF="../time2/properties/timeContainer.html">TIMECONTAINER</A></TD> <TD><A HREF="../time2/properties/timeContainer.html">timeContainer</A></TD> <TD>ÉèÖûò»ñÈ¡ÓëÔªËØ¹ØÁªµÄʱ¼äÏßÀàÐÍ¡£</TD> </TR> <TR> <TD><A HREF="../properties/title_1.html">TITLE</A></TD> <TD><A HREF="../properties/title_1.html">title</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>µÄ×ÉѯÐÅÏ¢(¹¤¾ßÌáʾ)¡£</TD> </TR> <TR> <TD><A HREF="../properties/uniqueID.html"></A></TD> <TD><A HREF="../properties/uniqueID.html">uniqueID</A></TD> <TD>»ñȡΪ<span replace="1">¶ÔÏó</span>×Ô¶¯Éú³ÉµÄΨһ±êʶ·û¡£</TD> </TR> <TR> <TD><A HREF="../properties/unselectable.html">UNSELECTABLE</A></TD> <TD><A HREF="../properties/unselectable.html"></A></TD> <TD>Ö¸¶¨¸ÃÔªËØ²»¿É±»Ñ¡ÖС£</TD> </TR> </TABLE> </DIV> <P CLASS="clsRef" STYLE="display:none">ÐÐΪ</P> <DIV tabName="ÐÐΪ" style="visibility:visible"> <TABLE CLASS="clsStd" width="100%" STYLE="BACKGROUND: #FFFFFF"> <TR><TH>ÐÐΪ</TH><TH>ÃèÊö</TH></TR> <TR> <TD><A HREF="../behaviors/clientcaps.html">clientCaps</A></TD> <TD>Ìṩ¹ØÓÚ Internet Explorer Ö§³ÖµÄÌØÐÔµÄÐÅÏ¢£¬ÒÔ¼°Ìṩ¼´Óü´×°µÄ·½·¨¡£</TD> </TR> <TR> <TD><A HREF="../behaviors/download.html">download</A></TD> <TD>ÏÂÔØÎļþ²¢ÔÚÏÂÔØÍê³Éºó֪ͨһ¸öÖ¸¶¨µÄ»Øµ÷º¯Êý¡£</TD> </TR> <TR> <TD><A HREF="../behaviors/homepage.html">homePage</A></TD> <TD>°üº¬¹ØÓÚÓû§Ö÷Ò³µÄÐÅÏ¢¡£</TD> </TR> <TR> <TD><A HREF="../behaviors/httpFolder.html">httpFolder</A></TD> <TD>°üº¬ÁËÔÊÐíä¯ÀÀµ¼º½µÄÎļþ¼ÐÊÓͼµÄ½Å±¾ÌØÐÔ¡£</TD> </TR> <TR> <TD><A HREF="../behaviors/saveFavorite.html">saveFavorite</A></TD> <TD>ÔÊÐí<span replace="1">¶ÔÏó</span>ÔÚÊղؼÐÖÐÁô´æÊý¾Ý¡£</TD> </TR> <TR> <TD><A HREF="../behaviors/saveHistory.html">saveHistory</A></TD> <TD>ÔÊÐí<span replace="1">¶ÔÏó</span>ÔÚä¯ÀÀÆ÷ÀúÊ·ÖÐÁô´æÊý¾Ý¡£</TD> </TR> <TR> <TD><A HREF="../behaviors/saveSnapshot.html">saveSnapshot</A></TD> <TD>ÔÊÐí<span replace="1">¶ÔÏó</span>ÔÚ Web Ò³±£´æÊ±Áô´æÊý¾Ý¡£</TD> </TR> <TR> <TD><A HREF="../time/behaviors/time.html">time</A></TD> <TD>Ϊ HTML ÔªËØÌṩһ¸ö»î¶¯µÄʱ¼äÏß¡£</TD> </TR> <TR> <TD><A HREF="../time2/behaviors/time2.html">time2</A></TD> <TD>Ϊ HTML ÔªËØ»òÒ»×éÔªËØÌṩһ¸ö»î¶¯µÄʱ¼äÏß¡£</TD> </TR> <TR> <TD><A HREF="../behaviors/userData.html">userData</A></TD> <TD>ÔÊÐí<span replace="1">¶ÔÏó</span>ÔÚÓû§Êý¾ÝÖÐÁô´æÊý¾Ý¡£</TD> </TR> </TABLE> </DIV> <P CLASS="clsRef" STYLE="display:none">¼¯ºÏ</P> <DIV tabName="¼¯ºÏ" style="visibility:visible"> <TABLE CLASS="clsStd" width="100%" STYLE="BACKGROUND: #FFFFFF"> <TR><TH>¼¯ºÏ</TH><TH>ÃèÊö</TH></TR> <TR> <TD><A HREF="../collections/all.html">all</A></TD> <TD>·µ»Ø<span replace="1">¶ÔÏó</span>Ëù°üº¬µÄÔªËØ¼¯ºÏµÄÒýÓá£</TD> </TR> <TR> <TD><A HREF="../collections/attributes.html">attributes</A></TD> <TD>»ñÈ¡¶ÔÏó±êÇ©ÊôÐԵļ¯ºÏ¡£</TD> </TR> <TR> <TD><A HREF="../collections/behaviorUrns.html">behaviorUrns</A></TD> <TD>·µ»Ø±êʶ¸½¼Óµ½¸Ã<span replace="1">ÔªËØ</span>ÐÐΪµÄͳһ×ÊÔ´Ãû³Æ(URN)×Ö·û´®µÄ¼¯ºÏ¡£</TD> </TR> <TR> <TD><A HREF="../collections/childNodes.html">childNodes</A></TD> <TD>»ñÈ¡×÷Ϊָ¶¨¶ÔÏóÖ±½Óºó´úµÄ <A HREF="../elements.html">HTML ÔªËØ</A>ºÍ <A HREF="TextNode.html">TextNode</A> ¶ÔÏóµÄ¼¯ºÏ¡£</TD> </TR> <TR> <TD><A HREF="../collections/children.html">children</A></TD> <TD>»ñÈ¡×÷Ϊ<span replace="1">¶ÔÏó</span>Ö±½Óºó´úµÄ <A HREF="../objects.html">DHTML ¶ÔÏó</A>µÄ¼¯ºÏ¡£</TD> </TR> </TABLE> </DIV> <P CLASS="clsRef" STYLE="display:none">ʼþ</P> <DIV tabName="ʼþ" style="visibility:visible"> <TABLE CLASS="clsStd" width="100%" STYLE="BACKGROUND: #FFFFFF"> <TR><TH>ʼþ</TH><TH>ÃèÊö</TH></TR> <TR> <TD><A HREF="../events/onactivate.html">onactivate</A></TD> <TD>µ±<span replace="1">¶ÔÏó</span>ÉèÖÃΪ<A HREF="../properties/activeElement.html">»î¶¯ÔªËØ</A>ʱ´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/onbeforeactivate.html">onbeforeactivate</A><IMG SRC="../common/new.gif" WIDTH="21" HEIGHT="11" BORDER=0 ALT="Microsoft&reg; Internet Explorer 6 ÐÂÔö"></TD> <TD><span replace="1">¶ÔÏó</span>Òª±»ÉèÖÃΪ<B>µ±Ç°ÔªËØ</B>ǰÁ¢¼´´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/onbeforecopy.html">onbeforecopy</A></TD> <TD>µ±Ñ¡ÖÐÇø¸´ÖƵ½ÏµÍ³¼ôÌù°å֮ǰÔÚÔ´¶ÔÏó´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/onbeforecut.html">onbeforecut</A></TD> <TD>µ±Ñ¡ÖÐÇø´ÓÎĵµÖÐɾ³ý֮ǰÔÚÔ´¶ÔÏó´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/onbeforedeactivate.html">onbeforedeactivate</A></TD> <TD>ÔÚ <A HREF="../properties/activeElement.html">activeElement</A> ´Óµ±Ç°<span replace="1">¶ÔÏó</span>±äΪ¸¸ÎĵµÆäËü¶ÔÏó֮ǰÁ¢¼´´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/onbeforeeditfocus.html">onbeforeeditfocus</A></TD> <TD>ÔÚ°üº¬ÓÚ¿É±à¼­ÔªËØÄڵĶÔÏó½øÈë<SPAN CLASS="clsGLossary" title="±»Óû§»ò·½·¨ËùÑ¡ÖеÄÏÔʾµÄÄÚÈÝ£¬ÒÔ±ã¿ÉÊäÈëÎı¾¡£¼¤»îÇøÓòͨ³£±»ÐéÏß°üΧ¡£µ±Óû§°´ Enter ¼ü¡¢µ¥»÷ÓµÓн¹µãµÄ¶ÔÏó»òË«»÷¶ÔÏóʱ¿Éµ¼Ö¶ÔÏó½øÈëÓû§½çÃæ(UI)¼¤»î״̬¡£ÒªÒÔÓû§½çÃæ¼¤»î״̬·ÅÖöÔÏó£¬Îĵµ»ò°üº¬¸Ã¶ÔÏóµÄÔªËØ±ØÐë´¦Óڱ༭ģʽ¡£Óû§½çÃæ¼¤»îµÄ¶ÔÏóÒ²Êǵ±Ç°¶ÔÏó¡£">Óû§½çÃæ¼¤»î</SPAN>״̬ǰ»ò¿É±à¼­ÈÝÆ÷±ä³É<SPAN CLASS="clsGlossary" title="ÏÔʾÓû§Ñ¡ÖеÄÄÚÈݺÍËõ·Å¾ä±ú¡£¿ÉʹÓöÔÏóµÄ·½·¨»ñÈ¡²¢ÐÞ¸ÄÑ¡ÖÐÇøµÄ HTML Îı¾¡£ÔªËصÄÀý×ÓΪѡÖаüÀ¨Í¼Ïñ¡¢±í¸ñºÍÈÎÒâ¾ø¶Ô¶¨Î»µÄÔªËØÖеĿؼþ¡£">¿Ø¼þÑ¡ÖÐÇø</SPAN>ǰ´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/onbeforepaste.html">onbeforepaste</A></TD> <TD>ÔÚÑ¡ÖÐÇø´Óϵͳ¼ôÌù°åÕ³Ìùµ½ÎĵµÇ°ÔÚÄ¿±ê¶ÔÏóÉÏ´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/onblur.html">onblur</A></TD> <TD>ÔÚ<span replace="1">¶ÔÏó</span>ʧȥÊäÈë½¹µãʱ´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/onclick.html">onclick</A></TD> <TD>ÔÚÓû§ÓÃÊó±ê×ó¼üµ¥»÷<span replace="1">¶ÔÏó</span>ʱ´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/oncontextmenu.html">oncontextmenu</A></TD> <TD>ÔÚÓû§Ê¹ÓÃÊó±êÓÒ¼üµ¥»÷¿Í»§Çø´ò¿ªÉÏÏÂÎIJ˵¥Ê±´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/oncontrolselect.html">oncontrolselect</A></TD> <TD>µ±Óû§½«Òª¶Ô¸Ã<span replace="1">¶ÔÏó</span>ÖÆ×÷Ò»¸ö<SPAN CLASS="clsGlossary" title="ÏÔʾÓû§Ñ¡ÖеÄÄÚÈݺÍËõ·Å¾ä±ú¡£¿ÉʹÓöÔÏóµÄ·½·¨»ñÈ¡²¢ÐÞ¸ÄÑ¡ÖÐÇøµÄ HTML Îı¾¡£ÔªËصÄÀý×ÓΪѡÖаüÀ¨Í¼Ïñ¡¢±í¸ñºÍÈÎÒâ¾ø¶Ô¶¨Î»µÄÔªËØÖеĿؼþ¡£">¿Ø¼þÑ¡ÖÐÇø</SPAN>ʱ´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/oncopy.html">oncopy</A></TD> <TD>µ±Óû§¸´ÖÆ<span replace="1">¶ÔÏó</span>»òÑ¡ÖÐÇø£¬½«ÆäÌí¼Óµ½ÏµÍ³¼ôÌù°åÉÏʱÔÚÔ´ÔªËØÉÏ´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/oncut.html">oncut</A></TD> <TD>µ±<span replace="1">¶ÔÏó</span>»òÑ¡ÖÐÇø´ÓÎĵµÖÐɾ³ý²¢Ìí¼Óµ½ÏµÍ³¼ôÌù°åÉÏʱÔÚÔ´ÔªËØÉÏ´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/ondblclick.html">ondblclick</A></TD> <TD>µ±Óû§Ë«»÷<span replace="1">¶ÔÏó</span>ʱ´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/ondeactivate.html">ondeactivate</A></TD> <TD>µ± <B>activeElement</B> ´Óµ±Ç°<span replace="1">¶ÔÏó</span>±äΪ¸¸ÎĵµÆäËü¶ÔÏóʱ´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/ondrag.html">ondrag</A></TD> <TD>µ±½øÐÐÍÏÒ·²Ù×÷ʱÔÚÔ´¶ÔÏóÉϳÖÐø´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/ondragend.html">ondragend</A></TD> <TD>µ±Óû§ÔÚÍÏÒ·²Ù×÷½áÊøºóÊÍ·ÅÊó±êʱÔÚÔ´¶ÔÏóÉÏ´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/ondragenter.html">ondragenter</A></TD> <TD>µ±Óû§ÍÏÒ·<span replace="1">¶ÔÏó</span>µ½Ò»¸öºÏ·¨ÍÏÒ·Ä¿±êʱÔÚÄ¿±êÔªËØÉÏ´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/ondragleave.html">ondragleave</A></TD> <TD>µ±Óû§ÔÚÍÏÒ·²Ù×÷¹ý³ÌÖн«Êó±êÒÆ³öºÏ·¨ÍÏÒ·Ä¿±êʱÔÚÄ¿±ê¶ÔÏóÉÏ´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/ondragover.html">ondragover</A></TD> <TD>µ±Óû§ÍÏÒ·<span replace="1">¶ÔÏó</span>»®¹ýºÏ·¨ÍÏÒ·Ä¿±êʱ³ÖÐøÔÚÄ¿±êÔªËØÉÏ´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/ondragstart.html">ondragstart</A></TD> <TD>µ±Óû§¿ªÊ¼ÍÏÒ·Îı¾Ñ¡ÖÐÇø»òÑ¡ÖжÔÏóʱÔÚÔ´¶ÔÏóÉÏ´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/ondrop.html">ondrop</A></TD> <TD>µ±Êó±ê°´Å¥ÔÚÍÏÒ·²Ù×÷¹ý³ÌÖÐÊÍ·ÅʱÔÚÄ¿±ê¶ÔÏóÉÏ´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/onfocus.html">onfocus</A></TD> <TD>µ±<span replace="1">¶ÔÏó</span>»ñµÃ½¹µãʱ´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/onfocusin.html">onfocusin</A><IMG SRC="../common/new.gif" WIDTH="21" HEIGHT="11" BORDER=0 ALT="Microsoft&reg; Internet Explorer 6 ÐÂÔö"></TD> <TD>µ±ÔªËؽ«Òª±»ÉèÖÃΪ½¹µã֮ǰ´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/onfocusout.html">onfocusout</A><IMG SRC="../common/new.gif" WIDTH="21" HEIGHT="11" BORDER=0 ALT="Microsoft&reg; Internet Explorer 6 ÐÂÔö"></TD> <TD>ÔÚÒÆ¶¯½¹µãµ½ÆäËüÔªËØÖ®ºóÁ¢¼´´¥·¢ÓÚµ±Ç°ÓµÓн¹µãµÄÔªËØÉÏ´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/onhelp.html">onhelp</A></TD> <TD>µ±Óû§ÔÚä¯ÀÀÆ÷Ϊµ±Ç°´°¿Úʱ°´ F1 ¼üʱ´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/onkeydown.html">onkeydown</A></TD> <TD>µ±Óû§°´Ï¼üÅ̰´¼üʱ´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/onkeypress.html">onkeypress</A></TD> <TD>µ±Óû§°´ÏÂ×ÖÃæ¼üʱ´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/onkeyup.html">onkeyup</A></TD> <TD>µ±Óû§ÊͷżüÅ̰´¼üʱ´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/onlosecapture.html">onlosecapture</A></TD> <TD>µ±<span replace="1">¶ÔÏó</span>ʧȥÊó±ê²¶×½Ê±´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/onmousedown.html">onmousedown</A></TD> <TD>µ±Óû§ÓÃÈκÎÊó±ê°´Å¥µ¥»÷<span replace="1">¶ÔÏó</span>ʱ´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/onmouseenter.html">onmouseenter</A></TD> <TD>µ±Óû§½«Êó±êÖ¸ÕëÒÆ¶¯µ½¶ÔÏóÄÚʱ´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/onmouseleave.html">onmouseleave</A></TD> <TD>µ±Óû§½«Êó±êÖ¸ÕëÒÆ³ö<span replace="1">¶ÔÏó</span>±ß½çʱ´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/onmousemove.html">onmousemove</A></TD> <TD>µ±Óû§½«Êó±ê»®¹ý<span replace="1">¶ÔÏó</span>ʱ´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/onmouseout.html">onmouseout</A></TD> <TD>µ±Óû§½«Êó±êÖ¸ÕëÒÆ³ö<span replace="1">¶ÔÏó</span>±ß½çʱ´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/onmouseover.html">onmouseover</A></TD> <TD>µ±Óû§½«Êó±êÖ¸ÕëÒÆ¶¯µ½<span replace="1">¶ÔÏó</span>ÄÚʱ´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/onmouseup.html">onmouseup</A></TD> <TD>µ±Óû§ÔÚÊó±êλÓÚ<span replace="1">¶ÔÏó</span>Ö®ÉÏʱÊÍ·ÅÊó±ê°´Å¥Ê±´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/onmousewheel.html">onmousewheel</A><IMG SRC="../common/new.gif" WIDTH="21" HEIGHT="11" BORDER=0 ALT="Microsoft&reg; Internet Explorer 6 ÐÂÔö"></TD> <TD>µ±Êó±ê¹öÂÖ°´Å¥Ðýתʱ´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/onmove.html">onmove</A></TD> <TD>µ±<span replace="1">¶ÔÏó</span>ÒÆ¶¯Ê±´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/onmoveend.html">onmoveend</A></TD> <TD>µ±<span replace="1">¶ÔÏó</span>Í£Ö¹ÒÆ¶¯Ê±´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/onmovestart.html">onmovestart</A></TD> <TD>µ±<span replace="1">¶ÔÏó</span>¿ªÊ¼Òƶ¯Ê±´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/onpaste.html">onpaste</A></TD> <TD>µ±Óû§Õ³ÌùÊý¾ÝÒÔ±ã´Óϵͳ¼ôÌù°åÏòÎĵµ´«ËÍÊý¾ÝʱÔÚÄ¿±ê¶ÔÏóÉÏ´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/onpropertychange.html">onpropertychange</A></TD> <TD>µ±ÔÚ¶ÔÏóÉÏ·¢Éú<span replace="1">¶ÔÏó</span>ÉÏ·¢ÉúÊôÐÔ¸ü¸Äʱ´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/onreadystatechange.html">onreadystatechange</A></TD> <TD>µ±<span replace="1">¶ÔÏó</span>״̬±ä¸üʱ´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/onresize.html">onresize</A></TD> <TD>µ±<span replace="1">¶ÔÏó</span>µÄ´óС½«Òª¸Ä±äʱ´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/onresizeend.html">onresizeend</A></TD> <TD>µ±Óû§¸ü¸ÄÍê¿Ø¼þÑ¡ÖÐÇøÖÐ<span replace="1">¶ÔÏó</span>µÄ³ß´çʱ´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/onresizestart.html">onresizestart</A></TD> <TD>µ±Óû§¿ªÊ¼¸ü¸Ä¿Ø¼þÑ¡ÖÐÇøÖÐ<span replace="1">¶ÔÏó</span>µÄ³ß´çʱ´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../events/onselectstart.html">onselectstart</A></TD> <TD><span replace="1">¶ÔÏó</span>½«Òª±»Ñ¡ÖÐʱ´¥·¢¡£</TD> </TR> <TR> <TD><A HREF="../time2/events/ontimeerror.html">ontimeerror</A></TD> <TD>µ±Ìض¨Ê±¼ä´íÎó·¢ÉúʱÎÞÌõ¼þ´¥·¢£¬Í¨³£Óɽ«ÊôÐÔÉèÖÃΪÎÞЧֵµ¼Ö¡£</TD> </TR> </TABLE> </DIV> <P CLASS="clsRef" STYLE="display:none">Â˾µ</P> <DIV tabName="Â˾µ" style="visibility:visible"> <TABLE CLASS="clsStd" width="100%" STYLE="BACKGROUND: #FFFFFF"> <TR><TH>Â˾µÊôÐÔ</TH><TH>ÃèÊö</TH></TR> <TR> <TD><A HREF="../filters/alpha.html">Alpha</A></TD> <TD>µ÷Õû<span replace="1">¶ÔÏó</span>ÄÚÈݵIJ»Í¸Ã÷¶È¡£</TD> </TR> <TR> <TD><A HREF="../filters/AlphaImageLoader.html">AlphaImageLoader</A></TD> <TD>ÔÚ<span replace="1">¶ÔÏó</span>µÄ±ß½çºÍ¶ÔÏó±³¾°µ½ÄÚÈÝÖ®¼äÏÔʾͼÏñ£¬¿ÉÑ¡¼ô²Ã»òËõ·ÅͼÏñ´óС¡£µ±×°Èë±ãÐ¯ÍøÂçͼÏñ(PNG)ʱ£¬´Ó 0 µ½ 100% µÄ ͸Ã÷¶È¶¼ÊÇÖ§³ÖµÄ¡£</TD> </TR> <TR> <TD><A HREF="../filters/Barn.html">Barn</A></TD> <TD>ÒÔ¿ªÃÅ»ò¹ØÃŵÄÔ˶¯·½Ê½ÏÔʾ<span replace="1">¶ÔÏó</span>µÄÐÂÄÚÈÝ¡£</TD> </TR> <TR> <TD><A HREF="../filters/BasicImage.html">BasicImage</A></TD> <TD>µ÷Õû<span replace="1">¶ÔÏó</span>ÄÚÈݵÄÑÕÉ«´¦Àí¡¢Í¼ÏñÐýת»ò²»Í¸Ã÷¶È¡£</TD> </TR> <TR> <TD><A HREF="../filters/blendTrans.html">BlendTrans</A></TD> <TD>ÒÔ½¥ÒþԭʼÄÚÈݵÄÐÎʽÏÔʾ<span replace="1">¶ÔÏó</span>µÄÐÂÄÚÈÝ¡£</TD> </TR> <TR> <TD><A HREF="../filters/Blinds.html">Blinds</A></TD> <TD>ÒÔ´ò¿ª»ò¹Ø±ÕäµãµÄÔ˶¯·½Ê½ÏÔʾ<span replace="1">¶ÔÏó</span>µÄÐÂÄÚÈÝ¡£</TD> </TR> <TR> <TD><A HREF="../filters/Blur_1.html">Blur</A></TD> <TD>Ä£ºý<span replace="1">¶ÔÏó</span>µÄÄÚÈÝÒÔ±ãʹÆä¿´ÆðÀ´Ê§È¥½¹µã¡£</TD> </TR> <TR> <TD><A HREF="../filters/CheckerBoard.html">CheckerBoard</A></TD> <TD>ÒÔ½Ò¿ª¸²¸ÇÔÚԭʼÄÚÈÝÉÏµÄÆåÅ̵ÄÐÎʽÏÔʾ<span replace="1">¶ÔÏó</span>µÄÐÂÄÚÈÝ¡£</TD> </TR> <TR> <TD><A HREF="../filters/chroma.html">Chroma</A></TD> <TD>½«<span replace="1">¶ÔÏó</span>ÄÚÈݵÄÖ¸¶¨ÑÕÉ«ÏÔʾΪ͸Ã÷¡£</TD> </TR> <TR> <TD><A HREF="../filters/Composite.html">Compositor</A></TD> <TD>ÒÔоÉÄÚÈÝÂß¼­ÑÕÉ«×éºÏµÄÐÎʽÏÔʾ<span replace="1">¶ÔÏó</span>µÄÐÂÄÚÈÝ¡£Ã¿¸ö°æ±¾µÄÑÕÉ«ºÍ alpha Öµ¶¼»á±»¼ÆËãÓÃÀ´¾ö¶¨Êä³öͼÏñµÄ×îÖÕÑÕÉ«¡£</TD> </TR> <TR> <TD><A HREF="../filters/dropShadow.html">DropShadow</A></TD> <TD>´´½¨<span replace="1">¶ÔÏó</span>ÄÚÈݵÄʵÌåÒõÓ°£¬Æ«ÒÆÁ¿Î»ÓÚÖ¸¶¨·½Ïò¡£Õ⽫ʹµÃÄÚÈÝ¿´ÆðÀ´ÊǸ¡¶¯µÄÒò´Ë»á²úÉúÒõÓ°¡£</TD> </TR> <TR> <TD><A HREF="../filters/Emboss.html">Emboss</A></TD> <TD>ʹÓûҶÈÖµ¶Ô<span replace="1">¶ÔÏó</span>ÒÔ¸¡µñÎÆÀíÏÔʾ¡£</TD> </TR> <TR> <TD><A HREF="../filters/Engrave.html">Engrave</A></TD> <TD>ʹÓûҶÈÖµ¶Ô<span replace="1">¶ÔÏó</span>ÒÔµñ¿ÌÎÆÀíÏÔʾ¡£</TD> </TR> <TR> <TD><A HREF="../filters/Fade.html">Fade</A></TD> <TD>ÒÔ½¥ÒþԭʼÄÚÈݵÄÐÎʽÏÔʾ<span replace="1">¶ÔÏó</span>µÄÐÂÄÚÈÝ¡£</TD> </TR> <TR> <TD><A HREF="../filters/flipH.html">FlipH</A></TD> <TD>ÒÔÑØË®Æ½·½Ïò·­×ªµÄÐÎʽÏÔʾ<span replace="1">¶ÔÏó</span>ÄÚÈÝ¡£</TD> </TR> <TR> <TD><A HREF="../filters/flipV.html">FlipV</A></TD> <TD>ÒÔÑØ´¹Ö±·½Ïò·­×ªµÄÐÎʽÏÔʾ<span replace="1">¶ÔÏó</span>ÄÚÈÝ¡£</TD> </TR> <TR> <TD><A HREF="../filters/glow.html">Glow</A></TD> <TD>ÔÚ<span replace="1">¶ÔÏó</span>±ßÔµÍâ²àÌí¼Ó¹âÔÎÒÔ±ãʹÆä¿´ÆðÀ´Ïñ·¢¹âµÄÑù×Ó¡£</TD> </TR> <TR> <TD><A HREF="../filters/Gradient.html">Gradient</A></TD> <TD>ÔÚ<span replace="1">¶ÔÏó</span>µÄ±³¾°ºÍÄÚÈÝÖ®¼äÏÔʾһ¸ö½¥±äÉ«²ÊµÄ±íÃæ¡£</TD> </TR> <TR> <TD><A HREF="../filters/GradientWipe.html">GradientWipe</A></TD> <TD>ÒÔÔÚÔ­ÓÐÄÚÈÝÉϸ²¸Ç½¥±ä´øµÄÐÎʽÏÔʾ<span replace="1">¶ÔÏó</span>µÄÐÂÄÚÈÝ¡£</TD> </TR> <TR> <TD><A HREF="../filters/gray.html">Gray</A></TD> <TD>ÒÔ»Ò¶ÈÏÔʾ<span replace="1">¶ÔÏó</span>ÄÚÈÝ¡£</TD> </TR> <TR> <TD><A HREF="../filters/ICMFilter.html">ICMFilter</A></TD> <TD>¸ù¾ÝͼÏñÑÕÉ«¹ÜÀí(ICM)ÅäÖÃÎļþת»»<span replace="1">¶ÔÏó</span>µÄ²ÊÉ«ÄÚÈÝ¡£Õ⽫ÔÊÐíÖ¸¶¨ÄÚÈݵÄÏÔʾЧ¹ûµÃÒÔ¸ÄÉÆ£¬»òÕßÔÚ´òÓ¡»ú»ò¼àÊÓÆ÷µÈÓ²¼þÉ豸ÉÏÄ£ÄâÏÔʾ¡£</TD> </TR> <TR> <TD><A HREF="../filters/Inset.html">Inset</A></TD> <TD>ÒÔ¶Ô½ÇÏß·½ÏòÏÔʾ<span replace="1">¶ÔÏó</span>µÄÐÂÄÚÈÝ¡£</TD> </TR> <TR> <TD><A HREF="../filters/invert.html">Invert</A></TD> <TD>·´×ª<span replace="1">¶ÔÏó</span>ÄÚÈݵÄÉ«µ÷¡¢±¥ºÍ¶ÈºÍÁÁ¶È¡£</TD> </TR> <TR> <TD><A HREF="../filters/Iris.html">Iris</A></TD> <TD>ÒԲʺçЧ¹ûÏÔʾ<span replace="1">¶ÔÏó</span>µÄÐÂÄÚÈÝ£¬ÕâÓëÕÕÏà»ú¹âȦ´ò¿ªÏàËÆ¡£</TD> </TR> <TR> <TD><A HREF="../filters/light.html">Light</A></TD> <TD>ÔÚ<span replace="1">¶ÔÏó</span>µÄÄÚÈÝÉÏ´´½¨µÆ¹âЧ¹û¡£</TD> </TR> <TR> <TD><A HREF="../filters/mask.html">MaskFilter</A></TD> <TD>½«<span replace="1">¶ÔÏó</span>ÄÚÈݵÄ͸Ã÷ÏñËØÏÔʾΪ²ÊÉ«ÕÚÕÖ£¬½«·Ç͸Ã÷ÏñËØÏÔʾΪ͸Ã÷¡£</TD> </TR> <TR> <TD><A HREF="../filters/Matrix.html">Matrix</A></TD> <TD>ʹÓþØÕó±ä»»Ëõ·Å¡¢Ðýת»òÏÔÏÖ<span replace="1">¶ÔÏó</span>µÄÄÚÈÝ¡£</TD> </TR> <TR> <TD><A HREF="../filters/blur.html">MotionBlur</A></TD> <TD>ÒÔÔ˶¯Ä£ºýµÄЧ¹ûÏÔʾ<span replace="1">¶ÔÏó</span>ÄÚÈÝ¡£</TD> </TR> <TR> <TD><A HREF="../filters/Pixelate.html">Pixelate</A></TD> <TD>½«<span replace="1">¶ÔÏó</span>µÄÄÚÈÝÏÔʾΪ²ÊÉ«·½¿é£¬ÆäÑÕɫȡ¾öÓڸ÷½¿éËùÌæ´úÇøÓòµÄƽ¾ùÑÕɫֵ¡£´ËÂ˾µÏÔʾ¿ÉÓÃÓÚÇл»¡£</TD> </TR> <TR> <TD><A HREF="../filters/RadialWipe.html">RadialWipe</A></TD> <TD>ÒÔ·øÉä×´²Á³ýµÄÐÎʽÏÔÏÖ<span replace="1">¶ÔÏó</span>µÄÐÂÄÚÈÝ¡£</TD> </TR> <TR> <TD><A HREF="../filters/RandomBars.html">RandomBars</A></TD> <TD>ÒÔËæ»úÏñËØÏß±¬Õ¨µÄÐÎʽÏÔÏÖ<span replace="1">¶ÔÏó</span>µÄÐÂÄÚÈÝ¡£</TD> </TR> <TR> <TD><A HREF="../filters/RandomDissolve.html">RandomDissolve</A></TD> <TD>ÒÔËæ»úÏñËØ±¬Õ¨µÄÐÎʽÏÔÏÖ<span replace="1">¶ÔÏó</span>µÄÐÂÄÚÈÝ¡£</TD> </TR> <TR> <TD><A HREF="../filters/redirect.html">Redirect</A></TD> <TD>Ŀǰ»¹²»Ö§³Ö¡£</TD> </TR> <TR> <TD><A HREF="../filters/revealTrans.html">RevealTrans</A></TD> <TD>ʹÓà 24 ÖÖÔ¤Ïȶ¨ÒåµÄ<A HREF="../properties/transition.html">Çл»</A>Ч¹ûÏÔÏÖ<span replace="1">¶ÔÏó</span>µÄÐÂÄÚÈÝ¡£</TD> </TR> <TR> <TD><A HREF="../filters/shadow.html">Shadow</A></TD> <TD>´´½¨<span replace="1">¶ÔÏó</span>ÄÚÈݵÄʵÌåÒõÓ°£¬Æ«ÒÆÁ¿Î»ÓÚÖ¸¶¨·½Ïò¡£Õ⽫´´½¨ÒõӰЧ¹û¡£</TD> </TR> <TR> <TD><A HREF="../filters/Slide.html">Slide</A></TD> <TD>ÒÔͼÏñ»¬ÐеÄÐÎʽÏÔÏÖ<span replace="1">¶ÔÏó</span>µÄÐÂÄÚÈÝ¡£</TD> </TR> <TR> <TD><A HREF="../filters/Spiral.html">Spiral</A></TD> <TD>ÒÔÂÝÐýÔ˶¯µÄÐÎʽÏÔÏÖ<span replace="1">¶ÔÏó</span>µÄÐÂÄÚÈÝ¡£</TD> </TR> <TR> <TD><A HREF="../filters/Stretch.html">Stretch</A></TD> <TD>ÒÔÀ­É츲¸ÇԭʼÄÚÈݵÄÐÎʽÏÔÏÖ<span replace="1">¶ÔÏó</span>µÄÐÂÄÚÈÝ¡£ÓÐÒ»¸öÑ¡ÏîÀàËÆÁ¢·½Ìå´ÓÒ»¸ö±íÃæ×ªµ½ÁíÍâÒ»¸ö±íÃæ¡£</TD> </TR> <TR> <TD><A HREF="../filters/Strips.html">Strips</A></TD> <TD>ÒÔÌõÐθ²¸ÇµÄÐÎʽÏÔÏÖ<span replace="1">¶ÔÏó</span>µÄԭʼÄÚÈÝ£¬ºÃÏñÓÐÒ»°Ñ¾â½«Ô­Ê¼ÄÚÈݾ⿪¡£</TD> </TR> <TR> <TD><A HREF="../filters/wave.html">Wave</A></TD> <TD>ÔÚ<span replace="1">¶ÔÏó</span>µÄÄÚÈÝÉÏÖ´Ðд¹Ö±·½ÏòµÄÕýÏÒ²¨Å¤Çú¡£</TD> </TR> <TR> <TD><A HREF="../filters/Wheel.html">Wheel</A></TD> <TD>ÒÔÐýתÔ˶¯µÄÐÎʽÏÔÏÖ<span replace="1">¶ÔÏó</span>µÄÐÂÄÚÈÝ£¬ºÃÏñÂÖ×Ó¹ö¹ýԭʼÄÚÈÝ¡£</TD> </TR> <TR> <TD><A HREF="../filters/xray.html">Xray</A></TD> <TD>¸ü¸Ä<span replace="1">¶ÔÏó</span>ÄÚÈݵÄÑÕÉ«Éî¶È½«ÆäÒÔºÚ°×ÏÔʾ¡£</TD> </TR> <TR> <TD><A HREF="../filters/Zigzag.html">Zigzag</A></TD> <TD>ÔÚ<span replace="1">¶ÔÏó</span>ÉϽ«¶ÔÏóµÄÐÂÄÚÈݽøÐÐÀ´»ØÒƶ¯ÒԱ㸲¸ÇԭʼÄÚÈÝ¡£</TD> </TR> </TABLE> </DIV> <P CLASS="clsRef" STYLE="display:none">·½·¨</P> <DIV tabName="·½·¨" style="visibility:visible"> <TABLE CLASS="clsStd" width="100%" STYLE="BACKGROUND: #FFFFFF"> <TR><TH>·½·¨</TH><TH>ÃèÊö</TH></TR> <TR> <TD><A HREF="../methods/addBehavior.html">addBehavior</A></TD> <TD>¸ø<span replace="1">ÔªËØ</span>¸½¼ÓÒ»¸ö<A HREF="../../../behaviors/overview.html">ÐÐΪ</A>¡£</TD> </TR> <TR> <TD><A HREF="../methods/appendChild.html">appendChild</A></TD> <TD>¸ø<span replace="1">¶ÔÏó</span>×·¼ÓÒ»¸ö×ÓÔªËØ¡£</TD> </TR> <TR> <TD><A HREF="../methods/applyElement.html">applyElement</A></TD> <TD>ʹµÃ<span replace="1">ÔªËØ</span>³ÉΪÆäËüÔªËØµÄ×ÓÔªËØ»ò¸¸ÔªËØ¡£</TD> </TR> <TR> <TD><A HREF="../methods/attachEvent.html">attachEvent</A></TD> <TD>½«Ö¸¶¨º¯Êý°ó¶¨µ½Ê¼þ£¬ÒÔ±ãÿµ±¸ÃʼþÔÚ¶ÔÏóÉÏ´¥·¢Ê±¶¼µ÷Óøú¯Êý¡£</TD> </TR> <TR> <TD><A HREF="../methods/blur.html">blur</A></TD> <TD>ʹ<span replace="1">ÔªËØ</span>ʧȥ½¹µã²¢´¥·¢ <A HREF="../events/onblur.html">onblur</A> ʼþ¡£</TD> </TR> <TR> <TD><A HREF="../methods/clearAttributes.html">clearAttributes</A></TD> <TD>´Ó<span replace="1">¶ÔÏó</span>ÖÐɾ³ýÈ«²¿±êÇ©ÊôÐÔºÍÖµ¡£</TD> </TR> <TR> <TD><A HREF="../methods/click.html">click</A></TD> <TD>´¥·¢ <A HREF="../events/onclick.html">onclick</A> ʼþÀ´Ä£Äâµ¥»÷¡£</TD> </TR> <TR> <TD><A HREF="../methods/cloneNode.html">cloneNode</A></TD> <TD>´ÓÎĵµ²ã´ÎÖи´ÖƶÔ<span replace="1">¶ÔÏó</span>µÄÒýÓá£</TD> </TR> <TR> <TD><A HREF="../methods/componentFromPoint.html">componentFromPoint</A></TD> <TD>ͨ¹ýÌØ¶¨Ê¼þ·µ»Ø¶ÔÏóÔÚÖ¸¶¨×ø±êϵÄλÖá£</TD> </TR> <TR> <TD><A HREF="../methods/contains.html">contains</A></TD> <TD>¼ì²é<span replace="1">¶ÔÏó</span>ÖÐÊÇ·ñ°üº¬¸ø¶¨ÔªËØ¡£</TD> </TR> <TR> <TD><A HREF="../methods/detachEvent.html">detachEvent</A></TD> <TD>´ÓʼþÖÐÈ¡ÏûÖ¸¶¨º¯ÊýµÄ°ó¶¨£¬ÕâÑùµ±Ê¼þ´¥·¢Ê±º¯Êý¾Í²»»áÊÕµ½Í¨ÖªÁË¡£</TD> </TR> <TR> <TD><A HREF="../methods/fireEvent.html">fireEvent</A></TD> <TD>´¥·¢<span replace="1">¶ÔÏó</span>µÄÖ¸¶¨Ê¼þ¡£</TD> </TR> <TR> <TD><A HREF="../methods/focus.html">focus</A></TD> <TD>ʹµÃÔªËØµÃµ½½¹µã²¢Ö´ÐÐÓÉ <A HREF="../events/onfocus.html">onfocus</A> ʼþÖ¸¶¨µÄ´úÂë¡£</TD> </TR> <TR> <TD><A HREF="../methods/getAdjacentText.html">getAdjacentText</A></TD> <TD>·µ»ØÁÚ½ÓÎı¾×Ö·û´®¡£</TD> </TR> <TR> <TD><A HREF="../methods/getAttribute.html">getAttribute</A></TD> <TD>»ñȡָ¶¨±êÇ©ÊôÐÔµÄÖµ¡£</TD> </TR> <TR> <TD><A HREF="../methods/getAttributeNode.html">getAttributeNode</A><IMG SRC="../common/new.gif" WIDTH="21" HEIGHT="11" BORDER=0 ALT="Microsoft&reg; Internet Explorer 6 ÐÂÔö"></TD> <TD>»ñÈ¡ÓÉ <B>attribute</B>.<A HREF="../properties/name_2.html">name</A> ÊôÐÔÒýÓÃµÄ <A HREF="attribute.html">attribute</A> ¶ÔÏó¡£</TD> </TR> <TR> <TD><A HREF="../methods/getBoundingClientRect.html">getBoundingClientRect</A></TD> <TD>»ñȡָ¶¨ <A HREF="TextRectangle.html">TextRectangle</A> ¶ÔÏ󼯺ϰ󶨵ĶÔÏó¡£</TD> </TR> <TR> <TD><A HREF="../methods/getClientRects.html">getClientRects</A></TD> <TD>»ñÈ¡ÃèÊö¶ÔÏóÄÚÈÝ»ò¿Í»§ÇøÄÚ²¼¾ÖµÄ¾ØÐμ¯ºÏ¡£Ã¿¸ö¾ØÐζ¼ÃèÊöÁËÒ»ÌõÖ±Ïß¡£</TD> </TR> <TR> <TD><A HREF="../methods/getElementsByTagName.html">getElementsByTagName</A></TD> <TD>»ñÈ¡»ùÓÚÖ¸¶¨ÔªËØÃû³ÆµÄ¶ÔÏ󼯺ϡ£</TD> </TR> <TR> <TD><A HREF="../methods/getExpression.html">getExpression</A></TD> <TD>»ñÈ¡¸ø¶¨ÊôÐԵıí´ïʽ¡£</TD> </TR> <TR> <TD><A HREF="../methods/hasChildNodes.html">hasChildNodes</A></TD> <TD>·µ»Ø±íÃ÷<span replace="1">¶ÔÏó</span>ÊÇ·ñÓÐ×Ó¶ÔÏóµÄÖµ¡£</TD> </TR> <TR> <TD><A HREF="../methods/insertAdjacentElement.html">insertAdjacentElement</A></TD> <TD>ÔÚÖ¸¶¨Î»ÖòåÈëÔªËØ¡£</TD> </TR> <TR> <TD><A HREF="../methods/insertAdjacentHTML.html">insertAdjacentHTML</A></TD> <TD>ÔÚÖ¸¶¨Î»ÖõÄÔªËØÖвåÈë¸ø¶¨µÄ HTML Îı¾¡£</TD> </TR> <TR> <TD><A HREF="../methods/insertAdjacentText.html">insertAdjacentText</A></TD> <TD>ÔÚÖ¸¶¨Î»ÖòåÈë¸ø¶¨µÄÎı¾¡£</TD> </TR> <TR> <TD><A HREF="../methods/insertBefore.html">insertBefore</A></TD> <TD>ÔÚÎĵµ²ã´ÎÖвåÈëÔªËØ¡£</TD> </TR> <TR> <TD><A HREF="../methods/mergeAttributes.html">mergeAttributes</A></TD> <TD>¸´ÖÆËùÓжÁ/д±êÇ©ÊôÐÔµ½Ö¸¶¨ÔªËØ¡£</TD> </TR> <TR> <TD><A HREF="../methods/normalize.html">normalize</A><IMG SRC="../common/new.gif" WIDTH="21" HEIGHT="11" BORDER=0 ALT="Microsoft&reg; Internet Explorer 6 ÐÂÔö"></TD> <TD>ºÏ²¢ÁÚ½Ó <B>TextNode</B> ¶ÔÏóÒÔ±ãÉú³ÉÒ»¸ö³£¹æµÄÎĵµ¶ÔÏóÄ£ÐÍ¡£</TD> </TR> <TR> <TD><A HREF="../methods/releaseCapture.html">releaseCapture</A></TD> <TD>Êͷŵ±Ç°ÎĵµÖÐ<span replace="1">¶ÔÏó</span>µÄÊó±ê²¶×½¡£</TD> </TR> <TR> <TD><A HREF="../methods/removeAttribute.html">removeAttribute</A></TD> <TD>ɾ³ý<span replace="1">¶ÔÏó</span>µÄ¸ø¶¨±êÇ©ÊôÐÔ¡£</TD> </TR> <TR> <TD><A HREF="../methods/removeAttributeNode.html">removeAttributeNode</A><IMG SRC="../common/new.gif" WIDTH="21" HEIGHT="11" BORDER=0 ALT="Microsoft&reg; Internet Explorer 6 ÐÂÔö"></TD> <TD>´Ó¶ÔÏóÖÐɾ³ýɾ³ý <B>attribute</B> ¶ÔÏó¡£</TD> </TR> <TR> <TD><A HREF="../methods/removeBehavior.html">removeBehavior</A></TD> <TD>·ÖÀë<span replace="1">ÔªËØ</span>µÄ<B>ÐÐΪ</B>¡£</TD> </TR> <TR> <TD><A HREF="../methods/removeChild.html">removeChild</A></TD> <TD>´ÓÔªËØÉÏɾ³ý×Ó½áµã¡£</TD> </TR> <TR> <TD><A HREF="../methods/removeExpression.html">removeExpression</A></TD> <TD>´ÓÖ¸¶¨ÊôÐÔÖÐɾ³ý±í´ïʽ¡£</TD> </TR> <TR> <TD><A HREF="../methods/removeNode.html">removeNode</A></TD> <TD>´ÓÎĵµ²ã´ÎÖÐɾ³ý<span replace="1">¶ÔÏó</span>¡£</TD> </TR> <TR> <TD><A HREF="../methods/replaceAdjacentText.html">replaceAdjacentText</A></TD> <TD>Ìæ»»ÔªËصÄÁÚ½ÓÎı¾¡£</TD> </TR> <TR> <TD><A HREF="../methods/replaceChild.html">replaceChild</A></TD> <TD>ÓÃеÄ×ÓÔªËØÌæ»»ÒÑÓеÄ×ÓÔªËØ¡£</TD> </TR> <TR> <TD><A HREF="../methods/replaceNode.html">replaceNode</A></TD> <TD>ÓÃÆäËüÔªËØÌæ»»<span replace="1">¶ÔÏó</span>¡£</TD> </TR> <TR> <TD><A HREF="../methods/scrollIntoView.html">scrollIntoView</A></TD> <TD>½«<span replace="1">¶ÔÏó</span>¹ö¶¯µ½¿É¼û·¶Î§ÄÚ£¬½«ÆäÅÅÁе½´°¿Ú¶¥²¿»òµ×²¿¡£</TD> </TR> <TR> <TD><A HREF="../methods/setActive.html">setActive</A></TD> <TD>ÉèÖÃ<span replace="1">¶ÔÏó</span>Ϊµ±Ç°¶ÔÏó¶ø²»½«¶ÔÏóÖÃΪ½¹µã¡£</TD> </TR> <TR> <TD><A HREF="../methods/setAttribute.html">setAttribute</A></TD> <TD>ÉèÖÃÖ¸¶¨±êÇ©ÊôÐÔµÄÖµ¡£</TD> </TR> <TR> <TD><A HREF="../methods/setAttributeNode.html">setAttributeNode</A><IMG SRC="../common/new.gif" WIDTH="21" HEIGHT="11" BORDER=0 ALT="Microsoft&reg; Internet Explorer 6 ÐÂÔö"></TD> <TD>ÉèÖà <B>attribute</B> ¶ÔÏóΪ¶ÔÏóµÄÒ»²¿·Ö¡£</TD> </TR> <TR> <TD><A HREF="../methods/setCapture.html">setCapture</A></TD> <TD>ÉèÖÃÊôÓÚµ±Ç°ÎĵµµÄ<span replace="1">¶ÔÏó</span>µÄÊó±ê²¶×½¡£</TD> </TR> <TR> <TD><A HREF="../methods/setExpression.html">setExpression</A></TD> <TD>ÉèÖÃÖ¸¶¨¶ÔÏóµÄ±í´ïʽ¡£</TD> </TR> <TR> <TD><A HREF="../methods/swapNode.html">swapNode</A></TD> <TD>½»»»Îĵµ²ã´ÎÖÐÁ½¸ö¶ÔÏóµÄλÖá£</TD> </TR> </TABLE> </DIV> <P CLASS="clsRef" STYLE="display:none">¶ÔÏó</P> <DIV tabName="¶ÔÏó" style="visibility:visible"> <TABLE CLASS="clsStd" width="100%" STYLE="BACKGROUND: #FFFFFF"> <TR><TH>¶ÔÏó</TH><TH>ÃèÊö</TH></TR> <TR> <TD><A HREF="currentStyle.html">currentStyle</A></TD> <TD>´ú±íÁËÔÚÈ«¾ÖÑùʽ±í¡¢ÄÚǶÑùʽºÍ HTML ±êÇ©ÊôÐÔÖÐÖ¸¶¨µÄ<span replace="1">¶ÔÏó</span>¸ñʽºÍÑùʽ¡£</TD> </TR> <TR> <TD><A HREF="runtimeStyle.html">runtimeStyle</A></TD> <TD>´ú±íÁ˾ÓÓÚÈ«¾ÖÑùʽ±í¡¢ÄÚǶÑùʽºÍ HTML ±êÇ©ÊôÐÔÖ¸¶¨µÄ¸ñʽºÍÑùʽ֮ÉϵÄ<span replace="1">¶ÔÏó</span>µÄ¸ñʽºÍÑùʽ¡£</TD> </TR> <TR> <TD><A HREF="obj_style.html">style</A></TD> <TD>´ú±íÁ˸ø¶¨ÔªËØËùÓпÉÄܵÄÄÚǶÑùʽµÄµ±Ç°ÉèÖá£</TD> </TR> </TABLE> </DIV> <P CLASS="clsRef" STYLE="display:none">Ñùʽ</P> <DIV tabName="Ñùʽ" style="visibility:visible"> <TABLE CLASS="clsStd" width="100%" STYLE="BACKGROUND: #FFFFFF"> <TR><TH>Ñùʽ±êÇ©ÊôÐÔ</TH><TH>ÑùʽÊôÐÔ</TH><TH>ÃèÊö</TH></TR> <TR> <TD><A HREF="../properties/accelerator.html">ACCELERATOR</A></TD> <TD><A HREF="../properties/accelerator.html">accelerator</A></TD> <TD>ÉèÖûò»ñÈ¡±íÃ÷<span replace="1">¶ÔÏó</span>ÊÇ·ñ°üº¬¿ì½Ý¼üµÄ×Ö·û´®¡£</TD> </TR> <TR> <TD><A HREF="../properties/background_0.html">background</A></TD> <TD><A HREF="../properties/background_0.html">background</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>×î¶àÎå¸ö¶ÀÁ¢µÄ±³¾°ÊôÐÔ¡£</TD> </TR> <TR> <TD><A HREF="../properties/backgroundAttachment.html">background-attachment</A></TD> <TD><A HREF="../properties/backgroundAttachment.html">backgroundAttachment</A></TD> <TD>ÉèÖûò»ñÈ¡±³¾°Í¼ÏñÈçºÎ¸½¼Óµ½ÎĵµÄÚµÄ<span replace="1">¶ÔÏó</span>ÖС£</TD> </TR> <TR> <TD><A HREF="../properties/backgroundColor.html">background-color</A></TD> <TD><A HREF="../properties/backgroundColor.html">backgroundColor</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>ÄÚÈݺóµÄÑÕÉ«¡£</TD> </TR> <TR> <TD><A HREF="../properties/backgroundImage.html">background-image</A></TD> <TD><A HREF="../properties/backgroundImage.html">backgroundImage</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>µÄ±³¾°Í¼Ïñ¡£</TD> </TR> <TR> <TD><A HREF="../properties/backgroundposition.html">background-position</A></TD> <TD><A HREF="../properties/backgroundposition.html">backgroundPosition</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>±³¾°µÄλÖá£</TD> </TR> <TR> <TD><A HREF="../properties/backgroundPositionX.html">background-position-x</A></TD> <TD><A HREF="../properties/backgroundPositionX.html">backgroundPositionX</A></TD> <TD>ÉèÖûò»ñÈ¡ <A HREF="../properties/backgroundposition.html">backgroundPosition</A> ÊôÐ﵀ x ×ø±ê¡£</TD> </TR> <TR> <TD><A HREF="../properties/backgroundPositionY.html">background-position-y</A></TD> <TD><A HREF="../properties/backgroundPositionY.html">backgroundPositionY</A></TD> <TD>ÉèÖûò»ñÈ¡ <B>backgroundPosition</B> ÊôÐ﵀ y ×ø±ê¡£</TD> </TR> <TR> <TD><A HREF="../properties/backgroundRepeat.html">background-repeat</A></TD> <TD><A HREF="../properties/backgroundRepeat.html">backgroundRepeat</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>µÄ <A HREF="../properties/backgroundImage.html">backgroundImage</A> ÊôÐÔÈçºÎƽÆÌ¡£</TD> </TR> <TR> <TD><A HREF="../properties/behavior_1.html">behavior</A></TD> <TD><A HREF="../properties/behavior_1.html">behavior</A></TD> <TD>ÉèÖûò»ñÈ¡ <B>DHTML ÐÐΪ</B>µÄλÖá£</TD> </TR> <TR> <TD><A HREF="../properties/border_0.html">border</A></TD> <TD><A HREF="../properties/border_0.html">border</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>ÖÜΧ±ß¿òµÄ»æÖÆÊôÐÔ¡£</TD> </TR> <TR> <TD><A HREF="../properties/borderBottom.html">border-bottom</A></TD> <TD><A HREF="../properties/borderBottom.html">borderBottom</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>ϱ߿òµÄÊôÐÔ¡£</TD> </TR> <TR> <TD><A HREF="../properties/borderBottomColor.html">border-bottom-color</A></TD> <TD><A HREF="../properties/borderBottomColor.html">borderBottomColor</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>ϱ߿òµÄÑÕÉ«¡£</TD> </TR> <TR> <TD><A HREF="../properties/borderBottomStyle.html">border-bottom-style</A></TD> <TD><A HREF="../properties/borderBottomStyle.html">borderBottomStyle</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>ϱ߿òµÄÑùʽ¡£</TD> </TR> <TR> <TD><A HREF="../properties/borderBottomWidth.html">border-bottom-width</A></TD> <TD><A HREF="../properties/borderBottomWidth.html">borderBottomWidth</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>ϱ߿òµÄ¿í¶È¡£</TD> </TR> <TR> <TD><A HREF="../properties/borderColor_0.html">border-color</A></TD> <TD><A HREF="../properties/borderColor_0.html">borderColor</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>µÄ±ß¿òÑÕÉ«¡£</TD> </TR> <TR> <TD><A HREF="../properties/borderLeft.html">border-left</A></TD> <TD><A HREF="../properties/borderLeft.html">borderLeft</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>×ó±ß¿òµÄÊôÐÔ¡£</TD> </TR> <TR> <TD><A HREF="../properties/borderLeftColor.html">border-left-color</A></TD> <TD><A HREF="../properties/borderLeftColor.html">borderLeftColor</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>×ó±ß¿òµÄÑÕÉ«¡£</TD> </TR> <TR> <TD><A HREF="../properties/borderLeftStyle.html">border-left-style</A></TD> <TD><A HREF="../properties/borderLeftStyle.html">borderLeftStyle</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>×ó±ß¿òµÄÑùʽ¡£</TD> </TR> <TR> <TD><A HREF="../properties/borderLeftWidth.html">border-left-width</A></TD> <TD><A HREF="../properties/borderLeftWidth.html">borderLeftWidth</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>×ó±ß¿òµÄ¿í¶È¡£</TD> </TR> <TR> <TD><A HREF="../properties/borderRight.html">border-right</A></TD> <TD><A HREF="../properties/borderRight.html">borderRight</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>Óұ߿òµÄÊôÐÔ¡£</TD> </TR> <TR> <TD><A HREF="../properties/borderRightColor.html">border-right-color</A></TD> <TD><A HREF="../properties/borderRightColor.html">borderRightColor</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>Óұ߿òµÄÑÕÉ«¡£</TD> </TR> <TR> <TD><A HREF="../properties/borderRightStyle.html">border-right-style</A></TD> <TD><A HREF="../properties/borderRightStyle.html">borderRightStyle</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>Óұ߿òµÄÑùʽ¡£</TD> </TR> <TR> <TD><A HREF="../properties/borderRightWidth.html">border-right-width</A></TD> <TD><A HREF="../properties/borderRightWidth.html">borderRightWidth</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>Óұ߿òµÄ¿í¶È¡£</TD> </TR> <TR> <TD><A HREF="../properties/borderStyle.html">border-style</A></TD> <TD><A HREF="../properties/borderStyle.html">borderStyle</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>ÉÏÏÂ×óÓұ߿òµÄÑùʽ¡£</TD> </TR> <TR> <TD><A HREF="../properties/borderTop.html">border-top</A></TD> <TD><A HREF="../properties/borderTop.html">borderTop</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>Éϱ߿òµÄÊôÐÔ¡£</TD> </TR> <TR> <TD><A HREF="../properties/borderTopColor.html">border-top-color</A></TD> <TD><A HREF="../properties/borderTopColor.html">borderTopColor</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>Éϱ߿òµÄÑÕÉ«¡£</TD> </TR> <TR> <TD><A HREF="../properties/borderTopStyle.html">border-top-style</A></TD> <TD><A HREF="../properties/borderTopStyle.html">borderTopStyle</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>Éϱ߿òµÄÑùʽ¡£</TD> </TR> <TR> <TD><A HREF="../properties/borderTopWidth.html">border-top-width</A></TD> <TD><A HREF="../properties/borderTopWidth.html">borderTopWidth</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>Éϱ߿òµÄ¿í¶È¡£</TD> </TR> <TR> <TD><A HREF="../properties/borderWidth.html">border-width</A></TD> <TD><A HREF="../properties/borderWidth.html">borderWidth</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>ÉÏÏÂ×óÓұ߿òµÄ¿í¶È¡£</TD> </TR> <TR> <TD><A HREF="../properties/bottom_1.html">bottom</A></TD> <TD><A HREF="../properties/bottom_1.html">bottom</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>Ïà¶ÔÓÚÎĵµ²ã´ÎÖÐϸö¶¨Î»¶ÔÏóµÄµ×²¿µÄλÖá£</TD> </TR> <TR> <TD><A HREF="../properties/clear_0.html">clear</A></TD> <TD><A HREF="../properties/clear_0.html">clear</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>ÊÇ·ñÔÊÐíÔÚÆä×ó²à¡¢ÓÒ²à»òÁ½±ß·ÅÖø¡¶¯¶ÔÏó£¬ÒÔ·À϶ÎÎı¾ÏÔʾÔÚ¸¡¶¯¶ÔÏóÉÏ¡£</TD> </TR> <TR> <TD><A HREF="../properties/clip.html">clip</A></TD> <TD><A HREF="../properties/clip.html">clip</A></TD> <TD>ÉèÖûò»ñÈ¡¶¨Î»<span replace="1">¶ÔÏó</span>µÄÄĸö²¿·Ö¿É¼û¡£</TD> </TR> <TR> <TD><A HREF="../properties/color_1.html">color</A></TD> <TD><A HREF="../properties/color_1.html">color</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>Îı¾µÄÑÕÉ«¡£</TD> </TR> <TR> <TD><A HREF="../properties/cursor.html">cursor</A></TD> <TD><A HREF="../properties/cursor.html">cursor</A></TD> <TD>ÉèÖûò»ñÈ¡µ±Êó±êÖ¸ÕëÖ¸Ïò<span replace="1">¶ÔÏó</span>ʱËùʹÓõÄÊó±êÖ¸Õë¡£</TD> </TR> <TR> <TD><A HREF="../properties/direction_1.html">direction</A></TD> <TD><A HREF="../properties/direction_1.html">direction</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>µÄÔĶÁ˳Ðò¡£</TD> </TR> <TR> <TD><A HREF="../properties/display.html">display</A></TD> <TD><A HREF="../properties/display.html">display</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>ÊÇ·ñÒªäÖȾ¡£</TD> </TR> <TR> <TD><A HREF="../properties/filter.html">filter</A></TD> <TD><A HREF="../properties/filter.html">filter</A></TD> <TD>ÉèÖûò»ñȡӦÓÃÓÚ<span replace="1">¶ÔÏó</span>µÄÂ˾µ»òÂ˾µ¼¯ºÏ¡£</TD> </TR> <TR> <TD><A HREF="../properties/font.html">font</A></TD> <TD><A HREF="../properties/font.html">font</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>×î¶àÁù¸ö¶ÀÁ¢µÄ<A HREF="../properties/font.html">×ÖÌå</A>ÊôÐÔ¡£</TD> </TR> <TR> <TD><A HREF="../properties/fontFamily.html">font-family</A></TD> <TD><A HREF="../properties/fontFamily.html">fontFamily</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>Îı¾ËùʹÓõÄ×ÖÌåÃû³Æ¡£</TD> </TR> <TR> <TD><A HREF="../properties/fontSize.html">font-size</A></TD> <TD><A HREF="../properties/fontSize.html">fontSize</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>Îı¾Ê¹ÓõÄ×ÖÌå´óС¡£</TD> </TR> <TR> <TD><A HREF="../properties/fontStyle.html">font-style</A></TD> <TD><A HREF="../properties/fontStyle.html">fontStyle</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>µÄ×ÖÌåÑùʽ£¬Èç<SPAN CLASS="clsLiteral">бÌå</SPAN>¡¢<SPAN CLASS="clsLiteral">³£¹æ</SPAN>»ò<SPAN CLASS="clsLiteral">Çãб</SPAN>¡£</TD> </TR> <TR> <TD><A HREF="../properties/fontVariant.html">font-variant</A></TD> <TD><A HREF="../properties/fontVariant.html">fontVariant</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>Îı¾ÊÇ·ñÒÔСÐÍ´óд×ÖĸÏÔʾ¡£</TD> </TR> <TR> <TD><A HREF="../properties/fontWeight.html">font-weight</A></TD> <TD><A HREF="../properties/fontWeight.html">fontWeight</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>µÄ×ÖÌå¿í¶È¡£</TD> </TR> <TR> <TD><A HREF="../properties/hasLayout.html"></A></TD> <TD><A HREF="../properties/hasLayout.html">hasLayout</A></TD> <TD>»ñÈ¡±íÃ÷<span replace="1">¶ÔÏó</span>ÊÇ·ñÓв¼¾ÖµÄÖµ¡£</TD> </TR> <TR> <TD><A HREF="../properties/height_1.html">height</A></TD> <TD><A HREF="../properties/height_1.html">height</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>µÄ¸ß¶È¡£</TD> </TR> <TR> <TD><A HREF="../properties/layoutFlow.html">layout-flow</A></TD> <TD><A HREF="../properties/layoutFlow.html">layoutFlow</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>ÄÚÈݵķ½ÏòºÍÈÆÅÅ·½Ïò¡£</TD> </TR> <TR> <TD><A HREF="../properties/layoutgrid.html">layout-grid</A></TD> <TD><A HREF="../properties/layoutgrid.html">layoutGrid</A></TD> <TD>ÉèÖûò»ñȡָ¶¨Îı¾×Ö·û°æÃæµÄ×éºÏÎĵµ¸ñÏßÊôÐÔ¡£</TD> </TR> <TR> <TD><A HREF="../properties/layoutGridMode.html">layout-grid-mode</A></TD> <TD><A HREF="../properties/layoutGridMode.html">layoutGridMode</A></TD> <TD>ÉèÖûò»ñÈ¡Îı¾²¼¾ÖÍø¸ñÊÇ·ñʹÓöþά¡£</TD> </TR> <TR> <TD><A HREF="../properties/left.html">left</A></TD> <TD><A HREF="../properties/left.html">left</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>Ïà¶ÔÓÚÎĵµ²ã´ÎÖÐϸö¶¨Î»¶ÔÏóµÄ×ó±ß½çµÄλÖá£</TD> </TR> <TR> <TD><A HREF="../properties/letterSpacing.html">letter-spacing</A></TD> <TD><A HREF="../properties/letterSpacing.html">letterSpacing</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>µÄ×Ö·û¼ä¸½¼Ó¿Õ¼äµÄ×ܺ͡£</TD> </TR> <TR> <TD><A HREF="../properties/lineHeight.html">line-height</A></TD> <TD><A HREF="../properties/lineHeight.html">lineHeight</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>Á½ÐмäµÄ¾àÀë¡£</TD> </TR> <TR> <TD><A HREF="../properties/margin.html">margin</A></TD> <TD><A HREF="../properties/margin.html">margin</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>µÄÉÏÏÂ×óÓұ߾ࡣ</TD> </TR> <TR> <TD><A HREF="../properties/marginBottom.html">margin-bottom</A></TD> <TD><A HREF="../properties/marginBottom.html">marginBottom</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>µÄϱ߾à¿í¶È¡£</TD> </TR> <TR> <TD><A HREF="../properties/marginLeft.html">margin-left</A></TD> <TD><A HREF="../properties/marginLeft.html">marginLeft</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>µÄ×ó±ß¾à¿í¶È¡£</TD> </TR> <TR> <TD><A HREF="../properties/marginRight.html">margin-right</A></TD> <TD><A HREF="../properties/marginRight.html">marginRight</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>µÄÓұ߾à¿í¶È¡£</TD> </TR> <TR> <TD><A HREF="../properties/marginTop.html">margin-top</A></TD> <TD><A HREF="../properties/marginTop.html">marginTop</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>µÄÉϱ߾à¿í¶È¡£</TD> </TR> <TR> <TD><A HREF="../properties/overflow.html">overflow</A></TD> <TD><A HREF="../properties/overflow.html">overflow</A></TD> <TD>ÉèÖûò»ñÈ¡±íÃ÷µ±ÄÚÈݳ¬³ö<span replace="1">¶ÔÏó</span>¸ß¶È»ò¿í¶ÈʱÈçºÎ¹ÜÀí<span replace="1">¶ÔÏó</span>ÄÚÈݵÄÖµ¡£</TD> </TR> <TR> <TD><A HREF="../properties/overflowX.html">overflow-x</A></TD> <TD><A HREF="../properties/overflowX.html">overflowX</A></TD> <TD>ÉèÖûò»ñÈ¡µ±ÄÚÈݳ¬³ö<span replace="1">¶ÔÏó</span>¿í¶ÈʱÈçºÎ¹ÜÀí<span replace="1">¶ÔÏó</span>ÄÚÈÝ¡£</TD> </TR> <TR> <TD><A HREF="../properties/overflowY.html">overflow-y</A></TD> <TD><A HREF="../properties/overflowY.html">overflowY</A></TD> <TD>ÉèÖûò»ñÈ¡µ±ÄÚÈݳ¬³ö<span replace="1">¶ÔÏó</span>¸ß¶ÈʱÈçºÎ¹ÜÀí<span replace="1">¶ÔÏó</span>ÄÚÈÝ¡£</TD> </TR> <TR> <TD><A HREF="../properties/padding.html">padding</A></TD> <TD><A HREF="../properties/padding.html">padding</A></TD> <TD>ÉèÖûò»ñȡҪÔÚ<span replace="1">¶ÔÏó</span>ºÍÆä±ß¾à»òÈô´æÔڵı߿òµÄ»°¾ÍÊÇ<span replace="1">¶ÔÏó</span>ºÍÆä±ß¿òÖ®¼äÒª²åÈëµÄÈ«²¿¿Õ¼ä¡£</TD> </TR> <TR> <TD><A HREF="../properties/paddingBottom.html">padding-bottom</A></TD> <TD><A HREF="../properties/paddingBottom.html">paddingBottom</A></TD> <TD>ÉèÖûò»ñȡҪÔÚ<span replace="1">¶ÔÏó</span>ϱ߿òºÍÄÚÈÝÖ®¼ä²åÈëµÄ¿Õ¼ä×ÜÁ¿¡£</TD> </TR> <TR> <TD><A HREF="../properties/paddingLeft.html">padding-left</A></TD> <TD><A HREF="../properties/paddingLeft.html">paddingLeft</A></TD> <TD>ÉèÖûò»ñȡҪÔÚ<span replace="1">¶ÔÏó</span>×ó±ß¿òºÍÄÚÈÝÖ®¼ä²åÈëµÄ¿Õ¼ä×ÜÁ¿¡£</TD> </TR> <TR> <TD><A HREF="../properties/paddingRight.html">padding-right</A></TD> <TD><A HREF="../properties/paddingRight.html">paddingRight</A></TD> <TD>ÉèÖûò»ñȡҪÔÚ<span replace="1">¶ÔÏó</span>Óұ߿òºÍÄÚÈÝÖ®¼ä²åÈëµÄ¿Õ¼ä×ÜÁ¿¡£</TD> </TR> <TR> <TD><A HREF="../properties/paddingTop.html">padding-top</A></TD> <TD><A HREF="../properties/paddingTop.html">paddingTop</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>Éϱ߿òºÍÄÚÈÝÖ®¼ä²åÈëµÄ¿Õ¼ä×ÜÁ¿¡£</TD> </TR> <TR> <TD><A HREF="../properties/pixelBottom.html"></A></TD> <TD><A HREF="../properties/pixelBottom.html">pixelBottom</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>µÄÏ·½Î»Öá£</TD> </TR> <TR> <TD><A HREF="../properties/pixelHeight.html"></A></TD> <TD><A HREF="../properties/pixelHeight.html">pixelHeight</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>µÄ¸ß¶È¡£</TD> </TR> <TR> <TD><A HREF="../properties/pixelLeft.html"></A></TD> <TD><A HREF="../properties/pixelLeft.html">pixelLeft</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>µÄ×ó²àλÖá£</TD> </TR> <TR> <TD><A HREF="../properties/pixelRight.html"></A></TD> <TD><A HREF="../properties/pixelRight.html">pixelRight</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>µÄÓÒ²àλÖá£</TD> </TR> <TR> <TD><A HREF="../properties/pixelTop.html"></A></TD> <TD><A HREF="../properties/pixelTop.html">pixelTop</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>µÄÉÏ·½Î»Öá£</TD> </TR> <TR> <TD><A HREF="../properties/pixelWidth.html"></A></TD> <TD><A HREF="../properties/pixelWidth.html">pixelWidth</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>µÄ¿í¶È¡£</TD> </TR> <TR> <TD><A HREF="../properties/posBottom.html"></A></TD> <TD><A HREF="../properties/posBottom.html">posBottom</A></TD> <TD>ÉèÖûò»ñÈ¡ÒÔ <A HREF="../properties/bottom_1.html">bottom</A> ±êÇ©ÊôÐÔÖ¸¶¨µÄµ¥Î»µÄ<span replace="1">¶ÔÏó</span>Ï·½Î»Öá£</TD> </TR> <TR> <TD><A HREF="../properties/posHeight.html"></A></TD> <TD><A HREF="../properties/posHeight.html">posHeight</A></TD> <TD>ÉèÖûò»ñÈ¡ÒÔ <A HREF="../properties/height_1.html">height</A> ±êÇ©ÊôÐÔÖ¸¶¨µÄµ¥Î»µÄ<span replace="1">¶ÔÏó</span>¸ß¶È¡£</TD> </TR> <TR> <TD><A HREF="../properties/position.html">position</A></TD> <TD><A HREF="../properties/position.html">position</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>ËùʹÓõĶ¨Î»·½Ê½¡£</TD> </TR> <TR> <TD><A HREF="../properties/posLeft.html"></A></TD> <TD><A HREF="../properties/posLeft.html">posLeft</A></TD> <TD>ÉèÖûò»ñÈ¡ÒÔ <A HREF="../properties/left.html">left</A> ±êÇ©ÊôÐÔÖ¸¶¨µÄµ¥Î»µÄ<span replace="1">¶ÔÏó</span>×ó²àλÖá£</TD> </TR> <TR> <TD><A HREF="../properties/posRight.html"></A></TD> <TD><A HREF="../properties/posRight.html">posRight</A></TD> <TD>ÉèÖûò»ñÈ¡ÒÔ <A HREF="../properties/right_1.html">right</A> ±êÇ©ÊôÐÔÖ¸¶¨µÄµ¥Î»µÄ<span replace="1">¶ÔÏó</span>ÓÒ²àλÖá£</TD> </TR> <TR> <TD><A HREF="../properties/posTop.html"></A></TD> <TD><A HREF="../properties/posTop.html">posTop</A></TD> <TD>ÉèÖûò»ñÈ¡ÒÔ <A HREF="../properties/top_0.html">top</A> ±êÇ©ÊôÐÔÖ¸¶¨µÄµ¥Î»µÄ<span replace="1">¶ÔÏó</span>ÉÏ·½Î»Öá£</TD> </TR> <TR> <TD><A HREF="../properties/posWidth.html"></A></TD> <TD><A HREF="../properties/posWidth.html">posWidth</A></TD> <TD>ÉèÖûò»ñÈ¡ÒÔ <A HREF="../properties/width_2.html">width</A> ±êÇ©ÊôÐÔÖ¸¶¨µÄµ¥Î»µÄ<span replace="1">¶ÔÏó</span>¿í¶È¡£</TD> </TR> <TR> <TD><A HREF="../properties/right_1.html">right</A></TD> <TD><A HREF="../properties/right_1.html">right</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>Ïà¶ÔÓÚÎĵµ²ã´ÎÖÐϸöÒѶ¨Î»µÄ¶ÔÏóµÄÓұ߽çµÄλÖá£</TD> </TR> <TR> <TD><A HREF="../properties/float.html">float</A></TD> <TD><A HREF="../properties/float.html">styleFloat</A></TD> <TD>ÉèÖûò»ñÈ¡Îı¾ÒªÈÆÅŵ½<span replace="1">¶ÔÏó</span>µÄÄÄÒ»²à¡£</TD> </TR> <TR> <TD><A HREF="../properties/textAutospace.html">text-autospace</A></TD> <TD><A HREF="../properties/textAutospace.html">textAutospace</A></TD> <TD>ÉèÖûò»ñÈ¡×Ô¶¯Áô¿ÕºÍÎı¾µÄÕ­¿Õ¼ä¿í¶Èµ÷Õû¡£</TD> </TR> <TR> <TD><A HREF="../properties/textDecoration.html">text-decoration</A></TD> <TD><A HREF="../properties/textDecoration.html">textDecoration</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>ÖеÄÎı¾ÊÇ·ñÓÐÉÁ˸¡¢É¾³ýÏß¡¢ÉÏ»®Ïß»òÏ»®ÏßµÄÑùʽ¡£</TD> </TR> <TR> <TD><A HREF="../properties/textDecorationBlink.html"></A></TD> <TD><A HREF="../properties/textDecorationBlink.html">textDecorationBlink</A></TD> <TD>ÉèÖûò»ñÈ¡±íÃ÷¶ÔÏóµÄ <A HREF="../properties/textDecoration.html">textDecoration</A> ÊôÐÔÊÇ·ñº¬ÓÐÓС°blink¡±µÄ Boolean Öµ¡£</TD> </TR> <TR> <TD><A HREF="../properties/textDecorationLineThrough.html"></A></TD> <TD><A HREF="../properties/textDecorationLineThrough.html">textDecorationLineThrough</A></TD> <TD>ÉèÖûò»ñÈ¡±íÃ÷<span replace="1">¶ÔÏó</span>ÄÚµÄÎı¾ÊÇ·ñÓÐɾ³ýÏßµÄ Boolean Öµ¡£</TD> </TR> <TR> <TD><A HREF="../properties/textDecorationNone.html"></A></TD> <TD><A HREF="../properties/textDecorationNone.html">textDecorationNone</A></TD> <TD>ÉèÖûò»ñÈ¡±íÃ÷<span replace="1">¶ÔÏó</span>µÄ <B>textDecoration</B> ÊôÐÔÊÇ·ñÉèÖÃΪ <SPAN CLASS="clsLiteral">none</SPAN> µÄ Boolean Öµ¡£</TD> </TR> <TR> <TD><A HREF="../properties/textDecorationOverline.html"></A></TD> <TD><A HREF="../properties/textDecorationOverline.html">textDecorationOverline</A></TD> <TD>ÉèÖûò»ñÈ¡±íÃ÷<span replace="1">¶ÔÏó</span>ÖеÄÎı¾ÊÇ·ñÓÐÉÏ»®ÏßµÄ Boolean Öµ¡£</TD> </TR> <TR> <TD><A HREF="../properties/textDecorationUnderline.html"></A></TD> <TD><A HREF="../properties/textDecorationUnderline.html">textDecorationUnderline</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>ÖеÄÎı¾ÊÇ·ñÓÐÏ»®ÏßµÄ Boolean Öµ¡£</TD> </TR> <TR> <TD><A HREF="../properties/textoverflow.html">text-overflow</A><IMG SRC="../common/new.gif" WIDTH="21" HEIGHT="11" BORDER=0 ALT="Microsoft&reg; Internet Explorer 6 ÐÂÔö"></TD> <TD><A HREF="../properties/textoverflow.html">textOverflow</A></TD> <TD>ÉèÖûò»ñÈ¡±íÃ÷ÊÇ·ñÏÔʾʡÂÔºÅÒÔ±íÃ÷Îı¾Òç³öµÄÖµ¡£</TD> </TR> <TR> <TD><A HREF="../properties/textTransform.html">text-transform</A></TD> <TD><A HREF="../properties/textTransform.html">textTransform</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>ÖÐÎı¾µÄäÖȾ·½Ê½¡£</TD> </TR> <TR> <TD><A HREF="../properties/textUnderlinePosition.html">text-underline-position</A></TD> <TD><A HREF="../properties/textUnderlinePosition.html">textUnderlinePosition</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>µÄ <A HREF="../properties/textDecoration.html">textDecoration</A> ÊôÐÔÖÐÉèÖõÄÏ»®ÏßµÄλÖá£</TD> </TR> <TR> <TD><A HREF="../properties/top_0.html">top</A></TD> <TD><A HREF="../properties/top_0.html">top</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>Ïà¶ÔÓÚÎĵµ²ã´ÎÖÐϸö¶¨Î»¶ÔÏóµÄÉϱ߽çµÄλÖá£</TD> </TR> <TR> <TD><A HREF="../properties/unicodeBidi.html">unicode-bidi</A></TD> <TD><A HREF="../properties/unicodeBidi.html">unicodeBidi</A></TD> <TD>ÉèÖûò»ñÈ¡¹ØÓÚË«Ïò·¨ÔòµÄǶÈë¼¶±ð¡£</TD> </TR> <TR> <TD><A HREF="../properties/visibility.html">visibility</A></TD> <TD><A HREF="../properties/visibility.html">visibility</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>µÄÄÚÈÝÊÇ·ñÏÔʾ¡£</TD> </TR> <TR> <TD><A HREF="../properties/whitespace.html">white-space</A></TD> <TD><A HREF="../properties/whitespace.html">whiteSpace</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>ÖÐÊÇ·ñ×Ô¶¯»»ÐС£</TD> </TR> <TR> <TD><A HREF="../properties/width_2.html">width</A></TD> <TD><A HREF="../properties/width_2.html">width</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>µÄ¿í¶È¡£</TD> </TR> <TR> <TD><A HREF="../properties/wordspacing.html">word-spacing</A></TD> <TD><A HREF="../properties/wordspacing.html">wordSpacing</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>Öе¥´Ê¼äµÄ¸½¼Ó¿Õ¼ä×ÜÁ¿¡£</TD> </TR> <TR> <TD><A HREF="../properties/wordWrap.html">word-wrap</A></TD> <TD><A HREF="../properties/wordWrap.html">wordWrap</A></TD> <TD>ÉèÖûò»ñÈ¡µ±ÄÚÈݳ¬¹ýÆäÈÝÆ÷±ß½çʱÊÇ·ñ¶Ï´Ê¡£</TD> </TR> <TR> <TD><A HREF="../properties/writingMode.html">writing-mode</A></TD> <TD><A HREF="../properties/writingMode.html">writingMode</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>ÄÚÈݵķ½ÏòºÍÈÆÅÅ¡£</TD> </TR> <TR> <TD><A HREF="../properties/zIndex.html">z-index</A></TD> <TD><A HREF="../properties/zIndex.html">zIndex</A></TD> <TD>ÉèÖûò»ñÈ¡¶¨Î»<span replace="1">¶ÔÏó</span>µÄ¶Ñµþ´ÎÐò¡£</TD> </TR> <TR> <TD><A HREF="../properties/zoom.html">zoom</A></TD> <TD><A HREF="../properties/zoom.html">zoom</A></TD> <TD>ÉèÖûò»ñÈ¡<span replace="1">¶ÔÏó</span>µÄ·Å´ó±ÈÀý¡£</TD> </TR> </TABLE> </DIV> </DIV> </BLOCKQUOTE> <P CLASS="clsRef">×¢ÊÍ</P> <BLOCKQUOTE> <P>´ËÔªËØÔÚ Microsoft<SUP>&reg;</SUP> Internet Explorer 3.0 µÄ HTML ÖпÉÓã¬ÔÚ Internet Explorer 4.0 µÄ½Å±¾ÖпÉÓá£</P> <P>´ËÔªËØÊÇÄÚÇ¶ÔªËØ¡£</P> <P>´ËÔªËØÐèÒª¹Ø±Õ±êÇ©¡£</P> </BLOCKQUOTE> <P CLASS="clsRef">ʾÀý</P> <BLOCKQUOTE> <P>ÏÂÃæµÄÀý×ÓʹÓÃÁË <B>STRIKE</B> ÔªËØ´øÉ¾³ýÏßÏÔʾ¡£</P> <PRE CLASS="clsCode" AUTOHILITE="1"> &lt;STRIKE&gt;´ËÎı¾½«´øÉ¾³ýÏßÏÔʾ¡£&lt;/STRIKE&gt; </PRE> </BLOCKQUOTE> <P CLASS="clsRef">±ê×¼ÐÅÏ¢</P> <BLOCKQUOTE> <P>´Ë¶ÔÏó²»ÊÇ <A HREF="http://www.w3.org/TR/REC-html32.html" TARGET="_top">HTML</A>&nbsp;<IMG WIDTH="33" HEIGHT="11" BORDER="0" ALT="·Ç Microsoft Á´½Ó" SRC="../common/leave-ms.gif"> Ëù½¨ÒéµÄ¡£</P> </BLOCKQUOTE> <P CLASS="clsRef">²Î¿´</P> <BLOCKQUOTE><A HREF="S.html">s</A></BLOCKQUOTE> </DIV> </BODY> </HTML>
gucong3000/handbook
dhtml/DHTML/DHTMLref/objects/STRIKE.html
HTML
gpl-3.0
63,833
package uk.co.nickthecoder.itchy.remote; import java.io.File; import java.io.IOException; import java.net.ServerSocket; import java.net.Socket; import uk.co.nickthecoder.itchy.Itchy; import uk.co.nickthecoder.itchy.Resources; import uk.co.nickthecoder.itchy.SimpleFrameRate; import uk.co.nickthecoder.itchy.StandardSoundManager; public class Server implements Runnable { private int portNumber; private int players; private ClientConnection[] clientConnections; private ServerSocket serverSocket; private Thread thread; private File resourcesFile; public void startServer(File resourcesFile, int portNumber, int players) throws Exception { this.resourcesFile = resourcesFile; this.portNumber = portNumber; this.players = players; clientConnections = new ClientConnection[this.players]; serverSocket = new ServerSocket(this.portNumber); thread = new Thread(this); thread.start(); System.out.println("Server connection thread started"); Itchy.getGame().setFrameRate(new ServerFrameRate()); Resources resources = new Resources(); resources.server = true; try { resources.load(resourcesFile); } catch (Exception e) { System.err.println("Failed to load resources " + resourcesFile); e.printStackTrace(); try { this.stopServer(); } catch (IOException e1) { } return; } System.out.println("Using RemoteSoundManager"); Itchy.soundManager = new RemoteSoundManager(this); System.out.println("Server starting game"); resources.getGame().start(); System.out.println("Server started game"); } public void stopServer() throws IOException { Itchy.getGame().setFrameRate( new SimpleFrameRate() ); Itchy.soundManager = new StandardSoundManager(); for (ClientConnection cc : this.clientConnections) { if (cc != null) { cc.close(); this.clientConnections[cc.getSlot()] = null; } } if (this.serverSocket != null) { this.serverSocket.close(); this.serverSocket = null; } } @Override public void run() { // TODO Allow for connections to be dropped and reconnected. for (int slot = findEmptySlot(); slot >= 0; slot = findEmptySlot()) { // Server has been stopped? if (this.serverSocket == null) { System.out.println("Exiting connection thread"); return; } try { System.out.println("Waiting for client to connect..."); Socket socket = this.serverSocket.accept(); ClientConnection clientConnection = new ClientConnection( this.resourcesFile.getParentFile().getName(), slot, socket); clientConnections[slot] = clientConnection; System.out.println("Connected to client " + socket.getRemoteSocketAddress()); } catch (IOException e) { if (this.serverSocket != null) { e.printStackTrace(); } } } for (ClientConnection connection : clientConnections) { connection.beginGame(); } System.out.println("Connected to " + this.players + " players"); } private int findEmptySlot() { int count = 0; for (ClientConnection connection : clientConnections) { if (connection == null) { return count; } count++; } return -1; } public void send(String command, Object... parameters) { if (clientConnections != null) { for (ClientConnection connection : clientConnections) { if (connection != null) { connection.send(command, parameters); } } } } private class ServerFrameRate extends SimpleFrameRate { @Override public void doGameLogic() { // Allow each ClientConnection to process the command lines send from the client. for (ClientConnection connection : clientConnections) { if (connection != null) { connection.tick(); } } // Do I want to process events from the server too? // If not, do just call Itchy.tick instead of calling super. super.doGameLogic(); } @Override public void doRedraw() { if (clientConnections != null) { for (ClientConnection connection : clientConnections) { if (connection != null) { connection.sendViews(); } } } } } }
nickthecoder/itchy
src/main/java/uk/co/nickthecoder/itchy/remote/Server.java
Java
gpl-3.0
5,020
// // Generated By:JAX-WS RI IBM 2.2.1-11/28/2011 08:28 AM(foreman)- (JAXB RI IBM 2.2.3-11/28/2011 06:21 AM(foreman)-) // package com.gisnet.cancelacion.wsclient.pms; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; import javax.xml.datatype.XMLGregorianCalendar; /** * <p>Java class for validarCredito complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="validarCredito"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="numeroDeCredito" type="{http://www.w3.org/2001/XMLSchema}int"/> * &lt;element name="numeroDeCaso" type="{http://www.w3.org/2001/XMLSchema}int"/> * &lt;element name="entidad" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="status" type="{http://www.w3.org/2001/XMLSchema}int"/> * &lt;element name="descripcion" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="cartaDeCancelacion" type="{http://www.w3.org/2001/XMLSchema}base64Binary" minOccurs="0"/> * &lt;element name="fechaEmisionCarta" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/> * &lt;element name="nombreAcreditado" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="tipoOperacion" type="{http://www.w3.org/2001/XMLSchema}int"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "validarCredito", propOrder = { "numeroDeCredito", "numeroDeCaso", "entidad", "status", "descripcion", "cartaDeCancelacion", "fechaEmisionCarta", "nombreAcreditado", "tipoOperacion" }) public class ValidarCredito { protected int numeroDeCredito; protected int numeroDeCaso; protected String entidad; protected int status; protected String descripcion; protected byte[] cartaDeCancelacion; @XmlSchemaType(name = "dateTime") protected XMLGregorianCalendar fechaEmisionCarta; protected String nombreAcreditado; protected int tipoOperacion; /** * Gets the value of the numeroDeCredito property. * */ public int getNumeroDeCredito() { return numeroDeCredito; } /** * Sets the value of the numeroDeCredito property. * */ public void setNumeroDeCredito(int value) { this.numeroDeCredito = value; } /** * Gets the value of the numeroDeCaso property. * */ public int getNumeroDeCaso() { return numeroDeCaso; } /** * Sets the value of the numeroDeCaso property. * */ public void setNumeroDeCaso(int value) { this.numeroDeCaso = value; } /** * Gets the value of the entidad property. * * @return * possible object is * {@link String } * */ public String getEntidad() { return entidad; } /** * Sets the value of the entidad property. * * @param value * allowed object is * {@link String } * */ public void setEntidad(String value) { this.entidad = value; } /** * Gets the value of the status property. * */ public int getStatus() { return status; } /** * Sets the value of the status property. * */ public void setStatus(int value) { this.status = value; } /** * Gets the value of the descripcion property. * * @return * possible object is * {@link String } * */ public String getDescripcion() { return descripcion; } /** * Sets the value of the descripcion property. * * @param value * allowed object is * {@link String } * */ public void setDescripcion(String value) { this.descripcion = value; } /** * Gets the value of the cartaDeCancelacion property. * * @return * possible object is * byte[] */ public byte[] getCartaDeCancelacion() { return cartaDeCancelacion; } /** * Sets the value of the cartaDeCancelacion property. * * @param value * allowed object is * byte[] */ public void setCartaDeCancelacion(byte[] value) { this.cartaDeCancelacion = ((byte[]) value); } /** * Gets the value of the fechaEmisionCarta property. * * @return * possible object is * {@link XMLGregorianCalendar } * */ public XMLGregorianCalendar getFechaEmisionCarta() { return fechaEmisionCarta; } /** * Sets the value of the fechaEmisionCarta property. * * @param value * allowed object is * {@link XMLGregorianCalendar } * */ public void setFechaEmisionCarta(XMLGregorianCalendar value) { this.fechaEmisionCarta = value; } /** * Gets the value of the nombreAcreditado property. * * @return * possible object is * {@link String } * */ public String getNombreAcreditado() { return nombreAcreditado; } /** * Sets the value of the nombreAcreditado property. * * @param value * allowed object is * {@link String } * */ public void setNombreAcreditado(String value) { this.nombreAcreditado = value; } /** * Gets the value of the tipoOperacion property. * */ public int getTipoOperacion() { return tipoOperacion; } /** * Sets the value of the tipoOperacion property. * */ public void setTipoOperacion(int value) { this.tipoOperacion = value; } }
tazvoit/ARPP
cancelacion/cancelacion-web/src/main/java/com/gisnet/cancelacion/wsclient/pms/ValidarCredito.java
Java
gpl-3.0
6,433
namespace Ladybugs { using System; using System.Collections.Generic; using System.Linq; public class Start { public static int arraySize = 0; public static void Main() { arraySize = int.Parse(Console.ReadLine()); int[] arr = new int[arraySize]; int[] ladyBugIndexes = Console.ReadLine() .Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries) .Select(int.Parse) .ToArray(); foreach (var index in ladyBugIndexes) { if (IsInRange(index)) { arr[index] = 1; } } while (true) { string line = Console.ReadLine(); if (line.ToLower()=="end") { break; } string[] args = line.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); string command = args[1].ToLower(); int index = int.Parse(args[0]); int count = int.Parse(args[2]); // if index is int range if (IsInRange(index)) { // if ladybug exist on index if (arr[index] == 1) { if (command == "right") { if (count>0) { MoveRight(arr, index, Math.Abs(count)); } else if (count<0) { MoveLeft(arr, index, Math.Abs(count)); } } else if (command == "left") { if (count > 0) { MoveLeft(arr, index, Math.Abs(count)); } else if (count < 0) { MoveRight(arr, index, Math.Abs(count)); } } } } } Console.WriteLine(string.Join(" ",arr)); } private static void MoveRight(int[] arr, int index, int count) { if (arr[index]==1) { arr[index] = 0; index = index + count; while (IsInRange(index)) { if (arr[index]==0) { arr[index] = 1; break; } index = index + count; } } } private static void MoveLeft(int[] arr, int index, int count) { if (arr[index] == 1) { arr[index] = 0; index = index - count; while (IsInRange(index)) { if (arr[index] == 0) { arr[index] = 1; break; } index = index - count; } } } public static bool IsInRange(int index) { bool isInRange = true; if (index<0) { isInRange = false; } if (index >=arraySize) { isInRange = false; } return isInRange; } } }
PlamenHP/Softuni
Programing Fundamentals/Programming Fundamentals Exam - Part 1 - 23 October 2016/Ladybugs/Start.cs
C#
gpl-3.0
3,769
subroutine writefits(nxmax,nymax,parray,fileout,time) !Jason Rowe 2015 - jasonfrowe@gmail.com use precision implicit none integer :: nxmax,nymax,nkeys,nstep,status,blocksize,bitpix,naxis,funit, & npixels,group,firstpix,nbuf,i,j,nbuffer integer, dimension(2) :: naxes integer, dimension(4) :: nr real(double) :: time real(double), allocatable, dimension(:) :: buffer real(double), dimension(:,:) :: parray character(80) :: fileout,record logical simple,extend naxes(1)=nxmax !size of image to write to FITS file naxes(2)=nymax status=0 !if file already exists.. delete it. call deletefile(fileout,status) !get a unit number call ftgiou(funit,status) !Create the new empty FITS file. The blocksize parameter is a !historical artifact and the value is ignored by FITSIO. blocksize=1 status=0 call ftinit(funit,fileout,blocksize,status) if(status.ne.0)then write(0,*) "Status: ",status write(0,*) "Critial Error open FITS for writing" write(0,'(A80)') fileout endif !Initialize parameters about the FITS image. !BITPIX = 16 means that the image pixels will consist of 16-bit !integers. The size of the image is given by the NAXES values. !The EXTEND = TRUE parameter indicates that the FITS file !may contain extensions following the primary array. simple=.true. bitpix=-32 naxis=2 extend=.true. !Write the required header keywords to the file call ftphpr(funit,simple,bitpix,naxis,naxes,0,1,extend,status) !write(6,*) "ftprec:",status !Adding required records for FITS file write(record,'(A8,A3,F12.8)') 'HJD ','= ',time write(6,'(a80)') record call ftprec(funit,record,status) write(6,*) 'JWST cards..' call ftpkys(funit,'DATE-OBS','01/22/2020','/ [DD/MM/YYYY] Date of observation',status) call ftpkyj(funit,'NRSTSTRT',1,'/ the number of resets at the start of the exposure',status) call ftpkys(funit,'NRESETS',1,'/ the number of resets between integrations',status) call ftpkys(funit,'DATE','2019-12-05T11:09:28.097', '/ [yyyy-mm-ddThh:mm:ss.ss] UTC date file cre',status) !FILENAME= 'smalloutput.fits' / Name of the file call ftpkys(funit,'DATAMODL','RampModel','/ Type of data model',status) call ftpkys(funit,'TELESCOP','JWST ','/ Telescope used to acquire the data',status) !Observation identifiers call ftpkys(funit,'TIME-OBS','11:08:45','/ [hh:mm:ss.sss] UTC time at start of exposure',status) !Target information call ftpkyd(funit,'TARG_RA',188.38685,5,'/ Target RA at mid time of exposure',status) call ftpkyd(funit,'TARG_DEC',-10.14617305555556,15,'/ Target Dec at mid time of exposure',status) call ftpkys(funit,'SRCTYPE','POINT ','/ Advised source type (point/extended)',status) !Instrument configuration information call ftpkys(funit,'INSTRUME','NIRISS ','/ Instrument used to acquire the data',status) call ftpkys(funit,'DETECTOR','NIS ','/ Name of detector used to acquire the data',status) call ftpkys(funit,'FILTER','CLEAR ','/ Name of the filter element used',status) call ftpkys(funit,'PUPIL','GR700XD ','/ Name of the pupil element used',status) !Exposure parameters call ftpkys(funit,'EXP_TYPE','NIS_SOSS','/ Type of data in the exposure',status) call ftpkys(funit,'READPATT','NISRAPID','/ Readout pattern',status) call ftpkyj(funit,'NINTS',1,'/ Number of integrations in exposure',status) call ftpkyj(funit,'NGROUPS',1,'/ Number of groups in integration',status) call ftpkyj(funit,'NFRAMES',1,'/ Number of frames per group',status) call ftpkyj(funit,'GROUPGAP',0,'/ Number of frames dropped between groups',status) call ftpkyd(funit,'TFRAME',5.491,3,'/ [s] Time between frames',status) call ftpkyd(funit,'TGROUP',5.491,3,'/ [s] Time between groups',status) call ftpkyd(funit,'DURATION',0.0,1,'/ [s] Total duration of exposure',status) !Subarray parameters call ftpkys(funit,'SUBARRAY','SUBSTRIP256','/ Subarray used',status) call ftpkyj(funit,'SUBSTRT1',1,'/ Starting pixel in axis 1 direction',status) call ftpkyj(funit,'SUBSTRT2',1793,'/ Starting pixel in axis 2 direction',status) call ftpkyj(funit,'SUBSIZE1',2048,'/ Number of pixels in axis 1 direction',status) call ftpkyj(funit,'SUBSIZE2',256,'/ Number of pixels in axis 2 direction',status) call ftpkyj(funit,'FASTAXIS',-2,'/ Fast readout axis direction',status) call ftpkyj(funit,'SLOWAXIS',-1,'/ Slow readout axis direction',status) !!write(record,'(A8,A3,F10.1)') 'DATAMIN ','= ',-10000.0 !write(6,'(a80)') record !!call ftprec(funit,record,status) !write(6,*) "ftprec:",status !Write the array to the FITS file. npixels=naxes(1)*naxes(2) group=1 firstpix=1 nbuf=naxes(1) j=0 allocate(buffer(nbuf)) do while (npixels.gt.0) !read in 1 column at a time nbuffer=min(nbuf,npixels) j=j+1 !find max and min values do i=1,nbuffer buffer(i)=parray(i,j) enddo call ftpprd(funit,group,firstpix,nbuffer,buffer,status) !update pointers and counters npixels=npixels-nbuffer firstpix=firstpix+nbuffer enddo !close fits file call ftclos(funit,status) call ftfiou(funit,status) return end subroutine writefits
jasonfrowe/jwst
specgen/utils/writefits.f90
FORTRAN
gpl-3.0
5,513
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE>AFL Match Statistics : West Coast defeats Essendon at Domain Stadium Round 15 Thursday, 30th June 2016</TITLE> <meta NAME="description" CONTENT="West Coast defeats Essendon at Domain Stadium Round 15 Thursday, 30th June 2016 AFL match statistics"> <meta NAME="keywords" CONTENT="AFL Match Statistics, AFL Game Statistics, AFL Match Stats"> <link rel="canonical" href="https://www.footywire.com/afl/footy/ft_match_statistics?mid=6292&advv=Y"/> <style> .tabbg { background-color: #000077; vertical-align: middle; } .blkbg { background-color: #000000; vertical-align: middle; } .tabbdr { background-color: #d8dfea; vertical-align: middle; } .wspace { background-color: #ffffff; vertical-align: middle; } .greybg { background-color: #f4f5f1; } .greybdr { background-color: #e3e4e0; } .blackbdr { background-color: #000000; } .lbgrey { background-color: #d4d5d1; text-decoration: none; color: #000000; vertical-align: middle; text-align: left; font-weight: bold; } .caprow { background-color: #f2f4f7; text-decoration: none; color: #000000; vertical-align: middle; text-align: center; font-weight: bold; } .ylwbg { background-color: #eeffee; text-decoration: none; color: #000000; vertical-align: middle; } .ylwbgmid { background-color: #eeffee; text-decoration: none; color: #000000; vertical-align: middle; text-align: center; } .ylwbgtop { background-color: #eeffee; text-decoration: none; color: #000000; vertical-align: top; } .ylwbgbottom { background-color: #eeffee; text-decoration: none; color: #000000; vertical-align: bottom; text-align: center; } .ylwbg2 { background-color: #ddeedd; } .ylwbdr { background-color: #ccddcc; } .mtabbg { background-color: #f2f4f7; vertical-align: top; text-align: center; } .error { background-color: #ffffff; text-decoration: none; color: #ff0000; vertical-align: middle; text-align: left; font-weight: bold; } .cerror { background-color: #ffffff; text-decoration: none; color: #ff0000; vertical-align: middle; text-align: center; font-weight: bold; } .greytxt { color: #777777; } .bluetxt { color: #003399; } .normtxt { color: #000000; } .norm { background-color: #ffffff; text-decoration: none; color: #000000; vertical-align: middle; text-align: center; } .drow { background-color: #f2f4f7; text-decoration: none; color: #000000; vertical-align: middle; text-align: center; } .lnorm { background-color: #ffffff; text-decoration: none; color: #000000; vertical-align: middle; text-align: left; } .rnorm { background-color: #ffffff; text-decoration: none; color: #000000; vertical-align: middle; text-align: right; } .rdrow { background-color: #f2f4f7; text-decoration: none; color: #000000; vertical-align: middle; text-align: right; } .ldrow { background-color: #f2f4f7; text-decoration: none; color: #000000; vertical-align: middle; text-align: left; } .bnorm { background-color: #ffffff; text-decoration: none; color: #000000; vertical-align: middle; text-align: center; font-weight: bold; } .rbnorm { background-color: #ffffff; text-decoration: none; color: #000000; vertical-align: middle; text-align: right; font-weight: bold; } .lbnorm { background-color: #ffffff; text-decoration: none; color: #000000; vertical-align: middle; text-align: left; font-weight: bold; } .bdrow { background-color: #f2f4f7; text-decoration: none; color: #000000; vertical-align: middle; text-align: center; font-weight: bold; } .lbdrow { background-color: #f2f4f7; text-decoration: none; color: #000000; vertical-align: middle; text-align: left; font-weight: bold; } .lylw { background-color: #eeffee; text-decoration: none; color: #000000; vertical-align: middle; text-align: left; } .normtop { background-color: #ffffff; text-decoration: none; color: #000000; vertical-align: top; text-align: center; } .lnormtop { background-color: #ffffff; text-decoration: none; color: #000000; vertical-align: top; text-align: left; } .drowtop { background-color: #f2f4f7; text-decoration: none; color: #000000; vertical-align: top; text-align: center; } .ldrowtop { background-color: #f2f4f7; text-decoration: none; color: #000000; vertical-align: top; text-align: left; } a.tblink:link { color: #ffffff; font-weight: bold; vertical-align: middle; } .dvr { color: #999999; font-weight: normal; vertical-align: middle; } .hltitle { text-decoration: none; color: #000000; font-size: 16px; font-weight: bold; } .whltitle { background-color: #ffffff; text-decoration: none; color: #000000; font-size: 16px; font-weight: bold; } .idxhltitle { text-decoration: none; color: #990099; font-size: 16px; font-weight: bold; } .tbtitle { text-decoration:none; color:#3B5998; font-weight:bold; border-top:1px solid #e4ebf6; border-bottom:1px solid #D8DFEA; background:#D8DFEA url(/afl/img/icon/tbback.png); bottom left repeat-x; } .innertbtitle { background-color:#D8DFEA; text-decoration:none; color:#3B5998; font-weight:normal; background:#D8DFEA url(/afl/img/icon/tbback.png); bottom left repeat-x; } .tabopt { background-color: #5555cc; vertical-align: middle; text-align: center; } .tabsel { background-color: #ffffff; text-decoration: underline; color: #000000; font-weight: bold; vertical-align: middle; text-align: center; } a.tablink { font-weight:bold; vertical-align:middle; } a.tablink:link { color: #ffffff; } a.tablink:hover { color: #eeeeee; } .lnitxt { } .lseltxt { } .lselbldtxt { font-weight: bold; } .formcls { background-color:#f2f4f7; vertical-align:middle; text-align:left } .formclsright { background-color:#f2f4f7; vertical-align:middle; text-align:right } li { background-color: #ffffff; color: #000000; } p { color: #000000; } th { background-color: #ffffff; text-decoration: none; color: #000000; vertical-align: middle; text-align: center; font-weight: bold; } a.wire { font-weight:bold } .menubg { background-color: #000077; text-decoration: none; color: #000000; vertical-align: middle; text-align: center; } .menubdr { background-color: #f2f4f7; vertical-align: middle; } table#wiretab { border-spacing:0px; border-collapse:collapse; background-color:#F2F4F7; width:450px; height:250px; } table#wiretab td.section { border-bottom:1px solid #D8DFEA; } table#wirecell { background-color:#F2F4F7; border:0px; } table#wirecell td#wirecelltitle { vertical-align:top; } table#wirecell td#wirecellblurb { vertical-align:top; } .smnt { background-color: #ffffff; text-decoration: none; color: #000000; vertical-align: middle; text-align: left; } a.peep { font-weight:bold; font-size: 12px; line-height: 14px; } form { padding:0px; margin:0px; } table.thickouter { border:1px solid #D8DFEA; } table.thickouter td.padded { padding:2px; } div.notice { border:1px solid #D8DFEA; padding:8px; background:#D8DFEA url(/afl/img/icon/customback.png); text-align:center; vertical-align:middle; margin-bottom:10px; font-size: 12px; } div.notice div.clickable { font-weight:bold; cursor:pointer; display:inline; color:#3B5998; } div.datadiv td.data, div.datadiv td.bdata { padding:3px; vertical-align:top; } div.datadiv td.bdata { font-weight:bold; } a:focus { outline:none; } h1.centertitle { padding-top:10px; font-size:20px; font-weight:bold; text-align:center; } #matchscoretable { background-color : #eeffee; border:1px solid #ccddcc; } #matchscoretable td, #matchscoretable th { background-color : #eeffee; text-decoration: none; color: #000000; vertical-align: middle; } #matchscoretable th, #matchscoretable th.leftbold { border-bottom:1px solid #ccddcc; font-weight:bold; } #matchscoretable td.leftbold { font-weight:bold; } #matchscoretable td.leftbold, #matchscoretable th.leftbold { text-align:left; padding-left:10px; } body { margin-top:0px; margin-bottom:5px; margin-left:5px; margin-right:5px; background-color:#ffffff; overflow-x: auto; overflow-y: auto; } body, p, td, th, textarea, input, select, h1, h2, h3, h4, h5, h6 { font-family: "lucida grande",tahoma,verdana,arial,sans-serif; font-size:11px; text-decoration: none; } table.plain { border-spacing:0px; border-collapse:collapse; padding:0px; } table.leftmenu { background-color:#F7F7F7; } table.leftmenu td { padding:2px 2px 2px 5px; } table.leftmenu td#skyscraper { padding:2px 0px 2px 0px; text-align:left; margin:auto; vertical-align:top; background-color:#ffffff; } table.leftmenu td#topborder { padding:0px 0px 0px 0px; border-top:5px solid #b7b7b7; font-size:5px; } table.leftmenu td#bottomborder { padding:0px 0px 0px 0px; border-bottom:1px solid #b7b7b7; font-size:5px; } table.leftmenu td#bottomborderpad { padding:0px 0px 0px 0px; border-bottom:0px solid #b7b7b7; font-size:3px; } td#headercell { text-align:left; vertical-align:bottom; background:#3B5998 url(/afl/img/logo/header-logo-bg-2011.png); } a.leftmenu { color:#3B5998; display:block; width:100%; text-decoration:none; } a.leftmenu:hover { text-decoration:none; } a { color:#3B5998; } a:link { text-decoration:none; } a:visited { text-decoration:none; } a:active { text-decoration:none; } a:hover { text-decoration:underline; } table#footer { border-spacing:0px; border-collapse:collapse; padding:0px; color:#868686; width:760px; } table#footer td#footercopy { text-align:left; } table#footer td#footerlinks { text-align:right; } table#footer a { padding:0px 2px 0px 2px; } .textinput { border:1px solid #BDC7D8; padding:2px 2px 2px 2px; } .button { color:#ffffff; height:18px; padding:0px 4px 4px 4px; border:1px solid #3B5998; background:#5b79b8 url(/afl/img/icon/btback.png); bottom left repeat-x; vertical-align:middle; cursor:pointer; } .button:focus { outline:none; } .button::-moz-focus-inner { border: 0; } a.button:link, a.button:visited, a.button:hover { text-decoration:none; } td.blocklink { padding:3px 3px 3px 3px; } a.blocklink { padding:2px 2px 2px 2px; } a.blocklink:hover { background-color:#3B5998; color:#ffffff; text-decoration:none; } table#teammenu, table#playermenu, table#playerrankmenu, table#teamrankmenu, table#draftmenu, table#risingstarmenu, table#matchmenu, table#laddermenu, table#brownlowmenu, table#attendancemenu, table#coachmenu, table#supercoachmenu, table#dreamteammenu, table#highlightsmenu, table#selectionsmenu, table#pastplayermenu, table#tweetmenu, table#contractsmenu { border-spacing:0px; border-collapse:collapse; background-color:#F7F7F7; z-index:1; position:absolute; left:0px; top:0px; visibility:hidden; border:1px solid #b7b7b7; opacity:.95; filter:alpha(opacity=95); width:220px; } a.submenuitem { padding:3px; color:#3B5998; text-decoration:none; border:0px solid #3B5998; } a.submenuitem:link { text-decoration:none; } a.submenuitem:hover { text-decoration:underline; } div.submenux, div.submenutitle { font-size:9px; color:#676767; font-weight:bold; } div.submenux { color:#676767; cursor:pointer; } div.submenutitle { color:#353535; padding:4px 2px 2px 2px; } td#teamArrow, td#playerArrow, td#playerrankArrow, td#teamrankArrow, td#draftArrow, td#risingstarArrow, td#matchArrow, td#ladderArrow, td#brownlowArrow, td#attendanceArrow, td#coachArrow, td#supercoachArrow, td#dreamteamArrow, td#highlightsArrow, td#selectionsArrow, td#pastplayerArrow, td#tweetArrow, td#contractsArrow { color:#676767; font-weight:bold; display:block; text-decoration:none; border-left:1px solid #F7F7F7; cursor:pointer; text-align:center; width:10px; } table#header { border-spacing:0px; border-collapse:collapse; margin:auto; width:100%; } table#header td { border:0px solid #3B5998; } table#header td#logo { vertical-align:middle; text-align:center; } table#header td#mainlinks { vertical-align:bottom; text-align:left; padding-bottom:10px; } table#header td#memberStatus { vertical-align:bottom; text-align:right; padding-bottom:10px; } a.emptylink, a.emptylink:link, a.emptylink:visited, a.emptylink:active, a.emptylink:hover { border:0px; margin:0px; text-decoration:none; } table#header a.headerlink { font-size:12px; font-weight:bold; color:#ffffff; padding:4px; } table#header a.headerlink:link { background-color:#3B5998; text-decoration:none; } table#header a.headerlink:visited { background-color:#3B5998; text-decoration:none; } table#header a.headerlink:active { background-color:#3B5998; text-decoration:none; } table#header a.headerlink:hover { background-color:#6D84B4; text-decoration:none; } table#header a.userlink { font-size:11px; font-weight:normal; color:#D8DFEA; padding:5px; } table#header a.userlink:link { color:#D8DFEA; text-decoration:none; } table#header a.userlink:visited { color:#D8DFEA; text-decoration:none; } table#header a.userlink:active { color:#D8DFEA; text-decoration:none; } table#header a.userlink:hover { color:#ffffff; text-decoration:underline; } table#header div#welcome { display:inline; font-size:11px; font-weight:bold; color:#D8DFEA; padding:5px; } td.hdbar { text-decoration:none; border-top:1px solid #92201e; border-bottom:1px solid #760402; background:#D8DFEA url(/afl/img/icon/hdback.png); bottom left repeat-x; padding:0px 5px 0px 5px; } td.hdbar div { color:#ffffff; display:inline; padding:0px 5px 0px 5px; } td.hdbar div a { font-size:11px; font-weight:normal; color:#ffffff; font-weight:bold; } td.hdbar div a:link { text-decoration:none; } td.hdbar div a:hover { text-decoration:underline; } div#membersbgdiv { background:#888888; opacity:.50; filter:alpha(opacity=50); z-index:1; position:absolute; left:0px; top:0px; width:100%; height:100%; text-align:center; vertical-align:middle; display:none; } div#memberswhitediv { width:610px; height:380px; border:3px solid #222222; background:#ffffff; opacity:1; filter:alpha(opacity=100); z-index:2; position:absolute; left:0; top:0; border-radius:20px; -moz-border-radius:20px; /* Old Firefox */ padding:15px; display:none; } #membersx { color:#222222; font-weight:bold; font-size:16px; cursor:pointer; } </style> <script type="text/javascript"> function flipSubMenu(cellid, tableid) { var table = document.getElementById(tableid); if (table.style.visibility == 'visible') { hideSubMenu(tableid); } else { showSubMenu(cellid, tableid); } } function showSubMenu(cellid, tableid) { hideAllSubMenus(); var cell = document.getElementById(cellid); var coors = findPos(cell); var table = document.getElementById(tableid); table.style.visibility = 'visible'; table.style.top = (coors[1]) + 'px'; table.style.left = (coors[0] + 175) + 'px'; } function hideSubMenu(tableid) { var table = document.getElementById(tableid); if (table != null) { table.style.visibility = 'hidden'; } } function findPos(obj) { var curleft = curtop = 0; if (obj.offsetParent) { curleft = obj.offsetLeft curtop = obj.offsetTop while (obj = obj.offsetParent) { curleft += obj.offsetLeft curtop += obj.offsetTop } } return [curleft,curtop]; } function highlightCell(tag) { var cell = document.getElementById(tag + 'linkcell'); cell.style.backgroundColor = "#E7E7E7"; highlightArrow(tag + 'Arrow'); } function dehighlightCell(tag) { var cell = document.getElementById(tag + 'linkcell'); cell.style.backgroundColor = "transparent"; dehighlightArrow(tag + 'Arrow'); } function highlightArrow(arrowId) { var arrow = document.getElementById(arrowId); arrow.style.backgroundColor = "#E7E7E7"; } function dehighlightArrow(arrowId) { var arrow = document.getElementById(arrowId); arrow.style.backgroundColor = "transparent"; } function hideAllSubMenus() { hideSubMenu('teammenu'); hideSubMenu('playermenu'); hideSubMenu('teamrankmenu'); hideSubMenu('playerrankmenu'); hideSubMenu('draftmenu'); hideSubMenu('risingstarmenu'); hideSubMenu('matchmenu'); hideSubMenu('brownlowmenu'); hideSubMenu('laddermenu'); hideSubMenu('attendancemenu'); hideSubMenu('supercoachmenu'); hideSubMenu('dreamteammenu'); hideSubMenu('coachmenu'); hideSubMenu('highlightsmenu'); hideSubMenu('selectionsmenu'); hideSubMenu('pastplayermenu'); hideSubMenu('contractsmenu'); hideSubMenu('tweetmenu'); } function GetMemberStatusXmlHttpObject() { var xmlMemberStatusHttp=null; try { // Firefox, Opera 8.0+, Safari xmlMemberStatusHttp=new XMLHttpRequest(); } catch (e) { // Internet Explorer try { xmlMemberStatusHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { xmlMemberStatusHttp=new ActiveXObject("Microsoft.XMLHTTP"); } } return xmlMemberStatusHttp; } function rememberMember() { xmlMemberStatusHttp=GetMemberStatusXmlHttpObject(); url="/club/sports/member-remember.html?sid=" + Math.random(); xmlMemberStatusHttp.onreadystatechange=showAlert; xmlMemberStatusHttp.open("GET",url,true); xmlMemberStatusHttp.send(null); } function quickLogout() { xmlMemberStatusHttp=GetMemberStatusXmlHttpObject(); url="/afl/club/quick-logout.html?sid=" + Math.random(); xmlMemberStatusHttp.onreadystatechange=showAlert; xmlMemberStatusHttp.open("GET",url,true); xmlMemberStatusHttp.send(null); } function showMemberStatus() { xmlMemberStatusHttp = GetMemberStatusXmlHttpObject(); url = "/afl/club/member-status.html?sid=" + Math.random(); fetchShowMemberStatus(xmlMemberStatusHttp, url); } function showMemberStatusWithUrl(url) { xmlMemberStatusHttp = GetMemberStatusXmlHttpObject(); url = "/afl/club/member-status.html?url=" + url + "&sid=" + Math.random(); fetchShowMemberStatus(xmlMemberStatusHttp, url); } function showMemberStatusSkipAds() { xmlMemberStatusHttp = GetMemberStatusXmlHttpObject(); url = "/afl/club/member-status.html?skipAds=Y&sid=" + Math.random(); fetchShowMemberStatus(xmlMemberStatusHttp, url); } function showMemberStatusWithUrlSkipAds(url) { xmlMemberStatusHttp = GetMemberStatusXmlHttpObject(); url = "/afl/club/member-status.html?skipAds=Y&url=" + url + "&sid=" + Math.random(); fetchShowMemberStatus(xmlMemberStatusHttp, url); } function fetchShowMemberStatus(xmlMemberStatusHttp, url) { xmlMemberStatusHttp.onreadystatechange = memberStatusChanged; xmlMemberStatusHttp.open("GET", url, true); xmlMemberStatusHttp.send(null); } function showAlert() { if (xmlMemberStatusHttp.readyState==4) { alertMessage = xmlMemberStatusHttp.responseText; showMemberStatus(); alert(alertMessage); } } function memberStatusChanged() { if (xmlMemberStatusHttp.readyState==4) { response = xmlMemberStatusHttp.responseText; if (response.indexOf("<!-- MEMBER STATUS -->") < 0) { response = " "; } document.getElementById("memberStatus").innerHTML = response; } } function pushSignUpEvent(signUpSource) { _gaq.push(['_trackEvent', 'Member Activity', 'Sign Up', signUpSource]); } function pushContent(category, page) { _gaq.push(['_trackEvent', 'Content', category, page]); } function GetXmlHttpObject() { var xmlWireHttp=null; try { // Firefox, Opera 8.0+, Safari xmlWireHttp=new XMLHttpRequest(); } catch (e) { // Internet Explorer try { xmlWireHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { xmlWireHttp=new ActiveXObject("Microsoft.XMLHTTP"); } } return xmlWireHttp; } function showWire() { xmlWireHttp=GetXmlHttpObject() url="/afl/club/forum-threads-wire.html?sid=" + Math.random(); fetchWire(xmlWireHttp, url); } function showWireSkipAds() { xmlWireHttp=GetXmlHttpObject() url="/afl/club/forum-threads-wire.html?skipAds=Y&sid=" + Math.random(); fetchWire(xmlWireHttp, url); } function fetchWire(xmlWireHttp, url) { xmlWireHttp.onreadystatechange = wireChanged; xmlWireHttp.open("GET", url, true); xmlWireHttp.send(null); } function wireChanged() { if (xmlWireHttp.readyState==4) { response = xmlWireHttp.responseText; if (response.indexOf("<!-- WIRE -->") < 0) { response = " "; } document.getElementById("threadsWire").innerHTML=response; } } function positionMemberDivs() { var bodyOffsetHeight = document.body.offsetHeight; document.getElementById('membersbgdiv').style.width = '100%'; document.getElementById('membersbgdiv').style.height = '100%'; var leftOffset = (document.getElementById('membersbgdiv').offsetWidth - document.getElementById('memberswhitediv').offsetWidth) / 2; var topOffset = ((document.getElementById('membersbgdiv').offsetHeight - document.getElementById('memberswhitediv').offsetHeight) / 2); document.getElementById('memberswhitediv').style.left = leftOffset; document.getElementById('memberswhitediv').style.top = topOffset; document.getElementById('membersbgdiv').style.height = bodyOffsetHeight; } function closeMemberDivs() { document.getElementById('membersbgdiv').style.display = 'none'; document.getElementById('memberswhitediv').style.display = 'none'; } function displayMemberDivs() { document.getElementById('membersbgdiv').style.display = 'block'; document.getElementById('memberswhitediv').style.display = 'block'; positionMemberDivs(); } function openRegistrationLoginDialog() { document.getElementById('memberscontent').innerHTML = "<iframe src='/afl/footy/custom_login' width=600 height=350 hspace=0 vspace=0 frameborder=0 marginheight=0 marginwidth=0 scrolling=no></iframe>"; document.getElementById('memberswhitediv').style.width = '610px'; document.getElementById('memberswhitediv').style.height = '380px'; displayMemberDivs(); } function openRegistrationLoginDialogWithNextPage(nextPage) { document.getElementById('memberscontent').innerHTML = "<div><iframe src='/afl/footy/custom_login?p=" + nextPage + "' width=600 height=350 hspace=0 vspace=0 frameborder=0 marginheight=0 marginwidth=0 scrolling=no></iframe></div>" document.getElementById('memberswhitediv').style.width = '610px'; document.getElementById('memberswhitediv').style.height = '380px'; displayMemberDivs(); } function openChangePasswordDialog() { document.getElementById('memberscontent').innerHTML = "<div><iframe src='/afl/footy/custom_login?action=changePasswordForm' width=250 height=190 hspace=0 vspace=0 frameborder=0 marginheight=0 marginwidth=0 scrolling=no></iframe></div>" document.getElementById('memberswhitediv').style.width = '250px'; document.getElementById('memberswhitediv').style.height = '240px'; displayMemberDivs(); } function openManageSettingsDialog() { document.getElementById('memberscontent').innerHTML = "<div><iframe src='/afl/footy/custom_login?action=manageSettingsForm' width=380 height=210 hspace=0 vspace=0 frameborder=0 marginheight=0 marginwidth=0 scrolling=no></iframe></div>" document.getElementById('memberswhitediv').style.width = '380px'; document.getElementById('memberswhitediv').style.height = '260px'; displayMemberDivs(); } var xmlLoginHttp; function GetLoginXmlHttpObject() { var xmlLoginHttp=null; try { // Firefox, Opera 8.0+, Safari xmlLoginHttp=new XMLHttpRequest(); } catch (e) { // Internet Explorer try { xmlLoginHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { xmlLoginHttp=new ActiveXObject("Microsoft.XMLHTTP"); } } return xmlLoginHttp; } function postLogout() { var params = "action=logout"; xmlLoginHttp=GetLoginXmlHttpObject(); xmlLoginHttp.onreadystatechange = validateLogoutResponse; xmlLoginHttp.open("POST", '/afl/footy/custom_login', true); xmlLoginHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlLoginHttp.setRequestHeader("Content-length", params.length); xmlLoginHttp.setRequestHeader("Connection", "close"); xmlLoginHttp.send(params); } function getPlugContent(type) { xmlLoginHttp=GetLoginXmlHttpObject() xmlLoginHttp.onreadystatechange = plugCustomFantasy; xmlLoginHttp.open("GET", '/afl/footy/custom_login?action=plug&type=' + type, true); xmlLoginHttp.send(null); } function validateResponse() { if(xmlLoginHttp.readyState == 4 && xmlLoginHttp.status == 200) { var result = xmlLoginHttp.responseText; if (result == 'PASS') { self.parent.location.reload(true); } else if (result.indexOf('ERROR:') == 0) { result = result.substring(6); alert(result + ". Please try again."); } else { alert("An error occurred during registration."); } } } function plugCustomFantasy() { if (xmlLoginHttp.readyState == 4 && xmlLoginHttp.status == 200) { var response = xmlLoginHttp.responseText; if (response.indexOf("<!-- PLUG -->") < 0) { response = ""; } document.getElementById("customPlugDiv").innerHTML=response; } } function validateLogoutResponse() { if(xmlLoginHttp.readyState == 4 && xmlLoginHttp.status == 200) { var result = xmlLoginHttp.responseText; if (result == 'PASS') { selfReload(); } else if (result.indexOf('ERROR:') == 0) { result = result.substring(6); alert(result + ". Please try again."); } else { alert("Oops! An error occurred!"); } } } function selfReload() { if (xmlLoginHttp.readyState == 4 && xmlLoginHttp.status == 200) { self.parent.location.reload(true); } } </script> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-3312858-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> </HEAD> <BODY onload="pushContent('Match Statistics', 'Match Statistics');showMemberStatusWithUrl('https%3A%2F%2Fwww.footywire.com%2Fafl%2Ffooty%2Fft_match_statistics');showWire();hideAllSubMenus();" onresize="positionMemberDivs();"> <DIV align="CENTER"> <table cellpadding="0" cellspacing="0" border="0" id="frametable2008" width="948"> <tr><td colspan="4" height="102" id="headercell" width="948"> <table id="header"> <tr> <td id="logo" valign="middle" height="102" width="200"> <a class="emptylink" href="//www.footywire.com/"><div style="width:200px;height:54px;cursor:pointer;">&nbsp;</div></a> </td> <td id="mainlinks" width="200"> </td> <td style="padding-top:3px;padding-right:4px;"> <div style="margin-left:-3px;"> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- Footywire 728x90 Prime --> <ins class="adsbygoogle" style="display:inline-block;width:728px;height:90px" data-ad-client="ca-pub-1151582373407200" data-ad-slot="7204222137"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </td> </tr> </table> </td></tr> <tr><td colspan="4" height="21" class="hdbar" align="right" valign="middle" id="memberStatus"></td></tr> <tr> <td rowspan="4" width="175" valign="top"> <table width="175" cellpadding="0" cellspacing="0" border="0" class="leftmenu"> <tr><td colspan="2" id="topborder">&nbsp;</td></tr> <tr><td width="175" colspan="2" onMouseOver="this.style.backgroundColor='#e7e7e7';" onMouseOut="this.style.backgroundColor='transparent';"><a class="leftmenu" href="//www.footywire.com/">AFL Statistics Home</a></td></tr> <tr> <td id="matchlinkcell" width="165"><a onMouseOver="highlightCell('match')" onMouseOut="dehighlightCell('match')" class="leftmenu" href="/afl/footy/ft_match_list">AFL Fixture</a></td> <td id="matchArrow" onMouseOver="highlightArrow('matchArrow')" onMouseOut="dehighlightArrow('matchArrow')" onClick="flipSubMenu('matchlinkcell','matchmenu')">&#187;</td> </tr> <tr> <td id="playerlinkcell" width="165"><a onMouseOver="highlightCell('player')" onMouseOut="dehighlightCell('player')" class="leftmenu" href="/afl/footy/ft_players">Players</a></td> <td id="playerArrow" onMouseOver="highlightArrow('playerArrow')" onMouseOut="dehighlightArrow('playerArrow')" onClick="flipSubMenu('playerlinkcell','playermenu')">&#187;</td> </tr> <tr> <td id="teamlinkcell" width="165"><a onMouseOver="highlightCell('team')" onMouseOut="dehighlightCell('team')" class="leftmenu" href="/afl/footy/ft_teams">Teams</a></td> <td id="teamArrow" onMouseOver="highlightArrow('teamArrow')" onMouseOut="dehighlightArrow('teamArrow')" onClick="flipSubMenu('teamlinkcell','teammenu')">&#187;</td> </tr> <tr> <td id="playerranklinkcell" width="165"><a onMouseOver="highlightCell('playerrank')" onMouseOut="dehighlightCell('playerrank')" class="leftmenu" href="/afl/footy/ft_player_rankings">Player Rankings</a></td> <td id="playerrankArrow" onMouseOver="highlightArrow('playerrankArrow')" onMouseOut="dehighlightArrow('playerrankArrow')" onClick="flipSubMenu('playerranklinkcell','playerrankmenu')">&#187;</td> </tr> <tr> <td id="teamranklinkcell" width="165"><a onMouseOver="highlightCell('teamrank')" onMouseOut="dehighlightCell('teamrank')" class="leftmenu" href="/afl/footy/ft_team_rankings">Team Rankings</a></td> <td id="teamrankArrow" onMouseOver="highlightArrow('teamrankArrow')" onMouseOut="dehighlightArrow('teamrankArrow')" onClick="flipSubMenu('teamranklinkcell','teamrankmenu')">&#187;</td> </tr> <tr> <td id="risingstarlinkcell" width="165"><a onMouseOver="highlightCell('risingstar')" onMouseOut="dehighlightCell('risingstar')" class="leftmenu" href="/afl/footy/ft_rising_stars_round_performances">Rising Stars</a></td> <td id="risingstarArrow" onMouseOver="highlightArrow('risingstarArrow')" onMouseOut="dehighlightArrow('risingstarArrow')" onClick="flipSubMenu('risingstarlinkcell','risingstarmenu')">&#187;</td> </tr> <tr> <td id="draftlinkcell" width="165"><a onMouseOver="highlightCell('draft')" onMouseOut="dehighlightCell('draft')" class="leftmenu" href="/afl/footy/ft_drafts">AFL Draft</a></td> <td id="draftArrow" onMouseOver="highlightArrow('draftArrow')" onMouseOut="dehighlightArrow('draftArrow')" onClick="flipSubMenu('draftlinkcell','draftmenu')">&#187;</td> </tr> <tr> <td id="brownlowlinkcell" width="165"><a onMouseOver="highlightCell('brownlow')" onMouseOut="dehighlightCell('brownlow')" class="leftmenu" href="/afl/footy/brownlow_medal">Brownlow Medal</a></td> <td id="brownlowArrow" onMouseOver="highlightArrow('brownlowArrow')" onMouseOut="dehighlightArrow('brownlowArrow')" onClick="flipSubMenu('brownlowlinkcell','brownlowmenu')">&#187;</td> </tr> <tr> <td id="ladderlinkcell" width="165"><a onMouseOver="highlightCell('ladder')" onMouseOut="dehighlightCell('ladder')" class="leftmenu" href="/afl/footy/ft_ladder">AFL Ladder</a></td> <td id="ladderArrow" onMouseOver="highlightArrow('ladderArrow')" onMouseOut="dehighlightArrow('ladderArrow')" onClick="flipSubMenu('ladderlinkcell','laddermenu')">&#187;</td> </tr> <tr> <td id="coachlinkcell" width="165"><a onMouseOver="highlightCell('coach')" onMouseOut="dehighlightCell('coach')" class="leftmenu" href="/afl/footy/afl_coaches">Coaches</a></td> <td id="coachArrow" onMouseOver="highlightArrow('coachArrow')" onMouseOut="dehighlightArrow('coachArrow')" onClick="flipSubMenu('coachlinkcell','coachmenu')">&#187;</td> </tr> <tr> <td id="attendancelinkcell" width="165"><a onMouseOver="highlightCell('attendance')" onMouseOut="dehighlightCell('attendance')" class="leftmenu" href="/afl/footy/attendances">Attendances</a></td> <td id="attendanceArrow" onMouseOver="highlightArrow('attendanceArrow')" onMouseOut="dehighlightArrow('attendanceArrow')" onClick="flipSubMenu('attendancelinkcell','attendancemenu')">&#187;</td> </tr> <tr> <td id="supercoachlinkcell" width="165"><a onMouseOver="highlightCell('supercoach')" onMouseOut="dehighlightCell('supercoach')" class="leftmenu" href="/afl/footy/supercoach_round">Supercoach</a></td> <td id="supercoachArrow" onMouseOver="highlightArrow('supercoachArrow')" onMouseOut="dehighlightArrow('supercoachArrow')" onClick="flipSubMenu('supercoachlinkcell','supercoachmenu')">&#187;</td> </tr> <tr> <td id="dreamteamlinkcell" width="165"><a onMouseOver="highlightCell('dreamteam')" onMouseOut="dehighlightCell('dreamteam')" class="leftmenu" href="/afl/footy/dream_team_round">AFL Fantasy</a></td> <td id="dreamteamArrow" onMouseOver="highlightArrow('dreamteamArrow')" onMouseOut="dehighlightArrow('dreamteamArrow')" onClick="flipSubMenu('dreamteamlinkcell','dreamteammenu')">&#187;</td> </tr> <tr> <td id="highlightslinkcell" width="165"><a onMouseOver="highlightCell('highlights')" onMouseOut="dehighlightCell('highlights')" class="leftmenu" href="/afl/footy/afl_highlights">AFL Highlights</a></td> <td id="highlightsArrow" onMouseOver="highlightArrow('highlightsArrow')" onMouseOut="dehighlightArrow('highlightsArrow')" onClick="flipSubMenu('highlightslinkcell','highlightsmenu')">&#187;</td> </tr> <tr> <td id="selectionslinkcell" width="165"><a onMouseOver="highlightCell('selections')" onMouseOut="dehighlightCell('selections')" class="leftmenu" href="/afl/footy/afl_team_selections">AFL Team Selections</a></td> <td id="selectionsArrow" onMouseOver="highlightArrow('selectionsArrow')" onMouseOut="dehighlightArrow('selectionsArrow')" onClick="flipSubMenu('selectionslinkcell','selectionsmenu')">&#187;</td> </tr> <tr> <td id="pastplayerlinkcell" width="165"><a onMouseOver="highlightCell('pastplayer')" onMouseOut="dehighlightCell('pastplayer')" class="leftmenu" href="/afl/footy/past_players">Past Players</a></td> <td id="pastplayerArrow" onMouseOver="highlightArrow('pastplayerArrow')" onMouseOut="dehighlightArrow('pastplayerArrow')" onClick="flipSubMenu('pastplayerlinkcell','pastplayermenu')">&#187;</td> </tr> <tr> <td id="contractslinkcell" width="165"><a onMouseOver="highlightCell('contracts')" onMouseOut="dehighlightCell('contracts')" class="leftmenu" href="/afl/footy/out_of_contract_players">AFL Player Contracts</a></td> <td id="contractsArrow" onMouseOver="highlightArrow('contractsArrow')" onMouseOut="dehighlightArrow('contractsArrow')" onClick="flipSubMenu('contractslinkcell','contractsmenu')">&#187;</td> </tr> <tr><td width="175" colspan="2" onMouseOver="this.style.backgroundColor='#e7e7e7';" onMouseOut="this.style.backgroundColor='transparent';"><a class="leftmenu" href="/afl/footy/afl_betting">AFL Betting</a></td></tr> <tr><td width="175" colspan="2" onMouseOver="this.style.backgroundColor='#e7e7e7';" onMouseOut="this.style.backgroundColor='transparent';"><a class="leftmenu" href="/afl/footy/injury_list">AFL Injury List</a></td></tr> <tr><td width="175" colspan="2" onMouseOver="this.style.backgroundColor='#e7e7e7';" onMouseOut="this.style.backgroundColor='transparent';"><a class="leftmenu" href="/afl/footy/ft_season_records">Records</a></td></tr> <tr><td colspan="2" id="bottomborder">&nbsp;</td></tr> <tr><td colspan="2" class="norm" style="height:10px"></td></tr> <tr><td colspan="2" id="skyscraper"> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- Footywire 160x600 Prime --> <ins class="adsbygoogle" style="display:inline-block;width:160px;height:600px" data-ad-client="ca-pub-1151582373407200" data-ad-slot="2707810136"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </td></tr> </table> </td> <td rowspan="3" bgcolor="#b7b7b7" style="width:1px"></td> <td height="900" width="761" valign="top" align="center" style="padding:5px 5px 5px 5px"> <div id="liveStatus" style="margin:0px;padding:0px;"></div> <table border="0" cellspacing="0" cellpadding="0"> <tr><td> <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" WIDTH="760"> <TR> <TD id="threadsWire" WIDTH="450" HEIGHT="250" VALIGN="TOP"> </TD> <td rowspan="2" class="norm" style="width:10px"></td> <TD WIDTH="300" HEIGHT="250" ROWSPAN="2"> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- Footywire 300x250 Prime --> <ins class="adsbygoogle" style="display:inline-block;width:300px;height:250px" data-ad-client="ca-pub-1151582373407200" data-ad-slot="4250755734"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </TD> </TR> </TABLE> </td></tr> <tr><td colspan="1" class="norm" style="height:10px"></td></tr> <tr><td> <div class="notice" width="760"> Advanced stats currently displayed. <a href="/afl/footy/ft_match_statistics?mid=6292"><b>View Basic Stats</b></a>. </div> </td></tr> <tr><td> <style> td.statdata { text-align:center; cursor:default; } </style> <script type="text/javascript"> function getStats() { document.stat_select.submit(); } </script> <TABLE WIDTH="760" BORDER="0" CELLSPACING="0" CELLPADDING="0"> <TR><TD CLASS="lnormtop"> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="760"> <TR> <TD WIDTH="375" class="lnormtop"> <table border="0" cellspacing="0" cellpadding="0" width="375"> <tr><td width="375" valign="top" height="22" align="left" class="hltitle"> West Coast defeats Essendon </td></tr> <tr><td class="lnorm" height="15">Round 15, Domain Stadium, Attendance: 33117</td></tr> <tr><td class="lnorm" height="15"> Thursday, 30th June 2016, 6:10 PM AWST</td></tr> <tr><td class="lnorm" height="19" style="padding-top:4px;"> West Coast Betting Odds: Win 1.01, Line -69.5 @ 1.92 </td></tr> <tr><td class="lnorm" height="19" style="padding-bottom:4px;"> Essendon Betting Odds: Win 21.00, Line +69.5 @ 1.92 </td></tr> <tr><td class="lnorm" height="15"> <b>Brownlow Votes:</b> 3: <a href="pp-west-coast-eagles--andrew-gaff">A Gaff</a>, 2: <a href="pp-west-coast-eagles--mark-hutchings">M Hutchings</a>, 1: <a href="pp-west-coast-eagles--patrick-mcginnity">P McGinnity</a></td></tr> </table> </TD> <td rowspan="1" class="norm" style="width:9px"></td> <TD WIDTH="376" class="lnormtop"> <table border="0" cellspacing="0" cellpadding="0" width="376" id="matchscoretable"> <tr> <th class="leftbold" height="23" width="100">Team</td> <th width="49" align="center">Q1</td> <th width="49" align="center">Q2</td> <th width="49" align="center">Q3</td> <th width="49" align="center">Q4</td> <th width="49" align="center">Final</td> </tr> <tr> <td class="leftbold" height="22"><a href="th-west-coast-eagles">West Coast</a></td> <td align="center">3.4 <td align="center">8.5 <td align="center">11.7 <td align="center">20.10 <td align="center">130 </tr> <tr> <td class="leftbold" height="22"><a href="th-essendon-bombers">Essendon</a></td> <td align="center">4.1 <td align="center">5.5 <td align="center">5.9 <td align="center">7.10 <td align="center">52 </tr> </table> </TD></TR> <TR><TD COLSPAN="3" HEIGHT="30" CLASS="norm"> <a href="#t1">West Coast Player Stats</a> | <a href="#t2">Essendon Player Stats</a> | <a href="#hd">Match Head to Head Stats</a> | <a href="#brk">Scoring Breakdown</a> | <a href="highlights?id=1462">Highlights</a> </TD></TR> </TABLE></TD></TR> <tr><td colspan="1" class="norm" style="height:5px"></td></tr> <TR><TD> <table border="0" cellspacing="0" cellpadding="0" width="760"> <tr> <td> <table border="0" cellspacing="0" cellpadding="0" width="585"> <tr> <td height="21" align="center" colspan="3" class="tbtitle" width="585"> <table border="0" cellspacing="0" cellpadding="0" width="585"> <tr> <td class="innertbtitle" align="left">&nbsp;&nbsp;<b><a name=t1></a>West Coast Match Statistics (Sorted by Disposals)</b></td> <td class="innertbtitle" align="right">Coach: <a href="cp-adam-simpson--98">Adam Simpson</a>&nbsp;&nbsp;</td> </tr> </table> </td> </tr> <tr> <td rowspan="1" class="tabbdr" style="width:1px"></td> <td> <table border="0" cellspacing="0" cellpadding="3" width="583"> <tr> <td width="148" class="lbnorm" height="21">Player</td> <td width="29" class="bnorm"><a href="fts_match_statistics?mid=6292&sby=23&advv=Y#t1" title="Contested Possessions">CP</a></td> <td width="29" class="bnorm"><a href="fts_match_statistics?mid=6292&sby=24&advv=Y#t1" title="Uncontested Possessions">UP</a></td> <td width="29" class="bnorm"><a href="fts_match_statistics?mid=6292&sby=25&advv=Y#t1" title="Effective Disposals">ED</a></td> <td width="34" class="bnorm"><a href="fts_match_statistics?mid=6292&sby=34&advv=Y#t1" title="Disposal Efficiency %">DE%</a></td> <td width="29" class="bnorm"><a href="fts_match_statistics?mid=6292&sby=27&advv=Y#t1" title="Contested Marks">CM</a></td> <td width="29" class="bnorm"><a href="fts_match_statistics?mid=6292&sby=21&advv=Y#t1" title="Goal Assists">GA</a></td> <td width="29" class="bnorm"><a href="fts_match_statistics?mid=6292&sby=28&advv=Y#t1" title="Marks Inside 50">MI5</a></td> <td width="29" class="bnorm"><a href="fts_match_statistics?mid=6292&sby=31&advv=Y#t1" title="One Percenters">1%</a></td> <td width="29" class="bnorm"><a href="fts_match_statistics?mid=6292&sby=32&advv=Y#t1" title="Bounces">BO</a></td> <td width="29" class="bnorm"><a href="fts_match_statistics?mid=6292&sby=35&advv=Y#t1" title="Centre Clearances">CCL</a></td> <td width="29" class="bnorm"><a href="fts_match_statistics?mid=6292&sby=36&advv=Y#t1" title="Stoppage Clearances">SCL</a></td> <td width="29" class="bnorm"><a href="fts_match_statistics?mid=6292&sby=37&advv=Y#t1" title="Score Involvements">SI</a></td> <td width="29" class="bnorm"><a href="fts_match_statistics?mid=6292&sby=38&advv=Y#t1" title="Metres Gained">MG</a></td> <td width="29" class="bnorm"><a href="fts_match_statistics?mid=6292&sby=39&advv=Y#t1" title="Turnovers">TO</a></td> <td width="29" class="bnorm"><a href="fts_match_statistics?mid=6292&sby=40&advv=Y#t1" title="Intercepts">ITC</a></td> <td width="29" class="bnorm"><a href="fts_match_statistics?mid=6292&sby=41&advv=Y#t1" title="Tackles Inside 50">T5</a></td> <td width="29" class="bnorm"><a href="fts_match_statistics?mid=6292&sby=42&advv=Y#t1" title="Time On Ground %">TOG%</a></td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td align="left" height="18"><a href="pp-west-coast-eagles--andrew-gaff" title="Andrew Gaff">A Gaff</a></td> <td class="statdata">7</td> <td class="statdata">29</td> <td class="statdata">27</td> <td class="statdata">77.1</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">2</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">2</td> <td class="statdata">7</td> <td class="statdata">502</td> <td class="statdata">3</td> <td class="statdata">4</td> <td class="statdata">0</td> <td class="statdata">86</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td align="left" height="18"><a href="pp-west-coast-eagles--chris-masten" title="Chris Masten">C Masten</a></td> <td class="statdata">10</td> <td class="statdata">23</td> <td class="statdata">26</td> <td class="statdata">78.8</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">2</td> <td class="statdata">1</td> <td class="statdata">9</td> <td class="statdata">238</td> <td class="statdata">4</td> <td class="statdata">5</td> <td class="statdata">0</td> <td class="statdata">88</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td align="left" height="18"><a href="pp-west-coast-eagles--luke-shuey" title="Luke Shuey">L Shuey</a></td> <td class="statdata">14</td> <td class="statdata">13</td> <td class="statdata">21</td> <td class="statdata">77.8</td> <td class="statdata">1</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">3</td> <td class="statdata">8</td> <td class="statdata">9</td> <td class="statdata">285</td> <td class="statdata">2</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">65</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td align="left" height="18"><a href="pp-west-coast-eagles--shannon-hurn" title="Shannon Hurn">S Hurn</a></td> <td class="statdata">5</td> <td class="statdata">20</td> <td class="statdata">23</td> <td class="statdata">92</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">5</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">9</td> <td class="statdata">186</td> <td class="statdata">1</td> <td class="statdata">8</td> <td class="statdata">0</td> <td class="statdata">84</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td align="left" height="18"><a href="pp-west-coast-eagles--matthew-priddis" title="Matthew Priddis">M Priddis</a></td> <td class="statdata">11</td> <td class="statdata">13</td> <td class="statdata">20</td> <td class="statdata">83.3</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">2</td> <td class="statdata">5</td> <td class="statdata">9</td> <td class="statdata">258</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">85</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td align="left" height="18"><a href="pp-west-coast-eagles--sharrod-wellingham" title="Sharrod Wellingham">S Wellingham</a></td> <td class="statdata">3</td> <td class="statdata">18</td> <td class="statdata">17</td> <td class="statdata">81</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">3</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">2</td> <td class="statdata">198</td> <td class="statdata">3</td> <td class="statdata">3</td> <td class="statdata">0</td> <td class="statdata">82</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td align="left" height="18"><a href="pp-west-coast-eagles--elliot-yeo" title="Elliot Yeo">E Yeo</a></td> <td class="statdata">5</td> <td class="statdata">16</td> <td class="statdata">17</td> <td class="statdata">85</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">1</td> <td class="statdata">8</td> <td class="statdata">412</td> <td class="statdata">2</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">74</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td align="left" height="18"><a href="pp-west-coast-eagles--jeremy-mcgovern" title="Jeremy McGovern">J McGovern</a></td> <td class="statdata">8</td> <td class="statdata">10</td> <td class="statdata">18</td> <td class="statdata">94.7</td> <td class="statdata">2</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">8</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">4</td> <td class="statdata">431</td> <td class="statdata">2</td> <td class="statdata">10</td> <td class="statdata">0</td> <td class="statdata">86</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td align="left" height="18"><a href="pp-west-coast-eagles--mark-hutchings" title="Mark Hutchings">M Hutchings</a></td> <td class="statdata">4</td> <td class="statdata">14</td> <td class="statdata">17</td> <td class="statdata">94.4</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">6</td> <td class="statdata">208</td> <td class="statdata">1</td> <td class="statdata">1</td> <td class="statdata">2</td> <td class="statdata">82</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td align="left" height="18"><a href="pp-west-coast-eagles--scott-lycett" title="Scott Lycett">S Lycett</a></td> <td class="statdata">7</td> <td class="statdata">11</td> <td class="statdata">13</td> <td class="statdata">72.2</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">2</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">4</td> <td class="statdata">6</td> <td class="statdata">262</td> <td class="statdata">3</td> <td class="statdata">3</td> <td class="statdata">0</td> <td class="statdata">75</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td align="left" height="18"><a href="pp-west-coast-eagles--mark-lecras" title="Mark Lecras">M Lecras</a></td> <td class="statdata">4</td> <td class="statdata">13</td> <td class="statdata">13</td> <td class="statdata">76.5</td> <td class="statdata">1</td> <td class="statdata">1</td> <td class="statdata">2</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">9</td> <td class="statdata">306</td> <td class="statdata">2</td> <td class="statdata">1</td> <td class="statdata">2</td> <td class="statdata">89</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td align="left" height="18"><a href="pp-west-coast-eagles--will-schofield" title="Will Schofield">W Schofield</a></td> <td class="statdata">4</td> <td class="statdata">10</td> <td class="statdata">14</td> <td class="statdata">93.3</td> <td class="statdata">2</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">3</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">7</td> <td class="statdata">256</td> <td class="statdata">1</td> <td class="statdata">5</td> <td class="statdata">0</td> <td class="statdata">96</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td align="left" height="18"><a href="pp-west-coast-eagles--lewis-jetta" title="Lewis Jetta">L Jetta</a></td> <td class="statdata">2</td> <td class="statdata">13</td> <td class="statdata">10</td> <td class="statdata">66.7</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">6</td> <td class="statdata">370</td> <td class="statdata">4</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">78</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td align="left" height="18"><a href="pp-west-coast-eagles--patrick-mcginnity" title="Patrick McGinnity">P McGinnity</a></td> <td class="statdata">6</td> <td class="statdata">8</td> <td class="statdata">11</td> <td class="statdata">78.6</td> <td class="statdata">0</td> <td class="statdata">3</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">10</td> <td class="statdata">254</td> <td class="statdata">2</td> <td class="statdata">1</td> <td class="statdata">2</td> <td class="statdata">77</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td align="left" height="18"><a href="pp-west-coast-eagles--jamie-cripps" title="Jamie Cripps">J Cripps</a></td> <td class="statdata">4</td> <td class="statdata">10</td> <td class="statdata">11</td> <td class="statdata">78.6</td> <td class="statdata">0</td> <td class="statdata">2</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">2</td> <td class="statdata">9</td> <td class="statdata">243</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">3</td> <td class="statdata">80</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td align="left" height="18"><a href="pp-west-coast-eagles--tom-barrass" title="Tom Barrass">T Barrass</a></td> <td class="statdata">5</td> <td class="statdata">9</td> <td class="statdata">12</td> <td class="statdata">85.7</td> <td class="statdata">2</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">6</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">2</td> <td class="statdata">199</td> <td class="statdata">2</td> <td class="statdata">7</td> <td class="statdata">0</td> <td class="statdata">85</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td align="left" height="18"><a href="pp-west-coast-eagles--jackson-nelson" title="Jackson Nelson">J Nelson</a></td> <td class="statdata">9</td> <td class="statdata">6</td> <td class="statdata">9</td> <td class="statdata">64.3</td> <td class="statdata">0</td> <td class="statdata">2</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">2</td> <td class="statdata">3</td> <td class="statdata">210</td> <td class="statdata">2</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">75</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td align="left" height="18"><a href="pp-west-coast-eagles--sam-butler" title="Sam Butler">S Butler</a></td> <td class="statdata">2</td> <td class="statdata">12</td> <td class="statdata">11</td> <td class="statdata">84.6</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">3</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">2</td> <td class="statdata">221</td> <td class="statdata">2</td> <td class="statdata">2</td> <td class="statdata">0</td> <td class="statdata">84</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td align="left" height="18"><a href="pp-west-coast-eagles--mitchell-brown" title="Mitchell Brown">M Brown</a></td> <td class="statdata">5</td> <td class="statdata">7</td> <td class="statdata">9</td> <td class="statdata">69.2</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">3</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">5</td> <td class="statdata">76</td> <td class="statdata">3</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">63</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td align="left" height="18"><a href="pp-west-coast-eagles--bradley-sheppard" title="Bradley Sheppard">B Sheppard</a></td> <td class="statdata">1</td> <td class="statdata">12</td> <td class="statdata">11</td> <td class="statdata">84.6</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">4</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">245</td> <td class="statdata">5</td> <td class="statdata">2</td> <td class="statdata">1</td> <td class="statdata">88</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td align="left" height="18"><a href="pp-west-coast-eagles--jack-darling" title="Jack Darling">J Darling</a></td> <td class="statdata">4</td> <td class="statdata">8</td> <td class="statdata">9</td> <td class="statdata">81.8</td> <td class="statdata">3</td> <td class="statdata">1</td> <td class="statdata">4</td> <td class="statdata">3</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">6</td> <td class="statdata">180</td> <td class="statdata">1</td> <td class="statdata">1</td> <td class="statdata">1</td> <td class="statdata">87</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td align="left" height="18"><a href="pp-west-coast-eagles--joshua-kennedy" title="Joshua Kennedy">J Kennedy</a></td> <td class="statdata">7</td> <td class="statdata">2</td> <td class="statdata">5</td> <td class="statdata">55.6</td> <td class="statdata">1</td> <td class="statdata">1</td> <td class="statdata">2</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">7</td> <td class="statdata">161</td> <td class="statdata">2</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">63</td> </tr> </table> </td> <td rowspan="1" class="tabbdr" style="width:1px"></td> </tr> <tr><td colspan="3" class="tabbdr" style="height:1px"></td></tr> </table> </td> <td rowspan="1" class="norm" style="width:15px"></td> <td rowspan="4" width="160" align="center" valign="top"> <table border="0" cellspacing="0" cellpadding="5" width="160" style="border:1px solid #D8DFEA"> <tr><td height="15" valign="top"><a href="/afl/footy/custom_supercoach_latest_scores" class="peep"><a href='/afl/footy/custom_supercoach_latest_scores' class='peep'>Track your favourite Fantasy Players!</a></a></td></tr> <tr> <td height="100" align="center" valign="middle"> <a href="/afl/footy/custom_supercoach_latest_scores"><img src="/afl/img/peep/peep2.jpg" border="0" height="100"/></a> </td> </tr> <tr><td valign="top">Create and save your own custom list of <a href='/afl/footy/custom_supercoach_latest_scores'>Supercoach</a> or <a href='/afl/footy/custom_dream_team_latest_scores'>AFL Fantasy</a> players to track their stats!</td></tr> </table> <div style="padding-top:10px;"> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- Footywire 160x600 Right --> <ins class="adsbygoogle" style="display:inline-block;width:160px;height:600px" data-ad-client="ca-pub-1151582373407200" data-ad-slot="4900122530"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </td> </tr> <tr><td colspan="2" class="norm" style="height:20px"></td></tr> <tr><td> <table border="0" cellspacing="0" cellpadding="0" width="585"> <tr> <td height="21" align="center" colspan="3" class="tbtitle" width="585"> <table border="0" cellspacing="0" cellpadding="0" width="585"> <tr> <td class="innertbtitle" align="left">&nbsp;&nbsp;<b><a name=t1></a>Essendon Match Statistics (Sorted by Disposals)</b></td> <td class="innertbtitle" align="right">Coach: <a href="cp-john-worsfold--15">John Worsfold</a>&nbsp;&nbsp;</td> </tr> </table> </td> </tr> <tr> <td rowspan="1" class="tabbdr" style="width:1px"></td> <td> <table border="0" cellspacing="0" cellpadding="3" width="583"> <tr> <td width="148" class="lbnorm" height="21">Player</td> <td width="29" class="bnorm"><a href="fts_match_statistics?mid=6292&sby=23&advv=Y#t2" title="Contested Possessions">CP</a></td> <td width="29" class="bnorm"><a href="fts_match_statistics?mid=6292&sby=24&advv=Y#t2" title="Uncontested Possessions">UP</a></td> <td width="29" class="bnorm"><a href="fts_match_statistics?mid=6292&sby=25&advv=Y#t2" title="Effective Disposals">ED</a></td> <td width="34" class="bnorm"><a href="fts_match_statistics?mid=6292&sby=34&advv=Y#t2" title="Disposal Efficiency %">DE%</a></td> <td width="29" class="bnorm"><a href="fts_match_statistics?mid=6292&sby=27&advv=Y#t2" title="Contested Marks">CM</a></td> <td width="29" class="bnorm"><a href="fts_match_statistics?mid=6292&sby=21&advv=Y#t2" title="Goal Assists">GA</a></td> <td width="29" class="bnorm"><a href="fts_match_statistics?mid=6292&sby=28&advv=Y#t2" title="Marks Inside 50">MI5</a></td> <td width="29" class="bnorm"><a href="fts_match_statistics?mid=6292&sby=31&advv=Y#t2" title="One Percenters">1%</a></td> <td width="29" class="bnorm"><a href="fts_match_statistics?mid=6292&sby=32&advv=Y#t2" title="Bounces">BO</a></td> <td width="29" class="bnorm"><a href="fts_match_statistics?mid=6292&sby=35&advv=Y#t2" title="Centre Clearances">CCL</a></td> <td width="29" class="bnorm"><a href="fts_match_statistics?mid=6292&sby=36&advv=Y#t2" title="Stoppage Clearances">SCL</a></td> <td width="29" class="bnorm"><a href="fts_match_statistics?mid=6292&sby=37&advv=Y#t2" title="Score Involvements">SI</a></td> <td width="29" class="bnorm"><a href="fts_match_statistics?mid=6292&sby=38&advv=Y#t2" title="Metres Gained">MG</a></td> <td width="29" class="bnorm"><a href="fts_match_statistics?mid=6292&sby=39&advv=Y#t2" title="Turnovers">TO</a></td> <td width="29" class="bnorm"><a href="fts_match_statistics?mid=6292&sby=40&advv=Y#t2" title="Intercepts">ITC</a></td> <td width="29" class="bnorm"><a href="fts_match_statistics?mid=6292&sby=41&advv=Y#t2" title="Tackles Inside 50">T5</a></td> <td width="29" class="bnorm"><a href="fts_match_statistics?mid=6292&sby=42&advv=Y#t2" title="Time On Ground %">TOG%</a></td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td align="left" height="18"><a href="pp-essendon-bombers--james-kelly" title="James Kelly">J Kelly</a></td> <td class="statdata">8</td> <td class="statdata">21</td> <td class="statdata">17</td> <td class="statdata">58.6</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">4</td> <td class="statdata">7</td> <td class="statdata">542</td> <td class="statdata">6</td> <td class="statdata">5</td> <td class="statdata">4</td> <td class="statdata">80</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td align="left" height="18"><a href="pp-essendon-bombers--craig-bird" title="Craig Bird">C Bird</a></td> <td class="statdata">11</td> <td class="statdata">14</td> <td class="statdata">19</td> <td class="statdata">73.1</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">3</td> <td class="statdata">3</td> <td class="statdata">4</td> <td class="statdata">256</td> <td class="statdata">2</td> <td class="statdata">4</td> <td class="statdata">1</td> <td class="statdata">71</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td align="left" height="18"><a href="pp-essendon-bombers--zachary-merrett" title="Zachary Merrett">Z Merrett</a></td> <td class="statdata">10</td> <td class="statdata">13</td> <td class="statdata">17</td> <td class="statdata">70.8</td> <td class="statdata">1</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">2</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">6</td> <td class="statdata">4</td> <td class="statdata">436</td> <td class="statdata">5</td> <td class="statdata">0</td> <td class="statdata">2</td> <td class="statdata">91</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td align="left" height="18"><a href="pp-essendon-bombers--jackson-merrett" title="Jackson Merrett">J Merrett</a></td> <td class="statdata">8</td> <td class="statdata">16</td> <td class="statdata">18</td> <td class="statdata">78.3</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">2</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">4</td> <td class="statdata">5</td> <td class="statdata">364</td> <td class="statdata">6</td> <td class="statdata">1</td> <td class="statdata">1</td> <td class="statdata">77</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td align="left" height="18"><a href="pp-essendon-bombers--brendon-goddard" title="Brendon Goddard">B Goddard</a></td> <td class="statdata">10</td> <td class="statdata">11</td> <td class="statdata">17</td> <td class="statdata">77.3</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">2</td> <td class="statdata">2</td> <td class="statdata">3</td> <td class="statdata">267</td> <td class="statdata">3</td> <td class="statdata">4</td> <td class="statdata">1</td> <td class="statdata">87</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td align="left" height="18"><a href="pp-essendon-bombers--james-gwilt" title="James Gwilt">J Gwilt</a></td> <td class="statdata">1</td> <td class="statdata">20</td> <td class="statdata">19</td> <td class="statdata">90.5</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">2</td> <td class="statdata">366</td> <td class="statdata">4</td> <td class="statdata">5</td> <td class="statdata">0</td> <td class="statdata">95</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td align="left" height="18"><a href="pp-essendon-bombers--martin-gleeson" title="Martin Gleeson">M Gleeson</a></td> <td class="statdata">8</td> <td class="statdata">10</td> <td class="statdata">15</td> <td class="statdata">78.9</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">3</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">2</td> <td class="statdata">2</td> <td class="statdata">348</td> <td class="statdata">3</td> <td class="statdata">8</td> <td class="statdata">0</td> <td class="statdata">91</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td align="left" height="18"><a href="pp-essendon-bombers--matthew-dea" title="Matthew Dea">M Dea</a></td> <td class="statdata">5</td> <td class="statdata">11</td> <td class="statdata">14</td> <td class="statdata">87.5</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">5</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">2</td> <td class="statdata">127</td> <td class="statdata">2</td> <td class="statdata">6</td> <td class="statdata">0</td> <td class="statdata">88</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td align="left" height="18"><a href="pp-essendon-bombers--courtenay-dempsey" title="Courtenay Dempsey">C Dempsey</a></td> <td class="statdata">3</td> <td class="statdata">12</td> <td class="statdata">11</td> <td class="statdata">73.3</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">3</td> <td class="statdata">293</td> <td class="statdata">3</td> <td class="statdata">2</td> <td class="statdata">0</td> <td class="statdata">78</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td align="left" height="18"><a href="pp-essendon-bombers--david-zaharakis" title="David Zaharakis">D Zaharakis</a></td> <td class="statdata">9</td> <td class="statdata">3</td> <td class="statdata">10</td> <td class="statdata">66.7</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">2</td> <td class="statdata">2</td> <td class="statdata">2</td> <td class="statdata">176</td> <td class="statdata">3</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">86</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td align="left" height="18"><a href="pp-essendon-bombers--joe-daniher" title="Joe Daniher">J Daniher</a></td> <td class="statdata">8</td> <td class="statdata">7</td> <td class="statdata">8</td> <td class="statdata">57.1</td> <td class="statdata">3</td> <td class="statdata">0</td> <td class="statdata">3</td> <td class="statdata">4</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">5</td> <td class="statdata">392</td> <td class="statdata">3</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">86</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td align="left" height="18"><a href="pp-essendon-bombers--adam-cooney" title="Adam Cooney">A Cooney</a></td> <td class="statdata">5</td> <td class="statdata">9</td> <td class="statdata">9</td> <td class="statdata">69.2</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">2</td> <td class="statdata">1</td> <td class="statdata">1</td> <td class="statdata">127</td> <td class="statdata">2</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">82</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td align="left" height="18"><a href="pp-essendon-bombers--darcy-parish" title="Darcy Parish">D Parish</a></td> <td class="statdata">7</td> <td class="statdata">6</td> <td class="statdata">8</td> <td class="statdata">61.5</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">2</td> <td class="statdata">3</td> <td class="statdata">76</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">81</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td align="left" height="18"><a href="pp-essendon-bombers--orazio-fantasia" title="Orazio Fantasia">O Fantasia</a></td> <td class="statdata">4</td> <td class="statdata">8</td> <td class="statdata">9</td> <td class="statdata">75</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">2</td> <td class="statdata">1</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">5</td> <td class="statdata">202</td> <td class="statdata">3</td> <td class="statdata">1</td> <td class="statdata">2</td> <td class="statdata">83</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td align="left" height="18"><a href="pp-essendon-bombers--jason-ashby" title="Jason Ashby">J Ashby</a></td> <td class="statdata">4</td> <td class="statdata">4</td> <td class="statdata">8</td> <td class="statdata">80</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">3</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">2</td> <td class="statdata">114</td> <td class="statdata">1</td> <td class="statdata">3</td> <td class="statdata">0</td> <td class="statdata">82</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td align="left" height="18"><a href="pp-essendon-bombers--anthony-mcdonald-tipungwuti" title="Anthony McDonald-Tipungwuti">A M-Tipungwuti</a></td> <td class="statdata">3</td> <td class="statdata">7</td> <td class="statdata">6</td> <td class="statdata">60</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">2</td> <td class="statdata">209</td> <td class="statdata">4</td> <td class="statdata">3</td> <td class="statdata">0</td> <td class="statdata">72</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td align="left" height="18"><a href="pp-essendon-bombers--mitchell-brown-1" title="Mitchell Brown">M Brown</a></td> <td class="statdata">5</td> <td class="statdata">2</td> <td class="statdata">4</td> <td class="statdata">44.4</td> <td class="statdata">2</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">5</td> <td class="statdata">71</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">88</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td align="left" height="18"><a href="pp-essendon-bombers--mathew-stokes" title="Mathew Stokes">M Stokes</a></td> <td class="statdata">2</td> <td class="statdata">6</td> <td class="statdata">6</td> <td class="statdata">75</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">2</td> <td class="statdata">187</td> <td class="statdata">2</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">83</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td align="left" height="18"><a href="pp-essendon-bombers--will-hams" title="Will Hams">W Hams</a></td> <td class="statdata">3</td> <td class="statdata">5</td> <td class="statdata">7</td> <td class="statdata">87.5</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">2</td> <td class="statdata">64</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">81</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td align="left" height="18"><a href="pp-essendon-bombers--michael-hartley" title="Michael Hartley">M Hartley</a></td> <td class="statdata">2</td> <td class="statdata">5</td> <td class="statdata">5</td> <td class="statdata">71.4</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">13</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">139</td> <td class="statdata">2</td> <td class="statdata">2</td> <td class="statdata">0</td> <td class="statdata">96</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td align="left" height="18"><a href="pp-essendon-bombers--matthew-leuenberger" title="Matthew Leuenberger">M Leuenberger</a></td> <td class="statdata">3</td> <td class="statdata">2</td> <td class="statdata">3</td> <td class="statdata">60</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">3</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">2</td> <td class="statdata">44</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">79</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td align="left" height="18"><a href="pp-essendon-bombers--mark-jamar" title="Mark Jamar">M Jamar</a></td> <td class="statdata">2</td> <td class="statdata">3</td> <td class="statdata">4</td> <td class="statdata">100</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">57</td> <td class="statdata">1</td> <td class="statdata">3</td> <td class="statdata">0</td> <td class="statdata">43</td> </tr> </table> </td> <td rowspan="1" class="tabbdr" style="width:1px"></td> </tr> <tr><td colspan="3" class="tabbdr" style="height:1px"></td></tr> </table> </td> <td rowspan="1" class="norm" style="width:10px"></td> </tr> </table> </TD></TR> <tr><td colspan="1" class="norm" style="height:20px"></td></tr> <TR><TD valign="top"> <table border="0" cellspacing="0" cellpadding="0" width="760"> <tr><td valign="top"> <table border="0" cellspacing="0" cellpadding="0" width="375"> <tr><td height="21" align="center" colspan="5" class="tbtitle"><a name=hd></a>Head to Head</td></tr> <tr> <td rowspan="24" class="tabbdr" style="width:1px"></td> <td width="124" class="bnorm" height="21">West Coast</td> <td width="125" class="bnorm">Statistic</td> <td width="124" class="bnorm">Essendon</td> <td rowspan="24" class="tabbdr" style="width:1px"></td> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td height="25" class="statdata">127</td> <td class="statdata">Contested Possessions</td> <td class="statdata">121</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td height="25" class="statdata">277</td> <td class="statdata">Uncontested Possessions</td> <td class="statdata">195</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td height="25" class="statdata">324</td> <td class="statdata">Effective Disposals</td> <td class="statdata">234</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td height="25" class="statdata">80.6%</td> <td class="statdata">Disposal Efficiency %</td> <td class="statdata">72.4%</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td height="25" class="statdata">32</td> <td class="statdata">Clangers</td> <td class="statdata">51</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td height="25" class="statdata">13</td> <td class="statdata">Contested Marks</td> <td class="statdata">10</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td height="25" class="statdata">18</td> <td class="statdata">Marks Inside 50</td> <td class="statdata">8</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td height="25" class="statdata">38</td> <td class="statdata">Clearances</td> <td class="statdata">44</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td height="25" class="statdata">26</td> <td class="statdata">Rebound 50s</td> <td class="statdata">32</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td height="25" class="statdata">43</td> <td class="statdata">One Percenters</td> <td class="statdata">44</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td height="25" class="statdata">2</td> <td class="statdata">Bounces</td> <td class="statdata">1</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td height="25" class="statdata">12</td> <td class="statdata">Goal Assists</td> <td class="statdata">4</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td height="25" class="statdata">60.0%</td> <td class="statdata">% Goals Assisted</td> <td class="statdata">57.1%</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td height="25" class="statdata">11</td> <td class="statdata">Centre Clearances</td> <td class="statdata">13</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td height="25" class="statdata">27</td> <td class="statdata">Stoppage Clearances</td> <td class="statdata">31</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td height="25" class="statdata">136</td> <td class="statdata">Score Involvements</td> <td class="statdata">64</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td height="25" class="statdata">5701</td> <td class="statdata">Metres Gained</td> <td class="statdata">4857</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td height="25" class="statdata">48</td> <td class="statdata">Turnovers</td> <td class="statdata">56</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td height="25" class="statdata">57</td> <td class="statdata">Intercepts</td> <td class="statdata">50</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td height="25" class="statdata">11</td> <td class="statdata">Tackles Inside 50</td> <td class="statdata">13</td> </tr> <tr><td colspan="5" class="tabbdr" style="height:1px"></td></tr> </tr> </table> </td> <td rowspan="1" class="norm" style="width:11px"></td> <td valign="top"> <table border="0" cellspacing="0" cellpadding="0" width="374"> <tr><td height="21" align="center" colspan="5" class="tbtitle">Average Attributes</td></tr> <tr> <td rowspan="5" class="tabbdr" style="width:1px"></td> <td width="124" class="bnorm" height="20">West Coast</td> <td width="124" class="bnorm">Attribute</td> <td width="124" class="bnorm">Essendon</td> <td rowspan="5" class="tabbdr" style="width:1px"></td> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td height="18" class="statdata">187.7cm</td> <td class="statdata">Height</td> <td class="statdata">186.7cm</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td height="18" class="statdata">88.6kg</td> <td class="statdata">Weight</td> <td class="statdata">85.2kg</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td height="18" class="statdata">26yr 1mth</td> <td class="statdata">Age</td> <td class="statdata">25yr 10mth</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td height="18" class="statdata">111.3</td> <td class="statdata">Games</td> <td class="statdata">100.6</td> </tr> <tr><td colspan="5" class="tabbdr" style="height:1px"></td></tr> <tr><td colspan="5" class="norm" style="height:7px"></td></tr> <tr><td height="21" align="center" colspan="5" class="tbtitle">Total Players By Games</td></tr> <tr> <td rowspan="5" class="tabbdr" style="width:1px"></td> <td width="124" class="bnorm" height="20">West Coast</td> <td width="124" class="bnorm">Games</td> <td width="124" class="bnorm">Essendon</td> <td rowspan="5" class="tabbdr" style="width:1px"></td> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td height="18" class="statdata">2</td> <td class="statdata">Less than 50</td> <td class="statdata">3</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td height="18" class="statdata">5</td> <td class="statdata">50 to 99</td> <td class="statdata">8</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td height="18" class="statdata">3</td> <td class="statdata">100 to 149</td> <td class="statdata">3</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td height="18" class="statdata">12</td> <td class="statdata">150 or more</td> <td class="statdata">8</td> </tr> <tr><td colspan="5" class="tabbdr" style="height:1px"></td></tr> </tr> <tr><td colspan="5" align="center" style="padding-top:20px;"> </td></tr> </table> </td></tr> </table> </TD></TR> <tr><td colspan="1" class="norm" style="height:20px"></td></tr> <TR><TD> <table border="0" cellspacing="0" cellpadding="0" width="760"> <tr><td height="21" align="center" colspan="7" class="tbtitle"><a name=brk></a>Quarter by Quarter Scoring Breakdown</td></tr> <tr> <td rowspan="6" class="ylwbdr" style="width:1px"></td> <td rowspan="5" class="ylwbg2" style="width:4px"></td> <td colspan="1" class="ylwbg2" style="height:4px"></td> <td rowspan="5" class="ylwbg2" style="width:4px"></td> <td colspan="1" class="ylwbg2" style="height:4px"></td> <td rowspan="5" class="ylwbg2" style="width:4px"></td> <td rowspan="6" class="ylwbdr" style="width:1px"></td> </tr> <tr> <td> <table border="0" cellspacing="0" cellpadding="0" width="373"> <tr> <td rowspan="9" class="ylwbdr" style="width:1px"></td> <td colspan="3" class="ylwbdr" style="height:1px"></td> <td rowspan="9" class="ylwbdr" style="width:1px"></td> </tr> <tr> <td class="ylwbgmid" height="20" width="124"><b>West Coast</b></td> <td class="ylwbgmid" width="125"><b>First Quarter</b></td> <td class="ylwbgmid" width="124"><b>Essendon</b></td> </tr> <tr><td colspan="3" class="ylwbdr" style="height:1px"></td></tr> <tr> <td class="ylwbgmid">3.4 22</td> <td class="ylwbgmid">Score</td> <td class="ylwbgmid">4.1 25</td> </tr> <tr> <td class="ylwbgmid">7</td> <td class="ylwbgmid">Scoring Shots</td> <td class="ylwbgmid">5</td> </tr> <tr> <td class="ylwbgmid">42.9%</td> <td class="ylwbgmid">Conversion</td> <td class="ylwbgmid">80.0%</td> </tr> <tr> <td class="ylwbgmid">Lost quarter by 3</td> <td class="ylwbgmid">Result</td> <td class="ylwbgmid">Won quarter by 3</td> </tr> <tr> <td class="ylwbgmid">Trailing by 3</td> <td class="ylwbgmid">End of Quarter</td> <td class="ylwbgmid">Leading by 3</td> </tr> <tr><td colspan="3" class="ylwbdr" style="height:1px"></td></tr> </table> </td> <td> <table border="0" cellspacing="0" cellpadding="0" width="373"> <tr> <td rowspan="9" class="ylwbdr" style="width:1px"></td> <td colspan="3" class="ylwbdr" style="height:1px"></td> <td rowspan="9" class="ylwbdr" style="width:1px"></td> </tr> <tr> <td class="ylwbgmid" height="20" width="124"><b>West Coast</b></td> <td class="ylwbgmid" width="125"><b>Second Quarter</b></td> <td class="ylwbgmid" width="124"><b>Essendon</b></td> </tr> <tr><td colspan="3" class="ylwbdr" style="height:1px"></td></tr> <tr> <td class="ylwbgmid">5.1 31</td> <td class="ylwbgmid">Score</td> <td class="ylwbgmid">1.4 10</td> </tr> <tr> <td class="ylwbgmid">6</td> <td class="ylwbgmid">Scoring Shots</td> <td class="ylwbgmid">5</td> </tr> <tr> <td class="ylwbgmid">83.3%</td> <td class="ylwbgmid">Conversion</td> <td class="ylwbgmid">20.0%</td> </tr> <tr> <td class="ylwbgmid">Won quarter by 21</td> <td class="ylwbgmid">Result</td> <td class="ylwbgmid">Lost quarter by 21</td> </tr> <tr> <td class="ylwbgmid">Leading by 18</td> <td class="ylwbgmid">Halftime</td> <td class="ylwbgmid">Trailing by 18</td> </tr> <tr><td colspan="3" class="ylwbdr" style="height:1px"></td></tr> </table> </td> </tr> <tr><td colspan="3" class="ylwbg2" style="height:4px"></td></tr> <tr> <td> <table border="0" cellspacing="0" cellpadding="0" width="373"> <tr> <td rowspan="9" class="ylwbdr" style="width:1px"></td> <td colspan="3" class="ylwbdr" style="height:1px"></td> <td rowspan="9" class="ylwbdr" style="width:1px"></td> </tr> <tr> <td class="ylwbgmid" height="20" width="124"><b>West Coast</b></td> <td class="ylwbgmid" width="125"><b>Third Quarter</b></td> <td class="ylwbgmid" width="124"><b>Essendon</b></td> </tr> <tr><td colspan="3" class="ylwbdr" style="height:1px"></td></tr> <tr> <td class="ylwbgmid">3.2 20</td> <td class="ylwbgmid">Score</td> <td class="ylwbgmid">0.4 4</td> </tr> <tr> <td class="ylwbgmid">5</td> <td class="ylwbgmid">Scoring Shots</td> <td class="ylwbgmid">4</td> </tr> <tr> <td class="ylwbgmid">60.0%</td> <td class="ylwbgmid">Conversion</td> <td class="ylwbgmid">0%</td> </tr> <tr> <td class="ylwbgmid">Won quarter by 16</td> <td class="ylwbgmid">Result</td> <td class="ylwbgmid">Lost quarter by 16</td> </tr> <tr> <td class="ylwbgmid">Leading by 34</td> <td class="ylwbgmid">End of Quarter</td> <td class="ylwbgmid">Trailing by 34</td> </tr> <tr><td colspan="3" class="ylwbdr" style="height:1px"></td></tr> </table> </td> <td> <table border="0" cellspacing="0" cellpadding="0" width="373"> <tr> <td rowspan="9" class="ylwbdr" style="width:1px"></td> <td colspan="3" class="ylwbdr" style="height:1px"></td> <td rowspan="9" class="ylwbdr" style="width:1px"></td> </tr> <tr> <td class="ylwbgmid" height="20" width="124"><b>West Coast</b></td> <td class="ylwbgmid" width="125"><b>Final Quarter</b></td> <td class="ylwbgmid" width="124"><b>Essendon</b></td> </tr> <tr><td colspan="3" class="ylwbdr" style="height:1px"></td></tr> <tr> <td class="ylwbgmid">9.3 57</td> <td class="ylwbgmid">Score</td> <td class="ylwbgmid">2.1 13</td> </tr> <tr> <td class="ylwbgmid">12</td> <td class="ylwbgmid">Scoring Shots</td> <td class="ylwbgmid">3</td> </tr> <tr> <td class="ylwbgmid">75.0%</td> <td class="ylwbgmid">Conversion</td> <td class="ylwbgmid">66.7%</td> </tr> <tr> <td class="ylwbgmid">Won quarter by 44</td> <td class="ylwbgmid">Result</td> <td class="ylwbgmid">Lost quarter by 44</td> </tr> <tr> <td class="ylwbgmid">Won game by 78</td> <td class="ylwbgmid">End of Game</td> <td class="ylwbgmid">Lost game by 78</td> </tr> <tr><td colspan="3" class="ylwbdr" style="height:1px"></td></tr> </table> </td> </tr> <tr><td colspan="3" class="ylwbg2" style="height:4px"></td></tr> <tr><td colspan="5" class="ylwbdr" style="height:1px"></td></tr> </table> </TD></TR> <tr><td colspan="1" class="norm" style="height:20px"></td></tr> <TR><TD> <table border="0" cellspacing="0" cellpadding="0" width="760"> <tr><td height="21" align="center" colspan="7" class="tbtitle">Scoring Breakdown For Each Half</td></tr> <tr> <td rowspan="4" class="ylwbdr" style="width:1px"></td> <td rowspan="3" class="ylwbg2" style="width:4px"></td> <td colspan="1" class="ylwbg2" style="height:4px"></td> <td rowspan="3" class="ylwbg2" style="width:4px"></td> <td colspan="1" class="ylwbg2" style="height:4px"></td> <td rowspan="3" class="ylwbg2" style="width:4px"></td> <td rowspan="4" class="ylwbdr" style="width:1px"></td> </tr> <tr> <td> <table border="0" cellspacing="0" cellpadding="0" width="373"> <tr> <td rowspan="9" class="ylwbdr" style="width:1px"></td> <td colspan="3" class="ylwbdr" style="height:1px"></td> <td rowspan="9" class="ylwbdr" style="width:1px"></td> </tr> <tr> <td class="ylwbgmid" height="20" width="124"><b>West Coast</b></td> <td class="ylwbgmid" width="125"><b>First Half</b></td> <td class="ylwbgmid" width="124"><b>Essendon</b></td> </tr> <tr><td colspan="3" class="ylwbdr" style="height:1px"></td></tr> <tr> <td class="ylwbgmid">8.5 53</td> <td class="ylwbgmid">Score</td> <td class="ylwbgmid">5.5 35</td> </tr> <tr> <td class="ylwbgmid">13</td> <td class="ylwbgmid">Scoring Shots</td> <td class="ylwbgmid">10</td> </tr> <tr> <td class="ylwbgmid">61.5%</td> <td class="ylwbgmid">Conversion</td> <td class="ylwbgmid">50.0%</td> </tr> <tr> <td class="ylwbgmid">Won half by 18</td> <td class="ylwbgmid">Result</td> <td class="ylwbgmid">Lost half by 18</td> </tr> <tr> <td class="ylwbgmid">Leading by 18</td> <td class="ylwbgmid">Halftime</td> <td class="ylwbgmid">Trailing by 18</td> </tr> <tr><td colspan="3" class="ylwbdr" style="height:1px"></td></tr> </table> </td> <td> <table border="0" cellspacing="0" cellpadding="0" width="373"> <tr> <td rowspan="9" class="ylwbdr" style="width:1px"></td> <td colspan="3" class="ylwbdr" style="height:1px"></td> <td rowspan="9" class="ylwbdr" style="width:1px"></td> </tr> <tr> <td class="ylwbgmid" height="20" width="124"><b>West Coast</b></td> <td class="ylwbgmid" width="125"><b>Second Half</b></td> <td class="ylwbgmid" width="124"><b>Essendon</b></td> </tr> <tr><td colspan="3" class="ylwbdr" style="height:1px"></td></tr> <tr> <td class="ylwbgmid">12.5 77</td> <td class="ylwbgmid">Score</td> <td class="ylwbgmid">2.5 17</td> </tr> <tr> <td class="ylwbgmid">17</td> <td class="ylwbgmid">Scoring Shots</td> <td class="ylwbgmid">7</td> </tr> <tr> <td class="ylwbgmid">70.6%</td> <td class="ylwbgmid">Conversion</td> <td class="ylwbgmid">28.6%</td> </tr> <tr> <td class="ylwbgmid">Won half by 60</td> <td class="ylwbgmid">Result</td> <td class="ylwbgmid">Lost half by 60</td> </tr> <tr> <td class="ylwbgmid">Won game by 78</td> <td class="ylwbgmid">End of Game</td> <td class="ylwbgmid">Lost game by 78</td> </tr> <tr><td colspan="3" class="ylwbdr" style="height:1px"></td></tr> </table> </td> </tr> <tr><td colspan="3" class="ylwbg2" style="height:4px"></td></tr> <tr><td colspan="5" class="ylwbdr" style="height:1px"></td></tr> </table> </TD></TR> </TABLE> </td></tr> </table></td> <td rowspan="3" bgcolor="#b7b7b7" style="width:1px"></td> </tr> <tr><td align="center" valign="middle" height="40"> </td></tr> <tr> <td colspan="1" bgcolor="#b7b7b7" style="height:1px"></td> </tr> <tr><td colspan="3" align="center" valign="middle" height="25"> <table id="footer"> <tr> <td id="footercopy">Footywire.com &copy; 2018</td> <td id="footerlinks"> <a href="/afl/footy/info?if=a">about</a> <a href="/afl/footy/info?if=t">terms</a> <a href="/afl/footy/info?if=p">privacy</a> <a target="_smaq" href="http://www.smaqtalk.com/">discussions</a> <a href="/afl/footy/contact_us">contact us</a> </td> </tr> </table> </td></tr> </table> </DIV> <table id="teammenu"> <tr><td align="right" colspan="3"><div class="submenux" onClick="hideSubMenu('teammenu')" onMouseUp="hideSubMenu('teammenu')" >x</div></td></tr> <tr> <td colspan="3"><a class="submenuitem" href="/afl/footy/ft_teams">Compare Teams</a></td> </tr> <tr> <td colspan="3"><div class="submenutitle">Team Home Pages</div></td> </tr> <tr> <td><a onClick="hideSubMenu('teammenu')" onMouseUp="hideSubMenu('teammenu')" class="submenuitem" href="/afl/footy/th-carlton-blues">Blues</a></td> <td><a onClick="hideSubMenu('teammenu')" onMouseUp="hideSubMenu('teammenu')" class="submenuitem" href="/afl/footy/th-essendon-bombers">Bombers</a></td> <td><a onClick="hideSubMenu('teammenu')" onMouseUp="hideSubMenu('teammenu')" class="submenuitem" href="/afl/footy/th-western-bulldogs">Bulldogs</a></td> </tr> <tr> <td><a onClick="hideSubMenu('teammenu')" onMouseUp="hideSubMenu('teammenu')" class="submenuitem" href="/afl/footy/th-geelong-cats">Cats</a></td> <td><a onClick="hideSubMenu('teammenu')" onMouseUp="hideSubMenu('teammenu')" class="submenuitem" href="/afl/footy/th-adelaide-crows">Crows</a></td> <td><a onClick="hideSubMenu('teammenu')" onMouseUp="hideSubMenu('teammenu')" class="submenuitem" href="/afl/footy/th-melbourne-demons">Demons</a></td> </tr> <tr> <td><a onClick="hideSubMenu('teammenu')" onMouseUp="hideSubMenu('teammenu')" class="submenuitem" href="/afl/footy/th-fremantle-dockers">Dockers</a></td> <td><a onClick="hideSubMenu('teammenu')" onMouseUp="hideSubMenu('teammenu')" class="submenuitem" href="/afl/footy/th-west-coast-eagles">Eagles</a></td> <td><a onClick="hideSubMenu('teammenu')" onMouseUp="hideSubMenu('teammenu')" class="submenuitem" href="/afl/footy/th-greater-western-sydney-giants">Giants</a></td> </tr> <tr> <td><a onClick="hideSubMenu('teammenu')" onMouseUp="hideSubMenu('teammenu')" class="submenuitem" href="/afl/footy/th-hawthorn-hawks">Hawks</a></td> <td><a onClick="hideSubMenu('teammenu')" onMouseUp="hideSubMenu('teammenu')" class="submenuitem" href="/afl/footy/th-kangaroos">Kangaroos</a></td> <td><a onClick="hideSubMenu('teammenu')" onMouseUp="hideSubMenu('teammenu')" class="submenuitem" href="/afl/footy/th-brisbane-lions">Lions</a></td> </tr> <tr> <td><a onClick="hideSubMenu('teammenu')" onMouseUp="hideSubMenu('teammenu')" class="submenuitem" href="/afl/footy/th-collingwood-magpies">Magpies</a></td> <td><a onClick="hideSubMenu('teammenu')" onMouseUp="hideSubMenu('teammenu')" class="submenuitem" href="/afl/footy/th-port-adelaide-power">Power</a></td> <td><a onClick="hideSubMenu('teammenu')" onMouseUp="hideSubMenu('teammenu')" class="submenuitem" href="/afl/footy/th-st-kilda-saints">Saints</a></td> </tr> <tr> <td><a onClick="hideSubMenu('teammenu')" onMouseUp="hideSubMenu('teammenu')" class="submenuitem" href="/afl/footy/th-gold-coast-suns">Suns</a></td> <td><a onClick="hideSubMenu('teammenu')" onMouseUp="hideSubMenu('teammenu')" class="submenuitem" href="/afl/footy/th-sydney-swans">Swans</a></td> <td><a onClick="hideSubMenu('teammenu')" onMouseUp="hideSubMenu('teammenu')" class="submenuitem" href="/afl/footy/th-richmond-tigers">Tigers</a></td> </tr> <tr><td align="right" colspan="3"><div class="submenux" onClick="hideSubMenu('teammenu')" onMouseUp="hideSubMenu('teammenu')" style="padding-top:6px;">hide menu</div></td></tr> </table> <table id="playermenu"> <tr><td align="right" colspan="3"><div class="submenux" onClick="hideSubMenu('playermenu')" onMouseUp="hideSubMenu('playermenu')" >x</div></td></tr> <tr><td colspan="3"><a onClick="hideSubMenu('playermenu')" onMouseUp="hideSubMenu('playermenu')" class="submenuitem" href="/afl/footy/ft_players">All Players</a></td></tr> <tr><td colspan="3"><a onClick="hideSubMenu('playermenu')" onMouseUp="hideSubMenu('playermenu')" class="submenuitem" href="/afl/footy/player_search">Player Search</a></td></tr> <tr><td colspan="3"><a onClick="hideSubMenu('playermenu')" onMouseUp="hideSubMenu('playermenu')" class="submenuitem" href="/afl/footy/past_players">Past Players</a></td></tr> <tr><td colspan="3"><a onClick="hideSubMenu('playermenu')" onMouseUp="hideSubMenu('playermenu')" class="submenuitem" href="/afl/footy/other_players">Other Players</a></td></tr> <tr><td colspan="3"><a onClick="hideSubMenu('playermenu')" onMouseUp="hideSubMenu('playermenu')" class="submenuitem" href="/afl/footy/ft_player_compare">Compare Players</a></td></tr> <tr> <td colspan="3"><div class="submenutitle">Team Playing Lists</div></td> </tr> <tr> <td><a onClick="hideSubMenu('playermenu')" onMouseUp="hideSubMenu('playermenu')" class="submenuitem" href="/afl/footy/tp-carlton-blues">Blues</a></td> <td><a onClick="hideSubMenu('playermenu')" onMouseUp="hideSubMenu('playermenu')" class="submenuitem" href="/afl/footy/tp-essendon-bombers">Bombers</a></td> <td><a onClick="hideSubMenu('playermenu')" onMouseUp="hideSubMenu('playermenu')" class="submenuitem" href="/afl/footy/tp-western-bulldogs">Bulldogs</a></td> </tr> <tr> <td><a onClick="hideSubMenu('playermenu')" onMouseUp="hideSubMenu('playermenu')" class="submenuitem" href="/afl/footy/tp-geelong-cats">Cats</a></td> <td><a onClick="hideSubMenu('playermenu')" onMouseUp="hideSubMenu('playermenu')" class="submenuitem" href="/afl/footy/tp-adelaide-crows">Crows</a></td> <td><a onClick="hideSubMenu('playermenu')" onMouseUp="hideSubMenu('playermenu')" class="submenuitem" href="/afl/footy/tp-melbourne-demons">Demons</a></td> </tr> <tr> <td><a onClick="hideSubMenu('playermenu')" onMouseUp="hideSubMenu('playermenu')" class="submenuitem" href="/afl/footy/tp-fremantle-dockers">Dockers</a></td> <td><a onClick="hideSubMenu('playermenu')" onMouseUp="hideSubMenu('playermenu')" class="submenuitem" href="/afl/footy/tp-west-coast-eagles">Eagles</a></td> <td><a onClick="hideSubMenu('playermenu')" onMouseUp="hideSubMenu('playermenu')" class="submenuitem" href="/afl/footy/tp-greater-western-sydney-giants">Giants</a></td> </tr> <tr> <td><a onClick="hideSubMenu('playermenu')" onMouseUp="hideSubMenu('playermenu')" class="submenuitem" href="/afl/footy/tp-hawthorn-hawks">Hawks</a></td> <td><a onClick="hideSubMenu('playermenu')" onMouseUp="hideSubMenu('playermenu')" class="submenuitem" href="/afl/footy/tp-kangaroos">Kangaroos</a></td> <td><a onClick="hideSubMenu('playermenu')" onMouseUp="hideSubMenu('playermenu')" class="submenuitem" href="/afl/footy/tp-brisbane-lions">Lions</a></td> </tr> <tr> <td><a onClick="hideSubMenu('playermenu')" onMouseUp="hideSubMenu('playermenu')" class="submenuitem" href="/afl/footy/tp-collingwood-magpies">Magpies</a></td> <td><a onClick="hideSubMenu('playermenu')" onMouseUp="hideSubMenu('playermenu')" class="submenuitem" href="/afl/footy/tp-port-adelaide-power">Power</a></td> <td><a onClick="hideSubMenu('playermenu')" onMouseUp="hideSubMenu('playermenu')" class="submenuitem" href="/afl/footy/tp-st-kilda-saints">Saints</a></td> </tr> <tr> <td><a onClick="hideSubMenu('playermenu')" onMouseUp="hideSubMenu('playermenu')" class="submenuitem" href="/afl/footy/tp-gold-coast-suns">Suns</a></td> <td><a onClick="hideSubMenu('playermenu')" onMouseUp="hideSubMenu('playermenu')" class="submenuitem" href="/afl/footy/tp-sydney-swans">Swans</a></td> <td><a onClick="hideSubMenu('playermenu')" onMouseUp="hideSubMenu('playermenu')" class="submenuitem" href="/afl/footy/tp-richmond-tigers">Tigers</a></td> </tr> <tr><td align="right" colspan="3"><div class="submenux" onClick="hideSubMenu('playermenu')" onMouseUp="hideSubMenu('playermenu')" style="padding-top:6px;">hide menu</div></td></tr> </table> <table id="playerrankmenu"> <tr><td colspan="3" align="right"><div class="submenux" onClick="hideSubMenu('playerrankmenu')" onMouseUp="hideSubMenu('playerrankmenu')" >x</div></td></tr> <tr><td colspan="3"><a onClick="hideSubMenu('playerrankmenu')" onMouseUp="hideSubMenu('playerrankmenu')" class="submenuitem" href="/afl/footy/ft_player_rankings?rt=LA">League Averages</a></td></tr> <tr><td colspan="3"><a onClick="hideSubMenu('playerrankmenu')" onMouseUp="hideSubMenu('playerrankmenu')" class="submenuitem" href="/afl/footy/ft_player_rankings?rt=LT">League Totals</a></td></tr> <tr><td colspan="3"><a onClick="hideSubMenu('playerrankmenu')" onMouseUp="hideSubMenu('playerrankmenu')" class="submenuitem" href="/afl/footy/ft_player_rankings?rt=RA">Rising Star Averages</a></td></tr> <tr><td colspan="3"><a onClick="hideSubMenu('playerrankmenu')" onMouseUp="hideSubMenu('playerrankmenu')" class="submenuitem" href="/afl/footy/ft_player_rankings?rt=RT">Rising Star Totals</a></td></tr> <tr><td colspan="3"><a onClick="hideSubMenu('playerrankmenu')" onMouseUp="hideSubMenu('playerrankmenu')" class="submenuitem" href="/afl/footy/ft_goal_kickers">Season Goalkickers</a></td></tr> <tr> <td colspan="3"><div class="submenutitle">Player Rankings by Team</div></td> </tr> <tr> <td><a onClick="hideSubMenu('playerrankmenu')" onMouseUp="hideSubMenu('playerrankmenu')" class="submenuitem" href="/afl/footy/tr-carlton-blues">Blues</a></td> <td><a onClick="hideSubMenu('playerrankmenu')" onMouseUp="hideSubMenu('playerrankmenu')" class="submenuitem" href="/afl/footy/tr-essendon-bombers">Bombers</a></td> <td><a onClick="hideSubMenu('playerrankmenu')" onMouseUp="hideSubMenu('playerrankmenu')" class="submenuitem" href="/afl/footy/tr-western-bulldogs">Bulldogs</a></td> </tr> <tr> <td><a onClick="hideSubMenu('playerrankmenu')" onMouseUp="hideSubMenu('playerrankmenu')" class="submenuitem" href="/afl/footy/tr-geelong-cats">Cats</a></td> <td><a onClick="hideSubMenu('playerrankmenu')" onMouseUp="hideSubMenu('playerrankmenu')" class="submenuitem" href="/afl/footy/tr-adelaide-crows">Crows</a></td> <td><a onClick="hideSubMenu('playerrankmenu')" onMouseUp="hideSubMenu('playerrankmenu')" class="submenuitem" href="/afl/footy/tr-melbourne-demons">Demons</a></td> </tr> <tr> <td><a onClick="hideSubMenu('playerrankmenu')" onMouseUp="hideSubMenu('playerrankmenu')" class="submenuitem" href="/afl/footy/tr-fremantle-dockers">Dockers</a></td> <td><a onClick="hideSubMenu('playerrankmenu')" onMouseUp="hideSubMenu('playerrankmenu')" class="submenuitem" href="/afl/footy/tr-west-coast-eagles">Eagles</a></td> <td><a onClick="hideSubMenu('playerrankmenu')" onMouseUp="hideSubMenu('playerrankmenu')" class="submenuitem" href="/afl/footy/tr-greater-western-sydney-giants">Giants</a></td> </tr> <tr> <td><a onClick="hideSubMenu('playerrankmenu')" onMouseUp="hideSubMenu('playerrankmenu')" class="submenuitem" href="/afl/footy/tr-hawthorn-hawks">Hawks</a></td> <td><a onClick="hideSubMenu('playerrankmenu')" onMouseUp="hideSubMenu('playerrankmenu')" class="submenuitem" href="/afl/footy/tr-kangaroos">Kangaroos</a></td> <td><a onClick="hideSubMenu('playerrankmenu')" onMouseUp="hideSubMenu('playerrankmenu')" class="submenuitem" href="/afl/footy/tr-brisbane-lions">Lions</a></td> </tr> <tr> <td><a onClick="hideSubMenu('playerrankmenu')" onMouseUp="hideSubMenu('playerrankmenu')" class="submenuitem" href="/afl/footy/tr-collingwood-magpies">Magpies</a></td> <td><a onClick="hideSubMenu('playerrankmenu')" onMouseUp="hideSubMenu('playerrankmenu')" class="submenuitem" href="/afl/footy/tr-port-adelaide-power">Power</a></td> <td><a onClick="hideSubMenu('playerrankmenu')" onMouseUp="hideSubMenu('playerrankmenu')" class="submenuitem" href="/afl/footy/tr-st-kilda-saints">Saints</a></td> </tr> <tr> <td><a onClick="hideSubMenu('playerrankmenu')" onMouseUp="hideSubMenu('playerrankmenu')" class="submenuitem" href="/afl/footy/tr-gold-coast-suns">Suns</a></td> <td><a onClick="hideSubMenu('playerrankmenu')" onMouseUp="hideSubMenu('playerrankmenu')" class="submenuitem" href="/afl/footy/tr-sydney-swans">Swans</a></td> <td><a onClick="hideSubMenu('playerrankmenu')" onMouseUp="hideSubMenu('playerrankmenu')" class="submenuitem" href="/afl/footy/tr-richmond-tigers">Tigers</a></td> </tr> <tr><td colspan="3" align="right"><div class="submenux" onClick="hideSubMenu('playerrankmenu')" onMouseUp="hideSubMenu('playerrankmenu')" style="padding-top:6px;">hide menu</div></td></tr> </table> <table id="teamrankmenu"> <tr><td align="right"><div class="submenux" onClick="hideSubMenu('teamrankmenu')" onMouseUp="hideSubMenu('teamrankmenu')" >x</div></td></tr> <tr><td><a onClick="hideSubMenu('teamrankmenu')" onMouseUp="hideSubMenu('teamrankmenu')" class="submenuitem" href="/afl/footy/ft_team_rankings?type=TA">Team Averages</a></td></tr> <tr><td><a onClick="hideSubMenu('teamrankmenu')" onMouseUp="hideSubMenu('teamrankmenu')" class="submenuitem" href="/afl/footy/ft_team_rankings?type=TT">Team Totals</a></td></tr> <tr><td><a onClick="hideSubMenu('teamrankmenu')" onMouseUp="hideSubMenu('teamrankmenu')" class="submenuitem" href="/afl/footy/ft_team_rankings?type=OA">Opponent Averages</a></td></tr> <tr><td><a onClick="hideSubMenu('teamrankmenu')" onMouseUp="hideSubMenu('teamrankmenu')" class="submenuitem" href="/afl/footy/ft_team_rankings?type=OT">Opponent Totals</a></td></tr> <tr><td><a onClick="hideSubMenu('teamrankmenu')" onMouseUp="hideSubMenu('teamrankmenu')" class="submenuitem" href="/afl/footy/ft_team_rankings?type=DA">Team/Opponent Differential Averages</a></td></tr> <tr><td><a onClick="hideSubMenu('teamrankmenu')" onMouseUp="hideSubMenu('teamrankmenu')" class="submenuitem" href="/afl/footy/ft_team_rankings?type=DT">Team/Opponent Differential Totals</a></td></tr> <tr><td align="right"><div class="submenux" onClick="hideSubMenu('teamrankmenu')" onMouseUp="hideSubMenu('teamrankmenu')" style="padding-top:6px;">hide menu</div></td></tr> </table> <table id="draftmenu"> <tr><td align="right" colspan="3"><div class="submenux" onClick="hideSubMenu('draftmenu')" onMouseUp="hideSubMenu('draftmenu')" >x</div></td></tr> <tr><td colspan="3"><a onClick="hideSubMenu('draftmenu')" onMouseUp="hideSubMenu('draftmenu')" class="submenuitem" href="/afl/footy/ft_drafts">Full AFL Draft History</a></td></tr> <tr><td colspan="3"><a onClick="hideSubMenu('draftmenu')" onMouseUp="hideSubMenu('draftmenu')" class="submenuitem" href="/afl/footy/ft_team_draft_summaries">Draft Summary by Team</a></td></tr> <tr> <td colspan="3"><div class="submenutitle">AFL Draft History by Team</div></td> </tr> <tr> <td><a onClick="hideSubMenu('draftmenu')" onMouseUp="hideSubMenu('draftmenu')" class="submenuitem" href="/afl/footy/td-carlton-blues">Blues</a></td> <td><a onClick="hideSubMenu('draftmenu')" onMouseUp="hideSubMenu('draftmenu')" class="submenuitem" href="/afl/footy/td-essendon-bombers">Bombers</a></td> <td><a onClick="hideSubMenu('draftmenu')" onMouseUp="hideSubMenu('draftmenu')" class="submenuitem" href="/afl/footy/td-western-bulldogs">Bulldogs</a></td> </tr> <tr> <td><a onClick="hideSubMenu('draftmenu')" onMouseUp="hideSubMenu('draftmenu')" class="submenuitem" href="/afl/footy/td-geelong-cats">Cats</a></td> <td><a onClick="hideSubMenu('draftmenu')" onMouseUp="hideSubMenu('draftmenu')" class="submenuitem" href="/afl/footy/td-adelaide-crows">Crows</a></td> <td><a onClick="hideSubMenu('draftmenu')" onMouseUp="hideSubMenu('draftmenu')" class="submenuitem" href="/afl/footy/td-melbourne-demons">Demons</a></td> </tr> <tr> <td><a onClick="hideSubMenu('draftmenu')" onMouseUp="hideSubMenu('draftmenu')" class="submenuitem" href="/afl/footy/td-fremantle-dockers">Dockers</a></td> <td><a onClick="hideSubMenu('draftmenu')" onMouseUp="hideSubMenu('draftmenu')" class="submenuitem" href="/afl/footy/td-west-coast-eagles">Eagles</a></td> <td><a onClick="hideSubMenu('draftmenu')" onMouseUp="hideSubMenu('draftmenu')" class="submenuitem" href="/afl/footy/td-greater-western-sydney-giants">Giants</a></td> </tr> <tr> <td><a onClick="hideSubMenu('draftmenu')" onMouseUp="hideSubMenu('draftmenu')" class="submenuitem" href="/afl/footy/td-hawthorn-hawks">Hawks</a></td> <td><a onClick="hideSubMenu('draftmenu')" onMouseUp="hideSubMenu('draftmenu')" class="submenuitem" href="/afl/footy/td-kangaroos">Kangaroos</a></td> <td><a onClick="hideSubMenu('draftmenu')" onMouseUp="hideSubMenu('draftmenu')" class="submenuitem" href="/afl/footy/td-brisbane-lions">Lions</a></td> </tr> <tr> <td><a onClick="hideSubMenu('draftmenu')" onMouseUp="hideSubMenu('draftmenu')" class="submenuitem" href="/afl/footy/td-collingwood-magpies">Magpies</a></td> <td><a onClick="hideSubMenu('draftmenu')" onMouseUp="hideSubMenu('draftmenu')" class="submenuitem" href="/afl/footy/td-port-adelaide-power">Power</a></td> <td><a onClick="hideSubMenu('draftmenu')" onMouseUp="hideSubMenu('draftmenu')" class="submenuitem" href="/afl/footy/td-st-kilda-saints">Saints</a></td> </tr> <tr> <td><a onClick="hideSubMenu('draftmenu')" onMouseUp="hideSubMenu('draftmenu')" class="submenuitem" href="/afl/footy/td-gold-coast-suns">Suns</a></td> <td><a onClick="hideSubMenu('draftmenu')" onMouseUp="hideSubMenu('draftmenu')" class="submenuitem" href="/afl/footy/td-sydney-swans">Swans</a></td> <td><a onClick="hideSubMenu('draftmenu')" onMouseUp="hideSubMenu('draftmenu')" class="submenuitem" href="/afl/footy/td-richmond-tigers">Tigers</a></td> </tr> <tr><td align="right" colspan="3"><div class="submenux" onClick="hideSubMenu('draftmenu')" onMouseUp="hideSubMenu('draftmenu')" style="padding-top:6px;">hide menu</div></td></tr> </table> <table id="risingstarmenu"> <tr><td align="right" colspan="3"><div class="submenux" onClick="hideSubMenu('risingstarmenu')" onMouseUp="hideSubMenu('risingstarmenu')" >x</div></td></tr> <tr><td colspan="3"><a onClick="hideSubMenu('risingstarmenu')" onMouseUp="hideSubMenu('risingstarmenu')" class="submenuitem" href="/afl/footy/ft_rising_stars_round_performances">Rising Star Round by Round Performances</a></td></tr> <tr><td colspan="3"><a onClick="hideSubMenu('risingstarmenu')" onMouseUp="hideSubMenu('risingstarmenu')" class="submenuitem" href="/afl/footy/rising_star_nominations">Rising Star Nominees</a></td></tr> <tr><td colspan="3"><a onClick="hideSubMenu('risingstarmenu')" onMouseUp="hideSubMenu('risingstarmenu')" class="submenuitem" href="/afl/footy/rising_star_winners">Rising Star Winners</a></td></tr> <tr> <td colspan="3"><div class="submenutitle">Eligible Rising Stars by Team</div></td> </tr> <tr> <td><a onClick="hideSubMenu('risingstarmenu')" onMouseUp="hideSubMenu('risingstarmenu')" class="submenuitem" href="/afl/footy/ty-carlton-blues">Blues</a></td> <td><a onClick="hideSubMenu('risingstarmenu')" onMouseUp="hideSubMenu('risingstarmenu')" class="submenuitem" href="/afl/footy/ty-essendon-bombers">Bombers</a></td> <td><a onClick="hideSubMenu('risingstarmenu')" onMouseUp="hideSubMenu('risingstarmenu')" class="submenuitem" href="/afl/footy/ty-western-bulldogs">Bulldogs</a></td> </tr> <tr> <td><a onClick="hideSubMenu('risingstarmenu')" onMouseUp="hideSubMenu('risingstarmenu')" class="submenuitem" href="/afl/footy/ty-geelong-cats">Cats</a></td> <td><a onClick="hideSubMenu('risingstarmenu')" onMouseUp="hideSubMenu('risingstarmenu')" class="submenuitem" href="/afl/footy/ty-adelaide-crows">Crows</a></td> <td><a onClick="hideSubMenu('risingstarmenu')" onMouseUp="hideSubMenu('risingstarmenu')" class="submenuitem" href="/afl/footy/ty-melbourne-demons">Demons</a></td> </tr> <tr> <td><a onClick="hideSubMenu('risingstarmenu')" onMouseUp="hideSubMenu('risingstarmenu')" class="submenuitem" href="/afl/footy/ty-fremantle-dockers">Dockers</a></td> <td><a onClick="hideSubMenu('risingstarmenu')" onMouseUp="hideSubMenu('risingstarmenu')" class="submenuitem" href="/afl/footy/ty-west-coast-eagles">Eagles</a></td> <td><a onClick="hideSubMenu('risingstarmenu')" onMouseUp="hideSubMenu('risingstarmenu')" class="submenuitem" href="/afl/footy/ty-greater-western-sydney-giants">Giants</a></td> </tr> <tr> <td><a onClick="hideSubMenu('risingstarmenu')" onMouseUp="hideSubMenu('risingstarmenu')" class="submenuitem" href="/afl/footy/ty-hawthorn-hawks">Hawks</a></td> <td><a onClick="hideSubMenu('risingstarmenu')" onMouseUp="hideSubMenu('risingstarmenu')" class="submenuitem" href="/afl/footy/ty-kangaroos">Kangaroos</a></td> <td><a onClick="hideSubMenu('risingstarmenu')" onMouseUp="hideSubMenu('risingstarmenu')" class="submenuitem" href="/afl/footy/ty-brisbane-lions">Lions</a></td> </tr> <tr> <td><a onClick="hideSubMenu('risingstarmenu')" onMouseUp="hideSubMenu('risingstarmenu')" class="submenuitem" href="/afl/footy/ty-collingwood-magpies">Magpies</a></td> <td><a onClick="hideSubMenu('risingstarmenu')" onMouseUp="hideSubMenu('risingstarmenu')" class="submenuitem" href="/afl/footy/ty-port-adelaide-power">Power</a></td> <td><a onClick="hideSubMenu('risingstarmenu')" onMouseUp="hideSubMenu('risingstarmenu')" class="submenuitem" href="/afl/footy/ty-st-kilda-saints">Saints</a></td> </tr> <tr> <td><a onClick="hideSubMenu('risingstarmenu')" onMouseUp="hideSubMenu('risingstarmenu')" class="submenuitem" href="/afl/footy/ty-gold-coast-suns">Suns</a></td> <td><a onClick="hideSubMenu('risingstarmenu')" onMouseUp="hideSubMenu('risingstarmenu')" class="submenuitem" href="/afl/footy/ty-sydney-swans">Swans</a></td> <td><a onClick="hideSubMenu('risingstarmenu')" onMouseUp="hideSubMenu('risingstarmenu')" class="submenuitem" href="/afl/footy/ty-richmond-tigers">Tigers</a></td> </tr> <tr><td align="right" colspan="3"><div class="submenux" onClick="hideSubMenu('risingstarmenu')" onMouseUp="hideSubMenu('risingstarmenu')" style="padding-top:6px;">hide menu</div></td></tr> </table> <table id="matchmenu"> <tr><td align="right" colspan="3"><div class="submenux" onClick="hideSubMenu('matchmenu')" onMouseUp="hideSubMenu('matchmenu')" >x</div></td></tr> <tr><td colspan="3"><a onClick="hideSubMenu('matchmenu')" onMouseUp="hideSubMenu('matchmenu')" class="submenuitem" href="/afl/footy/ft_match_list">Full Season AFL Fixture</a></td></tr> <tr> <td colspan="3"><div class="submenutitle">Played and Scheduled Matches by Team</div></td> </tr> <tr> <td><a onClick="hideSubMenu('matchmenu')" onMouseUp="hideSubMenu('matchmenu')" class="submenuitem" href="/afl/footy/tg-carlton-blues">Blues</a></td> <td><a onClick="hideSubMenu('matchmenu')" onMouseUp="hideSubMenu('matchmenu')" class="submenuitem" href="/afl/footy/tg-essendon-bombers">Bombers</a></td> <td><a onClick="hideSubMenu('matchmenu')" onMouseUp="hideSubMenu('matchmenu')" class="submenuitem" href="/afl/footy/tg-western-bulldogs">Bulldogs</a></td> </tr> <tr> <td><a onClick="hideSubMenu('matchmenu')" onMouseUp="hideSubMenu('matchmenu')" class="submenuitem" href="/afl/footy/tg-geelong-cats">Cats</a></td> <td><a onClick="hideSubMenu('matchmenu')" onMouseUp="hideSubMenu('matchmenu')" class="submenuitem" href="/afl/footy/tg-adelaide-crows">Crows</a></td> <td><a onClick="hideSubMenu('matchmenu')" onMouseUp="hideSubMenu('matchmenu')" class="submenuitem" href="/afl/footy/tg-melbourne-demons">Demons</a></td> </tr> <tr> <td><a onClick="hideSubMenu('matchmenu')" onMouseUp="hideSubMenu('matchmenu')" class="submenuitem" href="/afl/footy/tg-fremantle-dockers">Dockers</a></td> <td><a onClick="hideSubMenu('matchmenu')" onMouseUp="hideSubMenu('matchmenu')" class="submenuitem" href="/afl/footy/tg-west-coast-eagles">Eagles</a></td> <td><a onClick="hideSubMenu('matchmenu')" onMouseUp="hideSubMenu('matchmenu')" class="submenuitem" href="/afl/footy/tg-greater-western-sydney-giants">Giants</a></td> </tr> <tr> <td><a onClick="hideSubMenu('matchmenu')" onMouseUp="hideSubMenu('matchmenu')" class="submenuitem" href="/afl/footy/tg-hawthorn-hawks">Hawks</a></td> <td><a onClick="hideSubMenu('matchmenu')" onMouseUp="hideSubMenu('matchmenu')" class="submenuitem" href="/afl/footy/tg-kangaroos">Kangaroos</a></td> <td><a onClick="hideSubMenu('matchmenu')" onMouseUp="hideSubMenu('matchmenu')" class="submenuitem" href="/afl/footy/tg-brisbane-lions">Lions</a></td> </tr> <tr> <td><a onClick="hideSubMenu('matchmenu')" onMouseUp="hideSubMenu('matchmenu')" class="submenuitem" href="/afl/footy/tg-collingwood-magpies">Magpies</a></td> <td><a onClick="hideSubMenu('matchmenu')" onMouseUp="hideSubMenu('matchmenu')" class="submenuitem" href="/afl/footy/tg-port-adelaide-power">Power</a></td> <td><a onClick="hideSubMenu('matchmenu')" onMouseUp="hideSubMenu('matchmenu')" class="submenuitem" href="/afl/footy/tg-st-kilda-saints">Saints</a></td> </tr> <tr> <td><a onClick="hideSubMenu('matchmenu')" onMouseUp="hideSubMenu('matchmenu')" class="submenuitem" href="/afl/footy/tg-gold-coast-suns">Suns</a></td> <td><a onClick="hideSubMenu('matchmenu')" onMouseUp="hideSubMenu('matchmenu')" class="submenuitem" href="/afl/footy/tg-sydney-swans">Swans</a></td> <td><a onClick="hideSubMenu('matchmenu')" onMouseUp="hideSubMenu('matchmenu')" class="submenuitem" href="/afl/footy/tg-richmond-tigers">Tigers</a></td> </tr> <tr><td align="right" colspan="3"><div class="submenux" onClick="hideSubMenu('matchmenu')" onMouseUp="hideSubMenu('matchmenu')" style="padding-top:6px;">hide menu</div></td></tr> </table> <table id="laddermenu"> <tr><td align="right" colspan="3"><div class="submenux" onClick="hideSubMenu('laddermenu')" onMouseUp="hideSubMenu('laddermenu')" >x</div></td></tr> <tr><td colspan="3"><a onClick="hideSubMenu('laddermenu')" onMouseUp="hideSubMenu('laddermenu')" class="submenuitem" href="/afl/footy/ft_ladder">Full Season</a></td></tr> <tr><td colspan="3"><a onClick="hideSubMenu('laddermenu')" onMouseUp="hideSubMenu('laddermenu')" class="submenuitem" href="/afl/footy/live_ladder">Live Ladder</a></td></tr> <tr> <td colspan="3"><div class="submenutitle">Filter Ladder by</div></td> </tr> <tr> <td><a onClick="hideSubMenu('laddermenu')" onMouseUp="hideSubMenu('laddermenu')" class="submenuitem" href="/afl/footy/ft_ladder?pt=RD&st=01&sb=p">Round</a></td> <td><a onClick="hideSubMenu('laddermenu')" onMouseUp="hideSubMenu('laddermenu')" class="submenuitem" href="/afl/footy/ft_ladder?pt=PD&st=Q1&sb=p">Match Period</a></td> <td><a onClick="hideSubMenu('laddermenu')" onMouseUp="hideSubMenu('laddermenu')" class="submenuitem" href="/afl/footy/ft_ladder?pt=LC&st=LC&sb=p">Location</a></td> </tr> <tr> <td><a onClick="hideSubMenu('laddermenu')" onMouseUp="hideSubMenu('laddermenu')" class="submenuitem" href="/afl/footy/ft_ladder?pt=VN&st=10&sb=p">Venue</a></td> <td><a onClick="hideSubMenu('laddermenu')" onMouseUp="hideSubMenu('laddermenu')" class="submenuitem" href="/afl/footy/ft_ladder?pt=ST&st=disposals&sb=p">Stats</a></td> </tr> <tr><td align="right" colspan="3"><div class="submenux" onClick="hideSubMenu('laddermenu')" onMouseUp="hideSubMenu('laddermenu')" style="padding-top:6px;">hide menu</div></td></tr> </table> <table id="brownlowmenu"> <tr><td align="right" colspan="3"><div class="submenux" onClick="hideSubMenu('brownlowmenu')" onMouseUp="hideSubMenu('brownlowmenu')" >x</div></td></tr> <tr><td colspan="3"><a onClick="hideSubMenu('brownlowmenu')" onMouseUp="hideSubMenu('brownlowmenu')" class="submenuitem" href="/afl/footy/brownlow_medal">Full Brownlow Medal Count</a></td></tr><tr> <tr><td colspan="3"><a onClick="hideSubMenu('brownlowmenu')" onMouseUp="hideSubMenu('brownlowmenu')" class="submenuitem" href="/afl/footy/brownlow_medal_winners">Brownlow Medal Winners</a></td></tr><tr> <tr><td colspan="3"><a onClick="hideSubMenu('brownlowmenu')" onMouseUp="hideSubMenu('brownlowmenu')" class="submenuitem" href="/afl/footy/team_brownlow_medal_summaries">Summary by Team</a></td></tr><tr> <tr> <td colspan="3"><div class="submenutitle">Brownlow Medal Vote Getters By Club</div></td> </tr> <tr> <td><a onClick="hideSubMenu('brownlowmenu')" onMouseUp="hideSubMenu('brownlowmenu')" class="submenuitem" href="/afl/footy/tb-carlton-blues">Blues</a></td> <td><a onClick="hideSubMenu('brownlowmenu')" onMouseUp="hideSubMenu('brownlowmenu')" class="submenuitem" href="/afl/footy/tb-essendon-bombers">Bombers</a></td> <td><a onClick="hideSubMenu('brownlowmenu')" onMouseUp="hideSubMenu('brownlowmenu')" class="submenuitem" href="/afl/footy/tb-western-bulldogs">Bulldogs</a></td> </tr> <tr> <td><a onClick="hideSubMenu('brownlowmenu')" onMouseUp="hideSubMenu('brownlowmenu')" class="submenuitem" href="/afl/footy/tb-geelong-cats">Cats</a></td> <td><a onClick="hideSubMenu('brownlowmenu')" onMouseUp="hideSubMenu('brownlowmenu')" class="submenuitem" href="/afl/footy/tb-adelaide-crows">Crows</a></td> <td><a onClick="hideSubMenu('brownlowmenu')" onMouseUp="hideSubMenu('brownlowmenu')" class="submenuitem" href="/afl/footy/tb-melbourne-demons">Demons</a></td> </tr> <tr> <td><a onClick="hideSubMenu('brownlowmenu')" onMouseUp="hideSubMenu('brownlowmenu')" class="submenuitem" href="/afl/footy/tb-fremantle-dockers">Dockers</a></td> <td><a onClick="hideSubMenu('brownlowmenu')" onMouseUp="hideSubMenu('brownlowmenu')" class="submenuitem" href="/afl/footy/tb-west-coast-eagles">Eagles</a></td> <td><a onClick="hideSubMenu('brownlowmenu')" onMouseUp="hideSubMenu('brownlowmenu')" class="submenuitem" href="/afl/footy/tb-greater-western-sydney-giants">Giants</a></td> </tr> <tr> <td><a onClick="hideSubMenu('brownlowmenu')" onMouseUp="hideSubMenu('brownlowmenu')" class="submenuitem" href="/afl/footy/tb-hawthorn-hawks">Hawks</a></td> <td><a onClick="hideSubMenu('brownlowmenu')" onMouseUp="hideSubMenu('brownlowmenu')" class="submenuitem" href="/afl/footy/tb-kangaroos">Kangaroos</a></td> <td><a onClick="hideSubMenu('brownlowmenu')" onMouseUp="hideSubMenu('brownlowmenu')" class="submenuitem" href="/afl/footy/tb-brisbane-lions">Lions</a></td> </tr> <tr> <td><a onClick="hideSubMenu('brownlowmenu')" onMouseUp="hideSubMenu('brownlowmenu')" class="submenuitem" href="/afl/footy/tb-collingwood-magpies">Magpies</a></td> <td><a onClick="hideSubMenu('brownlowmenu')" onMouseUp="hideSubMenu('brownlowmenu')" class="submenuitem" href="/afl/footy/tb-port-adelaide-power">Power</a></td> <td><a onClick="hideSubMenu('brownlowmenu')" onMouseUp="hideSubMenu('brownlowmenu')" class="submenuitem" href="/afl/footy/tb-st-kilda-saints">Saints</a></td> </tr> <tr> <td><a onClick="hideSubMenu('brownlowmenu')" onMouseUp="hideSubMenu('brownlowmenu')" class="submenuitem" href="/afl/footy/tb-gold-coast-suns">Suns</a></td> <td><a onClick="hideSubMenu('brownlowmenu')" onMouseUp="hideSubMenu('brownlowmenu')" class="submenuitem" href="/afl/footy/tb-sydney-swans">Swans</a></td> <td><a onClick="hideSubMenu('brownlowmenu')" onMouseUp="hideSubMenu('brownlowmenu')" class="submenuitem" href="/afl/footy/tb-richmond-tigers">Tigers</a></td> </tr> <tr><td align="right" colspan="3"><div class="submenux" onClick="hideSubMenu('brownlowmenu')" onMouseUp="hideSubMenu('brownlowmenu')" style="padding-top:6px;">hide menu</div></td></tr> </table> <table id="attendancemenu"> <tr><td align="right" colspan="3"><div class="submenux" onClick="hideSubMenu('attendancemenu')" onMouseUp="hideSubMenu('attendancemenu')" >x</div></td></tr> <tr><td colspan="3"><a onClick="hideSubMenu('attendancemenu')" onMouseUp="hideSubMenu('attendancemenu')" class="submenuitem" href="/afl/footy/attendances">AFL Crowds & Attendances</a></td></tr><tr> <tr> <td colspan="3"><div class="submenutitle">Historical Attendance by Team</div></td> </tr> <tr> <td><a onClick="hideSubMenu('attendancemenu')" onMouseUp="hideSubMenu('attendancemenu')" class="submenuitem" href="/afl/footy/ta-carlton-blues">Blues</a></td> <td><a onClick="hideSubMenu('attendancemenu')" onMouseUp="hideSubMenu('attendancemenu')" class="submenuitem" href="/afl/footy/ta-essendon-bombers">Bombers</a></td> <td><a onClick="hideSubMenu('attendancemenu')" onMouseUp="hideSubMenu('attendancemenu')" class="submenuitem" href="/afl/footy/ta-western-bulldogs">Bulldogs</a></td> </tr> <tr> <td><a onClick="hideSubMenu('attendancemenu')" onMouseUp="hideSubMenu('attendancemenu')" class="submenuitem" href="/afl/footy/ta-geelong-cats">Cats</a></td> <td><a onClick="hideSubMenu('attendancemenu')" onMouseUp="hideSubMenu('attendancemenu')" class="submenuitem" href="/afl/footy/ta-adelaide-crows">Crows</a></td> <td><a onClick="hideSubMenu('attendancemenu')" onMouseUp="hideSubMenu('attendancemenu')" class="submenuitem" href="/afl/footy/ta-melbourne-demons">Demons</a></td> </tr> <tr> <td><a onClick="hideSubMenu('attendancemenu')" onMouseUp="hideSubMenu('attendancemenu')" class="submenuitem" href="/afl/footy/ta-fremantle-dockers">Dockers</a></td> <td><a onClick="hideSubMenu('attendancemenu')" onMouseUp="hideSubMenu('attendancemenu')" class="submenuitem" href="/afl/footy/ta-west-coast-eagles">Eagles</a></td> <td><a onClick="hideSubMenu('attendancemenu')" onMouseUp="hideSubMenu('attendancemenu')" class="submenuitem" href="/afl/footy/ta-greater-western-sydney-giants">Giants</a></td> </tr> <tr> <td><a onClick="hideSubMenu('attendancemenu')" onMouseUp="hideSubMenu('attendancemenu')" class="submenuitem" href="/afl/footy/ta-hawthorn-hawks">Hawks</a></td> <td><a onClick="hideSubMenu('attendancemenu')" onMouseUp="hideSubMenu('attendancemenu')" class="submenuitem" href="/afl/footy/ta-kangaroos">Kangaroos</a></td> <td><a onClick="hideSubMenu('attendancemenu')" onMouseUp="hideSubMenu('attendancemenu')" class="submenuitem" href="/afl/footy/ta-brisbane-lions">Lions</a></td> </tr> <tr> <td><a onClick="hideSubMenu('attendancemenu')" onMouseUp="hideSubMenu('attendancemenu')" class="submenuitem" href="/afl/footy/ta-collingwood-magpies">Magpies</a></td> <td><a onClick="hideSubMenu('attendancemenu')" onMouseUp="hideSubMenu('attendancemenu')" class="submenuitem" href="/afl/footy/ta-port-adelaide-power">Power</a></td> <td><a onClick="hideSubMenu('attendancemenu')" onMouseUp="hideSubMenu('attendancemenu')" class="submenuitem" href="/afl/footy/ta-st-kilda-saints">Saints</a></td> </tr> <tr> <td><a onClick="hideSubMenu('attendancemenu')" onMouseUp="hideSubMenu('attendancemenu')" class="submenuitem" href="/afl/footy/ta-gold-coast-suns">Suns</a></td> <td><a onClick="hideSubMenu('attendancemenu')" onMouseUp="hideSubMenu('attendancemenu')" class="submenuitem" href="/afl/footy/ta-sydney-swans">Swans</a></td> <td><a onClick="hideSubMenu('attendancemenu')" onMouseUp="hideSubMenu('attendancemenu')" class="submenuitem" href="/afl/footy/ta-richmond-tigers">Tigers</a></td> </tr> <tr><td align="right" colspan="3"><div class="submenux" onClick="hideSubMenu('attendancemenu')" onMouseUp="hideSubMenu('attendancemenu')" style="padding-top:6px;">hide menu</div></td></tr> </table> <table id="coachmenu"> <tr><td align="right" colspan="3"><div class="submenux" onClick="hideSubMenu('coachmenu')" onMouseUp="hideSubMenu('coachmenu')" >x</div></td></tr> <tr><td colspan="3"><a onClick="hideSubMenu('coachmenu')" onMouseUp="hideSubMenu('coachmenu')" class="submenuitem" href="/afl/footy/afl_coaches">AFL Coaches</a></td></tr><tr> <tr> <td colspan="3"><div class="submenutitle">AFL Club Coaches</div></td> </tr> <tr> <td><a onClick="hideSubMenu('coachmenu')" onMouseUp="hideSubMenu('coachmenu')" class="submenuitem" href="/afl/footy/tc-carlton-blues">Blues</a></td> <td><a onClick="hideSubMenu('coachmenu')" onMouseUp="hideSubMenu('coachmenu')" class="submenuitem" href="/afl/footy/tc-essendon-bombers">Bombers</a></td> <td><a onClick="hideSubMenu('coachmenu')" onMouseUp="hideSubMenu('coachmenu')" class="submenuitem" href="/afl/footy/tc-western-bulldogs">Bulldogs</a></td> </tr> <tr> <td><a onClick="hideSubMenu('coachmenu')" onMouseUp="hideSubMenu('coachmenu')" class="submenuitem" href="/afl/footy/tc-geelong-cats">Cats</a></td> <td><a onClick="hideSubMenu('coachmenu')" onMouseUp="hideSubMenu('coachmenu')" class="submenuitem" href="/afl/footy/tc-adelaide-crows">Crows</a></td> <td><a onClick="hideSubMenu('coachmenu')" onMouseUp="hideSubMenu('coachmenu')" class="submenuitem" href="/afl/footy/tc-melbourne-demons">Demons</a></td> </tr> <tr> <td><a onClick="hideSubMenu('coachmenu')" onMouseUp="hideSubMenu('coachmenu')" class="submenuitem" href="/afl/footy/tc-fremantle-dockers">Dockers</a></td> <td><a onClick="hideSubMenu('coachmenu')" onMouseUp="hideSubMenu('coachmenu')" class="submenuitem" href="/afl/footy/tc-west-coast-eagles">Eagles</a></td> <td><a onClick="hideSubMenu('coachmenu')" onMouseUp="hideSubMenu('coachmenu')" class="submenuitem" href="/afl/footy/tc-greater-western-sydney-giants">Giants</a></td> </tr> <tr> <td><a onClick="hideSubMenu('coachmenu')" onMouseUp="hideSubMenu('coachmenu')" class="submenuitem" href="/afl/footy/tc-hawthorn-hawks">Hawks</a></td> <td><a onClick="hideSubMenu('coachmenu')" onMouseUp="hideSubMenu('coachmenu')" class="submenuitem" href="/afl/footy/tc-kangaroos">Kangaroos</a></td> <td><a onClick="hideSubMenu('coachmenu')" onMouseUp="hideSubMenu('coachmenu')" class="submenuitem" href="/afl/footy/tc-brisbane-lions">Lions</a></td> </tr> <tr> <td><a onClick="hideSubMenu('coachmenu')" onMouseUp="hideSubMenu('coachmenu')" class="submenuitem" href="/afl/footy/tc-collingwood-magpies">Magpies</a></td> <td><a onClick="hideSubMenu('coachmenu')" onMouseUp="hideSubMenu('coachmenu')" class="submenuitem" href="/afl/footy/tc-port-adelaide-power">Power</a></td> <td><a onClick="hideSubMenu('coachmenu')" onMouseUp="hideSubMenu('coachmenu')" class="submenuitem" href="/afl/footy/tc-st-kilda-saints">Saints</a></td> </tr> <tr> <td><a onClick="hideSubMenu('coachmenu')" onMouseUp="hideSubMenu('coachmenu')" class="submenuitem" href="/afl/footy/tc-gold-coast-suns">Suns</a></td> <td><a onClick="hideSubMenu('coachmenu')" onMouseUp="hideSubMenu('coachmenu')" class="submenuitem" href="/afl/footy/tc-sydney-swans">Swans</a></td> <td><a onClick="hideSubMenu('coachmenu')" onMouseUp="hideSubMenu('coachmenu')" class="submenuitem" href="/afl/footy/tc-richmond-tigers">Tigers</a></td> </tr> <tr><td align="right" colspan="3"><div class="submenux" onClick="hideSubMenu('coachmenu')" onMouseUp="hideSubMenu('coachmenu')" style="padding-top:6px;">hide menu</div></td></tr> </table> <table id="highlightsmenu"> <tr><td align="right" colspan="3"><div class="submenux" onClick="hideSubMenu('highlightsmenu')" onMouseUp="hideSubMenu('highlightsmenu')" >x</div></td></tr> <tr><td colspan="3"><a onClick="hideSubMenu('highlightsmenu')" onMouseUp="hideSubMenu('highlightsmenu')" class="submenuitem" href="/afl/footy/afl_highlights">AFL Highlights</a></td></tr><tr> <tr> <td colspan="3"><div class="submenutitle">AFL Club Highlights</div></td> </tr> <tr> <td><a onClick="hideSubMenu('highlightsmenu')" onMouseUp="hideSubMenu('highlightsmenu')" class="submenuitem" href="/afl/footy/tv-carlton-blues">Blues</a></td> <td><a onClick="hideSubMenu('highlightsmenu')" onMouseUp="hideSubMenu('highlightsmenu')" class="submenuitem" href="/afl/footy/tv-essendon-bombers">Bombers</a></td> <td><a onClick="hideSubMenu('highlightsmenu')" onMouseUp="hideSubMenu('highlightsmenu')" class="submenuitem" href="/afl/footy/tv-western-bulldogs">Bulldogs</a></td> </tr> <tr> <td><a onClick="hideSubMenu('highlightsmenu')" onMouseUp="hideSubMenu('highlightsmenu')" class="submenuitem" href="/afl/footy/tv-geelong-cats">Cats</a></td> <td><a onClick="hideSubMenu('highlightsmenu')" onMouseUp="hideSubMenu('highlightsmenu')" class="submenuitem" href="/afl/footy/tv-adelaide-crows">Crows</a></td> <td><a onClick="hideSubMenu('highlightsmenu')" onMouseUp="hideSubMenu('highlightsmenu')" class="submenuitem" href="/afl/footy/tv-melbourne-demons">Demons</a></td> </tr> <tr> <td><a onClick="hideSubMenu('highlightsmenu')" onMouseUp="hideSubMenu('highlightsmenu')" class="submenuitem" href="/afl/footy/tv-fremantle-dockers">Dockers</a></td> <td><a onClick="hideSubMenu('highlightsmenu')" onMouseUp="hideSubMenu('highlightsmenu')" class="submenuitem" href="/afl/footy/tv-west-coast-eagles">Eagles</a></td> <td><a onClick="hideSubMenu('highlightsmenu')" onMouseUp="hideSubMenu('highlightsmenu')" class="submenuitem" href="/afl/footy/tv-greater-western-sydney-giants">Giants</a></td> </tr> <tr> <td><a onClick="hideSubMenu('highlightsmenu')" onMouseUp="hideSubMenu('highlightsmenu')" class="submenuitem" href="/afl/footy/tv-hawthorn-hawks">Hawks</a></td> <td><a onClick="hideSubMenu('highlightsmenu')" onMouseUp="hideSubMenu('highlightsmenu')" class="submenuitem" href="/afl/footy/tv-kangaroos">Kangaroos</a></td> <td><a onClick="hideSubMenu('highlightsmenu')" onMouseUp="hideSubMenu('highlightsmenu')" class="submenuitem" href="/afl/footy/tv-brisbane-lions">Lions</a></td> </tr> <tr> <td><a onClick="hideSubMenu('highlightsmenu')" onMouseUp="hideSubMenu('highlightsmenu')" class="submenuitem" href="/afl/footy/tv-collingwood-magpies">Magpies</a></td> <td><a onClick="hideSubMenu('highlightsmenu')" onMouseUp="hideSubMenu('highlightsmenu')" class="submenuitem" href="/afl/footy/tv-port-adelaide-power">Power</a></td> <td><a onClick="hideSubMenu('highlightsmenu')" onMouseUp="hideSubMenu('highlightsmenu')" class="submenuitem" href="/afl/footy/tv-st-kilda-saints">Saints</a></td> </tr> <tr> <td><a onClick="hideSubMenu('highlightsmenu')" onMouseUp="hideSubMenu('highlightsmenu')" class="submenuitem" href="/afl/footy/tv-gold-coast-suns">Suns</a></td> <td><a onClick="hideSubMenu('highlightsmenu')" onMouseUp="hideSubMenu('highlightsmenu')" class="submenuitem" href="/afl/footy/tv-sydney-swans">Swans</a></td> <td><a onClick="hideSubMenu('highlightsmenu')" onMouseUp="hideSubMenu('highlightsmenu')" class="submenuitem" href="/afl/footy/tv-richmond-tigers">Tigers</a></td> </tr> <tr><td align="right" colspan="3"><div class="submenux" onClick="hideSubMenu('highlightsmenu')" onMouseUp="hideSubMenu('highlightsmenu')" style="padding-top:6px;">hide menu</div></td></tr> </table> <table id="supercoachmenu"> <tr><td align="right"><div class="submenux" onClick="hideSubMenu('supercoachmenu')" onMouseUp="hideSubMenu('supercoachmenu')" >x</div></td></tr> <tr><td><a onClick="hideSubMenu('supercoachmenu')" onMouseUp="hideSubMenu('supercoachmenu')" class="submenuitem" href="/afl/footy/supercoach_round">Round by Round Player Rankings</a></td></tr><tr> <tr><td><a onClick="hideSubMenu('supercoachmenu')" onMouseUp="hideSubMenu('supercoachmenu')" class="submenuitem" href="/afl/footy/supercoach_season">Season Player Rankings</a></td></tr><tr> <tr><td><a onClick="hideSubMenu('supercoachmenu')" onMouseUp="hideSubMenu('supercoachmenu')" class="submenuitem" href="/afl/footy/supercoach_breakevens">Supercoach Breakevens</a></td></tr><tr> <tr><td><a onClick="hideSubMenu('supercoachmenu')" onMouseUp="hideSubMenu('supercoachmenu')" class="submenuitem" href="/afl/footy/supercoach_scores">Supercoach Scores</a></td></tr><tr> <tr><td><a onClick="hideSubMenu('supercoachmenu')" onMouseUp="hideSubMenu('supercoachmenu')" class="submenuitem" href="/afl/footy/supercoach_prices">Supercoach Prices</a></td></tr><tr> <tr><td><a onClick="hideSubMenu('supercoachmenu')" onMouseUp="hideSubMenu('supercoachmenu')" class="submenuitem" href="/afl/footy/custom_supercoach_latest_scores">Custom Supercoach Player List</a></td></tr><tr> <tr><td><a onClick="hideSubMenu('supercoachmenu')" onMouseUp="hideSubMenu('supercoachmenu')" class="submenuitem" href="/afl/footy/pre_season_supercoach">Pre-Season Supercoach Stats</a></td></tr><tr> <tr><td align="right"><div class="submenux" onClick="hideSubMenu('supercoachmenu')" onMouseUp="hideSubMenu('supercoachmenu')" style="padding-top:6px;">hide menu</div></td></tr> </table> <table id="dreamteammenu"> <tr><td align="right"><div class="submenux" onClick="hideSubMenu('dreamteammenu')" onMouseUp="hideSubMenu('dreamteammenu')" >x</div></td></tr> <tr><td><a onClick="hideSubMenu('dreamteammenu')" onMouseUp="hideSubMenu('dreamteammenu')" class="submenuitem" href="/afl/footy/dream_team_round">Round by Round Player Rankings</a></td></tr><tr> <tr><td><a onClick="hideSubMenu('dreamteammenu')" onMouseUp="hideSubMenu('dreamteammenu')" class="submenuitem" href="/afl/footy/dream_team_season">Season Player Rankings</a></td></tr><tr> <tr><td><a onClick="hideSubMenu('dreamteammenu')" onMouseUp="hideSubMenu('dreamteammenu')" class="submenuitem" href="/afl/footy/dream_team_breakevens">AFL Fantasy Breakevens</a></td></tr><tr> <tr><td><a onClick="hideSubMenu('dreamteammenu')" onMouseUp="hideSubMenu('dreamteammenu')" class="submenuitem" href="/afl/footy/dream_team_scores">AFL Fantasy Scores</a></td></tr><tr> <tr><td><a onClick="hideSubMenu('dreamteammenu')" onMouseUp="hideSubMenu('dreamteammenu')" class="submenuitem" href="/afl/footy/dream_team_prices">AFL Fantasy Prices</a></td></tr><tr> <tr><td><a onClick="hideSubMenu('dreamteammenu')" onMouseUp="hideSubMenu('dreamteammenu')" class="submenuitem" href="/afl/footy/custom_dream_team_latest_scores">Custom AFL Fantasy Player List</a></td></tr><tr> <tr><td><a onClick="hideSubMenu('dreamteammenu')" onMouseUp="hideSubMenu('dreamteammenu')" class="submenuitem" href="/afl/footy/pre_season_dream_team">Pre-Season AFL Fantasy Stats</a></td></tr><tr> <tr><td align="right"><div class="submenux" onClick="hideSubMenu('dreamteammenu')" onMouseUp="hideSubMenu('dreamteammenu')" style="padding-top:6px;">hide menu</div></td></tr> </table> <table id="selectionsmenu"> <tr><td align="right"><div class="submenux" onClick="hideSubMenu('selectionsmenu')" onMouseUp="hideSubMenu('selectionsmenu')" >x</div></td></tr> <tr><td><a onClick="hideSubMenu('selectionsmenu')" onMouseUp="hideSubMenu('selectionsmenu')" class="submenuitem" href="/afl/footy/afl_team_selections">Latest Team Selections</a></td></tr><tr> <tr><td><a onClick="hideSubMenu('selectionsmenu')" onMouseUp="hideSubMenu('selectionsmenu')" class="submenuitem" href="/afl/footy/custom_all_team_selections">Custom Team Selections List</a></td></tr><tr> <tr><td align="right"><div class="submenux" onClick="hideSubMenu('selectionsmenu')" onMouseUp="hideSubMenu('selectionsmenu')" style="padding-top:6px;">hide menu</div></td></tr> </table> <table id="pastplayermenu"> <tr><td align="right" colspan="3"><div class="submenux" onClick="hideSubMenu('pastplayermenu')" onMouseUp="hideSubMenu('pastplayermenu')" >x</div></td></tr> <tr> <td><a onClick="hideSubMenu('pastplayermenu')" onMouseUp="hideSubMenu('pastplayermenu')" class="submenuitem" href="/afl/footy/ti-carlton-blues">Blues</a></td> <td><a onClick="hideSubMenu('pastplayermenu')" onMouseUp="hideSubMenu('pastplayermenu')" class="submenuitem" href="/afl/footy/ti-essendon-bombers">Bombers</a></td> <td><a onClick="hideSubMenu('pastplayermenu')" onMouseUp="hideSubMenu('pastplayermenu')" class="submenuitem" href="/afl/footy/ti-western-bulldogs">Bulldogs</a></td> </tr> <tr> <td><a onClick="hideSubMenu('pastplayermenu')" onMouseUp="hideSubMenu('pastplayermenu')" class="submenuitem" href="/afl/footy/ti-geelong-cats">Cats</a></td> <td><a onClick="hideSubMenu('pastplayermenu')" onMouseUp="hideSubMenu('pastplayermenu')" class="submenuitem" href="/afl/footy/ti-adelaide-crows">Crows</a></td> <td><a onClick="hideSubMenu('pastplayermenu')" onMouseUp="hideSubMenu('pastplayermenu')" class="submenuitem" href="/afl/footy/ti-melbourne-demons">Demons</a></td> </tr> <tr> <td><a onClick="hideSubMenu('pastplayermenu')" onMouseUp="hideSubMenu('pastplayermenu')" class="submenuitem" href="/afl/footy/ti-fremantle-dockers">Dockers</a></td> <td><a onClick="hideSubMenu('pastplayermenu')" onMouseUp="hideSubMenu('pastplayermenu')" class="submenuitem" href="/afl/footy/ti-west-coast-eagles">Eagles</a></td> <td><a onClick="hideSubMenu('pastplayermenu')" onMouseUp="hideSubMenu('pastplayermenu')" class="submenuitem" href="/afl/footy/ti-greater-western-sydney-giants">Giants</a></td> </tr> <tr> <td><a onClick="hideSubMenu('pastplayermenu')" onMouseUp="hideSubMenu('pastplayermenu')" class="submenuitem" href="/afl/footy/ti-hawthorn-hawks">Hawks</a></td> <td><a onClick="hideSubMenu('pastplayermenu')" onMouseUp="hideSubMenu('pastplayermenu')" class="submenuitem" href="/afl/footy/ti-kangaroos">Kangaroos</a></td> <td><a onClick="hideSubMenu('pastplayermenu')" onMouseUp="hideSubMenu('pastplayermenu')" class="submenuitem" href="/afl/footy/ti-brisbane-lions">Lions</a></td> </tr> <tr> <td><a onClick="hideSubMenu('pastplayermenu')" onMouseUp="hideSubMenu('pastplayermenu')" class="submenuitem" href="/afl/footy/ti-collingwood-magpies">Magpies</a></td> <td><a onClick="hideSubMenu('pastplayermenu')" onMouseUp="hideSubMenu('pastplayermenu')" class="submenuitem" href="/afl/footy/ti-port-adelaide-power">Power</a></td> <td><a onClick="hideSubMenu('pastplayermenu')" onMouseUp="hideSubMenu('pastplayermenu')" class="submenuitem" href="/afl/footy/ti-st-kilda-saints">Saints</a></td> </tr> <tr> <td><a onClick="hideSubMenu('pastplayermenu')" onMouseUp="hideSubMenu('pastplayermenu')" class="submenuitem" href="/afl/footy/ti-gold-coast-suns">Suns</a></td> <td><a onClick="hideSubMenu('pastplayermenu')" onMouseUp="hideSubMenu('pastplayermenu')" class="submenuitem" href="/afl/footy/ti-sydney-swans">Swans</a></td> <td><a onClick="hideSubMenu('pastplayermenu')" onMouseUp="hideSubMenu('pastplayermenu')" class="submenuitem" href="/afl/footy/ti-richmond-tigers">Tigers</a></td> </tr> <tr><td align="right" colspan="3"><div class="submenux" onClick="hideSubMenu('pastplayermenu')" onMouseUp="hideSubMenu('pastplayermenu')" style="padding-top:6px;">hide menu</div></td></tr> </table> <table id="contractsmenu"> <tr><td align="right" colspan="3"><div class="submenux" onClick="hideSubMenu('contractsmenu')" onMouseUp="hideSubMenu('contractsmenu')" >x</div></td></tr> <tr> <td><a onClick="hideSubMenu('contractsmenu')" onMouseUp="hideSubMenu('contractsmenu')" class="submenuitem" href="/afl/footy/to-carlton-blues">Blues</a></td> <td><a onClick="hideSubMenu('contractsmenu')" onMouseUp="hideSubMenu('contractsmenu')" class="submenuitem" href="/afl/footy/to-essendon-bombers">Bombers</a></td> <td><a onClick="hideSubMenu('contractsmenu')" onMouseUp="hideSubMenu('contractsmenu')" class="submenuitem" href="/afl/footy/to-western-bulldogs">Bulldogs</a></td> </tr> <tr> <td><a onClick="hideSubMenu('contractsmenu')" onMouseUp="hideSubMenu('contractsmenu')" class="submenuitem" href="/afl/footy/to-geelong-cats">Cats</a></td> <td><a onClick="hideSubMenu('contractsmenu')" onMouseUp="hideSubMenu('contractsmenu')" class="submenuitem" href="/afl/footy/to-adelaide-crows">Crows</a></td> <td><a onClick="hideSubMenu('contractsmenu')" onMouseUp="hideSubMenu('contractsmenu')" class="submenuitem" href="/afl/footy/to-melbourne-demons">Demons</a></td> </tr> <tr> <td><a onClick="hideSubMenu('contractsmenu')" onMouseUp="hideSubMenu('contractsmenu')" class="submenuitem" href="/afl/footy/to-fremantle-dockers">Dockers</a></td> <td><a onClick="hideSubMenu('contractsmenu')" onMouseUp="hideSubMenu('contractsmenu')" class="submenuitem" href="/afl/footy/to-west-coast-eagles">Eagles</a></td> <td><a onClick="hideSubMenu('contractsmenu')" onMouseUp="hideSubMenu('contractsmenu')" class="submenuitem" href="/afl/footy/to-greater-western-sydney-giants">Giants</a></td> </tr> <tr> <td><a onClick="hideSubMenu('contractsmenu')" onMouseUp="hideSubMenu('contractsmenu')" class="submenuitem" href="/afl/footy/to-hawthorn-hawks">Hawks</a></td> <td><a onClick="hideSubMenu('contractsmenu')" onMouseUp="hideSubMenu('contractsmenu')" class="submenuitem" href="/afl/footy/to-kangaroos">Kangaroos</a></td> <td><a onClick="hideSubMenu('contractsmenu')" onMouseUp="hideSubMenu('contractsmenu')" class="submenuitem" href="/afl/footy/to-brisbane-lions">Lions</a></td> </tr> <tr> <td><a onClick="hideSubMenu('contractsmenu')" onMouseUp="hideSubMenu('contractsmenu')" class="submenuitem" href="/afl/footy/to-collingwood-magpies">Magpies</a></td> <td><a onClick="hideSubMenu('contractsmenu')" onMouseUp="hideSubMenu('contractsmenu')" class="submenuitem" href="/afl/footy/to-port-adelaide-power">Power</a></td> <td><a onClick="hideSubMenu('contractsmenu')" onMouseUp="hideSubMenu('contractsmenu')" class="submenuitem" href="/afl/footy/to-st-kilda-saints">Saints</a></td> </tr> <tr> <td><a onClick="hideSubMenu('contractsmenu')" onMouseUp="hideSubMenu('contractsmenu')" class="submenuitem" href="/afl/footy/to-gold-coast-suns">Suns</a></td> <td><a onClick="hideSubMenu('contractsmenu')" onMouseUp="hideSubMenu('contractsmenu')" class="submenuitem" href="/afl/footy/to-sydney-swans">Swans</a></td> <td><a onClick="hideSubMenu('contractsmenu')" onMouseUp="hideSubMenu('contractsmenu')" class="submenuitem" href="/afl/footy/to-richmond-tigers">Tigers</a></td> </tr> <tr><td align="right" colspan="3"><div class="submenux" onClick="hideSubMenu('contractsmenu')" onMouseUp="hideSubMenu('contractsmenu')" style="padding-top:6px;">hide menu</div></td></tr> </table> <div id="membersbgdiv" onClick="closeMemberDivs();"></div> <div id="memberswhitediv"> <table border="0" cellspacing="0" cellpadding="0" align="center"> <tr><td height="30" align="right" valign="top"><span id="membersx" onClick="closeMemberDivs();">X</span></td></tr> <tr><td id="memberscontent" valign="top" align="center"> &nbsp; </td></tr> </table> </div> </BODY> </HTML>
criffy/aflengine
matchfiles/footywire_adv/footywire_adv6292.html
HTML
gpl-3.0
148,281
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>cmake-gui(1) &mdash; CMake 3.15.1 Documentation</title> <link rel="stylesheet" href="../_static/cmake.css" type="text/css" /> <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> <script type="text/javascript" src="../_static/documentation_options.js"></script> <script type="text/javascript" src="../_static/jquery.js"></script> <script type="text/javascript" src="../_static/underscore.js"></script> <script type="text/javascript" src="../_static/doctools.js"></script> <link rel="shortcut icon" href="../_static/cmake-favicon.ico"/> <link rel="index" title="Index" href="../genindex.html" /> <link rel="search" title="Search" href="../search.html" /> <link rel="next" title="ccmake(1)" href="ccmake.1.html" /> <link rel="prev" title="cpack(1)" href="cpack.1.html" /> </head><body> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > <a href="ccmake.1.html" title="ccmake(1)" accesskey="N">next</a> |</li> <li class="right" > <a href="cpack.1.html" title="cpack(1)" accesskey="P">previous</a> |</li> <li> <img src="../_static/cmake-logo-16.png" alt="" style="vertical-align: middle; margin-top: -2px" /> </li> <li> <a href="https://cmake.org/">CMake</a> &#187; </li> <li> <a href="../index.html">3.15.1 Documentation</a> &#187; </li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> <span class="target" id="manual:cmake-gui(1)"></span><div class="section" id="cmake-gui-1"> <h1>cmake-gui(1)<a class="headerlink" href="#cmake-gui-1" title="Permalink to this headline">¶</a></h1> <div class="section" id="synopsis"> <h2>Synopsis<a class="headerlink" href="#synopsis" title="Permalink to this headline">¶</a></h2> <div class="highlight-none notranslate"><div class="highlight"><pre><span></span>cmake-gui [&lt;options&gt;] cmake-gui [&lt;options&gt;] {&lt;path-to-source&gt; | &lt;path-to-existing-build&gt;} cmake-gui [&lt;options&gt;] -S &lt;path-to-source&gt; -B &lt;path-to-build&gt; </pre></div> </div> </div> <div class="section" id="description"> <h2>Description<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2> <p>The <strong>cmake-gui</strong> executable is the CMake GUI. Project configuration settings may be specified interactively. Brief instructions are provided at the bottom of the window when the program is running.</p> <p>CMake is a cross-platform build system generator. Projects specify their build process with platform-independent CMake listfiles included in each directory of a source tree with the name <code class="docutils literal notranslate"><span class="pre">CMakeLists.txt</span></code>. Users build a project by using CMake to generate a build system for a native tool on their platform.</p> </div> <div class="section" id="options"> <h2>Options<a class="headerlink" href="#options" title="Permalink to this headline">¶</a></h2> <dl class="docutils"> <dt><code class="docutils literal notranslate"><span class="pre">-S</span> <span class="pre">&lt;path-to-source&gt;</span></code></dt> <dd>Path to root directory of the CMake project to build.</dd> <dt><code class="docutils literal notranslate"><span class="pre">-B</span> <span class="pre">&lt;path-to-build&gt;</span></code></dt> <dd><p class="first">Path to directory which CMake will use as the root of build directory.</p> <p class="last">If the directory doesn’t already exist CMake will make it.</p> </dd> </dl> <dl class="docutils"> <dt><code class="docutils literal notranslate"><span class="pre">--help,-help,-usage,-h,-H,/?</span></code></dt> <dd><p class="first">Print usage information and exit.</p> <p class="last">Usage describes the basic command line interface and its options.</p> </dd> <dt><code class="docutils literal notranslate"><span class="pre">--version,-version,/V</span> <span class="pre">[&lt;f&gt;]</span></code></dt> <dd><p class="first">Show program name/version banner and exit.</p> <p class="last">If a file is specified, the version is written into it. The help is printed to a named &lt;f&gt;ile if given.</p> </dd> <dt><code class="docutils literal notranslate"><span class="pre">--help-full</span> <span class="pre">[&lt;f&gt;]</span></code></dt> <dd><p class="first">Print all help manuals and exit.</p> <p class="last">All manuals are printed in a human-readable text format. The help is printed to a named &lt;f&gt;ile if given.</p> </dd> <dt><code class="docutils literal notranslate"><span class="pre">--help-manual</span> <span class="pre">&lt;man&gt;</span> <span class="pre">[&lt;f&gt;]</span></code></dt> <dd><p class="first">Print one help manual and exit.</p> <p class="last">The specified manual is printed in a human-readable text format. The help is printed to a named &lt;f&gt;ile if given.</p> </dd> <dt><code class="docutils literal notranslate"><span class="pre">--help-manual-list</span> <span class="pre">[&lt;f&gt;]</span></code></dt> <dd><p class="first">List help manuals available and exit.</p> <p class="last">The list contains all manuals for which help may be obtained by using the <code class="docutils literal notranslate"><span class="pre">--help-manual</span></code> option followed by a manual name. The help is printed to a named &lt;f&gt;ile if given.</p> </dd> <dt><code class="docutils literal notranslate"><span class="pre">--help-command</span> <span class="pre">&lt;cmd&gt;</span> <span class="pre">[&lt;f&gt;]</span></code></dt> <dd><p class="first">Print help for one command and exit.</p> <p class="last">The <span class="target" id="index-0-manual:cmake-commands(7)"></span><a class="reference internal" href="cmake-commands.7.html#manual:cmake-commands(7)" title="cmake-commands(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">cmake-commands(7)</span></code></a> manual entry for <code class="docutils literal notranslate"><span class="pre">&lt;cmd&gt;</span></code> is printed in a human-readable text format. The help is printed to a named &lt;f&gt;ile if given.</p> </dd> <dt><code class="docutils literal notranslate"><span class="pre">--help-command-list</span> <span class="pre">[&lt;f&gt;]</span></code></dt> <dd><p class="first">List commands with help available and exit.</p> <p class="last">The list contains all commands for which help may be obtained by using the <code class="docutils literal notranslate"><span class="pre">--help-command</span></code> option followed by a command name. The help is printed to a named &lt;f&gt;ile if given.</p> </dd> <dt><code class="docutils literal notranslate"><span class="pre">--help-commands</span> <span class="pre">[&lt;f&gt;]</span></code></dt> <dd><p class="first">Print cmake-commands manual and exit.</p> <p class="last">The <span class="target" id="index-1-manual:cmake-commands(7)"></span><a class="reference internal" href="cmake-commands.7.html#manual:cmake-commands(7)" title="cmake-commands(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">cmake-commands(7)</span></code></a> manual is printed in a human-readable text format. The help is printed to a named &lt;f&gt;ile if given.</p> </dd> <dt><code class="docutils literal notranslate"><span class="pre">--help-module</span> <span class="pre">&lt;mod&gt;</span> <span class="pre">[&lt;f&gt;]</span></code></dt> <dd><p class="first">Print help for one module and exit.</p> <p class="last">The <span class="target" id="index-0-manual:cmake-modules(7)"></span><a class="reference internal" href="cmake-modules.7.html#manual:cmake-modules(7)" title="cmake-modules(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">cmake-modules(7)</span></code></a> manual entry for <code class="docutils literal notranslate"><span class="pre">&lt;mod&gt;</span></code> is printed in a human-readable text format. The help is printed to a named &lt;f&gt;ile if given.</p> </dd> <dt><code class="docutils literal notranslate"><span class="pre">--help-module-list</span> <span class="pre">[&lt;f&gt;]</span></code></dt> <dd><p class="first">List modules with help available and exit.</p> <p class="last">The list contains all modules for which help may be obtained by using the <code class="docutils literal notranslate"><span class="pre">--help-module</span></code> option followed by a module name. The help is printed to a named &lt;f&gt;ile if given.</p> </dd> <dt><code class="docutils literal notranslate"><span class="pre">--help-modules</span> <span class="pre">[&lt;f&gt;]</span></code></dt> <dd><p class="first">Print cmake-modules manual and exit.</p> <p class="last">The <span class="target" id="index-1-manual:cmake-modules(7)"></span><a class="reference internal" href="cmake-modules.7.html#manual:cmake-modules(7)" title="cmake-modules(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">cmake-modules(7)</span></code></a> manual is printed in a human-readable text format. The help is printed to a named &lt;f&gt;ile if given.</p> </dd> <dt><code class="docutils literal notranslate"><span class="pre">--help-policy</span> <span class="pre">&lt;cmp&gt;</span> <span class="pre">[&lt;f&gt;]</span></code></dt> <dd><p class="first">Print help for one policy and exit.</p> <p class="last">The <span class="target" id="index-0-manual:cmake-policies(7)"></span><a class="reference internal" href="cmake-policies.7.html#manual:cmake-policies(7)" title="cmake-policies(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">cmake-policies(7)</span></code></a> manual entry for <code class="docutils literal notranslate"><span class="pre">&lt;cmp&gt;</span></code> is printed in a human-readable text format. The help is printed to a named &lt;f&gt;ile if given.</p> </dd> <dt><code class="docutils literal notranslate"><span class="pre">--help-policy-list</span> <span class="pre">[&lt;f&gt;]</span></code></dt> <dd><p class="first">List policies with help available and exit.</p> <p class="last">The list contains all policies for which help may be obtained by using the <code class="docutils literal notranslate"><span class="pre">--help-policy</span></code> option followed by a policy name. The help is printed to a named &lt;f&gt;ile if given.</p> </dd> <dt><code class="docutils literal notranslate"><span class="pre">--help-policies</span> <span class="pre">[&lt;f&gt;]</span></code></dt> <dd><p class="first">Print cmake-policies manual and exit.</p> <p class="last">The <span class="target" id="index-1-manual:cmake-policies(7)"></span><a class="reference internal" href="cmake-policies.7.html#manual:cmake-policies(7)" title="cmake-policies(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">cmake-policies(7)</span></code></a> manual is printed in a human-readable text format. The help is printed to a named &lt;f&gt;ile if given.</p> </dd> <dt><code class="docutils literal notranslate"><span class="pre">--help-property</span> <span class="pre">&lt;prop&gt;</span> <span class="pre">[&lt;f&gt;]</span></code></dt> <dd><p class="first">Print help for one property and exit.</p> <p class="last">The <span class="target" id="index-0-manual:cmake-properties(7)"></span><a class="reference internal" href="cmake-properties.7.html#manual:cmake-properties(7)" title="cmake-properties(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">cmake-properties(7)</span></code></a> manual entries for <code class="docutils literal notranslate"><span class="pre">&lt;prop&gt;</span></code> are printed in a human-readable text format. The help is printed to a named &lt;f&gt;ile if given.</p> </dd> <dt><code class="docutils literal notranslate"><span class="pre">--help-property-list</span> <span class="pre">[&lt;f&gt;]</span></code></dt> <dd><p class="first">List properties with help available and exit.</p> <p class="last">The list contains all properties for which help may be obtained by using the <code class="docutils literal notranslate"><span class="pre">--help-property</span></code> option followed by a property name. The help is printed to a named &lt;f&gt;ile if given.</p> </dd> <dt><code class="docutils literal notranslate"><span class="pre">--help-properties</span> <span class="pre">[&lt;f&gt;]</span></code></dt> <dd><p class="first">Print cmake-properties manual and exit.</p> <p class="last">The <span class="target" id="index-1-manual:cmake-properties(7)"></span><a class="reference internal" href="cmake-properties.7.html#manual:cmake-properties(7)" title="cmake-properties(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">cmake-properties(7)</span></code></a> manual is printed in a human-readable text format. The help is printed to a named &lt;f&gt;ile if given.</p> </dd> <dt><code class="docutils literal notranslate"><span class="pre">--help-variable</span> <span class="pre">&lt;var&gt;</span> <span class="pre">[&lt;f&gt;]</span></code></dt> <dd><p class="first">Print help for one variable and exit.</p> <p class="last">The <span class="target" id="index-0-manual:cmake-variables(7)"></span><a class="reference internal" href="cmake-variables.7.html#manual:cmake-variables(7)" title="cmake-variables(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">cmake-variables(7)</span></code></a> manual entry for <code class="docutils literal notranslate"><span class="pre">&lt;var&gt;</span></code> is printed in a human-readable text format. The help is printed to a named &lt;f&gt;ile if given.</p> </dd> <dt><code class="docutils literal notranslate"><span class="pre">--help-variable-list</span> <span class="pre">[&lt;f&gt;]</span></code></dt> <dd><p class="first">List variables with help available and exit.</p> <p class="last">The list contains all variables for which help may be obtained by using the <code class="docutils literal notranslate"><span class="pre">--help-variable</span></code> option followed by a variable name. The help is printed to a named &lt;f&gt;ile if given.</p> </dd> <dt><code class="docutils literal notranslate"><span class="pre">--help-variables</span> <span class="pre">[&lt;f&gt;]</span></code></dt> <dd><p class="first">Print cmake-variables manual and exit.</p> <p class="last">The <span class="target" id="index-1-manual:cmake-variables(7)"></span><a class="reference internal" href="cmake-variables.7.html#manual:cmake-variables(7)" title="cmake-variables(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">cmake-variables(7)</span></code></a> manual is printed in a human-readable text format. The help is printed to a named &lt;f&gt;ile if given.</p> </dd> </dl> </div> <div class="section" id="see-also"> <h2>See Also<a class="headerlink" href="#see-also" title="Permalink to this headline">¶</a></h2> <p>The following resources are available to get help using CMake:</p> <dl class="docutils"> <dt>Home Page</dt> <dd><p class="first"><a class="reference external" href="https://cmake.org">https://cmake.org</a></p> <p class="last">The primary starting point for learning about CMake.</p> </dd> <dt>Online Documentation and Community Resources</dt> <dd><p class="first"><a class="reference external" href="https://cmake.org/documentation">https://cmake.org/documentation</a></p> <p class="last">Links to available documentation and community resources may be found on this web page.</p> </dd> <dt>Mailing List</dt> <dd><p class="first"><a class="reference external" href="https://cmake.org/mailing-lists">https://cmake.org/mailing-lists</a></p> <p class="last">For help and discussion about using CMake, a mailing list is provided at <a class="reference external" href="mailto:cmake&#37;&#52;&#48;cmake&#46;org">cmake<span>&#64;</span>cmake<span>&#46;</span>org</a>. The list is member-post-only but one may sign up on the CMake web page. Please first read the full documentation at <a class="reference external" href="https://cmake.org">https://cmake.org</a> before posting questions to the list.</p> </dd> </dl> </div> </div> </div> </div> </div> <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> <div class="sphinxsidebarwrapper"> <h3><a href="../index.html">Table Of Contents</a></h3> <ul> <li><a class="reference internal" href="#">cmake-gui(1)</a><ul> <li><a class="reference internal" href="#synopsis">Synopsis</a></li> <li><a class="reference internal" href="#description">Description</a></li> <li><a class="reference internal" href="#options">Options</a></li> <li><a class="reference internal" href="#see-also">See Also</a></li> </ul> </li> </ul> <h4>Previous topic</h4> <p class="topless"><a href="cpack.1.html" title="previous chapter">cpack(1)</a></p> <h4>Next topic</h4> <p class="topless"><a href="ccmake.1.html" title="next chapter">ccmake(1)</a></p> <div role="note" aria-label="source link"> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../_sources/manual/cmake-gui.1.rst.txt" rel="nofollow">Show Source</a></li> </ul> </div> <div id="searchbox" style="display: none" role="search"> <h3>Quick search</h3> <div class="searchformwrapper"> <form class="search" action="../search.html" method="get"> <input type="text" name="q" /> <input type="submit" value="Go" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../genindex.html" title="General Index" >index</a></li> <li class="right" > <a href="ccmake.1.html" title="ccmake(1)" >next</a> |</li> <li class="right" > <a href="cpack.1.html" title="cpack(1)" >previous</a> |</li> <li> <img src="../_static/cmake-logo-16.png" alt="" style="vertical-align: middle; margin-top: -2px" /> </li> <li> <a href="https://cmake.org/">CMake</a> &#187; </li> <li> <a href="../index.html">3.15.1 Documentation</a> &#187; </li> </ul> </div> <div class="footer" role="contentinfo"> &#169; Copyright 2000-2019 Kitware, Inc. and Contributors. Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.7.2. </div> </body> </html>
libcrosswind/libcrosswind
platform/windows/support/cmake/doc/cmake/html/manual/cmake-gui.1.html
HTML
gpl-3.0
19,477
package cn.nukkit.item; /** * author: MagicDroidX * Nukkit Project */ public class Clay extends Item { public Clay() { this(0, 1); } public Clay(Integer meta) { this(meta, 1); } public Clay(Integer meta, int count) { super(CLAY, meta, count, "Clay"); } }
LinEvil/Nukkit
src/main/java/cn/nukkit/item/Clay.java
Java
gpl-3.0
310
# -*- coding: utf-8 -*- import classes.level_controller as lc import classes.game_driver as gd import classes.extras as ex import classes.board import random import pygame class Board(gd.BoardGame): def __init__(self, mainloop, speaker, config, screen_w, screen_h): self.level = lc.Level(self,mainloop,5,10) gd.BoardGame.__init__(self,mainloop,speaker,config,screen_w,screen_h,13,11) def create_game_objects(self, level = 1): self.board.decolorable = False self.board.draw_grid = False color = (234,218,225) self.color = color self.grey = (200,200,200) self.font_hl = (100,0,250) self.task_str_color = ex.hsv_to_rgb(200,200,230) self.activated_col = self.font_hl white = (255,255,255) self.bg_col = white self.top_line = 3#self.board.scale//2 if self.mainloop.scheme is not None: if self.mainloop.scheme.dark: self.bg_col = (0,0,0) self.level.games_per_lvl = 5 if self.level.lvl == 1: rngs = [20,50,10,19] self.level.games_per_lvl = 3 elif self.level.lvl == 2: rngs = [50,100,20,49] self.level.games_per_lvl = 3 elif self.level.lvl == 3: rngs = [100,250,50,99] self.level.games_per_lvl = 3 elif self.level.lvl == 4: rngs = [250,500,100,249] elif self.level.lvl == 5: rngs = [500,1000,100,499] elif self.level.lvl == 6: rngs = [700,1500,250,699] elif self.level.lvl == 7: rngs = [1500,2500,500,1499] elif self.level.lvl == 8: rngs = [2500,5000,1500,2499] elif self.level.lvl == 9: rngs = [5000,10000,2500,4999] elif self.level.lvl == 10: rngs = [10000,84999,5000,9999] data = [39,18] self.points = self.level.lvl #stretch width to fit the screen size x_count = self.get_x_count(data[1],even=None) if x_count > 39: data[0] = x_count self.data = data self.vis_buttons = [1,1,1,1,1,1,1,0,0] self.mainloop.info.hide_buttonsa(self.vis_buttons) self.layout.update_layout(data[0],data[1]) scale = self.layout.scale self.board.level_start(data[0],data[1],scale) self.n1 = random.randrange(rngs[0],rngs[1]) self.n2 = random.randrange(rngs[2],rngs[3]) self.sumn1n2 = self.n1-self.n2 self.n1s = str(self.n1) self.n2s = str(self.n2) self.sumn1n2s = str(self.sumn1n2) self.n1sl = len(self.n1s) self.n2sl = len(self.n2s) self.sumn1n2sl =len(self.sumn1n2s) self.cursor_pos = 0 self.correct = False self.carry1l = [] self.carry10l = [] self.resultl = [] self.nums1l = [] self.nums2l = [] self.ship_id = 0 self.digits = ["0","1","2","3","4","5","6","7","8","9"] if self.lang.lang == 'el': qm = ";" else: qm = "?" question = self.n1s + " - " + self.n2s + " = " + qm self.board.add_unit(1,0,data[0]-3-(max(self.n1sl,self.n2sl))*3 ,3,classes.board.Label,question,self.bg_col,"",21) self.board.units[-1].align = 1 #borrow 1 for i in range(self.n1sl - 1): self.board.add_unit(data[0]-6-i*3,0,1,1,classes.board.Label,"-",self.bg_col,"",0) self.board.add_unit(data[0]-5-i*3,0,1,1,classes.board.Letter,"",self.bg_col,"",1) self.carry1l.append(self.board.ships[-1]) self.carry1l[-1].set_outline(self.grey, 2) self.carry1l[-1].pos_id = i self.board.units[-1].align = 2 #add 10 for i in range(self.n1sl - 1): self.board.add_unit(data[0]-3-i*3,1,1,1,classes.board.Label,"+",self.bg_col,"",0) self.board.add_unit(data[0]-2-i*3,1,1,1,classes.board.Letter,"",self.bg_col,"",1) self.carry10l.append(self.board.ships[-1]) self.carry10l[-1].set_outline(self.grey, 2) self.carry10l[-1].pos_id = i self.board.units[-1].align = 2 self.board.add_unit(data[0]-2-self.n1sl*3,0,2,1,classes.board.Label,"-1",self.bg_col,"",0) self.board.add_unit(data[0]-2-self.n1sl*3,1,2,1,classes.board.Label,"+10",self.bg_col,"",0) #first number for i in range(self.n1sl): self.board.add_unit(data[0]-3-i*3,2,3,3,classes.board.Label,self.n1s[-(i+1)],self.bg_col,"",21) self.nums1l.append(self.board.units[-1]) self.nums1l[-1].font_color = self.grey self.nums1l[-1].pos_id = i #second number i = 0 for i in range(self.n2sl): self.board.add_unit(data[0]-3-i*3,5,3,3,classes.board.Label,self.n2s[-(i+1)],self.bg_col,"",21) self.nums2l.append(self.board.units[-1]) self.nums2l[-1].pos_id = i i += 1 self.board.add_unit(data[0]-3-i*3,5,3,3,classes.board.Label,"-",self.bg_col,"",21) self.plus_label = self.board.units[-1] #line #line = "―" * (self.sumn1n2sl*2) self.board.add_unit(data[0]-self.sumn1n2sl*3,8,self.sumn1n2sl*3,1,classes.board.Label,"",self.bg_col,"",21) self.draw_hori_line(self.board.units[-1]) #self.board.units[-1].text_wrap = False #result for i in range(self.sumn1n2sl): self.board.add_unit(data[0]-3-i*3,9,3,3,classes.board.Letter,"",self.bg_col,"",21) self.resultl.append(self.board.ships[-1]) self.resultl[-1].set_outline(self.grey, 2) self.resultl[-1].pos_id = i self.resultl[0].set_outline(self.activated_col, 3) self.home_square = self.resultl[0] self.board.active_ship = self.home_square.unit_id self.activable_count = len(self.board.ships) for each in self.board.ships: each.immobilize() self.deactivate_colors() self.reactivate_colors() def draw_hori_line(self,unit): w = unit.grid_w*self.board.scale h = unit.grid_h*self.board.scale center = [w//2,h//2] canv = pygame.Surface([w, h-1]) canv.fill(self.bg_col) pygame.draw.line(canv,self.grey,(0,self.top_line),(w,self.top_line),3) unit.painting = canv.copy() unit.update_me = True def handle(self,event): gd.BoardGame.handle(self, event) #send event handling up if self.show_msg == False: if event.type == pygame.KEYDOWN and event.key == pygame.K_LEFT: self.home_sqare_switch(self.board.active_ship+1) elif event.type == pygame.KEYDOWN and event.key == pygame.K_RIGHT: self.home_sqare_switch(self.board.active_ship-1) elif event.type == pygame.KEYDOWN and event.key == pygame.K_UP: if self.home_square in self.resultl: self.home_sqare_switch(self.board.active_ship-self.n1sl+1) elif self.home_square in self.carry10l: self.home_sqare_switch(self.board.active_ship-self.n1sl+1) elif event.type == pygame.KEYDOWN and event.key == pygame.K_DOWN: self.home_sqare_switch(self.board.active_ship+self.n1sl-1) elif event.type == pygame.KEYDOWN and event.key != pygame.K_RETURN and not self.correct: lhv = len(self.home_square.value) self.changed_since_check = True if event.key == pygame.K_BACKSPACE: if lhv > 0: self.home_square.value = self.home_square.value[0:lhv-1] else: char = event.unicode if (len(char)>0 and lhv < 3 and char in self.digits): if self.home_square in self.resultl: if lhv == 1: s = self.home_square.value + char if s[0] == "0": self.home_square.value = char else: n = int(s) if n < 20: self.home_square.value = str(n % 10) else: self.home_square.value = char else: self.home_square.value = char elif self.home_square in self.carry1l: if char == "1": self.home_square.value = "1" self.carry10l[self.home_square.pos_id].value = "10" else: self.home_square.value = "" self.carry10l[self.home_square.pos_id].value = "" self.carry10l[self.home_square.pos_id].update_me = True elif self.home_square in self.carry10l: if lhv == 0: if char == "1": self.home_square.value = "10" elif lhv == 1: if char == "0": self.home_square.value = "10" else: self.home_square.value = "" else: if char == "1": self.home_square.value = "10" else: self.home_square.value = "" if self.home_square.value == "10": self.carry1l[self.home_square.pos_id].value = "1" else: self.carry1l[self.home_square.pos_id].value = "" self.carry1l[self.home_square.pos_id].update_me = True self.home_square.update_me = True self.mainloop.redraw_needed[0] = True elif event.type == pygame.MOUSEBUTTONUP: self.home_sqare_switch(self.board.active_ship) def home_sqare_switch(self, activate): if activate < 0 or activate > self.activable_count: activate = self.activable_count - self.sumn1n2sl if activate >= 0 and activate < self.activable_count: self.board.active_ship = activate self.home_square.update_me = True if self.board.active_ship >= 0: self.home_square.set_outline(self.grey, 2) self.deactivate_colors() self.home_square = self.board.ships[self.board.active_ship] self.home_square.set_outline(self.activated_col, 3) self.reactivate_colors() self.home_square.font_color = self.font_hl self.home_square.update_me = True self.mainloop.redraw_needed[0] = True def deactivate_colors(self): for each in self.board.ships: each.font_color = self.grey each.update_me = True for each in self.board.units: each.font_color = self.grey each.update_me = True def reactivate_colors(self): self.plus_label.font_color = self.font_hl self.board.units[0].font_color = self.task_str_color if self.home_square in self.carry1l: self.carry10l[self.home_square.pos_id].font_color = self.font_hl elif self.home_square in self.carry10l: self.carry1l[self.home_square.pos_id].font_color = self.font_hl elif self.home_square in self.resultl: if self.home_square.pos_id > 0: self.carry1l[self.home_square.pos_id-1].font_color = self.font_hl if self.home_square.pos_id >= 0 and self.home_square.pos_id < self.n1sl-1: self.carry10l[self.home_square.pos_id].font_color = self.font_hl if (self.n1sl > self.home_square.pos_id): self.nums1l[self.home_square.pos_id].font_color = self.font_hl if (self.n2sl > self.home_square.pos_id): self.nums2l[self.home_square.pos_id].font_color = self.font_hl self.resultl[self.home_square.pos_id].font_color = self.font_hl def update(self,game): game.fill(self.color) gd.BoardGame.update(self, game) #rest of painting done by parent def check_result(self): s = "" for each in reversed(self.resultl): s += each.value if s == self.sumn1n2s: self.update_score(self.points) self.level.next_board() else: if self.points > 0: self.points -= 1 self.level.try_again()
OriHoch/pysiogame
game_boards/game070.py
Python
gpl-3.0
12,968
<?php return array ( 'Find documents that include...' => 'Trova documenti che contengono…', 'Only search in the current folder' => 'Cerca solo nella cartella corrente', 'All these words' => 'Tutte queste parole', 'Exact wording or phrase' => 'Testo uguale', 'Filename like' => 'Come nome file', 'One or more of these words' => 'una o più di queste parole', 'Search a specific folder' => 'ricerca in una cartella specifica', 'Document properties' => 'proprietà documento', 'Document type' => 'tipo documento', 'Text documents' => 'documenti di testo', 'Images' => 'immagini', 'Spreadsheet' => 'fogli di calcolo', 'Modified between' => 'modificato nel periodo', 'Created between' => 'creato nel periodo', 'modifiedSince' => 'modificato dal', 'Anytime' => 'sempre', 'Past week' => 'settimana scorsa', 'Past month' => 'mese scorso', 'Past year' => 'anno scorso', 'createdSince' => 'creato dal', 'Quick search' => 'ricerca veloce', 'File search' => 'ricerca file', 'Switch position of editpanel' => 'cambia posizione del pannello di modifica', 'Search files' => 'ricerca files', 'Save and Next' => 'Salva e prossimo', 'Previous keyword' => 'Parola precedente', 'Next keyword' => 'Parola successiva', 'Content preview' => 'Anteprima contenuto', 'No preview available' => 'Anteprima non disponibile', 'Last modified by' => 'Ultima modifica da', 'To' => 'Accedi come questo utente', 'Edit selection' => 'Modifica selezionati', 'No files have been selected. First select a number of files.' => 'Nessun file selezionato. Seleziona prima dei files', 'File is locked' => 'Il file è bloccato', 'You can\'t edit this folder' => 'Non puoi modificare questa cartella', 'Ok' => 'Ok', );
deependhulla/powermail-debian9
files/rootdir/usr/local/src/groupoffice-6.3/modules/filesearch/language/it.php
PHP
gpl-3.0
1,747
package tsdb.util.gui; import java.awt.image.BufferedImage; import java.io.IOException; import java.io.OutputStream; public interface PureImage { BufferedImage getBufferedImage(); void writeJpeg(OutputStream out, float quality) throws IOException; }
environmentalinformatics-marburg/tubedb
src/tsdb/util/gui/PureImage.java
Java
gpl-3.0
269
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="de"> <head> <!-- Generated by javadoc --> <title>Handler_metadata (TubeDB)</title> <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../script.js"></script> </head> <body> <script type="text/javascript"><!-- try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Handler_metadata (TubeDB)"; } } catch(err) { } //--> var methods = {"i0":10}; var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; var tableTab = "tableTab"; var activeTableTab = "activeTableTab"; </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</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 class="aboutLanguage">TubeDB</div> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../tsdb/web/api/Handler_iot_sensor.html" title="class in tsdb.web.api"><span class="typeNameLink">Prev&nbsp;Class</span></a></li> <li><a href="../../../tsdb/web/api/Handler_plot_list.html" title="class in tsdb.web.api"><span class="typeNameLink">Next&nbsp;Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../index.html?tsdb/web/api/Handler_metadata.html" target="_top">Frames</a></li> <li><a href="Handler_metadata.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li><a href="#fields.inherited.from.class.tsdb.web.api.MethodHandler">Field</a>&nbsp;|&nbsp;</li> <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <!-- ======== START OF CLASS DATA ======== --> <div class="header"> <div class="subTitle">tsdb.web.api</div> <h2 title="Class Handler_metadata" class="title">Class Handler_metadata</h2> </div> <div class="contentContainer"> <ul class="inheritance"> <li>java.lang.Object</li> <li> <ul class="inheritance"> <li>AbstractHandler</li> <li> <ul class="inheritance"> <li><a href="../../../tsdb/web/api/MethodHandler.html" title="class in tsdb.web.api">tsdb.web.api.MethodHandler</a></li> <li> <ul class="inheritance"> <li>tsdb.web.api.Handler_metadata</li> </ul> </li> </ul> </li> </ul> </li> </ul> <div class="description"> <ul class="blockList"> <li class="blockList"> <hr> <br> <pre>public class <span class="typeNameLabel">Handler_metadata</span> extends <a href="../../../tsdb/web/api/MethodHandler.html" title="class in tsdb.web.api">MethodHandler</a></pre> <div class="block">get meta data of region</div> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <!-- =========== FIELD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="field.summary"> <!-- --> </a> <h3>Field Summary</h3> <ul class="blockList"> <li class="blockList"><a name="fields.inherited.from.class.tsdb.web.api.MethodHandler"> <!-- --> </a> <h3>Fields inherited from class&nbsp;tsdb.web.api.<a href="../../../tsdb/web/api/MethodHandler.html" title="class in tsdb.web.api">MethodHandler</a></h3> <code><a href="../../../tsdb/web/api/MethodHandler.html#handlerMethodName">handlerMethodName</a>, <a href="../../../tsdb/web/api/MethodHandler.html#tsdb">tsdb</a></code></li> </ul> </li> </ul> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor.summary"> <!-- --> </a> <h3>Constructor Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colOne" scope="col">Constructor and Description</th> </tr> <tr class="altColor"> <td class="colOne"><code><span class="memberNameLink"><a href="../../../tsdb/web/api/Handler_metadata.html#Handler_metadata-tsdb.remote.RemoteTsDB-">Handler_metadata</a></span>(<a href="../../../tsdb/remote/RemoteTsDB.html" title="interface in tsdb.remote">RemoteTsDB</a>&nbsp;tsdb)</code>&nbsp;</td> </tr> </table> </li> </ul> <!-- ========== METHOD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="method.summary"> <!-- --> </a> <h3>Method Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tr id="i0" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../tsdb/web/api/Handler_metadata.html#handle-java.lang.String-Request-HttpServletRequest-HttpServletResponse-">handle</a></span>(java.lang.String&nbsp;target, Request&nbsp;baseRequest, HttpServletRequest&nbsp;request, HttpServletResponse&nbsp;response)</code>&nbsp;</td> </tr> </table> <ul class="blockList"> <li class="blockList"><a name="methods.inherited.from.class.tsdb.web.api.MethodHandler"> <!-- --> </a> <h3>Methods inherited from class&nbsp;tsdb.web.api.<a href="../../../tsdb/web/api/MethodHandler.html" title="class in tsdb.web.api">MethodHandler</a></h3> <code><a href="../../../tsdb/web/api/MethodHandler.html#getHandlerMethodName--">getHandlerMethodName</a>, <a href="../../../tsdb/web/api/MethodHandler.html#writeStringArray-java.io.PrintWriter-java.util.ArrayList-">writeStringArray</a>, <a href="../../../tsdb/web/api/MethodHandler.html#writeStringArray-java.io.PrintWriter-java.lang.String:A-">writeStringArray</a></code></li> </ul> <ul class="blockList"> <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> <!-- --> </a> <h3>Methods inherited from class&nbsp;java.lang.Object</h3> <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li> </ul> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <!-- ========= CONSTRUCTOR DETAIL ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor.detail"> <!-- --> </a> <h3>Constructor Detail</h3> <a name="Handler_metadata-tsdb.remote.RemoteTsDB-"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>Handler_metadata</h4> <pre>public&nbsp;Handler_metadata(<a href="../../../tsdb/remote/RemoteTsDB.html" title="interface in tsdb.remote">RemoteTsDB</a>&nbsp;tsdb)</pre> </li> </ul> </li> </ul> <!-- ============ METHOD DETAIL ========== --> <ul class="blockList"> <li class="blockList"><a name="method.detail"> <!-- --> </a> <h3>Method Detail</h3> <a name="handle-java.lang.String-Request-HttpServletRequest-HttpServletResponse-"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>handle</h4> <pre>public&nbsp;void&nbsp;handle(java.lang.String&nbsp;target, Request&nbsp;baseRequest, HttpServletRequest&nbsp;request, HttpServletResponse&nbsp;response) throws java.io.IOException, ServletException</pre> <dl> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>java.io.IOException</code></dd> <dd><code>ServletException</code></dd> </dl> </li> </ul> </li> </ul> </li> </ul> </div> </div> <!-- ========= END OF CLASS DATA ========= --> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</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 class="aboutLanguage">TubeDB</div> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../tsdb/web/api/Handler_iot_sensor.html" title="class in tsdb.web.api"><span class="typeNameLink">Prev&nbsp;Class</span></a></li> <li><a href="../../../tsdb/web/api/Handler_plot_list.html" title="class in tsdb.web.api"><span class="typeNameLink">Next&nbsp;Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../index.html?tsdb/web/api/Handler_metadata.html" target="_top">Frames</a></li> <li><a href="Handler_metadata.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li><a href="#fields.inherited.from.class.tsdb.web.api.MethodHandler">Field</a>&nbsp;|&nbsp;</li> <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> </body> </html>
environmentalinformatics-marburg/tubedb
docs/javadoc/tsdb/web/api/Handler_metadata.html
HTML
gpl-3.0
11,871
<?php session_start(); error_reporting(0); require '../lib/Medoo.php'; use Medoo\Medoo; require '../lib/Spyc/Spyc.php'; require '../config.php'; if(is_file(FC_CONTENT_DIR.'/config.php')) { include FC_CONTENT_DIR.'/config.php'; } if(is_file(FC_CONTENT_DIR.'/config_smtp.php')) { include FC_CONTENT_DIR.'/config_smtp.php'; } if(is_file('../config_database.php')) { include '../config_database.php'; $db_type = 'mysql'; $database = new Medoo([ 'type' => 'mysql', 'database' => "$database_name", 'host' => "$database_host", 'username' => "$database_user", 'password' => "$database_psw", 'charset' => 'utf8', 'port' => $database_port, 'prefix' => DB_PREFIX ]); $db_content = $database; $db_user = $database; $db_statistics = $database; $db_posts = $database; } else { $db_type = 'sqlite'; if(isset($fc_content_files) && is_array($fc_content_files)) { /* switch database file $fc_db_content */ include 'core/contentSwitch.php'; } define("CONTENT_DB", "$fc_db_content"); define("USER_DB", "$fc_db_user"); define("STATS_DB", "$fc_db_stats"); define("POSTS_DB", "$fc_db_posts"); $db_content = new Medoo([ 'type' => 'sqlite', 'database' => CONTENT_DB ]); $db_user = new Medoo([ 'type' => 'sqlite', 'database' => USER_DB ]); $db_statistics = new Medoo([ 'type' => 'sqlite', 'database' => STATS_DB ]); $db_posts = new Medoo([ 'type' => 'sqlite', 'database' => POSTS_DB ]); } define("INDEX_DB", "$fc_db_index"); define("FC_ROOT", str_replace("/acp","",FC_INC_DIR)); define("IMAGES_FOLDER", "$img_path"); define("FILES_FOLDER", "$files_path"); define("FC_SOURCE", "backend"); $db_index = new Medoo([ 'type' => 'sqlite', 'database' => INDEX_DB ]); require 'core/access.php'; include 'versions.php'; include 'core/icons.php'; include '../lib/parsedown/Parsedown.php'; if(!isset($_SESSION['editor_class'])) { $_SESSION['editor_class'] = "wysiwyg"; } /* switch editor - plain text or wysiwyg */ if(isset($_GET['editor'])) { if($_GET['editor'] == 'wysiwyg') { $_SESSION['editor_class'] = "wysiwyg"; } elseif($_GET['editor'] == 'plain') { $_SESSION['editor_class'] = "plain"; } else { $_SESSION['editor_class'] = "code"; } } if($_SESSION['editor_class'] == "wysiwyg") { $editor_class = "mceEditor"; $editor_small_class = "mceEditor_small"; } elseif($_SESSION['editor_class'] == "plain") { $editor_class = "plain"; $editor_small_class = "plain"; } else { $editor_class = "aceEditor_html"; $editor_small_class = "aceEditor_html"; } /* set language */ if(!isset($_SESSION['lang'])) { $_SESSION['lang'] = "$languagePack"; } if(isset($_GET['set_lang'])) { $set_lang = strip_tags($_GET['set_lang']); if(is_dir("../lib/lang/$set_lang/")) { $_SESSION['lang'] = "$set_lang"; } } if(isset($_SESSION['lang'])) { $languagePack = basename($_SESSION['lang']); } require '../lib/lang/index.php'; require 'core/functions.php'; require '../global/functions.php'; require 'core/switch.php'; $all_mods = get_all_moduls(); $all_plugins = get_all_plugins(); $fc_labels = fc_get_labels(); $cnt_labels = count($fc_labels); /* READ THE PREFS */ $fc_preferences = get_preferences(); foreach($fc_preferences as $k => $v) { $$k = stripslashes($v); } /** * $default_lang_code (string) the default language code */ if($prefs_default_language != '') { include '../lib/lang/'.$prefs_default_language.'/index.php'; $default_lang_code = $lang_sign; // de|en|es ... } /** * $lang_codes (array) all available lang codes * hide languages from $prefs_deactivated_languages */ $arr_lang = get_all_languages(); if($prefs_deactivated_languages != '') { $arr_lang_deactivated = json_decode($prefs_deactivated_languages); } foreach($arr_lang as $l) { if(is_array($arr_lang_deactivated) && (in_array($l['lang_folder'],$arr_lang_deactivated))) { continue; } $langs[] = $l['lang_sign']; } $lang_codes = array_values(array_unique($langs)); /* build absolute URL */ if($fc_preferences['prefs_cms_ssl_domain'] != '') { $fc_base_url = $prefs_cms_ssl_domain . $prefs_cms_base; } else { $fc_base_url = $prefs_cms_domain . $prefs_cms_base; } if(!isset($_COOKIE['acptheme'])) { setcookie("acptheme", "dark",time()+(3600*24*365)); } if(isset($_GET['theme']) && ($_GET['theme'] == 'light_mono')) { setcookie("acptheme", 'light_mono',time()+(3600*24*365)); $set_acptheme = 'light_mono'; } if(isset($_GET['theme']) && ($_GET['theme'] == 'light')) { setcookie("acptheme", 'light',time()+(3600*24*365)); $set_acptheme = 'light'; } if(isset($_GET['theme']) && ($_GET['theme'] == 'dark_mono')) { setcookie("acptheme", 'dark_mono',time()+(3600*24*365)); $set_acptheme = 'dark_mono'; } if(isset($_GET['theme']) && ($_GET['theme'] == 'dark')) { setcookie("acptheme", 'dark',time()+(3600*24*365)); $set_acptheme = 'dark'; } if(isset($set_acptheme)) { $acptheme = $set_acptheme; } else { $acptheme = $_COOKIE["acptheme"]; } ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>ACP | <?php echo $fc_base_url . ' | ' . $tn; ?></title> <link rel="icon" type="image/x-icon" href="images/favicon.ico" /> <script language="javascript" type="text/javascript" src="theme/js/backend.min.js?v=20200117"></script> <script language="javascript" type="text/javascript" src="theme/js/tinymce/tinymce.min.js"></script> <script language="javascript" type="text/javascript" src="theme/js/tinymce/jquery.tinymce.min.js"></script> <script src="theme/js/ace/ace.js" data-ace-base="theme/js/ace" type="text/javascript" charset="utf-8"></script> <?php if($acptheme == 'dark') { $style_file = 'theme/css/styles_dark.css?v='.time(); } else if($acptheme == 'light') { $style_file = 'theme/css/styles_light.css?v='.time(); } else if($acptheme == 'dark_mono') { $style_file = 'theme/css/styles_dark_mono.css?v='.time(); } else { $style_file = 'theme/css/styles_light_mono.css?v='.time(); } echo '<link rel="stylesheet" href="'.$style_file.'" type="text/css" media="screen, projection">'; ?> <link href="fontawesome/css/all.min.css" rel="stylesheet"> <script type="text/javascript"> var languagePack = "<?php echo $languagePack; ?>"; var ace_theme = 'chrome'; var tinymce_skin = 'oxide'; var acptheme = "<?php echo $acptheme; ?>"; if(acptheme === 'dark' || acptheme === 'dark_mono') { var ace_theme = 'twilight'; var tinymce_skin = 'oxide-dark'; } </script> <?php /* * individual modul header * optional */ if(is_file("../modules/$sub/backend/header.php")) { include '../modules/'.$sub.'/backend/header.php'; } include 'core/templates.php'; ?> </head> <body> <?php if(is_file('../maintenance.html')) { echo '<div style="padding:3px 15px;background-color:#b00;color:#000;border-bottom:1px solid #d00;">'; echo $lang['msg_update_modus_activated']; echo '</div>'; } ?> <div id="page-sidebar"> <a id="sidebar-dashboard" href="acp.php?tn=dashboard"></a> <div id="page-sidebar-inner"> <?php include 'core/'.$navinc.'.php'; ?> <?php include 'core/livebox.php'; ?> </div> </div> <div id="page-sidebar-help"> <div id="page-sidebar-help-inner"> <?php require 'core/docs.php'; ?> </div> </div> <div id="page-content"> <div id="expireDiv" class="expire-hidden"> Your session is about to expire. You will be logged out in <span id="currentSeconds"></span> seconds. If you want to continue, please save your work and refresh the page. </div> <?php if(isset($fc_content_files) && is_array($fc_content_files)) { echo '<div id="contentSwitch" class="clearfix">'; echo $fc_content_switch; echo '</div>'; } ?> <div id="bigHeader"> <?php require 'core/topNav.php'; ?> </div> <div id="container"> <?php include 'core/'.$maininc.'.php'; ?> </div> <?php include 'core/editors.php'; ?> <div id="footer"> <p class="text-center"> <?php $arr_lang = get_all_languages(); for($i=0;$i<count($arr_lang);$i++) { $lang_icon = '<img src="../lib/lang/'.$arr_lang[$i]['lang_folder'].'/flag.png" style="vertical-align: baseline; width:18px; height:auto;">'; echo '<a class="btn btn-fc" href="acp.php?set_lang='.$arr_lang[$i]['lang_folder'].'">'.$lang_icon.' '.$arr_lang[$i]['lang_desc'].'</a> '; } ?> </p> <hr> <p> <img src="images/fc-logo.svg" alt="fc-logo" width="60px"><br> <b>flatCore</b> Content Management System (<?php echo $fc_version_name . ' <small>B: ' . $fc_version_build; ?>)</small><br> copyright © <?php echo date('Y'); ?>, <a href="https://flatcore.org/" target="_blank">flatCore.org</a> | <a href="https://github.com/flatCore/flatCore-CMS"><i class="fab fa-github"></i> flatCore-CMS</a> </p> <p class="d-none"><?php echo microtime(true)-$_SERVER['REQUEST_TIME_FLOAT']; ?></p> </div> </div> <div class="bottom-bar"> <?php if($acptheme == 'dark') { $active_dark = 'active'; } else if($acptheme == 'dark_mono') { $active_dark_mono = 'active'; } else if($acptheme == 'light') { $active_light = 'active'; } else { $active_light_mono = 'active'; } echo '<a title="Light" class="styleswitch styleswitch-light '.$active_light.'" href="acp.php?tn='.$tn.'&theme=light">'.$icon['circle'].'</a>'; echo '<a title="Light Mono" class="styleswitch styleswitch-light-mono '.$active_light_mono.'" href="acp.php?tn='.$tn.'&theme=light_mono">'.$icon['circle'].'</a>'; echo '<a title="Dark" class="styleswitch styleswitch-dark '.$active_dark.'" href="acp.php?tn='.$tn.'&theme=dark">'.$icon['circle'].'</a>'; echo '<a title="Dark Mono" class="styleswitch styleswitch-dark-mono '.$active_dark_mono.'" href="acp.php?tn='.$tn.'&theme=dark_mono">'.$icon['circle'].'</a>'; ?> <div class="divider"></div> <button type="button" class="btn btn-fc btn-sm" data-bs-toggle="modal" data-bs-target="#uploadModal"><?php echo $icon['upload']; ?> Upload</button> </div> <div class="modal fade" id="uploadModal" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title" id="myModalLabel"><?php echo $icon['upload']; ?> Upload</h4> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button> </div> <div class="modal-body"> <?php include 'core/files.upload.php'; ?> </div> <div class="modal-footer"> <button type="button" class="btn btn-fc" data-bs-dismiss="modal">Close</button> </div> </div> </div> </div> <script type="text/javascript"> $(function() { /* toggle editor class [mceEditor|plain|aceEditor_html] */ var editor_mode = localStorage.getItem('editor_mode'); if(!editor_mode) { editor_mode = 'optE1'; localStorage.setItem("editor_mode", editor_mode); } $('input[name="optEditor"]').on("change", function () { var button = $("input[name='optEditor']:checked").val(); localStorage.setItem("editor_mode", button); switchEditorMode(button); }); if(editor_mode !== 'optE1') { switchEditorMode(editor_mode); } else { <?php echo $tinyMCE_config_contents; ?> } //setAceEditor(); $("input[value="+editor_mode+"]").parent().addClass('active'); function switchEditorMode(mode) { var textEditor = $('textarea[class*=switchEditor]'); textEditor.removeClass(); textEditor.removeAttr('style'); var divEditor = $('.aceCodeEditor'); if(mode == 'optE1') { /* switch to wysiwyg */ textEditor.addClass('mceEditor form-control switchEditor'); textEditor.css("display","flex"); divEditor.remove(); /* load configs again */ <?php echo $tinyMCE_config_contents; ?> tinymce.EditorManager.execCommand('mceAddEditor',false, '#textEditor'); } if(mode == 'optE2') { /* switch to plain textarea */ if(tinymce.editors.length > 0) { tinymce.EditorManager.execCommand('mceRemoveEditor',true, '#textEditor'); $('div.mceEditor').remove(); tinymce.remove('.switchEditor'); tinymce.remove(); } divEditor.remove(); textEditor.addClass('plain form-control switchEditor'); textEditor.css("visibility","visible"); textEditor.css("display","flex"); } if(mode == 'optE3') { /* switch to ace editor */ if(tinymce.editors.length > 0) { tinymce.EditorManager.execCommand('mceRemoveEditor',true, '#textEditor'); $('div.mceEditor').remove(); tinymce.remove(); } textEditor.addClass('aceEditor_code form-control switchEditor'); setAceEditor(); } $("input[name='optEditor']").parent().removeClass('active'); $("input[value="+mode+"]").parent().addClass('active'); } function setAceEditor() { if($('.aceEditor_code').length != 0) { $('textarea[class*=switchEditor]').each(function () { var textarea = $(this); var textarea_id = textarea.attr('id'); var editDiv = $('<div>', { position: 'absolute', 'class': textarea.attr('class')+' aceCodeEditor' }).insertBefore(textarea); var HTMLtextarea = $('textarea[class*=aceEditor_code]').hide(); var aceEditor = ace.edit(editDiv[0]); aceEditor.$blockScrolling = Infinity; aceEditor.getSession().setMode({ path:'ace/mode/html', inline:true }); aceEditor.getSession().setValue(textarea.val()); aceEditor.setTheme("ace/theme/" + ace_theme); aceEditor.getSession().setUseWorker(false); aceEditor.setShowPrintMargin(false); aceEditor.getSession().on('change', function(){ textarea.val(aceEditor.getSession().getValue()); }); }); } } }); <?php $gc_maxlifetime = ini_get("session.gc_maxlifetime"); if($prefs_acp_session_lifetime > $gc_maxlifetime) { $maxlifetime = $prefs_acp_session_lifetime; } else { $maxlifetime = $gc_maxlifetime; } if($_COOKIE['identifier'] != '') { echo "var auto_logout = false;"; } else { echo "var auto_logout = true;"; } echo "var maxlifetime = '{$maxlifetime}';"; ?> var countdown = { startInterval : function() { var currentId = setInterval(function(){ $('#currentSeconds').html(maxlifetime); if(maxlifetime == 60) { $('#expireDiv').removeClass('expire-hidden'); $('#expireDiv').addClass('expire-start'); } if(maxlifetime == 30) { $('#expireDiv').addClass('expire-soon'); } if(maxlifetime == 15) { $('#expireDiv').addClass('expire-danger'); } if(maxlifetime < 0) { window.location.href = "/index.php?goto=logout"; } --maxlifetime; }, 1000); countdown.intervalId = currentId; } }; if(auto_logout !== false) { countdown.startInterval(); } </script> </body> </html>
flatCore/flatCore-CMS
acp/acp.php
PHP
gpl-3.0
15,464
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ // Include a header file from your module to test. #include "ns3/plc-fd.h" // An essential include is test.h #include "ns3/test.h" // Do not put your test classes in namespace ns3. You may find it useful // to use the using directive to access the ns3 namespace directly using namespace ns3; // This is an example TestCase. class PlcFdTestCase1 : public TestCase { public: PlcFdTestCase1 (); virtual ~PlcFdTestCase1 (); private: virtual void DoRun (void); }; // Add some help text to this case to describe what it is intended to test PlcFdTestCase1::PlcFdTestCase1 () : TestCase ("PlcFd test case (does nothing)") { } // This destructor does nothing but we include it as a reminder that // the test case should clean up after itself PlcFdTestCase1::~PlcFdTestCase1 () { } // // This method is the pure virtual method from class TestCase that every // TestCase must implement // void PlcFdTestCase1::DoRun (void) { // A wide variety of test macros are available in src/core/test.h NS_TEST_ASSERT_MSG_EQ (true, true, "true doesn't equal true for some reason"); // Use this one for floating point comparisons NS_TEST_ASSERT_MSG_EQ_TOL (0.01, 0.01, 0.001, "Numbers are not equal within tolerance"); } // The TestSuite class names the TestSuite, identifies what type of TestSuite, // and enables the TestCases to be run. Typically, only the constructor for // this class must be defined // class PlcFdTestSuite : public TestSuite { public: PlcFdTestSuite (); }; PlcFdTestSuite::PlcFdTestSuite () : TestSuite ("plc-fd", UNIT) { // TestDuration for TestCase can be QUICK, EXTENSIVE or TAKES_FOREVER AddTestCase (new PlcFdTestCase1, TestCase::QUICK); } // Do not forget to allocate an instance of this TestSuite static PlcFdTestSuite plcFdTestSuite;
tsokalo/ghn-plc
plc-fd/test/plc-fd-test-suite.cc
C++
gpl-3.0
1,846
#!/bin/sh rm -f wdbc-test.ds # creates training dataset for nntool ./dstool -create wdbc-test.ds ./dstool -create:30:input wdbc-test.ds ./dstool -create:1:output wdbc-test.ds ./dstool -list wdbc-test.ds ./dstool -import:0 wdbc-test.ds wdbc.in ./dstool -import:1 wdbc-test.ds wdbc.out ./dstool -padd:0:meanvar wdbc-test.ds ./dstool -padd:0:pca wdbc-test.ds ./dstool -padd:1:meanvar wdbc-test.ds ./dstool -list wdbc-test.ds # uses nntool trying to learn from dataset ./nntool -v --time 600 wdbc-test.ds ?-20-? wdbcnn.cfg bayes ################################################## # testing ./nntool -v wdbc-test.ds ?-20-? wdbcnn.cfg use ################################################## # predicting [stores results to dataset] cp -f wdbc-test.ds wdbc-pred.ds ./dstool -clear:1 wdbc-pred.ds # ./dstool -remove:1 wine-pred.ds ./nntool -v wdbc-pred.ds 30-20-1 wdbcnn.cfg use ./dstool -list wdbc-test.ds ./dstool -list wdbc-pred.ds ./dstool -print:1 wdbc-pred.ds tail wdbc.out
cslr/dinrhiw2
tools/test_data2_bayes.sh
Shell
gpl-3.0
986
<?php /** * Single Student View: Memberships Tab * * @package LifterLMS/Templates/Admin * * @since Unknown * @version Unknown */ defined( 'ABSPATH' ) || exit; if ( ! is_admin() ) { exit; } $table = new LLMS_Table_Student_Memberships(); $table->get_results( array( 'student' => $student, ) ); echo $table->get_table_html();
gocodebox/lifterlms
templates/admin/reporting/tabs/students/memberships.php
PHP
gpl-3.0
338
{% extends "base.html" %} {% block title %}Dishonesty Case for {{case.student.name}}: New File{% endblock %} {% block h1 %}Dishonesty Case for {{case.student.name}}: New File{% endblock %} {% block subbreadcrumbs %}<li><a href="{% url "offering:course_info" course_slug=course.slug %}">{{ course.name }}</a></li><li><a href="{% url "offering:discipline:index" course_slug=course.slug %}">Dishonesty Cases</a></li><li><a href="{% url "offering:discipline:show" course_slug=course.slug case_slug=case.slug %}">Case for {{case.student.name}}</a></li><li><a href="{% url "offering:discipline:edit_attach" course_slug=course.slug case_slug=case.slug %}">Attached Files</a></li><li>New File</li>{% endblock %} {% block content %} <div class="form_container"> <form action="{% url "offering:discipline:new_file" course_slug=course.slug case_slug=case.slug %}" method="post" enctype="multipart/form-data">{% csrf_token %} {{ form.non_field_errors }} <p>{{form.case}}{{form.name.label}}: {{ form.name }} <span class="helptext">{{ form.name.help_text|safe }}</span></p> {{form.name.errors}} <p>{{form.attachment.label}}: {{ form.attachment }}</p> {{form.attachment.errors}} <p>{{form.public.label}} {{ form.public }} <span class="helptext">{{ form.public.help_text|safe }}</span></p> <p>{{ form.notes.label }}:</p> <blockquote>{{ form.notes }}</blockquote> <p class="helptext">{{ form.notes.help_text|safe }}</p> <p><input type="submit" value="Create File" /></p> </form> </div> {% endblock %}
sfu-fas/coursys
templates/discipline/new_file.html
HTML
gpl-3.0
1,541
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>HLC: C:/Users/Jaime/Documents/My Dropbox/project/arduino/hlc_v0_4/meshNetwork.h Source File</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.6.1 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="main.html"><span>Main&nbsp;Page</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="files.html"><span>File&nbsp;List</span></a></li> <li><a href="globals.html"><span>File&nbsp;Members</span></a></li> </ul> </div> <h1>C:/Users/Jaime/Documents/My Dropbox/project/arduino/hlc_v0_4/meshNetwork.h</h1><a href="mesh_network_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#include &quot;WProgram.h&quot;</span> <a name="l00002"></a>00002 <span class="comment">//#include &quot;conversions.h&quot;</span> <a name="l00003"></a>00003 <a name="l00004"></a><a class="code" href="mesh_network_8h.html#a6daf29275733dbb5b60bebf16930a45b">00004</a> <span class="preprocessor">#define BUSTMASTERID &apos;a&apos; //PC server!!!</span> <a name="l00005"></a><a class="code" href="mesh_network_8h.html#a69406c2467c56c35fd459891e7a5baeb">00005</a> <span class="preprocessor"></span><span class="preprocessor">#define HLCID &apos;b&apos;</span> <a name="l00006"></a><a class="code" href="mesh_network_8h.html#abfc5f0f6bf4d97392e2434061b8d553b">00006</a> <span class="preprocessor"></span><span class="preprocessor">#define hashKey &apos;a&apos;</span> <a name="l00007"></a>00007 <span class="preprocessor"></span> <a name="l00008"></a>00008 <a name="l00009"></a>00009 <a name="l00010"></a>00010 <span class="keyword">class </span><a class="code" href="classmesh_network_bus.html">meshNetworkBus</a>{ <a name="l00011"></a>00011 <span class="keyword">public</span>: <a name="l00012"></a>00012 <a name="l00013"></a><a class="code" href="classmesh_network_bus.html#a836599177c382fc4b2c2fd5e6236cd08">00013</a> <a class="code" href="classmesh_network_bus.html#a836599177c382fc4b2c2fd5e6236cd08">meshNetworkBus</a>(){ <a name="l00014"></a>00014 callerID = 0; <a name="l00015"></a>00015 startBit = <span class="charliteral">&apos;*&apos;</span>; <a name="l00016"></a>00016 crc = 0; <a name="l00017"></a>00017 actionID = 0; <a name="l00018"></a>00018 variable[0] = 0; <a name="l00019"></a>00019 variable[1] = 0; <a name="l00020"></a>00020 packetCount = 0; <a name="l00021"></a>00021 empty = 1; <span class="comment">//always empty for now</span> <a name="l00022"></a>00022 <a name="l00023"></a>00023 } <a name="l00024"></a>00024 <a name="l00025"></a><a class="code" href="classmesh_network_bus.html#acc8807ded91a2b035a5f730951458d4d">00025</a> <span class="keywordtype">void</span> <a class="code" href="classmesh_network_bus.html#acc8807ded91a2b035a5f730951458d4d">sendTelemetry</a>(<span class="keywordtype">int</span> *telemetry, <span class="keywordtype">int</span> size){ <span class="comment">//send it as a ARRAY maybe easier</span> <a name="l00026"></a>00026 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0; i&lt;size;i++){ <a name="l00027"></a>00027 Serial.print(telemetry[i]); <a name="l00028"></a>00028 Serial.print(<span class="charliteral">&apos;,&apos;</span>); <a name="l00029"></a>00029 <a name="l00030"></a>00030 } <a name="l00031"></a>00031 Serial.print(<span class="charliteral">&apos;*&apos;</span>); <span class="comment">//end bit for the gui!</span> <a name="l00032"></a>00032 } <a name="l00033"></a>00033 <a name="l00034"></a><a class="code" href="classmesh_network_bus.html#a06f18f515d7e3334ea6c624ebcd136c1">00034</a> <span class="keywordtype">void</span> <a class="code" href="classmesh_network_bus.html#a06f18f515d7e3334ea6c624ebcd136c1">sendTelemetry</a>(<span class="keywordtype">int</span> ax,<span class="keywordtype">int</span> ay, <span class="keywordtype">int</span> az, <span class="keywordtype">int</span> gx, <span class="keywordtype">int</span> gy, <span class="keywordtype">int</span> gz, <span class="keywordtype">int</span> alt){ <a name="l00035"></a>00035 <span class="comment">//spam the network with our data </span> <a name="l00036"></a>00036 } <a name="l00037"></a>00037 <a name="l00038"></a><a class="code" href="classmesh_network_bus.html#ab578dda02d21cb56e7ad424b17bfa7e2">00038</a> <span class="keywordtype">void</span> <a class="code" href="classmesh_network_bus.html#ab578dda02d21cb56e7ad424b17bfa7e2">processInstruction</a>(){ <span class="comment">//store packets into instruction structure</span> <a name="l00039"></a>00039 <span class="comment">/*instr-&gt;pcid = callerID;</span> <a name="l00040"></a>00040 <span class="comment"> instr-&gt;aid = actionID;</span> <a name="l00041"></a>00041 <span class="comment"> instr-&gt;data = byteArrayToInt(variable);*/</span> <a name="l00042"></a>00042 <span class="comment">//long t = byteArrayToLong(variable);</span> <a name="l00043"></a>00043 <span class="comment">//t = variable[0] &lt;&lt;variable[1] ;</span> <a name="l00044"></a>00044 <span class="keywordtype">int</span> t; <a name="l00045"></a>00045 t = variable[0] &lt;&lt; 8; <a name="l00046"></a>00046 t |= variable[1]; <a name="l00047"></a>00047 <a name="l00048"></a>00048 instr = <span class="keyword">new</span> <a class="code" href="classinstruction.html">instruction</a>(callerID, actionID, t); <a name="l00049"></a>00049 <a name="l00050"></a>00050 <span class="comment">/* Serial.println(&quot;these are your registered data&quot;);</span> <a name="l00051"></a>00051 <span class="comment"> Serial.print(instr-&gt;pcid);</span> <a name="l00052"></a>00052 <span class="comment"> Serial.print(instr-&gt;aid );</span> <a name="l00053"></a>00053 <span class="comment"> Serial.print(instr-&gt;data);</span> <a name="l00054"></a>00054 <span class="comment"> Serial.print(t);</span> <a name="l00055"></a>00055 <span class="comment"> Serial.println(&quot;end registered data&quot;); */</span> <a name="l00056"></a>00056 <a name="l00057"></a>00057 } <a name="l00058"></a>00058 <a name="l00059"></a><a class="code" href="classmesh_network_bus.html#a0a328cba0768bbbb13c6e715e6001f91">00059</a> <span class="keywordtype">int</span> <a class="code" href="classmesh_network_bus.html#a0a328cba0768bbbb13c6e715e6001f91">checkInstruction</a>(){ <a name="l00060"></a>00060 <span class="keywordtype">int</span> result = 0; <a name="l00061"></a>00061 <span class="keywordtype">int</span> t =0; <span class="comment">// store the variable here for now</span> <a name="l00062"></a>00062 t = variable[0] &lt;&lt; 8; <a name="l00063"></a>00063 t |= variable[1]; <a name="l00064"></a>00064 <a name="l00065"></a>00065 <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i=0; i&lt;40;i++){ <a name="l00066"></a>00066 <span class="comment">//result += (woah &lt;&lt; i ) &amp; 0x1; //this should count how many 1&apos;s there are in the instruction</span> <a name="l00067"></a>00067 <span class="comment">//result += (int)(woah &gt;&gt; i) &amp;0x1; </span> <a name="l00068"></a>00068 result += (callerID &gt;&gt; i) &amp;0x01; <a name="l00069"></a>00069 result += (actionID &gt;&gt; i) &amp;0x01; <a name="l00070"></a>00070 result += (t &gt;&gt; i) &amp; 0x01; <a name="l00071"></a>00071 <a name="l00072"></a>00072 <span class="comment">//Serial.print(&quot;hlc calcd crc:&quot;);</span> <a name="l00073"></a>00073 <span class="comment">//Serial.println((result &gt;&gt; i) &amp;0x01);</span> <a name="l00074"></a>00074 <a name="l00075"></a>00075 } <a name="l00076"></a>00076 <span class="comment">/*Serial.print(&quot;CRC:&quot;);</span> <a name="l00077"></a>00077 <span class="comment"> Serial.println(crc);</span> <a name="l00078"></a>00078 <span class="comment"> Serial.print(&quot;result:&quot;); </span> <a name="l00079"></a>00079 <span class="comment"> Serial.println(result);</span> <a name="l00080"></a>00080 <span class="comment"> Serial.println(&apos;*&apos;);</span> <a name="l00081"></a>00081 <span class="comment">*/</span> <a name="l00082"></a>00082 <span class="keywordflow">if</span> (crc == result){ <a name="l00083"></a>00083 <span class="keywordflow">return</span> 1; <a name="l00084"></a>00084 } <a name="l00085"></a>00085 <span class="keywordflow">else</span> <a name="l00086"></a>00086 <span class="keywordflow">return</span> 0; <a name="l00087"></a>00087 } <a name="l00088"></a>00088 <a name="l00089"></a><a class="code" href="classmesh_network_bus.html#a9d42d4c421b4e586609eb4f91852e46a">00089</a> <span class="keywordtype">int</span> <a class="code" href="classmesh_network_bus.html#a9d42d4c421b4e586609eb4f91852e46a">readIncoming</a>(){<span class="comment">//if a new instruction is generated, return a 1</span> <a name="l00090"></a>00090 <span class="keywordflow">if</span> (<a class="code" href="classmesh_network_bus.html#a0fd22283274a0c180a16dbcb8a3083ff">readIncomingPacket</a>() == 1){ <span class="comment">//we received a valid insstruction format</span> <a name="l00091"></a>00091 <span class="keywordflow">if</span> (<a class="code" href="classmesh_network_bus.html#a0a328cba0768bbbb13c6e715e6001f91">checkInstruction</a>() == 1){ <span class="comment">//the instruction is VALID!</span> <a name="l00092"></a>00092 <a class="code" href="classmesh_network_bus.html#ab578dda02d21cb56e7ad424b17bfa7e2">processInstruction</a>(); <a name="l00093"></a>00093 <span class="comment">//Serial.println(&quot;GOOD&quot;);</span> <a name="l00094"></a>00094 <span class="keywordflow">return</span> 1; <a name="l00095"></a>00095 } <a name="l00096"></a>00096 } <a name="l00097"></a>00097 <a name="l00098"></a>00098 <span class="keywordflow">return</span> 0; <a name="l00099"></a>00099 } <a name="l00100"></a>00100 <a name="l00101"></a><a class="code" href="classmesh_network_bus.html#a0fd22283274a0c180a16dbcb8a3083ff">00101</a> <span class="keywordtype">int</span> <a class="code" href="classmesh_network_bus.html#a0fd22283274a0c180a16dbcb8a3083ff">readIncomingPacket</a>(){ <span class="comment">//return 1 when a valid instruction packet is sent. </span> <a name="l00102"></a>00102 <span class="keywordflow">if</span> (Serial.available() &gt; 0){ <a name="l00103"></a>00103 byte incoming = Serial.read() ; <span class="comment">//applies our hash key to he incoming byte</span> <a name="l00104"></a>00104 <a name="l00105"></a>00105 <a name="l00106"></a>00106 <span class="keywordflow">if</span> ( incoming == startBit ){ <a name="l00107"></a>00107 packetCount = 0; <span class="comment">//reset packet counter to 0</span> <a name="l00108"></a>00108 } <a name="l00109"></a>00109 <a name="l00110"></a>00110 <span class="comment">/*Serial.print(&quot;HLC RECVD: &quot; );</span> <a name="l00111"></a>00111 <span class="comment"> Serial.println(incoming);</span> <a name="l00112"></a>00112 <span class="comment"> Serial.print(&quot;Packetcount: &quot; );</span> <a name="l00113"></a>00113 <span class="comment"> Serial.println( packetCount);*/</span> <a name="l00114"></a>00114 <a name="l00115"></a>00115 <a name="l00116"></a>00116 <span class="keywordflow">if</span> (packetCount &gt;5){<span class="comment">//drop packets</span> <a name="l00117"></a>00117 packetCount =0; <a name="l00118"></a>00118 <span class="comment">//return 1; </span> <a name="l00119"></a>00119 } <a name="l00120"></a>00120 <a name="l00121"></a>00121 <span class="keywordflow">if</span> (packetCount == 1) <a name="l00122"></a>00122 callerID = incoming; <a name="l00123"></a>00123 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (packetCount == 2) <a name="l00124"></a>00124 actionID = incoming; <a name="l00125"></a>00125 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (packetCount == 3) <a name="l00126"></a>00126 crc= incoming; <a name="l00127"></a>00127 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (packetCount == 4) <a name="l00128"></a>00128 variable[0] = incoming; <a name="l00129"></a>00129 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (packetCount == 5){ <a name="l00130"></a>00130 variable[1] = incoming; <a name="l00131"></a>00131 <span class="comment">/*Serial.println(&quot;these are your real data&quot;);</span> <a name="l00132"></a>00132 <span class="comment"> Serial.print(callerID);</span> <a name="l00133"></a>00133 <span class="comment"> Serial.print(actionID);</span> <a name="l00134"></a>00134 <span class="comment"> Serial.print(variable[0]);</span> <a name="l00135"></a>00135 <span class="comment"> Serial.print(variable[1]); </span> <a name="l00136"></a>00136 <span class="comment"> Serial.println(&quot;end real data&quot;); */</span> <a name="l00137"></a>00137 packetCount++; <a name="l00138"></a>00138 <span class="keywordflow">return</span> 1; <a name="l00139"></a>00139 } <a name="l00140"></a>00140 <span class="comment">//else</span> <a name="l00141"></a>00141 <span class="comment">//packetCount = 0; //ERROR- SHOULD NEVER ARRIVE HERE </span> <a name="l00142"></a>00142 <a name="l00143"></a>00143 packetCount++; <a name="l00144"></a>00144 } <a name="l00145"></a>00145 <span class="keywordflow">else</span> <a name="l00146"></a>00146 <span class="keywordflow">return</span> 0; <a name="l00147"></a>00147 <a name="l00148"></a>00148 <span class="comment">/*if ( incoming == startBit){</span> <a name="l00149"></a>00149 <span class="comment"> packetCount = 0; //reset packet counter to 0</span> <a name="l00150"></a>00150 <span class="comment"> }</span> <a name="l00151"></a>00151 <span class="comment"> </span> <a name="l00152"></a>00152 <span class="comment"> </span> <a name="l00153"></a>00153 <span class="comment"> if (packetCount &gt;4){//drop packets</span> <a name="l00154"></a>00154 <span class="comment"> packetCount = 0;</span> <a name="l00155"></a>00155 <span class="comment"> return 0; </span> <a name="l00156"></a>00156 <span class="comment"> }</span> <a name="l00157"></a>00157 <span class="comment"> else if (packetCount == 0){</span> <a name="l00158"></a>00158 <span class="comment"> Serial.println(&quot;0: &quot; );</span> <a name="l00159"></a>00159 <span class="comment"> callerID = 97;</span> <a name="l00160"></a>00160 <span class="comment"> }</span> <a name="l00161"></a>00161 <span class="comment"> else if (packetCount == 1){</span> <a name="l00162"></a>00162 <span class="comment"> Serial.println(&quot;1: &quot; );</span> <a name="l00163"></a>00163 <span class="comment"> actionID = incoming;</span> <a name="l00164"></a>00164 <span class="comment"> }</span> <a name="l00165"></a>00165 <span class="comment"> else if (packetCount == 2){</span> <a name="l00166"></a>00166 <span class="comment"> Serial.println(&quot;2: &quot; );</span> <a name="l00167"></a>00167 <span class="comment"> crc= incoming;</span> <a name="l00168"></a>00168 <span class="comment"> }</span> <a name="l00169"></a>00169 <span class="comment"> else if (packetCount == 3){</span> <a name="l00170"></a>00170 <span class="comment"> Serial.println(&quot;3: &quot; );</span> <a name="l00171"></a>00171 <span class="comment"> variable[0] = incoming;</span> <a name="l00172"></a>00172 <span class="comment"> }</span> <a name="l00173"></a>00173 <span class="comment"> else if (packetCount == 4){</span> <a name="l00174"></a>00174 <span class="comment"> Serial.println(&quot;4: &quot; );</span> <a name="l00175"></a>00175 <span class="comment"> variable[1] = incoming; </span> <a name="l00176"></a>00176 <span class="comment"> packetCount++;</span> <a name="l00177"></a>00177 <span class="comment"> return 1;</span> <a name="l00178"></a>00178 <span class="comment"> } </span> <a name="l00179"></a>00179 <span class="comment"> else{</span> <a name="l00180"></a>00180 <span class="comment"> packetCount = 0; //ERROR- SHOULD NEVER ARRIVE HERE </span> <a name="l00181"></a>00181 <span class="comment"> Serial.println(&quot;FAIL&quot;);</span> <a name="l00182"></a>00182 <span class="comment"> return 0;</span> <a name="l00183"></a>00183 <span class="comment"> }</span> <a name="l00184"></a>00184 <span class="comment"> </span> <a name="l00185"></a>00185 <span class="comment"> </span> <a name="l00186"></a>00186 <span class="comment"> packetCount++;</span> <a name="l00187"></a>00187 <span class="comment"> return 0;</span> <a name="l00188"></a>00188 <span class="comment"> </span> <a name="l00189"></a>00189 <span class="comment"> </span> <a name="l00190"></a>00190 <span class="comment"> if (packetCount == 4){ </span> <a name="l00191"></a>00191 <span class="comment"> </span> <a name="l00192"></a>00192 <span class="comment"> return 1;</span> <a name="l00193"></a>00193 <span class="comment"> }</span> <a name="l00194"></a>00194 <span class="comment"> </span> <a name="l00195"></a>00195 <span class="comment"> else{</span> <a name="l00196"></a>00196 <span class="comment"> packetCount++;</span> <a name="l00197"></a>00197 <span class="comment"> return 0;</span> <a name="l00198"></a>00198 <span class="comment"> }</span> <a name="l00199"></a>00199 <span class="comment"> //return 0;</span> <a name="l00200"></a>00200 <span class="comment"> }</span> <a name="l00201"></a>00201 <span class="comment"> else</span> <a name="l00202"></a>00202 <span class="comment"> return 0; */</span> <a name="l00203"></a>00203 } <a name="l00204"></a>00204 <a name="l00205"></a><a class="code" href="classmesh_network_bus.html#aa73ba3a9c2a7a66a207041f62d1f53b3">00205</a> <a class="code" href="classinstruction.html">instruction</a>* <a class="code" href="classmesh_network_bus.html#aa73ba3a9c2a7a66a207041f62d1f53b3">getInstr</a>(){ <a name="l00206"></a>00206 <span class="comment">/*Serial.println(&quot;these are your real data&quot;);</span> <a name="l00207"></a>00207 <span class="comment"> Serial.print(callerID);</span> <a name="l00208"></a>00208 <span class="comment"> Serial.print(actionID);</span> <a name="l00209"></a>00209 <span class="comment"> Serial.print(variable[0]);</span> <a name="l00210"></a>00210 <span class="comment"> Serial.print(variable[1]); </span> <a name="l00211"></a>00211 <span class="comment"> Serial.println(&quot;end real data&quot;);*/</span> <a name="l00212"></a>00212 <span class="keywordflow">return</span> instr; <a name="l00213"></a>00213 } <a name="l00214"></a>00214 <span class="keyword">private</span>: <a name="l00215"></a>00215 <a name="l00216"></a>00216 <a class="code" href="classinstruction.html">instruction</a> *instr; <a name="l00217"></a>00217 <a name="l00218"></a>00218 byte callerID; <a name="l00219"></a>00219 byte startBit; <a name="l00220"></a>00220 byte crc; <span class="comment">//add up all the 1&apos;s for everything</span> <a name="l00221"></a>00221 byte actionID; <span class="comment">//needs to be enum&apos;d</span> <a name="l00222"></a>00222 byte variable[2]; <span class="comment">// 2 bytes = 16 bits = 1 integer //we do not compensate for long ints. we do not foresee its usage as of yet. </span> <a name="l00223"></a>00223 <span class="keywordtype">int</span> packetCount; <span class="comment">//MAX IS 4!!!</span> <a name="l00224"></a>00224 <span class="keywordtype">int</span> empty; <a name="l00225"></a>00225 }; <a name="l00226"></a>00226 <a name="l00227"></a>00227 <a name="l00228"></a>00228 <a name="l00229"></a>00229 </pre></div></div> <hr size="1"/><address style="text-align: right;"><small>Generated on Thu Feb 18 03:35:28 2010 for HLC by&nbsp; <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address> </body> </html>
jaimeyu/QuadRotor
Capstone-Doc/HLC/html/mesh_network_8h_source.html
HTML
gpl-3.0
20,814
/* * Copyright (C) 2010-2012 Project SkyFire <http://www.projectskyfire.org/> * Copyright (C) 2005-2012 MaNGOS <http://www.getmangos.com/> * Copyright (C) 2008-2012 Trinity <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* ScriptData SDName: Boss_Doomlord_Kazzak SD%Complete: 70 SDComment: Using incorrect spell for Mark of Kazzak SDCategory: Hellfire Peninsula EndScriptData */ #include "ScriptPCH.h" #define SAY_INTRO -1000147 #define SAY_AGGRO1 -1000148 #define SAY_AGGRO2 -1000149 #define SAY_SURPREME1 -1000154 #define SAY_SURPREME2 -1000149 #define SAY_KILL1 -1000150 #define SAY_KILL2 -1000151 #define SAY_KILL3 -1000152 #define SAY_DEATH -1000155 #define EMOTE_FRENZY -1000151 #define SAY_RAND1 -1000158 #define SAY_RAND2 -1000157 #define SPELL_SHADOWVOLLEY 32963 #define SPELL_CLEAVE 31779 #define SPELL_THUNDERCLAP 36706 #define SPELL_VOIDBOLT 39329 #define SPELL_MARKOFKAZZAK 32960 #define SPELL_ENRAGE 32964 #define SPELL_CAPTURESOUL 32966 #define SPELL_TWISTEDREFLECTION 21063 class boss_doomlord_kazzak : public CreatureScript { public: boss_doomlord_kazzak() : CreatureScript("boss_doomlord_kazzak") { } CreatureAI* GetAI(Creature* pCreature) const { return new boss_doomlordkazzakAI (pCreature); } struct boss_doomlordkazzakAI : public ScriptedAI { boss_doomlordkazzakAI(Creature *c) : ScriptedAI(c) {} uint32 ShadowVolley_Timer; uint32 Cleave_Timer; uint32 ThunderClap_Timer; uint32 VoidBolt_Timer; uint32 MarkOfKazzak_Timer; uint32 Enrage_Timer; uint32 Twisted_Reflection_Timer; void Reset() { ShadowVolley_Timer = 6000 + rand()%4000; Cleave_Timer = 7000; ThunderClap_Timer = 14000 + rand()%4000; VoidBolt_Timer = 30000; MarkOfKazzak_Timer = 25000; Enrage_Timer = 60000; Twisted_Reflection_Timer = 33000; // Timer may be incorrect } void JustRespawned() { DoScriptText(SAY_INTRO, me); } void EnterCombat(Unit * /*who*/) { DoScriptText(RAND(SAY_AGGRO1, SAY_AGGRO2), me); } void KilledUnit(Unit* victim) { // When Kazzak kills a player (not pets/totems), he regens some health if (victim->GetTypeId() != TYPEID_PLAYER) return; DoCast(me, SPELL_CAPTURESOUL); DoScriptText(RAND(SAY_KILL1, SAY_KILL2, SAY_KILL3), me); } void JustDied(Unit * /*victim*/) { DoScriptText(SAY_DEATH, me); } void UpdateAI(const uint32 diff) { //Return since we have no target if (!UpdateVictim()) return; //ShadowVolley_Timer if (ShadowVolley_Timer <= diff) { DoCast(me->getVictim(), SPELL_SHADOWVOLLEY); ShadowVolley_Timer = 4000 + rand()%2000; } else ShadowVolley_Timer -= diff; //Cleave_Timer if (Cleave_Timer <= diff) { DoCast(me->getVictim(), SPELL_CLEAVE); Cleave_Timer = 8000 + rand()%4000; } else Cleave_Timer -= diff; //ThunderClap_Timer if (ThunderClap_Timer <= diff) { DoCast(me->getVictim(), SPELL_THUNDERCLAP); ThunderClap_Timer = 10000 + rand()%4000; } else ThunderClap_Timer -= diff; //VoidBolt_Timer if (VoidBolt_Timer <= diff) { DoCast(me->getVictim(), SPELL_VOIDBOLT); VoidBolt_Timer = 15000 + rand()%3000; } else VoidBolt_Timer -= diff; //MarkOfKazzak_Timer if (MarkOfKazzak_Timer <= diff) { Unit* victim = SelectUnit(SELECT_TARGET_RANDOM, 0); if (victim->GetPower(POWER_MANA)) { DoCast(victim, SPELL_MARKOFKAZZAK); MarkOfKazzak_Timer = 20000; } } else MarkOfKazzak_Timer -= diff; //Enrage_Timer if (Enrage_Timer <= diff) { DoScriptText(EMOTE_FRENZY, me); DoCast(me, SPELL_ENRAGE); Enrage_Timer = 30000; } else Enrage_Timer -= diff; if (Twisted_Reflection_Timer <= diff) { DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_TWISTEDREFLECTION); Twisted_Reflection_Timer = 15000; } else Twisted_Reflection_Timer -= diff; DoMeleeAttackIfReady(); } }; }; void AddSC_boss_doomlordkazzak() { new boss_doomlord_kazzak(); }
SkyFireArchives/SkyFireEMU_420
src/server/scripts/Outland/boss_doomlord_kazzak.cpp
C++
gpl-3.0
5,868
#!/usr/bin/env python3 # - coding: utf-8 - # Copyright (C) 2010 Matías Ribecky <matias at mribecky.com.ar> # Copyright (C) 2010-2012 Toms Bauģis <toms.baugis@gmail.com> # Copyright (C) 2012 Ted Smith <tedks at cs.umd.edu> # This file is part of Project Hamster. # Project Hamster is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # Project Hamster is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with Project Hamster. If not, see <http://www.gnu.org/licenses/>. '''A script to control the applet from the command line.''' import sys, os import argparse import re import gi gi.require_version('Gdk', '3.0') # noqa: E402 gi.require_version('Gtk', '3.0') # noqa: E402 from gi.repository import GLib as glib from gi.repository import Gdk as gdk from gi.repository import Gtk as gtk from gi.repository import Gio as gio from gi.repository import GLib as glib import hamster from hamster import client, reports from hamster import logger as hamster_logger from hamster.about import About from hamster.edit_activity import CustomFactController from hamster.overview import Overview from hamster.preferences import PreferencesEditor from hamster.lib import default_logger, stuff from hamster.lib import datetime as dt from hamster.lib.fact import Fact logger = default_logger(__file__) def word_wrap(line, max_len): """primitive word wrapper""" lines = [] cur_line, cur_len = "", 0 for word in line.split(): if len("%s %s" % (cur_line, word)) < max_len: cur_line = ("%s %s" % (cur_line, word)).strip() else: if cur_line: lines.append(cur_line) cur_line = word if cur_line: lines.append(cur_line) return lines def fact_dict(fact_data, with_date): fact = {} if with_date: fmt = '%Y-%m-%d %H:%M' else: fmt = '%H:%M' fact['start'] = fact_data.start_time.strftime(fmt) if fact_data.end_time: fact['end'] = fact_data.end_time.strftime(fmt) else: end_date = dt.datetime.now() fact['end'] = '' fact['duration'] = fact_data.delta.format() fact['activity'] = fact_data.activity fact['category'] = fact_data.category if fact_data.tags: fact['tags'] = ' '.join('#%s' % tag for tag in fact_data.tags) else: fact['tags'] = '' fact['description'] = fact_data.description return fact class Hamster(gtk.Application): """Hamster gui. Actions should eventually be accessible via Gio.DBusActionGroup with the 'org.gnome.Hamster.GUI' id. but that is still experimental, the actions API is subject to change. Discussion with "external" developers welcome ! The separate dbus org.gnome.Hamster.WindowServer is still the stable recommended way to show windows for now. """ def __init__(self): # inactivity_timeout: How long (ms) the service should stay alive # after all windows have been closed. gtk.Application.__init__(self, application_id="org.gnome.Hamster.GUI", #inactivity_timeout=10000, register_session=True) self.about_controller = None # 'about' window controller self.fact_controller = None # fact window controller self.overview_controller = None # overview window controller self.preferences_controller = None # settings window controller self.connect("startup", self.on_startup) self.connect("activate", self.on_activate) # we need them before the startup phase # so register/activate_action work before the app is ran. # cf. https://gitlab.gnome.org/GNOME/glib/blob/master/gio/tests/gapplication-example-actions.c self.add_actions() def add_actions(self): # most actions have no parameters # for type "i", use Variant.new_int32() and .get_int32() to pack/unpack for name in ("about", "add", "clone", "edit", "overview", "preferences"): data_type = glib.VariantType("i") if name in ("edit", "clone") else None action = gio.SimpleAction.new(name, data_type) action.connect("activate", self.on_activate_window) self.add_action(action) action = gio.SimpleAction.new("quit", None) action.connect("activate", self.on_activate_quit) self.add_action(action) def on_activate(self, data=None): logger.debug("activate") if not self.get_windows(): self.activate_action("overview") def on_activate_window(self, action=None, data=None): self._open_window(action.get_name(), data) def on_activate_quit(self, data=None): self.on_activate_quit() def on_startup(self, data=None): logger.debug("startup") # Must be the same as application_id. Won't be required with gtk4. glib.set_prgname(self.get_application_id()) # localized name, but let's keep it simple. glib.set_application_name("Hamster") def _open_window(self, name, data=None): logger.debug("opening '{}'".format(name)) if name == "about": if not self.about_controller: # silence warning "GtkDialog mapped without a transient parent" # https://stackoverflow.com/a/38408127/3565696 _dummy = gtk.Window() self.about_controller = About(parent=_dummy) logger.debug("new About") controller = self.about_controller elif name in ("add", "clone", "edit"): if self.fact_controller: # Something is already going on, with other arguments, present it. # Or should we just discard the forgotten one ? logger.warning("Fact controller already active. Please close first.") else: fact_id = data.get_int32() if data else None self.fact_controller = CustomFactController(name, fact_id=fact_id) logger.debug("new CustomFactController") controller = self.fact_controller elif name == "overview": if not self.overview_controller: self.overview_controller = Overview() logger.debug("new Overview") controller = self.overview_controller elif name == "preferences": if not self.preferences_controller: self.preferences_controller = PreferencesEditor() logger.debug("new PreferencesEditor") controller = self.preferences_controller window = controller.window if window not in self.get_windows(): self.add_window(window) logger.debug("window added") # Essential for positioning on wayland. # This should also select the correct window type if unset yet. # https://specifications.freedesktop.org/wm-spec/wm-spec-1.3.html if name != "overview" and self.overview_controller: window.set_transient_for(self.overview_controller.window) # so the dialog appears on top of the transient-for: window.set_type_hint(gdk.WindowTypeHint.DIALOG) else: # toplevel window.set_transient_for(None) controller.present() logger.debug("window presented") def present_fact_controller(self, action, fact_id=0): """Present the fact controller window to add, clone or edit a fact. Args: action (str): "add", "clone" or "edit" """ assert action in ("add", "clone", "edit") if action in ("clone", "edit"): action_data = glib.Variant.new_int32(int(fact_id)) else: action_data = None # always open dialogs through actions, # both for consistency, and to reduce the paths to test. app.activate_action(action, action_data) class HamsterCli(object): """Command line interface.""" def __init__(self): self.storage = client.Storage() def assist(self, *args): assist_command = args[0] if args else "" if assist_command == "start": hamster_client._activities(sys.argv[-1]) elif assist_command == "export": formats = "html tsv xml ical".split() chosen = sys.argv[-1] formats = [f for f in formats if not chosen or f.startswith(chosen)] print("\n".join(formats)) def toggle(self): self.storage.toggle() def start(self, *args): '''Start a new activity.''' if not args: print("Error: please specify activity") return 0 fact = Fact.parse(" ".join(args), range_pos="tail") if fact.start_time is None: fact.start_time = dt.datetime.now() self.storage.check_fact(fact, default_day=dt.hday.today()) id_ = self.storage.add_fact(fact) return id_ def stop(self, *args): '''Stop tracking the current activity.''' self.storage.stop_tracking() def export(self, *args): args = args or [] export_format, start_time, end_time = "html", None, None if args: export_format = args[0] (start_time, end_time), __ = dt.Range.parse(" ".join(args[1:])) start_time = start_time or dt.datetime.combine(dt.date.today(), dt.time()) end_time = end_time or start_time.replace(hour=23, minute=59, second=59) facts = self.storage.get_facts(start_time, end_time) writer = reports.simple(facts, start_time.date(), end_time.date(), export_format) def _activities(self, search=""): '''Print the names of all the activities.''' if "@" in search: activity, category = search.split("@") for cat in self.storage.get_categories(): if not category or cat['name'].lower().startswith(category.lower()): print("{}@{}".format(activity, cat['name'])) else: for activity in self.storage.get_activities(search): print(activity['name']) if activity['category']: print("{}@{}".format(activity['name'], activity['category'])) def activities(self, *args): '''Print the names of all the activities.''' search = args[0] if args else "" for activity in self.storage.get_activities(search): print("{}@{}".format(activity['name'], activity['category'])) def categories(self, *args): '''Print the names of all the categories.''' for category in self.storage.get_categories(): print(category['name']) def list(self, *times): """list facts within a date range""" (start_time, end_time), __ = dt.Range.parse(" ".join(times or [])) start_time = start_time or dt.datetime.combine(dt.date.today(), dt.time()) end_time = end_time or start_time.replace(hour=23, minute=59, second=59) self._list(start_time, end_time) def current(self, *args): """prints current activity. kinda minimal right now""" facts = self.storage.get_todays_facts() if facts and not facts[-1].end_time: print("{} {}".format(str(facts[-1]).strip(), facts[-1].delta.format(fmt="HH:MM"))) else: print((_("No activity"))) def search(self, *args): """search for activities by name and optionally within a date range""" args = args or [] search = "" if args: search = args[0] (start_time, end_time), __ = dt.Range.parse(" ".join(args[1:])) start_time = start_time or dt.datetime.combine(dt.date.today(), dt.time()) end_time = end_time or start_time.replace(hour=23, minute=59, second=59) self._list(start_time, end_time, search) def _list(self, start_time, end_time, search=""): """Print a listing of activities""" facts = self.storage.get_facts(start_time, end_time, search) headers = {'activity': _("Activity"), 'category': _("Category"), 'tags': _("Tags"), 'description': _("Description"), 'start': _("Start"), 'end': _("End"), 'duration': _("Duration")} # print date if it is not the same day print_with_date = start_time.date() != end_time.date() cols = 'start', 'end', 'duration', 'activity', 'category' widths = dict([(col, len(headers[col])) for col in cols]) for fact in facts: fact = fact_dict(fact, print_with_date) for col in cols: widths[col] = max(widths[col], len(fact[col])) cols = ["{{{col}: <{len}}}".format(col=col, len=widths[col]) for col in cols] fact_line = " | ".join(cols) row_width = sum(val + 3 for val in list(widths.values())) print() print(fact_line.format(**headers)) print("-" * min(row_width, 80)) by_cat = {} for fact in facts: cat = fact.category or _("Unsorted") by_cat.setdefault(cat, dt.timedelta(0)) by_cat[cat] += fact.delta pretty_fact = fact_dict(fact, print_with_date) print(fact_line.format(**pretty_fact)) if pretty_fact['description']: for line in word_wrap(pretty_fact['description'], 76): print(" {}".format(line)) if pretty_fact['tags']: for line in word_wrap(pretty_fact['tags'], 76): print(" {}".format(line)) print("-" * min(row_width, 80)) cats = [] total_duration = dt.timedelta() for cat, duration in sorted(by_cat.items(), key=lambda x: x[1], reverse=True): cats.append("{}: {}".format(cat, duration.format())) total_duration += duration for line in word_wrap(", ".join(cats), 80): print(line) print("Total: ", total_duration.format()) print() def version(self): print(hamster.__version__) if __name__ == '__main__': from hamster.lib import i18n i18n.setup_i18n() usage = _( """ Actions: * add [activity [start-time [end-time]]]: Add an activity * stop: Stop tracking current activity. * list [start-date [end-date]]: List activities * search [terms] [start-date [end-date]]: List activities matching a search term * export [html|tsv|ical|xml] [start-date [end-date]]: Export activities with the specified format * current: Print current activity * activities: List all the activities names, one per line. * categories: List all the categories names, one per line. * overview / preferences / add / about: launch specific window * version: Show the Hamster version Time formats: * 'YYYY-MM-DD hh:mm': If start-date is missing, it will default to today. If end-date is missing, it will default to start-date. * '-minutes': Relative time in minutes from the current date and time. Note: * For list/search/export a "hamster day" starts at the time set in the preferences (default 05:00) and ends one minute earlier the next day. Activities are reported for each "hamster day" in the interval. Example usage: hamster start bananas -20 start activity 'bananas' with start time 20 minutes ago hamster search pancakes 2012-08-01 2012-08-30 look for an activity matching terms 'pancakes` between 1st and 30st August 2012. Will check against activity, category, description and tags """) hamster_client = HamsterCli() app = Hamster() logger.debug("app instanciated") import signal signal.signal(signal.SIGINT, signal.SIG_DFL) # gtk3 screws up ctrl+c parser = argparse.ArgumentParser( description="Time tracking utility", epilog=usage, formatter_class=argparse.RawDescriptionHelpFormatter) # cf. https://stackoverflow.com/a/28611921/3565696 parser.add_argument("--log", dest="log_level", choices=('DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'), default='WARNING', help="Set the logging level (default: %(default)s)") parser.add_argument("action", nargs="?", default="overview") parser.add_argument('action_args', nargs=argparse.REMAINDER, default=[]) args, unknown_args = parser.parse_known_args() # logger for current script logger.setLevel(args.log_level) # hamster_logger for the rest hamster_logger.setLevel(args.log_level) if not hamster.installed: logger.info("Running in devel mode") if args.action in ("start", "track"): action = "add" # alias elif args.action == "prefs": # for backward compatibility action = "preferences" else: action = args.action if action in ("about", "add", "edit", "overview", "preferences"): if action == "add" and args.action_args: assert not unknown_args, "unknown options: {}".format(unknown_args) # directly add fact from arguments id_ = hamster_client.start(*args.action_args) assert id_ > 0, "failed to add fact" sys.exit(0) else: app.register() if action == "edit": assert len(args.action_args) == 1, ( "edit requires exactly one argument, got {}" .format(args.action_args)) id_ = int(args.action_args[0]) assert id_ > 0, "received non-positive id : {}".format(id_) action_data = glib.Variant.new_int32(id_) else: action_data = None app.activate_action(action, action_data) run_args = [sys.argv[0]] + unknown_args logger.debug("run {}".format(run_args)) status = app.run(run_args) logger.debug("app exited") sys.exit(status) elif hasattr(hamster_client, action): getattr(hamster_client, action)(*args.action_args) else: sys.exit(usage % {'prog': sys.argv[0]})
projecthamster/hamster
src/hamster-cli.py
Python
gpl-3.0
18,772
var subdomain = require('express-subdomain'); var express = require('express'); var app = express(); var router = express.Router(); var moment = require('moment'); var time = moment(); var timeFormat = time.format('HH:mm:ss'); app.get('/', function(req, res) { res.sendFile(__dirname + '/index.html'); }); app.listen(3000); console.log(`SMWeb up at ${timeFormat}`);
ricven/qwns.org
app.js
JavaScript
gpl-3.0
369
package com.github.epd.sprout.actors.buffs; import com.github.epd.sprout.actors.blobs.Blob; import com.github.epd.sprout.actors.blobs.ToxicGas; import com.github.epd.sprout.messages.Messages; import com.github.epd.sprout.scenes.GameScene; import com.github.epd.sprout.ui.BuffIndicator; import com.watabou.utils.Bundle; public class ToxicImbue extends Buff { public static final float DURATION = 30f; protected float left; private static final String LEFT = "left"; @Override public void storeInBundle(Bundle bundle) { super.storeInBundle(bundle); bundle.put(LEFT, left); } @Override public void restoreFromBundle(Bundle bundle) { super.restoreFromBundle(bundle); left = bundle.getFloat(LEFT); } public void set(float duration) { this.left = duration; } @Override public boolean act() { GameScene.add(Blob.seed(target.pos, 50, ToxicGas.class)); spend(TICK); left -= TICK; if (left <= 0) detach(); return true; } @Override public int icon() { return BuffIndicator.IMMUNITY; } @Override public String toString() { return Messages.get(this, "name"); } @Override public String desc() { return Messages.get(this, "desc", dispTurns(left)); } { immunities.add(ToxicGas.class); immunities.add(Poison.class); } }
G2159687/espd
app/src/main/java/com/github/epd/sprout/actors/buffs/ToxicImbue.java
Java
gpl-3.0
1,277
/* * Copyright (C) 2020 GeorgH93 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. */ package at.pcgamingfreaks.Database.Cache; import org.jetbrains.annotations.NotNull; import java.util.UUID; public interface ICacheablePlayer { /** * @return The uuid of the player. */ @NotNull UUID getUUID(); /** * @return True if the player is online. False if not. */ boolean isOnline(); /** * @return The time in milliseconds since 1970-01-01 00:00:00 when the player was last online. */ long getLastPlayed(); /** * @return True if the cached player is no longer needed and can be purged from the cache. */ boolean canBeUncached(); }
GeorgH93/Bukkit_Bungee_PluginLib
pcgf_pluginlib-common/src/at/pcgamingfreaks/Database/Cache/ICacheablePlayer.java
Java
gpl-3.0
1,275
/******************************************************************************* ** ** Monte Carlo eXtreme (MCX) - GPU accelerated Monte Carlo 3D photon migration ** Author: Qianqian Fang <q.fang at neu.edu> ** ** Reference (Fang2009): ** Qianqian Fang and David A. Boas, "Monte Carlo Simulation of Photon ** Migration in 3D Turbid Media Accelerated by Graphics Processing ** Units," Optics Express, vol. 17, issue 22, pp. 20178-20190 (2009) ** ** tictoc.c: timing functions ** ** License: GNU General Public License v3, see LICENSE.txt for details ** *******************************************************************************/ #include "tictoc.h" #define _BSD_SOURCE #ifndef USE_OS_TIMER #include <cuda.h> #include <driver_types.h> #include <cuda_runtime_api.h> #define MAX_DEVICE 256 /* use CUDA timer */ static cudaEvent_t timerStart[MAX_DEVICE], timerStop[MAX_DEVICE]; unsigned int GetTimeMillis () { float elapsedTime; int devid; cudaGetDevice(&devid); cudaEventRecord(timerStop[devid],0); cudaEventSynchronize(timerStop[devid]); cudaEventElapsedTime(&elapsedTime, timerStart[devid], timerStop[devid]); return (unsigned int)(elapsedTime); } unsigned int StartTimer () { int devid; cudaGetDevice(&devid); cudaEventCreate(timerStart+devid); cudaEventCreate(timerStop+devid); cudaEventRecord(timerStart[devid],0); return 0; } #else static unsigned int timerRes; #ifndef _WIN32 #if _POSIX_C_SOURCE >= 199309L #include <time.h> // for nanosleep #else #include <unistd.h> // for usleep #endif #include <sys/time.h> #include <string.h> void SetupMillisTimer(void) {} void CleanupMillisTimer(void) {} long GetTime (void) { struct timeval tv; timerRes = 1000; gettimeofday(&tv,NULL); long temp = tv.tv_usec; temp+=tv.tv_sec*1000000; return temp; } unsigned int GetTimeMillis () { return (unsigned int)(GetTime ()/1000); } unsigned int StartTimer () { return GetTimeMillis(); } #else #include <windows.h> #include <stdio.h> /* * GetTime -- * * Returns the curent time (from some uninteresting origin) in usecs * based on the performance counters. */ int GetTime(void) { static double cycles_per_usec; LARGE_INTEGER counter; if (cycles_per_usec == 0) { static LARGE_INTEGER lFreq; if (!QueryPerformanceFrequency(&lFreq)) { fprintf(stderr, "Unable to read the performance counter frquency!\n"); return 0; } cycles_per_usec = 1000000 / ((double) lFreq.QuadPart); } if (!QueryPerformanceCounter(&counter)) { fprintf(stderr,"Unable to read the performance counter!\n"); return 0; } return ((long) (((double) counter.QuadPart) * cycles_per_usec)); } #pragma comment(lib,"winmm.lib") unsigned int GetTimeMillis(void) { return (unsigned int)timeGetTime(); } /* By default in 2000/XP, the timeGetTime call is set to some resolution between 10-15 ms query for the range of value periods and then set timer to the lowest possible. Note: MUST make call to corresponding CleanupMillisTimer */ void SetupMillisTimer(void) { TIMECAPS timeCaps; timeGetDevCaps(&timeCaps, sizeof(TIMECAPS)); if (timeBeginPeriod(timeCaps.wPeriodMin) == TIMERR_NOCANDO) { fprintf(stderr,"WARNING: Cannot set timer precision. Not sure what precision we're getting!\n"); }else { timerRes = timeCaps.wPeriodMin; fprintf(stderr,"(* Set timer resolution to %d ms. *)\n",timeCaps.wPeriodMin); } } unsigned int StartTimer () { SetupMillisTimer(); return 0; } void CleanupMillisTimer(void) { if (timeEndPeriod(timerRes) == TIMERR_NOCANDO) { fprintf(stderr,"WARNING: bad return value of call to timeEndPeriod.\n"); } } #endif #endif #ifdef _WIN32 #include <windows.h> #elif _POSIX_C_SOURCE >= 199309L #include <time.h> // for nanosleep #else #include <unistd.h> // for usleep #endif void sleep_ms(int milliseconds){ // cross-platform sleep function #ifdef _WIN32 Sleep(milliseconds); #elif _POSIX_C_SOURCE >= 199309L struct timespec ts; ts.tv_sec = milliseconds / 1000; ts.tv_nsec = (milliseconds % 1000) * 1000000; nanosleep(&ts, NULL); #else usleep(milliseconds * 1000); #endif }
fninaparavecino/mcx
src/tictoc.c
C
gpl-3.0
4,199
package com.pk.controller.admin; import com.pk.framework.vo.Result; import com.pk.model.admin.SysTree; import com.pk.service.admin.SysTreeService; import com.pk.vo.admin.SysTreeSearchVO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.servlet.ModelAndView; @Controller public class SysTreeController { @Autowired private SysTreeService sysTreeService; @RequestMapping(value = "/admin/tree/list.jspx") public ModelAndView listJspx() { return new ModelAndView("forward:/admin/tree/list.jsp"); } @RequestMapping(value = "/admin/tree/list.do") @ResponseBody public Result list(SysTreeSearchVO svo) { try{ return sysTreeService.list(svo); }catch(Exception e){ e.printStackTrace(); return Result.FAILURE("后台异常:"+e.getMessage()); } } @RequestMapping(value = "/admin/tree/get.do") @ResponseBody public Result get(int id) { Result result = new Result(); try{ SysTree vo = sysTreeService.get(id); result.setCode(Result.CODE_SUCCESS); result.setObject(vo); }catch(Exception e){ e.printStackTrace(); result.setCode(Result.CODE_FAILURE); result.setMessage("后台异常:"+e.getMessage()); } return result; } @RequestMapping(value = "/admin/tree/add.do") @ResponseBody public Result add(SysTree vo) { try{ return sysTreeService.add(vo); }catch(Exception e){ e.printStackTrace(); return Result.FAILURE("后台异常:"+e.getMessage()); } } @RequestMapping(value = "/admin/tree/update.do") @ResponseBody public Result update(SysTree vo) { try{ return sysTreeService.update(vo); }catch(Exception e){ e.printStackTrace(); return Result.FAILURE("后台异常:"+e.getMessage()); } } @RequestMapping(value = "/admin/tree/delete.do") @ResponseBody public Result delete(int id) { try{ return sysTreeService.delete(id); }catch(Exception e){ e.printStackTrace(); return Result.FAILURE("后台异常:"+e.getMessage()); } } }
jakey766/web_base
src/main/java/com/pk/controller/admin/SysTreeController.java
Java
gpl-3.0
2,156
package org.pwr.transporter.server.web.services.sales; import java.util.List; import java.util.Map; import org.pwr.transporter.entity.sales.SalesOrder; import org.pwr.transporter.server.business.sales.SalesOrderLogic; import org.pwr.transporter.server.core.hb.criteria.Criteria; import org.pwr.transporter.server.web.services.IService; import org.springframework.beans.factory.annotation.Autowired; /** * <pre> * Service for {@link SalesOrder} * </pre> * <hr/> * * @author W.S. * @version 0.0.1 */ public class SalesOrderService implements IService { @Autowired SalesOrderLogic salesOrderLogic; public SalesOrder getByID(Long id) { return this.salesOrderLogic.getByID(id); } public List<SalesOrder> search(Map<String, Object> parameterMap) { return this.salesOrderLogic.search(parameterMap); } public Long insert(SalesOrder entity) { return this.salesOrderLogic.insert(entity); } public void update(SalesOrder entity) { this.salesOrderLogic.update(entity); } public void delete(SalesOrder entity) { this.salesOrderLogic.delete(entity); } public void deleteById(Long id) { this.salesOrderLogic.deleteById(id); } @SuppressWarnings("unchecked") @Override public List<SalesOrder> getListRest(int amount, int fromRow) { return this.salesOrderLogic.getListRest(amount, fromRow); } public long count() { return this.salesOrderLogic.count(); } @Override public long count(Criteria criteria) { return this.salesOrderLogic.count(criteria); } @SuppressWarnings("unchecked") @Override public List<SalesOrder> getListRestCrit(int amount, int fromRow, Criteria criteria) { return this.salesOrderLogic.getListRestCrit(amount, fromRow, criteria); } public List<SalesOrder> getByCustomerId(Long id) { return this.salesOrderLogic.getByCustomerId(id); } }
InfWGospodarce/projekt
transporter-server/src/org/pwr/transporter/server/web/services/sales/SalesOrderService.java
Java
gpl-3.0
1,984
///////////////////////////////////////////////////////////////////////////// // // Project ProjectForge Community Edition // www.projectforge.org // // Copyright (C) 2001-2022 Micromata GmbH, Germany (www.micromata.com) // // ProjectForge is dual-licensed. // // This community edition is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License as published // by the Free Software Foundation; version 3 of the License. // // This community edition is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General // Public License for more details. // // You should have received a copy of the GNU General Public License along // with this program; if not, see http://www.gnu.org/licenses/. // ///////////////////////////////////////////////////////////////////////////// package org.projectforge.business.humanresources; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.PredicateUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.builder.ToStringBuilder; import org.projectforge.business.fibu.ProjektDO; import org.projectforge.business.fibu.ProjektDao; import org.projectforge.business.user.UserRightId; import org.projectforge.framework.access.OperationType; import org.projectforge.framework.persistence.api.BaseDao; import org.projectforge.framework.persistence.api.BaseSearchFilter; import org.projectforge.framework.persistence.api.QueryFilter; import org.projectforge.framework.persistence.api.SortProperty; import org.projectforge.framework.persistence.user.entities.PFUserDO; import org.projectforge.framework.time.PFDateTime; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; import javax.persistence.criteria.JoinType; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; /** * @author Kai Reinhard (k.reinhard@micromata.de) */ @Repository public class HRPlanningEntryDao extends BaseDao<HRPlanningEntryDO> { public static final UserRightId USER_RIGHT_ID = UserRightId.PM_HR_PLANNING; private static final Logger log = LoggerFactory.getLogger(HRPlanningEntryDao.class); @Autowired private ProjektDao projektDao; @Autowired private HRPlanningDao hrPlanningDao; @Override public String[] getAdditionalSearchFields() { return new String[]{"projekt.name", "projekt.kunde.name", "planning.user.username", "planning.user.firstname", "planning.user.lastname"}; } protected HRPlanningEntryDao() { super(HRPlanningEntryDO.class); userRightId = USER_RIGHT_ID; } /** * @param sheet * @param projektId If null, then projekt will be set to null; */ public void setProjekt(final HRPlanningEntryDO sheet, final Integer projektId) { final ProjektDO projekt = projektDao.getOrLoad(projektId); sheet.setProjekt(projekt); } @Override public List<HRPlanningEntryDO> getList(final BaseSearchFilter filter) { final HRPlanningFilter myFilter = (HRPlanningFilter) filter; if (myFilter.getStopDay() != null) { final PFDateTime date = PFDateTime.from(myFilter.getStopDay()).getEndOfDay(); myFilter.setStopDay(date.getLocalDate()); } final QueryFilter queryFilter = buildQueryFilter(myFilter); myFilter.setIgnoreDeleted(true); // Ignore deleted flag of HRPlanningEntryDOs, use instead: if (myFilter.isDeleted()) { queryFilter.add(QueryFilter.or(QueryFilter.eq("deleted", true), QueryFilter.eq("planning.deleted", true))); } else { queryFilter.add(QueryFilter.and(QueryFilter.eq("deleted", false), QueryFilter.eq("planning.deleted", false))); } final List<HRPlanningEntryDO> list = getList(queryFilter); if (list == null) { return null; } for (final HRPlanningEntryDO entry : list) { @SuppressWarnings("unchecked") final List<HRPlanningEntryDO> entries = (List<HRPlanningEntryDO>) CollectionUtils.select( entry.getPlanning().getEntries(), PredicateUtils.uniquePredicate()); entry.getPlanning().setEntries(entries); } if (!myFilter.isGroupEntries() && !myFilter.isOnlyMyProjects()) { return list; } final List<HRPlanningEntryDO> result = new ArrayList<>(); final Set<Integer> set = (myFilter.isGroupEntries()) ? new HashSet<>() : null; for (final HRPlanningEntryDO entry : list) { if (myFilter.isOnlyMyProjects()) { if (entry.getProjekt() == null) { continue; } final ProjektDO projekt = entry.getProjekt(); if (projekt.getProjektManagerGroup() == null) { continue; } if (!getUserGroupCache().isLoggedInUserMemberOfGroup(projekt.getProjektManagerGroupId())) { continue; } } if (myFilter.isGroupEntries()) { if (set.contains(entry.getPlanningId())) { // Entry is already in result list. continue; } final HRPlanningEntryDO sumEntry = new HRPlanningEntryDO(); final HRPlanningDO planning = entry.getPlanning(); sumEntry.setPlanning(planning); sumEntry.setUnassignedHours(planning.getTotalUnassignedHours()); sumEntry.setMondayHours(planning.getTotalMondayHours()); sumEntry.setTuesdayHours(planning.getTotalTuesdayHours()); sumEntry.setWednesdayHours(planning.getTotalWednesdayHours()); sumEntry.setThursdayHours(planning.getTotalThursdayHours()); sumEntry.setFridayHours(planning.getTotalFridayHours()); sumEntry.setWeekendHours(planning.getTotalWeekendHours()); final StringBuilder buf = new StringBuilder(); boolean first = true; for (final HRPlanningEntryDO pos : planning.getEntries()) { final String str = pos.getProjektNameOrStatus(); if (StringUtils.isNotBlank(str)) { if (first) { first = false; } else { buf.append("; "); } buf.append(str); } } sumEntry.setDescription(buf.toString()); result.add(sumEntry); set.add(planning.getId()); } else { result.add(entry); } } return result; } public QueryFilter buildQueryFilter(final HRPlanningFilter filter) { final QueryFilter queryFilter = new QueryFilter(filter); queryFilter.createJoin("planning") .createJoin("user", JoinType.INNER, false, "planning"); if (filter.getUserId() != null) { final PFUserDO user = new PFUserDO(); user.setId(filter.getUserId()); queryFilter.add(QueryFilter.eq("planning.user", user)); } if (filter.getStartDay() != null && filter.getStopDay() != null) { queryFilter.add(QueryFilter.between("planning.week", filter.getStartDay(), filter.getStopDay())); } else if (filter.getStartDay() != null) { queryFilter.add(QueryFilter.ge("planning.week", filter.getStartDay())); } else if (filter.getStopDay() != null) { queryFilter.add(QueryFilter.le("planning.week", filter.getStopDay())); } if (filter.getProjektId() != null) { queryFilter.add(QueryFilter.eq("projekt.id", filter.getProjektId())); } queryFilter.addOrder(SortProperty.desc("planning.week")).addOrder(SortProperty.asc("planning.user.firstname")); if (log.isDebugEnabled()) { log.debug(ToStringBuilder.reflectionToString(filter)); } return queryFilter; } /** * Checks week date on: monday, 0:00:00.000 and if check fails then the date will be set to. */ @Override protected void onSaveOrModify(final HRPlanningEntryDO obj) { throw new UnsupportedOperationException( "Please do not save or HRPlanningEntryDO directly, save or update HRPlanningDO instead."); } @Override protected void prepareHibernateSearch(final HRPlanningEntryDO obj, final OperationType operationType) { projektDao.initializeProjektManagerGroup(obj.getProjekt()); } /** * @see HRPlanningDao#hasUserSelectAccess(PFUserDO, boolean) */ @Override public boolean hasUserSelectAccess(final PFUserDO user, final boolean throwException) { return hrPlanningDao.hasUserSelectAccess(user, throwException); } @Override public boolean hasAccess(final PFUserDO user, final HRPlanningEntryDO obj, final HRPlanningEntryDO oldObj, final OperationType operationType, final boolean throwException) { final HRPlanningDO old = oldObj != null ? oldObj.getPlanning() : null; return hrPlanningDao.hasAccess(user, obj.getPlanning(), old, operationType, throwException); } @Override public boolean hasUserSelectAccess(final PFUserDO user, final HRPlanningEntryDO obj, final boolean throwException) { return hrPlanningDao.hasUserSelectAccess(user, obj.getPlanning(), throwException); } @Override public HRPlanningEntryDO newInstance() { return new HRPlanningEntryDO(); } }
micromata/projectforge
projectforge-business/src/main/java/org/projectforge/business/humanresources/HRPlanningEntryDao.java
Java
gpl-3.0
9,163
/*************************************************************************************** * * * Copyright (c) 2012 Norbert Nagold <norbert.nagold@gmail.com> * * * * This program is free software; you can redistribute it and/or modify it under * * the terms of the GNU General Public License as published by the Free Software * * Foundation; either version 3 of the License, or (at your option) any later * * version. * * * * This program is distributed in the hope that it will be useful, but WITHOUT ANY * * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * * PARTICULAR PURPOSE. See the GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License along with * * this program. If not, see <http://www.gnu.org/licenses/>. * ****************************************************************************************/ package com.ichi2.anki; import android.app.Activity; import android.app.Dialog; import android.content.BroadcastReceiver; import android.content.Context; import android.content.DialogInterface; import android.content.DialogInterface.OnCancelListener; import android.content.DialogInterface.OnClickListener; import android.content.Intent; import android.content.IntentFilter; import android.content.SharedPreferences; import android.content.res.Resources; import android.content.res.Resources.NotFoundException; import android.graphics.Color; import android.graphics.Typeface; import android.os.Bundle; import android.os.Handler; import android.text.Editable; import android.text.InputFilter; import android.text.Spanned; import android.text.TextWatcher; import android.text.method.KeyListener; import android.util.Log; import android.view.Gravity; import android.view.KeyEvent; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.view.WindowManager; import android.view.inputmethod.InputMethodManager; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; import android.widget.Button; import android.widget.EditText; import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.ListView; import android.widget.SimpleAdapter; import android.widget.TextView; import com.ichi2.anim.ActivityTransitionAnimation; import com.ichi2.anim.ViewAnimation; import com.ichi2.anki.receiver.SdCardReceiver; import com.ichi2.async.DeckTask; import com.ichi2.filters.FilterFacade; import com.ichi2.libanki.Card; import com.ichi2.libanki.Collection; import com.ichi2.libanki.Note; import com.ichi2.libanki.Utils; import com.ichi2.themes.StyledDialog; import com.ichi2.themes.StyledDialog.Builder; import com.ichi2.themes.StyledOpenCollectionDialog; import com.ichi2.themes.StyledProgressDialog; import com.ichi2.themes.Themes; import com.ichi2.widget.WidgetStatus; import org.amr.arabic.ArabicUtilities; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.TreeSet; /** * Allows the user to edit a fact, for instance if there is a typo. A card is a presentation of a fact, and has two * sides: a question and an answer. Any number of fields can appear on each side. When you add a fact to Anki, cards * which show that fact are generated. Some models generate one card, others generate more than one. * * @see http://ichi2.net/anki/wiki/KeyTermsAndConcepts#Cards */ public class CardEditor extends Activity { public static final String SOURCE_LANGUAGE = "SOURCE_LANGUAGE"; public static final String TARGET_LANGUAGE = "TARGET_LANGUAGE"; public static final String SOURCE_TEXT = "SOURCE_TEXT"; public static final String TARGET_TEXT = "TARGET_TEXT"; public static final String EXTRA_CALLER = "CALLER"; public static final String EXTRA_CARD_ID = "CARD_ID"; public static final String EXTRA_CONTENTS = "CONTENTS"; public static final String EXTRA_ID = "ID"; private static final int DIALOG_DECK_SELECT = 0; private static final int DIALOG_MODEL_SELECT = 1; private static final int DIALOG_TAGS_SELECT = 2; private static final int DIALOG_RESET_CARD = 3; private static final int DIALOG_INTENT_INFORMATION = 4; private static final String ACTION_CREATE_FLASHCARD = "org.openintents.action.CREATE_FLASHCARD"; private static final String ACTION_CREATE_FLASHCARD_SEND = "android.intent.action.SEND"; private static final int MENU_LOOKUP = 0; private static final int MENU_RESET = 1; private static final int MENU_COPY_CARD = 2; private static final int MENU_ADD_CARD = 3; private static final int MENU_RESET_CARD_PROGRESS = 4; private static final int MENU_SAVED_INTENT = 5; // calling activity public static final int CALLER_NOCALLER = 0; public static final int CALLER_REVIEWER = 1; public static final int CALLER_STUDYOPTIONS = 2; public static final int CALLER_DECKPICKER = 3; public static final int CALLER_BIGWIDGET_EDIT = 4; public static final int CALLER_BIGWIDGET_ADD = 5; public static final int CALLER_CARDBROWSER_EDIT = 6; public static final int CALLER_CARDBROWSER_ADD = 7; public static final int CALLER_CARDEDITOR = 8; public static final int CALLER_CARDEDITOR_INTENT_ADD = 9; public static final int CALLER_INDICLASH = 10; public static final int REQUEST_ADD = 0; public static final int REQUEST_INTENT_ADD = 1; private static final int WAIT_TIME_UNTIL_UPDATE = 1000; private static boolean mChanged = false; /** * Broadcast that informs us when the sd card is about to be unmounted */ private BroadcastReceiver mUnmountReceiver = null; private Bundle mSavedInstanceState; private LinearLayout mFieldsLayoutContainer; private Button mSave; private Button mCancel; private Button mLater; private TextView mTagsButton; private TextView mModelButton; private TextView mDeckButton; private Button mSwapButton; private Note mEditorNote; private Card mCurrentEditedCard; private List<String> mCurrentTags; private long mCurrentDid; /* indicates if a new fact is added or a card is edited */ private boolean mAddNote; private boolean mAedictIntent; /* indicates which activity called card editor */ private int mCaller; private Collection mCol; private long mDeckId; private LinkedList<FieldEditText> mEditFields; private int mCardItemBackground; private ArrayList<HashMap<String, String>> mIntentInformation; private SimpleAdapter mIntentInformationAdapter; private StyledDialog mIntentInformationDialog; private StyledDialog mDeckSelectDialog; private String[] allTags; private ArrayList<String> selectedTags; private EditText mNewTagEditText; private StyledDialog mTagsDialog; private StyledProgressDialog mProgressDialog; private StyledOpenCollectionDialog mOpenCollectionDialog; // private String mSourceLanguage; // private String mTargetLanguage; private String[] mSourceText; private int mSourcePosition = 0; private int mTargetPosition = 1; private boolean mCancelled = false; private boolean mPrefFixArabic; private DeckTask.TaskListener mSaveFactHandler = new DeckTask.TaskListener() { private boolean mCloseAfter = false; private Intent mIntent; @Override public void onPreExecute() { Resources res = getResources(); mProgressDialog = StyledProgressDialog .show(CardEditor.this, "", res.getString(R.string.saving_facts), true); } @Override public void onProgressUpdate(DeckTask.TaskData... values) { int count = values[0].getInt(); if (mCaller == CALLER_BIGWIDGET_EDIT) { // AnkiDroidWidgetBig.setCard(values[0].getCard()); // AnkiDroidWidgetBig.updateWidget(AnkiDroidWidgetBig.UpdateService.VIEW_NOT_SPECIFIED); mChanged = true; } else if (count > 0) { mChanged = true; mSourceText = null; setNote(); Themes.showThemedToast(CardEditor.this, getResources().getQuantityString(R.plurals.factadder_cards_added, count, count), true); } else { Themes.showThemedToast(CardEditor.this, getResources().getString(R.string.factadder_saving_error), true); } if (!mAddNote || mCaller == CALLER_CARDEDITOR || mCaller == CALLER_BIGWIDGET_EDIT || mAedictIntent) { mChanged = true; mCloseAfter = true; } else if (mCaller == CALLER_CARDEDITOR_INTENT_ADD) { if (count > 0) { mChanged = true; } mCloseAfter = true; mIntent = new Intent(); mIntent.putExtra(EXTRA_ID, getIntent().getStringExtra(EXTRA_ID)); } else if (!mEditFields.isEmpty()) { mEditFields.getFirst().requestFocus(); } if (!mCloseAfter) { if (mProgressDialog != null && mProgressDialog.isShowing()) { try { mProgressDialog.dismiss(); } catch (IllegalArgumentException e) { Log.e(AnkiDroidApp.TAG, "Card Editor: Error on dismissing progress dialog: " + e); } } } } @Override public void onPostExecute(DeckTask.TaskData result) { if (result.getBoolean()) { if (mProgressDialog != null && mProgressDialog.isShowing()) { try { mProgressDialog.dismiss(); } catch (IllegalArgumentException e) { Log.e(AnkiDroidApp.TAG, "Card Editor: Error on dismissing progress dialog: " + e); } } if (mCloseAfter) { if (mIntent != null) { closeCardEditor(mIntent); } else { closeCardEditor(); } } } else { // RuntimeException occured on adding note closeCardEditor(DeckPicker.RESULT_DB_ERROR); } } }; // ---------------------------------------------------------------------------- // ANDROID METHODS // ---------------------------------------------------------------------------- @Override protected void onCreate(Bundle savedInstanceState) { // Log.i(AnkiDroidApp.TAG, "CardEditor: onCreate"); Themes.applyTheme(this); super.onCreate(savedInstanceState); this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN); Intent intent = getIntent(); if (savedInstanceState != null) { mCaller = savedInstanceState.getInt("caller"); mAddNote = savedInstanceState.getBoolean("addFact"); } else { mCaller = intent.getIntExtra(EXTRA_CALLER, CALLER_NOCALLER); if (mCaller == CALLER_NOCALLER) { String action = intent.getAction(); if (action != null && (ACTION_CREATE_FLASHCARD.equals(action) || ACTION_CREATE_FLASHCARD_SEND.equals(action))) { mCaller = CALLER_INDICLASH; } } } // Log.i(AnkiDroidApp.TAG, "CardEditor: caller: " + mCaller); SharedPreferences preferences = AnkiDroidApp.getSharedPrefs(getBaseContext()); if (mCaller == CALLER_INDICLASH && preferences.getBoolean("intentAdditionInstantAdd", false)) { // save information without showing card editor fetchIntentInformation(intent); MetaDB.saveIntentInformation(CardEditor.this, Utils.joinFields(mSourceText)); Themes.showThemedToast(CardEditor.this, getResources().getString(R.string.app_name) + ": " + getResources().getString(R.string.CardEditorLaterMessage), false); finish(); return; } mCol = AnkiDroidApp.getCol(); if (mCol == null) { reloadCollection(savedInstanceState); return; } registerExternalStorageListener(); View mainView = getLayoutInflater().inflate(R.layout.card_editor, null); setContentView(mainView); Themes.setWallpaper(mainView); Themes.setContentStyle(mainView, Themes.CALLER_CARD_EDITOR); mFieldsLayoutContainer = (LinearLayout) findViewById(R.id.CardEditorEditFieldsLayout); mSave = (Button) findViewById(R.id.CardEditorSaveButton); mCancel = (Button) findViewById(R.id.CardEditorCancelButton); mLater = (Button) findViewById(R.id.CardEditorLaterButton); mDeckButton = (TextView) findViewById(R.id.CardEditorDeckText); mModelButton = (TextView) findViewById(R.id.CardEditorModelText); mTagsButton = (TextView) findViewById(R.id.CardEditorTagText); mSwapButton = (Button) findViewById(R.id.CardEditorSwapButton); mSwapButton.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { swapText(false); } }); mAedictIntent = false; switch (mCaller) { case CALLER_NOCALLER: // Log.i(AnkiDroidApp.TAG, "CardEditor: no caller could be identified, closing"); finish(); return; case CALLER_REVIEWER: mCurrentEditedCard = Reviewer.getEditorCard(); if (mCurrentEditedCard == null) { finish(); return; } mEditorNote = mCurrentEditedCard.note(); mAddNote = false; break; case CALLER_STUDYOPTIONS: case CALLER_DECKPICKER: mAddNote = true; break; case CALLER_BIGWIDGET_EDIT: // Card widgetCard = AnkiDroidWidgetBig.getCard(); // if (widgetCard == null) { // finish(); // return; // } // mEditorNote = widgetCard.getFact(); // mAddNote = false; break; case CALLER_BIGWIDGET_ADD: mAddNote = true; break; case CALLER_CARDBROWSER_EDIT: mCurrentEditedCard = CardBrowser.sCardBrowserCard; if (mCurrentEditedCard == null) { finish(); return; } mEditorNote = mCurrentEditedCard.note(); mAddNote = false; break; case CALLER_CARDBROWSER_ADD: mAddNote = true; break; case CALLER_CARDEDITOR: mAddNote = true; break; case CALLER_CARDEDITOR_INTENT_ADD: mAddNote = true; break; case CALLER_INDICLASH: fetchIntentInformation(intent); if (mSourceText == null) { finish(); return; } if (mSourceText[0].equals("Aedict Notepad") && addFromAedict(mSourceText[1])) { finish(); return; } mAddNote = true; break; } setNote(mEditorNote); if (mAddNote) { setTitle(R.string.cardeditor_title_add_note); // set information transferred by intent String contents = null; if (mSourceText != null) { if (mAedictIntent && (mEditFields.size() == 3) && mSourceText[1].contains("[")) { contents = mSourceText[1].replaceFirst("\\[", "\u001f"); contents = contents.substring(0, contents.length() - 1); } else { mEditFields.get(0).setText(mSourceText[0]); mEditFields.get(1).setText(mSourceText[1]); } } else { contents = intent.getStringExtra(EXTRA_CONTENTS); } if (contents != null) { setEditFieldTexts(contents); } LinearLayout modelButton = ((LinearLayout) findViewById(R.id.CardEditorModelButton)); modelButton.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { showDialog(DIALOG_MODEL_SELECT); } }); modelButton.setVisibility(View.VISIBLE); mSave.setText(getResources().getString(R.string.add)); mCancel.setText(getResources().getString(R.string.close)); mLater.setVisibility(View.VISIBLE); mLater.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { String content = getFieldsText(); if (content.length() > mEditFields.size() - 1) { MetaDB.saveIntentInformation(CardEditor.this, content); populateEditFields(); mSourceText = null; Themes.showThemedToast(CardEditor.this, getResources().getString(R.string.CardEditorLaterMessage), false); } if (mCaller == CALLER_INDICLASH || mCaller == CALLER_CARDEDITOR_INTENT_ADD) { closeCardEditor(); } } }); } else { setTitle(R.string.cardeditor_title_edit_card); mSwapButton.setVisibility(View.GONE); mSwapButton = (Button) findViewById(R.id.CardEditorLaterButton); mSwapButton.setVisibility(View.VISIBLE); mSwapButton.setText(getResources().getString(R.string.fact_adder_swap)); mSwapButton.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { swapText(false); } }); } ((LinearLayout) findViewById(R.id.CardEditorDeckButton)).setOnClickListener(new View.OnClickListener() { public void onClick(View v) { showDialog(DIALOG_DECK_SELECT); } }); mPrefFixArabic = preferences.getBoolean("fixArabicText", false); // if Arabic reshaping is enabled, disable the Save button to avoid // saving the reshaped string to the deck if (mPrefFixArabic && !mAddNote) { mSave.setEnabled(false); } ((LinearLayout) findViewById(R.id.CardEditorTagButton)).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { showDialog(DIALOG_TAGS_SELECT); } }); mSave.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (duplicateCheck(true)) { return; } boolean modified = false; for (FieldEditText f : mEditFields) { modified = modified | f.updateField(); } if (mAddNote) { DeckTask.launchDeckTask(DeckTask.TASK_TYPE_ADD_FACT, mSaveFactHandler, new DeckTask.TaskData( mEditorNote)); } else { // added tag? for (String t : mCurrentTags) { modified = modified || !mEditorNote.hasTag(t); } // removed tag? modified = modified || mEditorNote.getTags().size() > mCurrentTags.size(); // changed did? boolean changedDid = mCurrentEditedCard.getDid() != mCurrentDid; modified = modified || changedDid; if (modified) { mEditorNote.setTags(mCurrentTags); // set did for card if (changedDid) { mCurrentEditedCard.setDid(mCurrentDid); } mChanged = true; } closeCardEditor(); // if (mCaller == CALLER_BIGWIDGET_EDIT) { // // DeckTask.launchDeckTask(DeckTask.TASK_TYPE_UPDATE_FACT, // // mSaveFactHandler, new // // DeckTask.TaskData(Reviewer.UPDATE_CARD_SHOW_QUESTION, // // mDeck, AnkiDroidWidgetBig.getCard())); // } else if (!mCardReset) { // // Only send result to save if something was actually // // changed // if (mModified) { // setResult(RESULT_OK); // } else { // setResult(RESULT_CANCELED); // } // closeCardEditor(); // } } } }); mCancel.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { closeCardEditor(); } }); } @Override protected void onStop() { super.onStop(); if (!isFinishing()) { WidgetStatus.update(this); UIUtils.saveCollectionInBackground(); } } private void fetchIntentInformation(Intent intent) { Bundle extras = intent.getExtras(); if (ACTION_CREATE_FLASHCARD.equals(intent.getAction())) { // mSourceLanguage = extras.getString(SOURCE_LANGUAGE); // mTargetLanguage = extras.getString(TARGET_LANGUAGE); mSourceText = new String[2]; mSourceText[0] = extras.getString(SOURCE_TEXT); mSourceText[1] = extras.getString(TARGET_TEXT); } else { String first; String second; if (extras.getString(Intent.EXTRA_SUBJECT) != null) { first = extras.getString(Intent.EXTRA_SUBJECT); } else { first = ""; } if (extras.getString(Intent.EXTRA_TEXT) != null) { second = extras.getString(Intent.EXTRA_TEXT); } else { second = ""; } Pair<String, String> messages = new Pair<String, String>(first, second); /* Filter garbage information */ Pair<String, String> cleanMessages = new FilterFacade(getBaseContext()).filter(messages); mSourceText = new String[2]; mSourceText[0] = cleanMessages.first; mSourceText[1] = cleanMessages.second; } } private void reloadCollection(Bundle savedInstanceState) { mSavedInstanceState = savedInstanceState; DeckTask.launchDeckTask( DeckTask.TASK_TYPE_OPEN_COLLECTION, new DeckTask.TaskListener() { @Override public void onPostExecute(DeckTask.TaskData result) { if (mOpenCollectionDialog.isShowing()) { try { mOpenCollectionDialog.dismiss(); } catch (Exception e) { Log.e(AnkiDroidApp.TAG, "onPostExecute - Dialog dismiss Exception = " + e.getMessage()); } } mCol = result.getCollection(); if (mCol == null) { finish(); } else { onCreate(mSavedInstanceState); } } @Override public void onPreExecute() { mOpenCollectionDialog = StyledOpenCollectionDialog.show(CardEditor.this, getResources().getString(R.string.open_collection), new OnCancelListener() { @Override public void onCancel(DialogInterface arg0) { finish(); } }); } @Override public void onProgressUpdate(DeckTask.TaskData... values) { } }, new DeckTask.TaskData(AnkiDroidApp.getCurrentAnkiDroidDirectory() + AnkiDroidApp.COLLECTION_PATH)); } private boolean addFromAedict(String extra_text) { String category = ""; String[] notepad_lines = extra_text.split("\n"); for (int i = 0; i < notepad_lines.length; i++) { if (notepad_lines[i].startsWith("[") && notepad_lines[i].endsWith("]")) { category = notepad_lines[i].substring(1, notepad_lines[i].length() - 1); if (category.equals("default")) { if (notepad_lines.length > i + 1) { String[] entry_lines = notepad_lines[i + 1].split(":"); if (entry_lines.length > 1) { mSourceText[0] = entry_lines[1]; mSourceText[1] = entry_lines[0]; mAedictIntent = true; } else { Themes.showThemedToast(CardEditor.this, getResources().getString(R.string.intent_aedict_empty), false); return true; } } else { Themes.showThemedToast(CardEditor.this, getResources().getString(R.string.intent_aedict_empty), false); return true; } return false; } } } Themes.showThemedToast(CardEditor.this, getResources().getString(R.string.intent_aedict_category), false); return true; } private void resetEditFields (String[] content) { for (int i = 0; i < Math.min(content.length, mEditFields.size()); i++) { mEditFields.get(i).setText(content[i]); } } @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) { // Log.i(AnkiDroidApp.TAG, "CardEditor - onBackPressed()"); closeCardEditor(); return true; } return super.onKeyDown(keyCode, event); } @Override protected void onDestroy() { super.onDestroy(); if (mUnmountReceiver != null) { unregisterReceiver(mUnmountReceiver); } } @Override protected void onSaveInstanceState(Bundle outState) { // TODO // // Log.i(AnkiDroidApp.TAG, "onSaveInstanceState: " + path); // outState.putString("deckFilename", path); outState.putBoolean("addFact", mAddNote); outState.putInt("caller", mCaller); // Log.i(AnkiDroidApp.TAG, "onSaveInstanceState - Ending"); } @Override public boolean onCreateOptionsMenu(Menu menu) { MenuItem item; Resources res = getResources(); // Lookup.initialize(this, mDeck.getDeckPath()); // item = menu.add(Menu.NONE, MENU_LOOKUP, Menu.NONE, // Lookup.getSearchStringTitle()); // item.setIcon(R.drawable.ic_menu_search); // item.setEnabled(Lookup.isAvailable()); // item = menu.add(Menu.NONE, MENU_RESET, Menu.NONE, // res.getString(R.string.card_editor_reset)); // item.setIcon(R.drawable.ic_menu_revert); if (!mAddNote) { item = menu.add(Menu.NONE, MENU_ADD_CARD, Menu.NONE, res.getString(R.string.card_editor_add_card)); item.setIcon(R.drawable.ic_menu_add); } item = menu.add(Menu.NONE, MENU_COPY_CARD, Menu.NONE, res.getString(R.string.card_editor_copy_card)); item.setIcon(R.drawable.ic_menu_upload); if (!mAddNote) { item = menu.add(Menu.NONE, MENU_RESET_CARD_PROGRESS, Menu.NONE, res.getString(R.string.card_editor_reset_card)); item.setIcon(R.drawable.ic_menu_delete); } if (mCaller != CALLER_CARDEDITOR_INTENT_ADD) { mIntentInformation = MetaDB.getIntentInformation(this); item = menu.add(Menu.NONE, MENU_SAVED_INTENT, Menu.NONE, res.getString(R.string.intent_add_saved_information)); item.setIcon(R.drawable.ic_menu_archive); } return true; } @Override public boolean onPrepareOptionsMenu(Menu menu) { // View focus = this.getWindow().getCurrentFocus(); // menu.findItem(MENU_LOOKUP).setEnabled( // focus instanceof FieldEditText // && ((TextView) focus).getText().length() > 0 // && Lookup.isAvailable()); if (mEditFields == null) { return false; } for (int i = 0; i < mEditFields.size(); i++) { if (mEditFields.get(i).getText().length() > 0) { menu.findItem(MENU_COPY_CARD).setEnabled(true); break; } else if (i == mEditFields.size() - 1) { menu.findItem(MENU_COPY_CARD).setEnabled(false); } } if (mCaller != CALLER_CARDEDITOR_INTENT_ADD) { mIntentInformation = MetaDB.getIntentInformation(this); menu.findItem(MENU_SAVED_INTENT).setEnabled(mIntentInformation.size() > 0); } return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case MENU_COPY_CARD: case MENU_ADD_CARD: Intent intent = new Intent(CardEditor.this, CardEditor.class); intent.putExtra(EXTRA_CALLER, CALLER_CARDEDITOR); // intent.putExtra(EXTRA_DECKPATH, mDeckPath); if (item.getItemId() == MENU_COPY_CARD) { intent.putExtra(EXTRA_CONTENTS, getFieldsText()); } startActivityForResult(intent, REQUEST_ADD); if (AnkiDroidApp.SDK_VERSION > 4) { ActivityTransitionAnimation.slide(CardEditor.this, ActivityTransitionAnimation.LEFT); } return true; case MENU_RESET: if (mAddNote) { if (mCaller == CALLER_INDICLASH || mCaller == CALLER_CARDEDITOR_INTENT_ADD) { resetEditFields(mSourceText); } else { setEditFieldTexts(getIntent().getStringExtra(EXTRA_CONTENTS)); if (!mEditFields.isEmpty()) { mEditFields.getFirst().requestFocus(); } } } else { populateEditFields(); } return true; case MENU_LOOKUP: View focus = this.getWindow().getCurrentFocus(); if (focus instanceof FieldEditText) { FieldEditText field = (FieldEditText) focus; if (!field.isSelected()) { field.selectAll(); } Lookup.lookUp( field.getText().toString().substring(field.getSelectionStart(), field.getSelectionEnd())); } return true; case MENU_RESET_CARD_PROGRESS: showDialog(DIALOG_RESET_CARD); return true; case MENU_SAVED_INTENT: showDialog(DIALOG_INTENT_INFORMATION); return true; case android.R.id.home: closeCardEditor(AnkiDroidApp.RESULT_TO_HOME); return true; } return false; } // ---------------------------------------------------------------------------- // CUSTOM METHODS // ---------------------------------------------------------------------------- /** * finish when sd card is ejected */ private void registerExternalStorageListener() { if (mUnmountReceiver == null) { mUnmountReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { if (intent.getAction().equals(SdCardReceiver.MEDIA_EJECT)) { finish(); } } }; IntentFilter iFilter = new IntentFilter(); iFilter.addAction(SdCardReceiver.MEDIA_EJECT); registerReceiver(mUnmountReceiver, iFilter); } } private void finishNoStorageAvailable() { closeCardEditor(DeckPicker.RESULT_MEDIA_EJECTED); } private void closeCardEditor() { closeCardEditor(null); } private void closeCardEditor(Intent intent) { int result; if (mChanged) { result = RESULT_OK; } else { result = RESULT_CANCELED; } closeCardEditor(result, intent); } private void closeCardEditor(int result) { closeCardEditor(result, null); } private void closeCardEditor(int result, Intent intent) { if (intent != null) { setResult(result, intent); } else { setResult(result); } finish(); if (mCaller == CALLER_CARDEDITOR_INTENT_ADD || mCaller == CALLER_BIGWIDGET_EDIT || mCaller == CALLER_BIGWIDGET_ADD) { if (AnkiDroidApp.SDK_VERSION > 4) { ActivityTransitionAnimation.slide(CardEditor.this, ActivityTransitionAnimation.FADE); } } else if (mCaller == CALLER_INDICLASH) { if (AnkiDroidApp.SDK_VERSION > 4) { ActivityTransitionAnimation.slide(CardEditor.this, ActivityTransitionAnimation.NONE); } } else { if (AnkiDroidApp.SDK_VERSION > 4) { ActivityTransitionAnimation.slide(CardEditor.this, ActivityTransitionAnimation.RIGHT); } } } @Override protected Dialog onCreateDialog(int id) { StyledDialog dialog = null; Resources res = getResources(); StyledDialog.Builder builder = new StyledDialog.Builder(this); switch (id) { case DIALOG_TAGS_SELECT: builder.setTitle(R.string.card_details_tags); builder.setPositiveButton(res.getString(R.string.select), new OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { if (mAddNote) { try { JSONArray ja = new JSONArray(); for (String t : selectedTags) { ja.put(t); } mCol.getModels().current().put("tags", ja); mCol.getModels().setChanged(); } catch (JSONException e) { throw new RuntimeException(e); } mEditorNote.setTags(selectedTags); } mCurrentTags = selectedTags; updateTags(); } }); builder.setNegativeButton(res.getString(R.string.cancel), null); mNewTagEditText = (EditText) new EditText(this); mNewTagEditText.setHint(R.string.add_new_tag); InputFilter filter = new InputFilter() { public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend) { for (int i = start; i < end; i++) { if (source.charAt(i) == ' ' || source.charAt(i) == ',') { return ""; } } return null; } }; mNewTagEditText.setFilters(new InputFilter[] { filter }); ImageView mAddTextButton = new ImageView(this); mAddTextButton.setImageResource(R.drawable.ic_addtag); mAddTextButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { String tag = mNewTagEditText.getText().toString(); if (tag.length() != 0) { if (mEditorNote.hasTag(tag)) { mNewTagEditText.setText(""); return; } selectedTags.add(tag); actualizeTagDialog(mTagsDialog); mNewTagEditText.setText(""); } } }); FrameLayout frame = new FrameLayout(this); FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT, Gravity.RIGHT | Gravity.CENTER_VERTICAL); params.rightMargin = 10; mAddTextButton.setLayoutParams(params); frame.addView(mNewTagEditText); frame.addView(mAddTextButton); builder.setView(frame, false, true); dialog = builder.create(); mTagsDialog = dialog; break; case DIALOG_DECK_SELECT: ArrayList<CharSequence> dialogDeckItems = new ArrayList<CharSequence>(); // Use this array to know which ID is associated with each // Item(name) final ArrayList<Long> dialogDeckIds = new ArrayList<Long>(); ArrayList<JSONObject> decks = mCol.getDecks().all(); Collections.sort(decks, new JSONNameComparator()); builder.setTitle(R.string.deck); for (JSONObject d : decks) { try { if (d.getInt("dyn") == 0) { dialogDeckItems.add(d.getString("name")); dialogDeckIds.add(d.getLong("id")); } } catch (JSONException e) { throw new RuntimeException(e); } } // Convert to Array String[] items = new String[dialogDeckItems.size()]; dialogDeckItems.toArray(items); builder.setItems(items, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int item) { long newId = dialogDeckIds.get(item); if (mCurrentDid != newId) { if (mAddNote) { try { // TODO: mEditorNote.setDid(newId); mEditorNote.model().put("did", newId); mCol.getModels().setChanged(); } catch (JSONException e) { throw new RuntimeException(e); } } mCurrentDid = newId; updateDeck(); } } }); dialog = builder.create(); mDeckSelectDialog = dialog; break; case DIALOG_MODEL_SELECT: ArrayList<CharSequence> dialogItems = new ArrayList<CharSequence>(); // Use this array to know which ID is associated with each // Item(name) final ArrayList<Long> dialogIds = new ArrayList<Long>(); ArrayList<JSONObject> models = mCol.getModels().all(); Collections.sort(models, new JSONNameComparator()); builder.setTitle(R.string.note_type); for (JSONObject m : models) { try { dialogItems.add(m.getString("name")); dialogIds.add(m.getLong("id")); } catch (JSONException e) { throw new RuntimeException(e); } } // Convert to Array String[] items2 = new String[dialogItems.size()]; dialogItems.toArray(items2); builder.setItems(items2, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int item) { long oldModelId; try { oldModelId = mCol.getModels().current().getLong("id"); } catch (JSONException e) { throw new RuntimeException(e); } long newId = dialogIds.get(item); if (oldModelId != newId) { mCol.getModels().setCurrent(mCol.getModels().get(newId)); JSONObject cdeck = mCol.getDecks().current(); try { cdeck.put("mid", newId); } catch (JSONException e) { throw new RuntimeException(e); } mCol.getDecks().save(cdeck); int size = mEditFields.size(); String[] oldValues = new String[size]; for (int i = 0; i < size; i++) { oldValues[i] = mEditFields.get(i).getText().toString(); } setNote(); resetEditFields(oldValues); mTimerHandler.removeCallbacks(checkDuplicatesRunnable); duplicateCheck(false); } } }); dialog = builder.create(); break; case DIALOG_RESET_CARD: builder.setTitle(res.getString(R.string.reset_card_dialog_title)); builder.setMessage(res.getString(R.string.reset_card_dialog_message)); builder.setPositiveButton(res.getString(R.string.yes), new OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { // for (long cardId : // mDeck.getCardsFromFactId(mEditorNote.getId())) { // mDeck.cardFromId(cardId).resetCard(); // } // mDeck.reset(); // setResult(Reviewer.RESULT_EDIT_CARD_RESET); // mCardReset = true; // Themes.showThemedToast(CardEditor.this, // getResources().getString( // R.string.reset_card_dialog_confirmation), true); } }); builder.setNegativeButton(res.getString(R.string.no), null); builder.setCancelable(true); dialog = builder.create(); break; case DIALOG_INTENT_INFORMATION: dialog = createDialogIntentInformation(builder, res); } return dialog; } private StyledDialog createDialogIntentInformation(Builder builder, Resources res) { builder.setTitle(res.getString(R.string.intent_add_saved_information)); ListView listView = new ListView(this); mIntentInformationAdapter = new SimpleAdapter(this, mIntentInformation, R.layout.card_item, new String[] { "source", "target", "id" }, new int[] { R.id.card_sfld, R.id.card_tmpl, R.id.card_item }); listView.setAdapter(mIntentInformationAdapter); listView.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { Intent intent = new Intent(CardEditor.this, CardEditor.class); intent.putExtra(EXTRA_CALLER, CALLER_CARDEDITOR_INTENT_ADD); HashMap<String, String> map = mIntentInformation.get(position); intent.putExtra(EXTRA_CONTENTS, map.get("fields")); intent.putExtra(EXTRA_ID, map.get("id")); startActivityForResult(intent, REQUEST_INTENT_ADD); if (AnkiDroidApp.SDK_VERSION > 4) { ActivityTransitionAnimation.slide(CardEditor.this, ActivityTransitionAnimation.FADE); } mIntentInformationDialog.dismiss(); } }); mCardItemBackground = Themes.getCardBrowserBackground()[0]; mIntentInformationAdapter.setViewBinder(new SimpleAdapter.ViewBinder() { @Override public boolean setViewValue(View view, Object arg1, String text) { if (view.getId() == R.id.card_item) { view.setBackgroundResource(mCardItemBackground); return true; } return false; } }); listView.setBackgroundColor(android.R.attr.colorBackground); listView.setDrawSelectorOnTop(true); listView.setFastScrollEnabled(true); Themes.setContentStyle(listView, Themes.CALLER_CARDEDITOR_INTENTDIALOG); builder.setView(listView, false, true); builder.setCancelable(true); builder.setPositiveButton(res.getString(R.string.intent_add_clear_all), new OnClickListener() { @Override public void onClick(DialogInterface dialog, int arg1) { MetaDB.resetIntentInformation(CardEditor.this); mIntentInformation.clear(); dialog.dismiss(); } }); StyledDialog dialog = builder.create(); mIntentInformationDialog = dialog; return dialog; } @Override protected void onPrepareDialog(int id, Dialog dialog) { StyledDialog ad = (StyledDialog) dialog; switch (id) { case DIALOG_TAGS_SELECT: if (mEditorNote == null) { dialog = null; return; } selectedTags = new ArrayList<String>(); for (String s : mEditorNote.getTags()) { selectedTags.add(s); } actualizeTagDialog(ad); break; case DIALOG_INTENT_INFORMATION: // dirty fix for dialog listview not being actualized mIntentInformationDialog = createDialogIntentInformation(new StyledDialog.Builder(this), getResources()); ad = mIntentInformationDialog; break; } } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (resultCode == DeckPicker.RESULT_DB_ERROR) { closeCardEditor(DeckPicker.RESULT_DB_ERROR); } if (resultCode == AnkiDroidApp.RESULT_TO_HOME) { closeCardEditor(AnkiDroidApp.RESULT_TO_HOME); } switch (requestCode) { case REQUEST_INTENT_ADD: if (resultCode != RESULT_CANCELED) { mChanged = true; String id = data.getStringExtra(EXTRA_ID); if (id != null) { for (int i = 0; i < mIntentInformation.size(); i++) { if (mIntentInformation.get(i).get("id").endsWith(id)) { if (MetaDB.removeIntentInformation(CardEditor.this, id)) { mIntentInformation.remove(i); mIntentInformationAdapter.notifyDataSetChanged(); } break; } } } } if (mIntentInformation.size() > 0) { showDialog(DIALOG_INTENT_INFORMATION); } break; case REQUEST_ADD: if (resultCode != RESULT_CANCELED) { mChanged = true; } break; } } private void actualizeTagDialog(StyledDialog ad) { TreeSet<String> tags = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER); for (String tag : mCol.getTags().all()) { tags.add(tag); } tags.addAll(selectedTags); int len = tags.size(); allTags = new String[len]; boolean[] checked = new boolean[len]; int i = 0; for (String t : tags) { allTags[i++] = t; if (selectedTags.contains(t)) { checked[i - 1] = true; } } ad.setMultiChoiceItems(allTags, checked, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface arg0, int which) { String tag = allTags[which]; if (selectedTags.contains(tag)) { // Log.i(AnkiDroidApp.TAG, "unchecked tag: " + tag); selectedTags.remove(tag); } else { // Log.i(AnkiDroidApp.TAG, "checked tag: " + tag); selectedTags.add(tag); } } }); } private void swapText(boolean reset) { int len = mEditFields.size(); if (len < 2) { return; } mSourcePosition = Math.min(mSourcePosition, len - 1); mTargetPosition = Math.min(mTargetPosition, len - 1); // get source text FieldEditText field = mEditFields.get(mSourcePosition); Editable sourceText = field.getText(); // get target text field = mEditFields.get(mTargetPosition); Editable targetText = field.getText(); if (len > mSourcePosition) { mEditFields.get(mSourcePosition).setText(""); } if (len > mTargetPosition) { mEditFields.get(mTargetPosition).setText(""); } if (reset) { mSourcePosition = 0; mTargetPosition = 1; } else { mTargetPosition++; while (mTargetPosition == mSourcePosition || mTargetPosition >= mEditFields.size()) { mTargetPosition++; if (mTargetPosition >= mEditFields.size()) { mTargetPosition = 0; mSourcePosition++; } if (mSourcePosition >= mEditFields.size()) { mSourcePosition = 0; } } } if (sourceText != null) { mEditFields.get(mSourcePosition).setText(sourceText); } if (targetText != null) { mEditFields.get(mTargetPosition).setText(targetText); } } private void populateEditFields() { mFieldsLayoutContainer.removeAllViews(); mEditFields = new LinkedList<FieldEditText>(); String[][] fields = mEditorNote.items(); // Use custom font if selected from preferences Typeface mCustomTypeface = null; SharedPreferences preferences = AnkiDroidApp.getSharedPrefs(getBaseContext()); String customFont = preferences.getString("browserEditorFont", ""); if (!customFont.equals("")) { mCustomTypeface = AnkiFont.getTypeface(this, customFont); } for (int i = 0; i < fields.length; i++) { FieldEditText newTextbox = new FieldEditText(this, i, fields[i]); if (mCustomTypeface != null) { newTextbox.setTypeface(mCustomTypeface); } TextView label = newTextbox.getLabel(); label.setTextColor(Color.BLACK); label.setPadding((int) UIUtils.getDensityAdjustedValue(this, 3.4f), 0, 0, 0); mEditFields.add(newTextbox); FrameLayout frame = new FrameLayout(this); FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT, Gravity.RIGHT | Gravity.CENTER_VERTICAL); params.rightMargin = 10; frame.addView(newTextbox); mFieldsLayoutContainer.addView(label); mFieldsLayoutContainer.addView(frame); } } private void setEditFieldTexts(String contents) { String[] fields = null; int len; if (contents == null) { len = 0; } else { fields = Utils.splitFields(contents); len = fields.length; } for (int i = 0; i < mEditFields.size(); i++) { if (i < len) { mEditFields.get(i).setText(fields[i]); } else { mEditFields.get(i).setText(""); } } } private boolean duplicateCheck(boolean checkEmptyToo) { FieldEditText field = mEditFields.get(0); if (mEditorNote.dupeOrEmpty(field.getText().toString()) > (checkEmptyToo ? 0 : 1)) { // TODO: theme backgrounds field.setBackgroundResource(R.drawable.white_edit_text_dupe); mSave.setEnabled(false); return true; } else { field.setBackgroundResource(R.drawable.white_edit_text); mSave.setEnabled(true); return false; } } private Handler mTimerHandler = new Handler(); private Runnable checkDuplicatesRunnable = new Runnable() { public void run() { duplicateCheck(false); } }; private String getFieldsText() { String[] fields = new String[mEditFields.size()]; for (int i = 0; i < mEditFields.size(); i++) { fields[i] = mEditFields.get(i).getText().toString(); } return Utils.joinFields(fields); } /** Make NOTE the current note. */ private void setNote() { setNote(null); } private void setNote(Note note) { try { if (note == null) { mCurrentDid = mCol.getDecks().current().getLong("id"); if (mCol.getDecks().isDyn(mCurrentDid)) { mCurrentDid = 1; } JSONObject model = mCol.getModels().current(); mEditorNote = new Note(mCol, model); mEditorNote.model().put("did", mCurrentDid); mModelButton.setText(getResources().getString(R.string.CardEditorModel, model.getString("name"))); JSONArray tags = model.getJSONArray("tags"); for (int i = 0; i < tags.length(); i++) { mEditorNote.addTag(tags.getString(i)); } } else { mEditorNote = note; mCurrentDid = mCurrentEditedCard.getDid(); } } catch (JSONException e) { throw new RuntimeException(e); } mCurrentTags = mEditorNote.getTags(); updateDeck(); updateTags(); populateEditFields(); swapText(true); } private void updateDeck() { try { mDeckButton.setText(getResources().getString( mAddNote ? R.string.CardEditorNoteDeck : R.string.CardEditorCardDeck, mCol.getDecks().get(mCurrentDid).getString("name"))); } catch (NotFoundException e) { throw new RuntimeException(e); } catch (JSONException e) { throw new RuntimeException(e); } } private void updateTags() { mTagsButton.setText(getResources().getString(R.string.CardEditorTags, mCol.getTags().join(mCol.getTags().canonify(mCurrentTags)).trim().replace(" ", ", "))); } // ---------------------------------------------------------------------------- // INNER CLASSES // ---------------------------------------------------------------------------- public class FieldEditText extends EditText { public final String NEW_LINE = System.getProperty("line.separator"); public final String NL_MARK = "newLineMark"; private String mName; private int mOrd; public FieldEditText(Context context, int ord, String[] value) { super(context); mOrd = ord; mName = value[0]; String content = value[1]; if (content == null) { content = ""; } else { content = content.replaceAll("<br(\\s*\\/*)>", NEW_LINE); } if (mPrefFixArabic) { this.setText(ArabicUtilities.reshapeSentence(content)); } else { this.setText(content); } this.setMinimumWidth(400); if (ord == 0) { this.addTextChangedListener(new TextWatcher() { @Override public void afterTextChanged(Editable arg0) { mTimerHandler.removeCallbacks(checkDuplicatesRunnable); mTimerHandler.postDelayed(checkDuplicatesRunnable, WAIT_TIME_UNTIL_UPDATE); } @Override public void beforeTextChanged(CharSequence arg0, int arg1, int arg2, int arg3) { } @Override public void onTextChanged(CharSequence arg0, int arg1, int arg2, int arg3) { } }); } } public TextView getLabel() { TextView label = new TextView(this.getContext()); label.setText(mName); return label; } public boolean updateField() { String newValue = this.getText().toString().replace(NEW_LINE, "<br>"); if (!mEditorNote.values()[mOrd].equals(newValue)) { mEditorNote.values()[mOrd] = newValue; return true; } return false; } public String cleanText(String text) { text = text.replaceAll("\\s*(" + NL_MARK + "\\s*)+", NEW_LINE); text = text.replaceAll("^[,;:\\s\\)\\]" + NEW_LINE + "]*", ""); text = text.replaceAll("[,;:\\s\\(\\[" + NEW_LINE + "]*$", ""); return text; } } public class JSONNameComparator implements Comparator<JSONObject> { @Override public int compare(JSONObject lhs, JSONObject rhs) { String[] o1; String[] o2; try { o1 = lhs.getString("name").split("::"); o2 = rhs.getString("name").split("::"); } catch (JSONException e) { throw new RuntimeException(e); } for (int i = 0; i < Math.min(o1.length, o2.length); i++) { int result = o1[i].compareToIgnoreCase(o2[i]); if (result != 0) { return result; } } if (o1.length < o2.length) { return -1; } else if (o1.length > o2.length) { return 1; } else { return 0; } } } }
stockcode/vicky-learn
src/main/java/com/ichi2/anki/CardEditor.java
Java
gpl-3.0
61,360
/** * BNField2.java * * Arithmetic in the finite extension field GF(p^2) with p = 3 (mod 4) and p = 4 (mod 9). * * Copyright (C) Paulo S. L. M. Barreto and Pedro d'Aquino F. F. de Sa' Barbuda. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package org.bouncycastle.math.ec.bncurves; import java.math.BigInteger; public class BNField2 { /** * Convenient BigInteger constants */ private static final BigInteger _0 = BigInteger.valueOf(0L), _1 = BigInteger.valueOf(1L), _3 = BigInteger.valueOf(3L); public static final String differentFields = "Operands are in different finite fields"; /** * BN parameters (singleton) */ BNParams bn; /** * "Real" part */ BigInteger re; /** * "Imaginary" part */ BigInteger im; BNField2(BNParams bn) { this.bn = bn; this.re = _0; this.im = _0; } BNField2(BNParams bn, BigInteger re) { this.bn = bn; this.re = re; // caveat: no modular reduction! this.im = _0; } BNField2(BNParams bn, BigInteger re, BigInteger im, boolean reduce) { this.bn = bn; if (reduce) { this.re = re.mod(bn.p); this.im = im.mod(bn.p); } else { this.re = re; this.im = im; } } public boolean isZero() { return re.signum() == 0 && im.signum() == 0; } public boolean isOne() { return re.compareTo(_1) == 0 && im.signum() == 0; } public boolean equals(Object u) { if (!(u instanceof BNField2)) { return false; } BNField2 v = (BNField2)u; return bn == v.bn && // singleton comparison re.compareTo(v.re) == 0 && im.compareTo(v.im) == 0; } /** * -(x + yi) */ public BNField2 negate() { return new BNField2(bn, (re.signum() != 0) ? bn.p.subtract(re) : re, (im.signum() != 0) ? bn.p.subtract(im) : im, false); } /** * (x + yi)^p = x - yi */ public BNField2 conjugate() { return new BNField2(bn, re, bn.p.subtract(im), false); } /* public BigInteger norm() { return re.multiply(re).add(im.multiply(im)).mod(bn.p); } //*/ public BNField2 add(BNField2 v) { if (bn != v.bn) { // singleton comparison throw new IllegalArgumentException(differentFields); } BigInteger r = re.add(v.re); if (r.compareTo(bn.p) >= 0) { r = r.subtract(bn.p); } BigInteger i = im.add(v.im); if (i.compareTo(bn.p) >= 0) { i = i.subtract(bn.p); } return new BNField2(bn, r, i, false); } public BNField2 add(BigInteger v) { BigInteger s = re.add(v); if (s.compareTo(bn.p) >= 0) { s = s.subtract(bn.p); } return new BNField2(bn, s, im, false); } public BNField2 subtract(BNField2 v) { if (bn != v.bn) { // singleton comparison throw new IllegalArgumentException(differentFields); } BigInteger r = re.subtract(v.re); if (r.signum() < 0) { r = r.add(bn.p); } BigInteger i = im.subtract(v.im); if (i.signum() < 0) { i = i.add(bn.p); } return new BNField2(bn, r, i, false); } public BNField2 subtract(BigInteger v) { BigInteger r = re.subtract(v); if (r.signum() < 0) { r = r.add(bn.p); } return new BNField2(bn, r, im, false); } public BNField2 twice(int k) { BigInteger r = re; BigInteger i = im; while (k-- > 0) { r = r.shiftLeft(1); if (r.compareTo(bn.p) >= 0) { r = r.subtract(bn.p); } i = i.shiftLeft(1); if (i.compareTo(bn.p) >= 0) { i = i.subtract(bn.p); } } return new BNField2(bn, r, i, false); } public BNField2 halve() { return new BNField2(bn, (re.testBit(0) ? re.add(bn.p) : re).shiftRight(1), (im.testBit(0) ? im.add(bn.p) : im).shiftRight(1), false); } /** * (x + yi)(u + vi) = (xu - yv) + ((x + y)(u + v) - xu - yv)i */ public BNField2 multiply(BNField2 v) { if (bn != v.bn) { // singleton comparison throw new IllegalArgumentException(differentFields); } BigInteger re2 = re.multiply(v.re); // mod p BigInteger im2 = im.multiply(v.im); // mod p BigInteger mix = re.add(im).multiply(v.re.add(v.im)); // mod p; return new BNField2(bn, re2.subtract(im2), mix.subtract(re2).subtract(im2), true); } /** * (x + yi)v = xv + yvi */ public BNField2 multiply(BigInteger v) { return new BNField2(bn, re.multiply(v), im.multiply(v), true); } /** * (x + yi)^2 = (x + y)(x - y) + 2xyi */ public BNField2 square() { return new BNField2(bn, re.add(im).multiply(re.subtract(im)), re.multiply(im).shiftLeft(1), true); } /** * (x + yi)^3 = x(x^2 - 3y^2) + y(3x^2 - y^2)i */ public BNField2 cube() { BigInteger re2 = re.multiply(re); // mod p BigInteger im2 = im.multiply(im); // mod p return new BNField2(bn, re.multiply(re2.subtract(im2.multiply(_3))), im.multiply(re2.multiply(_3).subtract(im2)), true); } /** * (x + yi)^{-1} = (x - yi)/(x^2 + y^2) */ public BNField2 inverse() throws ArithmeticException { BigInteger d = re.multiply(re).add(im.multiply(im)).modInverse(bn.p); return new BNField2(bn, re.multiply(d), bn.p.subtract(im).multiply(d), true); } /** * (x + yi)i = (-y + ix) */ public BNField2 multiplyI() { return new BNField2(bn, bn.p.subtract(im), re, false); } /** * (x + yi)(1 + i) = (x - y) + (x + y)i */ public BNField2 multiplyV() { BigInteger r = re.subtract(im); if (r.signum() < 0) { r = r.add(bn.p); } BigInteger i = re.add(im); if (i.compareTo(bn.p) >= 0) { i = i.subtract(bn.p); } return new BNField2(bn, r, i, false); } public BNField2 divideV() { BigInteger qre = re.add(im); if (qre.compareTo(bn.p) >= 0) { qre = qre.subtract(bn.p); } BigInteger qim = im.subtract(re); if (qim.signum() < 0) { qim = qim.add(bn.p); } return new BNField2(bn, (qre.testBit(0) ? qre.add(bn.p) : qre).shiftRight(1), (qim.testBit(0) ? qim.add(bn.p) : qim).shiftRight(1), false); } /* public BNField2 exp(BigInteger k) { BNField2 u = this; for (int i = k.bitLength()-2; i >= 0; i--) { u = u.square(); if (k.testBit(i)) { u = u.multiply(this); } } return u; } //*/ public BNField2 exp(BigInteger k) { BNField2 P = this; if (k.signum() < 0) { k = k.negate(); P = P.inverse(); } byte[] e = k.toByteArray(); BNField2[] mP = new BNField2[16]; mP[0] = new BNField2(bn, _1); mP[1] = P; for (int m = 1; m <= 7; m++) { mP[2*m ] = mP[ m].square(); mP[2*m + 1] = mP[2*m].multiply(P); } BNField2 A = mP[0]; for (int i = 0; i < e.length; i++) { int u = e[i] & 0xff; A = A.square().square().square().square().multiply(mP[u >>> 4]).square().square().square().square().multiply(mP[u & 0xf]); } return A; } /** * Compute a square root of this. * * @return a square root of this if one exists, or null otherwise. */ public BNField2 sqrt() { if (this.isZero()) { return this; } BNField2 r = this.exp(bn.sqrtExponent2); // r = v^{(p^2 + 7)/16} BNField2 r2 = r.square(); if (r2.subtract(this).isZero()) { return r; } if (r2.add(this).isZero()) { return r.multiplyI(); } r2 = r2.multiplyI(); //BNField2 sqrtI = new BNField2(bn, bn.invSqrtMinus2, bn.p.subtract(bn.invSqrtMinus2), false); // sqrt(i) = (1 - i)/sqrt(-2) r = r.multiply(bn.sqrtI); if (r2.subtract(this).isZero()) { return r; } if (r2.add(this).isZero()) { return r.multiplyI(); } return null; } /** * Compute a cube root of this. * * @return a cube root of this if one exists, or null otherwise. */ public BNField2 cbrt() { if (this.isZero()) { return this; } BNField2 r = this.exp(bn.cbrtExponent2); // r = v^{(p^2 + 2)/9} return r.cube().subtract(this).isZero() ? r : null; } public String toString() { return "(" + re + ", " + im + ")"; } }
credentials/bouncycastle-ext
src/org/bouncycastle/math/ec/bncurves/BNField2.java
Java
gpl-3.0
10,192
package gmm.service.data.xstream; import org.springframework.stereotype.Service; import com.thoughtworks.xstream.converters.Converter; import com.thoughtworks.xstream.converters.MarshallingContext; import com.thoughtworks.xstream.converters.UnmarshallingContext; import com.thoughtworks.xstream.io.HierarchicalStreamReader; import com.thoughtworks.xstream.io.HierarchicalStreamWriter; import gmm.collections.Collection; import gmm.domain.UniqueObject; @Service abstract class IdReferenceConverter implements Converter { @Override public void marshal(Object source, HierarchicalStreamWriter writer, MarshallingContext context) { final UniqueObject obj = (UniqueObject) source; addAttributes(writer, obj); } /** * Overwrite to add custom attributes. Always call super! */ protected void addAttributes(HierarchicalStreamWriter writer, UniqueObject source) { writer.addAttribute("id", source.getIdLink()); } @Override public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) { final String id = reader.getAttribute("id"); return UniqueObject.getFromIdLink(getUniqueObjects(), id); } abstract Collection<? extends UniqueObject> getUniqueObjects(); }
Katharsas/GMM
src/main/java/gmm/service/data/xstream/IdReferenceConverter.java
Java
gpl-3.0
1,221
'use strict'; module.exports = function() { // Occupy the global variable of Chart, and create a simple base class var Chart = function(item, config) { this.construct(item, config); return this; }; // Globally expose the defaults to allow for user updating/changing Chart.defaults = { global: { responsive: true, responsiveAnimationDuration: 0, maintainAspectRatio: true, events: ['mousemove', 'mouseout', 'click', 'touchstart', 'touchmove'], hover: { onHover: null, mode: 'nearest', intersect: true, animationDuration: 400 }, onClick: null, defaultColor: 'rgba(0,0,0,0.1)', defaultFontColor: '#666', defaultFontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif", defaultFontSize: 12, defaultFontStyle: 'normal', showLines: true, // Element defaults defined in element extensions elements: {}, // Layout options such as padding layout: { padding: { top: 0, right: 0, bottom: 0, left: 0 } }, // Legend callback string legendCallback: function(chart) { var text = []; text.push('<ul class="' + chart.id + '-legend">'); for (var i = 0; i < chart.data.datasets.length; i++) { text.push('<li><span style="background-color:' + chart.data.datasets[i].backgroundColor + '"></span>'); if (chart.data.datasets[i].label) { text.push(chart.data.datasets[i].label); } text.push('</li>'); } text.push('</ul>'); return text.join(''); } } }; Chart.Chart = Chart; return Chart; };
danilor/DigitalKataclysm
web/assets/chartsjs/unkown/core/core.js
JavaScript
gpl-3.0
1,556
# FindMATIO # # Try to find MATIO library # # Once done this will define: # # MATIO_FOUND - True if MATIO found. # MATIO_LIBRARIES - MATIO libraries. # MATIO_INCLUDE_DIRS - where to find matio.h, etc.. # MATIO_VERSION_STRING - version number as a string (e.g.: "1.3.4") # #============================================================================= # Copyright 2015 Avtech Scientific <http://avtechscientific.com> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # * Neither the names of Kitware, Inc., the Insight Software Consortium, # nor the names of their contributors may be used to endorse or promote # products derived from this software without specific prior written # permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #============================================================================= # # Look for the header file. find_path(MATIO_INCLUDE_DIR NAMES matio.h DOC "The MATIO include directory") # Look for the library. find_library(MATIO_LIBRARY NAMES matio DOC "The MATIO library") if(MATIO_INCLUDE_DIR) # --------------------------------------------------- # Extract version information from MATIO # --------------------------------------------------- # If the file is missing, set all values to 0 set(MATIO_MAJOR_VERSION 0) set(MATIO_MINOR_VERSION 0) set(MATIO_RELEASE_LEVEL 0) # new versions of MATIO have `matio_pubconf.h` if(EXISTS ${MATIO_INCLUDE_DIR}/matio_pubconf.h) set(MATIO_CONFIG_FILE "matio_pubconf.h") else() set(MATIO_CONFIG_FILE "matioConfig.h") endif() if(MATIO_CONFIG_FILE) # Read and parse MATIO config header file for version number file(STRINGS "${MATIO_INCLUDE_DIR}/${MATIO_CONFIG_FILE}" _matio_HEADER_CONTENTS REGEX "#define MATIO_((MAJOR|MINOR)_VERSION)|(RELEASE_LEVEL) ") foreach(line ${_matio_HEADER_CONTENTS}) if(line MATCHES "#define ([A-Z_]+) ([0-9]+)") set("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}") endif() endforeach() unset(_matio_HEADER_CONTENTS) endif() set(MATIO_VERSION_STRING "${MATIO_MAJOR_VERSION}.${MATIO_MINOR_VERSION}.${MATIO_RELEASE_LEVEL}") endif () #================== mark_as_advanced(MATIO_INCLUDE_DIR MATIO_LIBRARY) # handle the QUIETLY and REQUIRED arguments and set MATIO_FOUND to TRUE if # all listed variables are TRUE include(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(MATIO REQUIRED_VARS MATIO_LIBRARY MATIO_INCLUDE_DIR VERSION_VAR MATIO_VERSION_STRING) if(MATIO_FOUND) set(MATIO_LIBRARIES ${MATIO_LIBRARY}) set(MATIO_INCLUDE_DIRS ${MATIO_INCLUDE_DIR}) else(MATIO_FOUND) set(MATIO_LIBRARIES) set(MATIO_INCLUDE_DIRS) endif(MATIO_FOUND)
luis-esteve/gnss-sdr
cmake/Modules/FindMATIO.cmake
CMake
gpl-3.0
3,807
package lumaceon.mods.clockworkphase2.handler; import lumaceon.mods.clockworkphase2.api.item.IToolUpgrade; import lumaceon.mods.clockworkphase2.capabilities.coordinate.ICoordinateHandler; import lumaceon.mods.clockworkphase2.config.ConfigValues; import lumaceon.mods.clockworkphase2.init.ModBiomes; import lumaceon.mods.clockworkphase2.util.LogHelper; import lumaceon.mods.clockworkphase2.init.ModItems; import lumaceon.mods.clockworkphase2.network.PacketHandler; import lumaceon.mods.clockworkphase2.network.message.MessageParticleSpawn; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraft.world.biome.Biome; import net.minecraft.world.biome.BiomeProvider; import net.minecraft.world.gen.feature.WorldGeneratorBonusChest; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.capabilities.CapabilityInject; import net.minecraftforge.event.world.BlockEvent; import net.minecraftforge.event.world.WorldEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.network.NetworkRegistry; import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.IItemHandler; import java.util.List; import java.util.Random; public class WorldHandler { @CapabilityInject(ICoordinateHandler.class) public static final Capability<ICoordinateHandler> COORDINATE = null; @SubscribeEvent public void onBlockHarvested(BlockEvent.HarvestDropsEvent event) { World world = event.getWorld(); List<ItemStack> drops = event.getDrops(); IBlockState state = event.getState(); EntityPlayer player = event.getHarvester(); BlockPos pos = event.getPos(); if(event.getWorld().isRemote || player == null) return; if(player.inventory == null || drops == null || drops.isEmpty()) return; ItemStack heldItem = player.getHeldItem(EnumHand.MAIN_HAND); IToolUpgrade smelt = null; if(!heldItem.isEmpty()) { IItemHandler inventory = heldItem.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, EnumFacing.DOWN); if(inventory != null) { ItemStack item; for(int i = 3; i < inventory.getSlots(); i++) { item = inventory.getStackInSlot(i); if(!item.isEmpty() && item.getItem().equals(ModItems.toolUpgradeFurnace) && ((IToolUpgrade) item.getItem()).getActive(item, heldItem)) smelt = (IToolUpgrade) item.getItem(); } } if(!event.isSilkTouching()) { if(smelt != null && !drops.isEmpty()) for(int n = 0; n < drops.size(); n++) { ItemStack smeltedOutput = FurnaceRecipes.instance().getSmeltingResult(drops.get(n)); //Fortune code from BlockOre\\ int j = world.rand.nextInt(event.getFortuneLevel() + 2) - 1; if (j < 0) { j = 0; } int size = j + 1; //Modified to ignore quantity dropped, already handled by iterating through drops. //Fortune code from BlockOre\\ if(!smeltedOutput.isEmpty()) { smeltedOutput = smeltedOutput.copy(); //Only drop 1 if the smelted item is a block or the same as the block broken if(Block.getBlockFromItem(smeltedOutput.getItem()) != null || Item.getItemFromBlock(state.getBlock()).equals(smeltedOutput.getItem())) { size = 1; } smeltedOutput.setCount(size); drops.remove(n); drops.add(n, smeltedOutput); } } } } //"RELOCATE ITEMS TO INVENTORY" UPGRADE if(!heldItem.isEmpty()) { IItemHandler inventory = heldItem.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, EnumFacing.DOWN); if(inventory == null) return; ItemStack item; for(int i = 3; i < inventory.getSlots(); i++) { item = inventory.getStackInSlot(i); if(!item.isEmpty() && item.getItem().equals(ModItems.toolUpgradeRelocate) && ((IToolUpgrade) item.getItem()).getActive(item, heldItem)) { ICoordinateHandler coordinateHandler = item.getCapability(COORDINATE, EnumFacing.DOWN); BlockPos targetPosition = coordinateHandler.getCoordinate(); EnumFacing side = coordinateHandler.getSide(); if(side == null) { side = EnumFacing.DOWN; } TileEntity te = world.getTileEntity(targetPosition); if(te != null && te instanceof IInventory) { if(te instanceof ISidedInventory) //Inventory is side-specific. { ISidedInventory sidedInventory = (ISidedInventory) te; for(int n = 0; n < drops.size(); n++) //Each drop. { ItemStack drop = drops.get(n); int[] validSlots = sidedInventory.getSlotsForFace(side); for(int currentSlot : validSlots) { if(sidedInventory.isItemValidForSlot(currentSlot, drop) && sidedInventory.canInsertItem(currentSlot, drop, side)) { ItemStack inventorySlotItem = sidedInventory.getStackInSlot(currentSlot); if(!inventorySlotItem.isEmpty()) { if(drop.getItem().equals(inventorySlotItem.getItem()) && drop.getItemDamage() == inventorySlotItem.getItemDamage() && inventorySlotItem.getMaxStackSize() >= inventorySlotItem.getCount() + drop.getCount()) { inventorySlotItem.grow(drop.getCount()); sidedInventory.setInventorySlotContents(currentSlot, inventorySlotItem); drops.remove(n); --n; PacketHandler.INSTANCE.sendToAllAround(new MessageParticleSpawn(0, pos.getX(), pos.getY(), pos.getZ()), new NetworkRegistry.TargetPoint(world.provider.getDimension(), pos.getX(), pos.getY(), pos.getZ(), 256)); break; } } else { sidedInventory.setInventorySlotContents(currentSlot, drop.copy()); drops.remove(n); --n; PacketHandler.INSTANCE.sendToAllAround(new MessageParticleSpawn(0, pos.getX(), pos.getY(), pos.getZ()), new NetworkRegistry.TargetPoint(world.provider.getDimension(), pos.getX(), pos.getY(), pos.getZ(), 256)); break; } } } } } else //Inventory is not side specific, loop through all slots instead. { IInventory tileInventory = (IInventory) te; for(int n = 0; n < drops.size(); n++) //Each drop. { ItemStack drop = drops.get(n); boolean escapeFlag = false; for(int n2 = 0; n2 < tileInventory.getSizeInventory() && !escapeFlag; n2++) { if(tileInventory.isItemValidForSlot(n2, drop)) { ItemStack inventorySlotItem = tileInventory.getStackInSlot(n2); if(!inventorySlotItem.isEmpty()) { if(drop.getItem().equals(inventorySlotItem.getItem()) && drop.getItemDamage() == inventorySlotItem.getItemDamage() && inventorySlotItem.getMaxStackSize() >= inventorySlotItem.getCount() + drop.getCount()) { inventorySlotItem.grow(drop.getCount()); tileInventory.setInventorySlotContents(n2, inventorySlotItem); drops.remove(n); --n; escapeFlag = true; PacketHandler.INSTANCE.sendToAllAround(new MessageParticleSpawn(0, pos.getX(), pos.getY(), pos.getZ()), new NetworkRegistry.TargetPoint(world.provider.getDimension(), pos.getX(), pos.getY(), pos.getZ(), 256)); } } else { tileInventory.setInventorySlotContents(n2, drop.copy()); drops.remove(n); --n; escapeFlag = true; PacketHandler.INSTANCE.sendToAllAround(new MessageParticleSpawn(0, pos.getX(), pos.getY(), pos.getZ()), new NetworkRegistry.TargetPoint(world.provider.getDimension(), pos.getX(), pos.getY(), pos.getZ(), 256)); } } } } } } } } } } /** * Mostly copied from WorldServer. Used to find a spawn point away from the center of the world, which is now * dangerous because of the crater of death. */ @SubscribeEvent public void onWorldFindSpawn(WorldEvent.CreateSpawnPosition event) { if(ConfigValues.SPAWN_WORLD_CRATER) { World world = event.getWorld(); if(world != null && !world.isRemote && world.provider.getDimension() == 0) { event.setCanceled(true); BiomeProvider biomeprovider = world.provider.getBiomeProvider(); List<Biome> list = biomeprovider.getBiomesToSpawnIn(); Random random = new Random(world.getSeed()); BlockPos blockpos = biomeprovider.findBiomePosition(1000, 1000, 256, list, random); int i = 8; int j = world.provider.getAverageGroundLevel(); int k = 8; if (blockpos != null) { i = blockpos.getX(); k = blockpos.getZ(); } else { LogHelper.info("Unable to find spawn biome"); } int l = 0; while(!world.provider.canCoordinateBeSpawn(i, k) || Math.sqrt(i*i + k*k) < 400) { if(Math.sqrt(i*i + k*k) < 400) { i = random.nextInt(2000) - 1000; k = random.nextInt(2000) - 1000; } i += random.nextInt(64) - random.nextInt(64); k += random.nextInt(64) - random.nextInt(64); ++l; if (l == 1000) { break; } } world.getWorldInfo().setSpawn(new BlockPos(i, j, k)); if(event.getSettings().isBonusChestEnabled()) { createBonusChest(world); } } } } /** * Creates the bonus chest in the specified world. */ protected void createBonusChest(World world) { WorldGeneratorBonusChest worldgeneratorbonuschest = new WorldGeneratorBonusChest(); for (int i = 0; i < 10; ++i) { int j = world.getWorldInfo().getSpawnX() + world.rand.nextInt(6) - world.rand.nextInt(6); int k = world.getWorldInfo().getSpawnZ() + world.rand.nextInt(6) - world.rand.nextInt(6); BlockPos blockpos = world.getTopSolidOrLiquidBlock(new BlockPos(j, 0, k)).up(); if(worldgeneratorbonuschest.generate(world, world.rand, blockpos)) { break; } } } }
Lumaceon/ClockworkPhase2
src/main/java/lumaceon/mods/clockworkphase2/handler/WorldHandler.java
Java
gpl-3.0
14,057
{% load i18n %} {% load staticfiles %} {% load format %} <!DOCTYPE html> <html lang="{{ LANGUAGE_CODE|default:"en" }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}> <head> {% include 'user/layout.head.html' %} </head> <body> {% block after_body %} {% endblock %} <div class="navbar navbar-inverse" role="navigation"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse"> <span class="sr-only">{% blocktrans %}Toggle navigation{% endblocktrans %}</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="{% url 'home' %}">{{ application_config.title }}</a> </div> <div class="navbar-collapse collapse"> <ul class="nav navbar-nav navbar-left"> <li><a href="{% url 'home' %}">{% trans "Dashboard" %}</a></li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"> {% trans "Blog" %} <span class="caret"></span> </a> <ul class="dropdown-menu" role="menu"> <li><a href="{% url 'blog_index' %}">{% trans "Dashboard" %}</a></li> <li class="divider"></li> <li><a href="{% url 'blog_pages' %}">{% trans "Pages" %}</a></li> <li><a href="{% url 'blog_posts' %}">{% trans "Posts" %}</a></li> <li class="divider"></li> <li><a href="{% url 'blog_beep_list' %}">{% trans "Beeps" %}</a></li> <li><a href="{% url 'blog_beep_new' %}">{% blocktrans %}New beep{% endblocktrans %}</a></li> <li class="divider"></li> <li><a href="{% url 'blog_contact' %}">{% trans "Contact" %}</a></li> </ul> </li> </ul> <form class="navbar-form navbar-right" action="{% url 'blog_search' %}" method="get"> <input id="term" name="term" type="text" class="form-control" placeholder="{% trans "Search..." %}" value="{{ q|default:"" }}"> </form> </div> </div> </div> <div class="container"> {% block container %} <div class="row"> <div class="col-md-12"> {% include 'user/layout.messages.html' %} {% block content %} {% endblock %} </div> </div> {% endblock %} {% include 'user/layout.footer.html' %} <br /> <br /> <br /> </div> {% include 'user/layout.end.html' %} </body> </html>
KenanBek/django-template
app/files/templates/user/layout.html
HTML
gpl-3.0
2,909
--- layout: politician2 title: suresh kumar shetkar profile: party: INC constituency: Zahirabad state: Andhra Pradesh education: level: Graduate details: b.sc.(agri) in 1982-83 from maralwada agriculture university,parbhani,maharashtra photo: sex: caste: religion: current-office-title: Member of Parliament crime-accusation-instances: 0 date-of-birth: 1964 profession: networth: assets: 30,11,999 liabilities: 0 pan: twitter: website: youtube-interview: wikipedia: http://en.wikipedia.com/wiki/Suresh_Kumar_Shetkar candidature: - election: Lok Sabha 2009 myneta-link: http://myneta.info/ls2009/candidate.php?candidate_id=47 affidavit-link: http://myneta.info/candidate.php?candidate_id=47&scan=original expenses-link: http://myneta.info/expense.php?candidate_id=47 constituency: Zahirabad party: INC criminal-cases: 0 assets: 30,11,999 liabilities: 0 result: winner crime-record: date: 2014-01-28 version: 0.0.5 tags: --- ##Summary Suresh Kumar Shetkar (born 8 August 1960) is an Indian politician and a member of the 15th Lok Sabha. He belongs to the Indian National Congress political party and represents Zahirabad constituency in Andhra Pradesh state. ##Education {% include "education.html" %} ##Political Career {% include "political-career.html" %} ##Criminal Record {% include "criminal-record.html" %} ##Personal Wealth {% include "personal-wealth.html" %} ##Public Office Track Record {% include "track-record.html" %} ##References Wikipedia References - [Wikipedia profile]({{page.profile.wikipedia}}), accessed Jan 27, 2014. {% include "references.html" %}
vaibhavb/wisevoter
site/politicians/_posts/2013-12-18-suresh-kumar-shetkar.md
Markdown
gpl-3.0
1,696
#!/bin/bash # scrub.sh uses the autopep8 tool to clean up whitespace and other small bits # E261 = double space before inline comment # E501 = don't squeeze lines to fix max length # E302 = don't go crazy with the double whitespace between funcs # E401 = don't put imports on separate lines # E309 = don't put a blank line after class declaration autopep8 \ --in-place --recursive --aggressive \ --ignore E501,E302,E261,E401,E309 \ --exclude *.html \ src/
gnott/bot-lax-adaptor
.scrub.sh
Shell
gpl-3.0
474
ThrowCraft ==========
aggurai/ThrowCraft
README.md
Markdown
gpl-3.0
22
/* -*- mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*- */ // Copyright © 2016 Associated Universities, Inc. Washington DC, USA. // // This file is part of vysmaw. // // vysmaw is free software: you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the Free Software // Foundation, either version 3 of the License, or (at your option) any later // version. // // vysmaw is distributed in the hope that it will be useful, but WITHOUT ANY // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR // A PARTICULAR PURPOSE. See the GNU General Public License for more details. // // You should have received a copy of the GNU General Public License along with // vysmaw. If not, see <http://www.gnu.org/licenses/>. // #ifndef SPECTRUM_READER_H_ #define SPECTRUM_READER_H_ #include <vysmaw_private.h> #include <vys_buffer_pool.h> #include <vys_async_queue.h> struct spectrum_reader_context { vysmaw_handle handle; struct vys_buffer_pool *signal_msg_buffers; struct vys_async_queue *read_request_queue; int loop_fd; }; void *spectrum_reader(struct spectrum_reader_context *context); #endif /* SPECTRUM_READER_H_ */
mpokorny/vysmaw
src/spectrum_reader.h
C
gpl-3.0
1,212
<?php namespace Faid\Dispatcher { use Faid\Request\Request; use \Faid\StaticObservable; use \Faid\Request\HttpRequest; class Dispatcher extends StaticObservable { /** * @var array */ protected $routes = array(); /** * @var Route */ protected $activeRoute = null; /** * @var HttpRequest */ protected $request = null; /** * @param HttpRequest $request */ public function __construct(Request $request) { $this->request = $request; } public function getRequest() { return $this->request; } public function getNamed($name) { foreach ( $this->routes as $route ) { if ( $route->getName() == $name ) { return $route; } } throw new RouteException(sprintf('Route with name %s not found', $name)); } /** * @param Route $route */ public function addRoute(Route $route) { $this->routes[] = $route; } public function getActiveRoute() { return $this->activeRoute; } /** * @return Route */ public function run() { $this->activeRoute = $this->findRoute($this->request); self::callEvent('Dispatcher.Route', $this->activeRoute); $this->activeRoute->prepareRequest(); return $this->activeRoute; } /** * @param $request * * @return HttpRoute */ protected function findRoute() { foreach ($this->routes as $row) { if ($row->test($this->request)) { return $row; } } $error = <<<LOG Failed to find matching route for next request: url - %s'; LOG; $error = sprintf($error,$this->request->url()); throw new RouteException($error); } } } ?>
Gudwin/faid
src/Dispatcher/Dispatcher.php
PHP
gpl-3.0
2,217
package sync import ( "testing" "time" . "github.com/franela/goblin" ) func TestOnce(t *testing.T) { g := Goblin(t) g.Describe("#Once", func() { g.It("should return nil only once for one id", func() { var id = "1" g.Assert(Once(id) == nil).IsTrue() g.Assert(Once(id) == nil).IsFalse() g.Assert(Once(id) == nil).IsFalse() g.Assert(Once(id) == nil).IsFalse() }) g.It("should return nil again after ttl reached", func() { var id = "2" ttl = time.Millisecond * 500 g.Assert(Once(id) == nil).IsTrue() g.Assert(Once(id) == nil).IsFalse() g.Assert(Once(id) == nil).IsFalse() time.Sleep(time.Second) g.Assert(Once(id) == nil).IsTrue() }) }) }
getblank/blank-sr
sync/oncer_test.go
GO
gpl-3.0
689
require 'package' class Gdal < Package description 'The Geospatial Data Abstraction Library is a translator for raster and vector geospatial data formats.' homepage 'http://www.gdal.org/' version '1.11.5' source_url 'http://download.osgeo.org/gdal/1.11.5/gdal-1.11.5.tar.xz' source_sha256 'd4fdc3e987b9926545f0a514b4328cd733f2208442f8d03bde630fe1f7eff042' depends_on 'python27' depends_on 'curl' depends_on 'geos' depends_on 'proj4' depends_on 'libxml2' def self.build system "./configure CFLAGS=\" -fPIC\" --with-png=internal --with-libtiff=internal --with-geotiff=internal --with-jpeg=internal --with-gif=internal --with-curl=/usr/local/bin/curl-config --with-geos=/usr/local/bin/geos-config --with-static-proj4=/usr/local/share/proj --with-python" system "make" end def self.install system "make", "DESTDIR=#{CREW_DEST_DIR}", "install" end end
richard-fisher/chromebrew
packages/gdal.rb
Ruby
gpl-3.0
891
//------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ namespace CaptainSonarAi.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); public static Settings Default { get { return defaultInstance; } } } }
seanfdnn/CaptainSonarRadioOp
CaptainSonarAi/Properties/Settings.Designer.cs
C#
gpl-3.0
1,071
#import <Foundation/Foundation.h> @interface NameFormatter : NSObject @property (copy, nonatomic) NSString *title; @property (copy, nonatomic) NSString *subtitle; - (id)initWithName:(NSString *)name; @end
tatey/NextStop
NextStop/NameFormatter.h
C
gpl-3.0
209
#include <iostream> #include <iomanip> #include <random> using namespace std; // ºìºÚÊ÷µÄÐÔÖÊ // 1 ÿ¸ö½ÚµãҪôÊǺìµÄ£¬ÒªÃ´ÊÇºÚµÄ // 2 ¸ù½ÚµãÊÇºÚµÄ // 3 Èç¹ûÒ»¸ö½ÚµãÊǺìµÄ£¬ÔòËüµÄÁ½¸ö¶ù×Ó¶¼ÊÇºÚµÄ // 4 ¶Ôÿ¸ö½Úµã£¬´Ó¸Ã½Úµãµ½Æä×ÓËï½ÚµãµÄËùÓз¾¶Éϰüº¬ÏàͬÊýÄ¿µÄºÚ½Úµã class RedBlackTree { public: RedBlackTree() { nil = new TreeNode(-1); nil->parent = nil; nil->left = nil; nil->right = nil; nil->color = BLACK; root = nil; } ~RedBlackTree() { clear(root); delete nil; } void insert(int elem) { rb_insert(new TreeNode(elem, nil, nil, nil)); } void remove(int elem) { TreeNode *node = find(elem, root); if (node != nil) rb_remove(node); } void print() { InOrderTraversal(root); cout << endl; } bool empty() { return (root == nil) ? true : false; } private: enum Color { RED, BLACK }; struct TreeNode { int elem; Color color; TreeNode *parent; TreeNode *left; TreeNode *right; TreeNode(int e, TreeNode *p = NULL, TreeNode *l = NULL, TreeNode *r = NULL, Color c = RED) : elem(e), color(c), parent(p), left(l), right(r) {} }; TreeNode *nil; TreeNode *root; TreeNode* find(int elem, TreeNode* node) { if (node == nil) return nil; if (elem == node->elem) return node; else if (elem < node->elem) return find(elem, node->left); else if (elem > node->elem) return find(elem, node->right); else; } void leftRotate(TreeNode* k1) { // set k2 TreeNode *k2 = k1->right; // turn k2's left subtree into k1's right subtree k1->right = k2->left; k2->left->parent = k1; // link k1's parent to k2 k2->parent = k1->parent; if (k2->parent == nil) root = k2; else if (k1 = k2->parent->left) k2->parent->left = k2; else k2->parent->right = k2; // put k1 on k2's left k2->left = k1; k1->parent = k2; } void rightRotate(TreeNode* k2) { // set k1 TreeNode *k1 = k2->left; // turn k1's right subtree into k2's left subtree k2->left = k1->right; k1->right->parent = k2; // link k2's parent to k1 k1->parent = k2->parent; if (k1->parent == nil) root = k1; else if (k2 = k1->parent->left) k1->parent->left = k1; else k1->parent->right = k1; // put k2 on k1's right k1->right = k2; k2->parent = k1; } void rb_insert(TreeNode *z) { TreeNode *y = nil; TreeNode *x = root; // find the last leaf node while (x != nil) { y = x; if (z->elem < x->elem) x = x->left; else x = x->right; } // link z to y as its parent z->parent = y; if (y == nil) root = z; else if (z->elem < y->elem) y->left = z; else y->right = z; // initialize z with RED color z->left = nil; z->right = nil; z->color = RED; // ¿ÉÄÜ»áÆÆ»µÐÔÖÊ2»òÐÔÖÊ3£¬µ«²»»áÆÆ»µÐÔÖÊ4 rb_insert_fixup(z); print(); } void rb_insert_fixup(TreeNode *z) { TreeNode *y; while (z->parent->parent != nil && z->parent->color == RED) { // ÒÔÏ´úÂëÐÞÕýÐÔÖÊ3 // Çé¿ö1£ºzµÄ¸¸½ÚµãÊÇ×ó×ӽڵ㣬zµÄÊ常½ÚµãÔòΪz¸¸½ÚµãµÄ¸¸½ÚµãµÄÓÒ×Ó½Úµã if (z->parent == z->parent->parent->left) { // yÊÇzµÄÊ常½Úµã y = z->parent->parent->right; // Case 1: zµÄÊ常½ÚµãÊǺìµÄ if (y->color == RED) { z->parent->color = BLACK; y->color = BLACK; z->parent->parent->color = RED; z = z->parent->parent; } // Case 2: zµÄÊ常½ÚµãÊǺڵ쬶øÇÒzÊÇÓÒ×Ó½Úµã else if (z == z->parent->right) { z = z->parent; leftRotate(z); } // Case 3:zµÄÊ常½ÚµãÊǺÚÉ«£¬¶øÇÒzÊÇ×ó×Ó½Úµã else { z->parent->color = BLACK; z->parent->parent->color = RED; rightRotate(z->parent->parent); } } // Çé¿ö2£ºzµÄ¸¸½ÚµãÊÇÓÒ×ӽڵ㣬zµÄÊ常½ÚµãÔòΪz¸¸½ÚµãµÄ¸¸½ÚµãµÄ×ó×Ó½Úµã else { // yÊÇzµÄÊ常½Úµã y = z->parent->parent->left; // Case 1: zµÄÊ常½ÚµãÊǺìµÄ if (y->color == RED) { z->parent->color = BLACK; y->color = BLACK; z->parent->parent->color = RED; z = z->parent->parent; } // Case 2: zµÄÊ常½ÚµãÊǺڵ쬶øÇÒzÊÇ×ó×Ó½Úµã else if (z == z->parent->left) { z = z->parent; rightRotate(z); } // Case 3: zµÄÊ常½ÚµãÊǺڵ쬶øÇÒzÊÇÓÒ×Ó½Úµã else { z->parent->color = BLACK; z->parent->parent->color = RED; leftRotate(z->parent->parent); } } } root->color = BLACK; // ÐÞÕýÐÔÖÊ2 } TreeNode* findSuccessor(TreeNode *z) { if (z->right != nil) { z = z->right; while (z->left != nil) z = z->left; return z; } TreeNode *p = z->parent; while (p != nil && z == p->right) { z = p; p = p->parent; } return p; } void rb_remove(TreeNode *z) { TreeNode *x, *y; // yÊÇÕæÕýµÄ¼´½«±»removeµÄ½Úµã if (z->left == nil || z->right == nil) y = z; else y = findSuccessor(z); // y¿Ï¶¨Ã»ÓÐ×ó×Ó½Úµã // xÊÇyµÄ×Ó½Úµã if (y->left != nil) x = y->left; else x = y->right; // xµÄ¸¸½ÚµãÖ¸ÏòyµÄ¸¸½Úµã£¬²»¹ÜxÊDz»ÊÇnil x->parent = y->parent; if (y->parent == nil) root = x; else if (y == y->parent->left) y->parent->left = x; else y->parent->right = x; if (y != z) z->elem = y->elem; // Èç¹û±»É¾µÄ½ÚµãÊǺÚÉ«µÄ£¬Ôò»á²úÉúÈý¸öÎÊÌâ // 1 Èç¹ûyÔ­À´ÊǸù½Úµã£¬¶øyµÄÒ»¸öºìÉ«µÄ×Ó½Úµã³ÆÎªÁËеĸù£¬ÔòÎ¥·´ÁËÐÔÖÊ2 // 2 Èç¹ûxºÍy->parent¶¼ÊǺìÉ«µÄ£¬ÔòÎ¥·´ÁËÐÔÖÊ3 // 3 ɾ³ýy½«µ¼ÖÂÏÈǰ°üº¬yµÄÈκη¾¶ÉϺڽڵã¸öÊýÉÙ1£¬Î¥·´ÁËÐÔÖÊ4 if (y->color == BLACK) rb_remove_fixup(x); delete y; y = NULL; } void rb_remove_fixup(TreeNode *x) { TreeNode *w; if (x == nil) return; // ÒòΪΥ·´ÁËÐÔÖÊ4£¬¹Ê¼Ù¶¨xÉÏÌí¼ÓÁËÒ»ÖØºÚÉ«ÓÃÒÔÐÞÕýÐÔÖÊ4 while (x != root && x->color == BLACK) { if (x == x->parent->left) { // xÊÇ×ó×ӽڵ㣬wÊÇxµÄÐֵܽڵã w = x->parent->right; // Case 1: xµÄÐֵܽڵãwÊǺìÉ«µÄ£¬´ËʱwµÄ×ӽڵ㶼ÊǺÚÉ«µÄ£¬Í¨¹ýÐýת²Ù×÷ת»¯ÎªCase234 if (w->color == RED) { w->color = BLACK; x->parent->color = RED; leftRotate(x->parent); w = x->parent->right; } // Case 2: xµÄÐֵܽڵãwÊǺÚÉ«µÄ£¬¶øÇÒwµÄÁ½¸öº¢×Ó¶¼ÊǺÚÉ«µÄ if (w->left->color == BLACK && w->right->color == BLACK) { w->color = RED; // ½«xºÍxµÄÐֵܽڵãwÈ¥µôÒ»ÖØºÚÉ« x = x->parent; // ÐÞÕýÁ˱¾²ãÐÔÖÊ4£¬¼ÌÐøÏòÉϲãÐÞÕý } // Case 3: xµÄÐֵܽڵãwÊǺÚÉ«µÄ£¬wµÄ×ó×Ó½ÚµãÊǺìÉ«µÄ£¬ÓÒ×Ó½ÚµãÊǺÚÉ«µÄ£¬Í¨¹ýÐýת²Ù×÷ת»¯ÎªCase4 else if (w->right->color == BLACK) { w->left->color = BLACK; w->color = RED; rightRotate(w); w = x->parent->right; } // Case 4: xµÄÐֵܽڵãwÊǺÚÉ«µÄ£¬wµÄÓÒ×Ó½ÚµãÊǺìÉ«µÄ else {// ×îÖØÒªµÄÒ»ÖÖÇé¿ö£¬ w->color = x->parent->color; x->parent->color = BLACK; // ×óÐýºóΪxÌí¼ÓÁËÒ»ÖØºÚÉ«£¬ÐÞÕýÁËÐÔÖÊ4ºÍÐÔÖÊ3 w->right->color = BLACK; leftRotate(x->parent); x = root; } } else { // xÊÇÓÒ×ӽڵ㣬wÊÇxµÄÐֵܽڵã w = x->parent->left; // Case 1: xµÄÐֵܽڵãwÊǺìÉ«µÄ£¬´ËʱwµÄ×ӽڵ㶼ÊǺÚÉ«µÄ£¬Í¨¹ýÐýת²Ù×÷ת»¯ÎªCase234 if (w->color == RED) { w->color = BLACK; x->parent->color = RED; rightRotate(x->parent); w = x->parent->left; } // Case 2: xµÄÐֵܽڵãwÊǺÚÉ«µÄ£¬¶øÇÒwµÄÁ½¸öº¢×Ó¶¼ÊǺÚÉ«µÄ if (w->left->color == BLACK && w->right->color == BLACK) { w->color = RED; x = x->parent; } // Case 3: xµÄÐֵܽڵãwÊǺÚÉ«µÄ£¬wµÄÓÒ×Ó½ÚµãÊǺìÉ«µÄ£¬×ó×Ó½ÚµãÊǺÚÉ«µÄ£¬Í¨¹ýÐýת²Ù×÷ת»¯ÎªCase4 else if (w->left->color == BLACK) { w->right->color = BLACK; w->color = RED; leftRotate(w); w = x->parent->left; } // Case 4: xµÄÐֵܽڵãwÊǺÚÉ«µÄ£¬wµÄ×ó×Ó½ÚµãÊǺìÉ«µÄ else { w->color = x->parent->color; x->parent->color = BLACK; w->left->color = BLACK; rightRotate(x->parent); x = root; } } } x->color = BLACK; // ÐÞÕýÁËÐÔÖÊ2 } void InOrderTraversal(TreeNode *node) { if (node == nil) return; InOrderTraversal(node->left); cout << setw(3) << node->elem << '(' << node->color << ')'; InOrderTraversal(node->right); } void clear(TreeNode *node) { if (node == nil) return; if (node->left != nil) clear(node->left); if (node->right != nil) clear(node->right); delete node; node = NULL; } }; int main() { static default_random_engine generator; uniform_int_distribution<int> distribution(1, 99); RedBlackTree *tree = new RedBlackTree(); for (int i = 0; i < 10; ++i) { int elem = distribution(generator); cout << setw(3) << elem << endl; tree->insert(elem); } while (!tree->empty()) { int elem; cout << "ÇëÊäÈëҪɾ³ýµÄÊý: " << endl; cin >> elem; tree->remove(elem); tree->print(); } delete tree; tree = NULL; system("pause"); }
Yoleimei/SourceCodeRepo
DataStructure_Algorithm/DataStructure/Tree/RedBlackTree/RedBlackTree.cpp
C++
gpl-3.0
8,403
/***************************************************************** * This file is part of Managing Agricultural Research for Learning & * Outcomes Platform (MARLO). * MARLO is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * at your option) any later version. * MARLO is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with MARLO. If not, see <http://www.gnu.org/licenses/>. *****************************************************************/ package org.cgiar.ccafs.marlo.action.json.project; import org.cgiar.ccafs.marlo.action.BaseAction; import org.cgiar.ccafs.marlo.config.APConstants; import org.cgiar.ccafs.marlo.data.manager.DeliverableAffiliationManager; import org.cgiar.ccafs.marlo.data.manager.DeliverableAffiliationsNotMappedManager; import org.cgiar.ccafs.marlo.data.manager.DeliverableAltmetricInfoManager; import org.cgiar.ccafs.marlo.data.manager.DeliverableManager; import org.cgiar.ccafs.marlo.data.manager.DeliverableMetadataExternalSourcesManager; import org.cgiar.ccafs.marlo.data.manager.ExternalSourceAuthorManager; import org.cgiar.ccafs.marlo.data.manager.InstitutionManager; import org.cgiar.ccafs.marlo.data.manager.PhaseManager; import org.cgiar.ccafs.marlo.data.model.Deliverable; import org.cgiar.ccafs.marlo.data.model.DeliverableAffiliation; import org.cgiar.ccafs.marlo.data.model.DeliverableAffiliationsNotMapped; import org.cgiar.ccafs.marlo.data.model.DeliverableAltmetricInfo; import org.cgiar.ccafs.marlo.data.model.DeliverableMetadataExternalSources; import org.cgiar.ccafs.marlo.data.model.ExternalSourceAuthor; import org.cgiar.ccafs.marlo.data.model.Institution; import org.cgiar.ccafs.marlo.data.model.Phase; import org.cgiar.ccafs.marlo.rest.services.deliverables.model.MetadataAltmetricModel; import org.cgiar.ccafs.marlo.rest.services.deliverables.model.MetadataGardianModel; import org.cgiar.ccafs.marlo.rest.services.deliverables.model.MetadataWOSModel; import org.cgiar.ccafs.marlo.rest.services.deliverables.model.WOSAuthor; import org.cgiar.ccafs.marlo.rest.services.deliverables.model.WOSInstitution; import org.cgiar.ccafs.marlo.utils.APConfig; import org.cgiar.ccafs.marlo.utils.doi.DOIService; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; import java.util.Collections; import java.util.Date; import java.util.List; import java.util.Map; import java.util.stream.Collectors; import javax.inject.Inject; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonElement; import com.google.gson.JsonNull; import com.google.gson.JsonParser; import org.apache.commons.codec.binary.Base64; import org.apache.commons.lang3.StringUtils; import org.apache.struts2.dispatcher.Parameter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /************** * @author German C. Martinez - CIAT/CCAFS **************/ public class DeliverableMetadataByWOS extends BaseAction { /** * */ private static final long serialVersionUID = -1340291586140709256L; // Logger private static final Logger LOG = LoggerFactory.getLogger(DeliverableMetadataByWOS.class); private String link; private String jsonStringResponse; private MetadataWOSModel response; private Long deliverableId; private Long phaseId; // Managers private DeliverableMetadataExternalSourcesManager deliverableMetadataExternalSourcesManager; private DeliverableAffiliationManager deliverableAffiliationManager; private DeliverableAffiliationsNotMappedManager deliverableAffiliationsNotMappedManager; private ExternalSourceAuthorManager externalSourceAuthorManager; private DeliverableManager deliverableManager; private InstitutionManager institutionManager; private PhaseManager phaseManager; private DeliverableAltmetricInfoManager deliverableAltmetricInfoManager; @Inject public DeliverableMetadataByWOS(APConfig config, DeliverableAffiliationManager deliverableAffiliationManager, DeliverableMetadataExternalSourcesManager deliverableMetadataExternalSourcesManager, DeliverableAffiliationsNotMappedManager deliverableAffiliationsNotMappedManager, ExternalSourceAuthorManager externalSourceAuthorManager, DeliverableManager deliverableManager, InstitutionManager institutionManager, PhaseManager phaseManager, DeliverableAltmetricInfoManager deliverableAltmetricInfoManager) { super(config); this.deliverableAffiliationManager = deliverableAffiliationManager; this.deliverableMetadataExternalSourcesManager = deliverableMetadataExternalSourcesManager; this.deliverableAffiliationsNotMappedManager = deliverableAffiliationsNotMappedManager; this.externalSourceAuthorManager = externalSourceAuthorManager; this.deliverableManager = deliverableManager; this.institutionManager = institutionManager; this.phaseManager = phaseManager; this.deliverableAltmetricInfoManager = deliverableAltmetricInfoManager; } @Override public String execute() throws Exception { /* * if (this.jsonStringResponse == null || StringUtils.equalsIgnoreCase(this.jsonStringResponse, "null")) { * return NOT_FOUND; * } */ if (this.jsonStringResponse != null && !StringUtils.equalsIgnoreCase(this.jsonStringResponse, "null")) { this.response = new Gson().fromJson(jsonStringResponse, MetadataWOSModel.class); this.phaseId = this.getActualPhase().getId(); this.saveInfo(); } return SUCCESS; } private String getBooleanStringOrNotAvailable(String string) { String result = null; if (string != null) { if (StringUtils.equalsIgnoreCase(string, "yes")) { result = "true"; } else if (StringUtils.equalsIgnoreCase(string, "no")) { result = "false"; } else if (StringUtils.equalsIgnoreCase(string, "n/a")) { result = "N/A"; } } return result; } public String getJsonStringResponse() { return jsonStringResponse; } public String getLink() { return link; } public Long getPhaseId() { return phaseId; } public MetadataWOSModel getResponse() { return response; } @Override public void prepare() throws Exception { Map<String, Parameter> parameters = this.getParameters(); // If there are parameters, take its values try { String incomingUrl = StringUtils.stripToEmpty(parameters.get(APConstants.WOS_LINK).getMultipleValues()[0]); this.link = DOIService.tryGetDoiName(incomingUrl); this.deliverableId = Long.valueOf( StringUtils.stripToEmpty(parameters.get(APConstants.PROJECT_DELIVERABLE_REQUEST_ID).getMultipleValues()[0])); } catch (Exception e) { this.link = null; this.deliverableId = 0L; } if (!this.link.isEmpty() && DOIService.REGEXP_PLAINDOI.matcher(this.link).lookingAt()) { JsonElement response = this.readWOSDataFromClarisa(); this.jsonStringResponse = StringUtils.stripToNull(new GsonBuilder().serializeNulls().create().toJson(response)); } } private JsonElement readWOSDataFromClarisa() throws IOException { URL clarisaUrl = new URL(config.getClarisaWOSLink().replace("{1}", this.link)); String loginData = config.getClarisaWOSUser() + ":" + config.getClarisaWOSPassword(); String encoded = Base64.encodeBase64String(loginData.getBytes()); HttpURLConnection conn = (HttpURLConnection) clarisaUrl.openConnection(); conn.setRequestProperty("Authorization", "Basic " + encoded); JsonElement element = null; if (conn.getResponseCode() < 300) { try (InputStreamReader reader = new InputStreamReader(conn.getInputStream())) { element = new JsonParser().parse(reader); } catch (FileNotFoundException fnfe) { element = JsonNull.INSTANCE; } } return element; } private void saveAffiliations(Phase phase, Deliverable deliverable) { DeliverableMetadataExternalSources externalSource = this.deliverableMetadataExternalSourcesManager.findByPhaseAndDeliverable(phase, deliverable); List<WOSInstitution> incomingInstitutions = this.response.getInstitutions(); if (incomingInstitutions != null) { List<DeliverableAffiliation> dbAffiliations = this.deliverableAffiliationManager.findAll() != null ? this.deliverableAffiliationManager.findAll().stream() .filter(da -> da != null && da.getId() != null && da.getPhase() != null && da.getDeliverable() != null && da.getPhase().equals(phase) && da.getDeliverable().getId() != null && da.getDeliverable().getId().equals(deliverable.getId()) && da.getDeliverableMetadataExternalSources() != null && da.getDeliverableMetadataExternalSources().getId() != null && da.getDeliverableMetadataExternalSources().getId().equals(externalSource.getId())) .collect(Collectors.toList()) : Collections.emptyList(); for (DeliverableAffiliation dbDeliverableAffiliation : dbAffiliations) { if (dbDeliverableAffiliation != null && dbDeliverableAffiliation.getInstitution() != null && (incomingInstitutions.stream().filter(i -> i != null && i.getFullName() != null && StringUtils.equalsIgnoreCase(i.getFullName(), dbDeliverableAffiliation.getInstitutionNameWebOfScience()) && i.getClarisaMatchConfidence() < APConstants.ACCEPTATION_PERCENTAGE).count() == 0)) { this.deliverableAffiliationManager.deleteDeliverableAffiliation(dbDeliverableAffiliation.getId()); if (deliverable.getIsPublication() == null || deliverable.getIsPublication() == false) { this.deliverableAffiliationManager.replicate(dbDeliverableAffiliation, phase.getDescription().equals(APConstants.REPORTING) ? phase.getNext().getNext() : phase.getNext()); } } } // save for (WOSInstitution incomingAffiliation : incomingInstitutions) { if (incomingAffiliation.getClarisaMatchConfidence() >= APConstants.ACCEPTATION_PERCENTAGE) { DeliverableAffiliation newDeliverableAffiliation = this.deliverableAffiliationManager.findByPhaseAndDeliverable(phase, deliverable).stream() .filter(nda -> nda != null && nda.getDeliverableMetadataExternalSources() != null && nda.getDeliverableMetadataExternalSources().getId() != null && nda.getDeliverableMetadataExternalSources().getId().equals(externalSource.getId()) && nda.getInstitutionNameWebOfScience() != null && StringUtils .equalsIgnoreCase(incomingAffiliation.getFullName(), nda.getInstitutionNameWebOfScience())) .findFirst().orElse(null); if (newDeliverableAffiliation == null) { newDeliverableAffiliation = new DeliverableAffiliation(); newDeliverableAffiliation.setPhase(phase); newDeliverableAffiliation.setDeliverable(deliverable); newDeliverableAffiliation.setCreateDate(new Date()); newDeliverableAffiliation.setCreatedBy(this.getCurrentUser()); } Institution incomingInstitution = (incomingAffiliation.getClarisaId() != null) ? this.institutionManager.getInstitutionById(incomingAffiliation.getClarisaId()) : null; newDeliverableAffiliation.setInstitution(incomingInstitution); newDeliverableAffiliation.setInstitutionMatchConfidence(incomingAffiliation.getClarisaMatchConfidence()); newDeliverableAffiliation.setDeliverableMetadataExternalSources(externalSource); newDeliverableAffiliation.setInstitutionNameWebOfScience(incomingAffiliation.getFullName()); newDeliverableAffiliation.setInstitutionMatchConfidence(incomingAffiliation.getClarisaMatchConfidence()); newDeliverableAffiliation.setActive(true); newDeliverableAffiliation = this.deliverableAffiliationManager.saveDeliverableAffiliation(newDeliverableAffiliation); if (deliverable.getIsPublication() == null || deliverable.getIsPublication() == false) { this.deliverableAffiliationManager.replicate(newDeliverableAffiliation, phase.getDescription().equals(APConstants.REPORTING) ? phase.getNext().getNext() : phase.getNext()); } } } } } private void saveAffiliationsNotMapped(Phase phase, Deliverable deliverable) { DeliverableMetadataExternalSources externalSource = this.deliverableMetadataExternalSourcesManager.findByPhaseAndDeliverable(phase, deliverable); List<WOSInstitution> incomingInstitutions = this.response.getInstitutions(); if (incomingInstitutions != null) { List<DeliverableAffiliationsNotMapped> dbAffiliationsNotMapped = this.deliverableAffiliationsNotMappedManager.findAll() != null ? this.deliverableAffiliationsNotMappedManager.findAll().stream() .filter(danm -> danm != null && danm.getId() != null && danm.getDeliverableMetadataExternalSources() != null && danm.getDeliverableMetadataExternalSources().getId() != null && danm.getDeliverableMetadataExternalSources().getId().equals(externalSource.getId())) .collect(Collectors.toList()) : Collections.emptyList(); for (DeliverableAffiliationsNotMapped dbDeliverableAffiliationNotMapped : dbAffiliationsNotMapped) { if (dbDeliverableAffiliationNotMapped != null && dbDeliverableAffiliationNotMapped.getPossibleInstitution() != null && (incomingInstitutions.stream() .filter(i -> i != null && i.getFullName() != null && i.getFullName().equals(dbDeliverableAffiliationNotMapped.getPossibleInstitution().getName()) && i.getClarisaMatchConfidence() >= APConstants.ACCEPTATION_PERCENTAGE) .count() == 0)) { this.deliverableAffiliationsNotMappedManager .deleteDeliverableAffiliationsNotMapped(dbDeliverableAffiliationNotMapped.getId()); if (deliverable.getIsPublication() == null || deliverable.getIsPublication() == false) { this.deliverableAffiliationsNotMappedManager.replicate(dbDeliverableAffiliationNotMapped, phase.getDescription().equals(APConstants.REPORTING) ? phase.getNext().getNext() : phase.getNext()); } } } // save for (WOSInstitution incomingAffiliation : incomingInstitutions) { if (incomingAffiliation.getClarisaMatchConfidence() < APConstants.ACCEPTATION_PERCENTAGE) { DeliverableAffiliationsNotMapped newDeliverableAffiliationNotMapped = this.deliverableAffiliationsNotMappedManager.findAll() != null ? this.deliverableAffiliationsNotMappedManager.findAll().stream() .filter(nda -> nda != null && nda.getDeliverableMetadataExternalSources() != null && nda.getDeliverableMetadataExternalSources().getId() != null && nda.getDeliverableMetadataExternalSources().getId().equals(externalSource.getId()) && nda.getName() != null && StringUtils.equalsIgnoreCase(incomingAffiliation.getFullName(), nda.getName())) .findFirst().orElse(null) : null; if (newDeliverableAffiliationNotMapped == null) { newDeliverableAffiliationNotMapped = new DeliverableAffiliationsNotMapped(); newDeliverableAffiliationNotMapped.setDeliverableMetadataExternalSources(externalSource); newDeliverableAffiliationNotMapped.setCreateDate(new Date()); newDeliverableAffiliationNotMapped.setCreatedBy(this.getCurrentUser()); } Institution incomingInstitution = (incomingAffiliation.getClarisaId() != null) ? this.institutionManager.getInstitutionById(incomingAffiliation.getClarisaId()) : null; newDeliverableAffiliationNotMapped.setPossibleInstitution(incomingInstitution); newDeliverableAffiliationNotMapped .setInstitutionMatchConfidence(incomingAffiliation.getClarisaMatchConfidence()); newDeliverableAffiliationNotMapped.setName(incomingAffiliation.getFullName()); newDeliverableAffiliationNotMapped.setCountry(incomingAffiliation.getCountry()); newDeliverableAffiliationNotMapped.setFullAddress(incomingAffiliation.getFullAddress()); newDeliverableAffiliationNotMapped .setInstitutionMatchConfidence(incomingAffiliation.getClarisaMatchConfidence()); newDeliverableAffiliationNotMapped.setActive(true); newDeliverableAffiliationNotMapped = this.deliverableAffiliationsNotMappedManager .saveDeliverableAffiliationsNotMapped(newDeliverableAffiliationNotMapped); if (deliverable.getIsPublication() == null || deliverable.getIsPublication() == false) { this.deliverableAffiliationsNotMappedManager.replicate(newDeliverableAffiliationNotMapped, phase.getDescription().equals(APConstants.REPORTING) ? phase.getNext().getNext() : phase.getNext()); } } } } } private void saveAltmetricInfo(Phase phase, Deliverable deliverable) { DeliverableAltmetricInfo altmetricInfo = this.deliverableAltmetricInfoManager.findByPhaseAndDeliverable(phase, deliverable); MetadataAltmetricModel incomingAltmetricInfo = this.response.getAltmetricInfo(); if (incomingAltmetricInfo != null) { if (altmetricInfo == null) { altmetricInfo = new DeliverableAltmetricInfo(); altmetricInfo.setDeliverable(deliverable); altmetricInfo.setPhase(phase); altmetricInfo.setCreatedBy(this.getCurrentUser()); altmetricInfo.setLastSync(new Date()); } altmetricInfo.setActive(true); altmetricInfo.setAddedOn( incomingAltmetricInfo.getAddedOn() != null ? new Date(incomingAltmetricInfo.getAddedOn() * 1000L) : null); altmetricInfo.setAltmetricId(incomingAltmetricInfo.getAltmetricId()); altmetricInfo.setAltmetricJid(incomingAltmetricInfo.getAltmetricJid()); altmetricInfo.setAuthors(incomingAltmetricInfo.getAuthors() != null ? incomingAltmetricInfo.getAuthors().stream().filter(StringUtils::isNotBlank).collect(Collectors.joining("; ")) : null); altmetricInfo.setCitedByBlogs(incomingAltmetricInfo.getCitedByBlogs()); altmetricInfo.setCitedByDelicious(incomingAltmetricInfo.getCitedByDelicious()); altmetricInfo.setCitedByFacebookPages(incomingAltmetricInfo.getCitedByFacebookPages()); altmetricInfo.setCitedByForumUsers(incomingAltmetricInfo.getCitedByForumUsers()); altmetricInfo.setCitedByGooglePlusUsers(incomingAltmetricInfo.getCitedByGooglePlusUsers()); altmetricInfo.setCitedByLinkedinUsers(incomingAltmetricInfo.getCitedByLinkedinUsers()); altmetricInfo.setCitedByNewsOutlets(incomingAltmetricInfo.getCitedByNewsOutlets()); altmetricInfo.setCitedByPeerReviewSites(incomingAltmetricInfo.getCitedByPeerReviewSites()); altmetricInfo.setCitedByPinterestUsers(incomingAltmetricInfo.getCitedByPinterestUsers()); altmetricInfo.setCitedByPolicies(incomingAltmetricInfo.getCitedByPolicies()); altmetricInfo.setCitedByPosts(incomingAltmetricInfo.getCitedByPosts()); altmetricInfo.setCitedByRedditUsers(incomingAltmetricInfo.getCitedByRedditUsers()); altmetricInfo.setCitedByResearchHighlightPlatforms(incomingAltmetricInfo.getCitedByResearchHighlightPlatforms()); altmetricInfo.setCitedByStackExchangeResources(incomingAltmetricInfo.getCitedByStackExchangeResources()); altmetricInfo.setCitedByTwitterUsers(incomingAltmetricInfo.getCitedByTwitterUsers()); altmetricInfo.setCitedByWeiboUsers(incomingAltmetricInfo.getCitedByWeiboUsers()); altmetricInfo.setCitedByWikipediaPages(incomingAltmetricInfo.getCitedByWikipediaPages()); altmetricInfo.setCitedByYoutubeChannels(incomingAltmetricInfo.getCitedByYoutubeChannels()); altmetricInfo.setDetailsUrl(this.link); altmetricInfo.setDoi(incomingAltmetricInfo.getDoi()); altmetricInfo.setHandle(incomingAltmetricInfo.getHandle()); altmetricInfo.setImageLarge(incomingAltmetricInfo.getImageLarge()); altmetricInfo.setImageMedium(incomingAltmetricInfo.getImageMedium()); altmetricInfo.setImageSmall(incomingAltmetricInfo.getImageSmall()); altmetricInfo.setIsOpenAccess(incomingAltmetricInfo.getIsOpenAccess()); altmetricInfo.setJournal(incomingAltmetricInfo.getJournal()); altmetricInfo.setLastUpdated(incomingAltmetricInfo.getLastUpdated() != null ? new Date(incomingAltmetricInfo.getLastUpdated() * 1000L) : null); altmetricInfo.setModifiedBy(this.getCurrentUser()); altmetricInfo.setPublishedOn(incomingAltmetricInfo.getPublishedOn() != null ? new Date(incomingAltmetricInfo.getPublishedOn() * 1000L) : null); altmetricInfo.setScore(incomingAltmetricInfo.getScore()); altmetricInfo.setTitle(incomingAltmetricInfo.getTitle()); altmetricInfo.setType(incomingAltmetricInfo.getTitle()); altmetricInfo.setUri(incomingAltmetricInfo.getUri()); altmetricInfo.setUrl(incomingAltmetricInfo.getUrl()); altmetricInfo = this.deliverableAltmetricInfoManager.saveDeliverableAltmetricInfo(altmetricInfo); if (deliverable.getIsPublication() == null || deliverable.getIsPublication() == false) { this.deliverableAltmetricInfoManager.replicate(altmetricInfo, phase.getDescription().equals(APConstants.REPORTING) ? phase.getNext().getNext() : phase.getNext()); } } } private void saveExternalSourceAuthors(Phase phase, Deliverable deliverable) { DeliverableMetadataExternalSources externalSource = this.deliverableMetadataExternalSourcesManager.findByPhaseAndDeliverable(phase, deliverable); List<WOSAuthor> incomingAuthors = this.response.getAuthors(); if (incomingAuthors != null) { // we are going to remove all of them and just accept the incoming authors this.externalSourceAuthorManager.deleteAllAuthorsFromPhase(deliverable, phase); // save for (WOSAuthor incomingAuthor : incomingAuthors) { ExternalSourceAuthor externalSourceAuthor = new ExternalSourceAuthor(); externalSourceAuthor.setCreateDate(new Date()); externalSourceAuthor.setCreatedBy(this.getCurrentUser()); externalSourceAuthor.setDeliverableMetadataExternalSources(externalSource); externalSourceAuthor.setFullName(incomingAuthor.getFullName()); externalSourceAuthor = this.externalSourceAuthorManager.saveExternalSourceAuthor(externalSourceAuthor); if (deliverable.getIsPublication() == null || deliverable.getIsPublication() == false) { this.externalSourceAuthorManager.replicate(externalSourceAuthor, phase.getDescription().equals(APConstants.REPORTING) ? phase.getNext().getNext() : phase.getNext()); } } } } private void saveExternalSources(Phase phase, Deliverable deliverable) { DeliverableMetadataExternalSources externalSource = this.deliverableMetadataExternalSourcesManager.findByPhaseAndDeliverable(phase, deliverable); MetadataGardianModel gardianInfo = this.response.getGardianInfo(); if (externalSource == null) { externalSource = new DeliverableMetadataExternalSources(); externalSource.setPhase(phase); externalSource.setDeliverable(deliverable); externalSource.setCreateDate(new Date()); externalSource.setCreatedBy(this.getCurrentUser()); externalSource = this.deliverableMetadataExternalSourcesManager.saveDeliverableMetadataExternalSources(externalSource); } externalSource.setUrl(this.response.getUrl()); externalSource.setDoi(this.response.getDoi()); externalSource.setTitle(this.response.getTitle()); externalSource.setPublicationType(this.response.getPublicationType()); externalSource.setPublicationYear(this.response.getPublicationYear()); externalSource.setOpenAccessStatus(this.getBooleanStringOrNotAvailable(this.response.getIsOpenAccess())); externalSource.setOpenAccessLink(this.response.getOpenAcessLink()); externalSource.setIsiStatus(this.getBooleanStringOrNotAvailable(this.response.getIsISI())); externalSource.setJournalName(this.response.getJournalName()); externalSource.setVolume(this.response.getVolume()); externalSource.setPages(this.response.getPages()); externalSource.setSource(this.response.getSource()); if (gardianInfo != null) { externalSource.setGardianFindability(gardianInfo.getFindability()); externalSource.setGardianAccessibility(gardianInfo.getAccessibility()); externalSource.setGardianInteroperability(gardianInfo.getInteroperability()); externalSource.setGardianReusability(gardianInfo.getReusability()); externalSource.setGardianTitle(gardianInfo.getTitle()); } externalSource = this.deliverableMetadataExternalSourcesManager.saveDeliverableMetadataExternalSources(externalSource); if (deliverable.getIsPublication() == null || deliverable.getIsPublication() == false) { this.deliverableMetadataExternalSourcesManager.replicate(externalSource, phase.getDescription().equals(APConstants.REPORTING) ? phase.getNext().getNext() : phase.getNext()); } } private void saveInfo() { Deliverable deliverable = this.deliverableManager.getDeliverableById(this.deliverableId); Phase phase = this.phaseManager.getPhaseById(this.phaseId); this.saveExternalSources(phase, deliverable); this.saveAffiliations(phase, deliverable); this.saveAffiliationsNotMapped(phase, deliverable); this.saveExternalSourceAuthors(phase, deliverable); this.saveAltmetricInfo(phase, deliverable); } /** * This method is created ONLY to be used for the deliverables bulk sync * * @param phase the phase the sync info is going to be saved * @param deliverableId the deliverableId * @param link the DOI/URL link to be used for the metadata harvesting * @return * @throws IOException */ public boolean saveInfo(Long phaseId, Long deliverableId, String link) throws IOException { this.phaseId = phaseId; this.deliverableId = deliverableId; this.link = link; this.response = new Gson().fromJson(this.readWOSDataFromClarisa(), MetadataWOSModel.class); if (this.response != null) { this.saveInfo(); return true; } return false; } }
CCAFS/MARLO
marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/json/project/DeliverableMetadataByWOS.java
Java
gpl-3.0
26,925
#include<iostream> using namespace std; int main(){ int t, a, b; cin >> t; while(t--){ cin >> a >> b; cout << ((a%b == 0)? "YES\n" : "NO\n"); } }
tadvent/OnlineJudgeSolutions-Cpp
HDOJ/2075_A%B?/2075_A%B?/main.cpp
C++
gpl-3.0
178
( function ( mw, $ ) { /** * LoginForm * TODO: .js dédié à l'authentificatioin ... */ if ( mw.config.get('wgTitle') == 'Connexion' && $('.mgw-alert').length ) { $('.mgw-alert').css({'margin':'0 0 1em 0', 'padding':'0.5em', 'width':'275px'}); $('.mgw-alert i').css({'margin-left':'0'}); $('#userloginForm .error').hide(); } /** * PATCH TEMPORAIRE MGW 1.0 * adaptation des valeurs par défaut du formulaire "modifier le groupe" * pour ne pas surcharger le nombre de formulaires spécifiques à chaque * type de groupe... ( GEP/GAPP/Stage praticien/DPC) */ var titleRegex = new RegExp('AjouterDonnées\/Modifier le groupe\/'); if( titleRegex.test( mw.config.get('wgTitle') ) ) { $inputs = $('input'); var groupe_type = ''; $inputs.each( function(){ if ( $( this ).attr('name') == 'Groupe[Type de groupe]' ) groupe_type = $( this ).val(); }); if ( groupe_type == 'GEP' || groupe_type == 'Stage praticien' ) { mw.mgw_participant = 0; $('input.multipleTemplateAdder').click( function( ){ mw.mgw_participant++; // #input_x_12 = id du bouton radio 'interne' setTimeout(() => { $('#input_'+mw.mgw_participant+'_12').click() }, 500 ); }); } } /** * PATCH TEMPORAIRE MGW 1.0 * définition des valeurs cachées du formulaire "Personne" * objet: déclencher la màj même en l'absence de modifs */ if ( mw.config.get('wgNamespaceNumber') === 2 && mw.config.get('wgAction') === 'formedit' ) { $('input').each( function(){ if ( $( this ).attr('name') == 'Personne2[updatetime]' ) $(this).val( Math.floor(Date.now() / 1000) ); if ( $( this ).attr('name') == 'Personne2[updateuser]' ) $(this).val( mw.config.get('wgUserName') ); }); // lisibilité: on cache l'option "Titre" aux non-médecins $('th').each( function(){ if ( $(this).html().match(/Titre\:/) ) { $(this).addClass('mgw-titre-field'); $(this).next('td').addClass('mgw-titre-field'); } }); mw.mgw_hide_titre = function (){ if ( $('#input_10').is(':checked') ) { $('.mgw-titre-field').show(); } else { $('.mgw-titre-field').hide(); } } $('#input_9').click( mw.mgw_hide_titre ); $('#input_10').click( mw.mgw_hide_titre ); $('#input_11').click( mw.mgw_hide_titre ); $('#input_12').click( mw.mgw_hide_titre ); mw.mgw_hide_titre(); // on cache l'onglet 'modifier le wikitexte' if ( mw.config.get( 'wgUserGroups').indexOf('sysop') == -1 ) { $('#ca-edit').hide(); } } /** * Onglets d'action: correction de l'affichage si "ca-edit" au lieu de "ca-ve-edit" * pour les ns MAIN et RECIT */ if ( ( mw.config.get('wgNamespaceNumber') === 0 || mw.config.get('wgNamespaceNumber') === 724 ) && mw.config.get( 'wgAction' ) === 'view' ) { str = $('#ca-edit a').attr('href'); //str = str.replace('&action', '&veaction'); //$('#ca-edit a').attr('href',str); $('#ca-edit a').html('Modifier'); $('#ca-edit').attr('id','ca-ve-edit'); } /** * Modify in background the competency on the current page. * * The edition is done by the current user without edit summary. * The competence can be any string followed by '=Oui' or '=Non' * (boolean values in a template). If no specific value is given * in the second argument, the boolean value is toggled. * * @param {string} Competence name * @param {string|boolean} [Value] * @return void */ mw.mgwikiModifyCompetence = function ( name, value ) { new mw.Api() .mgwikiEdit( mw.config.get( 'wgPageName' ), function ( revision ) { if ( !revision.content.match( new RegExp( '\\| *' + name + ' *= *([Oo]ui|[Nn]on)' ) ) ) { return revision.content; } if ( value === undefined ) { value = 'Oui'; if ( revision.content.match( new RegExp( '\\| *' + name + ' *= *[Oo]ui' ) ) ) { value = 'Non'; } } else if ( value == 'Non' || value == 'non' || !value ) { value = 'Non'; } else { value = 'Oui'; } return revision.content.replace( new RegExp( '\\| *' + name + ' *= *([Oo]ui|[Nn]on)' ), '|' + name + '=' + value ); } ); } /** * On some images, add clickable areas editing the page. * * More specifically, the image must be included in a <div class="mgwiki-marguerite">, * and this div must also contain a description of the clickable areas redacted in * HTML with <map name="somename"><area ...></map> (only <map> and <area> are whitelisted * HTML tags); the <area> must have a dedicated attribute data-mgwiki-competence with * "Compétence" or "Compétence=Oui" or "Compétence=Non" inside. When the use clicks on * some area, s/he edits the page in background, replacing the competence on the page * (specifically, "|" + name + "=Oui" (or "=Non") according to the data-mgwiki-competence * attribute ("Compétence" alone toggles the boolean value). */ $( function () { if( !mw.config.get( 'wgIsArticle' ) || mw.config.get( 'wgAction' ) != 'view' || $( '#mw-content-text table.diff' ).length > 0 ) { return; } $( '.mgwiki-marguerite' ).each( function () { var map = $( '.map', $(this) ), maphtml = map.text() ? map.text() : map.html() .replace( new RegExp( '</?pre>' ), '' ) .replace( new RegExp( '&lt;' ), '<' ) .replace( new RegExp( '&gt;' ), '>' ), mapname = maphtml.match( new RegExp( '<map .*name="[a-zA-Z0-9]+".*>' ) ) ? maphtml.match( new RegExp( '<map .*name="([a-zA-Z0-9]+)".*>' ) )[1] : null; // Verify all is in order and protect against unauthorised HTML, only <map> and <area> are whitelisted if ( !maphtml || !mapname || maphtml.replace( new RegExp( '</?(map|area)[ >]', 'g' ), '' ).match( new RegExp( '</?[a-zA-Z]+[ >]' ) ) ) { return; } // Add the <map> definition and activate it on the first image $(this).append( maphtml ); $( 'img', $(this) ).first().attr( 'usemap', '#' + mapname ); // Add click events on <area> $( 'area', $(this) ).css( 'cursor', 'pointer' ).click( function() { var competencedata = $(this).attr( 'data-mgwiki-competence' ), competence = competencedata ? competencedata.match( new RegExp( '^([a-zA-ZéèêëáöôíîïÉÈÊËÁÖÔÍÎÏ0-9]+)(=([Oo]ui|[Nn]on))?$' ) ) : null; if( !competence ) { return false; } if( competence[3] ) { mw.mgwikiModifyCompetence( competence[1], competence[3] ); } else { mw.mgwikiModifyCompetence( competence[1] ); } return false; } ); } ); } ); /** * FONCTIONS D'AFFICHAGE DIVERSES * TODO: Ménage ... ! */ $('.mgw-dropdown').click( function (){ label = $(this).html(); $items = $('.mgw-dropdown-' + $(this).attr('data')); if ( $(this).attr('state') == 'hidden' ) { $(this).html( label.replace('►','▼') ); $items.show(); $(this).attr('state','displayed'); } else { $(this).html( label.replace('▼','►') ); $items.hide(); $(this).attr('state','hidden'); } }); //liens donnés par le modèle {{mgw-link}} mw.mgwLink = function () { $(".mgw-link-self").each(function(){ let url = $(this).children('.mgw-link-url').text(); $(this).attr("onClick", "location.href='" + url + "'"); $(this).find('a').attr('href', url); }); $(".mgw-link-blank").each(function(){ let url = $(this).children('.mgw-link-url').text(); $(this).attr("onClick", "parent.open('" + url + "')"); $childlink = $(this).children('a'); $childlink.replaceWith($('<p>' + $childlink.html() + '</p>')); }); } mw.mgwRedirectPost = function (url, data, target) { var form = document.createElement('form'); document.body.appendChild(form); form.method = 'post'; form.action = url; if ( target == "blank" ) { form.setAttribute( "target", "_blank"); } for (var name in data) { var input = document.createElement('input'); input.type = 'hidden'; input.name = name; input.value = data[name]; form.appendChild(input); } form.submit(); } //change menu border color mw.mgwBorderColor = function() { if ( $(".mgw-border-color").attr('style') !== undefined ) { let color = $(".mgw-border-color").attr('style').match(/(#[a-z0-9]{6});/)[1]; let col = color.substring(1, 7); $('#content').css('border', '1px solid' + color); $('.vectorTabs,.vectorTabs span,.vectorTabs ul').css('background-image', 'url(http://localhost/wiki/extensions/MGWikiDev/images/php/MenuListBorder.php?color='+col+')'); $('.vectorTabs li:not(.selected)').css('background-image', 'url(http://localhost/wiki/extensions/MGWikiDev/images/php/MenuListBackground.php?color='+col+')'); } } //logo aide: //override image link tooltip mw.mgwImgTooltip = function () { $(".mgw-help-img").each(function () { title = $( this ).attr('title'); $( this ).children("a").attr('title',title); }); } mw.mgwToggleCreateUserSubPage = function () { $icon = $("#mgw-toggle-createUserSubPage-icon"); $div = $("#mgw-toggle-createUserSubPage"); if ($icon.attr("class") == "mgw-show"){ $div.after('\ <div class="mgw-toggle-content">\ <form method="get" action="/wiki/index.php" name="uluser" id="mw-userrights-form1">\ <tr><td><input name="user" size="30" value="" id="username" class="mw-autocomplete-user" ></td>\ <td><input type="submit" value="Afficher les groupes d’utilisateurs"></td></tr>\ </form>\ </div>'); $icon.html(' ▲ '); $icon.attr('class','mgw-hide'); $div.attr('class','mgw-toggle-hide'); } else { $icon.html(' ▼ '); $('.mgw-toggle-content').remove(); $icon.attr('class','mgw-show'); $div.attr('class','mgw-toggle-show'); } } // faire disparare les messages de succès après 10 secondes mw.mgwAlertMessage = function () { setTimeout(() => { $('.mgw-alert[status=done]').hide(); }, 2000); } $( function () { mw.mgwAlertMessage(); mw.mgwBorderColor(); mw.mgwImgTooltip(); mw.mgwLink(); $('.mgw-tooltiptext').css('display',''); $("#mgw-toggle-createUserSubPage-icon").html(' ▼ '); $("#mgw-toggle-createUserSubPage").attr("onclick","mw.mgwToggleCreateUserSubPage()"); $("#wpName1, #wpPassword1").attr("placeholder",""); $( ".mgw-delete-link" ).click( function() { let link = $(this).attr('href'); let elmt = $(this).attr('elmt'); if ( confirm( 'Vous êtes sur le point de supprimer: ' + elmt + '\nConfirmez-vous ?' ) ) { document.location.href= link; } }); $( ".mgw-post-link" ).each( function(){ let data = JSON.parse( $(this).find(".mgw-post-link-data").html() ); if ( data.data ) { var $link = $("<p></p>"); $link.attr( 'class', 'mgw-post-submit' ); $link.attr( 'data', data.data ); $link.attr( 'target', data.target ); } else { var $link = $("<a></a>"); if ( data.target == "blank" ) { $link.attr( "target", "_blank"); } } $link.attr( 'href', data.url ); $link.attr( 'title', data.tooltip ); let $a = $(this).find(".mgw-post-link-inner a"); let $b = $(this).find(".mgw-post-link-inner"); if ( $a.length != 0 ) { $link.html( $a.html() ); } else { $link.html( $b.html() ); } $(this).after( $link ); }) $( ".mgw-post-submit" ).click( function() { let url = $(this).attr('href'); let data = $(this).attr('data'); let target = $(this).attr('target'); var rData = new Object(); data = data.split(","); data.forEach( function( item ){ item = item.split("="); rData[item[0]] = item[1]; }); mw.mgwRedirectPost( url, rData, target ); }); }); }( mediaWiki, jQuery ) );
WikiValley/MGWiki
resources/ext.mgwiki.js
JavaScript
gpl-3.0
11,908
# encoding=utf-8 from gi.repository import Gtk from .i18n import _ class AboutDialog(Gtk.AboutDialog): def __init__(self, parent): super(AboutDialog, self).__init__(title=_('About'), parent=parent) self.set_modal(True) self.set_program_name('Ydict') self.set_authors(['Wiky L<wiiiky@outlook.com>']) self.set_artists(['Wiky L<wiiiky@outlook.com>']) self.set_comments('') self.set_copyright('Copyright (c) Wiky L 2015') self.set_license_type(Gtk.License.GPL_3_0) self.set_logo_icon_name('ydict') self.set_version('1.0') self.set_website('https://github.com/wiiiky/ydict') self.set_website_label('GitHub') self.set_wrap_license(True)
wiiiky/ydict
pydict/about.py
Python
gpl-3.0
743
/** ****************************************************************************** * @file DMA2D/DMA2D_MemToMemWithLCD/Inc/stm32f4xx_it.h * @author MCD Application Team * @version V1.1.0 * @date 17-February-2017 * @brief This file contains the headers of the interrupt handlers. ****************************************************************************** * @attention * * <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2> * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * 3. Neither the name of STMicroelectronics nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ****************************************************************************** */ /* Define to prevent recursive inclusion -------------------------------------*/ #ifndef __STM32F4xx_IT_H #define __STM32F4xx_IT_H #ifdef __cplusplus extern "C" { #endif /* Includes ------------------------------------------------------------------*/ /* Exported types ------------------------------------------------------------*/ /* Exported constants --------------------------------------------------------*/ /* Exported macro ------------------------------------------------------------*/ /* Exported functions ------------------------------------------------------- */ void NMI_Handler(void); void HardFault_Handler(void); void MemManage_Handler(void); void BusFault_Handler(void); void UsageFault_Handler(void); void SVC_Handler(void); void DebugMon_Handler(void); void PendSV_Handler(void); void SysTick_Handler(void); void DMA2D_IRQHandler(void); void LTDC_IRQHandler(void); void LTDC_ER_IRQHandler(void); void DSI_IRQHandler(void); #ifdef __cplusplus } #endif #endif /* __STM32F4xx_IT_H */ /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
TRothfelder/Multicopter
libs/STM32Cube_FW_F4_V1.16.0/Projects/STM32469I_EVAL/Examples/DMA2D/DMA2D_MemToMemWithLCD/Inc/stm32f4xx_it.h
C
gpl-3.0
3,268
/* LogMyNight - Android app for logging night activities. Copyright (c) 2010 Michael Greifeneder <mikegr@gmx.net>, Oliver Selinger <oliver.selinger@gmail.com> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ package at.madexperts.logmynight; import java.text.NumberFormat; import java.util.ArrayList; import java.util.List; import android.app.Activity; import android.app.Dialog; import android.content.Context; import android.content.Intent; import android.content.res.Configuration; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.os.Bundle; import android.util.Log; import android.view.Display; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.view.WindowManager; import android.view.View.OnClickListener; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.ImageView; import android.widget.ListView; import android.widget.SimpleCursorAdapter; import android.widget.TextView; import android.widget.AdapterView.OnItemClickListener; import at.madexperts.logmynight.chart.BarChartView; import at.madexperts.logmynight.chart.BarItem; import at.madexperts.logmynight.facebook.FacebookActivity; public class HistoryActivity extends Activity implements OnClickListener, OnItemClickListener { private static final String TAG = HistoryActivity.class.getName(); private SQLiteDatabase db; private ListView listView; private ListView sumView; private Button button; private TextView checkLabel; private BarChartView barChartView; private static final int MESSAGE_PUBLISHED = 2; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); db = new DatabaseHelper(this).getReadableDatabase(); /* First, get the Display from the WindowManager */ Display display = ((WindowManager) getSystemService(WINDOW_SERVICE)) .getDefaultDisplay(); /* Now we can retrieve all display-related infos */ int orientation = display.getOrientation(); Log.d(TAG, "Orientation: " + orientation); if (orientation == 0) { setContentView(R.layout.history); listView = (ListView) findViewById(R.id.historyListView); View view = getLayoutInflater().inflate(R.layout.historyheader, null); ((TextView) view.findViewById(R.id.historyRowName)) .setText("Drink"); ((TextView) view.findViewById(R.id.historyRowSum)).setText("Summe"); ((TextView) view.findViewById(R.id.historyRowAmount)) .setText("Menge"); listView.addHeaderView(view); checkLabel = (TextView) findViewById(R.id.checkText); checkLabel.setText("letzten 24h"); sumView = (ListView) findViewById(R.id.historySum); button = (Button) findViewById(R.id.historyTimeButton); button.setOnClickListener(this); showHistory(1); } else { setContentView(R.layout.barchart); days = (Integer) getLastNonConfigurationInstance(); if (days == null) days = 1; createBarChartDataList(days); barChartView = (BarChartView) findViewById(R.id.barChartView); barChartView.setData(barChartData); } } Integer days; @Override public Object onRetainNonConfigurationInstance() { Log.d(TAG, "onRetainNonConfigurationInstance"); return days; } public void onConfigurationChanged(Configuration configuration) { super.onConfigurationChanged(configuration); Log.d(TAG, "onConfigurationChanged"); } @Override public boolean onCreateOptionsMenu(Menu menu) { new MenuInflater(this).inflate(R.menu.historymenu, menu); return super.onCreateOptionsMenu(menu); } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.shareMenuItem: share("Message from Android!"); return true; } // TODO Auto-generated method stub return super.onOptionsItemSelected(item); } private void share(String txt) { Intent intent = new Intent(this, FacebookActivity.class); intent.putExtra("message", txt); startActivity(intent); } private Dialog dlg; private ListView timeView; public void onClick(View v) { Log.d(TAG, "onClick from ID: " + v.getId()); ArrayAdapter<String> a = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, new String[] { "letzten 24h", "letzte Woche", "letzter Monat", "Alle" }); timeView = new ListView(this); timeView.setAdapter(a); timeView.setOnItemClickListener(this); dlg = new Dialog(this); dlg.setContentView(timeView); dlg.setTitle("Zeitraum ändern"); dlg.show(); } public void onItemClick(AdapterView<?> parent, View view, int position, long id) { dlg.dismiss(); Log.d(TAG, "id:" + id); switch ((int) id) { case 0: showHistory(1); checkLabel.setText("letzten 24h"); break; case 1: showHistory(7); checkLabel.setText("letzte Woche"); break; case 2: showHistory(30); checkLabel.setText("letzten Monat"); break; case 3: showHistoryAll(); checkLabel.setText("gesamter Zeitraum"); break; default: } } private void showHistoryAll() { // TODO: implement correctly showHistory(365); } private List<BarItem> barChartData; private void createBarChartDataList(int days) { /******************************************************************************* * create list for chart view */ barChartData = new ArrayList<BarItem>(); Cursor cursor2 = db .rawQuery( "SELECT d._id as _id, d.name as name, COUNT(l._id) as counter, SUM(l.price) as itemsum " + "FROM drinks d JOIN drinklog l ON d._id = l.drink_id " + "WHERE l.log_time >= datetime('now', '-" + days + " day') " + "GROUP BY d._id, d.name", null); /* Get the indices of the Columns we will need */ int nameColumn = cursor2.getColumnIndex("name"); int amountColumn = cursor2.getColumnIndex("counter"); /* Check if our result was valid. */ if (cursor2 != null) { /* Check if at least one Result was returned. */ if (cursor2.moveToFirst()) { int i = 0; /* Loop through all Results */ do { i++; /* * Retrieve the values of the Entry the Cursor is pointing * to. */ String name = cursor2.getString(nameColumn); int amount = cursor2.getInt(amountColumn); /* * We can also receive the Name of a Column by its Index. * Makes no sense, as we already know the Name, but just to * shwo we can Wink String ageColumName = * c.getColumnName(ageColumn); */ /* Add current Entry to results. */ barChartData.add(new BarItem(name, amount)); } while (cursor2.moveToNext()); } cursor2.close(); } } private void showHistory(int days) { this.days = days; // SELECT d._id, d.name as name, COUNT(l._id) as counter, SUM(l.price) // as itemsum FROM drinks d JOIN drinklog l ON d._id = l.drink_id WHERE // l.log_time >= datetime('now', '-2 day') GROUP BY d._id, d.name; Cursor cursor = db .rawQuery( "SELECT d._id as _id, d.name as name, d.category as category, COUNT(l._id) as counter, SUM(l.price) as itemsum " + "FROM drinks d JOIN drinklog l ON d._id = l.drink_id " + "WHERE l.log_time >= datetime('now', '-" + days + " day') " + "GROUP BY d._id, d.name", null); // new String[] {Integer.toString(days)}); // SimpleCursorAdapter adapter = new SimpleCursorAdapter(this, // R.layout.historyrow, cursor, new String[] { "name", "counter", // "itemsum" }, new int[] { R.id.historyRowName, // R.id.historyRowAmount, R.id.historyRowSum }); Cursor sumCursor = db .rawQuery( "SELECT '0' as _id, 'Summe:' as name, COUNT(l._id) as counter, SUM(l.price) as itemsum " + "FROM drinks d JOIN drinklog l ON d._id = l.drink_id " + "WHERE l.log_time >= datetime('now', '-" + days + " day') ", null); // new String[] // {Integer.toString(days)}); SimpleCursorAdapter sumAdapter = new I18NSimpleCursorAdapter(this, R.layout.historysum, sumCursor, new String[] { "name", "counter", "itemsum" }, new int[] { R.id.historyRowName, R.id.historyRowAmount, R.id.historyRowSum }, new int[]{0}) { NumberFormat format = NumberFormat.getNumberInstance(); @Override public View getView(int position, View convertView, ViewGroup parent) { View view = super.getView(position, convertView, parent); TextView text = (TextView) view.findViewById(R.id.historyRowSum); Cursor c = getCursor(); text.setText(format.format(c.getInt(c.getColumnIndex("itemsum"))/100d)); return view; } }; sumView.setAdapter(sumAdapter); listView.setAdapter(new ImageAdapter(this, cursor)); } class ImageAdapter extends I18NSimpleCursorAdapter { private String header; private NumberFormat format; public ImageAdapter(Context ctx, Cursor cursor) { super(ctx, R.layout.historyrow, cursor, new String[] { "category", "name", "counter", "itemsum" }, new int[] { R.id.historyRowImage, R.id.historyRowName, R.id.historyRowAmount, R.id.historyRowSum }, new int[] {1}); format = NumberFormat.getNumberInstance(); format.setMinimumFractionDigits(2); } /* * @Override * * public void setViewImage(ImageView v, String value) { Log.d(TAG, * "setImageView: " + value); super.setViewImage(v, getIcon(value)); } */ @Override public View getView(int position, View convertView, ViewGroup parent) { Log.d(TAG, "Requested in Gradient " + header + ":" + position); View view = super.getView(position, convertView, parent); // setBackgroundResource(R.drawable.entry); //view.setBackgroundResource(R.drawable.entry); ImageView imageView = (ImageView) view.findViewById(R.id.historyRowImage); Cursor cursor = getCursor(); int category = cursor.getInt(cursor.getColumnIndex("category")); imageView.setImageResource(Utilities.getIcon(category)); TextView text = (TextView) view.findViewById(R.id.historyRowSum); text.setText(format.format(cursor.getLong(cursor.getColumnIndex("itemsum"))/100d)); /* * TextView sumText = (TextView) view.findViewById(R.id.historyRowSum); * sumText.setText(format.format(cursor.getLong(cursor.getColumnIndex("itemsum"))/100d)); */ return view; } } @Override protected void onDestroy() { db.close(); super.onDestroy(); } }
mikegr/aLogMyNight
src/at/madexperts/logmynight/HistoryActivity.java
Java
gpl-3.0
11,055
package com.github.lazylazuli.lib.common.block.state; import mcp.MethodsReturnNonnullByDefault; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumBlockRenderType; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import javax.annotation.ParametersAreNonnullByDefault; @MethodsReturnNonnullByDefault @ParametersAreNonnullByDefault public interface BlockStateTile { default boolean onBlockEventReceived(World worldIn, BlockPos pos, int id, int param) { TileEntity tileentity = worldIn.getTileEntity(pos); return tileentity != null && tileentity.receiveClientEvent(id, param); } default EnumBlockRenderType getRenderType() { return EnumBlockRenderType.INVISIBLE; } }
lazylazuli/LazyLazuliLib
src/main/java/com/github/lazylazuli/lib/common/block/state/BlockStateTile.java
Java
gpl-3.0
730
#region Copyright & License Information /* * Copyright 2007-2013 The OpenRA Developers (see AUTHORS) * This file is part of OpenRA, which is free software. It is made * available to you under the terms of the GNU General Public License * as published by the Free Software Foundation. For more information, * see COPYING. */ #endregion using System; using System.Drawing; namespace OpenRA { /// <summary> /// 3d World vector for describing offsets and distances - 1024 units = 1 cell. /// </summary> public struct WVec { public readonly int X, Y, Z; public WVec(int x, int y, int z) { X = x; Y = y; Z = z; } public WVec(WRange x, WRange y, WRange z) { X = x.Range; Y = y.Range; Z = z.Range; } public static readonly WVec Zero = new WVec(0, 0, 0); public static WVec operator +(WVec a, WVec b) { return new WVec(a.X + b.X, a.Y + b.Y, a.Z + b.Z); } public static WVec operator -(WVec a, WVec b) { return new WVec(a.X - b.X, a.Y - b.Y, a.Z - b.Z); } public static WVec operator -(WVec a) { return new WVec(-a.X, -a.Y, -a.Z); } public static WVec operator /(WVec a, int b) { return new WVec(a.X / b, a.Y / b, a.Z / b); } public static WVec operator *(int a, WVec b) { return new WVec(a * b.X, a * b.Y, a * b.Z); } public static WVec operator *(WVec a, int b) { return b*a; } public static bool operator ==(WVec me, WVec other) { return (me.X == other.X && me.Y == other.Y && me.Z == other.Z); } public static bool operator !=(WVec me, WVec other) { return !(me == other); } public static int Dot(WVec a, WVec b) { return a.X * b.X + a.Y * b.Y + a.Z * b.Z; } public long LengthSquared { get { return (long)X * X + (long)Y * Y + (long)Z * Z; } } public int Length { get { return (int)Math.Sqrt(LengthSquared); } } public long HorizontalLengthSquared { get { return (long)X * X + (long)Y * Y; } } public int HorizontalLength { get { return (int)Math.Sqrt(HorizontalLengthSquared); } } public WVec Rotate(WRot rot) { var mtx = rot.AsMatrix(); var lx = (long)X; var ly = (long)Y; var lz = (long)Z; return new WVec( (int)((lx * mtx[0] + ly*mtx[4] + lz*mtx[8]) / mtx[15]), (int)((lx * mtx[1] + ly*mtx[5] + lz*mtx[9]) / mtx[15]), (int)((lx * mtx[2] + ly*mtx[6] + lz*mtx[10]) / mtx[15])); } public static WVec Lerp(WVec a, WVec b, int mul, int div) { return a + (b - a) * mul / div; } public static WVec LerpQuadratic(WVec a, WVec b, WAngle pitch, int mul, int div) { // Start with a linear lerp between the points var ret = Lerp(a, b, mul, div); if (pitch.Angle == 0) return ret; // Add an additional quadratic variation to height // Uses fp to avoid integer overflow var offset = (int)((float)((float)(b - a).Length*pitch.Tan()*mul*(div - mul)) / (float)(1024*div*div)); return new WVec(ret.X, ret.Y, ret.Z + offset); } // Sampled a N-sample probability density function in the range [-1024..1024, -1024..1024] // 1 sample produces a rectangular probability // 2 samples produces a triangular probability // ... // N samples approximates a true gaussian public static WVec FromPDF(Thirdparty.Random r, int samples) { return new WVec(WRange.FromPDF(r, samples), WRange.FromPDF(r, samples), WRange.Zero); } public override int GetHashCode() { return X.GetHashCode() ^ Y.GetHashCode() ^ Z.GetHashCode(); } public override bool Equals(object obj) { if (obj == null) return false; WVec o = (WVec)obj; return o == this; } public override string ToString() { return "{0},{1},{2}".F(X, Y, Z); } } }
TiriliPiitPiit/OpenRA
OpenRA.FileFormats/WVec.cs
C#
gpl-3.0
3,550
package com.abm.mainet.rnl.service; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; import java.util.List; import javax.annotation.Resource; import org.apache.commons.lang.StringUtils; import org.apache.log4j.Logger; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.abm.mainet.cfc.challan.dto.ChallanReceiptPrintDTO; import com.abm.mainet.cfc.challan.service.IChallanService; import com.abm.mainet.common.constant.MainetConstants; import com.abm.mainet.common.constant.PrefixConstants; import com.abm.mainet.common.domain.LocationMasEntity; import com.abm.mainet.common.domain.Organisation; import com.abm.mainet.common.dto.ApplicantDetailDTO; import com.abm.mainet.common.dto.CommonChallanDTO; import com.abm.mainet.common.dto.WardZoneBlockDTO; import com.abm.mainet.common.integration.dms.service.IFileUploadService; import com.abm.mainet.common.master.repository.TbCfcApplicationAddressJpaRepository; import com.abm.mainet.common.master.repository.TbCfcApplicationMstJpaRepository; import com.abm.mainet.common.service.ApplicationService; import com.abm.mainet.common.service.IOrganisationService; import com.abm.mainet.common.utility.ApplicationContextProvider; import com.abm.mainet.common.utility.CommonMasterUtility; import com.abm.mainet.common.utility.LookUp; import com.abm.mainet.common.utility.SeqGenFunctionUtility; import com.abm.mainet.common.utility.UtilityService; import com.abm.mainet.rnl.domain.EstateBooking; import com.abm.mainet.rnl.domain.EstateEntity; import com.abm.mainet.rnl.domain.EstatePropertyEntity; import com.abm.mainet.rnl.dto.BookingReqDTO; import com.abm.mainet.rnl.dto.BookingResDTO; import com.abm.mainet.rnl.dto.EstateBookingDTO; import com.abm.mainet.rnl.dto.EstatePropResponseDTO; import com.abm.mainet.rnl.dto.PropFreezeDTO; import com.abm.mainet.rnl.dto.PropInfoDTO; import com.abm.mainet.rnl.dto.PropertyResDTO; import com.abm.mainet.rnl.repository.EstateBookingRepository; import com.abm.mainet.rnl.repository.EstatePropertyRepository; /** * @author ritesh.patil * */ @Service @Repository public class EstateBookingServiceImpl implements IEstateBookingService { @Autowired private EstatePropertyRepository estatePropertyRepository; @Autowired private ApplicationService applicationService; @Autowired private IChallanService iChallanService; @Resource private IFileUploadService fileUploadService; @Autowired private EstateBookingRepository estateBookingRepository; @Autowired private IOrganisationService iOrganisationService; @Autowired private SeqGenFunctionUtility seqGenFunctionUtility; private static Logger logger = Logger.getLogger(EstateBookingServiceImpl.class); @Override @Transactional(readOnly = true) public PropertyResDTO getAllRentedProperties(final String subCategoryName, final String prefixName, final Long orgId, final Integer subCategoryType) { EstatePropResponseDTO estatePropResponseDTO = null; List<EstatePropResponseDTO> estatePropResponseDTOs = null; final PropertyResDTO propResponseDTO = new PropertyResDTO(); List<EstatePropertyEntity> list = null; if (null == subCategoryType) { list = estatePropertyRepository.getAllRentedProperties(subCategoryName, prefixName, orgId); } else { list = estatePropertyRepository.getFilteredRentedProperties(subCategoryName, prefixName, orgId, subCategoryType); } if (list != null) { estatePropResponseDTOs = new ArrayList<>(); for (final EstatePropertyEntity estatePropertyEntity : list) { estatePropResponseDTO = new EstatePropResponseDTO(); estatePropResponseDTO.setPropId(estatePropertyEntity.getPropId()); estatePropResponseDTO.setPropName(estatePropertyEntity.getName()); estatePropResponseDTO.setPropertyNo(estatePropertyEntity.getCode()); final EstateEntity estateEntity = estatePropertyEntity.getEstateEntity(); estatePropResponseDTO.setCategory(findCategoryName(estateEntity.getType2(), orgId)); final LocationMasEntity locationMasEntity = estateEntity.getLocationMas(); estatePropResponseDTO.setLocation(locationMasEntity.getLocAddress() + " " + locationMasEntity.getPincode()); estatePropResponseDTOs.add(estatePropResponseDTO); } propResponseDTO.setEstatePropResponseDTOs(estatePropResponseDTOs); } return propResponseDTO; } private String findCategoryName(final long subCategoryId, final Long orgId) { String categoryName = StringUtils.EMPTY; final List<LookUp> lookUps = CommonMasterUtility.getNextLevelData(PrefixConstants.CATEGORY_PREFIX_NAME, MainetConstants.EstateBooking.LEVEL, orgId); if ((lookUps != null) && !lookUps.isEmpty()) { for (final LookUp lookUp : lookUps) { if (lookUp.getLookUpId() == subCategoryId) { categoryName = lookUp.getDescLangFirst(); break; } } } return categoryName == null ? "" : categoryName; } @Override @Transactional public BookingResDTO saveEstateBooking(final BookingReqDTO bookingReqDTO, final CommonChallanDTO offline, final String serviceName) { setRequestApplicantDetails(bookingReqDTO); final EstateBookingDTO estateBookingDTO = bookingReqDTO.getEstateBookingDTO(); bookingReqDTO.setOrgId(estateBookingDTO.getOrgId()); bookingReqDTO.setLangId(estateBookingDTO.getLangId()); bookingReqDTO.setUserId(estateBookingDTO.getCreatedBy()); final Long applicationId = applicationService.createApplication(bookingReqDTO); ChallanReceiptPrintDTO printDto = null; if (offline != null) { offline.setApplNo(applicationId); printDto = iChallanService.savePayAtUlbCounter(offline, serviceName); } final Long javaFq = seqGenFunctionUtility.generateSequenceNo(MainetConstants.RnLCommon.RentLease, MainetConstants.EstateMaster.TB_RL_ESTATE_MAS, MainetConstants.EstateMaster.ES_CODE, estateBookingDTO.getOrgId(), MainetConstants.RnLCommon.Flag_C, null); EstateBooking estateBooking = new EstateBooking(); BeanUtils.copyProperties(estateBookingDTO, estateBooking); estateBooking.setApplicationId(applicationId); estateBooking.setBookingNo(javaFq.toString()); estateBooking.setBookingDate(new Date()); final EstatePropertyEntity estatePropertyEntity = new EstatePropertyEntity(); estatePropertyEntity.setPropId(bookingReqDTO.getEstatePropResponseDTO().getPropId()); estateBooking.setEstatePropertyEntity(estatePropertyEntity); estateBooking.setAmount(bookingReqDTO.getPayAmount()); estateBooking.setSecurityAmount(0.0); // HArd Code estateBooking.setTermAccepted(true); estateBooking.setPayFlag(true); estateBooking.setBookingStatus(MainetConstants.RnLCommon.Y_FLAG); estateBooking = estateBookingRepository.save(estateBooking); estateBookingRepository.updateAppliactionMst(estateBooking.getApplicationId()); final BookingResDTO bookingResDTO = new BookingResDTO(); if (offline != null) { bookingResDTO.setChallanReceiptPrintDTO(printDto); } bookingResDTO.setBookingNo(estateBooking.getBookingNo()); bookingResDTO.setApplicationNo(estateBooking.getApplicationId()); bookingResDTO.setStatus("success"); bookingReqDTO.setApplicationId(applicationId); if ((bookingReqDTO.getDocumentList() != null) && !bookingReqDTO.getDocumentList().isEmpty()) { fileUploadService.doFileUpload(bookingReqDTO.getDocumentList(), bookingReqDTO); } return bookingResDTO; } private void setRequestApplicantDetails(final BookingReqDTO reqDTO) { final ApplicantDetailDTO appDTO = reqDTO.getApplicantDetailDto(); final Organisation organisation = new Organisation(); final Long orgId = reqDTO.getEstateBookingDTO().getOrgId(); organisation.setOrgid(orgId); reqDTO.setmName(appDTO.getApplicantMiddleName()); reqDTO.setfName(appDTO.getApplicantFirstName()); reqDTO.setlName(appDTO.getApplicantLastName()); reqDTO.setEmail(appDTO.getEmailId()); reqDTO.setMobileNo(appDTO.getMobileNo()); reqDTO.setTitleId(appDTO.getApplicantTitle()); reqDTO.setBldgName(appDTO.getBuildingName()); reqDTO.setRoadName(appDTO.getRoadName()); reqDTO.setAreaName(appDTO.getAreaName()); if ((appDTO.getPinCode() != null) && !appDTO.getPinCode().isEmpty()) { reqDTO.setPincodeNo(Long.valueOf(appDTO.getPinCode())); } reqDTO.setWing(appDTO.getWing()); reqDTO.setBplNo(appDTO.getBplNo()); reqDTO.setDeptId(reqDTO.getDeptId()); reqDTO.setFloor(appDTO.getFloorNo()); reqDTO.setWardNo(appDTO.getDwzid2()); reqDTO.setZoneNo(appDTO.getDwzid1()); reqDTO.setCityName(appDTO.getVillageTownSub()); reqDTO.setBlockName(appDTO.getBlockName()); reqDTO.setHouseComplexName(appDTO.getHousingComplexName()); reqDTO.setFlatBuildingNo(appDTO.getFlatBuildingNo()); if ((appDTO.getAadharNo() != null) && !appDTO.getAadharNo().equals("")) { reqDTO.setUid(Long.valueOf(appDTO.getAadharNo().replaceAll("\\s", ""))); } final List<LookUp> lookUps = CommonMasterUtility.getLookUps(MainetConstants.GENDER, organisation); for (final LookUp lookUp : lookUps) { if ((appDTO.getGender() != null) && !appDTO.getGender().isEmpty()) { if (lookUp.getLookUpId() == Long.parseLong(appDTO.getGender())) { appDTO.setGender(lookUp.getLookUpCode()); break; } } } reqDTO.setGender(appDTO.getGender()); } @Override @Transactional(readOnly = true) public WardZoneBlockDTO getWordZoneBlockByApplicationId(final Long applicationId, final Long serviceId, final Long orgId) { final Long id = estateBookingRepository.getApplicantInformationById(applicationId, orgId); WardZoneBlockDTO wardZoneDTO = null; if (id != null) { wardZoneDTO = new WardZoneBlockDTO(); wardZoneDTO.setAreaDivision1(id); } return wardZoneDTO; } @Override @Transactional(readOnly = true) public List<EstateBookingDTO> findByPropId(final Long propId, final Long orgId) { final List<EstateBooking> estateBooking = estateBookingRepository .findByEstatePropertyEntityPropIdAndOrgIdAndBookingStatusNotIn(propId, orgId, "U"); final List<EstateBookingDTO> list = new ArrayList<>(); EstateBookingDTO bookingDTO = null; if (null != estateBooking) { for (final EstateBooking booking : estateBooking) { bookingDTO = new EstateBookingDTO(); bookingDTO.setId(booking.getId()); bookingDTO.setToDate(booking.getToDate()); bookingDTO.setFromDate(booking.getFromDate()); bookingDTO.setShiftName(getShiftNameById(booking)); bookingDTO.setBookingStatus(booking.getBookingStatus()); list.add(bookingDTO); } } return list; } private String getShiftNameById(final EstateBooking estateBooking) { String name = null; final Organisation organisation = new Organisation(); organisation.setOrgid(estateBooking.getOrgId()); final List<LookUp> lookUps = CommonMasterUtility.getLookUps(PrefixConstants.SHIFT_PREFIX, organisation); for (final LookUp lookUp : lookUps) { if (lookUp.getLookUpId() == estateBooking.getShiftId()) { name = lookUp.getLookUpCode(); break; } } return name; } @Override @Transactional(readOnly = true) public List<String> getEstateBookingFromAndToDates(final Long propId, final Long orgId) { final Organisation organisation = iOrganisationService.getOrganisationById(orgId); final LookUp lookup = CommonMasterUtility.getValueFromPrefixLookUp(MainetConstants.SHIFT_PREFIX_GENERAL, PrefixConstants.SHIFT_PREFIX, organisation); List<String> dateList = null; final List<Object[]> objects = estateBookingRepository.getFromAndToDates(propId, lookup.getLookUpId(), orgId); dateList = new ArrayList<>(); for (final Object[] obj : objects) { getDaysBetweenDates(dateList, (Date) obj[0], (Date) obj[1]); } return dateList; } @Override @Transactional(readOnly = true) public List<String> getEstateBookingFromAndToDatesForGeneral(final Long propId, final Long orgId) { final List<Object[]> objects = estateBookingRepository.getFromAndToDatesForGeneral(propId, orgId); final List<String> dateList = new ArrayList<>(); for (final Object[] obj : objects) { getDaysBetweenDates(dateList, (Date) obj[0], (Date) obj[1]); } return dateList; } private List<String> getDaysBetweenDates(final List<String> dateList, final Date startdate, final Date enddate) { final Calendar calendar = new GregorianCalendar(); calendar.setTime(startdate); while (calendar.getTime().before(enddate) || calendar.getTime().equals(enddate)) { final Date result = calendar.getTime(); dateList.add(new SimpleDateFormat("d-M-yyyy").format(result)); calendar.add(Calendar.DATE, 1); } return dateList; } @Override @Transactional(readOnly = true) public List<LookUp> getEstateBookingShifts(final Long propId, final String fromdate, final String todate, final Long orgId) { List<LookUp> lookupShift = null; final Organisation organisation = iOrganisationService.getOrganisationById(orgId); if (fromdate.equals(todate)) { final List<LookUp> lookup = CommonMasterUtility.getListLookup(PrefixConstants.SHIFT_PREFIX, organisation); final Date dateD = UtilityService.convertStringDateToDateFormat(fromdate); lookupShift = new ArrayList<>(); final List<Long> fromAndtoDate = estateBookingRepository.getShitIdFromDate(propId, dateD, orgId); if ((fromAndtoDate == null) || fromAndtoDate.isEmpty()) { return lookup; } else { for (final LookUp look : lookup) { if (!fromAndtoDate.contains(look.getLookUpId())) { if (!look.getLookUpCode().equalsIgnoreCase(MainetConstants.SHIFT_PREFIX_GENERAL)) { lookupShift.add(look); } } } } } else { final LookUp lookup = CommonMasterUtility.getValueFromPrefixLookUp(MainetConstants.SHIFT_PREFIX_GENERAL, PrefixConstants.SHIFT_PREFIX, organisation); lookupShift = new ArrayList<>(); lookupShift.add(lookup); } return lookupShift; } @Override @Transactional(readOnly = true) public PropInfoDTO findBooking(final Long bookId, final Long orgId) { final EstateBooking estateBooking = estateBookingRepository.findByIdAndOrgId(bookId, orgId); final TbCfcApplicationMstJpaRepository tbCfcApplicationMstJpaRepository = ApplicationContextProvider .getApplicationContext() .getBean(TbCfcApplicationMstJpaRepository.class); final TbCfcApplicationAddressJpaRepository tbCfcApplicationAddressJpaRepository = ApplicationContextProvider .getApplicationContext().getBean(TbCfcApplicationAddressJpaRepository.class); final List<Object[]> appliInfoList = tbCfcApplicationMstJpaRepository.getApplicantInfo(estateBooking.getApplicationId(), orgId); final List<Object[]> addressInfoList = tbCfcApplicationAddressJpaRepository.findAddressInfo( estateBooking.getApplicationId(), orgId); final PropInfoDTO propInfoDTO = new PropInfoDTO(); propInfoDTO.setToDate(estateBooking.getToDate()); propInfoDTO.setFromDate(estateBooking.getFromDate()); propInfoDTO.setDayPeriod(getShiftNameById(estateBooking)); propInfoDTO.setBookingPuprpose(estateBooking.getPurpose()); propInfoDTO.setBookingId(estateBooking.getBookingNo().toString()); propInfoDTO.setPropName(estateBooking.getEstatePropertyEntity().getName()); String mName = ""; for (final Object[] strings : appliInfoList) { if (strings[1] != null) { mName = strings[1].toString(); } propInfoDTO.setApplicantName(strings[0].toString() + " " + mName + " " + strings[2].toString()); } for (final Object[] strings : addressInfoList) { propInfoDTO.setAreaName(strings[0].toString()); propInfoDTO.setCity(strings[1].toString()); propInfoDTO.setPinCode(strings[2].toString()); propInfoDTO.setContactNo(strings[3].toString()); } final Organisation organisation = new Organisation(); organisation.setOrgid(orgId); final LookUp lookup = CommonMasterUtility .getHierarchicalLookUp(estateBooking.getEstatePropertyEntity().getEstateEntity().getType2(), organisation); propInfoDTO.setCategory(lookup.getLookUpDesc()); return propInfoDTO; } @Override @Transactional public boolean saveFreezeProperty(final EstateBookingDTO estateBookingDTO) { EstateBooking estateBooking = new EstateBooking(); BeanUtils.copyProperties(estateBookingDTO, estateBooking); estateBooking.setApplicationId(0L); estateBooking.setBookingNo("0"); estateBooking.setBookingDate(new Date()); final EstatePropertyEntity estatePropertyEntity = new EstatePropertyEntity(); estatePropertyEntity.setPropId(estateBookingDTO.getPropId()); estateBooking.setEstatePropertyEntity(estatePropertyEntity); estateBooking.setAmount(0.0); estateBooking.setSecurityAmount(0.0); // HArd Code estateBooking.setTermAccepted(false); estateBooking.setPayFlag(false); estateBooking.setBookingStatus(MainetConstants.RnLCommon.F_FLAG); estateBooking = estateBookingRepository.save(estateBooking); return true; } @Override @Transactional(readOnly = true) public List<PropFreezeDTO> findAllFreezeBookingProp(final Long orgId, final String bookingStatus) { final List<EstateBooking> estateBookingList = estateBookingRepository.findByOrgIdAndBookingStatus(orgId, bookingStatus); final Organisation organisation = new Organisation(); organisation.setOrgid(orgId); PropFreezeDTO propFreezeDTO = null; final List<PropFreezeDTO> dtos = new ArrayList<>(); for (final EstateBooking estateBooking : estateBookingList) { propFreezeDTO = new PropFreezeDTO(); propFreezeDTO.setId(estateBooking.getId()); propFreezeDTO.setEstate(estateBooking.getEstatePropertyEntity().getEstateEntity().getNameEng()); propFreezeDTO.setProperty(estateBooking.getEstatePropertyEntity().getName()); propFreezeDTO.setLocation(estateBooking.getEstatePropertyEntity().getEstateEntity().getLocationMas().getLocNameEng()); propFreezeDTO.setFromDate(UtilityService.convertDateToDDMMYYYY(estateBooking.getFromDate())); propFreezeDTO.setToDate(UtilityService.convertDateToDDMMYYYY(estateBooking.getToDate())); propFreezeDTO.setShift( CommonMasterUtility.getNonHierarchicalLookUpObject(estateBooking.getShiftId(), organisation).getLookUpDesc()); propFreezeDTO.setPurpose(estateBooking.getPurpose()); dtos.add(propFreezeDTO); } return dtos; } @Override @Transactional public int updateFreezeProperty(final Long id, final Long empId) { estateBookingRepository.updateFreezeProperty(id, empId); return 0; } @Override @Transactional(readOnly = true) public boolean findCountForProperty(final Long orgId, final Long propId) { boolean count = true; if (estateBookingRepository.findCountForProperty(orgId, propId) > 0L) { count = false; } return count; } }
abmindiarepomanager/ABMOpenMainet
Mainet1.1/MainetServiceParent/MainetServiceRnL/src/main/java/com/abm/mainet/rnl/service/EstateBookingServiceImpl.java
Java
gpl-3.0
21,560
// Cekirdekler API: a C# explicit multi-device load-balancer opencl wrapper // Copyright(C) 2017 Hüseyin Tuğrul BÜYÜKIŞIK // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program.If not, see<http://www.gnu.org/licenses/>. using Cekirdekler; using System; using System.Collections.Generic; using System.Runtime.InteropServices; using System.Text; using System.Web.Script.Serialization; namespace ClObject { /// <summary> /// cl::platform wrapper with simple methods /// </summary> internal class ClPlatform { public static JavaScriptSerializer json = new JavaScriptSerializer(); [DllImport("KutuphaneCL.dll", CallingConvention = CallingConvention.Cdecl)] private static extern IntPtr createPlatform(IntPtr hList, int index); [DllImport("KutuphaneCL.dll", CallingConvention = CallingConvention.Cdecl)] private static extern void deletePlatform(IntPtr hPlatform); [DllImport("KutuphaneCL.dll", CallingConvention = CallingConvention.Cdecl)] private static extern IntPtr getPlatformInfo(IntPtr hPlatform); [DllImport("KutuphaneCL", CallingConvention = CallingConvention.Cdecl)] private static extern IntPtr getPlatformNameString(IntPtr hPlatform); [DllImport("KutuphaneCL", CallingConvention = CallingConvention.Cdecl)] private static extern IntPtr getPlatformVendorNameString(IntPtr hPlatform); /// <summary> /// takes cpu flag to be used later in other wrappers /// </summary> /// <returns></returns> [DllImport("KutuphaneCL", CallingConvention = CallingConvention.Cdecl)] public static extern int CODE_CPU(); /// <summary> /// takes gpu flag to be used later in other wrappers /// </summary> /// <returns></returns> [DllImport("KutuphaneCL", CallingConvention = CallingConvention.Cdecl)] public static extern int CODE_GPU(); /// <summary> /// takes accelerator flag to be used in other wrappers /// </summary> /// <returns></returns> [DllImport("KutuphaneCL", CallingConvention = CallingConvention.Cdecl)] public static extern int CODE_ACC(); /// <summary> /// number of cpus in a platform /// </summary> /// <param name="hPlatform"></param> /// <returns></returns> [DllImport("KutuphaneCL", CallingConvention = CallingConvention.Cdecl)] public static extern int numberOfCpusInPlatform(IntPtr hPlatform); /// <summary> /// number of gpus in a platform /// </summary> /// <param name="hPlatform"></param> /// <returns></returns> [DllImport("KutuphaneCL", CallingConvention = CallingConvention.Cdecl)] public static extern int numberOfGpusInPlatform(IntPtr hPlatform); /// <summary> /// number of accelerators in platorm /// </summary> /// <param name="hPlatform"></param> /// <returns></returns> [DllImport("KutuphaneCL", CallingConvention = CallingConvention.Cdecl)] public static extern int numberOfAcceleratorsInPlatform(IntPtr hPlatform); private IntPtr hPlatform; private bool isDeleted = false; private int intPlatformErrorCode = 0; private int platformIndex = -1; public List<ClDevice> selectedDevices; public string platformName; public string vendorName; /// <summary> /// gets a platform from a list of platforms in "C" space using an index /// </summary> /// <param name="hPlatformList_">C space array with N platforms</param> /// <param name="index_">0 to N-1</param> public ClPlatform(IntPtr hPlatformList_, int index_) { platformIndex = index_; hPlatform = createPlatform(hPlatformList_,index_); selectedDevices = new List<ClDevice>(); // platform deletes these when disposed platformName=JsonCPPCS.readWithoutDispose(getPlatformNameString(hPlatform)); vendorName= JsonCPPCS.readWithoutDispose(getPlatformVendorNameString(hPlatform)); // platformName and vendorName are deleted when hPlatform is deleted } /// <summary> /// this platform is used in number crunching and will be disposed in there /// </summary> public void cruncherWillDispose() { isDeleted = true; } internal ClPlatform copy() { IntPtr hList= Cores.platformList(); ClPlatform tmp = new ClPlatform(hList,platformIndex); Cores.deletePlatformList(hList); return tmp; } /// <summary> /// number of gpus in this platform /// </summary> /// <returns></returns> public int numberOfGpus() { return numberOfGpusInPlatform(hPlatform); } /// <summary> /// number of cpus in this platform /// </summary> /// <returns></returns> public int numberOfCpus() { return numberOfCpusInPlatform(hPlatform); } /// <summary> /// number of accelerators in this platform /// </summary> /// <returns></returns> public int numberOfAccelerators() { return numberOfAcceleratorsInPlatform(hPlatform); } /// <summary> /// handle to this platform in C space /// </summary> /// <returns></returns> public IntPtr h() { return hPlatform; } /// <summary> /// disposes C space platform objects /// </summary> public void dispose() { if (!isDeleted) deletePlatform(hPlatform); isDeleted = true; } /// <summary> /// release C++ resources when not needed(and not having referenced by devices) /// </summary> ~ClPlatform() { dispose(); } private class PlatformInformation { public int totalCPUs; public int totalGPUs; public int totalACCs; public float[] testVariables; public string strTest; } } }
tugrul512bit/Cekirdekler
Cekirdekler/Cekirdekler/ClPlatform.cs
C#
gpl-3.0
7,121
// CANAPE Network Testing Tool // Copyright (C) 2014 Context Information Security // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. using System; using CANAPE.Net.Filters; using CANAPE.Net.Layers; using CANAPE.Utils; namespace CANAPE.Documents.Net.Factories { /// <summary> /// A factory object for a filter /// </summary> [Serializable] public abstract class ProxyFilterFactory { /// <summary> /// A netgraph to use for this connection (if null then use the default) /// </summary> public NetGraphDocument Graph { get; set; } /// <summary> /// A proxy client to use for this connection (if null then use default) /// </summary> public IProxyClientFactory Client { get; set; } /// <summary> /// List of layer factories /// </summary> public INetworkLayerFactory[] Layers { get; set; } /// <summary> /// Indicates this filter should block connection /// </summary> public bool Block { get; set; } /// <summary> /// Method to create the filter /// </summary> /// <returns></returns> protected abstract ProxyFilter OnCreateFilter(); /// <summary> /// Create the filter from the factory /// </summary> /// <returns></returns> public ProxyFilter CreateFilter() { ProxyFilter filter = OnCreateFilter(); if (filter != null) { filter.Graph = Graph != null ? Graph.Factory : null; if (Client != null) { filter.Client = Client.Create(null); } if (Layers != null) { filter.Layers = Layers; } filter.Block = Block; } return filter; } } }
ctxis/canape
CANAPE.Documents/Net/Factories/ProxyFilterFactory.cs
C#
gpl-3.0
2,613
package de.rohmio.lol.api.endpoint.staticdata; import java.lang.reflect.Type; import java.util.Locale; import de.rohmio.lol.api.endpoint.constant.RuneData; import de.rohmio.lol.api.model.Rune; public class RuneRequest extends AbstractRequest<Rune> { public RuneRequest(int id) { super("/lol/static-data/v3/runes/"+id); } @Override protected Type getType() { return Rune.class; } public void addRuneData(RuneData runeData) { addParameter("runeData", runeData.name()); } public void setVersion(String version) { setParameter("version", version); } public void setLocale(Locale locale) { setParameter("locale", locale.toString()); } }
SuppenNudel/RiotGamesApi
RiotGamesApi/src/de/rohmio/lol/api/endpoint/staticdata/RuneRequest.java
Java
gpl-3.0
662
package Coinbase::TransactionSend; use base qw(Coinbase::Request); use strict; use constant URL => 'https://coinbase.com/api/v1/transactions/send_money'; use constant ATTRIBUTES => qw(account_id transaction); sub token_id { my $self = shift; $self->get_set(@_) } sub attributes { ATTRIBUTES } sub url { URL } sub is_ready { my $self = shift; return defined $self->transaction and ref $self->transaction eq 'HASH' and exists $self->transaction->{to}; } 1; __END__
peawormsworth/perl-api-coinbase
Coinbase/TransactionSend.pm
Perl
gpl-3.0
513
package fi.dy.masa.enderutilities.tileentity; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.UUID; import javax.annotation.Nullable; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.SoundEvents; import net.minecraft.inventory.Container; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumFacing; import net.minecraft.util.ITickable; import net.minecraft.util.NonNullList; import net.minecraft.util.SoundCategory; import net.minecraft.util.math.MathHelper; import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.IItemHandler; import net.minecraftforge.items.IItemHandlerModifiable; import net.minecraftforge.items.wrapper.CombinedInvWrapper; import net.minecraftforge.items.wrapper.InvWrapper; import net.minecraftforge.items.wrapper.PlayerOffhandInvWrapper; import fi.dy.masa.enderutilities.gui.client.GuiCreationStation; import fi.dy.masa.enderutilities.inventory.IModularInventoryHolder; import fi.dy.masa.enderutilities.inventory.ItemStackHandlerTileEntity; import fi.dy.masa.enderutilities.inventory.container.ContainerCreationStation; import fi.dy.masa.enderutilities.inventory.container.base.SlotRange; import fi.dy.masa.enderutilities.inventory.item.InventoryItemCallback; import fi.dy.masa.enderutilities.inventory.wrapper.InventoryCraftingPermissions; import fi.dy.masa.enderutilities.inventory.wrapper.ItemHandlerCraftResult; import fi.dy.masa.enderutilities.inventory.wrapper.ItemHandlerWrapperPermissions; import fi.dy.masa.enderutilities.inventory.wrapper.ItemHandlerWrapperSelectiveModifiable; import fi.dy.masa.enderutilities.reference.ReferenceNames; import fi.dy.masa.enderutilities.util.InventoryUtils; import fi.dy.masa.enderutilities.util.InventoryUtils.InvResult; import fi.dy.masa.enderutilities.util.ItemType; import fi.dy.masa.enderutilities.util.nbt.NBTUtils; public class TileEntityCreationStation extends TileEntityEnderUtilitiesInventory implements IModularInventoryHolder, ITickable { public static final int GUI_ACTION_SELECT_MODULE = 0; public static final int GUI_ACTION_MOVE_ITEMS = 1; public static final int GUI_ACTION_SET_QUICK_ACTION = 2; public static final int GUI_ACTION_CLEAR_CRAFTING_GRID = 3; public static final int GUI_ACTION_RECIPE_LOAD = 4; public static final int GUI_ACTION_RECIPE_STORE = 5; public static final int GUI_ACTION_RECIPE_CLEAR = 6; public static final int GUI_ACTION_TOGGLE_MODE = 7; public static final int GUI_ACTION_SORT_ITEMS = 8; public static final int INV_SIZE_ITEMS = 27; public static final int INV_ID_MODULES = 1; public static final int INV_ID_CRAFTING_LEFT = 2; public static final int INV_ID_CRAFTING_RIGHT = 3; public static final int INV_ID_FURNACE = 4; public static final int COOKTIME_INC_SLOW = 12; // Slow/eco mode: 5 seconds per item public static final int COOKTIME_INC_FAST = 30; // Fast mode: 2 second per item (2.5x as fast) public static final int COOKTIME_DEFAULT = 1200; // Base cooktime per item: 5 seconds on slow public static final int BURNTIME_USAGE_SLOW = 20; // Slow/eco mode base usage public static final int BURNTIME_USAGE_FAST = 120; // Fast mode: use fuel 6x faster over time // The crafting mode button bits are in continuous order for easier checking in the gui public static final int MODE_BIT_LEFT_CRAFTING_OREDICT = 0x0001; public static final int MODE_BIT_LEFT_CRAFTING_KEEPONE = 0x0002; public static final int MODE_BIT_LEFT_CRAFTING_AUTOUSE = 0x0004; public static final int MODE_BIT_RIGHT_CRAFTING_OREDICT = 0x0008; public static final int MODE_BIT_RIGHT_CRAFTING_KEEPONE = 0x0010; public static final int MODE_BIT_RIGHT_CRAFTING_AUTOUSE = 0x0020; public static final int MODE_BIT_LEFT_FAST = 0x0040; public static final int MODE_BIT_RIGHT_FAST = 0x0080; // Note: The selected recipe index is stored in bits 0x3F00 for right and left side (3 bits for each) public static final int MODE_BIT_SHOW_RECIPE_LEFT = 0x4000; public static final int MODE_BIT_SHOW_RECIPE_RIGHT = 0x8000; private InventoryItemCallback itemInventory; private ItemHandlerWrapperPermissions wrappedInventory; private final IItemHandler itemHandlerMemoryCards; private final ItemStackHandlerTileEntity furnaceInventory; private final IItemHandler furnaceInventoryWrapper; private final InventoryItemCallback[] craftingInventories; private final List<NonNullList<ItemStack>> craftingGridTemplates; private final ItemHandlerCraftResult[] craftResults; private final NonNullList<ItemStack> recipeItems0; private final NonNullList<ItemStack> recipeItems1; private int selectedModule; private int actionMode; private Map<UUID, Long> clickTimes; private ItemStack[] smeltingResultCache; private int[] burnTimeRemaining; // Remaining burn time from the currently burning fuel private int[] burnTimeFresh; // The time the currently burning fuel will burn in total private int[] cookTime; // The time the currently cooking item has been cooking for private boolean[] inputDirty; private int modeMask; private int recipeLoadClickCount; public int lastInteractedCraftingGrid; public TileEntityCreationStation() { super(ReferenceNames.NAME_TILE_ENTITY_CREATION_STATION); this.itemHandlerBase = new ItemStackHandlerTileEntity(INV_ID_MODULES, 4, 1, false, "Items", this); this.itemHandlerMemoryCards = new TileEntityHandyChest.ItemHandlerWrapperMemoryCards(this.getBaseItemHandler()); this.craftingInventories = new InventoryItemCallback[2]; this.craftingGridTemplates = new ArrayList<NonNullList<ItemStack>>(); this.craftingGridTemplates.add(null); this.craftingGridTemplates.add(null); this.recipeItems0 = NonNullList.withSize(10, ItemStack.EMPTY); this.recipeItems1 = NonNullList.withSize(10, ItemStack.EMPTY); this.craftResults = new ItemHandlerCraftResult[] { new ItemHandlerCraftResult(), new ItemHandlerCraftResult() }; this.furnaceInventory = new ItemStackHandlerTileEntity(INV_ID_FURNACE, 6, 1024, true, "FurnaceItems", this); this.furnaceInventoryWrapper = new ItemHandlerWrapperFurnace(this.furnaceInventory); this.clickTimes = new HashMap<UUID, Long>(); this.smeltingResultCache = new ItemStack[] { ItemStack.EMPTY, ItemStack.EMPTY }; this.burnTimeRemaining = new int[2]; this.burnTimeFresh = new int[2]; this.cookTime = new int[2]; this.inputDirty = new boolean[] { true, true }; this.modeMask = 0; } @Override public void onLoad() { super.onLoad(); this.initStorage(this.getWorld().isRemote); } private void initStorage(boolean isRemote) { this.itemInventory = new InventoryItemCallback(null, INV_SIZE_ITEMS, true, isRemote, this); this.wrappedInventory = new ItemHandlerWrapperPermissions(this.itemInventory, null); this.itemHandlerExternal = this.wrappedInventory; this.craftingInventories[0] = new InventoryItemCallback(null, 9, 64, false, isRemote, this, "CraftItems_0"); this.craftingInventories[1] = new InventoryItemCallback(null, 9, 64, false, isRemote, this, "CraftItems_1"); if (isRemote == false) { ItemStack containerStack = this.getContainerStack(); this.itemInventory.setContainerItemStack(containerStack); this.craftingInventories[0].setContainerItemStack(containerStack); this.craftingInventories[1].setContainerItemStack(containerStack); } this.readModeMaskFromModule(); this.loadRecipe(0, this.getRecipeId(0)); this.loadRecipe(1, this.getRecipeId(1)); } public ItemHandlerWrapperPermissions getItemInventory(EntityPlayer player) { return new ItemHandlerWrapperPermissions(this.itemInventory, player); } @Override public IItemHandler getWrappedInventoryForContainer(EntityPlayer player) { return this.getItemInventory(player); } public InventoryCraftingPermissions getCraftingInventory(int invId, EntityPlayer player, Container container) { ItemHandlerWrapperPermissions invPerm = new ItemHandlerWrapperPermissions(this.craftingInventories[invId], player); return new InventoryCraftingPermissions(3, 3, invPerm, this.craftResults[invId], player, container); } public ItemHandlerCraftResult getCraftResultInventory(int invId) { return this.craftResults[invId]; } public IItemHandler getMemoryCardInventory() { return this.itemHandlerMemoryCards; } public IItemHandler getFurnaceInventory() { return this.furnaceInventoryWrapper; } /** * Gets a wrapped **InventoryCraftingPermissions** instance. * This must be used by anything that wants to modify the crafting grid contents, * so that the recipe and output slot will get updated properly! * @param gridId * @param player * @return */ @Nullable private IItemHandler getWrappedCraftingInventoryFromContainer(int gridId, EntityPlayer player) { if (player.openContainer instanceof ContainerCreationStation) { return new InvWrapper(((ContainerCreationStation) player.openContainer).getCraftingInventory(gridId)); } return null; } private boolean canAccessCraftingGrid(int gridId, EntityPlayer player) { if (player.openContainer instanceof ContainerCreationStation) { return ((ContainerCreationStation) player.openContainer).getCraftingInventory(gridId) .getBaseInventory().isAccessibleByPlayer(player); } return false; } private void updateCraftingResults(EntityPlayer player) { if (player.openContainer instanceof ContainerCreationStation) { ((ContainerCreationStation) player.openContainer).getCraftingInventory(0).markDirty(); ((ContainerCreationStation) player.openContainer).getCraftingInventory(1).markDirty(); } } @Override public void readFromNBTCustom(NBTTagCompound nbt) { this.setSelectedModuleSlot(nbt.getByte("SelModule")); this.actionMode = nbt.getByte("QuickMode"); this.modeMask = nbt.getByte("FurnaceMode"); for (int i = 0; i < 2; i++) { this.burnTimeRemaining[i] = nbt.getInteger("BurnTimeRemaining" + i); this.burnTimeFresh[i] = nbt.getInteger("BurnTimeFresh" + i); this.cookTime[i] = nbt.getInteger("CookTime" + i); } super.readFromNBTCustom(nbt); } @Override protected void readItemsFromNBT(NBTTagCompound nbt) { // This will read the Memory Cards themselves into the Memory Card inventory super.readItemsFromNBT(nbt); this.furnaceInventory.deserializeNBT(nbt); } @Override public NBTTagCompound writeToNBT(NBTTagCompound nbt) { nbt.setByte("QuickMode", (byte) this.actionMode); nbt.setByte("SelModule", (byte) this.selectedModule); nbt.setByte("FurnaceMode", (byte) (this.modeMask & (MODE_BIT_LEFT_FAST | MODE_BIT_RIGHT_FAST))); for (int i = 0; i < 2; i++) { nbt.setInteger("BurnTimeRemaining" + i, this.burnTimeRemaining[i]); nbt.setInteger("BurnTimeFresh" + i, this.burnTimeFresh[i]); nbt.setInteger("CookTime" + i, this.cookTime[i]); } super.writeToNBT(nbt); return nbt; } @Override public void writeItemsToNBT(NBTTagCompound nbt) { super.writeItemsToNBT(nbt); nbt.merge(this.furnaceInventory.serializeNBT()); } @Override public NBTTagCompound getUpdatePacketTag(NBTTagCompound nbt) { nbt = super.getUpdatePacketTag(nbt); nbt.setByte("msel", (byte)this.selectedModule); return nbt; } @Override public void handleUpdateTag(NBTTagCompound tag) { this.selectedModule = tag.getByte("msel"); super.handleUpdateTag(tag); } public int getQuickMode() { return this.actionMode; } public void setModeMask(int mask) { this.modeMask = mask; } public void setQuickMode(int mode) { this.actionMode = mode; } public int getSelectedModuleSlot() { return this.selectedModule; } public void setSelectedModuleSlot(int index) { this.selectedModule = MathHelper.clamp(index, 0, this.itemHandlerMemoryCards.getSlots() - 1); } public int getModeMask() { return this.modeMask; } protected int readModeMaskFromModule() { this.modeMask &= (MODE_BIT_LEFT_FAST | MODE_BIT_RIGHT_FAST); ItemStack containerStack = this.getContainerStack(); // Furnace modes are stored in the TileEntity itself, other modes are on the modules if (containerStack.isEmpty() == false) { NBTTagCompound tag = NBTUtils.getCompoundTag(containerStack, null, "CreationStation", false); if (tag != null) { this.modeMask |= tag.getShort("ConfigMask"); } } return this.modeMask; } protected void writeModeMaskToModule() { // Cache the value locally, because taking out the memory card will trigger an update that will overwrite the // value stored in the field in the TE. int modeMask = this.modeMask; ItemStack stack = this.itemHandlerMemoryCards.extractItem(this.selectedModule, 1, false); if (stack.isEmpty() == false) { // Furnace modes are stored in the TileEntity itself, other modes are on the modules NBTTagCompound tag = NBTUtils.getCompoundTag(stack, null, "CreationStation", true); tag.setShort("ConfigMask", (short) (modeMask & ~(MODE_BIT_LEFT_FAST | MODE_BIT_RIGHT_FAST))); this.itemHandlerMemoryCards.insertItem(this.selectedModule, stack, false); } } protected int getRecipeId(int invId) { int s = (invId == 1) ? 11 : 8; return (this.modeMask >> s) & 0x7; } protected void setRecipeId(int invId, int recipeId) { int shift = (invId == 1) ? 11 : 8; int mask = (invId == 1) ? 0x3800 : 0x0700; this.modeMask = (this.modeMask & ~mask) | ((recipeId & 0x7) << shift); } public boolean getShowRecipe(int invId) { return invId == 1 ? (this.modeMask & MODE_BIT_SHOW_RECIPE_RIGHT) != 0 : (this.modeMask & MODE_BIT_SHOW_RECIPE_LEFT) != 0; } protected void setShowRecipe(int invId, boolean show) { int mask = (invId == 1) ? MODE_BIT_SHOW_RECIPE_RIGHT : MODE_BIT_SHOW_RECIPE_LEFT; if (show) { this.modeMask |= mask; } else { this.modeMask &= ~mask; } } /** * Returns the recipeItems list of ItemStacks for the currently selected recipe * @param invId */ public NonNullList<ItemStack> getRecipeItems(int invId) { return invId == 1 ? this.recipeItems1 : this.recipeItems0; } protected NBTTagCompound getRecipeTag(int invId, int recipeId, boolean create) { ItemStack containerStack = this.getContainerStack(); if (containerStack.isEmpty() == false) { return NBTUtils.getCompoundTag(containerStack, "CreationStation", "Recipes_" + invId, create); } return null; } protected void loadRecipe(int invId, int recipeId) { NBTTagCompound tag = this.getRecipeTag(invId, recipeId, false); if (tag != null) { this.clearLoadedRecipe(invId); NBTUtils.readStoredItemsFromTag(tag, this.getRecipeItems(invId), "Recipe_" + recipeId); } else { this.removeRecipe(invId, recipeId); } } protected void storeRecipe(IItemHandler invCrafting, int invId, int recipeId) { invId = MathHelper.clamp(invId, 0, 1); NBTTagCompound tag = this.getRecipeTag(invId, recipeId, true); if (tag != null) { int invSize = invCrafting.getSlots(); NonNullList<ItemStack> items = this.getRecipeItems(invId); for (int i = 0; i < invSize; i++) { ItemStack stack = invCrafting.getStackInSlot(i); if (stack.isEmpty() == false) { stack = stack.copy(); stack.setCount(1); } items.set(i, stack); } // Store the recipe output item in the last slot, it will be used for GUI stuff ItemStack stack = this.craftResults[invId].getStackInSlot(0); items.set(items.size() - 1, stack.isEmpty() ? ItemStack.EMPTY : stack.copy()); NBTUtils.writeItemsToTag(tag, items, "Recipe_" + recipeId, true); } } protected void clearLoadedRecipe(int invId) { this.getRecipeItems(invId).clear(); } protected void removeRecipe(int invId, int recipeId) { NBTTagCompound tag = this.getRecipeTag(invId, recipeId, false); if (tag != null) { tag.removeTag("Recipe_" + recipeId); } this.clearLoadedRecipe(invId); } /** * Adds one more of each item in the recipe into the crafting grid, if possible * @param invId * @param recipeId */ protected boolean addOneSetOfRecipeItemsIntoGrid(IItemHandler invCrafting, int invId, int recipeId, EntityPlayer player) { invId = MathHelper.clamp(invId, 0, 1); int maskOreDict = invId == 1 ? MODE_BIT_RIGHT_CRAFTING_OREDICT : MODE_BIT_LEFT_CRAFTING_OREDICT; boolean useOreDict = (this.modeMask & maskOreDict) != 0; IItemHandlerModifiable playerInv = (IItemHandlerModifiable) player.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, EnumFacing.UP); IItemHandler invWrapper = new CombinedInvWrapper(this.itemInventory, playerInv); NonNullList<ItemStack> template = this.getRecipeItems(invId); InventoryUtils.clearInventoryToMatchTemplate(invCrafting, invWrapper, template); return InventoryUtils.restockInventoryBasedOnTemplate(invCrafting, invWrapper, template, 1, true, useOreDict); } protected void fillCraftingGrid(IItemHandler invCrafting, int invId, int recipeId, EntityPlayer player) { invId = MathHelper.clamp(invId, 0, 1); int largestStack = InventoryUtils.getLargestExistingStackSize(invCrafting); // If all stacks only have one item, then try to fill them all the way to maxStackSize if (largestStack == 1) { largestStack = 64; } NonNullList<ItemStack> template = InventoryUtils.createInventorySnapshot(invCrafting); int maskOreDict = invId == 1 ? MODE_BIT_RIGHT_CRAFTING_OREDICT : MODE_BIT_LEFT_CRAFTING_OREDICT; boolean useOreDict = (this.modeMask & maskOreDict) != 0; Map<ItemType, Integer> slotCounts = InventoryUtils.getSlotCountPerItem(invCrafting); // Clear old contents and then fill all the slots back up if (InventoryUtils.tryMoveAllItems(invCrafting, this.itemInventory) == InvResult.MOVED_ALL) { IItemHandlerModifiable playerInv = (IItemHandlerModifiable) player.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, EnumFacing.UP); IItemHandler invWrapper = new CombinedInvWrapper(this.itemInventory, playerInv); // Next we find out how many items we have available for each item type on the crafting grid // and we cap the max stack size to that value, so the stacks will be balanced Iterator<Entry<ItemType, Integer>> iter = slotCounts.entrySet().iterator(); while (iter.hasNext()) { Entry<ItemType, Integer> entry = iter.next(); ItemType item = entry.getKey(); if (item.getStack().getMaxStackSize() == 1) { continue; } int numFound = InventoryUtils.getNumberOfMatchingItemsInInventory(invWrapper, item.getStack(), useOreDict); int numSlots = entry.getValue(); int maxSize = numFound / numSlots; if (maxSize < largestStack) { largestStack = maxSize; } } InventoryUtils.restockInventoryBasedOnTemplate(invCrafting, invWrapper, template, largestStack, false, useOreDict); } } protected InvResult clearCraftingGrid(IItemHandler invCrafting, int invId, EntityPlayer player) { if (InventoryUtils.tryMoveAllItems(invCrafting, this.itemInventory) != InvResult.MOVED_ALL) { return InventoryUtils.tryMoveAllItems(invCrafting, player.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, EnumFacing.UP)); } return InvResult.MOVED_ALL; } /** * Check if there are enough items on the crafting grid to craft once, and try to add more items * if necessary and the auto-use feature is enabled. * @param invId * @return */ public boolean canCraftItems(IItemHandler invCrafting, int invId) { if (invCrafting == null) { return false; } invId = MathHelper.clamp(invId, 0, 1); int maskKeepOne = invId == 1 ? MODE_BIT_RIGHT_CRAFTING_KEEPONE : MODE_BIT_LEFT_CRAFTING_KEEPONE; int maskAutoUse = invId == 1 ? MODE_BIT_RIGHT_CRAFTING_AUTOUSE : MODE_BIT_LEFT_CRAFTING_AUTOUSE; this.craftingGridTemplates.set(invId, null); // Auto-use-items feature enabled, create a snapshot of the current state of the crafting grid if ((this.modeMask & maskAutoUse) != 0) { //if (invCrafting != null && InventoryUtils.checkInventoryHasAllItems(this.itemInventory, invCrafting, 1)) this.craftingGridTemplates.set(invId, InventoryUtils.createInventorySnapshot(invCrafting)); } // No requirement to keep one item on the grid if ((this.modeMask & maskKeepOne) == 0) { return true; } // Need to keep one item on the grid; if auto-use is disabled and there is only one item left, then we can't craft anymore else if ((this.modeMask & maskAutoUse) == 0 && InventoryUtils.getMinNonEmptyStackSize(invCrafting) <= 1) { return false; } // We are required to keep one item on the grid after crafting. // So we must check that either there are more than one item left in each slot, // or that the auto-use feature is enabled and the inventory has all the required items // to re-stock the crafting grid afterwards. int maskOreDict = invId == 1 ? MODE_BIT_RIGHT_CRAFTING_OREDICT : MODE_BIT_LEFT_CRAFTING_OREDICT; boolean useOreDict = (this.modeMask & maskOreDict) != 0; // More than one item left in each slot if (InventoryUtils.getMinNonEmptyStackSize(invCrafting) > 1 || InventoryUtils.checkInventoryHasAllItems(this.itemInventory, invCrafting, 1, useOreDict)) { return true; } return false; } public void restockCraftingGrid(IItemHandler invCrafting, int invId) { invId = MathHelper.clamp(invId, 0, 1); NonNullList<ItemStack> template = this.craftingGridTemplates.get(invId); if (invCrafting == null || template == null) { return; } this.recipeLoadClickCount = 0; int maskAutoUse = invId == 1 ? MODE_BIT_RIGHT_CRAFTING_AUTOUSE : MODE_BIT_LEFT_CRAFTING_AUTOUSE; // Auto-use feature not enabled if ((this.modeMask & maskAutoUse) == 0) { return; } int maskOreDict = invId == 1 ? MODE_BIT_RIGHT_CRAFTING_OREDICT : MODE_BIT_LEFT_CRAFTING_OREDICT; boolean useOreDict = (this.modeMask & maskOreDict) != 0; InventoryUtils.clearInventoryToMatchTemplate(invCrafting, this.itemInventory, template); InventoryUtils.restockInventoryBasedOnTemplate(invCrafting, this.itemInventory, template, 1, true, useOreDict); this.craftingGridTemplates.set(invId, null); } @Override public ItemStack getContainerStack() { return this.itemHandlerMemoryCards.getStackInSlot(this.selectedModule); } @Override public void inventoryChanged(int inventoryId, int slot) { if (this.getWorld().isRemote) { return; } if (inventoryId == INV_ID_FURNACE) { // This gets called from the furnace inventory's markDirty this.inputDirty[0] = this.inputDirty[1] = true; return; } ItemStack containerStack = this.getContainerStack(); this.itemInventory.setContainerItemStack(containerStack); this.craftingInventories[0].setContainerItemStack(containerStack); this.craftingInventories[1].setContainerItemStack(containerStack); this.readModeMaskFromModule(); this.loadRecipe(0, this.getRecipeId(0)); this.loadRecipe(1, this.getRecipeId(1)); } public boolean isInventoryAccessible(EntityPlayer player) { return this.wrappedInventory.isAccessibleByPlayer(player); } @Override public void onLeftClickBlock(EntityPlayer player) { if (this.getWorld().isRemote) { return; } Long last = this.clickTimes.get(player.getUniqueID()); if (last != null && this.getWorld().getTotalWorldTime() - last < 5) { // Double left clicked fast enough (< 5 ticks) - do the selected item moving action this.performGuiAction(player, GUI_ACTION_MOVE_ITEMS, this.actionMode); this.getWorld().playSound(null, this.getPos(), SoundEvents.ENTITY_ENDERMEN_TELEPORT, SoundCategory.BLOCKS, 0.2f, 1.8f); this.clickTimes.remove(player.getUniqueID()); } else { this.clickTimes.put(player.getUniqueID(), this.getWorld().getTotalWorldTime()); } } @Override public void performGuiAction(EntityPlayer player, int action, int element) { if (action == GUI_ACTION_SELECT_MODULE && element >= 0 && element < 4) { this.setSelectedModuleSlot(element); this.inventoryChanged(INV_ID_MODULES, element); this.markDirty(); // This updates the crafting output slots, since they normally only update // when the grid contents are changed via the InventoryCrafting* inventory wrapper this.updateCraftingResults(player); } else if (action == GUI_ACTION_MOVE_ITEMS && element >= 0 && element < 6) { ItemHandlerWrapperPermissions inventory = new ItemHandlerWrapperPermissions(this.itemInventory, player); if (inventory.isAccessibleByPlayer(player) == false) { return; } IItemHandlerModifiable playerMainInv = (IItemHandlerModifiable) player.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, EnumFacing.UP); IItemHandlerModifiable offhandInv = new PlayerOffhandInvWrapper(player.inventory); IItemHandler playerInv = new CombinedInvWrapper(playerMainInv, offhandInv); switch (element) { case 0: // Move all items to Chest InventoryUtils.tryMoveAllItemsWithinSlotRange(playerInv, inventory, new SlotRange(9, 27), new SlotRange(inventory)); break; case 1: // Move matching items to Chest InventoryUtils.tryMoveMatchingItemsWithinSlotRange(playerInv, inventory, new SlotRange(9, 27), new SlotRange(inventory)); break; case 2: // Leave one stack of each item type and fill that stack InventoryUtils.leaveOneFullStackOfEveryItem(playerInv, inventory, true); break; case 3: // Fill stacks in player inventory from Chest InventoryUtils.fillStacksOfMatchingItems(inventory, playerInv); break; case 4: // Move matching items to player inventory InventoryUtils.tryMoveMatchingItems(inventory, playerInv); break; case 5: // Move all items to player inventory InventoryUtils.tryMoveAllItems(inventory, playerInv); break; } } else if (action == GUI_ACTION_SET_QUICK_ACTION && element >= 0 && element < 6) { this.actionMode = element; } else if (action == GUI_ACTION_CLEAR_CRAFTING_GRID && element >= 0 && element <= 1) { int gridId = element; if (this.canAccessCraftingGrid(gridId, player) == false) { return; } IItemHandler inv = this.getWrappedCraftingInventoryFromContainer(gridId, player); // Already empty crafting grid, set the "show recipe" mode to disabled if (InventoryUtils.isInventoryEmpty(inv)) { this.setShowRecipe(gridId, false); this.clearLoadedRecipe(gridId); this.writeModeMaskToModule(); } // Items in grid, clear the grid else { this.clearCraftingGrid(inv, gridId, player); } this.recipeLoadClickCount = 0; this.lastInteractedCraftingGrid = gridId; } else if (action == GUI_ACTION_RECIPE_LOAD && element >= 0 && element < 10) { int gridId = element / 5; int recipeId = element % 5; if (this.canAccessCraftingGrid(gridId, player) == false) { return; } IItemHandler inv = this.getWrappedCraftingInventoryFromContainer(gridId, player); // Clicked again on a recipe button that is already currently selected => load items into crafting grid if (this.getRecipeId(gridId) == recipeId && this.getShowRecipe(gridId)) { // First click after loading the recipe itself: load one item to each slot if (this.recipeLoadClickCount == 0) { // First clear away the old contents //if (this.clearCraftingGrid(inv, invId, player) == InvResult.MOVED_ALL) { if (this.addOneSetOfRecipeItemsIntoGrid(inv, gridId, recipeId, player)) { this.recipeLoadClickCount += 1; } } } // Subsequent click will load the crafting grid with items up to either the largest stack size, // or the max stack size if the largest existing stack size is 1 else { this.fillCraftingGrid(inv, gridId, recipeId, player); } } // Clicked on a different recipe button, or the recipe was hidden => load the recipe // and show it, but don't load the items into the grid else { this.loadRecipe(gridId, recipeId); this.setRecipeId(gridId, recipeId); this.recipeLoadClickCount = 0; } this.setShowRecipe(gridId, true); this.writeModeMaskToModule(); this.lastInteractedCraftingGrid = gridId; } else if (action == GUI_ACTION_RECIPE_STORE && element >= 0 && element < 10) { int gridId = element / 5; int recipeId = element % 5; if (this.canAccessCraftingGrid(gridId, player) == false) { return; } IItemHandler inv = this.getWrappedCraftingInventoryFromContainer(gridId, player); /*IItemHandler inv = this.craftingInventories[gridId]; if (InventoryUtils.isInventoryEmpty(inv)) { this.setShowRecipe(gridId, false); } else { this.storeRecipe(gridId, recipeId); this.setShowRecipe(gridId, true); }*/ this.storeRecipe(inv, gridId, recipeId); this.setShowRecipe(gridId, true); this.setRecipeId(gridId, recipeId); this.writeModeMaskToModule(); this.lastInteractedCraftingGrid = gridId; } else if (action == GUI_ACTION_RECIPE_CLEAR && element >= 0 && element < 10) { int gridId = element / 5; int recipeId = element % 5; if (this.canAccessCraftingGrid(gridId, player) == false) { return; } //if (this.getRecipeId(invId) == recipeId) { this.removeRecipe(gridId, recipeId); this.setShowRecipe(gridId, false); //this.setRecipeId(invId, recipeId); this.writeModeMaskToModule(); } this.recipeLoadClickCount = 0; this.lastInteractedCraftingGrid = gridId; } else if (action == GUI_ACTION_TOGGLE_MODE && element >= 0 && element < 8) { switch (element) { case 0: this.modeMask ^= MODE_BIT_LEFT_CRAFTING_OREDICT; break; case 1: this.modeMask ^= MODE_BIT_LEFT_CRAFTING_KEEPONE; break; case 2: this.modeMask ^= MODE_BIT_LEFT_CRAFTING_AUTOUSE; break; case 3: this.modeMask ^= MODE_BIT_RIGHT_CRAFTING_AUTOUSE; break; case 4: this.modeMask ^= MODE_BIT_RIGHT_CRAFTING_KEEPONE; break; case 5: this.modeMask ^= MODE_BIT_RIGHT_CRAFTING_OREDICT; break; case 6: this.modeMask ^= MODE_BIT_LEFT_FAST; break; case 7: this.modeMask ^= MODE_BIT_RIGHT_FAST; break; default: } if (element <= 5) { this.lastInteractedCraftingGrid = element / 3; } this.writeModeMaskToModule(); } else if (action == GUI_ACTION_SORT_ITEMS && element >= 0 && element <= 1) { // Station's item inventory if (element == 0) { ItemHandlerWrapperPermissions inventory = new ItemHandlerWrapperPermissions(this.itemInventory, player); if (inventory.isAccessibleByPlayer(player) == false) { return; } InventoryUtils.sortInventoryWithinRange(this.itemInventory, new SlotRange(this.itemInventory)); } // Player inventory (don't sort the hotbar) else { IItemHandlerModifiable inv = (IItemHandlerModifiable) player.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, EnumFacing.UP); InventoryUtils.sortInventoryWithinRange(inv, new SlotRange(9, 27)); } } } /** * Updates the cached smelting result for the current input item, if the input has changed since last caching the result. */ private void updateSmeltingResult(int id) { if (this.inputDirty[id]) { ItemStack inputStack = this.furnaceInventory.getStackInSlot(id * 3); if (inputStack.isEmpty() == false) { this.smeltingResultCache[id] = FurnaceRecipes.instance().getSmeltingResult(inputStack); } else { this.smeltingResultCache[id] = ItemStack.EMPTY; } this.inputDirty[id] = false; } } /** * Checks if there is a valid fuel item in the fuel slot. * @return true if the fuel slot has an item that can be used as fuel */ private boolean hasFuelAvailable(int id) { return TileEntityEnderFurnace.consumeFuelItem(this.furnaceInventory, id * 3 + 1, true) > 0; } /** * Consumes one fuel item or one dose of fluid fuel. Sets the burnTimeFresh field to the amount of burn time gained. * @return returns the amount of furnace burn time that was gained from the fuel */ private int consumeFuelItem(int id) { int fuelSlot = id * 3 + 1; int burnTime = TileEntityEnderFurnace.consumeFuelItem(this.furnaceInventory, fuelSlot, false); if (burnTime > 0) { this.burnTimeFresh[id] = burnTime; } return burnTime; } /** * Returns true if the furnace can smelt an item. Checks the input slot for valid smeltable items and the output buffer * for an equal item and free space or empty buffer. Does not check the fuel. * @return true if input and output item stacks allow the current item to be smelted */ private boolean canSmelt(int id) { ItemStack inputStack = this.furnaceInventory.getStackInSlot(id * 3); if (inputStack.isEmpty() || this.smeltingResultCache[id].isEmpty()) { return false; } int amount = 0; ItemStack outputStack = this.furnaceInventory.getStackInSlot(id * 3 + 2); if (outputStack.isEmpty() == false) { if (InventoryUtils.areItemStacksEqual(this.smeltingResultCache[id], outputStack) == false) { return false; } amount = outputStack.getCount(); } if ((this.furnaceInventory.getInventoryStackLimit() - amount) < this.smeltingResultCache[id].getCount()) { return false; } return true; } /** * Turn one item from the furnace input slot into a smelted item in the furnace output buffer. */ private void smeltItem(int id) { if (this.canSmelt(id)) { this.furnaceInventory.insertItem(id * 3 + 2, this.smeltingResultCache[id], false); this.furnaceInventory.extractItem(id * 3, 1, false); if (this.furnaceInventory.getStackInSlot(id * 3).isEmpty()) { this.inputDirty[id] = true; } } } private void smeltingLogic(int id) { this.updateSmeltingResult(id); boolean dirty = false; boolean hasFuel = this.hasFuelAvailable(id); boolean isFastMode = id == 0 ? (this.modeMask & MODE_BIT_LEFT_FAST) != 0 : (this.modeMask & MODE_BIT_RIGHT_FAST) != 0; int cookTimeIncrement = COOKTIME_INC_SLOW; if (this.burnTimeRemaining[id] == 0 && hasFuel == false) { return; } else if (isFastMode) { cookTimeIncrement = COOKTIME_INC_FAST; } boolean canSmelt = this.canSmelt(id); // The furnace is currently burning fuel if (this.burnTimeRemaining[id] > 0) { int btUse = (isFastMode ? BURNTIME_USAGE_FAST : BURNTIME_USAGE_SLOW); // Not enough fuel burn time remaining for the elapsed tick if (btUse > this.burnTimeRemaining[id]) { if (hasFuel && canSmelt) { this.burnTimeRemaining[id] += this.consumeFuelItem(id); hasFuel = this.hasFuelAvailable(id); } // Running out of fuel, scale the cook progress according to the elapsed burn time else { cookTimeIncrement = (this.burnTimeRemaining[id] * cookTimeIncrement) / btUse; btUse = this.burnTimeRemaining[id]; } } this.burnTimeRemaining[id] -= btUse; dirty = true; } // Furnace wasn't burning, but it now has fuel and smeltable items, start burning/smelting else if (canSmelt && hasFuel) { this.burnTimeRemaining[id] += this.consumeFuelItem(id); hasFuel = this.hasFuelAvailable(id); dirty = true; } // Valid items to smelt, room in output if (canSmelt) { this.cookTime[id] += cookTimeIncrement; // One item done smelting if (this.cookTime[id] >= COOKTIME_DEFAULT) { this.smeltItem(id); canSmelt = this.canSmelt(id); // We can smelt the next item and we "overcooked" the last one, carry over the extra progress if (canSmelt && this.cookTime[id] > COOKTIME_DEFAULT) { this.cookTime[id] -= COOKTIME_DEFAULT; } else // No more items to smelt or didn't overcook { this.cookTime[id] = 0; } } // If the current fuel ran out and we still have items to cook, consume the next fuel item if (this.burnTimeRemaining[id] == 0 && hasFuel && canSmelt) { this.burnTimeRemaining[id] += this.consumeFuelItem(id); } dirty = true; } // Can't smelt anything at the moment, rewind the cooking progress at half the speed of normal cooking else if (this.cookTime[id] > 0) { this.cookTime[id] -= Math.min(this.cookTime[id], COOKTIME_INC_SLOW / 2); dirty = true; } if (dirty) { this.markDirty(); } } @Override public void update() { if (this.getWorld().isRemote == false) { this.smeltingLogic(0); this.smeltingLogic(1); } } /** * Returns an integer between 0 and the passed value representing how close the current item is to being completely cooked */ public int getSmeltProgressScaled(int id, int i) { return this.cookTime[id] * i / COOKTIME_DEFAULT; } /** * Returns an integer between 0 and the passed value representing how much burn time is left on the current fuel * item, where 0 means that the item is exhausted and the passed value means that the item is fresh */ public int getBurnTimeRemainingScaled(int id, int i) { if (this.burnTimeFresh[id] == 0) { return 0; } return this.burnTimeRemaining[id] * i / this.burnTimeFresh[id]; } private class ItemHandlerWrapperFurnace extends ItemHandlerWrapperSelectiveModifiable { public ItemHandlerWrapperFurnace(IItemHandlerModifiable baseHandler) { super(baseHandler); } @Override public boolean isItemValidForSlot(int slot, ItemStack stack) { if (stack.isEmpty()) { return false; } if (slot == 0 || slot == 3) { return FurnaceRecipes.instance().getSmeltingResult(stack).isEmpty() == false; } return (slot == 1 || slot == 4) && TileEntityEnderFurnace.isItemFuel(stack); } /* @Override protected boolean canExtractFromSlot(int slot) { // 2 & 5: output slots; 1 & 4: fuel slots => allow pulling out from output slots, and non-fuel items (like empty buckets) from fuel slots if ( slot == 2 || slot == 5 || ((slot == 1 || slot == 4) && TileEntityEnderFurnace.isItemFuel(this.getStackInSlot(slot)) == false)) { return true; } return false; } */ } @Override public ContainerCreationStation getContainer(EntityPlayer player) { return new ContainerCreationStation(player, this); } @Override public Object getGui(EntityPlayer player) { return new GuiCreationStation(this.getContainer(player), this); } }
maruohon/enderutilities
src/main/java/fi/dy/masa/enderutilities/tileentity/TileEntityCreationStation.java
Java
gpl-3.0
44,775
/* This file is part of Dilay * Copyright © 2015 Alexander Bau * Use and redistribute under the terms of the GNU General Public License */ #ifndef DILAY_PARTIAL_ACTION_TRIANGULATE_QUAD #define DILAY_PARTIAL_ACTION_TRIANGULATE_QUAD class WingedMesh; class WingedFace; class AffectedFaces; namespace PartialAction { /* `triangulateQuad (m,f,n)` triangulates the quad `f` by inserting an edge from * `f.edge ()->secondVertex (f)`. * `f` and the new face are added to `n`. */ WingedEdge& triangulateQuad (WingedMesh&, WingedFace&, AffectedFaces&); } #endif
UIKit0/dilay
lib/src/partial-action/triangulate-quad.hpp
C++
gpl-3.0
574
// Openbravo POS is a point of sales application designed for touch screens. // Copyright (C) 2007-2009 Openbravo, S.L. // http://www.openbravo.com/product/pos // // This file is part of Openbravo POS. // // Openbravo POS is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Openbravo POS is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Openbravo POS. If not, see <http://www.gnu.org/licenses/>. package com.nordpos.device.display; public interface DeviceDisplay { // INTERFAZ DESCRIPCION public String getDisplayName(); public String getDisplayDescription(); // INTERFAZ VISOR public void writeVisor(int animation, String sLine1, String sLine2); public void writeVisor(String sLine1, String sLine2); public void clearVisor(); }
nordpos-mobi/nordpos-device
src/main/java/com/nordpos/device/display/DeviceDisplay.java
Java
gpl-3.0
1,269
package com.sk89q.worldedit.command.tool; import com.boydti.fawe.Fawe; import com.boydti.fawe.FaweCache; import com.boydti.fawe.config.BBC; import com.boydti.fawe.object.FawePlayer; import com.boydti.fawe.object.RunnableVal; import com.boydti.fawe.object.brush.BrushSettings; import com.boydti.fawe.object.brush.MovableTool; import com.boydti.fawe.object.brush.ResettableTool; import com.boydti.fawe.object.brush.TargetMode; import com.boydti.fawe.object.brush.scroll.ScrollAction; import com.boydti.fawe.object.brush.scroll.ScrollTool; import com.boydti.fawe.object.brush.visualization.VisualChunk; import com.boydti.fawe.object.brush.visualization.VisualExtent; import com.boydti.fawe.object.brush.visualization.VisualMode; import com.boydti.fawe.object.extent.ResettableExtent; import com.boydti.fawe.object.mask.MaskedTargetBlock; import com.boydti.fawe.object.pattern.PatternTraverser; import com.boydti.fawe.util.EditSessionBuilder; import com.boydti.fawe.util.MaskTraverser; import com.boydti.fawe.util.StringMan; import com.boydti.fawe.util.TaskManager; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; import com.sk89q.minecraft.util.commands.CommandException; import com.sk89q.worldedit.BlockWorldVector; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.LocalConfiguration; import com.sk89q.worldedit.LocalSession; import com.sk89q.worldedit.MaxChangedBlocksException; import com.sk89q.worldedit.MutableBlockVector; import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.blocks.BaseBlock; import com.sk89q.worldedit.command.tool.brush.Brush; import com.sk89q.worldedit.entity.Player; import com.sk89q.worldedit.extension.input.InputParseException; import com.sk89q.worldedit.extension.platform.Actor; import com.sk89q.worldedit.extension.platform.Platform; import com.sk89q.worldedit.extent.inventory.BlockBag; import com.sk89q.worldedit.function.mask.Mask; import com.sk89q.worldedit.function.mask.MaskIntersection; import com.sk89q.worldedit.function.mask.SolidBlockMask; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.session.request.Request; import com.sk89q.worldedit.util.Location; import java.io.IOException; import java.io.Serializable; import java.lang.reflect.Type; import java.util.HashMap; import java.util.Map; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; import javax.annotation.Nullable; import static com.google.common.base.Preconditions.checkNotNull; public class BrushTool implements DoubleActionTraceTool, ScrollTool, MovableTool, ResettableTool, Serializable { // TODO: // Serialize methods // serialize BrushSettings (primary and secondary only if different) // set transient values e.g. context public enum BrushAction { PRIMARY, SECONDARY } protected static int MAX_RANGE = 500; protected int range = 240; private VisualMode visualMode = VisualMode.NONE; private TargetMode targetMode = TargetMode.TARGET_BLOCK_RANGE; private Mask targetMask = null; private int targetOffset; private transient BrushSettings primary = new BrushSettings(); private transient BrushSettings secondary = new BrushSettings(); private transient BrushSettings context = primary; private transient VisualExtent visualExtent; private transient Lock lock = new ReentrantLock(); private transient BrushHolder holder; public BrushTool(String permission) { getContext().addPermission(permission); } public BrushTool() { } public static BrushTool fromString(Player player, LocalSession session, String json) throws CommandException, InputParseException { Gson gson = new Gson(); Type type = new TypeToken<Map<String, Object>>() { }.getType(); Map<String, Object> root = gson.fromJson(json, type); if (root == null) { Fawe.debug("Failed to load " + json); return new BrushTool(); } Map<String, Object> primary = (Map<String, Object>) root.get("primary"); Map<String, Object> secondary = (Map<String, Object>) root.getOrDefault("secondary", primary); VisualMode visual = VisualMode.valueOf((String) root.getOrDefault("visual", "NONE")); TargetMode target = TargetMode.valueOf((String) root.getOrDefault("target", "TARGET_BLOCK_RANGE")); int range = ((Number) root.getOrDefault("range", -1)).intValue(); int offset = ((Number) root.getOrDefault("offset", 0)).intValue(); BrushTool tool = new BrushTool(); tool.visualMode = visual; tool.targetMode = target; tool.range = range; tool.targetOffset = offset; BrushSettings primarySettings = BrushSettings.get(tool, player, session, primary); tool.setPrimary(primarySettings); if (primary != secondary) { BrushSettings secondarySettings = BrushSettings.get(tool, player, session, secondary); tool.setSecondary(secondarySettings); } return tool; } public void setHolder(BrushHolder holder) { this.holder = holder; } public boolean isSet() { return primary.getBrush() != null || secondary.getBrush() != null; } @Override public String toString() { return toString(new Gson()); } public String toString(Gson gson) { HashMap<String, Object> map = new HashMap<>(); map.put("primary", primary.getSettings()); if (primary != secondary) { map.put("secondary", secondary.getSettings()); } if (visualMode != null && visualMode != VisualMode.NONE) { map.put("visual", visualMode); } if (targetMode != TargetMode.TARGET_BLOCK_RANGE) { map.put("target", targetMode); } if (range != -1 && range != 240) { map.put("range", range); } if (targetOffset != 0) { map.put("offset", targetOffset); } return gson.toJson(map); } public void update() { if (holder != null) { holder.setTool(this); } } private void writeObject(java.io.ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); stream.writeBoolean(primary == secondary); stream.writeObject(primary); if (primary != secondary) { stream.writeObject(secondary); } } private void readObject(java.io.ObjectInputStream stream) throws IOException, ClassNotFoundException { lock = new ReentrantLock(); boolean multi = stream.readBoolean(); primary = (BrushSettings) stream.readObject(); if (multi) { secondary = (BrushSettings) stream.readObject(); } else { secondary = primary; } context = primary; } public BrushSettings getContext() { BrushSettings tmp = context; if (tmp == null) { context = tmp = primary; } return tmp; } public void setContext(BrushSettings context) { this.context = context; } @Override public boolean canUse(Actor player) { if (primary == secondary) { return primary.canUse(player); } return primary.canUse(player) && secondary.canUse(player); } public ResettableExtent getTransform() { return getContext().getTransform(); } public BrushSettings getPrimary() { return primary; } public BrushSettings getSecondary() { return secondary; } public BrushSettings getOffHand() { return context == primary ? secondary : primary; } public void setPrimary(BrushSettings primary) { checkNotNull(primary); this.primary = primary; this.context = primary; update(); } public void setSecondary(BrushSettings secondary) { checkNotNull(secondary); this.secondary = secondary; this.context = secondary; update(); } public void setTransform(ResettableExtent transform) { getContext().setTransform(transform); update(); } /** * Get the filter. * * @return the filter */ public Mask getMask() { return getContext().getMask(); } /** * Get the filter. * * @return the filter */ public Mask getSourceMask() { return getContext().getSourceMask(); } @Override public boolean reset() { Brush br = getBrush(); if (br instanceof ResettableTool) { return ((ResettableTool) br).reset(); } return false; } /** * Set the block filter used for identifying blocks to replace. * * @param filter the filter to set */ public void setMask(Mask filter) { this.getContext().setMask(filter); update(); } /** * Set the block filter used for identifying blocks to replace. * * @param filter the filter to set */ public void setSourceMask(Mask filter) { this.getContext().setSourceMask(filter); update(); } /** * Set the brush. * * @param brush tbe brush * @param permission the permission */ @Deprecated public void setBrush(Brush brush, String permission) { setBrush(brush, permission, null); update(); } @Deprecated public void setBrush(Brush brush, String permission, Player player) { if (player != null) clear(player); BrushSettings current = getContext(); current.clearPerms(); current.setBrush(brush); current.addPermission(permission); update(); } /** * Get the current brush. * * @return the current brush */ public Brush getBrush() { return getContext().getBrush(); } /** * Set the material. * * @param material the material */ public void setFill(@Nullable Pattern material) { this.getContext().setFill(material); } /** * Get the material. * * @return the material */ @Nullable public Pattern getMaterial() { return getContext().getMaterial(); } /** * Get the set brush size. * * @return a radius */ public double getSize() { return getContext().getSize(); } /** * Set the set brush size. * * @param radius a radius */ public void setSize(double radius) { this.getContext().setSize(radius); } /** * Get the set brush range. * * @return the range of the brush in blocks */ public int getRange() { return (range < 0) ? MAX_RANGE : Math.min(range, MAX_RANGE); } /** * Set the set brush range. * * @param range the range of the brush in blocks */ public void setRange(int range) { this.range = range; } public Vector getPosition(EditSession editSession, Player player) { Location loc = player.getLocation(); switch (targetMode) { case TARGET_BLOCK_RANGE: return offset(new MutableBlockVector(trace(editSession, player, getRange(), true)), loc.toVector()); case FOWARD_POINT_PITCH: { int d = 0; float pitch = loc.getPitch(); pitch = 23 - (pitch / 4); d += (int) (Math.sin(Math.toRadians(pitch)) * 50); final Vector vector = loc.getDirection().setY(0).normalize().multiply(d); vector.add(loc.getX(), loc.getY(), loc.getZ()).toBlockVector(); return offset(new MutableBlockVector(vector), loc.toVector()); } case TARGET_POINT_HEIGHT: { final int height = loc.getBlockY(); final int x = loc.getBlockX(); final int z = loc.getBlockZ(); int y; for (y = height; y > 0; y--) { BaseBlock block = editSession.getBlock(x, y, z); if (!FaweCache.isLiquidOrGas(block.getId())) { break; } } final int distance = (height - y) + 8; return offset(new MutableBlockVector(trace(editSession, player, distance, true)), loc.toVector()); } case TARGET_FACE_RANGE: return offset(new MutableBlockVector(trace(editSession, player, getRange(), true)), loc.toVector()); default: return null; } } private Vector offset(Vector target, Vector playerPos) { if (targetOffset == 0) return target; return target.subtract(target.subtract(playerPos).normalize().multiply(targetOffset)); } private Vector trace(EditSession editSession, Player player, int range, boolean useLastBlock) { Mask mask = targetMask == null ? new SolidBlockMask(editSession) : targetMask; new MaskTraverser(mask).reset(editSession); MaskedTargetBlock tb = new MaskedTargetBlock(mask, player, range, 0.2); return TaskManager.IMP.sync(new RunnableVal<Vector>() { @Override public void run(Vector value) { BlockWorldVector result = tb.getMaskedTargetBlock(useLastBlock); this.value = result; } }); } public boolean act(BrushAction action, Platform server, LocalConfiguration config, Player player, LocalSession session) { switch (action) { case PRIMARY: setContext(primary); break; case SECONDARY: setContext(secondary); break; } BrushSettings current = getContext(); Brush brush = current.getBrush(); if (brush == null) return false; EditSession editSession = session.createEditSession(player); if (current.setWorld(editSession.getWorld().getName()) && !current.canUse(player)) { BBC.NO_PERM.send(player, StringMan.join(current.getPermissions(), ",")); return false; } Vector target = getPosition(editSession, player); if (target == null) { editSession.cancel(); BBC.NO_BLOCK.send(player); return false; } BlockBag bag = session.getBlockBag(player); Request.request().setEditSession(editSession); Mask mask = current.getMask(); if (mask != null) { Mask existingMask = editSession.getMask(); if (existingMask == null) { editSession.setMask(mask); } else if (existingMask instanceof MaskIntersection) { ((MaskIntersection) existingMask).add(mask); } else { MaskIntersection newMask = new MaskIntersection(existingMask); newMask.add(mask); editSession.setMask(newMask); } } Mask sourceMask = current.getSourceMask(); if (sourceMask != null) { editSession.addSourceMask(sourceMask); } ResettableExtent transform = current.getTransform(); if (transform != null) { editSession.addTransform(transform); } try { new PatternTraverser(current).reset(editSession); brush.build(editSession, target, current.getMaterial(), current.getSize()); } catch (MaxChangedBlocksException e) { player.printError("Max blocks change limit reached."); // Never happens } finally { if (bag != null) { bag.flushChanges(); } session.remember(editSession); Request.reset(); } return true; } @Override public boolean actPrimary(Platform server, LocalConfiguration config, Player player, LocalSession session) { return act(BrushAction.PRIMARY, server, config, player, session); } @Override public boolean actSecondary(Platform server, LocalConfiguration config, Player player, LocalSession session) { return act(BrushAction.SECONDARY, server, config, player, session); } public static Class<?> inject() { return BrushTool.class; } public void setScrollAction(ScrollAction scrollAction) { this.getContext().setScrollAction(scrollAction); update(); } public void setTargetOffset(int targetOffset) { this.targetOffset = targetOffset; update(); } public void setTargetMode(TargetMode targetMode) { this.targetMode = targetMode != null ? targetMode : TargetMode.TARGET_BLOCK_RANGE; update(); } public void setTargetMask(Mask mask) { this.targetMask = mask; update(); } public void setVisualMode(Player player, VisualMode visualMode) { if (visualMode == null) visualMode = VisualMode.NONE; if (this.visualMode != visualMode) { if (this.visualMode != VisualMode.NONE) { clear(player); } this.visualMode = visualMode != null ? visualMode : VisualMode.NONE; if (visualMode != VisualMode.NONE) { try { queueVisualization(FawePlayer.wrap(player)); } catch (Throwable e) { WorldEdit.getInstance().getPlatformManager().handleThrowable(e, player); } } } update(); } public TargetMode getTargetMode() { return targetMode; } public int getTargetOffset() { return targetOffset; } public Mask getTargetMask() { return targetMask; } public VisualMode getVisualMode() { return visualMode; } @Override public boolean increment(Player player, int amount) { BrushSettings current = getContext(); ScrollAction tmp = current.getScrollAction(); if (tmp != null) { tmp.setTool(this); if (tmp.increment(player, amount)) { if (visualMode != VisualMode.NONE) { try { queueVisualization(FawePlayer.wrap(player)); } catch (Throwable e) { WorldEdit.getInstance().getPlatformManager().handleThrowable(e, player); } } return true; } } if (visualMode != VisualMode.NONE) { clear(player); } return false; } public void queueVisualization(FawePlayer player) { Fawe.get().getVisualQueue().queue(player); } @Deprecated public synchronized void visualize(BrushTool.BrushAction action, Player player) throws MaxChangedBlocksException { VisualMode mode = getVisualMode(); if (mode == VisualMode.NONE) { return; } BrushSettings current = getContext(); Brush brush = current.getBrush(); if (brush == null) return; FawePlayer<Object> fp = FawePlayer.wrap(player); EditSession editSession = new EditSessionBuilder(player.getWorld()) .player(fp) .allowedRegionsEverywhere() .autoQueue(false) .blockBag(null) .changeSetNull() .combineStages(false) .build(); VisualExtent newVisualExtent = new VisualExtent(editSession.getExtent(), editSession.getQueue()); Vector position = getPosition(editSession, player); if (position != null) { editSession.setExtent(newVisualExtent); switch (mode) { case POINT: { editSession.setBlockFast(position, FaweCache.getBlock(VisualChunk.VISUALIZE_BLOCK, 0)); break; } case OUTLINE: { new PatternTraverser(current).reset(editSession); brush.build(editSession, position, current.getMaterial(), current.getSize()); break; } } } if (visualExtent != null) { // clear old data visualExtent.clear(newVisualExtent, fp); } visualExtent = newVisualExtent; newVisualExtent.visualize(fp); } public void clear(Player player) { FawePlayer<Object> fp = FawePlayer.wrap(player); Fawe.get().getVisualQueue().dequeue(fp); if (visualExtent != null) { visualExtent.clear(null, fp); } } @Override public boolean move(Player player) { if (visualMode != VisualMode.NONE) { queueVisualization(FawePlayer.wrap(player)); return true; } return false; } }
DarkFort/FastAsyncWorldedit-rus-by-DarkFort
core/src/main/java/com/sk89q/worldedit/command/tool/BrushTool.java
Java
gpl-3.0
20,974
/// <reference path="/Content/base/ro/js/rocms.helpers.js" /> /// <reference path="base.js" /> function mapCategoriesToIds(categories) { var result = $(categories).map(function () { return { heartId: this.heartId, childrenCategories: this.childrenCategories ? mapCategoriesToIds(this.childrenCategories) : [] } }).get(); return result; } function categoriesEditorLoaded(onSelected, context) { blockUI(); if (context) { $(context).on("click", ".category .toggler", function () { $(this).closest(".category").find(".child-categories").first().collapse('toggle'); var toggler = $(this); if (toggler.is(".collapsed2")) { toggler.removeClass("collapsed2"); } else { toggler.addClass("collapsed2"); } }); } else { $("#categoryEditor").on("click", ".category .toggler", function () { $(this).closest(".category").find(".child-categories").first().collapse('toggle'); var toggler = $(this); if (toggler.is(".collapsed2")) { toggler.removeClass("collapsed2"); } else { toggler.addClass("collapsed2"); } }); } var vm = { childrenCategories: ko.observableArray(), orderEditingEnabled: ko.observable(false), createCategory: function () { var self = this; var category = $.extend(new App.Admin.Shop.Category(), App.Admin.Shop.CategoryFunctions); category.newCategory(function () { self.childrenCategories.push(category); }); }, selectCategory: function (item) { if (onSelected) { onSelected(item); } }, enableEditOrder: function () { this.orderEditingEnabled(!this.orderEditingEnabled()); }, saveOrder: function () { blockUI(); var cats = mapCategoriesToIds(ko.toJS(this.childrenCategories)); postJSON("/api/shop/categories/order/update", cats, function (result) { }) .fail(function () { smartAlert("Произошла ошибка. Если она будет повторяться - обратитесь к разработчикам."); }) .always(function () { unblockUI(); }); } }; getJSON("/api/shop/categories/null/get", "", function (result) { $(result).each(function () { var res = $.extend(ko.mapping.fromJS(this, App.Admin.Shop.CategoryValidationMapping), App.Admin.Shop.CategoryFunctions); res.hasChildren = ko.observable(true); vm.childrenCategories.push(res); }); }) .fail(function () { smartAlert("Произошла ошибка. Если она будет повторяться - обратитесь к разработчикам."); }) .always(function () { unblockUI(); }); if (context) { ko.applyBindings(vm, context[0]); } else { ko.applyBindings(vm); } } App.Admin.Shop.CategoryValidationMapping = { name: { create: function (options) { var res = ko.observable(options.data).extend({ required: true }); return res; } }, childrenCategories: { create: function (options) { //пишется для одного элемента массива var res = $.extend(ko.mapping.fromJS(options.data, App.Admin.Shop.CategoryValidationMapping), App.Admin.Shop.CategoryFunctions); return res; } }, parentCategory: { create: function (options) { if (options.data) { var res = ko.observable(options.data); return res; } else { return ko.observable({ name: "" }); } } } }; $.extend(App.Admin.Shop.CategoryValidationMapping, App.Admin.HeartValidationMapping); App.Admin.Shop.Category = function () { var self = this; $.extend(self, new App.Admin.Heart()); self.name = ko.observable().extend({ required: true }); self.description = ko.observable(); self.parentCategoryId = ko.observable(); self.imageId = ko.observable(); self.childrenCategories = ko.observableArray(); self.parentCategory = ko.observable({ name: "" }); self.hidden = ko.observable(false); self.orderFormSpecs = ko.observableArray(); self.hasChildren = ko.observable(true); //self.init = function (data) { // self.heartId(data.heartId); // self.parentCategoryId(data.parentCategoryId); // self.name(data.name); // self.description(data.description); // self.imageId(data.imageId); // self.hidden(data.hidden); // if (data.parentCategory) { // self.parentCategory(data.parentCategory); // } // $(data.childrenCategories).each(function () { // self.childrenCategories.push(new App.Admin.Shop.Category(this)); // }); // $(data.orderFormSpecs).each(function () { // self.orderFormSpecs.push(new App.Admin.Spec(this)); // }); //}; //if (data) // self.init(data); } App.Admin.Shop.CategoryFunctions = { initCategory: function () { var self = this; self.initHeart(); //var cats = self.childrenCategories(); //self.childrenCategories.removeAll(); //$(cats).each(function () { // var res = $.extend(ko.mapping.fromJS(this, App.Admin.Shop.CategoryValidationMapping), App.Admin.Shop.CategoryFunctions); // res.initCategory(); // self.childrenCategories.push(res); //}); //$(data.orderFormSpecs).each(function () { // self.orderFormSpecs.push(new App.Admin.Spec(this)); //}); if ($("#categoryDescription").length) { $("#categoryDescription").val(self.description()); initContentEditor(); } self.name.subscribe(function (val) { if (val) { if (!self.title()) { self.title(val); } if (!self.description()) { self.description(val); } } }); }, prepareCategoryForUpdate: function () { var self = this; self.prepareHeartForUpdate(); var text = getTextFromEditor('categoryDescription'); if (text) { self.description(text); } }, loadChildren: function (onSuccess) { var self = this; if (self.childrenCategories().length > 0) { return; }; getJSON("/api/shop/categories/" + self.heartId() + "/get", "", function (result) { if (result.length == 0) { self.hasChildren(false); } $(result).each(function () { var res = $.extend(ko.mapping.fromJS(this, App.Admin.Shop.CategoryValidationMapping), App.Admin.Shop.CategoryFunctions); res.hasChildren = ko.observable(true); self.childrenCategories.push(res); }); if (onSuccess) { onSuccess(); } }) .fail(function () { smartAlert("Произошла ошибка. Если она будет повторяться - обратитесь к разработчикам."); }) .always(function () { unblockUI(); }); }, addChild: function () { var self = this; var category = $.extend(new App.Admin.Shop.Category(), App.Admin.Shop.CategoryFunctions); category.parentCategoryId(self.heartId()); category.parentCategory().name = self.name(); category.parentCategory().id = self.heartId(); category.parentHeartId(self.heartId()); category.newCategory(function () { if (self.childrenCategories().length > 0) { self.childrenCategories.push(category); } else { self.loadChildren(function () { //self.childrenCategories.push(category); }); } self.hasChildren(true); }); }, clearParentCategory: function () { var self = this; self.parentCategoryId(""); self.parentCategory({ name: "" }); }, editParentCategory: function () { var self = this; showCategoriesDialog(function (result) { if (result.id != self.heartId()) { self.parentCategory(result); self.parentCategoryId(result.id); } else { alert("Нельзя установить родительской категорией текущую категорию"); } }); }, newCategory: function (onCreate) { var self = this; self.dialog("/api/shop/category/create", function () { if (onCreate) { onCreate(); } }); }, edit: function () { var self = this; self.dialog("/api/shop/category/update", function () { }); }, save: function (url, onSuccess) { var self = this; blockUI(); postJSON(url, ko.toJS(self), function (result) { if (result.succeed) { if (onSuccess) { onSuccess(result.data); } } }) .fail(function () { smartAlert("Произошла ошибка. Если она будет повторяться - обратитесь к разработчикам."); }) .always(function () { unblockUI(); }); }, remove: function (item, parent) { var self = this; if (self.heartId()) { blockUI(); var url = "/api/shop/category/" + self.heartId() + "/delete"; postJSON(url, "", function (result) { if (result.succeed) { parent.childrenCategories.remove(item); if (parent.childrenCategories().length === 0) { parent.hasChildren(false); } } }) .fail(function () { smartAlert("Произошла ошибка. Если она будет повторяться - обратитесь к разработчикам."); }) .always(function () { unblockUI(); }); } }, pickImage: function () { var self = this; showImagePickDialog(function (imageData) { self.imageId(imageData.ID); $('.remove-image').show(); }); }, removeImage: function () { var self = this; self.imageId(""); $('.remove-image').hide(); }, addSpec: function () { var self = this; showSpecDialog(function (item) { var result = $.grep(self.orderFormSpecs(), function (e) { return e.specId() === item.specId(); }); if (result.length === 0) { self.orderFormSpecs.push(item); } }); }, removeSpec: function (spec, parent) { var self = this; parent.orderFormSpecs.remove(function (item) { return item.specId() === spec.specId(); }); }, moveUp: function (item, parent) { var self = this; var index = parent.childrenCategories.indexOf(item); if (index <= 0) return false; parent.childrenCategories.remove(item); parent.childrenCategories.splice(index - 1, 0, item); }, moveDown: function (item, parent) { var self = this; var index = parent.childrenCategories.indexOf(item); if (index == parent.childrenCategories.length - 1) return false; parent.childrenCategories.remove(item); parent.childrenCategories.splice(index + 1, 0, item); }, dialog: function (url, onSuccess) { var self = this; var dm = ko.validatedObservable(self); var dialogContent = $("#categoryTemplate").tmpl(); var options = { title: "Категория", width: 900, height: 650, resizable: false, modal: true, open: function () { var $form = $(this).find('form'); self.initCategory(); var parents = ko.observableArray(); parents.push({ title: "Нет", heartId: null, type: "Выберите..." }); if (self.parentCategoryId() && self.parentCategory()) { parents.push({ heartId: self.parentCategory().id, title: self.parentCategory().name, type: 'Категории' }); } var that = this; var vm = { dm: dm, parents: parents } self.parentCategory.subscribe(function () { vm.parents.removeAll(); vm.parents.push({ title: "Нет", heartId: null, type: "Выберите..." }); if (self.parentCategory().name) { vm.parents.push({ heartId: self.parentCategory().id, title: self.parentCategory().name, type: 'Категории' }); self.parentHeartId(self.parentCategory().id); } self.parentHeartId.notifySubscribers(); setTimeout(function () { $(".withsearch").selectpicker('refresh'); }, 100); }); ko.applyBindings(vm, that); setTimeout(function () { $(".withsearch").selectpicker(); }, 100); }, buttons: [ { text: "Сохранить", click: function () { var $form = $(this).find('form'); self.prepareCategoryForUpdate(); var $dialog = $(this); //if ($("#categoryDescription", $form).length) { // $("#categoryDescription", $form).val(self.description()); // initContentEditor(); //} if (dm.isValid()) { self.save(url, function (result) { if (result) { self.heartId(result.id); } if (onSuccess) { onSuccess(); } $dialog.dialog("close"); }); } else { dm.errors.showAllMessages(); } } }, { text: "Закрыть", click: function () { $(this).dialog("close"); } } ], close: function () { $(this).dialog('destroy'); dialogContent.remove(); } }; dialogContent.dialog(options); return dialogContent; } }; $.extend(App.Admin.Shop.CategoryFunctions, App.Admin.HeartFunctions); function showCategoriesDialog(onSelected) { blockUI(); var options = { title: "Категории", modal: true, draggable: false, resizable: false, width: 900, height: 650, open: function () { var $dialog = $(this).dialog("widget"); var that = this; unblockUI(); categoriesEditorLoaded(function (item) { if (onSelected) { onSelected({ id: item.heartId(), name: item.name() }); } $(that).dialog("close"); }, $dialog); } }; showDialogFromUrl("/ShopEditor/CategoriesEditor", options); }
synweb/rocms
Shop/RoCMS.Shop.Web/Content/admin/shop/js/category.js
JavaScript
gpl-3.0
16,969
package CGI::Cookie; use strict; use warnings; use if $] >= 5.019, 'deprecate'; our $VERSION='4.38'; use CGI::Util qw(rearrange unescape escape); use overload '""' => \&as_string, 'cmp' => \&compare, 'fallback' => 1; my $PERLEX = 0; # Turn on special checking for ActiveState's PerlEx $PERLEX++ if defined($ENV{'GATEWAY_INTERFACE'}) && $ENV{'GATEWAY_INTERFACE'} =~ /^CGI-PerlEx/; # Turn on special checking for mod_perl # PerlEx::DBI tries to fool DBI by setting MOD_PERL my $MOD_PERL = 0; if (exists $ENV{MOD_PERL} && ! $PERLEX) { if (exists $ENV{MOD_PERL_API_VERSION} && $ENV{MOD_PERL_API_VERSION} == 2) { $MOD_PERL = 2; require Apache2::RequestUtil; require APR::Table; } else { $MOD_PERL = 1; require Apache; } } # fetch a list of cookies from the environment and # return as a hash. the cookies are parsed as normal # escaped URL data. sub fetch { my $class = shift; my $raw_cookie = get_raw_cookie(@_) or return; return $class->parse($raw_cookie); } # Fetch a list of cookies from the environment or the incoming headers and # return as a hash. The cookie values are not unescaped or altered in any way. sub raw_fetch { my $class = shift; my $raw_cookie = get_raw_cookie(@_) or return; my %results; my($key,$value); my @pairs = split("[;,] ?",$raw_cookie); for my $pair ( @pairs ) { $pair =~ s/^\s+|\s+$//g; # trim leading trailing whitespace my ( $key, $value ) = split "=", $pair; $value = defined $value ? $value : ''; $results{$key} = $value; } return wantarray ? %results : \%results; } sub get_raw_cookie { my $r = shift; $r ||= eval { $MOD_PERL == 2 ? Apache2::RequestUtil->request() : Apache->request } if $MOD_PERL; return $r->headers_in->{'Cookie'} if $r; die "Run $r->subprocess_env; before calling fetch()" if $MOD_PERL and !exists $ENV{REQUEST_METHOD}; return $ENV{HTTP_COOKIE} || $ENV{COOKIE}; } sub parse { my ($self,$raw_cookie) = @_; return wantarray ? () : {} unless $raw_cookie; my %results; my @pairs = split("[;,] ?",$raw_cookie); for (@pairs) { s/^\s+//; s/\s+$//; my($key,$value) = split("=",$_,2); # Some foreign cookies are not in name=value format, so ignore # them. next if !defined($value); my @values = (); if ($value ne '') { @values = map unescape($_),split(/[&;]/,$value.'&dmy'); pop @values; } $key = unescape($key); # A bug in Netscape can cause several cookies with same name to # appear. The FIRST one in HTTP_COOKIE is the most recent version. $results{$key} ||= $self->new(-name=>$key,-value=>\@values); } return wantarray ? %results : \%results; } sub new { my ( $class, @params ) = @_; $class = ref( $class ) || $class; # Ignore mod_perl request object--compatibility with Apache::Cookie. shift if ref $params[0] && eval { $params[0]->isa('Apache::Request::Req') || $params[0]->isa('Apache') }; my ( $name, $value, $path, $domain, $secure, $expires, $max_age, $httponly, $samesite ) = rearrange( [ 'NAME', [ 'VALUE', 'VALUES' ], 'PATH', 'DOMAIN', 'SECURE', 'EXPIRES', 'MAX-AGE','HTTPONLY','SAMESITE' ], @params ); return undef unless defined $name and defined $value; my $self = {}; bless $self, $class; $self->name( $name ); $self->value( $value ); $path ||= "/"; $self->path( $path ) if defined $path; $self->domain( $domain ) if defined $domain; $self->secure( $secure ) if defined $secure; $self->expires( $expires ) if defined $expires; $self->max_age( $max_age ) if defined $max_age; $self->httponly( $httponly ) if defined $httponly; $self->samesite( $samesite ) if defined $samesite; return $self; } sub as_string { my $self = shift; return "" unless $self->name; no warnings; # some things may be undefined, that's OK. my $name = escape( $self->name ); my $value = join "&", map { escape($_) } $self->value; my @cookie = ( "$name=$value" ); push @cookie,"domain=".$self->domain if $self->domain; push @cookie,"path=".$self->path if $self->path; push @cookie,"expires=".$self->expires if $self->expires; push @cookie,"max-age=".$self->max_age if $self->max_age; push @cookie,"secure" if $self->secure; push @cookie,"HttpOnly" if $self->httponly; push @cookie,"SameSite=".$self->samesite if $self->samesite; return join "; ", @cookie; } sub compare { my ( $self, $value ) = @_; return "$self" cmp $value; } sub bake { my ($self, $r) = @_; $r ||= eval { $MOD_PERL == 2 ? Apache2::RequestUtil->request() : Apache->request } if $MOD_PERL; if ($r) { $r->headers_out->add('Set-Cookie' => $self->as_string); } else { require CGI; print CGI::header(-cookie => $self); } } # accessors sub name { my ( $self, $name ) = @_; $self->{'name'} = $name if defined $name; return $self->{'name'}; } sub value { my ( $self, $value ) = @_; if ( defined $value ) { my @values = ref $value eq 'ARRAY' ? @$value : ref $value eq 'HASH' ? %$value : ( $value ); $self->{'value'} = [@values]; } return wantarray ? @{ $self->{'value'} } : $self->{'value'}->[0]; } sub domain { my ( $self, $domain ) = @_; $self->{'domain'} = lc $domain if defined $domain; return $self->{'domain'}; } sub secure { my ( $self, $secure ) = @_; $self->{'secure'} = $secure if defined $secure; return $self->{'secure'}; } sub expires { my ( $self, $expires ) = @_; $self->{'expires'} = CGI::Util::expires($expires,'cookie') if defined $expires; return $self->{'expires'}; } sub max_age { my ( $self, $max_age ) = @_; $self->{'max-age'} = CGI::Util::expire_calc($max_age)-time() if defined $max_age; return $self->{'max-age'}; } sub path { my ( $self, $path ) = @_; $self->{'path'} = $path if defined $path; return $self->{'path'}; } sub httponly { # HttpOnly my ( $self, $httponly ) = @_; $self->{'httponly'} = $httponly if defined $httponly; return $self->{'httponly'}; } my %_legal_samesite = ( Strict => 1, Lax => 1 ); sub samesite { # SameSite my $self = shift; my $samesite = ucfirst lc +shift if @_; # Normalize casing. $self->{'samesite'} = $samesite if $samesite and $_legal_samesite{$samesite}; return $self->{'samesite'}; } 1; =head1 NAME CGI::Cookie - Interface to HTTP Cookies =head1 SYNOPSIS use CGI qw/:standard/; use CGI::Cookie; # Create new cookies and send them $cookie1 = CGI::Cookie->new(-name=>'ID',-value=>123456); $cookie2 = CGI::Cookie->new(-name=>'preferences', -value=>{ font => Helvetica, size => 12 } ); print header(-cookie=>[$cookie1,$cookie2]); # fetch existing cookies %cookies = CGI::Cookie->fetch; $id = $cookies{'ID'}->value; # create cookies returned from an external source %cookies = CGI::Cookie->parse($ENV{COOKIE}); =head1 DESCRIPTION CGI::Cookie is an interface to HTTP/1.1 cookies, a mechanism that allows Web servers to store persistent information on the browser's side of the connection. Although CGI::Cookie is intended to be used in conjunction with CGI.pm (and is in fact used by it internally), you can use this module independently. For full information on cookies see https://tools.ietf.org/html/rfc6265 =head1 USING CGI::Cookie CGI::Cookie is object oriented. Each cookie object has a name and a value. The name is any scalar value. The value is any scalar or array value (associative arrays are also allowed). Cookies also have several optional attributes, including: =over 4 =item B<1. expiration date> The expiration date tells the browser how long to hang on to the cookie. If the cookie specifies an expiration date in the future, the browser will store the cookie information in a disk file and return it to the server every time the user reconnects (until the expiration date is reached). If the cookie species an expiration date in the past, the browser will remove the cookie from the disk file. If the expiration date is not specified, the cookie will persist only until the user quits the browser. =item B<2. domain> This is a partial or complete domain name for which the cookie is valid. The browser will return the cookie to any host that matches the partial domain name. For example, if you specify a domain name of ".capricorn.com", then the browser will return the cookie to Web servers running on any of the machines "www.capricorn.com", "ftp.capricorn.com", "feckless.capricorn.com", etc. Domain names must contain at least two periods to prevent attempts to match on top level domains like ".edu". If no domain is specified, then the browser will only return the cookie to servers on the host the cookie originated from. =item B<3. path> If you provide a cookie path attribute, the browser will check it against your script's URL before returning the cookie. For example, if you specify the path "/cgi-bin", then the cookie will be returned to each of the scripts "/cgi-bin/tally.pl", "/cgi-bin/order.pl", and "/cgi-bin/customer_service/complain.pl", but not to the script "/cgi-private/site_admin.pl". By default, the path is set to "/", so that all scripts at your site will receive the cookie. =item B<4. secure flag> If the "secure" attribute is set, the cookie will only be sent to your script if the CGI request is occurring on a secure channel, such as SSL. =item B<5. httponly flag> If the "httponly" attribute is set, the cookie will only be accessible through HTTP Requests. This cookie will be inaccessible via JavaScript (to prevent XSS attacks). This feature is supported by nearly all modern browsers. See these URLs for more information: http://msdn.microsoft.com/en-us/library/ms533046.aspx http://www.browserscope.org/?category=security&v=top =item B<6. samesite flag> Allowed settings are C<Strict> and C<Lax>. As of June 2016, support is limited to recent releases of Chrome and Opera. L<https://tools.ietf.org/html/draft-west-first-party-cookies-07> =back =head2 Creating New Cookies my $c = CGI::Cookie->new(-name => 'foo', -value => 'bar', -expires => '+3M', '-max-age' => '+3M', -domain => '.capricorn.com', -path => '/cgi-bin/database', -secure => 1, -samesite=> "Lax" ); Create cookies from scratch with the B<new> method. The B<-name> and B<-value> parameters are required. The name must be a scalar value. The value can be a scalar, an array reference, or a hash reference. (At some point in the future cookies will support one of the Perl object serialization protocols for full generality). B<-expires> accepts any of the relative or absolute date formats recognized by CGI.pm, for example "+3M" for three months in the future. See CGI.pm's documentation for details. B<-max-age> accepts the same data formats as B<< -expires >>, but sets a relative value instead of an absolute like B<< -expires >>. This is intended to be more secure since a clock could be changed to fake an absolute time. In practice, as of 2011, C<< -max-age >> still does not enjoy the widespread support that C<< -expires >> has. You can set both, and browsers that support C<< -max-age >> should ignore the C<< Expires >> header. The drawback to this approach is the bit of bandwidth for sending an extra header on each cookie. B<-domain> points to a domain name or to a fully qualified host name. If not specified, the cookie will be returned only to the Web server that created it. B<-path> points to a partial URL on the current server. The cookie will be returned to all URLs beginning with the specified path. If not specified, it defaults to '/', which returns the cookie to all pages at your site. B<-secure> if set to a true value instructs the browser to return the cookie only when a cryptographic protocol is in use. B<-httponly> if set to a true value, the cookie will not be accessible via JavaScript. B<-samesite> may be C<Lax> or C<Strict> and is an evolving part of the standards for cookies. Please refer to current documentation regarding it. For compatibility with Apache::Cookie, you may optionally pass in a mod_perl request object as the first argument to C<new()>. It will simply be ignored: my $c = CGI::Cookie->new($r, -name => 'foo', -value => ['bar','baz']); =head2 Sending the Cookie to the Browser The simplest way to send a cookie to the browser is by calling the bake() method: $c->bake; This will print the Set-Cookie HTTP header to STDOUT using CGI.pm. CGI.pm will be loaded for this purpose if it is not already. Otherwise CGI.pm is not required or used by this module. Under mod_perl, pass in an Apache request object: $c->bake($r); If you want to set the cookie yourself, Within a CGI script you can send a cookie to the browser by creating one or more Set-Cookie: fields in the HTTP header. Here is a typical sequence: my $c = CGI::Cookie->new(-name => 'foo', -value => ['bar','baz'], -expires => '+3M'); print "Set-Cookie: $c\n"; print "Content-Type: text/html\n\n"; To send more than one cookie, create several Set-Cookie: fields. If you are using CGI.pm, you send cookies by providing a -cookie argument to the header() method: print header(-cookie=>$c); Mod_perl users can set cookies using the request object's header_out() method: $r->headers_out->set('Set-Cookie' => $c); Internally, Cookie overloads the "" operator to call its as_string() method when incorporated into the HTTP header. as_string() turns the Cookie's internal representation into an RFC-compliant text representation. You may call as_string() yourself if you prefer: print "Set-Cookie: ",$c->as_string,"\n"; =head2 Recovering Previous Cookies %cookies = CGI::Cookie->fetch; B<fetch> returns an associative array consisting of all cookies returned by the browser. The keys of the array are the cookie names. You can iterate through the cookies this way: %cookies = CGI::Cookie->fetch; for (keys %cookies) { do_something($cookies{$_}); } In a scalar context, fetch() returns a hash reference, which may be more efficient if you are manipulating multiple cookies. CGI.pm uses the URL escaping methods to save and restore reserved characters in its cookies. If you are trying to retrieve a cookie set by a foreign server, this escaping method may trip you up. Use raw_fetch() instead, which has the same semantics as fetch(), but performs no unescaping. You may also retrieve cookies that were stored in some external form using the parse() class method: $COOKIES = `cat /usr/tmp/Cookie_stash`; %cookies = CGI::Cookie->parse($COOKIES); If you are in a mod_perl environment, you can save some overhead by passing the request object to fetch() like this: CGI::Cookie->fetch($r); If the value passed to parse() is undefined, an empty array will returned in list context, and an empty hashref will be returned in scalar context. =head2 Manipulating Cookies Cookie objects have a series of accessor methods to get and set cookie attributes. Each accessor has a similar syntax. Called without arguments, the accessor returns the current value of the attribute. Called with an argument, the accessor changes the attribute and returns its new value. =over 4 =item B<name()> Get or set the cookie's name. Example: $name = $c->name; $new_name = $c->name('fred'); =item B<value()> Get or set the cookie's value. Example: $value = $c->value; @new_value = $c->value(['a','b','c','d']); B<value()> is context sensitive. In a list context it will return the current value of the cookie as an array. In a scalar context it will return the B<first> value of a multivalued cookie. =item B<domain()> Get or set the cookie's domain. =item B<path()> Get or set the cookie's path. =item B<expires()> Get or set the cookie's expiration time. =item B<max_age()> Get or set the cookie's max_age value. =back =head1 AUTHOR INFORMATION The CGI.pm distribution is copyright 1995-2007, Lincoln D. Stein. It is distributed under GPL and the Artistic License 2.0. It is currently maintained by Lee Johnson with help from many contributors. Address bug reports and comments to: https://github.com/leejo/CGI.pm/issues The original bug tracker can be found at: https://rt.cpan.org/Public/Dist/Display.html?Queue=CGI.pm When sending bug reports, please provide the version of CGI.pm, the version of Perl, the name and version of your Web server, and the name and version of the operating system you are using. If the problem is even remotely browser dependent, please provide information about the affected browsers as well. =head1 BUGS This section intentionally left blank. =head1 SEE ALSO L<CGI::Carp>, L<CGI> L<RFC 2109|http://www.ietf.org/rfc/rfc2109.txt>, L<RFC 2695|http://www.ietf.org/rfc/rfc2965.txt> =cut
kiamazi/mira
local/lib/perl5/CGI/Cookie.pm
Perl
gpl-3.0
17,503
/******************************************************************** ** Nulloy Music Player, http://nulloy.com ** Copyright (C) 2010-2014 Sergey Vlasov <sergey@vlasov.me> ** ** This program can be distributed under the terms of the GNU ** General Public License version 3.0 as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL3 ** included in the packaging of this file. Please review the ** following information to ensure the GNU General Public License ** version 3.0 requirements will be met: ** ** http://www.gnu.org/licenses/gpl-3.0.html ** *********************************************************************/ #include "aboutDialog.h" #include <QCoreApplication> #include <QVBoxLayout> #include <QSpacerItem> #include <QTabWidget> #include <QLabel> #include <QTextBrowser> #include <QTextStream> #include <QPushButton> #include <QFile> #ifdef Q_WS_MAC #include <QBitmap> #endif NAboutDialog::NAboutDialog(QWidget *parent) : QDialog(parent) { QString aboutHtml = QString() + #ifdef Q_WS_MAC "<span style=\"font-size:14pt;\">" + #else "<span style=\"font-size:9pt;\">" + #endif "<b>" + QCoreApplication::applicationName() + " Music Player</b>" + "<br>" + "<a href='http://" + QCoreApplication::organizationDomain() + "'>http://" + QCoreApplication::organizationDomain() + "</a>" + "</span><br><br>" + #ifdef Q_WS_MAC "<span style=\"font-size:10pt;\">" + #else "<span style=\"font-size:8pt;\">" + #endif tr("Version: ") + QCoreApplication::applicationVersion() + "<br>" + (QString(_N_TIME_STAMP_).isEmpty() ? "" : tr("Build: ") + QString(_N_TIME_STAMP_)) + "<br><br>" + "Copyright (C) 2010-2014 Sergey Vlasov &lt;sergey@vlasov.me&gt;" + "</span>"; setWindowTitle(QObject::tr("About ") + QCoreApplication::applicationName()); setMaximumSize(0, 0); QVBoxLayout *layout = new QVBoxLayout; setLayout(layout); QTabWidget *tabWidget = new QTabWidget(parent); layout->addWidget(tabWidget); // about tab >> QWidget *aboutTab = new QWidget; tabWidget->addTab(aboutTab, tr("Common")); QVBoxLayout *aboutTabLayout = new QVBoxLayout; aboutTab->setLayout(aboutTabLayout); QLabel *iconLabel = new QLabel; QPixmap pixmap(":icon-96.png"); iconLabel->setPixmap(pixmap); #ifdef Q_WS_MAC iconLabel->setMask(pixmap.mask()); #endif QHBoxLayout *iconLayout = new QHBoxLayout; iconLayout->addStretch(); iconLayout->addWidget(iconLabel); iconLayout->addStretch(); aboutTabLayout->addLayout(iconLayout); QTextBrowser *aboutTextBrowser = new QTextBrowser; aboutTextBrowser->setObjectName("aboutTextBrowser"); aboutTextBrowser->setStyleSheet("background: transparent"); aboutTextBrowser->setFrameShape(QFrame::NoFrame); aboutTextBrowser->setMinimumWidth(350); aboutTextBrowser->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); aboutTextBrowser->setOpenExternalLinks(TRUE); aboutTextBrowser->setHtml("<center>" + aboutHtml + "</center>"); aboutTabLayout->addWidget(aboutTextBrowser); // << about tab // thanks tab >> QWidget *thanksTab = new QWidget; tabWidget->addTab(thanksTab, tr("Thanks")); QVBoxLayout *thanksTabLayout = new QVBoxLayout; thanksTabLayout->setContentsMargins(0, 0, 0, 0); thanksTab->setLayout(thanksTabLayout); QFile thanksFile( ":/THANKS"); thanksFile.open(QIODevice::ReadOnly | QIODevice::Text); QTextStream thanksStream(&thanksFile); QString thanksText = thanksStream.readAll(); thanksText.replace(QRegExp("(\\w)\\n(\\w)"), "\\1 \\2"); thanksText.remove("\n\n\n"); thanksFile.close(); QTextBrowser *thanksTextBrowser = new QTextBrowser; thanksTextBrowser->setText(thanksText); thanksTabLayout->addWidget(thanksTextBrowser); // << thanks tab // changelog tab >> QWidget *changelogTab = new QWidget; tabWidget->addTab(changelogTab, tr("Changelog")); QVBoxLayout *changelogTabLayout = new QVBoxLayout; changelogTabLayout->setContentsMargins(0, 0, 0, 0); changelogTab->setLayout(changelogTabLayout); QFile changelogFile( ":/ChangeLog"); changelogFile.open(QIODevice::ReadOnly | QIODevice::Text); QTextStream changelogStream(&changelogFile); QString changelogHtml = changelogStream.readAll(); changelogHtml.replace("\n", "<br>\n"); changelogHtml.replace(QRegExp("(\\*[^<]*)(<br>)"), "<b>\\1</b>\\2"); changelogFile.close(); QTextBrowser *changelogTextBrowser = new QTextBrowser; changelogTextBrowser->setHtml(changelogHtml); changelogTextBrowser->setOpenExternalLinks(TRUE); changelogTabLayout->addWidget(changelogTextBrowser); // << changelog tab // license tab >> QWidget *licenseTab = new QWidget; tabWidget->addTab(licenseTab, tr("License")); QVBoxLayout *licenseTabLayout = new QVBoxLayout; licenseTab->setLayout(licenseTabLayout); QString licenseHtml = #ifdef Q_WS_MAC "<span style=\"font-size:10pt;\">" #else "<span style=\"font-size:8pt;\">" #endif "This program is free software: you can redistribute it and/or modify " "it under the terms of the GNU General Public License version 3.0 " "as published by the Free Software Foundation.<br>" "<br>" "This program is distributed in the hope that it will be useful, " "but <b>WITHOUT ANY WARRANTY</b>; without even the implied warranty of " "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the " "GNU General Public License for more details.<br>" "<br>" "You should have received a copy of the GNU General Public License " "along with this program. If not, see " "<a href='http://www.gnu.org/licenses/gpl-3.0.html'>http://www.gnu.org/licenses/gpl-3.0.html</a>." "</span>"; QTextBrowser *licenseTextBrowser = new QTextBrowser; licenseTextBrowser->setObjectName("licenseTextBrowser"); licenseTextBrowser->setStyleSheet("background: transparent"); licenseTextBrowser->setFrameShape(QFrame::NoFrame); licenseTextBrowser->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); licenseTextBrowser->setOpenExternalLinks(TRUE); licenseTextBrowser->setAlignment(Qt::AlignVCenter); licenseTextBrowser->setHtml(licenseHtml); licenseTabLayout->addItem(new QSpacerItem(1, 1, QSizePolicy::Expanding, QSizePolicy::Expanding)); licenseTabLayout->addWidget(licenseTextBrowser); licenseTabLayout->addItem(new QSpacerItem(1, 1, QSizePolicy::Expanding, QSizePolicy::Expanding)); // << license tab QPushButton *closeButton = new QPushButton(tr("Close")); connect(closeButton, SIGNAL(clicked()), this, SLOT(accept())); QHBoxLayout *buttonLayout = new QHBoxLayout(); buttonLayout->addStretch(); buttonLayout->addWidget(closeButton); buttonLayout->addStretch(); layout->addLayout(buttonLayout); } NAboutDialog::~NAboutDialog() {} void NAboutDialog::show() { QDialog::show(); // resize according to content foreach (QString objectName, QStringList() << "aboutTextBrowser" << "licenseTextBrowser"){ QTextBrowser *textBrowser = qFindChild<QTextBrowser *>(parent(), objectName); QSize textSize = textBrowser->document()->size().toSize(); textBrowser->setMinimumHeight(textSize.height()); } }
0pq76r/nulloy
src/aboutDialog.cpp
C++
gpl-3.0
7,011
#ifndef PLUGINSSOURCELOADER_P_H #define PLUGINSSOURCELOADER_P_H #include <QObject> #include <QStringList> #include <QHash> #include <QPair> #include <QNetworkReply> class Widget_PluginsSourceLoader; class QNetworkAccessManager; class QListWidgetItem; class Dialog_NewPlugins; class PluginsSourceLoader_P : public QObject { Q_OBJECT friend class Widget_PluginsSourceLoader; public: signals: public slots: private: QNetworkAccessManager *m__NetworkAM; QStringList m__PluginPaths; QHash<QString, QByteArray> m__PluginHash; QByteArray nullHash; QPair<QListWidgetItem *, QByteArray> currentUpdate; bool isNewSource; bool m__FullUpdate; Dialog_NewPlugins *m__DialogNewPlugins; explicit PluginsSourceLoader_P( Widget_PluginsSourceLoader *parent ); ~PluginsSourceLoader_P(); Widget_PluginsSourceLoader * p_dptr() const; QListWidgetItem * addPluginSource( const QUrl &source, bool newPluginsNotify = false ); void updatePluginSource( QListWidgetItem *pluginSource ); void parseXML( const QByteArray &xml ); void nextPluginSource(); private slots: void replyFinished( QNetworkReply *reply ); void readyReadData(); void downloadProgress( qint64 current, qint64 overall ); void downloadError( QNetworkReply::NetworkError ); void newPluginsSelected(); }; #endif // PLUGINSSOURCELOADER_P_H
Eveler/libs
__tests__/DBCatalog/Configuration/PluginsSourceLoader/pluginssourceloader_p.h
C
gpl-3.0
1,342
#!/usr/bin/env bash set -e if [ -z "$1" ]; then echo "*** Please specify branch name to release Medcryptor Staging build from it." exit 1 fi read -p "Confirm releasing MedCryptor STAGING build from $1 branch? (y/n)" choice case "$choice" in y|Y ) echo "yes";; n|N ) exit;; * ) exit;; esac export NODE_ENV=production echo "Building and publishing staging" peerio-desktop-release --key ~/.peerio-updater/secret.key \ --shared ~/Win \ --repository PeerioTechnologies/peerio-desktop \ --overrides PeerioTechnologies/medcryptor-desktop,PeerioTechnologies/medcryptor-desktop-staging \ --tag $1 \ --versioning medcryptorstaging \ --publish
PeerioTechnologies/peerio-desktop
scripts/deploy-medcryptor-staging.sh
Shell
gpl-3.0
790
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <html> <head> <title>planes.gui.tmb : API documentation</title> <meta content="text/html;charset=utf-8" http-equiv="Content-Type" /> <link href="apidocs.css" type="text/css" rel="stylesheet" /> </head> <body> <h1 class="module">p.g.tmb : module documentation</h1> <p> <span id="part">Part of <a href="planes.html">planes</a>.<a href="planes.gui.html">gui</a></span> </p> <div> </div> <div class="docstring"> <pre>tmb - planes.gui widgets with top-mid-bottom backgrounds. Copyright 2012, 2013 by Florian Berger &lt;fberger@florian-berger.de&gt; Module doctests: &gt;&gt;&gt; display = planes.Display((500, 350)) &gt;&gt;&gt; display.image.fill((128, 128, 128)) &lt;rect(0, 0, 500, 350)&gt; &gt;&gt;&gt; ok_box = TMBOkBox("Welcome to a TMBOkBox!") &gt;&gt;&gt; ok_box.rect.center = (250, 80) &gt;&gt;&gt; display.sub(ok_box) &gt;&gt;&gt; def callback(plane): ... raise SystemExit &gt;&gt;&gt; option_selector = TMBOptionSelector("o_s", ... ["Option 1", "Option 2", "Option 3"], ... callback) &gt;&gt;&gt; option_selector.rect.center = (250, 240) &gt;&gt;&gt; display.sub(option_selector) &gt;&gt;&gt; clock = pygame.time.Clock() &gt;&gt;&gt; while True: ... events = pygame.event.get() ... display.process(events) ... display.update() ... display.render() ... pygame.display.flip() ... clock.tick(30) Traceback (most recent call last): ... SystemExit</pre> </div> <div id="splitTables"> <table class="children sortable" id="id20"> <tr class="class"> <td>Class</td> <td><a href="planes.gui.tmb.TMBStyle.html">TMBStyle</a></td> <td><tt>This class encapsulates the top, mid and bottom images to be used as widget background.</tt></td> </tr><tr class="class"> <td>Class</td> <td><a href="planes.gui.tmb.TMBContainer.html">TMBContainer</a></td> <td><tt>A planes.gui.Container with fixed width and TMB background.</tt></td> </tr><tr class="class"> <td>Class</td> <td><a href="planes.gui.tmb.TMBOkBox.html">TMBOkBox</a></td> <td><tt>A box which displays a message and an LMR OK button over a TMB background. It is destroyed when OK is clicked. The message will be wrapped at newline characters.</tt></td> </tr><tr class="class"> <td>Class</td> <td><a href="planes.gui.tmb.TMBOptionSelector.html">TMBOptionSelector</a></td> <td><tt>A TMBOptionSelector wraps an lmr.LMROptionList and an OK button over a TMB background, calling a callback when a selection is confirmed.</tt></td> </tr><tr class="class"> <td>Class</td> <td><a href="planes.gui.tmb.TMBGetStringDialog.html">TMBGetStringDialog</a></td> <td><tt>A combination of TMBContainer, Label, TextBox and Button that asks the user for a string.</tt></td> </tr><tr class="class"> <td>Class</td> <td><a href="planes.gui.tmb.TMBFadingContainer.html">TMBFadingContainer</a></td> <td><tt>A planes.gui.FadingContainer with fixed width and TMB background.</tt></td> </tr> </table> </div> <address> <a href="index.html">API Documentation</a> for planes, generated by <a href="https://launchpad.net/pydoctor/">pydoctor</a> at 2014-10-24 14:00:11. </address> </body> </html>
flberger/planes
doc/planes.gui.tmb.html
HTML
gpl-3.0
3,544
/* * This file is part of muCommander, http://www.mucommander.com * Copyright (C) 2002-2012 Maxence Bernard * * muCommander is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * muCommander is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package com.mucommander.ui.popup; import javax.swing.Action; import javax.swing.JMenuItem; import javax.swing.JPopupMenu; import com.mucommander.ui.action.ActionManager; import com.mucommander.ui.helper.MenuToolkit; import com.mucommander.ui.main.MainFrame; import ru.trolsoft.ui.TMenuSeparator; /** * Abstract class for popup menus that display MuActions. * * @author Maxence Bernard, Nicolas Rinaudo, Arik Hadas */ public abstract class MuActionsPopupMenu extends JPopupMenu { /** Parent MainFrame instance */ private final MainFrame mainFrame; public MuActionsPopupMenu(MainFrame mainFrame) { this.mainFrame = mainFrame; } /** * Adds the MuAction denoted by the given ID to this popup menu, as a <code>JMenuItem</code>. * @param actionId action ID */ protected JMenuItem addAction(String actionId) { return add(ActionManager.getActionInstance(actionId, mainFrame)); } @Override public final JMenuItem add(Action a) { JMenuItem item = super.add(a); MenuToolkit.configureActionMenuItem(item); return item; } @Override public void addSeparator() { add(new TMenuSeparator()); } }
Keltek/mucommander
src/main/com/mucommander/ui/popup/MuActionsPopupMenu.java
Java
gpl-3.0
1,962
from ._costs import *
csxeba/ReSkiv
brainforge/costs/__init__.py
Python
gpl-3.0
22
package org.maxgamer.rs.model.entity.mob.combat.mage; import co.paralleluniverse.fibers.SuspendExecution; import org.maxgamer.rs.model.action.Action; import org.maxgamer.rs.model.entity.mob.Mob; import org.maxgamer.rs.model.entity.mob.persona.Persona; import org.maxgamer.rs.model.entity.mob.persona.player.Player; import org.maxgamer.rs.model.item.ItemStack; import org.maxgamer.rs.model.item.inventory.Container; import org.maxgamer.rs.model.item.inventory.ContainerException; import org.maxgamer.rs.model.item.inventory.ContainerState; /** * @author netherfoam */ public class AlchemySpell extends ItemSpell { private double multiplier; public AlchemySpell(int level, int gfx, int anim, int castTime, double multiplier, ItemStack... runes) { super(level, gfx, anim, castTime, runes); if (multiplier <= 0) { throw new IllegalArgumentException("Multiplier must be > 0 and is usually 0.6 or 0.9 but less than 1"); } this.multiplier = multiplier; } @Override public void cast(final Mob source, final Container c, final int slot) { //Item guaranteed not to be null by caller final ItemStack item = c.get(slot); final int coins = (int) (item.getDefinition().getValue() * multiplier); if (coins <= 0) { //Would destroy item for no reward if (source instanceof Player) { source.sendMessage("You can't cast that spell on that item."); } return; } if (!this.hasRequirements(source) || !takeConsumables(source)) { //This checks runes as well return; } source.getActions().clear(); source.getActions().queue(new Action(source) { @Override protected void run() throws SuspendExecution { displayCast(source); wait(4); ContainerState state = c.getState(); try { state.remove(slot, item.setAmount(1)); } catch (ContainerException e) { return; //The item could not be removed } try { state.add(ItemStack.create(995, coins)); } catch (ContainerException e) { if (source instanceof Persona) { ((Persona) source).getLostAndFound().add(ItemStack.create(995, coins)); } } state.apply(); /*if (tick == 0) { displayCast(source); } tick++; if (tick >= 4) { ContainerState state = c.getState(); try { state.remove(slot, item.setAmount(1)); } catch (ContainerException e) { return true; //The item could not be removed } try { state.add(ItemStack.create(995, coins)); } catch (ContainerException e) { if (source instanceof Persona) { ((Persona) source).getLostAndFound().add(ItemStack.create(995, coins)); } } state.apply(); return true; } return false;*/ } @Override protected void onCancel() { } @Override protected boolean isCancellable() { return false; } }); } }
netherfoam/Titan
src/main/java/org/maxgamer/rs/model/entity/mob/combat/mage/AlchemySpell.java
Java
gpl-3.0
3,779
(function(){ var getDataBtn = document.getElementById('btn-getdata'); var content = document.getElementById('content'); getDataBtn.addEventListener('click',getCourseData); function getCourseData(){ datacontext().getCourseSessions(function(courseSessions){ renderView(courseSessions); }); } function renderView(sessions){ content.innerHTML = JSON.stringify(sessions); } })();
filinils/FrontEndSeries
testApp/app/view.js
JavaScript
gpl-3.0
396
<?php /* #module_name,Admin #module_description,Administrative Core #module_req,1 #module_id,2 */ $self=$_GET['module']; $module_public='./?module=admin'; $module_admin='./?module=admin'; $module_data='./?module=data&part=admin'; $array= array('Admin'=> array(), 'Public'=> array() ); ?>
CraXyOW3/eve_cms
modules/admin/config.php
PHP
gpl-3.0
288
/*! * Bootstrap v2.0.4 * * Copyright 2012 Twitter, Inc * Licensed under the Apache License v2.0 * http://www.apache.org/licenses/LICENSE-2.0 * * Designed and built with all the love in the world @twitter by @mdo and @fat. */ article, aside, details, figcaption, figure, footer, header, hgroup, nav, section { display: block; } audio, canvas, video { display: inline-block; *display: inline; *zoom: 1; } audio:not([controls]) { display: none; } html { font-size: 100%; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; } a:focus { outline: thin dotted #333; outline: 5px auto -webkit-focus-ring-color; outline-offset: -2px; } a:hover, a:active { outline: 0; } sub, sup { position: relative; font-size: 75%; line-height: 0; vertical-align: baseline; } sup { top: -0.5em; } sub { bottom: -0.25em; } img { max-width: 100%; vertical-align: middle; border: 0; -ms-interpolation-mode: bicubic; } #map_canvas img { max-width: none; } button, input, select, textarea { margin: 0; font-size: 100%; vertical-align: middle; } button, input { *overflow: visible; line-height: normal; } button::-moz-focus-inner, input::-moz-focus-inner { padding: 0; border: 0; } button, input[type="button"], input[type="reset"], input[type="submit"] { cursor: pointer; -webkit-appearance: button; } input[type="search"] { -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; -webkit-appearance: textfield; } input[type="search"]::-webkit-search-decoration, input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; } textarea { overflow: auto; vertical-align: top; } .clearfix { *zoom: 1; } .clearfix:before, .clearfix:after { display: table; content: ""; } .clearfix:after { clear: both; } .hide-text { font: 0/0 a; color: transparent; text-shadow: none; background-color: transparent; border: 0; } .input-block-level { display: block; width: 100%; min-height: 28px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box; box-sizing: border-box; } body { margin: 0; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px; color: #333333; background-color: #ffffff; } a { color: #0088cc; text-decoration: none; } a:hover { color: #005580; text-decoration: underline; } .row { margin-left: -20px; *zoom: 1; } .row:before, .row:after { display: table; content: ""; } .row:after { clear: both; } [class*="span"] { float: left; margin-left: 20px; } .container, .navbar-fixed-top .container, .navbar-fixed-bottom .container { width: 940px; } .span12 { width: 940px; } .span11 { width: 860px; } .span10 { width: 780px; } .span9 { width: 700px; } .span8 { width: 620px; } .span7 { width: 540px; } .span6 { width: 460px; } .span5 { width: 380px; } .span4 { width: 300px; } .span3 { width: 220px; } .span2 { width: 140px; } .span1 { width: 60px; } .offset12 { margin-left: 980px; } .offset11 { margin-left: 900px; } .offset10 { margin-left: 820px; } .offset9 { margin-left: 740px; } .offset8 { margin-left: 660px; } .offset7 { margin-left: 580px; } .offset6 { margin-left: 500px; } .offset5 { margin-left: 420px; } .offset4 { margin-left: 340px; } .offset3 { margin-left: 260px; } .offset2 { margin-left: 180px; } .offset1 { margin-left: 100px; } .row-fluid { width: 100%; *zoom: 1; } .row-fluid:before, .row-fluid:after { display: table; content: ""; } .row-fluid:after { clear: both; } .row-fluid [class*="span"] { display: block; width: 100%; min-height: 28px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box; box-sizing: border-box; float: left; margin-left: 2.127659574%; *margin-left: 2.0744680846382977%; } .row-fluid [class*="span"]:first-child { margin-left: 0; } .row-fluid .span12 { width: 99.99999998999999%; *width: 99.94680850063828%; } .row-fluid .span11 { width: 91.489361693%; *width: 91.4361702036383%; } .row-fluid .span10 { width: 82.97872339599999%; *width: 82.92553190663828%; } .row-fluid .span9 { width: 74.468085099%; *width: 74.4148936096383%; } .row-fluid .span8 { width: 65.95744680199999%; *width: 65.90425531263828%; } .row-fluid .span7 { width: 57.446808505%; *width: 57.3936170156383%; } .row-fluid .span6 { width: 48.93617020799999%; *width: 48.88297871863829%; } .row-fluid .span5 { width: 40.425531911%; *width: 40.3723404216383%; } .row-fluid .span4 { width: 31.914893614%; *width: 31.8617021246383%; } .row-fluid .span3 { width: 23.404255317%; *width: 23.3510638276383%; } .row-fluid .span2 { width: 14.89361702%; *width: 14.8404255306383%; } .row-fluid .span1 { width: 6.382978723%; *width: 6.329787233638298%; } .container { margin-right: auto; margin-left: auto; *zoom: 1; } .container:before, .container:after { display: table; content: ""; } .container:after { clear: both; } .container-fluid { padding-right: 20px; padding-left: 20px; *zoom: 1; } .container-fluid:before, .container-fluid:after { display: table; content: ""; } .container-fluid:after { clear: both; } p { margin: 0 0 9px; } p small { font-size: 11px; color: #999999; } .lead { margin-bottom: 18px; font-size: 20px; font-weight: 200; line-height: 27px; } h1, h2, h3, h4, h5, h6 { margin: 0; font-family: inherit; font-weight: bold; color: inherit; text-rendering: optimizelegibility; } h1 small, h2 small, h3 small, h4 small, h5 small, h6 small { font-weight: normal; color: #999999; } h1 { font-size: 30px; line-height: 36px; } h1 small { font-size: 18px; } h2 { font-size: 24px; line-height: 36px; } h2 small { font-size: 18px; } h3 { font-size: 18px; line-height: 27px; } h3 small { font-size: 14px; } h4, h5, h6 { line-height: 18px; } h4 { font-size: 14px; } h4 small { font-size: 12px; } h5 { font-size: 12px; } h6 { font-size: 11px; color: #999999; text-transform: uppercase; } .page-header { padding-bottom: 17px; margin: 18px 0; border-bottom: 1px solid #eeeeee; } .page-header h1 { line-height: 1; } ul, ol { padding: 0; margin: 0 0 9px 25px; } ul ul, ul ol, ol ol, ol ul { margin-bottom: 0; } ul { list-style: disc; } ol { list-style: decimal; } li { line-height: 18px; } ul.unstyled, ol.unstyled { margin-left: 0; list-style: none; } dl { margin-bottom: 18px; } dt, dd { line-height: 18px; } dt { font-weight: bold; line-height: 17px; } dd { margin-left: 9px; } .dl-horizontal dt { float: left; width: 120px; clear: left; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .dl-horizontal dd { margin-left: 130px; } hr { margin: 18px 0; border: 0; border-top: 1px solid #eeeeee; border-bottom: 1px solid #ffffff; } strong { font-weight: bold; } em { font-style: italic; } .muted { color: #999999; } abbr[title] { cursor: help; border-bottom: 1px dotted #999999; } abbr.initialism { font-size: 90%; text-transform: uppercase; } blockquote { padding: 0 0 0 15px; margin: 0 0 18px; border-left: 5px solid #eeeeee; } blockquote p { margin-bottom: 0; font-size: 16px; font-weight: 300; line-height: 22.5px; } blockquote small { display: block; line-height: 18px; color: #999999; } blockquote small:before { content: '\2014 \00A0'; } blockquote.pull-right { float: right; padding-right: 15px; padding-left: 0; border-right: 5px solid #eeeeee; border-left: 0; } blockquote.pull-right p, blockquote.pull-right small { text-align: right; } q:before, q:after, blockquote:before, blockquote:after { content: ""; } address { display: block; margin-bottom: 18px; font-style: normal; line-height: 18px; } small { font-size: 100%; } cite { font-style: normal; } code, pre { padding: 0 3px 2px; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12px; color: #333333; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; } code { padding: 2px 4px; color: #d14; background-color: #f7f7f9; border: 1px solid #e1e1e8; } pre { display: block; padding: 8.5px; margin: 0 0 9px; font-size: 12.025px; line-height: 18px; word-break: break-all; word-wrap: break-word; white-space: pre; white-space: pre-wrap; background-color: #f5f5f5; border: 1px solid #ccc; border: 1px solid rgba(0, 0, 0, 0.15); -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; } pre.prettyprint { margin-bottom: 18px; } pre code { padding: 0; color: inherit; background-color: transparent; border: 0; } .pre-scrollable { max-height: 340px; overflow-y: scroll; } form { margin: 0 0 18px; } fieldset { padding: 0; margin: 0; border: 0; } legend { display: block; width: 100%; padding: 0; margin-bottom: 27px; font-size: 19.5px; line-height: 36px; color: #333333; border: 0; border-bottom: 1px solid #e5e5e5; } legend small { font-size: 13.5px; color: #999999; } label, input, button, select, textarea { font-size: 13px; font-weight: normal; line-height: 18px; } input, button, select, textarea { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; } label { display: block; margin-bottom: 5px; } select, textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input { display: inline-block; height: 18px; padding: 4px; margin-bottom: 9px; font-size: 13px; line-height: 18px; color: #555555; } input, textarea { width: 210px; } textarea { height: auto; } textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input { background-color: #ffffff; border: 1px solid #cccccc; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -webkit-transition: border linear 0.2s, box-shadow linear 0.2s; -moz-transition: border linear 0.2s, box-shadow linear 0.2s; -ms-transition: border linear 0.2s, box-shadow linear 0.2s; -o-transition: border linear 0.2s, box-shadow linear 0.2s; transition: border linear 0.2s, box-shadow linear 0.2s; } textarea:focus, input[type="text"]:focus, input[type="password"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="date"]:focus, input[type="month"]:focus, input[type="time"]:focus, input[type="week"]:focus, input[type="number"]:focus, input[type="email"]:focus, input[type="url"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="color"]:focus, .uneditable-input:focus { border-color: rgba(82, 168, 236, 0.8); outline: 0; outline: thin dotted \9; /* IE6-9 */ -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6); -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6); box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6); } input[type="radio"], input[type="checkbox"] { margin: 3px 0; *margin-top: 0; /* IE7 */ line-height: normal; cursor: pointer; } input[type="submit"], input[type="reset"], input[type="button"], input[type="radio"], input[type="checkbox"] { width: auto; } .uneditable-textarea { width: auto; height: auto; } select, input[type="file"] { height: 28px; /* In IE7, the height of the select element cannot be changed by height, only font-size */ *margin-top: 4px; /* For IE7, add top margin to align select with labels */ line-height: 28px; } select { width: 220px; border: 1px solid #bbb; } select[multiple], select[size] { height: auto; } select:focus, input[type="file"]:focus, input[type="radio"]:focus, input[type="checkbox"]:focus { outline: thin dotted #333; outline: 5px auto -webkit-focus-ring-color; outline-offset: -2px; } .radio, .checkbox { min-height: 18px; padding-left: 18px; } .radio input[type="radio"], .checkbox input[type="checkbox"] { float: left; margin-left: -18px; } .controls > .radio:first-child, .controls > .checkbox:first-child { padding-top: 5px; } .radio.inline, .checkbox.inline { display: inline-block; padding-top: 5px; margin-bottom: 0; vertical-align: middle; } .radio.inline + .radio.inline, .checkbox.inline + .checkbox.inline { margin-left: 10px; } .input-mini { width: 60px; } .input-small { width: 90px; } .input-medium { width: 150px; } .input-large { width: 210px; } .input-xlarge { width: 270px; } .input-xxlarge { width: 530px; } input[class*="span"], select[class*="span"], textarea[class*="span"], .uneditable-input[class*="span"], .row-fluid input[class*="span"], .row-fluid select[class*="span"], .row-fluid textarea[class*="span"], .row-fluid .uneditable-input[class*="span"] { float: none; margin-left: 0; } .input-append input[class*="span"], .input-append .uneditable-input[class*="span"], .input-prepend input[class*="span"], .input-prepend .uneditable-input[class*="span"], .row-fluid .input-prepend [class*="span"], .row-fluid .input-append [class*="span"] { display: inline-block; } input, textarea, .uneditable-input { margin-left: 0; } input.span12, textarea.span12, .uneditable-input.span12 { width: 930px; } input.span11, textarea.span11, .uneditable-input.span11 { width: 850px; } input.span10, textarea.span10, .uneditable-input.span10 { width: 770px; } input.span9, textarea.span9, .uneditable-input.span9 { width: 690px; } input.span8, textarea.span8, .uneditable-input.span8 { width: 610px; } input.span7, textarea.span7, .uneditable-input.span7 { width: 530px; } input.span6, textarea.span6, .uneditable-input.span6 { width: 450px; } input.span5, textarea.span5, .uneditable-input.span5 { width: 370px; } input.span4, textarea.span4, .uneditable-input.span4 { width: 290px; } input.span3, textarea.span3, .uneditable-input.span3 { width: 210px; } input.span2, textarea.span2, .uneditable-input.span2 { width: 130px; } input.span1, textarea.span1, .uneditable-input.span1 { width: 50px; } input[disabled], select[disabled], textarea[disabled], input[readonly], select[readonly], textarea[readonly] { cursor: not-allowed; background-color: #eeeeee; border-color: #ddd; } input[type="radio"][disabled], input[type="checkbox"][disabled], input[type="radio"][readonly], input[type="checkbox"][readonly] { background-color: transparent; } .control-group.warning > label, .control-group.warning .help-block, .control-group.warning .help-inline { color: #c09853; } .control-group.warning .checkbox, .control-group.warning .radio, .control-group.warning input, .control-group.warning select, .control-group.warning textarea { color: #c09853; border-color: #c09853; } .control-group.warning .checkbox:focus, .control-group.warning .radio:focus, .control-group.warning input:focus, .control-group.warning select:focus, .control-group.warning textarea:focus { border-color: #a47e3c; -webkit-box-shadow: 0 0 6px #dbc59e; -moz-box-shadow: 0 0 6px #dbc59e; box-shadow: 0 0 6px #dbc59e; } .control-group.warning .input-prepend .add-on, .control-group.warning .input-append .add-on { color: #c09853; background-color: #fcf8e3; border-color: #c09853; } .control-group.error > label, .control-group.error .help-block, .control-group.error .help-inline { color: #b94a48; } .control-group.error .checkbox, .control-group.error .radio, .control-group.error input, .control-group.error select, .control-group.error textarea { color: #b94a48; border-color: #b94a48; } .control-group.error .checkbox:focus, .control-group.error .radio:focus, .control-group.error input:focus, .control-group.error select:focus, .control-group.error textarea:focus { border-color: #953b39; -webkit-box-shadow: 0 0 6px #d59392; -moz-box-shadow: 0 0 6px #d59392; box-shadow: 0 0 6px #d59392; } .control-group.error .input-prepend .add-on, .control-group.error .input-append .add-on { color: #b94a48; background-color: #f2dede; border-color: #b94a48; } .control-group.success > label, .control-group.success .help-block, .control-group.success .help-inline { color: #468847; } .control-group.success .checkbox, .control-group.success .radio, .control-group.success input, .control-group.success select, .control-group.success textarea { color: #468847; border-color: #468847; } .control-group.success .checkbox:focus, .control-group.success .radio:focus, .control-group.success input:focus, .control-group.success select:focus, .control-group.success textarea:focus { border-color: #356635; -webkit-box-shadow: 0 0 6px #7aba7b; -moz-box-shadow: 0 0 6px #7aba7b; box-shadow: 0 0 6px #7aba7b; } .control-group.success .input-prepend .add-on, .control-group.success .input-append .add-on { color: #468847; background-color: #dff0d8; border-color: #468847; } input:focus:required:invalid, textarea:focus:required:invalid, select:focus:required:invalid { color: #b94a48; border-color: #ee5f5b; } input:focus:required:invalid:focus, textarea:focus:required:invalid:focus, select:focus:required:invalid:focus { border-color: #e9322d; -webkit-box-shadow: 0 0 6px #f8b9b7; -moz-box-shadow: 0 0 6px #f8b9b7; box-shadow: 0 0 6px #f8b9b7; } .form-actions { padding: 17px 20px 18px; margin-top: 18px; margin-bottom: 18px; background-color: #f5f5f5; border-top: 1px solid #e5e5e5; *zoom: 1; } .form-actions:before, .form-actions:after { display: table; content: ""; } .form-actions:after { clear: both; } .uneditable-input { overflow: hidden; white-space: nowrap; cursor: not-allowed; background-color: #ffffff; border-color: #eee; -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); } :-moz-placeholder { color: #999999; } :-ms-input-placeholder { color: #999999; } ::-webkit-input-placeholder { color: #999999; } .help-block, .help-inline { color: #555555; } .help-block { display: block; margin-bottom: 9px; } .help-inline { display: inline-block; *display: inline; /* IE7 inline-block hack */ *zoom: 1; vertical-align: middle; padding-left: 5px; } .input-prepend, .input-append { margin-bottom: 5px; } .input-prepend input, .input-append input, .input-prepend select, .input-append select, .input-prepend .uneditable-input, .input-append .uneditable-input { position: relative; margin-bottom: 0; *margin-left: 0; vertical-align: middle; -webkit-border-radius: 0 3px 3px 0; -moz-border-radius: 0 3px 3px 0; border-radius: 0 3px 3px 0; } .input-prepend input:focus, .input-append input:focus, .input-prepend select:focus, .input-append select:focus, .input-prepend .uneditable-input:focus, .input-append .uneditable-input:focus { z-index: 2; } .input-prepend .uneditable-input, .input-append .uneditable-input { border-left-color: #ccc; } .input-prepend .add-on, .input-append .add-on { display: inline-block; width: auto; height: 18px; min-width: 16px; padding: 4px 5px; font-weight: normal; line-height: 18px; text-align: center; text-shadow: 0 1px 0 #ffffff; vertical-align: middle; background-color: #eeeeee; border: 1px solid #ccc; } .input-prepend .add-on, .input-append .add-on, .input-prepend .btn, .input-append .btn { margin-left: -1px; -webkit-border-radius: 0; -moz-border-radius: 0; border-radius: 0; } .input-prepend .active, .input-append .active { background-color: #a9dba9; border-color: #46a546; } .input-prepend .add-on, .input-prepend .btn { margin-right: -1px; } .input-prepend .add-on:first-child, .input-prepend .btn:first-child { -webkit-border-radius: 3px 0 0 3px; -moz-border-radius: 3px 0 0 3px; border-radius: 3px 0 0 3px; } .input-append input, .input-append select, .input-append .uneditable-input { -webkit-border-radius: 3px 0 0 3px; -moz-border-radius: 3px 0 0 3px; border-radius: 3px 0 0 3px; } .input-append .uneditable-input { border-right-color: #ccc; border-left-color: #eee; } .input-append .add-on:last-child, .input-append .btn:last-child { -webkit-border-radius: 0 3px 3px 0; -moz-border-radius: 0 3px 3px 0; border-radius: 0 3px 3px 0; } .input-prepend.input-append input, .input-prepend.input-append select, .input-prepend.input-append .uneditable-input { -webkit-border-radius: 0; -moz-border-radius: 0; border-radius: 0; } .input-prepend.input-append .add-on:first-child, .input-prepend.input-append .btn:first-child { margin-right: -1px; -webkit-border-radius: 3px 0 0 3px; -moz-border-radius: 3px 0 0 3px; border-radius: 3px 0 0 3px; } .input-prepend.input-append .add-on:last-child, .input-prepend.input-append .btn:last-child { margin-left: -1px; -webkit-border-radius: 0 3px 3px 0; -moz-border-radius: 0 3px 3px 0; border-radius: 0 3px 3px 0; } .search-query { padding-right: 14px; padding-right: 4px \9; padding-left: 14px; padding-left: 4px \9; /* IE7-8 doesn't have border-radius, so don't indent the padding */ margin-bottom: 0; -webkit-border-radius: 14px; -moz-border-radius: 14px; border-radius: 14px; } .form-search input, .form-inline input, .form-horizontal input, .form-search textarea, .form-inline textarea, .form-horizontal textarea, .form-search select, .form-inline select, .form-horizontal select, .form-search .help-inline, .form-inline .help-inline, .form-horizontal .help-inline, .form-search .uneditable-input, .form-inline .uneditable-input, .form-horizontal .uneditable-input, .form-search .input-prepend, .form-inline .input-prepend, .form-horizontal .input-prepend, .form-search .input-append, .form-inline .input-append, .form-horizontal .input-append { display: inline-block; *display: inline; /* IE7 inline-block hack */ *zoom: 1; margin-bottom: 0; } .form-search .hide, .form-inline .hide, .form-horizontal .hide { display: none; } .form-search label, .form-inline label { display: inline-block; } .form-search .input-append, .form-inline .input-append, .form-search .input-prepend, .form-inline .input-prepend { margin-bottom: 0; } .form-search .radio, .form-search .checkbox, .form-inline .radio, .form-inline .checkbox { padding-left: 0; margin-bottom: 0; vertical-align: middle; } .form-search .radio input[type="radio"], .form-search .checkbox input[type="checkbox"], .form-inline .radio input[type="radio"], .form-inline .checkbox input[type="checkbox"] { float: left; margin-right: 3px; margin-left: 0; } .control-group { margin-bottom: 9px; } legend + .control-group { margin-top: 18px; -webkit-margin-top-collapse: separate; } .form-horizontal .control-group { margin-bottom: 18px; *zoom: 1; } .form-horizontal .control-group:before, .form-horizontal .control-group:after { display: table; content: ""; } .form-horizontal .control-group:after { clear: both; } .form-horizontal .control-label { float: left; width: 140px; padding-top: 5px; text-align: right; } .form-horizontal .controls { *display: inline-block; *padding-left: 20px; margin-left: 160px; *margin-left: 0; } .form-horizontal .controls:first-child { *padding-left: 160px; } .form-horizontal .help-block { margin-top: 9px; margin-bottom: 0; } .form-horizontal .form-actions { padding-left: 160px; } table { max-width: 100%; background-color: transparent; border-collapse: collapse; border-spacing: 0; } .table { width: 100%; margin-bottom: 18px; } .table th, .table td { padding: 8px; line-height: 18px; text-align: left; vertical-align: top; border-top: 1px solid #dddddd; } .table th { font-weight: bold; } .table thead th { vertical-align: bottom; } .table caption + thead tr:first-child th, .table caption + thead tr:first-child td, .table colgroup + thead tr:first-child th, .table colgroup + thead tr:first-child td, .table thead:first-child tr:first-child th, .table thead:first-child tr:first-child td { border-top: 0; } .table tbody + tbody { border-top: 2px solid #dddddd; } .table-condensed th, .table-condensed td { padding: 4px 5px; } .table-bordered { border: 1px solid #dddddd; border-collapse: separate; *border-collapse: collapsed; border-left: 0; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; } .table-bordered th, .table-bordered td { border-left: 1px solid #dddddd; } .table-bordered caption + thead tr:first-child th, .table-bordered caption + tbody tr:first-child th, .table-bordered caption + tbody tr:first-child td, .table-bordered colgroup + thead tr:first-child th, .table-bordered colgroup + tbody tr:first-child th, .table-bordered colgroup + tbody tr:first-child td, .table-bordered thead:first-child tr:first-child th, .table-bordered tbody:first-child tr:first-child th, .table-bordered tbody:first-child tr:first-child td { border-top: 0; } .table-bordered thead:first-child tr:first-child th:first-child, .table-bordered tbody:first-child tr:first-child td:first-child { -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-topleft: 4px; } .table-bordered thead:first-child tr:first-child th:last-child, .table-bordered tbody:first-child tr:first-child td:last-child { -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-topright: 4px; } .table-bordered thead:last-child tr:last-child th:first-child, .table-bordered tbody:last-child tr:last-child td:first-child { -webkit-border-radius: 0 0 0 4px; -moz-border-radius: 0 0 0 4px; border-radius: 0 0 0 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-bottomleft: 4px; } .table-bordered thead:last-child tr:last-child th:last-child, .table-bordered tbody:last-child tr:last-child td:last-child { -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; -moz-border-radius-bottomright: 4px; } .table-striped tbody tr:nth-child(odd) td, .table-striped tbody tr:nth-child(odd) th { background-color: #f9f9f9; } .table tbody tr:hover td, .table tbody tr:hover th { background-color: #f5f5f5; } table .span1 { float: none; width: 44px; margin-left: 0; } table .span2 { float: none; width: 124px; margin-left: 0; } table .span3 { float: none; width: 204px; margin-left: 0; } table .span4 { float: none; width: 284px; margin-left: 0; } table .span5 { float: none; width: 364px; margin-left: 0; } table .span6 { float: none; width: 444px; margin-left: 0; } table .span7 { float: none; width: 524px; margin-left: 0; } table .span8 { float: none; width: 604px; margin-left: 0; } table .span9 { float: none; width: 684px; margin-left: 0; } table .span10 { float: none; width: 764px; margin-left: 0; } table .span11 { float: none; width: 844px; margin-left: 0; } table .span12 { float: none; width: 924px; margin-left: 0; } table .span13 { float: none; width: 1004px; margin-left: 0; } table .span14 { float: none; width: 1084px; margin-left: 0; } table .span15 { float: none; width: 1164px; margin-left: 0; } table .span16 { float: none; width: 1244px; margin-left: 0; } table .span17 { float: none; width: 1324px; margin-left: 0; } table .span18 { float: none; width: 1404px; margin-left: 0; } table .span19 { float: none; width: 1484px; margin-left: 0; } table .span20 { float: none; width: 1564px; margin-left: 0; } table .span21 { float: none; width: 1644px; margin-left: 0; } table .span22 { float: none; width: 1724px; margin-left: 0; } table .span23 { float: none; width: 1804px; margin-left: 0; } table .span24 { float: none; width: 1884px; margin-left: 0; } .dropup, .dropdown { position: relative; } .dropdown-toggle { *margin-bottom: -3px; } .dropdown-toggle:active, .open .dropdown-toggle { outline: 0; } .caret { display: inline-block; width: 0; height: 0; vertical-align: top; border-top: 4px solid #000000; border-right: 4px solid transparent; border-left: 4px solid transparent; content: ""; opacity: 0.3; filter: alpha(opacity=30); } .dropdown .caret { margin-top: 8px; margin-left: 2px; } .dropdown:hover .caret, .open .caret { opacity: 1; filter: alpha(opacity=100); } .dropdown-menu { position: absolute; top: 100%; left: 0; z-index: 1000; display: none; float: left; min-width: 160px; padding: 4px 0; margin: 1px 0 0; list-style: none; background-color: #ffffff; border: 1px solid #ccc; border: 1px solid rgba(0, 0, 0, 0.2); *border-right-width: 2px; *border-bottom-width: 2px; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); -webkit-background-clip: padding-box; -moz-background-clip: padding; background-clip: padding-box; } .dropdown-menu.pull-right { right: 0; left: auto; } .dropdown-menu .divider { *width: 100%; height: 1px; margin: 8px 1px; *margin: -5px 0 5px; overflow: hidden; background-color: #e5e5e5; border-bottom: 1px solid #ffffff; } .dropdown-menu a { display: block; padding: 3px 15px; clear: both; font-weight: normal; line-height: 18px; color: #333333; white-space: nowrap; } .dropdown-menu li > a:hover, .dropdown-menu .active > a, .dropdown-menu .active > a:hover { color: #ffffff; text-decoration: none; background-color: #0088cc; } .open { *z-index: 1000; } .open > .dropdown-menu { display: block; } .pull-right > .dropdown-menu { right: 0; left: auto; } .dropup .caret, .navbar-fixed-bottom .dropdown .caret { border-top: 0; border-bottom: 4px solid #000000; content: "\2191"; } .dropup .dropdown-menu, .navbar-fixed-bottom .dropdown .dropdown-menu { top: auto; bottom: 100%; margin-bottom: 1px; } .typeahead { margin-top: 2px; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; } .well { min-height: 20px; padding: 19px; margin-bottom: 20px; background-color: #f5f5f5; border: 1px solid #eee; border: 1px solid rgba(0, 0, 0, 0.05); -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); } .well blockquote { border-color: #ddd; border-color: rgba(0, 0, 0, 0.15); } .well-large { padding: 24px; -webkit-border-radius: 6px; -moz-border-radius: 6px; border-radius: 6px; } .well-small { padding: 9px; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; } .fade { opacity: 0; -webkit-transition: opacity 0.15s linear; -moz-transition: opacity 0.15s linear; -ms-transition: opacity 0.15s linear; -o-transition: opacity 0.15s linear; transition: opacity 0.15s linear; } .fade.in { opacity: 1; } .collapse { position: relative; height: 0; overflow: hidden; -webkit-transition: height 0.35s ease; -moz-transition: height 0.35s ease; -ms-transition: height 0.35s ease; -o-transition: height 0.35s ease; transition: height 0.35s ease; } .collapse.in { height: auto; } .close { float: right; font-size: 20px; font-weight: bold; line-height: 18px; color: #000000; text-shadow: 0 1px 0 #ffffff; opacity: 0.2; filter: alpha(opacity=20); } .close:hover { color: #000000; text-decoration: none; cursor: pointer; opacity: 0.4; filter: alpha(opacity=40); } button.close { padding: 0; cursor: pointer; background: transparent; border: 0; -webkit-appearance: none; } .btn { display: inline-block; *display: inline; /* IE7 inline-block hack */ *zoom: 1; padding: 4px 10px 4px; margin-bottom: 0; font-size: 13px; line-height: 18px; *line-height: 20px; color: #333333; text-align: center; text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); vertical-align: middle; cursor: pointer; background-color: #f5f5f5; background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); background-image: -ms-linear-gradient(top, #ffffff, #e6e6e6); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); background-image: linear-gradient(top, #ffffff, #e6e6e6); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0); border-color: #e6e6e6 #e6e6e6 #bfbfbf; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); *background-color: #e6e6e6; /* Darken IE7 buttons by default so they stand out more given they won't have borders */ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); border: 1px solid #cccccc; *border: 0; border-bottom-color: #b3b3b3; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; *margin-left: .3em; -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); } .btn:hover, .btn:active, .btn.active, .btn.disabled, .btn[disabled] { background-color: #e6e6e6; *background-color: #d9d9d9; } .btn:active, .btn.active { background-color: #cccccc \9; } .btn:first-child { *margin-left: 0; } .btn:hover { color: #333333; text-decoration: none; background-color: #e6e6e6; *background-color: #d9d9d9; /* Buttons in IE7 don't get borders, so darken on hover */ background-position: 0 -15px; -webkit-transition: background-position 0.1s linear; -moz-transition: background-position 0.1s linear; -ms-transition: background-position 0.1s linear; -o-transition: background-position 0.1s linear; transition: background-position 0.1s linear; } .btn:focus { outline: thin dotted #333; outline: 5px auto -webkit-focus-ring-color; outline-offset: -2px; } .btn.active, .btn:active { background-color: #e6e6e6; background-color: #d9d9d9 \9; background-image: none; outline: 0; -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); } .btn.disabled, .btn[disabled] { cursor: default; background-color: #e6e6e6; background-image: none; opacity: 0.65; filter: alpha(opacity=65); -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; } .btn-large { padding: 9px 14px; font-size: 15px; line-height: normal; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; } .btn-large [class^="icon-"] { margin-top: 1px; } .btn-small { padding: 5px 9px; font-size: 11px; line-height: 16px; } .btn-small [class^="icon-"] { margin-top: -1px; } .btn-mini { padding: 2px 6px; font-size: 11px; line-height: 14px; } .btn-primary, .btn-primary:hover, .btn-warning, .btn-warning:hover, .btn-danger, .btn-danger:hover, .btn-success, .btn-success:hover, .btn-info, .btn-info:hover, .btn-inverse, .btn-inverse:hover { color: #ffffff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); } .btn-primary.active, .btn-warning.active, .btn-danger.active, .btn-success.active, .btn-info.active, .btn-inverse.active { color: rgba(255, 255, 255, 0.75); } .btn { border-color: #ccc; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); } .btn-primary { background-color: #0074cc; background-image: -moz-linear-gradient(top, #0088cc, #0055cc); background-image: -ms-linear-gradient(top, #0088cc, #0055cc); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0055cc)); background-image: -webkit-linear-gradient(top, #0088cc, #0055cc); background-image: -o-linear-gradient(top, #0088cc, #0055cc); background-image: linear-gradient(top, #0088cc, #0055cc); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0055cc', GradientType=0); border-color: #0055cc #0055cc #003580; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); *background-color: #0055cc; /* Darken IE7 buttons by default so they stand out more given they won't have borders */ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); } .btn-primary:hover, .btn-primary:active, .btn-primary.active, .btn-primary.disabled, .btn-primary[disabled] { background-color: #0055cc; *background-color: #004ab3; } .btn-primary:active, .btn-primary.active { background-color: #004099 \9; } .btn-warning { background-color: #faa732; background-image: -moz-linear-gradient(top, #fbb450, #f89406); background-image: -ms-linear-gradient(top, #fbb450, #f89406); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); background-image: -webkit-linear-gradient(top, #fbb450, #f89406); background-image: -o-linear-gradient(top, #fbb450, #f89406); background-image: linear-gradient(top, #fbb450, #f89406); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbb450', endColorstr='#f89406', GradientType=0); border-color: #f89406 #f89406 #ad6704; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); *background-color: #f89406; /* Darken IE7 buttons by default so they stand out more given they won't have borders */ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); } .btn-warning:hover, .btn-warning:active, .btn-warning.active, .btn-warning.disabled, .btn-warning[disabled] { background-color: #f89406; *background-color: #df8505; } .btn-warning:active, .btn-warning.active { background-color: #c67605 \9; } .btn-danger { background-color: #da4f49; background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f); background-image: -ms-linear-gradient(top, #ee5f5b, #bd362f); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f)); background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f); background-image: -o-linear-gradient(top, #ee5f5b, #bd362f); background-image: linear-gradient(top, #ee5f5b, #bd362f); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#bd362f', GradientType=0); border-color: #bd362f #bd362f #802420; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); *background-color: #bd362f; /* Darken IE7 buttons by default so they stand out more given they won't have borders */ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); } .btn-danger:hover, .btn-danger:active, .btn-danger.active, .btn-danger.disabled, .btn-danger[disabled] { background-color: #bd362f; *background-color: #a9302a; } .btn-danger:active, .btn-danger.active { background-color: #942a25 \9; } .btn-success { background-color: #5bb75b; background-image: -moz-linear-gradient(top, #62c462, #51a351); background-image: -ms-linear-gradient(top, #62c462, #51a351); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351)); background-image: -webkit-linear-gradient(top, #62c462, #51a351); background-image: -o-linear-gradient(top, #62c462, #51a351); background-image: linear-gradient(top, #62c462, #51a351); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#51a351', GradientType=0); border-color: #51a351 #51a351 #387038; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); *background-color: #51a351; /* Darken IE7 buttons by default so they stand out more given they won't have borders */ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); } .btn-success:hover, .btn-success:active, .btn-success.active, .btn-success.disabled, .btn-success[disabled] { background-color: #51a351; *background-color: #499249; } .btn-success:active, .btn-success.active { background-color: #408140 \9; } .btn-info { background-color: #49afcd; background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4); background-image: -ms-linear-gradient(top, #5bc0de, #2f96b4); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4)); background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4); background-image: -o-linear-gradient(top, #5bc0de, #2f96b4); background-image: linear-gradient(top, #5bc0de, #2f96b4); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#2f96b4', GradientType=0); border-color: #2f96b4 #2f96b4 #1f6377; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); *background-color: #2f96b4; /* Darken IE7 buttons by default so they stand out more given they won't have borders */ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); } .btn-info:hover, .btn-info:active, .btn-info.active, .btn-info.disabled, .btn-info[disabled] { background-color: #2f96b4; *background-color: #2a85a0; } .btn-info:active, .btn-info.active { background-color: #24748c \9; } .btn-inverse { background-color: #414141; background-image: -moz-linear-gradient(top, #555555, #222222); background-image: -ms-linear-gradient(top, #555555, #222222); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#555555), to(#222222)); background-image: -webkit-linear-gradient(top, #555555, #222222); background-image: -o-linear-gradient(top, #555555, #222222); background-image: linear-gradient(top, #555555, #222222); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#555555', endColorstr='#222222', GradientType=0); border-color: #222222 #222222 #000000; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); *background-color: #222222; /* Darken IE7 buttons by default so they stand out more given they won't have borders */ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); } .btn-inverse:hover, .btn-inverse:active, .btn-inverse.active, .btn-inverse.disabled, .btn-inverse[disabled] { background-color: #222222; *background-color: #151515; } .btn-inverse:active, .btn-inverse.active { background-color: #080808 \9; } button.btn, input[type="submit"].btn { *padding-top: 2px; *padding-bottom: 2px; } button.btn::-moz-focus-inner, input[type="submit"].btn::-moz-focus-inner { padding: 0; border: 0; } button.btn.btn-large, input[type="submit"].btn.btn-large { *padding-top: 7px; *padding-bottom: 7px; } button.btn.btn-small, input[type="submit"].btn.btn-small { *padding-top: 3px; *padding-bottom: 3px; } button.btn.btn-mini, input[type="submit"].btn.btn-mini { *padding-top: 1px; *padding-bottom: 1px; } .btn-group { position: relative; *zoom: 1; *margin-left: .3em; } .btn-group:before, .btn-group:after { display: table; content: ""; } .btn-group:after { clear: both; } .btn-group:first-child { *margin-left: 0; } .btn-group + .btn-group { margin-left: 5px; } .btn-toolbar { margin-top: 9px; margin-bottom: 9px; } .btn-toolbar .btn-group { display: inline-block; *display: inline; /* IE7 inline-block hack */ *zoom: 1; } .btn-group > .btn { position: relative; float: left; margin-left: -1px; -webkit-border-radius: 0; -moz-border-radius: 0; border-radius: 0; } .btn-group > .btn:first-child { margin-left: 0; -webkit-border-top-left-radius: 4px; -moz-border-radius-topleft: 4px; border-top-left-radius: 4px; -webkit-border-bottom-left-radius: 4px; -moz-border-radius-bottomleft: 4px; border-bottom-left-radius: 4px; } .btn-group > .btn:last-child, .btn-group > .dropdown-toggle { -webkit-border-top-right-radius: 4px; -moz-border-radius-topright: 4px; border-top-right-radius: 4px; -webkit-border-bottom-right-radius: 4px; -moz-border-radius-bottomright: 4px; border-bottom-right-radius: 4px; } .btn-group > .btn.large:first-child { margin-left: 0; -webkit-border-top-left-radius: 6px; -moz-border-radius-topleft: 6px; border-top-left-radius: 6px; -webkit-border-bottom-left-radius: 6px; -moz-border-radius-bottomleft: 6px; border-bottom-left-radius: 6px; } .btn-group > .btn.large:last-child, .btn-group > .large.dropdown-toggle { -webkit-border-top-right-radius: 6px; -moz-border-radius-topright: 6px; border-top-right-radius: 6px; -webkit-border-bottom-right-radius: 6px; -moz-border-radius-bottomright: 6px; border-bottom-right-radius: 6px; } .btn-group > .btn:hover, .btn-group > .btn:focus, .btn-group > .btn:active, .btn-group > .btn.active { z-index: 2; } .btn-group .dropdown-toggle:active, .btn-group.open .dropdown-toggle { outline: 0; } .btn-group > .dropdown-toggle { padding-left: 8px; padding-right: 8px; -webkit-box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); -moz-box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); *padding-top: 4px; *padding-bottom: 4px; } .btn-group > .btn-mini.dropdown-toggle { padding-left: 5px; padding-right: 5px; } .btn-group > .btn-small.dropdown-toggle { *padding-top: 4px; *padding-bottom: 4px; } .btn-group > .btn-large.dropdown-toggle { padding-left: 12px; padding-right: 12px; } .btn-group.open .dropdown-toggle { background-image: none; -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); } .btn-group.open .btn.dropdown-toggle { background-color: #e6e6e6; } .btn-group.open .btn-primary.dropdown-toggle { background-color: #0055cc; } .btn-group.open .btn-warning.dropdown-toggle { background-color: #f89406; } .btn-group.open .btn-danger.dropdown-toggle { background-color: #bd362f; } .btn-group.open .btn-success.dropdown-toggle { background-color: #51a351; } .btn-group.open .btn-info.dropdown-toggle { background-color: #2f96b4; } .btn-group.open .btn-inverse.dropdown-toggle { background-color: #222222; } .btn .caret { margin-top: 7px; margin-left: 0; } .btn:hover .caret, .open.btn-group .caret { opacity: 1; filter: alpha(opacity=100); } .btn-mini .caret { margin-top: 5px; } .btn-small .caret { margin-top: 6px; } .btn-large .caret { margin-top: 6px; border-left-width: 5px; border-right-width: 5px; border-top-width: 5px; } .dropup .btn-large .caret { border-bottom: 5px solid #000000; border-top: 0; } .btn-primary .caret, .btn-warning .caret, .btn-danger .caret, .btn-info .caret, .btn-success .caret, .btn-inverse .caret { border-top-color: #ffffff; border-bottom-color: #ffffff; opacity: 0.75; filter: alpha(opacity=75); } .alert { padding: 8px 35px 8px 14px; margin-bottom: 18px; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); background-color: #fcf8e3; border: 1px solid #fbeed5; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; color: #c09853; } .alert-heading { color: inherit; } .alert .close { position: relative; top: -2px; right: -21px; line-height: 18px; } .alert-success { background-color: #dff0d8; border-color: #d6e9c6; color: #468847; } .alert-danger, .alert-error { background-color: #f2dede; border-color: #eed3d7; color: #b94a48; } .alert-info { background-color: #d9edf7; border-color: #bce8f1; color: #3a87ad; } .alert-block { padding-top: 14px; padding-bottom: 14px; } .alert-block > p, .alert-block > ul { margin-bottom: 0; } .alert-block p + p { margin-top: 5px; } .nav { margin-left: 0; margin-bottom: 18px; list-style: none; } .nav > li > a { display: block; } .nav > li > a:hover { text-decoration: none; background-color: #eeeeee; } .nav > .pull-right { float: right; } .nav .nav-header { display: block; padding: 3px 15px; font-size: 11px; font-weight: bold; line-height: 18px; color: #999999; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); text-transform: uppercase; } .nav li + .nav-header { margin-top: 9px; } .nav-list { padding-left: 15px; padding-right: 15px; margin-bottom: 0; } .nav-list > li > a, .nav-list .nav-header { margin-left: -15px; margin-right: -15px; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); } .nav-list > li > a { padding: 3px 15px; } .nav-list > .active > a, .nav-list > .active > a:hover { color: #ffffff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); background-color: #0088cc; } .nav-list [class^="icon-"] { margin-right: 2px; } .nav-list .divider { *width: 100%; height: 1px; margin: 8px 1px; *margin: -5px 0 5px; overflow: hidden; background-color: #e5e5e5; border-bottom: 1px solid #ffffff; } .nav-tabs, .nav-pills { *zoom: 1; } .nav-tabs:before, .nav-pills:before, .nav-tabs:after, .nav-pills:after { display: table; content: ""; } .nav-tabs:after, .nav-pills:after { clear: both; } .nav-tabs > li, .nav-pills > li { float: left; } .nav-tabs > li > a, .nav-pills > li > a { padding-right: 12px; padding-left: 12px; margin-right: 2px; line-height: 14px; } .nav-tabs { border-bottom: 1px solid #ddd; } .nav-tabs > li { margin-bottom: -1px; } .nav-tabs > li > a { padding-top: 8px; padding-bottom: 8px; line-height: 18px; border: 1px solid transparent; -webkit-border-radius: 4px 4px 0 0; -moz-border-radius: 4px 4px 0 0; border-radius: 4px 4px 0 0; } .nav-tabs > li > a:hover { border-color: #eeeeee #eeeeee #dddddd; } .nav-tabs > .active > a, .nav-tabs > .active > a:hover { color: #555555; background-color: #ffffff; border: 1px solid #ddd; border-bottom-color: transparent; cursor: default; } .nav-pills > li > a { padding-top: 8px; padding-bottom: 8px; margin-top: 2px; margin-bottom: 2px; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; } .nav-pills > .active > a, .nav-pills > .active > a:hover { color: #ffffff; background-color: #0088cc; } .nav-stacked > li { float: none; } .nav-stacked > li > a { margin-right: 0; } .nav-tabs.nav-stacked { border-bottom: 0; } .nav-tabs.nav-stacked > li > a { border: 1px solid #ddd; -webkit-border-radius: 0; -moz-border-radius: 0; border-radius: 0; } .nav-tabs.nav-stacked > li:first-child > a { -webkit-border-radius: 4px 4px 0 0; -moz-border-radius: 4px 4px 0 0; border-radius: 4px 4px 0 0; } .nav-tabs.nav-stacked > li:last-child > a { -webkit-border-radius: 0 0 4px 4px; -moz-border-radius: 0 0 4px 4px; border-radius: 0 0 4px 4px; } .nav-tabs.nav-stacked > li > a:hover { border-color: #ddd; z-index: 2; } .nav-pills.nav-stacked > li > a { margin-bottom: 3px; } .nav-pills.nav-stacked > li:last-child > a { margin-bottom: 1px; } .nav-tabs .dropdown-menu { -webkit-border-radius: 0 0 5px 5px; -moz-border-radius: 0 0 5px 5px; border-radius: 0 0 5px 5px; } .nav-pills .dropdown-menu { -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; } .nav-tabs .dropdown-toggle .caret, .nav-pills .dropdown-toggle .caret { border-top-color: #0088cc; border-bottom-color: #0088cc; margin-top: 6px; } .nav-tabs .dropdown-toggle:hover .caret, .nav-pills .dropdown-toggle:hover .caret { border-top-color: #005580; border-bottom-color: #005580; } .nav-tabs .active .dropdown-toggle .caret, .nav-pills .active .dropdown-toggle .caret { border-top-color: #333333; border-bottom-color: #333333; } .nav > .dropdown.active > a:hover { color: #000000; cursor: pointer; } .nav-tabs .open .dropdown-toggle, .nav-pills .open .dropdown-toggle, .nav > li.dropdown.open.active > a:hover { color: #ffffff; background-color: #999999; border-color: #999999; } .nav li.dropdown.open .caret, .nav li.dropdown.open.active .caret, .nav li.dropdown.open a:hover .caret { border-top-color: #ffffff; border-bottom-color: #ffffff; opacity: 1; filter: alpha(opacity=100); } .tabs-stacked .open > a:hover { border-color: #999999; } .tabbable { *zoom: 1; } .tabbable:before, .tabbable:after { display: table; content: ""; } .tabbable:after { clear: both; } .tab-content { overflow: auto; } .tabs-below > .nav-tabs, .tabs-right > .nav-tabs, .tabs-left > .nav-tabs { border-bottom: 0; } .tab-content > .tab-pane, .pill-content > .pill-pane { display: none; } .tab-content > .active, .pill-content > .active { display: block; } .tabs-below > .nav-tabs { border-top: 1px solid #ddd; } .tabs-below > .nav-tabs > li { margin-top: -1px; margin-bottom: 0; } .tabs-below > .nav-tabs > li > a { -webkit-border-radius: 0 0 4px 4px; -moz-border-radius: 0 0 4px 4px; border-radius: 0 0 4px 4px; } .tabs-below > .nav-tabs > li > a:hover { border-bottom-color: transparent; border-top-color: #ddd; } .tabs-below > .nav-tabs > .active > a, .tabs-below > .nav-tabs > .active > a:hover { border-color: transparent #ddd #ddd #ddd; } .tabs-left > .nav-tabs > li, .tabs-right > .nav-tabs > li { float: none; } .tabs-left > .nav-tabs > li > a, .tabs-right > .nav-tabs > li > a { min-width: 74px; margin-right: 0; margin-bottom: 3px; } .tabs-left > .nav-tabs { float: left; margin-right: 19px; border-right: 1px solid #ddd; } .tabs-left > .nav-tabs > li > a { margin-right: -1px; -webkit-border-radius: 4px 0 0 4px; -moz-border-radius: 4px 0 0 4px; border-radius: 4px 0 0 4px; } .tabs-left > .nav-tabs > li > a:hover { border-color: #eeeeee #dddddd #eeeeee #eeeeee; } .tabs-left > .nav-tabs .active > a, .tabs-left > .nav-tabs .active > a:hover { border-color: #ddd transparent #ddd #ddd; *border-right-color: #ffffff; } .tabs-right > .nav-tabs { float: right; margin-left: 19px; border-left: 1px solid #ddd; } .tabs-right > .nav-tabs > li > a { margin-left: -1px; -webkit-border-radius: 0 4px 4px 0; -moz-border-radius: 0 4px 4px 0; border-radius: 0 4px 4px 0; } .tabs-right > .nav-tabs > li > a:hover { border-color: #eeeeee #eeeeee #eeeeee #dddddd; } .tabs-right > .nav-tabs .active > a, .tabs-right > .nav-tabs .active > a:hover { border-color: #ddd #ddd #ddd transparent; *border-left-color: #ffffff; } .navbar { *position: relative; *z-index: 2; overflow: visible; margin-bottom: 18px; } .navbar-inner { min-height: 40px; padding-left: 20px; padding-right: 20px; background-color: #2c2c2c; background-image: -moz-linear-gradient(top, #333333, #222222); background-image: -ms-linear-gradient(top, #333333, #222222); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#333333), to(#222222)); background-image: -webkit-linear-gradient(top, #333333, #222222); background-image: -o-linear-gradient(top, #333333, #222222); background-image: linear-gradient(top, #333333, #222222); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0); -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; -webkit-box-shadow: 0 1px 3px rgba(0,0,0,.25), inset 0 -1px 0 rgba(0,0,0,.1); -moz-box-shadow: 0 1px 3px rgba(0,0,0,.25), inset 0 -1px 0 rgba(0,0,0,.1); box-shadow: 0 1px 3px rgba(0,0,0,.25), inset 0 -1px 0 rgba(0,0,0,.1); } .navbar .container { width: auto; } .nav-collapse.collapse { height: auto; } .navbar { color: #999999; } .navbar .brand:hover { text-decoration: none; } .navbar .brand { float: left; display: block; padding: 8px 20px 12px; margin-left: -20px; font-size: 20px; font-weight: 200; line-height: 1; color: #999999; } .navbar .navbar-text { margin-bottom: 0; line-height: 40px; } .navbar .navbar-link { color: #999999; } .navbar .navbar-link:hover { color: #ffffff; } .navbar .btn, .navbar .btn-group { margin-top: 5px; } .navbar .btn-group .btn { margin: 0; } .navbar-form { margin-bottom: 0; *zoom: 1; } .navbar-form:before, .navbar-form:after { display: table; content: ""; } .navbar-form:after { clear: both; } .navbar-form input, .navbar-form select, .navbar-form .radio, .navbar-form .checkbox { margin-top: 5px; } .navbar-form input, .navbar-form select { display: inline-block; margin-bottom: 0; } .navbar-form input[type="image"], .navbar-form input[type="checkbox"], .navbar-form input[type="radio"] { margin-top: 3px; } .navbar-form .input-append, .navbar-form .input-prepend { margin-top: 6px; white-space: nowrap; } .navbar-form .input-append input, .navbar-form .input-prepend input { margin-top: 0; } .navbar-search { position: relative; float: left; margin-top: 6px; margin-bottom: 0; } .navbar-search .search-query { padding: 4px 9px; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 13px; font-weight: normal; line-height: 1; color: #ffffff; background-color: #626262; border: 1px solid #151515; -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15); -moz-box-shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15); box-shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15); -webkit-transition: none; -moz-transition: none; -ms-transition: none; -o-transition: none; transition: none; } .navbar-search .search-query:-moz-placeholder { color: #cccccc; } .navbar-search .search-query:-ms-input-placeholder { color: #cccccc; } .navbar-search .search-query::-webkit-input-placeholder { color: #cccccc; } .navbar-search .search-query:focus, .navbar-search .search-query.focused { padding: 5px 10px; color: #333333; text-shadow: 0 1px 0 #ffffff; background-color: #ffffff; border: 0; -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); outline: 0; } .navbar-fixed-top, .navbar-fixed-bottom { position: fixed; right: 0; left: 0; z-index: 1030; margin-bottom: 0; } .navbar-fixed-top .navbar-inner, .navbar-fixed-bottom .navbar-inner { padding-left: 0; padding-right: 0; -webkit-border-radius: 0; -moz-border-radius: 0; border-radius: 0; } .navbar-fixed-top .container, .navbar-fixed-bottom .container { width: 940px; } .navbar-fixed-top { top: 0; } .navbar-fixed-bottom { bottom: 0; } .navbar .nav { position: relative; left: 0; display: block; float: left; margin: 0 10px 0 0; } .navbar .nav.pull-right { float: right; } .navbar .nav > li { display: block; float: left; } .navbar .nav > li > a { float: none; padding: 9px 10px 11px; line-height: 19px; color: #999999; text-decoration: none; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); } .navbar .btn { display: inline-block; padding: 4px 10px 4px; margin: 5px 5px 6px; line-height: 18px; } .navbar .btn-group { margin: 0; padding: 5px 5px 6px; } .navbar .nav > li > a:hover { background-color: transparent; color: #ffffff; text-decoration: none; } .navbar .nav .active > a, .navbar .nav .active > a:hover { color: #ffffff; text-decoration: none; background-color: #222222; } .navbar .divider-vertical { height: 40px; width: 1px; margin: 0 9px; overflow: hidden; background-color: #222222; border-right: 1px solid #333333; } .navbar .nav.pull-right { margin-left: 10px; margin-right: 0; } .navbar .btn-navbar { display: none; float: right; padding: 7px 10px; margin-left: 5px; margin-right: 5px; background-color: #2c2c2c; background-image: -moz-linear-gradient(top, #333333, #222222); background-image: -ms-linear-gradient(top, #333333, #222222); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#333333), to(#222222)); background-image: -webkit-linear-gradient(top, #333333, #222222); background-image: -o-linear-gradient(top, #333333, #222222); background-image: linear-gradient(top, #333333, #222222); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0); border-color: #222222 #222222 #000000; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); *background-color: #222222; /* Darken IE7 buttons by default so they stand out more given they won't have borders */ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075); -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075); } .navbar .btn-navbar:hover, .navbar .btn-navbar:active, .navbar .btn-navbar.active, .navbar .btn-navbar.disabled, .navbar .btn-navbar[disabled] { background-color: #222222; *background-color: #151515; } .navbar .btn-navbar:active, .navbar .btn-navbar.active { background-color: #080808 \9; } .navbar .btn-navbar .icon-bar { display: block; width: 18px; height: 2px; background-color: #f5f5f5; -webkit-border-radius: 1px; -moz-border-radius: 1px; border-radius: 1px; -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); } .btn-navbar .icon-bar + .icon-bar { margin-top: 3px; } .navbar .dropdown-menu:before { content: ''; display: inline-block; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 7px solid #ccc; border-bottom-color: rgba(0, 0, 0, 0.2); position: absolute; top: -7px; left: 9px; } .navbar .dropdown-menu:after { content: ''; display: inline-block; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 6px solid #ffffff; position: absolute; top: -6px; left: 10px; } .navbar-fixed-bottom .dropdown-menu:before { border-top: 7px solid #ccc; border-top-color: rgba(0, 0, 0, 0.2); border-bottom: 0; bottom: -7px; top: auto; } .navbar-fixed-bottom .dropdown-menu:after { border-top: 6px solid #ffffff; border-bottom: 0; bottom: -6px; top: auto; } .navbar .nav li.dropdown .dropdown-toggle .caret, .navbar .nav li.dropdown.open .caret { border-top-color: #ffffff; border-bottom-color: #ffffff; } .navbar .nav li.dropdown.active .caret { opacity: 1; filter: alpha(opacity=100); } .navbar .nav li.dropdown.open > .dropdown-toggle, .navbar .nav li.dropdown.active > .dropdown-toggle, .navbar .nav li.dropdown.open.active > .dropdown-toggle { background-color: transparent; } .navbar .nav li.dropdown.active > .dropdown-toggle:hover { color: #ffffff; } .navbar .pull-right .dropdown-menu, .navbar .dropdown-menu.pull-right { left: auto; right: 0; } .navbar .pull-right .dropdown-menu:before, .navbar .dropdown-menu.pull-right:before { left: auto; right: 12px; } .navbar .pull-right .dropdown-menu:after, .navbar .dropdown-menu.pull-right:after { left: auto; right: 13px; } .breadcrumb { padding: 7px 14px; margin: 0 0 18px; list-style: none; background-color: #fbfbfb; background-image: -moz-linear-gradient(top, #ffffff, #f5f5f5); background-image: -ms-linear-gradient(top, #ffffff, #f5f5f5); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f5f5f5)); background-image: -webkit-linear-gradient(top, #ffffff, #f5f5f5); background-image: -o-linear-gradient(top, #ffffff, #f5f5f5); background-image: linear-gradient(top, #ffffff, #f5f5f5); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f5f5f5', GradientType=0); border: 1px solid #ddd; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; -webkit-box-shadow: inset 0 1px 0 #ffffff; -moz-box-shadow: inset 0 1px 0 #ffffff; box-shadow: inset 0 1px 0 #ffffff; } .breadcrumb li { display: inline-block; *display: inline; /* IE7 inline-block hack */ *zoom: 1; text-shadow: 0 1px 0 #ffffff; } .breadcrumb .divider { padding: 0 5px; color: #999999; } .breadcrumb .active a { color: #333333; } .pagination { height: 36px; margin: 18px 0; } .pagination ul { display: inline-block; *display: inline; /* IE7 inline-block hack */ *zoom: 1; margin-left: 0; margin-bottom: 0; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); } .pagination li { display: inline; } .pagination a { float: left; padding: 0 14px; line-height: 34px; text-decoration: none; border: 1px solid #ddd; border-left-width: 0; } .pagination a:hover, .pagination .active a { background-color: #f5f5f5; } .pagination .active a { color: #999999; cursor: default; } .pagination .disabled span, .pagination .disabled a, .pagination .disabled a:hover { color: #999999; background-color: transparent; cursor: default; } .pagination li:first-child a { border-left-width: 1px; -webkit-border-radius: 3px 0 0 3px; -moz-border-radius: 3px 0 0 3px; border-radius: 3px 0 0 3px; } .pagination li:last-child a { -webkit-border-radius: 0 3px 3px 0; -moz-border-radius: 0 3px 3px 0; border-radius: 0 3px 3px 0; } .pagination-centered { text-align: center; } .pagination-right { text-align: right; } .pager { margin-left: 0; margin-bottom: 18px; list-style: none; text-align: center; *zoom: 1; } .pager:before, .pager:after { display: table; content: ""; } .pager:after { clear: both; } .pager li { display: inline; } .pager a { display: inline-block; padding: 5px 14px; background-color: #fff; border: 1px solid #ddd; -webkit-border-radius: 15px; -moz-border-radius: 15px; border-radius: 15px; } .pager a:hover { text-decoration: none; background-color: #f5f5f5; } .pager .next a { float: right; } .pager .previous a { float: left; } .pager .disabled a, .pager .disabled a:hover { color: #999999; background-color: #fff; cursor: default; } .modal-open .dropdown-menu { z-index: 2050; } .modal-open .dropdown.open { *z-index: 2050; } .modal-open .popover { z-index: 2060; } .modal-open .tooltip { z-index: 2070; } .modal-backdrop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1040; background-color: #000000; } .modal-backdrop.fade { opacity: 0; } .modal-backdrop, .modal-backdrop.fade.in { opacity: 0.8; filter: alpha(opacity=80); } .modal { position: fixed; top: 50%; left: 50%; z-index: 1050; overflow: auto; width: 560px; margin: -250px 0 0 -280px; background-color: #ffffff; border: 1px solid #999; border: 1px solid rgba(0, 0, 0, 0.3); *border: 1px solid #999; /* IE6-7 */ -webkit-border-radius: 6px; -moz-border-radius: 6px; border-radius: 6px; -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); -webkit-background-clip: padding-box; -moz-background-clip: padding-box; background-clip: padding-box; } .modal.fade { -webkit-transition: opacity .3s linear, top .3s ease-out; -moz-transition: opacity .3s linear, top .3s ease-out; -ms-transition: opacity .3s linear, top .3s ease-out; -o-transition: opacity .3s linear, top .3s ease-out; transition: opacity .3s linear, top .3s ease-out; top: -25%; } .modal.fade.in { top: 50%; } .modal-header { padding: 9px 15px; border-bottom: 1px solid #eee; } .modal-header .close { margin-top: 2px; } .modal-body { overflow-y: auto; max-height: 400px; padding: 15px; } .modal-form { margin-bottom: 0; } .modal-footer { padding: 14px 15px 15px; margin-bottom: 0; text-align: right; background-color: #f5f5f5; border-top: 1px solid #ddd; -webkit-border-radius: 0 0 6px 6px; -moz-border-radius: 0 0 6px 6px; border-radius: 0 0 6px 6px; -webkit-box-shadow: inset 0 1px 0 #ffffff; -moz-box-shadow: inset 0 1px 0 #ffffff; box-shadow: inset 0 1px 0 #ffffff; *zoom: 1; } .modal-footer:before, .modal-footer:after { display: table; content: ""; } .modal-footer:after { clear: both; } .modal-footer .btn + .btn { margin-left: 5px; margin-bottom: 0; } .modal-footer .btn-group .btn + .btn { margin-left: -1px; } .tooltip { position: absolute; z-index: 1020; display: block; visibility: visible; padding: 5px; font-size: 11px; opacity: 0; filter: alpha(opacity=0); } .tooltip.in { opacity: 0.8; filter: alpha(opacity=80); } .tooltip.top { margin-top: -2px; } .tooltip.right { margin-left: 2px; } .tooltip.bottom { margin-top: 2px; } .tooltip.left { margin-left: -2px; } .tooltip.top .tooltip-arrow { bottom: 0; left: 50%; margin-left: -5px; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 5px solid #000000; } .tooltip.left .tooltip-arrow { top: 50%; right: 0; margin-top: -5px; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 5px solid #000000; } .tooltip.bottom .tooltip-arrow { top: 0; left: 50%; margin-left: -5px; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 5px solid #000000; } .tooltip.right .tooltip-arrow { top: 50%; left: 0; margin-top: -5px; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-right: 5px solid #000000; } .tooltip-inner { max-width: 200px; padding: 3px 8px; color: #ffffff; text-align: center; text-decoration: none; background-color: #000000; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; } .tooltip-arrow { position: absolute; width: 0; height: 0; } .popover { position: absolute; top: 0; left: 0; z-index: 1010; display: none; padding: 5px; } .popover.top { margin-top: -5px; } .popover.right { margin-left: 5px; } .popover.bottom { margin-top: 5px; } .popover.left { margin-left: -5px; } .popover.top .arrow { bottom: 0; left: 50%; margin-left: -5px; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 5px solid #000000; } .popover.right .arrow { top: 50%; left: 0; margin-top: -5px; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-right: 5px solid #000000; } .popover.bottom .arrow { top: 0; left: 50%; margin-left: -5px; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 5px solid #000000; } .popover.left .arrow { top: 50%; right: 0; margin-top: -5px; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 5px solid #000000; } .popover .arrow { position: absolute; width: 0; height: 0; } .popover-inner { padding: 3px; width: 280px; overflow: hidden; background: #000000; background: rgba(0, 0, 0, 0.8); -webkit-border-radius: 6px; -moz-border-radius: 6px; border-radius: 6px; -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); } .popover-title { padding: 9px 15px; line-height: 1; background-color: #f5f5f5; border-bottom: 1px solid #eee; -webkit-border-radius: 3px 3px 0 0; -moz-border-radius: 3px 3px 0 0; border-radius: 3px 3px 0 0; } .popover-content { padding: 14px; background-color: #ffffff; -webkit-border-radius: 0 0 3px 3px; -moz-border-radius: 0 0 3px 3px; border-radius: 0 0 3px 3px; -webkit-background-clip: padding-box; -moz-background-clip: padding-box; background-clip: padding-box; } .popover-content p, .popover-content ul, .popover-content ol { margin-bottom: 0; } .thumbnails { margin-left: -20px; list-style: none; *zoom: 1; } .thumbnails:before, .thumbnails:after { display: table; content: ""; } .thumbnails:after { clear: both; } .row-fluid .thumbnails { margin-left: 0; } .thumbnails > li { float: left; margin-bottom: 18px; margin-left: 20px; } .thumbnail { display: block; padding: 4px; line-height: 1; border: 1px solid #ddd; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075); -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075); } a.thumbnail:hover { border-color: #0088cc; -webkit-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); -moz-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); } .thumbnail > img { display: block; max-width: 100%; margin-left: auto; margin-right: auto; } .thumbnail .caption { padding: 9px; } .label, .badge { font-size: 10.998px; font-weight: bold; line-height: 14px; color: #ffffff; vertical-align: baseline; white-space: nowrap; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #999999; } .label { padding: 1px 4px 2px; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; } .badge { padding: 1px 9px 2px; -webkit-border-radius: 9px; -moz-border-radius: 9px; border-radius: 9px; } a.label:hover, a.badge:hover { color: #ffffff; text-decoration: none; cursor: pointer; } .label-important, .badge-important { background-color: #b94a48; } .label-important[href], .badge-important[href] { background-color: #953b39; } .label-warning, .badge-warning { background-color: #f89406; } .label-warning[href], .badge-warning[href] { background-color: #c67605; } .label-success, .badge-success { background-color: #468847; } .label-success[href], .badge-success[href] { background-color: #356635; } .label-info, .badge-info { background-color: #3a87ad; } .label-info[href], .badge-info[href] { background-color: #2d6987; } .label-inverse, .badge-inverse { background-color: #333333; } .label-inverse[href], .badge-inverse[href] { background-color: #1a1a1a; } @-webkit-keyframes progress-bar-stripes { from { background-position: 40px 0; } to { background-position: 0 0; } } @-moz-keyframes progress-bar-stripes { from { background-position: 40px 0; } to { background-position: 0 0; } } @-ms-keyframes progress-bar-stripes { from { background-position: 40px 0; } to { background-position: 0 0; } } @-o-keyframes progress-bar-stripes { from { background-position: 0 0; } to { background-position: 40px 0; } } @keyframes progress-bar-stripes { from { background-position: 40px 0; } to { background-position: 0 0; } } .progress { overflow: hidden; height: 18px; margin-bottom: 18px; background-color: #f7f7f7; background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9); background-image: -ms-linear-gradient(top, #f5f5f5, #f9f9f9); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9)); background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9); background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9); background-image: linear-gradient(top, #f5f5f5, #f9f9f9); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f5f5f5', endColorstr='#f9f9f9', GradientType=0); -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; } .progress .bar { width: 0%; height: 18px; color: #ffffff; font-size: 12px; text-align: center; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #0e90d2; background-image: -moz-linear-gradient(top, #149bdf, #0480be); background-image: -ms-linear-gradient(top, #149bdf, #0480be); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be)); background-image: -webkit-linear-gradient(top, #149bdf, #0480be); background-image: -o-linear-gradient(top, #149bdf, #0480be); background-image: linear-gradient(top, #149bdf, #0480be); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#149bdf', endColorstr='#0480be', GradientType=0); -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); -moz-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box; box-sizing: border-box; -webkit-transition: width 0.6s ease; -moz-transition: width 0.6s ease; -ms-transition: width 0.6s ease; -o-transition: width 0.6s ease; transition: width 0.6s ease; } .progress-striped .bar { background-color: #149bdf; background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); background-image: -webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -webkit-background-size: 40px 40px; -moz-background-size: 40px 40px; -o-background-size: 40px 40px; background-size: 40px 40px; } .progress.active .bar { -webkit-animation: progress-bar-stripes 2s linear infinite; -moz-animation: progress-bar-stripes 2s linear infinite; -ms-animation: progress-bar-stripes 2s linear infinite; -o-animation: progress-bar-stripes 2s linear infinite; animation: progress-bar-stripes 2s linear infinite; } .progress-danger .bar { background-color: #dd514c; background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35); background-image: -ms-linear-gradient(top, #ee5f5b, #c43c35); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35)); background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35); background-image: -o-linear-gradient(top, #ee5f5b, #c43c35); background-image: linear-gradient(top, #ee5f5b, #c43c35); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0); } .progress-danger.progress-striped .bar { background-color: #ee5f5b; background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); background-image: -webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } .progress-success .bar { background-color: #5eb95e; background-image: -moz-linear-gradient(top, #62c462, #57a957); background-image: -ms-linear-gradient(top, #62c462, #57a957); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957)); background-image: -webkit-linear-gradient(top, #62c462, #57a957); background-image: -o-linear-gradient(top, #62c462, #57a957); background-image: linear-gradient(top, #62c462, #57a957); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#57a957', GradientType=0); } .progress-success.progress-striped .bar { background-color: #62c462; background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); background-image: -webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } .progress-info .bar { background-color: #4bb1cf; background-image: -moz-linear-gradient(top, #5bc0de, #339bb9); background-image: -ms-linear-gradient(top, #5bc0de, #339bb9); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9)); background-image: -webkit-linear-gradient(top, #5bc0de, #339bb9); background-image: -o-linear-gradient(top, #5bc0de, #339bb9); background-image: linear-gradient(top, #5bc0de, #339bb9); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#339bb9', GradientType=0); } .progress-info.progress-striped .bar { background-color: #5bc0de; background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); background-image: -webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } .progress-warning .bar { background-color: #faa732; background-image: -moz-linear-gradient(top, #fbb450, #f89406); background-image: -ms-linear-gradient(top, #fbb450, #f89406); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); background-image: -webkit-linear-gradient(top, #fbb450, #f89406); background-image: -o-linear-gradient(top, #fbb450, #f89406); background-image: linear-gradient(top, #fbb450, #f89406); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbb450', endColorstr='#f89406', GradientType=0); } .progress-warning.progress-striped .bar { background-color: #fbb450; background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); background-image: -webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } .accordion { margin-bottom: 18px; } .accordion-group { margin-bottom: 2px; border: 1px solid #e5e5e5; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; } .accordion-heading { border-bottom: 0; } .accordion-heading .accordion-toggle { display: block; padding: 8px 15px; } .accordion-toggle { cursor: pointer; } .accordion-inner { padding: 9px 15px; border-top: 1px solid #e5e5e5; } .carousel { position: relative; margin-bottom: 18px; line-height: 1; } .carousel-inner { overflow: hidden; width: 100%; position: relative; } .carousel .item { display: none; position: relative; -webkit-transition: 0.6s ease-in-out left; -moz-transition: 0.6s ease-in-out left; -ms-transition: 0.6s ease-in-out left; -o-transition: 0.6s ease-in-out left; transition: 0.6s ease-in-out left; } .carousel .item > img { display: block; line-height: 1; } .carousel .active, .carousel .next, .carousel .prev { display: block; } .carousel .active { left: 0; } .carousel .next, .carousel .prev { position: absolute; top: 0; width: 100%; } .carousel .next { left: 100%; } .carousel .prev { left: -100%; } .carousel .next.left, .carousel .prev.right { left: 0; } .carousel .active.left { left: -100%; } .carousel .active.right { left: 100%; } .carousel-control { position: absolute; top: 40%; left: 15px; width: 40px; height: 40px; margin-top: -20px; font-size: 60px; font-weight: 100; line-height: 30px; color: #ffffff; text-align: center; background: #222222; border: 3px solid #ffffff; -webkit-border-radius: 23px; -moz-border-radius: 23px; border-radius: 23px; opacity: 0.5; filter: alpha(opacity=50); } .carousel-control.right { left: auto; right: 15px; } .carousel-control:hover { color: #ffffff; text-decoration: none; opacity: 0.9; filter: alpha(opacity=90); } .carousel-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 15px 5px; background: #333333; background: rgba(0, 0, 0, 0.75); } .carousel-caption h4, .carousel-caption p { color: #ffffff; } .hero-unit { padding: 60px; margin-bottom: 30px; background-color: #eeeeee; -webkit-border-radius: 6px; -moz-border-radius: 6px; border-radius: 6px; } .hero-unit h1 { margin-bottom: 0; font-size: 60px; line-height: 1; color: inherit; letter-spacing: -1px; } .hero-unit p { font-size: 18px; font-weight: 200; line-height: 27px; color: inherit; } .pull-right { float: right; } .pull-left { float: left; } .hide { display: none; } .show { display: block; } .invisible { visibility: hidden; }
teleyinex/t4t-app
www/css/bootstrap.css
CSS
gpl-3.0
90,331
package cz.neumimto.spongejs; import jdk.internal.dynalink.beans.StaticClass; import org.objectweb.asm.*; import org.spongepowered.api.event.Event; import java.lang.reflect.Field; import java.lang.reflect.ParameterizedType; import java.util.List; import java.util.Map; import java.util.function.Consumer; import java.util.logging.Logger; /** * Created by NeumimTo on 12.10.15. */ public class ClassGenerator implements Opcodes { public static int it = 0; private static String toPath(Class cl) { return cl.getName().replaceAll("\\.", "/"); } public static Object generateDynamicListener(Map<StaticClass, List<Consumer<? extends Event>>> map) { Object o = null; try { byte[] b = generateDynamicListenerbc(map); o = loadClass("cz.neumimto.spongejs.listeners.DynamicListener" + it, b); Class<?> listener = Class.forName("cz.neumimto.spongejs.listeners.DynamicListener" + it); o = listener.newInstance(); System.out.println("Successfully loaded class " + listener.getClass().getName()); for (Field field : listener.getDeclaredFields()) { if (List.class.isAssignableFrom(field.getType())) { List s = (List) field.get(o); ParameterizedType paramtype = (ParameterizedType) field.getGenericType(); ParameterizedType type = (ParameterizedType) paramtype.getActualTypeArguments()[0]; Class<? extends Event> event = (Class<? extends Event>) type.getActualTypeArguments()[0]; map.entrySet().stream() .filter(m -> m.getKey().getRepresentedClass() == event) .forEach(a -> s.addAll(a.getValue())); } } System.out.println("Successfully populated class " + listener.getClass().getName()); } catch (Exception e) { e.printStackTrace(); } return o; } public static Class loadClass(String className, byte[] b) { Class clazz = null; try { ClassLoader loader = ScriptLoader.class.getClassLoader(); Class cls = Class.forName("java.lang.ClassLoader"); java.lang.reflect.Method method = cls.getDeclaredMethod("defineClass", String.class, byte[].class, int.class, int.class); method.setAccessible(true); try { Object[] args = new Object[]{className, b, 0, b.length}; clazz = (Class) method.invoke(loader, args); } finally { method.setAccessible(false); } } catch (Exception e) { e.printStackTrace(); } return clazz; } private static byte[] generateDynamicListenerbc(Map<StaticClass, List<Consumer<? extends Event>>> set) throws Exception { System.out.println("Generating bytecode"); ClassWriter cw = new ClassWriter(0); FieldVisitor fv; MethodVisitor mv; AnnotationVisitor av0; cw.visit(52, ACC_PUBLIC + ACC_SUPER, "cz/neumimto/spongejs/listeners/DynamicListener" + it, null, "java/lang/Object", null); cw.visitSource("DynamicListener" + it + ".java", null); for (StaticClass e : set.keySet()) { String name = e.getRepresentedClass().getSimpleName().substring(0, 1).toLowerCase() + e.getRepresentedClass().getSimpleName().substring(1) + "s"; fv = cw.visitField(ACC_PUBLIC, name, "Ljava/util/List;", "Ljava/util/List<Ljava/util/function/Consumer<L" + toPath(e.getRepresentedClass()) + ";>;>;", null); fv.visitEnd(); } int i = 19; { mv = cw.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null); mv.visitCode(); Label l0 = new Label(); mv.visitLabel(l0); mv.visitLineNumber(17, l0); mv.visitVarInsn(ALOAD, 0); mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "<init>", "()V", false); for (StaticClass a : set.keySet()) { Class e = a.getRepresentedClass(); String name = e.getSimpleName().substring(0, 1).toLowerCase() + e.getSimpleName().substring(1) + "s"; System.out.println(String.format("Creating field \"%s\"", name)); Label l1 = new Label(); mv.visitLabel(l1); mv.visitLineNumber(i, l1); i++; mv.visitVarInsn(ALOAD, 0); mv.visitTypeInsn(NEW, "java/util/ArrayList"); mv.visitInsn(DUP); mv.visitMethodInsn(INVOKESPECIAL, "java/util/ArrayList", "<init>", "()V", false); mv.visitFieldInsn(PUTFIELD, "cz/neumimto/spongejs/listeners/DynamicListener" + it, name, "Ljava/util/List;"); } mv.visitInsn(RETURN); Label l3 = new Label(); mv.visitLabel(l3); mv.visitLocalVariable("this", "Lcz/neumimto/spongejs/listeners/DynamicListener" + it + ";", null, l0, l3, 0); mv.visitMaxs(3, 1); mv.visitEnd(); } { for (StaticClass a : set.keySet()) { Class e = a.getRepresentedClass(); String name = "on" + e.getSimpleName(); System.out.println(String.format("Creating method \"%s\" ", name)); String name1 = e.getSimpleName().substring(0, 1).toLowerCase() + e.getSimpleName().substring(1) + "s"; mv = cw.visitMethod(ACC_PUBLIC, name, "(L" + toPath(e) + ";)V", null, null); { av0 = mv.visitAnnotation("Lorg/spongepowered/api/event/Listener;", true); av0.visitEnum("order", "Lorg/spongepowered/api/event/Order;", "BEFORE_POST"); av0.visitEnd(); mv.visitCode(); Label l0 = new Label(); mv.visitLabel(l0); i += 3; mv.visitLineNumber(i, l0); mv.visitVarInsn(ALOAD, 0); mv.visitFieldInsn(GETFIELD, "cz/neumimto/spongejs/listeners/DynamicListener" + it, name1, "Ljava/util/List;"); mv.visitMethodInsn(INVOKEINTERFACE, "java/util/List", "iterator", "()Ljava/util/Iterator;", true); mv.visitVarInsn(ASTORE, 2); Label l1 = new Label(); mv.visitLabel(l1); mv.visitFrame(Opcodes.F_APPEND, 1, new Object[]{"java/util/Iterator"}, 0, null); mv.visitVarInsn(ALOAD, 2); mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Iterator", "hasNext", "()Z", true); Label l2 = new Label(); mv.visitJumpInsn(IFEQ, l2); mv.visitVarInsn(ALOAD, 2); mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Iterator", "next", "()Ljava/lang/Object;", true); mv.visitTypeInsn(CHECKCAST, "java/util/function/Consumer"); mv.visitVarInsn(ASTORE, 3); Label l3 = new Label(); mv.visitLabel(l3); i++; mv.visitLineNumber(i, l3); mv.visitVarInsn(ALOAD, 3); mv.visitVarInsn(ALOAD, 1); mv.visitMethodInsn(INVOKEINTERFACE, "java/util/function/Consumer", "accept", "(Ljava/lang/Object;)V", true); Label l4 = new Label(); mv.visitLabel(l4); i++; mv.visitLineNumber(i, l4); mv.visitJumpInsn(GOTO, l1); mv.visitLabel(l2); i++; mv.visitLineNumber(i, l2); mv.visitFrame(Opcodes.F_CHOP, 1, null, 0, null); mv.visitInsn(RETURN); Label l5 = new Label(); mv.visitLabel(l5); mv.visitLocalVariable("it", "Ljava/util/function/Consumer;", "Ljava/util/function/Consumer<L" + toPath(e) + ";>;", l3, l4, 3); mv.visitLocalVariable("this", "Lcz/neumimto/spongejs/listeners/DynamicListener" + it + ";", null, l0, l5, 0); mv.visitLocalVariable("event", "L" + toPath(e) + ";", null, l0, l5, 1); mv.visitMaxs(2, 4); mv.visitEnd(); } } } cw.visitEnd(); byte[] bytes = cw.toByteArray(); System.out.println("Generated " + bytes.length + " B"); return bytes; } }
NeumimTo/SpongeJS
src/main/java/cz/neumimto/spongejs/ClassGenerator.java
Java
gpl-3.0
8,649
$(function () { var setupNavbar = function () { $('a').each(function(){ if ($(this).prop('href') == window.location.href) { $(this).parents('li').addClass('active'); } }); var login = $('ul.nav a[href="login"]').parent(); var alert = $('#alerts'); var alertList = alert.children('div.dropdown-menu'); var profile = $('#profile'); if (typeof(Storage) !== "undefined" && localStorage.getItem("authorization")) { console.log("We have authorization"); $('#bubbles').show(); $('#register-panel').hide(); $('.nav-link').show(); login.hide(); alert.show(); alertList.empty(); profile.show(); } else { console.log("We do not have authorization"); $('#bubbles').hide(); $('#register-panel').show(); $('.nav-link').hide(); login.show(); alert.hide(); alertList.empty(); profile.hide(); } $('#logout').click(function () { localStorage.clear(); var rawWords = window.location.href.split("/"); window.location = rawWords[0] + "//" + rawWords[2] + "/"; }); }; setupNavbar(); });
cjdellomes/OrgSoft
static/js/navbar.js
JavaScript
gpl-3.0
1,267
Penlight Lua Libraries 1. Why a new set of libraries? Penlight brings together a set of generally useful pure Lua modules, focussing on input data handling (such as reading configuration files), functional programming (such as map, reduce, placeholder expressions,etc), and OS path management. Much of the functionality is inspired by the Python standard libraries. 2. Requirements The file and directory functions depend on LuaFileSystem (lfs). If you want dir.copyfile to work elegantly on Windows, then you need Alien. (Both are present in Lua for Windows.) 3. Known Issues Error handling is still hit and miss. There are 7581 lines of source and 1764 lines of formal tests, which is not an ideal ratio. Formal documentation for comprehension and luabalanced is missing. 4. Installation The directory structure is lua pl (module files) examples (examples) tests (tests) docs (index.html) api (index.html) modules All you need to do is copy the pl directory into your Lua module path, which is typically /usr/local/share/lua/5.1 on a Linux system (of course, you can set LUA_PATH appropriately.) With Lua for Windows, if LUA stands for 'c:\Program Files\Lua\5.1', then pl goes into LUA\lua, docs goes into LUA\examples\penlight and both examples and tests goes into LUA\examples 5. Building the Documentation The Users Guide is processed by markdown.lua. If you like the section headers, you'll need to download my modified version: http://mysite.mweb.co.za/residents/sdonovan/lua/markdown.zip docgen.lua will preprocess the documentation (handles @see references) and use markdown. gen_modules.bat does the LuaDoc stuff. 6. What's new with 0.8b ? Features: pl.app provides useful stuff like simple command-line argument parsing and require_here(), which makes subsequent require() calls look in the local directory by preference. p.file provides useful functions like copy(),move(), read() and write(). (These are aliases to dir.copyfile(),movefile(),utils.readfile(),writefile()) Custom error trace will only show the functions in user code. More robust argument checking. In function arguments, now supports 'string lambdas', e.g. '|x| 2*x' utils.readfile,writefile now insist on being given filenames. This will cause less confusion. tablex.search() is new: will look recursively in an arbitrary table; can specify tables not to follow. tablex.move() will work with source and destination tables the same, with overlapping ranges. Bug Fixes: dir.copyfile() now works fine without Alien on Windows dir.makepath() and rmtree() had problems. tablex.compare_no_order() is now O(NlogN), as expected. tablex.move() had a problem with source size 7. What's New with 0.7.0b? Features: utils.is_type(v,tp) can say is_type(s,'string') and is_type(l,List). utils.is_callable(v) either a function, or has a __call metamethod. Sequence wrappers: can write things like this: seq(s):last():filter('<'):copy() seq:mapmethod(s,name) - map using a named method over a sequence. seq:enum(s) If s is a simple sequence, then for i,v in seq.enum(s) do print(i,v) end seq:take(s,n) Grab the next n values from a (possibly infinite) sequence. In a related change suggested by Flemming Madsden, the in-place List methods like reverse() and sort() return the list, allowing for method chaining. list.join() explicitly converts using tostring first. tablex.count_map() like seq.count_map(), but takes an equality function. tablex.difference() set difference tablex.set() explicit set generator given a list of values Template.indent_substitute() is a new Template method which adjusts for indentation and can also substitute templates themselves. pretty.read(). This reads a Lua table (as dumped by pretty.write) and attempts to be paranoid about its contents. sip.match_at_start(). Convenience function for anchored SIP matches. Bug Fixes: tablex.deepcompare() was confused by false boolean values, which it thought were synonymous with being nil. pretty.write() did not handle cycles, and could not display tables with 'holes' properly (Flemming Madsden) The SIP pattern '$(' was not escaped properly. sip.match() did not pass on options table. seq.map() was broken for double-valued sequences. seq.copy_tuples() did not use default_iter(), so did not e.g. like table arguments. dir.copyfile() returns the wrong result for *nix operations. dir.makepath() was broken for non-Windows paths. 8. What's New with 0.6.3? The map and reduce functions now take the function first, as Nature intended. The Python-like overloading of '*' for strings has been dropped, since it is silly. Also, strings are no longer callable; use 's:at(1)' instead of 's(1)' - this tended to cause Obscure Error messages. Wherever a function argument is expected, you can use the operator strings like '+','==',etc as well as pl.operator.add, pl.operator.eq, etc. (see end of pl/operator.lua for the full list.) tablex now has compare() and compare_no_order(). An explicit set() function has been added which constructs a table with the specified keys, all set to a value of true. List has reduce() and partition() (This is a cool function which separates out elements of a list depending on a classifier function.) There is a new array module which generalizes tablex operations like map and reduce for two-dimensional arrays. The famous iterator over permutations from PiL 9.3 has been included. David Manura's list comprehension library has been included. Also, utils now contains his memoize function, plus a useful function args which captures the case where varargs contains nils. There was a bug with dir.copyfile() where the flag was the wrong way round. config.lines() had a problem with continued lines. Some operators were missing in pl.operator; have renamed them to be consistent with the Lua metamethod names. Copyright --------- Copyright 2012 Guten Ye This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
gutenye/tagen.lua
README.md
Markdown
gpl-3.0
6,787
<?php namespace Sle\Accommodation\Domain\Repository; /*************************************************************** * * Copyright notice * * (c) 2016 Steve Lenz <kontakt@steve-lenz.de> * * All rights reserved * * This script is part of the TYPO3 project. The TYPO3 project is * free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * The GNU General Public License can be found at * http://www.gnu.org/copyleft/gpl.html. * * This script is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ /** * The repository for Salutations */ class SalutationRepository extends \TYPO3\CMS\Extbase\Persistence\Repository { }
hirnsturm/accommodation
Classes/Domain/Repository/SalutationRepository.php
PHP
gpl-3.0
1,139
package main; public class ArithmeticSequenceDiv1 { public int findMinCost(int[] x) { int MAXD = 102; int minCost = Integer.MAX_VALUE; for (int i = 0; i < x.length; ++i) { for (int d = -MAXD; d <= +MAXD; ++d) { int cost = 0; for (int j = 0; j < x.length; ++j) { int t = x[i] + (j - i) * d; cost += Math.abs(t - x[j]); } minCost = Math.min(minCost, cost); } } return minCost; } }
hack1nt0/AC
archive/unsorted/2018.06/2018.06.03 - 2018 TopCoder Open Algorithm/ArithmeticSequenceDiv1.java
Java
gpl-3.0
556
/******************************************************************************* File: test.cpp Project: OpenSonATA Authors: The OpenSonATA code is the result of many programmers over many years Copyright 2011 The SETI Institute OpenSonATA is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. OpenSonATA is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenSonATA. If not, see<http://www.gnu.org/licenses/>. Implementers of this code are requested to include the caption "Licensed through SETI" with a link to setiQuest.org. For alternate licensing arrangements, please contact The SETI Institute at www.seti.org or setiquest.org. *******************************************************************************/ /* * test.cpp */ #include <iostream> #include <fftw3.h> #include "ArchiveChannel.h" #include "Dfb.h" #include "DxErr.h" #include "Gaussian.h" #include "ReadFilter.h" #include "SmallTypes.h" using namespace dfb; using namespace dx; using namespace gauss; using std::cout; using std::endl; const int32_t samplesPerHf = 512; int32_t subchannels = 16; int32_t foldings = 10; int32_t frames = 64; int32_t hf = 129; int32_t tdSamples = 0; int32_t sigChanBins = 32; float32_t oversampling = 0.25; //const float64_t frequency = 0; float64_t subchannelWidthMHz = 533.333333333333333e-6; float64_t centerFreqMHz = DEFAULT_FREQ; float64_t signalFreqMHz = DEFAULT_FREQ; float64_t signalDriftHz = 0; float64_t signalErrMHz = 0; float64_t noisePower = 1; fftwf_plan plan = 0; // function declarations ComplexFloat32 *createTdData(float64_t fMHz, float64_t driftHz, int32_t samples, float64_t noise); ComplexPair *createCdSubchannels(const ComplexFloat32 *td); ComplexFloat32 *createSubchannels(const ComplexFloat32 *td); void createSpectrum(const ComplexFloat32 *td, ComplexPair *fd); void createSpectrum(const ComplexFloat32 *td, ComplexFloat32 *fd, int32_t shift); fftwf_plan createPlan(); float32_t computeAvgPower(ComplexFloat32 *d, int32_t samples); void compareFpData(const ComplexFloat32 *td0, const ComplexFloat32 *td1, int32_t samples); void compareCdData(const ComplexPair *td0, const ComplexPair *td1, int32_t samples); void parseArgs(int argc, char **argv); int main(int argc, char **argv) { parseArgs(argc, argv); ArchiveChannel ac; size_t size; Error err; if (err = ac.setup(subchannels, hf, samplesPerHf, hf * samplesPerHf, oversampling, centerFreqMHz, subchannelWidthMHz)) { cout << "error in setup: " << err << endl; exit(0); } size = ac.getSize(); int32_t samples = ac.getSamples(); // compute the number of time-domain samples to create, allowing // for the execution of the digital filter bank. tdSamples = subchannels * foldings + (hf * samplesPerHf - 1) * (subchannels * (1 - oversampling)); ComplexFloat32 *tdZero = createTdData(centerFreqMHz, 0, tdSamples, 0); ComplexFloat32 *fdZero = createSubchannels(tdZero); // create original TD data ComplexFloat32 *tdOrig = createTdData(signalFreqMHz, signalDriftHz, tdSamples, 0); float32_t power = computeAvgPower(tdOrig, samples); cout << "average sample power in original td data = " << power << endl; ComplexFloat4 *tdOrigF4 = new ComplexFloat4[samples]; ac.convert(tdOrig, (ComplexPair *) tdOrigF4); ComplexFloat32 *tdOrigF32 = new ComplexFloat32[samples]; ac.convert((ComplexPair *) tdOrigF4, tdOrigF32); // test dedrift ComplexFloat32 *tdDedrift = static_cast<ComplexFloat32 *> (fftwf_malloc(size)); ac.dedrift(tdOrig, tdDedrift, signalFreqMHz, signalDriftHz); power = computeAvgPower(tdDedrift, samples); cout << "average sample power in dedrifted td data = " << power << endl; cout << "compare zero TD data to dedrifted TD data, FP" << endl; compareFpData(tdZero, tdDedrift, samples); // extract a signal channel from the original data int32_t sigChanSamples; ComplexFloat32 *sigChan = 0; float64_t widthHz = 22.22; ac.extractSignalChannel(sigChan, signalFreqMHz + signalErrMHz, signalDriftHz, widthHz, sigChanSamples); int32_t spectra = (sigChanSamples / sigChanBins) * 2; size = sigChanBins * spectra * sizeof(ComplexFloat32); ComplexFloat32 *ft = static_cast<ComplexFloat32 *> (fftwf_malloc(size)); ac.createSignalSpectra(sigChan, ft, sigChanBins, sigChanSamples, true); // compute the floating point subchannel data, the reconstruction of the // floating point time domain data, and the rebuilding of the // floating point subchannel data. Then compare the results. // create original subchannels cout << endl << "ComplexFloat32" << endl; ComplexFloat32 *ffd = createSubchannels(tdOrig); size = ac.getSize(); ComplexFloat32 *ftd = static_cast<ComplexFloat32 *> (fftwf_malloc(size)); // create pass 1 TD data from original subchannels ac.create(ffd); power = ac.getTdData(ftd); cout << "compare original TD data to pass 1 TD data, FP" << endl; cout << "average sample power in pass 1 TD data = " << power << endl; compareFpData(tdOrig, ftd, samples); // create pass 1 subchannels from pass 1 TD data ComplexFloat32 *ffd1 = createSubchannels(ftd); cout << "compare original subchannels to pass 1 subchannels, FP"; cout << endl; compareFpData(ffd, ffd1, subchannels * hf * samplesPerHf); cout << endl; // compute the ComplexPair (4-bit integer complex) subchannel data, // the reconstruction of the floating point time domain data, and // the rebuilding of the floating point subchannel data, and compare // the results. // compute original CD subchannels #if FLOAT4_ARCHIVE cout << "ComplexFloat4" << endl; #else cout << "ComplexPair" << endl; #endif #ifdef notdef ComplexPair *ifd = createCdSubchannels(tdOrig); ComplexFloat32 *itd = static_cast<ComplexFloat32 *> (fftwf_malloc(size)); // create pass 1 TD data from original CD subchannels power = ac.create(ifd, itd); cout << "compare original TD data to pass 1 TD data, FP" << endl; cout << "average sample power in pass1 TD data = " << power << endl; cout << "compare original TD data to pass 1 TD data, int" << endl; compareFpData(tdOrig, itd, samples); // create pass 1 CD subchannels from pass 1 TD data ComplexPair *ifd1 = createCdSubchannels(itd); cout << "compare original subchannels to pass 1 subchannels, int"; cout << endl; compareCdData(ifd, ifd1, subchannels * hf * samplesPerHf); #endif #ifdef notdef // create pass 2 TD data from pass 1 CD subchannels ComplexFloat32 *itd1 = static_cast<ComplexFloat32 *> (fftwf_malloc(size)); ac.create(ifd1, itd1); cout << "compare pass 2 TD data to pass 1 TD data, int" << endl; compareFpData(itd, itd1, samples); // create pass 2 CD subchannels from pass 2 TD data ComplexPair *ifd2 = createCdSubchannels(itd1); cout << "compare pass 1 subchannels to pass 2 subchannels, int"; cout << endl; compareCdData(ifd1, ifd2, subchannels * hf * samplesPerHf); ComplexFloat32 *itd2 = static_cast<ComplexFloat32 *> (fftwf_malloc(size)); ac.create(ifd2, itd2); compareFpData(itd1, itd2, samples); ComplexPair *ifd3 = createCdSubchannels(itd1); compareCdData(ifd2, ifd3, subchannels * hf * samplesPerHf); ComplexFloat32 *itd3 = static_cast<ComplexFloat32 *> (fftwf_malloc(size)); ac.create(ifd3, itd3); compareFpData(itd2, itd3, samples); #endif #ifdef notdef // convert the time domain data to 4-bit integer complex; the conversion // must be done before transmission of data to the archiver. size = ac.getSamples() * sizeof(ComplexPair); ComplexPair *cd = static_cast<ComplexPair *> (fftwf_malloc(size)); ac.convert(itd, cd); #endif } /** * Create a time series of input data. * * Description:\n * Creates a time series of complex floats representing a signal at * a given frequency. */ ComplexFloat32 * createTdData(float64_t fMHz, float64_t driftHz, int32_t samples, float64_t noise) { size_t size = samples * sizeof(ComplexFloat32); ComplexFloat32 *td = static_cast<ComplexFloat32 *> (fftwf_malloc(size)); float64_t dfMHz = fMHz - centerFreqMHz; float64_t widthMHz = subchannels * subchannelWidthMHz; Gaussian gen; // no noise, just signal gen.setup(0, widthMHz, noise); gen.addCwSignal(dfMHz, driftHz, 1); gen.getSamples(td, samples); return (td); } /** * Create a set of subchannels from the time samples. * * Description:\n * Performs an FFT to create the subchannel data, then converts from * floating point complex to ComplexPair, which is 4-bit integer complex. */ ComplexPair * createCdSubchannels(const ComplexFloat32 *td) { size_t size = subchannels * hf * samplesPerHf * sizeof(ComplexPair); ComplexPair *fd = static_cast<ComplexPair *> (fftwf_malloc(size)); if (plan) fftwf_destroy_plan(plan); plan = createPlan(); int32_t iStride = subchannels - subchannels * oversampling; int32_t oStride = 1; int32_t spectra = hf * samplesPerHf; for (int32_t i = 0; i < spectra; ++i) createSpectrum(td + i * iStride, fd + i * oStride); return (fd); } /** * Create a set of subchannels. * * Description:\n * Creates a set of filtered, oversampled subchannels from the time-domain * data. A DFB is created and called to perform the subchannelization. */ ComplexFloat32 * createSubchannels(const ComplexFloat32 *td) { size_t size = subchannels * hf * samplesPerHf * sizeof(ComplexFloat32); ComplexFloat32 *fd = static_cast<ComplexFloat32 *> (fftwf_malloc(size)); #ifndef notdef Dfb dfb; FilterSpec filterSpec; string filter("../../filters/LS16c10f25o"); ReadFilter readFilter; readFilter.readFilter(filter, filterSpec); dfb.setup(subchannels, subchannels * oversampling, foldings, hf * samplesPerHf); const ComplexFloat32 *in[1]; in[0] = td; ComplexFloat32 *out[subchannels]; int32_t half = subchannels / 2; for (int32_t i = 0; i < subchannels; ++i) { if (i < half) out[i] = fd + (i + half) * hf * samplesPerHf; else out[i] = fd + (i - half) * hf * samplesPerHf; // out[i] = fd + i * hf * samplesPerHf; } dfb.iterate(in, 1, tdSamples, out); #else if (plan) fftwf_destroy_plan(plan); plan = createPlan(); int32_t overlap = subchannels * oversampling; int32_t iStride = subchannels - overlap; int32_t oStride = 1; int32_t spectra = hf * samplesPerHf; for (int32_t i = 0; i < spectra; ++i) { createSpectrum(td + i * iStride, fd + i * oStride, (i * overlap) % subchannels); } #endif return (fd); } /** * Create a spectrum of subchannels. * * Description:\n * */ void createSpectrum(const ComplexFloat32 *td, ComplexPair *fd) { ComplexFloat32 spectrum[subchannels]; fftwf_execute_dft(plan, (fftwf_complex *) td, (fftwf_complex *) spectrum); int32_t stride = hf * samplesPerHf; float32_t scale = 1 / sqrt(subchannels); int32_t half = subchannels / 2; for (int32_t i = 0; i < subchannels; ++i) { spectrum[i] *= scale; #if FLOAT4_ARCHIVE ComplexFloat4 v(spectrum[i]); if (i < half) fd[(i+half)*stride] = v; else fd[(i-half)*stride] = v; #else int32_t re = (int32_t) rint(spectrum[i].real()); int32_t im = (int32_t) rint(spectrum[i].imag()); if (re > 7) re = 7; if (re < -7) re = -7; if (im > 7) im = 7; if (im < -7) im = -7; if (i < half) fd[(i+half)*stride].pair = (re << 4) | (im & 0xf); else fd[(i-half)*stride].pair = (re << 4) | (im & 0xf); #endif } } void createSpectrum(const ComplexFloat32 *td, ComplexFloat32 *fd, int32_t shift) { ComplexFloat32 t[subchannels]; ComplexFloat32 spectrum[subchannels]; // rotate the time samples to correct phase int32_t ofs = subchannels - shift; memcpy(t, td + shift, ofs * sizeof(ComplexFloat32)); memcpy(t + ofs, td, shift * sizeof(ComplexFloat32)); fftwf_execute_dft(plan, (fftwf_complex *) t, (fftwf_complex *) spectrum); int32_t stride = hf * samplesPerHf; float32_t scale = 1 / sqrt(subchannels); int32_t half = subchannels / 2; for (int32_t i = 0; i < subchannels; ++i) { spectrum[i] *= scale; if (i < half) fd[(i+half)*stride] = spectrum[i]; else fd[(i-half)*stride] = spectrum[i]; } } fftwf_plan createPlan() { size_t size = subchannels * sizeof(ComplexFloat32); ComplexFloat32 *in = static_cast<ComplexFloat32 *> (fftwf_malloc(size)); ComplexFloat32 *out = static_cast<ComplexFloat32 *> (fftwf_malloc(size)); fftwf_plan p = fftwf_plan_dft_1d(subchannels, (fftwf_complex *) in, (fftwf_complex *) out, FFTW_FORWARD, FFTW_ESTIMATE); return (p); } float32_t computeAvgPower(ComplexFloat32 *d, int32_t samples) { float32_t sum = 0; for (int32_t i = 0; i < samples; ++i) sum += std::norm(d[i]); return (sum / samples); } void compareFpData(const ComplexFloat32 *td0, const ComplexFloat32 *td1, int32_t samples) { ComplexFloat32 maxDiff(0, 0); bool fail = false; int32_t reIndex = 0, imIndex = 0; // there may be scaling differences between the two sequences, so // normalize by the first sample in each sequence float32_t scale = 0; for (int32_t i = 0; i < samples; ++i) { if (std::norm(td0[i])) { scale = 1.0 / sqrt(std::norm(td1[i]) / std::norm(td0[i])); break; } } Assert(scale); for (int32_t i = 0; i < samples; ++i) { ComplexFloat32 diff = td0[i] - td1[i] * scale; float64_t re = fabs(diff.real()); float64_t im = fabs(diff.imag()); if (re > maxDiff.real()) { reIndex = i; maxDiff.real() = re; } if (im > maxDiff.imag()) { imIndex = i; maxDiff.imag() = im; } if ((re > 5e-6 || im > 5e-6) && !fail) { fail = true; cout << "failed at index " << i << ", orig = " << td0[i]; cout << ", new = " << td1[i] << endl; } } cout << "maximum diff = " << maxDiff << " at index re " << reIndex; cout << ", im " << imIndex << endl; if (!fail) cout << "compare succeeded" << endl; else cout << "compare failed" << endl; } void compareCdData(const ComplexPair *cd0, const ComplexPair *cd1, int32_t samples) { ComplexFloat32 maxDiff(0, 0); int32_t differences = 0; for (int32_t i = 0; i < samples; ++i) { if (cd0[i].pair != cd1[i].pair) ++differences; } cout << differences << " differences in " << samples << " samples" << endl; if (!differences) cout << "compare succeeded" << endl; else cout << "compare failed" << endl; } /** * Parse the argument list. */ static string usageString = "test [-h] [-c centerFreq] [-d drift] [-f frames] [-n subchannels] [-o oversampling] [-s signalFreq] [-w subchannelwidth]\n\ -h: print usage\n\ -c centerFreq: center frequency of archive channel in MHz\n\ -d drift: drift of signal in Hz/s\n\ -e err: signal err in MHz\n\ -f frames: # of frames\n\ -n subchannels: # of subchannels\n\ -o oversampling: percentage of oversampling of subchannels\n\ -s signalFreq: signal frequency in MHz\n\ -w subchannelWidth: subchannel width in MHz\n\\n"; void usage() { cout << usageString << endl; exit(0); } void parseArgs(int argc, char **argv) { bool done = false; const char *optstring = "hc:d:e:f:n:o:s:w:"; extern char *optarg; // extern int optind; // extern int optopt; extern int opterr; opterr = 0; while (!done) { switch (getopt(argc, argv, optstring)) { case -1: done = true; break; case 'c': centerFreqMHz = atof(optarg); break; case 'd': signalDriftHz = atof(optarg); break; case 'e': signalErrMHz = atof(optarg); break; case 'f': frames = atoi(optarg); hf = 2 * frames + 1; break; case 'h': usage(); break; case 'n': subchannels = atoi(optarg); break; case 'o': oversampling = atof(optarg); break; case 's': signalFreqMHz = atof(optarg); break; case 'w': subchannelWidthMHz = atof(optarg); break; default: cout << "invalid option " << optarg << endl; usage(); break; } } int32_t overlap = subchannels * oversampling; if (overlap != subchannels * oversampling) { cout << "subchannnels * oversampling must be an integer" << endl; cout << "subchannels = " << subchannels << ", oversampling = "; cout << oversampling << endl; exit(0); } }
jonr925/SonATA
sig-pkg/dx/test/test.cpp
C++
gpl-3.0
16,216
/* * This file is part of EchoPet. * * EchoPet is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EchoPet is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with EchoPet. If not, see <http://www.gnu.org/licenses/>. */ package com.dsh105.echopet.api.pet.type; import com.dsh105.echopet.api.pet.Pet; import com.dsh105.echopet.compat.api.entity.*; import com.dsh105.echopet.compat.api.entity.type.nms.IEntityHorsePet; import com.dsh105.echopet.compat.api.entity.type.pet.IHorsePet; import org.bukkit.entity.Player; import java.util.UUID; @EntityPetType(petType = PetType.HORSE) public class HorsePet extends Pet implements IHorsePet { HorseType horseType; HorseVariant variant; HorseMarking marking; HorseArmour armour; boolean baby = false; boolean chested = false; boolean saddle = false; public HorsePet(Player owner) { super(owner); } @Override public void setHorseType(HorseType type) { ((IEntityHorsePet) getEntityPet()).setType(type); this.horseType = type; } @Override public void setVariant(HorseVariant variant, HorseMarking marking) { ((IEntityHorsePet) getEntityPet()).setVariant(variant, marking); this.variant = variant; this.marking = marking; } @Override public void setArmour(HorseArmour armour) { ((IEntityHorsePet) getEntityPet()).setArmour(armour); this.armour = armour; } @Override public boolean isBaby() { return this.baby; } @Override public void setBaby(boolean flag) { ((IEntityHorsePet) getEntityPet()).setBaby(flag); this.baby = flag; } @Override public void setSaddled(boolean flag) { ((IEntityHorsePet) getEntityPet()).setSaddled(flag); this.saddle = flag; } @Override public void setChested(boolean flag) { ((IEntityHorsePet) getEntityPet()).setChested(flag); this.chested = flag; } @Override public HorseType getHorseType() { return this.horseType; } @Override public HorseVariant getVariant() { return this.variant; } @Override public HorseMarking getMarking() { return this.marking; } @Override public HorseArmour getArmour() { return this.armour; } @Override public boolean isSaddled() { return this.saddle; } @Override public boolean isChested() { return this.chested; } }
lol768/EchoPet
modules/EchoPet/src/main/java/com/dsh105/echopet/api/pet/type/HorsePet.java
Java
gpl-3.0
2,940
<?php class NotificationText extends Text { } ?>
ncantu/socialNetWork
lib/_toDelete/NotificationText.php
PHP
gpl-3.0
55
# -*- coding: utf8 -*- import argparse import logging import pytest import SMSShell import SMSShell.commands def test_abstract_init(): """Test abstract init methods """ abs = SMSShell.commands.AbstractCommand(logging.getLogger(), object(), object(), object()) assert abs.name == 'abstractcommand' def test_abstract_not_implemented(): abs = SMSShell.commands.AbstractCommand(logging.getLogger(), object(), object(), object()) with pytest.raises(SMSShell.commands.CommandBadImplemented): abs.description([]) with pytest.raises(SMSShell.commands.CommandBadImplemented): abs.usage([]) with pytest.raises(SMSShell.commands.CommandBadImplemented): abs.main([]) def test_abstract_bad_input_state_type(): class Bad(SMSShell.commands.AbstractCommand): def inputStates(self): return dict() com = Bad(logging.getLogger(), object(), object(), object()) with pytest.raises(SMSShell.commands.CommandBadImplemented): com._inputStates() def test_abstract_bad_input_state_value(): class Bad(SMSShell.commands.AbstractCommand): def inputStates(self): return ['d'] com = Bad(logging.getLogger(), object(), object(), object()) with pytest.raises(SMSShell.commands.CommandBadImplemented): com._inputStates() def test_abstract_bad_arg_parser_type(): class Bad(SMSShell.commands.AbstractCommand): def argsParser(self): return 'a' com = Bad(logging.getLogger(), object(), object(), object()) with pytest.raises(SMSShell.commands.CommandBadImplemented): com._argsParser() def test_abstract_bad_arg_parser_init(): class Bad(SMSShell.commands.AbstractCommand): def argsParser(self): raise ValueError('no') com = Bad(logging.getLogger(), object(), object(), object()) with pytest.raises(SMSShell.commands.CommandBadImplemented): com._argsParser()
Turgon37/SMSShell
tests/test_smsshell_commands.py
Python
gpl-3.0
2,388
/* * This file is part of eBlast Project. * * Copyright (c) 2011 eBlast * * eBlast is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * eBlast is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with eBlast. If not, see <http://www.gnu.org/licenses/>. */ package eblast.gui; import java.awt.Component; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import javax.swing.DefaultListModel; import javax.swing.JList; import javax.swing.ListCellRenderer; import javax.swing.ListSelectionModel; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; import eblast.gui.menus.PopupMouseMenu; import eblast.torrent.Torrent; import eblast.torrent.TorrentManager; /** * List that represents all the Torrents that we are downloading/uploading, but actually * contains TorrentItem items. * * @author David Dieulivol <david.dieulivol@gmail.com> * @author Denoréaz Thomas <thomas.denoreaz@thmx.ch> * * @version 1.0 - 23.05.2011 - Initial version */ public class TorrentListPanel extends JList implements ListCellRenderer, ListSelectionListener, ActionListener, MouseListener { private static final long serialVersionUID = -4439624160294340416L; private DefaultListModel mModel; private TorrentManager mTorrentManager; private int mPreviousListHash; /** * Default constructor */ public TorrentListPanel() { super(); mTorrentManager = TorrentManager.getInstance(); // We use it for getting all the available torrents. // Add listeners MainUI.getTimer().addActionListener(this); addListSelectionListener(this); addMouseListener(this); // Multiple selection, Vertical layout. setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); setLayoutOrientation(JList.VERTICAL); setCellRenderer(this); mModel = new DefaultListModel(); setModel(mModel); for (Torrent t : mTorrentManager.getTorrents()) { mModel.addElement(new TorrentItem(t)); // Add all the TorrentItems to the list } mPreviousListHash = mTorrentManager.getTorrentListHash(); // Get the list hash of all the torrents into the TManager. } /** * {@inheritDoc} */ public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { TorrentItem item = (TorrentItem) value; // Alternate the background color of the TorrentItem in the list item.setBackground(isSelected ? Ressources.colors.selected : (index % 2 == 1) ? Ressources.colors.zebraPattern_1 : Ressources.colors.zebraPattern_2); return item; } /** * Returns all the Torrents that have been selected in this Panel. * @return all the Torrent objects that have been selected. */ public TorrentItem[] getSelectedTorrentItems() { Object[] selectedObjects = getSelectedValues(); // Get all the objects selected into this Torrent Panel. if (selectedObjects.length == 0) return null; // If there is no object select, return null. TorrentItem[] selectedTorrentItems = new TorrentItem[selectedObjects.length]; // Returns the selected Torrents. for (int i = 0; i < selectedObjects.length; i++) { selectedTorrentItems[i] = (TorrentItem) selectedObjects[i]; } return selectedTorrentItems; } /** * Used when the selection in this List is changed. */ public void valueChanged(ListSelectionEvent e) { // When the selection is changed, give to all of the tabs the selection. for (int i = 0; i < ObserversTorrentList.getInstance().length(); i++) { // Transforms all the torrentItems into Torrents. Torrent[] torrents = null; if(getSelectedTorrentItems() != null) { torrents = new Torrent[getSelectedTorrentItems().length]; for (int j = 0; j < getSelectedTorrentItems().length; j++) { torrents[j] = getSelectedTorrentItems()[j].getTorrent(); } } // Transmits the torrents to all the tabs. ObserversTorrentList.getInstance().getObserver(i).update(torrents); } } /** * What to do when the timer ticks */ public void actionPerformed(ActionEvent e) { int listHash = mTorrentManager.getTorrentListHash(); // Current hash of the list. // One or more torrents have been added/removed, we reload the model if (mPreviousListHash != listHash) { int[] selectedIndices = getSelectedIndices(); // get all the indices of the selected TorrentItems mModel.clear(); // Clear the model for (Torrent t : mTorrentManager.getTorrents()) { mModel.addElement(new TorrentItem(t));} // Relod the model setModel(mModel); setSelectedIndices(selectedIndices); // Select back all the TorrentItems mPreviousListHash = listHash; } // Updates the List of torrents. for (int i = 0; i < mModel.size(); i++) { ((TorrentItem)mModel.get(i)).update(); } repaint(); } /** * The mouse has been pressed */ public void mousePressed(MouseEvent e) { if (e.isPopupTrigger()) { // Check if the user wants the mouse menu. doPop(e); } } /** * The mouse has been released */ public void mouseReleased(MouseEvent e) { if (e.isPopupTrigger()) { // Check if the user wants the mouse menu. doPop(e); } } /** * Right click popup menu. * @param e MouseEvent event. */ public void doPop(MouseEvent e) { if (getSelectedTorrentItems() == null) return; // If there is no item selected, quit. PopupMouseMenu menu = new PopupMouseMenu(); // Creates the first menu depending on the current State of the Torrent. menu.setTorrentMode(getSelectedTorrentItems()[0].getTorrent().getTorrentState()); menu.show(e.getComponent(), e.getX(), e.getY()); } // Not implemented methods from interfaces public void mouseEntered(MouseEvent e) {} public void mouseClicked(MouseEvent e) {} public void mouseExited(MouseEvent e) {} }
ThmX/epfl-ba2-ITP-eBlast
src/eblast/gui/TorrentListPanel.java
Java
gpl-3.0
6,350
package com.github.lake54.groupsio.api.util; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.databind.JavaType; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.PropertyNamingStrategy; import com.fasterxml.jackson.databind.type.TypeFactory; import com.fasterxml.jackson.datatype.guava.GuavaModule; import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; import com.github.lake54.groupsio.api.domain.Page; import java.util.function.Function; /** * Utility class for interacting with Jackson types. */ public class JacksonUtils { /** * A reference to the default {@link TypeFactory} instance. */ private static final TypeFactory TYPE_FACTORY = TypeFactory.defaultInstance(); /** * A static mapper instance to use for all JSON interaction. */ private static final ObjectMapper MAPPER = createMapper(); /** * Converts an object to the type defined by the provided generator. * * @param object * the object to convert to the new type. * @param generator * the generator to create a new type reference. * @return * an instance of the defined type. */ public static <T> T convert(Object object, Function<TypeFactory, JavaType> generator) { return MAPPER.convertValue(object, generateType(generator)); } /** * Creates an {@link ObjectMapper} instance with configuration. * * @return * an {@link ObjectMapper} instance. */ public static ObjectMapper createMapper() { ObjectMapper mapper = new ObjectMapper(); mapper.registerModule(new GuavaModule()); mapper.registerModule(new Jdk8Module()); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); return mapper; } /** * Creates a type reference to use for pagination. * * @param tClass * the class to use for pagination. * @return * a type representing a page of the provided class. */ public static JavaType createPaginationType(Class<?> tClass) { return generateType(factory -> factory.constructParametricType(Page.class, tClass)); } /** * Creates a type reference using the provided generator. * * @param generator * the generator used to create a new type reference. * @return * a type defined by the generating function. */ public static JavaType generateType(Function<TypeFactory, JavaType> generator) { return generator.apply(TYPE_FACTORY); } }
linuxfoundation/groupsio-api-java
src/main/java/com/github/lake54/groupsio/api/util/JacksonUtils.java
Java
gpl-3.0
2,617
/** * Plugin: "disable_options" (selectize.js) * Copyright (c) 2013 Mondo Robot & contributors * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this * file except in compliance with the License. You may obtain a copy of the License at: * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF * ANY KIND, either express or implied. See the License for the specific language * governing permissions and limitations under the License. * * @authors Jake Myers <jmyers0022@gmail.com>, Vaughn Draughon <vaughn@rocksolidwebdesign.com> */ Selectize.define('disable_options', function(options) { var self = this; options = $.extend({ 'disableField': '', 'disableOptions': [] }, options); self.refreshOptions = (function() { var original = self.refreshOptions; return function() { original.apply(this, arguments); $.each(options.disableOptions, function(index, option) { self.$dropdown_content.find('[data-' + options.disableField + '="' + String(option) + '"]').addClass('option-disabled'); }); }; })(); self.onOptionSelect = (function() { var original = self.onOptionSelect; return function(e) { var value, $target, $option; if (e.preventDefault) { e.preventDefault(); e.stopPropagation(); } $target = $(e.currentTarget); if ($target.hasClass('option-disabled')) { return; } return original.apply(this, arguments); }; })(); self.disabledOptions = function() { return options.disableOptions; } self.setDisabledOptions = function( values ) { options.disableOptions = values } self.disableOptions = function( values ) { if ( ! ( values instanceof Array ) ) { values = [ values ] } values.forEach( function( val ) { if ( options.disableOptions.indexOf( val ) == -1 ) { options.disableOptions.push( val ) } } ); } self.enableOptions = function( values ) { if ( ! ( values instanceof Array ) ) { values = [ values ] } values.forEach( function( val ) { var remove = options.disableOptions.indexOf( val ); if ( remove + 1 ) { options.disableOptions.splice( remove, 1 ); } } ); } });
JonnyWong16/plexpy
data/interfaces/default/js/selectize.plugin.disable-options.js
JavaScript
gpl-3.0
2,444
<?php namespace Orchestra\Support\Facades; use Illuminate\Support\Facades\Facade; class Memory extends Facade { /** * Get the registered name of the component. * * @return string */ protected static function getFacadeAccessor() { return 'orchestra.memory'; } }
oliveiraped/Reportula
vendor/orchestra/support/src/Orchestra/Support/Facades/Memory.php
PHP
gpl-3.0
307
package com.circletech.smartconnect; import com.circletech.smartconnect.config.CustomConfig; import com.circletech.smartconnect.util.ConstantUtil; import com.circletech.smartconnect.util.LoggerUtil; import com.circletech.smartconnect.util.MonitorWatcher; import com.circletech.smartconnect.util.ThreadPoolUtil; import java.util.concurrent.ExecutorService; /** * Created by xieyingfei on 2016/12/7. */ public class DataProcessMonitor implements Runnable{ //static inner class Singleton pattern private DataProcessMonitor() { } private static class SingletonInstance { private static final DataProcessMonitor INSTANCE = new DataProcessMonitor(); } public static DataProcessMonitor getInstance() { return DataProcessMonitor.SingletonInstance.INSTANCE; } private CommDataProcessor currentSensorReceiver; public CommDataProcessor getCurrentSensorReceiver() { return currentSensorReceiver; } public void setCurrentSensorReceiver(CommDataProcessor currentSensorReceiver) { this.currentSensorReceiver = currentSensorReceiver; } private CustomConfig customConfig; public CustomConfig getCustomConfig() { return customConfig; } public void setCustomConfig(CustomConfig customConfig) { this.customConfig = customConfig; } private MonitorWatcher receiverWatchdog; private Boolean receiverifRunning = true; /* public DataProcessMonitor(CommDataProcessor receiver) { //actual data process thread currentSensorReceiver = receiver; this.deviceDistanceService = receiver.getDeviceDistanceService(); this.devicePositionService = receiver.getDevicePositionService(); this.deviceTransducerDataService = receiver.getDeviceTransducerDataService(); this.deviceSystemInfoService = receiver.getDeviceSystemInfoService(); this.basePositionService = receiver.getBasePositionService(); this.customConfig = receiver.getCustomConfig(); //watch receive process tool receiverWatchdog = new MonitorWatcher(customConfig.getMonitorperiod()); } */ public void openReceiver(){ ExecutorService cachedThreadPool = ThreadPoolUtil.getInstance(); cachedThreadPool.execute(currentSensorReceiver); LoggerUtil.getInstance().info("openReceiver"); } public void closeReceiver(){ currentSensorReceiver.close(); LoggerUtil.getInstance().info("closeReceiver"); } @Override public void run() { //watch receive process tool receiverWatchdog = new MonitorWatcher(customConfig.getMonitorperiod()); receiverWatchdog.feed(); ExecutorService cachedThreadPool = ThreadPoolUtil.getInstance(); int reinvokeprocess = customConfig.getReinvokeprocess(); while (receiverifRunning) { //If the thread haven't update the alive flag for 5 secs if (reinvokeprocess == 1 && !receiverWatchdog.checkAlive() && currentSensorReceiver != null && !currentSensorReceiver.isCloseSerial() && !currentSensorReceiver.isActive()) { //stop current thread. Drop current pointer to the garbage collector. Init another thread. currentSensorReceiver.close(); currentSensorReceiver = CommDataProcessor.getInstance(); cachedThreadPool.execute(currentSensorReceiver); receiverWatchdog.feed(); LoggerUtil.getInstance().info("Receiver Restarted"); } try{ Thread.sleep(ConstantUtil.THREAD_SLEEP_SPAN); }catch (InterruptedException e){ e.printStackTrace(); } } } public void shutdown() { this.receiverifRunning = false; } }
unrealinux/DataProcessPlatform
src/main/java/com/circletech/smartconnect/DataProcessMonitor.java
Java
gpl-3.0
3,901
<?php /** Freesewing\Patterns\Core\WahidWaistcoat class */ namespace Freesewing\Patterns\Core; /** * The Wahid Waistcoat pattern * * @author Joost De Cock <joost@decock.org> * @copyright 2016 Joost De Cock * @license http://opensource.org/licenses/GPL-3.0 GNU General Public License, Version 3 */ class WahidWaistcoat extends BrianBodyBlock { /* ___ _ _ _ _ _ |_ _|_ __ (_) |_(_) __ _| (_)___ ___ | || '_ \| | __| |/ _` | | / __|/ _ \ | || | | | | |_| | (_| | | \__ \ __/ |___|_| |_|_|\__|_|\__,_|_|_|___/\___| Things we need to do before we can draft a pattern */ /** * Fix collar ease to 1.5cm */ const COLLAR_EASE = 15; /** * Fix biceps ease to 5cm. * Just to suppress a warning because Brian expects * the biceps ease option to be set. */ const BICEPS_EASE = 50; /** * Fix sleevecap ease to 1.5cm */ const SLEEVECAP_EASE = 15; /** * Fix pocketWidht to 10cm */ const POCKET_WIDTH = 100; /** * Fix pocketHeight to 1.5cm */ const POCKET_HEIGHT = 15; /** * Fix pocketAngle to 5 degrees */ const POCKET_ANGLE = 5; /** * Fix backNeckCutout to 2.5cm */ const BACK_NECK_CUTOUT = 25; /** Armhole depth factor = 81% */ const ARMHOLE_DEPTH_FACTOR = 0.81; /** Across back factor = 96% */ const ACROSS_BACK_FACTOR = 0.96; /** * Sets up options and values for our draft * * By branching this out of the sample/draft methods, we can * set a bunch of options and values the influence the draft * without having to touch the sample/draft methods * When extending this pattern so we can just implement the * initialize() method and re-use the other methods. * * Good to know: * Options are typically provided by the user, but sometimes they are fixed * Values are calculated for re-use later * * @param \Freesewing\Model $model The model to sample for * * @return void */ public function initialize($model) { // Options that are fixed yet needed for Brian $this->setOptionIfUnset('collarEase', self::COLLAR_EASE); $this->setOptionIfUnset('bicepsEase', self::BICEPS_EASE); $this->setOptionIfUnset('sleevecapEase', self::SLEEVECAP_EASE); $this->setOptionIfUnset('backNeckCutout', self::BACK_NECK_CUTOUT); $this->setOptionIfUnset('armholeDepthFactor', self::ARMHOLE_DEPTH_FACTOR); $this->setOptionIfUnset('acrossBackFactor', self::ACROSS_BACK_FACTOR); $this->setValue('shoulderSlope', $model->m('shoulderSlope')); // Depth of the armhole $this->setValue('armholeDepth', $model->m('shoulderSlope') / 2 + ( $model->m('bicepsCircumference') + $this->o('bicepsEase') ) * $this->o('armholeDepthFactor')); // Collar widht and depth $this->setValue('collarWidth', ($model->getMeasurement('neckCircumference') / self::PI) / 2 + 5); $this->setValue('collarDepth', ($model->getMeasurement('neckCircumference') + $this->getOption('collarEase')) / 5 - 8); // Cut front armhole a bit deeper $this->setValue('frontArmholeExtra', 5); // Overlap at front $this->setValue('frontOverlap', 10); // Some helper vars $this->setValue('chest', $model->m('chestCircumference') + $this->o('chestEase')); $this->setValue('waist', $model->m('naturalWaist') + $this->o('waistEase')); $this->setValue('hips', $model->m('hipsCircumference') + $this->o('hipsEase')); $waist_re = $this->v('chest') - $this->v('waist'); $hips_re = $this->v('chest') - $this->v('hips'); if ($hips_re <= 0) { $hips_re = 0; } if ($waist_re <= 0) { $waist_re = 0; } // How much to reduce in darts/sides $this->setValue('waistReduction', $waist_re); $this->setValue('hipsReduction', $hips_re); $this->setValue('scyeDart', (5 + $waist_re/10)); // Used by the parent pattern $this->setValue('frontCollarTweakFactor', 1); } /* ____ __ _ | _ \ _ __ __ _ / _| |_ | | | | '__/ _` | |_| __| | |_| | | | (_| | _| |_ |____/|_| \__,_|_| \__| The actual sampling/drafting of the pattern */ /** * Generates a sample of the pattern * * This creates a sample of this pattern for a given model * and set of options. You get a barebones pattern with only * what it takes to illustrate the effect of changes in * the sampled option or measurement. * * Note that we're only including front and back in the sample * as the other parts add little relevance while cluttiring up the sample * * @param \Freesewing\Model $model The model to sample for * * @return void */ public function sample($model) { // Setup all options and values we need $this->initialize($model); // Draft the base block /** @see \Freesewing\Patterns\BrianBodyBlock::draftBackBlock() */ $this->draftBackBlock($model); /** @see \Freesewing\Patterns\BrianBodyBlock::draftFrontBlock() */ $this->draftFrontBlock($model); // Draft base front to the point where it differs from back $this->draftWaistcoatFrontBlock($model); // Draft the final front and back $this->draftFront($model); $this->draftBack($model); // Do not render parts from parent pattern $this->parts['frontBlock']->setRender(false); $this->parts['backBlock']->setRender(false); } /** * Generates a draft of the pattern * * This creates a draft of this pattern for a given model * and set of options. You get a complete pattern with * all bels and whistles. * * @param \Freesewing\Model $model The model to draft for * * @return void */ public function draft($model) { // Continue from sample $this->sample($model); // Draft all remaining blocks $this->draftFrontFacing($model); $this->draftFrontLining($model); $this->draftPocketWelt($model); $this->draftPocketInterfacing($model); $this->draftPocketFacing($model); $this->draftPocketBag($model); // Finalize front and back $this->finalizeFront($model); $this->finalizeBack($model); // Finalize all remaining parts $this->finalizeFrontFacing($model); $this->finalizeFrontLining($model); $this->finalizePocketWelt($model); $this->finalizePocketInterfacing($model); $this->finalizePocketFacing($model); $this->finalizePocketBag($model); // Is this a paperless pattern? if ($this->isPaperless) { // Add paperless info to all parts $this->paperlessFront($model); $this->paperlessBack($model); $this->paperlessFrontFacing($model); $this->paperlessFrontLining($model); $this->paperlessPocketWelt($model); $this->paperlessPocketInterfacing($model); $this->paperlessPocketFacing($model); $this->paperlessPocketBag($model); } } /** * Drafts the waistcoatFrontBlock * * I'm using a draft[part name] scheme here but * don't let that think that this is something specific * to the draft service. * * This draft method does the basic drafting and is * called by both the draft AND sample methods. * * The difference starts after this method is done. * For sample, this is all we need, but draft calls * the finalize[part name] method after this. * * @param \Freesewing\Model $model The model to draft for * * @return void */ public function draftWaistcoatFrontBlock($model) { $this->clonePoints('frontBlock', 'waistcoatFrontBlock'); /** @var \Freesewing\Part $p */ $p = $this->parts['waistcoatFrontBlock']; // Neck cutout $p->newPoint( 300, $p->x(1)-$this->v('frontOverlap'), $p->y(5) - 80 + $this->o('necklineDrop'), 'Neck cutout base point'); if ($this->o('frontStyle') == 2) { $p->newPoint( 301, $p->x(8), $p->y(300), 'Neck cutout control point'); } else { $p->newPoint( 301, $p->x(8)+20, $p->y(9), 'Neck cutout control point'); } // Front inset $p->addPoint( 10, $p->shift(10,180,$this->o('frontInset'))); $p->addPoint( 17, $p->shift(17,180,$this->o('frontInset'))); $p->addPoint( 18, $p->shift(18,180,$this->o('frontInset'))); $p->addPoint( 14, $p->shift(14,180,$this->o('frontInset')/2)); $p->addPoint( 15, $p->shift(15,180,$this->o('frontInset')/2)); $p->addPoint( 16, $p->shift(16,180,$this->o('frontInset')/2)); // Shoulder inset $p->addPoint( 12, $p->shiftTowards(12,8,$this->o('shoulderInset'))); //$p->addPoint( 19, $p->shiftTowards(12,8,10)); //$p->addPoint( 19, $p->rotate(19,12,90)); // Neck inset $p->addPoint( 8, $p->shiftTowards(8,12,$this->o('neckInset'))); $p->addPoint( 20, $p->shiftTowards(8,12,20)); $p->addPoint( 20, $p->rotate(20,8,-90)); //Hem $p->newPoint( 302, $p->x(4)-$this->v('frontOverlap'), $p->y(4)+$this->o('lengthBonus'), 'Bottom edge'); // Waist reduction $w8th = $this->v('waistReduction')/8; // Hips reduction if($this->v('hipsReduction') < 0) { // Ease is less than chest // To prevent dart from overlapping, // move excess ease to other seams $h8th = $this->v('hipsReduction')/6; $hDart = 0; } else { // More ease than chest, so divide easy evenly $h8th = $this->v('hipsReduction')/8; $hDart = $h8th; } // Front dart $p->newPoint( 900 , $p->x(5)*0.5,$p->y(3), 'Dart center'); $p->addPoint( 901 , $p->shift(900,0, $w8th/2)); $p->addPoint( 902 , $p->flipX(901,$p->x(900))); $p->addPoint( 903 , $p->shift(901,90,$p->deltaY(5,3)*0.25)); $p->addPoint( 904 , $p->flipX(903,$p->x(900))); $p->addPoint( 905 , $p->shift(901,-90,$p->deltaY(3,4)*0.25)); $p->addPoint( 906 , $p->flipX(905,$p->x(900))); $p->addPoint( 907 , $p->shift(900,90, $p->deltaY(5,3))); $p->addPoint( 908 , $p->shift(900,-90, $p->deltaY(3,4))); $p->addPoint( 909 , $p->shift(908,0, $hDart/2)); $p->addPoint( 910 , $p->flipX(909,$p->x(900))); $p->newPoint( 911 , $p->x(909), $p->y(302)); $p->newPoint( 912 , $p->x(910), $p->y(302)); $p->addPoint( 913 , $p->shift(909,90,25)); $p->addPoint( 914 , $p->shift(910,90,25)); $this->setValue('frontDart', 'L 910 C 914 906 902 C 904 907 907 C 907 903 901 C 905 913 909'); // Side dart $p->newPoint( 2900, $p->x(5), $p->y(900)); $p->newPoint( 2901, $p->x(2900)+$w8th, $p->y(2900)); $p->addPoint( 2902, $p->flipX(2901, $p->x(2900))); $p->addPoint( 2903, $p->shift(2901, 90, $p->deltaY(5, 3)*0.25)); $p->addPoint( 2904, $p->flipX(2903, $p->x(2900))); $p->addPoint( 2905, $p->shift(2901, -90, $p->deltaY(3, 4)*0.25)); $p->addPoint( 2906, $p->flipX(2905, $p->x(2900))); $p->addPoint( 2907, $p->shift(2900, 90, $p->deltaY(5, 3)*0.75)); $p->newPoint( 2908, $p->x(2900)-$h8th/2, $p->y(4)); $p->addPoint( 2909, $p->shift(2908, 0, $h8th/2)); $p->addPoint( 2910, $p->shift(2908, 180, $h8th/2)); $p->newPoint( 2911, $p->x(2909), $p->y(302)); $p->newPoint( 2912, $p->x(2910), $p->y(302)); $p->addPoint( 2913, $p->shift(2909, 90, 35)); $p->addPoint( 2914, $p->shift(2910, 90, 35)); } /** * Drafts the waistcoat front * * @param \Freesewing\Model $model The model to draft for * * @return void */ public function draftFront($model) { $this->clonePoints('waistcoatFrontBlock', 'front'); /** @var \Freesewing\Part $p */ $p = $this->parts['front']; // Hem if($this->o('hemStyle')==1) { // Classic hem $r = $p->deltaX(302,2910)/4; $p->addPoint(4001, $p->shift(302,90,$r/2)); $p->newPoint(4002, $p->x(4001)+$r,$p->y(4001)+$r); $p->addPoint(4003, $p->shift(4002,45,$r/4)); //$p->newPoint(4004, $p->x(1911), $p->y(1911)); $p->newPoint(4005, $p->x(2911), $p->y(2911)); // Extend dart $p->curveCrossesX(4002,4003,911,2912,$p->x(911), 911); $p->curveCrossesX(4002,4003,911,2912,$p->x(912), 912); // Split arc $points = $p->splitCurve(4002,4003,911,2912,9121,'.split'); $p->clonePoint('.split2', 4006); $p->clonePoint('.split3', 4007); $points = $p->splitCurve(4002,4003,911,2912,9111,'.split'); $p->clonePoint('.split6', 4008); $p->clonePoint('.split7', 4009); // Hem line $hemA = " L 4002 C 4006 4007 9121 "; $hemB = " L 9111 C 4009 4008 2912 "; } else { // Rounded hem $r = $this->o('hemRadius'); // Let's not arc into our dart if($r > $p->deltaX(302,910)) $r = $p->deltaX(302,910); $rc = \Freesewing\BezierToolbox::bezierCircle($r); $p->addPoint(4001, $p->shift(302,90,$r)); $p->addPoint(4002, $p->shift(4001,-90,$rc)); $p->addPoint(4004, $p->shift(302,0,$r)); $p->addPoint(4003, $p->shift(4004,180,$rc)); $hemA = "C 4002 4003 4004 L 912 "; $hemB = " L 911 L 2912"; } $hemWithDart = $hemA.$this->v('frontDart').$hemB; $hemWithoutDart = $hemA.$hemB; // Buttons $p->newPoint(5000, $p->x(2),$p->y(300)+10); $p->newPoint(5050, $p->x(2),$p->y(4001)-10); $bc = $this->o('buttons')-1; for($i=1;$i<$bc;$i++) { $p->addPoint(5000+$i,$p->shift(5000,-90,($i)*$p->deltaY(5000,5050)/$bc)); $p->newSnippet("buttonhole$i", 'buttonhole', 5000+$i, ['transform' => 'rotate(90 '.$p->x(5000+$i).' '.$p->y(5000+$i).')']); $p->newSnippet("button$i", 'button', 5000+$i); } $p->newSnippet("buttonholeTop", 'buttonhole', 5000, ['transform' => 'rotate(90 '.$p->x(5000).' '.$p->y(5000).')']); $p->newSnippet("buttonTop", 'button', 5000); $p->newSnippet("buttonholeBottom", 'buttonhole', 5050, ['transform' => 'rotate(90 '.$p->x(5050).' '.$p->y(5050).')']); $p->newSnippet("buttonBottom", 'button', 5050); // Pockets $pw = self::POCKET_WIDTH; $ph = self::POCKET_HEIGHT; $pa = self::POCKET_ANGLE; $p->newPoint(7000, $p->x(900),$p->y(900)+$p->deltaY(900,302)*0.2-$ph/2); // Center dart, top $p->curveCrossesY(901,905,913,909,$p->y(7000), 700); // Creates point 7001, Right dart side, top $p->addPoint(7002, $p->flipX(7001,$p->x(7000))); // Left dart side, top $p->curveCrossesY(901,905,913,909,$p->y(7000)+$ph, '.help'); // Approx. right dart side, bottom $p->addPoint(7003, $p->shiftTowards(7001,'.help1',$ph)); // Exact right dart side, bottom. Taking dart angle into account $p->addPoint(7004, $p->flipX(7003,$p->x(7000))); // Left dart side, bottom $p->addPoint(7005, $p->shift(7001, $p->angle(7001,7003)+90+self::POCKET_ANGLE, $pw/2)); $p->addPoint(7006, $p->shift(7005, $p->angle(7001,7003)+self::POCKET_ANGLE, $ph)); $p->addPoint(7007, $p->shift(7002, $p->angle(7002,7004)+90+self::POCKET_ANGLE, $pw/-2)); $p->addPoint(7008, $p->shift(7007, $p->angle(7002,7004)+self::POCKET_ANGLE, $ph)); // Make Front shoulder 1cm more sloped $p->addPoint('shoulderFront', $p->shiftAlong(12,19,17,10,10)); $p->addPoint('shoulderFrontCp', $p->shift('shoulderFront',$p->angle(8,'shoulderFront')-90,10)); // Front scye dart $p->newPoint(2000, $p->x(5), $p->y(10)); $p->curveCrossesLine(14,15,18,10,907,2000,200); // Creates point 2001 $p->addPoint(2002, $p->shift(2001,$p->angle(907,2000)-90,$this->o('frontScyeDart'))); $angle = $p->angle(907,2000) - $p->angle(907,2002); $this->msg("angle is $angle"); $torotate = array(15,14,16,13,5,2907,2904,2902,2906,2914,2910,2912,911,909,913,905,901,903,7001,7003,7005,7006); if($this->o('hemStyle')==1) { // Classic hem $torotate[] = 4008; $torotate[] = 4009; $torotate[] = 9111; } // Rotate front scye dart into front dart foreach($torotate as $rp) $p->addPoint($rp, $p->rotate($rp,907,$angle)); // Facing/Lining boundary (flb) $p->addPoint('flbTop', $p->shiftTowards(8,'shoulderFront', $p->distance(8,'shoulderFront')/2)); $p->addPoint('flbHelp', $p->rotate(8,'flbTop',90)); $p->addPoint('flbCp', $p->shiftTowards('flbTop', 'flbHelp', $p->distance('flbTop', 'flbHelp') * 2)); $p->addPoint('dartTopCp', $p->shiftTowards(900, 907, $p->distance(900, 907)*1.3)); // Paths $pocket = 'M 7001 L 7005 7006 7003 M 7004 L 7008 7007 7002'; $p->newPath('pocket', $pocket, ['class' => 'help fabric']); $flb = 'M flbTop C flbCp dartTopCp 907'; $p->newPath('flb', $flb, ['class' => 'help lining']); $seamlineA = "M 300 L 4001 "; $seamlineB = " L 2910 C 2914 2906 2902 C 2904 2907 5 C 13 16 14 C 15 18 10 C 17 shoulderFrontCp shoulderFront L 8 C 20 301 300 z"; $seamline = $seamlineA.$hemWithDart.$seamlineB; $p->newPath('seamline', $seamline, ['class' => 'fabric']); $saBase = $seamlineA.$hemWithoutDart.$seamlineB; $p->newPath('saBase', $saBase); // Grid anchor $p->clonePoint(302, 'gridAnchor'); // Mark path for sample service $p->paths['pocket']->setSample(true); $p->paths['seamline']->setSample(true); $p->paths['saBase']->setRender(false); // Store shoulder seam length $this->setValue('frontShoulderSeamLength', $p->distance(8,'shoulderFront')); } /** * Drafts the waistcoat back * * @param \Freesewing\Model $model The model to draft for * * @return void */ public function draftBack($model) { $this->clonePoints('backBlock', 'back'); /** @var \Freesewing\Part $p */ $p = $this->parts['back']; /** @var \Freesewing\Part $wfb */ $wfb = $this->parts['waistcoatFrontBlock']; // Back inset $p->addPoint( 10, $p->shift(10,180,$this->o('backInset'))); $p->addPoint( 17, $p->shift(17,180,$this->o('backInset'))); $p->addPoint( 18, $p->shift(18,180,$this->o('backInset'))); $p->addPoint( 14, $p->shift(14,180,$this->o('backInset')/2)); $p->addPoint( 15, $p->shift(15,180,$this->o('backInset')/2)); $p->addPoint( 16, $p->shift(16,180,$this->o('backInset')/2)); // Neck inset $p->addPoint( 8, $p->shiftTowards(8,12,$this->o('neckInset'))); $p->addPoint( 20, $p->shiftTowards(8,12,20)); $p->addPoint( 20, $p->rotate(20,8,-90)); // Clone dart points from waistcoatFrontBlock $points = array(912,910,914,906,902,904,907,903,901,905,913,909,911,2910,2914,2906,2902,2904,2907); foreach($points as $i) $p->newPoint($i, $wfb->x($i), $wfb->y($i)); // Make back shoulder 1cm more sloped $p->addPoint( 'shoulderBack', $p->shift(12,$p->angle(8,12)-90,10)); // Shoulder inset $p->addPoint( 'shoulderBack', $p->shiftTowards('shoulderBack',8,$this->o('shoulderInset'))); // Center back dart $p->addPoint(1, $p->shift(1,0,$this->o('centerBackDart'))); $p->newPoint('1cp', $p->x(2), $p->y(10)); // Make shoulder seam seam length $p->addPoint('shoulderBack', $p->shiftTowards(8,'shoulderBack',$this->v('frontShoulderSeamLength'))); $p->addPoint( 19, $p->shiftTowards('shoulderBack',8,10)); $p->addPoint( 19, $p->rotate(19,'shoulderBack',90)); // Back scye dart $p->addPoint('.help1', $p->shift(10, $p->angle(907,10)+90, $this->o('backScyeDart')/2)); // Half of the dart $angle = 2*($p->angle(907,'.help1') - $p->angle(907,10)); // This is the dart angle $toRotate = [18,10,19,17,'shoulderBack',8,20,1]; // Points involved in dart rotation foreach($toRotate as $i) $p->addPoint($i, $p->rotate($i, 907, -1*$angle)); // Add lenght bonus $p->newPoint(4000, $p->x(4), $p->y(4)+$this->o('lengthBonus')); $p->newPoint(2911, $p->x(2910), $p->y(4)+$this->o('lengthBonus')); // Paths $partA = 'M 1 C 1 1cp 2 L 3 L 4000 L 912 '; $dart = 'L 910 C 914 906 902 C 904 907 907 C 907 903 901 C 905 913 909 '; $partB = 'L 911 L 2911 L 2910 C 2914 2906 2902 C 2904 2907 5 C 13 16 14 C 15 18 10 C 17 19 shoulderBack L 8 C 20 1 1 z'; $withDart = $partA.$dart.$partB; $withoutDart = $partA.$partB; $p->newPath('seamline', $withDart, ['class' => 'fabric']); $p->newPath('saBase', $withoutDart); $p->paths['saBase']->setRender(false); // Grid anchor $p->clonePoint(4, 'gridAnchor'); // Mark path for sample service $p->paths['seamline']->setSample(true); } /** * Drafts the waistcoat front facing * * @param \Freesewing\Model $model The model to draft for * * @return void */ public function draftFrontFacing($model) { $this->clonePoints('front', 'frontFacing'); /** @var \Freesewing\Part $p */ $p = $this->parts['frontFacing']; // Paths $seamline = "M 300 L 4001 "; // Classic hem or rounded? if($this->o('hemStyle')==1) $seamline .= " L 4002 C 4006 4007 9121 "; // Classic else $seamline .= ' C 4002 4003 4004 L 912 '; // Rounded $seamline .= " L 910 C 914 906 902 C 904 907 907 C 907 flbCp flbTop L 8 C 20 301 300 z"; $p->newPath('seamline', $seamline, ['class' => 'fabric']); } /** * Drafts the waistcoat front lining * * @param \Freesewing\Model $model The model to draft for * * @return void */ public function draftFrontLining($model) { $this->clonePoints('front', 'frontLining'); /** @var \Freesewing\Part $p */ $p = $this->parts['frontLining']; // Paths $seamline = "M flbTop L shoulderFront C shoulderFrontCp 17 10 C 18 15 14 C 16 13 5 C 2907 2904 2902 C 2906 2914 2910 L 2912 "; // Classic hem or rounded? if($this->o('hemStyle')==1) $seamline .= " C 4008 4009 9111 "; // Classic else $seamline .= ' L 911 '; // Rounded $seamline .= " L 909 C 913 905 901 C 903 907 907 C 907 flbCp flbTop z"; $p->newPath('seamline', $seamline, ['class' => 'lining']); } /** * Drafts the waistcoat pocket welt * * @param \Freesewing\Model $model The model to draft for * * @return void */ public function draftPocketWelt($model) { /** @var \Freesewing\Part $p */ $p = $this->parts['pocketWelt']; $p->newPoint( 1, self::POCKET_WIDTH/2, 0); $p->newPoint( 2, $p->x(1)+20, $p->y(1)-10); $p->newPoint( 3, $p->x(2), $p->y(1)+self::POCKET_HEIGHT*4); $mirror = [1,2,3]; foreach($mirror as $i) $p->addPoint($i*-1, $p->flipX($i,0)); $p->newPath('pocketLine', 'M -1 L 1', ['class' => 'help fabric']); $p->newPath('outline', 'M -2 L 2 L 3 L -3 z', ['class' => 'fabric']); } /** * Drafts the waistcoat pocket facing * * @param \Freesewing\Model $model The model to draft for * * @return void */ public function draftPocketFacing($model) { $this->clonePoints('pocketWelt', 'pocketFacing'); /** @var \Freesewing\Part $p */ $p = $this->parts['pocketFacing']; $cplen = \Freesewing\BezierToolbox::bezierCircle(20); $p->addPoint( 3, $p->shift(3,-90,+10+self::POCKET_HEIGHT*2)); $p->addPoint( 4, $p->shift(3,-90,$cplen)); $p->addPoint( 5, $p->shift(3,-90,20)); $p->addPoint( 6, $p->shift(5,180,$cplen)); $p->addPoint( 7, $p->shift(5,180,20)); $mirror = [1,2,3,4,6,7]; foreach($mirror as $i) $p->addPoint($i*-1, $p->flipX($i,0)); $p->newPath('pocketLine', 'M -1 L 1', ['class' => 'help fabric']); $p->newPath('outline', 'M -2 L 2 L 3 C 4 6 7 L -7 C -6 -4 -3 z', ['class' => 'fabric']); } /** * Drafts the waistcoat pocket bag * * @param \Freesewing\Model $model The model to draft for * * @return void */ public function draftPocketBag($model) { $this->clonePoints('pocketFacing', 'pocketBag'); /** @var \Freesewing\Part $p */ $p = $this->parts['pocketBag']; $p->addPoint( 2, $p->shift(2,-90,self::POCKET_HEIGHT*2)); $mirror = [1,2,3,4,6,7]; foreach($mirror as $i) $p->addPoint($i*-1, $p->flipX($i,0)); $p->newPath('outline', 'M -2 L 2 L 3 C 4 6 7 L -7 C -6 -4 -3 z', ['class' => 'lining']); } /** * Drafts the waistcoat pocket interfacing * * @param \Freesewing\Model $model The model to draft for * * @return void */ public function draftPocketInterfacing($model) { $this->clonePoints('pocketWelt', 'pocketInterfacing'); /** @var \Freesewing\Part $p */ $p = $this->parts['pocketInterfacing']; $p->addPoint( 3, $p->shift(3,90,self::POCKET_HEIGHT)); $mirror = [1,2,3]; foreach($mirror as $i) $p->addPoint($i*-1, $p->flipX($i,0)); $p->newPath('pocketLine', 'M -1 L 1', ['class' => 'help interfacing']); $p->newPath('outline', 'M -2 L 2 L 3 L -3 z', ['class' => 'interfacing']); } /* _____ _ _ _ | ___(_)_ __ __ _| (_)_______ | |_ | | '_ \ / _` | | |_ / _ \ | _| | | | | | (_| | | |/ / __/ |_| |_|_| |_|\__,_|_|_/___\___| Adding titles/logos/seam-allowance/grainline and so on */ /** * Finalizes the front * * @param \Freesewing\Model $model The model to draft for * * @return void */ public function finalizeFront($model) { /** @var \Freesewing\Part $p */ $p = $this->parts['front']; // Seam allowance if($this->o('sa')) $p->offsetPath('sa', 'saBase', $this->o('sa')*-1, 1, ['class' => 'sa fabric']); // Title $p->newPoint('titleAnchor', $p->x(8), $p->y(5000)); $p->addTitle('titleAnchor', 1, $this->t($p->title), '2x '.$this->t('from main fabric')."\n".$this->t('With good sides together')."\n".'2x '.$this->t('from interfacing')."\n".$this->t('With good sides together')); // Logo $p->newPoint('logoAnchor', $p->x(907)+ 30, $p->y(907)); $p->newSnippet('logo','logo-sm','logoAnchor'); // Grainline $p->addPoint('grainlineTop', $p->shift(8,-45,10)); $p->newPoint('grainlineBottom', $p->x('grainlineTop'), $p->y(4001)); $p->newGrainline('grainlineBottom', 'grainlineTop', $this->t('Grainline')); } /** * Finalizes the back * * @param \Freesewing\Model $model The model to draft for * * @return void */ public function finalizeBack($model) { /** @var \Freesewing\Part $p */ $p = $this->parts['back']; // Seam allowance if($this->o('sa')) $p->offsetPath('sa', 'saBase', $this->o('sa')*-1, 1, ['class' => 'sa fabric']); // Title $p->newPoint('titleAnchor', $p->x(2)+$p->deltaX(2,907)/2, $p->y(5)); $p->addTitle('titleAnchor', 2, $this->t($p->title), '2x '.$this->t('from main fabric')."\n".'2x '.$this->t('from lining')."\n".$this->t('With good sides together')); // Logo $p->newPoint('logoAnchor', $p->x(10)/2, $p->y(10)); $p->newSnippet('logo', 'logo', 'logoAnchor'); // Scalebox $p->addPoint('scaleboxAnchor', $p->shift('logoAnchor', -90, 40)); $p->newSnippet('scalebox', 'scalebox', 'scaleboxAnchor'); // Grainline $p->addPoint('grainlineTop', $p->shift(1,-45,10)); $p->newPoint('grainlineBottom', $p->x('grainlineTop'), $p->y(4)-10); $p->newGrainline('grainlineBottom', 'grainlineTop', $this->t('Grainline')); } /** * Finalizes the front facing * * @param \Freesewing\Model $model The model to draft for * * @return void */ public function finalizeFrontFacing($model) { /** @var \Freesewing\Part $p */ $p = $this->parts['frontFacing']; // Seam allowance if($this->o('sa')) $p->offsetPath('sa', 'seamline', $this->o('sa')*-1, 1, ['class' => 'sa fabric']); // Title $p->newPoint('titleAnchor', $p->x(300)+$p->deltaX(300,'flbTop')/2, $p->y(5000)); $p->addTitle('titleAnchor', 3, $this->t($p->title), '2x '.$this->t('from main fabric')."\n".$this->t('With good sides together')); // Logo $p->newPoint('logoAnchor', $p->x(907)- 70, $p->y(907)); $p->newSnippet('logo','logo-sm','logoAnchor'); // Grainline $p->addPoint('grainlineTop', $p->shift(8,-45,10)); $p->newPoint('grainlineBottom', $p->x('grainlineTop'), $p->y(4001)); $p->newGrainline('grainlineBottom', 'grainlineTop', $this->t('Grainline')); } /** * Finalizes the front lining * * @param \Freesewing\Model $model The model to draft for * * @return void */ public function finalizeFrontLining($model) { /** @var \Freesewing\Part $p */ $p = $this->parts['frontLining']; // Seam allowance if($this->o('sa')) $p->offsetPath('sa', 'seamline', $this->o('sa'), 1, ['class' => 'sa lining']); // Title $p->newPoint('titleAnchor', $p->x(907)+$p->deltaX(907,5)/2, $p->y(2907)); $p->addTitle('titleAnchor', 4, $this->t($p->title), '2x '.$this->t('from lining')."\n".$this->t('With good sides together')); // Logo $p->newPoint('logoAnchor', $p->x(907)+ 30, $p->y(907) -20); $p->newSnippet('logo','logo-sm','logoAnchor'); // Grainline $p->addPoint('grainlineBottom', $p->shift(909,45,10)); $p->newPoint('grainlineTop', $p->x('grainlineBottom'), $p->y('shoulderFront')); $p->newGrainline('grainlineBottom', 'grainlineTop', $this->t('Grainline')); } /** * Finalizes the pocket welt * * @param \Freesewing\Model $model The model to draft for * * @return void */ public function finalizePocketWelt($model) { /** @var \Freesewing\Part $p */ $p = $this->parts['pocketWelt']; // Title $p->newPoint('titleAnchor', -30, $p->y(3)/2); $p->addTitle('titleAnchor', 5, $this->t($p->title), '2x '.$this->t('from main fabric'), ['scale' => 50, 'align'=>'left']); // Grainline $p->addPoint('grainlineBottom', $p->shift(3,135,5)); $p->addPoint('.help1', $p->shift(2,-135,5)); $p->addPoint('grainlineTop', $p->rotate('.help1','grainlineBottom',self::POCKET_ANGLE)); $p->newGrainline('grainlineBottom', 'grainlineTop', $this->t('Grainline')); // Notches $p->newSnippet('notchRight', 'notch', 1); $p->newSnippet('notchLeft', 'notch', -1); // No seam allowance note $p->newPoint('noSaAnchor', $p->x(-3),$p->y(-1)); $p->newNote(1, 'noSaAnchor', $this->t("No\nseam\nallowance"), 4, 10, 0, ['line-height' => 4, 'class' => 'text']); } /** * Finalizes the pocket interfacing * * @param \Freesewing\Model $model The model to draft for * * @return void */ public function finalizePocketInterfacing($model) { /** @var \Freesewing\Part $p */ $p = $this->parts['pocketInterfacing']; // Title $p->newPoint('titleAnchor', -30, $p->y(3)/2+5); $p->addTitle('titleAnchor', 6, $this->t($p->title), '2x '.$this->t('from interfacing'), ['scale' => 50, 'align'=>'left']); // Notches $p->newSnippet('notchRight', 'notch', 1); $p->newSnippet('notchLeft', 'notch', -1); // No seam allowance note $p->newPoint('noSaAnchor', $p->x(-3),$p->y(-1)-3); $p->newNote(1, 'noSaAnchor', $this->t("No\nseam\nallowance"), 4, 10, 0, ['line-height' => 4, 'class' => 'text']); } /** * Finalizes the pocket facing * * @param \Freesewing\Model $model The model to draft for * * @return void */ public function finalizePocketFacing($model) { /** @var \Freesewing\Part $p */ $p = $this->parts['pocketFacing']; // Title $p->newPoint('titleAnchor', -30, $p->y(3)/2+5); $p->addTitle('titleAnchor', 7, $this->t($p->title), '2x '.$this->t('from main fabric'), ['scale' => 50, 'align'=>'left']); // Grainline $p->addPoint('grainlineBottom', $p->shift(3,135,5)); $p->addPoint('.help1', $p->shift(2,-135,5)); $p->addPoint('grainlineTop', $p->rotate('.help1','grainlineBottom',self::POCKET_ANGLE)); $p->newGrainline('grainlineBottom', 'grainlineTop', $this->t('Grainline')); // Notches $p->newSnippet('notchRight', 'notch', 1); $p->newSnippet('notchLeft', 'notch', -1); // No seam allowance note $p->newPoint('noSaAnchor', $p->x(-3),$p->y(-1)+10); $p->newNote(1, 'noSaAnchor', $this->t("No\nseam\nallowance"), 4, 10, 0, ['line-height' => 4, 'class' => 'text']); } /** * Finalizes the pocket bag * * @param \Freesewing\Model $model The model to draft for * * @return void */ public function finalizePocketBag($model) { /** @var \Freesewing\Part $p */ $p = $this->parts['pocketBag']; // Title $p->newPoint('titleAnchor', -30, $p->y(3)/2+5); $p->addTitle('titleAnchor', 8, $this->t($p->title), '2x '.$this->t('from lining'), ['scale' => 50, 'align'=>'left']); // No seam allowance note $p->newPoint('noSaAnchor', $p->x(-3),$p->y(-1)+60); $p->newNote(1, 'noSaAnchor', $this->t("No\nseam\nallowance"), 4, 10, 0, ['line-height' => 4, 'class' => 'text']); } /* ____ _ | _ \ __ _ _ __ ___ _ __| | ___ ___ ___ | |_) / _` | '_ \ / _ \ '__| |/ _ \/ __/ __| | __/ (_| | |_) | __/ | | | __/\__ \__ \ |_| \__,_| .__/ \___|_| |_|\___||___/___/ |_| Instructions for paperless patterns */ /** * Adds paperless info for front * * @param \Freesewing\Model $model The model to draft for * * @return void */ public function paperlessFront($model) { /** @var \Freesewing\Part $p */ $p = $this->parts['front']; // Vertical measures on the left if($this->o('hemStyle') == 1) { // Classic hem $bottom = 4002; // Add point bottom left, and bottom at buttons $p->newPoint('bottomLeft', $p->x(4001), $p->y(4002)); $p->newPoint('bottomButtons', $p->x(5050), $p->y(4002)); // Measure help lines bottom origin (mhlBo) $mhlBo = 4002; } else { // Rounded hem $bottom = 4004; $p->newPoint('bottomLeft', $p->x(4001), $p->y(4004)); $p->newPoint('bottomButtons', $p->x(5050), $p->y(4004)); // Measure help lines bottom origin (mhlBo) $mhlBo = 4004; } $xBase = $p->x(300); $p->newHeightDimension($bottom, 4001, $xBase-20); // Height to tip $p->newHeightDimension($bottom, 5050, $xBase-35); // Height to first button // Button spacing for($i=1;$i<$this->o('buttons')-1;$i++) { $p->newHeightDimension((5000+$i), (4999+$i), $xBase-35); // Height to next button } $p->newHeightDimension(5050, (4999+$i), $xBase-35); // Height from bottom button $p->newHeightDimension($bottom, 300, $xBase-50); // Height to neck bottom of neck opening $p->newHeightDimension($bottom, 8, $xBase-65); // Total height // Horizontal measures at the bottom if($this->o('hemStyle') == 1) { // Classic hem $dartLeft = 9121; $dartRight = 9111; } else { // Rounded hem $dartLeft = 912; $dartRight = 911; } $yBase = $p->y($mhlBo); $p->newWidthDimension(4001, $mhlBo, $yBase+25); // Width of the tip $p->newWidthDimension(4001, $dartLeft, $yBase+40); // Width to dart left side $p->newWidthDimension(4001, $dartRight, $yBase+55); // Width to dart right side $p->newWidthDimension(4001, 2912, $yBase+70); // Width to right edge // Horizontal measures at the top $yBase = $p->y(8); $p->newWidthDimension(300, 8, $yBase-25); // Width of neck opening $p->newWidthDimension(300, 'shoulderFront', $yBase-40); // Width of neck opening $p->newWidthDimension(300, 5, $yBase-55); // Width to armhole $p->newLinearDimension(8, 'flbTop', -15); // Shoulder seam to flb $p->newLinearDimension('flbTop', 'shoulderFront', -15); // Flb to shoulder edge $p->newLinearDimension(8, 'shoulderFront', -30); // Shoulder seam length // Pocket $p->newLinearDimension(7001, 7005, self::POCKET_HEIGHT/2); // Half pocket width $p->newLinearDimension(7007, 7002, self::POCKET_HEIGHT/2); // Half pocket width $p->newLinearDimension(7006, 7005, 15, $p->unit(self::POCKET_HEIGHT), ['class' => 'dimension dimension-sm'] ); // Pocket height $p->newHeightDimension($dartLeft, 7002, $p->x($dartLeft)+15); $p->newNote('pocketAngle', 7007, $this->t("Pocket is placed under angle").': '.self::POCKET_ANGLE.'&#176;', 10, 20, 0, ['line-height' => 4, 'class' => 'text']); $p->newNote('pocket', 7005, $this->t("Draw this half of the pocket\nafter you have closed the dart"), 12, 20, 0, ['line-height' => 5, 'class' => 'text','dy' => -2]); // Vertical measures at the right $p->newHeightDimension($bottom, $dartLeft, $p->x($dartLeft)+15); $p->newHeightDimension($bottom, $dartRight, $p->x($dartRight)+15); $xBase = $p->x(2912); $p->newHeightDimension($bottom, 2912, $xBase+25); $p->newHeightDimension($bottom, 907, $xBase+40); $p->newHeightDimension($bottom, 5, $xBase+55); $p->newHeightDimension($bottom, 'shoulderFront', $xBase+70); // Some extra dimensions $p->newLinearDimension(901,2902); // Width of right part $p->addPoint('3edge', $p->shift(3,180,10)); $p->newWidthDimension('3edge', 902); // Width of left part $p->newLinearDimension(902, 901); // Widht of dart $p->newPoint('907edge', $p->x(300), $p->y(907)); $p->newWidthDimension('907edge', 907); // Dart tip $p->newWidthDimension(4001,5050,$p->y(4001)+35, $p->unit(10) ,['class' => 'dimension dimension-sm']); // Button offset from edge $p->newWidthDimension(10,5); // Deph of armhole $p->newCurvedDimension('M 2912 L 2910 C 2914 2906 2902 C 2904 2907 5', -25); // Side curve } /** * Adds paperless info for back * * @param \Freesewing\Model $model The model to draft for * * @return void */ public function paperlessBack($model) { /** @var \Freesewing\Part $p */ $p = $this->parts['back']; // Vertical dimensions on the left $xBase = $p->x(4); $p->newHeightDimension(4000,2,$xBase-25); // Height to start of back curve $p->newHeightDimension(4000,1,$xBase-40); // Height to center back $p->newHeightDimension(4000,8,$xBase-55); // Total height // Dart $p->newHeightDimension(912,902,$p->x(912)-15); // Height to middle of dart $p->newHeightDimension(912,907,$p->x(912)-30); // Total dart height $p->newWidthDimension(902,901, false, false, ['class' => 'dimension dimension-sm']); // Dart width at middle // Horizontal dimensions bottom $yBase = $p->y(4000); $p->newWidthDimension(4000,910,$yBase+25); // Width to dart left side $p->newWidthDimension(4000,909,$yBase+40); // Width to dart right side $p->newWidthDimension(4000,2902,$yBase+55); // Waist width $p->newWidthDimension(4000,2910,$yBase+70); // Total hips width $p->newWidthDimension(4000,5,$yBase+85); // Total width // Vertical dimensions on the left $xBase = $p->x(5); $p->newCurvedDimension('M 2911 L 2910 C 2914 2906 2902 C 2904 2907 5', -25); // Side curve $p->newHeightDimension(2911,5,$xBase+40); // Height to armhole $p->newHeightDimension(2911,'shoulderBack',$xBase+55); // Height to shoulder point // Horizontal dimensions top $yBase = $p->y(8); $p->newWidthDimension(2,1,$yBase-25, false, ['class' => 'dimension dimension-sm']); // Width of center back curve $p->newWidthDimension(2,8,$yBase-40); // Width of neck opening $p->newWidthDimension(2,'shoulderBack',$yBase-55); // Width to shoulder // Shoulder seam $p->newLinearDimension(8,'shoulderBack', 15); } /** * Adds paperless info for front facing * * @param \Freesewing\Model $model The model to draft for * * @return void */ public function paperlessFrontFacing($model) { /** @var \Freesewing\Part $p */ $p = $this->parts['frontFacing']; $front = $this->parts['front']; $p->newPoint('textAnchor', $p->x('titleAnchor'), $p->y(2902)); $p->newText('text1', 'textAnchor', $this->t("For dimensions,\nsee:").' '.$front->title, ['line-height' => 10, 'class' => 'note text-center text-xl']); } /** * Adds paperless info for front lining * * @param \Freesewing\Model $model The model to draft for * * @return void */ public function paperlessFrontLining($model) { /** @var \Freesewing\Part $p */ $p = $this->parts['frontLining']; $front = $this->parts['front']; $p->newPoint('textAnchor', $p->x('titleAnchor'), $p->y(2902)); $p->newText('text1', 'textAnchor', $this->t("For dimensions,\nsee:").' '.$front->title, ['line-height' => 10, 'class' => 'note text-center text-xl']); } /** * Adds paperless info for pocket welt * * @param \Freesewing\Model $model The model to draft for * * @return void */ public function paperlessPocketWelt($model) { /** @var \Freesewing\Part $p */ $p = $this->parts['pocketWelt']; $p->newWidthDimension(-1,1, -20); // Welt line width $p->newWidthDimension(-2,2, -35); // Total width $xBase = $p->x(-2); $p->newHeightDimension(-3,-1, $xBase-10); // Height to welt line $p->newHeightDimension(-3,-2, $xBase-25); // Total height $p->addPoint('textAnchor', $p->shift('titleAnchor',-90,15)); $p->newText('note2', 'textAnchor', $this->t('Grainline under the same angle as the pocket:').' '.self::POCKET_ANGLE.'&#176;', ['line-height' => 10, 'class' => 'note text-center text']); } /** * Adds paperless info for pocket interfacing * * @param \Freesewing\Model $model The model to draft for * * @return void */ public function paperlessPocketInterfacing($model) { /** @var \Freesewing\Part $p */ $p = $this->parts['pocketInterfacing']; $p->newWidthDimension(-1,1, -20); // Welt line width $p->newWidthDimension(-2,2, -35); // Total width $xBase = $p->x(-2); $p->newHeightDimension(-3,-1, $xBase-10); // Height to welt line $p->newHeightDimension(-3,-2, $xBase-25); // Total height } /** * Adds paperless info for pocket facing * * @param \Freesewing\Model $model The model to draft for * * @return void */ public function paperlessPocketFacing($model) { /** @var \Freesewing\Part $p */ $p = $this->parts['pocketFacing']; $p->newWidthDimension(-1,1, -20); // Welt line width $p->newWidthDimension(-2,2, -35); // Total width $xBase = $p->x(-2); $p->newHeightDimension(-7,-1, $xBase-10); // Height to welt line $p->newHeightDimension(-7,-2, $xBase-25); // Total height $p->addPoint('textAnchor', $p->shift('titleAnchor',-90,15)); $p->newText('note2', 'textAnchor', $this->t('Grainline under the same angle as the pocket:').' '.self::POCKET_ANGLE.'&#176;', ['line-height' => 10, 'class' => 'note text-center text']); $p->addPoint('radiusAnchor', $p->shiftAlong(-3,-4,-6,-7,11)); $p->newNote(2, 'radiusAnchor', $this->t("Radius").': '.$p->unit($p->deltaX(-3,-7)), 2, 20, 0, ['line-height' => 4, 'class' => 'text']); } /** * Adds paperless info for the pocket bag * * @param \Freesewing\Model $model The model to draft for * * @return void */ public function paperlessPocketBag($model) { /** @var \Freesewing\Part $p */ $p = $this->parts['pocketBag']; $p->newWidthDimension(-2,2, $p->y(-2)-10); // Total width $xBase = $p->x(-2); $p->newHeightDimension(-7,-2, $xBase-10); // Total height $p->addPoint('radiusAnchor', $p->shiftAlong(-3,-4,-6,-7,11)); $p->newNote(2, 'radiusAnchor', $this->t("Radius").': '.$p->unit($p->deltaX(-3,-7)), 2, 20, 0, ['line-height' => 4, 'class' => 'text']); } }
freesewing/core
patterns/Core/WahidWaistcoat/WahidWaistcoat.php
PHP
gpl-3.0
46,039
# pylint: disable = too-many-lines, invalid-name, line-too-long, too-many-instance-attributes, # pylint: disable = too-many-branches,too-many-locals, too-many-nested-blocks from __future__ import (absolute_import, division, print_function) try: from mantidplot import * except ImportError: canMantidPlot = False # import csv import os import re from operator import itemgetter import itertools from PyQt4 import QtCore, QtGui from mantid.simpleapi import * from isis_reflectometry.quick import * from isis_reflectometry.convert_to_wavelength import ConvertToWavelength from isis_reflectometry import load_live_runs from isis_reflectometry.combineMulti import * import mantidqtpython from mantid.api import Workspace, WorkspaceGroup, CatalogManager, AlgorithmManager from mantid import UsageService from ui.reflectometer.ui_refl_window import Ui_windowRefl from ui.reflectometer.refl_save import Ui_SaveWindow from ui.reflectometer.refl_choose_col import ReflChoose from ui.reflectometer.refl_options import ReflOptions try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: def _fromUtf8(s): return s canMantidPlot = True class ReflGui(QtGui.QMainWindow, Ui_windowRefl): current_instrument = None current_table = None current_polarisation_method = None labelStatus = None accMethod = None def __init__(self): """ Initialise the interface """ super(QtGui.QMainWindow, self).__init__() self.setupUi(self) self.loading = False self.clip = QtGui.QApplication.clipboard() self.shown_cols = {} self.mod_flag = False self.run_cols = [0, 5, 10] self.angle_cols = [1, 6, 11] self.scale_col = 16 self.stitch_col = 17 self.plot_col = 18 self.__graphs = dict() self._last_trans = "" self.icat_file_map = None self.__instrumentRuns = None self.__icat_download = False self.__group_tof_workspaces = True # Q Settings self.__generic_settings = "Mantid/ISISReflGui" self.__live_data_settings = "Mantid/ISISReflGui/LiveData" self.__search_settings = "Mantid/ISISReflGui/Search" self.__column_settings = "Mantid/ISISReflGui/Columns" self.__icat_download_key = "icat_download" self.__ads_use_key = "AlgUse" self.__alg_migration_key = "AlgUseReset" self.__live_data_frequency_key = "frequency" self.__live_data_method_key = "method" self.__group_tof_workspaces_key = "group_tof_workspaces" self.__stitch_right_key = "stitch_right" # Setup instrument with defaults assigned. self.instrument_list = ['INTER', 'SURF', 'CRISP', 'POLREF', 'OFFSPEC'] self.polarisation_instruments = ['CRISP', 'POLREF'] self.polarisation_options = {'None': PolarisationCorrection.NONE, '1-PNR': PolarisationCorrection.PNR, '2-PA': PolarisationCorrection.PA} # Set the live data settings, use default if none have been set before settings = QtCore.QSettings() settings.beginGroup(self.__live_data_settings) self.live_method = settings.value(self.__live_data_method_key, "", type=str) self.live_freq = settings.value(self.__live_data_frequency_key, 0, type=float) if not self.live_freq: logger.information( "No settings were found for Update frequency of loading live data, Loading default of 60 seconds") self.live_freq = float(60) settings.setValue(self.__live_data_frequency_key, self.live_freq) if not self.live_method: logger.information( "No settings were found for Accumulation Method of loading live data, Loading default of \"Add\"") self.live_method = "Add" settings.setValue(self.__live_data_method_key, self.live_method) settings.endGroup() settings.beginGroup(self.__generic_settings) self.__alg_migrate = settings.value(self.__alg_migration_key, True, type=bool) if self.__alg_migrate: self.__alg_use = True # We will use the algorithms by default rather than the quick scripts self.__alg_migrate = False # Never do this again. We only want to reset once. else: self.__alg_use = settings.value(self.__ads_use_key, True, type=bool) self.__icat_download = settings.value(self.__icat_download_key, False, type=bool) self.__group_tof_workspaces = settings.value(self.__group_tof_workspaces_key, True, type=bool) self.__scale_right = settings.value(self.__stitch_right_key, True, type=bool) settings.setValue(self.__ads_use_key, self.__alg_use) settings.setValue(self.__icat_download_key, self.__icat_download) settings.setValue(self.__group_tof_workspaces_key, self.__group_tof_workspaces) settings.setValue(self.__alg_migration_key, self.__alg_migrate) settings.setValue(self.__stitch_right_key, self.__scale_right) settings.endGroup() del settings # register startup UsageService.registerFeatureUsage("Interface", "ISIS Reflectomety", False) def __del__(self): """ Save the contents of the table if the modified flag was still set """ if self.mod_flag: self._save(true) def _save_check(self): """ Show a custom message box asking if the user wants to save, or discard their changes or cancel back to the interface """ msgBox = QtGui.QMessageBox() msgBox.setText("The table has been modified. Do you want to save your changes?") accept_btn = QtGui.QPushButton('Save') cancel_btn = QtGui.QPushButton('Cancel') discard_btn = QtGui.QPushButton('Discard') msgBox.addButton(accept_btn, QtGui.QMessageBox.AcceptRole) msgBox.addButton(cancel_btn, QtGui.QMessageBox.RejectRole) msgBox.addButton(discard_btn, QtGui.QMessageBox.NoRole) msgBox.setIcon(QtGui.QMessageBox.Question) msgBox.setDefaultButton(accept_btn) msgBox.setEscapeButton(cancel_btn) msgBox.exec_() btn = msgBox.clickedButton() saved = None if btn.text() == accept_btn.text(): ret = QtGui.QMessageBox.AcceptRole saved = self._save() elif btn.text() == cancel_btn.text(): ret = QtGui.QMessageBox.RejectRole else: ret = QtGui.QMessageBox.NoRole return ret, saved def closeEvent(self, event): """ Close the window. but check if the user wants to save """ self.buttonProcess.setFocus() if self.mod_flag: event.ignore() ret, saved = self._save_check() if ret == QtGui.QMessageBox.AcceptRole: if saved: self.mod_flag = False event.accept() elif ret == QtGui.QMessageBox.RejectRole: event.ignore() elif ret == QtGui.QMessageBox.NoRole: self.mod_flag = False event.accept() def _instrument_selected(self, instrument): """ Change the default instrument to the selected one """ config['default.instrument'] = self.instrument_list[instrument] logger.notice("Instrument is now: " + str(config['default.instrument'])) self.textRB.clear() self._populate_runs_list() self.current_instrument = self.instrument_list[instrument] self.comboPolarCorrect.setEnabled( self.current_instrument in self.polarisation_instruments) # Enable as appropriate self.comboPolarCorrect.setCurrentIndex(self.comboPolarCorrect.findText('None')) # Reset to None def _table_modified(self, row, column): """ sets the modified flag when the table is altered """ # Sometimes users enter leading or trailing whitespace into a cell. # Let's remove it for them automatically. item = self.tableMain.item(row, column) item.setData(0, str.strip(str(item.data(0)))) if not self.loading: self.mod_flag = True plotbutton = self.tableMain.cellWidget(row, self.plot_col).children()[1] self.__reset_plot_button(plotbutton) def _plot_row(self): """ handler for the plot buttons """ plotbutton = self.sender() self._plot(plotbutton) def _show_slit_calculator(self): calc = mantidqtpython.MantidQt.MantidWidgets.SlitCalculator(self) calc.setCurrentInstrumentName(self.current_instrument) calc.processInstrumentHasBeenChanged() calc.exec_() def _polar_corr_selected(self): """ Event handler for polarisation correction selection. """ if self.current_instrument in self.polarisation_instruments: chosen_method = self.comboPolarCorrect.currentText() self.current_polarisation_method = self.polarisation_options[chosen_method] else: logger.notice("Polarisation correction is not supported on " + str(self.current_instrument)) def setup_layout(self): """ Do further setup layout that couldn't be done in the designer """ self.comboInstrument.addItems(self.instrument_list) current_instrument = config['default.instrument'].upper() if current_instrument in self.instrument_list: self.comboInstrument.setCurrentIndex(self.instrument_list.index(current_instrument)) else: self.comboInstrument.setCurrentIndex(0) config['default.instrument'] = 'INTER' self.current_instrument = config['default.instrument'].upper() # Setup polarisation options with default assigned self.comboPolarCorrect.clear() self.comboPolarCorrect.addItems(list(self.polarisation_options.keys())) self.comboPolarCorrect.setCurrentIndex(self.comboPolarCorrect.findText('None')) self.current_polarisation_method = self.polarisation_options['None'] self.comboPolarCorrect.setEnabled(self.current_instrument in self.polarisation_instruments) self.splitterList.setSizes([200, 800]) self.labelStatus = QtGui.QLabel("Ready") self.statusMain.addWidget(self.labelStatus) self._initialise_table() self._populate_runs_list() self._connect_slots() return True def _reset_table(self): """ Reset the plot buttons and stitch checkboxes back to thier defualt state """ # switches from current to true, to false to make sure stateChanged fires self.checkTickAll.setCheckState(2) self.checkTickAll.setCheckState(0) for row in range(self.tableMain.rowCount()): plotbutton = self.tableMain.cellWidget(row, self.plot_col).children()[1] self.__reset_plot_button(plotbutton) def __reset_plot_button(self, plotbutton): """ Reset the provided plot button to ti's default state: disabled and with no cache """ plotbutton.setDisabled(True) plotbutton.setProperty('runno', None) plotbutton.setProperty('overlapLow', None) plotbutton.setProperty('overlapHigh', None) plotbutton.setProperty('wksp', None) def _initialise_table(self): """ Initialise the table. Clearing all data and adding the checkboxes and plot buttons """ # first check if the table has been changed before clearing it if self.mod_flag: ret, _saved = self._save_check() if ret == QtGui.QMessageBox.RejectRole: return self.current_table = None settings = QtCore.QSettings() settings.beginGroup(self.__column_settings) for column in range(self.tableMain.columnCount()): for row in range(self.tableMain.rowCount()): if column in self.run_cols: item = QtGui.QTableWidgetItem() item.setText('') item.setToolTip('Runs can be colon delimited to coadd them') self.tableMain.setItem(row, column, item) elif column in self.angle_cols: item = QtGui.QTableWidgetItem() item.setText('') item.setToolTip('Angles are in degrees') self.tableMain.setItem(row, column, item) elif column == self.stitch_col: check = QtGui.QCheckBox() check.setCheckState(False) check.setToolTip('If checked, the runs in this row will be stitched together') item = QtGui.QWidget() layout = QtGui.QHBoxLayout(item) layout.addWidget(check) layout.setAlignment(QtCore.Qt.AlignCenter) layout.setSpacing(0) layout.setContentsMargins(0, 0, 0, 0) item.setLayout(layout) item.setContentsMargins(0, 0, 0, 0) self.tableMain.setCellWidget(row, self.stitch_col, item) elif column == self.plot_col: button = QtGui.QPushButton('Plot') button.setProperty("row", row) self.__reset_plot_button(button) button.setToolTip('Plot the workspaces produced by processing this row.') button.clicked.connect(self._plot_row) item = QtGui.QWidget() layout = QtGui.QHBoxLayout(item) layout.addWidget(button) layout.setAlignment(QtCore.Qt.AlignCenter) layout.setSpacing(0) layout.setContentsMargins(0, 0, 0, 0) item.setLayout(layout) item.setContentsMargins(0, 0, 0, 0) self.tableMain.setCellWidget(row, self.plot_col, item) else: item = QtGui.QTableWidgetItem() item.setText('') self.tableMain.setItem(row, column, item) vis_state = settings.value(str(column), True, type=bool) self.shown_cols[column] = vis_state if vis_state: self.tableMain.showColumn(column) else: self.tableMain.hideColumn(column) settings.endGroup() del settings self.tableMain.resizeColumnsToContents() self.mod_flag = False def _connect_slots(self): """ Connect the signals to the corresponding methods """ self.checkTickAll.stateChanged.connect(self._set_all_stitch) self.comboInstrument.activated[int].connect(self._instrument_selected) self.comboPolarCorrect.activated.connect(self._polar_corr_selected) self.textRB.returnPressed.connect(self._populate_runs_list) self.buttonAuto.clicked.connect(self._autofill) self.buttonSearch.clicked.connect(self._populate_runs_list) self.buttonClear.clicked.connect(self._initialise_table) self.buttonProcess.clicked.connect(self._process) self.buttonTransfer.clicked.connect(self._transfer) self.buttonColumns.clicked.connect(self._choose_columns) self.actionOpen_Table.triggered.connect(self._load_table) self.actionReload_from_Disk.triggered.connect(self._reload_table) self.actionSave.triggered.connect(self._save) self.actionSave_As.triggered.connect(self._save_as) self.actionSave_Workspaces.triggered.connect(self._save_workspaces) self.actionClose_Refl_Gui.triggered.connect(self.close) self.actionMantid_Help.triggered.connect(self._show_help) self.actionAutofill.triggered.connect(self._autofill) self.actionSearch_RB.triggered.connect(self._populate_runs_list) self.actionClear_Table.triggered.connect(self._initialise_table) self.actionProcess.triggered.connect(self._process) self.actionTransfer.triggered.connect(self._transfer) self.tableMain.cellChanged.connect(self._table_modified) self.actionClear.triggered.connect(self._clear_cells) self.actionPaste.triggered.connect(self._paste_cells) self.actionCut.triggered.connect(self._cut_cells) self.actionCopy.triggered.connect(self._copy_cells) self.actionChoose_Columns.triggered.connect(self._choose_columns) self.actionRefl_Gui_Options.triggered.connect(self._options_dialog) self.actionSlit_Calculator.triggered.connect(self._show_slit_calculator) def __valid_rb(self): # Ensure that you cannot put zero in for an rb search rbSearchValidator = QtGui.QIntValidator(self) current_text = self.textRB.text() rbSearchValidator.setBottom(1) state = rbSearchValidator.validate(current_text, 0)[0] if state == QtGui.QValidator.Acceptable: return True else: self.textRB.clear() if current_text: logger.warning("RB search restricted to numbers > 0") return False def _populate_runs_list(self): """ Populate the list at the right with names of runs and workspaces from the archives """ # Clear existing self.listMain.clear() if self.__valid_rb(): # Use ICAT for a journal search based on the RB number active_session_id = None if CatalogManager.numberActiveSessions() == 0: # Execute the CatalogLoginDialog login_alg = CatalogLoginDialog() session_object = login_alg.getProperty("KeepAlive").value active_session_id = session_object.getPropertyValue("Session") # Fetch out an existing session id active_session_id = CatalogManager.getActiveSessions()[-1].getSessionId() # This might be another catalog session, but at present there is no way to tell. search_alg = AlgorithmManager.create('CatalogGetDataFiles') search_alg.initialize() search_alg.setChild(True) # Keeps the results table out of the ADS search_alg.setProperty('InvestigationId', str(self.textRB.text())) search_alg.setProperty('Session', active_session_id) search_alg.setPropertyValue('OutputWorkspace', '_dummy') search_alg.execute() search_results = search_alg.getProperty('OutputWorkspace').value self.icat_file_map = {} self.statusMain.clearMessage() for row in search_results: file_name = row['Name'] file_id = row['Id'] description = row['Description'] run_number = re.search(r'[1-9]\d+', file_name).group() if bool(re.search('(raw)$', file_name, re.IGNORECASE)): # Filter to only display and map raw files. title = (run_number + ': ' + description).strip() self.icat_file_map[title] = (file_id, run_number, file_name) self.listMain.addItem(title) self.listMain.sortItems() del search_results def _autofill(self): """ copy the contents of the selected cells to the row below as long as the row below contains a run number in the first cell """ # make sure all selected cells are in the same row sum = 0 howMany = len(self.tableMain.selectedItems()) for cell in self.tableMain.selectedItems(): sum = sum + self.tableMain.row(cell) if howMany: selectedrow = self.tableMain.row(self.tableMain.selectedItems()[0]) if sum / howMany == selectedrow: startrow = selectedrow + 1 filled = 0 for cell in self.tableMain.selectedItems(): row = startrow txt = cell.text() while self.tableMain.item(row, 0).text() != '': item = QtGui.QTableWidgetItem() item.setText(txt) self.tableMain.setItem(row, self.tableMain.column(cell), item) row = row + 1 filled = filled + 1 if not filled: QtGui.QMessageBox.critical(self.tableMain, 'Cannot perform Autofill', "No target cells to autofill. Rows to be filled should contain a run number in their " "first cell, and start from directly below the selected line.") else: QtGui.QMessageBox.critical(self.tableMain, 'Cannot perform Autofill', "Selected cells must all be in the same row.") else: QtGui.QMessageBox.critical(self.tableMain, 'Cannot perform Autofill', "There are no source cells selected.") def _clear_cells(self): """ Clear the selected area of data """ cells = self.tableMain.selectedItems() for cell in cells: column = cell.column() if column < self.stitch_col: cell.setText('') def _cut_cells(self): """ copy the selected cells then clear the area """ self._copy_cells() self._clear_cells() def _copy_cells(self): """ Copy the selected ranage of cells to the clipboard """ cells = self.tableMain.selectedItems() if not cells: print 'nothing to copy' return # first discover the size of the selection and initialise a list mincol = cells[0].column() if mincol > self.scale_col: logger.error("Cannot copy, all cells out of range") return maxrow = -1 maxcol = -1 minrow = cells[0].row() for cell in reversed(range(len(cells))): col = cells[cell].column() if col < self.stitch_col: maxcol = col maxrow = cells[cell].row() break colsize = maxcol - mincol + 1 rowsize = maxrow - minrow + 1 selection = [['' for x in range(colsize)] for y in range(rowsize)] # now fill that list for cell in cells: row = cell.row() col = cell.column() if col < self.stitch_col: selection[row - minrow][col - mincol] = str(cell.text()) tocopy = '' for y in range(rowsize): for x in range(colsize): if x > 0: tocopy += '\t' tocopy += selection[y][x] if y < (rowsize - 1): tocopy += '\n' self.clip.setText(str(tocopy)) def _paste_cells(self): """ Paste the contents of the clipboard to the table at the selected position """ pastedtext = self.clip.text() if not pastedtext: logger.warning("Nothing to Paste") return selected = self.tableMain.selectedItems() if not selected: logger.warning("Cannot paste, no editable cells selected") return pasted = pastedtext.splitlines() pastedcells = [] for row in pasted: pastedcells.append(row.split('\t')) pastedcols = len(pastedcells[0]) pastedrows = len(pastedcells) if len(selected) > 1: # discover the size of the selection mincol = selected[0].column() if mincol > self.scale_col: logger.error("Cannot copy, all cells out of range") return minrow = selected[0].row() # now fill that list for cell in selected: row = cell.row() col = cell.column() if col < self.stitch_col and (col - mincol) < pastedcols and (row - minrow) < pastedrows and len( pastedcells[row - minrow]): cell.setText(pastedcells[row - minrow][col - mincol]) elif selected: # when only a single cell is selected, paste all the copied item up until the table limits cell = selected[0] currow = cell.row() homecol = cell.column() tablerows = self.tableMain.rowCount() for row in pastedcells: if len(row): curcol = homecol if currow < tablerows: for col in row: if curcol < self.stitch_col: curcell = self.tableMain.item(currow, curcol) curcell.setText(col) curcol += 1 else: # the row has hit the end of the editable cells break currow += 1 else: # it's dropped off the bottom of the table break else: logger.warning("Cannot paste, no editable cells selected") def _transfer(self): """ Transfer run numbers to the table """ tup = () for idx in self.listMain.selectedItems(): split_title = re.split(":th=|th=|:|dq/q=", idx.text()) if len(split_title) < 3: split_title = re.split(":", idx.text()) if len(split_title) < 2: logger.warning('cannot transfer ' + idx.text() + ' title is not in the right form ') continue else: theta = 0 split_title.append(theta) # Append a dummy theta value. if len(split_title) < 4: dqq = 0 split_title.append(dqq) # Append a dummy dq/q value. tup = tup + (split_title,) # Tuple of lists containing (run number, title, theta, dq/q) tupsort = sorted(tup, key=itemgetter(1, 2)) # now sorted by title then theta row = 0 for _key, group in itertools.groupby(tupsort, lambda x: x[1]): # now group by title col = 0 dqq = 0 # only one value of dqq per row run_angle_pairs_of_title = list() # for storing run_angle pairs all with the same title for object in group: # loop over all with equal title run_no = object[0] dqq = object[-1] angle = object[-2] run_angle_pairs_of_title.append((run_no, angle)) for angle_key, group in itertools.groupby(run_angle_pairs_of_title, lambda x: x[1]): runnumbers = "+".join(["%s" % pair[0] for pair in group]) # set the runnumber item = QtGui.QTableWidgetItem() item.setText(str(runnumbers)) self.tableMain.setItem(row, col, item) # Set the angle item = QtGui.QTableWidgetItem() item.setText(str(angle_key)) self.tableMain.setItem(row, col + 1, item) # Set the transmission item = QtGui.QTableWidgetItem() item.setText(self.textRuns.text()) self.tableMain.setItem(row, col + 2, item) col = col + 5 if col >= 11: col = 0 # set dq/q item = QtGui.QTableWidgetItem() item.setText(str(dqq)) self.tableMain.setItem(row, 15, item) row = row + 1 if self.__icat_download: # If ICAT is being used for download, then files must be downloaded at the same time as they are transferred contents = str(idx.text()).strip() file_id, _runnumber, file_name = self.icat_file_map[contents] active_session_id = CatalogManager.getActiveSessions()[-1].getSessionId() # This might be another catalog session, but at present there is no way to tell. save_location = config['defaultsave.directory'] CatalogDownloadDataFiles(file_id, FileNames=file_name, DownloadPath=save_location, Session=active_session_id) current_search_dirs = config.getDataSearchDirs() if save_location not in current_search_dirs: config.appendDataSearchDir(save_location) def _set_all_stitch(self, state): """ Set the checkboxes in the Stitch? column to the same """ for row in range(self.tableMain.rowCount()): self.tableMain.cellWidget(row, self.stitch_col).children()[1].setCheckState(state) def __checked_row_stiched(self, row): return self.tableMain.cellWidget(row, self.stitch_col).children()[1].checkState() > 0 def _process(self): """ Process has been pressed, check what has been selected then pass the selection (or whole table) to quick """ # --------- If "Process" button pressed, convert raw files to IvsLam and IvsQ and combine if checkbox ticked ------------- _overallQMin = float("inf") _overallQMax = float("-inf") try: willProcess = True rows = self.tableMain.selectionModel().selectedRows() rowIndexes = [] for idx in rows: rowIndexes.append(idx.row()) if not len(rowIndexes): reply = QtGui.QMessageBox.question(self.tableMain, 'Process all rows?', "This will process all rows in the table. Continue?", QtGui.QMessageBox.Yes, QtGui.QMessageBox.No) if reply == QtGui.QMessageBox.No: logger.notice("Cancelled!") willProcess = False else: rowIndexes = range(self.tableMain.rowCount()) if willProcess: for row in rowIndexes: # range(self.tableMain.rowCount()): runno = [] wksp = [] overlapLow = [] overlapHigh = [] if self.tableMain.item(row, 0).text() != '': self.statusMain.showMessage("Processing row: " + str(row + 1)) logger.debug("Processing row: " + str(row + 1)) for i in range(3): run_entry = str(self.tableMain.item(row, i * 5).text()) if run_entry != '': runno.append(run_entry) ovLow = str(self.tableMain.item(row, (i * 5) + 3).text()) if ovLow != '': overlapLow.append(float(ovLow)) ovHigh = str(self.tableMain.item(row, (i * 5) + 4).text()) if ovHigh != '': overlapHigh.append(float(ovHigh)) # Determine resolution if self.tableMain.item(row, 15).text() == '': loadedRun = None if load_live_runs.is_live_run(runno[0]): loadedRun = load_live_runs.get_live_data(config['default.instrument'], frequency=self.live_freq, accumulation=self.live_method) else: Load(Filename=runno[0], OutputWorkspace="_run") loadedRun = mtd["_run"] theta_in_str = str(self.tableMain.item(row, 1).text()) try: theta_in = None if len(theta_in_str) > 0: theta_in = float(theta_in_str) # Make sure we only ever run calculate resolution on a non-group workspace. # If we're given a group workspace, we can just run it on the first member of the group instead thetaRun = loadedRun if isinstance(thetaRun, WorkspaceGroup): thetaRun = thetaRun[0] if not theta_in: theta_in = getLogValue(thetaRun, "Theta") dqq = NRCalculateSlitResolution(Workspace=thetaRun, TwoTheta=2*theta_in) # Put the calculated resolution into the table resItem = QtGui.QTableWidgetItem() resItem.setText(str(dqq)) self.tableMain.setItem(row, 15, resItem) # Update the value for theta_in in the table ttItem = QtGui.QTableWidgetItem() ttItem.setText(str(theta_in)) self.tableMain.setItem(row, 1, ttItem) logger.notice("Calculated resolution: " + str(dqq)) except: self.statusMain.clearMessage() logger.error( "Failed to calculate dq/q because we could not find theta in the workspace's sample log. " "Try entering theta or dq/q manually.") return else: dqq = float(self.tableMain.item(row, 15).text()) # Check secondary and tertiary theta_in columns, if they're # blank and their corresponding run columns are set, fill them. for run_col in [5, 10]: tht_col = run_col + 1 run_val = str(self.tableMain.item(row, run_col).text()) tht_val = str(self.tableMain.item(row, tht_col).text()) if run_val and not tht_val: Load(Filename=run_val, OutputWorkspace="_run") loadedRun = mtd["_run"] tht_val = getLogValue(loadedRun, "Theta") if tht_val: self.tableMain.item(row, tht_col).setText(str(tht_val)) # Populate runlist first_wq = None for i in range(0, len(runno)): theta, qmin, qmax, _wlam, wqBinnedAndScaled, _wqUnBinnedAndUnScaled = \ self._do_run(runno[i], row, i) if not first_wq: first_wq = wqBinnedAndScaled # Cache the first Q workspace theta = round(theta, 3) qmin = round(qmin, 3) qmax = round(qmax, 3) wksp.append(wqBinnedAndScaled.name()) if self.tableMain.item(row, i * 5 + 1).text() == '': item = QtGui.QTableWidgetItem() item.setText(str(theta)) self.tableMain.setItem(row, i * 5 + 1, item) if self.tableMain.item(row, i * 5 + 3).text() == '': item = QtGui.QTableWidgetItem() item.setText(str(qmin)) self.tableMain.setItem(row, i * 5 + 3, item) overlapLow.append(qmin) if self.tableMain.item(row, i * 5 + 4).text() == '': item = QtGui.QTableWidgetItem() item.setText(str(qmax)) self.tableMain.setItem(row, i * 5 + 4, item) overlapHigh.append(qmax) if wksp[i].find(',') > 0 or wksp[i].find(':') > 0: wksp[i] = first_wq.name() if self.__checked_row_stiched(row): if len(runno) == 1: logger.notice("Nothing to combine for processing row : " + str(row)) else: w1 = getWorkspace(wksp[0]) w2 = getWorkspace(wksp[-1]) if len(runno) == 2: outputwksp = runno[0] + '_' + runno[1][3:] else: outputwksp = runno[0] + '_' + runno[-1][3:] # get Qmax if self.tableMain.item(row, i * 5 + 4).text() == '': overlapHigh = 0.3 * max(w1.readX(0)) Qmin = min(w1.readX(0)) Qmax = max(w2.readX(0)) if len(self.tableMain.item(row, i * 5 + 3).text()) > 0: Qmin = float(self.tableMain.item(row, i * 5 + 3).text()) if len(self.tableMain.item(row, i * 5 + 4).text()) > 0: Qmax = float(self.tableMain.item(row, i * 5 + 4).text()) if Qmax > _overallQMax: _overallQMax = Qmax if Qmin < _overallQMin: _overallQMin = Qmin combineDataMulti(wksp, outputwksp, overlapLow, overlapHigh, _overallQMin, _overallQMax, -dqq, 1, keep=True, scale_right=self.__scale_right) # Enable the plot button plotbutton = self.tableMain.cellWidget(row, self.plot_col).children()[1] plotbutton.setProperty('runno', runno) plotbutton.setProperty('overlapLow', overlapLow) plotbutton.setProperty('overlapHigh', overlapHigh) plotbutton.setProperty('wksp', wksp) plotbutton.setEnabled(True) self.statusMain.clearMessage() self.accMethod = None self.statusMain.clearMessage() except: self.statusMain.clearMessage() raise def _plot(self, plotbutton): """ Plot the row belonging to the selected button """ if not isinstance(plotbutton, QtGui.QPushButton): logger.error("Problem accessing cached data: Wrong data type passed, expected QtGui.QPushbutton") return import unicodedata # make sure the required data can be retrieved properly try: runno_u = plotbutton.property('runno') runno = [] for uni in runno_u: runno.append(unicodedata.normalize('NFKD', uni).encode('ascii', 'ignore')) wksp_u = plotbutton.property('wksp') wksp = [] for uni in wksp_u: wksp.append(unicodedata.normalize('NFKD', uni).encode('ascii', 'ignore')) overlapLow = plotbutton.property('overlapLow') overlapHigh = plotbutton.property('overlapHigh') row = plotbutton.property('row') wkspBinned = [] w1 = getWorkspace(wksp[0]) w2 = getWorkspace(wksp[len(wksp) - 1]) dqq = float(self.tableMain.item(row, 15).text()) except: logger.error("Unable to plot row, required data couldn't be retrieved") self.__reset_plot_button(plotbutton) return for i in range(len(runno)): if len(overlapLow): Qmin = overlapLow[0] else: Qmin = min(w1.readX(0)) if len(overlapHigh): Qmax = overlapHigh[len(overlapHigh) - 1] else: Qmax = max(w2.readX(0)) ws_name_binned = wksp[i] wkspBinned.append(ws_name_binned) wsb = getWorkspace(ws_name_binned) _Imin = min(wsb.readY(0)) _Imax = max(wsb.readY(0)) if canMantidPlot: # Get the existing graph if it exists base_graph = self.__graphs.get(wksp[0], None) # Clear the window if we're the first of a new set of curves clearWindow = (i == 0) # Plot the new curve base_graph = plotSpectrum(ws_name_binned, 0, True, window=base_graph, clearWindow=clearWindow) # Save the graph so we can re-use it self.__graphs[wksp[i]] = base_graph titl = groupGet(ws_name_binned, 'samp', 'run_title') if isinstance(titl, str): base_graph.activeLayer().setTitle(titl) base_graph.activeLayer().setAxisScale(Layer.Left, _Imin * 0.1, _Imax * 10, Layer.Log10) base_graph.activeLayer().setAxisScale(Layer.Bottom, Qmin * 0.9, Qmax * 1.1, Layer.Log10) base_graph.activeLayer().setAutoScale() # Create and plot stitched outputs if self.__checked_row_stiched(row): if len(runno) == 2: outputwksp = runno[0] + '_' + runno[1][3:] else: outputwksp = runno[0] + '_' + runno[2][3:] if not getWorkspace(outputwksp, report_error=False): # Stitching has not been done as part of processing, so we need to do it here. combineDataMulti(wkspBinned, outputwksp, overlapLow, overlapHigh, Qmin, Qmax, -dqq, 1, keep=True, scale_right=self.__scale_right) Qmin = min(getWorkspace(outputwksp).readX(0)) Qmax = max(getWorkspace(outputwksp).readX(0)) if canMantidPlot: stitched_graph = self.__graphs.get(outputwksp, None) stitched_graph = plotSpectrum(outputwksp, 0, True, window=stitched_graph, clearWindow=True) titl = groupGet(outputwksp, 'samp', 'run_title') stitched_graph.activeLayer().setTitle(titl) stitched_graph.activeLayer().setAxisScale(Layer.Left, 1e-8, 100.0, Layer.Log10) stitched_graph.activeLayer().setAxisScale(Layer.Bottom, Qmin * 0.9, Qmax * 1.1, Layer.Log10) self.__graphs[outputwksp] = stitched_graph def __name_trans(self, transrun): """ From a comma or colon separated string of run numbers construct an output workspace name for the transmission workspace that fits the form TRANS_{trans_1}_{trans_2} """ if bool(re.search("^(TRANS)", transrun)): # The user has deliberately tried to supply the transmission run directly return transrun else: split_trans = re.split(',|:', transrun) if len(split_trans) == 0: return None name = 'TRANS' for t in split_trans: name += '_' + str(t) return name def _do_run(self, runno, row, which): """ Run quick on the given run and row """ transrun = str(self.tableMain.item(row, (which * 5) + 2).text()) # Formulate a WS Name for the processed transmission run. transrun_named = self.__name_trans(transrun) # Look for existing transmission workspaces that match the name transmission_ws = None if mtd.doesExist(transrun_named): if isinstance(mtd[transrun_named], WorkspaceGroup): unit = mtd[transrun_named][0].getAxis(0).getUnit().unitID() else: unit = mtd[transrun_named].getAxis(0).getUnit().unitID() if unit == "Wavelength": logger.notice('Reusing transmission workspace ' + transrun_named) transmission_ws = mtd[transrun_named] angle_str = str(self.tableMain.item(row, which * 5 + 1).text()) if len(angle_str) > 0: angle = float(angle_str) else: angle = None loadedRun = runno if load_live_runs.is_live_run(runno): load_live_runs.get_live_data(config['default.instrument'], frequency=self.live_freq, accumulation=self.live_method) wlam, wq, th, wqBinned = None, None, None, None # Only make a transmission workspace if we need one. if transrun and not transmission_ws: converter = ConvertToWavelength(transrun) size = converter.get_ws_list_size() out_ws_name = transrun_named if size == 1: trans1 = converter.get_workspace_from_list(0) transmission_ws = CreateTransmissionWorkspaceAuto(FirstTransmissionRun=trans1, OutputWorkspace=out_ws_name, Params=0.02, StartOverlap=10.0, EndOverlap=12.0, Version=1) elif size == 2: trans1 = converter.get_workspace_from_list(0) trans2 = converter.get_workspace_from_list(1) transmission_ws = CreateTransmissionWorkspaceAuto(FirstTransmissionRun=trans1, OutputWorkspace=out_ws_name, SecondTransmissionRun=trans2, Params=0.02, StartOverlap=10.0, EndOverlap=12.0, Version=1) else: raise RuntimeError("Up to 2 transmission runs can be specified. No more than that.") # Load the runs required ConvertToWavelength will deal with the transmission runs, while .to_workspace will deal with the run itself ws = ConvertToWavelength.to_workspace(loadedRun, ws_prefix="") if self.__alg_use: if self.tableMain.item(row, self.scale_col).text(): factor = float(self.tableMain.item(row, self.scale_col).text()) else: factor = 1.0 if self.tableMain.item(row, 15).text(): Qstep = float(self.tableMain.item(row, 15).text()) else: Qstep = None if len(self.tableMain.item(row, which * 5 + 3).text()) > 0: Qmin = float(self.tableMain.item(row, which * 5 + 3).text()) else: Qmin = None if len(self.tableMain.item(row, which * 5 + 4).text()) > 0: Qmax = float(self.tableMain.item(row, which * 5 + 4).text()) else: Qmax = None # If we're dealing with a workspace group, we'll manually map execution over each group member # We do this so we can get ThetaOut correctly (see ticket #10597 for why we can't at the moment) if isinstance(ws, WorkspaceGroup): wqGroupBinned = [] wqGroup = [] wlamGroup = [] thetaGroup = [] group_trans_ws = transmission_ws for i in range(0, ws.size()): # If the transmission workspace is a group, we'll use it pair-wise with the tof workspace group if isinstance(transmission_ws, WorkspaceGroup): group_trans_ws = transmission_ws[i] alg = AlgorithmManager.create("ReflectometryReductionOneAuto") alg.initialize() alg.setProperty("InputWorkspace", ws[i]) if group_trans_ws: alg.setProperty("FirstTransmissionRun", group_trans_ws) if angle is not None: alg.setProperty("ThetaIn", angle) alg.setProperty("OutputWorkspaceBinned", runno + '_IvsQ_binned_' + str(i + 1)) alg.setProperty("OutputWorkspace", runno + '_IvsQ_' + str(i + 1)) alg.setProperty("OutputWorkspaceWavelength", runno + '_IvsLam_' + str(i + 1)) alg.setProperty("ScaleFactor", factor) if Qstep is not None: alg.setProperty("MomentumTransferStep", Qstep) if Qmin is not None: alg.setProperty("MomentumTransferMin", Qmin) if Qmax is not None: alg.setProperty("MomentumTransferMax", Qmax) alg.execute() wqBinned = mtd[runno + '_IvsQ_binned_' + str(i + 1)] wq = mtd[runno + '_IvsQ_' + str(i + 1)] wlam = mtd[runno + '_IvsLam_' + str(i + 1)] th = alg.getProperty("ThetaIn").value wqGroupBinned.append(wqBinned) wqGroup.append(wq) wlamGroup.append(wlam) thetaGroup.append(th) wqBinned = GroupWorkspaces(InputWorkspaces=wqGroupBinned, OutputWorkspace=runno + '_IvsQ_binned') wq = GroupWorkspaces(InputWorkspaces=wqGroup, OutputWorkspace=runno + '_IvsQ') wlam = GroupWorkspaces(InputWorkspaces=wlamGroup, OutputWorkspace=runno + '_IvsLam') th = thetaGroup[0] else: alg = AlgorithmManager.create("ReflectometryReductionOneAuto") alg.initialize() alg.setProperty("InputWorkspace", ws) if transmission_ws: alg.setProperty("FirstTransmissionRun", transmission_ws) if angle is not None: alg.setProperty("ThetaIn", angle) alg.setProperty("OutputWorkspaceBinned", runno + '_IvsQ_binned') alg.setProperty("OutputWorkspace", runno + '_IvsQ') alg.setProperty("OutputWorkspaceWavelength", runno + '_IvsLam') alg.setProperty("ScaleFactor", factor) if Qstep is not None: alg.setProperty("MomentumTransferStep", Qstep) if Qmin is not None: alg.setProperty("MomentumTransferMin", Qmin) if Qmax is not None: alg.setProperty("MomentumTransferMax", Qmax) alg.execute() wqBinned = mtd[runno + '_IvsQ_binned'] wq = mtd[runno + '_IvsQ'] wlam = mtd[runno + '_IvsLam'] th = alg.getProperty("ThetaIn").value cleanup() else: wlam, wq, th = quick(loadedRun, trans=transmission_ws, theta=angle, tof_prefix="") if self.__group_tof_workspaces and not isinstance(ws, WorkspaceGroup): if "TOF" in mtd: tof_group = mtd["TOF"] if not tof_group.contains(loadedRun): tof_group.add(loadedRun) else: tof_group = GroupWorkspaces(InputWorkspaces=loadedRun, OutputWorkspace="TOF") if ':' in runno: runno = runno.split(':')[0] if ',' in runno: runno = runno.split(',')[0] if isinstance(wq, WorkspaceGroup): inst = wq[0].getInstrument() else: inst = wq.getInstrument() lmin = inst.getNumberParameter('LambdaMin')[0] lmax = inst.getNumberParameter('LambdaMax')[0] qmin = 4 * math.pi / lmax * math.sin(th * math.pi / 180) qmax = 4 * math.pi / lmin * math.sin(th * math.pi / 180) return th, qmin, qmax, wlam, wqBinned, wq def _save_table_contents(self, filename): """ Save the contents of the table """ try: writer = csv.writer(open(filename, "wb")) for row in range(self.tableMain.rowCount()): rowtext = [] for column in range(self.tableMain.columnCount() - 2): rowtext.append(self.tableMain.item(row, column).text()) if len(rowtext) > 0: writer.writerow(rowtext) self.current_table = filename logger.notice("Saved file to " + filename) self.mod_flag = False except: return False self.mod_flag = False return True def _save(self, failsave=False): """ Save the table, showing no interface if not necessary. This also provides the failing save functionality. """ filename = '' if failsave: # this is an emergency autosave as the program is failing logger.error( "The ISIS Reflectonomy GUI has encountered an error, it will now attempt to save a copy of your work.") msgBox = QtGui.QMessageBox() msgBox.setText( "The ISIS Reflectonomy GUI has encountered an error, it will now attempt to save a copy of your work.\n" "Please check the log for details.") msgBox.setStandardButtons(QtGui.QMessageBox.Ok) msgBox.setIcon(QtGui.QMessageBox.Critical) msgBox.setDefaultButton(QtGui.QMessageBox.Ok) msgBox.setEscapeButton(QtGui.QMessageBox.Ok) msgBox.exec_() import datetime failtime = datetime.datetime.today().strftime('%Y-%m-%d_%H-%M-%S') if self.current_table: filename = self.current_table.rsplit('.', 1)[0] + "_recovered_" + failtime + ".tbl" else: mantidDefault = config['defaultsave.directory'] if os.path.exists(mantidDefault): filename = os.path.join(mantidDefault, "mantid_reflectometry_recovered_" + failtime + ".tbl") else: import tempfile tempDir = tempfile.gettempdir() filename = os.path.join(tempDir, "mantid_reflectometry_recovered_" + failtime + ".tbl") else: # this is a save-on-quit or file->save if self.current_table: filename = self.current_table else: saveDialog = QtGui.QFileDialog(self.widgetMainRow.parent(), "Save Table") saveDialog.setFileMode(QtGui.QFileDialog.AnyFile) saveDialog.setNameFilter("Table Files (*.tbl);;All files (*)") saveDialog.setDefaultSuffix("tbl") saveDialog.setAcceptMode(QtGui.QFileDialog.AcceptSave) if saveDialog.exec_(): filename = saveDialog.selectedFiles()[0] else: return False return self._save_table_contents(filename) def _save_as(self): """ show the save as dialog and save to a .tbl file with that name """ saveDialog = QtGui.QFileDialog(self.widgetMainRow.parent(), "Save Table") saveDialog.setFileMode(QtGui.QFileDialog.AnyFile) saveDialog.setNameFilter("Table Files (*.tbl);;All files (*)") saveDialog.setDefaultSuffix("tbl") saveDialog.setAcceptMode(QtGui.QFileDialog.AcceptSave) if saveDialog.exec_(): filename = saveDialog.selectedFiles()[0] self._save_table_contents(filename) def _load_table(self): """ Load a .tbl file from disk """ self.loading = True loadDialog = QtGui.QFileDialog(self.widgetMainRow.parent(), "Open Table") loadDialog.setFileMode(QtGui.QFileDialog.ExistingFile) loadDialog.setNameFilter("Table Files (*.tbl);;All files (*)") if loadDialog.exec_(): try: # before loading make sure you give them a chance to save if self.mod_flag: ret, _saved = self._save_check() if ret == QtGui.QMessageBox.RejectRole: # if they hit cancel abort the load self.loading = False return self._reset_table() filename = loadDialog.selectedFiles()[0] self.current_table = filename reader = csv.reader(open(filename, "rb")) row = 0 for line in reader: if row < 100: for column in range(self.tableMain.columnCount() - 2): item = QtGui.QTableWidgetItem() item.setText(line[column]) self.tableMain.setItem(row, column, item) row = row + 1 except: logger.error('Could not load file: ' + str(filename) + '. File not found or unable to read from file.') self.loading = False self.mod_flag = False def _reload_table(self): """ Reload the last loaded file from disk, replacing anything in the table already """ self.loading = True filename = self.current_table if filename: if self.mod_flag: msgBox = QtGui.QMessageBox() msgBox.setText( "The table has been modified. Are you sure you want to reload the table and lose your changes?") msgBox.setStandardButtons(QtGui.QMessageBox.Yes | QtGui.QMessageBox.No) msgBox.setIcon(QtGui.QMessageBox.Question) msgBox.setDefaultButton(QtGui.QMessageBox.Yes) msgBox.setEscapeButton(QtGui.QMessageBox.No) ret = msgBox.exec_() if ret == QtGui.QMessageBox.No: # if they hit No abort the reload self.loading = False return try: self._reset_table() reader = csv.reader(open(filename, "rb")) row = 0 for line in reader: if row < 100: for column in range(self.tableMain.columnCount() - 2): item = QtGui.QTableWidgetItem() item.setText(line[column]) self.tableMain.setItem(row, column, item) row = row + 1 self.mod_flag = False except: logger.error('Could not load file: ' + str(filename) + '. File not found or unable to read from file.') else: logger.notice('No file in table to reload.') self.loading = False def _save_workspaces(self): """ Shows the export dialog for saving workspaces to non mantid formats """ try: Dialog = QtGui.QDialog() u = Ui_SaveWindow() u.setupUi(Dialog) Dialog.exec_() except Exception as ex: logger.notice("Could not open save workspace dialog") logger.notice(str(ex)) def _options_dialog(self): """ Shows the dialog for setting options regarding live data """ try: dialog_controller = ReflOptions(def_method=self.live_method, def_freq=self.live_freq, def_alg_use=self.__alg_use, def_icat_download=self.__icat_download, def_group_tof_workspaces=self.__group_tof_workspaces, def_stitch_right=self.__scale_right) if dialog_controller.exec_(): # Fetch the settings back off the controller self.live_freq = dialog_controller.frequency() self.live_method = dialog_controller.method() self.__alg_use = dialog_controller.useAlg() self.__icat_download = dialog_controller.icatDownload() self.__group_tof_workspaces = dialog_controller.groupTOFWorkspaces() self.__scale_right = dialog_controller.stitchRight() # Persist the settings settings = QtCore.QSettings() settings.beginGroup(self.__live_data_settings) settings.setValue(self.__live_data_frequency_key, self.live_freq) settings.setValue(self.__live_data_method_key, self.live_method) settings.endGroup() settings.beginGroup(self.__generic_settings) settings.setValue(self.__ads_use_key, self.__alg_use) settings.setValue(self.__icat_download_key, self.__icat_download) settings.setValue(self.__group_tof_workspaces_key, self.__group_tof_workspaces) settings.setValue(self.__stitch_right_key, self.__scale_right) settings.endGroup() del settings except Exception as ex: logger.notice("Problem opening options dialog or problem retrieving values from dialog") logger.notice(str(ex)) def _choose_columns(self): """ shows the choose columns dialog for hiding and revealing of columns """ try: dialog = ReflChoose(self.shown_cols, self.tableMain) if dialog.exec_(): settings = QtCore.QSettings() settings.beginGroup(self.__column_settings) for key, value in dialog.visiblestates.iteritems(): self.shown_cols[key] = value settings.setValue(str(key), value) if value: self.tableMain.showColumn(key) else: self.tableMain.hideColumn(key) settings.endGroup() del settings except Exception as ex: logger.notice("Could not open choose columns dialog") logger.notice(str(ex)) def _show_help(self): """ Launches the wiki page for this interface """ import webbrowser webbrowser.open('http://www.mantidproject.org/ISIS_Reflectometry_GUI') def getLogValue(wksp, field=''): """ returns the last value from a sample log """ ws = getWorkspace(wksp) log = ws.getRun().getLogData(field).value if isinstance(log, int) or isinstance(log, str): return log else: return log[-1] def getWorkspace(wksp, report_error=True): """ Gets the first workspace associated with the given string. Does not load. """ if isinstance(wksp, Workspace): return wksp elif isinstance(wksp, str): exists = mtd.doesExist(wksp) if not exists: if report_error: logger.error("Unable to get workspace: " + str(wksp)) return exists # Doesn't exist else: return exists # Doesn't exist elif isinstance(mtd[wksp], WorkspaceGroup): wout = mtd[wksp][0] else: wout = mtd[wksp] return wout
dymkowsk/mantid
scripts/Interface/ui/reflectometer/refl_gui.py
Python
gpl-3.0
64,194