code
stringlengths
3
1.05M
repo_name
stringlengths
4
116
path
stringlengths
3
942
language
stringclasses
30 values
license
stringclasses
15 values
size
int32
3
1.05M
/* * This file is part of oclp. * * oclp 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. * * oclp 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 oclp. If not, see <http://www.gnu.org/licenses/>. */ #include "oclp.h" namespace cl { CommandQueue::CommandQueue (void) : queue (NULL) { } CommandQueue::CommandQueue (cl_command_queue cq) : queue (cq) { } CommandQueue::CommandQueue (const CommandQueue &cq) : queue (cq.queue) { if (queue) { clRetainCommandQueue (queue); } } CommandQueue::CommandQueue (CommandQueue &&cq) : queue (cq.queue) { cq.queue = NULL; } CommandQueue::~CommandQueue (void) { if (queue != NULL) { clReleaseCommandQueue (queue); queue = NULL; } } CommandQueue &CommandQueue::operator= (CommandQueue &&cq) { queue = cq.queue; cq.queue = NULL; } CommandQueue &CommandQueue::operator= (const CommandQueue &cq) { queue = cq.queue; if (queue) { clRetainCommandQueue (queue); } } void CommandQueue::Flush (void) { cl_int err; err = clFlush (queue); if (err != CL_SUCCESS) throw Exception ("Cannot flush an OpenCL command queue.", err); } void CommandQueue::Finish (void) { cl_int err; err = clFinish (queue); if (err != CL_SUCCESS) throw Exception ("Cannot finish an OpenCL command queue.", err); } void CommandQueue::EnqueueNDRangeKernel (const Kernel &kernel, cl_uint work_dim, const size_t *global_work_offset, const size_t *global_work_size, const size_t *local_work_size, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event) { cl_int err; err = clEnqueueNDRangeKernel (queue, kernel.get (), work_dim, global_work_offset, global_work_size, local_work_size, num_events_in_wait_list, event_wait_list, event); if (err != CL_SUCCESS) throw Exception ("Cannot enqueue an OpenCL kernel.", err); } void CommandQueue::EnqueueAcquireGLObjects (std::vector<Memory> objects, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event) { cl_int err; std::vector<cl_mem> objs; for (Memory &mem : objects) { objs.push_back (mem.get ()); } err = clEnqueueAcquireGLObjects (queue, objs.size (), &objs[0], num_events_in_wait_list, event_wait_list, event); if (err != CL_SUCCESS) throw Exception ("Cannot enqueue an OpenGL object acquisition to " "an OpenCL command queue.", err); } void CommandQueue::EnqueueReleaseGLObjects (std::vector<Memory> objects, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event) { cl_int err; std::vector<cl_mem> objs; for (Memory &mem : objects) { objs.push_back (mem.get ()); } err = clEnqueueReleaseGLObjects (queue, objs.size (), &objs[0], num_events_in_wait_list, event_wait_list, event); if (err != CL_SUCCESS) throw Exception ("Cannot enqueue an OpenGL object release to " "an OpenCL command queue.", err); } void CommandQueue::EnqueueCopyBufferToImage (const Memory &src, const Memory &dst, size_t src_offset, const size_t *dst_origin, const size_t *region, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event) { cl_int err; err = clEnqueueCopyBufferToImage (queue, src.get (), dst.get (), src_offset, dst_origin, region, num_events_in_wait_list, event_wait_list, event); if (err != CL_SUCCESS) throw Exception ("Cannot enqueue a copy operation from a bufer to" " an image.", err); } void CommandQueue::EnqueueWriteBuffer (const Memory &buffer, cl_bool blocking_write, size_t offset, size_t cb, const void *ptr, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event) { cl_int err; err = clEnqueueWriteBuffer (queue, buffer.get (), blocking_write, offset, cb, ptr, num_events_in_wait_list, event_wait_list, event); if (err != CL_SUCCESS) throw Exception ("Cannot enqueue a buffer write operation", err); } void CommandQueue::EnqueueReadBuffer (const Memory &buffer, cl_bool blocking_read, size_t offset, size_t cb, void *ptr, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event) { cl_int err; err = clEnqueueReadBuffer (queue, buffer.get (), blocking_read, offset, cb, ptr, num_events_in_wait_list, event_wait_list, event); if (err != CL_SUCCESS) throw Exception ("Cannot enqueue a buffer read operation", err); } cl_event CommandQueue::EnqueueMarker (void) { cl_event event; cl_int err; err = clEnqueueMarker (queue, &event); if (err != CL_SUCCESS) throw Exception ("Cannot enqueue a marker", err); return event; } void CommandQueue::EnqueueWaitForEvents (cl_uint num_events, const cl_event *event_list) { cl_int err; err = clEnqueueWaitForEvents (queue, num_events, event_list); if (err != CL_SUCCESS) throw Exception ("Cannot enqueue a wait for events", err); } void CommandQueue::EnqueueBarrier (void) { cl_int err; err = clEnqueueBarrier (queue); if (err != CL_SUCCESS) throw Exception ("Cannot enqueue a barrier operation", err); } } /* namespace cl */
ekpyron/oclp
src/commandqueue.cpp
C++
gpl-3.0
6,274
/* * 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 InterfazBasica; import java.util.ArrayList; import javax.swing.table.AbstractTableModel; /** * * @author omar */ class ModeloTablaProducto extends AbstractTableModel{ private ArrayList<Register> list = new ArrayList<Register>(); @Override public int getColumnCount() { return 3; } @Override public int getRowCount() { return list.size(); } public void addRegister(String producto, double precio, String unidad, String categoria){ list.add(new Register(producto, precio, unidad,categoria)); this.fireTableDataChanged(); } @Override public Object getValueAt(int rowIndex, int columnIndex) { Register r = list.get(rowIndex); switch (columnIndex) { case 0: return r.producto; case 1: return r.precio; case 2: return r.unidad; case 3: return r.categoria; } return null; } void addRegister(String manzana, String string, String kg, String frutas) { throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. } class Register{ String producto; double precio; String unidad; String categoria; public Register(String producto, double precio, String unidad,String categoria) { this.producto = producto.toUpperCase(); this.precio = precio; this.unidad = unidad; this.categoria = categoria.toUpperCase(); } } }
quincyg13/puntodeventa
InterfazBasica/InterfazBasica/InterfazBasica/src/InterfazBasica/ModeloTablaProducto.java
Java
gpl-3.0
1,813
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.6.0_27) on Sat Oct 06 02:59:49 EDT 2012 --> <META http-equiv="Content-Type" content="text/html; charset=utf-8"> <TITLE> All Classes (Lucene 4.0.0 API) </TITLE> <META NAME="date" CONTENT="2012-10-06"> <LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style"> </HEAD> <BODY BGCOLOR="white"> <FONT size="+1" CLASS="FrameHeadingFont"> <B>All Classes</B></FONT> <BR> <TABLE BORDER="0" WIDTH="100%" SUMMARY=""> <TR> <TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="org/apache/lucene/queryparser/flexible/core/config/AbstractQueryConfig.html" title="class in org.apache.lucene.queryparser.flexible.core.config">AbstractQueryConfig</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/nodes/AbstractRangeQueryNode.html" title="class in org.apache.lucene.queryparser.flexible.standard.nodes">AbstractRangeQueryNode</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/processors/AllowLeadingWildcardProcessor.html" title="class in org.apache.lucene.queryparser.flexible.standard.processors">AllowLeadingWildcardProcessor</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/processors/AnalyzerQueryNodeProcessor.html" title="class in org.apache.lucene.queryparser.flexible.standard.processors">AnalyzerQueryNodeProcessor</A> <BR> <A HREF="org/apache/lucene/queryparser/analyzing/AnalyzingQueryParser.html" title="class in org.apache.lucene.queryparser.analyzing">AnalyzingQueryParser</A> <BR> <A HREF="org/apache/lucene/queryparser/surround/query/AndQuery.html" title="class in org.apache.lucene.queryparser.surround.query">AndQuery</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/nodes/AndQueryNode.html" title="class in org.apache.lucene.queryparser.flexible.core.nodes">AndQueryNode</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/nodes/AnyQueryNode.html" title="class in org.apache.lucene.queryparser.flexible.core.nodes">AnyQueryNode</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/builders/AnyQueryNodeBuilder.html" title="class in org.apache.lucene.queryparser.flexible.standard.builders">AnyQueryNodeBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/surround/query/BasicQueryFactory.html" title="class in org.apache.lucene.queryparser.surround.query">BasicQueryFactory</A> <BR> <A HREF="org/apache/lucene/queryparser/xml/builders/BooleanFilterBuilder.html" title="class in org.apache.lucene.queryparser.xml.builders">BooleanFilterBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/nodes/BooleanModifierNode.html" title="class in org.apache.lucene.queryparser.flexible.standard.nodes">BooleanModifierNode</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/precedence/processors/BooleanModifiersQueryNodeProcessor.html" title="class in org.apache.lucene.queryparser.flexible.precedence.processors">BooleanModifiersQueryNodeProcessor</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/processors/BooleanQuery2ModifierNodeProcessor.html" title="class in org.apache.lucene.queryparser.flexible.standard.processors">BooleanQuery2ModifierNodeProcessor</A> <BR> <A HREF="org/apache/lucene/queryparser/xml/builders/BooleanQueryBuilder.html" title="class in org.apache.lucene.queryparser.xml.builders">BooleanQueryBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/nodes/BooleanQueryNode.html" title="class in org.apache.lucene.queryparser.flexible.core.nodes">BooleanQueryNode</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/builders/BooleanQueryNodeBuilder.html" title="class in org.apache.lucene.queryparser.flexible.standard.builders">BooleanQueryNodeBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/processors/BooleanSingleChildOptimizationQueryNodeProcessor.html" title="class in org.apache.lucene.queryparser.flexible.standard.processors">BooleanSingleChildOptimizationQueryNodeProcessor</A> <BR> <A HREF="org/apache/lucene/queryparser/xml/builders/BoostingQueryBuilder.html" title="class in org.apache.lucene.queryparser.xml.builders">BoostingQueryBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/xml/builders/BoostingTermBuilder.html" title="class in org.apache.lucene.queryparser.xml.builders">BoostingTermBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/nodes/BoostQueryNode.html" title="class in org.apache.lucene.queryparser.flexible.core.nodes">BoostQueryNode</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/builders/BoostQueryNodeBuilder.html" title="class in org.apache.lucene.queryparser.flexible.standard.builders">BoostQueryNodeBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/processors/BoostQueryNodeProcessor.html" title="class in org.apache.lucene.queryparser.flexible.standard.processors">BoostQueryNodeProcessor</A> <BR> <A HREF="org/apache/lucene/queryparser/xml/builders/CachedFilterBuilder.html" title="class in org.apache.lucene.queryparser.xml.builders">CachedFilterBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/classic/CharStream.html" title="interface in org.apache.lucene.queryparser.classic"><I>CharStream</I></A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/parser/CharStream.html" title="interface in org.apache.lucene.queryparser.flexible.standard.parser"><I>CharStream</I></A> <BR> <A HREF="org/apache/lucene/queryparser/surround/parser/CharStream.html" title="interface in org.apache.lucene.queryparser.surround.parser"><I>CharStream</I></A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/CommonQueryParserConfiguration.html" title="interface in org.apache.lucene.queryparser.flexible.standard"><I>CommonQueryParserConfiguration</I></A> <BR> <A HREF="org/apache/lucene/queryparser/complexPhrase/ComplexPhraseQueryParser.html" title="class in org.apache.lucene.queryparser.complexPhrase">ComplexPhraseQueryParser</A> <BR> <A HREF="org/apache/lucene/queryparser/surround/query/ComposedQuery.html" title="class in org.apache.lucene.queryparser.surround.query">ComposedQuery</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/config/ConfigurationKey.html" title="class in org.apache.lucene.queryparser.flexible.core.config">ConfigurationKey</A> <BR> <A HREF="org/apache/lucene/queryparser/xml/builders/ConstantScoreQueryBuilder.html" title="class in org.apache.lucene.queryparser.xml.builders">ConstantScoreQueryBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/xml/CoreParser.html" title="class in org.apache.lucene.queryparser.xml">CoreParser</A> <BR> <A HREF="org/apache/lucene/queryparser/xml/CorePlusExtensionsParser.html" title="class in org.apache.lucene.queryparser.xml">CorePlusExtensionsParser</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/processors/DefaultPhraseSlopQueryNodeProcessor.html" title="class in org.apache.lucene.queryparser.flexible.standard.processors">DefaultPhraseSlopQueryNodeProcessor</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/nodes/DeletedQueryNode.html" title="class in org.apache.lucene.queryparser.flexible.core.nodes">DeletedQueryNode</A> <BR> <A HREF="org/apache/lucene/queryparser/xml/builders/DisjunctionMaxQueryBuilder.html" title="class in org.apache.lucene.queryparser.xml.builders">DisjunctionMaxQueryBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/surround/query/DistanceQuery.html" title="class in org.apache.lucene.queryparser.surround.query">DistanceQuery</A> <BR> <A HREF="org/apache/lucene/queryparser/surround/query/DistanceSubQuery.html" title="interface in org.apache.lucene.queryparser.surround.query"><I>DistanceSubQuery</I></A> <BR> <A HREF="org/apache/lucene/queryparser/xml/DOMUtils.html" title="class in org.apache.lucene.queryparser.xml">DOMUtils</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/builders/DummyQueryNodeBuilder.html" title="class in org.apache.lucene.queryparser.flexible.standard.builders">DummyQueryNodeBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/xml/builders/DuplicateFilterBuilder.html" title="class in org.apache.lucene.queryparser.xml.builders">DuplicateFilterBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/parser/EscapeQuerySyntax.html" title="interface in org.apache.lucene.queryparser.flexible.core.parser"><I>EscapeQuerySyntax</I></A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/parser/EscapeQuerySyntax.Type.html" title="enum in org.apache.lucene.queryparser.flexible.core.parser">EscapeQuerySyntax.Type</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/parser/EscapeQuerySyntaxImpl.html" title="class in org.apache.lucene.queryparser.flexible.standard.parser">EscapeQuerySyntaxImpl</A> <BR> <A HREF="org/apache/lucene/queryparser/ext/ExtendableQueryParser.html" title="class in org.apache.lucene.queryparser.ext">ExtendableQueryParser</A> <BR> <A HREF="org/apache/lucene/queryparser/ext/ExtensionQuery.html" title="class in org.apache.lucene.queryparser.ext">ExtensionQuery</A> <BR> <A HREF="org/apache/lucene/queryparser/ext/Extensions.html" title="class in org.apache.lucene.queryparser.ext">Extensions</A> <BR> <A HREF="org/apache/lucene/queryparser/ext/Extensions.Pair.html" title="class in org.apache.lucene.queryparser.ext">Extensions.Pair</A> <BR> <A HREF="org/apache/lucene/queryparser/classic/FastCharStream.html" title="class in org.apache.lucene.queryparser.classic">FastCharStream</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/parser/FastCharStream.html" title="class in org.apache.lucene.queryparser.flexible.standard.parser">FastCharStream</A> <BR> <A HREF="org/apache/lucene/queryparser/surround/parser/FastCharStream.html" title="class in org.apache.lucene.queryparser.surround.parser">FastCharStream</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/nodes/FieldableNode.html" title="interface in org.apache.lucene.queryparser.flexible.core.nodes"><I>FieldableNode</I></A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/config/FieldBoostMapFCListener.html" title="class in org.apache.lucene.queryparser.flexible.standard.config">FieldBoostMapFCListener</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/config/FieldConfig.html" title="class in org.apache.lucene.queryparser.flexible.core.config">FieldConfig</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/config/FieldConfigListener.html" title="interface in org.apache.lucene.queryparser.flexible.core.config"><I>FieldConfigListener</I></A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/config/FieldDateResolutionFCListener.html" title="class in org.apache.lucene.queryparser.flexible.standard.config">FieldDateResolutionFCListener</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/nodes/FieldQueryNode.html" title="class in org.apache.lucene.queryparser.flexible.core.nodes">FieldQueryNode</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/builders/FieldQueryNodeBuilder.html" title="class in org.apache.lucene.queryparser.flexible.standard.builders">FieldQueryNodeBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/surround/query/FieldsQuery.html" title="class in org.apache.lucene.queryparser.surround.query">FieldsQuery</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/nodes/FieldValuePairQueryNode.html" title="interface in org.apache.lucene.queryparser.flexible.core.nodes"><I>FieldValuePairQueryNode</I></A> <BR> <A HREF="org/apache/lucene/queryparser/xml/FilterBuilder.html" title="interface in org.apache.lucene.queryparser.xml"><I>FilterBuilder</I></A> <BR> <A HREF="org/apache/lucene/queryparser/xml/FilterBuilderFactory.html" title="class in org.apache.lucene.queryparser.xml">FilterBuilderFactory</A> <BR> <A HREF="org/apache/lucene/queryparser/xml/builders/FilteredQueryBuilder.html" title="class in org.apache.lucene.queryparser.xml.builders">FilteredQueryBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/config/FuzzyConfig.html" title="class in org.apache.lucene.queryparser.flexible.standard.config">FuzzyConfig</A> <BR> <A HREF="org/apache/lucene/queryparser/xml/builders/FuzzyLikeThisQueryBuilder.html" title="class in org.apache.lucene.queryparser.xml.builders">FuzzyLikeThisQueryBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/nodes/FuzzyQueryNode.html" title="class in org.apache.lucene.queryparser.flexible.core.nodes">FuzzyQueryNode</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/builders/FuzzyQueryNodeBuilder.html" title="class in org.apache.lucene.queryparser.flexible.standard.builders">FuzzyQueryNodeBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/processors/FuzzyQueryNodeProcessor.html" title="class in org.apache.lucene.queryparser.flexible.standard.processors">FuzzyQueryNodeProcessor</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/nodes/GroupQueryNode.html" title="class in org.apache.lucene.queryparser.flexible.core.nodes">GroupQueryNode</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/builders/GroupQueryNodeBuilder.html" title="class in org.apache.lucene.queryparser.flexible.standard.builders">GroupQueryNodeBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/processors/GroupQueryNodeProcessor.html" title="class in org.apache.lucene.queryparser.flexible.standard.processors">GroupQueryNodeProcessor</A> <BR> <A HREF="org/apache/lucene/queryparser/xml/builders/LikeThisQueryBuilder.html" title="class in org.apache.lucene.queryparser.xml.builders">LikeThisQueryBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/processors/LowercaseExpandedTermsQueryNodeProcessor.html" title="class in org.apache.lucene.queryparser.flexible.standard.processors">LowercaseExpandedTermsQueryNodeProcessor</A> <BR> <A HREF="org/apache/lucene/queryparser/xml/builders/MatchAllDocsQueryBuilder.html" title="class in org.apache.lucene.queryparser.xml.builders">MatchAllDocsQueryBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/nodes/MatchAllDocsQueryNode.html" title="class in org.apache.lucene.queryparser.flexible.core.nodes">MatchAllDocsQueryNode</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/builders/MatchAllDocsQueryNodeBuilder.html" title="class in org.apache.lucene.queryparser.flexible.standard.builders">MatchAllDocsQueryNodeBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/processors/MatchAllDocsQueryNodeProcessor.html" title="class in org.apache.lucene.queryparser.flexible.standard.processors">MatchAllDocsQueryNodeProcessor</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/nodes/MatchNoDocsQueryNode.html" title="class in org.apache.lucene.queryparser.flexible.core.nodes">MatchNoDocsQueryNode</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/builders/MatchNoDocsQueryNodeBuilder.html" title="class in org.apache.lucene.queryparser.flexible.standard.builders">MatchNoDocsQueryNodeBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/messages/Message.html" title="interface in org.apache.lucene.queryparser.flexible.messages"><I>Message</I></A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/messages/MessageImpl.html" title="class in org.apache.lucene.queryparser.flexible.messages">MessageImpl</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/nodes/ModifierQueryNode.html" title="class in org.apache.lucene.queryparser.flexible.core.nodes">ModifierQueryNode</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/nodes/ModifierQueryNode.Modifier.html" title="enum in org.apache.lucene.queryparser.flexible.core.nodes">ModifierQueryNode.Modifier</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/builders/ModifierQueryNodeBuilder.html" title="class in org.apache.lucene.queryparser.flexible.standard.builders">ModifierQueryNodeBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/processors/MultiFieldQueryNodeProcessor.html" title="class in org.apache.lucene.queryparser.flexible.standard.processors">MultiFieldQueryNodeProcessor</A> <BR> <A HREF="org/apache/lucene/queryparser/classic/MultiFieldQueryParser.html" title="class in org.apache.lucene.queryparser.classic">MultiFieldQueryParser</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/nodes/MultiPhraseQueryNode.html" title="class in org.apache.lucene.queryparser.flexible.standard.nodes">MultiPhraseQueryNode</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/builders/MultiPhraseQueryNodeBuilder.html" title="class in org.apache.lucene.queryparser.flexible.standard.builders">MultiPhraseQueryNodeBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/processors/MultiTermRewriteMethodProcessor.html" title="class in org.apache.lucene.queryparser.flexible.standard.processors">MultiTermRewriteMethodProcessor</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/messages/NLS.html" title="class in org.apache.lucene.queryparser.flexible.messages">NLS</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/messages/NLSException.html" title="interface in org.apache.lucene.queryparser.flexible.messages"><I>NLSException</I></A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/processors/NoChildOptimizationQueryNodeProcessor.html" title="class in org.apache.lucene.queryparser.flexible.core.processors">NoChildOptimizationQueryNodeProcessor</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/nodes/NoTokenFoundQueryNode.html" title="class in org.apache.lucene.queryparser.flexible.core.nodes">NoTokenFoundQueryNode</A> <BR> <A HREF="org/apache/lucene/queryparser/surround/query/NotQuery.html" title="class in org.apache.lucene.queryparser.surround.query">NotQuery</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/config/NumberDateFormat.html" title="class in org.apache.lucene.queryparser.flexible.standard.config">NumberDateFormat</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/config/NumericConfig.html" title="class in org.apache.lucene.queryparser.flexible.standard.config">NumericConfig</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/config/NumericFieldConfigListener.html" title="class in org.apache.lucene.queryparser.flexible.standard.config">NumericFieldConfigListener</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/nodes/NumericQueryNode.html" title="class in org.apache.lucene.queryparser.flexible.standard.nodes">NumericQueryNode</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/processors/NumericQueryNodeProcessor.html" title="class in org.apache.lucene.queryparser.flexible.standard.processors">NumericQueryNodeProcessor</A> <BR> <A HREF="org/apache/lucene/queryparser/xml/builders/NumericRangeFilterBuilder.html" title="class in org.apache.lucene.queryparser.xml.builders">NumericRangeFilterBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/xml/builders/NumericRangeQueryBuilder.html" title="class in org.apache.lucene.queryparser.xml.builders">NumericRangeQueryBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/nodes/NumericRangeQueryNode.html" title="class in org.apache.lucene.queryparser.flexible.standard.nodes">NumericRangeQueryNode</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/builders/NumericRangeQueryNodeBuilder.html" title="class in org.apache.lucene.queryparser.flexible.standard.builders">NumericRangeQueryNodeBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/processors/NumericRangeQueryNodeProcessor.html" title="class in org.apache.lucene.queryparser.flexible.standard.processors">NumericRangeQueryNodeProcessor</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/nodes/OpaqueQueryNode.html" title="class in org.apache.lucene.queryparser.flexible.core.nodes">OpaqueQueryNode</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/processors/OpenRangeQueryNodeProcessor.html" title="class in org.apache.lucene.queryparser.flexible.standard.processors">OpenRangeQueryNodeProcessor</A> <BR> <A HREF="org/apache/lucene/queryparser/surround/query/OrQuery.html" title="class in org.apache.lucene.queryparser.surround.query">OrQuery</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/nodes/OrQueryNode.html" title="class in org.apache.lucene.queryparser.flexible.core.nodes">OrQueryNode</A> <BR> <A HREF="org/apache/lucene/queryparser/classic/ParseException.html" title="class in org.apache.lucene.queryparser.classic">ParseException</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/parser/ParseException.html" title="class in org.apache.lucene.queryparser.flexible.standard.parser">ParseException</A> <BR> <A HREF="org/apache/lucene/queryparser/surround/parser/ParseException.html" title="class in org.apache.lucene.queryparser.surround.parser">ParseException</A> <BR> <A HREF="org/apache/lucene/queryparser/xml/ParserException.html" title="class in org.apache.lucene.queryparser.xml">ParserException</A> <BR> <A HREF="org/apache/lucene/queryparser/ext/ParserExtension.html" title="class in org.apache.lucene.queryparser.ext">ParserExtension</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/nodes/PathQueryNode.html" title="class in org.apache.lucene.queryparser.flexible.core.nodes">PathQueryNode</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/nodes/PathQueryNode.QueryText.html" title="class in org.apache.lucene.queryparser.flexible.core.nodes">PathQueryNode.QueryText</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/builders/PhraseQueryNodeBuilder.html" title="class in org.apache.lucene.queryparser.flexible.standard.builders">PhraseQueryNodeBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/nodes/PhraseSlopQueryNode.html" title="class in org.apache.lucene.queryparser.flexible.core.nodes">PhraseSlopQueryNode</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/processors/PhraseSlopQueryNodeProcessor.html" title="class in org.apache.lucene.queryparser.flexible.standard.processors">PhraseSlopQueryNodeProcessor</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/precedence/processors/PrecedenceQueryNodeProcessorPipeline.html" title="class in org.apache.lucene.queryparser.flexible.precedence.processors">PrecedenceQueryNodeProcessorPipeline</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/precedence/PrecedenceQueryParser.html" title="class in org.apache.lucene.queryparser.flexible.precedence">PrecedenceQueryParser</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/nodes/PrefixWildcardQueryNode.html" title="class in org.apache.lucene.queryparser.flexible.standard.nodes">PrefixWildcardQueryNode</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/builders/PrefixWildcardQueryNodeBuilder.html" title="class in org.apache.lucene.queryparser.flexible.standard.builders">PrefixWildcardQueryNodeBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/nodes/ProximityQueryNode.html" title="class in org.apache.lucene.queryparser.flexible.core.nodes">ProximityQueryNode</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/nodes/ProximityQueryNode.ProximityType.html" title="class in org.apache.lucene.queryparser.flexible.core.nodes">ProximityQueryNode.ProximityType</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/nodes/ProximityQueryNode.Type.html" title="enum in org.apache.lucene.queryparser.flexible.core.nodes">ProximityQueryNode.Type</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/builders/QueryBuilder.html" title="interface in org.apache.lucene.queryparser.flexible.core.builders"><I>QueryBuilder</I></A> <BR> <A HREF="org/apache/lucene/queryparser/xml/QueryBuilder.html" title="interface in org.apache.lucene.queryparser.xml"><I>QueryBuilder</I></A> <BR> <A HREF="org/apache/lucene/queryparser/xml/QueryBuilderFactory.html" title="class in org.apache.lucene.queryparser.xml">QueryBuilderFactory</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/config/QueryConfigHandler.html" title="class in org.apache.lucene.queryparser.flexible.core.config">QueryConfigHandler</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/nodes/QueryNode.html" title="interface in org.apache.lucene.queryparser.flexible.core.nodes"><I>QueryNode</I></A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/QueryNodeError.html" title="class in org.apache.lucene.queryparser.flexible.core">QueryNodeError</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/QueryNodeException.html" title="class in org.apache.lucene.queryparser.flexible.core">QueryNodeException</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/nodes/QueryNodeImpl.html" title="class in org.apache.lucene.queryparser.flexible.core.nodes">QueryNodeImpl</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/util/QueryNodeOperation.html" title="class in org.apache.lucene.queryparser.flexible.core.util">QueryNodeOperation</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/QueryNodeParseException.html" title="class in org.apache.lucene.queryparser.flexible.core">QueryNodeParseException</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/processors/QueryNodeProcessor.html" title="interface in org.apache.lucene.queryparser.flexible.core.processors"><I>QueryNodeProcessor</I></A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/processors/QueryNodeProcessorImpl.html" title="class in org.apache.lucene.queryparser.flexible.core.processors">QueryNodeProcessorImpl</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/processors/QueryNodeProcessorPipeline.html" title="class in org.apache.lucene.queryparser.flexible.core.processors">QueryNodeProcessorPipeline</A> <BR> <A HREF="org/apache/lucene/queryparser/classic/QueryParser.html" title="class in org.apache.lucene.queryparser.classic">QueryParser</A> <BR> <A HREF="org/apache/lucene/queryparser/surround/parser/QueryParser.html" title="class in org.apache.lucene.queryparser.surround.parser">QueryParser</A> <BR> <A HREF="org/apache/lucene/queryparser/classic/QueryParser.Operator.html" title="enum in org.apache.lucene.queryparser.classic">QueryParser.Operator</A> <BR> <A HREF="org/apache/lucene/queryparser/classic/QueryParserBase.html" title="class in org.apache.lucene.queryparser.classic">QueryParserBase</A> <BR> <A HREF="org/apache/lucene/queryparser/classic/QueryParserBase.MethodRemovedUseAnother.html" title="class in org.apache.lucene.queryparser.classic">QueryParserBase.MethodRemovedUseAnother</A> <BR> <A HREF="org/apache/lucene/queryparser/classic/QueryParserConstants.html" title="interface in org.apache.lucene.queryparser.classic"><I>QueryParserConstants</I></A> <BR> <A HREF="org/apache/lucene/queryparser/surround/parser/QueryParserConstants.html" title="interface in org.apache.lucene.queryparser.surround.parser"><I>QueryParserConstants</I></A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/QueryParserHelper.html" title="class in org.apache.lucene.queryparser.flexible.core">QueryParserHelper</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/messages/QueryParserMessages.html" title="class in org.apache.lucene.queryparser.flexible.core.messages">QueryParserMessages</A> <BR> <A HREF="org/apache/lucene/queryparser/classic/QueryParserTokenManager.html" title="class in org.apache.lucene.queryparser.classic">QueryParserTokenManager</A> <BR> <A HREF="org/apache/lucene/queryparser/surround/parser/QueryParserTokenManager.html" title="class in org.apache.lucene.queryparser.surround.parser">QueryParserTokenManager</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/QueryParserUtil.html" title="class in org.apache.lucene.queryparser.flexible.standard">QueryParserUtil</A> <BR> <A HREF="org/apache/lucene/queryparser/xml/QueryTemplateManager.html" title="class in org.apache.lucene.queryparser.xml">QueryTemplateManager</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/builders/QueryTreeBuilder.html" title="class in org.apache.lucene.queryparser.flexible.core.builders">QueryTreeBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/nodes/QuotedFieldQueryNode.html" title="class in org.apache.lucene.queryparser.flexible.core.nodes">QuotedFieldQueryNode</A> <BR> <A HREF="org/apache/lucene/queryparser/xml/builders/RangeFilterBuilder.html" title="class in org.apache.lucene.queryparser.xml.builders">RangeFilterBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/nodes/RangeQueryNode.html" title="interface in org.apache.lucene.queryparser.flexible.core.nodes"><I>RangeQueryNode</I></A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/nodes/RegexpQueryNode.html" title="class in org.apache.lucene.queryparser.flexible.standard.nodes">RegexpQueryNode</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/builders/RegexpQueryNodeBuilder.html" title="class in org.apache.lucene.queryparser.flexible.standard.builders">RegexpQueryNodeBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/processors/RemoveDeletedQueryNodesProcessor.html" title="class in org.apache.lucene.queryparser.flexible.core.processors">RemoveDeletedQueryNodesProcessor</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/processors/RemoveEmptyNonLeafQueryNodeProcessor.html" title="class in org.apache.lucene.queryparser.flexible.standard.processors">RemoveEmptyNonLeafQueryNodeProcessor</A> <BR> <A HREF="org/apache/lucene/queryparser/surround/query/SimpleTerm.html" title="class in org.apache.lucene.queryparser.surround.query">SimpleTerm</A> <BR> <A HREF="org/apache/lucene/queryparser/surround/query/SimpleTerm.MatchingTermVisitor.html" title="interface in org.apache.lucene.queryparser.surround.query"><I>SimpleTerm.MatchingTermVisitor</I></A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/nodes/SlopQueryNode.html" title="class in org.apache.lucene.queryparser.flexible.core.nodes">SlopQueryNode</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/builders/SlopQueryNodeBuilder.html" title="class in org.apache.lucene.queryparser.flexible.standard.builders">SlopQueryNodeBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/xml/builders/SpanBuilderBase.html" title="class in org.apache.lucene.queryparser.xml.builders">SpanBuilderBase</A> <BR> <A HREF="org/apache/lucene/queryparser/xml/builders/SpanFirstBuilder.html" title="class in org.apache.lucene.queryparser.xml.builders">SpanFirstBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/xml/builders/SpanNearBuilder.html" title="class in org.apache.lucene.queryparser.xml.builders">SpanNearBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/surround/query/SpanNearClauseFactory.html" title="class in org.apache.lucene.queryparser.surround.query">SpanNearClauseFactory</A> <BR> <A HREF="org/apache/lucene/queryparser/xml/builders/SpanNotBuilder.html" title="class in org.apache.lucene.queryparser.xml.builders">SpanNotBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/xml/builders/SpanOrBuilder.html" title="class in org.apache.lucene.queryparser.xml.builders">SpanOrBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/xml/builders/SpanOrTermsBuilder.html" title="class in org.apache.lucene.queryparser.xml.builders">SpanOrTermsBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/xml/builders/SpanQueryBuilder.html" title="interface in org.apache.lucene.queryparser.xml.builders"><I>SpanQueryBuilder</I></A> <BR> <A HREF="org/apache/lucene/queryparser/xml/builders/SpanQueryBuilderFactory.html" title="class in org.apache.lucene.queryparser.xml.builders">SpanQueryBuilderFactory</A> <BR> <A HREF="org/apache/lucene/queryparser/xml/builders/SpanTermBuilder.html" title="class in org.apache.lucene.queryparser.xml.builders">SpanTermBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/surround/query/SrndPrefixQuery.html" title="class in org.apache.lucene.queryparser.surround.query">SrndPrefixQuery</A> <BR> <A HREF="org/apache/lucene/queryparser/surround/query/SrndQuery.html" title="class in org.apache.lucene.queryparser.surround.query">SrndQuery</A> <BR> <A HREF="org/apache/lucene/queryparser/surround/query/SrndTermQuery.html" title="class in org.apache.lucene.queryparser.surround.query">SrndTermQuery</A> <BR> <A HREF="org/apache/lucene/queryparser/surround/query/SrndTruncQuery.html" title="class in org.apache.lucene.queryparser.surround.query">SrndTruncQuery</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/nodes/StandardBooleanQueryNode.html" title="class in org.apache.lucene.queryparser.flexible.standard.nodes">StandardBooleanQueryNode</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/builders/StandardBooleanQueryNodeBuilder.html" title="class in org.apache.lucene.queryparser.flexible.standard.builders">StandardBooleanQueryNodeBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/builders/StandardQueryBuilder.html" title="interface in org.apache.lucene.queryparser.flexible.standard.builders"><I>StandardQueryBuilder</I></A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/config/StandardQueryConfigHandler.html" title="class in org.apache.lucene.queryparser.flexible.standard.config">StandardQueryConfigHandler</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/config/StandardQueryConfigHandler.ConfigurationKeys.html" title="class in org.apache.lucene.queryparser.flexible.standard.config">StandardQueryConfigHandler.ConfigurationKeys</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/config/StandardQueryConfigHandler.Operator.html" title="enum in org.apache.lucene.queryparser.flexible.standard.config">StandardQueryConfigHandler.Operator</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/processors/StandardQueryNodeProcessorPipeline.html" title="class in org.apache.lucene.queryparser.flexible.standard.processors">StandardQueryNodeProcessorPipeline</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/StandardQueryParser.html" title="class in org.apache.lucene.queryparser.flexible.standard">StandardQueryParser</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/builders/StandardQueryTreeBuilder.html" title="class in org.apache.lucene.queryparser.flexible.standard.builders">StandardQueryTreeBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/parser/StandardSyntaxParser.html" title="class in org.apache.lucene.queryparser.flexible.standard.parser">StandardSyntaxParser</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/parser/StandardSyntaxParserConstants.html" title="interface in org.apache.lucene.queryparser.flexible.standard.parser"><I>StandardSyntaxParserConstants</I></A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/parser/StandardSyntaxParserTokenManager.html" title="class in org.apache.lucene.queryparser.flexible.standard.parser">StandardSyntaxParserTokenManager</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/util/StringUtils.html" title="class in org.apache.lucene.queryparser.flexible.core.util">StringUtils</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/parser/SyntaxParser.html" title="interface in org.apache.lucene.queryparser.flexible.core.parser"><I>SyntaxParser</I></A> <BR> <A HREF="org/apache/lucene/queryparser/xml/builders/TermQueryBuilder.html" title="class in org.apache.lucene.queryparser.xml.builders">TermQueryBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/nodes/TermRangeQueryNode.html" title="class in org.apache.lucene.queryparser.flexible.standard.nodes">TermRangeQueryNode</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/builders/TermRangeQueryNodeBuilder.html" title="class in org.apache.lucene.queryparser.flexible.standard.builders">TermRangeQueryNodeBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/processors/TermRangeQueryNodeProcessor.html" title="class in org.apache.lucene.queryparser.flexible.standard.processors">TermRangeQueryNodeProcessor</A> <BR> <A HREF="org/apache/lucene/queryparser/xml/builders/TermsFilterBuilder.html" title="class in org.apache.lucene.queryparser.xml.builders">TermsFilterBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/xml/builders/TermsQueryBuilder.html" title="class in org.apache.lucene.queryparser.xml.builders">TermsQueryBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/nodes/TextableQueryNode.html" title="interface in org.apache.lucene.queryparser.flexible.core.nodes"><I>TextableQueryNode</I></A> <BR> <A HREF="org/apache/lucene/queryparser/classic/Token.html" title="class in org.apache.lucene.queryparser.classic">Token</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/parser/Token.html" title="class in org.apache.lucene.queryparser.flexible.standard.parser">Token</A> <BR> <A HREF="org/apache/lucene/queryparser/surround/parser/Token.html" title="class in org.apache.lucene.queryparser.surround.parser">Token</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/nodes/TokenizedPhraseQueryNode.html" title="class in org.apache.lucene.queryparser.flexible.core.nodes">TokenizedPhraseQueryNode</A> <BR> <A HREF="org/apache/lucene/queryparser/classic/TokenMgrError.html" title="class in org.apache.lucene.queryparser.classic">TokenMgrError</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/parser/TokenMgrError.html" title="class in org.apache.lucene.queryparser.flexible.standard.parser">TokenMgrError</A> <BR> <A HREF="org/apache/lucene/queryparser/surround/parser/TokenMgrError.html" title="class in org.apache.lucene.queryparser.surround.parser">TokenMgrError</A> <BR> <A HREF="org/apache/lucene/queryparser/surround/query/TooManyBasicQueries.html" title="class in org.apache.lucene.queryparser.surround.query">TooManyBasicQueries</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/util/UnescapedCharSequence.html" title="class in org.apache.lucene.queryparser.flexible.core.util">UnescapedCharSequence</A> <BR> <A HREF="org/apache/lucene/queryparser/xml/builders/UserInputQueryBuilder.html" title="class in org.apache.lucene.queryparser.xml.builders">UserInputQueryBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/core/nodes/ValueQueryNode.html" title="interface in org.apache.lucene.queryparser.flexible.core.nodes"><I>ValueQueryNode</I></A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/nodes/WildcardQueryNode.html" title="class in org.apache.lucene.queryparser.flexible.standard.nodes">WildcardQueryNode</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/builders/WildcardQueryNodeBuilder.html" title="class in org.apache.lucene.queryparser.flexible.standard.builders">WildcardQueryNodeBuilder</A> <BR> <A HREF="org/apache/lucene/queryparser/flexible/standard/processors/WildcardQueryNodeProcessor.html" title="class in org.apache.lucene.queryparser.flexible.standard.processors">WildcardQueryNodeProcessor</A> <BR> </FONT></TD> </TR> </TABLE> </BODY> </HTML>
dburgmann/fbRecommender
lib/lucene-4.0.0/docs/queryparser/allclasses-noframe.html
HTML
gpl-3.0
39,356
# Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = right class Solution: def invertTree(self, root: TreeNode) -> TreeNode: def recurse(node): if not node: return node node.left, node.right = recurse(node.right), recurse(node.left) return node return recurse(root)
1337/yesterday-i-learned
leetcode/226e.py
Python
gpl-3.0
474
/* * Copyright appNativa Inc. All Rights Reserved. * * This file is part of the Real-time Application Rendering Engine (RARE). * * RARE 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.appnativa.rare.viewer; import javax.swing.ActionMap; import com.appnativa.rare.iConstants; import com.appnativa.rare.platform.ActionHelper; import com.appnativa.rare.platform.swing.ui.DataItemListModel; import com.appnativa.rare.platform.swing.ui.EditableListBoxListHandler; import com.appnativa.rare.platform.swing.ui.util.SwingHelper; import com.appnativa.rare.platform.swing.ui.view.ListView; import com.appnativa.rare.spot.ListBox; import com.appnativa.rare.spot.Viewer; import com.appnativa.rare.ui.Column; import com.appnativa.rare.ui.RenderableDataItem; import com.appnativa.rare.ui.ScrollPanePanel; import com.appnativa.rare.ui.iListView.EditingMode; import com.appnativa.rare.ui.iToolBar; import com.appnativa.rare.ui.event.iExpansionListener; import com.appnativa.rare.ui.renderer.ListItemRenderer; import com.appnativa.rare.widget.iWidget; /** * A widget that allows a user to select one or more choices from a * scrollable list of items. * * @author Don DeCoteau */ public class ListBoxViewer extends aListViewer { /** * Constructs a new instance */ public ListBoxViewer() { this(null); } /** * Constructs a new instance * * @param parent the parent */ public ListBoxViewer(iContainer parent) { super(parent); widgetType = WidgetType.ListBox; initiallySelectedIndex = -1; } @Override public void configure(Viewer vcfg) { configureEx((ListBox) vcfg); handleDataURL(vcfg); fireConfigureEvent(vcfg, iConstants.EVENT_CONFIGURE); } /** * Creates a new listbox widget * * @param parent the parent * @param cfg the configuration * * @return the listbox widget */ public static ListBoxViewer create(iContainer parent, ListBox cfg) { ListBoxViewer widget = new ListBoxViewer(parent); widget.configure(cfg); return widget; } @Override public void dispose() { if (!isDisposable()) { return; } super.dispose(); if (listModel != null) { listModel.dispose(); } listModel = null; } /** * Notifies the list that the contents of the specified row has changed * * @param index the index of the row that changed */ @Override public void repaintRow(int index) { if (listModel != null) { listModel.rowChanged(index); } } /** * Notifies the list that the contents of the specified row has changed * * @param item the instance of the row that changed */ @Override public void rowChanged(RenderableDataItem item) { if (listModel != null) { listModel.rowChanged(item); } } /** * Notifies the list that the contents of the specified range of rows have changed * * @param firstRow the first row * @param lastRow the last row */ @Override public void rowsChanged(int firstRow, int lastRow) { listModel.rowsChanged(firstRow, lastRow); } @Override public void setAutoSizeRowsToFit(boolean autoSize) { ListView v = (ListView) getDataView(); v.setAutoSizeRows(autoSize); } @Override public void setEditModeListener(iExpansionListener l) { ListView v = (ListView) getDataView(); v.setEditModeListener(l); } @Override public void setRowEditModeListener(iExpansionListener l) { ListView v = (ListView) getDataView(); v.setRowEditModeListener(l); } @Override public void setItemDescription(Column itemDescription) { super.setItemDescription(itemDescription); if (itemDescription != null) { ((ListView) getDataView()).getItemRenderer().setItemDescription(itemDescription); if (itemDescription.getFont() != null) { dataComponent.setFont(itemDescription.getFont()); formComponent.setFont(itemDescription.getFont()); } } } @Override public void setRowEditingWidget(iWidget widget, boolean centerVertically) { super.setRowEditingWidget(widget, centerVertically); ListView v = (ListView) getDataView(); v.setRowEditingComponent(widget.getContainerComponent(), centerVertically); } @Override public void setSelectionMode(SelectionMode selectionMode) { super.setSelectionMode(selectionMode); ListView v = (ListView) getDataView(); v.setSelectionMode(selectionMode); } @Override public void setShowLastDivider(boolean show) { ListView v = (ListView) getDataView(); v.setShowLastDivider(show); } @Override protected void createModelAndComponents(Viewer vcfg) { ListBox cfg = (ListBox) vcfg; listModel = new DataItemListModel(); ListView list = getAppContext().getComponentCreator().getList(this, cfg); ActionMap am = list.getList().getActionMap(); am.put("Rare.origSelectNextRow", am.get("selectNextRow")); am.put("Rare.origSelectPreviousRow", am.get("selectPreviousRow")); am.put("selectNextRow", ActionHelper.selectNextRow); am.put("selectPreviousRow", ActionHelper.selectPreviousRow); formComponent = dataComponent = new ScrollPanePanel(list); formComponent=SwingHelper.configureScrollPane(this,formComponent, list, cfg.getScrollPane()); list.setItemRenderer(new ListItemRenderer(list, true)); listComponent = new EditableListBoxListHandler(list, listModel); list.setListModel(listModel); iToolBar tb = createEditingToolbarIfNecessary(cfg); if (tb != null) { list.setEditModeToolBar(tb); } registerWithWidget(list.getListComponent()); } @Override protected void setEditingMode(EditingMode mode, boolean autoEnd, boolean allowSwiping) { ListView v = (ListView) getDataView(); v.setAutoEndEditing(autoEnd); v.setEditingMode(mode); v.setEditingSwipingAllowed(allowSwiping); } }
appnativa/rare
source/rare/swingx/com/appnativa/rare/viewer/ListBoxViewer.java
Java
gpl-3.0
6,719
/* -*- mode: c; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; coding: utf-8 -*- */ /** ****************************************************************************** * @file EEPROM_Emulation/src/eeprom.c * @author MCD Application Team * @version V1.0.0 * @date 10-October-2011 * @brief This file provides all the EEPROM emulation firmware functions. ****************************************************************************** * @attention * * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. * * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2> ****************************************************************************** */ /** @addtogroup EEPROM_Emulation * @{ */ // Common #include "uhsdr_board.h" #ifdef STM32F7 #include "stm32f7xx_hal_flash_ex.h" #elif defined(STM32H7) #include "stm32h7xx_hal_flash_ex.h" #else #include "stm32f4xx_hal_flash_ex.h" #endif /* Includes ------------------------------------------------------------------*/ #include "eeprom.h" /* Private typedef -----------------------------------------------------------*/ /* Private define ------------------------------------------------------------*/ #define VAR_ADDR_START (0xAA01) // this value is required to remain unchanged in order to not break existing mcHF flash configuration // readings. It is otherwise just an arbitrary number. /* Private macro -------------------------------------------------------------*/ /* Private variables ---------------------------------------------------------*/ /* Global variable used to store variable value in read sequence */ static uint16_t DataVar = 0; /* Virtual address defined by the user: 0xFFFF value is prohibited */ /* Private function prototypes -----------------------------------------------*/ /* Private functions ---------------------------------------------------------*/ static HAL_StatusTypeDef Flash_Format(); static uint16_t Flash_FindPage(uint8_t Operation); static uint16_t Flash_WriteVariableToPage(uint16_t VirtAddress, uint16_t Data, uint8_t pageType); static uint16_t Flash_PageTransfer(uint16_t VirtAddress); HAL_StatusTypeDef Flash_Erase(uint32_t sector) { FLASH_EraseInitTypeDef flashEraseOp; uint32_t sectorError = 0; flashEraseOp.Sector = sector; flashEraseOp.NbSectors = 1; flashEraseOp.VoltageRange = VOLTAGE_RANGE_3; flashEraseOp.TypeErase = FLASH_TYPEERASE_SECTORS; return HAL_FLASHEx_Erase(&flashEraseOp, &sectorError); } /** * This code encapsulates the former direct use of mapping table * Since we never used the mapping table except for mapping to an offset, * we now use code to convert the id (start from 0) to addresses (starting from VAR_ADDR_START) * This allows full backward compatibility of stored settings. */ uint16_t Flash_GetVirtAddrForId(uint16_t id) { return VAR_ADDR_START + id; } static HAL_StatusTypeDef Flash_Program(uint32_t toAddress,uint16_t value) { HAL_StatusTypeDef retval = HAL_ERROR; #ifndef STM32H7 retval = HAL_FLASH_Program(FLASH_TYPEPROGRAM_HALFWORD,toAddress, value); #endif return retval; } static bool Flash_PageIsErased(uint8_t page) { bool retval = true; uint32_t* pagePtr = (uint32_t*)(page==PAGE0?PAGE0_BASE_ADDRESS:PAGE1_BASE_ADDRESS); for (uint16_t idx = 0; idx < PAGE_SIZE/sizeof(uint32_t);idx++) { if (pagePtr[idx] != 0xFFFFFFFF) { retval =false; break; } } return retval; } HAL_StatusTypeDef Flash_Check_And_EraseIfNeeded(uint8_t page) { HAL_StatusTypeDef retval = HAL_OK; if (Flash_PageIsErased(page) == false) { retval =Flash_Erase(page == PAGE0? PAGE0_ID : PAGE1_ID); } return retval; } static uint16_t Flash_TransferFullPage(uint8_t fromPage, uint8_t toPage, bool skip, uint16_t skipAddress) { uint32_t toPageBaseAddress = toPage==PAGE0?PAGE0_BASE_ADDRESS:PAGE1_BASE_ADDRESS; // uint32_t fromPageBaseAddress = fromPage==PAGE0?PAGE0_BASE_ADDRESS:PAGE1_BASE_ADDRESS; uint16_t retval = HAL_OK; /* Transfer data from Page0 to Page1 */ for (uint16_t VarIdx = 0; retval == HAL_OK && VarIdx < NB_OF_VAR; VarIdx++) { uint16_t virtAddress = Flash_GetVirtAddrForId(VarIdx); if ((*(__IO uint16_t*)(toPageBaseAddress + 6)) != virtAddress && (!skip || virtAddress != skipAddress)) { /* Read the last variables' updates */ uint16_t ReadStatus = Flash_ReadVariable(virtAddress, &DataVar); /* In case variable corresponding to the virtual address was found */ if (ReadStatus != 0x1) { /* Transfer the variable to the Page1 */ retval = Flash_WriteVariableToPage(virtAddress, DataVar, RECEIVE_WRITE_PAGE); /* If program operation was failed, a Flash error code is returned */ if (retval != HAL_OK) { break; } } } } /* Mark toPage as valid */ retval = Flash_Program(toPageBaseAddress, VALID_PAGE); /* If program operation was failed, a Flash error code is returned */ if (retval == HAL_OK) { /* Erase Page0 */ retval = Flash_Erase(fromPage); /* If erase operation was failed, a Flash error code is returned */ } return retval; } /** * @brief Restore the pages to a known good state in case of page's status * corruption after a power loss. * @param None. * @retval - Flash error code: on write Flash error * - HAL_OK: on success */ uint16_t Flash_InitA(void) { /* 1 * 0: V E R ? * V EB C0 T0 E0 * E C1 V0 E0 E0 * R T1 EB EB EB * ? E1 E1 EB EB * * Cx: Check Erase x * Ex: Erase x 0,1,Both * Tx: Transfer to x * V0: Make Page 0 valid page */ uint16_t PageStatus0, PageStatus1; uint16_t retval = 0x80; // FIXME: F7PORT: How to get rid of this? After change, boards needs reflash // if the process can do dual bank mode, // switch this ON, otherwise we have already the correct // sector layout #if defined (FLASH_OPTCR_nDBANK) HAL_FLASH_OB_Unlock(); FLASH->OPTCR &= ~FLASH_OPTCR_nDBANK; HAL_FLASH_OB_Launch(); HAL_FLASH_OB_Lock(); #endif /* Get Page0 status */ PageStatus0 = (*(__IO uint16_t*)PAGE0_BASE_ADDRESS); /* Get Page1 status */ PageStatus1 = (*(__IO uint16_t*)PAGE1_BASE_ADDRESS); /* Check for invalid header states and repair if necessary */ switch (PageStatus0) { case ERASED: if (PageStatus1 == VALID_PAGE) /* Page0 erased, Page1 valid */ { /* Erase Page0 */ retval = Flash_Check_And_EraseIfNeeded(PAGE0); } else if (PageStatus1 == RECEIVE_DATA) /* Page0 erased, Page1 receive */ { /* Erase Page0 */ retval = Flash_Check_And_EraseIfNeeded(PAGE0); /* If erase operation was failed, a Flash error code is returned */ if (retval == HAL_OK) { /* Mark Page1 as valid */ retval = Flash_Program(PAGE1_BASE_ADDRESS, VALID_PAGE); /* If program operation was failed, a Flash error code is returned */ } } break; case RECEIVE_DATA: if (PageStatus1 == VALID_PAGE) /* Page0 receive, Page1 valid */ { retval = Flash_TransferFullPage(PAGE1_ID, PAGE0_ID, false, 0); /* Transfer data from Page1 to Page0 */ } else if (PageStatus1 == ERASED) /* Page0 receive, Page1 erased */ { /* Erase Page1 */ retval = Flash_Check_And_EraseIfNeeded(PAGE0); /* If erase operation was failed, a Flash error code is returned */ if (retval == HAL_OK) { /* Mark Page0 as valid */ retval = Flash_Program(PAGE0_BASE_ADDRESS, VALID_PAGE); } /* If program operation was failed, a Flash error code is returned */ } break; case VALID_PAGE: if (PageStatus1 == VALID_PAGE) /* Invalid state -> format eeprom */ { /* Erase both Page0 and Page1 and set Page0 as valid page */ retval = Flash_Format(); } else if (PageStatus1 == ERASED) /* Page0 valid, Page1 erased */ { /* Erase Page1 */ retval = Flash_Check_And_EraseIfNeeded(PAGE1); /* If erase operation was failed, a Flash error code is returned */ } else if (PageStatus1 == RECEIVE_DATA)/* Page0 valid, Page1 receive */ { retval = Flash_TransferFullPage(PAGE0_ID, PAGE1_ID, false, 0); } else { /* Invalid state on page1 -> format eeprom page 1 */ retval = Flash_Check_And_EraseIfNeeded(PAGE1); } break; default: if (PageStatus1 == VALID_PAGE) /* Invalid state on page0 -> format eeprom page 0 */ { /* Erase Page0 */ retval = Flash_Check_And_EraseIfNeeded(PAGE0); } } if (retval == 0x80) { /* In case of real trouble we try to recover by erasing the whole flash memory */ retval = Flash_Format(); } return retval; } // Proxy uint16_t Flash_Init(void) { uint16_t res; HAL_FLASH_Unlock(); res = Flash_InitA(); HAL_FLASH_Lock(); return res; } /** * @brief Returns the last stored variable data, if found, which correspond to * the passed virtual address * @param VirtAddress: Variable virtual address * @param Data: Global variable contains the read variable value * @retval Success or error status: * - 0: if variable was found * - 1: if the variable was not found * - NO_VALID_PAGE: if no valid page was found. */ uint16_t Flash_ReadVariable(uint16_t addr, uint16_t* value) { uint16_t VirtAddress = Flash_GetVirtAddrForId(addr); uint16_t ValidPage; uint16_t AddressValue = 0x5555, ReadStatus = 1; uint32_t Address = EEPROM_START_ADDRESS, PageStartAddress = EEPROM_START_ADDRESS; /* Get active Page for read operation */ ValidPage = Flash_FindPage(READ_FROM_VALID_PAGE); /* Check if there is no valid page */ if (ValidPage == NO_VALID_PAGE) { return NO_VALID_PAGE; } /* Get the valid Page start Address */ PageStartAddress = (uint32_t)(EEPROM_START_ADDRESS + (uint32_t)(ValidPage * PAGE_SIZE)); /* Get the valid Page end Address */ Address = (uint32_t)((EEPROM_START_ADDRESS - 2) + (uint32_t)((1 + ValidPage) * PAGE_SIZE)); /* Check each active page address starting from end */ while (Address > (PageStartAddress + 2)) { /* Get the current location content to be compared with virtual address */ AddressValue = (*(__IO uint16_t*)Address); /* Compare the read address with the virtual address */ if (AddressValue == VirtAddress) { /* Get content of Address-2 which is variable value */ *value = (*(__IO uint16_t*)(Address - 2)); /* In case variable value is read, reset ReadStatus flag */ ReadStatus = 0; break; } else { /* Next address location */ Address = Address - 4; } } /* Return ReadStatus value: (0: variable exist, 1: variable doesn't exist) */ return ReadStatus; } /** * @brief Writes/updates variable data in EEPROM if necessary. * @param VirtAddress: Variable virtual address * @param Data: 16 bit data to be written * @retval Success or error status: * - HAL_OK: on success * - PAGE_FULL: if valid page is full * - NO_VALID_PAGE: if no valid page was found * - Flash error code: on write Flash error */ uint16_t Flash_UpdateVariable(uint16_t addr, uint16_t value) { uint16_t DataRead = 0; uint16_t Status = 0; Status = Flash_ReadVariable(addr,&DataRead); // the variable was found and the data content is equal to the new value // -> no need to write it again if (Status == 0 && DataRead == value) { Status = HAL_OK; } else { Status = Flash_WriteVariable(addr, value); } return Status; } /** * @brief Writes/updates variable data in EEPROM. * @param VirtAddress: Variable virtual address * @param Data: 16 bit data to be written * @retval Success or error status: * - HAL_OK: on success * - PAGE_FULL: if valid page is full * - NO_VALID_PAGE: if no valid page was found * - Flash error code: on write Flash error */ uint16_t Flash_WriteVariable(uint16_t addr, uint16_t value) { uint16_t retval = 0; uint16_t VirtAddress = Flash_GetVirtAddrForId(addr); HAL_FLASH_Unlock(); /* Write the variable virtual address and value in the EEPROM */ retval = Flash_WriteVariableToPage(VirtAddress, value,WRITE_TO_VALID_PAGE); /* In case the EEPROM active page is full */ if (retval == PAGE_FULL) { /* Perform Page transfer and retry write*/ retval = Flash_PageTransfer(VirtAddress); if (retval == HAL_OK) { retval = Flash_WriteVariableToPage(VirtAddress, value,WRITE_TO_VALID_PAGE); } } HAL_FLASH_Lock(); /* Return last operation status */ return retval; } /** * @brief Erases PAGE and PAGE1 and writes VALID_PAGE header to PAGE * @param None * @retval Status of the last operation (Flash write or erase) done during * EEPROM formating */ static HAL_StatusTypeDef Flash_Format(void) { HAL_StatusTypeDef FlashStatus; /* Erase Page0 */ FlashStatus = Flash_Erase(PAGE0_ID); /* If erase operation was failed, a Flash error code is returned */ if (FlashStatus != HAL_OK) { return FlashStatus; } /* Set Page0 as valid page: Write VALID_PAGE at Page0 base address */ FlashStatus = Flash_Program(PAGE0_BASE_ADDRESS, VALID_PAGE); /* If program operation was failed, a Flash error code is returned */ if (FlashStatus != HAL_OK) { return FlashStatus; } /* Erase Page1 */ FlashStatus = Flash_Erase(PAGE1_ID); /* Return Page1 erase operation status */ return FlashStatus; } /** * @brief Find valid Page for write or read operation * @param Operation: operation to achieve on the valid page. * This parameter can be one of the following values: * @arg READ_FROM_VALID_PAGE: read operation from valid page * @arg WRITE_IN_VALID_PAGE: write operation from valid page * @retval Valid page number (PAGE or PAGE1) or NO_VALID_PAGE in case * of no valid page was found */ static uint16_t Flash_FindPage(uint8_t Operation) { uint16_t PageStatus0, PageStatus1; /* Get Page0 actual status */ PageStatus0 = (*(__IO uint16_t*)PAGE0_BASE_ADDRESS); /* Get Page1 actual status */ PageStatus1 = (*(__IO uint16_t*)PAGE1_BASE_ADDRESS); uint16_t retval = NO_VALID_PAGE; /* Write or read operation */ switch (Operation) { case RECEIVE_WRITE_PAGE: /* ---- Write operation ---- */ if (PageStatus1 == VALID_PAGE) { /* Page0 receiving data */ if (PageStatus0 == RECEIVE_DATA) { retval = PAGE0; /* Page0 valid */ } } else if (PageStatus0 == VALID_PAGE) { /* Page1 receiving data */ if (PageStatus1 == RECEIVE_DATA) { retval = PAGE1; /* Page1 valid */ } } break; case READ_FROM_VALID_PAGE: /* ---- Read operation ---- */ if (PageStatus0 == VALID_PAGE) { retval = PAGE0; /* Page0 valid */ } else if (PageStatus1 == VALID_PAGE) { retval = PAGE1; /* Page1 valid */ } break; case WRITE_TO_VALID_PAGE: /* ---- Read operation ---- */ if (PageStatus0 == VALID_PAGE) { retval = PAGE0; /* Page0 valid */ } else if (PageStatus1 == VALID_PAGE) { retval = PAGE1; /* Page1 valid */ } } return retval; } /** * @brief Verify if active page is full and Writes variable in EEPROM. * @param VirtAddress: 16 bit virtual address of the variable * @param Data: 16 bit data to be written as variable value * @retval Success or error status: * - HAL_OK: on success * - PAGE_FULL: if valid page is full * - NO_VALID_PAGE: if no valid page was found * - Flash error code: on write Flash error */ static uint16_t Flash_WriteVariableToPage(uint16_t VirtAddress, uint16_t Data, uint8_t pageType) { uint16_t retval = PAGE_FULL; uint16_t ReceivePage; uint32_t Address = EEPROM_START_ADDRESS, PageEndAddress = EEPROM_START_ADDRESS+PAGE_SIZE; /* Get valid Page for write operation */ ReceivePage = Flash_FindPage(pageType); /* Check if there is no valid page */ if (ReceivePage == NO_VALID_PAGE) { retval = NO_VALID_PAGE; } else { /* Get the valid Page start Address */ Address = (uint32_t)(EEPROM_START_ADDRESS + (uint32_t)(ReceivePage * PAGE_SIZE)); /* Get the valid Page end Address */ PageEndAddress = (uint32_t)((EEPROM_START_ADDRESS - 2) + (uint32_t)((1 + ReceivePage) * PAGE_SIZE)); /* Check each active page address starting from begining */ for (;Address < PageEndAddress;Address += 4) { /* Verify if Address and Address+2 contents are 0xFFFFFFFF */ if ((*(__IO uint32_t*)Address) == 0xFFFFFFFF) { /* Set variable data */ retval = Flash_Program(Address, Data); /* If program operation was okay, proceed */ if (retval == HAL_OK) { /* Set variable virtual address */ retval = Flash_Program( Address + 2, VirtAddress); } break; } } } return retval; } /** * @brief Transfers last updated variables data from the full Page to * an empty one. * @param VirtAddress: 16 bit virtual address of the variable * @param Data: 16 bit data to be written as variable value * @retval Success or error status: * - HAL_OK: on success * - PAGE_FULL: if valid page is full * - NO_VALID_PAGE: if no valid page was found * - Flash error code: on write Flash error */ static uint16_t Flash_PageTransfer(uint16_t VirtAddress) { uint32_t NewPageAddress; uint16_t ValidPage; uint16_t NewPage; uint16_t retval = HAL_OK; /* Get active Page for read operation */ ValidPage = Flash_FindPage(READ_FROM_VALID_PAGE); if (ValidPage == PAGE1) /* Page1 valid */ { /* New page address where variable will be moved to */ NewPageAddress = PAGE0_BASE_ADDRESS; NewPage = PAGE0; } else if (ValidPage == PAGE0) /* Page0 valid */ { /* New page address where variable will be moved to */ NewPageAddress = PAGE1_BASE_ADDRESS; NewPage = PAGE1; } else { retval = NO_VALID_PAGE; /* No valid Page */ } if (retval == HAL_OK ) { /* Set the new Page status to RECEIVE_DATA status */ retval = Flash_Program(NewPageAddress, RECEIVE_DATA); /* If program operation was failed, a Flash error code is returned */ if (retval == HAL_OK) { retval = Flash_TransferFullPage(ValidPage,NewPage,true,VirtAddress); } } /* Return last operation flash status */ return retval; } /** * @} */ /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
dl2fw/mchf-github
mchf-eclipse/misc/v_eprom/eeprom.c
C
gpl-3.0
20,479
package domain.model; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.ManyToOne; import org.hibernate.annotations.OnDelete; import org.hibernate.annotations.OnDeleteAction; /** * The Class PlaneModel. */ @Entity public class PlaneModel { /** The id. */ @Id @GeneratedValue private Integer id; /** The name. */ private String name; /** The plane maker. */ @ManyToOne(optional = false) @OnDelete(action = OnDeleteAction.CASCADE) private PlaneMaker planeMaker; /** * Gets the id. * * @return the id */ public Integer getId() { return id; } /** * Sets the id. * * @param id * the new id */ public void setId(Integer id) { this.id = id; } /** * Gets the name. * * @return the name */ public String getName() { return name; } /** * Sets the name. * * @param name * the new name */ public void setName(String name) { this.name = name; } /** * Gets the plane maker. * * @return the plane maker */ public PlaneMaker getPlaneMaker() { return planeMaker; } /** * Sets the plane maker. * * @param planeMaker * the new plane maker */ public void setPlaneMaker(PlaneMaker planeMaker) { this.planeMaker = planeMaker; } }
Maracars/POPBL5
src/domain/model/PlaneModel.java
Java
gpl-3.0
1,329
import requests import random import time user_agent_generic="Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0" # In case of providers whose request do not follow a regular pattern, you can use code here to form it ############################################################################################################ # list of affected provider_codes custom_url_list=('DK','DOP40','NIB','Here') custom_url_list = custom_url_list+tuple([x + '_NAIP' for x in ( 'AL','AR','AZ','CA','CO','CT','DE','FL','GA','IA','ID','IL', 'IN','KS','KY','LA','MA','MD','ME','MI','MN','MO','MS','MT', 'NC','ND','NE','NH','NJ','NM','NV','NY','OH','OK','OR','PA', 'RI','SC','SD','TN','TX','UT','VA','VT','WA','WI','WV','WY')]) ############################################################################################################ ############################################################################################################ # might get some session tokens here ############################################################################################################ # Denmark DK_time=time.time() DK_ticket=None def get_DK_ticket(): global DK_time, DK_ticket while DK_ticket=="loading": print(" Waiting for DK ticket to be updated.") time.sleep(3) if (not DK_ticket) or (time.time()-DK_time)>=3600: DK_ticket="loading" tmp=requests.packages.urllib3.util.ssl_.DEFAULT_CIPHERS requests.packages.urllib3.util.ssl_.DEFAULT_CIPHERS='HIGH:!DH:!aNULL' DK_ticket=requests.get("https://sdfekort.dk/spatialmap?").content.decode().split('ticket=')[1].split("'")[0] requests.packages.urllib3.util.ssl_.DEFAULT_CIPHERS=tmp DK_time=time.time() return DK_ticket # Germany DOP40 DOP40_time=time.time() DOP40_cookie=None def get_DOP40_cookie(): global DOP40_time, DOP40_cookie while DOP40_cookie=="loading": print(" Waiting for DOP40 cookie to be updated.") time.sleep(3) if (not DOP40_cookie) or (time.time()-DOP40_time)>=3600: DOP40_cookie="loading" DOP40_cookie=requests.Session().get('https://sg.geodatenzentrum.de/web_bkg_webmap/lib/bkgwebmap-0.12.4.all.min.js?bkg_appid=4cc455dc-a595-bbcf-0d00-c1d81caab5c3').headers['Set-Cookie'].split(';')[0] DOP40_time=time.time() return DOP40_cookie # NorgeIbilder NIB_time=time.time() NIB_token=None def get_NIB_token(): global NIB_time, NIB_token while NIB_token=="loading": print(" Waiting for NIB token to be updated.") time.sleep(3) if (not NIB_token) or (time.time()-NIB_time)>=3600: NIB_token="loading" NIB_token=str(requests.get('http://www.norgeibilder.no').content).split('nibToken')[1].split("'")[1][:-1] NIB_time=time.time() return NIB_token # Here Here_time=time.time() Here_value=None def get_Here_value(): global Here_time, Here_value while Here_value=="loading": print(" Waiting for Here value to be updated.") time.sleep(3) if (not Here_value) or (time.time()-Here_time)>=10000: Here_value="loading" Here_value=str(requests.get('https://wego.here.com').content).split('aerial.maps.api.here.com/maptile/2.1')[1][:100].split('"')[4] Here_time=time.time() return Here_value ############################################################################################################ def custom_wms_request(bbox,width,height,provider): if provider['code']=='DK': (xmin,ymax,xmax,ymin)=bbox bbox_string=str(xmin)+','+str(ymin)+','+str(xmax)+','+str(ymax) url="http://kortforsyningen.kms.dk/orto_foraar?TICKET="+get_DK_ticket()+"&SERVICE=WMS&VERSION=1.1.1&FORMAT=image/jpeg&REQUEST=GetMap&LAYERS=orto_foraar&STYLES=&SRS=EPSG:3857&WIDTH="+str(width)+"&HEIGHT="+str(height)+"&BBOX="+bbox_string return (url,None) elif provider['code']=='DOP40': (xmin,ymax,xmax,ymin)=bbox bbox_string=str(xmin)+','+str(ymin)+','+str(xmax)+','+str(ymax) url="http://sg.geodatenzentrum.de/wms_dop40?&SERVICE=WMS&VERSION=1.1.1&FORMAT=image/jpeg&REQUEST=GetMap&LAYERS=rgb&STYLES=&SRS=EPSG:25832&WIDTH="+str(width)+"&HEIGHT="+str(height)+"&BBOX="+bbox_string fake_headers={'User-Agent':user_agent_generic,'Accept':'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8','Connection':'keep-alive','Accept-Encoding':'gzip, deflate','Cookie':get_DOP40_cookie(),'Referer':'http://sg.geodatenzentrum.de/web_bkg_webmap/applications/dop/dop_viewer.html'} return (url,fake_headers) elif '_NAIP' in provider['code']: (xmin,ymax,xmax,ymin)=bbox url="https://gis.apfo.usda.gov/arcgis/rest/services/NAIP_Historical/"+provider['code']+"/ImageServer/exportImage?f=image&bbox="+str(xmin)+"%2C"+str(ymin)+"%2C"+str(xmax)+"%2C"+str(ymax)+"&imageSR=102100&bboxSR=102100&size="+str(width)+"%2C"+str(height) return (url,None) def custom_tms_request(tilematrix,til_x,til_y,provider): if provider['code']=='NIB': NIB_token=get_NIB_token() url="http://agsservices.norgeibilder.no/arcgis/rest/services/Nibcache_UTM33_EUREF89_v2/MapServer/tile/"+str(tilematrix)+"/"+str(til_y)+"/"+str(til_x)+"?token="+NIB_token return (url,None) elif provider['code']=='Here': Here_value=get_Here_value() url="https://"+random.choice(['1','2','3','4'])+".aerial.maps.api.here.com/maptile/2.1/maptile/"+Here_value+"/satellite.day/"+str(tilematrix)+"/"+str(til_x)+"/"+str(til_y)+"/256/jpg?app_id=bC4fb9WQfCCZfkxspD4z&app_code=K2Cpd_EKDzrZb1tz0zdpeQ" return (url,None)
oscarpilote/Ortho4XP
Providers/O4_Custom_URL.py
Python
gpl-3.0
5,644
#include "chunk.h" #include "chunk_model.h" #include "voxel.h" using minecpp::Chunk; Chunk::Chunk(const ChunkLocation& location, ResourceContainer& resourceContainer) noexcept : model{std::make_unique<ChunkModel>(location, resourceContainer)}, location{location} { } Chunk::Chunk(Chunk&&) noexcept = default; Chunk::~Chunk() = default; Chunk& Chunk::operator=(Chunk&&) noexcept = default; const Chunk* Chunk::findChunk(int x, int y, int z, ptrdiff_t& index) const noexcept { if (x >= 0 && x < constants::CHUNK_WIDTH && z >= 0 && z < constants::CHUNK_WIDTH && y >= 0 && y < constants::CHUNK_HEIGHT) { index = Chunk::getVoxelIndex(x, y, z); return this; } if (x < 0) { if (neightbors.left) { return neightbors.left->findChunk(constants::CHUNK_WIDTH + x, y, z, index); } } else if (x >= constants::CHUNK_WIDTH) { if (neightbors.right) { return neightbors.right->findChunk(x - constants::CHUNK_WIDTH, y, z, index); } } if (z < 0) { if (neightbors.back) { return neightbors.back->findChunk(x, y, constants::CHUNK_WIDTH + z, index); } } else if (z >= constants::CHUNK_WIDTH) { if (neightbors.front) { return neightbors.front->findChunk(x, y, z - constants::CHUNK_WIDTH, index); } } return nullptr; } Chunk* Chunk::findChunk(int x, int y, int z, ptrdiff_t& index) noexcept { return const_cast<Chunk*>(const_cast<const Chunk*>(this)->findChunk(x, y, z, index)); } unsigned Chunk::findVoxel(int x, int y, int z) const noexcept { ptrdiff_t index; const Chunk* const chunkFound = findChunk(x, y, z, index); if (chunkFound) return *(chunkFound->voxels + index); return voxel::Types::NUM_TYPES; } unsigned Chunk::findLight(int x, int y, int z) const noexcept { ptrdiff_t index; const Chunk* const chunkFound = findChunk(x, y, z, index); if (chunkFound) return *(chunkFound->lights + index); return 0; }
jangolare/MineCPP
src/chunk.cpp
C++
gpl-3.0
2,096
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <html> <head> </head> <body bgcolor="white"> <p> Classes to convert JIU image objects to other image types that require more memory. This is a lossless operation, all information is kept. However, the new image object typically requires more memory to store the same information. A promotion operation is necessary if a certain operation cannot be performed on a <q>smaller</q> image type, but once the image has been promoted to a <q>larger</q> type, the operation becomes possible. <p> Example: Convolution kernel filtering cannot be applied to paletted images. They require intensity information on each pixel. Once a paletted image has been promoted to be an RGB truecolor image, filtering is possible. <!-- Put @see and @since tags down here. --> </body> </html>
juehv/DentalImageViewer
DentalImageViewer/lib/jiu-0.14.3/net/sourceforge/jiu/color/promotion/package.html
HTML
gpl-3.0
826
#!/usr/bin/env python import argparse import errno import glob import os import subprocess import sys import zipfile dirs = ("", "entity", "entity/chest", "colormap", "blocks", "entity/shulker", "entity/bed") assets = "assets/minecraft/textures/" files = [ ("entity/chest/normal.png", assets + "entity/chest/normal.png"), ("entity/chest/normal_double.png", assets + "entity/chest/normal_double.png"), ("entity/chest/ender.png", assets + "entity/chest/ender.png"), ("entity/chest/trapped.png", assets + "entity/chest/trapped.png"), ("entity/chest/trapped_double.png", assets + "entity/chest/trapped_double.png"), ("colormap/foliage.png", assets + "colormap/foliage.png"), ("colormap/grass.png", assets + "colormap/grass.png"), ("entity/shulker/shulker_black.png", assets + "entity/shulker/shulker_black.png"), ("entity/shulker/shulker_blue.png", assets + "entity/shulker/shulker_blue.png"), ("entity/shulker/shulker_brown.png", assets + "entity/shulker/shulker_brown.png"), ("entity/shulker/shulker_cyan.png", assets + "entity/shulker/shulker_cyan.png"), ("entity/shulker/shulker_gray.png", assets + "entity/shulker/shulker_gray.png"), ("entity/shulker/shulker_green.png", assets + "entity/shulker/shulker_green.png"), ("entity/shulker/shulker_light_blue.png", assets + "entity/shulker/shulker_light_blue.png"), ("entity/shulker/shulker_lime.png", assets + "entity/shulker/shulker_lime.png"), ("entity/shulker/shulker_magenta.png", assets + "entity/shulker/shulker_magenta.png"), ("entity/shulker/shulker_orange.png", assets + "entity/shulker/shulker_orange.png"), ("entity/shulker/shulker_pink.png", assets + "entity/shulker/shulker_pink.png"), ("entity/shulker/shulker_purple.png", assets + "entity/shulker/shulker_purple.png"), ("entity/shulker/shulker_red.png", assets + "entity/shulker/shulker_red.png"), ("entity/shulker/shulker_silver.png", assets + "entity/shulker/shulker_silver.png"), ("entity/shulker/shulker_white.png", assets + "entity/shulker/shulker_white.png"), ("entity/shulker/shulker_yellow.png", assets + "entity/shulker/shulker_yellow.png"), ("entity/bed/black.png", assets + "entity/bed/black.png"), ("entity/bed/blue.png", assets + "entity/bed/blue.png"), ("entity/bed/brown.png", assets + "entity/bed/brown.png"), ("entity/bed/cyan.png", assets + "entity/bed/cyan.png"), ("entity/bed/gray.png", assets + "entity/bed/gray.png"), ("entity/bed/green.png", assets + "entity/bed/green.png"), ("entity/bed/light_blue.png", assets + "entity/bed/light_blue.png"), ("entity/bed/lime.png", assets + "entity/bed/lime.png"), ("entity/bed/magenta.png", assets + "entity/bed/magenta.png"), ("entity/bed/orange.png", assets + "entity/bed/orange.png"), ("entity/bed/pink.png", assets + "entity/bed/pink.png"), ("entity/bed/purple.png", assets + "entity/bed/purple.png"), ("entity/bed/red.png", assets + "entity/bed/red.png"), ("entity/bed/silver.png", assets + "entity/bed/silver.png"), ("entity/bed/white.png", assets + "entity/bed/white.png"), ("entity/bed/yellow.png", assets + "entity/bed/yellow.png"), ] def has_imagemagick(): try: # try to call convert command subprocess.check_output("convert") return True except subprocess.CalledProcessError: # command exited with error status, probably because we didn't specify any files to convert return True except OSError as e: # return False if command not found if e.errno == errno.ENOENT: return False raise e if __name__ == "__main__": parser = argparse.ArgumentParser(description="Extracts from a Minecraft Jar file the textures required for mapcrafter.") parser.add_argument("-f", "--force", help="forces overwriting eventually already existing textures", action="store_true") parser.add_argument("jarfile", help="the Minecraft Jar file to use", metavar="<jarfile>") parser.add_argument("outdir", help="the output texture directory", metavar="<outdir>") args = vars(parser.parse_args()) jar = zipfile.ZipFile(args["jarfile"]) for dir in dirs: if not os.path.exists(os.path.join(args["outdir"], dir)): os.mkdir(os.path.join(args["outdir"], dir)) print("Extracting block images:") found, extracted, skipped = 0, 0, 0 for info in jar.infolist(): if info.filename.startswith("assets/minecraft/textures/blocks/") and info.filename != "assets/minecraft/textures/blocks/": filename = info.filename.replace("assets/minecraft/textures/", "") # unpack only PNGs, no other files (or directory entries) if not filename.endswith(".png"): continue # make sure to not unpack subdirectories base_path = os.path.dirname(filename) if base_path != os.path.dirname("blocks/test.png"): continue filename = os.path.join(args["outdir"], filename) found += 1 if os.path.exists(filename) and not args["force"]: skipped += 1 continue fin = jar.open(info) fout = open(filename, "wb") fout.write(fin.read()) fin.close() fout.close() extracted += 1 print(" - Found %d block images." % found) print(" - Extracted %d." % extracted) print(" - Skipped %d (Use -f to force overwrite)." % skipped) print("") print("Extracting other textures:") for filename, zipname in files: try: info = jar.getinfo(zipname) filename = os.path.join(args["outdir"], filename) if os.path.exists(filename) and not args["force"]: print(" - Extracting %s ... skipped." % filename) else: fin = jar.open(info) fout = open(filename, "wb") fout.write(fin.read()) fin.close() fout.close() print(" - Extracting %s ... extracted." % filename) except KeyError: print(" - Extracting %s ... not found!" % filename) if not has_imagemagick(): print("") print("Warning: imagemagick is not installed (command 'convert' not found).") print("Install imagemagick to enable automatic texture fixes (to prevent libpng warnings).") else: for filename in glob.glob(os.path.join(args["outdir"], "blocks", "hardened_clay*.png")): if os.path.exists(filename): subprocess.check_call(["convert", "-strip", filename, filename]) filename = os.path.join(args["outdir"], "blocks", "red_sand.png") if os.path.exists(filename): subprocess.check_call(["convert", "-strip", filename, filename]) filename = os.path.join(args["outdir"], "blocks", "glass_pane_top_white.png") if os.path.exists(filename): subprocess.check_call(["convert", "-strip", filename, "-type", "TrueColorMatte", "-define", "png:color-type=6", filename])
mapcrafter/mapcrafter
src/tools/mapcrafter_textures.py
Python
gpl-3.0
6,484
(function($){ $.fn.MKNotification = function(mknOptions){ var mkn = $.extend({ 'MKMessage' : 'Default Message!', 'MKDelay' : 'None', 'MKIcon' : 'None', 'MKSound' : 'None' },mknOptions); var docHeight = $(document).height(); return this.each(function(index, element){ if(mkn.MKIcon=="None"){ var MKNotificationIcon = ""; }else{ var MKNotificationIcon = '<div id="MKNotificationIcon"><img src="'+mkn.MKIcon+'"></div>'; } if(mkn.MKSound!="None"){ function MKSound(){ var audioElement = document.createElement('audio'); audioElement.setAttribute('src', mkn.MKSound); audioElement.setAttribute('autoplay', 'autoplay'); $.get(); audioElement.addEventListener("load", function() { audioElement.play(); }, true); } } if(mkn.MKDelay=="None"){ var MKNotificationShow = $('body').append('<div id="MKNotification"><div class="MKNotification"><div id="MKNotificationText">'+MKNotificationIcon+mkn.MKMessage+'</div></div></div>'); $('body').find("#MKNotification").hide().slideDown(200); MKSound(); }else { var MKNotificationShow = $('body').append('<div id="MKNotification"><div class="MKNotification"><div id="MKNotificationText">'+MKNotificationIcon+mkn.MKMessage+'</div></div></div>'); $('body').find("#MKNotification").hide().slideDown(200); MKSound(); setTimeout(function(){ $('body').find("#MKNotification").slideUp(200, function() { $(this).remove(); } ); }, mkn.MKDelay); } }); } })(jQuery);
mustafakucuk/MKNotification
MKNotification.js
JavaScript
gpl-3.0
1,750
#include "tabuRealloc.h" #define REALLOC_AUTHOR "TEYPAZ" #define REALLOC_IDENTIFIER "S14" int main(int argc, char * argv[]) { reallocTimer timer; std::ifstream file_data; std::ifstream file_solution; std::ofstream file_result; //SRandom(0); if (argc == 1) { timer.activate_for_time_sec(300); file_data.open("model_a1_1.txt"); file_solution.open("assignment_a1_1.txt"); file_result.open("solution_a1_1"); } else { for (int i = 0; i < argc; ++i) { if (std::string(argv[i]) == "-t") { //std::cout << argv[i + 1]<<"\n"; timer.activate_for_time_sec(atof(argv[i + 1])-0.5); } else if (std::string(argv[i]) == "-p") { //std::cout << argv[i + 1]<<"\n"; file_data.open(argv[i + 1]); } else if (std::string(argv[i]) == "-i") { //std::cout << argv[i + 1]<<"\n"; file_solution.open(argv[i + 1]); } else if (std::string(argv[i]) == "-o") { //std::cout << argv[i + 1]<<"\n"; file_result.open(argv[i + 1]); } else if (std::string(argv[i]) == "-s") { //SRandom(atoi(argv[i + 1])); } else if (std::string(argv[i]) == "-name") { std::cout << REALLOC_IDENTIFIER << std::endl; } /*else if (std::string(argv[i]) == "-class") { nb_classes = atoi(argv[i + 1]); //std::cout << "nb_classes" <<nb_classes<<"\n"; } else if (std::string(argv[i]) == "-update") { update = atoi(argv[i + 1]); //std::cout << "coeff" <<coeff<<"\n"; }*/ } } if (file_solution.is_open() && file_data.is_open()) { tabuReallocInstance temp(timer); temp.loadFile(file_data); temp.loadInitialAffectation(file_solution); temp.search(file_result); file_result.close(); } return 0; }
nicoteyp/ROADEF2012-S14
src/tabuReallocMain.cpp
C++
gpl-3.0
1,695
/* MegaMek - Copyright (C) 2004,2005 Ben Mazur (bmazur@sev.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. */ /* * Created on Sep 25, 2004 * */ package megamek.common.weapons; import megamek.common.TechConstants; /** * @author Jay Lawson */ public class CLNL55Weapon extends NavalLaserWeapon { /** * */ private static final long serialVersionUID = 8756042527483383101L; /** * */ public CLNL55Weapon() { super(); techLevel.put(3071, TechConstants.T_CLAN_ADVANCED); this.name = "Naval Laser 55 (Clan)"; this.setInternalName(this.name); this.addLookupName("CLNL55"); this.heat = 85; this.damage = 5; this.shortRange = 13; this.mediumRange = 26; this.longRange = 39; this.extremeRange = 52; this.tonnage = 1100.0f; this.bv = 1386; this.cost = 1250000; this.shortAV = 5.5; this.medAV = 5.5; this.longAV = 5.5; this.extAV = 5.5; this.maxRange = RANGE_EXT; introDate = 2820; techLevel.put(2820, techLevel.get(3071)); availRating = new int[] { RATING_X, RATING_D, RATING_C }; techRating = RATING_D; } }
chvink/kilomek
megamek/src/megamek/common/weapons/CLNL55Weapon.java
Java
gpl-3.0
1,706
/* * This file is part of SQLDatabaseAPI (2012). * * SQLDatabaseAPI 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. * * SQLDatabaseAPI 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 SQLDatabaseAPI. If not, see <http://www.gnu.org/licenses/>. * * Last modified: 29.12.12 15:35 */ package com.p000ison.dev.sqlapi; /** * This class represents a column. Known implementations are {@link FieldColumn} (Used to store {@link com.p000ison.dev.sqlapi.annotation.DatabaseColumn}s) * and {@link MethodColumn} (Used to store {@link com.p000ison.dev.sqlapi.annotation.DatabaseColumnSetter}s. */ public abstract class Column { protected Column() { } /** * Gets the class of the java object which represents this column * * @return The type of this column */ public abstract Class<?> getType(); /** * Gets the name of the column * * @return The name of the column */ public abstract String getName(); /** * Gets the position of the column. This can be any value above or equal 0 or -1 if the order does not matter. * * @return The position of the column in the table */ public abstract int getPosition(); /** * Gets a optional default value for this column or a empty string * * @return A optional default value */ public abstract String getDefaultValue(); /** * Gets the lenght of this column like { 5, 10 } or a empty array if there is no lenght. * * @return The lenght of the column or a empty array. */ public abstract int[] getLength(); /** * Whether this column should autoincrement * * @return Weather this column should autoincrement */ public abstract boolean isAutoIncrementing(); /** * Whether this column can be null * * @return Whether this column can be null */ public abstract boolean isNotNull(); /** * Whether this column is unique * * @return Whether this column is unique */ public abstract boolean isUnique(); /** * Sets a value for the column in the {@link TableObject}. * * @param tableObject The table object to modify * @param object The object to set the column to */ public abstract void setValue(TableObject tableObject, Object object); /** * Gets the value for the column in the {@link TableObject}. * * @param tableObject The table object * @return The value */ public abstract Object getValue(TableObject tableObject); /** * Checks if the type is serializable so we can store it in a blob * * @return Weather this type is serializable */ public boolean isSerializable() { return RegisteredTable.isSerializable(getType()); } public abstract boolean isID(); public abstract boolean isSaveInputAfterLoading(); }
maxammann/SAM
src/main/java/com/p000ison/dev/sqlapi/Column.java
Java
gpl-3.0
3,360
#ifndef _NES_VDEV_H_ #define _NES_VDEV_H_ // °üº¬Í·Îļþ #include "stdefine.h" // ÀàÐͶ¨Òå typedef struct { void* (*create )(int w, int h, DWORD extra); void (*destroy )(void *ctxt); void (*dequeue )(void *ctxt, void **buf, int *stride); void (*enqueue )(void *ctxt); void (*textout )(void *ctxt, int x, int y, char *text, int time, int priority); void (*setfullscreen)(void *ctxt, int full); int (*getfullscreen)(void *ctxt); } VDEV; // È«¾Ö±äÁ¿ÉùÃ÷ extern VDEV DEV_GDI; extern VDEV DEV_D3D; #endif
rockcarry/ffnes
src/vdev.h
C
gpl-3.0
588
CREATE TABLE "deq_portland_metro_vehicle_inspection_stations" ( "station_name" text, "address" text, "details" text, "icon" text );
talos/docker4data
data/socrata/data.oregon.gov/deq_portland_metro_vehicle_inspection_stations/schema.sql
SQL
gpl-3.0
136
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!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/html; charset=UTF-8" /> <title>bpfcos</title> <link rel="stylesheet" type="text/css" href="csound.css" /> <link rel="stylesheet" type="text/css" href="syntax-highlighting.css" /> <meta name="generator" content="DocBook XSL Stylesheets V1.79.1" /> <link rel="home" href="index.html" title="The Canonical Csound Reference Manual" /> <link rel="up" href="OpcodesTop.html" title="Orchestra Opcodes and Operators" /> <link rel="prev" href="bpf.html" title="bpf" /> <link rel="next" href="bqrez.html" title="bqrez" /> </head> <body> <div class="navheader"> <table width="100%" summary="Navigation header"> <tr> <th colspan="3" align="center">bpfcos</th> </tr> <tr> <td width="20%" align="left"><a accesskey="p" href="bpf.html">Prev</a> </td> <th width="60%" align="center">Orchestra Opcodes and Operators</th> <td width="20%" align="right"> <a accesskey="n" href="bqrez.html">Next</a></td> </tr> </table> <hr /> </div> <div class="refentry"> <a id="bpfcos"></a> <div class="titlepage"></div> <a id="IndexBpfcos" class="indexterm"></a> <div class="refnamediv"> <h2> <span class="refentrytitle">bpfcos</span> </h2> <p>bpfcos — Break point function with cosine (easy-in/easy-out) interpolation </p> </div> <div class="refsect1"> <a id="idm431510573040"></a> <h2>Description</h2> <p>Plugin opcode in emugens.</p> <p> Break-point function with cosine interpolation. Given an x value and a series of pairs (x, y), it returns the corresponding y value in the half cosine curve defined by the pairs. It works both at i- and k- time </p> </div> <div class="refsect1"> <a id="idm431510571248"></a> <h2>Syntax</h2> <pre class="synopsis">ky <span class="command"><strong>bpfcos</strong></span> kx, kx1, ky1, kx2, ..., kxn, kyn</pre> <pre class="synopsis">kys[] <span class="command"><strong>bpfcos</strong></span> kxs[], kx1, ky1, kx2, ..., kxn, kyn</pre> </div> <div class="refsect1"> <a id="idm431510567568"></a> <h2>Performance</h2> <p> <span class="strong"><strong>kx</strong></span> -- Input value. Can also be an array </p> <p> <span class="strong"><strong>kxn, kyn</strong></span> -- Defines a breakpoint. Can be changed at krate, but all <span class="emphasis"><em>kx</em></span>s must be sorted </p> <p> The points (kx1, ky1), (kx2, ky2), etc, define a cosine interpolated function. This function is evaluated at point <span class="emphasis"><em>kx</em></span>. This function extends to both -inf and +inf, so if kx &lt; kx1 then ky = ky1 and the same holds true the other end. </p> <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"> <table border="0" summary="Note"> <tr> <td rowspan="2" align="center" valign="top" width="25"> <img alt="[Note]" src="images/note.png" /> </td> <th align="left">Note</th> </tr> <tr> <td align="left" valign="top"> <p> x values need to be sorted. Both x and y values can change but x values must stay sorted. </p> </td> </tr> </table> </div> </div> <div class="refsect1"> <a id="idm431510562000"></a> <h2>Examples</h2> <p> Here is an example of the bpfcos opcode. It uses the file <a class="ulink" href="examples/bpfcos.csd" target="_top"><em class="citetitle">bpfcos.csd</em></a>. </p> <div class="example"> <a id="idm431510559296"></a> <p class="title"> <strong>Example 100. Example of the bpfcos opcode.</strong> </p> <div class="example-contents"> <div class="refsect1"> <a id="idm431888380480"></a> <pre class="programlisting"> <span class="nt">&lt;CsoundSynthesizer&gt;</span> <span class="nt">&lt;CsOptions&gt;</span> <span class="nt">&lt;/CsOptions&gt;</span> <span class="nt">&lt;CsInstruments&gt;</span> <span class="c1">; Example for opcode bpfcos</span> <span class="cm">/* bpf stands for Break Point Function Given an x value and a series of pairs (x, y), it returns the corresponding y value in the half cosine curve defined by the pairs It works both at i- and k- time ky bpfcos kx, kx0, ky0, kx1, ky1, kx2, ky2, ... kys[] bpfcos kxs[], kx0, ky0, kx1, ky1, kx2, ky2, ... NB: x values must be ordered (kx0 &lt; kx1 &lt; kx2 etc) See also: bpf, linlin, lincos */</span> <span class="vg">ksmps</span> <span class="o">=</span> <span class="mi">64</span> <span class="vg">nchnls</span> <span class="o">=</span> <span class="mi">1</span> <span class="vg">0dbfs</span> <span class="o">=</span> <span class="mi">1</span> <span class="kd">instr</span> <span class="nf">1</span> k<span class="n">x</span> <span class="nb">line</span> <span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="nb">p3</span><span class="p">,</span> <span class="mf">2.5</span> k<span class="n">y</span> <span class="n">bpfcos</span> k<span class="n">x</span><span class="p">,</span> \ <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> \ <span class="mf">1.01</span><span class="p">,</span> <span class="mi">10</span><span class="p">,</span> \ <span class="mi">2</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> \ <span class="mf">2.5</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span> <span class="nb">printks</span> <span class="s">"kx: %f ky: %f </span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="mf">0.1</span><span class="p">,</span> k<span class="n">x</span><span class="p">,</span> k<span class="n">y</span> <span class="kd">endin</span> <span class="kd">instr</span> <span class="nf">2</span> <span class="c1">; test i-time</span> i<span class="n">x</span> <span class="o">=</span> <span class="mf">1.2</span> i<span class="n">y</span> <span class="n">bpfcos</span> i<span class="n">x</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span><span class="mi">5</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span><span class="mi">10</span><span class="p">,</span> <span class="mf">1.5</span><span class="p">,</span><span class="mi">15</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span><span class="mi">20</span><span class="p">,</span> <span class="mf">2.5</span><span class="p">,</span><span class="mi">25</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span><span class="mi">30</span> <span class="nb">print</span> i<span class="n">y</span> <span class="nb">turnoff</span> <span class="kd">endin</span> <span class="kd">instr</span> <span class="nf">3</span> <span class="c1">; bpfcos also works with arrays</span> k<span class="n">x</span><span class="p">[]</span> <span class="nb">fillarray</span> <span class="mi">0</span><span class="p">,</span> <span class="mf">0.15</span><span class="p">,</span> <span class="mf">0.25</span><span class="p">,</span> <span class="mf">0.35</span><span class="p">,</span> <span class="mf">0.45</span><span class="p">,</span> <span class="mf">0.55</span><span class="p">,</span> <span class="mf">0.6</span> k<span class="n">y</span><span class="p">[]</span> <span class="n">bpfcos</span> k<span class="n">x</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span> <span class="mf">0.1</span><span class="p">,</span><span class="mi">10</span><span class="p">,</span> <span class="mf">0.2</span><span class="p">,</span><span class="mi">20</span><span class="p">,</span> <span class="mf">0.3</span><span class="p">,</span><span class="mi">30</span><span class="p">,</span> <span class="mf">0.4</span><span class="p">,</span><span class="mi">40</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span><span class="mi">50</span> <span class="n">printarray</span> k<span class="n">y</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="s">""</span><span class="p">,</span> <span class="s">"ky="</span> <span class="nb">turnoff</span> <span class="kd">endin</span> <span class="kd">instr</span> <span class="nf">4</span> k<span class="n">pitch</span> <span class="n">bpfcos</span> <span class="nb">timeinsts</span><span class="p">(),</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">60</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">61</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">65</span><span class="p">,</span> <span class="mf">3.5</span><span class="p">,</span> <span class="mi">60</span> a<span class="n">0</span> <span class="nb">oscili</span> <span class="mf">0.5</span><span class="p">,</span> <span class="n">mtof</span><span class="p">(</span>k<span class="n">pitch</span><span class="p">)</span> k<span class="n">env0</span> <span class="nb">linseg</span> <span class="mi">0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="nb">p3</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mi">0</span> k<span class="n">env</span> <span class="n">bpfcos</span> k<span class="n">env0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.25</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mf">0.7</span> a<span class="n">0</span> <span class="o">*=</span> <span class="nb">interp</span><span class="p">(</span>k<span class="n">env</span><span class="p">)</span> <span class="nb">outch</span> <span class="mi">1</span><span class="p">,</span> a<span class="n">0</span> <span class="kd">endin</span> <span class="nt">&lt;/CsInstruments&gt;</span> <span class="nt">&lt;CsScore&gt;</span> <span class="nb">i</span> <span class="mi">1</span> <span class="mi">1</span> <span class="mi">3</span> <span class="nb">i</span> <span class="mi">2</span> <span class="mi">0</span> <span class="o">-</span><span class="mi">1</span> <span class="nb">i</span> <span class="mi">3</span> <span class="mi">0</span> <span class="o">-</span><span class="mi">1</span> <span class="nb">i</span> <span class="mi">4</span> <span class="mi">0</span> <span class="mi">5</span> <span class="nt">&lt;/CsScore&gt;</span> <span class="nt">&lt;/CsoundSynthesizer&gt;</span> </pre> </div> </div> </div> <p><br class="example-break" /> </p> </div> <div class="refsect1"> <a id="idm431510557712"></a> <h2>See Also</h2> <p> <a class="link" href="bpf.html" title="bpf"><em class="citetitle">bpf</em></a>, <a class="link" href="lincos.html" title="lincos"><em class="citetitle">lincos</em></a>, <a class="link" href="cosseg.html" title="cosseg"><em class="citetitle">cosseg</em></a> <a class="link" href="linlin.html" title="linlin"><em class="citetitle">linlin</em></a>, <a class="link" href="scale.html" title="scale"><em class="citetitle">scale</em></a>, <a class="link" href="ntrpol.html" title="ntrpol"><em class="citetitle">ntrpol</em></a>, <a class="link" href="xyscale.html" title="xyscale"><em class="citetitle">xyscale</em></a> </p> </div> <div class="refsect1"> <a id="idm431510551088"></a> <h2>Credits</h2> <p>By: Eduardo Moguillansky 2018</p> <p>New plugin in version 6.12</p> </div> </div> <div class="navfooter"> <hr /> <table width="100%" summary="Navigation footer"> <tr> <td width="40%" align="left"><a accesskey="p" href="bpf.html">Prev</a> </td> <td width="20%" align="center"> <a accesskey="u" href="OpcodesTop.html">Up</a> </td> <td width="40%" align="right"> <a accesskey="n" href="bqrez.html">Next</a></td> </tr> <tr> <td width="40%" align="left" valign="top">bpf </td> <td width="20%" align="center"> <a accesskey="h" href="index.html">Home</a> </td> <td width="40%" align="right" valign="top"> bqrez</td> </tr> </table> </div> </body> </html>
belangeo/cecilia4csound
Resources/html/bpfcos.html
HTML
gpl-3.0
13,537
from database import Database import argparse class Analyzer(): ignores = ['id', 'time', 'browser_fingerprint', 'computer_fingerprint_1', "fonts"] db = Database('uniquemachine') cols = db.run_sql("SHOW COLUMNS FROM features") def __init__(self): pass def check_imgs_difference_by_str(self, str_1, str_2): """ check the differences of two gpu rendering result strs vars: str_1, str_2 return: the differences """ imgs_1 = str_1.split(',') imgs_2 = str_2.split(',') length = len(imgs_1) if len(imgs_2) != length: return "different number of imgs" imgs_1 = sorted(imgs_1, key=lambda img: int(img.split('_')[0])) imgs_2 = sorted(imgs_2, key=lambda img: int(img.split('_')[0])) res = {} for i in range(length): img_1 = imgs_1[i].split('_')[2] img_2 = imgs_2[i].split('_')[2] if img_1 != img_2: res[i] = (img_1, img_2) return res def check_fonts_difference_by_str(self, str_1, str_2): """ check the differences of two font lists vars: str_1, str_2 return: the differences """ if str_1 == None or str_2 == None: return ([], []) fonts_1 = str_1.split('_') fonts_2 = str_2.split('_') f1 = [] f2 = [] for f in fonts_1: if f not in fonts_2: f1.append(f) for f in fonts_2: if f not in fonts_1: f2.append(f) return (f1, f2) def output_diff(self, keys, values): length = len(keys) for i in range(length): print '\t'+ str(keys[i]) + ': \t' + str(values[i]) def check_difference_by_id(self, base_id, entry_id, detail): """ check the difference of two entries based on the ids vars: id1, id2, print details or not return: the array of differences """ base_entry = self.db.get_entry_by_id('features', base_id) compare_entry = self.db.get_entry_by_id('features', entry_id) length = len(base_entry) res = {} for i in range(length): if self.cols[i][0] in self.ignores: continue if base_entry[i] != compare_entry[i]: if self.cols[i][0] == 'gpuimgs': diff = self.check_imgs_difference_by_str(base_entry[i], compare_entry[i]) if len(diff) == 0: continue res[self.cols[i][0]] = diff if (detail): print self.cols[i][0] self.output_diff(diff.keys(), diff.values()) elif self.cols[i][0] == 'flashFonts': diff = self.check_fonts_difference_by_str(base_entry[i], compare_entry[i]) res[self.cols[i][0]] = diff if detail == True: print self.cols[i][0] self.output_diff([base_id, entry_id], diff) else: res[self.cols[i][0]] = [base_entry[i], compare_entry[i]] if detail == True: print self.cols[i][0] self.output_diff([base_id, entry_id], [base_entry[i], compare_entry[i]]) return res def cal_gpuimgs_distance(self, diff): return (1, "video==================================") def cal_flashFonts_distance(self, diff): return (1, len(diff[0]) + len(diff[1])) def cal_agent_distance(self, diff): return (1, "agent") def cal_distance(self, diff): dis = 0 way = "" for feature in diff: if feature == "gpuimgs": gpuimgs_change = self.cal_gpuimgs_distance(diff[feature]) dis += gpuimgs_change[0] way += gpuimgs_change[1] elif feature == "agent": agent_change = self.cal_agent_distance(diff[feature]) dis += agent_change[0] way += agent_change[1] elif feature == "flashFonts": flashFonts_change = self.cal_flashFonts_distance(diff[feature]) dis += flashFonts_change[0] way += str(flashFonts_change[1]) + " fonts ====================" elif feature == "label": dis += 0 way += diff[feature][1] else: dis += 1 way += feature way += '~~' return (dis, way) def check_difference_by_group(self, firefox_version, base_group, compare_group, detail): """ check the difference of two groups """ sql_str = "SELECT id FROM features WHERE agent like '%" + str(firefox_version) + "%' and label like '%" + base_group + "%'" base_id = self.db.run_sql(sql_str)[0][0] sql_str = "SELECT id FROM features WHERE agent like '%" + str(firefox_version) + "%' and label like '%" + compare_group + "%'" compare_id = self.db.run_sql(sql_str)[0][0] diff = self.check_difference_by_id(base_id, compare_id, detail) return diff def cal_all_distances(self, aim, detail): """ calculate the distance between aim and all other entries """ sql_str = "SELECT id FROM features" all_ids = self.db.run_sql(sql_str) length = len(all_ids) distances = [] if aim == 0: for i in range(1, length): distances.append(self.cal_all_distances(all_ids[i][0], detail)) else: for i in range(1, length): dis = self.cal_distance(self.check_difference_by_id(aim, all_ids[i][0], detail)) if dis[0] != 0: distances.append((all_ids[i][0], dis)) return distances def check_change(self): """ check if there is any changes for same cookie/ip (We can decide it later) """ sql_str = "SELECT DISTINCT(label) FROM features" all_cookies = self.db.run_sql(sql_str) num_cookies = len(all_cookies) for cookie in all_cookies: sql_str = "SELECT IP FROM features WHERE label='" + cookie[0] + "'" records = self.db.run_sql(sql_str) if len(records) > 10: print len(records) print records[0] def check_unique(self): for i in range(1, 10): print self.db.run_sql('select count(browser_fingerprint) from ( select browser_fingerprint from features GROUP BY browser_fingerprint HAVING count(*) = ' + str(i) + ' ) AS only_once'); def main(): parser = argparse.ArgumentParser() parser.add_argument("-c", "--change", action = "store_true", help = "Check if there is any change for a single computer") parser.add_argument("-g", "--group", nargs = '*', action="store", help="Input the key word of two groups") parser.add_argument("-v", "--firefox_version", type=int, action="store", help = "Input the firefox version") parser.add_argument("-a", "--all", type=int, action = "store", help = "Compare all data pairs in database") parser.add_argument("-d", "--detail", action = "store_true", help = "Compare all data pairs in database") parser.add_argument("-i", "--id", type=int, nargs = '*', action = "store", help = "Compare all data pairs in database") args = parser.parse_args() analyzer = Analyzer() analyzer.check_unique() if args.change: analyzer.check_change() elif args.all != None : distance = analyzer.cal_all_distances(args.all, args.detail) if args.all == 0: for i in distance: string = "" for j in i: string += str(j[0]) + '\t' print string else: for i in distance: print i elif args.id != None: ids = args.id diff = analyzer.check_difference_by_id(ids[0], ids[1], args.detail) distance = analyzer.cal_distance(diff) print distance else: groups = args.group firefox_version = args.firefox_version if firefox_version == None: firefox_version = 0 if groups == None: print "Please use -h to see the usage. Key words needed here" return 0 diff = analyzer.check_difference_by_group(firefox_version, groups[0], groups[1], args.detail) distance = analyzer.cal_distance(diff) print distance if __name__ == "__main__": main()
Song-Li/dynamic_fingerprinting
research/analyze/analyze.py
Python
gpl-3.0
8,676
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Brian Coca <bcoca@ansible.com> # # This file is part of Ansible # # Ansible 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. # # Ansible 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 Ansible. If not, see <http://www.gnu.org/licenses/>. DOCUMENTATION = ''' module: systemd author: - "Ansible Core Team" version_added: "2.2" short_description: Manage services. description: - Controls systemd services on remote hosts. options: name: required: true description: - Name of the service. aliases: ['unit', 'service'] state: required: false default: null choices: [ 'started', 'stopped', 'restarted', 'reloaded' ] description: - C(started)/C(stopped) are idempotent actions that will not run commands unless necessary. C(restarted) will always bounce the service. C(reloaded) will always reload. enabled: required: false choices: [ "yes", "no" ] default: null description: - Whether the service should start on boot. B(At least one of state and enabled are required.) masked: required: false choices: [ "yes", "no" ] default: null description: - Whether the unit should be masked or not, a masked unit is impossible to start. daemon_reload: required: false default: no choices: [ "yes", "no" ] description: - run daemon-reload before doing any other operations, to make sure systemd has read any changes. aliases: ['daemon-reload'] user: required: false default: no choices: [ "yes", "no" ] description: - run systemctl talking to the service manager of the calling user, rather than the service manager of the system. notes: - One option other than name is required. requirements: - A system managed by systemd ''' EXAMPLES = ''' # Example action to start service httpd, if not running - systemd: state=started name=httpd # Example action to stop service cron on debian, if running - systemd: name=cron state=stopped # Example action to restart service cron on centos, in all cases, also issue daemon-reload to pick up config changes - systemd: state: restarted daemon_reload: yes name: crond # Example action to reload service httpd, in all cases - systemd: name: httpd state: reloaded # Example action to enable service httpd and ensure it is not masked - systemd: name: httpd enabled: yes masked: no # Example action to enable a timer for dnf-automatic - systemd: name: dnf-automatic.timer state: started enabled: True ''' RETURN = ''' status: description: A dictionary with the key=value pairs returned from `systemctl show` returned: success type: complex sample: { "ActiveEnterTimestamp": "Sun 2016-05-15 18:28:49 EDT", "ActiveEnterTimestampMonotonic": "8135942", "ActiveExitTimestampMonotonic": "0", "ActiveState": "active", "After": "auditd.service systemd-user-sessions.service time-sync.target systemd-journald.socket basic.target system.slice", "AllowIsolate": "no", "Before": "shutdown.target multi-user.target", "BlockIOAccounting": "no", "BlockIOWeight": "1000", "CPUAccounting": "no", "CPUSchedulingPolicy": "0", "CPUSchedulingPriority": "0", "CPUSchedulingResetOnFork": "no", "CPUShares": "1024", "CanIsolate": "no", "CanReload": "yes", "CanStart": "yes", "CanStop": "yes", "CapabilityBoundingSet": "18446744073709551615", "ConditionResult": "yes", "ConditionTimestamp": "Sun 2016-05-15 18:28:49 EDT", "ConditionTimestampMonotonic": "7902742", "Conflicts": "shutdown.target", "ControlGroup": "/system.slice/crond.service", "ControlPID": "0", "DefaultDependencies": "yes", "Delegate": "no", "Description": "Command Scheduler", "DevicePolicy": "auto", "EnvironmentFile": "/etc/sysconfig/crond (ignore_errors=no)", "ExecMainCode": "0", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "595", "ExecMainStartTimestamp": "Sun 2016-05-15 18:28:49 EDT", "ExecMainStartTimestampMonotonic": "8134990", "ExecMainStatus": "0", "ExecReload": "{ path=/bin/kill ; argv[]=/bin/kill -HUP $MAINPID ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "ExecStart": "{ path=/usr/sbin/crond ; argv[]=/usr/sbin/crond -n $CRONDARGS ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "FragmentPath": "/usr/lib/systemd/system/crond.service", "GuessMainPID": "yes", "IOScheduling": "0", "Id": "crond.service", "IgnoreOnIsolate": "no", "IgnoreOnSnapshot": "no", "IgnoreSIGPIPE": "yes", "InactiveEnterTimestampMonotonic": "0", "InactiveExitTimestamp": "Sun 2016-05-15 18:28:49 EDT", "InactiveExitTimestampMonotonic": "8135942", "JobTimeoutUSec": "0", "KillMode": "process", "KillSignal": "15", "LimitAS": "18446744073709551615", "LimitCORE": "18446744073709551615", "LimitCPU": "18446744073709551615", "LimitDATA": "18446744073709551615", "LimitFSIZE": "18446744073709551615", "LimitLOCKS": "18446744073709551615", "LimitMEMLOCK": "65536", "LimitMSGQUEUE": "819200", "LimitNICE": "0", "LimitNOFILE": "4096", "LimitNPROC": "3902", "LimitRSS": "18446744073709551615", "LimitRTPRIO": "0", "LimitRTTIME": "18446744073709551615", "LimitSIGPENDING": "3902", "LimitSTACK": "18446744073709551615", "LoadState": "loaded", "MainPID": "595", "MemoryAccounting": "no", "MemoryLimit": "18446744073709551615", "MountFlags": "0", "Names": "crond.service", "NeedDaemonReload": "no", "Nice": "0", "NoNewPrivileges": "no", "NonBlocking": "no", "NotifyAccess": "none", "OOMScoreAdjust": "0", "OnFailureIsolate": "no", "PermissionsStartOnly": "no", "PrivateNetwork": "no", "PrivateTmp": "no", "RefuseManualStart": "no", "RefuseManualStop": "no", "RemainAfterExit": "no", "Requires": "basic.target", "Restart": "no", "RestartUSec": "100ms", "Result": "success", "RootDirectoryStartOnly": "no", "SameProcessGroup": "no", "SecureBits": "0", "SendSIGHUP": "no", "SendSIGKILL": "yes", "Slice": "system.slice", "StandardError": "inherit", "StandardInput": "null", "StandardOutput": "journal", "StartLimitAction": "none", "StartLimitBurst": "5", "StartLimitInterval": "10000000", "StatusErrno": "0", "StopWhenUnneeded": "no", "SubState": "running", "SyslogLevelPrefix": "yes", "SyslogPriority": "30", "TTYReset": "no", "TTYVHangup": "no", "TTYVTDisallocate": "no", "TimeoutStartUSec": "1min 30s", "TimeoutStopUSec": "1min 30s", "TimerSlackNSec": "50000", "Transient": "no", "Type": "simple", "UMask": "0022", "UnitFileState": "enabled", "WantedBy": "multi-user.target", "Wants": "system.slice", "WatchdogTimestampMonotonic": "0", "WatchdogUSec": "0", } ''' from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.service import sysv_exists, sysv_is_enabled, fail_if_missing from ansible.module_utils._text import to_native # =========================================== # Main control flow def main(): # initialize module = AnsibleModule( argument_spec = dict( name = dict(required=True, type='str', aliases=['unit', 'service']), state = dict(choices=[ 'started', 'stopped', 'restarted', 'reloaded'], type='str'), enabled = dict(type='bool'), masked = dict(type='bool'), daemon_reload= dict(type='bool', default=False, aliases=['daemon-reload']), user= dict(type='bool', default=False), ), supports_check_mode=True, required_one_of=[['state', 'enabled', 'masked', 'daemon_reload']], ) systemctl = module.get_bin_path('systemctl') if module.params['user']: systemctl = systemctl + " --user" unit = module.params['name'] rc = 0 out = err = '' result = { 'name': unit, 'changed': False, 'status': {}, 'warnings': [], } # Run daemon-reload first, if requested if module.params['daemon_reload']: (rc, out, err) = module.run_command("%s daemon-reload" % (systemctl)) if rc != 0: module.fail_json(msg='failure %d during daemon-reload: %s' % (rc, err)) # check service data (rc, out, err) = module.run_command("%s show '%s'" % (systemctl, unit)) if rc != 0: module.fail_json(msg='failure %d running systemctl show for %r: %s' % (rc, unit, err)) found = False is_initd = sysv_exists(unit) is_systemd = False # load return of systemctl show into dictionary for easy access and return multival = [] if out: k = None for line in to_native(out).split('\n'): # systemd can have multiline values delimited with {} if line.strip(): if k is None: if '=' in line: k,v = line.split('=', 1) if v.lstrip().startswith('{'): if not v.rstrip().endswith('}'): multival.append(line) continue result['status'][k] = v.strip() k = None else: if line.rstrip().endswith('}'): result['status'][k] = '\n'.join(multival).strip() multival = [] k = None else: multival.append(line) is_systemd = 'LoadState' in result['status'] and result['status']['LoadState'] != 'not-found' # Check for loading error if is_systemd and 'LoadError' in result['status']: module.fail_json(msg="Error loading unit file '%s': %s" % (unit, result['status']['LoadError'])) # Does service exist? found = is_systemd or is_initd if is_initd and not is_systemd: result['warnings'].append('The service (%s) is actually an init script but the system is managed by systemd' % unit) # mask/unmask the service, if requested, can operate on services before they are installed if module.params['masked'] is not None: # state is not masked unless systemd affirms otherwise masked = ('LoadState' in result['status'] and result['status']['LoadState'] == 'masked') if masked != module.params['masked']: result['changed'] = True if module.params['masked']: action = 'mask' else: action = 'unmask' if not module.check_mode: (rc, out, err) = module.run_command("%s %s '%s'" % (systemctl, action, unit)) if rc != 0: # some versions of system CAN mask/unmask non existing services, we only fail on missing if they don't fail_if_missing(module, found, unit, "cannot %s" % (action)) module.fail_json(msg="Unable to %s service %s: %s" % (action, unit, err)) # Enable/disable service startup at boot if requested if module.params['enabled'] is not None: if module.params['enabled']: action = 'enable' else: action = 'disable' fail_if_missing(module, found, unit, "cannot %s" % (action)) # do we need to enable the service? enabled = False (rc, out, err) = module.run_command("%s is-enabled '%s'" % (systemctl, unit)) # check systemctl result or if it is a init script if rc == 0: enabled = True elif rc == 1: # if both init script and unit file exist stdout should have enabled/disabled, otherwise use rc entries if is_initd and (not out.startswith('disabled') or sysv_is_enabled(unit)): enabled = True # default to current state result['enabled'] = enabled # Change enable/disable if needed if enabled != module.params['enabled']: result['changed'] = True if not module.check_mode: (rc, out, err) = module.run_command("%s %s '%s'" % (systemctl, action, unit)) if rc != 0: module.fail_json(msg="Unable to %s service %s: %s" % (action, unit, out + err)) result['enabled'] = not enabled # set service state if requested if module.params['state'] is not None: fail_if_missing(module, found, unit, "cannot check nor set state") # default to desired state result['state'] = module.params['state'] # What is current service state? if 'ActiveState' in result['status']: action = None if module.params['state'] == 'started': if result['status']['ActiveState'] != 'active': action = 'start' elif module.params['state'] == 'stopped': if result['status']['ActiveState'] == 'active': action = 'stop' else: action = module.params['state'][:-2] # remove 'ed' from restarted/reloaded result['state'] = 'started' if action: result['changed'] = True if not module.check_mode: (rc, out, err) = module.run_command("%s %s '%s'" % (systemctl, action, unit)) if rc != 0: module.fail_json(msg="Unable to %s service %s: %s" % (action, unit, err)) else: # this should not happen? module.fail_json(msg="Service is in unknown state", status=result['status']) module.exit_json(**result) if __name__ == '__main__': main()
jtyr/ansible-modules-core
system/systemd.py
Python
gpl-3.0
15,567
// Mantid Repository : https://github.com/mantidproject/mantid // // Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, // NScD Oak Ridge National Laboratory, European Spallation Source // & Institut Laue - Langevin // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes //---------------------------------------------------------------------- #include "MantidAlgorithms/ConvertTableToMatrixWorkspace.h" #include "MantidAPI/Axis.h" #include "MantidAPI/ITableWorkspace.h" #include "MantidAPI/MatrixWorkspace.h" #include "MantidDataObjects/Workspace2D.h" #include "MantidDataObjects/WorkspaceCreation.h" #include "MantidKernel/MandatoryValidator.h" #include "MantidKernel/Unit.h" #include "MantidKernel/UnitFactory.h" namespace Mantid { namespace Algorithms { // Register the algorithm into the AlgorithmFactory DECLARE_ALGORITHM(ConvertTableToMatrixWorkspace) using namespace Kernel; using namespace API; using namespace HistogramData; using namespace DataObjects; void ConvertTableToMatrixWorkspace::init() { declareProperty(make_unique<WorkspaceProperty<API::ITableWorkspace>>( "InputWorkspace", "", Direction::Input), "An input TableWorkspace."); declareProperty(make_unique<WorkspaceProperty<>>("OutputWorkspace", "", Direction::Output), "An output Workspace2D."); declareProperty("ColumnX", "", boost::make_shared<MandatoryValidator<std::string>>(), "The column name for the X vector."); declareProperty("ColumnY", "", boost::make_shared<MandatoryValidator<std::string>>(), "The column name for the Y vector."); declareProperty("ColumnE", "", "The column name for the E vector (optional)."); } void ConvertTableToMatrixWorkspace::exec() { ITableWorkspace_const_sptr inputWorkspace = getProperty("InputWorkspace"); std::string columnX = getProperty("ColumnX"); std::string columnY = getProperty("ColumnY"); std::string columnE = getProperty("ColumnE"); size_t nrows = inputWorkspace->rowCount(); if (nrows == 0) { throw std::runtime_error("The input table is empty"); } auto X = inputWorkspace->getColumn(columnX)->numeric_fill<>(); auto Y = inputWorkspace->getColumn(columnY)->numeric_fill<>(); MatrixWorkspace_sptr outputWorkspace = create<Workspace2D>(1, Points(nrows)); outputWorkspace->mutableX(0).assign(X.begin(), X.end()); outputWorkspace->mutableY(0).assign(Y.begin(), Y.end()); if (!columnE.empty()) { outputWorkspace->mutableE(0) = inputWorkspace->getColumn(columnE)->numeric_fill<>(); } auto labelX = boost::dynamic_pointer_cast<Units::Label>( UnitFactory::Instance().create("Label")); labelX->setLabel(columnX); outputWorkspace->getAxis(0)->unit() = labelX; outputWorkspace->setYUnitLabel(columnY); setProperty("OutputWorkspace", outputWorkspace); } } // namespace Algorithms } // namespace Mantid
mganeva/mantid
Framework/Algorithms/src/ConvertTableToMatrixWorkspace.cpp
C++
gpl-3.0
3,092
#!./python_link # -*- coding: utf-8 -*- ################################################################################ # DChars-FE Copyright (C) 2008 Xavier Faure # Contact: faure dot epistulam dot mihi dot scripsisti at orange dot fr # # This file is part of DChars-FE. # DChars-FE 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. # # DChars-FE 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 DChars-FE. If not, see <http://www.gnu.org/licenses/>. ################################################################################ """ ❏DChars-FE❏ config_ini.py """ import configparser, os, codecs CONFIG_INI = None #/////////////////////////////////////////////////////////////////////////////// def read_configuration_file(): """ function read_configuration_file() read the config.ini and return the result. """ DATA = configparser.ConfigParser() # about the following line : why not simply DATA.read( "dchars-fr", "config.ini") ? # -> once installed, DChars have to know the exact path to config.ini, # hence the following line : config_ini_filename = os.path.join(os.path.dirname(os.path.realpath(__file__)), "config.ini" ) # something's wrong with configparser : instead of simply writing # DATA.read( open(config_ini_filename, "r", encoding="utf-8") ) # we have to use this strange hack : DATA.readfp( codecs.open(config_ini_filename, "r", "utf-8") ) return DATA
suizokukan/dchars-fe
config_ini.py
Python
gpl-3.0
1,966
<?php namespace Starteed\Resources; use Starteed\BaseResource; /** * @property bool $is_keep_it_all * @property bool $is_all_or_nothing * @property string $label */ class FundingResource extends BaseResource { /** * @param array $data */ public function __construct(array $data) { $this->setData($data); } }
StarteedGroup/crowdfunding
src/Resources/FundingResource.php
PHP
gpl-3.0
352
# -*- coding: utf-8 -*- #----------------------------------------------------------------------------- # OpenModes - An eigenmode solver for open electromagnetic resonantors # Copyright (C) 2013 David Powell # # 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/>. #----------------------------------------------------------------------------- import setuptools from distutils.util import get_platform import os.path as osp import os from pkg_resources import parse_version try: import numpy except ImportError: numpy_installed = False else: numpy_installed = True if not numpy_installed or (parse_version(numpy.__version__) < parse_version('1.10.0')): raise ValueError("Numpy 1.10.0 or greater required") from numpy.distutils.core import Extension, setup import platform if platform.system() == 'Darwin': os.environ["CC"] = "gcc-7" os.environ["CXX"] = "gcc-7" # Ideally would like to perform static linking under mingw32 to avoid # packaging a whole bunch of dlls. However, static linking is not supported # for the openmp libraries. ccompiler_dependent_options = { 'mingw32': { # 'extra_link_args' : ['-static'] } } # The following options are required to enable openmp to be used in the fortran # code, which is entirely compiler dependent fcompiler_dependent_options = { # gnu gfortran (including under mingw) 'gnu95': { # -O3 is most desireable, but generate NaNs under mingw32 'extra_f90_compile_args': ["-g", "-fimplicit-none", "-fopenmp", "-O3"], 'libraries': ["gomp"] }, 'intel': { # Currently ifort gives NaNs in impedance matrix derivative # on -O2, but not on -O3. To be investigated! #'extra_f90_compile_args': ['/debug', '-openmp', '-O3', '/fpe:0', '/fp:precise']#, '/traceback'], 'extra_f90_compile_args': ['-openmp', '-O2', '/fpe:0', '/fp:fast=2']#, '/traceback'], #'extra_link_args' : ['-openmp'] #'extra_f77_compile_args' : ['-openmp', '-O3'], #'extra_compile_args' : ['-openmp', '-O3', '-static'], #'extra_link_args' : ['-nodefaultlib:msvcrt'] } } # Intel fortran compiler goes by several names depending on the version # and target platform. Here the settings are all the same fcompiler_dependent_options['intelem'] = fcompiler_dependent_options['intel'] fcompiler_dependent_options['intelvem'] = fcompiler_dependent_options['intel'] core = Extension(name='openmodes.core', sources=[osp.join('src', 'core.pyf'), osp.join('src', 'common.f90'), osp.join('src', 'rwg.f90')], ) dunavant = Extension(name='openmodes.dunavant', sources=[osp.join('src', 'dunavant.pyf'), osp.join('src', 'dunavant.f90')]) from numpy.distutils.command.build_ext import build_ext class compiler_dependent_build_ext(build_ext): """A build extension which allows compiler-dependent options for compilation, linking etc. Options can depend on either the C or FORTRAN compiler which is actually used (as distinct from the default compilers, which are much easier to detect) Based on http://stackoverflow.com/a/5192738/482420 """ def build_extensions(self): ccompiler = self.compiler.compiler_type fcompiler = self._f77_compiler.compiler_type # add the compiler dependent options to each extension for extension in self.extensions: try: modification = ccompiler_dependent_options[ccompiler] for key, val in modification.items(): getattr(extension, key).extend(val) except (KeyError, AttributeError): pass try: modification = fcompiler_dependent_options[fcompiler] for key, val in modification.items(): getattr(extension, key).extend(val) except (KeyError, AttributeError): pass build_ext.build_extensions(self) # Find library files which must be included, which should be placed in the # appropriate subdirectory of the redist directory. This must be done manually, # as this code cannot detect which compiler will be used. redist_path = osp.join("redist", get_platform()) redist_data = [] if osp.exists(redist_path): redist_data.append(redist_path) try: import pypandoc long_description = pypandoc.convert('README.md', 'rst') except(IOError, ImportError): long_description = open('README.md').read() # run the script to find the version exec(open(osp.join("openmodes", "version.py")).read()) setup(name='OpenModes', description="An eigenmode solver for open electromagnetic resonantors", author="David Powell", author_email='DavidAnthonyPowell@gmail.com', license='GPLv3+', url='http://davidpowell.github.io/OpenModes', packages=setuptools.find_packages(), package_data={'openmodes': [osp.join("geometry", "*.geo"), osp.join("external", "three.js", "*"), osp.join("templates", "*"), osp.join("static", "*")]}, ext_modules=[dunavant, core], version=__version__, install_requires=['numpy >= 1.10.0', 'scipy >= 0.18.0', 'matplotlib', 'jinja2', 'six', 'ipywidgets', 'meshio', 'dill'], long_description=long_description, long_description_content_type="text/markdown", platforms="Windows, Linux", classifiers=[ 'Development Status :: 4 - Beta', 'Environment :: Console', 'Environment :: Web Environment', 'Intended Audience :: Science/Research', 'Intended Audience :: Developers', 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)', 'Operating System :: Microsoft :: Windows', 'Operating System :: POSIX', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Fortran', 'Topic :: Scientific/Engineering' ], cmdclass={'build_ext': compiler_dependent_build_ext}, # Include any required library files data_files=[('openmodes', redist_data+["RELEASE-VERSION"])] )
DavidPowell/OpenModes
setup.py
Python
gpl-3.0
7,161
# -*- coding: utf-8 -*- from time import time from module.common.json_layer import json_loads from module.plugins.Account import Account class MyfastfileCom(Account): __name__ = "MyfastfileCom" __type__ = "account" __version__ = "0.02" __description__ = """Myfastfile.com account plugin""" __license__ = "GPLv3" __authors__ = [("stickell", "l.stickell@yahoo.it")] def loadAccountInfo(self, user, req): if 'days_left' in self.json_data: validuntil = int(time() + self.json_data['days_left'] * 24 * 60 * 60) return {"premium": True, "validuntil": validuntil, "trafficleft": -1} else: self.logError(_("Unable to get account information")) def login(self, user, data, req): # Password to use is the API-Password written in http://myfastfile.com/myaccount html = req.load("http://myfastfile.com/api.php", get={"user": user, "pass": data['password']}) self.logDebug("JSON data: " + html) self.json_data = json_loads(html) if self.json_data['status'] != 'ok': self.logError(_('Invalid login. The password to use is the API-Password you find in your "My Account" page')) self.wrongPassword()
sebdelsol/pyload
module/plugins/accounts/MyfastfileCom.py
Python
gpl-3.0
1,284
/* * att_remover -- for Claws Mail * * Copyright (C) 2005 Colin Leroy <colin@colino.net> * * Sylpheed is a GTK+ based, lightweight, and fast e-mail client * Copyright (C) 1999-2005 Hiroyuki Yamamoto and the Claws Mail Team * * 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include "config.h" #include "claws-features.h" #endif #include <glib.h> #include <glib/gi18n.h> #include <string.h> #include <gdk/gdkkeysyms.h> #include <gtk/gtk.h> #include "mainwindow.h" #include "summaryview.h" #include "folder.h" #include "version.h" #include "summaryview.h" #include "procmime.h" #include "alertpanel.h" #include "inc.h" #include "menu.h" #include "claws.h" #include "plugin.h" #include "prefs_common.h" #include "defs.h" #include "prefs_gtk.h" #define PREFS_BLOCK_NAME "AttRemover" static struct _AttRemover { GtkWidget *window; MsgInfo *msginfo; GtkTreeModel *model; gint win_width; gint win_height; } AttRemoverData; typedef struct _AttRemover AttRemover; static PrefParam prefs[] = { {"win_width", "-1", &AttRemoverData.win_width, P_INT, NULL, NULL, NULL}, {"win_height", "-1", &AttRemoverData.win_height, P_INT, NULL, NULL, NULL}, {0,0,0,0} }; enum { ATT_REMOVER_INFO, ATT_REMOVER_TOGGLE, N_ATT_REMOVER_COLUMNS }; static MimeInfo *find_first_text_part(MimeInfo *partinfo) { while (partinfo && partinfo->type != MIMETYPE_TEXT) { partinfo = procmime_mimeinfo_next(partinfo); } return partinfo; } static gboolean key_pressed_cb(GtkWidget *widget, GdkEventKey *event, AttRemover *attremover) { if (event && event->keyval == GDK_Escape) gtk_widget_destroy(attremover->window); return FALSE; } static void cancelled_event_cb(GtkWidget *widget, AttRemover *attremover) { gtk_widget_destroy(attremover->window); } static void size_allocate_cb(GtkWidget *widget, GtkAllocation *allocation) { cm_return_if_fail(allocation != NULL); AttRemoverData.win_width = allocation->width; AttRemoverData.win_height = allocation->height; } static gint save_new_message(MsgInfo *oldmsg, MsgInfo *newmsg, MimeInfo *info, gboolean has_attachment) { MsgInfo *finalmsg; FolderItem *item = oldmsg->folder; MsgFlags flags = {0, 0}; gint msgnum = -1; finalmsg = procmsg_msginfo_new_from_mimeinfo(newmsg, info); if (!finalmsg) { procmsg_msginfo_free(&newmsg); return -1; } debug_print("finalmsg %s\n", finalmsg->plaintext_file); flags.tmp_flags = oldmsg->flags.tmp_flags; flags.perm_flags = oldmsg->flags.perm_flags; if (!has_attachment) flags.tmp_flags &= ~MSG_HAS_ATTACHMENT; oldmsg->flags.perm_flags &= ~MSG_LOCKED; folder_item_remove_msg(item, oldmsg->msgnum); msgnum = folder_item_add_msg(item, finalmsg->plaintext_file, &flags, TRUE); finalmsg->msgnum = msgnum; procmsg_msginfo_free(&newmsg); procmsg_msginfo_free(&finalmsg); newmsg = folder_item_get_msginfo(item, msgnum); if (newmsg && item) { procmsg_msginfo_unset_flags(newmsg, ~0, ~0); procmsg_msginfo_set_flags(newmsg, flags.perm_flags, flags.tmp_flags); procmsg_msginfo_free(&newmsg); } return msgnum; } #define MIMEINFO_NOT_ATTACHMENT(m) \ ((m)->type == MIMETYPE_MESSAGE || (m)->type == MIMETYPE_MULTIPART) static void remove_attachments_cb(GtkWidget *widget, AttRemover *attremover) { MainWindow *mainwin = mainwindow_get_mainwindow(); SummaryView *summaryview = mainwin->summaryview; GtkTreeModel *model = attremover->model; GtkTreeIter iter; MsgInfo *newmsg; MimeInfo *info, *parent, *last, *partinfo; GNode *child; gint att_all = 0, att_removed = 0, msgnum; gboolean to_removal, iter_valid=TRUE; newmsg = procmsg_msginfo_copy(attremover->msginfo); info = procmime_scan_message(newmsg); last = partinfo = find_first_text_part(info); partinfo = procmime_mimeinfo_next(partinfo); if (!partinfo || !gtk_tree_model_get_iter_first(model, &iter)) { gtk_widget_destroy(attremover->window); procmsg_msginfo_free(&newmsg); return; } main_window_cursor_wait(mainwin); summary_freeze(summaryview); folder_item_update_freeze(); inc_lock(); while (partinfo && iter_valid) { if (MIMEINFO_NOT_ATTACHMENT(partinfo)) { last = partinfo; partinfo = procmime_mimeinfo_next(partinfo); continue; } att_all++; gtk_tree_model_get(model, &iter, ATT_REMOVER_TOGGLE, &to_removal, -1); if (!to_removal) { last = partinfo; partinfo = procmime_mimeinfo_next(partinfo); iter_valid = gtk_tree_model_iter_next(model, &iter); continue; } parent = partinfo; partinfo = procmime_mimeinfo_next(partinfo); iter_valid = gtk_tree_model_iter_next(model, &iter); g_node_destroy(parent->node); att_removed++; } partinfo = last; while (partinfo) { if (!(parent = procmime_mimeinfo_parent(partinfo))) break; /* multipart/{alternative,mixed,related} make sense only when they have at least 2 nodes, remove last one and move it one level up if otherwise */ if (MIMEINFO_NOT_ATTACHMENT(partinfo) && g_node_n_children(partinfo->node) < 2) { gint pos = g_node_child_position(parent->node, partinfo->node); g_node_unlink(partinfo->node); if ((child = g_node_first_child(partinfo->node))) { g_node_unlink(child); g_node_insert(parent->node, pos, child); } g_node_destroy(partinfo->node); child = g_node_last_child(parent->node); partinfo = child ? child->data : parent; continue; } if (partinfo->node->prev) { partinfo = (MimeInfo *) partinfo->node->prev->data; if (partinfo->node->children) { child = g_node_last_child(partinfo->node); partinfo = (MimeInfo *) child->data; } } else if (partinfo->node->parent) partinfo = (MimeInfo *) partinfo->node->parent->data; } msgnum = save_new_message(attremover->msginfo, newmsg, info, (att_all - att_removed > 0)); inc_unlock(); folder_item_update_thaw(); summary_thaw(summaryview); main_window_cursor_normal(mainwin); if (msgnum > 0) summary_select_by_msgnum(summaryview, msgnum); gtk_widget_destroy(attremover->window); } static void remove_toggled_cb(GtkCellRendererToggle *cell, gchar *path_str, gpointer data) { GtkTreeModel *model = (GtkTreeModel *)data; GtkTreeIter iter; GtkTreePath *path = gtk_tree_path_new_from_string (path_str); gboolean fixed; gtk_tree_model_get_iter (model, &iter, path); gtk_tree_model_get (model, &iter, ATT_REMOVER_TOGGLE, &fixed, -1); fixed ^= 1; gtk_list_store_set (GTK_LIST_STORE (model), &iter, ATT_REMOVER_TOGGLE, fixed, -1); gtk_tree_path_free (path); } static void fill_attachment_store(GtkTreeView *list_view, MimeInfo *partinfo) { const gchar *name; gchar *label, *content_type; GtkTreeIter iter; GtkListStore *list_store = GTK_LIST_STORE(gtk_tree_view_get_model (GTK_TREE_VIEW(list_view))); partinfo = find_first_text_part(partinfo); partinfo = procmime_mimeinfo_next(partinfo); if (!partinfo) return; while (partinfo) { if (MIMEINFO_NOT_ATTACHMENT(partinfo)) { partinfo = procmime_mimeinfo_next(partinfo); continue; } content_type = procmime_get_content_type_str( partinfo->type, partinfo->subtype); name = procmime_mimeinfo_get_parameter(partinfo, "filename"); if (!name) name = procmime_mimeinfo_get_parameter(partinfo, "name"); if (!name) name = _("unknown"); label = g_strconcat("<b>",_("Type:"), "</b> ", content_type, " <b>", _("Size:"), "</b> ", to_human_readable((goffset)partinfo->length), "\n", "<b>", _("Filename:"), "</b> ", name, NULL); gtk_list_store_append(list_store, &iter); gtk_list_store_set(list_store, &iter, ATT_REMOVER_INFO, label, ATT_REMOVER_TOGGLE, TRUE, -1); g_free(label); g_free(content_type); partinfo = procmime_mimeinfo_next(partinfo); } } static void remove_attachments_dialog(AttRemover *attremover) { GtkWidget *window; GtkWidget *vbox; GtkTreeView *list_view; GtkTreeModel *model; GtkTreeViewColumn *column; GtkCellRenderer *renderer; GtkWidget *scrollwin; GtkWidget *hbbox; GtkWidget *ok_btn; GtkWidget *cancel_btn; MimeInfo *info = procmime_scan_message(attremover->msginfo); static GdkGeometry geometry; window = gtkut_window_new(GTK_WINDOW_TOPLEVEL, "AttRemover"); gtk_container_set_border_width( GTK_CONTAINER(window), VBOX_BORDER); gtk_window_set_title(GTK_WINDOW(window), _("Remove attachments")); gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER); gtk_window_set_modal(GTK_WINDOW(window), TRUE); g_signal_connect(G_OBJECT(window), "delete_event", G_CALLBACK(cancelled_event_cb), attremover); g_signal_connect(G_OBJECT(window), "key_press_event", G_CALLBACK(key_pressed_cb), attremover); g_signal_connect(G_OBJECT(window), "size_allocate", G_CALLBACK(size_allocate_cb), NULL); vbox = gtk_vbox_new(FALSE, VBOX_BORDER); gtk_container_add(GTK_CONTAINER(window), vbox); model = GTK_TREE_MODEL(gtk_list_store_new(N_ATT_REMOVER_COLUMNS, G_TYPE_STRING, G_TYPE_BOOLEAN, -1)); list_view = GTK_TREE_VIEW(gtk_tree_view_new_with_model(model)); g_object_unref(model); gtk_tree_view_set_rules_hint(list_view, prefs_common_get_prefs()->use_stripes_everywhere); renderer = gtk_cell_renderer_toggle_new(); g_signal_connect(renderer, "toggled", G_CALLBACK(remove_toggled_cb), model); column = gtk_tree_view_column_new_with_attributes (_("Remove"), renderer, "active", ATT_REMOVER_TOGGLE, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(list_view), column); renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes (_("Attachment"), renderer, "markup", ATT_REMOVER_INFO, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(list_view), column); fill_attachment_store(list_view, info); scrollwin = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrollwin), GTK_SHADOW_ETCHED_OUT); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollwin), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_container_add(GTK_CONTAINER(scrollwin), GTK_WIDGET(list_view)); gtk_container_set_border_width(GTK_CONTAINER(scrollwin), 4); gtk_box_pack_start(GTK_BOX(vbox), scrollwin, TRUE, TRUE, 0); gtkut_stock_button_set_create(&hbbox, &cancel_btn, GTK_STOCK_CANCEL, &ok_btn, GTK_STOCK_OK, NULL, NULL); gtk_box_pack_end(GTK_BOX(vbox), hbbox, FALSE, FALSE, 0); gtk_container_set_border_width(GTK_CONTAINER(hbbox), HSPACING_NARROW); gtk_widget_grab_default(ok_btn); g_signal_connect(G_OBJECT(ok_btn), "clicked", G_CALLBACK(remove_attachments_cb), attremover); g_signal_connect(G_OBJECT(cancel_btn), "clicked", G_CALLBACK(cancelled_event_cb), attremover); if (!geometry.min_height) { geometry.min_width = 450; geometry.min_height = 350; } gtk_window_set_geometry_hints(GTK_WINDOW(window), NULL, &geometry, GDK_HINT_MIN_SIZE); gtk_widget_set_size_request(window, attremover->win_width, attremover->win_height); attremover->window = window; attremover->model = model; gtk_widget_show_all(window); gtk_widget_grab_focus(ok_btn); } static void remove_attachments(GSList *msglist) { MainWindow *mainwin = mainwindow_get_mainwindow(); SummaryView *summaryview = mainwin->summaryview; GSList *cur; gint msgnum = -1; if (alertpanel_full(_("Destroy attachments"), _("Do you really want to remove all attachments from " "the selected messages?\n\n" "The deleted data will be unrecoverable."), GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL, FALSE, NULL, ALERT_QUESTION, G_ALERTALTERNATE) != G_ALERTALTERNATE) return; main_window_cursor_wait(summaryview->mainwin); summary_freeze(summaryview); folder_item_update_freeze(); inc_lock(); for (cur = msglist; cur; cur = cur->next) { MsgInfo *msginfo = (MsgInfo *)cur->data; MsgInfo *newmsg = NULL; MimeInfo *info = NULL; MimeInfo *partinfo = NULL; if (!msginfo) continue; newmsg = procmsg_msginfo_copy(msginfo); info = procmime_scan_message(newmsg); if ( !(partinfo = find_first_text_part(info)) ) { procmsg_msginfo_free(&newmsg); continue; } partinfo->node->next = NULL; partinfo->node->children = NULL; info->node->children->data = partinfo; msgnum = save_new_message(msginfo, newmsg, info, FALSE); } inc_unlock(); folder_item_update_thaw(); summary_thaw(summaryview); main_window_cursor_normal(summaryview->mainwin); if (msgnum > 0) { summary_select_by_msgnum(summaryview, msgnum); } } static void remove_attachments_ui(GtkAction *action, gpointer data) { MainWindow *mainwin = mainwindow_get_mainwindow(); GSList *msglist = summary_get_selected_msg_list(mainwin->summaryview); MimeInfo *info = NULL, *partinfo = NULL; if (summary_is_locked(mainwin->summaryview) || !msglist) return; if (g_slist_length(msglist) == 1) { info = procmime_scan_message(msglist->data); partinfo = find_first_text_part(info); partinfo = procmime_mimeinfo_next(partinfo); if (!partinfo) { alertpanel_notice(_("This message doesn't have any attachments.")); g_slist_free(msglist); return; } AttRemoverData.msginfo = msglist->data; remove_attachments_dialog(&AttRemoverData); } else remove_attachments(msglist); g_slist_free(msglist); } static GtkActionEntry remove_att_main_menu[] = {{ "Message/RemoveAtt", NULL, N_("Remove attachments..."), NULL, NULL, G_CALLBACK(remove_attachments_ui) }}; static guint context_menu_id = 0; static guint main_menu_id = 0; gint plugin_init(gchar **error) { MainWindow *mainwin = mainwindow_get_mainwindow(); gchar *rcpath; if( !check_plugin_version(MAKE_NUMERIC_VERSION(3,6,1,27), VERSION_NUMERIC, _("AttRemover"), error) ) return -1; gtk_action_group_add_actions(mainwin->action_group, remove_att_main_menu, 1, (gpointer)mainwin); MENUITEM_ADDUI_ID_MANAGER(mainwin->ui_manager, "/Menu/Message", "RemoveAtt", "Message/RemoveAtt", GTK_UI_MANAGER_MENUITEM, main_menu_id) MENUITEM_ADDUI_ID_MANAGER(mainwin->ui_manager, "/Menus/SummaryViewPopup", "RemoveAtt", "Message/RemoveAtt", GTK_UI_MANAGER_MENUITEM, context_menu_id) prefs_set_default(prefs); rcpath = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, COMMON_RC, NULL); prefs_read_config(prefs, PREFS_BLOCK_NAME, rcpath, NULL); g_free(rcpath); return 0; } gboolean plugin_done(void) { MainWindow *mainwin = mainwindow_get_mainwindow(); PrefFile *pref_file; gchar *rc_file_path; rc_file_path = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, COMMON_RC, NULL); pref_file = prefs_write_open(rc_file_path); g_free(rc_file_path); if (!pref_file || prefs_set_block_label(pref_file, PREFS_BLOCK_NAME) < 0) return TRUE; if (prefs_write_param(prefs, pref_file->fp) < 0) { g_warning("failed to write AttRemover Plugin configuration"); prefs_file_close_revert(pref_file); return TRUE; } if (fprintf(pref_file->fp, "\n") < 0) { FILE_OP_ERROR(rc_file_path, "fprintf"); prefs_file_close_revert(pref_file); } else prefs_file_close(pref_file); if (mainwin == NULL) return TRUE; MENUITEM_REMUI_MANAGER(mainwin->ui_manager,mainwin->action_group, "Message/RemoveAtt", main_menu_id); main_menu_id = 0; MENUITEM_REMUI_MANAGER(mainwin->ui_manager,mainwin->action_group, "Message/RemoveAtt", context_menu_id); context_menu_id = 0; return TRUE; } const gchar *plugin_name(void) { return _("AttRemover"); } const gchar *plugin_desc(void) { return _("This plugin removes attachments from mails.\n\n" "Warning: this operation will be completely " "un-cancellable and the deleted attachments will " "be lost forever, and ever, and ever."); } const gchar *plugin_type(void) { return "GTK2"; } const gchar *plugin_licence(void) { return "GPL3+"; } const gchar *plugin_version(void) { return VERSION; } struct PluginFeature *plugin_provides(void) { static struct PluginFeature features[] = { {PLUGIN_UTILITY, N_("Attachment handling")}, {PLUGIN_NOTHING, NULL}}; return features; }
twolife/claws
src/plugins/att_remover/att_remover.c
C
gpl-3.0
16,838
<?php // This file is part of Moodle - http://moodle.org/ // // Moodle 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. // // Moodle 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 Moodle. If not, see <http://www.gnu.org/licenses/>. /** * Strings for component 'qbehaviour_immediatefeedback', language 'fi', branch 'MOODLE_22_STABLE' * * @package qbehaviour_immediatefeedback * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die(); $string['notcomplete'] = 'Kesken'; $string['pluginname'] = 'Välitön palaute';
danielbonetto/twig_MVC
lang/fi/qbehaviour_immediatefeedback.php
PHP
gpl-3.0
1,104
/* * Mesa 3-D graphics library * Version: 6.5.3 * * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* * Off-Screen Mesa rendering / Rendering into client memory space * * Note on thread safety: this driver is thread safe. All * functions are reentrant. The notion of current context is * managed by the core _mesa_make_current() and _mesa_get_current_context() * functions. Those functions are thread-safe. */ #include "main/glheader.h" #include "GL/osmesa.h" #include "main/context.h" #include "main/extensions.h" #include "main/formats.h" #include "main/framebuffer.h" #include "main/imports.h" #include "main/mtypes.h" #include "main/renderbuffer.h" #include "swrast/swrast.h" #include "swrast_setup/swrast_setup.h" #include "swrast/s_context.h" #include "swrast/s_lines.h" #include "swrast/s_triangle.h" #include "tnl/tnl.h" #include "tnl/t_context.h" #include "tnl/t_pipeline.h" #include "drivers/common/driverfuncs.h" #include "drivers/common/meta.h" #include "vbo/vbo.h" /** * OSMesa rendering context, derived from core Mesa GLcontext. */ struct osmesa_context { GLcontext mesa; /*< Base class - this must be first */ GLvisual *gl_visual; /*< Describes the buffers */ struct gl_renderbuffer *rb; /*< The user's colorbuffer */ GLframebuffer *gl_buffer; /*< The framebuffer, containing user's rb */ GLenum format; /*< User-specified context format */ GLint userRowLength; /*< user-specified number of pixels per row */ GLint rInd, gInd, bInd, aInd;/*< index offsets for RGBA formats */ GLvoid *rowaddr[MAX_HEIGHT]; /*< address of first pixel in each image row */ GLboolean yup; /*< TRUE -> Y increases upward */ /*< FALSE -> Y increases downward */ }; static INLINE OSMesaContext OSMESA_CONTEXT(GLcontext *ctx) { /* Just cast, since we're using structure containment */ return (OSMesaContext) ctx; } /**********************************************************************/ /*** Private Device Driver Functions ***/ /**********************************************************************/ static const GLubyte * get_string( GLcontext *ctx, GLenum name ) { (void) ctx; switch (name) { case GL_RENDERER: #if CHAN_BITS == 32 return (const GLubyte *) "Mesa OffScreen32"; #elif CHAN_BITS == 16 return (const GLubyte *) "Mesa OffScreen16"; #else return (const GLubyte *) "Mesa OffScreen"; #endif default: return NULL; } } static void osmesa_update_state( GLcontext *ctx, GLuint new_state ) { /* easy - just propogate */ _swrast_InvalidateState( ctx, new_state ); _swsetup_InvalidateState( ctx, new_state ); _tnl_InvalidateState( ctx, new_state ); _vbo_InvalidateState( ctx, new_state ); } /**********************************************************************/ /***** Read/write spans/arrays of pixels *****/ /**********************************************************************/ /* 8-bit RGBA */ #define NAME(PREFIX) PREFIX##_RGBA8 #define RB_TYPE GLubyte #define SPAN_VARS \ const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); #define INIT_PIXEL_PTR(P, X, Y) \ GLubyte *P = (GLubyte *) osmesa->rowaddr[Y] + 4 * (X) #define INC_PIXEL_PTR(P) P += 4 #define STORE_PIXEL(DST, X, Y, VALUE) \ DST[0] = VALUE[RCOMP]; \ DST[1] = VALUE[GCOMP]; \ DST[2] = VALUE[BCOMP]; \ DST[3] = VALUE[ACOMP] #define STORE_PIXEL_RGB(DST, X, Y, VALUE) \ DST[0] = VALUE[RCOMP]; \ DST[1] = VALUE[GCOMP]; \ DST[2] = VALUE[BCOMP]; \ DST[3] = 255 #define FETCH_PIXEL(DST, SRC) \ DST[RCOMP] = SRC[0]; \ DST[GCOMP] = SRC[1]; \ DST[BCOMP] = SRC[2]; \ DST[ACOMP] = SRC[3] #include "swrast/s_spantemp.h" /* 16-bit RGBA */ #define NAME(PREFIX) PREFIX##_RGBA16 #define RB_TYPE GLushort #define SPAN_VARS \ const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); #define INIT_PIXEL_PTR(P, X, Y) \ GLushort *P = (GLushort *) osmesa->rowaddr[Y] + 4 * (X) #define INC_PIXEL_PTR(P) P += 4 #define STORE_PIXEL(DST, X, Y, VALUE) \ DST[0] = VALUE[RCOMP]; \ DST[1] = VALUE[GCOMP]; \ DST[2] = VALUE[BCOMP]; \ DST[3] = VALUE[ACOMP] #define STORE_PIXEL_RGB(DST, X, Y, VALUE) \ DST[0] = VALUE[RCOMP]; \ DST[1] = VALUE[GCOMP]; \ DST[2] = VALUE[BCOMP]; \ DST[3] = 65535 #define FETCH_PIXEL(DST, SRC) \ DST[RCOMP] = SRC[0]; \ DST[GCOMP] = SRC[1]; \ DST[BCOMP] = SRC[2]; \ DST[ACOMP] = SRC[3] #include "swrast/s_spantemp.h" /* 32-bit RGBA */ #define NAME(PREFIX) PREFIX##_RGBA32 #define RB_TYPE GLfloat #define SPAN_VARS \ const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); #define INIT_PIXEL_PTR(P, X, Y) \ GLfloat *P = (GLfloat *) osmesa->rowaddr[Y] + 4 * (X) #define INC_PIXEL_PTR(P) P += 4 #define STORE_PIXEL(DST, X, Y, VALUE) \ DST[0] = MAX2((VALUE[RCOMP]), 0.0F); \ DST[1] = MAX2((VALUE[GCOMP]), 0.0F); \ DST[2] = MAX2((VALUE[BCOMP]), 0.0F); \ DST[3] = CLAMP((VALUE[ACOMP]), 0.0F, 1.0F) #define STORE_PIXEL_RGB(DST, X, Y, VALUE) \ DST[0] = MAX2((VALUE[RCOMP]), 0.0F); \ DST[1] = MAX2((VALUE[GCOMP]), 0.0F); \ DST[2] = MAX2((VALUE[BCOMP]), 0.0F); \ DST[3] = 1.0F #define FETCH_PIXEL(DST, SRC) \ DST[RCOMP] = SRC[0]; \ DST[GCOMP] = SRC[1]; \ DST[BCOMP] = SRC[2]; \ DST[ACOMP] = SRC[3] #include "swrast/s_spantemp.h" /* 8-bit BGRA */ #define NAME(PREFIX) PREFIX##_BGRA8 #define RB_TYPE GLubyte #define SPAN_VARS \ const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); #define INIT_PIXEL_PTR(P, X, Y) \ GLubyte *P = (GLubyte *) osmesa->rowaddr[Y] + 4 * (X) #define INC_PIXEL_PTR(P) P += 4 #define STORE_PIXEL(DST, X, Y, VALUE) \ DST[2] = VALUE[RCOMP]; \ DST[1] = VALUE[GCOMP]; \ DST[0] = VALUE[BCOMP]; \ DST[3] = VALUE[ACOMP] #define STORE_PIXEL_RGB(DST, X, Y, VALUE) \ DST[2] = VALUE[RCOMP]; \ DST[1] = VALUE[GCOMP]; \ DST[0] = VALUE[BCOMP]; \ DST[3] = 255 #define FETCH_PIXEL(DST, SRC) \ DST[RCOMP] = SRC[2]; \ DST[GCOMP] = SRC[1]; \ DST[BCOMP] = SRC[0]; \ DST[ACOMP] = SRC[3] #include "swrast/s_spantemp.h" /* 16-bit BGRA */ #define NAME(PREFIX) PREFIX##_BGRA16 #define RB_TYPE GLushort #define SPAN_VARS \ const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); #define INIT_PIXEL_PTR(P, X, Y) \ GLushort *P = (GLushort *) osmesa->rowaddr[Y] + 4 * (X) #define INC_PIXEL_PTR(P) P += 4 #define STORE_PIXEL(DST, X, Y, VALUE) \ DST[2] = VALUE[RCOMP]; \ DST[1] = VALUE[GCOMP]; \ DST[0] = VALUE[BCOMP]; \ DST[3] = VALUE[ACOMP] #define STORE_PIXEL_RGB(DST, X, Y, VALUE) \ DST[2] = VALUE[RCOMP]; \ DST[1] = VALUE[GCOMP]; \ DST[0] = VALUE[BCOMP]; \ DST[3] = 65535 #define FETCH_PIXEL(DST, SRC) \ DST[RCOMP] = SRC[2]; \ DST[GCOMP] = SRC[1]; \ DST[BCOMP] = SRC[0]; \ DST[ACOMP] = SRC[3] #include "swrast/s_spantemp.h" /* 32-bit BGRA */ #define NAME(PREFIX) PREFIX##_BGRA32 #define RB_TYPE GLfloat #define SPAN_VARS \ const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); #define INIT_PIXEL_PTR(P, X, Y) \ GLfloat *P = (GLfloat *) osmesa->rowaddr[Y] + 4 * (X) #define INC_PIXEL_PTR(P) P += 4 #define STORE_PIXEL(DST, X, Y, VALUE) \ DST[2] = VALUE[RCOMP]; \ DST[1] = VALUE[GCOMP]; \ DST[0] = VALUE[BCOMP]; \ DST[3] = VALUE[ACOMP] #define STORE_PIXEL_RGB(DST, X, Y, VALUE) \ DST[2] = VALUE[RCOMP]; \ DST[1] = VALUE[GCOMP]; \ DST[0] = VALUE[BCOMP]; \ DST[3] = 1.0F #define FETCH_PIXEL(DST, SRC) \ DST[RCOMP] = SRC[2]; \ DST[GCOMP] = SRC[1]; \ DST[BCOMP] = SRC[0]; \ DST[ACOMP] = SRC[3] #include "swrast/s_spantemp.h" /* 8-bit ARGB */ #define NAME(PREFIX) PREFIX##_ARGB8 #define RB_TYPE GLubyte #define SPAN_VARS \ const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); #define INIT_PIXEL_PTR(P, X, Y) \ GLubyte *P = (GLubyte *) osmesa->rowaddr[Y] + 4 * (X) #define INC_PIXEL_PTR(P) P += 4 #define STORE_PIXEL(DST, X, Y, VALUE) \ DST[1] = VALUE[RCOMP]; \ DST[2] = VALUE[GCOMP]; \ DST[3] = VALUE[BCOMP]; \ DST[0] = VALUE[ACOMP] #define STORE_PIXEL_RGB(DST, X, Y, VALUE) \ DST[1] = VALUE[RCOMP]; \ DST[2] = VALUE[GCOMP]; \ DST[3] = VALUE[BCOMP]; \ DST[0] = 255 #define FETCH_PIXEL(DST, SRC) \ DST[RCOMP] = SRC[1]; \ DST[GCOMP] = SRC[2]; \ DST[BCOMP] = SRC[3]; \ DST[ACOMP] = SRC[0] #include "swrast/s_spantemp.h" /* 16-bit ARGB */ #define NAME(PREFIX) PREFIX##_ARGB16 #define RB_TYPE GLushort #define SPAN_VARS \ const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); #define INIT_PIXEL_PTR(P, X, Y) \ GLushort *P = (GLushort *) osmesa->rowaddr[Y] + 4 * (X) #define INC_PIXEL_PTR(P) P += 4 #define STORE_PIXEL(DST, X, Y, VALUE) \ DST[1] = VALUE[RCOMP]; \ DST[2] = VALUE[GCOMP]; \ DST[3] = VALUE[BCOMP]; \ DST[0] = VALUE[ACOMP] #define STORE_PIXEL_RGB(DST, X, Y, VALUE) \ DST[1] = VALUE[RCOMP]; \ DST[2] = VALUE[GCOMP]; \ DST[3] = VALUE[BCOMP]; \ DST[0] = 65535 #define FETCH_PIXEL(DST, SRC) \ DST[RCOMP] = SRC[1]; \ DST[GCOMP] = SRC[2]; \ DST[BCOMP] = SRC[3]; \ DST[ACOMP] = SRC[0] #include "swrast/s_spantemp.h" /* 32-bit ARGB */ #define NAME(PREFIX) PREFIX##_ARGB32 #define RB_TYPE GLfloat #define SPAN_VARS \ const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); #define INIT_PIXEL_PTR(P, X, Y) \ GLfloat *P = (GLfloat *) osmesa->rowaddr[Y] + 4 * (X) #define INC_PIXEL_PTR(P) P += 4 #define STORE_PIXEL(DST, X, Y, VALUE) \ DST[1] = VALUE[RCOMP]; \ DST[2] = VALUE[GCOMP]; \ DST[3] = VALUE[BCOMP]; \ DST[0] = VALUE[ACOMP] #define STORE_PIXEL_RGB(DST, X, Y, VALUE) \ DST[1] = VALUE[RCOMP]; \ DST[2] = VALUE[GCOMP]; \ DST[3] = VALUE[BCOMP]; \ DST[0] = 1.0F #define FETCH_PIXEL(DST, SRC) \ DST[RCOMP] = SRC[1]; \ DST[GCOMP] = SRC[2]; \ DST[BCOMP] = SRC[3]; \ DST[ACOMP] = SRC[0] #include "swrast/s_spantemp.h" /* 8-bit RGB */ #define NAME(PREFIX) PREFIX##_RGB8 #define RB_TYPE GLubyte #define SPAN_VARS \ const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); #define INIT_PIXEL_PTR(P, X, Y) \ GLubyte *P = (GLubyte *) osmesa->rowaddr[Y] + 3 * (X) #define INC_PIXEL_PTR(P) P += 3 #define STORE_PIXEL(DST, X, Y, VALUE) \ DST[0] = VALUE[RCOMP]; \ DST[1] = VALUE[GCOMP]; \ DST[2] = VALUE[BCOMP] #define FETCH_PIXEL(DST, SRC) \ DST[RCOMP] = SRC[0]; \ DST[GCOMP] = SRC[1]; \ DST[BCOMP] = SRC[2]; \ DST[ACOMP] = 255 #include "swrast/s_spantemp.h" /* 16-bit RGB */ #define NAME(PREFIX) PREFIX##_RGB16 #define RB_TYPE GLushort #define SPAN_VARS \ const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); #define INIT_PIXEL_PTR(P, X, Y) \ GLushort *P = (GLushort *) osmesa->rowaddr[Y] + 3 * (X) #define INC_PIXEL_PTR(P) P += 3 #define STORE_PIXEL(DST, X, Y, VALUE) \ DST[0] = VALUE[RCOMP]; \ DST[1] = VALUE[GCOMP]; \ DST[2] = VALUE[BCOMP] #define FETCH_PIXEL(DST, SRC) \ DST[RCOMP] = SRC[0]; \ DST[GCOMP] = SRC[1]; \ DST[BCOMP] = SRC[2]; \ DST[ACOMP] = 65535U #include "swrast/s_spantemp.h" /* 32-bit RGB */ #define NAME(PREFIX) PREFIX##_RGB32 #define RB_TYPE GLfloat #define SPAN_VARS \ const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); #define INIT_PIXEL_PTR(P, X, Y) \ GLfloat *P = (GLfloat *) osmesa->rowaddr[Y] + 3 * (X) #define INC_PIXEL_PTR(P) P += 3 #define STORE_PIXEL(DST, X, Y, VALUE) \ DST[0] = VALUE[RCOMP]; \ DST[1] = VALUE[GCOMP]; \ DST[2] = VALUE[BCOMP] #define FETCH_PIXEL(DST, SRC) \ DST[RCOMP] = SRC[0]; \ DST[GCOMP] = SRC[1]; \ DST[BCOMP] = SRC[2]; \ DST[ACOMP] = 1.0F #include "swrast/s_spantemp.h" /* 8-bit BGR */ #define NAME(PREFIX) PREFIX##_BGR8 #define RB_TYPE GLubyte #define SPAN_VARS \ const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); #define INIT_PIXEL_PTR(P, X, Y) \ GLubyte *P = (GLubyte *) osmesa->rowaddr[Y] + 3 * (X) #define INC_PIXEL_PTR(P) P += 3 #define STORE_PIXEL(DST, X, Y, VALUE) \ DST[2] = VALUE[RCOMP]; \ DST[1] = VALUE[GCOMP]; \ DST[0] = VALUE[BCOMP] #define FETCH_PIXEL(DST, SRC) \ DST[RCOMP] = SRC[2]; \ DST[GCOMP] = SRC[1]; \ DST[BCOMP] = SRC[0]; \ DST[ACOMP] = 255 #include "swrast/s_spantemp.h" /* 16-bit BGR */ #define NAME(PREFIX) PREFIX##_BGR16 #define RB_TYPE GLushort #define SPAN_VARS \ const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); #define INIT_PIXEL_PTR(P, X, Y) \ GLushort *P = (GLushort *) osmesa->rowaddr[Y] + 3 * (X) #define INC_PIXEL_PTR(P) P += 3 #define STORE_PIXEL(DST, X, Y, VALUE) \ DST[2] = VALUE[RCOMP]; \ DST[1] = VALUE[GCOMP]; \ DST[0] = VALUE[BCOMP] #define FETCH_PIXEL(DST, SRC) \ DST[RCOMP] = SRC[2]; \ DST[GCOMP] = SRC[1]; \ DST[BCOMP] = SRC[0]; \ DST[ACOMP] = 65535 #include "swrast/s_spantemp.h" /* 32-bit BGR */ #define NAME(PREFIX) PREFIX##_BGR32 #define RB_TYPE GLfloat #define SPAN_VARS \ const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); #define INIT_PIXEL_PTR(P, X, Y) \ GLfloat *P = (GLfloat *) osmesa->rowaddr[Y] + 3 * (X) #define INC_PIXEL_PTR(P) P += 3 #define STORE_PIXEL(DST, X, Y, VALUE) \ DST[2] = VALUE[RCOMP]; \ DST[1] = VALUE[GCOMP]; \ DST[0] = VALUE[BCOMP] #define FETCH_PIXEL(DST, SRC) \ DST[RCOMP] = SRC[2]; \ DST[GCOMP] = SRC[1]; \ DST[BCOMP] = SRC[0]; \ DST[ACOMP] = 1.0F #include "swrast/s_spantemp.h" /* 16-bit 5/6/5 RGB */ #define NAME(PREFIX) PREFIX##_RGB_565 #define RB_TYPE GLubyte #define SPAN_VARS \ const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); #define INIT_PIXEL_PTR(P, X, Y) \ GLushort *P = (GLushort *) osmesa->rowaddr[Y] + (X) #define INC_PIXEL_PTR(P) P += 1 #define STORE_PIXEL(DST, X, Y, VALUE) \ *DST = ( (((VALUE[RCOMP]) & 0xf8) << 8) | (((VALUE[GCOMP]) & 0xfc) << 3) | ((VALUE[BCOMP]) >> 3) ) #define FETCH_PIXEL(DST, SRC) \ DST[RCOMP] = ( (((*SRC) >> 8) & 0xf8) | (((*SRC) >> 11) & 0x7) ); \ DST[GCOMP] = ( (((*SRC) >> 3) & 0xfc) | (((*SRC) >> 5) & 0x3) ); \ DST[BCOMP] = ( (((*SRC) << 3) & 0xf8) | (((*SRC) ) & 0x7) ); \ DST[ACOMP] = CHAN_MAX #include "swrast/s_spantemp.h" /** * Macros for optimized line/triangle rendering. * Only for 8-bit channel, RGBA, BGRA, ARGB formats. */ #define PACK_RGBA(DST, R, G, B, A) \ do { \ (DST)[osmesa->rInd] = R; \ (DST)[osmesa->gInd] = G; \ (DST)[osmesa->bInd] = B; \ (DST)[osmesa->aInd] = A; \ } while (0) #define PIXELADDR4(X,Y) ((GLchan *) osmesa->rowaddr[Y] + 4 * (X)) /** * Draw a flat-shaded, RGB line into an osmesa buffer. */ #define NAME flat_rgba_line #define CLIP_HACK 1 #define SETUP_CODE \ const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); \ const GLchan *color = vert1->color; #define PLOT(X, Y) \ do { \ GLchan *p = PIXELADDR4(X, Y); \ PACK_RGBA(p, color[0], color[1], color[2], color[3]); \ } while (0) #ifdef WIN32 #include "..\swrast\s_linetemp.h" #else #include "swrast/s_linetemp.h" #endif /** * Draw a flat-shaded, Z-less, RGB line into an osmesa buffer. */ #define NAME flat_rgba_z_line #define CLIP_HACK 1 #define INTERP_Z 1 #define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE #define SETUP_CODE \ const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); \ const GLchan *color = vert1->color; #define PLOT(X, Y) \ do { \ if (Z < *zPtr) { \ GLchan *p = PIXELADDR4(X, Y); \ PACK_RGBA(p, color[RCOMP], color[GCOMP], \ color[BCOMP], color[ACOMP]); \ *zPtr = Z; \ } \ } while (0) #ifdef WIN32 #include "..\swrast\s_linetemp.h" #else #include "swrast/s_linetemp.h" #endif /** * Analyze context state to see if we can provide a fast line drawing * function. Otherwise, return NULL. */ static swrast_line_func osmesa_choose_line_function( GLcontext *ctx ) { const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); const SWcontext *swrast = SWRAST_CONTEXT(ctx); if (osmesa->rb->DataType != GL_UNSIGNED_BYTE) return NULL; if (ctx->RenderMode != GL_RENDER) return NULL; if (ctx->Line.SmoothFlag) return NULL; if (ctx->Texture._EnabledUnits) return NULL; if (ctx->Light.ShadeModel != GL_FLAT) return NULL; if (ctx->Line.Width != 1.0F) return NULL; if (ctx->Line.StippleFlag) return NULL; if (ctx->Line.SmoothFlag) return NULL; if (osmesa->format != OSMESA_RGBA && osmesa->format != OSMESA_BGRA && osmesa->format != OSMESA_ARGB) return NULL; if (swrast->_RasterMask==DEPTH_BIT && ctx->Depth.Func==GL_LESS && ctx->Depth.Mask==GL_TRUE && ctx->Visual.depthBits == DEFAULT_SOFTWARE_DEPTH_BITS) { return (swrast_line_func) flat_rgba_z_line; } if (swrast->_RasterMask == 0) { return (swrast_line_func) flat_rgba_line; } return (swrast_line_func) NULL; } /**********************************************************************/ /***** Optimized triangle rendering *****/ /**********************************************************************/ /* * Smooth-shaded, z-less triangle, RGBA color. */ #define NAME smooth_rgba_z_triangle #define INTERP_Z 1 #define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE #define INTERP_RGB 1 #define INTERP_ALPHA 1 #define SETUP_CODE \ const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); #define RENDER_SPAN( span ) { \ GLuint i; \ GLchan *img = PIXELADDR4(span.x, span.y); \ for (i = 0; i < span.end; i++, img += 4) { \ const GLuint z = FixedToDepth(span.z); \ if (z < zRow[i]) { \ PACK_RGBA(img, FixedToChan(span.red), \ FixedToChan(span.green), FixedToChan(span.blue), \ FixedToChan(span.alpha)); \ zRow[i] = z; \ } \ span.red += span.redStep; \ span.green += span.greenStep; \ span.blue += span.blueStep; \ span.alpha += span.alphaStep; \ span.z += span.zStep; \ } \ } #ifdef WIN32 #include "..\swrast\s_tritemp.h" #else #include "swrast/s_tritemp.h" #endif /* * Flat-shaded, z-less triangle, RGBA color. */ #define NAME flat_rgba_z_triangle #define INTERP_Z 1 #define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE #define SETUP_CODE \ const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); \ GLuint pixel; \ PACK_RGBA((GLchan *) &pixel, v2->color[0], v2->color[1], \ v2->color[2], v2->color[3]); #define RENDER_SPAN( span ) { \ GLuint i; \ GLuint *img = (GLuint *) PIXELADDR4(span.x, span.y); \ for (i = 0; i < span.end; i++) { \ const GLuint z = FixedToDepth(span.z); \ if (z < zRow[i]) { \ img[i] = pixel; \ zRow[i] = z; \ } \ span.z += span.zStep; \ } \ } #ifdef WIN32 #include "..\swrast\s_tritemp.h" #else #include "swrast/s_tritemp.h" #endif /** * Return pointer to an optimized triangle function if possible. */ static swrast_tri_func osmesa_choose_triangle_function( GLcontext *ctx ) { const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); const SWcontext *swrast = SWRAST_CONTEXT(ctx); if (osmesa->rb->DataType != GL_UNSIGNED_BYTE) return (swrast_tri_func) NULL; if (ctx->RenderMode != GL_RENDER) return (swrast_tri_func) NULL; if (ctx->Polygon.SmoothFlag) return (swrast_tri_func) NULL; if (ctx->Polygon.StippleFlag) return (swrast_tri_func) NULL; if (ctx->Texture._EnabledUnits) return (swrast_tri_func) NULL; if (osmesa->format != OSMESA_RGBA && osmesa->format != OSMESA_BGRA && osmesa->format != OSMESA_ARGB) return (swrast_tri_func) NULL; if (ctx->Polygon.CullFlag && ctx->Polygon.CullFaceMode == GL_FRONT_AND_BACK) return (swrast_tri_func) NULL; if (swrast->_RasterMask == DEPTH_BIT && ctx->Depth.Func == GL_LESS && ctx->Depth.Mask == GL_TRUE && ctx->Visual.depthBits == DEFAULT_SOFTWARE_DEPTH_BITS) { if (ctx->Light.ShadeModel == GL_SMOOTH) { return (swrast_tri_func) smooth_rgba_z_triangle; } else { return (swrast_tri_func) flat_rgba_z_triangle; } } return (swrast_tri_func) NULL; } /* Override for the swrast triangle-selection function. Try to use one * of our internal triangle functions, otherwise fall back to the * standard swrast functions. */ static void osmesa_choose_triangle( GLcontext *ctx ) { SWcontext *swrast = SWRAST_CONTEXT(ctx); swrast->Triangle = osmesa_choose_triangle_function( ctx ); if (!swrast->Triangle) _swrast_choose_triangle( ctx ); } static void osmesa_choose_line( GLcontext *ctx ) { SWcontext *swrast = SWRAST_CONTEXT(ctx); swrast->Line = osmesa_choose_line_function( ctx ); if (!swrast->Line) _swrast_choose_line( ctx ); } /** * Recompute the values of the context's rowaddr array. */ static void compute_row_addresses( OSMesaContext osmesa ) { GLint bytesPerPixel, bytesPerRow, i; GLubyte *origin = (GLubyte *) osmesa->rb->Data; GLint bpc; /* bytes per channel */ GLint rowlength; /* in pixels */ GLint height = osmesa->rb->Height; if (osmesa->userRowLength) rowlength = osmesa->userRowLength; else rowlength = osmesa->rb->Width; if (osmesa->rb->DataType == GL_UNSIGNED_BYTE) bpc = 1; else if (osmesa->rb->DataType == GL_UNSIGNED_SHORT) bpc = 2; else if (osmesa->rb->DataType == GL_FLOAT) bpc = 4; else { _mesa_problem(&osmesa->mesa, "Unexpected datatype in osmesa::compute_row_addresses"); return; } if ((osmesa->format == OSMESA_RGB) || (osmesa->format == OSMESA_BGR)) { /* RGB mode */ bytesPerPixel = 3 * bpc; } else if (osmesa->format == OSMESA_RGB_565) { /* 5/6/5 RGB pixel in 16 bits */ bytesPerPixel = 2; } else { /* RGBA mode */ bytesPerPixel = 4 * bpc; } bytesPerRow = rowlength * bytesPerPixel; if (osmesa->yup) { /* Y=0 is bottom line of window */ for (i = 0; i < height; i++) { osmesa->rowaddr[i] = (GLvoid *) ((GLubyte *) origin + i * bytesPerRow); } } else { /* Y=0 is top line of window */ for (i = 0; i < height; i++) { GLint j = height - i - 1; osmesa->rowaddr[i] = (GLvoid *) ((GLubyte *) origin + j * bytesPerRow); } } } /** * Don't use _mesa_delete_renderbuffer since we can't free rb->Data. */ static void osmesa_delete_renderbuffer(struct gl_renderbuffer *rb) { free(rb); } /** * Allocate renderbuffer storage. We don't actually allocate any storage * since we're using a user-provided buffer. * Just set up all the gl_renderbuffer methods. */ static GLboolean osmesa_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb, GLenum internalFormat, GLuint width, GLuint height) { const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); GLint bpc; /* bits per channel */ if (rb->DataType == GL_UNSIGNED_BYTE) bpc = 8; else if (rb->DataType == GL_UNSIGNED_SHORT) bpc = 16; else bpc = 32; /* Note: we can ignoring internalFormat for "window-system" renderbuffers */ (void) internalFormat; if (osmesa->format == OSMESA_RGBA) { if (rb->DataType == GL_UNSIGNED_BYTE) { rb->GetRow = get_row_RGBA8; rb->GetValues = get_values_RGBA8; rb->PutRow = put_row_RGBA8; rb->PutRowRGB = put_row_rgb_RGBA8; rb->PutMonoRow = put_mono_row_RGBA8; rb->PutValues = put_values_RGBA8; rb->PutMonoValues = put_mono_values_RGBA8; } else if (rb->DataType == GL_UNSIGNED_SHORT) { rb->GetRow = get_row_RGBA16; rb->GetValues = get_values_RGBA16; rb->PutRow = put_row_RGBA16; rb->PutRowRGB = put_row_rgb_RGBA16; rb->PutMonoRow = put_mono_row_RGBA16; rb->PutValues = put_values_RGBA16; rb->PutMonoValues = put_mono_values_RGBA16; } else { rb->GetRow = get_row_RGBA32; rb->GetValues = get_values_RGBA32; rb->PutRow = put_row_RGBA32; rb->PutRowRGB = put_row_rgb_RGBA32; rb->PutMonoRow = put_mono_row_RGBA32; rb->PutValues = put_values_RGBA32; rb->PutMonoValues = put_mono_values_RGBA32; } } else if (osmesa->format == OSMESA_BGRA) { if (rb->DataType == GL_UNSIGNED_BYTE) { rb->GetRow = get_row_BGRA8; rb->GetValues = get_values_BGRA8; rb->PutRow = put_row_BGRA8; rb->PutRowRGB = put_row_rgb_BGRA8; rb->PutMonoRow = put_mono_row_BGRA8; rb->PutValues = put_values_BGRA8; rb->PutMonoValues = put_mono_values_BGRA8; } else if (rb->DataType == GL_UNSIGNED_SHORT) { rb->GetRow = get_row_BGRA16; rb->GetValues = get_values_BGRA16; rb->PutRow = put_row_BGRA16; rb->PutRowRGB = put_row_rgb_BGRA16; rb->PutMonoRow = put_mono_row_BGRA16; rb->PutValues = put_values_BGRA16; rb->PutMonoValues = put_mono_values_BGRA16; } else { rb->GetRow = get_row_BGRA32; rb->GetValues = get_values_BGRA32; rb->PutRow = put_row_BGRA32; rb->PutRowRGB = put_row_rgb_BGRA32; rb->PutMonoRow = put_mono_row_BGRA32; rb->PutValues = put_values_BGRA32; rb->PutMonoValues = put_mono_values_BGRA32; } } else if (osmesa->format == OSMESA_ARGB) { if (rb->DataType == GL_UNSIGNED_BYTE) { rb->GetRow = get_row_ARGB8; rb->GetValues = get_values_ARGB8; rb->PutRow = put_row_ARGB8; rb->PutRowRGB = put_row_rgb_ARGB8; rb->PutMonoRow = put_mono_row_ARGB8; rb->PutValues = put_values_ARGB8; rb->PutMonoValues = put_mono_values_ARGB8; } else if (rb->DataType == GL_UNSIGNED_SHORT) { rb->GetRow = get_row_ARGB16; rb->GetValues = get_values_ARGB16; rb->PutRow = put_row_ARGB16; rb->PutRowRGB = put_row_rgb_ARGB16; rb->PutMonoRow = put_mono_row_ARGB16; rb->PutValues = put_values_ARGB16; rb->PutMonoValues = put_mono_values_ARGB16; } else { rb->GetRow = get_row_ARGB32; rb->GetValues = get_values_ARGB32; rb->PutRow = put_row_ARGB32; rb->PutRowRGB = put_row_rgb_ARGB32; rb->PutMonoRow = put_mono_row_ARGB32; rb->PutValues = put_values_ARGB32; rb->PutMonoValues = put_mono_values_ARGB32; } } else if (osmesa->format == OSMESA_RGB) { if (rb->DataType == GL_UNSIGNED_BYTE) { rb->GetRow = get_row_RGB8; rb->GetValues = get_values_RGB8; rb->PutRow = put_row_RGB8; rb->PutRowRGB = put_row_rgb_RGB8; rb->PutMonoRow = put_mono_row_RGB8; rb->PutValues = put_values_RGB8; rb->PutMonoValues = put_mono_values_RGB8; } else if (rb->DataType == GL_UNSIGNED_SHORT) { rb->GetRow = get_row_RGB16; rb->GetValues = get_values_RGB16; rb->PutRow = put_row_RGB16; rb->PutRowRGB = put_row_rgb_RGB16; rb->PutMonoRow = put_mono_row_RGB16; rb->PutValues = put_values_RGB16; rb->PutMonoValues = put_mono_values_RGB16; } else { rb->GetRow = get_row_RGB32; rb->GetValues = get_values_RGB32; rb->PutRow = put_row_RGB32; rb->PutRowRGB = put_row_rgb_RGB32; rb->PutMonoRow = put_mono_row_RGB32; rb->PutValues = put_values_RGB32; rb->PutMonoValues = put_mono_values_RGB32; } } else if (osmesa->format == OSMESA_BGR) { if (rb->DataType == GL_UNSIGNED_BYTE) { rb->GetRow = get_row_BGR8; rb->GetValues = get_values_BGR8; rb->PutRow = put_row_BGR8; rb->PutRowRGB = put_row_rgb_BGR8; rb->PutMonoRow = put_mono_row_BGR8; rb->PutValues = put_values_BGR8; rb->PutMonoValues = put_mono_values_BGR8; } else if (rb->DataType == GL_UNSIGNED_SHORT) { rb->GetRow = get_row_BGR16; rb->GetValues = get_values_BGR16; rb->PutRow = put_row_BGR16; rb->PutRowRGB = put_row_rgb_BGR16; rb->PutMonoRow = put_mono_row_BGR16; rb->PutValues = put_values_BGR16; rb->PutMonoValues = put_mono_values_BGR16; } else { rb->GetRow = get_row_BGR32; rb->GetValues = get_values_BGR32; rb->PutRow = put_row_BGR32; rb->PutRowRGB = put_row_rgb_BGR32; rb->PutMonoRow = put_mono_row_BGR32; rb->PutValues = put_values_BGR32; rb->PutMonoValues = put_mono_values_BGR32; } } else if (osmesa->format == OSMESA_RGB_565) { ASSERT(rb->DataType == GL_UNSIGNED_BYTE); rb->GetRow = get_row_RGB_565; rb->GetValues = get_values_RGB_565; rb->PutRow = put_row_RGB_565; rb->PutRowRGB = put_row_rgb_RGB_565; rb->PutMonoRow = put_mono_row_RGB_565; rb->PutValues = put_values_RGB_565; rb->PutMonoValues = put_mono_values_RGB_565; } else { _mesa_problem(ctx, "bad pixel format in osmesa renderbuffer_storage"); } rb->Width = width; rb->Height = height; compute_row_addresses( osmesa ); return GL_TRUE; } /** * Allocate a new renderbuffer to describe the user-provided color buffer. */ static struct gl_renderbuffer * new_osmesa_renderbuffer(GLcontext *ctx, GLenum format, GLenum type) { const GLuint name = 0; struct gl_renderbuffer *rb = _mesa_new_renderbuffer(ctx, name); if (rb) { rb->RefCount = 1; rb->Delete = osmesa_delete_renderbuffer; rb->AllocStorage = osmesa_renderbuffer_storage; rb->InternalFormat = GL_RGBA; switch (type) { case GL_UNSIGNED_BYTE: rb->Format = MESA_FORMAT_RGBA8888; break; case GL_UNSIGNED_SHORT: rb->Format = MESA_FORMAT_SIGNED_RGBA_16; break; case GL_FLOAT: rb->Format = MESA_FORMAT_RGBA_FLOAT32; break; default: assert(0 && "Unexpected type in new_osmesa_renderbuffer()"); rb->Format = MESA_FORMAT_RGBA8888; } rb->_BaseFormat = GL_RGBA; rb->DataType = type; } return rb; } /**********************************************************************/ /***** Public Functions *****/ /**********************************************************************/ /** * Create an Off-Screen Mesa rendering context. The only attribute needed is * an RGBA vs Color-Index mode flag. * * Input: format - Must be GL_RGBA * sharelist - specifies another OSMesaContext with which to share * display lists. NULL indicates no sharing. * Return: an OSMesaContext or 0 if error */ GLAPI OSMesaContext GLAPIENTRY OSMesaCreateContext( GLenum format, OSMesaContext sharelist ) { return OSMesaCreateContextExt(format, DEFAULT_SOFTWARE_DEPTH_BITS, 8, 0, sharelist); } /** * New in Mesa 3.5 * * Create context and specify size of ancillary buffers. */ GLAPI OSMesaContext GLAPIENTRY OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits, GLint accumBits, OSMesaContext sharelist ) { OSMesaContext osmesa; struct dd_function_table functions; GLint rind, gind, bind, aind; GLint redBits = 0, greenBits = 0, blueBits = 0, alphaBits =0; GLenum type = CHAN_TYPE; rind = gind = bind = aind = 0; if (format==OSMESA_RGBA) { redBits = CHAN_BITS; greenBits = CHAN_BITS; blueBits = CHAN_BITS; alphaBits = CHAN_BITS; rind = 0; gind = 1; bind = 2; aind = 3; } else if (format==OSMESA_BGRA) { redBits = CHAN_BITS; greenBits = CHAN_BITS; blueBits = CHAN_BITS; alphaBits = CHAN_BITS; bind = 0; gind = 1; rind = 2; aind = 3; } else if (format==OSMESA_ARGB) { redBits = CHAN_BITS; greenBits = CHAN_BITS; blueBits = CHAN_BITS; alphaBits = CHAN_BITS; aind = 0; rind = 1; gind = 2; bind = 3; } else if (format==OSMESA_RGB) { redBits = CHAN_BITS; greenBits = CHAN_BITS; blueBits = CHAN_BITS; alphaBits = 0; rind = 0; gind = 1; bind = 2; } else if (format==OSMESA_BGR) { redBits = CHAN_BITS; greenBits = CHAN_BITS; blueBits = CHAN_BITS; alphaBits = 0; rind = 2; gind = 1; bind = 0; } #if CHAN_TYPE == GL_UNSIGNED_BYTE else if (format==OSMESA_RGB_565) { redBits = 5; greenBits = 6; blueBits = 5; alphaBits = 0; rind = 0; /* not used */ gind = 0; bind = 0; } #endif else { return NULL; } osmesa = (OSMesaContext) CALLOC_STRUCT(osmesa_context); if (osmesa) { osmesa->gl_visual = _mesa_create_visual( GL_FALSE, /* double buffer */ GL_FALSE, /* stereo */ redBits, greenBits, blueBits, alphaBits, depthBits, stencilBits, accumBits, accumBits, accumBits, alphaBits ? accumBits : 0, 1 /* num samples */ ); if (!osmesa->gl_visual) { free(osmesa); return NULL; } /* Initialize device driver function table */ _mesa_init_driver_functions(&functions); /* override with our functions */ functions.GetString = get_string; functions.UpdateState = osmesa_update_state; functions.GetBufferSize = NULL; if (!_mesa_initialize_context(&osmesa->mesa, osmesa->gl_visual, sharelist ? &sharelist->mesa : (GLcontext *) NULL, &functions, (void *) osmesa)) { _mesa_destroy_visual( osmesa->gl_visual ); free(osmesa); return NULL; } _mesa_enable_sw_extensions(&(osmesa->mesa)); _mesa_enable_1_3_extensions(&(osmesa->mesa)); _mesa_enable_1_4_extensions(&(osmesa->mesa)); _mesa_enable_1_5_extensions(&(osmesa->mesa)); _mesa_enable_2_0_extensions(&(osmesa->mesa)); _mesa_enable_2_1_extensions(&(osmesa->mesa)); osmesa->gl_buffer = _mesa_create_framebuffer(osmesa->gl_visual); if (!osmesa->gl_buffer) { _mesa_destroy_visual( osmesa->gl_visual ); _mesa_free_context_data( &osmesa->mesa ); free(osmesa); return NULL; } /* Create depth/stencil/accum buffers. We'll create the color * buffer later in OSMesaMakeCurrent(). */ _mesa_add_soft_renderbuffers(osmesa->gl_buffer, GL_FALSE, /* color */ osmesa->gl_visual->haveDepthBuffer, osmesa->gl_visual->haveStencilBuffer, osmesa->gl_visual->haveAccumBuffer, GL_FALSE, /* alpha */ GL_FALSE /* aux */ ); osmesa->format = format; osmesa->userRowLength = 0; osmesa->yup = GL_TRUE; osmesa->rInd = rind; osmesa->gInd = gind; osmesa->bInd = bind; osmesa->aInd = aind; _mesa_meta_init(&osmesa->mesa); /* Initialize the software rasterizer and helper modules. */ { GLcontext *ctx = &osmesa->mesa; SWcontext *swrast; TNLcontext *tnl; if (!_swrast_CreateContext( ctx ) || !_vbo_CreateContext( ctx ) || !_tnl_CreateContext( ctx ) || !_swsetup_CreateContext( ctx )) { _mesa_destroy_visual(osmesa->gl_visual); _mesa_free_context_data(ctx); free(osmesa); return NULL; } _swsetup_Wakeup( ctx ); /* use default TCL pipeline */ tnl = TNL_CONTEXT(ctx); tnl->Driver.RunPipeline = _tnl_run_pipeline; /* Extend the software rasterizer with our optimized line and triangle * drawing functions. */ swrast = SWRAST_CONTEXT( ctx ); swrast->choose_line = osmesa_choose_line; swrast->choose_triangle = osmesa_choose_triangle; } } return osmesa; } /** * Destroy an Off-Screen Mesa rendering context. * * \param osmesa the context to destroy */ GLAPI void GLAPIENTRY OSMesaDestroyContext( OSMesaContext osmesa ) { if (osmesa) { if (osmesa->rb) _mesa_reference_renderbuffer(&osmesa->rb, NULL); _mesa_meta_free( &osmesa->mesa ); _swsetup_DestroyContext( &osmesa->mesa ); _tnl_DestroyContext( &osmesa->mesa ); _vbo_DestroyContext( &osmesa->mesa ); _swrast_DestroyContext( &osmesa->mesa ); _mesa_destroy_visual( osmesa->gl_visual ); _mesa_reference_framebuffer( &osmesa->gl_buffer, NULL ); _mesa_free_context_data( &osmesa->mesa ); free( osmesa ); } } /** * Bind an OSMesaContext to an image buffer. The image buffer is just a * block of memory which the client provides. Its size must be at least * as large as width*height*sizeof(type). Its address should be a multiple * of 4 if using RGBA mode. * * Image data is stored in the order of glDrawPixels: row-major order * with the lower-left image pixel stored in the first array position * (ie. bottom-to-top). * * If the context's viewport hasn't been initialized yet, it will now be * initialized to (0,0,width,height). * * Input: osmesa - the rendering context * buffer - the image buffer memory * type - data type for pixel components * Normally, only GL_UNSIGNED_BYTE and GL_UNSIGNED_SHORT_5_6_5 * are supported. But if Mesa's been compiled with CHAN_BITS==16 * then type may be GL_UNSIGNED_SHORT or GL_UNSIGNED_BYTE. And if * Mesa's been build with CHAN_BITS==32 then type may be GL_FLOAT, * GL_UNSIGNED_SHORT or GL_UNSIGNED_BYTE. * width, height - size of image buffer in pixels, at least 1 * Return: GL_TRUE if success, GL_FALSE if error because of invalid osmesa, * invalid buffer address, invalid type, width<1, height<1, * width>internal limit or height>internal limit. */ GLAPI GLboolean GLAPIENTRY OSMesaMakeCurrent( OSMesaContext osmesa, void *buffer, GLenum type, GLsizei width, GLsizei height ) { if (!osmesa || !buffer || width < 1 || height < 1 || width > MAX_WIDTH || height > MAX_HEIGHT) { return GL_FALSE; } if (osmesa->format == OSMESA_RGB_565 && type != GL_UNSIGNED_SHORT_5_6_5) { return GL_FALSE; } #if 0 if (!(type == GL_UNSIGNED_BYTE || (type == GL_UNSIGNED_SHORT && CHAN_BITS >= 16) || (type == GL_FLOAT && CHAN_BITS == 32))) { /* i.e. is sizeof(type) * 8 > CHAN_BITS? */ return GL_FALSE; } #endif osmesa_update_state( &osmesa->mesa, 0 ); /* Call this periodically to detect when the user has begun using * GL rendering from multiple threads. */ _glapi_check_multithread(); /* Create a front/left color buffer which wraps the user-provided buffer. * There is no back color buffer. * If the user tries to use a 8, 16 or 32-bit/channel buffer that * doesn't match what Mesa was compiled for (CHAN_BITS) the * _mesa_add_renderbuffer() function will create a "wrapper" renderbuffer * that converts rendering from CHAN_BITS to the user-requested channel * size. */ osmesa->rb = new_osmesa_renderbuffer(&osmesa->mesa, osmesa->format, type); _mesa_remove_renderbuffer(osmesa->gl_buffer, BUFFER_FRONT_LEFT); _mesa_add_renderbuffer(osmesa->gl_buffer, BUFFER_FRONT_LEFT, osmesa->rb); assert(osmesa->rb->RefCount == 2); /* Set renderbuffer fields. Set width/height = 0 to force * osmesa_renderbuffer_storage() being called by _mesa_resize_framebuffer() */ osmesa->rb->Data = buffer; osmesa->rb->Width = osmesa->rb->Height = 0; /* Set the framebuffer's size. This causes the * osmesa_renderbuffer_storage() function to get called. */ _mesa_resize_framebuffer(&osmesa->mesa, osmesa->gl_buffer, width, height); osmesa->gl_buffer->Initialized = GL_TRUE; /* XXX TEMPORARY? */ _mesa_make_current( &osmesa->mesa, osmesa->gl_buffer, osmesa->gl_buffer ); /* Remove renderbuffer attachment, then re-add. This installs the * renderbuffer adaptor/wrapper if needed (for bpp conversion). */ _mesa_remove_renderbuffer(osmesa->gl_buffer, BUFFER_FRONT_LEFT); _mesa_add_renderbuffer(osmesa->gl_buffer, BUFFER_FRONT_LEFT, osmesa->rb); /* this updates the visual's red/green/blue/alphaBits fields */ _mesa_update_framebuffer_visual(osmesa->gl_buffer); /* update the framebuffer size */ _mesa_resize_framebuffer(&osmesa->mesa, osmesa->gl_buffer, width, height); return GL_TRUE; } GLAPI OSMesaContext GLAPIENTRY OSMesaGetCurrentContext( void ) { GLcontext *ctx = _mesa_get_current_context(); if (ctx) return (OSMesaContext) ctx; else return NULL; } GLAPI void GLAPIENTRY OSMesaPixelStore( GLint pname, GLint value ) { OSMesaContext osmesa = OSMesaGetCurrentContext(); switch (pname) { case OSMESA_ROW_LENGTH: if (value<0) { _mesa_error( &osmesa->mesa, GL_INVALID_VALUE, "OSMesaPixelStore(value)" ); return; } osmesa->userRowLength = value; break; case OSMESA_Y_UP: osmesa->yup = value ? GL_TRUE : GL_FALSE; break; default: _mesa_error( &osmesa->mesa, GL_INVALID_ENUM, "OSMesaPixelStore(pname)" ); return; } compute_row_addresses( osmesa ); } GLAPI void GLAPIENTRY OSMesaGetIntegerv( GLint pname, GLint *value ) { OSMesaContext osmesa = OSMesaGetCurrentContext(); switch (pname) { case OSMESA_WIDTH: if (osmesa->gl_buffer) *value = osmesa->gl_buffer->Width; else *value = 0; return; case OSMESA_HEIGHT: if (osmesa->gl_buffer) *value = osmesa->gl_buffer->Height; else *value = 0; return; case OSMESA_FORMAT: *value = osmesa->format; return; case OSMESA_TYPE: /* current color buffer's data type */ if (osmesa->rb) { *value = osmesa->rb->DataType; } else { *value = 0; } return; case OSMESA_ROW_LENGTH: *value = osmesa->userRowLength; return; case OSMESA_Y_UP: *value = osmesa->yup; return; case OSMESA_MAX_WIDTH: *value = MAX_WIDTH; return; case OSMESA_MAX_HEIGHT: *value = MAX_HEIGHT; return; default: _mesa_error(&osmesa->mesa, GL_INVALID_ENUM, "OSMesaGetIntergerv(pname)"); return; } } /** * Return the depth buffer associated with an OSMesa context. * Input: c - the OSMesa context * Output: width, height - size of buffer in pixels * bytesPerValue - bytes per depth value (2 or 4) * buffer - pointer to depth buffer values * Return: GL_TRUE or GL_FALSE to indicate success or failure. */ GLAPI GLboolean GLAPIENTRY OSMesaGetDepthBuffer( OSMesaContext c, GLint *width, GLint *height, GLint *bytesPerValue, void **buffer ) { struct gl_renderbuffer *rb = NULL; if (c->gl_buffer) rb = c->gl_buffer->Attachment[BUFFER_DEPTH].Renderbuffer; if (!rb || !rb->Data) { *width = 0; *height = 0; *bytesPerValue = 0; *buffer = 0; return GL_FALSE; } else { *width = rb->Width; *height = rb->Height; if (c->gl_visual->depthBits <= 16) *bytesPerValue = sizeof(GLushort); else *bytesPerValue = sizeof(GLuint); *buffer = rb->Data; return GL_TRUE; } } /** * Return the color buffer associated with an OSMesa context. * Input: c - the OSMesa context * Output: width, height - size of buffer in pixels * format - the pixel format (OSMESA_FORMAT) * buffer - pointer to color buffer values * Return: GL_TRUE or GL_FALSE to indicate success or failure. */ GLAPI GLboolean GLAPIENTRY OSMesaGetColorBuffer( OSMesaContext osmesa, GLint *width, GLint *height, GLint *format, void **buffer ) { if (osmesa->rb && osmesa->rb->Data) { *width = osmesa->rb->Width; *height = osmesa->rb->Height; *format = osmesa->format; *buffer = osmesa->rb->Data; return GL_TRUE; } else { *width = 0; *height = 0; *format = 0; *buffer = 0; return GL_FALSE; } } struct name_function { const char *Name; OSMESAproc Function; }; static struct name_function functions[] = { { "OSMesaCreateContext", (OSMESAproc) OSMesaCreateContext }, { "OSMesaCreateContextExt", (OSMESAproc) OSMesaCreateContextExt }, { "OSMesaDestroyContext", (OSMESAproc) OSMesaDestroyContext }, { "OSMesaMakeCurrent", (OSMESAproc) OSMesaMakeCurrent }, { "OSMesaGetCurrentContext", (OSMESAproc) OSMesaGetCurrentContext }, { "OSMesaPixelsStore", (OSMESAproc) OSMesaPixelStore }, { "OSMesaGetIntegerv", (OSMESAproc) OSMesaGetIntegerv }, { "OSMesaGetDepthBuffer", (OSMESAproc) OSMesaGetDepthBuffer }, { "OSMesaGetColorBuffer", (OSMESAproc) OSMesaGetColorBuffer }, { "OSMesaGetProcAddress", (OSMESAproc) OSMesaGetProcAddress }, { "OSMesaColorClamp", (OSMESAproc) OSMesaColorClamp }, { NULL, NULL } }; GLAPI OSMESAproc GLAPIENTRY OSMesaGetProcAddress( const char *funcName ) { int i; for (i = 0; functions[i].Name; i++) { if (strcmp(functions[i].Name, funcName) == 0) return functions[i].Function; } return _glapi_get_proc_address(funcName); } GLAPI void GLAPIENTRY OSMesaColorClamp(GLboolean enable) { OSMesaContext osmesa = OSMesaGetCurrentContext(); if (enable == GL_TRUE) { osmesa->mesa.Color.ClampFragmentColor = GL_TRUE; } else { osmesa->mesa.Color.ClampFragmentColor = GL_FIXED_ONLY_ARB; } }
CPFDSoftware-Tony/gmv
utils/Mesa/Mesa-7.8.2/src/mesa/drivers/osmesa/osmesa.c
C
gpl-3.0
47,766
/* Alternate Layout Flatline */ .MainMenuCtrlComDiv { top: 280px; } .MainMenuCtrlEntDiv { top: 280px; left: 160px; } .MainMenuCtrlNavDiv { top: 280px; left: 500px } .MainMenuCtrlAppDiv { left: 15px; top: 295px; transform: scale(1.25, 1.25); } .MainMenuCtrlSetDiv { top: 295px; left: 670px; transform: scale(1.25, 1.25); } .MainMenuCtrlAppHighlight { top: 80px; left: -110px; } .MainMenuCtrlComHighlight { top: 70px; } .MainMenuCtrlNavHighlight { top: 75px; left: 390px; } .MainMenuCtrlEntHighlight { top: 75px; left: 50px; } .MainMenuCtrlSetHighlight { left: 550px; top: 80px; } .MainMenuCtrlIconName { top: 5px; } .MainMenuCtrl { overflow: visible; } .MainMenuCtrlSetDiv.MainMenuCtrlCoinFocus { -o-transform: scale(1.4, 1.4) translate(0px, -50px); transform: scale(1.4, 1.4) translate(0px, -50px); } .MainMenuCtrlAppDiv.MainMenuCtrlCoinFocus { -o-transform: scale(1.4, 1.4) translate(0px, -50px); transform: scale(1.4, 1.4) translate(0px, -50px); } .MainMenuCtrlComDiv.MainMenuCtrlCoinFocus { -o-transform: scale(1.2, 1.2) translate(0px, -50px); transform: scale(1.2, 1.2) translate(0px, -50px); } .MainMenuCtrlEntDiv.MainMenuCtrlCoinFocus { -o-transform: scale(1.2, 1.2) translate(0px, -50px); transform: scale(1.2, 1.2) translate(0px, -50px); } .MainMenuCtrlNavDiv.MainMenuCtrlCoinFocus { -o-transform: scale(1.2, 1.2) translate(0px, -50px); transform: scale(1.2, 1.2) translate(0px, -50px); } .MainMenuCtrlComDiv.MainMenuCtrlCoinFocus { -o-transform: scale(1.2, 1.2) translate(0px, -60px); transform: scale(1.2, 1.2) translate(0px, -60px); }
Trevelopment/MZD-AIO-TI-X
app/files/tweaks/config/MainMenuTweaks/FlatLine.css
CSS
gpl-3.0
1,615
/* * Copyright 2014 REI Systems, Inc. * * This file is part of GovDashboard. * * GovDashboard 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. * * GovDashboard 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 GovDashboard. If not, see <http://www.gnu.org/licenses/>. */ (function(global,$,undefined) { if ( typeof $ === 'undefined' ) { throw new Error('Ext requires jQuery'); } if ( typeof global.GD === 'undefined' ) { throw new Error('Ext requires GD'); } var GD = global.GD; var DashboardSection = GD.Section.extend({ routes: ['/cp/dashboard'], name: 'dashboard', title: 'Dashboards', init: function ( options ) { this._super(options); }, getDefaultRoute: function () { return this.routes[0]; }, dispatch: function ( request ) { this._super(request); var _this = this; if ( !this.dispatched ) { $.each(this.routes,function(i,route){ var routeMatcher = new RegExp(route.replace(/:[^\s/]+/g, '([\\w-]+)')); var match = request.match(routeMatcher); if ( match ) { _this.setActive(); _this.dispatched = true; if ( request == _this.routes[0] ) { _this.renderIndex(); } return false; } }); } }, renderIndex: function () { this.messaging = new GD.MessagingView('#gd-admin-messages'); this.layoutHeader.find('.gd-section-header-left').append('<h1>Dashboard Management</h1>'); var View = new GD.DashboardListView(null, this.layoutBody, { 'section':this }); View.render(); var _this = this; GD.DashboardFactory.getDashboardList(GovdashAdmin.getActiveDatasourceName(), function ( data ) { View.loadData(data); }, function(jqXHR, textStatus, errorThrown) { _this.messaging.addErrors(jqXHR.responseText); _this.messaging.displayMessages(); $("html, body").animate({ scrollTop: 0 }, "slow"); }); } }); // add to global space global.GD.DashboardSection = DashboardSection; })(typeof window === 'undefined' ? this : window, jQuery);
REI-Systems/GovDashboard-Community
webapp/sites/all/modules/custom/dashboard/admin/js/DashboardSection.js
JavaScript
gpl-3.0
2,933
#ifndef UPDATER_H #define UPDATER_H #ifndef UPDATE_TOPIC #error "UPDATE_TOPIC not defined" #endif #ifndef UPDATE_INTERVAL #define UPDATE_INTERVAL 3600 #endif #include "Service.h" extern const char UPDATE_NAME[]; class Update : public Service<UPDATE_NAME> { public: struct Target { RbootOutputStream* stream; uint8_t slot; }; Update(Device* device); virtual ~Update(); virtual void onStateChanged(const State& state); private: void check(); void download(); void apply(uint8_t slot); void onGlobalUpdateRequestReceived(const String& message); void onDeviceUpdateRequestReceived(const String& message); static Target target(); Timer checkTimer; #if UPDATE_DELAY != 0 Timer delayTimer; #endif Device* device; HttpClient http; }; #endif
esper-hub/esper
framework/esper/services/Update.h
C
gpl-3.0
825
<!DOCTYPE html> <html> <head> <meta charset="utf-8"/> <style> table.head, table.foot { width: 100%; } td.head-rtitle, td.foot-os { text-align: right; } td.head-vol { text-align: center; } table.foot td { width: 50%; } table.head td { width: 33%; } div.spacer { margin: 1em 0; } </style> <title> JOURNALCTL(1)</title> </head> <body> <div class="mandoc"> <table class="head"> <tbody> <tr> <td class="head-ltitle"> JOURNALCTL(1)</td> <td class="head-vol"> journalctl</td> <td class="head-rtitle"> JOURNALCTL(1)</td> </tr> </tbody> </table> <div class="section"> <h1>NAME</h1> journalctl - Query the systemd journal</div> <div class="section"> <h1>SYNOPSIS</h1><div style="margin-left: 11.00ex;text-indent: -11.00ex;" class="spacer"> <b>journalctl</b> [OPTIONS...] [MATCHES...]</div> </div> <div class="section"> <h1>DESCRIPTION</h1> <b>journalctl</b> may be used to query the contents of the <b>systemd</b>(1) journal as written by <b>systemd-journald.service</b>(8).<div class="spacer"> </div> If called without parameters, it will show the full contents of the journal, starting with the oldest entry collected.<div class="spacer"> </div> If one or more match arguments are passed, the output is filtered accordingly. A match is in the format &quot;FIELD=VALUE&quot;, e.g. &quot;_SYSTEMD_UNIT=httpd.service&quot;, referring to the components of a structured journal entry. See <b>systemd.journal-fields</b>(7) for a list of well-known fields. If multiple matches are specified matching different fields, the log entries are filtered by both, i.e. the resulting output will show only entries matching all the specified matches of this kind. If two matches apply to the same field, then they are automatically matched as alternatives, i.e. the resulting output will show entries matching any of the specified matches for the same field. Finally, the character &quot;+&quot; may appears as a separate word between other terms on the command line. This causes all matches before and after to be combined in a disjunction (i.e. logical OR).<div class="spacer"> </div> As shortcuts for a few types of field/value matches, file paths may be specified. If a file path refers to an executable file, this is equivalent to an &quot;_EXE=&quot; match for the canonicalized binary path. Similarly, if a path refers to a device node, this is equivalent to a &quot;_KERNEL_DEVICE=&quot; match for the device.<div class="spacer"> </div> Additional constraints may be added using options <b>--boot</b>, <b>--unit=</b>, etc, to further limit what entries will be shown (logical AND).<div class="spacer"> </div> Output is interleaved from all accessible journal files, whether they are rotated or currently being written, and regardless of whether they belong to the system itself or are accessible user journals.<div class="spacer"> </div> The set of journal files which will be used can be modified using the <b>--user</b>, <b>--system</b>, <b>--directory</b>, and <b>--file</b> options, see below.<div class="spacer"> </div> All users are granted access to their private per-user journals. However, by default, only root and users who are members of a few special groups are granted access to the system journal and the journals of other users. Members of the groups &quot;systemd-journal&quot;, &quot;adm&quot;, and &quot;wheel&quot; can read all journal files. Note that the two latter groups traditionally have additional privileges specified by the distribution. Members of the &quot;wheel&quot; group can often perform administrative tasks.<div class="spacer"> </div> The output is paged through <b>less</b> by default, and long lines are &quot;truncated&quot; to screen width. The hidden part can be viewed by using the left-arrow and right-arrow keys. Paging can be disabled; see the <b>--no-pager</b> option and the &quot;Environment&quot; section below.<div class="spacer"> </div> When outputting to a tty, lines are colored according to priority: lines of level ERROR and higher are colored red; lines of level NOTICE and higher are highlighted; other lines are displayed normally.</div> <div class="section"> <h1>OPTIONS</h1> The following options are understood:<div class="spacer"> </div> <b>--no-full</b>, <b>--full</b>, <b>-l</b><div style="margin-left: 4.00ex;"> Ellipsize fields when they do not fit in available columns. The default is to show full fields, allowing them to wrap or be truncated by the pager, if one is used.<div style="height: 1.00em;"> &#160;</div> The old options <b>-l</b>/<b>--full</b> are not useful anymore, except to undo <b>--no-full</b>.</div> <div class="spacer"> </div> <b>-a</b>, <b>--all</b><div style="margin-left: 4.00ex;"> Show all fields in full, even if they include unprintable characters or are very long.</div> <div class="spacer"> </div> <b>-f</b>, <b>--follow</b><div style="margin-left: 4.00ex;"> Show only the most recent journal entries, and continuously print new entries as they are appended to the journal.</div> <div class="spacer"> </div> <b>-e</b>, <b>--pager-end</b><div style="margin-left: 4.00ex;"> Immediately jump to the end of the journal inside the implied pager tool. This implies <b>-n1000</b> to guarantee that the pager will not buffer logs of unbounded size. This may be overridden with an explicit <b>-n</b> with some other numeric value while <b>-nall</b> will disable this cap. Note that this option is only supported for the <b>less</b>(1) pager.</div> <div class="spacer"> </div> <b>-n</b>, <b>--lines=</b><div style="margin-left: 4.00ex;"> Show the most recent journal events and limit the number of events shown. If <b>--follow</b> is used, this option is implied. The argument is a positive integer or &quot;all&quot; to disable line limiting. The default value is 10 if no argument is given.</div> <div class="spacer"> </div> <b>--no-tail</b><div style="margin-left: 4.00ex;"> Show all stored output lines, even in follow mode. Undoes the effect of <b>--lines=</b>.</div> <div class="spacer"> </div> <b>-r</b>, <b>--reverse</b><div style="margin-left: 4.00ex;"> Reverse output so that the newest entries are displayed first.</div> <div class="spacer"> </div> <b>-o</b>, <b>--output=</b><div style="margin-left: 4.00ex;"> Controls the formatting of the journal entries that are shown. Takes one of the following options:<div class="spacer"> </div> <b>short</b><div style="margin-left: 4.00ex;"> is the default and generates an output that is mostly identical to the formatting of classic syslog files, showing one line per journal entry.</div> <div class="spacer"> </div> <b>short-iso</b><div style="margin-left: 4.00ex;"> is very similar, but shows ISO 8601 wallclock timestamps.</div> <div class="spacer"> </div> <b>short-precise</b><div style="margin-left: 4.00ex;"> is very similar, but shows timestamps with full microsecond precision.</div> <div class="spacer"> </div> <b>short-monotonic</b><div style="margin-left: 4.00ex;"> is very similar, but shows monotonic timestamps instead of wallclock timestamps.</div> <div class="spacer"> </div> <b>verbose</b><div style="margin-left: 4.00ex;"> shows the full-structured entry items with all fields.</div> <div class="spacer"> </div> <b>export</b><div style="margin-left: 4.00ex;"> serializes the journal into a binary (but mostly text-based) stream suitable for backups and network transfer (see <b>Journal Export Format</b>[1] for more information).</div> <div class="spacer"> </div> <b>json</b><div style="margin-left: 4.00ex;"> formats entries as JSON data structures, one per line (see <b>Journal JSON Format</b>[2] for more information).</div> <div class="spacer"> </div> <b>json-pretty</b><div style="margin-left: 4.00ex;"> formats entries as JSON data structures, but formats them in multiple lines in order to make them more readable by humans.</div> <div class="spacer"> </div> <b>json-sse</b><div style="margin-left: 4.00ex;"> formats entries as JSON data structures, but wraps them in a format suitable for <b>Server-Sent Events</b>[3].</div> <div class="spacer"> </div> <b>cat</b><div style="margin-left: 4.00ex;"> generates a very terse output, only showing the actual message of each journal entry with no metadata, not even a timestamp.</div> </div> <div class="spacer"> </div> <b>--utc</b><div style="margin-left: 4.00ex;"> Express time in Coordinated Universal Time (UTC).</div> <div class="spacer"> </div> <b>-x</b>, <b>--catalog</b><div style="margin-left: 4.00ex;"> Augment log lines with explanation texts from the message catalog. This will add explanatory help texts to log messages in the output where this is available. These short help texts will explain the context of an error or log event, possible solutions, as well as pointers to support forums, developer documentation, and any other relevant manuals. Note that help texts are not available for all messages, but only for selected ones. For more information on the message catalog, please refer to the <b>Message Catalog Developer Documentation</b>[4].<div style="height: 1.00em;"> &#160;</div> Note: when attaching <b>journalctl</b> output to bug reports, please do <i>not</i> use <b>-x</b>.</div> <div class="spacer"> </div> <b>-q</b>, <b>--quiet</b><div style="margin-left: 4.00ex;"> Suppresses any warning messages regarding inaccessible system journals when run as a normal user.</div> <div class="spacer"> </div> <b>-m</b>, <b>--merge</b><div style="margin-left: 4.00ex;"> Show entries interleaved from all available journals, including remote ones.</div> <div class="spacer"> </div> <b>-b </b><b>[</b><i>ID</i>]<b>[</b><i>&#177;offset</i>], <b>--boot=</b><b>[</b><i>ID</i>]<b>[</b><i>&#177;offset</i>]<div style="margin-left: 4.00ex;"> Show messages from a specific boot. This will add a match for &quot;_BOOT_ID=&quot;.<div style="height: 1.00em;"> &#160;</div> The argument may be empty, in which case logs for the current boot will be shown.<div style="height: 1.00em;"> &#160;</div> If the boot ID is omitted, a positive <i>offset</i> will look up the boots starting from the beginning of the journal, and a equal-or-less-than zero <i>offset</i> will look up boots starting from the end of the journal. Thus, <b>1</b> means the first boot found in the journal in chronological order, <b>2</b> the second and so on; while <b>-0</b> is the last boot, <b>-1</b> the boot before last, and so on. An empty <i>offset</i> is equivalent to specifying <b>-0</b>, except when the current boot is not the last boot (e.g. because <b>--directory</b> was specified to look at logs from a different machine).<div style="height: 1.00em;"> &#160;</div> If the 32-character <i>ID</i> is specified, it may optionally be followed by <i>offset</i> which identifies the boot relative to the one given by boot <i>ID</i>. Negative values mean earlier boots and a positive values mean later boots. If <i>offset</i> is not specified, a value of zero is assumed, and the logs for the boot given by <i>ID</i> are shown.</div> <div class="spacer"> </div> <b>--list-boots</b><div style="margin-left: 4.00ex;"> Show a tabular list of boot numbers (relative to the current boot), their IDs, and the timestamps of the first and last message pertaining to the boot.</div> <div class="spacer"> </div> <b>-k</b>, <b>--dmesg</b><div style="margin-left: 4.00ex;"> Show only kernel messages. This implies <b>-b</b> and adds the match &quot;_TRANSPORT=kernel&quot;.</div> <div class="spacer"> </div> <b>-t</b>, <b>--identifier=</b><b></b><i>SYSLOG_IDENTIFIER</i><b>|</b><b></b><i>PATTERN</i><div style="margin-left: 4.00ex;"> Show messages for the specified syslog identifier <i>SYSLOG_IDENTIFIER</i>, or for any of the messages with a &quot;SYSLOG_IDENTIFIER&quot; matched by <i>PATTERN</i>.<div style="height: 1.00em;"> &#160;</div> This parameter can be specified multiple times.</div> <div class="spacer"> </div> <b>-u</b>, <b>--unit=</b><b></b><i>UNIT</i><b>|</b><b></b><i>PATTERN</i><div style="margin-left: 4.00ex;"> Show messages for the specified systemd unit <i>UNIT</i> (such as a service unit), or for any of the units matched by <i>PATTERN</i>. If a pattern is specified, a list of unit names found in the journal is compared with the specified pattern and all that match are used. For each unit name, a match is added for messages from the unit (&quot;_SYSTEMD_UNIT=<i>UNIT</i>&quot;), along with additional matches for messages from systemd and messages about coredumps for the specified unit.<div style="height: 1.00em;"> &#160;</div> This parameter can be specified multiple times.</div> <div class="spacer"> </div> <b>--user-unit=</b><div style="margin-left: 4.00ex;"> Show messages for the specified user session unit. This will add a match for messages from the unit (&quot;_SYSTEMD_USER_UNIT=&quot; and &quot;_UID=&quot;) and additional matches for messages from session systemd and messages about coredumps for the specified unit.<div style="height: 1.00em;"> &#160;</div> This parameter can be specified multiple times.</div> <div class="spacer"> </div> <b>-p</b>, <b>--priority=</b><div style="margin-left: 4.00ex;"> Filter output by message priorities or priority ranges. Takes either a single numeric or textual log level (i.e. between 0/&quot;emerg&quot; and 7/&quot;debug&quot;), or a range of numeric/text log levels in the form FROM..TO. The log levels are the usual syslog log levels as documented in <b>syslog</b>(3), i.e. &quot;emerg&quot;&#160;(0), &quot;alert&quot;&#160;(1), &quot;crit&quot;&#160;(2), &quot;err&quot;&#160;(3), &quot;warning&quot;&#160;(4), &quot;notice&quot;&#160;(5), &quot;info&quot;&#160;(6), &quot;debug&quot;&#160;(7). If a single log level is specified, all messages with this log level or a lower (hence more important) log level are shown. If a range is specified, all messages within the range are shown, including both the start and the end value of the range. This will add &quot;PRIORITY=&quot; matches for the specified priorities.</div> <div class="spacer"> </div> <b>-c</b>, <b>--cursor=</b><div style="margin-left: 4.00ex;"> Start showing entries from the location in the journal specified by the passed cursor.</div> <div class="spacer"> </div> <b>--after-cursor=</b><div style="margin-left: 4.00ex;"> Start showing entries from the location in the journal <i>after</i> the location specified by the this cursor. The cursor is shown when the <b>--show-cursor</b> option is used.</div> <div class="spacer"> </div> <b>--show-cursor</b><div style="margin-left: 4.00ex;"> The cursor is shown after the last entry after two dashes:<div style="height: 1.00em;"> &#160;</div> <div style="margin-left: 4.00ex;"> <br/> -- cursor: s=0639...<br/> </div> <div style="height: 1.00em;"> &#160;</div> The format of the cursor is private and subject to change.</div> <div class="spacer"> </div> <b>--since=</b>, <b>--until=</b><div style="margin-left: 4.00ex;"> Start showing entries on or newer than the specified date, or on or older than the specified date, respectively. Date specifications should be of the format &quot;2012-10-30 18:17:16&quot;. If the time part is omitted, &quot;00:00:00&quot; is assumed. If only the seconds component is omitted, &quot;:00&quot; is assumed. If the date component is omitted, the current day is assumed. Alternatively the strings &quot;yesterday&quot;, &quot;today&quot;, &quot;tomorrow&quot; are understood, which refer to 00:00:00 of the day before the current day, the current day, or the day after the current day, respectively. &quot;now&quot; refers to the current time. Finally, relative times may be specified, prefixed with &quot;-&quot; or &quot;+&quot;, referring to times before or after the current time, respectively.</div> <div class="spacer"> </div> <b>-F</b>, <b>--field=</b><div style="margin-left: 4.00ex;"> Print all possible data values the specified field can take in all entries of the journal.</div> <div class="spacer"> </div> <b>--system</b>, <b>--user</b><div style="margin-left: 4.00ex;"> Show messages from system services and the kernel (with <b>--system</b>). Show messages from service of current user (with <b>--user</b>). If neither is specified, show all messages that the user can see.</div> <div class="spacer"> </div> <b>-M</b>, <b>--machine=</b><div style="margin-left: 4.00ex;"> Show messages from a running, local container. Specify a container name to connect to.</div> <div class="spacer"> </div> <b>-D </b><b></b><i>DIR</i>, <b>--directory=</b><b></b><i>DIR</i><div style="margin-left: 4.00ex;"> Takes a directory path as argument. If specified, journalctl will operate on the specified journal directory <i>DIR</i> instead of the default runtime and system journal paths.</div> <div class="spacer"> </div> <b>--file=</b><b></b><i>GLOB</i><div style="margin-left: 4.00ex;"> Takes a file glob as an argument. If specified, journalctl will operate on the specified journal files matching <i>GLOB</i> instead of the default runtime and system journal paths. May be specified multiple times, in which case files will be suitably interleaved.</div> <div class="spacer"> </div> <b>--root=</b><b></b><i>ROOT</i><div style="margin-left: 4.00ex;"> Takes a directory path as an argument. If specified, journalctl will operate on catalog file hierarchy underneath the specified directory instead of the root directory (e.g. <b>--update-catalog</b> will create <i>ROOT</i>/var/lib/systemd/catalog/database).</div> <div class="spacer"> </div> <b>--new-id128</b><div style="margin-left: 4.00ex;"> Instead of showing journal contents, generate a new 128-bit ID suitable for identifying messages. This is intended for usage by developers who need a new identifier for a new message they introduce and want to make recognizable. This will print the new ID in three different formats which can be copied into source code or similar.</div> <div class="spacer"> </div> <b>--header</b><div style="margin-left: 4.00ex;"> Instead of showing journal contents, show internal header information of the journal fields accessed.</div> <div class="spacer"> </div> <b>--disk-usage</b><div style="margin-left: 4.00ex;"> Shows the current disk usage of all journal files. This shows the sum of the disk usage of all archived and active journal files.</div> <div class="spacer"> </div> <b>--vacuum-size=</b>, <b>--vacuum-time=</b><div style="margin-left: 4.00ex;"> Removes archived journal files until the disk space they use falls below the specified size (specified with the usual &quot;K&quot;, &quot;M&quot;, &quot;G&quot;, &quot;T&quot; suffixes), or all journal files contain no data older than the specified timespan (specified with the usual &quot;s&quot;, &quot;min&quot;, &quot;h&quot;, &quot;days&quot;, &quot;months&quot;, &quot;weeks&quot;, &quot;years&quot; suffixes). Note that running <b>--vacuum-size=</b> has only indirect effect on the output shown by <b>--disk-usage</b> as the latter includes active journal files, while the former only operates on archived journal files. <b>--vacuum-size=</b> and <b>--vacuum-time=</b> may be combined in a single invocation to enforce both a size and time limit on the archived journal files.</div> <div class="spacer"> </div> <b>--list-catalog </b><b>[</b><i>128-bit-ID...</i>]<b> </b><div style="margin-left: 4.00ex;"> List the contents of the message catalog as a table of message IDs, plus their short description strings.<div style="height: 1.00em;"> &#160;</div> If any <i>128-bit-ID</i>s are specified, only those entries are shown.</div> <div class="spacer"> </div> <b>--dump-catalog </b><b>[</b><i>128-bit-ID...</i>]<b> </b><div style="margin-left: 4.00ex;"> Show the contents of the message catalog, with entries separated by a line consisting of two dashes and the ID (the format is the same as .catalog files).<div style="height: 1.00em;"> &#160;</div> If any <i>128-bit-ID</i>s are specified, only those entries are shown.</div> <div class="spacer"> </div> <b>--update-catalog</b><div style="margin-left: 4.00ex;"> Update the message catalog index. This command needs to be executed each time new catalog files are installed, removed, or updated to rebuild the binary catalog index.</div> <div class="spacer"> </div> <b>--setup-keys</b><div style="margin-left: 4.00ex;"> Instead of showing journal contents, generate a new key pair for Forward Secure Sealing (FSS). This will generate a sealing key and a verification key. The sealing key is stored in the journal data directory and shall remain on the host. The verification key should be stored externally. Refer to the <b>Seal=</b> option in <b>journald.conf</b>(5) for information on Forward Secure Sealing and for a link to a refereed scholarly paper detailing the cryptographic theory it is based on.</div> <div class="spacer"> </div> <b>--force</b><div style="margin-left: 4.00ex;"> When <b>--setup-keys</b> is passed and Forward Secure Sealing (FSS) has already been configured, recreate FSS keys.</div> <div class="spacer"> </div> <b>--interval=</b><div style="margin-left: 4.00ex;"> Specifies the change interval for the sealing key when generating an FSS key pair with <b>--setup-keys</b>. Shorter intervals increase CPU consumption but shorten the time range of undetectable journal alterations. Defaults to 15min.</div> <div class="spacer"> </div> <b>--verify</b><div style="margin-left: 4.00ex;"> Check the journal file for internal consistency. If the file has been generated with FSS enabled and the FSS verification key has been specified with <b>--verify-key=</b>, authenticity of the journal file is verified.</div> <div class="spacer"> </div> <b>--verify-key=</b><div style="margin-left: 4.00ex;"> Specifies the FSS verification key to use for the <b>--verify</b> operation.</div> <div class="spacer"> </div> <b>--flush</b><div style="margin-left: 4.00ex;"> Asks the Journal daemon to flush any log data stored in /run/log/journal into /var/log/journal, if persistent storage is enabled. This call does not return until the operation is complete.</div> <div class="spacer"> </div> <b>-h</b>, <b>--help</b><div style="margin-left: 4.00ex;"> Print a short help text and exit.</div> <div class="spacer"> </div> <b>--version</b><div style="margin-left: 4.00ex;"> Print a short version string and exit.</div> <div class="spacer"> </div> <b>--no-pager</b><div style="margin-left: 4.00ex;"> Do not pipe output into a pager.</div> </div> <div class="section"> <h1>EXIT STATUS</h1> On success, 0 is returned; otherwise, a non-zero failure code is returned.</div> <div class="section"> <h1>ENVIRONMENT</h1> <i>$SYSTEMD_PAGER</i><div style="margin-left: 4.00ex;"> Pager to use when <b>--no-pager</b> is not given; overrides <i>$PAGER</i>. Setting this to an empty string or the value &quot;cat&quot; is equivalent to passing <b>--no-pager</b>.</div> <div class="spacer"> </div> <i>$SYSTEMD_LESS</i><div style="margin-left: 4.00ex;"> Override the default options passed to <b>less</b> (&quot;FRSXMK&quot;).</div> </div> <div class="section"> <h1>EXAMPLES</h1> Without arguments, all collected logs are shown unfiltered:<div style="height: 1.00em;"> &#160;</div> <div style="margin-left: 4.00ex;"> <br/> journalctl<br/> </div> <div class="spacer"> </div> With one match specified, all entries with a field matching the expression are shown:<div style="height: 1.00em;"> &#160;</div> <div style="margin-left: 4.00ex;"> <br/> journalctl _SYSTEMD_UNIT=avahi-daemon.service<br/> </div> <div class="spacer"> </div> If two different fields are matched, only entries matching both expressions at the same time are shown:<div style="height: 1.00em;"> &#160;</div> <div style="margin-left: 4.00ex;"> <br/> journalctl _SYSTEMD_UNIT=avahi-daemon.service _PID=28097<br/> </div> <div class="spacer"> </div> If two matches refer to the same field, all entries matching either expression are shown:<div style="height: 1.00em;"> &#160;</div> <div style="margin-left: 4.00ex;"> <br/> journalctl _SYSTEMD_UNIT=avahi-daemon.service _SYSTEMD_UNIT=dbus.service<br/> </div> <div class="spacer"> </div> If the separator &quot;+&quot; is used, two expressions may be combined in a logical OR. The following will show all messages from the Avahi service process with the PID 28097 plus all messages from the D-Bus service (from any of its processes):<div style="height: 1.00em;"> &#160;</div> <div style="margin-left: 4.00ex;"> <br/> journalctl _SYSTEMD_UNIT=avahi-daemon.service _PID=28097 + _SYSTEMD_UNIT=dbus.service<br/> </div> <div class="spacer"> </div> Show all logs generated by the D-Bus executable:<div style="height: 1.00em;"> &#160;</div> <div style="margin-left: 4.00ex;"> <br/> journalctl /usr/bin/dbus-daemon<br/> </div> <div class="spacer"> </div> Show all kernel logs from previous boot:<div style="height: 1.00em;"> &#160;</div> <div style="margin-left: 4.00ex;"> <br/> journalctl -k -b -1<br/> </div> <div class="spacer"> </div> Show a live log display from a system service apache.service:<div style="height: 1.00em;"> &#160;</div> <div style="margin-left: 4.00ex;"> <br/> journalctl -f -u apache<br/> </div> </div> <div class="section"> <h1>SEE ALSO</h1><div style="height: 1.00em;"> &#160;</div> <b>systemd</b>(1), <b>systemd-journald.service</b>(8), <b>systemctl</b>(1), <b>coredumpctl</b>(1), <b>systemd.journal-fields</b>(7), <b>journald.conf</b>(5)</div> <div class="section"> <h1>NOTES</h1><dl> <dt> 1.</dt> <dd> Journal Export Format</dd> </dl> <div style="margin-left: 4.00ex;"> http://www.freedesktop.org/wiki/Software/systemd/export</div> <dl> <dt> 2.</dt> <dd> Journal JSON Format</dd> </dl> <div style="margin-left: 4.00ex;"> http://www.freedesktop.org/wiki/Software/systemd/json</div> <dl> <dt> 3.</dt> <dd> Server-Sent Events</dd> </dl> <div style="margin-left: 4.00ex;"> https://developer.mozilla.org/en-US/docs/Server-sent_events/Using_server-sent_events</div> <dl> <dt> 4.</dt> <dd> Message Catalog Developer Documentation</dd> </dl> <div style="margin-left: 4.00ex;"> http://www.freedesktop.org/wiki/Software/systemd/catalog</div> </div> <table class="foot"> <tr> <td class="foot-date"> </td> <td class="foot-os"> systemd 226</td> </tr> </table> </div> </body> </html>
fusion809/fusion809.github.io-old
man/journalctl.1.html
HTML
gpl-3.0
26,076
/* MicroBuild Copyright (C) 2016 TwinDrills 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/>. */ #include "PCH.h" #include "App/Builder/Tasks/AccelerateTask.h" #include "Core/Platform/Process.h" namespace MicroBuild { AccelerateTask::AccelerateTask(ProjectFile& projectFile, std::vector<std::shared_ptr<BuildTask>>& tasks, Toolchain* toolchain, Accelerator* accelerator) : BuildTask(BuildStage::Compile, true, true, false) , m_toolchain(toolchain) , m_accelerator(accelerator) , m_tasks(tasks) , m_projectFile(projectFile) { m_subTaskCount = (int)m_tasks.size() + 1; } bool AccelerateTask::Execute() { int jobIndex = 0, totalJobs = 0; GetTaskProgress(jobIndex, totalJobs); TaskLog(LogSeverity::SilentInfo, 0, "Distributing %i tasks ...\n", m_tasks.size()); Platform::Path batchPath = m_projectFile.Get_Project_IntermediateDirectory().AppendFragment(Strings::Format("%s.sndbs.bat", m_projectFile.Get_Project_Name().c_str()), true); std::vector<BuildAction> actions; for (auto& task : m_tasks) { actions.push_back(task->GetAction()); } if (!m_accelerator->RunActions(m_toolchain, this, m_projectFile, actions)) { return false; } return true; } BuildAction AccelerateTask::GetAction() { assert(false); BuildAction action; return action; } }; // namespace MicroBuild
TwinDrills/MicroBuild
Source/MicroBuild/Source/App/Builder/Tasks/AccelerateTask.cpp
C++
gpl-3.0
1,869
<?php class ControllerToolBackup extends Controller { public function index() { $this->load->language('tool/backup'); $this->document->setTitle($this->language->get('heading_title')); $data['breadcrumbs'] = array(); $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'user_token=' . $this->session->data['user_token'], true) ); $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), 'href' => $this->url->link('tool/backup', 'user_token=' . $this->session->data['user_token'], true) ); $data['user_token'] = $this->session->data['user_token']; $this->load->model('tool/backup'); $ignore = array( DB_PREFIX . 'user', DB_PREFIX . 'user_group' ); $data['tables'] = array(); $results = $this->model_tool_backup->getTables(); foreach ($results as $result) { if (!in_array($result, $ignore)) { $data['tables'][] = $result; } } $data['header'] = $this->load->controller('common/header'); $data['column_left'] = $this->load->controller('common/column_left'); $data['footer'] = $this->load->controller('common/footer'); $this->response->setOutput($this->load->view('tool/backup', $data)); } public function history() { $this->load->language('tool/backup'); $data['histories'] = array(); $files = glob(DIR_STORAGE . 'backup/*.sql'); foreach ($files as $file) { $size = filesize($file); $i = 0; $suffix = array( 'B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB' ); while (($size / 1024) > 1) { $size = $size / 1024; $i++; } $data['histories'][] = array( 'filename' => basename($file), 'size' => round(substr($size, 0, strpos($size, '.') + 4), 2) . $suffix[$i], 'date_added' => date($this->language->get('datetime_format'), filemtime($file)), 'download' => $this->url->link('tool/backup/download', 'user_token=' . $this->session->data['user_token'] . '&filename=' . urlencode(basename($file)), true), ); } $this->response->setOutput($this->load->view('tool/backup_history', $data)); } public function backup() { $this->load->language('tool/backup'); $json = array(); if (isset($this->request->get['filename'])) { $filename = basename(html_entity_decode($this->request->get['filename'], ENT_QUOTES, 'UTF-8')); } else { $filename = date('Y-m-d H.i.s') . '.sql'; } if (isset($this->request->get['table'])) { $table = $this->request->get['table']; } else { $table = ''; } if (isset($this->request->post['backup'])) { $backup = $this->request->post['backup']; } else { $backup = array(); } if (isset($this->request->get['page'])) { $page = $this->request->get['page']; } else { $page = 1; } if (!$this->user->hasPermission('modify', 'tool/backup')) { $json['error'] = $this->language->get('error_permission'); } $this->load->model('tool/backup'); $allowed = $this->model_tool_backup->getTables(); if (!in_array($table, $allowed)) { $json['error'] = sprintf($this->language->get('error_table'), $table); } if (!$json) { $output = ''; if ($page == 1) { $output .= 'TRUNCATE TABLE `' . $this->db->escape($table) . '`;' . "\n\n"; } $record_total = $this->model_tool_backup->getTotalRecords($table); $results = $this->model_tool_backup->getRecords($table, ($page - 1) * 200, 200); foreach ($results as $result) { $fields = ''; foreach (array_keys($result) as $value) { $fields .= '`' . $value . '`, '; } $values = ''; foreach (array_values($result) as $value) { $value = str_replace(array("\x00", "\x0a", "\x0d", "\x1a"), array('\0', '\n', '\r', '\Z'), $value); $value = str_replace(array("\n", "\r", "\t"), array('\n', '\r', '\t'), $value); $value = str_replace('\\', '\\\\', $value); $value = str_replace('\'', '\\\'', $value); $value = str_replace('\\\n', '\n', $value); $value = str_replace('\\\r', '\r', $value); $value = str_replace('\\\t', '\t', $value); $values .= '\'' . $value . '\', '; } $output .= 'INSERT INTO `' . $table . '` (' . preg_replace('/, $/', '', $fields) . ') VALUES (' . preg_replace('/, $/', '', $values) . ');' . "\n"; } $position = array_search($table, $backup); if (($page * 200) >= $record_total) { $output .= "\n"; if (isset($backup[$position + 1])) { $table = $backup[$position + 1]; } else { $table = ''; } } if ($position) { $json['progress'] = round(($position / count($backup)) * 100); } else { $json['progress'] = 0; } $handle = fopen(DIR_STORAGE . 'backup/' . $filename, 'a'); fwrite($handle, $output); fclose($handle); if (!$table) { $json['success'] = $this->language->get('text_success'); } elseif (($page * 200) >= $record_total) { $json['text'] = sprintf($this->language->get('text_backup'), $table, ($page - 1) * 200, $record_total); $json['next'] = str_replace('&amp;', '&', $this->url->link('tool/backup/backup', 'user_token=' . $this->session->data['user_token'] . '&filename=' . urlencode($filename) . '&table=' . $table . '&page=1', true)); } else { $json['text'] = sprintf($this->language->get('text_backup'), $table, ($page - 1) * 200, $page * 200); $json['next'] = str_replace('&amp;', '&', $this->url->link('tool/backup/backup', 'user_token=' . $this->session->data['user_token'] . '&filename=' . urlencode($filename) . '&table=' . $table . '&page=' . ($page + 1), true)); } } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } public function restore() { $this->load->language('tool/backup'); $json = array(); if (isset($this->request->get['filename'])) { $filename = basename(html_entity_decode($this->request->get['filename'], ENT_QUOTES, 'UTF-8')); } else { $filename = ''; } if (isset($this->request->get['position'])) { $position = $this->request->get['position']; } else { $position = 0; } if (!$this->user->hasPermission('modify', 'tool/backup')) { $json['error'] = $this->language->get('error_permission'); } $file = DIR_STORAGE . 'backup/' . $filename; if (!is_file($file)) { $json['error'] = $this->language->get('error_file'); } if (!$json) { // We set $i so we can batch execute the queries rather than do them all at once. $i = 0; $start = false; $handle = fopen($file, 'r'); fseek($handle, $position, SEEK_SET); while (!feof($handle) && ($i < 100)) { $position = ftell($handle); $line = fgets($handle, 1000000); if (substr($line, 0, 14) == 'TRUNCATE TABLE' || substr($line, 0, 11) == 'INSERT INTO') { $sql = ''; $start = true; } if ($i > 0 && (substr($line, 0, 24) == 'TRUNCATE TABLE `oc_user`' || substr($line, 0, 30) == 'TRUNCATE TABLE `oc_user_group`')) { fseek($handle, $position, SEEK_SET); break; } if ($start) { $sql .= $line; } if ($start && substr($line, -2) == ";\n") { $this->db->query(substr($sql, 0, strlen($sql) -2)); $start = false; } $i++; } $position = ftell($handle); $size = filesize($file); if ($position) { $json['progress'] = round(($position / $size) * 100); } else { $json['progress'] = 0; } if ($position && !feof($handle)) { $json['text'] = sprintf($this->language->get('text_restore'), $position, $size); $json['next'] = str_replace('&amp;', '&', $this->url->link('tool/backup/restore', 'user_token=' . $this->session->data['user_token'] . '&filename=' . urlencode($filename) . '&position=' . $position, true)); fclose($handle); } else { fclose($handle); $json['success'] = $this->language->get('text_success'); $this->cache->delete('*'); } } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } public function upload() { $this->load->language('tool/backup'); $json = array(); // Check user has permission if (!$this->user->hasPermission('modify', 'tool/backup')) { $json['error'] = $this->language->get('error_permission'); } if (empty($this->request->files['upload']['name']) || !is_file($this->request->files['upload']['tmp_name'])) { $json['error'] = $this->language->get('error_upload'); } if (!$json) { // Sanitize the filename $filename = basename(html_entity_decode($this->request->files['upload']['name'], ENT_QUOTES, 'UTF-8')); if ((utf8_strlen($filename) < 3) || (utf8_strlen($filename) > 128)) { $json['error'] = $this->language->get('error_filename'); } // Allowed file extension types if (strtolower(substr(strrchr($filename, '.'), 1)) != 'sql') { $json['error'] = $this->language->get('error_filetype'); } } if (!$json) { $json['success'] = $this->language->get('text_success'); move_uploaded_file($this->request->files['upload']['tmp_name'], DIR_STORAGE . 'backup/' . $filename); } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } public function download() { $this->load->language('tool/backup'); $json = array(); if (isset($this->request->get['filename'])) { $filename = basename(html_entity_decode($this->request->get['filename'], ENT_QUOTES, 'UTF-8')); } else { $filename = ''; } // Check user has permission if (!$this->user->hasPermission('modify', 'tool/backup')) { $this->response->redirect($this->url->link('error/permission', '', true)); } $file = DIR_STORAGE . 'backup/' . $filename; if (!is_file($file)) { $this->response->redirect($this->url->link('error/not_found', '', true)); } if (!headers_sent()) { header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="' . $filename . '"'); header('Expires: 0'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); header('Content-Length: ' . filesize($file)); if (ob_get_level()) { ob_end_clean(); } readfile($file, 'rb'); exit(); } else { exit('Error: Headers already sent out!'); } } public function delete() { $this->load->language('tool/backup'); $json = array(); if (isset($this->request->get['filename'])) { $filename = basename(html_entity_decode($this->request->get['filename'], ENT_QUOTES, 'UTF-8')); } else { $filename = ''; } // Check user has permission if (!$this->user->hasPermission('modify', 'tool/backup')) { $json['error'] = $this->language->get('error_permission'); } $file = DIR_STORAGE . 'backup/' . $filename; if (!is_file($file)) { $json['error'] = $this->language->get('error_file'); } if (!$json) { $json['success'] = $this->language->get('text_success'); unlink($file); } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } }
Codek365/chtd
upload/admin/controller/tool/backup.php
PHP
gpl-3.0
11,095
/*************************************************************************** * SpellbookGump.cs * Copyright (c) 2015 UltimaXNA Development Team * * 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. * ***************************************************************************/ #region usings using UltimaXNA.Core.Input; using UltimaXNA.Core.UI; using UltimaXNA.Ultima.Data; using UltimaXNA.Ultima.UI.Controls; using UltimaXNA.Ultima.World; using UltimaXNA.Ultima.World.Entities.Items.Containers; #endregion namespace UltimaXNA.Ultima.UI.WorldGumps { class SpellbookGump : Gump { // ================================================================================ // Private variables // ================================================================================ SpellBook m_Spellbook; HtmlGumpling[] m_CircleHeaders; HtmlGumpling[] m_Indexes; // ================================================================================ // Private services // ================================================================================ private WorldModel m_World; // ================================================================================ // Ctor, Update, Dispose // ================================================================================ public SpellbookGump(SpellBook entity, int itemID) : base(entity.Serial, 0) { m_World = ServiceRegistry.GetService<WorldModel>(); m_Spellbook = entity; m_Spellbook.OnEntityUpdated += OnEntityUpdate; IsMoveable = true; if (m_Spellbook.BookType != SpellBookTypes.Unknown) { CreateMageryGumplings(); } else { // display a default spellbook graphic, based on the default spellbook type for this item ID. // right now, I'm just using a magery background, but really the background should change based // on the item id. AddControl(new GumpPic(this, 0, 0, 0x08AC, 0)); // other options? necro? spellweaving? } } public override void Update(double totalMS, double frameMS) { base.Update(totalMS, frameMS); } public override void Dispose() { m_Spellbook.OnEntityUpdated -= OnEntityUpdate; if (m_PageCornerLeft != null) { m_PageCornerLeft.MouseClickEvent -= PageCorner_MouseClickEvent; m_PageCornerLeft.MouseDoubleClickEvent -= PageCorner_MouseDoubleClickEvent; } if (m_PageCornerRight != null) { m_PageCornerRight.MouseClickEvent -= PageCorner_MouseClickEvent; m_PageCornerRight.MouseDoubleClickEvent -= PageCorner_MouseDoubleClickEvent; } base.Dispose(); } // ================================================================================ // OnEntityUpdate - called when spellbook entity is updated by server. // ================================================================================ private void OnEntityUpdate() { if (m_Spellbook.BookType == SpellBookTypes.Magic) CreateMageryGumplings(); } // ================================================================================ // Child control creation // The spellbook is laid out as such: // 1. A list of all spells in the book. Clicking on a spell will turn to that spell's page. // 2. One page per spell in the book. Icon, runes, reagents, etc. // ================================================================================ private GumpPic m_PageCornerLeft; private GumpPic m_PageCornerRight; private int m_MaxPage = 0; private bool m_RenderedSpellInfoPage = false; private void CreateMageryGumplings() { ClearControls(); AddControl(new GumpPic(this, 0, 0, 0x08AC, 0)); // spellbook background AddControl(m_PageCornerLeft = new GumpPic(this, 50, 8, 0x08BB, 0)); // page turn left m_PageCornerLeft.GumpLocalID = 0; m_PageCornerLeft.MouseClickEvent += PageCorner_MouseClickEvent; m_PageCornerLeft.MouseDoubleClickEvent += PageCorner_MouseDoubleClickEvent; AddControl(m_PageCornerRight = new GumpPic(this, 321, 8, 0x08BC, 0)); // page turn right m_PageCornerRight.GumpLocalID = 1; m_PageCornerRight.MouseClickEvent += PageCorner_MouseClickEvent; m_PageCornerRight.MouseDoubleClickEvent += PageCorner_MouseDoubleClickEvent; for (int i = 0; i < 4; i++) // spell circles 1 - 4 { AddControl(new GumpPic(this, 60 + i * 35, 174, 0x08B1 + i, 0)); LastControl.GumpLocalID = i; LastControl.MouseClickEvent += SpellCircle_MouseClickEvent; // unsubscribe from these? } for (int i = 0; i < 4; i++) // spell circles 5 - 8 { AddControl(new GumpPic(this, 226 + i * 34, 174, 0x08B5 + i, 0)); LastControl.GumpLocalID = i + 4; LastControl.MouseClickEvent += SpellCircle_MouseClickEvent; // unsubscribe from these? } // indexes are on pages 1 - 4. Spells are on pages 5+. m_CircleHeaders = new HtmlGumpling[8]; for (int i = 0; i < 8; i++) { m_CircleHeaders[i] = (HtmlGumpling)AddControl( new HtmlGumpling(this, 64 + (i % 2) * 148, 10, 130, 200, 0, 0, string.Format("<span color='#004' style='font-family=uni0;'><center>{0}</center></span>", Magery.CircleNames[i])), 1 + (i / 2)); } m_Indexes = new HtmlGumpling[8]; for (int i = 0; i < 8; i++) { m_Indexes[i] = (HtmlGumpling)AddControl( new HtmlGumpling(this, 64 + (i % 2) * 156, 28, 130, 200, 0, 0, string.Empty), 1 + (i / 2)); } // add indexes and spell pages. m_MaxPage = 4; int currentSpellPage = 5; bool isRightPage = false; for (int spellCircle = 0; spellCircle < 8; spellCircle++) { for (int spellIndex = 1; spellIndex <= 8; spellIndex++) { if (m_Spellbook.HasSpell(spellCircle, spellIndex)) { m_Indexes[spellCircle].Text += string.Format("<a href='page={1}' color='#532' hovercolor='#800' activecolor='#611' style='font-family=uni0; text-decoration=none;'>{0}</a><br/>", Magery.GetSpell(spellCircle * 8 + spellIndex).Name, currentSpellPage); if (isRightPage) { currentSpellPage++; isRightPage = false; } else { m_MaxPage += 1; isRightPage = true; } } } } SetActivePage(1); } private void CreateSpellPage(int page, bool rightPage, int circle, SpellDefinition spell) { // header: "NTH CIRCLE" AddControl(new HtmlGumpling(this, 64 + (rightPage ? 148 : 0), 10, 130, 200, 0, 0, string.Format("<span color='#004' style='font-family=uni0;'><center>{0}</center></span>", Magery.CircleNames[circle])), page); // icon and spell name AddControl(new HtmlGumpling(this, 56 + (rightPage ? 156 : 0), 38, 130, 44, 0, 0, string.Format("<a href='spellicon={0}'><gumpimg src='{1}'/></a>", spell.ID, spell.GumpIconID - 0x1298)), page); AddControl(new HtmlGumpling(this, 104 + (rightPage ? 156 : 0), 38, 88, 40, 0, 0, string.Format( "<a href='spell={0}' color='#542' hovercolor='#875' activecolor='#420' style='font-family=uni0; text-decoration=none;'>{1}</a>", spell.ID, spell.Name)), page); // reagents. AddControl(new HtmlGumpling(this, 56 + (rightPage ? 156 : 0), 84, 146, 106, 0, 0, string.Format( "<span color='#400' style='font-family=uni0;'>Reagents:</span><br/><span style='font-family=ascii6;'>{0}</span>", spell.CreateReagentListString(", "))), page); } public override void OnHtmlInputEvent(string href, MouseEvent e) { if (e == MouseEvent.DoubleClick) { string[] hrefs = href.Split('='); if (hrefs.Length != 2) return; else if (hrefs[0] == "page") { int page; if (int.TryParse(hrefs[1], out page)) m_World.Interaction.CastSpell(page-4); } else if (hrefs[0] == "spell") { int spell; if (int.TryParse(hrefs[1], out spell)) m_World.Interaction.CastSpell(spell); } else if (hrefs[0] == "spellicon") { int spell; if (int.TryParse(hrefs[1], out spell)) m_World.Interaction.CastSpell(spell); } } else if (e == MouseEvent.Click) { string[] hrefs = href.Split('='); if (hrefs.Length != 2) return; if (hrefs[0] == "page") { int page; if (int.TryParse(hrefs[1], out page)) SetActivePage(page); } } else if (e == MouseEvent.DragBegin) { string[] hrefs = href.Split('='); if (hrefs.Length != 2) return; if (hrefs[0] == "spellicon") { int spellIndex; if (!int.TryParse(hrefs[1], out spellIndex)) return; SpellDefinition spell = Magery.GetSpell(spellIndex); if (spell.ID == spellIndex) { InputManager input = ServiceRegistry.GetService<InputManager>(); UseSpellButtonGump gump = new UseSpellButtonGump(spell); UserInterface.AddControl(gump, input.MousePosition.X - 22, input.MousePosition.Y - 22); UserInterface.AttemptDragControl(gump, input.MousePosition, true); } } } } private void SpellCircle_MouseClickEvent(AControl sender, int x, int y, MouseButton button) { if (button != MouseButton.Left) return; SetActivePage(sender.GumpLocalID / 2 + 1); } private void PageCorner_MouseClickEvent(AControl sender, int x, int y, MouseButton button) { if (button != MouseButton.Left) return; if (sender.GumpLocalID == 0) { SetActivePage(ActivePage - 1); } else { SetActivePage(ActivePage + 1); } } private void PageCorner_MouseDoubleClickEvent(AControl sender, int x, int y, MouseButton button) { if (button != MouseButton.Left) return; if (sender.GumpLocalID == 0) { SetActivePage(1); } else { SetActivePage(m_MaxPage); } } private void SetActivePage(int page) { if (page < 1) page = 1; if (page > m_MaxPage) page = m_MaxPage; if (page > 4 && m_RenderedSpellInfoPage == false) { int currentSpellPage = 5; bool isRightPage = false; for (int spellCircle = 0; spellCircle < 8; spellCircle++) { for (int spellIndex = 1; spellIndex <= 8; spellIndex++) { int spellIndexAll = spellCircle * 8 + spellIndex; if (m_Spellbook.HasSpell(spellCircle, spellIndex)) { CreateSpellPage(currentSpellPage, isRightPage, spellCircle, Magery.GetSpell(spellIndexAll)); if (isRightPage) { currentSpellPage++; isRightPage = false; } else { m_MaxPage += 1; isRightPage = true; } } } } m_RenderedSpellInfoPage = true; } ActivePage = page; // hide the page corners if we're at the first or final page. m_PageCornerLeft.Page = (ActivePage != 1) ? 0 : int.MaxValue; m_PageCornerRight.Page = (ActivePage != m_MaxPage) ? 0 : int.MaxValue; } } }
azmanomer/UltimaXNA
dev/Ultima/UI/WorldGumps/SpellbookGump.cs
C#
gpl-3.0
14,126
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE>AFL Match Statistics : Collingwood defeats St Kilda at MCG Round 9 Saturday, 18th May 2019</TITLE> <meta NAME="description" CONTENT="Collingwood defeats St Kilda at MCG Round 9 Saturday, 18th May 2019 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=9794&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: 24px; font-weight: bold; } .whltitle { background-color: #ffffff; text-decoration: none; color: #000000; font-size: 24px; font-weight: bold; } .idxhltitle { text-decoration: none; color: #990099; font-size: 24px; font-weight: bold; } .tbtitle { text-decoration:none; color:#3B5998; font-weight:bold; border-top:1px solid #e4ebf6; border-bottom:1px solid #D8DFEA; background-image: linear-gradient(#e4ebf6, #d8dfea); } .innertbtitle { background-color:#D8DFEA; text-decoration:none; color:#3B5998; font-weight:normal; background-image: linear-gradient(#e4ebf6, #d8dfea); } .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: 14px; } table.peeptable { border:1px solid #D8DFEA; padding:5px; } table.peeptable td { padding:5px; } form { padding:0px; margin:0px; } table.thickouter { border:1px solid #D8DFEA; } table.thickouter td.padded { padding:4px; } div.notice { border:1px solid #D8DFEA; padding:8px; background-image: linear-gradient(#e4ebf6, #d8dfea); text-align:center; vertical-align:middle; margin-bottom:12px; font-size: 14px; } 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:24px; 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; } span.playerflag { font-style:italic; font-weight:bold; font-size:11px; color:#FF4500; cursor:default; } td.formleftlabel { background-color:#f2f4f7; vertical-align:middle; text-align:left; padding-left:10px; } td.formmidlabel { background-color:#f2f4f7; vertical-align:middle; text-align:left; padding-left:22px; } td.formgo { background-color:#f2f4f7; vertical-align:middle; text-align:left; padding-left:10px; padding-right:10px; } td.formleftlabel, td.formmidlabel, td.gormgo { height:40px; } span.bulletspan { color:#555555; } 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: Arial,sans-serif,"lucida grande",tahoma,verdana; font-size:14px; text-decoration: none; line-height:19px; } table.plain { border-spacing:0px; border-collapse:collapse; padding:0px; } table.leftmenu { background-color:#F7F7F7; } table.leftmenu td { padding:3px 2px 3px 5px; } table.leftmenu td#skyscraper { 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/fw_header_1200x102.jpg); } a.leftmenu { color:#3B5998; display:block; width:100%; text-decoration:none; } a.leftmenu:hover { text-decoration:none; } a { color:#3B5998; line-height:19px; } 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:1023px; } 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:22px; padding:1px 4px 4px 4px; border:1px solid #3B5998; background:#3B5998; background-image: linear-gradient(#5b79b8, #3d5a9a); 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:280px; } a.submenuitem { padding:8px; line-height:22px; color:#3B5998; text-decoration:none; border:0px solid #3B5998; } a.submenuitem:link { text-decoration:none; } a.submenuitem:hover { text-decoration:underline; } div.submenux, div.submenuxb, div.submenutitle { font-size:14px; color:#676767; font-weight:bold; } div.submenux { padding-right:4px; } div.submenuxb { padding:6px 4px 5px 0px; } div.submenux, div.submenuxb { color:#676767; cursor:pointer; } div.submenutitle { color:#353535; padding:6px 8px 4px 8px; } 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:#888888; font-weight:bold; display:block; text-decoration:none; border-left:1px solid #F7F7F7; cursor:pointer; text-align:center; width:15px; } 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-image: linear-gradient(#a21c1c, #870101); padding:0px 5px 0px 5px; } td.hdbar div { color:#ffffff; display:inline; padding:0px 5px 0px 5px; } td.hdbar div a { font-size:13px; 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#welcome { font-size:13px; } 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=864 height=430 hspace=0 vspace=0 frameborder=0 marginheight=0 marginwidth=0 scrolling=no></iframe>"; document.getElementById('memberswhitediv').style.width = '874px'; document.getElementById('memberswhitediv').style.height = '460px'; displayMemberDivs(); } function openRegistrationLoginDialogWithNextPage(nextPage) { document.getElementById('memberscontent').innerHTML = "<div><iframe src='/afl/footy/custom_login?p=" + nextPage + "' width=864 height=430 hspace=0 vspace=0 frameborder=0 marginheight=0 marginwidth=0 scrolling=no></iframe></div>" document.getElementById('memberswhitediv').style.width = '874px'; document.getElementById('memberswhitediv').style.height = '460px'; displayMemberDivs(); } function openChangePasswordDialog() { document.getElementById('memberscontent').innerHTML = "<div><iframe src='/afl/footy/custom_login?action=changePasswordForm' width=350 height=220 hspace=0 vspace=0 frameborder=0 marginheight=0 marginwidth=0 scrolling=no></iframe></div>" document.getElementById('memberswhitediv').style.width = '350px'; document.getElementById('memberswhitediv').style.height = '260px'; displayMemberDivs(); } function openManageSettingsDialog() { document.getElementById('memberscontent').innerHTML = "<div><iframe src='/afl/footy/custom_login?action=manageSettingsForm' width=480 height=240 hspace=0 vspace=0 frameborder=0 marginheight=0 marginwidth=0 scrolling=no></iframe></div>" document.getElementById('memberswhitediv').style.width = '480px'; document.getElementById('memberswhitediv').style.height = '300px'; 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');hideAllSubMenus();" onresize="positionMemberDivs();"> <DIV align="CENTER"> <table cellpadding="0" cellspacing="0" border="0" id="frametable2008" width="1200"> <tr><td colspan="4" height="102" id="headercell" width="1200"> <table id="header"> <tr> <td id="logo" valign="middle" height="102" width="300"> <a class="emptylink" href="//www.footywire.com/"><div style="width:200px;height:54px;cursor:pointer;">&nbsp;</div></a> </td> <td id="mainlinks" width="300"> </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="26" 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')">&#x276F;</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')">&#x276F;</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')">&#x276F;</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')">&#x276F;</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')">&#x276F;</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')">&#x276F;</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')">&#x276F;</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')">&#x276F;</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')">&#x276F;</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')">&#x276F;</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')">&#x276F;</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')">&#x276F;</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')">&#x276F;</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')">&#x276F;</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')">&#x276F;</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')">&#x276F;</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')">&#x276F;</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" align="left" valign="top"> <div style="padding-bottom:40px;"> <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> </div> </td></tr> </table> </td> <td rowspan="3" bgcolor="#b7b7b7" style="width:1px"></td> <td height="700" width="1000" valign="top" align="center" style="padding:5px 12px 5px 11px"> <table border="0" cellspacing="0" cellpadding="0"> <tr><td colspan="1" class="norm" style="height:10px"></td></tr> <tr><td> <div class="notice" width="1000"> Advanced stats currently displayed. <a href="/afl/footy/ft_match_statistics?mid=9794"><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="1000" BORDER="0" CELLSPACING="0" CELLPADDING="0"> <TR><TD CLASS="lnormtop"> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="1000"> <TR> <TD WIDTH="375" class="lnormtop"> <table border="0" cellspacing="0" cellpadding="0" width="525"> <tr><td width="525" valign="top" height="30" align="left" class="hltitle"> Collingwood defeats St Kilda </td></tr> <tr><td class="lnorm" height="22">Round 9, MCG, Attendance: 60702</td></tr> <tr><td class="lnorm" height="22"> Saturday, 18th May 2019, 1:45 PM AEST</td></tr> <tr><td class="lnorm" height="22"> Collingwood Betting Odds: Win 1.24, Line -25.5 @ 1.91 </td></tr> <tr><td class="lnorm" height="22"> St Kilda Betting Odds: Win 4.25, Line +25.5 @ 1.91 </td></tr> <tr><td class="lnorm" height="22"> <b>Brownlow Votes:</b> 3: <a href="pp-collingwood-magpies--brodie-grundy">B Grundy</a>, 2: <a href="pp-collingwood-magpies--steele-sidebottom">S Sidebottom</a>, 1: <a href="pp-collingwood-magpies--brody-mihocek">B Mihocek</a></td></tr> </table> </TD> <td rowspan="1" class="norm" style="width:9px"></td> <TD WIDTH="466" class="lnormtop"> <table border="0" cellspacing="0" cellpadding="0" width="466" id="matchscoretable"> <tr> <th class="leftbold" height="30" width="140">Team</td> <th width="59" align="center">Q1</td> <th width="59" align="center">Q2</td> <th width="59" align="center">Q3</td> <th width="59" align="center">Q4</td> <th width="59" align="center">Final</td> </tr> <tr> <td class="leftbold" height="28"><a href="th-collingwood-magpies">Collingwood</a></td> <td align="center">3.1 <td align="center">6.2 <td align="center">11.4 <td align="center">17.10 <td align="center">112 </tr> <tr> <td class="leftbold" height="28"><a href="th-st-kilda-saints">St Kilda</a></td> <td align="center">1.3 <td align="center">4.9 <td align="center">9.11 <td align="center">10.11 <td align="center">71 </tr> </table> </TD></TR> <TR><TD COLSPAN="3" HEIGHT="45" CLASS="norm"> <a href="#t1">Collingwood Player Stats</a> | <a href="#t2">St Kilda Player Stats</a> | <a href="#hd">Match Head to Head Stats</a> | <a href="#brk">Scoring Breakdown</a> | <a href="highlights?id=2039">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="1000"> <tr> <td> <table border="0" cellspacing="0" cellpadding="0" width="825"> <tr> <td height="28" align="center" colspan="3" class="tbtitle" width="825"> <table border="0" cellspacing="0" cellpadding="0" width="825"> <tr> <td class="innertbtitle" align="left">&nbsp;&nbsp;<b><a name=t1></a>Collingwood Match Statistics (Sorted by Disposals)</b></td> <td class="innertbtitle" align="right">Coach: <a href="cp-nathan-buckley--91">Nathan Buckley</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="823"> <tr> <td width="220" class="lbnorm" height="28">Player</td> <td width="40" class="bnorm"><a href="fts_match_statistics?mid=9794&sby=23&advv=Y#t1" title="Contested Possessions">CP</a></td> <td width="40" class="bnorm"><a href="fts_match_statistics?mid=9794&sby=24&advv=Y#t1" title="Uncontested Possessions">UP</a></td> <td width="40" class="bnorm"><a href="fts_match_statistics?mid=9794&sby=25&advv=Y#t1" title="Effective Disposals">ED</a></td> <td width="50" class="bnorm"><a href="fts_match_statistics?mid=9794&sby=34&advv=Y#t1" title="Disposal Efficiency %">DE%</a></td> <td width="40" class="bnorm"><a href="fts_match_statistics?mid=9794&sby=27&advv=Y#t1" title="Contested Marks">CM</a></td> <td width="40" class="bnorm"><a href="fts_match_statistics?mid=9794&sby=21&advv=Y#t1" title="Goal Assists">GA</a></td> <td width="40" class="bnorm"><a href="fts_match_statistics?mid=9794&sby=28&advv=Y#t1" title="Marks Inside 50">MI5</a></td> <td width="40" class="bnorm"><a href="fts_match_statistics?mid=9794&sby=31&advv=Y#t1" title="One Percenters">1%</a></td> <td width="40" class="bnorm"><a href="fts_match_statistics?mid=9794&sby=32&advv=Y#t1" title="Bounces">BO</a></td> <td width="40" class="bnorm"><a href="fts_match_statistics?mid=9794&sby=35&advv=Y#t1" title="Centre Clearances">CCL</a></td> <td width="40" class="bnorm"><a href="fts_match_statistics?mid=9794&sby=36&advv=Y#t1" title="Stoppage Clearances">SCL</a></td> <td width="40" class="bnorm"><a href="fts_match_statistics?mid=9794&sby=37&advv=Y#t1" title="Score Involvements">SI</a></td> <td width="50" class="bnorm"><a href="fts_match_statistics?mid=9794&sby=38&advv=Y#t1" title="Metres Gained">MG</a></td> <td width="40" class="bnorm"><a href="fts_match_statistics?mid=9794&sby=39&advv=Y#t1" title="Turnovers">TO</a></td> <td width="40" class="bnorm"><a href="fts_match_statistics?mid=9794&sby=40&advv=Y#t1" title="Intercepts">ITC</a></td> <td width="40" class="bnorm"><a href="fts_match_statistics?mid=9794&sby=41&advv=Y#t1" title="Tackles Inside 50">T5</a></td> <td width="50" class="bnorm"><a href="fts_match_statistics?mid=9794&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-collingwood-magpies--adam-treloar" title="Adam Treloar">A Treloar</a></td> <td class="statdata">15</td> <td class="statdata">19</td> <td class="statdata">23</td> <td class="statdata">60.5</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">3</td> <td class="statdata">4</td> <td class="statdata">9</td> <td class="statdata">283</td> <td class="statdata">4</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">77</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td align="left" height="18"><a href="pp-collingwood-magpies--dayne-beams" title="Dayne Beams">D Beams</a></td> <td class="statdata">11</td> <td class="statdata">20</td> <td class="statdata">22</td> <td class="statdata">73.3</td> <td class="statdata">1</td> <td class="statdata">1</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">4</td> <td class="statdata">3</td> <td class="statdata">11</td> <td class="statdata">388</td> <td class="statdata">3</td> <td class="statdata">3</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-collingwood-magpies--steele-sidebottom" title="Steele Sidebottom">S Sidebottom</a></td> <td class="statdata">8</td> <td class="statdata">20</td> <td class="statdata">23</td> <td class="statdata">79.3</td> <td class="statdata">0</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">2</td> <td class="statdata">11</td> <td class="statdata">451</td> <td class="statdata">4</td> <td class="statdata">4</td> <td class="statdata">0</td> <td class="statdata">90</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td align="left" height="18"><a href="pp-collingwood-magpies--scott-pendlebury" title="Scott Pendlebury">S Pendlebury</a></td> <td class="statdata">11</td> <td class="statdata">16</td> <td class="statdata">19</td> <td class="statdata">70.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">0</td> <td class="statdata">1</td> <td class="statdata">4</td> <td class="statdata">10</td> <td class="statdata">430</td> <td class="statdata">6</td> <td class="statdata">4</td> <td class="statdata">0</td> <td class="statdata">80</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td align="left" height="18"><a href="pp-collingwood-magpies--jack-crisp" title="Jack Crisp">J Crisp</a></td> <td class="statdata">13</td> <td class="statdata">12</td> <td class="statdata">22</td> <td class="statdata">81.5</td> <td class="statdata">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">2</td> <td class="statdata">6</td> <td class="statdata">314</td> <td class="statdata">5</td> <td class="statdata">10</td> <td class="statdata">0</td> <td class="statdata">92</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td align="left" height="18"><a href="pp-collingwood-magpies--christopher-mayne" title="Christopher Mayne">C Mayne</a></td> <td class="statdata">7</td> <td class="statdata">16</td> <td class="statdata">21</td> <td class="statdata">84</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">2</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">2</td> <td class="statdata">4</td> <td class="statdata">133</td> <td class="statdata">3</td> <td class="statdata">4</td> <td class="statdata">0</td> <td class="statdata">81</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td align="left" height="18"><a href="pp-collingwood-magpies--brodie-grundy" title="Brodie Grundy">B Grundy</a></td> <td class="statdata">18</td> <td class="statdata">6</td> <td class="statdata">13</td> <td class="statdata">54.2</td> <td class="statdata">3</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">5</td> <td class="statdata">0</td> <td class="statdata">2</td> <td class="statdata">5</td> <td class="statdata">5</td> <td class="statdata">242</td> <td class="statdata">6</td> <td class="statdata">3</td> <td class="statdata">0</td> <td class="statdata">90</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td align="left" height="18"><a href="pp-collingwood-magpies--tom-phillips" title="Tom Phillips">T Phillips</a></td> <td class="statdata">7</td> <td class="statdata">13</td> <td class="statdata">15</td> <td class="statdata">75</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">1</td> <td class="statdata">6</td> <td class="statdata">315</td> <td class="statdata">3</td> <td class="statdata">3</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-collingwood-magpies--levi-greenwood" title="Levi Greenwood">L Greenwood</a></td> <td class="statdata">2</td> <td class="statdata">14</td> <td class="statdata">13</td> <td class="statdata">76.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">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">4</td> <td class="statdata">0</td> <td class="statdata">90</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td align="left" height="18"><a href="pp-collingwood-magpies--jaidyn-stephenson" title="Jaidyn Stephenson">J Stephenson</a></td> <td class="statdata">4</td> <td class="statdata">14</td> <td class="statdata">12</td> <td class="statdata">70.6</td> <td class="statdata">1</td> <td class="statdata">1</td> <td class="statdata">3</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">316</td> <td class="statdata">6</td> <td class="statdata">1</td> <td class="statdata">1</td> <td class="statdata">89</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td align="left" height="18"><a href="pp-collingwood-magpies--ben-reid" title="Ben Reid">B Reid</a></td> <td class="statdata">10</td> <td class="statdata">6</td> <td class="statdata">12</td> <td class="statdata">75</td> <td class="statdata">5</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">1</td> <td class="statdata">10</td> <td class="statdata">236</td> <td class="statdata">3</td> <td class="statdata">2</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-collingwood-magpies--brayden-maynard" title="Brayden Maynard">B Maynard</a></td> <td class="statdata">4</td> <td class="statdata">8</td> <td class="statdata">12</td> <td class="statdata">85.7</td> <td class="statdata">0</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">0</td> <td class="statdata">4</td> <td class="statdata">252</td> <td class="statdata">2</td> <td class="statdata">3</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-collingwood-magpies--rupert-wills" title="Rupert Wills">R Wills</a></td> <td class="statdata">10</td> <td class="statdata">4</td> <td class="statdata">12</td> <td class="statdata">85.7</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">2</td> <td class="statdata">2</td> <td class="statdata">4</td> <td class="statdata">145</td> <td class="statdata">1</td> <td class="statdata">2</td> <td class="statdata">1</td> <td class="statdata">72</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td align="left" height="18"><a href="pp-collingwood-magpies--brody-mihocek" title="Brody Mihocek">B Mihocek</a></td> <td class="statdata">7</td> <td class="statdata">8</td> <td class="statdata">10</td> <td class="statdata">71.4</td> <td class="statdata">1</td> <td class="statdata">2</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">10</td> <td class="statdata">280</td> <td class="statdata">2</td> <td class="statdata">1</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-collingwood-magpies--travis-varcoe" title="Travis Varcoe">T Varcoe</a></td> <td class="statdata">6</td> <td class="statdata">8</td> <td class="statdata">10</td> <td class="statdata">76.9</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">7</td> <td class="statdata">157</td> <td class="statdata">2</td> <td class="statdata">3</td> <td class="statdata">2</td> <td class="statdata">77</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td align="left" height="18"><a href="pp-collingwood-magpies--josh-thomas" title="Josh Thomas">J Thomas</a></td> <td class="statdata">2</td> <td class="statdata">11</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">1</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">5</td> <td class="statdata">196</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">74</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td align="left" height="18"><a href="pp-collingwood-magpies--will-hoskin-elliott" title="Will Hoskin-Elliott">W H-Elliott</a></td> <td class="statdata">3</td> <td class="statdata">11</td> <td class="statdata">9</td> <td class="statdata">69.2</td> <td class="statdata">1</td> <td class="statdata">2</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">5</td> <td class="statdata">264</td> <td class="statdata">2</td> <td class="statdata">0</td> <td class="statdata">1</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-fremantle-dockers--james-aish" title="James Aish">J Aish</a></td> <td class="statdata">2</td> <td class="statdata">11</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">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">200</td> <td class="statdata">3</td> <td class="statdata">2</td> <td class="statdata">0</td> <td class="statdata">79</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td align="left" height="18"><a href="pp-collingwood-magpies--jeremy-howe" title="Jeremy Howe">J Howe</a></td> <td class="statdata">1</td> <td class="statdata">8</td> <td class="statdata">11</td> <td class="statdata">91.7</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">7</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">2</td> <td class="statdata">179</td> <td class="statdata">1</td> <td class="statdata">2</td> <td class="statdata">0</td> <td class="statdata">90</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td align="left" height="18"><a href="pp-collingwood-magpies--tom-langdon" title="Tom Langdon">T Langdon</a></td> <td class="statdata">4</td> <td class="statdata">6</td> <td class="statdata">9</td> <td class="statdata">81.8</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">1</td> <td class="statdata">59</td> <td class="statdata">1</td> <td class="statdata">6</td> <td class="statdata">0</td> <td class="statdata">41</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td align="left" height="18"><a href="pp-collingwood-magpies--jordan-roughead" title="Jordan Roughead">J Roughead</a></td> <td class="statdata">2</td> <td class="statdata">8</td> <td class="statdata">8</td> <td class="statdata">80</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">9</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">176</td> <td class="statdata">2</td> <td class="statdata">3</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-collingwood-magpies--callum-brown" title="Callum Brown">C Brown</a></td> <td class="statdata">6</td> <td class="statdata">3</td> <td class="statdata">9</td> <td class="statdata">100</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">0</td> <td class="statdata">5</td> <td class="statdata">101</td> <td class="statdata">2</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">71</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" width="160" class="peeptable"> <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="825"> <tr> <td height="28" align="center" colspan="3" class="tbtitle" width="825"> <table border="0" cellspacing="0" cellpadding="0" width="825"> <tr> <td class="innertbtitle" align="left">&nbsp;&nbsp;<b><a name=t1></a>St Kilda Match Statistics (Sorted by Disposals)</b></td> <td class="innertbtitle" align="right">Coach: <a href="cp-alan-richardson--100">Alan Richardson</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="823"> <tr> <td width="220" class="lbnorm" height="28">Player</td> <td width="40" class="bnorm"><a href="fts_match_statistics?mid=9794&sby=23&advv=Y#t2" title="Contested Possessions">CP</a></td> <td width="40" class="bnorm"><a href="fts_match_statistics?mid=9794&sby=24&advv=Y#t2" title="Uncontested Possessions">UP</a></td> <td width="40" class="bnorm"><a href="fts_match_statistics?mid=9794&sby=25&advv=Y#t2" title="Effective Disposals">ED</a></td> <td width="50" class="bnorm"><a href="fts_match_statistics?mid=9794&sby=34&advv=Y#t2" title="Disposal Efficiency %">DE%</a></td> <td width="40" class="bnorm"><a href="fts_match_statistics?mid=9794&sby=27&advv=Y#t2" title="Contested Marks">CM</a></td> <td width="40" class="bnorm"><a href="fts_match_statistics?mid=9794&sby=21&advv=Y#t2" title="Goal Assists">GA</a></td> <td width="40" class="bnorm"><a href="fts_match_statistics?mid=9794&sby=28&advv=Y#t2" title="Marks Inside 50">MI5</a></td> <td width="40" class="bnorm"><a href="fts_match_statistics?mid=9794&sby=31&advv=Y#t2" title="One Percenters">1%</a></td> <td width="40" class="bnorm"><a href="fts_match_statistics?mid=9794&sby=32&advv=Y#t2" title="Bounces">BO</a></td> <td width="40" class="bnorm"><a href="fts_match_statistics?mid=9794&sby=35&advv=Y#t2" title="Centre Clearances">CCL</a></td> <td width="40" class="bnorm"><a href="fts_match_statistics?mid=9794&sby=36&advv=Y#t2" title="Stoppage Clearances">SCL</a></td> <td width="40" class="bnorm"><a href="fts_match_statistics?mid=9794&sby=37&advv=Y#t2" title="Score Involvements">SI</a></td> <td width="50" class="bnorm"><a href="fts_match_statistics?mid=9794&sby=38&advv=Y#t2" title="Metres Gained">MG</a></td> <td width="40" class="bnorm"><a href="fts_match_statistics?mid=9794&sby=39&advv=Y#t2" title="Turnovers">TO</a></td> <td width="40" class="bnorm"><a href="fts_match_statistics?mid=9794&sby=40&advv=Y#t2" title="Intercepts">ITC</a></td> <td width="40" class="bnorm"><a href="fts_match_statistics?mid=9794&sby=41&advv=Y#t2" title="Tackles Inside 50">T5</a></td> <td width="50" class="bnorm"><a href="fts_match_statistics?mid=9794&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-st-kilda-saints--luke-dunstan" title="Luke Dunstan">L Dunstan</a></td> <td class="statdata">17</td> <td class="statdata">13</td> <td class="statdata">21</td> <td class="statdata">70</td> <td class="statdata">0</td> <td class="statdata">2</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">2</td> <td class="statdata">6</td> <td class="statdata">3</td> <td class="statdata">6</td> <td class="statdata">341</td> <td class="statdata">4</td> <td class="statdata">5</td> <td class="statdata">1</td> <td class="statdata">73</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td align="left" height="18"><a href="pp-st-kilda-saints--jack-billings" title="Jack Billings">J Billings</a></td> <td class="statdata">7</td> <td class="statdata">22</td> <td class="statdata">22</td> <td class="statdata">75.9</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">1</td> <td class="statdata">2</td> <td class="statdata">5</td> <td class="statdata">351</td> <td class="statdata">6</td> <td class="statdata">2</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-st-kilda-saints--shane-savage" title="Shane Savage">S Savage</a></td> <td class="statdata">5</td> <td class="statdata">16</td> <td class="statdata">22</td> <td class="statdata">88</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">5</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">1</td> <td class="statdata">7</td> <td class="statdata">631</td> <td class="statdata">4</td> <td class="statdata">2</td> <td class="statdata">0</td> <td class="statdata">96</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td align="left" height="18"><a href="pp-st-kilda-saints--jack-steele" title="Jack Steele">J Steele</a></td> <td class="statdata">9</td> <td class="statdata">17</td> <td class="statdata">22</td> <td class="statdata">88</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">4</td> <td class="statdata">174</td> <td class="statdata">1</td> <td class="statdata">3</td> <td class="statdata">2</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-st-kilda-saints--jade-gresham" title="Jade Gresham">J Gresham</a></td> <td class="statdata">9</td> <td class="statdata">13</td> <td class="statdata">16</td> <td class="statdata">69.6</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">4</td> <td class="statdata">1</td> <td class="statdata">4</td> <td class="statdata">375</td> <td class="statdata">3</td> <td class="statdata">2</td> <td class="statdata">1</td> <td class="statdata">77</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td align="left" height="18"><a href="pp-st-kilda-saints--sebastian-ross" title="Sebastian Ross">S Ross</a></td> <td class="statdata">7</td> <td class="statdata">17</td> <td class="statdata">13</td> <td class="statdata">59.1</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">1</td> <td class="statdata">7</td> <td class="statdata">246</td> <td class="statdata">5</td> <td class="statdata">1</td> <td class="statdata">3</td> <td class="statdata">94</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td align="left" height="18"><a href="pp-st-kilda-saints--rowan-marshall" title="Rowan Marshall">R Marshall</a></td> <td class="statdata">11</td> <td class="statdata">5</td> <td class="statdata">9</td> <td class="statdata">56.2</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">2</td> <td class="statdata">3</td> <td class="statdata">4</td> <td class="statdata">163</td> <td class="statdata">1</td> <td class="statdata">2</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-st-kilda-saints--daniel-mckenzie" title="Daniel McKenzie">D McKenzie</a></td> <td class="statdata">4</td> <td class="statdata">13</td> <td class="statdata">13</td> <td class="statdata">92.9</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">2</td> <td class="statdata">179</td> <td class="statdata">6</td> <td class="statdata">6</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-st-kilda-saints--jack-sinclair" title="Jack Sinclair">J Sinclair</a></td> <td class="statdata">6</td> <td class="statdata">7</td> <td class="statdata">8</td> <td class="statdata">57.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">1</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">4</td> <td class="statdata">268</td> <td class="statdata">3</td> <td class="statdata">5</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-fremantle-dockers--blake-acres" title="Blake Acres">B Acres</a></td> <td class="statdata">5</td> <td class="statdata">10</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">2</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">5</td> <td class="statdata">99</td> <td class="statdata">3</td> <td class="statdata">2</td> <td class="statdata">3</td> <td class="statdata">69</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td align="left" height="18"><a href="pp-st-kilda-saints--edward-phillips" title="Edward Phillips">E Phillips</a></td> <td class="statdata">6</td> <td class="statdata">8</td> <td class="statdata">13</td> <td class="statdata">100</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">4</td> <td class="statdata">144</td> <td class="statdata">0</td> <td class="statdata">2</td> <td class="statdata">0</td> <td class="statdata">64</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td align="left" height="18"><a href="pp-st-kilda-saints--callum-wilkie" title="Callum Wilkie">C Wilkie</a></td> <td class="statdata">4</td> <td class="statdata">8</td> <td class="statdata">11</td> <td class="statdata">84.6</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">0</td> <td class="statdata">0</td> <td class="statdata">5</td> <td class="statdata">131</td> <td class="statdata">0</td> <td class="statdata">5</td> <td class="statdata">0</td> <td class="statdata">90</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td align="left" height="18"><a href="pp-st-kilda-saints--jonathon-marsh" title="Jonathon Marsh">J Marsh</a></td> <td class="statdata">7</td> <td class="statdata">7</td> <td class="statdata">6</td> <td class="statdata">50</td> <td class="statdata">3</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">0</td> <td class="statdata">4</td> <td class="statdata">291</td> <td class="statdata">6</td> <td class="statdata">7</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-st-kilda-saints--josh-battle" title="Josh Battle">J Battle</a></td> <td class="statdata">5</td> <td class="statdata">7</td> <td class="statdata">10</td> <td class="statdata">83.3</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">1</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">134</td> <td class="statdata">2</td> <td class="statdata">5</td> <td class="statdata">1</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-carlton-blues--jack-newnes" title="Jack Newnes">J Newnes</a></td> <td class="statdata">5</td> <td class="statdata">6</td> <td class="statdata">8</td> <td class="statdata">72.7</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">1</td> <td class="statdata">3</td> <td class="statdata">170</td> <td class="statdata">3</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-st-kilda-saints--tim-membrey" title="Tim Membrey">T Membrey</a></td> <td class="statdata">4</td> <td class="statdata">8</td> <td class="statdata">11</td> <td class="statdata">100</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">3</td> <td class="statdata">3</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">9</td> <td class="statdata">192</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">3</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-st-kilda-saints--dean-kent" title="Dean Kent">D Kent</a></td> <td class="statdata">5</td> <td class="statdata">6</td> <td class="statdata">7</td> <td class="statdata">63.6</td> <td class="statdata">1</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">0</td> <td class="statdata">4</td> <td class="statdata">257</td> <td class="statdata">4</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-st-kilda-saints--ben-paton" title="Ben Paton">B Paton</a></td> <td class="statdata">3</td> <td class="statdata">8</td> <td class="statdata">7</td> <td class="statdata">63.6</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">89</td> <td class="statdata">3</td> <td class="statdata">3</td> <td class="statdata">0</td> <td class="statdata">68</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td align="left" height="18"><a href="pp-st-kilda-saints--nathan-brown" title="Nathan Brown">N Brown</a></td> <td class="statdata">3</td> <td class="statdata">7</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">13</td> <td class="statdata">0</td> <td class="statdata">0</td> <td class="statdata">1</td> <td class="statdata">1</td> <td class="statdata">88</td> <td class="statdata">0</td> <td class="statdata">4</td> <td class="statdata">0</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-st-kilda-saints--matthew-parker" title="Matthew Parker">M Parker</a></td> <td class="statdata">3</td> <td class="statdata">7</td> <td class="statdata">5</td> <td class="statdata">62.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">166</td> <td class="statdata">5</td> <td class="statdata">2</td> <td class="statdata">3</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-st-kilda-saints--robert-young" title="Robert Young">R Young</a></td> <td class="statdata">2</td> <td class="statdata">5</td> <td class="statdata">6</td> <td class="statdata">75</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">0</td> <td class="statdata">6</td> <td class="statdata">267</td> <td class="statdata">1</td> <td class="statdata">2</td> <td class="statdata">1</td> <td class="statdata">73</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td align="left" height="18"><a href="pp-western-bulldogs--josh-bruce" title="Josh Bruce">J Bruce</a></td> <td class="statdata">5</td> <td class="statdata">4</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">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">4</td> <td class="statdata">91</td> <td class="statdata">1</td> <td class="statdata">0</td> <td class="statdata">3</td> <td class="statdata">91</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="1000"> <tr><td valign="top"> <table border="0" cellspacing="0" cellpadding="0" width="575"> <tr><td height="28" 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="190" class="bnorm" height="28">Collingwood</td> <td width="193" class="bnorm">Statistic</td> <td width="190" class="bnorm">St Kilda</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">153</td> <td class="statdata">Contested Possessions</td> <td class="statdata">132</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td height="25" class="statdata">242</td> <td class="statdata">Uncontested Possessions</td> <td class="statdata">214</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td height="25" class="statdata">303</td> <td class="statdata">Effective Disposals</td> <td class="statdata">251</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td height="25" class="statdata">74.6%</td> <td class="statdata">Disposal Efficiency %</td> <td class="statdata">74.7%</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td height="25" class="statdata">44</td> <td class="statdata">Clangers</td> <td class="statdata">50</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td height="25" class="statdata">15</td> <td class="statdata">Contested Marks</td> <td class="statdata">11</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td height="25" class="statdata">15</td> <td class="statdata">Marks Inside 50</td> <td class="statdata">10</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td height="25" class="statdata">39</td> <td class="statdata">Clearances</td> <td class="statdata">35</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td height="25" class="statdata">42</td> <td class="statdata">Rebound 50s</td> <td class="statdata">28</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td height="25" class="statdata">50</td> <td class="statdata">One Percenters</td> <td class="statdata">41</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td height="25" class="statdata">0</td> <td class="statdata">Bounces</td> <td class="statdata">4</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td height="25" class="statdata">11</td> <td class="statdata">Goal Assists</td> <td class="statdata">9</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td height="25" class="statdata">64.7%</td> <td class="statdata">% Goals Assisted</td> <td class="statdata">90.0%</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td height="25" class="statdata">13</td> <td class="statdata">Centre Clearances</td> <td class="statdata">17</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td height="25" class="statdata">26</td> <td class="statdata">Stoppage Clearances</td> <td class="statdata">18</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td height="25" class="statdata">126</td> <td class="statdata">Score Involvements</td> <td class="statdata">94</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td height="25" class="statdata">5244</td> <td class="statdata">Metres Gained</td> <td class="statdata">4847</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td height="25" class="statdata">63</td> <td class="statdata">Turnovers</td> <td class="statdata">61</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td height="25" class="statdata">61</td> <td class="statdata">Intercepts</td> <td class="statdata">62</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td height="25" class="statdata">7</td> <td class="statdata">Tackles Inside 50</td> <td class="statdata">24</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="414"> <tr><td height="28" align="center" colspan="5" class="tbtitle">Average Attributes</td></tr> <tr> <td rowspan="5" class="tabbdr" style="width:1px"></td> <td width="137" class="bnorm" height="28">Collingwood</td> <td width="138" class="bnorm">Attribute</td> <td width="137" class="bnorm">St Kilda</td> <td rowspan="5" class="tabbdr" style="width:1px"></td> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td height="25" class="statdata">188.0cm</td> <td class="statdata">Height</td> <td class="statdata">187.5cm</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td height="25" class="statdata">87.0kg</td> <td class="statdata">Weight</td> <td class="statdata">86.4kg</td> </tr> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td height="25" class="statdata">26yr 8mth</td> <td class="statdata">Age</td> <td class="statdata">24yr 2mth</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td height="25" class="statdata">120.6</td> <td class="statdata">Games</td> <td class="statdata">64.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="28" align="center" colspan="5" class="tbtitle">Total Players By Games</td></tr> <tr> <td rowspan="5" class="tabbdr" style="width:1px"></td> <td width="137" class="bnorm" height="28">Collingwood</td> <td width="138" class="bnorm">Games</td> <td width="137" class="bnorm">St Kilda</td> <td rowspan="5" class="tabbdr" style="width:1px"></td> <tr bgcolor="#f2f4f7" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#f2f4f7';"> <td height="25" class="statdata">4</td> <td class="statdata">Less than 50</td> <td class="statdata">9</td> </tr> <tr bgcolor="#ffffff" onMouseOver="this.bgColor='#cbcdd0';" onMouseOut="this.bgColor='#ffffff';"> <td height="25" 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="25" class="statdata">7</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="25" class="statdata">6</td> <td class="statdata">150 or more</td> <td class="statdata">2</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="1000"> <tr><td height="28" 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="493"> <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="28" width="164"><b>Collingwood</b></td> <td class="ylwbgmid" width="165"><b>First Quarter</b></td> <td class="ylwbgmid" width="164"><b>St Kilda</b></td> </tr> <tr><td colspan="3" class="ylwbdr" style="height:1px"></td></tr> <tr> <td class="ylwbgmid" height="22">3.1 19</td> <td class="ylwbgmid">Score</td> <td class="ylwbgmid">1.3 9</td> </tr> <tr> <td class="ylwbgmid" height="22">4</td> <td class="ylwbgmid">Scoring Shots</td> <td class="ylwbgmid">4</td> </tr> <tr> <td class="ylwbgmid" height="22">75.0%</td> <td class="ylwbgmid">Conversion</td> <td class="ylwbgmid">25.0%</td> </tr> <tr> <td class="ylwbgmid" height="22">Won quarter by 10</td> <td class="ylwbgmid">Result</td> <td class="ylwbgmid">Lost quarter by 10</td> </tr> <tr> <td class="ylwbgmid" height="22">Leading by 10</td> <td class="ylwbgmid">End of Quarter</td> <td class="ylwbgmid">Trailing by 10</td> </tr> <tr><td colspan="3" class="ylwbdr" style="height:1px"></td></tr> </table> </td> <td> <table border="0" cellspacing="0" cellpadding="0" width="493"> <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="28" width="164"><b>Collingwood</b></td> <td class="ylwbgmid" width="165"><b>Second Quarter</b></td> <td class="ylwbgmid" width="164"><b>St Kilda</b></td> </tr> <tr><td colspan="3" class="ylwbdr" style="height:1px"></td></tr> <tr> <td class="ylwbgmid" height="22">3.1 19</td> <td class="ylwbgmid">Score</td> <td class="ylwbgmid">3.6 24</td> </tr> <tr> <td class="ylwbgmid" height="22">4</td> <td class="ylwbgmid">Scoring Shots</td> <td class="ylwbgmid">9</td> </tr> <tr> <td class="ylwbgmid" height="22">75.0%</td> <td class="ylwbgmid">Conversion</td> <td class="ylwbgmid">33.3%</td> </tr> <tr> <td class="ylwbgmid" height="22">Lost quarter by 5</td> <td class="ylwbgmid">Result</td> <td class="ylwbgmid">Won quarter by 5</td> </tr> <tr> <td class="ylwbgmid" height="22">Leading by 5</td> <td class="ylwbgmid">Halftime</td> <td class="ylwbgmid">Trailing by 5</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="493"> <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="28" width="164"><b>Collingwood</b></td> <td class="ylwbgmid" width="165"><b>Third Quarter</b></td> <td class="ylwbgmid" width="164"><b>St Kilda</b></td> </tr> <tr><td colspan="3" class="ylwbdr" style="height:1px"></td></tr> <tr> <td class="ylwbgmid" height="22">5.2 32</td> <td class="ylwbgmid">Score</td> <td class="ylwbgmid">5.2 32</td> </tr> <tr> <td class="ylwbgmid" height="22">7</td> <td class="ylwbgmid">Scoring Shots</td> <td class="ylwbgmid">7</td> </tr> <tr> <td class="ylwbgmid" height="22">71.4%</td> <td class="ylwbgmid">Conversion</td> <td class="ylwbgmid">71.4%</td> </tr> <tr> <td class="ylwbgmid" height="22">Draw</td> <td class="ylwbgmid">Result</td> <td class="ylwbgmid">Draw</td> </tr> <tr> <td class="ylwbgmid" height="22">Leading by 5</td> <td class="ylwbgmid">End of Quarter</td> <td class="ylwbgmid">Trailing by 5</td> </tr> <tr><td colspan="3" class="ylwbdr" style="height:1px"></td></tr> </table> </td> <td> <table border="0" cellspacing="0" cellpadding="0" width="493"> <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="28" width="164"><b>Collingwood</b></td> <td class="ylwbgmid" width="165"><b>Final Quarter</b></td> <td class="ylwbgmid" width="164"><b>St Kilda</b></td> </tr> <tr><td colspan="3" class="ylwbdr" style="height:1px"></td></tr> <tr> <td class="ylwbgmid" height="22">6.6 42</td> <td class="ylwbgmid">Score</td> <td class="ylwbgmid">1.0 6</td> </tr> <tr> <td class="ylwbgmid" height="22">12</td> <td class="ylwbgmid">Scoring Shots</td> <td class="ylwbgmid">1</td> </tr> <tr> <td class="ylwbgmid" height="22">50.0%</td> <td class="ylwbgmid">Conversion</td> <td class="ylwbgmid">100.0%</td> </tr> <tr> <td class="ylwbgmid" height="22">Won quarter by 36</td> <td class="ylwbgmid">Result</td> <td class="ylwbgmid">Lost quarter by 36</td> </tr> <tr> <td class="ylwbgmid" height="22">Won game by 41</td> <td class="ylwbgmid">End of Game</td> <td class="ylwbgmid">Lost game by 41</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="1000"> <tr><td height="28" 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="493"> <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="28" width="164"><b>Collingwood</b></td> <td class="ylwbgmid" width="165"><b>First Half</b></td> <td class="ylwbgmid" width="164"><b>St Kilda</b></td> </tr> <tr><td colspan="3" class="ylwbdr" style="height:1px"></td></tr> <tr> <td class="ylwbgmid" height="22">6.2 38</td> <td class="ylwbgmid">Score</td> <td class="ylwbgmid">4.9 33</td> </tr> <tr> <td class="ylwbgmid" height="22">8</td> <td class="ylwbgmid">Scoring Shots</td> <td class="ylwbgmid">13</td> </tr> <tr> <td class="ylwbgmid" height="22">75.0%</td> <td class="ylwbgmid">Conversion</td> <td class="ylwbgmid">30.8%</td> </tr> <tr> <td class="ylwbgmid" height="22">Won half by 5</td> <td class="ylwbgmid">Result</td> <td class="ylwbgmid">Lost half by 5</td> </tr> <tr> <td class="ylwbgmid" height="22">Leading by 5</td> <td class="ylwbgmid">Halftime</td> <td class="ylwbgmid">Trailing by 5</td> </tr> <tr><td colspan="3" class="ylwbdr" style="height:1px"></td></tr> </table> </td> <td> <table border="0" cellspacing="0" cellpadding="0" width="493"> <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="28" width="164"><b>Collingwood</b></td> <td class="ylwbgmid" width="165"><b>Second Half</b></td> <td class="ylwbgmid" width="164"><b>St Kilda</b></td> </tr> <tr><td colspan="3" class="ylwbdr" style="height:1px"></td></tr> <tr> <td class="ylwbgmid" height="22">11.8 74</td> <td class="ylwbgmid">Score</td> <td class="ylwbgmid">6.2 38</td> </tr> <tr> <td class="ylwbgmid" height="22">19</td> <td class="ylwbgmid">Scoring Shots</td> <td class="ylwbgmid">8</td> </tr> <tr> <td class="ylwbgmid" height="22">57.9%</td> <td class="ylwbgmid">Conversion</td> <td class="ylwbgmid">75.0%</td> </tr> <tr> <td class="ylwbgmid" height="22">Won half by 36</td> <td class="ylwbgmid">Result</td> <td class="ylwbgmid">Lost half by 36</td> </tr> <tr> <td class="ylwbgmid" height="22">Won game by 41</td> <td class="ylwbgmid">End of Game</td> <td class="ylwbgmid">Lost game by 41</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; 2020</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 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="submenuxb" onClick="hideSubMenu('teammenu')" onMouseUp="hideSubMenu('teammenu')">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="submenuxb" onClick="hideSubMenu('playermenu')" onMouseUp="hideSubMenu('playermenu')">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="submenuxb" onClick="hideSubMenu('playerrankmenu')" onMouseUp="hideSubMenu('playerrankmenu')">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="submenuxb" onClick="hideSubMenu('teamrankmenu')" onMouseUp="hideSubMenu('teamrankmenu')">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="submenuxb" onClick="hideSubMenu('draftmenu')" onMouseUp="hideSubMenu('draftmenu')">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</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="submenuxb" onClick="hideSubMenu('risingstarmenu')" onMouseUp="hideSubMenu('risingstarmenu')">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="submenuxb" onClick="hideSubMenu('matchmenu')" onMouseUp="hideSubMenu('matchmenu')">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="submenuxb" onClick="hideSubMenu('laddermenu')" onMouseUp="hideSubMenu('laddermenu')">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="submenuxb" onClick="hideSubMenu('brownlowmenu')" onMouseUp="hideSubMenu('brownlowmenu')">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="submenuxb" onClick="hideSubMenu('attendancemenu')" onMouseUp="hideSubMenu('attendancemenu')">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="submenuxb" onClick="hideSubMenu('coachmenu')" onMouseUp="hideSubMenu('coachmenu')">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="submenuxb" onClick="hideSubMenu('highlightsmenu')" onMouseUp="hideSubMenu('highlightsmenu')">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="submenuxb" onClick="hideSubMenu('supercoachmenu')" onMouseUp="hideSubMenu('supercoachmenu')">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="submenuxb" onClick="hideSubMenu('dreamteammenu')" onMouseUp="hideSubMenu('dreamteammenu')">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="submenuxb" onClick="hideSubMenu('selectionsmenu')" onMouseUp="hideSubMenu('selectionsmenu')">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="submenuxb" onClick="hideSubMenu('pastplayermenu')" onMouseUp="hideSubMenu('pastplayermenu')">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="submenuxb" onClick="hideSubMenu('contractsmenu')" onMouseUp="hideSubMenu('contractsmenu')">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_adv9794.html
HTML
gpl-3.0
148,136
// Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. [assembly: System.Reflection.AssemblyCultureAttribute("en-US")] public class enUS { }
BlastarIndia/roslyn
Src/Compilers/Test/Resources/Core/SymbolsTests/Versioning/EN_US.cs
C#
gpl-3.0
275
# This file is part of Buildbot. Buildbot 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 2. # # 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., 51 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # Copyright Buildbot Team Members from buildbot.db import builders from buildbot.test.fake import fakedb from buildbot.test.fake import fakemaster from buildbot.test.util import connector_component from buildbot.test.util import interfaces from buildbot.test.util import validation from twisted.internet import defer from twisted.trial import unittest class Tests(interfaces.InterfaceTests): # common sample data builder_row = [ fakedb.Builder(id=7, name="some:builder"), ] # tests def test_signature_findBuilderId(self): @self.assertArgSpecMatches(self.db.builders.findBuilderId) def findBuilderId(self, name): pass def test_signature_addBuilderMaster(self): @self.assertArgSpecMatches(self.db.builders.addBuilderMaster) def addBuilderMaster(self, builderid=None, masterid=None): pass def test_signature_removeBuilderMaster(self): @self.assertArgSpecMatches(self.db.builders.removeBuilderMaster) def removeBuilderMaster(self, builderid=None, masterid=None): pass def test_signature_getBuilder(self): @self.assertArgSpecMatches(self.db.builders.getBuilder) def getBuilder(self, builderid): pass def test_signature_getBuilders(self): @self.assertArgSpecMatches(self.db.builders.getBuilders) def getBuilders(self, masterid=None): pass @defer.inlineCallbacks def test_findBuilderId_new(self): id = yield self.db.builders.findBuilderId('some:builder') builderdict = yield self.db.builders.getBuilder(id) self.assertEqual(builderdict, dict(id=id, name='some:builder', masterids=[])) @defer.inlineCallbacks def test_findBuilderId_exists(self): yield self.insertTestData([ fakedb.Builder(id=7, name='some:builder'), ]) id = yield self.db.builders.findBuilderId('some:builder') self.assertEqual(id, 7) @defer.inlineCallbacks def test_addBuilderMaster(self): yield self.insertTestData([ fakedb.Builder(id=7), fakedb.Master(id=9, name='abc'), fakedb.Master(id=10, name='def'), fakedb.BuilderMaster(builderid=7, masterid=10), ]) yield self.db.builders.addBuilderMaster(builderid=7, masterid=9) builderdict = yield self.db.builders.getBuilder(7) validation.verifyDbDict(self, 'builderdict', builderdict) self.assertEqual(builderdict, dict(id=7, name='some:builder', masterids=[9, 10])) @defer.inlineCallbacks def test_addBuilderMaster_already_present(self): yield self.insertTestData([ fakedb.Builder(id=7), fakedb.Master(id=9, name='abc'), fakedb.Master(id=10, name='def'), fakedb.BuilderMaster(builderid=7, masterid=9), ]) yield self.db.builders.addBuilderMaster(builderid=7, masterid=9) builderdict = yield self.db.builders.getBuilder(7) validation.verifyDbDict(self, 'builderdict', builderdict) self.assertEqual(builderdict, dict(id=7, name='some:builder', masterids=[9])) @defer.inlineCallbacks def test_removeBuilderMaster(self): yield self.insertTestData([ fakedb.Builder(id=7), fakedb.Master(id=9, name='some:master'), fakedb.Master(id=10, name='other:master'), fakedb.BuilderMaster(builderid=7, masterid=9), fakedb.BuilderMaster(builderid=7, masterid=10), ]) yield self.db.builders.removeBuilderMaster(builderid=7, masterid=9) builderdict = yield self.db.builders.getBuilder(7) validation.verifyDbDict(self, 'builderdict', builderdict) self.assertEqual(builderdict, dict(id=7, name='some:builder', masterids=[10])) @defer.inlineCallbacks def test_getBuilder_no_masters(self): yield self.insertTestData([ fakedb.Builder(id=7, name='some:builder'), ]) builderdict = yield self.db.builders.getBuilder(7) validation.verifyDbDict(self, 'builderdict', builderdict) self.assertEqual(builderdict, dict(id=7, name='some:builder', masterids=[])) @defer.inlineCallbacks def test_getBuilder_with_masters(self): yield self.insertTestData([ fakedb.Builder(id=7, name='some:builder'), fakedb.Master(id=3, name='m1'), fakedb.Master(id=4, name='m2'), fakedb.BuilderMaster(builderid=7, masterid=3), fakedb.BuilderMaster(builderid=7, masterid=4), ]) builderdict = yield self.db.builders.getBuilder(7) validation.verifyDbDict(self, 'builderdict', builderdict) self.assertEqual(builderdict, dict(id=7, name='some:builder', masterids=[3, 4])) @defer.inlineCallbacks def test_getBuilder_missing(self): builderdict = yield self.db.builders.getBuilder(7) self.assertEqual(builderdict, None) @defer.inlineCallbacks def test_getBuilders(self): yield self.insertTestData([ fakedb.Builder(id=7, name='some:builder'), fakedb.Builder(id=8, name='other:builder'), fakedb.Builder(id=9, name='third:builder'), fakedb.Master(id=3, name='m1'), fakedb.Master(id=4, name='m2'), fakedb.BuilderMaster(builderid=7, masterid=3), fakedb.BuilderMaster(builderid=8, masterid=3), fakedb.BuilderMaster(builderid=8, masterid=4), ]) builderlist = yield self.db.builders.getBuilders() for builderdict in builderlist: validation.verifyDbDict(self, 'builderdict', builderdict) self.assertEqual(sorted(builderlist), sorted([ dict(id=7, name='some:builder', masterids=[3]), dict(id=8, name='other:builder', masterids=[3, 4]), dict(id=9, name='third:builder', masterids=[]), ])) @defer.inlineCallbacks def test_getBuilders_masterid(self): yield self.insertTestData([ fakedb.Builder(id=7, name='some:builder'), fakedb.Builder(id=8, name='other:builder'), fakedb.Builder(id=9, name='third:builder'), fakedb.Master(id=3, name='m1'), fakedb.Master(id=4, name='m2'), fakedb.BuilderMaster(builderid=7, masterid=3), fakedb.BuilderMaster(builderid=8, masterid=3), fakedb.BuilderMaster(builderid=8, masterid=4), ]) builderlist = yield self.db.builders.getBuilders(masterid=3) for builderdict in builderlist: validation.verifyDbDict(self, 'builderdict', builderdict) self.assertEqual(sorted(builderlist), sorted([ dict(id=7, name='some:builder', masterids=[3]), dict(id=8, name='other:builder', masterids=[3, 4]), ])) @defer.inlineCallbacks def test_getBuilders_empty(self): builderlist = yield self.db.builders.getBuilders() self.assertEqual(sorted(builderlist), []) class RealTests(Tests): # tests that only "real" implementations will pass pass class TestFakeDB(unittest.TestCase, Tests): def setUp(self): self.master = fakemaster.make_master() self.db = fakedb.FakeDBConnector(self.master, self) self.db.checkForeignKeys = True self.insertTestData = self.db.insertTestData class TestRealDB(unittest.TestCase, connector_component.ConnectorComponentMixin, RealTests): def setUp(self): d = self.setUpConnectorComponent( table_names=['builders', 'masters', 'builder_masters']) @d.addCallback def finish_setup(_): self.db.builders = builders.BuildersConnectorComponent(self.db) return d def tearDown(self): return self.tearDownConnectorComponent()
zozo123/buildbot
master/buildbot/test/unit/test_db_builders.py
Python
gpl-3.0
8,680
/* * This file is part of Wi-Fi Reminders. * * Wi-Fi Reminders 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. * * Wi-Fi Reminders 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 Wi-Fi Reminders. If not, see <http://www.gnu.org/licenses/>. */ package ru.glesik.wifireminders; import android.os.Bundle; import android.preference.PreferenceActivity; public class SettingsActivity extends PreferenceActivity { @SuppressWarnings("deprecation") @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); addPreferencesFromResource(R.xml.settings); } }
glesik/wifireminders
app/src/main/java/ru/glesik/wifireminders/SettingsActivity.java
Java
gpl-3.0
1,084
using System; using System.Collections.Generic; using System.Linq; using System.Runtime.InteropServices; using System.Security; using System.Text; namespace CSCore.CoreAudioAPI { [ComImport] [Guid("641DD20B-4D41-49CC-ABA3-174B9477BB08")] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [SuppressUnmanagedCodeSecurity] public interface IAudioSessionNotification { [PreserveSig] int OnSessionCreated([In] IntPtr newSession); //newSession is a pointer to an IAudioSessionControl interface } }
techdude101/code
C Sharp/cscore-e2822dc89eca17ec28d8e22e91ebb61ebff5cbef/CSCore/CoreAudioAPI/IAudioSessionNotification.cs
C#
gpl-3.0
544
<?php session_start(); header("Content-Type: image/png"); header("Content-Disposition: attachment; filename=mapa_UNICEF.png"); $image_name = $_SESSION["mapserver_img"]; $image = imagecreatefrompng($image_name); imagePng($image); ?>
umaic/sidi
consulta/unicef_mapserver_download_img.php
PHP
gpl-3.0
236
// This file is part of BOINC. // http://boinc.berkeley.edu // Copyright (C) 2008 University of California // // BOINC 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. // // BOINC 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 BOINC. If not, see <http://www.gnu.org/licenses/>. #ifndef _BOINCBASEVIEW_H_ #define _BOINCBASEVIEW_H_ #if defined(__GNUG__) && !defined(__APPLE__) #pragma interface "BOINCBaseView.cpp" #endif #define BASEVIEW_STRIPES 1 #define BASEVIEW_RULES 1 #define DEFAULT_TASK_FLAGS wxTAB_TRAVERSAL | wxADJUST_MINSIZE | wxFULL_REPAINT_ON_RESIZE #if BASEVIEW_RULES #define DEFAULT_LIST_SINGLE_SEL_FLAGS wxLC_REPORT | wxLC_VIRTUAL | wxLC_HRULES | wxLC_SINGLE_SEL #define DEFAULT_LIST_MULTI_SEL_FLAGS wxLC_REPORT | wxLC_VIRTUAL | wxLC_HRULES #else #define DEFAULT_LIST_SINGLE_SEL_FLAGS wxLC_REPORT | wxLC_VIRTUAL | wxLC_SINGLE_SEL #define DEFAULT_LIST_MULTI_SEL_FLAGS wxLC_REPORT | wxLC_VIRTUAL #endif class CBOINCTaskCtrl; class CBOINCListCtrl; class PROJECT; class CTaskItem : wxObject { public: CTaskItem(); CTaskItem( wxString strName, wxString strDescription, wxInt32 iEventID ) : m_strName(strName), m_strDescription(strDescription), m_iEventID(iEventID), m_pButton(NULL), m_strWebSiteLink(wxT("")) {}; CTaskItem( wxString strName, wxString strDescription, wxString strWebSiteLink, wxInt32 iEventID ) : m_strName(strName), m_strDescription(strDescription), m_iEventID(iEventID), m_pButton(NULL), m_strWebSiteLink(strWebSiteLink) {}; ~CTaskItem() {}; wxString m_strName; wxString m_strDescription; wxInt32 m_iEventID; wxButton* m_pButton; wxString m_strWebSiteLink; }; class CTaskItemGroup : wxObject { public: CTaskItemGroup(); CTaskItemGroup( wxString strName ) : m_strName(strName), m_pStaticBox(NULL), m_pStaticBoxSizer(NULL) { m_Tasks.clear(); #ifdef __WXMAC__ m_pTaskGroupAccessibilityEventHandlerRef = NULL; #endif }; ~CTaskItemGroup() { #ifdef __WXMAC__ RemoveMacAccessibilitySupport(); #endif }; wxButton* button(int i) {return m_Tasks[i]->m_pButton;} wxString m_strName; wxStaticBox* m_pStaticBox; wxStaticBoxSizer* m_pStaticBoxSizer; std::vector<CTaskItem*> m_Tasks; #ifdef __WXMAC__ void SetupMacAccessibilitySupport(); void RemoveMacAccessibilitySupport(); private: EventHandlerRef m_pTaskGroupAccessibilityEventHandlerRef; #endif }; typedef bool (*ListSortCompareFunc)(int, int); class CBOINCBaseView : public wxSplitterWindow { DECLARE_DYNAMIC_CLASS( CBOINCBaseView ) public: CBOINCBaseView(); CBOINCBaseView( wxNotebook* pNotebook ); CBOINCBaseView( wxNotebook* pNotebook, wxWindowID iTaskWindowID, int iTaskWindowFlags, wxWindowID iListWindowID, int iListWindowFlags ); ~CBOINCBaseView(); virtual wxString& GetViewName(); virtual wxString& GetViewDisplayName(); virtual const char** GetViewIcon(); virtual const int GetViewRefreshRate(); virtual const int GetViewCurrentViewPage(); virtual wxString GetKeyValue1(int iRowIndex); virtual wxString GetKeyValue2(int iRowIndex); virtual int FindRowIndexByKeyValues(wxString& key1, wxString& key2); bool FireOnSaveState( wxConfigBase* pConfig ); bool FireOnRestoreState( wxConfigBase* pConfig ); virtual int GetListRowCount(); void FireOnListRender( wxTimerEvent& event ); void FireOnListSelected( wxListEvent& event ); void FireOnListDeselected( wxListEvent& event ); wxString FireOnListGetItemText( long item, long column ) const; int FireOnListGetItemImage( long item ) const; #if BASEVIEW_STRIPES wxListItemAttr* FireOnListGetItemAttr( long item ) const; #endif int GetProgressColumn() { return m_iProgressColumn; } virtual double GetProgressValue(long item); virtual wxString GetProgressText( long item); void InitSort(); void SaveSelections(); void RestoreSelections(); void ClearSavedSelections(); void ClearSelections(); void RefreshTaskPane(); #ifdef __WXMAC__ CBOINCListCtrl* GetListCtrl() { return m_pListPane; } #endif std::vector<CTaskItemGroup*> m_TaskGroups; int m_iSortColumn; bool m_bReverseSort; private: wxArrayString m_arrSelectedKeys1; //array for remembering the current selected rows by primary key column value wxArrayString m_arrSelectedKeys2; //array for remembering the current selected rows by secondary key column value protected: virtual bool OnSaveState( wxConfigBase* pConfig ); virtual bool OnRestoreState( wxConfigBase* pConfig ); virtual void OnListRender( wxTimerEvent& event ); virtual void OnListSelected( wxListEvent& event ); virtual void OnListDeselected( wxListEvent& event ); virtual void OnCacheHint(wxListEvent& event); virtual wxString OnListGetItemText( long item, long column ) const; virtual int OnListGetItemImage( long item ) const; void OnColClick(wxListEvent& event); virtual int GetDocCount(); virtual wxString OnDocGetItemImage( long item ) const; virtual wxString OnDocGetItemAttr( long item ) const; virtual int AddCacheElement(); virtual int EmptyCache(); virtual int GetCacheCount(); virtual int RemoveCacheElement(); virtual int SynchronizeCache(); virtual bool SynchronizeCacheItem(wxInt32 iRowIndex, wxInt32 iColumnIndex); void sortData(); virtual void EmptyTasks(); virtual void PreUpdateSelection(); virtual void UpdateSelection(); virtual void PostUpdateSelection(); virtual void UpdateWebsiteSelection(long lControlGroup, PROJECT* project); bool _IsSelectionManagementNeeded(); virtual bool IsSelectionManagementNeeded(); bool _EnsureLastItemVisible(); virtual bool EnsureLastItemVisible(); static void append_to_status(wxString& existing, const wxChar* additional); static wxString HtmlEntityEncode(wxString strRaw); static wxString HtmlEntityDecode(wxString strRaw); #if BASEVIEW_STRIPES virtual wxListItemAttr* OnListGetItemAttr( long item ) const; wxListItemAttr* m_pWhiteBackgroundAttr; wxListItemAttr* m_pGrayBackgroundAttr; #endif bool m_bProcessingTaskRenderEvent; bool m_bProcessingListRenderEvent; bool m_bForceUpdateSelection; bool m_bIgnoreUIEvents; bool m_bNeedSort; int m_iProgressColumn; wxImageList * m_SortArrows; ListSortCompareFunc m_funcSortCompare; wxArrayInt m_iSortedIndexes; CBOINCTaskCtrl* m_pTaskPane; CBOINCListCtrl* m_pListPane; }; #endif
keyz182/BOINC-7.0
clientgui/BOINCBaseView.h
C
gpl-3.0
8,218
apex.region('emp').widget().interactiveGrid('getToolbar'); /** * Call this method when the size of the widget element changes. This can happen if the browser window * changes for example. This will resize the current view. * Note: Most of the time it is not necessary to call this method as Interactive Grid detects when its * size changes. */ apex.region('emp').widget().interactiveGrid('resize'); /** * Cause the Interactive Grid to get fresh data from the server. * A warning is given if the model has any outstanding changes and the user can choose to allow the refresh or not. * * @param {Object} [pOptions] tbd/todo */ apex.region('emp').widget().interactiveGrid('refresh'); apex.region('emp').refresh(); /** * Put focus in the cell (or field etc.) given by pRecordId and pColumn. This is used to focus rows or cells * that have errors. This will switch to the "editable" view. * This delegates to the view. Not all views will support going to a cell. * * @param {String} [pModelInstanceId] model instance id. only needed if using multiple models such as in master * detail and the model has not already been set correctly by the master. * @param {String} pRecordId the record id of the row to go to. * @param {String} [pColumn] column in the record row to go to. */ apex.region('emp').widget().interactiveGrid('gotoCell'); /** * Returns the actions context for this Interactive Grid instance * @return {apex.actions} the actions context * @example * apex.region("emp").widget().interactiveGrid("getActions").invoke("save"); */ apex.region('emp').widget().interactiveGrid('getActions'); /** * Returns the toolbar widget element. * * @return {jQuery} jQuery object of the interactive grid toolbar or null if there is no toolbar */ apex.region('emp').widget().interactiveGrid('getToolbar'); /** * Return the underlying data model records corresponding to the current selection in the current view. * Use the apex.model API to manipulate these records. Make sure you are using the model for the current * view for example: apex.region(<static-id>).widget().interactiveGrid("getCurrentView").model * * Note: Depending on the view and the submitSelectedRows option the selected records returned could * span multiple pages. To get just the records that are selected in the current page requires * using view widget specific methods. * * @return {Array} array of records from the model corresponding to the selected rows/records * Returns empty array if there is no selection. Returns null if the current view doesn't support * selection. */ apex.region('emp').widget().interactiveGrid('getSelectedRecords'); /** * Set the current selection to the records specified. Only applies for views that support selection. * * Note that the records or record ids given may not yet exist in the model or may not be visible in the view. * * @param [array] pRecords an array of model records or an array of model record ids as returned by model * getRecordId. If this is an empty array then the selection is cleared. */ apex.region('emp').widget().interactiveGrid('setSelectedRecords'); /** * Return the Interactive Grid view interface for the given view id or if not view id is given return a * map of all the view interfaces. * * @param {string} [pViewId] Id of the view to get. For example "grid" or "chart". * @return {object} View interface. */ apex.region('emp').widget().interactiveGrid('getViews'); apex.region('emp').widget().interactiveGrid('getCurrentView'); apex.region('emp').widget().interactiveGrid('getCurrentViewId'); /** * Sets focus to the search field if present, and if not delegates to the current view's focus handling. */ apex.region('emp').widget().interactiveGrid('focus');
mgoricki/orclapex-ig-cheat-sheet
ig_methods.js
JavaScript
gpl-3.0
3,779
/** * File: ViewXmlRelationErrorsTable.h * Developed by: Biancucci Maurizio * Date: 2014/07/24 */ #ifndef VIEWXMLRELATIONERRORSTABLE_H #define VIEWXMLRELATIONERRORSTABLE_H #include "ViewXmlRelationErrorsBase.h" #include <QWidget> #include <QFont> class QTableWidget; class QVBoxLayout; class QHBoxLayout; class QPushButton; class QLabel; /** * @brief The ViewXmlRelationErrorsTable class that implements the ViewXmlRelationErrorsBase with a table */ class ViewXmlRelationErrorsTable : public QWidget, public ViewXmlRelationErrorsBase { Q_OBJECT private: /** * @brief m_pTable: table used for show the errors */ QTableWidget* m_pTable; QFont m_boldFont; //Layout QVBoxLayout* m_pVertlayout; QHBoxLayout* m_pTitleHorizLayout; //Label QLabel* m_pSummaryLabel; //Buttons QPushButton* m_pErrorBnt; QPushButton* m_pWarningBnt; QPushButton* m_pInfoBnt; //QIcons QIcon* m_pErrorIcon; QIcon* m_pWarningIcon; QIcon* m_pInfoIcon; public: ViewXmlRelationErrorsTable(QList<XmlRelationError*>* xmlRelationErrorList); /** * @brief SetNewXmlRelationErrorList: set a new error list and update the view * @param xmlRelationErrorList: the new error collection to display */ virtual void SetNewXmlRelationErrorList(QList<XmlRelationError*>* xmlRelationErrorList); private: /** * @brief UpdateSummaryLabel: update the summary label */ void UpdateSummaryLabel(); /** * @brief UpdateButtons: update the content of the buttons * @param errors number * @param warnings number * @param infos number */ void UpdateButtons(int errors, int warnings, int infos); /** * @brief ReLoadWidget: update the content of the widget * @param notFilterAndUpdateButtons: if is true non filter the output on the serevity and reload the buttons, * otherwise filter on the severty and not update the buttons */ void ReLoadWidget(bool notFilterAndUpdateButtons); /** * @brief FillTableAndButtons: fill the table with the error and the buttons content * @param notFilterAndUpdateButtons: if is true non filter the output on the serevity and reload the buttons, * otherwise filter on the severty and not update the buttons */ void FillTableAndButtons(bool notFilterAndUpdateButtons); /** * @brief AbsoluteFileNameToRelativeFileName: get the file name from a full path file name * @param absoluteFileName: the obsolute file name to convert * @return the file name */ QString AbsoluteFileNameToRelativeFileName(const QString& absoluteFileName); private slots: /** * @brief ButtonToggled: reload the widget when a button is toggled */ void ButtonToggled(); /** * @brief ShowContextualMenuTable: show the contextual menu * @param point: where show the menu */ void ShowContextualMenuTable(QPoint point); /** * @brief CellDoubleClicked: call the show of the tag with the error in the view * @param indexRow: indexRow clicked */ void CellDoubleClicked(int indexRow, int); signals: void ShowErrorNodeRequested(const QString& identifierNumber, const QString& absoluteFileName); private: /** * @brief EmitShowErrorNodeRequested: find the identifier of the selected row and the file name and emit the signal * @param rowIndex: selected index of the table */ void EmitShowErrorNodeRequested(int rowIndex); public: /** * @brief show: show the widget */ virtual void Show(); /** * @brief hide: hide the widget */ virtual void Hide(); }; #endif // VIEWXMLRELATIONERRORSTABLE_H
Mauxx91/XML-Editor
source/View/ViewXmlRelationErrorsTable.h
C
gpl-3.0
3,783
/* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. * * This file is part of GNU Radio * * GNU Radio 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, or (at your option) * any later version. * * GNU Radio 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 GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /* * This is actually the same as gr_local_signhandler, but with a different name. * We don't have a common library to put this in, so... */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include <usrp_local_sighandler.h> #include <stdexcept> #include <stdio.h> usrp_local_sighandler::usrp_local_sighandler (int signum, void (*new_handler)(int)) : d_signum (signum) { #ifdef HAVE_SIGACTION struct sigaction new_action; memset (&new_action, 0, sizeof (new_action)); new_action.sa_handler = new_handler; sigemptyset (&new_action.sa_mask); new_action.sa_flags = 0; if (sigaction (d_signum, &new_action, &d_old_action) < 0){ perror ("sigaction (install new)"); throw std::runtime_error ("sigaction"); } #endif } usrp_local_sighandler::~usrp_local_sighandler () { #ifdef HAVE_SIGACTION if (sigaction (d_signum, &d_old_action, 0) < 0){ perror ("sigaction (restore old)"); throw std::runtime_error ("sigaction"); } #endif } void usrp_local_sighandler::throw_signal(int signum) throw(usrp_signal) { throw usrp_signal (signum); } /* * Semi-hideous way to may a signal number into a signal name */ #define SIGNAME(x) case x: return #x std::string usrp_signal::name () const { char tmp[128]; switch (signal ()){ #ifdef SIGHUP SIGNAME (SIGHUP); #endif #ifdef SIGINT SIGNAME (SIGINT); #endif #ifdef SIGQUIT SIGNAME (SIGQUIT); #endif #ifdef SIGILL SIGNAME (SIGILL); #endif #ifdef SIGTRAP SIGNAME (SIGTRAP); #endif #ifdef SIGABRT SIGNAME (SIGABRT); #endif #ifdef SIGBUS SIGNAME (SIGBUS); #endif #ifdef SIGFPE SIGNAME (SIGFPE); #endif #ifdef SIGKILL SIGNAME (SIGKILL); #endif #ifdef SIGUSR1 SIGNAME (SIGUSR1); #endif #ifdef SIGSEGV SIGNAME (SIGSEGV); #endif #ifdef SIGUSR2 SIGNAME (SIGUSR2); #endif #ifdef SIGPIPE SIGNAME (SIGPIPE); #endif #ifdef SIGALRM SIGNAME (SIGALRM); #endif #ifdef SIGTERM SIGNAME (SIGTERM); #endif #ifdef SIGSTKFLT SIGNAME (SIGSTKFLT); #endif #ifdef SIGCHLD SIGNAME (SIGCHLD); #endif #ifdef SIGCONT SIGNAME (SIGCONT); #endif #ifdef SIGSTOP SIGNAME (SIGSTOP); #endif #ifdef SIGTSTP SIGNAME (SIGTSTP); #endif #ifdef SIGTTIN SIGNAME (SIGTTIN); #endif #ifdef SIGTTOU SIGNAME (SIGTTOU); #endif #ifdef SIGURG SIGNAME (SIGURG); #endif #ifdef SIGXCPU SIGNAME (SIGXCPU); #endif #ifdef SIGXFSZ SIGNAME (SIGXFSZ); #endif #ifdef SIGVTALRM SIGNAME (SIGVTALRM); #endif #ifdef SIGPROF SIGNAME (SIGPROF); #endif #ifdef SIGWINCH SIGNAME (SIGWINCH); #endif #ifdef SIGIO SIGNAME (SIGIO); #endif #ifdef SIGPWR SIGNAME (SIGPWR); #endif #ifdef SIGSYS SIGNAME (SIGSYS); #endif default: #if defined (HAVE_SNPRINTF) #if defined (SIGRTMIN) && defined (SIGRTMAX) if (signal () >= SIGRTMIN && signal () <= SIGRTMAX){ snprintf (tmp, sizeof (tmp), "SIGRTMIN + %d", signal ()); return tmp; } #endif snprintf (tmp, sizeof (tmp), "SIGNAL %d", signal ()); return tmp; #else return "Unknown signal"; #endif } }
mojca/gecko
lib/sis3150_calls/loader/usrp_local_sighandler.cc
C++
gpl-3.0
3,851
html{ color: white; text-shadow: black 0 0 2px; background: url('grid.png'),linear-gradient(#6c7989, #434b55) fixed; } #system>div>div,#mebg,.control,.player,.card,.avatar,.avatar2,.button,.dialog>.bar,.menu,#splash>div, #arena.mobile:not(.chess) .player[data-position='0'] .equips,.playerbg,.menubg,.mebg{ box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(0, 0, 0, 0.45) 0 3px 10px; border-radius: 8px; } .dialog.choose-character>.packnode>div{ box-shadow: rgba(0, 0, 0, 0.4) 0 0 0 1px, rgba(0, 0, 0, 0.2) 0 3px 10px; background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)); color: white; text-shadow: black 0 0 2px; } .dialog.choose-character>.packnode>div.active{ box-shadow: rgba(27, 63, 95, 0.8) 0 0 0 1px, rgba(0, 0, 0, 0.2) 0 3px 10px !important; background-image: linear-gradient(rgba(47,101,150,1), rgba(43, 90, 132,1)); } .button-downloading>.button-progress>div{ background: rgba(77,224,100,0.45); } .menu.main>.menu-tab>div:not(.active):not(*:hover), .menu.main>.menu-tab>.disabled{ color: rgba(77, 60, 51,0.5); } #window>.dialog.popped,.menu,.menubg{ background:url('wood2.png'); color:rgba(77, 60, 51,0.8); text-shadow:none; } .popup-container>.menu.visual>.dashedmenubutton{ color:rgba(77, 60, 51,0.8); text-shadow: none; border-color:rgba(77, 60, 51,0.8); } .cardbg{ background-size: initial !important; } #splash>div{ background:url('wood2.png'); } #arena:not(.long).mobile:not(.oldlayout) .player.unseen:not([data-position="0"]) .equips:not(*:empty), #arena:not(.long):not(.mobile):not(.oldlayout) .player.unseen .equips:not(*:empty), #arena.long.mobile:not(.oldlayout) .player.unseen2:not([data-position="0"]) .equips:not(*:empty), #arena.long:not(.mobile):not(.oldlayout) .player.unseen2 .equips:not(*:empty){ background: url('wood.png'); border-radius:4px; overflow: hidden; box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(0, 0, 0, 0.2) 0 2px 10px; } #arena:not(.long).mobile:not(.oldlayout) .player.unseen:not([data-position="0"]) .equips:not(*:empty)>.card, #arena:not(.long):not(.mobile):not(.oldlayout) .player.unseen .equips:not(*:empty)>.card:not(.selected), #arena.long.mobile:not(.oldlayout) .player.unseen2:not([data-position="0"]) .equips:not(*:empty)>.card, #arena.long:not(.mobile):not(.oldlayout) .player.unseen2 .equips:not(*:empty)>.card:not(.selected){ background: none !important; } .coin_menu .content>.caption>.coin_buy>.menubutton{ box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(0, 0, 0, 0.3) 0 0 5px !important; } .popup.fire{ color: rgb(255,119,63); } .popup.thunder{ color: rgb(117,186,255); } .control .thundertext,.thundertext.thunderauto, .dialog.popped .bluetext, .menubg .bluetext{ color: rgba(29, 63, 137, 1); } .control .controlthundertext{ color: rgb(62, 41, 30); } .dialog.popped .yellowtext, .menubg .yellowtext{ color:#631515; } .dialog.popped .firetext, .menubg .firetext{ color:#a20000; } .dialog.popped .greentext, .menubg .greentext,.control span.greentext,.poisontext.poisonauto{ color:#00312d; } .control span.firetext{ color:#631515; } .legendtext.legendauto{ color: rgba(106, 27, 154, 1); } .player,.card,.dialog>.bar,.cardbg, #arena.mobile:not(.chess) .player[data-position='0'] .equips,.playerbg,#window .player.playerbg{ background: url('wood.jpg'); } .cardbg.button{ background: url('wood.png'); } #arena.observe .handcards>.card{ background: url('wood.jpg') !important; } #arena:not(.chess).textequip .player[data-position='0'] .equips>.card{ background: url('wood.jpg') !important; color:rgb(77, 60, 51) !important; text-shadow: none !important; box-shadow: rgba(0,0,0,0.4) 1px 0 0 1px; } #arena:not(.chess).textequip .player[data-position='0'] .equips>.card:first-child{ box-shadow: rgba(0,0,0,0.4) 0 1px 0 0; } #arena:not(.chess).textequip .player[data-position='0'] .equips>.card.selected{ -webkit-filter: sepia(0.8) !important; background-image: url('wood.jpg') !important; /*background-image: linear-gradient(rgba(47,101,150,1), rgba(43, 90, 132,1)) !important;*/ /*color: white !important; box-shadow: rgba(0,0,0,0.4) 1px 0 0 1px !important;*/ } #arena:not(.chess).textequip .player[data-position='0'] .equips>.card.selected:first-child{ box-shadow: rgba(0,0,0,0.4) 0 1px 0 0 !important; } #arena:not(.chess).textequip .player[data-position='0'] .equips>.card>.name2{ transition: opacity 0.5s, color 0s; } .control,#system>div>div,.menubutton,#system>div>.pressdown2{ background: url('wood2.jpg'); color:rgba(77, 60, 51,0.8); text-shadow:none; border-radius:4px; } #roundmenu>div:not(.clock){ background:rgba(77, 60, 51,0.8); box-shadow:none; } #system>div>.pressdown2{ box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(0, 133, 255, 0.8) 0 0 0 2px, rgba(0, 133, 255, 1) 0 0 5px !important; } .judges>div,.marks>div{ border-radius:4px; } #mebg,.menubutton,.menubutton.highlight,.menubutton.active,.mebg{ background: url('wood.png'); } .menubutton.large{ box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(0, 0, 0, 0.3) 0 0 5px !important; } .menubutton.large.active, .menubutton.round.active, .menubutton.active, .menubutton.highlight.update{ box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(0, 133, 255, 0.4) 0 0 0 2px, rgba(0, 133, 255, 1) 0 0 5px !important; } .connectevents.icon.highlight{ box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(0, 0, 0, 0.3) 0 0 5px !important; background: url('wood.jpg'); } .videonode.menubutton.extension>.caption>.menubutton.active{ box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(0, 0, 0, 0.2) 0 3px 10px !important; } .videonode.menubutton.extension.current{ box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(0, 133, 255, 0.4) 0 0 0 2px, rgba(0, 133, 255, 1) 0 0 5px !important; } .themebutton{ box-shadow: rgba(0, 0, 0, 0.45) 0 0 0 1px, rgba(0, 0, 0, 0.45) 0 3px 10px !important; } .config.toggle>div>div{ background: url('wood.png'); box-shadow: rgba(151, 151, 151, 1) 0 0 0 1px, rgba(0, 0, 0, 0.2) 0 3px 10px; } .config.toggle.on>div{ background-color: transparent; } .config.toggle.on>div::before{ content:'开'; position: absolute; left: 13px; opacity: 0.5; font-size: 14px; line-height: 26px; font-family: 'xinwei' } .popup-container>.menu:not(.visual)>div:hover{ color:white; background-image: linear-gradient(rgb(0, 133, 255), rgb(5, 119, 220)); box-shadow: none; } .control,#system>div>div,.popup,.dialog>.bar{ box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(0, 0, 0, 0.2) 0 2px 10px; } .card{ text-shadow:rgba(0,0,0,0.1) 0 0 1px; } .card.equip3>.range, .card.equip4>.range{ text-shadow: white 0 0 2px; } .card,.menubg,.cardbg,.button.character.cardbg{ color:rgb(77, 60, 51); text-shadow:none; } #arena.mobile:not(.chess) .player[data-position='0'] .card.fullskin.epic>.name2{ color: rgba(0, 66, 165, 1); } #arena.mobile:not(.chess) .player[data-position='0'] .card.fullskin.legend>.name2{ color: rgba(106, 27, 154, 1); /*color: rgb(117,186,0);*/ } .bordered{ border:1px solid rgba(255, 255, 255,0.5); } .dialog.popped .config>.toggle.onoff>div{ border:1px solid rgba(77, 60, 51,0.8); box-shadow: none; } .dialog.popped .config>.toggle.onoff>div>div{ background:rgba(77, 60, 51,0.8); border:1px solid rgba(77, 60, 51,0); box-shadow:none; } .player>.turned{ color: rgba(0,0,0,0.8); background: white; } .player .marks>div:first-child>div{ -webkit-filter: invert(0.8) sepia(1); } #roundmenu.clock>div:nth-of-type(15){ background: url('wood2.png'); box-shadow: rgba(0,0,0,0.5) 0 0 5px inset; } .menubg.charactercard>.ava>.avatar{ box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(0, 0, 0, 0.3) 0 0 5px; } #arena:not(.chess) .player[data-position='0']>.equips>.equip5>.image{ background-position: -6px -6px; }
libccy/noname
theme/woodden/style.css
CSS
gpl-3.0
7,635
# Revision history for Pro6 ## 0.1.0.0 -- YYYY-mm-dd * First version. Released on an unsuspecting world.
mrlovre/super-memory
Pro6/ChangeLog.md
Markdown
gpl-3.0
108
/* * Generated by class-dump 3.1.2. * * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2007 by Steve Nygard. */ #import "NSObject-Protocol.h" @protocol ABKCardActionDelegate <NSObject> - (void)openItunesStoreProduct:(id)fp8; - (void)openURLInWebView:(id)fp8; @end
f41c0r/TinderStats-iOS
theos/include/Tinder/ABKCardActionDelegate-Protocol.h
C
gpl-3.0
287
<!DOCTYPE html> <html> <head> <title>Getting Started with Sky</title> <link rel="icon" href="../static/favicon.ico" /> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /> <meta name="title" content="Getting Started with Sky" /> <meta name="description" content=" <h2>Introduction</h2> This tutorial explain how to create a globe representing the sky. For this kind of globe, the camera is inside the sphere to get a planetarium vision. Then, when the globe is created, we add a loaded texture from a server and using the HIPS protocol. <h2>Code in Mizar</h2> To implement this scenario, we need two instructions in Mizar: <ul> <li>Creating the globe</ul> <li>adding a layer as background</li> </ul> <br/><br/> Look at the code and change it to test it. <br/> " /> <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/wallynm/jquery-loadmask@master/jquery.loadmask.min.css" /> </head> <body style="margin: 0; padding: 0;"> <div> <a href="https://www.cnes.fr" target="_blank" ><img src="../static/logo-cnes.jpg" style="position: absolute; right: 5px; bottom: 10px; width: 100px;" /></a> </div> <canvas id="MizarCanvas" style="border: none; margin: 0; padding: 0;"></canvas> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.1/moment-with-locales.min.js" ></script> <script type="text/javascript" src="https://code.jquery.com/jquery-3.x-git.min.js"></script> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js" integrity="sha256-VazP97ZCwtekAsvgPBSUwPFKdrwD3unUfSGVYrahUqU=" crossorigin="anonymous" ></script> <script type="text/javascript" src="../dist/mizar.js"></script> <script type="text/javascript" src="test.js"></script> </body> </html>
MizarWeb/Mizar
examples/test.html
HTML
gpl-3.0
2,115
# -*- coding: utf-8 -*- import os import pipeline_item class Serialize(pipeline_item.pipeline_stage): def stage(self, pipeline_value): storage_path = "%s/%s" % (self.pipeline_storage_prefix, self.attributes['toFile']) if self.pipeline_storage_prefix is None: storage_path = self.attributes['toFile'] self.storage[storage_path] = str(pipeline_value) return pipeline_value
Br3nda/docvert
core/pipeline_type/serialize.py
Python
gpl-3.0
422
package com.baeldung.dao; import com.baeldung.aop.annotations.Loggable; import com.baeldung.model.Foo; import org.springframework.stereotype.Repository; @Repository public class FooDao { public String findById(Long id) { return "Bazz"; } @Loggable public Foo create(Long id, String name) { return new Foo(id, name); } public Foo merge(Foo foo) { return foo; } }
Niky4000/UsefulUtils
projects/tutorials-master/tutorials-master/spring-mvc-java/src/main/java/com/baeldung/dao/FooDao.java
Java
gpl-3.0
419
#ifndef _COMPILE_WORKER_HPP_ #define _COMPILE_WORKER_HPP_ #include <QThread> #include <kar/kar.hpp> #include <pcompiler/output.hpp> #include <pcompiler/progress.hpp> class KovanSerial; class CompileWorker : public QThread, public Compiler::Progress { Q_OBJECT public: CompileWorker(const kiss::KarPtr &archive, KovanSerial *proto, QObject *parent = 0); void run(); const Compiler::OutputList &output() const; void setUserRoot(const QString &userRoot); const QString &userRoot() const; void progress(double fraction); void cleanup(); private: Compiler::OutputList compile(); static QString tempPath(); kiss::KarPtr m_archive; KovanSerial *m_proto; Compiler::OutputList m_output; QString m_userRoot; QString m_tempDir; }; #endif
kipr/computer
include/compile_worker.hpp
C++
gpl-3.0
760
# This file is part of HamsiManager. # # Copyright (c) 2010 - 2015 Murat Demir <mopened@gmail.com> # # Hamsi Manager 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. # # Hamsi Manager 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 HamsiManager; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA from Core import Universals as uni import FileUtils as fu from Databases import sqlite, getDefaultConnection, correctForSql, getAmendedSQLInsertOrUpdateQueries tableName = "bookmarksOfDirectories" tableVersion = 2 allForFetch = None def fetchAll(): global allForFetch if allForFetch is None: con = getDefaultConnection() cur = con.cursor() cur.execute("SELECT * FROM " + tableName) allForFetch = cur.fetchall() return allForFetch def fetch(_id): con = getDefaultConnection() cur = con.cursor() cur.execute("SELECT * FROM " + tableName + " where id=" + str(int(_id))) return cur.fetchall() def checkValues(_bookmark, _value, _type): if len(_bookmark) == 0 or len(_value) == 0: return False return True def insert(_bookmark, _value, _type=""): global allForFetch if checkValues(_bookmark, _value, _type): allForFetch = None con = getDefaultConnection() cur = con.cursor() sqlQueries = getAmendedSQLInsertOrUpdateQueries(tableName, {"bookmark": "'" + correctForSql(_bookmark) + "'", "value": "'" + correctForSql(_value) + "'", "type": "'" + correctForSql(_type) + "'"}, ["value"]) cur.execute(sqlQueries[0]) cur.execute(sqlQueries[1]) con.commit() cur.execute("SELECT last_insert_rowid();") return cur.fetchall()[0][0] return None def update(_id, _bookmark, _value, _type=""): global allForFetch if checkValues(_bookmark, _value, _type): allForFetch = None con = getDefaultConnection() cur = con.cursor() cur.execute(str( "update " + tableName + " set bookmark='" + correctForSql(_bookmark) + "', value='" + correctForSql( _value) + "', type='" + correctForSql(_type) + "' where id=" + str(int(_id)))) con.commit() def delete(_id): global allForFetch allForFetch = None con = getDefaultConnection() cur = con.cursor() cur.execute("delete from " + tableName + " where id=" + str(int(_id))) con.commit() def getTableCreateQuery(): return "CREATE TABLE IF NOT EXISTS " + tableName + " ('id' INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,'bookmark' TEXT,'value' TEXT,'type' TEXT)" def getDeleteTableQuery(): return "DELETE FROM " + tableName def getDefaultsQueries(): sqlQueries = [] sqlQueries += getAmendedSQLInsertOrUpdateQueries(tableName, {"bookmark": "'Home'", "value": "'" + fu.userDirectoryPath + "'", "type": "''"}, ["value"]) if uni.isWindows: sqlQueries += getAmendedSQLInsertOrUpdateQueries(tableName, {"bookmark": "'C:\\'", "value": "'C:\\'", "type": "''"}, ["value"]) else: sqlQueries += getAmendedSQLInsertOrUpdateQueries(tableName, {"bookmark": "'MNT'", "value": "'/mnt'", "type": "''"}, ["value"]) sqlQueries += getAmendedSQLInsertOrUpdateQueries(tableName, {"bookmark": "'MEDIA'", "value": "'/media'", "type": "''"}, ["value"]) return sqlQueries def checkUpdates(_oldVersion): if _oldVersion < 2: con = getDefaultConnection() cur = con.cursor() cur.execute(str("DROP TABLE " + tableName + ";")) con.commit() cur.execute(getTableCreateQuery()) con.commit() for sqlCommand in getDefaultsQueries(): cur = con.cursor() cur.execute(str(sqlCommand)) con.commit()
supermurat/hamsi-manager
Databases/BookmarksOfDirectories.py
Python
gpl-3.0
4,852
<!doctype html> <html class="no-js" lang="en"> <head> <meta charset="utf-8"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <title>LED Cube Animation Editor</title> <link rel="stylesheet" href="css/foundation.css"/> <script src="js/vendor/modernizr.js"></script> <script src="viewer/three.min.js"></script> <script src="viewer/OrbitControls.js"></script> <script src="viewer/stats.min.js"></script> <script src="viewer/dat.gui.min.js"></script> <script src="viewer/cube.js"></script> <script src="viewer/net.js"></script> <script src="viewer/main.js"></script> </head> <body style="overflow: hidden;"> <div class="row" id="boxes"> <h1>LED Cube Animation Editor</h1> <div class="large-3 medium-6 small-12 columns"> <label>Level 1</label> <div class="row"> <input x="0" y="3" z="0" type="checkbox"><label></label> <input x="1" y="3" z="0" type="checkbox"><label></label> <input x="2" y="3" z="0" type="checkbox"><label></label> <input x="3" y="3" z="0" type="checkbox"><label></label> </div> <div class="row"> <input x="0" y="2" z="0" type="checkbox"><label></label> <input x="1" y="2" z="0" type="checkbox"><label></label> <input x="2" y="2" z="0" type="checkbox"><label></label> <input x="3" y="2" z="0" type="checkbox"><label></label> </div> <div class="row"> <input x="0" y="1" z="0" type="checkbox"><label></label> <input x="1" y="1" z="0" type="checkbox"><label></label> <input x="2" y="1" z="0" type="checkbox"><label></label> <input x="3" y="1" z="0" type="checkbox"><label></label> </div> <div class="row"> <input x="0" y="0" z="0" type="checkbox"><label></label> <input x="1" y="0" z="0" type="checkbox"><label></label> <input x="2" y="0" z="0" type="checkbox"><label></label> <input x="3" y="0" z="0" type="checkbox"><label></label> </div> </div> <div class="large-3 medium-6 small-12 columns"> <label>Level 2</label> <div class="row"> <input x="0" y="3" z="1" type="checkbox"><label></label> <input x="1" y="3" z="1" type="checkbox"><label></label> <input x="2" y="3" z="1" type="checkbox"><label></label> <input x="3" y="3" z="1" type="checkbox"><label></label> </div> <div class="row"> <input x="0" y="2" z="1" type="checkbox"><label></label> <input x="1" y="2" z="1" type="checkbox"><label></label> <input x="2" y="2" z="1" type="checkbox"><label></label> <input x="3" y="2" z="1" type="checkbox"><label></label> </div> <div class="row"> <input x="0" y="1" z="1" type="checkbox"><label></label> <input x="1" y="1" z="1" type="checkbox"><label></label> <input x="2" y="1" z="1" type="checkbox"><label></label> <input x="3" y="1" z="1" type="checkbox"><label></label> </div> <div class="row"> <input x="0" y="0" z="1" type="checkbox"><label></label> <input x="1" y="0" z="1" type="checkbox"><label></label> <input x="2" y="0" z="1" type="checkbox"><label></label> <input x="3" y="0" z="1" type="checkbox"><label></label> </div> </div> <div class="large-3 medium-6 small-12 columns"> <label>Level 3</label> <div class="row"> <input x="0" y="3" z="2" type="checkbox"><label></label> <input x="1" y="3" z="2" type="checkbox"><label></label> <input x="2" y="3" z="2" type="checkbox"><label></label> <input x="3" y="3" z="2" type="checkbox"><label></label> </div> <div class="row"> <input x="0" y="2" z="2" type="checkbox"><label></label> <input x="1" y="2" z="2" type="checkbox"><label></label> <input x="2" y="2" z="2" type="checkbox"><label></label> <input x="3" y="2" z="2" type="checkbox"><label></label> </div> <div class="row"> <input x="0" y="1" z="2" type="checkbox"><label></label> <input x="1" y="1" z="2" type="checkbox"><label></label> <input x="2" y="1" z="2" type="checkbox"><label></label> <input x="3" y="1" z="2" type="checkbox"><label></label> </div> <div class="row"> <input x="0" y="0" z="2" type="checkbox"><label></label> <input x="1" y="0" z="2" type="checkbox"><label></label> <input x="2" y="0" z="2" type="checkbox"><label></label> <input x="3" y="0" z="2" type="checkbox"><label></label> </div> </div> <div class="large-3 medium-6 small-12 columns"> <label>Level 4</label> <div class="row"> <input x="0" y="3" z="3" type="checkbox"><label></label> <input x="1" y="3" z="3" type="checkbox"><label></label> <input x="2" y="3" z="3" type="checkbox"><label></label> <input x="3" y="3" z="3" type="checkbox"><label></label> </div> <div class="row"> <input x="0" y="2" z="3" type="checkbox"><label></label> <input x="1" y="2" z="3" type="checkbox"><label></label> <input x="2" y="2" z="3" type="checkbox"><label></label> <input x="3" y="2" z="3" type="checkbox"><label></label> </div> <div class="row"> <input x="0" y="1" z="3" type="checkbox"><label></label> <input x="1" y="1" z="3" type="checkbox"><label></label> <input x="2" y="1" z="3" type="checkbox"><label></label> <input x="3" y="1" z="3" type="checkbox"><label></label> </div> <div class="row"> <input x="0" y="0" z="3" type="checkbox"><label></label> <input x="1" y="0" z="3" type="checkbox"><label></label> <input x="2" y="0" z="3" type="checkbox"><label></label> <input x="3" y="0" z="3" type="checkbox"><label></label> </div> </div> </div> <div class="row"> <div class="large-8 columns"> <div id="canvas-container" style="height: 500px;"></div> </div> <div class="large-4 columns" id="howto"> <a href="#" id="addFrame" class="button">Add Frame</a> <a href="#" id="generateFile" class="button">Create INO</a> <a href="#" id="allOn" class="button">Select All</a> <a href="#" id="allOff" class="button">Select None</a> <a href="#" data-reveal-id="myModal" class="button">Open Local Storage Settings</a> <a href="#" class="button" id="playAnimation">Play Animation</a> <div id="myModal" class="reveal-modal" data-reveal><h2>Basil.js</h2> <p class="lead">Enter your pin numbers so I can generate your program :). Otherwise you'll get a code with my pinout.</p> <div data-alert class="alert-box alert"> Weird bug right now, click on the label to focus on the textarea. <a href="#" class="close">&times;</a> </div> <label>LEDPin[]<input id="LEDPin" type="text" placeholder="18,2,6,10,19,3,7,11,0,4,8,12,1,5,9,13 "></label> <label>PlanePin[]<input id="PlanePin" type="text" placeholder="14,15,16,17"></label> <label>Filename<input id="filename" type="text" placeholder="animation.ino"></label> <a href="#" id="savePins" class="button">Save Pins</a> <a class="close-reveal-modal"> &#215;</a></div> <h3>How to use this tool</h3><p>Select Led's to be added in each frame, then click Add Frame. Once all frames are added, press the Create INO button</p> </div> </div> <script src="js/vendor/jquery.js"></script> <script src="js/foundation.min.js"></script> <script> $(document).foundation(); </script> <script src="js/basil.js"></script> <script src="js/three.min.js"></script> <script src="js/OrbitControls.js"></script> <script src="js/stats.min.js"></script> <script src="js/vendor/FileSaver.js"></script> <script src="js/app.js"></script> <script src="temp/cube.js"></script> <script src="js/viewer.js"></script> </body> </html>
Michael-Bell/LED-Cube-Animation-Editor
index.html
HTML
gpl-3.0
8,685
from iHunterModel.models import DomainObject, Organization from django.db import models # class for specifying different types of EduOrgs. like school, colleges, universities etc. class EducationalOrganizationType(DomainObject): name = models.CharField(max_length=255, null=False, blank=False) description = models.TextField() def __str__(self): return self.name class EducationalOrganization(Organization): # Relationship. nullable is true. category = models.ForeignKey(EducationalOrganizationType, on_delete=models.CASCADE, blank=True, null=True) def __str__(self): return self.name
kumarsandeep91/Russet.iHunter.Model
iHunterModel/models/EducationalOrganization.py
Python
gpl-3.0
634
using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace SurfaceGaming.Models { public class SettingKeyValue { [DatabaseGenerated(DatabaseGeneratedOption.Identity)] [Key] public Guid Id { get; set; } public string Key { get; set; } public string Value { get; set; } public bool IsRemoved { get; set; } } }
arnvanhoutte/SurfaceGaming
SurfaceGaming/Models/SettingKeyValue.cs
C#
gpl-3.0
433
#define _POSIX_C_SOURCE 200819L #define _XOPEN_SOURCE 700 #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <sys/stat.h> #include <sys/types.h> #include <sys/wait.h> #include <fcntl.h> #include <errno.h> #include <signal.h> #ifdef LINUX #include <sys/prctl.h> #endif /* LINUX */ #include "reboot.h" #include "os/pw.h" #include "os/ctrlaltdel.h" #include "tools.h" #include "respawn.h" #include "config.h" static void sig_term(int signo) { ueld_reboot(UELD_OS_PW_POWER_OFF); } static void sig_hup(int signo) { ueld_reboot(UELD_OS_PW_REBOOT); } static void sig_user1(int signo) { ueld_closeconfig(); char* path = ueld_readconfig("ueld_execfile"); if (!path) path = "/sbin/init"; ueld_print("Trying to reload init '%s'\n", path); if (path) execl(path, "-ueld", NULL); ueld_print("Reload init '%s' failed.\n", path ? path : "Unknown"); } /* this function will be called when press ctrl-alt-del on a vt. */ static void cad_handler() { ueld_run("/etc/ueld/ctrlaltdel.sh", URF_WAIT|URF_CONSOLE, 0, NULL); } static void setevar() { char* path = ueld_readconfig("ueld_path_var"); if (!path) return; int override = ueld_readconfiglong("ueld_override_path_var", 0); if (getenv("PATH") == NULL || override) setenv("PATH", path, 1); } int ueld_main(int argc, char* argv[]) { int status; pid_t pid; if (getpid() != 1) { exit(0); } #ifdef LINUX prctl(PR_SET_NAME, "ueld", 0, 0); #endif /* LINUX */ ueld_unblock_signal(SIGUSR1); setevar(); ueld_signal(SIGTERM, &sig_term, 1); ueld_signal(SIGHUP, &sig_hup, 1); ueld_signal(SIGUSR1, &sig_user1, 1); if (argc > 0 && (strcmp(argv[0], "-ueld") != 0)) { ueld_run("/etc/ueld/sysinit.sh", URF_WAIT, 0, NULL); respawn_init(); ueld_run("/etc/ueld/sysloaded.sh", URF_NOOUTPUT, 0, NULL); } if (ueld_os_handle_ctrl_alt_del(cad_handler) < 0) ueld_print("Warning: Could not handle ctrl-alt-del, %s\n", strerror(errno)); #ifdef LINUX /* * FIXME: Linux Sysrq SAK Problem * My system is linux 3.4.39 * * There is a problem, init daemon start with fd0-2 to /dev/console. * But /dev/console often is as /dev/tty1, so when user press the SAK * keys of Sysrq (Alt-Sysrq-K) in vt1(tty1), if the kernel is configed * to support the function, kernel will send SIGKILL to init daemon, it * will cause kernel panic! * * Location: path-to-linux-src/drivers/tty/tty_io.c (__do_SAK() function) * * My methed is close fd0-2, so SAK won't kill init. But when ueld need * print somethings to system console, ueld must open the '/dev/console' * although we can close it after write(), etc., but it make a window * which is not 'SAK safe'. I can't find a good methed to avoid it. */ close(0); close(1); close(2); int fd; if ((fd = open("/dev/null", O_RDWR)) == 0) { dup2(fd, 1); dup2(fd, 2); } else if (fd > 0) { close(fd); } #endif /* LINUX */ ueld_closeconfig(); while (1) { if ((pid = wait(&status)) > 0) { if (!(WIFEXITED(status)) && !(WIFSIGNALED(status))) continue; #ifndef CONFIG_RESPAWN_NO_IGN_FAIL_PROC if ((WIFEXITED(status)) && (WEXITSTATUS(status) == EXIT_FAILURE)) { clearpid(pid); continue; } #endif /* CONFIG_RESPAWN_NO_IGN_FAIL_PROC */ respawnpid(pid); } } ueld_reboot(UELD_OS_PW_POWER_OFF); exit(0); }
thdaemon/ueld
main.c
C
gpl-3.0
3,305
/* * Copyright (c) 2013, Robert Rueger <rueger@itp.uni-frankfurt.de> * * This file is part of hVMC. * * hVMC 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. * * hVMC 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 hVMC. If not, see <http://www.gnu.org/licenses/>. */ #include "mccresults.hpp" #include <iostream> #include <fstream> #include <boost/archive/text_oarchive.hpp> #include <boost/serialization/vector.hpp> #include "serialization_eigen.hpp" using namespace std; namespace fs = boost::filesystem; namespace ar = boost::archive; void MCCResults::write_to_files( const fs::path& dir ) const { if ( E ) { ofstream E_txtfile( ( dir / "sim_res_E.txt" ).string() ); E_txtfile << E->mean << " " << E->sigma << endl; ofstream E_datfile( ( dir / "sim_res_E.dat" ).string() ); ar::text_oarchive E_archive( E_datfile ); E_archive << E.get(); } if ( Deltak ) { ofstream Dk_txtfile( ( dir / "sim_res_Dk.txt" ).string() ); Dk_txtfile << Deltak->transpose() << endl; ofstream Dk_datfile( ( dir / "sim_res_Dk.dat" ).string() ); ar::text_oarchive Dk_archive( Dk_datfile ); Dk_archive << Deltak.get(); } if ( Deltak_Deltakprime ) { ofstream DkDkp_file( ( dir / "sim_res_DkDkp.txt" ).string() ); DkDkp_file << Deltak_Deltakprime.get() << endl; ofstream DkDkp_datfile( ( dir / "sim_res_DkDkp.dat" ).string() ); ar::text_oarchive DkDkp_archive( DkDkp_datfile ); DkDkp_archive << Deltak_Deltakprime.get(); } if ( Deltak_E ) { ofstream DkE_txtfile( ( dir / "sim_res_DkE.txt" ).string() ); DkE_txtfile << Deltak_E->transpose() << endl; ofstream DkE_datfile( ( dir / "sim_res_DkE.dat" ).string() ); ar::text_oarchive DkE_archive( DkE_datfile ); DkE_archive << Deltak_E.get(); } if ( dblocc ) { ofstream dblocc_txtfile( ( dir / "sim_res_dblocc.txt" ).string() ); dblocc_txtfile << dblocc->mean << " " << dblocc->sigma << endl; ofstream dblocc_datfile( ( dir / "sim_res_dblocc.dat" ).string() ); ar::text_oarchive dblocc_archive( dblocc_datfile ); dblocc_archive << dblocc.get(); } if ( nncorr ) { ofstream nncorr_txtfile( ( dir / "sim_res_nncorr.txt" ).string() ); nncorr_txtfile << nncorr.get() << endl; ofstream nncorr_datfile( ( dir / "sim_res_nncorr.dat" ).string() ); ar::text_oarchive nncorr_archive( nncorr_datfile ); nncorr_archive << nncorr.get(); } if ( sscorr ) { ofstream sscorr_txtfile( ( dir / "sim_res_sscorr.txt" ).string() ); sscorr_txtfile << sscorr.get() << endl; ofstream sscorr_datfile( ( dir / "sim_res_sscorr.dat" ).string() ); ar::text_oarchive sscorr_archive( sscorr_datfile ); sscorr_archive << sscorr.get(); } if ( pconfs ) { ofstream pconfs_txtfile( ( dir / "sim_res_pconfs.txt" ).string() ); for ( auto it = pconfs.get().begin(); it != pconfs.get().end(); ++it ) { pconfs_txtfile << it->transpose() << endl; } ofstream pconfs_datfile( ( dir / "sim_res_pconfs.dat" ).string() ); ar::text_oarchive pconfs_archive( pconfs_datfile ); pconfs_archive << pconfs.get(); } } std::ostream& operator<<( std::ostream& out, const MCCResults& res ) { if ( res.E ) { out << endl << " E = " << res.E->mean << endl << "sigma_E = " << res.E->sigma << endl; } if ( res.Deltak ) { out << endl << "Delta_k = " << endl << res.Deltak->transpose() << endl; } if ( res.Deltak_Deltakprime ) { out << endl << "DkDkp = " << endl << res.Deltak_Deltakprime.get() << endl; } if ( res.Deltak_E ) { out << endl << "Dk_E = " << endl << res.Deltak_E->transpose() << endl; } if ( res.dblocc ) { out << endl << " dblocc = " << res.dblocc->mean << endl << "sigma_dblocc = " << res.dblocc->sigma << endl; } if ( res.nncorr ) { out << endl << "nncorr = " << endl << res.nncorr.get() << endl; } if ( res.sscorr ) { out << endl << "sscorr = " << endl << res.sscorr.get() << endl; } if ( res.pconfs ) { cout << endl << "pconfs = " << endl; for ( auto it = res.pconfs.get().begin(); it != res.pconfs.get().end(); ++it ) { cout << it->transpose() << endl; } } out << endl; return out; }
robertrueger/hVMC
mccresults.cpp
C++
gpl-3.0
4,788
/* * Copyright 2013 Robert Newgard * * This file is part of SyscJson. * * SyscJson 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. * * SyscJson 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 SyscJson. If not, see <http://www.gnu.org/licenses/>. */ #include <langinfo.h> #include <locale.h> #include <stdio.h> #include <stdlib.h> #include <stdarg.h> #include <string.h> #define JL_DBG 0 int lex_start = 1; int lex_ascii = 1; int lex_idx = 0; char * str_accum; char * lex_buffer; void locale_codeset () { char * codeset; setlocale(LC_CTYPE,""); codeset = nl_langinfo(CODESET); if (strcmp(codeset, "UTF-8") == 0) { lex_ascii = 0; } else if (strcmp(codeset, "utf8") == 0) { lex_ascii = 0; } if (JL_DBG) { if (lex_ascii == 0) { fprintf(stderr, "codeset is \"%s\"; using UTF-8 character processing\n", codeset); } else { fprintf(stderr, "codeset is \"%s\"; using lex_ascii character processing\n", codeset); } } } void lexer_init () { if (JL_DBG) { fprintf (stderr, "lexer_init()\n"); } lex_start = 0; } int concat_str (char ** str, const char * cat) { char * newp; char * wp; size_t str_len; size_t cat_len = strlen (cat); if (JL_DBG) { fprintf (stderr, "++ in concat_str(), cat is \"%s\", cat_len is %zd\n", cat, cat_len); } if (*str == NULL) { if (JL_DBG) { fprintf (stderr, "++ in concat_str(), *str is NULL\n"); } str_len = 0; newp = (char *) malloc (cat_len + 1); if (newp == NULL) { if (JL_DBG) { fprintf (stderr, "++ in concat_str(), newp is NULL\n"); } return -1; } } else { if (JL_DBG) { fprintf (stderr, "++ in concat_str(), *str is \"%s\"\n", *str); } str_len = strlen (*str); newp = (char *) realloc (*str, str_len + cat_len + 1); if (newp == NULL) { if (JL_DBG) { fprintf (stderr, "++ in concat_str(), newp is NULL\n"); } free (*str); *str = NULL; return -1; } } if (JL_DBG) { fprintf (stderr, "++ in concat_str(), newp is %p\n", newp); } wp = newp + str_len; wp = mempcpy (wp, cat, cat_len); wp = memset (wp, '\0', 1); for (char * p = newp ; p < newp + 5 ; p++) { if (JL_DBG) { fprintf (stderr, "++ in concat_str(), newp[%p] is 0x%02X or \'%c\'\n", p, *p, *p); } } *str = newp; if (JL_DBG) { fprintf (stderr, "++ in concat_str(), *str is %p\n", *str); } return 0; } int concat_char (char ** str, const char cat) { char cat_str[2]; cat_str[0] = cat; cat_str[1] = '\0'; return concat_str(str, cat_str); } int concat_uni (char ** str, const char * json_utf8) { if (lex_ascii) { return concat_str(str, json_utf8); } else { unsigned code; int ret; ret = sscanf((json_utf8 + 2), "%4x", &code); if (ret == 1) { if (JL_DBG) { fprintf(stderr, "[INF] extracted %04X from unicode hex characters \"%s\"\n", code, json_utf8); } } else { fprintf(stderr, "[ERR] failed to extract unicode hex characters from \"%s\"\n", json_utf8); return -1; } if (code < 0x80ul) { char utf = 0; ret = 0; utf = (0x007Ful & code); ret = ret | concat_char(str, utf); return ret; } else if (code < 0x800ul) { char utf = 0; ret = 0; utf = (0x0C0ul) | ((0x07C0ul & code) >> 6); ret = ret | concat_char(str, utf); utf = 0x80ul | (0x003Ful & code); ret = ret | concat_char(str, utf); return ret; } else if (code < 0x10000ul) { char utf = 0; ret = 0; utf = 0xE0ul | ((0xF000ul & code) >> 12); ret = ret | concat_char(str, utf); utf = 0x80ul | ((0x0FC0ul & code) >> 6); ret = ret | concat_char(str, utf); utf = 0x80ul | (0x003Ful & code); ret = ret | concat_char(str, utf); return ret; } else { return concat_str(str, json_utf8); } } } void posn_accum(const char * s) { lex_idx = lex_idx + strlen(s); } int yyerror(const char * s) { fprintf(stderr, "parser error: \"%s\" at character %d\n", s, lex_idx); fprintf(stderr, "parser error: \'%s\'\n", lex_buffer); fprintf(stderr, "parser error: "); for (int i = 0 ; i < (lex_idx - 1) ; i++) { fprintf(stderr, "."); } fprintf(stderr, "^\n"); return 0; }
bobnewgard/SyscJson
json_lex.h
C
gpl-3.0
5,542
package com.taobao.api.request; import java.util.Map; import com.taobao.api.ApiRuleException; import com.taobao.api.TaobaoRequest; import com.taobao.api.internal.util.TaobaoHashMap; import com.taobao.api.response.TbkShopCouponGetResponse; /** * TOP API: taobao.tbk.shop.coupon.get request * * @author auto create * @since 1.0, 2014-11-02 16:51:12 */ public class TbkShopCouponGetRequest implements TaobaoRequest<TbkShopCouponGetResponse> { private Map<String, String> headerMap = new TaobaoHashMap(); /** * 店铺Id */ private Long shopId; private Long timestamp; private TaobaoHashMap udfParams; // add user-defined text parameters @Override public void check() throws ApiRuleException { } @Override public String getApiMethodName() { return "taobao.tbk.shop.coupon.get"; } @Override public Map<String, String> getHeaderMap() { return headerMap; } @Override public Class<TbkShopCouponGetResponse> getResponseClass() { return TbkShopCouponGetResponse.class; } public Long getShopId() { return this.shopId; } @Override public Map<String, String> getTextParams() { TaobaoHashMap txtParams = new TaobaoHashMap(); txtParams.put("shop_id", this.shopId); if (this.udfParams != null) { txtParams.putAll(this.udfParams); } return txtParams; } @Override public Long getTimestamp() { return this.timestamp; } @Override public void putOtherTextParam(String key, String value) { if (this.udfParams == null) { this.udfParams = new TaobaoHashMap(); } this.udfParams.put(key, value); } public void setShopId(Long shopId) { this.shopId = shopId; } @Override public void setTimestamp(Long timestamp) { this.timestamp = timestamp; } }
kuiwang/my-dev
src/main/java/com/taobao/api/request/TbkShopCouponGetRequest.java
Java
gpl-3.0
1,926
#include "RNGMarsaglia.h" namespace Kernal { RNGMarsaglia::RNGMarsaglia() { SeedTime(); } RNGMarsaglia::RNGMarsaglia(const RNGMarsaglia& other) { stateZ = other.stateZ; stateW = other.stateW; } RNGMarsaglia& RNGMarsaglia::operator=(const RNGMarsaglia& rhs) { stateZ = rhs.stateZ; stateW = rhs.stateW; return *this; } Kernal::uint32 RNGMarsaglia::Rand() { stateZ = 36969 * (stateZ & 65535) + (stateZ >> 16); stateW = 18000 * (stateW & 65535) + (stateW >> 16); return (stateZ << 16) + stateW; } void RNGMarsaglia::Seed(Kernal::uint32 seed) { stateZ = seed >> 16; stateW = seed & UINT16_MAX; // % TWO_TO_32 } } //namespace Kernal
virac/Slicer
src/Kernal/RNGMarsaglia.cpp
C++
gpl-3.0
676
// Compiled by ClojureScript 1.9.293 {:static-fns true, :optimize-constants true} goog.provide('thi.ng.dstruct.streams'); goog.require('cljs.core'); goog.require('thi.ng.xerror.core'); /** * @interface */ thi.ng.dstruct.streams.IInputStream = function(){}; thi.ng.dstruct.streams.read_utf8_line = (function thi$ng$dstruct$streams$read_utf8_line(_){ if((!((_ == null))) && (!((_.thi$ng$dstruct$streams$IInputStream$read_utf8_line$arity$1 == null)))){ return _.thi$ng$dstruct$streams$IInputStream$read_utf8_line$arity$1(_); } else { var x__8102__auto__ = (((_ == null))?null:_); var m__8103__auto__ = (thi.ng.dstruct.streams.read_utf8_line[goog.typeOf(x__8102__auto__)]); if(!((m__8103__auto__ == null))){ return (m__8103__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8103__auto__.cljs$core$IFn$_invoke$arity$1(_) : m__8103__auto__.call(null,_)); } else { var m__8103__auto____$1 = (thi.ng.dstruct.streams.read_utf8_line["_"]); if(!((m__8103__auto____$1 == null))){ return (m__8103__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8103__auto____$1.cljs$core$IFn$_invoke$arity$1(_) : m__8103__auto____$1.call(null,_)); } else { throw cljs.core.missing_protocol("IInputStream.read-utf8-line",_); } } } }); thi.ng.dstruct.streams.read_uint8 = (function thi$ng$dstruct$streams$read_uint8(_){ if((!((_ == null))) && (!((_.thi$ng$dstruct$streams$IInputStream$read_uint8$arity$1 == null)))){ return _.thi$ng$dstruct$streams$IInputStream$read_uint8$arity$1(_); } else { var x__8102__auto__ = (((_ == null))?null:_); var m__8103__auto__ = (thi.ng.dstruct.streams.read_uint8[goog.typeOf(x__8102__auto__)]); if(!((m__8103__auto__ == null))){ return (m__8103__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8103__auto__.cljs$core$IFn$_invoke$arity$1(_) : m__8103__auto__.call(null,_)); } else { var m__8103__auto____$1 = (thi.ng.dstruct.streams.read_uint8["_"]); if(!((m__8103__auto____$1 == null))){ return (m__8103__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8103__auto____$1.cljs$core$IFn$_invoke$arity$1(_) : m__8103__auto____$1.call(null,_)); } else { throw cljs.core.missing_protocol("IInputStream.read-uint8",_); } } } }); thi.ng.dstruct.streams.read_uint16_le = (function thi$ng$dstruct$streams$read_uint16_le(_){ if((!((_ == null))) && (!((_.thi$ng$dstruct$streams$IInputStream$read_uint16_le$arity$1 == null)))){ return _.thi$ng$dstruct$streams$IInputStream$read_uint16_le$arity$1(_); } else { var x__8102__auto__ = (((_ == null))?null:_); var m__8103__auto__ = (thi.ng.dstruct.streams.read_uint16_le[goog.typeOf(x__8102__auto__)]); if(!((m__8103__auto__ == null))){ return (m__8103__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8103__auto__.cljs$core$IFn$_invoke$arity$1(_) : m__8103__auto__.call(null,_)); } else { var m__8103__auto____$1 = (thi.ng.dstruct.streams.read_uint16_le["_"]); if(!((m__8103__auto____$1 == null))){ return (m__8103__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8103__auto____$1.cljs$core$IFn$_invoke$arity$1(_) : m__8103__auto____$1.call(null,_)); } else { throw cljs.core.missing_protocol("IInputStream.read-uint16-le",_); } } } }); thi.ng.dstruct.streams.read_uint16_be = (function thi$ng$dstruct$streams$read_uint16_be(_){ if((!((_ == null))) && (!((_.thi$ng$dstruct$streams$IInputStream$read_uint16_be$arity$1 == null)))){ return _.thi$ng$dstruct$streams$IInputStream$read_uint16_be$arity$1(_); } else { var x__8102__auto__ = (((_ == null))?null:_); var m__8103__auto__ = (thi.ng.dstruct.streams.read_uint16_be[goog.typeOf(x__8102__auto__)]); if(!((m__8103__auto__ == null))){ return (m__8103__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8103__auto__.cljs$core$IFn$_invoke$arity$1(_) : m__8103__auto__.call(null,_)); } else { var m__8103__auto____$1 = (thi.ng.dstruct.streams.read_uint16_be["_"]); if(!((m__8103__auto____$1 == null))){ return (m__8103__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8103__auto____$1.cljs$core$IFn$_invoke$arity$1(_) : m__8103__auto____$1.call(null,_)); } else { throw cljs.core.missing_protocol("IInputStream.read-uint16-be",_); } } } }); thi.ng.dstruct.streams.read_uint32_le = (function thi$ng$dstruct$streams$read_uint32_le(_){ if((!((_ == null))) && (!((_.thi$ng$dstruct$streams$IInputStream$read_uint32_le$arity$1 == null)))){ return _.thi$ng$dstruct$streams$IInputStream$read_uint32_le$arity$1(_); } else { var x__8102__auto__ = (((_ == null))?null:_); var m__8103__auto__ = (thi.ng.dstruct.streams.read_uint32_le[goog.typeOf(x__8102__auto__)]); if(!((m__8103__auto__ == null))){ return (m__8103__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8103__auto__.cljs$core$IFn$_invoke$arity$1(_) : m__8103__auto__.call(null,_)); } else { var m__8103__auto____$1 = (thi.ng.dstruct.streams.read_uint32_le["_"]); if(!((m__8103__auto____$1 == null))){ return (m__8103__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8103__auto____$1.cljs$core$IFn$_invoke$arity$1(_) : m__8103__auto____$1.call(null,_)); } else { throw cljs.core.missing_protocol("IInputStream.read-uint32-le",_); } } } }); thi.ng.dstruct.streams.read_uint32_be = (function thi$ng$dstruct$streams$read_uint32_be(_){ if((!((_ == null))) && (!((_.thi$ng$dstruct$streams$IInputStream$read_uint32_be$arity$1 == null)))){ return _.thi$ng$dstruct$streams$IInputStream$read_uint32_be$arity$1(_); } else { var x__8102__auto__ = (((_ == null))?null:_); var m__8103__auto__ = (thi.ng.dstruct.streams.read_uint32_be[goog.typeOf(x__8102__auto__)]); if(!((m__8103__auto__ == null))){ return (m__8103__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8103__auto__.cljs$core$IFn$_invoke$arity$1(_) : m__8103__auto__.call(null,_)); } else { var m__8103__auto____$1 = (thi.ng.dstruct.streams.read_uint32_be["_"]); if(!((m__8103__auto____$1 == null))){ return (m__8103__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8103__auto____$1.cljs$core$IFn$_invoke$arity$1(_) : m__8103__auto____$1.call(null,_)); } else { throw cljs.core.missing_protocol("IInputStream.read-uint32-be",_); } } } }); thi.ng.dstruct.streams.read_float_le = (function thi$ng$dstruct$streams$read_float_le(_){ if((!((_ == null))) && (!((_.thi$ng$dstruct$streams$IInputStream$read_float_le$arity$1 == null)))){ return _.thi$ng$dstruct$streams$IInputStream$read_float_le$arity$1(_); } else { var x__8102__auto__ = (((_ == null))?null:_); var m__8103__auto__ = (thi.ng.dstruct.streams.read_float_le[goog.typeOf(x__8102__auto__)]); if(!((m__8103__auto__ == null))){ return (m__8103__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8103__auto__.cljs$core$IFn$_invoke$arity$1(_) : m__8103__auto__.call(null,_)); } else { var m__8103__auto____$1 = (thi.ng.dstruct.streams.read_float_le["_"]); if(!((m__8103__auto____$1 == null))){ return (m__8103__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8103__auto____$1.cljs$core$IFn$_invoke$arity$1(_) : m__8103__auto____$1.call(null,_)); } else { throw cljs.core.missing_protocol("IInputStream.read-float-le",_); } } } }); thi.ng.dstruct.streams.read_float_be = (function thi$ng$dstruct$streams$read_float_be(_){ if((!((_ == null))) && (!((_.thi$ng$dstruct$streams$IInputStream$read_float_be$arity$1 == null)))){ return _.thi$ng$dstruct$streams$IInputStream$read_float_be$arity$1(_); } else { var x__8102__auto__ = (((_ == null))?null:_); var m__8103__auto__ = (thi.ng.dstruct.streams.read_float_be[goog.typeOf(x__8102__auto__)]); if(!((m__8103__auto__ == null))){ return (m__8103__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8103__auto__.cljs$core$IFn$_invoke$arity$1(_) : m__8103__auto__.call(null,_)); } else { var m__8103__auto____$1 = (thi.ng.dstruct.streams.read_float_be["_"]); if(!((m__8103__auto____$1 == null))){ return (m__8103__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8103__auto____$1.cljs$core$IFn$_invoke$arity$1(_) : m__8103__auto____$1.call(null,_)); } else { throw cljs.core.missing_protocol("IInputStream.read-float-be",_); } } } }); thi.ng.dstruct.streams.read_double_le = (function thi$ng$dstruct$streams$read_double_le(_){ if((!((_ == null))) && (!((_.thi$ng$dstruct$streams$IInputStream$read_double_le$arity$1 == null)))){ return _.thi$ng$dstruct$streams$IInputStream$read_double_le$arity$1(_); } else { var x__8102__auto__ = (((_ == null))?null:_); var m__8103__auto__ = (thi.ng.dstruct.streams.read_double_le[goog.typeOf(x__8102__auto__)]); if(!((m__8103__auto__ == null))){ return (m__8103__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8103__auto__.cljs$core$IFn$_invoke$arity$1(_) : m__8103__auto__.call(null,_)); } else { var m__8103__auto____$1 = (thi.ng.dstruct.streams.read_double_le["_"]); if(!((m__8103__auto____$1 == null))){ return (m__8103__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8103__auto____$1.cljs$core$IFn$_invoke$arity$1(_) : m__8103__auto____$1.call(null,_)); } else { throw cljs.core.missing_protocol("IInputStream.read-double-le",_); } } } }); thi.ng.dstruct.streams.read_double_be = (function thi$ng$dstruct$streams$read_double_be(_){ if((!((_ == null))) && (!((_.thi$ng$dstruct$streams$IInputStream$read_double_be$arity$1 == null)))){ return _.thi$ng$dstruct$streams$IInputStream$read_double_be$arity$1(_); } else { var x__8102__auto__ = (((_ == null))?null:_); var m__8103__auto__ = (thi.ng.dstruct.streams.read_double_be[goog.typeOf(x__8102__auto__)]); if(!((m__8103__auto__ == null))){ return (m__8103__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8103__auto__.cljs$core$IFn$_invoke$arity$1(_) : m__8103__auto__.call(null,_)); } else { var m__8103__auto____$1 = (thi.ng.dstruct.streams.read_double_be["_"]); if(!((m__8103__auto____$1 == null))){ return (m__8103__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8103__auto____$1.cljs$core$IFn$_invoke$arity$1(_) : m__8103__auto____$1.call(null,_)); } else { throw cljs.core.missing_protocol("IInputStream.read-double-be",_); } } } }); thi.ng.dstruct.streams.read_vec2f_le = (function thi$ng$dstruct$streams$read_vec2f_le(_){ if((!((_ == null))) && (!((_.thi$ng$dstruct$streams$IInputStream$read_vec2f_le$arity$1 == null)))){ return _.thi$ng$dstruct$streams$IInputStream$read_vec2f_le$arity$1(_); } else { var x__8102__auto__ = (((_ == null))?null:_); var m__8103__auto__ = (thi.ng.dstruct.streams.read_vec2f_le[goog.typeOf(x__8102__auto__)]); if(!((m__8103__auto__ == null))){ return (m__8103__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8103__auto__.cljs$core$IFn$_invoke$arity$1(_) : m__8103__auto__.call(null,_)); } else { var m__8103__auto____$1 = (thi.ng.dstruct.streams.read_vec2f_le["_"]); if(!((m__8103__auto____$1 == null))){ return (m__8103__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8103__auto____$1.cljs$core$IFn$_invoke$arity$1(_) : m__8103__auto____$1.call(null,_)); } else { throw cljs.core.missing_protocol("IInputStream.read-vec2f-le",_); } } } }); thi.ng.dstruct.streams.read_vec2f_be = (function thi$ng$dstruct$streams$read_vec2f_be(_){ if((!((_ == null))) && (!((_.thi$ng$dstruct$streams$IInputStream$read_vec2f_be$arity$1 == null)))){ return _.thi$ng$dstruct$streams$IInputStream$read_vec2f_be$arity$1(_); } else { var x__8102__auto__ = (((_ == null))?null:_); var m__8103__auto__ = (thi.ng.dstruct.streams.read_vec2f_be[goog.typeOf(x__8102__auto__)]); if(!((m__8103__auto__ == null))){ return (m__8103__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8103__auto__.cljs$core$IFn$_invoke$arity$1(_) : m__8103__auto__.call(null,_)); } else { var m__8103__auto____$1 = (thi.ng.dstruct.streams.read_vec2f_be["_"]); if(!((m__8103__auto____$1 == null))){ return (m__8103__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8103__auto____$1.cljs$core$IFn$_invoke$arity$1(_) : m__8103__auto____$1.call(null,_)); } else { throw cljs.core.missing_protocol("IInputStream.read-vec2f-be",_); } } } }); thi.ng.dstruct.streams.read_vec3f_le = (function thi$ng$dstruct$streams$read_vec3f_le(_){ if((!((_ == null))) && (!((_.thi$ng$dstruct$streams$IInputStream$read_vec3f_le$arity$1 == null)))){ return _.thi$ng$dstruct$streams$IInputStream$read_vec3f_le$arity$1(_); } else { var x__8102__auto__ = (((_ == null))?null:_); var m__8103__auto__ = (thi.ng.dstruct.streams.read_vec3f_le[goog.typeOf(x__8102__auto__)]); if(!((m__8103__auto__ == null))){ return (m__8103__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8103__auto__.cljs$core$IFn$_invoke$arity$1(_) : m__8103__auto__.call(null,_)); } else { var m__8103__auto____$1 = (thi.ng.dstruct.streams.read_vec3f_le["_"]); if(!((m__8103__auto____$1 == null))){ return (m__8103__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8103__auto____$1.cljs$core$IFn$_invoke$arity$1(_) : m__8103__auto____$1.call(null,_)); } else { throw cljs.core.missing_protocol("IInputStream.read-vec3f-le",_); } } } }); thi.ng.dstruct.streams.read_vec3f_be = (function thi$ng$dstruct$streams$read_vec3f_be(_){ if((!((_ == null))) && (!((_.thi$ng$dstruct$streams$IInputStream$read_vec3f_be$arity$1 == null)))){ return _.thi$ng$dstruct$streams$IInputStream$read_vec3f_be$arity$1(_); } else { var x__8102__auto__ = (((_ == null))?null:_); var m__8103__auto__ = (thi.ng.dstruct.streams.read_vec3f_be[goog.typeOf(x__8102__auto__)]); if(!((m__8103__auto__ == null))){ return (m__8103__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8103__auto__.cljs$core$IFn$_invoke$arity$1(_) : m__8103__auto__.call(null,_)); } else { var m__8103__auto____$1 = (thi.ng.dstruct.streams.read_vec3f_be["_"]); if(!((m__8103__auto____$1 == null))){ return (m__8103__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8103__auto____$1.cljs$core$IFn$_invoke$arity$1(_) : m__8103__auto____$1.call(null,_)); } else { throw cljs.core.missing_protocol("IInputStream.read-vec3f-be",_); } } } }); /** * @interface */ thi.ng.dstruct.streams.IOutputStream = function(){}; thi.ng.dstruct.streams.write_utf8_bytes = (function thi$ng$dstruct$streams$write_utf8_bytes(_,str){ if((!((_ == null))) && (!((_.thi$ng$dstruct$streams$IOutputStream$write_utf8_bytes$arity$2 == null)))){ return _.thi$ng$dstruct$streams$IOutputStream$write_utf8_bytes$arity$2(_,str); } else { var x__8102__auto__ = (((_ == null))?null:_); var m__8103__auto__ = (thi.ng.dstruct.streams.write_utf8_bytes[goog.typeOf(x__8102__auto__)]); if(!((m__8103__auto__ == null))){ return (m__8103__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8103__auto__.cljs$core$IFn$_invoke$arity$2(_,str) : m__8103__auto__.call(null,_,str)); } else { var m__8103__auto____$1 = (thi.ng.dstruct.streams.write_utf8_bytes["_"]); if(!((m__8103__auto____$1 == null))){ return (m__8103__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8103__auto____$1.cljs$core$IFn$_invoke$arity$2(_,str) : m__8103__auto____$1.call(null,_,str)); } else { throw cljs.core.missing_protocol("IOutputStream.write-utf8-bytes",_); } } } }); thi.ng.dstruct.streams.write_uint8 = (function thi$ng$dstruct$streams$write_uint8(_,x){ if((!((_ == null))) && (!((_.thi$ng$dstruct$streams$IOutputStream$write_uint8$arity$2 == null)))){ return _.thi$ng$dstruct$streams$IOutputStream$write_uint8$arity$2(_,x); } else { var x__8102__auto__ = (((_ == null))?null:_); var m__8103__auto__ = (thi.ng.dstruct.streams.write_uint8[goog.typeOf(x__8102__auto__)]); if(!((m__8103__auto__ == null))){ return (m__8103__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8103__auto__.cljs$core$IFn$_invoke$arity$2(_,x) : m__8103__auto__.call(null,_,x)); } else { var m__8103__auto____$1 = (thi.ng.dstruct.streams.write_uint8["_"]); if(!((m__8103__auto____$1 == null))){ return (m__8103__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8103__auto____$1.cljs$core$IFn$_invoke$arity$2(_,x) : m__8103__auto____$1.call(null,_,x)); } else { throw cljs.core.missing_protocol("IOutputStream.write-uint8",_); } } } }); thi.ng.dstruct.streams.write_uint16_le = (function thi$ng$dstruct$streams$write_uint16_le(_,x){ if((!((_ == null))) && (!((_.thi$ng$dstruct$streams$IOutputStream$write_uint16_le$arity$2 == null)))){ return _.thi$ng$dstruct$streams$IOutputStream$write_uint16_le$arity$2(_,x); } else { var x__8102__auto__ = (((_ == null))?null:_); var m__8103__auto__ = (thi.ng.dstruct.streams.write_uint16_le[goog.typeOf(x__8102__auto__)]); if(!((m__8103__auto__ == null))){ return (m__8103__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8103__auto__.cljs$core$IFn$_invoke$arity$2(_,x) : m__8103__auto__.call(null,_,x)); } else { var m__8103__auto____$1 = (thi.ng.dstruct.streams.write_uint16_le["_"]); if(!((m__8103__auto____$1 == null))){ return (m__8103__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8103__auto____$1.cljs$core$IFn$_invoke$arity$2(_,x) : m__8103__auto____$1.call(null,_,x)); } else { throw cljs.core.missing_protocol("IOutputStream.write-uint16-le",_); } } } }); thi.ng.dstruct.streams.write_uint16_be = (function thi$ng$dstruct$streams$write_uint16_be(_,x){ if((!((_ == null))) && (!((_.thi$ng$dstruct$streams$IOutputStream$write_uint16_be$arity$2 == null)))){ return _.thi$ng$dstruct$streams$IOutputStream$write_uint16_be$arity$2(_,x); } else { var x__8102__auto__ = (((_ == null))?null:_); var m__8103__auto__ = (thi.ng.dstruct.streams.write_uint16_be[goog.typeOf(x__8102__auto__)]); if(!((m__8103__auto__ == null))){ return (m__8103__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8103__auto__.cljs$core$IFn$_invoke$arity$2(_,x) : m__8103__auto__.call(null,_,x)); } else { var m__8103__auto____$1 = (thi.ng.dstruct.streams.write_uint16_be["_"]); if(!((m__8103__auto____$1 == null))){ return (m__8103__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8103__auto____$1.cljs$core$IFn$_invoke$arity$2(_,x) : m__8103__auto____$1.call(null,_,x)); } else { throw cljs.core.missing_protocol("IOutputStream.write-uint16-be",_); } } } }); thi.ng.dstruct.streams.write_uint32_le = (function thi$ng$dstruct$streams$write_uint32_le(_,x){ if((!((_ == null))) && (!((_.thi$ng$dstruct$streams$IOutputStream$write_uint32_le$arity$2 == null)))){ return _.thi$ng$dstruct$streams$IOutputStream$write_uint32_le$arity$2(_,x); } else { var x__8102__auto__ = (((_ == null))?null:_); var m__8103__auto__ = (thi.ng.dstruct.streams.write_uint32_le[goog.typeOf(x__8102__auto__)]); if(!((m__8103__auto__ == null))){ return (m__8103__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8103__auto__.cljs$core$IFn$_invoke$arity$2(_,x) : m__8103__auto__.call(null,_,x)); } else { var m__8103__auto____$1 = (thi.ng.dstruct.streams.write_uint32_le["_"]); if(!((m__8103__auto____$1 == null))){ return (m__8103__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8103__auto____$1.cljs$core$IFn$_invoke$arity$2(_,x) : m__8103__auto____$1.call(null,_,x)); } else { throw cljs.core.missing_protocol("IOutputStream.write-uint32-le",_); } } } }); thi.ng.dstruct.streams.write_uint32_be = (function thi$ng$dstruct$streams$write_uint32_be(_,x){ if((!((_ == null))) && (!((_.thi$ng$dstruct$streams$IOutputStream$write_uint32_be$arity$2 == null)))){ return _.thi$ng$dstruct$streams$IOutputStream$write_uint32_be$arity$2(_,x); } else { var x__8102__auto__ = (((_ == null))?null:_); var m__8103__auto__ = (thi.ng.dstruct.streams.write_uint32_be[goog.typeOf(x__8102__auto__)]); if(!((m__8103__auto__ == null))){ return (m__8103__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8103__auto__.cljs$core$IFn$_invoke$arity$2(_,x) : m__8103__auto__.call(null,_,x)); } else { var m__8103__auto____$1 = (thi.ng.dstruct.streams.write_uint32_be["_"]); if(!((m__8103__auto____$1 == null))){ return (m__8103__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8103__auto____$1.cljs$core$IFn$_invoke$arity$2(_,x) : m__8103__auto____$1.call(null,_,x)); } else { throw cljs.core.missing_protocol("IOutputStream.write-uint32-be",_); } } } }); thi.ng.dstruct.streams.write_float_le = (function thi$ng$dstruct$streams$write_float_le(_,x){ if((!((_ == null))) && (!((_.thi$ng$dstruct$streams$IOutputStream$write_float_le$arity$2 == null)))){ return _.thi$ng$dstruct$streams$IOutputStream$write_float_le$arity$2(_,x); } else { var x__8102__auto__ = (((_ == null))?null:_); var m__8103__auto__ = (thi.ng.dstruct.streams.write_float_le[goog.typeOf(x__8102__auto__)]); if(!((m__8103__auto__ == null))){ return (m__8103__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8103__auto__.cljs$core$IFn$_invoke$arity$2(_,x) : m__8103__auto__.call(null,_,x)); } else { var m__8103__auto____$1 = (thi.ng.dstruct.streams.write_float_le["_"]); if(!((m__8103__auto____$1 == null))){ return (m__8103__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8103__auto____$1.cljs$core$IFn$_invoke$arity$2(_,x) : m__8103__auto____$1.call(null,_,x)); } else { throw cljs.core.missing_protocol("IOutputStream.write-float-le",_); } } } }); thi.ng.dstruct.streams.write_float_be = (function thi$ng$dstruct$streams$write_float_be(_,x){ if((!((_ == null))) && (!((_.thi$ng$dstruct$streams$IOutputStream$write_float_be$arity$2 == null)))){ return _.thi$ng$dstruct$streams$IOutputStream$write_float_be$arity$2(_,x); } else { var x__8102__auto__ = (((_ == null))?null:_); var m__8103__auto__ = (thi.ng.dstruct.streams.write_float_be[goog.typeOf(x__8102__auto__)]); if(!((m__8103__auto__ == null))){ return (m__8103__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8103__auto__.cljs$core$IFn$_invoke$arity$2(_,x) : m__8103__auto__.call(null,_,x)); } else { var m__8103__auto____$1 = (thi.ng.dstruct.streams.write_float_be["_"]); if(!((m__8103__auto____$1 == null))){ return (m__8103__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8103__auto____$1.cljs$core$IFn$_invoke$arity$2(_,x) : m__8103__auto____$1.call(null,_,x)); } else { throw cljs.core.missing_protocol("IOutputStream.write-float-be",_); } } } }); thi.ng.dstruct.streams.write_double_le = (function thi$ng$dstruct$streams$write_double_le(_,x){ if((!((_ == null))) && (!((_.thi$ng$dstruct$streams$IOutputStream$write_double_le$arity$2 == null)))){ return _.thi$ng$dstruct$streams$IOutputStream$write_double_le$arity$2(_,x); } else { var x__8102__auto__ = (((_ == null))?null:_); var m__8103__auto__ = (thi.ng.dstruct.streams.write_double_le[goog.typeOf(x__8102__auto__)]); if(!((m__8103__auto__ == null))){ return (m__8103__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8103__auto__.cljs$core$IFn$_invoke$arity$2(_,x) : m__8103__auto__.call(null,_,x)); } else { var m__8103__auto____$1 = (thi.ng.dstruct.streams.write_double_le["_"]); if(!((m__8103__auto____$1 == null))){ return (m__8103__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8103__auto____$1.cljs$core$IFn$_invoke$arity$2(_,x) : m__8103__auto____$1.call(null,_,x)); } else { throw cljs.core.missing_protocol("IOutputStream.write-double-le",_); } } } }); thi.ng.dstruct.streams.write_double_be = (function thi$ng$dstruct$streams$write_double_be(_,x){ if((!((_ == null))) && (!((_.thi$ng$dstruct$streams$IOutputStream$write_double_be$arity$2 == null)))){ return _.thi$ng$dstruct$streams$IOutputStream$write_double_be$arity$2(_,x); } else { var x__8102__auto__ = (((_ == null))?null:_); var m__8103__auto__ = (thi.ng.dstruct.streams.write_double_be[goog.typeOf(x__8102__auto__)]); if(!((m__8103__auto__ == null))){ return (m__8103__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8103__auto__.cljs$core$IFn$_invoke$arity$2(_,x) : m__8103__auto__.call(null,_,x)); } else { var m__8103__auto____$1 = (thi.ng.dstruct.streams.write_double_be["_"]); if(!((m__8103__auto____$1 == null))){ return (m__8103__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8103__auto____$1.cljs$core$IFn$_invoke$arity$2(_,x) : m__8103__auto____$1.call(null,_,x)); } else { throw cljs.core.missing_protocol("IOutputStream.write-double-be",_); } } } }); thi.ng.dstruct.streams.write_vec2f_le = (function thi$ng$dstruct$streams$write_vec2f_le(_,v){ if((!((_ == null))) && (!((_.thi$ng$dstruct$streams$IOutputStream$write_vec2f_le$arity$2 == null)))){ return _.thi$ng$dstruct$streams$IOutputStream$write_vec2f_le$arity$2(_,v); } else { var x__8102__auto__ = (((_ == null))?null:_); var m__8103__auto__ = (thi.ng.dstruct.streams.write_vec2f_le[goog.typeOf(x__8102__auto__)]); if(!((m__8103__auto__ == null))){ return (m__8103__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8103__auto__.cljs$core$IFn$_invoke$arity$2(_,v) : m__8103__auto__.call(null,_,v)); } else { var m__8103__auto____$1 = (thi.ng.dstruct.streams.write_vec2f_le["_"]); if(!((m__8103__auto____$1 == null))){ return (m__8103__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8103__auto____$1.cljs$core$IFn$_invoke$arity$2(_,v) : m__8103__auto____$1.call(null,_,v)); } else { throw cljs.core.missing_protocol("IOutputStream.write-vec2f-le",_); } } } }); thi.ng.dstruct.streams.write_vec2f_be = (function thi$ng$dstruct$streams$write_vec2f_be(_,v){ if((!((_ == null))) && (!((_.thi$ng$dstruct$streams$IOutputStream$write_vec2f_be$arity$2 == null)))){ return _.thi$ng$dstruct$streams$IOutputStream$write_vec2f_be$arity$2(_,v); } else { var x__8102__auto__ = (((_ == null))?null:_); var m__8103__auto__ = (thi.ng.dstruct.streams.write_vec2f_be[goog.typeOf(x__8102__auto__)]); if(!((m__8103__auto__ == null))){ return (m__8103__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8103__auto__.cljs$core$IFn$_invoke$arity$2(_,v) : m__8103__auto__.call(null,_,v)); } else { var m__8103__auto____$1 = (thi.ng.dstruct.streams.write_vec2f_be["_"]); if(!((m__8103__auto____$1 == null))){ return (m__8103__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8103__auto____$1.cljs$core$IFn$_invoke$arity$2(_,v) : m__8103__auto____$1.call(null,_,v)); } else { throw cljs.core.missing_protocol("IOutputStream.write-vec2f-be",_); } } } }); thi.ng.dstruct.streams.write_vec3f_le = (function thi$ng$dstruct$streams$write_vec3f_le(_,v){ if((!((_ == null))) && (!((_.thi$ng$dstruct$streams$IOutputStream$write_vec3f_le$arity$2 == null)))){ return _.thi$ng$dstruct$streams$IOutputStream$write_vec3f_le$arity$2(_,v); } else { var x__8102__auto__ = (((_ == null))?null:_); var m__8103__auto__ = (thi.ng.dstruct.streams.write_vec3f_le[goog.typeOf(x__8102__auto__)]); if(!((m__8103__auto__ == null))){ return (m__8103__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8103__auto__.cljs$core$IFn$_invoke$arity$2(_,v) : m__8103__auto__.call(null,_,v)); } else { var m__8103__auto____$1 = (thi.ng.dstruct.streams.write_vec3f_le["_"]); if(!((m__8103__auto____$1 == null))){ return (m__8103__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8103__auto____$1.cljs$core$IFn$_invoke$arity$2(_,v) : m__8103__auto____$1.call(null,_,v)); } else { throw cljs.core.missing_protocol("IOutputStream.write-vec3f-le",_); } } } }); thi.ng.dstruct.streams.write_vec3f_be = (function thi$ng$dstruct$streams$write_vec3f_be(_,v){ if((!((_ == null))) && (!((_.thi$ng$dstruct$streams$IOutputStream$write_vec3f_be$arity$2 == null)))){ return _.thi$ng$dstruct$streams$IOutputStream$write_vec3f_be$arity$2(_,v); } else { var x__8102__auto__ = (((_ == null))?null:_); var m__8103__auto__ = (thi.ng.dstruct.streams.write_vec3f_be[goog.typeOf(x__8102__auto__)]); if(!((m__8103__auto__ == null))){ return (m__8103__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8103__auto__.cljs$core$IFn$_invoke$arity$2(_,v) : m__8103__auto__.call(null,_,v)); } else { var m__8103__auto____$1 = (thi.ng.dstruct.streams.write_vec3f_be["_"]); if(!((m__8103__auto____$1 == null))){ return (m__8103__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8103__auto____$1.cljs$core$IFn$_invoke$arity$2(_,v) : m__8103__auto____$1.call(null,_,v)); } else { throw cljs.core.missing_protocol("IOutputStream.write-vec3f-be",_); } } } }); /** * @interface */ thi.ng.dstruct.streams.IStreamPosition = function(){}; thi.ng.dstruct.streams.skip = (function thi$ng$dstruct$streams$skip(_,x){ if((!((_ == null))) && (!((_.thi$ng$dstruct$streams$IStreamPosition$skip$arity$2 == null)))){ return _.thi$ng$dstruct$streams$IStreamPosition$skip$arity$2(_,x); } else { var x__8102__auto__ = (((_ == null))?null:_); var m__8103__auto__ = (thi.ng.dstruct.streams.skip[goog.typeOf(x__8102__auto__)]); if(!((m__8103__auto__ == null))){ return (m__8103__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8103__auto__.cljs$core$IFn$_invoke$arity$2(_,x) : m__8103__auto__.call(null,_,x)); } else { var m__8103__auto____$1 = (thi.ng.dstruct.streams.skip["_"]); if(!((m__8103__auto____$1 == null))){ return (m__8103__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8103__auto____$1.cljs$core$IFn$_invoke$arity$2(_,x) : m__8103__auto____$1.call(null,_,x)); } else { throw cljs.core.missing_protocol("IStreamPosition.skip",_); } } } }); thi.ng.dstruct.streams.get_position = (function thi$ng$dstruct$streams$get_position(_){ if((!((_ == null))) && (!((_.thi$ng$dstruct$streams$IStreamPosition$get_position$arity$1 == null)))){ return _.thi$ng$dstruct$streams$IStreamPosition$get_position$arity$1(_); } else { var x__8102__auto__ = (((_ == null))?null:_); var m__8103__auto__ = (thi.ng.dstruct.streams.get_position[goog.typeOf(x__8102__auto__)]); if(!((m__8103__auto__ == null))){ return (m__8103__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8103__auto__.cljs$core$IFn$_invoke$arity$1(_) : m__8103__auto__.call(null,_)); } else { var m__8103__auto____$1 = (thi.ng.dstruct.streams.get_position["_"]); if(!((m__8103__auto____$1 == null))){ return (m__8103__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8103__auto____$1.cljs$core$IFn$_invoke$arity$1(_) : m__8103__auto____$1.call(null,_)); } else { throw cljs.core.missing_protocol("IStreamPosition.get-position",_); } } } }); /** * @interface */ thi.ng.dstruct.streams.IBuffer = function(){}; thi.ng.dstruct.streams.get_byte_buffer = (function thi$ng$dstruct$streams$get_byte_buffer(_){ if((!((_ == null))) && (!((_.thi$ng$dstruct$streams$IBuffer$get_byte_buffer$arity$1 == null)))){ return _.thi$ng$dstruct$streams$IBuffer$get_byte_buffer$arity$1(_); } else { var x__8102__auto__ = (((_ == null))?null:_); var m__8103__auto__ = (thi.ng.dstruct.streams.get_byte_buffer[goog.typeOf(x__8102__auto__)]); if(!((m__8103__auto__ == null))){ return (m__8103__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8103__auto__.cljs$core$IFn$_invoke$arity$1(_) : m__8103__auto__.call(null,_)); } else { var m__8103__auto____$1 = (thi.ng.dstruct.streams.get_byte_buffer["_"]); if(!((m__8103__auto____$1 == null))){ return (m__8103__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8103__auto____$1.cljs$core$IFn$_invoke$arity$1(_) : m__8103__auto____$1.call(null,_)); } else { throw cljs.core.missing_protocol("IBuffer.get-byte-buffer",_); } } } }); thi.ng.dstruct.streams.get_float_buffer = (function thi$ng$dstruct$streams$get_float_buffer(_){ if((!((_ == null))) && (!((_.thi$ng$dstruct$streams$IBuffer$get_float_buffer$arity$1 == null)))){ return _.thi$ng$dstruct$streams$IBuffer$get_float_buffer$arity$1(_); } else { var x__8102__auto__ = (((_ == null))?null:_); var m__8103__auto__ = (thi.ng.dstruct.streams.get_float_buffer[goog.typeOf(x__8102__auto__)]); if(!((m__8103__auto__ == null))){ return (m__8103__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8103__auto__.cljs$core$IFn$_invoke$arity$1(_) : m__8103__auto__.call(null,_)); } else { var m__8103__auto____$1 = (thi.ng.dstruct.streams.get_float_buffer["_"]); if(!((m__8103__auto____$1 == null))){ return (m__8103__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8103__auto____$1.cljs$core$IFn$_invoke$arity$1(_) : m__8103__auto____$1.call(null,_)); } else { throw cljs.core.missing_protocol("IBuffer.get-float-buffer",_); } } } }); thi.ng.dstruct.streams.get_double_buffer = (function thi$ng$dstruct$streams$get_double_buffer(_){ if((!((_ == null))) && (!((_.thi$ng$dstruct$streams$IBuffer$get_double_buffer$arity$1 == null)))){ return _.thi$ng$dstruct$streams$IBuffer$get_double_buffer$arity$1(_); } else { var x__8102__auto__ = (((_ == null))?null:_); var m__8103__auto__ = (thi.ng.dstruct.streams.get_double_buffer[goog.typeOf(x__8102__auto__)]); if(!((m__8103__auto__ == null))){ return (m__8103__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8103__auto__.cljs$core$IFn$_invoke$arity$1(_) : m__8103__auto__.call(null,_)); } else { var m__8103__auto____$1 = (thi.ng.dstruct.streams.get_double_buffer["_"]); if(!((m__8103__auto____$1 == null))){ return (m__8103__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8103__auto____$1.cljs$core$IFn$_invoke$arity$1(_) : m__8103__auto____$1.call(null,_)); } else { throw cljs.core.missing_protocol("IBuffer.get-double-buffer",_); } } } }); thi.ng.dstruct.streams.get_short_buffer = (function thi$ng$dstruct$streams$get_short_buffer(_){ if((!((_ == null))) && (!((_.thi$ng$dstruct$streams$IBuffer$get_short_buffer$arity$1 == null)))){ return _.thi$ng$dstruct$streams$IBuffer$get_short_buffer$arity$1(_); } else { var x__8102__auto__ = (((_ == null))?null:_); var m__8103__auto__ = (thi.ng.dstruct.streams.get_short_buffer[goog.typeOf(x__8102__auto__)]); if(!((m__8103__auto__ == null))){ return (m__8103__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8103__auto__.cljs$core$IFn$_invoke$arity$1(_) : m__8103__auto__.call(null,_)); } else { var m__8103__auto____$1 = (thi.ng.dstruct.streams.get_short_buffer["_"]); if(!((m__8103__auto____$1 == null))){ return (m__8103__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8103__auto____$1.cljs$core$IFn$_invoke$arity$1(_) : m__8103__auto____$1.call(null,_)); } else { throw cljs.core.missing_protocol("IBuffer.get-short-buffer",_); } } } }); thi.ng.dstruct.streams.get_int_buffer = (function thi$ng$dstruct$streams$get_int_buffer(_){ if((!((_ == null))) && (!((_.thi$ng$dstruct$streams$IBuffer$get_int_buffer$arity$1 == null)))){ return _.thi$ng$dstruct$streams$IBuffer$get_int_buffer$arity$1(_); } else { var x__8102__auto__ = (((_ == null))?null:_); var m__8103__auto__ = (thi.ng.dstruct.streams.get_int_buffer[goog.typeOf(x__8102__auto__)]); if(!((m__8103__auto__ == null))){ return (m__8103__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8103__auto__.cljs$core$IFn$_invoke$arity$1(_) : m__8103__auto__.call(null,_)); } else { var m__8103__auto____$1 = (thi.ng.dstruct.streams.get_int_buffer["_"]); if(!((m__8103__auto____$1 == null))){ return (m__8103__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8103__auto____$1.cljs$core$IFn$_invoke$arity$1(_) : m__8103__auto____$1.call(null,_)); } else { throw cljs.core.missing_protocol("IBuffer.get-int-buffer",_); } } } }); /** * @interface */ thi.ng.dstruct.streams.IIntoBuffer = function(){}; thi.ng.dstruct.streams.into_byte_buffer = (function thi$ng$dstruct$streams$into_byte_buffer(_,dest,stride,idx){ if((!((_ == null))) && (!((_.thi$ng$dstruct$streams$IIntoBuffer$into_byte_buffer$arity$4 == null)))){ return _.thi$ng$dstruct$streams$IIntoBuffer$into_byte_buffer$arity$4(_,dest,stride,idx); } else { var x__8102__auto__ = (((_ == null))?null:_); var m__8103__auto__ = (thi.ng.dstruct.streams.into_byte_buffer[goog.typeOf(x__8102__auto__)]); if(!((m__8103__auto__ == null))){ return (m__8103__auto__.cljs$core$IFn$_invoke$arity$4 ? m__8103__auto__.cljs$core$IFn$_invoke$arity$4(_,dest,stride,idx) : m__8103__auto__.call(null,_,dest,stride,idx)); } else { var m__8103__auto____$1 = (thi.ng.dstruct.streams.into_byte_buffer["_"]); if(!((m__8103__auto____$1 == null))){ return (m__8103__auto____$1.cljs$core$IFn$_invoke$arity$4 ? m__8103__auto____$1.cljs$core$IFn$_invoke$arity$4(_,dest,stride,idx) : m__8103__auto____$1.call(null,_,dest,stride,idx)); } else { throw cljs.core.missing_protocol("IIntoBuffer.into-byte-buffer",_); } } } }); thi.ng.dstruct.streams.into_float_buffer = (function thi$ng$dstruct$streams$into_float_buffer(_,dest,stride,idx){ if((!((_ == null))) && (!((_.thi$ng$dstruct$streams$IIntoBuffer$into_float_buffer$arity$4 == null)))){ return _.thi$ng$dstruct$streams$IIntoBuffer$into_float_buffer$arity$4(_,dest,stride,idx); } else { var x__8102__auto__ = (((_ == null))?null:_); var m__8103__auto__ = (thi.ng.dstruct.streams.into_float_buffer[goog.typeOf(x__8102__auto__)]); if(!((m__8103__auto__ == null))){ return (m__8103__auto__.cljs$core$IFn$_invoke$arity$4 ? m__8103__auto__.cljs$core$IFn$_invoke$arity$4(_,dest,stride,idx) : m__8103__auto__.call(null,_,dest,stride,idx)); } else { var m__8103__auto____$1 = (thi.ng.dstruct.streams.into_float_buffer["_"]); if(!((m__8103__auto____$1 == null))){ return (m__8103__auto____$1.cljs$core$IFn$_invoke$arity$4 ? m__8103__auto____$1.cljs$core$IFn$_invoke$arity$4(_,dest,stride,idx) : m__8103__auto____$1.call(null,_,dest,stride,idx)); } else { throw cljs.core.missing_protocol("IIntoBuffer.into-float-buffer",_); } } } }); thi.ng.dstruct.streams.into_double_buffer = (function thi$ng$dstruct$streams$into_double_buffer(_,dest,stride,idx){ if((!((_ == null))) && (!((_.thi$ng$dstruct$streams$IIntoBuffer$into_double_buffer$arity$4 == null)))){ return _.thi$ng$dstruct$streams$IIntoBuffer$into_double_buffer$arity$4(_,dest,stride,idx); } else { var x__8102__auto__ = (((_ == null))?null:_); var m__8103__auto__ = (thi.ng.dstruct.streams.into_double_buffer[goog.typeOf(x__8102__auto__)]); if(!((m__8103__auto__ == null))){ return (m__8103__auto__.cljs$core$IFn$_invoke$arity$4 ? m__8103__auto__.cljs$core$IFn$_invoke$arity$4(_,dest,stride,idx) : m__8103__auto__.call(null,_,dest,stride,idx)); } else { var m__8103__auto____$1 = (thi.ng.dstruct.streams.into_double_buffer["_"]); if(!((m__8103__auto____$1 == null))){ return (m__8103__auto____$1.cljs$core$IFn$_invoke$arity$4 ? m__8103__auto____$1.cljs$core$IFn$_invoke$arity$4(_,dest,stride,idx) : m__8103__auto____$1.call(null,_,dest,stride,idx)); } else { throw cljs.core.missing_protocol("IIntoBuffer.into-double-buffer",_); } } } }); thi.ng.dstruct.streams.into_short_buffer = (function thi$ng$dstruct$streams$into_short_buffer(_,dest,stride,idx){ if((!((_ == null))) && (!((_.thi$ng$dstruct$streams$IIntoBuffer$into_short_buffer$arity$4 == null)))){ return _.thi$ng$dstruct$streams$IIntoBuffer$into_short_buffer$arity$4(_,dest,stride,idx); } else { var x__8102__auto__ = (((_ == null))?null:_); var m__8103__auto__ = (thi.ng.dstruct.streams.into_short_buffer[goog.typeOf(x__8102__auto__)]); if(!((m__8103__auto__ == null))){ return (m__8103__auto__.cljs$core$IFn$_invoke$arity$4 ? m__8103__auto__.cljs$core$IFn$_invoke$arity$4(_,dest,stride,idx) : m__8103__auto__.call(null,_,dest,stride,idx)); } else { var m__8103__auto____$1 = (thi.ng.dstruct.streams.into_short_buffer["_"]); if(!((m__8103__auto____$1 == null))){ return (m__8103__auto____$1.cljs$core$IFn$_invoke$arity$4 ? m__8103__auto____$1.cljs$core$IFn$_invoke$arity$4(_,dest,stride,idx) : m__8103__auto____$1.call(null,_,dest,stride,idx)); } else { throw cljs.core.missing_protocol("IIntoBuffer.into-short-buffer",_); } } } }); thi.ng.dstruct.streams.into_int_buffer = (function thi$ng$dstruct$streams$into_int_buffer(_,dest,stride,idx){ if((!((_ == null))) && (!((_.thi$ng$dstruct$streams$IIntoBuffer$into_int_buffer$arity$4 == null)))){ return _.thi$ng$dstruct$streams$IIntoBuffer$into_int_buffer$arity$4(_,dest,stride,idx); } else { var x__8102__auto__ = (((_ == null))?null:_); var m__8103__auto__ = (thi.ng.dstruct.streams.into_int_buffer[goog.typeOf(x__8102__auto__)]); if(!((m__8103__auto__ == null))){ return (m__8103__auto__.cljs$core$IFn$_invoke$arity$4 ? m__8103__auto__.cljs$core$IFn$_invoke$arity$4(_,dest,stride,idx) : m__8103__auto__.call(null,_,dest,stride,idx)); } else { var m__8103__auto____$1 = (thi.ng.dstruct.streams.into_int_buffer["_"]); if(!((m__8103__auto____$1 == null))){ return (m__8103__auto____$1.cljs$core$IFn$_invoke$arity$4 ? m__8103__auto____$1.cljs$core$IFn$_invoke$arity$4(_,dest,stride,idx) : m__8103__auto____$1.call(null,_,dest,stride,idx)); } else { throw cljs.core.missing_protocol("IIntoBuffer.into-int-buffer",_); } } } }); thi.ng.dstruct.streams.utf8_str = (function thi$ng$dstruct$streams$utf8_str(str){ var G__14532 = encodeURIComponent(str); return unescape(G__14532); }); /** * @constructor * @implements {thi.ng.dstruct.streams.IStreamPosition} * @implements {thi.ng.dstruct.streams.IBuffer} * @implements {thi.ng.dstruct.streams.IInputStream} */ thi.ng.dstruct.streams.InputStreamWrapper = (function (buf,dv,pos){ this.buf = buf; this.dv = dv; this.pos = pos; }) thi.ng.dstruct.streams.InputStreamWrapper.prototype.thi$ng$dstruct$streams$IInputStream$ = cljs.core.PROTOCOL_SENTINEL; thi.ng.dstruct.streams.InputStreamWrapper.prototype.thi$ng$dstruct$streams$IInputStream$read_double_be$arity$1 = (function (_){ var self__ = this; var ___$1 = this; (thi.ng.dstruct.streams.ensure_readable.cljs$core$IFn$_invoke$arity$2 ? thi.ng.dstruct.streams.ensure_readable.cljs$core$IFn$_invoke$arity$2(___$1,(8)) : thi.ng.dstruct.streams.ensure_readable.call(null,___$1,(8))); var x = self__.dv.getFloat64(self__.pos); self__.pos = (self__.pos + (8)); return x; }); thi.ng.dstruct.streams.InputStreamWrapper.prototype.thi$ng$dstruct$streams$IInputStream$read_vec3f_le$arity$1 = (function (_){ var self__ = this; var ___$1 = this; return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [thi.ng.dstruct.streams.read_float_le(___$1),thi.ng.dstruct.streams.read_float_le(___$1),thi.ng.dstruct.streams.read_float_le(___$1)], null); }); thi.ng.dstruct.streams.InputStreamWrapper.prototype.thi$ng$dstruct$streams$IInputStream$read_uint32_be$arity$1 = (function (_){ var self__ = this; var ___$1 = this; (thi.ng.dstruct.streams.ensure_readable.cljs$core$IFn$_invoke$arity$2 ? thi.ng.dstruct.streams.ensure_readable.cljs$core$IFn$_invoke$arity$2(___$1,(4)) : thi.ng.dstruct.streams.ensure_readable.call(null,___$1,(4))); var x = self__.dv.getUint32(self__.pos); self__.pos = (self__.pos + (4)); return x; }); thi.ng.dstruct.streams.InputStreamWrapper.prototype.thi$ng$dstruct$streams$IInputStream$read_uint8$arity$1 = (function (_){ var self__ = this; var ___$1 = this; (thi.ng.dstruct.streams.ensure_readable.cljs$core$IFn$_invoke$arity$2 ? thi.ng.dstruct.streams.ensure_readable.cljs$core$IFn$_invoke$arity$2(___$1,(1)) : thi.ng.dstruct.streams.ensure_readable.call(null,___$1,(1))); var x = self__.dv.getUint8(self__.pos); self__.pos = (self__.pos + (1)); return x; }); thi.ng.dstruct.streams.InputStreamWrapper.prototype.thi$ng$dstruct$streams$IInputStream$read_vec3f_be$arity$1 = (function (_){ var self__ = this; var ___$1 = this; return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [thi.ng.dstruct.streams.read_float_be(___$1),thi.ng.dstruct.streams.read_float_be(___$1),thi.ng.dstruct.streams.read_float_be(___$1)], null); }); thi.ng.dstruct.streams.InputStreamWrapper.prototype.thi$ng$dstruct$streams$IInputStream$read_uint32_le$arity$1 = (function (_){ var self__ = this; var ___$1 = this; (thi.ng.dstruct.streams.ensure_readable.cljs$core$IFn$_invoke$arity$2 ? thi.ng.dstruct.streams.ensure_readable.cljs$core$IFn$_invoke$arity$2(___$1,(4)) : thi.ng.dstruct.streams.ensure_readable.call(null,___$1,(4))); var x = self__.dv.getUint32(self__.pos,true); self__.pos = (self__.pos + (4)); return x; }); thi.ng.dstruct.streams.InputStreamWrapper.prototype.thi$ng$dstruct$streams$IInputStream$read_vec2f_le$arity$1 = (function (_){ var self__ = this; var ___$1 = this; return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [thi.ng.dstruct.streams.read_float_le(___$1),thi.ng.dstruct.streams.read_float_le(___$1)], null); }); thi.ng.dstruct.streams.InputStreamWrapper.prototype.thi$ng$dstruct$streams$IInputStream$read_vec2f_be$arity$1 = (function (_){ var self__ = this; var ___$1 = this; return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [thi.ng.dstruct.streams.read_float_be(___$1),thi.ng.dstruct.streams.read_float_be(___$1)], null); }); thi.ng.dstruct.streams.InputStreamWrapper.prototype.thi$ng$dstruct$streams$IInputStream$read_double_le$arity$1 = (function (_){ var self__ = this; var ___$1 = this; (thi.ng.dstruct.streams.ensure_readable.cljs$core$IFn$_invoke$arity$2 ? thi.ng.dstruct.streams.ensure_readable.cljs$core$IFn$_invoke$arity$2(___$1,(8)) : thi.ng.dstruct.streams.ensure_readable.call(null,___$1,(8))); var x = self__.dv.getFloat64(self__.pos,true); self__.pos = (self__.pos + (8)); return x; }); thi.ng.dstruct.streams.InputStreamWrapper.prototype.thi$ng$dstruct$streams$IInputStream$read_uint16_be$arity$1 = (function (_){ var self__ = this; var ___$1 = this; (thi.ng.dstruct.streams.ensure_readable.cljs$core$IFn$_invoke$arity$2 ? thi.ng.dstruct.streams.ensure_readable.cljs$core$IFn$_invoke$arity$2(___$1,(2)) : thi.ng.dstruct.streams.ensure_readable.call(null,___$1,(2))); var x = self__.dv.getUint16(self__.pos); self__.pos = (self__.pos + (2)); return x; }); thi.ng.dstruct.streams.InputStreamWrapper.prototype.thi$ng$dstruct$streams$IInputStream$read_uint16_le$arity$1 = (function (_){ var self__ = this; var ___$1 = this; (thi.ng.dstruct.streams.ensure_readable.cljs$core$IFn$_invoke$arity$2 ? thi.ng.dstruct.streams.ensure_readable.cljs$core$IFn$_invoke$arity$2(___$1,(2)) : thi.ng.dstruct.streams.ensure_readable.call(null,___$1,(2))); var x = self__.dv.getUint16(self__.pos,true); self__.pos = (self__.pos + (2)); return x; }); thi.ng.dstruct.streams.InputStreamWrapper.prototype.thi$ng$dstruct$streams$IInputStream$read_float_le$arity$1 = (function (_){ var self__ = this; var ___$1 = this; (thi.ng.dstruct.streams.ensure_readable.cljs$core$IFn$_invoke$arity$2 ? thi.ng.dstruct.streams.ensure_readable.cljs$core$IFn$_invoke$arity$2(___$1,(4)) : thi.ng.dstruct.streams.ensure_readable.call(null,___$1,(4))); var x = self__.dv.getFloat32(self__.pos,true); self__.pos = (self__.pos + (4)); return x; }); thi.ng.dstruct.streams.InputStreamWrapper.prototype.thi$ng$dstruct$streams$IInputStream$read_float_be$arity$1 = (function (_){ var self__ = this; var ___$1 = this; (thi.ng.dstruct.streams.ensure_readable.cljs$core$IFn$_invoke$arity$2 ? thi.ng.dstruct.streams.ensure_readable.cljs$core$IFn$_invoke$arity$2(___$1,(4)) : thi.ng.dstruct.streams.ensure_readable.call(null,___$1,(4))); var x = self__.dv.getFloat32(self__.pos); self__.pos = (self__.pos + (4)); return x; }); thi.ng.dstruct.streams.InputStreamWrapper.prototype.thi$ng$dstruct$streams$IStreamPosition$ = cljs.core.PROTOCOL_SENTINEL; thi.ng.dstruct.streams.InputStreamWrapper.prototype.thi$ng$dstruct$streams$IStreamPosition$skip$arity$2 = (function (_,x){ var self__ = this; var ___$1 = this; (thi.ng.dstruct.streams.ensure_readable.cljs$core$IFn$_invoke$arity$2 ? thi.ng.dstruct.streams.ensure_readable.cljs$core$IFn$_invoke$arity$2(___$1,x) : thi.ng.dstruct.streams.ensure_readable.call(null,___$1,x)); self__.pos = (self__.pos + x); return ___$1; }); thi.ng.dstruct.streams.InputStreamWrapper.prototype.thi$ng$dstruct$streams$IStreamPosition$get_position$arity$1 = (function (_){ var self__ = this; var ___$1 = this; return self__.pos; }); thi.ng.dstruct.streams.InputStreamWrapper.prototype.thi$ng$dstruct$streams$IBuffer$ = cljs.core.PROTOCOL_SENTINEL; thi.ng.dstruct.streams.InputStreamWrapper.prototype.thi$ng$dstruct$streams$IBuffer$get_byte_buffer$arity$1 = (function (_){ var self__ = this; var ___$1 = this; return (new Uint8Array(self__.buf)); }); thi.ng.dstruct.streams.InputStreamWrapper.prototype.thi$ng$dstruct$streams$IBuffer$get_float_buffer$arity$1 = (function (_){ var self__ = this; var ___$1 = this; return (new Float32Array(self__.buf)); }); thi.ng.dstruct.streams.InputStreamWrapper.prototype.thi$ng$dstruct$streams$IBuffer$get_double_buffer$arity$1 = (function (_){ var self__ = this; var ___$1 = this; return (new Float64Array(self__.buf)); }); thi.ng.dstruct.streams.InputStreamWrapper.prototype.thi$ng$dstruct$streams$IBuffer$get_short_buffer$arity$1 = (function (_){ var self__ = this; var ___$1 = this; return (new Uint16Array(self__.buf)); }); thi.ng.dstruct.streams.InputStreamWrapper.prototype.thi$ng$dstruct$streams$IBuffer$get_int_buffer$arity$1 = (function (_){ var self__ = this; var ___$1 = this; return (new Uint32Array(self__.buf)); }); thi.ng.dstruct.streams.InputStreamWrapper.getBasis = (function (){ return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(cljs.core.cst$sym$buf,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$tag,cljs.core.cst$sym$js_SLASH_ArrayBuffer], null)),cljs.core.with_meta(cljs.core.cst$sym$dv,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$tag,cljs.core.cst$sym$js_SLASH_DataView], null)),cljs.core.with_meta(cljs.core.cst$sym$pos,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); }); thi.ng.dstruct.streams.InputStreamWrapper.cljs$lang$type = true; thi.ng.dstruct.streams.InputStreamWrapper.cljs$lang$ctorStr = "thi.ng.dstruct.streams/InputStreamWrapper"; thi.ng.dstruct.streams.InputStreamWrapper.cljs$lang$ctorPrWriter = (function (this__8041__auto__,writer__8042__auto__,opt__8043__auto__){ return cljs.core._write(writer__8042__auto__,"thi.ng.dstruct.streams/InputStreamWrapper"); }); thi.ng.dstruct.streams.__GT_InputStreamWrapper = (function thi$ng$dstruct$streams$__GT_InputStreamWrapper(buf,dv,pos){ return (new thi.ng.dstruct.streams.InputStreamWrapper(buf,dv,pos)); }); /** * @constructor * @implements {thi.ng.dstruct.streams.IStreamPosition} * @implements {thi.ng.dstruct.streams.IBuffer} * @implements {thi.ng.dstruct.streams.IOutputStream} */ thi.ng.dstruct.streams.OutputStreamWrapper = (function (buf,dv,pos){ this.buf = buf; this.dv = dv; this.pos = pos; }) thi.ng.dstruct.streams.OutputStreamWrapper.prototype.thi$ng$dstruct$streams$IOutputStream$ = cljs.core.PROTOCOL_SENTINEL; thi.ng.dstruct.streams.OutputStreamWrapper.prototype.thi$ng$dstruct$streams$IOutputStream$write_utf8_bytes$arity$2 = (function (_,str){ var self__ = this; var ___$1 = this; var utf8_14535 = thi.ng.dstruct.streams.utf8_str(str); var len_14536 = cljs.core.count(utf8_14535); var G__14533_14537 = ___$1; var G__14534_14538 = cljs.core.count(utf8_14535); (thi.ng.dstruct.streams.ensure_size.cljs$core$IFn$_invoke$arity$2 ? thi.ng.dstruct.streams.ensure_size.cljs$core$IFn$_invoke$arity$2(G__14533_14537,G__14534_14538) : thi.ng.dstruct.streams.ensure_size.call(null,G__14533_14537,G__14534_14538)); var i_14539 = (0); var p_14540 = self__.pos; while(true){ if((i_14539 < len_14536)){ self__.dv.setUint8(p_14540,utf8_14535.charCodeAt(i_14539)); var G__14541 = (i_14539 + (1)); var G__14542 = (p_14540 + (1)); i_14539 = G__14541; p_14540 = G__14542; continue; } else { self__.pos = p_14540; } break; } return ___$1; }); thi.ng.dstruct.streams.OutputStreamWrapper.prototype.thi$ng$dstruct$streams$IOutputStream$write_uint16_be$arity$2 = (function (_,x){ var self__ = this; var ___$1 = this; (thi.ng.dstruct.streams.ensure_size.cljs$core$IFn$_invoke$arity$2 ? thi.ng.dstruct.streams.ensure_size.cljs$core$IFn$_invoke$arity$2(___$1,(2)) : thi.ng.dstruct.streams.ensure_size.call(null,___$1,(2))); self__.dv.setUint16(self__.pos,x); self__.pos = (self__.pos + (2)); return ___$1; }); thi.ng.dstruct.streams.OutputStreamWrapper.prototype.thi$ng$dstruct$streams$IOutputStream$write_uint16_le$arity$2 = (function (_,x){ var self__ = this; var ___$1 = this; (thi.ng.dstruct.streams.ensure_size.cljs$core$IFn$_invoke$arity$2 ? thi.ng.dstruct.streams.ensure_size.cljs$core$IFn$_invoke$arity$2(___$1,(2)) : thi.ng.dstruct.streams.ensure_size.call(null,___$1,(2))); self__.dv.setUint16(self__.pos,x,true); self__.pos = (self__.pos + (2)); return ___$1; }); thi.ng.dstruct.streams.OutputStreamWrapper.prototype.thi$ng$dstruct$streams$IOutputStream$write_uint32_be$arity$2 = (function (_,x){ var self__ = this; var ___$1 = this; (thi.ng.dstruct.streams.ensure_size.cljs$core$IFn$_invoke$arity$2 ? thi.ng.dstruct.streams.ensure_size.cljs$core$IFn$_invoke$arity$2(___$1,(4)) : thi.ng.dstruct.streams.ensure_size.call(null,___$1,(4))); self__.dv.setUint32(self__.pos,x); self__.pos = (self__.pos + (4)); return ___$1; }); thi.ng.dstruct.streams.OutputStreamWrapper.prototype.thi$ng$dstruct$streams$IOutputStream$write_vec3f_le$arity$2 = (function (_,v){ var self__ = this; var ___$1 = this; (thi.ng.dstruct.streams.ensure_size.cljs$core$IFn$_invoke$arity$2 ? thi.ng.dstruct.streams.ensure_size.cljs$core$IFn$_invoke$arity$2(___$1,(12)) : thi.ng.dstruct.streams.ensure_size.call(null,___$1,(12))); self__.dv.setFloat32(self__.pos,cljs.core.first(v),true); self__.dv.setFloat32((self__.pos + (4)),cljs.core.nth.cljs$core$IFn$_invoke$arity$2(v,(1)),true); self__.dv.setFloat32((self__.pos + (8)),cljs.core.nth.cljs$core$IFn$_invoke$arity$2(v,(2)),true); self__.pos = (self__.pos + (12)); return ___$1; }); thi.ng.dstruct.streams.OutputStreamWrapper.prototype.thi$ng$dstruct$streams$IOutputStream$write_vec3f_be$arity$2 = (function (_,v){ var self__ = this; var ___$1 = this; (thi.ng.dstruct.streams.ensure_size.cljs$core$IFn$_invoke$arity$2 ? thi.ng.dstruct.streams.ensure_size.cljs$core$IFn$_invoke$arity$2(___$1,(12)) : thi.ng.dstruct.streams.ensure_size.call(null,___$1,(12))); self__.dv.setFloat32(self__.pos,cljs.core.first(v)); self__.dv.setFloat32((self__.pos + (4)),cljs.core.nth.cljs$core$IFn$_invoke$arity$2(v,(1))); self__.dv.setFloat32((self__.pos + (8)),cljs.core.nth.cljs$core$IFn$_invoke$arity$2(v,(2))); self__.pos = (self__.pos + (12)); return ___$1; }); thi.ng.dstruct.streams.OutputStreamWrapper.prototype.thi$ng$dstruct$streams$IOutputStream$write_double_be$arity$2 = (function (_,x){ var self__ = this; var ___$1 = this; (thi.ng.dstruct.streams.ensure_size.cljs$core$IFn$_invoke$arity$2 ? thi.ng.dstruct.streams.ensure_size.cljs$core$IFn$_invoke$arity$2(___$1,(8)) : thi.ng.dstruct.streams.ensure_size.call(null,___$1,(8))); self__.dv.setFloat64(self__.pos,x); self__.pos = (self__.pos + (8)); return ___$1; }); thi.ng.dstruct.streams.OutputStreamWrapper.prototype.thi$ng$dstruct$streams$IOutputStream$write_uint8$arity$2 = (function (_,x){ var self__ = this; var ___$1 = this; (thi.ng.dstruct.streams.ensure_size.cljs$core$IFn$_invoke$arity$2 ? thi.ng.dstruct.streams.ensure_size.cljs$core$IFn$_invoke$arity$2(___$1,(1)) : thi.ng.dstruct.streams.ensure_size.call(null,___$1,(1))); self__.dv.setUint8(self__.pos,x); self__.pos = (self__.pos + (1)); return ___$1; }); thi.ng.dstruct.streams.OutputStreamWrapper.prototype.thi$ng$dstruct$streams$IOutputStream$write_float_be$arity$2 = (function (_,x){ var self__ = this; var ___$1 = this; (thi.ng.dstruct.streams.ensure_size.cljs$core$IFn$_invoke$arity$2 ? thi.ng.dstruct.streams.ensure_size.cljs$core$IFn$_invoke$arity$2(___$1,(4)) : thi.ng.dstruct.streams.ensure_size.call(null,___$1,(4))); self__.dv.setFloat32(self__.pos,x); self__.pos = (self__.pos + (4)); return ___$1; }); thi.ng.dstruct.streams.OutputStreamWrapper.prototype.thi$ng$dstruct$streams$IOutputStream$write_float_le$arity$2 = (function (_,x){ var self__ = this; var ___$1 = this; (thi.ng.dstruct.streams.ensure_size.cljs$core$IFn$_invoke$arity$2 ? thi.ng.dstruct.streams.ensure_size.cljs$core$IFn$_invoke$arity$2(___$1,(4)) : thi.ng.dstruct.streams.ensure_size.call(null,___$1,(4))); self__.dv.setFloat32(self__.pos,x,true); self__.pos = (self__.pos + (4)); return ___$1; }); thi.ng.dstruct.streams.OutputStreamWrapper.prototype.thi$ng$dstruct$streams$IOutputStream$write_uint32_le$arity$2 = (function (_,x){ var self__ = this; var ___$1 = this; (thi.ng.dstruct.streams.ensure_size.cljs$core$IFn$_invoke$arity$2 ? thi.ng.dstruct.streams.ensure_size.cljs$core$IFn$_invoke$arity$2(___$1,(4)) : thi.ng.dstruct.streams.ensure_size.call(null,___$1,(4))); self__.dv.setUint32(self__.pos,x,true); self__.pos = (self__.pos + (4)); return ___$1; }); thi.ng.dstruct.streams.OutputStreamWrapper.prototype.thi$ng$dstruct$streams$IOutputStream$write_vec2f_be$arity$2 = (function (_,v){ var self__ = this; var ___$1 = this; (thi.ng.dstruct.streams.ensure_size.cljs$core$IFn$_invoke$arity$2 ? thi.ng.dstruct.streams.ensure_size.cljs$core$IFn$_invoke$arity$2(___$1,(8)) : thi.ng.dstruct.streams.ensure_size.call(null,___$1,(8))); self__.dv.setFloat32(self__.pos,cljs.core.first(v)); self__.dv.setFloat32((self__.pos + (4)),cljs.core.nth.cljs$core$IFn$_invoke$arity$2(v,(1))); self__.pos = (self__.pos + (8)); return ___$1; }); thi.ng.dstruct.streams.OutputStreamWrapper.prototype.thi$ng$dstruct$streams$IOutputStream$write_double_le$arity$2 = (function (_,x){ var self__ = this; var ___$1 = this; (thi.ng.dstruct.streams.ensure_size.cljs$core$IFn$_invoke$arity$2 ? thi.ng.dstruct.streams.ensure_size.cljs$core$IFn$_invoke$arity$2(___$1,(8)) : thi.ng.dstruct.streams.ensure_size.call(null,___$1,(8))); self__.dv.setFloat64(self__.pos,x,true); self__.pos = (self__.pos + (8)); return ___$1; }); thi.ng.dstruct.streams.OutputStreamWrapper.prototype.thi$ng$dstruct$streams$IOutputStream$write_vec2f_le$arity$2 = (function (_,v){ var self__ = this; var ___$1 = this; (thi.ng.dstruct.streams.ensure_size.cljs$core$IFn$_invoke$arity$2 ? thi.ng.dstruct.streams.ensure_size.cljs$core$IFn$_invoke$arity$2(___$1,(8)) : thi.ng.dstruct.streams.ensure_size.call(null,___$1,(8))); self__.dv.setFloat32(self__.pos,cljs.core.first(v),true); self__.dv.setFloat32((self__.pos + (4)),cljs.core.nth.cljs$core$IFn$_invoke$arity$2(v,(1)),true); self__.pos = (self__.pos + (8)); return ___$1; }); thi.ng.dstruct.streams.OutputStreamWrapper.prototype.thi$ng$dstruct$streams$IStreamPosition$ = cljs.core.PROTOCOL_SENTINEL; thi.ng.dstruct.streams.OutputStreamWrapper.prototype.thi$ng$dstruct$streams$IStreamPosition$skip$arity$2 = (function (_,x){ var self__ = this; var ___$1 = this; (thi.ng.dstruct.streams.ensure_size.cljs$core$IFn$_invoke$arity$2 ? thi.ng.dstruct.streams.ensure_size.cljs$core$IFn$_invoke$arity$2(___$1,x) : thi.ng.dstruct.streams.ensure_size.call(null,___$1,x)); self__.pos = (self__.pos + x); return ___$1; }); thi.ng.dstruct.streams.OutputStreamWrapper.prototype.thi$ng$dstruct$streams$IStreamPosition$get_position$arity$1 = (function (_){ var self__ = this; var ___$1 = this; return self__.pos; }); thi.ng.dstruct.streams.OutputStreamWrapper.prototype.thi$ng$dstruct$streams$IBuffer$ = cljs.core.PROTOCOL_SENTINEL; thi.ng.dstruct.streams.OutputStreamWrapper.prototype.thi$ng$dstruct$streams$IBuffer$get_byte_buffer$arity$1 = (function (_){ var self__ = this; var ___$1 = this; return (new Uint8Array(self__.buf,(0),self__.pos)); }); thi.ng.dstruct.streams.OutputStreamWrapper.prototype.thi$ng$dstruct$streams$IBuffer$get_float_buffer$arity$1 = (function (_){ var self__ = this; var ___$1 = this; return (new Float32Array(self__.buf,(0),(self__.pos >>> (2)))); }); thi.ng.dstruct.streams.OutputStreamWrapper.prototype.thi$ng$dstruct$streams$IBuffer$get_double_buffer$arity$1 = (function (_){ var self__ = this; var ___$1 = this; return (new Float64Array(self__.buf,(0),(self__.pos >>> (3)))); }); thi.ng.dstruct.streams.OutputStreamWrapper.prototype.thi$ng$dstruct$streams$IBuffer$get_short_buffer$arity$1 = (function (_){ var self__ = this; var ___$1 = this; return (new Uint16Array(self__.buf,(0),(self__.pos >>> (1)))); }); thi.ng.dstruct.streams.OutputStreamWrapper.prototype.thi$ng$dstruct$streams$IBuffer$get_int_buffer$arity$1 = (function (_){ var self__ = this; var ___$1 = this; return (new Uint32Array(self__.buf,(0),(self__.pos >>> (2)))); }); thi.ng.dstruct.streams.OutputStreamWrapper.getBasis = (function (){ return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(cljs.core.cst$sym$buf,new cljs.core.PersistentArrayMap(null, 2, [cljs.core.cst$kw$tag,cljs.core.cst$sym$js_SLASH_ArrayBuffer,cljs.core.cst$kw$mutable,true], null)),cljs.core.with_meta(cljs.core.cst$sym$dv,new cljs.core.PersistentArrayMap(null, 2, [cljs.core.cst$kw$tag,cljs.core.cst$sym$js_SLASH_DataView,cljs.core.cst$kw$mutable,true], null)),cljs.core.with_meta(cljs.core.cst$sym$pos,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); }); thi.ng.dstruct.streams.OutputStreamWrapper.cljs$lang$type = true; thi.ng.dstruct.streams.OutputStreamWrapper.cljs$lang$ctorStr = "thi.ng.dstruct.streams/OutputStreamWrapper"; thi.ng.dstruct.streams.OutputStreamWrapper.cljs$lang$ctorPrWriter = (function (this__8041__auto__,writer__8042__auto__,opt__8043__auto__){ return cljs.core._write(writer__8042__auto__,"thi.ng.dstruct.streams/OutputStreamWrapper"); }); thi.ng.dstruct.streams.__GT_OutputStreamWrapper = (function thi$ng$dstruct$streams$__GT_OutputStreamWrapper(buf,dv,pos){ return (new thi.ng.dstruct.streams.OutputStreamWrapper(buf,dv,pos)); }); thi.ng.dstruct.streams.ensure_readable = (function thi$ng$dstruct$streams$ensure_readable(in$,size){ if(((in$.pos + size) > in$.buf.byteLength)){ throw (new Error([cljs.core.str("EOF overrun, current pos: "),cljs.core.str(in$.pos),cljs.core.str(", requested read length: "),cljs.core.str(size),cljs.core.str(", but length: "),cljs.core.str(in$.buf.byteLength)].join(''))); } else { return null; } }); thi.ng.dstruct.streams.ensure_size = (function thi$ng$dstruct$streams$ensure_size(out,size){ var len = out.buf.byteLength; if(((out.pos + size) > len)){ var buf_SINGLEQUOTE_ = (new ArrayBuffer((len + (16384)))); (new Uint8Array(buf_SINGLEQUOTE_)).set((new Uint8Array(out.buf,(0),out.pos))); out.buf = buf_SINGLEQUOTE_; return out.dv = (new DataView(buf_SINGLEQUOTE_)); } else { return null; } }); /** * Takes an input or outputstream and optional mime type, returns * contents as data url wrapped in a volatile. The volatile's value is * initially nil and will only become realized after the function * returned. */ thi.ng.dstruct.streams.as_data_url = (function thi$ng$dstruct$streams$as_data_url(var_args){ var args14543 = []; var len__8605__auto___14546 = arguments.length; var i__8606__auto___14547 = (0); while(true){ if((i__8606__auto___14547 < len__8605__auto___14546)){ args14543.push((arguments[i__8606__auto___14547])); var G__14548 = (i__8606__auto___14547 + (1)); i__8606__auto___14547 = G__14548; continue; } else { } break; } var G__14545 = args14543.length; switch (G__14545) { case 1: return thi.ng.dstruct.streams.as_data_url.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); break; case 2: return thi.ng.dstruct.streams.as_data_url.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); break; default: throw (new Error([cljs.core.str("Invalid arity: "),cljs.core.str(args14543.length)].join(''))); } }); thi.ng.dstruct.streams.as_data_url.cljs$core$IFn$_invoke$arity$1 = (function (stream){ return thi.ng.dstruct.streams.as_data_url.cljs$core$IFn$_invoke$arity$2(stream,"application/octet-stream"); }); thi.ng.dstruct.streams.as_data_url.cljs$core$IFn$_invoke$arity$2 = (function (stream,mime){ var fr = (new FileReader()); var uri = cljs.core.volatile_BANG_(null); fr.onload = ((function (fr,uri){ return (function (e){ return cljs.core.vreset_BANG_(uri,e.target.result); });})(fr,uri)) ; fr.readAsDataURL((new Blob([thi.ng.dstruct.streams.get_byte_buffer(stream)],({"type": mime})))); return uri; }); thi.ng.dstruct.streams.as_data_url.cljs$lang$maxFixedArity = 2; /** * Takes an input or outputstream, callback fn and optional mime * type, calls fn with data url string, returns nil. */ thi.ng.dstruct.streams.as_data_url_async = (function thi$ng$dstruct$streams$as_data_url_async(var_args){ var args14551 = []; var len__8605__auto___14555 = arguments.length; var i__8606__auto___14556 = (0); while(true){ if((i__8606__auto___14556 < len__8605__auto___14555)){ args14551.push((arguments[i__8606__auto___14556])); var G__14557 = (i__8606__auto___14556 + (1)); i__8606__auto___14556 = G__14557; continue; } else { } break; } var G__14553 = args14551.length; switch (G__14553) { case 2: return thi.ng.dstruct.streams.as_data_url_async.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); break; case 3: return thi.ng.dstruct.streams.as_data_url_async.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); break; default: throw (new Error([cljs.core.str("Invalid arity: "),cljs.core.str(args14551.length)].join(''))); } }); thi.ng.dstruct.streams.as_data_url_async.cljs$core$IFn$_invoke$arity$2 = (function (stream,cb){ return thi.ng.dstruct.streams.as_data_url_async.cljs$core$IFn$_invoke$arity$3(stream,cb,"application/octet-stream"); }); thi.ng.dstruct.streams.as_data_url_async.cljs$core$IFn$_invoke$arity$3 = (function (stream,cb,mime){ var fr = (new FileReader()); fr.onload = ((function (fr){ return (function (p1__14550_SHARP_){ var G__14554 = p1__14550_SHARP_.target.result; return (cb.cljs$core$IFn$_invoke$arity$1 ? cb.cljs$core$IFn$_invoke$arity$1(G__14554) : cb.call(null,G__14554)); });})(fr)) ; fr.readAsDataURL((new Blob([thi.ng.dstruct.streams.get_byte_buffer(stream)],({"type": mime})))); return null; }); thi.ng.dstruct.streams.as_data_url_async.cljs$lang$maxFixedArity = 3; thi.ng.dstruct.streams.input_stream = (function thi$ng$dstruct$streams$input_stream(var_args){ var args14559 = []; var len__8605__auto___14562 = arguments.length; var i__8606__auto___14563 = (0); while(true){ if((i__8606__auto___14563 < len__8605__auto___14562)){ args14559.push((arguments[i__8606__auto___14563])); var G__14564 = (i__8606__auto___14563 + (1)); i__8606__auto___14563 = G__14564; continue; } else { } break; } var G__14561 = args14559.length; switch (G__14561) { case 1: return thi.ng.dstruct.streams.input_stream.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); break; case 2: return thi.ng.dstruct.streams.input_stream.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); break; default: throw (new Error([cljs.core.str("Invalid arity: "),cljs.core.str(args14559.length)].join(''))); } }); thi.ng.dstruct.streams.input_stream.cljs$core$IFn$_invoke$arity$1 = (function (buf){ return thi.ng.dstruct.streams.input_stream.cljs$core$IFn$_invoke$arity$2(buf,(0)); }); thi.ng.dstruct.streams.input_stream.cljs$core$IFn$_invoke$arity$2 = (function (buf,pos){ return (new thi.ng.dstruct.streams.InputStreamWrapper(buf,(new DataView(buf)),pos)); }); thi.ng.dstruct.streams.input_stream.cljs$lang$maxFixedArity = 2; thi.ng.dstruct.streams.output_stream = (function thi$ng$dstruct$streams$output_stream(var_args){ var args14566 = []; var len__8605__auto___14569 = arguments.length; var i__8606__auto___14570 = (0); while(true){ if((i__8606__auto___14570 < len__8605__auto___14569)){ args14566.push((arguments[i__8606__auto___14570])); var G__14571 = (i__8606__auto___14570 + (1)); i__8606__auto___14570 = G__14571; continue; } else { } break; } var G__14568 = args14566.length; switch (G__14568) { case 0: return thi.ng.dstruct.streams.output_stream.cljs$core$IFn$_invoke$arity$0(); break; case 1: return thi.ng.dstruct.streams.output_stream.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); break; case 2: return thi.ng.dstruct.streams.output_stream.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); break; default: throw (new Error([cljs.core.str("Invalid arity: "),cljs.core.str(args14566.length)].join(''))); } }); thi.ng.dstruct.streams.output_stream.cljs$core$IFn$_invoke$arity$0 = (function (){ return thi.ng.dstruct.streams.output_stream.cljs$core$IFn$_invoke$arity$1((4096)); }); thi.ng.dstruct.streams.output_stream.cljs$core$IFn$_invoke$arity$1 = (function (size){ return thi.ng.dstruct.streams.output_stream.cljs$core$IFn$_invoke$arity$2((new ArrayBuffer(size)),(0)); }); thi.ng.dstruct.streams.output_stream.cljs$core$IFn$_invoke$arity$2 = (function (buf,pos){ return (new thi.ng.dstruct.streams.OutputStreamWrapper(buf,(new DataView(buf)),pos)); }); thi.ng.dstruct.streams.output_stream.cljs$lang$maxFixedArity = 2;
scientific-coder/Mazes
target/main.out/thi/ng/dstruct/streams.js
JavaScript
gpl-3.0
66,698
# $OpenBSD$ # # Copyright (c) 2000 Opsycon AB (www.opsycon.se) # Copyright (c) 2000 Rtmx, Inc (www.rtmx.com) # # 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. All advertising materials mentioning features or use of this software # must display the following acknowledgement: # This product includes software developed for Rtmx, Inc by # Opsycon Open System Consulting AB, Sweden. # 4. The name of the author may not be used to endorse or promote products # derived from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. # all: links links: @-rm -f dev; ln -s ../sys/dev dev @-rm -f net; ln -s ../sys/net net @-rm -f netinet; ln -s ../sys/netinet netinet @-rm -f scsi; ln -s ../sys/scsi scsi @-rm -f sys; ln -s ../sys/sys sys @-rm -f vm; ln -s ../sys/vm vm @-for i in ../sys/arch/*/include ; \ do ( \ cd $$i; rm -f machine; ln -s . machine ; \ ) \ done @touch links
tupelo-shen/my_test
doc/linux/mips-architecture/loongson-datasheet/pmon/src/pmon-loongson3/include/Makefile
Makefile
gpl-3.0
2,087
//------------------------------------------------------------------------------ // <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 pkmn_ntr.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.0.1.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; } } [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("0.0.0.0")] public string IP { get { return ((string)(this["IP"])); } set { this["IP"] = value; } } } }
drgoku282/PKMN-NTR
PKMN-NTR/Properties/Settings.Designer.cs
C#
gpl-3.0
1,473
package com.srlupdater.updater.injection.analyzers; import com.srlupdater.updater.injection.generic.AbstractAnalyzer; import com.srlupdater.updater.injection.generic.Hook; import org.objectweb.asm.Opcodes; import org.objectweb.asm.tree.ClassNode; import org.objectweb.asm.tree.MethodNode; import java.util.ListIterator; public class ItemAnalyzer extends AbstractAnalyzer { @Override protected boolean canRun(ClassNode node) { if (!node.superName.equals(classNodes.get("Renderable").name) || classNodes.containsKey("Item")) return false; ListIterator<MethodNode> mnli = node.methods.listIterator(); while (mnli.hasNext()) { MethodNode mn = mnli.next(); if (mn.name.equals("<init>")) { if (mn.instructions.get(3).getOpcode() == Opcodes.RETURN) return true; } } return false; } @Override protected Hook analyse(ClassNode node) { Hook hook = new Hook("Item",node.name); classNodes.put("Item",node); return hook; } }
NKNScripts/Updater
src/com/srlupdater/updater/injection/analyzers/ItemAnalyzer.java
Java
gpl-3.0
1,089
# -*- coding: utf-8 -*- # # Copyright (C) 2015-2017 Bitergia # # 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, write to the Free Software # Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA. # # Authors: # Santiago Dueñas <sduenas@bitergia.com> # import argparse import hashlib import importlib import json import logging import os import pkgutil import sys from datetime import datetime as dt from grimoirelab.toolkit.introspect import find_signature_parameters from grimoirelab.toolkit.datetime import str_to_datetime from .archive import Archive, ArchiveManager from .errors import ArchiveError from ._version import __version__ logger = logging.getLogger(__name__) ARCHIVES_DEFAULT_PATH = '~/.perceval/archives/' class Backend: """Abstract class for backends. Base class to fetch data from a repository. This repository will be named as 'origin'. During the initialization, an `Archive` object can be provided for archiving raw data from the repositories. Derivated classes have to implement `fetch_items`, `has_archiving` and `has_resuming` methods. Otherwise, `NotImplementedError` exception will be raised. Metadata decorator can be used together with fetch methods but requires the implementation of `metadata_id`, `metadata_updated_on` and `metadata_category` static methods. The fetched items can be tagged using the `tag` parameter. It will be useful to trace data. When it is set to `None` or to an empty string, the tag will be the same that the `origin` attribute. To track which version of the backend was used during the fetching process, this class provides a `version` attribute that each backend may override. :param origin: identifier of the repository :param tag: tag items using this label :param archive: archive to store/retrieve data :raises ValueError: raised when `archive` is not an instance of `Archive` class """ version = '0.6.0' def __init__(self, origin, tag=None, archive=None): self._origin = origin self.tag = tag if tag else origin self.archive = archive or None @property def origin(self): return self._origin @property def archive(self): return self._archive @archive.setter def archive(self, obj): if obj and not isinstance(obj, Archive): msg = "obj is not an instance of Archive. %s object given" \ % (str(type(obj))) raise ValueError(msg) self._archive = obj def fetch_items(self, **kwargs): raise NotImplementedError def fetch(self, category, **kwargs): """Fetch items from the repository. The method retrieves items from a repository. :param category: the category of the items fetched :param kwargs: a list of other parameters (e.g., from_date, offset, etc. specific for each backend) :returns: a generator of items """ if self.archive: self.archive.init_metadata(self.origin, self.__class__.__name__, self.version, category, kwargs) self.client = self._init_client() for item in self.fetch_items(**kwargs): yield self.metadata(item) def fetch_from_archive(self): """Fetch the questions from an archive. It returns the items stored within an archive. If this method is called but no archive was provided, the method will raise a `ArchiveError` exception. :returns: a generator of items :raises ArchiveError: raised when an error occurs accessing an archive """ if not self.archive: raise ArchiveError(cause="archive instance was not provided") self.client = self._init_client(from_archive=True) for item in self.fetch_items(**self.archive.backend_params): yield self.metadata(item) def metadata(self, item): """Add metadata to an item. It adds metadata to a given item such as how and when it was fetched. The contents from the original item will be stored under the 'data' keyword. :param item: an item fetched by a backend """ item = { 'backend_name': self.__class__.__name__, 'backend_version': self.version, 'perceval_version': __version__, 'timestamp': dt.utcnow().timestamp(), 'origin': self.origin, 'uuid': uuid(self.origin, self.metadata_id(item)), 'updated_on': self.metadata_updated_on(item), 'category': self.metadata_category(item), 'tag': self.tag, 'data': item, } return item @classmethod def has_archiving(cls): raise NotImplementedError @classmethod def has_resuming(cls): raise NotImplementedError @staticmethod def metadata_id(item): raise NotImplementedError @staticmethod def metadata_updated_on(item): raise NotImplementedError @staticmethod def metadata_category(item): raise NotImplementedError def _init_client(self, from_archive=False): raise NotImplementedError class BackendCommandArgumentParser: """Manage and parse backend command arguments. This class defines and parses a set of arguments common to backends commands. Some parameters like archive or the different types of authentication can be set during the initialization of the instance. :param from_date: set from_date argument :param to_date: set to_date argument :param offset: set offset argument :param basic_auth: set basic authentication arguments :param token_auth: set token/key authentication arguments :param archive: set archiving arguments :param aliases: define aliases for parsed arguments :raises AttributeArror: when both `from_date` and `offset` are set to `True` """ def __init__(self, from_date=False, to_date=False, offset=False, basic_auth=False, token_auth=False, archive=False, aliases=None): self._from_date = from_date self._to_date = to_date self._archive = archive self.aliases = aliases or {} self.parser = argparse.ArgumentParser() group = self.parser.add_argument_group('general arguments') group.add_argument('--category', dest='category', help="type of the items to fetch") group.add_argument('--tag', dest='tag', help="tag the items generated during the fetching process") if (from_date or to_date) and offset: raise AttributeError("date and offset parameters are incompatible") if from_date: group.add_argument('--from-date', dest='from_date', default='1970-01-01', help="fetch items updated since this date") if to_date: group.add_argument('--to-date', dest='to_date', help="fetch items updated before this date") if offset: group.add_argument('--offset', dest='offset', type=int, default=0, help="offset to start fetching items") if basic_auth or token_auth: self._set_auth_arguments(basic_auth=basic_auth, token_auth=token_auth) if archive: self._set_archive_arguments() self._set_output_arguments() def parse(self, *args): """Parse a list of arguments. Parse argument strings needed to run a backend command. The result will be a `argparse.Namespace` object populated with the values obtained after the validation of the parameters. :param args: argument strings :result: an object with the parsed values """ parsed_args = self.parser.parse_args(args) if self._from_date: parsed_args.from_date = str_to_datetime(parsed_args.from_date) if self._to_date and parsed_args.to_date: parsed_args.to_date = str_to_datetime(parsed_args.to_date) if self._archive and parsed_args.archived_since: parsed_args.archived_since = str_to_datetime(parsed_args.archived_since) if self._archive and parsed_args.fetch_archive and parsed_args.no_archive: raise AttributeError("fetch-archive and no-archive arguments are not compatible") if self._archive and parsed_args.fetch_archive and not parsed_args.category: raise AttributeError("fetch-archive needs a category to work with") # Set aliases for alias, arg in self.aliases.items(): if (alias not in parsed_args) and (arg in parsed_args): value = getattr(parsed_args, arg, None) setattr(parsed_args, alias, value) return parsed_args def _set_auth_arguments(self, basic_auth=True, token_auth=False): """Activate authentication arguments parsing""" group = self.parser.add_argument_group('authentication arguments') if basic_auth: group.add_argument('-u', '--backend-user', dest='user', help="backend user") group.add_argument('-p', '--backend-password', dest='password', help="backend password") if token_auth: group.add_argument('-t', '--api-token', dest='api_token', help="backend authentication token / API key") def _set_archive_arguments(self): """Activate archive arguments parsing""" group = self.parser.add_argument_group('archive arguments') group.add_argument('--archive-path', dest='archive_path', default=None, help="directory path to the archives") group.add_argument('--no-archive', dest='no_archive', action='store_true', help="do not archive data") group.add_argument('--fetch-archive', dest='fetch_archive', action='store_true', help="fetch data from the archives") group.add_argument('--archived-since', dest='archived_since', default='1970-01-01', help="retrieve items archived since the given date") def _set_output_arguments(self): """Activate output arguments parsing""" group = self.parser.add_argument_group('output arguments') group.add_argument('-o', '--output', type=argparse.FileType('w'), dest='outfile', default=sys.stdout, help="output file") class BackendCommand: """Abstract class to run backends from the command line. When the class is initialized, it parses the given arguments using the defined argument parser on `setump_cmd_parser` method. Those arguments will be stored in the attribute `parsed_args`. The arguments will be used to inizialize and run the `Backend` object assigned to this command. The backend used to run the command is stored under `BACKEND` class attributed. Any class derived from this and must set its own `Backend` class. Moreover, the method `setup_cmd_parser` must be implemented to exectute the backend. """ BACKEND = None def __init__(self, *args): parser = self.setup_cmd_parser() self.parsed_args = parser.parse(*args) self.archive_manager = None self._pre_init() self._initialize_archive() self._post_init() self.outfile = self.parsed_args.outfile def run(self): """Fetch and write items. This method runs the backend to fetch the items from the given origin. Items are converted to JSON objects and written to the defined output. If `fetch-archive` parameter was given as an argument during the inizialization of the instance, the items will be retrieved using the archive manager. """ backend_args = vars(self.parsed_args) if self.archive_manager and self.parsed_args.fetch_archive: items = fetch_from_archive(self.BACKEND, backend_args, self.archive_manager, self.parsed_args.category, self.parsed_args.archived_since) else: items = fetch(self.BACKEND, backend_args, manager=self.archive_manager) try: for item in items: obj = json.dumps(item, indent=4, sort_keys=True) self.outfile.write(obj) self.outfile.write('\n') except IOError as e: raise RuntimeError(str(e)) except Exception as e: raise RuntimeError(str(e)) def _pre_init(self): """Override to execute before backend is initialized.""" pass def _post_init(self): """Override to execute after backend is initialized.""" pass def _initialize_archive(self): """Initialize archive based on the parsed parameters""" if 'archive_path' not in self.parsed_args: manager = None elif self.parsed_args.no_archive: manager = None else: if not self.parsed_args.archive_path: archive_path = os.path.expanduser(ARCHIVES_DEFAULT_PATH) else: archive_path = self.parsed_args.archive_path manager = ArchiveManager(archive_path) self.archive_manager = manager @staticmethod def setup_cmd_parser(): raise NotImplementedError def uuid(*args): """Generate a UUID based on the given parameters. The UUID will be the SHA1 of the concatenation of the values from the list. The separator bewteedn these values is ':'. Each value must be a non-empty string, otherwise, the function will raise an exception. :param *args: list of arguments used to generate the UUID :returns: a universal unique identifier :raises ValueError: when anyone of the values is not a string, is empty or `None`. """ def check_value(v): if not isinstance(v, str): raise ValueError("%s value is not a string instance" % str(v)) elif not v: raise ValueError("value cannot be None or empty") else: return v s = ':'.join(map(check_value, args)) sha1 = hashlib.sha1(s.encode('utf-8', errors='surrogateescape')) uuid_sha1 = sha1.hexdigest() return uuid_sha1 def fetch(backend_class, backend_args, manager=None): """Fetch items using the given backend. Generator to get items using the given backend class. When an archive manager is given, this function will store the fetched items in an `Archive`. If an exception is raised, this archive will be removed to avoid corrupted archives. The parameters needed to initialize the `backend` class and get the items are given using `backend_args` dict parameter. :param backend_class: backend class to fetch items :param backend_args: dict of arguments needed to fetch the items :param manager: archive manager needed to store the items :returns: a generator of items """ init_args = find_signature_parameters(backend_class.__init__, backend_args) archive = manager.create_archive() if manager else None init_args['archive'] = archive backend = backend_class(**init_args) fetch_args = find_signature_parameters(backend.fetch, backend_args) items = backend.fetch(**fetch_args) try: for item in items: yield item except Exception as e: if manager: archive_path = archive.archive_path manager.remove_archive(archive_path) raise e def fetch_from_archive(backend_class, backend_args, manager, category, archived_after): """Fetch items from an archive manager. Generator to get the items of a category (previously fetched by the given backend class) from an archive manager. Only those items archived after the given date will be returned. The parameters needed to initialize `backend` and get the items are given using `backend_args` dict parameter. :param backend_class: backend class to retrive items :param backend_args: dict of arguments needed to retrieve the items :param manager: archive manager where the items will be retrieved :param category: category of the items to retrieve :param archived_after: return items archived after this date :returns: a generator of archived items """ init_args = find_signature_parameters(backend_class.__init__, backend_args) backend = backend_class(**init_args) filepaths = manager.search(backend.origin, backend.__class__.__name__, category, archived_after) for filepath in filepaths: backend.archive = Archive(filepath) items = backend.fetch_from_archive() try: for item in items: yield item except ArchiveError as e: logger.warning("Ignoring %s archive due to: %s", filepath, str(e)) def find_backends(top_package): """Find available backends. Look for the Perceval backends and commands under `top_package` and its sub-packages. When `top_package` defines a namespace, backends under that same namespace will be found too. :param top_package: package storing backends :returns: a tuple with two dicts: one with `Backend` classes and one with `BackendCommand` classes """ candidates = pkgutil.walk_packages(top_package.__path__, prefix=top_package.__name__ + '.') modules = [name for _, name, is_pkg in candidates if not is_pkg] return _import_backends(modules) def _import_backends(modules): for module in modules: importlib.import_module(module) bkls = _find_classes(Backend, modules) ckls = _find_classes(BackendCommand, modules) backends = {name: kls for name, kls in bkls} commands = {name: klass for name, klass in ckls} return backends, commands def _find_classes(parent, modules): parents = parent.__subclasses__() while parents: kls = parents.pop() m = kls.__module__ if m not in modules: continue name = m.split('.')[-1] parents.extend(kls.__subclasses__()) yield name, kls
sduenas/perceval
perceval/backend.py
Python
gpl-3.0
19,497
# StoreM ## Overview ## Installation Should be as simple as pip install StoreM ## Example usage ## Help If you experience any problems using StoreM, open an [issue](https://github.com/minillinim/StoreM/issues) on GitHub and tell us about it. ## Licence and referencing Project home page, info on the source tree, documentation, issues and how to contribute, see http://github.com/minillinim/StoreM This software is currently unpublished ## Copyright Copyright (c) 2014444 Michael Imelfort. See LICENSE.txt for further details.
minillinim/StoreM
README.md
Markdown
gpl-3.0
543
package com.earth2me.essentials; import net.ess3.api.IEssentials; import net.ess3.api.IUser; import org.bukkit.Location; import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; import java.util.UUID; import java.util.concurrent.CompletableFuture; import static com.earth2me.essentials.I18n.tl; public class AsyncTimedTeleport implements Runnable { private static final double MOVE_CONSTANT = 0.3; private final IUser teleportOwner; private final IEssentials ess; private final AsyncTeleport teleport; private final UUID timer_teleportee; private final long timer_started; // time this task was initiated private final long timer_delay; // how long to delay the teleportPlayer private final CompletableFuture<Boolean> parentFuture; // note that I initially stored a clone of the location for reference, but... // when comparing locations, I got incorrect mismatches (rounding errors, looked like) // so, the X/Y/Z values are stored instead and rounded off private final long timer_initX; private final long timer_initY; private final long timer_initZ; private final ITarget timer_teleportTarget; private final boolean timer_respawn; private final boolean timer_canMove; private final Trade timer_chargeFor; private final TeleportCause timer_cause; private int timer_task; private double timer_health; AsyncTimedTeleport(final IUser user, final IEssentials ess, final AsyncTeleport teleport, final long delay, final IUser teleportUser, final ITarget target, final Trade chargeFor, final TeleportCause cause, final boolean respawn) { this(user, ess, teleport, delay, null, teleportUser, target, chargeFor, cause, respawn); } AsyncTimedTeleport(final IUser user, final IEssentials ess, final AsyncTeleport teleport, final long delay, final CompletableFuture<Boolean> future, final IUser teleportUser, final ITarget target, final Trade chargeFor, final TeleportCause cause, final boolean respawn) { this.teleportOwner = user; this.ess = ess; this.teleport = teleport; this.timer_started = System.currentTimeMillis(); this.timer_delay = delay; this.timer_health = teleportUser.getBase().getHealth(); this.timer_initX = Math.round(teleportUser.getBase().getLocation().getX() * MOVE_CONSTANT); this.timer_initY = Math.round(teleportUser.getBase().getLocation().getY() * MOVE_CONSTANT); this.timer_initZ = Math.round(teleportUser.getBase().getLocation().getZ() * MOVE_CONSTANT); this.timer_teleportee = teleportUser.getBase().getUniqueId(); this.timer_teleportTarget = target; this.timer_chargeFor = chargeFor; this.timer_cause = cause; this.timer_respawn = respawn; this.timer_canMove = user.isAuthorized("essentials.teleport.timer.move"); timer_task = ess.runTaskTimerAsynchronously(this, 20, 20).getTaskId(); if (future != null) { this.parentFuture = future; return; } final CompletableFuture<Boolean> cFuture = new CompletableFuture<>(); cFuture.exceptionally(e -> { ess.showError(teleportOwner.getSource(), e, "\\ teleport"); return false; }); this.parentFuture = cFuture; } @Override public void run() { if (teleportOwner == null || !teleportOwner.getBase().isOnline() || teleportOwner.getBase().getLocation() == null) { cancelTimer(false); return; } final IUser teleportUser = ess.getUser(this.timer_teleportee); if (teleportUser == null || !teleportUser.getBase().isOnline()) { cancelTimer(false); return; } final Location currLocation = teleportUser.getBase().getLocation(); if (currLocation == null) { cancelTimer(false); return; } if (!timer_canMove && (Math.round(currLocation.getX() * MOVE_CONSTANT) != timer_initX || Math.round(currLocation.getY() * MOVE_CONSTANT) != timer_initY || Math.round(currLocation.getZ() * MOVE_CONSTANT) != timer_initZ || teleportUser.getBase().getHealth() < timer_health)) { // user moved, cancelTimer teleportPlayer cancelTimer(true); return; } class DelayedTeleportTask implements Runnable { @Override public void run() { timer_health = teleportUser.getBase().getHealth(); // in case user healed, then later gets injured final long now = System.currentTimeMillis(); if (now > timer_started + timer_delay) { try { teleport.cooldown(false); } catch (final Throwable ex) { teleportOwner.sendMessage(tl("cooldownWithMessage", ex.getMessage())); if (teleportOwner != teleportUser) { teleportUser.sendMessage(tl("cooldownWithMessage", ex.getMessage())); } } try { cancelTimer(false); teleportUser.sendMessage(tl("teleportationCommencing")); if (timer_chargeFor != null) { timer_chargeFor.isAffordableFor(teleportOwner); } if (timer_respawn) { teleport.respawnNow(teleportUser, timer_cause, parentFuture); } else { teleport.nowAsync(teleportUser, timer_teleportTarget, timer_cause, parentFuture); } parentFuture.thenAccept(success -> { if (timer_chargeFor != null) { try { timer_chargeFor.charge(teleportOwner); } catch (final ChargeException ex) { ess.showError(teleportOwner.getSource(), ex, "\\ teleport"); } } }); } catch (final Exception ex) { ess.showError(teleportOwner.getSource(), ex, "\\ teleport"); } } } } ess.scheduleSyncDelayedTask(new DelayedTeleportTask()); } //If we need to cancelTimer a pending teleportPlayer call this method void cancelTimer(final boolean notifyUser) { if (timer_task == -1) { return; } try { ess.getServer().getScheduler().cancelTask(timer_task); if (notifyUser) { teleportOwner.sendMessage(tl("pendingTeleportCancelled")); if (timer_teleportee != null && !timer_teleportee.equals(teleportOwner.getBase().getUniqueId())) { ess.getUser(timer_teleportee).sendMessage(tl("pendingTeleportCancelled")); } } } finally { timer_task = -1; } } }
drtshock/Essentials
Essentials/src/main/java/com/earth2me/essentials/AsyncTimedTeleport.java
Java
gpl-3.0
7,164
#!/usr/bin/env python from __future__ import print_function from glob import glob from tempfile import NamedTemporaryFile import sys from alibuild_helpers.log import debug, error, info from os import remove from alibuild_helpers.utilities import format from alibuild_helpers.cmd import execute from alibuild_helpers.utilities import detectArch from alibuild_helpers.utilities import parseRecipe, getRecipeReader def deps(recipesDir, topPackage, outFile, buildRequires, transitiveRed, disable): dot = {} keys = [ "requires" ] if buildRequires: keys.append("build_requires") for p in glob("%s/*.sh" % recipesDir): debug(format("Reading file %(filename)s", filename=p)) try: err, recipe, _ = parseRecipe(getRecipeReader(p)) name = recipe["package"] if name in disable: debug("Ignoring %s, disabled explicitly" % name) continue except Exception as e: error(format("Error reading recipe %(filename)s: %(type)s: %(msg)s", filename=p, type=type(e).__name__, msg=str(e))) sys.exit(1) dot[name] = dot.get(name, []) for k in keys: for d in recipe.get(k, []): d = d.split(":")[0] d in disable or dot[name].append(d) selected = None if topPackage != "all": if not topPackage in dot: error(format("Package %(topPackage)s does not exist", topPackage=topPackage)) return False selected = [ topPackage ] olen = 0 while len(selected) != olen: olen = len(selected) selected += [ x for s in selected if s in dot for x in dot[s] if not x in selected ] selected.sort() result = "digraph {\n" for p,deps in list(dot.items()): if selected and not p in selected: continue result += " \"%s\";\n" % p for d in deps: result += " \"%s\" -> \"%s\";\n" % (p,d) result += "}\n" with NamedTemporaryFile(delete=False) as fp: fp.write(result) try: if transitiveRed: execute(format("tred %(dotFile)s > %(dotFile)s.0 && mv %(dotFile)s.0 %(dotFile)s", dotFile=fp.name)) execute(["dot", fp.name, "-Tpdf", "-o", outFile]) except Exception as e: error(format("Error generating dependencies with dot: %(type)s: %(msg)s", type=type(e).__name__, msg=str(e))) else: info(format("Dependencies graph generated: %(outFile)s", outFile=outFile)) remove(fp.name) return True def depsArgsParser(parser): parser.add_argument("topPackage") parser.add_argument("-a", "--architecture", help="force architecture", dest="architecture", default=detectArch()) parser.add_argument("--dist", dest="distDir", default="alidist", help="Recipes directory") parser.add_argument("--output-file", "-o", dest="outFile", default="dist.pdf", help="Output file (PDF format)") parser.add_argument("--debug", "-d", dest="debug", action="store_true", default=False, help="Debug output") parser.add_argument("--build-requires", "-b", dest="buildRequires", action="store_true", default=False, help="Debug output") parser.add_argument("--neat", dest="neat", action="store_true", default=False, help="Neat graph with transitive reduction") parser.add_argument("--disable", dest="disable", default=[], help="List of packages to ignore") return parser
dberzano/alibuild
alibuild_helpers/deps.py
Python
gpl-3.0
3,451
QUnit.test( "TestDate", function( assert ) { var converter = new DataTypeConverter(); var value = "CAF 92"; var dt = converter.inferDataTypeOfValue(value); assert.equal(dt, DataTypeConverter.TYPES.TEXT, "Text /" + value + "/ correctly recognized."); var value = "2023-04"; var dt = converter.inferDataTypeOfValue(value); assert.equal(dt.type, DataTypeConverter.TYPES.DATETIME, "Text /" + value + "/ correctly recognized."); var value = "2016-03-07"; var dt = converter.inferDataTypeOfValue(value); assert.equal(dt.type, DataTypeConverter.TYPES.DATETIME, "Text /" + value + "/ correctly recognized."); var value = "02600"; var dt = converter.inferDataTypeOfValue(value); assert.equal(dt, DataTypeConverter.TYPES.TEXT, "Text /" + value + "/ correctly recognized."); var value = "0"; var dt = converter.inferDataTypeOfValue(value); assert.equal(dt, DataTypeConverter.TYPES.NUMBER, "Text /" + value + "/ correctly recognized."); var value = "02/03/2016 18:57"; var dt = converter.inferDataTypeOfValue(value); assert.equal(dt.type, DataTypeConverter.TYPES.DATETIME, "Text /" + value + "/ correctly recognized."); var value = "02/03/2016"; var dt = converter.inferDataTypeOfValue(value); assert.equal(dt.type, DataTypeConverter.TYPES.DATETIME, "Text /" + value + "/ correctly recognized."); var value = "2016-03-07T11:26:17+00:00"; var dt = converter.inferDataTypeOfValue(value); assert.equal(dt.type, DataTypeConverter.TYPES.DATETIME, "Text /" + value + "/ correctly recognized."); var value = "92077-02"; var dt = converter.inferDataTypeOfValue(value); assert.equal(dt, DataTypeConverter.TYPES.TEXT, "Text /" + value + "/ correctly recognized."); var value = "1936.27"; var dt = converter.inferDataTypeOfValue(value); assert.equal(dt, DataTypeConverter.TYPES.NUMBER, "Text /" + value + "/ correctly recognized."); var value = "50/50/2016"; var dt = converter.inferDataTypeOfValue(value); assert.equal(dt, DataTypeConverter.TYPES.TEXT, "Text /" + value + "/ correctly recognized."); var value = "02/13/2016"; var dt = converter.inferDataTypeOfValue(value); assert.equal(dt.type, DataTypeConverter.TYPES.DATETIME, "Text /" + value + "/ correctly recognized."); var value = "12/26/2016"; var dt = converter.inferDataTypeOfValue(value); assert.equal(dt.type, DataTypeConverter.TYPES.DATETIME, "Text /" + value + "/ correctly recognized."); var value = "1/1/2016"; var dt = converter.inferDataTypeOfValue(value); assert.equal(dt.type, DataTypeConverter.TYPES.DATETIME, "Text /" + value + "/ correctly recognized."); var value = "01/1/2016"; var dt = converter.inferDataTypeOfValue(value); assert.equal(dt.type, DataTypeConverter.TYPES.DATETIME, "Text /" + value + "/ correctly recognized."); var value = "01/1/250"; var dt = converter.inferDataTypeOfValue(value); assert.equal(dt.type, DataTypeConverter.TYPES.DATETIME, "Text /" + value + "/ correctly recognized."); var value = "520/12/1"; var dt = converter.inferDataTypeOfValue(value); assert.equal(dt.type, DataTypeConverter.TYPES.DATETIME, "Text /" + value + "/ correctly recognized."); var value = "520/12"; var dt = converter.inferDataTypeOfValue(value); assert.equal(dt.type, DataTypeConverter.TYPES.DATETIME, "Text /" + value + "/ correctly recognized."); var value = "520/50"; var dt = converter.inferDataTypeOfValue(value); assert.equal(dt, DataTypeConverter.TYPES.TEXT, "Text /" + value + "/ correctly recognized."); /*var value = "1936,27"; var dt = converter.inferDataTypeOfValue(value); assert.equal(dt, DataTypeConverter.TYPES.NUMBER, "Text /" + value + "/ correctly recognized.");*/ }); QUnit.test("TestIsPercentage", function (assert) { var converter = new DataTypeConverter(); var value = "5%"; var isperc = DataTypesUtils.FilterPercentage(value); assert.ok(isperc, value + " recognized."); var dt = converter.inferDataTypeOfValue(value); assert.equal(dt.type, DataTypeConverter.TYPES.NUMBER, "Text /" + value + "/ correctly recognized."); assert.equal(dt.subtype, DataTypeConverter.TYPES.PERCENTAGE, "Text /" + value + "/ correctly recognized."); var value = "5 %"; var isperc = DataTypesUtils.FilterPercentage(value); assert.ok(isperc, value + " recognized."); assert.equal(dt.type, DataTypeConverter.TYPES.NUMBER, "Text /" + value + "/ correctly recognized."); assert.equal(dt.subtype, DataTypeConverter.TYPES.PERCENTAGE, "Text /" + value + "/ correctly recognized."); var value = "%5%"; var isperc = DataTypesUtils.FilterPercentage(value); assert.equal(isperc, null, value + " recognized."); var dt = converter.inferDataTypeOfValue(value); assert.equal(dt, DataTypeConverter.TYPES.TEXT, "Text /" + value + "/ correctly recognized."); var value = "%"; var isperc = DataTypesUtils.FilterPercentage(value); assert.equal(isperc, null, value + " recognized."); var dt = converter.inferDataTypeOfValue(value); assert.equal(dt, DataTypeConverter.TYPES.TEXT, "Text /" + value + "/ correctly recognized."); var value = "%5"; var isperc = DataTypesUtils.FilterPercentage(value); assert.equal(isperc, null, value + " recognized."); var dt = converter.inferDataTypeOfValue(value); assert.equal(dt, DataTypeConverter.TYPES.TEXT, "Text /" + value + "/ correctly recognized."); }); QUnit.test("TestIsNumber", function(assert) { var converter = new DataTypeConverter(); var value = "1936"; var isnumber = DataTypesUtils.FilterNumber(value); assert.ok(isnumber, value + " recognized."); var dt = converter.inferDataSubTypeOfValue(value); assert.equal(dt, DataTypeConverter.SUBTYPES.NUMINTEGER, "Text /" + value + "/ correctly recognized."); var value = "1936.27"; var isnumber = DataTypesUtils.FilterNumber(value); assert.ok(isnumber, value + " recognized."); var dt = converter.inferDataSubTypeOfValue(value); assert.equal(dt, DataTypeConverter.SUBTYPES.NUMREAL, "Text /" + value + "/ correctly recognized."); var value = "-1936.27"; var isnumber = DataTypesUtils.FilterNumber(value); assert.ok(isnumber, value + " recognized."); var dt = converter.inferDataSubTypeOfValue(value); assert.equal(dt, DataTypeConverter.SUBTYPES.NUMREAL, "Text /" + value + "/ correctly recognized."); var value = "+1936.27"; var isnumber = DataTypesUtils.FilterNumber(value); assert.ok(isnumber, value + " recognized."); var dt = converter.inferDataSubTypeOfValue(value); assert.equal(dt, DataTypeConverter.SUBTYPES.NUMREAL, "Text /" + value + "/ correctly recognized."); var value = "1936,27"; var isnumber = DataTypesUtils.FilterNumber(value); assert.ok(isnumber, value + " recognized."); var dt = converter.inferDataSubTypeOfValue(value); assert.equal(dt, DataTypeConverter.SUBTYPES.NUMREAL, "Text /" + value + "/ correctly recognized."); var value = "-1936,27"; var isnumber = DataTypesUtils.FilterNumber(value); assert.ok(isnumber, value + " recognized."); var dt = converter.inferDataSubTypeOfValue(value); assert.equal(dt, DataTypeConverter.SUBTYPES.NUMREAL, "Text /" + value + "/ correctly recognized."); var value = "+1936,27"; var isnumber = DataTypesUtils.FilterNumber(value); assert.ok(isnumber, value + " recognized."); var dt = converter.inferDataSubTypeOfValue(value); assert.equal(dt, DataTypeConverter.SUBTYPES.NUMREAL, "Text /" + value + "/ correctly recognized."); var value = "1.936.27"; var isnumber = DataTypesUtils.FilterNumber(value); assert.notOk(isnumber, value + " recognized."); var value = "1,936,27"; var isnumber = DataTypesUtils.FilterNumber(value); assert.notOk(isnumber, value + " recognized."); var value = "1.936,27"; var isnumber = DataTypesUtils.FilterNumber(value); assert.notOk(isnumber, value + " recognized."); var value = "1,936.27"; var isnumber = DataTypesUtils.FilterNumber(value); assert.notOk(isnumber, value + " recognized."); var value = "1936."; var isnumber = DataTypesUtils.FilterNumber(value); assert.notOk(isnumber, value + " recognized."); var value = "1936,"; var isnumber = DataTypesUtils.FilterNumber(value); assert.notOk(isnumber, value + " recognized."); var value = "1936,07"; var isnumber = DataTypesUtils.FilterNumber(value); assert.ok(isnumber, value + " recognized."); var dt = converter.inferDataSubTypeOfValue(value); assert.equal(dt, DataTypeConverter.SUBTYPES.NUMREAL, "Text /" + value + "/ correctly recognized."); });
donpir/JSDataChecker
tests/TestCase01_InferDataTypeOnSingleValue/DataTypeSingleValueTestCase.js
JavaScript
gpl-3.0
8,748
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.6.0_27) on Sat Oct 06 02:59:33 EDT 2012 --> <META http-equiv="Content-Type" content="text/html; charset=utf-8"> <TITLE> Uses of Class org.apache.lucene.util.encoding.NOnesIntEncoder (Lucene 4.0.0 API) </TITLE> <META NAME="date" CONTENT="2012-10-06"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Class org.apache.lucene.util.encoding.NOnesIntEncoder (Lucene 4.0.0 API)"; } } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <HR> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../org/apache/lucene/util/encoding/NOnesIntEncoder.html" title="class in org.apache.lucene.util.encoding"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;PREV&nbsp; &nbsp;NEXT</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../index.html?org/apache/lucene/util/encoding//class-useNOnesIntEncoder.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="NOnesIntEncoder.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <CENTER> <H2> <B>Uses of Class<br>org.apache.lucene.util.encoding.NOnesIntEncoder</B></H2> </CENTER> No usage of org.apache.lucene.util.encoding.NOnesIntEncoder <P> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../org/apache/lucene/util/encoding/NOnesIntEncoder.html" title="class in org.apache.lucene.util.encoding"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;PREV&nbsp; &nbsp;NEXT</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../index.html?org/apache/lucene/util/encoding//class-useNOnesIntEncoder.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="NOnesIntEncoder.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> <address>Copyright &copy; 2000-2012 Apache Software Foundation. All Rights Reserved.</address> <script src='../../../../../../prettify.js' type='text/javascript'></script> <script type='text/javascript'> (function(){ var oldonload = window.onload; if (typeof oldonload != 'function') { window.onload = prettyPrint; } else { window.onload = function() { oldonload(); prettyPrint(); } } })(); </script> </BODY> </HTML>
dburgmann/fbRecommender
lib/lucene-4.0.0/docs/facet/org/apache/lucene/util/encoding/class-use/NOnesIntEncoder.html
HTML
gpl-3.0
6,462
// Copyright 2010 apanloco // // 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/>. #pragma once class Settings { public: Settings(); virtual ~Settings() { } bool parse() { return true; } int step; int heightMargin; float paddleOffset; float paddleWidth; float paddleHeight; float ballSize; float ballSpeed; float ballRotation; float factBallStabilize; float factCollisionSpinAngle; float factCollisionSpinDamp; float factPaddleCollisionSpin; float factPaddleCollisionAngle; float factAirSpinDamp; float factAirSpinAngle; float factAirPaddleSpeedDamp; float factBallAcceleration; float factPaddleAcceleration; float factPaddleCollisionDamp; };
apanloco/SpinPong
Settings.h
C
gpl-3.0
1,295
<!DOCTYPE html> <html xml:lang="en-GB" lang="en-GB" xmlns="http://www.w3.org/1999/xhtml"> <head lang="en-GB"> <title>Ross Gammon’s Family Tree - Events</title> <meta charset="UTF-8" /> <meta name ="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=1" /> <meta name ="apple-mobile-web-app-capable" content="yes" /> <meta name="generator" content="Gramps 4.2.8 http://gramps-project.org/" /> <meta name="author" content="" /> <link href="../../../images/favicon2.ico" rel="shortcut icon" type="image/x-icon" /> <link href="../../../css/narrative-screen.css" media="screen" rel="stylesheet" type="text/css" /> <link href="../../../css/narrative-print.css" media="print" rel="stylesheet" type="text/css" /> </head> <body> <div id="header"> <h1 id="SiteTitle">Ross Gammon’s Family Tree</h1> </div> <div class="wrapper" id="nav" role="navigation"> <div class="container"> <ul class="menu" id="dropmenu"> <li><a href="../../../individuals.html" title="Individuals">Individuals</a></li> <li><a href="../../../index.html" title="Surnames">Surnames</a></li> <li><a href="../../../families.html" title="Families">Families</a></li> <li class = "CurrentSection"><a href="../../../events.html" title="Events">Events</a></li> <li><a href="../../../places.html" title="Places">Places</a></li> <li><a href="../../../sources.html" title="Sources">Sources</a></li> <li><a href="../../../repositories.html" title="Repositories">Repositories</a></li> <li><a href="../../../media.html" title="Media">Media</a></li> <li><a href="../../../thumbnails.html" title="Thumbnails">Thumbnails</a></li> </ul> </div> </div> <div class="content" id="EventDetail"> <h3>Birth</h3> <table class="infolist eventlist"> <tbody> <tr> <td class="ColumnAttribute">Gramps ID</td> <td class="ColumnGRAMPSID">E8410</td> </tr> <tr> <td class="ColumnAttribute">Date</td> <td class="ColumnColumnDate"> 1852-10-20 </td> </tr> <tr> <td class="ColumnAttribute">Place</td> <td class="ColumnColumnPlace"> <a href="../../../plc/8/b/d15f5fe4a70b506a719fe81b8.html" title=""> </a> </td> </tr> </tbody> </table> <div class="subsection" id="references"> <h4>References</h4> <ol class="Col1" role="Volume-n-Page"type = 1> <li> <a href="../../../ppl/3/b/d15f601556c74923d672b4ce1b3.html"> MILLS, Mary Ann Eliza <span class="grampsid"> [I7879]</span> </a> </li> </ol> </div> </div> <div class="fullclear"></div> <div id="footer"> <p id="createdate"> Generated by <a href="http://gramps-project.org/">Gramps</a> 4.2.8<br />Last change was the 2015-08-05 19:54:35<br />Created for <a href="../../../ppl/9/e/d15f5fb48902c4fc1b421d249e9.html">GAMMON, Francis</a> </p> <p id="copyright"> </p> </div> </body> </html>
RossGammon/the-gammons.net
RossFamilyTree/evt/0/b/d15f60155762dd8fdab3082dfb0.html
HTML
gpl-3.0
2,915
#include <iostream> #include <vector> #include <cmath> #include <fstream> #include "utils.h" using namespace std; using namespace Eigen; double euclidean_dist(Point2d p, Point2d q) { return sqrt((q.x-p.x)*(q.x-p.x) + (q.y-p.y)*(q.y-p.y)); } double angle_two_points(Point2d p, Point2d q) { double theta; double dot, pnorm, qnorm; dot = p.x * q.x + p.y * q.y; pnorm = sqrt(p.x * p.x + p.y * p.y); qnorm = sqrt(q.x * q.x + q.y * q.y); theta = acos(dot/(pnorm*qnorm)); return theta * 180.0 / PI; } double min_function(double p, double q){ if(p <= q) { return p; } else return q; } double max_function(double p, double q){ if(p >= q) { return p; } else return q; } bool read_points(string fname, vector<Point> &points){ ifstream input(fname.c_str()); int x, y, size = 0, i; if(!input){ cerr << "The file could not be opened! (Utils)" << endl; return false; } while(input >> x >> y){ size++; } points.resize(size); input.clear(); input.seekg(0, ios::beg); for(i = 0; i < size; ++i){ input >> points[i].x >> points[i].y; } return true; } pair<Matrix3d, Vector3d> kalman_filter(Vector3d pos_cam, Vector2d v_w, Vector3d last_pos , double dt, Matrix3d last_P){ double v = 1.14 * v_w[0], w = 1.14 * v_w[1], ds = v * dt, dw = w * dt; double b = 0.055; //Distância entre eixos do carrinho 'CHECK' double dsr = ds + (b*dw)/2, dsl = ds - (b*dw)/2; double kr = 9, kl = 9; Vector3d prediction, pos_predicted, pos_current; Matrix2d covar; Matrix3d P = last_P, C, R, I, fp, P_predicted, K; MatrixXd fdrl(3, 2), inv; pair<Matrix3d, Vector3d> res; C = MatrixXd::Identity(3,3); I = MatrixXd::Identity(3,3); R << 0,0 ,0 , 0 ,0,0 , 0 ,0 ,6.14071137584 ; //6.14071137584 estava no lugar do 6 a matrix R 9.23765359168e-07 7.93803166352e-07 //Kalman Extended prediction << ds*cos((last_pos(2,0)+dw/2)*PI/180), ds*sin((last_pos(2,0)+dw/2)*PI/180), dw; pos_predicted = last_pos + prediction; covar << kr*abs(dsr),0 , 0 ,kl*abs(dsl); fp << 1, 0, -ds*sin((last_pos(2,0)+dw/2)*PI/180), 0, 1, ds*cos((last_pos(2,0)+dw/2)*PI/180) , 0, 0, 1 ; fdrl << (1/2)*cos((last_pos(2,0)+dw/2)*PI/180)-ds/(2*b)*sin((last_pos(2,0)+dw/2)*PI/180), (1/2)*cos((last_pos(2,0)+dw/2)*PI/180)+ds/(2*b)*sin((last_pos(2,0)+dw/2)*PI/180), (1/2)*sin((last_pos(2,0)+dw/2)*PI/180)+ds/(2*b)*cos((last_pos(2,0)+dw/2)*PI/180), (1/2)*sin((last_pos(2,0)+dw/2)*PI/180)-ds/(2*b)*cos((last_pos(2,0)+dw/2)*PI/180), 1/b , -1/b ; P_predicted = (fp * P * fp.transpose()) + (fdrl * covar * fdrl.transpose()); inv = C * P_predicted * C.transpose() + R; K = P_predicted * C.transpose() * inv.inverse(); pos_current = pos_predicted + K * (pos_cam - C * pos_predicted); P = (I - K * C) * P_predicted; res.first = P; res.second = pos_current; return res; } vector<int> hsv2rgb(vector<int> in) { double hh, p, q, t, ff; long i; vector<int> out(3); if(in[1] <= 0.0) { // < is bogus, just shuts up warnings out[0] = in[2]; out[1] = in[2]; out[2] = in[2]; return out; } hh = in[0]; if(hh >= 360.0) hh = 0.0; hh /= 60.0; i = (long)hh; ff = hh - i; p = in[2] * (1.0 - in[1]); q = in[2] * (1.0 - (in[1] * ff)); t = in[2] * (1.0 - (in[1] * (1.0 - ff))); switch(i) { case 0: out[0] = in[2]; out[1] = t; out[2] = p; break; case 1: out[0] = q; out[1] = in[2]; out[2] = p; break; case 2: out[0] = p; out[1] = in[2]; out[2] = t; break; case 3: out[0] = p; out[1] = q; out[2] = in[2]; break; case 4: out[0] = t; out[1] = p; out[2] = in[2]; break; case 5: default: out[0] = in[2]; out[1] = p; out[2] = q; break; } //cout << out[0] << " " << out[1] << " " << out[2] << endl; return out; } bool sort_by_smallest_x(Point a, Point b){ return a.x < b.x; } bool sort_by_smallest_y(Point a, Point b){ return a.y < b.y; } bool sort_by_largest_x(Point a, Point b){ return a.x > b.x; } bool sort_by_largest_y(Point a, Point b){ return a.y > b.y; } bool sort_by_larger_area(vector<Point> p0, vector<Point> p1) { if(p0.size() == 0 || p1.size() == 0) return false; return contourArea(p0) < contourArea(p1); } bool area_limit(vector<Point> p){ if(contourArea(p) < MIN_ROBOT_AREA || contourArea(p) > MAX_ROBOT_AREA){ return 1; } return 0; } bool ball_area_limit(vector<Point> p){ if(contourArea(p) > MAX_BALL_AREA){ return 1; } return 0; } pair <double, double> Low_pass_filter_coeff (float cutoff) { pair <double, double> coeff; double a; double b; a = ( 1 - sin(cutoff) ) / cos(cutoff); b = ( 1 - a)/2; coeff.first = a; coeff.second = b; return coeff; } Point Low_pass_filter_Centroid(Point centroid, Point last_centroid, Point last_proc_centroid, pair<double, double> coeff) { double x; double y; x = coeff.second * centroid.x + coeff.second * last_centroid.x + coeff.first * last_proc_centroid.x; y = coeff.second * centroid.y + coeff.second * last_centroid.y + coeff.first * last_proc_centroid.y; Point centroid_proc = Point(x, y); return centroid_proc; } double Low_pass_filter_Theta(double angle, double last_angle, double last_proc_angle, pair<double, double> coeff) { return coeff.second * angle + coeff.second * last_angle + coeff.first * last_proc_angle; }
mateus558/RinoBot-System
utils.cpp
C++
gpl-3.0
6,141
/**************************************************************************** ** ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the QtNfc module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL21$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and Digia. For licensing terms and ** conditions see http://qt.digia.com/licensing. For further information ** use the contact form at http://qt.digia.com/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 or version 3 as published by the Free ** Software Foundation and appearing in the file LICENSE.LGPLv21 and ** LICENSE.LGPLv3 included in the packaging of this file. Please review the ** following information to ensure the GNU Lesser General Public License ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Digia gives you certain additional ** rights. These rights are described in the Digia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #ifndef QNDEFFILTER_H #define QNDEFFILTER_H #include <QtCore/QSharedDataPointer> #include <QtNfc/qnfcglobal.h> #include <QtNfc/QNdefRecord> QT_BEGIN_NAMESPACE class QNdefFilterPrivate; class Q_NFC_EXPORT QNdefFilter { public: QNdefFilter(); QNdefFilter(const QNdefFilter &other); ~QNdefFilter(); void clear(); void setOrderMatch(bool on); bool orderMatch() const; struct Record { QNdefRecord::TypeNameFormat typeNameFormat; QByteArray type; unsigned int minimum; unsigned int maximum; }; template<typename T> void appendRecord(unsigned int min = 1, unsigned int max = 1); void appendRecord(QNdefRecord::TypeNameFormat typeNameFormat, const QByteArray &type, unsigned int min = 1, unsigned int max = 1); void appendRecord(const Record &record); int recordCount() const; Record recordAt(int i) const; QNdefFilter &operator=(const QNdefFilter &other); private: QSharedDataPointer<QNdefFilterPrivate> d; }; template <typename T> void QNdefFilter::appendRecord(unsigned int min, unsigned int max) { T record; appendRecord(record.typeNameFormat(), record.type(), min, max); } QT_END_NAMESPACE #endif // QNDEFFILTER_H
gberryproject/gberry
gberry-console/qt5rpi/deploy/usr/local/qt5pi/include/QtNfc/qndeffilter.h
C
gpl-3.0
2,846
/* * Copyright (c) 2015 OpenSilk Productions LLC * * 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 org.opensilk.music.library.client; import android.content.Context; import android.database.ContentObserver; import android.net.Uri; import android.os.Bundle; import android.os.Handler; import android.os.Looper; import org.opensilk.bundleable.Bundleable; import org.opensilk.common.core.dagger2.ForApplication; import org.opensilk.common.core.rx.RxLoader; import org.opensilk.common.core.util.Preconditions; import org.opensilk.music.library.internal.IBundleableObserver; import org.opensilk.music.library.provider.LibraryExtras; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; import javax.inject.Inject; import rx.Observable; import rx.Scheduler; import rx.Subscriber; import rx.android.schedulers.AndroidSchedulers; import rx.functions.Action1; import rx.functions.Func0; import rx.functions.Func1; import timber.log.Timber; import static org.opensilk.music.library.provider.LibraryMethods.LIST; /** * Created by drew on 9/28/15. */ public class TypedBundleableLoader<T extends Bundleable> implements RxLoader<T> { class UriObserver extends ContentObserver { UriObserver(Handler handler) { super(handler); } @Override public void onChange(boolean selfChange) { reset(); for (ContentChangedListener l : contentChangedListeners) { l.reload(); } } @Override public void onChange(boolean selfChange, Uri uri) { onChange(selfChange); } } private final Set<ContentChangedListener> contentChangedListeners = new LinkedHashSet<>(); private final Context context; private Uri uri; private String sortOrder; private String method = LIST; private Scheduler observeOnScheduler = AndroidSchedulers.mainThread(); private UriObserver uriObserver; private Observable<List<T>> cachedObservable; @Inject public TypedBundleableLoader(@ForApplication Context context) { this.context = context; } public static <T extends Bundleable> TypedBundleableLoader<T> create(Context context) { return new TypedBundleableLoader<>(context.getApplicationContext()); } public Observable<List<T>> getListObservable() { registerContentObserver(); //The reason we cache it is for layout changes if (cachedObservable == null) { cachedObservable = createObservable() .doOnError(new Action1<Throwable>() { @Override public void call(Throwable throwable) { reset(); dump(throwable); } }) .observeOn(observeOnScheduler) .cache(); } return cachedObservable; } public Observable<T> getObservable() { return getListObservable().flatMap(new Func1<List<T>, Observable<T>>() { @Override public Observable<T> call(List<T> bundleables) { return Observable.from(bundleables); } }); } public Observable<List<T>> createObservable() { return Observable.using( new Func0<LibraryClient>() { @Override public LibraryClient call() { //We use a client to help ensure the provider //wont disappear while sending us the list return LibraryClient.create(context, uri); } }, new Func1<LibraryClient, Observable<? extends List<T>>>() { @Override public Observable<? extends List<T>> call(final LibraryClient libraryClient) { return Observable.create(new Observable.OnSubscribe<List<T>>() { @Override public void call(final Subscriber<? super List<T>> subscriber) { IBundleableObserver callback = new BundleableObserver<T>(subscriber); LibraryExtras.Builder extras = LibraryExtras.b() .putUri(uri) .putSortOrder(sortOrder) .putBundleableObserverCallback(callback); Bundle ok = libraryClient.makeCall(method, extras.get()); if (!LibraryExtras.getOk(ok)) { subscriber.onError(LibraryExtras.getCause(ok)); } } }); } }, new Action1<LibraryClient>() { @Override public void call(LibraryClient libraryClient) { libraryClient.release(); } }, true //We may not receive an unsubscribe ); } public void reset() { cachedObservable = null; } protected void registerContentObserver() { if (uriObserver == null) { uriObserver = new UriObserver(new Handler(Looper.getMainLooper())); context.getContentResolver().registerContentObserver(uri, true, uriObserver); } } public void addContentChangedListener(ContentChangedListener l) { contentChangedListeners.add(l); } public void removeContentChangedListener(ContentChangedListener l) { contentChangedListeners.remove(l); } public TypedBundleableLoader<T> setUri(Uri uri) { this.uri = uri; return this; } public TypedBundleableLoader<T> setSortOrder(String sortOrder) { this.sortOrder = sortOrder; return this; } public TypedBundleableLoader<T> setMethod(String method) { this.method = method; return this; } public TypedBundleableLoader<T> setObserveOnScheduler(Scheduler scheduler) { this.observeOnScheduler = Preconditions.checkNotNull(scheduler, "Scheduler must not be null"); return this; } protected void emmitError(Throwable t, Subscriber<? super Bundleable> subscriber) { if (subscriber.isUnsubscribed()) return; subscriber.onError(t); dump(t); } protected void dump(Throwable throwable) { Timber.e(throwable, "BundleableLoader(\nuri=%s\nsortOrder=%s\n) ex=", uri, sortOrder); } }
OpenSilk/Orpheus
core-library-client/src/main/java/org/opensilk/music/library/client/TypedBundleableLoader.java
Java
gpl-3.0
7,305
/** * This software is provided by NOAA for full, free and open release. It is * understood by the recipient/user that NOAA assumes no liability for any * errors contained in the code. Although this software is released without * conditions or restrictions in its use, it is expected that appropriate * credit be given to its author and to the National Oceanic and Atmospheric * Administration should the software be included by the recipient as an * element in other product development. */ package ncBrowse.sgt.dm; import ncBrowse.sgt.SGLabel; import ncBrowse.sgt.geom.GeoDate; import ncBrowse.sgt.geom.SoTPoint; import ncBrowse.sgt.geom.SoTRange; import java.beans.PropertyChangeListener; import java.beans.PropertyChangeSupport; import java.io.Serializable; /** * <code>SimplePoint</code> provides an implementation of the * <code>SGTPoint</code> and <code>Cartesian</code> interfaces. * * @author Donald Denbo * @version $Revision: 1.14 $, $Date: 2003/08/22 23:02:38 $ * @since 1.0 * @see SGTPoint * @see Cartesian */ public class SimplePoint implements SGTPoint, Cartesian, Cloneable, Serializable { protected double xloc_ = Double.NaN; protected double yloc_ = Double.NaN; protected long tloc_; protected boolean xTime_ = false; protected boolean yTime_ = false; protected double value_; protected String title_; protected SGLabel keyTitle_ = null; protected String id_ = null; /**@shapeType AggregationLink * @clientRole value*/ protected SGTMetaData valueMetaData_; /** * @link aggregation * @clientRole x */ protected SGTMetaData xMetaData_; /** * @link aggregation * @clientRole y*/ protected SGTMetaData yMetaData_; protected boolean hasValue_ = false; private PropertyChangeSupport changes_ = new PropertyChangeSupport(this); /** * Default constructor. */ public SimplePoint() { } /** * Simple Point constructor. * * @param xloc X coordinate * @param yloc Y coordinate * @param title the title */ public SimplePoint(double xloc,double yloc,String title) { xloc_ = xloc; yloc_ = yloc; title_ = title; } /** * Simple Point constructor. * * @since 3.0 * * @param loc SoTPoint * @param title the title */ public SimplePoint(SoTPoint loc, String title) { xTime_ = loc.isXTime(); yTime_ = loc.isYTime(); if(xTime_) { tloc_ = loc.getX().getLongTime(); } else { xloc_ = ((Number)loc.getX().getObjectValue()).doubleValue(); } if(yTime_) { tloc_ = loc.getY().getLongTime(); } else { yloc_ = ((Number)loc.getY().getObjectValue()).doubleValue(); } title_ = title; } /** * Create a copy. * * @since 2.0 * @see SGTData */ public SGTData copy() { SGTPoint newPoint; try { newPoint = (SGTPoint)clone(); } catch (CloneNotSupportedException e) { newPoint = new SimplePoint(); } return newPoint; } /** * Get the X coordinate. */ public double getX() { return xloc_; } /** * Get the Y coordinate */ public double getY() { return yloc_; } /** * Get the associated value. */ public double getValue() { return value_; } /** * Is there an associated value? */ public boolean hasValue() { return hasValue_; } /** * Get the time coordinate. */ public GeoDate getTime() { return new GeoDate(tloc_); } /** * Get the time in <code>long</code> referenced * to 1970-01-01 * * @since 3.0 */ public long getLongTime() { return tloc_; } /** * Set the time coordinate * * @since 3.0 */ public void setTime(GeoDate date) { setTime(date.getTime()); } /** * @since 3.0 */ public void setTime(long t) { long old = tloc_; tloc_ = t; changes_.firePropertyChange("dataModified", old, tloc_); } /** * Is the X coordinate Time? */ public boolean isXTime() { return xTime_; } /** * Is the Y coordinate Time? */ public boolean isYTime() { return yTime_; } /** * Get the title. */ public String getTitle() { return title_; } /** * Set the title. */ public void setTitle(String title) { title_ = title; } public SGLabel getKeyTitle() { return keyTitle_; } /** Set the title formatted for the <code>VectorKey</code>. */ public void setKeyTitle(SGLabel title) { keyTitle_ = title; } /** * Get the unique identifier. The presence of the identifier * is optional, but if it is present it should be unique. This * field is used to search for the layer that contains the data. * * @since 2.0 * @return unique identifier * @see ncBrowse.sgt.Pane * @see ncBrowse.sgt.Layer */ public String getId() { return id_; } /** * Set the unique identifier. */ public void setId(String ident) { id_ = ident; } /** * Get the associated value SGTMetaData. */ public SGTMetaData getValueMetaData() { return valueMetaData_; } /** * Set the X coordinate. * <BR><B>Property Change:</B> <code>dataModified</code>. */ public void setX(double xloc) { double old = xloc_; xloc_ = xloc; changes_.firePropertyChange("dataModified", old, xloc_); } /** * Set the Y coordinate. * <BR><B>Property Change:</B> <code>dataModified</code>. */ public void setY(double yloc) { double old = yloc_; yloc_ = yloc; changes_.firePropertyChange("dataModified", old, yloc_); } /** * The the associated value and basic metadata. * <BR><B>Property Change:</B> <code>associatedDataModified</code>. * * @param value associated data * @param name values name * @param units values units */ public void setValue(double value,String name,String units) { double old = value_; value_ = value; valueMetaData_ = new SGTMetaData(name, units); hasValue_ = true; changes_.firePropertyChange("associatedDataModified", old, value_); } /** * Set the <code>SGTMetaData</code> associated with the x * coordinate * * @since 2.0 */ public void setXMetaData(SGTMetaData md) { xMetaData_ = md; } /** * Set the <code>SGTMetaData</code> associated with the y * coordinate * * @since 2.0 */ public void setYMetaData(SGTMetaData md) { yMetaData_ = md; } public SGTMetaData getXMetaData() { return xMetaData_; } public SGTMetaData getYMetaData() { return yMetaData_; } public SoTRange getXRange() { if(xTime_) { return new SoTRange.Time(tloc_, tloc_); } else { return new SoTRange.Double(xloc_, xloc_); } } public SoTRange getYRange() { if(yTime_) { return new SoTRange.Time(tloc_, tloc_); } else { return new SoTRange.Double(yloc_, yloc_); } } public void addPropertyChangeListener(PropertyChangeListener l) { changes_.addPropertyChangeListener(l); } public void removePropertyChangeListener(PropertyChangeListener l) { changes_.removePropertyChangeListener(l); } }
MaxwellM/ncBrowse-revamp-CAPSTONE
src/ncBrowse/sgt/dm/SimplePoint.java
Java
gpl-3.0
7,850
<!doctype html> <html> <head> <title>MX-14 About</title> <link href="custom.css" rel="stylesheet" type="text/css"> </head> <body> <h1>MX-14: About</h1> <a href="http://www.mepiscommunity.org/mx14"><img src="mxfcelogo.png" width="80" height="74" alt="MX-14" style="margin-left:45%;" /></a> <div style="margin-bottom:1em;"><img src="mouse.png" width="50" height="40" />Note: RC=right click</div> <div style="text-align: center"><div style="margin-bottom:1em;"><a href="index.html">QuickStart</a> | <a href="customization.html">Customization</a> | <a href="files.html">Files</a> | <a href="localization.html" >Localization </a> | <a href="mxapps.html" >MX Apps</a> | <a href="network.html" >Network</a> | <a href="persistence.html" >Persistence</a> | <a href="remaster.html" >Remaster</a> | <a href="samba.html" >Samba</a> | <a href="smxi.html" >smxi</a> | <a href="sound.html" >Sound</a> | <a href="synaptic.html" >Synaptic</a> | <a href="advanced.html" >Advanced</a> | <a href="about.html">About</a> </div></div> <div class="blue"><h2>Introduction</h2></div> <p>MX-14 relies on the excellent upstream work by <a href="http://www.kernel.org">Linux</a>, <a href="http://www.debian.org">Debian</a>, and <a href="http://www.xfce.org">Xfce</a>. It also incorporates the independent and innovative development products <a href="http://gottcode.org/">Whisker Menu</a>, <a href="http://smxi.org/">smxi</a> and <a href="https://code.google.com/p/inxi/">inxi</a>.</p> <div class="blue"><h2>Individual credits</h2></div> <p>The following Development Team members played a particularly significant role in the creation of MX-14.</p> <ul><li>Lead Developer: anticapitalista</li> <li>Primary Coders/Packagers: Adrian, BitJam, kmathern, Stevo, timkb4cq <li>Project Manager: jerry3904</li> <li>Significant contributors: chrispop99, dolphin_oracle, Eadwine Rose, fu-sen, Gaer Boy, Ko, m_pav, megatotoro, namida12, pcallahan80, richb, Utopia, zeeone</li></ul> <p>Special thanks for strong support of this project go to the Mepis Community Packagers.</p> <div class="blue"><h2>Contact Info:</h2></div> <ul> <li>Help: <a href="http://forum.mepiscommunity.org/viewforum.php?f=104">MX Help Forum</a></li> <li>Development Team: <b>mxdevs AT mxlinux.org</b></li> </ul> <div class="footer">Version: 1.0<br /> Last updated 2014-011-25</div> </body> </html> </div>
anticapitalista/mx-docs
doc/about.html
HTML
gpl-3.0
2,372
<?php /** * @version $Id: openbay.php 3583 2014-04-11 11:27:28Z mic $ * @package Translation German * @author mic - http://osworx.net * @copyright 2013 OSWorX - http://osworx.net * @license GPL - www.gnu.org/copyleft/gpl.html */ // Heading $_['lang_heading_title'] = 'OpenBay Pro'; $_['lang_text_manager'] = 'OpenBay Pro Verwaltung'; // Text $_['text_install'] = '<span style="color:grey;">Installieren</span>'; $_['text_uninstall'] = '<span style="color:red;">Deinstallieren</span>'; $_['lang_text_success'] = 'Einstellungen erfolgreich gespeichert'; $_['lang_text_no_results'] = 'Keine Ergebnisse vorhanden'; $_['lang_checking_version'] = 'Überprüfe Softwareversion'; $_['lang_btn_manage'] = 'Verwalten'; $_['lang_btn_retry'] = 'Wiederholen'; $_['lang_btn_save'] = 'Speichern'; $_['lang_btn_cancel'] = 'Abbrechen'; $_['lang_btn_update'] = 'Update'; $_['lang_btn_settings'] = 'Einstellungen'; $_['lang_btn_patch'] = 'Patch'; $_['lang_btn_test'] = 'Verbindungstest'; $_['lang_latest'] = 'Die neueste Version ist in Verwendung'; $_['lang_installed_version'] = 'Installierte Version'; $_['lang_admin_dir'] = 'Adminverzeichnis'; $_['lang_admin_dir_desc'] = 'Wurde das Adminverzeichnis (Standard admin) geändert, dann hier den neuen Ordnernamen angeben'; $_['lang_version_old_1'] = 'Eine neue Version ist verfügbar - die installierte ist'; $_['lang_version_old_2'] = 'die neueste ist'; $_['lang_use_beta'] = 'Verwende eine Betarelease'; $_['lang_use_beta_2'] = '<span style="color:red;">NICHT empfohlen!</span>'; $_['lang_test_conn'] = 'Teste FTP-Verbindung'; $_['lang_text_run_1'] = 'Update ausführen'; $_['lang_text_run_2'] = 'Los'; $_['lang_no'] = 'Nein'; $_['lang_yes'] = 'Ja'; $_['lang_language'] = 'API Antwortsprache'; $_['lang_getting_messages'] = 'Hole OpenBay Pro Nachrichten'; // Column $_['lang_column_name'] = 'Pluginname'; $_['lang_column_status'] = 'Status'; $_['lang_column_action'] = 'Aktion'; // Error $_['error_permission'] = 'Hinweis: keine Rechte zum Bearbeiten dieses Moduls!'; $_['lang_error_retry'] = 'Kann keine Verbindung zum OpenBay-Server aufbauen.'; // Updates $_['lang_use_pasv'] = 'Verwende passives FTP'; $_['field_ftp_user'] = 'FTP Benutzername'; $_['field_ftp_pw'] = 'FTP Passwort'; $_['field_ftp_server_address'] = 'FTP Serveradresse'; $_['field_ftp_root_path'] = 'FTP Pfad auf Server'; $_['field_ftp_root_path_info'] = '(Keine führenden Slashes z.B. httpdocs/www)'; $_['desc_ftp_updates'] = 'Updates aktivieren bedeutet kein manuelles Bearbeiten. Es werden keine FTP-Daten an die API gesendet.<br />'; //Updates $_['lang_run_patch_desc'] = 'Update Patch angeben<span class="help">Nur notwendig bei einem manuellem Update</span>'; $_['lang_run_patch'] = 'Wende Patch an'; $_['update_error_username'] = 'Benutzername fehlt'; $_['update_error_password'] = 'Passwort fehlt'; $_['update_error_server'] = 'Serveradresse fehlt'; $_['update_error_admindir'] = 'Adminverzeichnis fehlt'; $_['update_okcon_noadmin'] = 'Verbindung OK, aber das lokale Adminverzeichnis kann nicht gefunden werden'; $_['update_okcon_nofiles'] = 'Verbindung OK, aber das lokale Shopverzeichnis kann nicht gefunden werden - ist der root-Pfad richtig?'; $_['update_okcon'] = 'Verbindung OK, Shopverzeichnis gefunden'; $_['update_failed_user'] = 'Mit diesem Benutzer ist keine Anmeldung möglich'; $_['update_failed_connect'] = 'Kann den Server nicht erreichen'; $_['update_success'] = 'Modul wurde aktualisiert (v.%s)'; $_['lang_patch_notes1'] = 'Änderungen aktueller und früherer Updates'; $_['lang_patch_notes2'] = 'hier klicken'; $_['lang_patch_notes3'] = 'Dieses Tool ändert Shopdateien! Bitte vorher eine Datensicherung durchführen!'; //Help tab $_['lang_help_title'] = 'Hilfe &amp; Unterstützung'; $_['lang_help_support_title'] = 'Unterstützung'; $_['lang_help_support_description'] = 'Bitte zuerst die <a href="http://shop.openbaypro.com/index.php?route=information/faq" title="OpenBay Pro für OpenCart FAQ" target="_blank">FAQ</a> lesen, eventuell gibt es schon eine Antwort auf die Frage. <br />Falls dennoch nicht, kann <a href="http://support.welfordmedia.co.uk" title="OpenBay Pro für OpenCart Support" target="_blank">hier</a> ein neues Ticket erstellt werden'; $_['lang_help_template_title'] = 'Neue eBay Vorlage'; $_['lang_help_template_description'] = 'Informationen für Entwickler &amp; Designer zur Vorlagenerstellung <a href="http://shop.openbaypro.com/index.php?route=information/faq&topic=30" title="OpenBay Pro HTML Vorlagen für eBay" target="_blank">hier</a>'; $_['lang_tab_help'] = 'Hilfe'; $_['lang_help_guide'] = 'Benutzeranweisungen'; $_['lang_help_guide_description'] = 'Downladen und lokal Handbücher für eBay &amp; Amazon ansehen <a href="http://shop.openbaypro.com/index.php?route=information/faq&topic=37" title="OpenBay Pro Benutzeranweisungen" target="_blank">hier klicken</a>'; $_['lang_mcrypt_text_false'] = 'Die PHP-Funktion "mcrypt_encrypt" ist nicht aktiviert - bitte Provider kontaktieren.'; $_['lang_mb_text_false'] = 'Die PHP-Bibliothek "mb strings" ist nicht aktiviert - bitte Provider kontaktieren.'; $_['lang_ftp_text_false'] = 'Einige PHP FTP-Funktionen sind nicht verfügbar - bitte Provider kontaktieren.'; $_['lang_error_oc_version'] = 'Die installierte Shopversion wurde noch nicht mit diesem Modul getestet - es können unerwartete Probleme auftauchen.'; $_['lang_patch_applied'] = 'Patch angewendet'; $_['faqbtn'] = 'FAQ ansehen'; $_['lang_clearfaq'] = 'Bereinige versteckte FAQ popups'; $_['lang_clearfaqbtn'] = 'Reinigen'; // Ajax elements $_['lang_ajax_ebay_shipped'] = 'Der Auftrag wird bei eBay automatisch als versendet markiert'; $_['lang_ajax_play_shipped'] = 'Der Auftrag wird bei play.com automatisch als versendet markiert'; $_['lang_ajax_amazoneu_shipped'] = 'Der Auftrag wird bei Amazon EU automatisch als versendet markiert'; $_['lang_ajax_amazonus_shipped'] = 'Der Auftrag wird bei Amazon US automatisch als versendet markiert'; $_['lang_ajax_play_refund'] = 'Eine Rückerstattung für dieses Auftrag wird bei play.com automatisch erstellt'; $_['lang_ajax_refund_reason'] = 'Grund für Rückerstattung'; $_['lang_ajax_refund_message'] = 'Rückerstattung Nachricht'; $_['lang_ajax_refund_entermsg'] = 'Es muss eine Nachricht zur Rückersattung angegeben werden'; $_['lang_ajax_refund_charmsg'] = 'Rückerstattungsnachricht muss weniger als 1.000 Zeichen lang sein'; $_['lang_ajax_refund_charmsg2'] = 'Die Nachricht darf kein < sowie > enthalten'; $_['lang_ajax_courier'] = 'Botendienst'; $_['lang_ajax_courier_other'] = 'Anderer Botendienst'; $_['lang_ajax_tracking'] = 'Nachverfolgungsnr.'; $_['lang_ajax_tracking_msg'] = 'Es muss eine Nachverfolgungsnr. angegeben werden, falls keine vorhanden dann "none" angeben'; $_['lang_ajax_tracking_msg2'] = 'Die Nachverfolgungsnr. darf keine < sowie > enthalten'; $_['lang_ajax_tracking_msg3'] = 'Es muss ein Botendienst ausgewählt werden wenn eine Nachverfolgungsnr. hochgeladen werden soll.'; $_['lang_ajax_tracking_msg4'] = 'Feld für Botendienst leer lassen wenn keiner verwendet wird.'; $_['lang_title_help'] = 'Hilfe zu OpenBay Pro benötigt?'; $_['lang_pod_help'] = 'Hilfe'; $_['lang_title_manage'] = 'Verwaltet OpenBay Pro; Updates, Einstellungen und mehr'; $_['lang_pod_manage'] = 'Verwalten'; $_['lang_title_shop'] = 'OpenBay Pro Shop; Eerweiterungen, Vorlagen und mehr'; $_['lang_pod_shop'] = 'Shop'; $_['lang_checking_messages'] = 'Überprüfe auf Nachrichten'; $_['lang_title_messages'] = 'Nachrichten &amp; Mitteilungen'; $_['lang_error_retry'] = 'Keine Verbindung zum OpenBay-Server möglich.'; ?>
Vitronic/kaufreund.de
admin/language/de_DE/extension/openbay.php
PHP
gpl-3.0
8,765
<?php /** * The plugin bootstrap file * * This file is read by WordPress to generate the plugin information in the plugin * admin area. This file also includes all of the dependencies used by the plugin, * registers the activation and deactivation functions, and defines a function * that starts the plugin. * * @link http://www.coderscom.com/ * @since 1.0.0 * @package Wp_Odoo_Form_Integrator * * @wordpress-plugin * Plugin Name: WP Odoo Form Integrator * Plugin URI: http://www.coderscom.com/ * Description: WP Odoo Form Integrator plugin is a bridge between several highly used Wordpress form plugins and Odoo. * Version: 1.0.0 * Author: Coderscom * Author URI: http://www.coderscom.com/ * License: GPL-2.0+ * License URI: http://www.gnu.org/licenses/gpl-2.0.txt * Text Domain: wp-odoo-form-integrator * Domain Path: /languages */ // If this file is called directly, abort. if ( ! defined( 'WPINC' ) ) { die; } // Register class name of modules here. $wp_odoo_form_modules = array( 'Wp_Odoo_Form_Integrator_Form_Contact_7', 'Wp_Odoo_Form_Integrator_Ninja_Forms', 'Wp_Odoo_Form_Integrator_Formidable_Forms' ); /** * Include all of the form integration files */ foreach ( glob( dirname( __FILE__ ) . "/modules/*.*" ) as $filename ) { require_once $filename; } /** * The code that runs during plugin activation. * This action is documented in includes/class-wp-odoo-form-integrator-activator.php */ function activate_wp_odoo_form_integrator() { require_once plugin_dir_path( __FILE__ ) . 'includes/class-wp-odoo-form-integrator-activator.php'; Wp_Odoo_Form_Integrator_Activator::activate(); } /** * The code that runs during plugin deactivation. * This action is documented in includes/class-wp-odoo-form-integrator-deactivator.php */ function deactivate_wp_odoo_form_integrator() { require_once plugin_dir_path( __FILE__ ) . 'includes/class-wp-odoo-form-integrator-deactivator.php'; Wp_Odoo_Form_Integrator_Deactivator::deactivate(); } register_activation_hook( __FILE__, 'activate_wp_odoo_form_integrator' ); register_deactivation_hook( __FILE__, 'deactivate_wp_odoo_form_integrator' ); /** * The core plugin class that is used to define internationalization, * admin-specific hooks, and public-facing site hooks. */ require plugin_dir_path( __FILE__ ) . 'includes/class-wp-odoo-form-integrator.php'; /** * Begins execution of the plugin. * * Since everything within the plugin is registered via hooks, * then kicking off the plugin from this point in the file does * not affect the page life cycle. * * @since 1.0.0 */ function run_wp_odoo_form_integrator() { $plugin = new Wp_Odoo_Form_Integrator(); $plugin->run(); } run_wp_odoo_form_integrator();
coderscom/wp-odoo-form-integrator
wp-odoo-form-integrator.php
PHP
gpl-3.0
2,847
from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() from caed import views urlpatterns = patterns('', # Examples: # url(r'^$', 'project.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/', include(admin.site.urls)), url(r'^$',views.last_incidents,name='index'), )
julianofischer/caederm
project/urls.py
Python
gpl-3.0
377
Test directory ============== Provides small examples of beamer presentations, compilable with different configurations. Observations have been written in the different files for my machine. Presentations: * `basic`: only simple beamer constructions (slides, transitions, blocks) * `labels`: same as basic, sets slide labels Configurations: * `pdfpc`: generate small pdfpc text file * `disabled`: remove notes completely Compile in one of the presentation folders, using `pdflatex ../<config>.tex`.
lereldarion/pdftalk
test/Readme.md
Markdown
gpl-3.0
503
package uk.ac.bbsrc.tgac.miso.migration.source; import static org.junit.Assert.*; import java.io.FileNotFoundException; import java.io.IOException; import org.junit.Before; import org.junit.Test; import uk.ac.bbsrc.tgac.miso.core.data.Pool; import uk.ac.bbsrc.tgac.miso.core.data.Run; import uk.ac.bbsrc.tgac.miso.core.data.SequencerPartitionContainer; import uk.ac.bbsrc.tgac.miso.migration.MigrationData; import uk.ac.bbsrc.tgac.miso.migration.MigrationProperties; public class LoadGeneratorSourceTest { private static final String testProperties = "target/test-classes/LoadGeneratorTest.properties"; private LoadGeneratorSource sut; @Before public void setUp() throws FileNotFoundException, IOException { sut = new LoadGeneratorSource(new MigrationProperties(testProperties)); } @Test public void testGetMigrationData() { MigrationData data = sut.getMigrationData(); assertNotNull(data.getProjects()); assertEquals(5, data.getProjects().size()); assertNotNull(data.getSamples()); assertEquals(100, data.getSamples().size()); assertNotNull(data.getLibraries()); assertEquals(100, data.getLibraries().size()); assertNotNull(data.getLibraryAliquots()); assertEquals(100, data.getLibraryAliquots().size()); assertNotNull(data.getPools()); assertEquals(100, data.getPools().size()); Pool p = data.getPools().iterator().next(); assertNotNull(p.getPoolContents()); assertEquals(5, p.getPoolContents().size()); assertNotNull(data.getRuns()); assertEquals(100, data.getRuns().size()); Run r = data.getRuns().iterator().next(); assertNotNull(r.getSequencerPartitionContainers()); assertEquals(1, r.getSequencerPartitionContainers().size()); SequencerPartitionContainer spc = r.getSequencerPartitionContainers().get(0); assertNotNull(spc.getPartitions()); assertEquals(8, spc.getPartitions().size()); } }
TGAC/miso-lims
migration/src/test/java/uk/ac/bbsrc/tgac/miso/migration/source/LoadGeneratorSourceTest.java
Java
gpl-3.0
1,926
// Copyright 2002-2013, University of Colorado Boulder /** * Detector for absorbance (A) and percent transmittance (%T). * * @author Chris Malley (PixelZoom, Inc.) */ define( function( require ) { 'use strict'; // modules var ATDetector = require( 'BEERS_LAW_LAB/beerslaw/model/ATDetector' ); var Image = require( 'SCENERY/nodes/Image' ); var inherit = require( 'PHET_CORE/inherit' ); var MeterBodyNode = require( 'SCENERY_PHET/MeterBodyNode' ); var MovableDragHandler = require( 'SCENERY_PHET/input/MovableDragHandler' ); var Node = require( 'SCENERY/nodes/Node' ); var Path = require( 'SCENERY/nodes/Path' ); var PhetFont = require( 'SCENERY_PHET/PhetFont' ); var AquaRadioButton = require( 'SUN/AquaRadioButton' ); var Shape = require( 'KITE/Shape' ); var StringUtils = require( 'PHETCOMMON/util/StringUtils' ); var Text = require( 'SCENERY/nodes/Text' ); var Util = require( 'DOT/Util' ); var Vector2 = require( 'DOT/Vector2' ); //strings var absorbanceString = require( 'string!BEERS_LAW_LAB/absorbance' ); var pattern_0percent = require( 'string!BEERS_LAW_LAB/pattern.0percent' ); var transmittanceString = require( 'string!BEERS_LAW_LAB/transmittance' ); // images var bodyLeftImage = require( 'image!BEERS_LAW_LAB/at-detector-body-left.png' ); var bodyCenterImage = require( 'image!BEERS_LAW_LAB/at-detector-body-center.png' ); var bodyRightImage = require( 'image!BEERS_LAW_LAB/at-detector-body-right.png' ); var probeImage = require( 'image!BEERS_LAW_LAB/at-detector-probe.png' ); // constants var BUTTONS_X_MARGIN = 25; // specific to image files var BUTTONS_Y_OFFSET = 66; // specific to image files var VALUE_X_MARGIN = 30; // specific to image files var VALUE_CENTER_Y = 24; // specific to image files var ABSORBANCE_DECIMAL_PLACES = 2; var TRANSMITTANCE_DECIMAL_PLACES = 2; var NO_VALUE = '-'; var PROBE_CENTER_Y_OFFSET = 55; // specific to image file /** * The body of the detector, where A and T values are displayed. * Note that while the body is a Movable, we have currently decided not to allow it to be moved, * so it has no drag handler * @param {ATDetector} detector * @param {ModelViewTransform2} modelViewTransform * @constructor */ function BodyNode( detector, modelViewTransform ) { var thisNode = this; Node.call( thisNode ); // buttons for changing the detector 'mode' var textOptions = { font: new PhetFont( 18 ), fill: 'white' }; var transmittanceButton = new AquaRadioButton( detector.mode, ATDetector.Mode.TRANSMITTANCE, new Text( transmittanceString, textOptions ) ); var absorbanceButton = new AquaRadioButton( detector.mode, ATDetector.Mode.ABSORBANCE, new Text( absorbanceString, textOptions ) ); // group the buttons var buttonGroup = new Node(); buttonGroup.addChild( transmittanceButton ); buttonGroup.addChild( absorbanceButton ); absorbanceButton.x = transmittanceButton.x; absorbanceButton.top = transmittanceButton.bottom + 6; // value display var maxValue = 100; var valueNode = new Text( maxValue.toFixed( ABSORBANCE_DECIMAL_PLACES ), { font: new PhetFont( 24 ) } ); // background image, sized to fit var bodyWidth = Math.max( buttonGroup.width, valueNode.width ) + ( 2 * BUTTONS_X_MARGIN ); var backgroundNode = new MeterBodyNode( bodyWidth, bodyLeftImage, bodyCenterImage, bodyRightImage ); // rendering order thisNode.addChild( backgroundNode ); thisNode.addChild( buttonGroup ); thisNode.addChild( valueNode ); // layout buttonGroup.left = BUTTONS_X_MARGIN; buttonGroup.top = BUTTONS_Y_OFFSET; valueNode.x = VALUE_X_MARGIN; valueNode.top = VALUE_CENTER_Y; // body location detector.body.locationProperty.link( function( location ) { thisNode.translation = modelViewTransform.modelToViewPosition( location ); } ); // update the value display var valueUpdater = function() { var value = detector.value.get(); if ( isNaN( value ) ) { valueNode.text = NO_VALUE; valueNode.centerX = backgroundNode.centerX; } else { if ( detector.mode.get() === ATDetector.Mode.TRANSMITTANCE ) { valueNode.text = StringUtils.format( pattern_0percent, value.toFixed( TRANSMITTANCE_DECIMAL_PLACES ) ); } else { valueNode.text = value.toFixed( ABSORBANCE_DECIMAL_PLACES ); } valueNode.right = backgroundNode.right - VALUE_X_MARGIN; // right justified } }; detector.value.link( valueUpdater ); detector.mode.link( valueUpdater ); } inherit( Node, BodyNode ); /** * The probe portion of the detector. * @param {Movable} probe * @param {Light} light * @param {ModelViewTransform2} modelViewTransform * @constructor */ function ProbeNode( probe, light, modelViewTransform ) { var thisNode = this; Node.call( thisNode ); var imageNode = new Image( probeImage ); thisNode.addChild( imageNode ); imageNode.x = -imageNode.width / 2; imageNode.y = -PROBE_CENTER_Y_OFFSET; // location probe.locationProperty.link( function( location ) { thisNode.translation = modelViewTransform.modelToViewPosition( location ); } ); // interactivity thisNode.cursor = 'pointer'; thisNode.addInputListener( new MovableDragHandler( probe, modelViewTransform, { endDrag: function() { // If the light is on and the probe is close enough to the beam... if ( light.on.get() && ( probe.locationProperty.get().x >= light.location.x ) && ( Math.abs( probe.locationProperty.get().y - light.location.y ) <= 0.5 * light.lensDiameter ) ) { // ... snap the probe to the center of beam. probe.locationProperty.set( new Vector2( probe.locationProperty.get().x, light.location.y ) ); } } } ) ); // touch area var dx = 0.25 * imageNode.width; var dy = 0 * imageNode.height; thisNode.touchArea = Shape.rectangle( imageNode.x - dx, imageNode.y - dy, imageNode.width + dx + dx, imageNode.height + dy + dy ); } inherit( Node, ProbeNode ); /** * Wire that connects the body and probe. * @param {Movable} body * @param {Movable} probe * @param {Node} bodyNode * @param {Node} probeNode * @constructor */ function WireNode( body, probe, bodyNode, probeNode ) { var thisNode = this; Path.call( this, new Shape(), { stroke: 'gray', lineWidth: 8, lineCap: 'square', lineJoin: 'round', pickable: false } ); var updateCurve = function() { // connection points var bodyConnectionPoint = new Vector2( bodyNode.centerX, bodyNode.bottom ); var probeConnectionPoint = new Vector2( probeNode.centerX, probeNode.bottom ); // control points // The y coordinate of the body's control point varies with the x distance between the body and probe. var c1Offset = new Vector2( 0, Util.linear( 0, 800, 0, 200, bodyNode.centerX - probeNode.left ) ); // x distance -> y coordinate var c2Offset = new Vector2( 50, 150 ); var c1 = new Vector2( bodyConnectionPoint.x + c1Offset.x, bodyConnectionPoint.y + c1Offset.y ); var c2 = new Vector2( probeConnectionPoint.x + c2Offset.x, probeConnectionPoint.y + c2Offset.y ); // cubic curve thisNode.shape = new Shape() .moveTo( bodyConnectionPoint.x, bodyConnectionPoint.y ) .cubicCurveTo( c1.x, c1.y, c2.x, c2.y, probeConnectionPoint.x, probeConnectionPoint.y ); }; body.locationProperty.link( updateCurve ); probe.locationProperty.link( updateCurve ); } inherit( Path, WireNode ); /** * @param {ATDetector} detector * @param {Light} light * @param {ModelViewTransform2} modelViewTransform * @constructor */ function ATDetectorNode( detector, light, modelViewTransform ) { Node.call( this ); var bodyNode = new BodyNode( detector, modelViewTransform ); var probeNode = new ProbeNode( detector.probe, light, modelViewTransform ); var wireNode = new WireNode( detector.body, detector.probe, bodyNode, probeNode ); this.addChild( wireNode ); this.addChild( bodyNode ); this.addChild( probeNode ); } return inherit( Node, ATDetectorNode ); } );
concord-consortium/beers-law-lab
js/beerslaw/view/ATDetectorNode.js
JavaScript
gpl-3.0
8,297
/** * <p>Title: ShowAllEmojiPackage.java</p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2014</p> * <p>Company: ColdWorks</p> * @author xuming * @date 2014-9-23 * @version 1.0 */ package com.lengtoo.impress.web.struts1.action.client2; import java.text.SimpleDateFormat; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import com.google.gson.Gson; import com.lengtoo.impress.returndata.ReturnData; import com.lengtoo.impress.service.ILengtooEmojipackageService; /** * <p>Title: ShowAllEmojiPackage.java</p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2014</p> * <p>Company: ColdWorks</p> * @author xuming * @date 2014-9-23 * Email: vip6ming@126.com */ public class ShowAllEmojiPackage extends Action{ private ILengtooEmojipackageService eService; public void seteService(ILengtooEmojipackageService eService) { this.eService = eService; } @Override public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { Map result = new HashMap(); Map paramsMap = new HashMap(); boolean success = false; int msg = 0; boolean isOk = false; boolean refresh = Boolean.parseBoolean(request.getParameter("refresh")); String date = null; if(refresh) { SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); date = sf.format(new Date()); }else { date = request.getParameter("date"); } int limit; try { limit = Integer.parseInt(request.getParameter("limit")); } catch (Exception e) { limit = 10; } if(limit>20 || limit<0) { limit = 10; } paramsMap.put("date", date); paramsMap.put("limit", limit); try { List<Map> list = eService.getAllEmojipackage_client(paramsMap); isOk = true; if(list.size() !=0) { success = true; msg = 11;//success }else { success = true; msg = 12;//数据为空 } result.put("emojipackagelist", list); Gson g = new Gson(); String json = g.toJson(list); } catch (Exception e) { e.printStackTrace(); msg = 2; } ReturnData.returnData(response, result, success, msg); return null; } }
DuoLife/lengtooyinxiang
src/com/lengtoo/impress/web/struts1/action/client2/ShowAllEmojiPackage.java
Java
gpl-3.0
2,459
/* * Pixel Dungeon * Copyright (C) 2012-2015 Oleg Dolya * * Shattered Pixel Dungeon * Copyright (C) 2014-2021 Evan Debenham * * 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.shatteredpixel.shatteredpixeldungeon.journal; import com.shatteredpixel.shatteredpixeldungeon.Badges; import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.armor.ClothArmor; import com.shatteredpixel.shatteredpixeldungeon.items.armor.HuntressArmor; import com.shatteredpixel.shatteredpixeldungeon.items.armor.LeatherArmor; import com.shatteredpixel.shatteredpixeldungeon.items.armor.MageArmor; import com.shatteredpixel.shatteredpixeldungeon.items.armor.MailArmor; import com.shatteredpixel.shatteredpixeldungeon.items.armor.PlateArmor; import com.shatteredpixel.shatteredpixeldungeon.items.armor.RogueArmor; import com.shatteredpixel.shatteredpixeldungeon.items.armor.ScaleArmor; import com.shatteredpixel.shatteredpixeldungeon.items.armor.WarriorArmor; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.AlchemistsToolkit; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.ChaliceOfBlood; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.CloakOfShadows; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.DriedRose; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.EtherealChains; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.HornOfPlenty; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.MasterThievesArmband; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.SandalsOfNature; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.TalismanOfForesight; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.TimekeepersHourglass; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.UnstableSpellbook; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfExperience; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfFrost; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHaste; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfInvisibility; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfLevitation; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfLiquidFlame; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfMindVision; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfParalyticGas; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfPurity; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfStrength; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfToxicGas; import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfAccuracy; import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfElements; import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfEnergy; import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfEvasion; import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfForce; import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfFuror; import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfHaste; import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfMight; import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfSharpshooting; import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfTenacity; import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfWealth; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfIdentify; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfLullaby; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMagicMapping; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMirrorImage; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRage; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRecharging; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRemoveCurse; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRetribution; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTerror; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTransmutation; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfUpgrade; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfBlastWave; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfCorrosion; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfCorruption; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfDisintegration; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfFireblast; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfFrost; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfLightning; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfLivingEarth; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfMagicMissile; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfPrismaticLight; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfRegrowth; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfTransfusion; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfWarding; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.AssassinsBlade; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.BattleAxe; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Crossbow; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Dagger; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Dirk; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Flail; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Gauntlet; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Glaive; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Gloves; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Greataxe; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Greatshield; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Greatsword; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.HandAxe; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Longsword; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Mace; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagesStaff; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Quarterstaff; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.RoundShield; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.RunicBlade; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Sai; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Scimitar; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Shortsword; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Spear; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Sword; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.WarHammer; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Whip; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.WornShortsword; import com.watabou.utils.Bundle; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.LinkedHashMap; import java.util.List; public enum Catalog { WEAPONS, ARMOR, WANDS, RINGS, ARTIFACTS, POTIONS, SCROLLS; private LinkedHashMap<Class<? extends Item>, Boolean> seen = new LinkedHashMap<>(); public Collection<Class<? extends Item>> items(){ return seen.keySet(); } public boolean allSeen(){ for (Class<?extends Item> item : items()){ if (!seen.get(item)){ return false; } } return true; } static { WEAPONS.seen.put( WornShortsword.class, false); WEAPONS.seen.put( Gloves.class, false); WEAPONS.seen.put( Dagger.class, false); WEAPONS.seen.put( MagesStaff.class, false); WEAPONS.seen.put( Shortsword.class, false); WEAPONS.seen.put( HandAxe.class, false); WEAPONS.seen.put( Spear.class, false); WEAPONS.seen.put( Quarterstaff.class, false); WEAPONS.seen.put( Dirk.class, false); WEAPONS.seen.put( Sword.class, false); WEAPONS.seen.put( Mace.class, false); WEAPONS.seen.put( Scimitar.class, false); WEAPONS.seen.put( RoundShield.class, false); WEAPONS.seen.put( Sai.class, false); WEAPONS.seen.put( Whip.class, false); WEAPONS.seen.put( Longsword.class, false); WEAPONS.seen.put( BattleAxe.class, false); WEAPONS.seen.put( Flail.class, false); WEAPONS.seen.put( RunicBlade.class, false); WEAPONS.seen.put( AssassinsBlade.class, false); WEAPONS.seen.put( Crossbow.class, false); WEAPONS.seen.put( Greatsword.class, false); WEAPONS.seen.put( WarHammer.class, false); WEAPONS.seen.put( Glaive.class, false); WEAPONS.seen.put( Greataxe.class, false); WEAPONS.seen.put( Greatshield.class, false); WEAPONS.seen.put( Gauntlet.class, false); ARMOR.seen.put( ClothArmor.class, false); ARMOR.seen.put( LeatherArmor.class, false); ARMOR.seen.put( MailArmor.class, false); ARMOR.seen.put( ScaleArmor.class, false); ARMOR.seen.put( PlateArmor.class, false); ARMOR.seen.put( WarriorArmor.class, false); ARMOR.seen.put( MageArmor.class, false); ARMOR.seen.put( RogueArmor.class, false); ARMOR.seen.put( HuntressArmor.class, false); WANDS.seen.put( WandOfMagicMissile.class, false); WANDS.seen.put( WandOfLightning.class, false); WANDS.seen.put( WandOfDisintegration.class, false); WANDS.seen.put( WandOfFireblast.class, false); WANDS.seen.put( WandOfCorrosion.class, false); WANDS.seen.put( WandOfBlastWave.class, false); WANDS.seen.put( WandOfLivingEarth.class, false); WANDS.seen.put( WandOfFrost.class, false); WANDS.seen.put( WandOfPrismaticLight.class, false); WANDS.seen.put( WandOfWarding.class, false); WANDS.seen.put( WandOfTransfusion.class, false); WANDS.seen.put( WandOfCorruption.class, false); WANDS.seen.put( WandOfRegrowth.class, false); RINGS.seen.put( RingOfAccuracy.class, false); RINGS.seen.put( RingOfEnergy.class, false); RINGS.seen.put( RingOfElements.class, false); RINGS.seen.put( RingOfEvasion.class, false); RINGS.seen.put( RingOfForce.class, false); RINGS.seen.put( RingOfFuror.class, false); RINGS.seen.put( RingOfHaste.class, false); RINGS.seen.put( RingOfMight.class, false); RINGS.seen.put( RingOfSharpshooting.class, false); RINGS.seen.put( RingOfTenacity.class, false); RINGS.seen.put( RingOfWealth.class, false); ARTIFACTS.seen.put( AlchemistsToolkit.class, false); //ARTIFACTS.seen.put( CapeOfThorns.class, false); ARTIFACTS.seen.put( ChaliceOfBlood.class, false); ARTIFACTS.seen.put( CloakOfShadows.class, false); ARTIFACTS.seen.put( DriedRose.class, false); ARTIFACTS.seen.put( EtherealChains.class, false); ARTIFACTS.seen.put( HornOfPlenty.class, false); //ARTIFACTS.seen.put( LloydsBeacon.class, false); ARTIFACTS.seen.put( MasterThievesArmband.class, false); ARTIFACTS.seen.put( SandalsOfNature.class, false); ARTIFACTS.seen.put( TalismanOfForesight.class, false); ARTIFACTS.seen.put( TimekeepersHourglass.class, false); ARTIFACTS.seen.put( UnstableSpellbook.class, false); POTIONS.seen.put( PotionOfHealing.class, false); POTIONS.seen.put( PotionOfStrength.class, false); POTIONS.seen.put( PotionOfLiquidFlame.class, false); POTIONS.seen.put( PotionOfFrost.class, false); POTIONS.seen.put( PotionOfToxicGas.class, false); POTIONS.seen.put( PotionOfParalyticGas.class, false); POTIONS.seen.put( PotionOfPurity.class, false); POTIONS.seen.put( PotionOfLevitation.class, false); POTIONS.seen.put( PotionOfMindVision.class, false); POTIONS.seen.put( PotionOfInvisibility.class, false); POTIONS.seen.put( PotionOfExperience.class, false); POTIONS.seen.put( PotionOfHaste.class, false); SCROLLS.seen.put( ScrollOfIdentify.class, false); SCROLLS.seen.put( ScrollOfUpgrade.class, false); SCROLLS.seen.put( ScrollOfRemoveCurse.class, false); SCROLLS.seen.put( ScrollOfMagicMapping.class, false); SCROLLS.seen.put( ScrollOfTeleportation.class, false); SCROLLS.seen.put( ScrollOfRecharging.class, false); SCROLLS.seen.put( ScrollOfMirrorImage.class, false); SCROLLS.seen.put( ScrollOfTerror.class, false); SCROLLS.seen.put( ScrollOfLullaby.class, false); SCROLLS.seen.put( ScrollOfRage.class, false); SCROLLS.seen.put( ScrollOfRetribution.class, false); SCROLLS.seen.put( ScrollOfTransmutation.class, false); } public static LinkedHashMap<Catalog, Badges.Badge> catalogBadges = new LinkedHashMap<>(); static { catalogBadges.put(WEAPONS, Badges.Badge.ALL_WEAPONS_IDENTIFIED); catalogBadges.put(ARMOR, Badges.Badge.ALL_ARMOR_IDENTIFIED); catalogBadges.put(WANDS, Badges.Badge.ALL_WANDS_IDENTIFIED); catalogBadges.put(RINGS, Badges.Badge.ALL_RINGS_IDENTIFIED); catalogBadges.put(ARTIFACTS, Badges.Badge.ALL_ARTIFACTS_IDENTIFIED); catalogBadges.put(POTIONS, Badges.Badge.ALL_POTIONS_IDENTIFIED); catalogBadges.put(SCROLLS, Badges.Badge.ALL_SCROLLS_IDENTIFIED); } public static boolean isSeen(Class<? extends Item> itemClass){ for (Catalog cat : values()) { if (cat.seen.containsKey(itemClass)) { return cat.seen.get(itemClass); } } return false; } public static void setSeen(Class<? extends Item> itemClass){ for (Catalog cat : values()) { if (cat.seen.containsKey(itemClass) && !cat.seen.get(itemClass)) { cat.seen.put(itemClass, true); Journal.saveNeeded = true; } } Badges.validateItemsIdentified(); } private static final String CATALOG_ITEMS = "catalog_items"; public static void store( Bundle bundle ){ Badges.loadGlobal(); ArrayList<Class> seen = new ArrayList<>(); //if we have identified all items of a set, we use the badge to keep track instead. if (!Badges.isUnlocked(Badges.Badge.ALL_ITEMS_IDENTIFIED)) { for (Catalog cat : values()) { if (!Badges.isUnlocked(catalogBadges.get(cat))) { for (Class<? extends Item> item : cat.items()) { if (cat.seen.get(item)) seen.add(item); } } } } bundle.put( CATALOG_ITEMS, seen.toArray(new Class[0]) ); } public static void restore( Bundle bundle ){ Badges.loadGlobal(); //logic for if we have all badges if (Badges.isUnlocked(Badges.Badge.ALL_ITEMS_IDENTIFIED)){ for ( Catalog cat : values()){ for (Class<? extends Item> item : cat.items()){ cat.seen.put(item, true); } } return; } //catalog-specific badge logic for (Catalog cat : values()){ if (Badges.isUnlocked(catalogBadges.get(cat))){ for (Class<? extends Item> item : cat.items()){ cat.seen.put(item, true); } } } //general save/load if (bundle.contains(CATALOG_ITEMS)) { List<Class> seenClasses = new ArrayList<>(); if (bundle.contains(CATALOG_ITEMS)) { seenClasses = Arrays.asList(bundle.getClassArray(CATALOG_ITEMS)); } for (Catalog cat : values()) { for (Class<? extends Item> item : cat.items()) { if (seenClasses.contains(item)) { cat.seen.put(item, true); } } } } } }
00-Evan/shattered-pixel-dungeon
core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/journal/Catalog.java
Java
gpl-3.0
17,606
/* Simple Chat * Copyright (c) 2008-2014 Alexander Sedov <imp@schat.me> * * 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/>. */ #ifndef SETTINGSTABHOOK_H_ #define SETTINGSTABHOOK_H_ #include <QWidget> #include <QIcon> #include <QMap> #include "schat.h" class ChatSettings; class QVBoxLayout; /*! * Базовый класс для страниц настроек. */ class SCHAT_CORE_EXPORT SettingsPage : public QWidget { Q_OBJECT public: SettingsPage(const QIcon &icon, const QString &id, QWidget *parent = 0); SettingsPage(QWidget *parent = 0); inline const QIcon& icon() const { return m_icon; } inline const QString& id() const { return m_id; } inline const QString& name() const { return m_name; } inline QVBoxLayout *mainLayout() const { return m_mainLayout; } virtual void retranslateUi() {} protected: void setupLayout(); ChatSettings *m_settings; ///< Указатель на объект настроек. QIcon m_icon; ///< Иконка. QString m_id; ///< Идентификатор. QString m_name; ///< Имя страницы настроек. QVBoxLayout *m_mainLayout; ///< Главный компоновщик страницы. }; class SettingsPageCreator { public: inline SettingsPageCreator(int weight = 0) : m_weight(weight) {} virtual ~SettingsPageCreator() {} inline int weight() const { return m_weight; } virtual SettingsPage* page(QWidget *) { return 0; } private: int m_weight; }; class SCHAT_CORE_EXPORT SettingsTabHook : public QObject { Q_OBJECT public: SettingsTabHook(QObject *parent = 0); ~SettingsTabHook(); inline const QMap<int, SettingsPageCreator *>& pages() const { return m_pages; } inline static SettingsTabHook *i() { return m_self; } static void add(SettingsPage *page); static void add(SettingsPageCreator *creator); signals: void added(const QString &id, SettingsPage *page); private: void add(int weight, SettingsPageCreator *creator); QMap<int, SettingsPageCreator *> m_pages; ///< Страницы настроек. static SettingsTabHook *m_self; ///< Указатель на себя. }; #endif /* SETTINGSTABHOOK_H_ */
impomezia/schat
src/schat2/ui/tabs/SettingsTabHook.h
C
gpl-3.0
2,864
#!/usr/bin/env python3 # Version 1.0 # Author Alexis Blanchet-Cohen # Date: 09/06/2014 import argparse import glob import os import subprocess import util # Read the command line arguments. parser = argparse.ArgumentParser(description="Generates Picard target list scripts.") parser.add_argument("-s", "--scriptsDirectory", help="Scripts directory. DEFAULT=collectinsertsizemetrics", default="collectinsertsizemetrics") parser.add_argument("-i", "--inputDirectory", help="Input directory with BAM files. DEFAULT=../results/bamtools_merge", default="../results/star") parser.add_argument("-o", "--outputDirectory", help="Output directory with filterd BAM files. DEFAULT=../results/collectinsertsizemetrics", default="../results/collectinsertsizemetrics") parser.add_argument("-q", "--submitJobsToQueue", help="Submit jobs to queue immediately.", choices=["yes", "no", "y", "n"], default="no") args = parser.parse_args() # If not in the scripts directory, cd to the scripts directory util.cdMainScriptsDirectory() # Process the command line arguments. inputDirectory = os.path.abspath(args.inputDirectory) outputDirectory = os.path.abspath(args.outputDirectory) scriptsDirectory = os.path.abspath(args.scriptsDirectory) # Read configuration files config = util.readConfigurationFiles() header = config.getboolean("server", "PBS_header") picard_folder = config.get("picard", "folder") genome = config.get("project", "genome") genomeFile = config.get(genome, "genomeFile") # Read samples file. samplesFile = util.readSamplesFile() samples = samplesFile["sample"] # Create script and output directories, if they do not exist yet. util.makeDirectory(outputDirectory) util.makeDirectory(scriptsDirectory) # CD to scripts directory os.chdir(scriptsDirectory) # Write scripts for sample in samples: scriptName = "collectinsertsizemetrics_" + sample + ".sh" script = open(scriptName, "w") if header: util.writeHeader(script, config, "collectinsertsizemetrics") # Reorder script.write("java -Xmx4g -jar " + os.path.join(picard_folder, "CollectInsertSizeMetrics.jar") + " \\\n") script.write("VALIDATION_STRINGENCY=LENIENT " + "\\\n") script.write("HISTOGRAM_FILE=" + os.path.join(outputDirectory, sample + "_picard_insert_size_plot.pdf") + " \\\n") script.write("INPUT=" + os.path.join(inputDirectory, sample + ".filtered.bam") + " \\\n") script.write("OUTPUT=" + os.path.join(outputDirectory, sample + "_picard_insert_size_metrics.txt") + " \\\n") script.write("&> " + scriptName + ".log") script.close()
blancha/abcngspipelines
utils/collectinsertsizemetrics.py
Python
gpl-3.0
2,567
/* This file is part of Darling. Copyright (C) 2017 Lubos Dolezel Darling 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. Darling 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 Darling. If not, see <http://www.gnu.org/licenses/>. */ #include <stdio.h> #include <getopt.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <errno.h> #include "xcselect.h" void printUsage(void); void doReset(void); void doSwitch(const char* path); void doPrintManPaths(void); int main(int argc, const char** argv) { if (argc == 1) { fprintf(stderr, "xcode-select: error: no command option given\n"); printUsage(); } else if (argc == 2 || argc == 3) { if (strcmp(argv[1], "-h") == 0 || strcmp(argv[1], "--help") == 0) { printUsage(); } else if (strcmp(argv[1], "-v") == 0 || strcmp(argv[1], "--version") == 0 || strcmp(argv[1], "-version") == 0) { printf("xcode-select for Darling, version 1.0\n"); } else if (strcmp(argv[1], "-p") == 0 || strcmp(argv[1], "--print-path") == 0 || strcmp(argv[1], "-print-path") == 0) { char path[1024]; bool is_cmd_line; if (xcselect_get_developer_dir_path(path, sizeof(path), &is_cmd_line)) { printf("%s\n", path); } else { fprintf(stderr, "xcode-select: error: unable to get active developer directory\n"); return 1; } } else if (strcmp(argv[1], "--show-manpaths") == 0) { doPrintManPaths(); } else if (strcmp(argv[1], "--install") == 0) { if (access("/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib", F_OK) == 0) { fprintf(stderr, "xcode-select: error: command line tools are already installed\n"); return 1; } else { printf("Please visit https://developer.apple.com/download/more/ and download\n" "a package named \"Command Line Tools\".\n\n" "After that, install them by running `installer -pkg file.pkg -target /`.\n"); } } else if (strcmp(argv[1], "-r") == 0 || strcmp(argv[1], "--reset") == 0) { doReset(); } else if (strcmp(argv[1], "-s") == 0 || strcmp(argv[1], "--switch") == 0 || strcmp(argv[1], "-switch") == 0) { if (argc != 3) { fprintf(stderr, "xcode-select: error: missing argument to '%s'\n", argv[1]); return 1; } doSwitch(argv[2]); } else { fprintf(stderr, "xcode-select: error: unknown option: %s\n", argv[1]); printUsage(); return 1; } return 0; } else { fprintf(stderr, "xcode-select: error: bad argument count\n"); printUsage(); } return 1; } void printUsage(void) { fprintf(stderr, "Usage: xcode-select [options]\n\n"); fprintf(stderr, "xcode-select is used to set up path to the active developer directory.\n" "This affects both toolchain commands (such as clang or make) and Xcode-specific\n" "tools (such as xcodebuild).\n\n"); fprintf(stderr, "Options:\n" " -h, --help print this help message\n" " -p, --print-path print the path of the active developer directory\n" " -s <path>, --switch <path> change the path of the active developer directory\n" " --install trigger the installation of command line developer tools\n" " -v, --version print the version of this tool\n" " -r, --reset reset to the default developer directory\n"); } static void killLink(const char* path) { if (unlink(path) != 0) { if (errno != ENOENT) { fprintf(stderr, "xcode-select: error: cannot remove existing link at '%s': %s\n", path, strerror(errno)); exit(1); } } } void doReset(void) { killLink("/var/db/xcode_select_link"); killLink("/usr/share/xcode-select/xcode_dir_link"); killLink("/usr/share/xcode-select/xcode_dir_path"); } void doSwitch(const char* path) { char buffer[1024]; bool unused; if (!xcselect_find_developer_contents_from_path(path, buffer, unused, sizeof(buffer))) { fprintf(stderr, "xcode-select: error: invalid developer directory '%s'\n", path); exit(1); } doReset(); umask(022); if (symlink(buffer, "/var/db/xcode_select_link") != 0) { fprintf(stderr, "xcode-select: error: unable to create symlink: %s\n", strerror(errno)); exit(1); } } void doPrintManPaths(void) { xcselect_manpaths *xcp; const char *path; unsigned i, count; xcp = xcselect_get_manpaths(NULL); if (xcp != NULL) { count = xcselect_manpaths_get_num_paths(xcp); for (i = 0; i < count; i++) { path = xcselect_manpaths_get_path(xcp, i); if (path != NULL) { puts(path); } } xcselect_manpaths_free(xcp); } }
X0rg/darling
src/xcselect/xcode-select.c
C
gpl-3.0
4,964
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ /* This file is part of the program and library */ /* SCIP --- Solving Constraint Integer Programs */ /* */ /* Copyright (C) 2002-2018 Konrad-Zuse-Zentrum */ /* fuer Informationstechnik Berlin */ /* */ /* SCIP is distributed under the terms of the ZIB Academic License. */ /* */ /* You should have received a copy of the ZIB Academic License */ /* along with SCIP; see the file COPYING. If not email to scip@zib.de. */ /* */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /**@file prop_redcost.h * @ingroup PROPAGATORS * @brief propagator using the LP reduced cost and the cutoff bound * @author Tobias Achterberg * @author Stefan Heinz * @author Matthias Miltenberger * @author Michael Winkler * * This propagator uses the reduced cost of an optimal solved LP relaxation to propagate the variables against the * cutoff bound. */ /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/ #ifndef __SCIP_PROP_REDCOST_H__ #define __SCIP_PROP_REDCOST_H__ #include "scip/scip.h" #ifdef __cplusplus extern "C" { #endif /** creates the redcost propagator and includes it in SCIP * * @ingroup PropagatorIncludes */ EXTERN SCIP_RETCODE SCIPincludePropRedcost( SCIP* scip /**< SCIP data structure */ ); #ifdef __cplusplus } #endif #endif
LiangliangNan/PolyFit
3rd_scip/scip/prop_redcost.h
C
gpl-3.0
2,005
/* override voor /media/jui/css/bootstrap-responsive.min.css in verband met gebruik van bootstrap 3.3.6 * BW 2016-03-20 */
bramwaas/joomla-template-wsabootstrap
css/jui/bootstrap-responsive.min.css
CSS
gpl-3.0
123
<!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/html; charset=utf-8" /> <title>Index &#8212; PyCAN 1.0.1 documentation</title> <link rel="stylesheet" href="_static/alabaster.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: './', VERSION: '1.0.1', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true }; </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> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> <link rel="index" title="Index" href="#" /> <link rel="search" title="Search" href="search.html" /> <link rel="top" title="PyCAN 1.0.1 documentation" href="index.html" /> <link rel="stylesheet" href="_static/custom.css" type="text/css" /> <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" /> </head> <body role="document"> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> <h1 id="index">Index</h1> <div class="genindex-jumpbox"> <a href="#A"><strong>A</strong></a> | <a href="#C"><strong>C</strong></a> | <a href="#D"><strong>D</strong></a> | <a href="#G"><strong>G</strong></a> | <a href="#M"><strong>M</strong></a> | <a href="#P"><strong>P</strong></a> | <a href="#R"><strong>R</strong></a> | <a href="#S"><strong>S</strong></a> </div> <h2 id="A">A</h2> <table style="width: 100%" class="indextable genindextable"><tr> <td style="width: 33%" valign="top"><dl> <dt><a href="can_handler.html#can_handler.CanMsgHolder.addMsgToBuffer">addMsgToBuffer() (can_handler.CanMsgHolder method)</a> </dt> </dl></td> </tr></table> <h2 id="C">C</h2> <table style="width: 100%" class="indextable genindextable"><tr> <td style="width: 33%" valign="top"><dl> <dt><a href="can_handler.html#module-can_handler">can_handler (module)</a> </dt> <dt><a href="can_handler.html#can_handler.CanHw">CanHw (class in can_handler)</a> </dt> <dt><a href="can_handler.html#can_handler.CanHwChannel">CanHwChannel (class in can_handler)</a> </dt> </dl></td> <td style="width: 33%" valign="top"><dl> <dt><a href="can_handler.html#can_handler.CanMsg">CanMsg (class in can_handler)</a> </dt> <dt><a href="can_handler.html#can_handler.CanMsgHolder">CanMsgHolder (class in can_handler)</a> </dt> <dt><a href="can_handler.html#can_handler.CanMsgHolder.clearBuffer">clearBuffer() (can_handler.CanMsgHolder method)</a> </dt> <dt><a href="can_handler.html#can_handler.CanHw.create">create() (can_handler.CanHw method)</a> </dt> </dl></td> </tr></table> <h2 id="D">D</h2> <table style="width: 100%" class="indextable genindextable"><tr> <td style="width: 33%" valign="top"><dl> <dt><a href="can_handler.html#can_handler.CanHw.destroy">destroy() (can_handler.CanHw method)</a> </dt> </dl></td> </tr></table> <h2 id="G">G</h2> <table style="width: 100%" class="indextable genindextable"><tr> <td style="width: 33%" valign="top"><dl> <dt><a href="can_handler.html#can_handler.CanMsgHolder.getLatestMsgFromBuffer">getLatestMsgFromBuffer() (can_handler.CanMsgHolder method)</a> </dt> <dt><a href="can_handler.html#can_handler.CanMsgHolder.getMsgFromBuffer">getMsgFromBuffer() (can_handler.CanMsgHolder method)</a> </dt> </dl></td> <td style="width: 33%" valign="top"><dl> <dt><a href="can_handler.html#can_handler.CanMsgHolder.getNumberOfMsgInBuffer">getNumberOfMsgInBuffer() (can_handler.CanMsgHolder method)</a> </dt> <dt><a href="can_handler.html#can_handler.CanMsgHolder.getOldestMsgFromBuffer">getOldestMsgFromBuffer() (can_handler.CanMsgHolder method)</a> </dt> </dl></td> </tr></table> <h2 id="M">M</h2> <table style="width: 100%" class="indextable genindextable"><tr> <td style="width: 33%" valign="top"><dl> <dt><a href="can_handler.html#can_handler.CanHw.manualSetup">manualSetup() (can_handler.CanHw method)</a> </dt> </dl></td> </tr></table> <h2 id="P">P</h2> <table style="width: 100%" class="indextable genindextable"><tr> <td style="width: 33%" valign="top"><dl> <dt><a href="can_handler.html#can_handler.CanHw.printHardware">printHardware() (can_handler.CanHw method)</a> </dt> </dl></td> </tr></table> <h2 id="R">R</h2> <table style="width: 100%" class="indextable genindextable"><tr> <td style="width: 33%" valign="top"><dl> <dt><a href="can_handler.html#can_handler.CanHw.readCanMsg">readCanMsg() (can_handler.CanHw method)</a> </dt> <dt><a href="can_handler.html#can_handler.CanHw.reciveCanMsg">reciveCanMsg() (can_handler.CanHw method)</a> </dt> <dt><a href="can_handler.html#can_handler.CanHw.release">release() (can_handler.CanHw method)</a> </dt> </dl></td> <td style="width: 33%" valign="top"><dl> <dt><a href="can_handler.html#can_handler.CanHw.request">request() (can_handler.CanHw method)</a> </dt> <dt><a href="can_handler.html#can_handler.RxListenerThread.run">run() (can_handler.RxListenerThread method)</a> </dt> <dt><a href="can_handler.html#can_handler.RxListenerThread">RxListenerThread (class in can_handler)</a> </dt> </dl></td> </tr></table> <h2 id="S">S</h2> <table style="width: 100%" class="indextable genindextable"><tr> <td style="width: 33%" valign="top"><dl> <dt><a href="can_handler.html#can_handler.CanHw.sendMultipleCanMsg">sendMultipleCanMsg() (can_handler.CanHw method)</a> </dt> <dt><a href="can_handler.html#can_handler.CanHw.sendOneCanMsg">sendOneCanMsg() (can_handler.CanHw method)</a> </dt> </dl></td> <td style="width: 33%" valign="top"><dl> <dt><a href="can_handler.html#can_handler.CanHw.setup">setup() (can_handler.CanHw method)</a> </dt> <dt><a href="can_handler.html#can_handler.RxListenerThread.stop">stop() (can_handler.RxListenerThread method)</a> </dt> </dl></td> </tr></table> </div> </div> </div> <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> <div class="sphinxsidebarwrapper"> <div class="relations"> <h3>Related Topics</h3> <ul> <li><a href="index.html">Documentation overview</a><ul> </ul></li> </ul> </div> <div id="searchbox" style="display: none" role="search"> <h3>Quick search</h3> <form class="search" action="search.html" method="get"> <div><input type="text" name="q" /></div> <div><input type="submit" value="Go" /></div> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="footer"> &copy;2016, Jim Nilsson. | Powered by <a href="http://sphinx-doc.org/">Sphinx 1.4.8</a> &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.9</a> </div> </body> </html>
Nagelfar83/PyCAN
docs/genindex.html
HTML
gpl-3.0
7,698
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.18"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>Sequoia: /Users/Claire/Dropbox/Sequoia/TestMaterials/TestFramework/TestRunnerTestCreation/Prediction/FakeProject/Tests/Utilities/IteratorTestingUtilities.hpp Source File</title> <link href="../../tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="../../jquery.js"></script> <script type="text/javascript" src="../../dynsections.js"></script> <link href="../../search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="../../search/searchdata.js"></script> <script type="text/javascript" src="../../search/search.js"></script> <link href="../../doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">Sequoia </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.18 --> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */ var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); /* @license-end */ </script> <script type="text/javascript" src="../../menudata.js"></script> <script type="text/javascript" src="../../menu.js"></script> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */ $(function() { initMenu('../../',true,false,'search.php','Search'); $(document).ready(function() { init_search(); }); }); /* @license-end */</script> <div id="main-nav"></div> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> </div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="../../dir_8c62978bde8ee9cc22cee8b58fa780b8.html">TestMaterials</a></li><li class="navelem"><a class="el" href="../../dir_0ba89ed2f0ddf16e67c6f950a2859f43.html">TestFramework</a></li><li class="navelem"><a class="el" href="../../dir_20f22426abe0a4efb73e0915a099c146.html">TestRunnerTestCreation</a></li><li class="navelem"><a class="el" href="../../dir_aecc174cf0b0079686dd4305a9d74239.html">Prediction</a></li><li class="navelem"><a class="el" href="../../dir_4576f30d2b8befc5e9a66cf69d049922.html">FakeProject</a></li><li class="navelem"><a class="el" href="../../dir_9130963baa7d61df5174885d6a4953d4.html">Tests</a></li><li class="navelem"><a class="el" href="../../dir_132c987ee972a2c4ac52b39abf13db41.html">Utilities</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="headertitle"> <div class="title">IteratorTestingUtilities.hpp</div> </div> </div><!--header--> <div class="contents"> <div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">// Copyright Oliver Jacob Rosten 2021. //</span></div> <div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment">// Distributed under the GNU GENERAL PUBLIC LICENSE, Version 3.0. //</span></div> <div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment">// (See accompanying file LICENSE.md or copy at //</span></div> <div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment">// https://www.gnu.org/licenses/gpl-3.0.en.html) //</span></div> <div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"></span> </div> <div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="preprocessor">#pragma once</span></div> <div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160; </div> <div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="../../d9/daf/RegularTestCore_8hpp.html">sequoia/TestFramework/RegularTestCore.hpp</a>&quot;</span></div> <div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="preprocessor">#include &quot;fakeProject/Utilities/Iterator.hpp&quot;</span></div> <div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160; </div> <div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="keyword">namespace </span><a class="code" href="../../dd/da8/namespacesequoia_1_1testing.html">sequoia::testing</a></div> <div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;{</div> <div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160; <span class="keyword">template</span>&lt;&gt; <span class="keyword">struct </span>value_checker&lt;utilities::iterator&gt;</div> <div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160; {</div> <div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160; <span class="keyword">using</span> type = utilities::iterator;</div> <div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160; </div> <div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160; <span class="keyword">template</span>&lt;test_mode Mode&gt;</div> <div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160; <span class="keyword">static</span> <span class="keywordtype">void</span> check(test_logger&lt;Mode&gt;&amp; logger, <span class="keyword">const</span> type&amp; actual, <span class="keyword">const</span> type&amp; prediction)</div> <div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160; {</div> <div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160; <span class="comment">// e.g. check_equality(&quot;Description&quot;, logger, actual.method(), prediction.method());</span></div> <div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160; }</div> <div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160; };</div> <div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160; </div> <div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160; <span class="keyword">template</span>&lt;&gt; <span class="keyword">struct </span>equivalence_checker&lt;utilities::iterator&gt;</div> <div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160; {</div> <div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160; <span class="keyword">using</span> type = utilities::iterator;</div> <div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160; </div> <div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160; <span class="keyword">template</span>&lt;test_mode Mode&gt;</div> <div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160; <span class="keyword">static</span> <span class="keywordtype">void</span> check(test_logger&lt;Mode&gt;&amp; logger, <span class="keyword">const</span> type&amp; actual, <span class="keyword">const</span> <span class="keywordtype">int</span>* prediction)</div> <div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160; {</div> <div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160; <span class="comment">// e.g. check_equality(&quot;Description&quot;, logger, actual.method(), prediction);</span></div> <div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160; }</div> <div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160; };</div> <div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;}</div> </div><!-- fragment --></div><!-- contents --> <div class="ttc" id="aRegularTestCore_8hpp_html"><div class="ttname"><a href="../../d9/daf/RegularTestCore_8hpp.html">RegularTestCore.hpp</a></div><div class="ttdoc">Utilities for checking regular semantics.</div></div> <div class="ttc" id="anamespacesequoia_1_1testing_html"><div class="ttname"><a href="../../dd/da8/namespacesequoia_1_1testing.html">sequoia::testing</a></div><div class="ttdef"><b>Definition:</b> MyBehaviouralTest.cpp:12</div></div> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated by &#160;<a href="http://www.doxygen.org/index.html"> <img class="footer" src="../../doxygen.png" alt="doxygen"/> </a> 1.8.18 </small></address> </body> </html>
ojrosten/sequoia
docs/html/d7/df2/TestMaterials_2TestFramework_2TestRunnerTestCreation_2Prediction_2FakeProject_2Tests_2Utilities_2IteratorTestingUtilities_8hpp_source.html
HTML
gpl-3.0
9,467
"""Current-flow betweenness centrality measures for subsets of nodes.""" import networkx as nx from networkx.algorithms.centrality.flow_matrix import flow_matrix_row from networkx.utils import not_implemented_for, reverse_cuthill_mckee_ordering __all__ = [ "current_flow_betweenness_centrality_subset", "edge_current_flow_betweenness_centrality_subset", ] @not_implemented_for("directed") def current_flow_betweenness_centrality_subset( G, sources, targets, normalized=True, weight=None, dtype=float, solver="lu" ): r"""Compute current-flow betweenness centrality for subsets of nodes. Current-flow betweenness centrality uses an electrical current model for information spreading in contrast to betweenness centrality which uses shortest paths. Current-flow betweenness centrality is also known as random-walk betweenness centrality [2]_. Parameters ---------- G : graph A NetworkX graph sources: list of nodes Nodes to use as sources for current targets: list of nodes Nodes to use as sinks for current normalized : bool, optional (default=True) If True the betweenness values are normalized by b=b/(n-1)(n-2) where n is the number of nodes in G. weight : string or None, optional (default=None) Key for edge data used as the edge weight. If None, then use 1 as each edge weight. dtype: data type (float) Default data type for internal matrices. Set to np.float32 for lower memory consumption. solver: string (default='lu') Type of linear solver to use for computing the flow matrix. Options are "full" (uses most memory), "lu" (recommended), and "cg" (uses least memory). Returns ------- nodes : dictionary Dictionary of nodes with betweenness centrality as the value. See Also -------- approximate_current_flow_betweenness_centrality betweenness_centrality edge_betweenness_centrality edge_current_flow_betweenness_centrality Notes ----- Current-flow betweenness can be computed in $O(I(n-1)+mn \log n)$ time [1]_, where $I(n-1)$ is the time needed to compute the inverse Laplacian. For a full matrix this is $O(n^3)$ but using sparse methods you can achieve $O(nm{\sqrt k})$ where $k$ is the Laplacian matrix condition number. The space required is $O(nw)$ where $w$ is the width of the sparse Laplacian matrix. Worse case is $w=n$ for $O(n^2)$. If the edges have a 'weight' attribute they will be used as weights in this algorithm. Unspecified weights are set to 1. References ---------- .. [1] Centrality Measures Based on Current Flow. Ulrik Brandes and Daniel Fleischer, Proc. 22nd Symp. Theoretical Aspects of Computer Science (STACS '05). LNCS 3404, pp. 533-544. Springer-Verlag, 2005. http://algo.uni-konstanz.de/publications/bf-cmbcf-05.pdf .. [2] A measure of betweenness centrality based on random walks, M. E. J. Newman, Social Networks 27, 39-54 (2005). """ from networkx.utils import reverse_cuthill_mckee_ordering try: import numpy as np except ImportError as e: raise ImportError( "current_flow_betweenness_centrality requires NumPy ", "http://numpy.org/" ) from e if not nx.is_connected(G): raise nx.NetworkXError("Graph not connected.") n = G.number_of_nodes() ordering = list(reverse_cuthill_mckee_ordering(G)) # make a copy with integer labels according to rcm ordering # this could be done without a copy if we really wanted to mapping = dict(zip(ordering, range(n))) H = nx.relabel_nodes(G, mapping) betweenness = dict.fromkeys(H, 0.0) # b[v]=0 for v in H for row, (s, t) in flow_matrix_row(H, weight=weight, dtype=dtype, solver=solver): for ss in sources: i = mapping[ss] for tt in targets: j = mapping[tt] betweenness[s] += 0.5 * np.abs(row[i] - row[j]) betweenness[t] += 0.5 * np.abs(row[i] - row[j]) if normalized: nb = (n - 1.0) * (n - 2.0) # normalization factor else: nb = 2.0 for v in H: betweenness[v] = betweenness[v] / nb + 1.0 / (2 - n) return {ordering[k]: v for k, v in betweenness.items()} @not_implemented_for("directed") def edge_current_flow_betweenness_centrality_subset( G, sources, targets, normalized=True, weight=None, dtype=float, solver="lu" ): r"""Compute current-flow betweenness centrality for edges using subsets of nodes. Current-flow betweenness centrality uses an electrical current model for information spreading in contrast to betweenness centrality which uses shortest paths. Current-flow betweenness centrality is also known as random-walk betweenness centrality [2]_. Parameters ---------- G : graph A NetworkX graph sources: list of nodes Nodes to use as sources for current targets: list of nodes Nodes to use as sinks for current normalized : bool, optional (default=True) If True the betweenness values are normalized by b=b/(n-1)(n-2) where n is the number of nodes in G. weight : string or None, optional (default=None) Key for edge data used as the edge weight. If None, then use 1 as each edge weight. dtype: data type (float) Default data type for internal matrices. Set to np.float32 for lower memory consumption. solver: string (default='lu') Type of linear solver to use for computing the flow matrix. Options are "full" (uses most memory), "lu" (recommended), and "cg" (uses least memory). Returns ------- nodes : dict Dictionary of edge tuples with betweenness centrality as the value. See Also -------- betweenness_centrality edge_betweenness_centrality current_flow_betweenness_centrality Notes ----- Current-flow betweenness can be computed in $O(I(n-1)+mn \log n)$ time [1]_, where $I(n-1)$ is the time needed to compute the inverse Laplacian. For a full matrix this is $O(n^3)$ but using sparse methods you can achieve $O(nm{\sqrt k})$ where $k$ is the Laplacian matrix condition number. The space required is $O(nw)$ where $w$ is the width of the sparse Laplacian matrix. Worse case is $w=n$ for $O(n^2)$. If the edges have a 'weight' attribute they will be used as weights in this algorithm. Unspecified weights are set to 1. References ---------- .. [1] Centrality Measures Based on Current Flow. Ulrik Brandes and Daniel Fleischer, Proc. 22nd Symp. Theoretical Aspects of Computer Science (STACS '05). LNCS 3404, pp. 533-544. Springer-Verlag, 2005. http://algo.uni-konstanz.de/publications/bf-cmbcf-05.pdf .. [2] A measure of betweenness centrality based on random walks, M. E. J. Newman, Social Networks 27, 39-54 (2005). """ try: import numpy as np except ImportError as e: raise ImportError( "current_flow_betweenness_centrality requires NumPy " "http://numpy.org/" ) from e if not nx.is_connected(G): raise nx.NetworkXError("Graph not connected.") n = G.number_of_nodes() ordering = list(reverse_cuthill_mckee_ordering(G)) # make a copy with integer labels according to rcm ordering # this could be done without a copy if we really wanted to mapping = dict(zip(ordering, range(n))) H = nx.relabel_nodes(G, mapping) edges = (tuple(sorted((u, v))) for u, v in H.edges()) betweenness = dict.fromkeys(edges, 0.0) if normalized: nb = (n - 1.0) * (n - 2.0) # normalization factor else: nb = 2.0 for row, (e) in flow_matrix_row(H, weight=weight, dtype=dtype, solver=solver): for ss in sources: i = mapping[ss] for tt in targets: j = mapping[tt] betweenness[e] += 0.5 * np.abs(row[i] - row[j]) betweenness[e] /= nb return {(ordering[s], ordering[t]): v for (s, t), v in betweenness.items()}
SpaceGroupUCL/qgisSpaceSyntaxToolkit
esstoolkit/external/networkx/algorithms/centrality/current_flow_betweenness_subset.py
Python
gpl-3.0
8,195
import { app } from 'mobx-app'; import { inject, observer } from 'mobx-react'; import React, { SFC } from 'react'; import { Redirect as ReactRedirect, RedirectProps as ReactRedirectProps } from 'react-router-dom'; interface RedirectProps extends ReactRedirectProps { authedOnly?: boolean; unauthedOnly?: boolean; } export const Redirect: SFC<RedirectProps> = inject(app('state'))(observer((props) => { const { authedOnly, state, unauthedOnly } = props; const { isAuthed } = state; if ( (authedOnly && !isAuthed) || (unauthedOnly && isAuthed) ) return null; return <ReactRedirect {...props} />; }));
nielsrowinbik/seaman
src/components/Redirect/Redirect.tsx
TypeScript
gpl-3.0
614
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Newtonsoft.Json; using Yavsc.Attributes.Validation; namespace Yavsc.Models.Workflow { public class UserActivity { [YaRequired] public string UserId { get; set; } [ForeignKey("UserId")] public virtual PerformerProfile User { get; set; } [YaRequired] public string DoesCode { get; set; } [ForeignKey("DoesCode")] public virtual Activity Does { get; set; } [Range(0,100)] public int Weight { get; set; } [NotMapped,JsonIgnore] public object Settings { get; internal set; } } }
pazof/yavsc
src/Yavsc.Server/Models/Workflow/UserActivity.cs
C#
gpl-3.0
698
require 'csv' MovieGenre.delete_all Genre.delete_all puts 'Creating genres' start = Time.zone.now # load genre and movie data csv_text = File.read('db/seeds_data/movies.csv') csv = CSV.parse(csv_text, headers: true) csv.each do |row| movie = row.to_hash movie_saved = Movie.find_by(id: movie['movieId']) genres = movie['genres'].split('|') genres.each do |g| genre = Genre.find_by(name: g) if genre.nil? genre = Genre.create( name: g ) end MovieGenre.create( movie_id: movie_saved.id, genre_id: genre.id ) unless movie_saved.nil? end end puts Time.zone.now - start
dreyxvx/recommender_system_api
db/tasks/genres_seed.rb
Ruby
gpl-3.0
629
{-# OPTIONS_GHC -fno-warn-orphans #-} module Handler.TransById where import Import $(deriveJSON defaultOptions ''Transaction) getTransByIdR :: String -> Handler Value getTransByIdR uIdent = do mUser <- runDB $ selectFirst [ UserIdent ==. (pack uIdent) ] [] case mUser of Just user -> do trans <- runDB $ selectList [ TransactionVendor ==. (entityKey user) ] [] returnJson trans Nothing -> return $ object [ "result" .= ("error" :: Text)]
weshack/thelist
TheList/Handler/TransById.hs
Haskell
gpl-3.0
465
var util = require('util'); var https = require('https'); var querystring = require('querystring'); var emitter = require('events').EventEmitter; var retry = require('retry'); function FCM(apiKey) { if (apiKey) { this.apiKey = apiKey; } else { throw Error('No apiKey is given.'); } this.fcmOptions = { host: 'android.googleapis.com', port: 443, path: '/gcm/send', method: 'POST', headers: {} }; } util.inherits(FCM, emitter); exports.FCM = FCM; FCM.prototype.send = function(packet, cb) { var self = this; if (cb) this.once('sent', cb); var operation = retry.operation(); operation.attempt(function(currentAttempt) { var postData = querystring.stringify(packet); var headers = { 'Host': self.fcmOptions.host, 'Authorization': 'key=' + self.apiKey, 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8', 'Content-length': postData.length }; self.fcmOptions.headers = headers; if (self.keepAlive) headers.Connection = 'keep-alive'; var request = https.request(self.fcmOptions, function(res) { var data = ''; if (res.statusCode == 503) { // If the server is temporary unavailable, the C2DM spec requires that we implement exponential backoff // and respect any Retry-After header if (res.headers['retry-after']) { var retrySeconds = res.headers['retry-after'] * 1; // force number if (isNaN(retrySeconds)) { // The Retry-After header is a HTTP-date, try to parse it retrySeconds = new Date(res.headers['retry-after']).getTime() - new Date().getTime(); } if (!isNaN(retrySeconds) && retrySeconds > 0) { operation._timeouts['minTimeout'] = retrySeconds; } } if (!operation.retry('TemporaryUnavailable')) { self.emit('sent', operation.mainError(), null); } // Ignore all subsequent events for this request return; } function respond() { var error = null, id = null; if (data.indexOf('Error=') === 0) { error = data.substring(6).trim(); } else if (data.indexOf('id=') === 0) { id = data.substring(3).trim(); } else { // No id nor error? error = 'InvalidServerResponse'; } // Only retry if error is QuotaExceeded or DeviceQuotaExceeded if (operation.retry(['QuotaExceeded', 'DeviceQuotaExceeded', 'InvalidServerResponse'].indexOf(error) >= 0 ? error : null)) { return; } // Success, return message id (without id=) self.emit('sent', error, id); } res.on('data', function(chunk) { data += chunk; }); res.on('end', respond); res.on('close', respond); }); request.on('error', function(error) { self.emit('sent', error, null); }); request.end(postData); }); };
matso165/islands-of-tribes
StoneAge/server/node_modules/fcm/lib/fcm.js
JavaScript
gpl-3.0
3,559
Imports System Imports System.Reflection Imports System.Runtime.InteropServices ' General Information about an assembly is controlled through the following ' set of attributes. Change these attribute values to modify the information ' associated with an assembly. ' Review the values of the assembly attributes <Assembly: AssemblyTitle("PBXBar")> <Assembly: AssemblyDescription("GoAutoDial / Vicidial Agent Control Tool " & vbCrLf & vbCrLf & "by Samuel Melrose" & vbCrLf & "sam.melrose@a1comms.com")> <Assembly: AssemblyCompany("A1comms Ltd")> <Assembly: AssemblyProduct("PBXBar Agent Controller")> <Assembly: AssemblyCopyright("Copyright A1comms Ltd© 2014")> <Assembly: AssemblyTrademark("")> <Assembly: ComVisible(False)> 'The following GUID is for the ID of the typelib if this project is exposed to COM <Assembly: Guid("646ddfbf-e390-4ab4-8b4a-ac5bde91d4a4")> ' Version information for an assembly consists of the following four values: ' ' Major Version ' Minor Version ' Build Number ' Revision ' ' You can specify all the values or you can default the Build and Revision Numbers ' by using the '*' as shown below: ' <Assembly: AssemblyVersion("1.0.*")> <Assembly: AssemblyVersion("1.15.02.25")> <Assembly: AssemblyFileVersion("1.15.02.25")>
infitialis/pbxbar
appbar/My Project/AssemblyInfo.vb
Visual Basic
gpl-3.0
1,327