|
|||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| STAXEventReader.java | 32,7% | 47,6% | 41,7% | 43,1% |
|
| 1 | /* | |
| 2 | * Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved. | |
| 3 | * | |
| 4 | * This software is open source. | |
| 5 | * See the bottom of this file for the licence. | |
| 6 | */ | |
| 7 | ||
| 8 | package org.dom4j.io; | |
| 9 | ||
| 10 | import java.io.InputStream; | |
| 11 | import java.io.Reader; | |
| 12 | import java.util.Iterator; | |
| 13 | ||
| 14 | import javax.xml.namespace.QName; | |
| 15 | import javax.xml.stream.XMLEventReader; | |
| 16 | import javax.xml.stream.XMLInputFactory; | |
| 17 | import javax.xml.stream.XMLStreamConstants; | |
| 18 | import javax.xml.stream.XMLStreamException; | |
| 19 | import javax.xml.stream.events.Attribute; | |
| 20 | import javax.xml.stream.events.Characters; | |
| 21 | import javax.xml.stream.events.Comment; | |
| 22 | import javax.xml.stream.events.EndElement; | |
| 23 | import javax.xml.stream.events.EntityReference; | |
| 24 | import javax.xml.stream.events.Namespace; | |
| 25 | import javax.xml.stream.events.ProcessingInstruction; | |
| 26 | import javax.xml.stream.events.StartDocument; | |
| 27 | import javax.xml.stream.events.StartElement; | |
| 28 | import javax.xml.stream.events.XMLEvent; | |
| 29 | ||
| 30 | import org.dom4j.CharacterData; | |
| 31 | import org.dom4j.Document; | |
| 32 | import org.dom4j.DocumentFactory; | |
| 33 | import org.dom4j.Element; | |
| 34 | import org.dom4j.Entity; | |
| 35 | import org.dom4j.Node; | |
| 36 | ||
| 37 | /** | |
| 38 | * Reads a DOM4J {@link Document}, as well as other {@link Node}s, from a StAX | |
| 39 | * {@link XMLEventReader}. | |
| 40 | * | |
| 41 | * @author Christian Niles | |
| 42 | */ | |
| 43 | public class STAXEventReader { | |
| 44 | /** Reference to the DocumentFactory used to build DOM4J nodes. */ | |
| 45 | private DocumentFactory factory; | |
| 46 | ||
| 47 | /** A StAX input factory, used to construct streams from IO streams. */ | |
| 48 | private XMLInputFactory inputFactory = XMLInputFactory.newInstance(); | |
| 49 | ||
| 50 | /** | |
| 51 | * Constructs a default STAXEventReader instance with a | |
| 52 | * default {@link DocumentFactory}. | |
| 53 | */ | |
| 54 | 1 | public STAXEventReader() { |
| 55 | 1 | this.factory = DocumentFactory.getInstance(); |
| 56 | } | |
| 57 | ||
| 58 | /** | |
| 59 | * Constructs a STAXEventReader instance that uses the | |
| 60 | * specified {@link DocumentFactory}to construct DOM4J {@link Node}s. | |
| 61 | * | |
| 62 | * @param factory | |
| 63 | * The DocumentFactory to use when constructing DOM4J nodes, or | |
| 64 | * null if a default should be used. | |
| 65 | */ | |
| 66 | 0 | public STAXEventReader(DocumentFactory factory) { |
| 67 | 0 | if (factory != null) { |
| 68 | 0 | this.factory = factory; |
| 69 | } else { | |
| 70 | 0 | this.factory = DocumentFactory.getInstance(); |
| 71 | } | |
| 72 | } | |
| 73 | ||
| 74 | /** | |
| 75 | * Sets the DocumentFactory to be used when constructing DOM4J nodes. | |
| 76 | * | |
| 77 | * @param documentFactory | |
| 78 | * The DocumentFactory to use when constructing DOM4J nodes, or | |
| 79 | * null if a default should be used. | |
| 80 | */ | |
| 81 | 0 | public void setDocumentFactory(DocumentFactory documentFactory) { |
| 82 | 0 | if (documentFactory != null) { |
| 83 | 0 | this.factory = documentFactory; |
| 84 | } else { | |
| 85 | 0 | this.factory = DocumentFactory.getInstance(); |
| 86 | } | |
| 87 | } | |
| 88 | ||
| 89 | /** | |
| 90 | * Constructs a StAX event stream from the provided I/O stream and reads a | |
| 91 | * DOM4J document from it. | |
| 92 | * | |
| 93 | * @param is | |
| 94 | * The I/O stream from which the Document will be read. | |
| 95 | * | |
| 96 | * @return The Document that was read from the stream. | |
| 97 | * | |
| 98 | * @throws XMLStreamException | |
| 99 | * If an error occurs reading content from the stream. | |
| 100 | */ | |
| 101 | 0 | public Document readDocument(InputStream is) throws XMLStreamException { |
| 102 | 0 | return readDocument(is, null); |
| 103 | } | |
| 104 | ||
| 105 | /** | |
| 106 | * Constructs a StAX event stream from the provided I/O character stream and | |
| 107 | * reads a DOM4J document from it. | |
| 108 | * | |
| 109 | * @param reader | |
| 110 | * The character stream from which the Document will be read. | |
| 111 | * | |
| 112 | * @return The Document that was read from the stream. | |
| 113 | * | |
| 114 | * @throws XMLStreamException | |
| 115 | * If an error occurs reading content from the stream. | |
| 116 | */ | |
| 117 | 1 | public Document readDocument(Reader reader) throws XMLStreamException { |
| 118 | 1 | return readDocument(reader, null); |
| 119 | } | |
| 120 | ||
| 121 | /** | |
| 122 | * Constructs a StAX event stream from the provided I/O stream and reads a | |
| 123 | * DOM4J document from it. | |
| 124 | * | |
| 125 | * @param is | |
| 126 | * The I/O stream from which the Document will be read. | |
| 127 | * @param systemId | |
| 128 | * A system id used to resolve entities. | |
| 129 | * | |
| 130 | * @return The Document that was read from the stream. | |
| 131 | * | |
| 132 | * @throws XMLStreamException | |
| 133 | * If an error occurs reading content from the stream. | |
| 134 | */ | |
| 135 | 0 | public Document readDocument(InputStream is, String systemId) |
| 136 | throws XMLStreamException { | |
| 137 | 0 | XMLEventReader eventReader = inputFactory.createXMLEventReader( |
| 138 | systemId, is); | |
| 139 | ||
| 140 | 0 | try { |
| 141 | 0 | return readDocument(eventReader); |
| 142 | } finally { | |
| 143 | 0 | eventReader.close(); |
| 144 | } | |
| 145 | } | |
| 146 | ||
| 147 | /** | |
| 148 | * Constructs a StAX event stream from the provided I/O character stream and | |
| 149 | * reads a DOM4J document from it. | |
| 150 | * | |
| 151 | * @param reader | |
| 152 | * The character stream from which the Document will be read. | |
| 153 | * @param systemId | |
| 154 | * A system id used to resolve entities. | |
| 155 | * | |
| 156 | * @return The Document that was read from the stream. | |
| 157 | * | |
| 158 | * @throws XMLStreamException | |
| 159 | * If an error occurs reading content from the stream. | |
| 160 | */ | |
| 161 | 1 | public Document readDocument(Reader reader, String systemId) |
| 162 | throws XMLStreamException { | |
| 163 | 1 | XMLEventReader eventReader = inputFactory.createXMLEventReader( |
| 164 | systemId, reader); | |
| 165 | ||
| 166 | 1 | try { |
| 167 | 1 | return readDocument(eventReader); |
| 168 | } finally { | |
| 169 | 1 | eventReader.close(); |
| 170 | } | |
| 171 | } | |
| 172 | ||
| 173 | /** | |
| 174 | * Reads a {@link Node}from the event stream. If the next event is a | |
| 175 | * {@link StartElement}, all events until the closing {@link EndElement} | |
| 176 | * will be read, and the resulting nodes will be added to the returned | |
| 177 | * {@link Element}. | |
| 178 | * | |
| 179 | *
 | |
| 180 | * Pre-Conditions : The stream must be positioned before an | |
| 181 | * event other than an EndElement,EndDocument, | |
| 182 | * or any DTD-related events, which are not currently supported. | |
| 183 | *
 | |
| 184 | * | |
| 185 | * @param reader | |
| 186 | * The reader from which events will be read. | |
| 187 | * | |
| 188 | * @return A DOM4J {@link Node}constructed from the read events. | |
| 189 | * | |
| 190 | * @throws XMLStreamException | |
| 191 | * If an error occurs reading from the stream, or the stream was | |
| 192 | * positioned before an unsupported event. | |
| 193 | */ | |
| 194 | 24 | public Node readNode(XMLEventReader reader) throws XMLStreamException { |
| 195 | 24 | XMLEvent event = reader.peek(); |
| 196 | ||
| 197 | 24 | if (event.isStartElement()) { |
| 198 | 8 | return readElement(reader); |
| 199 | 16 | } else if (event.isCharacters()) { |
| 200 | 16 | return readCharacters(reader); |
| 201 | 0 | } else if (event.isStartDocument()) { |
| 202 | 0 | return readDocument(reader); |
| 203 | 0 | } else if (event.isProcessingInstruction()) { |
| 204 | 0 | return readProcessingInstruction(reader); |
| 205 | 0 | } else if (event.isEntityReference()) { |
| 206 | 0 | return readEntityReference(reader); |
| 207 | 0 | } else if (event.isAttribute()) { |
| 208 | 0 | return readAttribute(reader); |
| 209 | 0 | } else if (event.isNamespace()) { |
| 210 | 0 | return readNamespace(reader); |
| 211 | } else { | |
| 212 | 0 | throw new XMLStreamException("Unsupported event: " + event); |
| 213 | } | |
| 214 | } | |
| 215 | ||
| 216 | /** | |
| 217 | * Reads a DOM4J {@link Document}from the provided stream. The stream | |
| 218 | * should be positioned at the start of a document, or before a {@link | |
| 219 | * StartElement} event. | |
| 220 | * | |
| 221 | * @param reader | |
| 222 | * The event stream from which to read the {@link Document}. | |
| 223 | * | |
| 224 | * @return The {@link Document}that was read from the stream. | |
| 225 | * | |
| 226 | * @throws XMLStreamException | |
| 227 | * If an error occurs reading events from the stream. | |
| 228 | */ | |
| 229 | 1 | public Document readDocument(XMLEventReader reader) |
| 230 | throws XMLStreamException { | |
| 231 | 1 | Document doc = null; |
| 232 | ||
| 233 | 1 | while (reader.hasNext()) { |
| 234 | 5 | XMLEvent nextEvent = reader.peek(); |
| 235 | 5 | int type = nextEvent.getEventType(); |
| 236 | ||
| 237 | 5 | switch (type) { |
| 238 | 1 | case XMLStreamConstants.START_DOCUMENT: |
| 239 | ||
| 240 | 1 | StartDocument event = (StartDocument) reader.nextEvent(); |
| 241 | ||
| 242 | 1 | if (doc == null) { |
| 243 | // create document | |
| 244 | 1 | if (event.encodingSet()) { |
| 245 | 1 | String encodingScheme = event |
| 246 | .getCharacterEncodingScheme(); | |
| 247 | 1 | doc = factory.createDocument(encodingScheme); |
| 248 | } else { | |
| 249 | 0 | doc = factory.createDocument(); |
| 250 | } | |
| 251 | } else { | |
| 252 | // duplicate or misplaced xml declaration | |
| 253 | 0 | String msg = "Unexpected StartDocument event"; |
| 254 | 0 | throw new XMLStreamException(msg, event.getLocation()); |
| 255 | } | |
| 256 | ||
| 257 | 1 | break; |
| 258 | ||
| 259 | 1 | case XMLStreamConstants.END_DOCUMENT: |
| 260 | 0 | case XMLStreamConstants.SPACE: |
| 261 | 2 | case XMLStreamConstants.CHARACTERS: |
| 262 | ||
| 263 | // skip end document and space outside the root element | |
| 264 | 3 | reader.nextEvent(); |
| 265 | ||
| 266 | 3 | break; |
| 267 | ||
| 268 | 1 | default: |
| 269 | ||
| 270 | 1 | if (doc == null) { |
| 271 | // create document | |
| 272 | 0 | doc = factory.createDocument(); |
| 273 | } | |
| 274 | ||
| 275 | 1 | Node n = readNode(reader); |
| 276 | 1 | doc.add(n); |
| 277 | } | |
| 278 | } | |
| 279 | ||
| 280 | 1 | return doc; |
| 281 | } | |
| 282 | ||
| 283 | /** | |
| 284 | * Reads a DOM4J Element from the provided event stream. The stream must be | |
| 285 | * positioned before an {@link StartElement}event. In addition to the | |
| 286 | * initial start event, all events up to and including the closing {@link | |
| 287 | * EndElement} will be read, and included with the returned element. | |
| 288 | * | |
| 289 | * @param eventReader | |
| 290 | * The event stream from which to read the Element. | |
| 291 | * | |
| 292 | * @return The Element that was read from the stream. | |
| 293 | * | |
| 294 | * @throws XMLStreamException | |
| 295 | * If an error occured reading events from the stream, or the | |
| 296 | * stream was not positioned before a {@linkStartElement}event. | |
| 297 | */ | |
| 298 | 8 | public Element readElement(XMLEventReader eventReader) |
| 299 | throws XMLStreamException { | |
| 300 | 8 | XMLEvent event = eventReader.peek(); |
| 301 | ||
| 302 | 8 | if (event.isStartElement()) { |
| 303 | // advance the reader and get the StartElement event | |
| 304 | 8 | StartElement startTag = eventReader.nextEvent().asStartElement(); |
| 305 | 8 | Element elem = createElement(startTag); |
| 306 | ||
| 307 | // read element content | |
| 308 | 8 | while (true) { |
| 309 | 31 | if (!eventReader.hasNext()) { |
| 310 | 0 | String msg = "Unexpected end of stream while reading" |
| 311 | + " element content"; | |
| 312 | 0 | throw new XMLStreamException(msg); |
| 313 | } | |
| 314 | ||
| 315 | 31 | XMLEvent nextEvent = eventReader.peek(); |
| 316 | ||
| 317 | 31 | if (nextEvent.isEndElement()) { |
| 318 | 8 | EndElement endElem = eventReader.nextEvent().asEndElement(); |
| 319 | ||
| 320 | 8 | if (!endElem.getName().equals(startTag.getName())) { |
| 321 | 0 | throw new XMLStreamException("Expected " |
| 322 | + startTag.getName() + " end-tag, but found" | |
| 323 | + endElem.getName()); | |
| 324 | } | |
| 325 | ||
| 326 | 8 | break; |
| 327 | } | |
| 328 | ||
| 329 | 23 | Node child = readNode(eventReader); |
| 330 | 23 | elem.add(child); |
| 331 | } | |
| 332 | ||
| 333 | 8 | return elem; |
| 334 | } else { | |
| 335 | 0 | throw new XMLStreamException("Expected Element event, found: " |
| 336 | + event); | |
| 337 | } | |
| 338 | } | |
| 339 | ||
| 340 | /** | |
| 341 | * Constructs a DOM4J Attribute from the provided event stream. The stream | |
| 342 | * must be positioned before an {@link Attribute}event. | |
| 343 | * | |
| 344 | * @param reader | |
| 345 | * The event stream from which to read the Attribute. | |
| 346 | * | |
| 347 | * @return The Attribute that was read from the stream. | |
| 348 | * | |
| 349 | * @throws XMLStreamException | |
| 350 | * If an error occured reading events from the stream, or the | |
| 351 | * stream was not positioned before an {@linkAttribute}event. | |
| 352 | */ | |
| 353 | 0 | public org.dom4j.Attribute readAttribute(XMLEventReader reader) |
| 354 | throws XMLStreamException { | |
| 355 | 0 | XMLEvent event = reader.peek(); |
| 356 | ||
| 357 | 0 | if (event.isAttribute()) { |
| 358 | 0 | Attribute attr = (Attribute) reader.nextEvent(); |
| 359 | ||
| 360 | 0 | return createAttribute(null, attr); |
| 361 | } else { | |
| 362 | 0 | throw new XMLStreamException("Expected Attribute event, found: " |
| 363 | + event); | |
| 364 | } | |
| 365 | } | |
| 366 | ||
| 367 | /** | |
| 368 | * Constructs a DOM4J Namespace from the provided event stream. The stream | |
| 369 | * must be positioned before a {@link Namespace}event. | |
| 370 | * | |
| 371 | * @param reader | |
| 372 | * The event stream from which to read the Namespace. | |
| 373 | * | |
| 374 | * @return The Namespace that was read from the stream. | |
| 375 | * | |
| 376 | * @throws XMLStreamException | |
| 377 | * If an error occured reading events from the stream, or the | |
| 378 | * stream was not positioned before a {@linkNamespace}event. | |
| 379 | */ | |
| 380 | 0 | public org.dom4j.Namespace readNamespace(XMLEventReader reader) |
| 381 | throws XMLStreamException { | |
| 382 | 0 | XMLEvent event = reader.peek(); |
| 383 | ||
| 384 | 0 | if (event.isNamespace()) { |
| 385 | 0 | Namespace ns = (Namespace) reader.nextEvent(); |
| 386 | ||
| 387 | 0 | return createNamespace(ns); |
| 388 | } else { | |
| 389 | 0 | throw new XMLStreamException("Expected Namespace event, found: " |
| 390 | + event); | |
| 391 | } | |
| 392 | } | |
| 393 | ||
| 394 | /** | |
| 395 | * Constructs a DOM4J Text or CDATA section from the provided event stream. | |
| 396 | * The stream must be positioned before a {@link Characters}event. | |
| 397 | * | |
| 398 | * @param reader | |
| 399 | * The event stream from which to read the Text or CDATA. | |
| 400 | * | |
| 401 | * @return The Text or CDATA that was read from the stream. | |
| 402 | * | |
| 403 | * @throws XMLStreamException | |
| 404 | * If an error occured reading events from the stream, or the | |
| 405 | * stream was not positioned before a {@linkCharacters}event. | |
| 406 | */ | |
| 407 | 16 | public CharacterData readCharacters(XMLEventReader reader) |
| 408 | throws XMLStreamException { | |
| 409 | 16 | XMLEvent event = reader.peek(); |
| 410 | ||
| 411 | 16 | if (event.isCharacters()) { |
| 412 | 16 | Characters characters = reader.nextEvent().asCharacters(); |
| 413 | ||
| 414 | 16 | return createCharacterData(characters); |
| 415 | } else { | |
| 416 | 0 | throw new XMLStreamException("Expected Characters event, found: " |
| 417 | + event); | |
| 418 | } | |
| 419 | } | |
| 420 | ||
| 421 | /** | |
| 422 | * Constructs a DOM4J Comment from the provided event stream. The stream | |
| 423 | * must be positioned before a {@link Comment}event. | |
| 424 | * | |
| 425 | * @param reader | |
| 426 | * The event stream from which to read the Comment. | |
| 427 | * | |
| 428 | * @return The Comment that was read from the stream. | |
| 429 | * | |
| 430 | * @throws XMLStreamException | |
| 431 | * If an error occured reading events from the stream, or the | |
| 432 | * stream was not positioned before a {@linkComment}event. | |
| 433 | */ | |
| 434 | 0 | public org.dom4j.Comment readComment(XMLEventReader reader) |
| 435 | throws XMLStreamException { | |
| 436 | 0 | XMLEvent event = reader.peek(); |
| 437 | ||
| 438 | 0 | if (event instanceof Comment) { |
| 439 | 0 | return createComment((Comment) reader.nextEvent()); |
| 440 | } else { | |
| 441 | 0 | throw new XMLStreamException("Expected Comment event, found: " |
| 442 | + event); | |
| 443 | } | |
| 444 | } | |
| 445 | ||
| 446 | /** | |
| 447 | * Constructs a DOM4J Entity from the provided event stream. The stream must | |
| 448 | * be positioned before an {@link EntityReference}event. | |
| 449 | * | |
| 450 | * @param reader | |
| 451 | * The event stream from which to read the {@link | |
| 452 | * EntityReference}. | |
| 453 | * | |
| 454 | * @return The {@link org.dom4j.Entity}that was read from the stream. | |
| 455 | * | |
| 456 | * @throws XMLStreamException | |
| 457 | * If an error occured reading events from the stream, or the | |
| 458 | * stream was not positioned before an {@linkEntityReference} | |
| 459 | * event. | |
| 460 | */ | |
| 461 | 0 | public Entity readEntityReference(XMLEventReader reader) |
| 462 | throws XMLStreamException { | |
| 463 | 0 | XMLEvent event = reader.peek(); |
| 464 | ||
| 465 | 0 | if (event.isEntityReference()) { |
| 466 | 0 | EntityReference entityRef = (EntityReference) reader.nextEvent(); |
| 467 | ||
| 468 | 0 | return createEntity(entityRef); |
| 469 | } else { | |
| 470 | 0 | throw new XMLStreamException("Expected EntityRef event, found: " |
| 471 | + event); | |
| 472 | } | |
| 473 | } | |
| 474 | ||
| 475 | /** | |
| 476 | * Constructs a DOM4J ProcessingInstruction from the provided event stream. | |
| 477 | * The stream must be positioned before a {@link ProcessingInstruction} | |
| 478 | * event. | |
| 479 | * | |
| 480 | * @param reader | |
| 481 | * The event stream from which to read the ProcessingInstruction. | |
| 482 | * | |
| 483 | * @return The ProcessingInstruction that was read from the stream. | |
| 484 | * | |
| 485 | * @throws XMLStreamException | |
| 486 | * If an error occured reading events from the stream, or the | |
| 487 | * stream was not positioned before a {@link | |
| 488 | * ProcessingInstruction} event. | |
| 489 | */ | |
| 490 | 0 | public org.dom4j.ProcessingInstruction readProcessingInstruction( |
| 491 | XMLEventReader reader) throws XMLStreamException { | |
| 492 | 0 | XMLEvent event = reader.peek(); |
| 493 | ||
| 494 | 0 | if (event.isProcessingInstruction()) { |
| 495 | 0 | ProcessingInstruction pi = (ProcessingInstruction) reader |
| 496 | .nextEvent(); | |
| 497 | ||
| 498 | 0 | return createProcessingInstruction(pi); |
| 499 | } else { | |
| 500 | 0 | throw new XMLStreamException("Expected PI event, found: " + event); |
| 501 | } | |
| 502 | } | |
| 503 | ||
| 504 | /** | |
| 505 | * Constructs a new DOM4J Element from the provided StartElement event. All | |
| 506 | * attributes and namespaces will be added to the returned element. | |
| 507 | * | |
| 508 | * @param startEvent | |
| 509 | * The StartElement event from which to construct the new DOM4J | |
| 510 | * Element. | |
| 511 | * | |
| 512 | * @return The Element constructed from the provided StartElement event. | |
| 513 | */ | |
| 514 | 8 | public Element createElement(StartElement startEvent) { |
| 515 | 8 | QName qname = startEvent.getName(); |
| 516 | 8 | org.dom4j.QName elemName = createQName(qname); |
| 517 | ||
| 518 | 8 | Element elem = factory.createElement(elemName); |
| 519 | ||
| 520 | // create attributes | |
| 521 | 8 | for (Iterator i = startEvent.getAttributes(); i.hasNext();) { |
| 522 | 0 | Attribute attr = (Attribute) i.next(); |
| 523 | 0 | elem.addAttribute(createQName(attr.getName()), attr.getValue()); |
| 524 | } | |
| 525 | ||
| 526 | // create namespaces | |
| 527 | 8 | for (Iterator i = startEvent.getNamespaces(); i.hasNext();) { |
| 528 | 0 | Namespace ns = (Namespace) i.next(); |
| 529 | 0 | elem.addNamespace(ns.getPrefix(), ns.getNamespaceURI()); |
| 530 | } | |
| 531 | ||
| 532 | 8 | return elem; |
| 533 | } | |
| 534 | ||
| 535 | /** | |
| 536 | * Constructs a new DOM4J Attribute from the provided StAX Attribute event. | |
| 537 | * | |
| 538 | * @param elem | |
| 539 | * DOCUMENT ME! | |
| 540 | * @param attr | |
| 541 | * The Attribute event from which to construct the new DOM4J | |
| 542 | * Attribute. | |
| 543 | * | |
| 544 | * @return The Attribute constructed from the provided Attribute event. | |
| 545 | */ | |
| 546 | 0 | public org.dom4j.Attribute createAttribute(Element elem, Attribute attr) { |
| 547 | 0 | return factory.createAttribute(elem, createQName(attr.getName()), attr |
| 548 | .getValue()); | |
| 549 | } | |
| 550 | ||
| 551 | /** | |
| 552 | * Constructs a new DOM4J Namespace from the provided StAX Namespace event. | |
| 553 | * | |
| 554 | * @param ns | |
| 555 | * The Namespace event from which to construct the new DOM4J | |
| 556 | * Namespace. | |
| 557 | * | |
| 558 | * @return The Namespace constructed from the provided Namespace event. | |
| 559 | */ | |
| 560 | 0 | public org.dom4j.Namespace createNamespace(Namespace ns) { |
| 561 | 0 | return factory.createNamespace(ns.getPrefix(), ns.getNamespaceURI()); |
| 562 | } | |
| 563 | ||
| 564 | /** | |
| 565 | * Constructs a new DOM4J Text or CDATA object from the provided Characters | |
| 566 | * event. | |
| 567 | * | |
| 568 | * @param characters | |
| 569 | * The Characters event from which to construct the new DOM4J | |
| 570 | * Text or CDATA object. | |
| 571 | * | |
| 572 | * @return The Text or CDATA object constructed from the provided Characters | |
| 573 | * event. | |
| 574 | */ | |
| 575 | 16 | public CharacterData createCharacterData(Characters characters) { |
| 576 | 16 | String data = characters.getData(); |
| 577 | ||
| 578 | 16 | if (characters.isCData()) { |
| 579 | 0 | return factory.createCDATA(data); |
| 580 | } else { | |
| 581 | 16 | return factory.createText(data); |
| 582 | } | |
| 583 | } | |
| 584 | ||
| 585 | /** | |
| 586 | * Constructs a new DOM4J Comment from the provided StAX Comment event. | |
| 587 | * | |
| 588 | * @param comment | |
| 589 | * The Comment event from which to construct the new DOM4J | |
| 590 | * Comment. | |
| 591 | * | |
| 592 | * @return The Comment constructed from the provided Comment event. | |
| 593 | */ | |
| 594 | 0 | public org.dom4j.Comment createComment(Comment comment) { |
| 595 | 0 | return factory.createComment(comment.getText()); |
| 596 | } | |
| 597 | ||
| 598 | /** | |
| 599 | * Constructs a new DOM4J Entity from the provided StAX EntityReference | |
| 600 | * event. | |
| 601 | * | |
| 602 | * @param entityRef | |
| 603 | * The EntityReference event from which to construct the new | |
| 604 | * DOM4J Entity. | |
| 605 | * | |
| 606 | * @return The Entity constructed from the provided EntityReference event. | |
| 607 | */ | |
| 608 | 0 | public org.dom4j.Entity createEntity(EntityReference entityRef) { |
| 609 | 0 | return factory.createEntity(entityRef.getName(), entityRef |
| 610 | .getDeclaration().getReplacementText()); | |
| 611 | } | |
| 612 | ||
| 613 | /** | |
| 614 | * Constructs a new DOM4J ProcessingInstruction from the provided StAX | |
| 615 | * ProcessingInstruction event. | |
| 616 | * | |
| 617 | * @param pi | |
| 618 | * The ProcessingInstruction event from which to construct the | |
| 619 | * new DOM4J ProcessingInstruction. | |
| 620 | * | |
| 621 | * @return The ProcessingInstruction constructed from the provided | |
| 622 | * ProcessingInstruction event. | |
| 623 | */ | |
| 624 | 0 | public org.dom4j.ProcessingInstruction createProcessingInstruction( |
| 625 | ProcessingInstruction pi) { | |
| 626 | 0 | return factory |
| 627 | .createProcessingInstruction(pi.getTarget(), pi.getData()); | |
| 628 | } | |
| 629 | ||
| 630 | /** | |
| 631 | * Constructs a new DOM4J QName from the provided JAXP QName. | |
| 632 | * | |
| 633 | * @param qname | |
| 634 | * The JAXP QName from which to create a DOM4J QName. | |
| 635 | * | |
| 636 | * @return The newly constructed DOM4J QName. | |
| 637 | */ | |
| 638 | 8 | public org.dom4j.QName createQName(QName qname) { |
| 639 | 8 | return factory.createQName(qname.getLocalPart(), qname.getPrefix(), |
| 640 | qname.getNamespaceURI()); | |
| 641 | } | |
| 642 | } | |
| 643 | ||
| 644 | /* | |
| 645 | * Redistribution and use of this software and associated documentation | |
| 646 | * ("Software"), with or without modification, are permitted provided that the | |
| 647 | * following conditions are met: | |
| 648 | * | |
| 649 | * 1. Redistributions of source code must retain copyright statements and | |
| 650 | * notices. Redistributions must also contain a copy of this document. | |
| 651 | * | |
| 652 | * 2. Redistributions in binary form must reproduce the above copyright notice, | |
| 653 | * this list of conditions and the following disclaimer in the documentation | |
| 654 | * and/or other materials provided with the distribution. | |
| 655 | * | |
| 656 | * 3. The name "DOM4J" must not be used to endorse or promote products derived | |
| 657 | * from this Software without prior written permission of MetaStuff, Ltd. For | |
| 658 | * written permission, please contact<EMAIL_ADDRESS>| |
| 659 | * | |
| 660 | * 4. Products derived from this Software may not be called "DOM4J" nor may | |
| 661 | * "DOM4J" appear in their names without prior written permission of MetaStuff, | |
| 662 | * Ltd. DOM4J is a registered trademark of MetaStuff, Ltd. | |
| 663 | * | |
| 664 | * 5. Due credit should be given to the DOM4J Project - http://www.dom4j.org | |
| 665 | * | |
| 666 | * THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS ``AS IS'' AND | |
| 667 | * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
| 668 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
| 669 | * ARE DISCLAIMED. IN NO EVENT SHALL METASTUFF, LTD. OR ITS CONTRIBUTORS BE | |
| 670 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
| 671 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
| 672 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
| 673 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
| 674 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| 675 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| 676 | * POSSIBILITY OF SUCH DAMAGE. | |
| 677 | * | |
| 678 | * Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved. | |
| 679 | */ |
|


XS Studios Homepage
Xander's Info
Games
Seth's Info
Favorite Songs
NAV OVER, BEGIN ACTUAL CONTENT<-->
XS Studios Home Page


The Long Day Closes (1992)
A Film Review by Mark O'Hara Visit Online Film Critics at http://www.ofcs.org
In 'The Long Day Closes' writer and director Terence Davies shows his virtuosity with cinematic technique - mainly poetic shots and scenes that bridge reality. But he doesn't do much with plot.
There's a scene that makes us look at a still shot of a carpet for about two minutes, before the camera slowly pans up to frame the young star Bud (Leigh McCormack) gazing out the window. At various times this little English boy watches the lives and fascinating actions of those around him. Many times Bud hangs about the house with his mother (Marjorie Yates); occasionally he does chores for her, but more frequently he asks for money that will get him into his beloved 'pictures.' The one friend Bud supposedly has does not appear onscreen for too long. Once, playing with another boy, he runs past Bud's house. In scene after scene we witness Bud's loneliness, which is tempered only by his good cheer - at least he is not whiny and irritating. Davies portrays well the desultory underside of childhood, the long hours of nothing-to-do. But is this charming randomness worth its 84-minute running time?
An interesting device Davies employs is voice-overs from vintage films, apparently dialogue that has left its mark on Bud. In one sequence we watch Bud in the balcony of a wonderful movie palace, only to have the scene melt masterfully into the setting of a carnival, the camera following the young adults that draw so much of Bud's admiration. These uses of cinematic references do resonate with meaning, saying a lot about the imagination and its power over us. If the editing of the film is not tight, it does at least attempt to depict the profound sensibilities of a delicate and likable boy.
And Leigh McCormack is likable.  He does not sneak out of reporting to the headmaster's office when he is late one day. When he is designated among the majority of the boys with head lice, Bud suffers through the creosote hair tonic and the tiny-toothed lice comb with only a grimace. In perhaps the most adorable scene in the film, we watch him take part in a duet to entertain the family and gathered guests. Here McCormack shows the gameness of a much older performer. He's able effortlessly to etch a boy sensitive and sweet, pious and rascally, dreamy and responsible.
As his mother, Marjorie Yates shows a quiet mastery of character. Most touching is a scene during which she sings an old air to Bud. They are sitting close but not looking at each other, and the camera is as still as they. After Mother mentions that this was a song her father would sing to her, we watch amazed as her eyes fill up with longing. A good example of a small but well-directed scene. We are also treated to wonderful performances by an ensemble of supporting actors - Anthony Watson, Nicolas Lamont, Ayse Owens, Tina Malone, Jimmy Wilde, and Robin Polley.
The film is set in the last days of 1955 and mostly in 1956. (We get to see a curious public gathering in which neighbors cross their arms and link their hands, dancing and crooning a community version of 'Auld Lang Syne'. Here's a nice mix of history and nostalgia.) Complimenting a film that serves as a strong study of English life in the mid-fifties, the sets are intricate and realistic, the street vibrant with middle-class goings-on. What makes Davies' vision so curious is his flash-forwards into what seems to be the present, the streets and Bud's house abandoned, wrecked by decades of rain and neglect.
 I borrowed the film on video from our local library, and I'm glad I watched it. It sorely needs something more happening - sorry, but all poetic work and no play make Terence a dull boy. But for strong acting and camera work, 'The Long Day Closes' should be watched and studied for a long time to come.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Not startedName: ai0Secret: abc123Exchange directory: c:\AI
Importants informations:Please use IE onlyPlease accept active-X


Falcon9
Falcon Heavy
Dragon
About SpaceX
Careers
Gallery
Shop
11 Missions This Year
Block 4 Booster Rocket Ready for Decommission
Brand Redesign
The End of the Beginning
Falcon Heavy Maiden Voyage
$150 Million USAF Contract
Previous
Next


At the same time, we comprehented concepts such as aerodynamic objects, the design and production of industrial products, and learned to design and implement business plan, to cope with projects, marketing and promotion, the idea of business as well as to understand the meaning of sponsorship and communication.


Home
Cat Videos
Abut Us
Contact Us
The cat videos!
We know why you're here. Nobody can resist good cat videos. Enjoy!


Bootstrap is the most popular HTML, CSS, and JS framework for developing responsive, mobile-first projects on the web.
Use the contextual classes to provide "meaning through colors":
This text is muted.
This text is important.
This text indicates success.
This text represents some information.
This text represents a warning.
This text represents danger.
This text is important.
This text indicates success.
This text represents some information.
This text represents a warning.
This text represents danger.
Left-aligned text.
Right-aligned text.
Center-aligned text.
Justified text. Justified text. Justified text. Justified text. Justified text. Justified text.
No wrap text. No wrap text. No wrap text. No wrap text.
Tip: Try to resize the browser window to see the behaviour of justify and nowrap.
If you add the .pre-scrollable class, the pre element gets a max-height of 350px and provides a y-axis scrollbar:
Text in a pre element is displayed in a fixed-width font, and it preserves both spaces and line breaks.
| Firstname | Lastname | |
|---|---|---|
| John | Doe |<EMAIL_ADDRESS>|
| Mary | Moe |<EMAIL_ADDRESS>|
| July | Dooley |<EMAIL_ADDRESS>|
| Active | Activeson |<EMAIL_ADDRESS>|
Click on the images to enlarge them.


Open
Success ! You're opened the collapse !
WRD is a framework for developers and webmasters.
WRD is a framework for developers and webmasters.
WRD is a framework for developers and webmasters.
WRD is a framework for developers and webmasters.
WRD is a framework for developers and webmasters.
FREE
$0
Host miễn phí
- 500 MB lưu trữ
- 800 MB băng thông
- Backup miễn phí
PRO
$50
Host trả phí
- 500 GB lưu trữ
- 20 TB băng thông
- Backup miễn phí
PREMIUM
$100
Host trả phí
- 100 TB lưu trữ
- 200 TB băng thông
- Backup miễn phí


I’m excited to learn about your design project. Ready to get started?
Name
Email
Type of project
Responsive design
Web app
Mobile app
Logo
Banner
Budget
$1,000 - $3,000
$3,000 - $5,000
$5,000 - $10,000
$10,000 - $25,000
$25,000+
Additional details
Submit


| vars {ggplot2} | R Documentation |
Just like aes()
, vars()
is a quoting function
that takes inputs to be evaluated in the context of a dataset.
These inputs can be:
variable names
complex expressions
In both cases, the results (the vectors that the variable represents or the results of the expressions) are used to form faceting groups.
vars(...)
... |
Variables or expressions automatically quoted. These are evaluated in the context of the data to form faceting groups. Can be named (the names are passed to a labeller). |
aes()
, facet_wrap()
, facet_grid()
p <- ggplot(mtcars, aes(wt, disp)) + geom_point() p + facet_wrap(vars(vs, am)) # vars() makes it easy to pass variables from wrapper functions: wrap_by <- function(...) { facet_wrap(vars(...), labeller = label_both) } p + wrap_by(vs) p + wrap_by(vs, am) # You can also supply expressions to vars(). In this case it's often a # good idea to supply a name as well: p + wrap_by(drat = cut_number(drat, 3)) # Let's create another function for cutting and wrapping a # variable. This time it will take a named argument instead of dots, # so we'll have to use the "enquote and unquote" pattern: wrap_cut <- function(var, n = 3) { # Let's enquote the named argument `var` to make it auto-quoting: var <- enquo(var) # `quo_name()` will create a nice default name: nm <- quo_name(var) # Now let's unquote everything at the right place. Note that we also # unquote `n` just in case the data frame has a column named # `n`. The latter would have precedence over our local variable # because the data is always masking the environment. wrap_by(!!nm := cut_number(!!var, !!n)) } # Thanks to tidy eval idioms we now have another useful wrapper: p + wrap_cut(drat)


Probability as a percentage
The simplest definition of a probability is as the number of cases that we're interested in, divided by the total possible cases. For example, if you have one out of 100 raffle tickets (one of which will win the prize), then the number of cases we're interested in is one (our own ticket) and the total number of cases is 100 (the total number of tickets that could win). So, our probability of winning is 1/100. We can also say that our percent chance of winning is 1%. We can either use the term "probability" and "chance" -- for our purposes they mean the same thing.
Let's try defining a probability: In backticks, enter "probability of RaffleWin is 1/100" to reflect the idea that we bought only one of the possible 100 tickets (note the use of capitals).
The probability is: `probability of RaffleWin is 1/100`
Variables: The capitalised RaffleWin is the probability variable. It represents the case whose probability we're interested in. That is, the case that we win the raffle. The calculator only deals with binary variables, meaning a situation that can either be true or false (but not both). By convention, we'll name the variables in such a way that they reflect the probability of something being true. So, RaffleWin represents the situation where it is true that our ticket wins the raffle.
- Variables must start with an uppercase letter, followed by any number of letters, digits or underscores.
- Variables are case-sensitive: RaffleWin is not the same as Rafflewin.
Once you have defined a probability variable, you can use it in other calculations. For example,
- The probability expressed as a percentage: `round 100 * probability of RaffleWin`
- Make that prettier by adding a % sign is outside the backticks: `round 100 * probability of RaffleWin`%
- The probability of not winning: `probability of no RaffleWin`
Exercises (1)
Use the editor below to calculate the following:
- Let's say you bought five raffle tickets (out of the possible 100). Use the calculator notation to define the probability of a RaffleWin in this situation. Then, on the next line, use the calculator notation to check what the probability is.
- Use the calculator to calculate the probability of not winning the raffle, for the situation where you bought 5 raffle tickets.
- Let's say that next Saturday is a typical day. Weather records show that 200 out of the last 1000 Saturdays had rain. Use the calculator to calculate the chance of rain next Saturday.
- Further to question 3, What is the probability of no rain?
- Somebody says, "the project is unlikely to fail". Assuming that "unlikely" means that only 20 out of 100 comparable projects have failed in the past, use the calculator to translate the sentence into a probability calculation.


import collections
from concurrent.futures import ProcessPoolExecutor, as_completed
import yaml
import os
from multiprocessing import cpu_count
import logging
from .config import default_script_args
import random
import string
#: List of environment variables to look for and replace.
env_variables = [
'DATA_DIRECTORY',
'CACHE_DIRECTORY',
'ARTIFACTS_DIRECTORY',
'NUSSL_DIRECTORY',
]
[docs]def modify_yml_with_env(yml, env_variables):
"""
Replaces specific substrings in a string or elsewhere with
their corresponding environment variables. The environment variables it currently
replaces are: DATA_DIRECTORY, CACHE_DIRECTORY, ARTIFACTS_DIRECTORY, and
NUSSL_DIRECTORY. Descriptions of these are in setup/environment/default.sh.
Args:
yml (str): A string containing the YML code (unparsed). Things in curly braces
in the string are modified by passing in the data in :py:obj:`runners.utils.env_variables`.
env_variables (list): A list of strings containing what environment variables
to replace.
Returns:
str: YML string with the environment variables replaced.
"""
for _env in env_variables:
_env_str = f'${{{_env}}}'
if _env_str in yml:
yml = yml.replace(_env_str, os.getenv(_env, ""))
return yml
[docs]def load_yaml(path_to_yml, env_variables=env_variables):
"""
Loads a YAML file and modifies it according to the environment variables using
:py:func:`runners.utils.modify_yml_with_env`.
Args:
path_to_yml (str): Path to the YML file.
env_variables (list): A list of strings containing what environment variables
to replace.
Returns:
dict: Parsed and loaded YAML into a dictionary.
"""
with open(path_to_yml, 'r') as f:
yml = modify_yml_with_env(f.read(), env_variables)
data = yaml.load(yml, Loader=yaml.FullLoader)
return data
[docs]def dump_yaml(data, path_to_yml):
"""
Dump data to a yml file at a specified location.
Args:
data (obj): Whatever data to dump to the yml file, as long as it can be
serialized to YAML. Typically a dictionary.
path_to_yml (str): Where to save the data.
"""
with open(path_to_yml, 'w') as f:
yaml.dump(data, f)
[docs]def parse_yaml(path_to_yml, jobs=True):
"""
Parses a YAML file, replacing necessary environment variables and putting
it in an expected form for the scripts.
Args:
path_to_yml (str): Path to yml file to be parsed.
jobs (bool, optional): Whether to convert it so that it's a sequence
of jobs if `jobs` is not defined in spec. Defaults to True.
Returns:
dict: Loaded dictionay, modified by environment variables and depending on
jobs.
"""
_spec = load_yaml(path_to_yml)
spec = {}
if 'jobs' not in _spec and jobs:
spec['jobs'] = [_spec]
else:
spec = _spec
return spec
[docs]def prepare_script_args(spec):
"""
Uses the default script args if those items are not specified for
the script.
Args:
spec (dict): Script args to modify with defaults as needed.
Returns:
dict: Modified dictionary with values as needed.
"""
spec['run_in'] = spec.pop('run_in', default_script_args['run_in'])
spec['num_gpus'] = spec.pop('num_gpus', default_script_args['num_gpus'])
spec['blocking'] = spec.pop('blocking', default_script_args['blocking'])
return spec
[docs]def disp_script(spec):
"""
Displays the arguments for a script in a readable fashion in
logging.
Args:
spec (dict): Dictionary containing script parameters.
"""
logging.info(
f"\n"
f" Running {spec['script']} with args:\n"
f" config: {spec['config']}\n"
f" run_in: {spec['run_in']}\n"
f" num_gpus: {spec['num_gpus']}\n"
f" blocking: {spec['blocking']}\n"
)
[docs]def deep_update(source, overrides):
"""
Update a nested dictionary or similar mapping.
Modify ``source`` in place.
Args:
source (dict): Source dictionary that gets updated
overrides (dict): Dictionary with items to update in source
dict.
Returns:
(dict): Updated source dictionary.
"""
for key, value in overrides.items():
if isinstance(value, collections.Mapping) and value:
returned = deep_update(source.get(key, {}), value)
source[key] = returned
else:
source[key] = overrides[key]
return source
[docs]def flatten(d, parent_key='', sep='_'):
"""
Flattens a dictionary so that it only has one level. A sequence of keys
will result in a key that is like::
{ key1_key2_key3: value }
from::
{ key1: {key2: {key3: val} } }
This is done recursively.
Args:
d ([type]): Dictionary that is being flattened.
parent_key (str, optional): The key above this one (used in recursion).
Defaults to ''.
sep (str, optional): Delimiter between keys. Defaults to '_'.
Returns:
dict: flattened dictionary
"""
items = []
for k, v in d.items():
new_key = parent_key + sep + k if parent_key else k
if isinstance(v, collections.MutableMapping):
items.extend(flatten(v, new_key, sep=sep).items())
else:
items.append((new_key, v))
return dict(items)
[docs]def make_random_string(length=10):
"""
Makes a random alphanumeric string of some length
Args:
length (int, optional): Length of the random string to return. Defaults to 10.
Returns:
str: Random alphanumeric string of the specified length.
"""
return ''.join(
random.choice(string.ascii_lowercase + string.digits)
for _ in range(length)
)


AliasTrait
trait AliasTrait
Methods
Alias for bind.
Alias for bind.
Fetches from container with getContent.
Alias for has.
Allow retrieving container values via magic properties.
Allows the use of isset() to determine if something exists in the container.
Allows the use of unset() to remove key a key from the container.
Bind a new key or fetch an existing one if no argument is provided.
Details
at line 17
AliasTrait
register(string|array $keyOrData, callable|null $data = null)
Alias for bind.
at line 30
AliasTrait
set(string|array $keyOrData, callable|null $data = null)
Alias for bind.
at line 42
mixed
resolve(string $key)
Fetches from container with getContent.
at line 54
bool
contains(string $key)
Alias for has.
at line 66
mixed
__get(string $key)
Allow retrieving container values via magic properties.
at line 78
bool
__isset(string $key)
Allows the use of isset() to determine if something exists in the container.
at line 90
void
__unset(string $key)
Allows the use of unset() to remove key a key from the container.
at line 104
mixed
__call(string $key, array $data)
Bind a new key or fetch an existing one if no argument is provided.
. If an argument is provided: Only the first one will be considered and it must be a callable.


The Amoreiras House, 300 years old, is surrounded by gardens and has five rooms with private bathroom - four double rooms and one family room.
The breakfast is continental - with coffee, milk, tea, fresh bread, homemade cake orange, kiwi, fruit of the day is served in the morning.
Allows guests to take advantage of liberating peace provided by the singing of birds, the observation of flora and fauna and stars.
You can hiking in the farm, visiting the riverside, the dam, the schist quarry, walk bike, use the indoor soccer field, etc.
Located 200m in the north of the city, and 1500m from the historical centerand the museums of Bragança. You may also visit the traditional villages of the Montesinho Natural Park, Douro River Park and Tua River Park.
We have conditions and space for organizing events for groups up to 50 people.
The name of the Quinta RICA-FÉ is mentioned already in 1258 in the Afonsine Ordinations. It is formed by the combination of Rich with Faith (Saint Foi). Dona Rica, daughter of the Duke of Poland was queen of Castile (from 1152 to 1157). Saint Foi de Agen is venerated in the Abbey of Conques, in the French Pyrenees
Around 1225 the Cistercian monks of Granja de Moreiruela, in Zamora, acquired this farm for their own production of food products, raising sheep and introduced improved water use and sustainable agroforestry. This purchase will be sponsored by Infanta Teresa Sanches from Portugal. They administered the farm and many others they owned in the municipalities of Bragança and Miranda do Douro for 200 years
In 1571 the Jesuits obtained royal authorization to buy this property to private individuals for their own production of food products, raising sheep. It was also used as weekend residence for teachers of the University College of Jesus, from the city of Bragança. They build a granite fountain dating back to 1742. They administered this property for 200 years, until 1759, when they abandoned Portugal after persecution by the Marques of Pombal.
The King divided its properties in several farms. This property was acquired by the sixth grandfather of the current owners in 1780 at auction. Since then it has been in the possession of the family.
“Hop cultivation began in 1960. Hops are an element used in brewing. Over 40 years, 6ha have been progressively installed. Market conditions have determined the culture in 2001. The memory of the culture is preserved and can be resumed."
+351 967 574 179
+351 969 325 439
Quinta da Rica-Fé
5300-245 Bragança, Portugal


Popular Repositories
Public contributions
-
Contribution Graph ZOMG!
-
Year of Contributions
-
Longest Streak
-
Current Streak
Contribution activity
octocat has no activity during this period
-
{{name}}
{{description}}
Updated on
- on Sep 3
octocat pushed to change-the-title at octocat/Spoon-Knife


| Module | ActiveMerchant::Billing::CreditCardMethods |
| In: |
lib/active_merchant/billing/credit_card_methods.rb
|
Convenience methods that can be included into a custom Credit Card object, such as an ActiveRecord based Credit Card object.
| CARD_COMPANIES | = | { 'visa' => /^4\d{12}(\d{3})?$/, 'master' => /^(5[1-5]\d{4}|677189)\d{10}$/, 'discover' => /^(6011|65\d{2})\d{12}$/, 'american_express' => /^3[47]\d{13}$/, 'diners_club' => /^3(0[0-5]|[68]\d)\d{11}$/, 'jcb' => /^3528\d{12}$/, 'switch' => /^6759\d{12}(\d{2,3})?$/, 'solo' => /^6767\d{12}(\d{2,3})?$/, 'dankort' => /^5019\d{12}$/, 'maestro' => /^(5[06-8]|6\d)\d{10,17}$/, 'forbrugsforeningen' => /^600722\d{10}$/, 'laser' => /^(6304[89]\d{11}(\d{2,3})?|670695\d{13})$/ |
# File lib/active_merchant/billing/credit_card_methods.rb, line 20 20: def self.included(base) 21: base.extend(ClassMethods) 22: end
# File lib/active_merchant/billing/credit_card_methods.rb, line 28 28: def valid_expiry_year?(year) 29: (Time.now.year..Time.now.year + 20).include?(year) 30: end
# File lib/active_merchant/billing/credit_card_methods.rb, line 36 36: def valid_issue_number?(number) 37: number.to_s =~ /^\d{1,2}$/ 38: end
# File lib/active_merchant/billing/credit_card_methods.rb, line 24 24: def valid_month?(month) 25: (1..12).include?(month) 26: end


Psychiatrists
Lebeza Psychiatry Clinic, Addis Ababa
- Address: Addis Ababa
- Hours: Open 24 hours
- Phone:<PHONE_NUMBER>
Sitota Center for Mental Health Care
- Address: Addis Ababa
- Hours: Open 24 hours
- Phone:<PHONE_NUMBER>
Ethiopia psychiatric clinic
- Address: Addis Ababa
- Hours: Open 24 hours
- Phone:<PHONE_NUMBER>
St. Amanuel Mental specialized Hospital
- Address: Addis Ababa
- Phone:<PHONE_NUMBER>


Request a demo
×
Close
Get started with privy.io
If you like our content, fill out the form below. We'll make sure you get our best stuff.
Email Address
Name
Message


CNIT 133
JavaScript
Home
Basic Ops
Functions
Loops
Arrays
Objects
jQuery
Ajax
Homework 7 - Extra Credit
Part 1
Part 2
Part 3
Part 4
Extra Credit


My name is Gurur and this is my little site about books. There is an entry for every book I've read, with some blurb about the things I found out about it on the interwebz. This will be a an ongoing WIP, since I've never really fully committed to taking a note of the books I've read (occasional bursts of GoodReads entries aside).
Tl;dr - this site will probably never be completed.
On the side panel to the right of this text you will see an alphabetical ordering of books. Should you want to browse by authors, you can toggle this in the navigation bar.
For those interested, this is a CMS-free site that uses jQuery. No db, so it's all manual. Why? No reason other than I didn't want to learn another static site generator and trawl through its documentation to do the simplest of things.
Anyway, enjoy browsing.


Loads new locale
w2utils.locale(locale, [callBack]);
| locale |
string or object, name of the locale or object with locale name and path |
| callBack |
function, call back function (optional) |
Description
All locale files are in the locale folder (see any one as an example). The first parameter can be a string or an object. If it is
a string (ex: ru-ru) it is the name of the locale. If it is an object then it has following structure:
For example:


index
|
up
|
prev
|
next
TextFileDeclaration Class
Definition at line
52
of
Project.hpp
Constructors
TextFileDeclaration
(
const
std::string& filePath_)
Member Functions
const
std::string&
FilePath
()
const
Member Variables
std::string
filePath
Constructor Details
TextFileDeclaration Constructor
cmajor::ast::TextFileDeclaration::TextFileDeclaration(
const
std::string& filePath_)
Definition at line
56
of
Project.cpp
:
56
:
ProjectDeclaration
(
ProjectDeclarationType
::
textFileDeclaration
)
,
filePath
(
filePath_
)
57
{
58
}
Declaration at line
55
of
Project.hpp
Member Function Details
FilePath Member Function
const
std::string& cmajor::ast::TextFileDeclaration::FilePath()
const
Definition at line
56
of
Project.hpp
:
56
{
return
filePath
;
}
Called by:
cmajor::ast::Project::ResolveDeclarations
index
|
up
|
prev
|
next


Bowling!
Silicon Bowling
No longer do you have to travel to far-away alleys. Play online today
0
1
2
3
4
5
6
7
8
9
10
Play Again?
🎳 IT'S THE PERFECT GAME 🎳


Roadmap
Future
- Support for in aggregated pipeline when a task has an manual trigger to be able to choose for which upstream version it should execute for. It will help to support self service deploys.
- Be able to in manual triggers to change parameters .


--- title: Case Study - North East Hampshire, England heading: Case Study - North East Hampshire, England description: Helping a local community come together (virtually) and learn about their local area during the UK COVID-19 lockdown image: /assets/images/pages/case-studies/2020/gb/north-east-hampshire-meta.jpg layout: case-study ---
The North East Hampshire constituency includes the towns and villages of Fleet, Greywell, Hartley Wintney, Hook, Odiham, and Yateley.
The towns within the North East Hampshire constituency regularly feature on various "Top 10 places to live in the UK" lists, and it is truly a wonderful place to live.
One of the reasons for this is the abundance of outdoor space.
Social isolation, especially for those living alone, can be incredibly tough mentally.
During the ongoing lockdown put in place to combat the COVID-19 outbreak, Trek View is offering free virtual guided tours of North East Hampshire for the local community (and beyond), to bring people together and give them the opportunity to learn more about their area from expert tour guides.
Tour guides will include members of the Fleet Pond Society who will virtually guide guests down the paths surrounding the pond and describe the wildlife found at this site of special scientific interest, and volunteers at the Basingstoke Canal Society who will take guests on a virtual journey down the canal explaining its history.
All you will need is a computer, tablet, or smartphone connected to the internet.
Dates and times are to be confirmed. Please enter your email below to register your interest in joining a virtually guided tour of North East Hampshire in the coming weeks.


How To Setup Airspace Hugo
By Themefisher on Jan 1, 0001
Install this template by following those simple steps:
STEP-1 : Hugo installation
Check this link below for install hugo on your computer. hugo install documentation
STEP-2 : Create your project
Hugo provides a new
command to create a new website.
hugo new site <new_project>
STEP-3 : Install the theme
Run this command
hugo new site airspace-hugo
and then go to the themes folder inside of airspace-hugo folder. You can also use this command cd airspace-hugo/themes
for going to this folder.
Then run the command
git clone git@github.com:themefisher/airspace-hugo.git
Alternatively, you can download the theme as .zip file and extract it in the themes
directory
After that you need to go to the airspace-hugo/exampleSite
folder and copy or cut all the elements, and now go back to the root folder and paste it here.
open the command prompt again and run cd ../
command for go back to the root folder.
STEP-4 : Host locally
Launching the website locally by using the following command:
hugo serve
Go to http://localhost:1313
Or you can check this video documentation for installing this template:
STEP-5 : Basic configuration
When building the website, you can set a theme by using --theme
option. However, we suggest you modify the configuration file (config.toml
) and set the theme as the default.
# Change the default theme to be use when building the site with Hugo
theme = "airspace-hugo"
STEP-6 : Create your first content pages
hugo new blog/post-name.md
STEP-7 : Build the website
When your site is ready to deploy, run the following command:
hugo
# You can also create a minified version by using this command:
hugo--minify
A public
folder will be generated, containing all static content and assets for your website. It can now be deployed on any web server.


HTML4 Test Suite
Acknowledgements
This test suite was written with the participation of the members of the
W3C HTML
working group.
Thanks especially to the efforts of:
Acknowledgements for the HTML4 Test Suite Contribution
Many people contributed to the creation of the Contribution to the W3C HTML test suite which this test suite is based on. They include the following:
- Art Bobroskie lead the effort, designed the structure of the suite, and created the documentation.
- Jeremy Bristol wrote tests, wrote and edited assertions and helped to debug the infrastructure.
- Xiao-Qi Ye wrote most of the tests for the initial drafts.
- Kien-Wei Tseng wrote tests, wrote and edited assertions and helped to debug the infrastructure.
- Mark Hickenbottom provided support for the tools to create the test suite.
- Shoko Ishizaka wrote tests and assertions.
- Yoko Colgan wrote tests and assertions.
- Chris Chen wrote tests and assertions.
Special thanks to the assistance and advice of:
- Tantek Çelik, who acted as senior mentor for this effort.
- Sean Hayes, who initiated this effort.
- Kirill Gavrylyuk, who gave sage direction when it was needed.
Thanks to the assistance and inspiration of:
[Contents]


Virgo
Virgo : (August 24 – September 22)
It is likely that you have to spend time away from your lover. This could make you somewhat unhappy but you can look forward to being together later on. You will develop some enmity with your neighbors. It could lead to clash of egos. There could be some legal problems too. But you will resolve the dispute with tact and understanding.


|
EM datagrams on *.kmall format
Reg.no. 410224 rev E
|
Definitions of structs used for building EM output datagrams of *.kmall format. More...
#include "stdint.h"
Go to the source code of this file.
Data Structures | |
| struct | EMdgmHeader_def |
| Definition of general datagram header. More... | |
| struct | EMdgmScommon_def |
| Sensor (S) output datagram - common part for all external sensors. More... | |
| struct | EMdgmSdataInfo_def |
| Information of repeated sensor data in one datagram. More... | |
| struct | EMdgmSPOdataBlock_def |
| #SPO - Sensor position data block. Data from active sensor is corrected data for position system installation parameters. Data is also corrected for motion ( roll and pitch only) if enabled by K-Controller operator. Data given both decoded and corrected (active sensors), and raw as received from sensor in text string. More... | |
| struct | EMdgmSPO_def |
| #SPO - Struct of position sensor datagram. Data from active sensor will be motion corrected if indicated by operator. Motion correction is applied to latitude, longitude, speed, course and ellipsoidal height. If the sensor is inactive, the fields will be marked as unavailable, defined by the parameters define UNAVAILABLE_LATITUDE etc. More... | |
| struct | EMdgmSKMinfo_def |
| Sensor (S) output datagram - info of KMB datagrams. More... | |
| struct | KMbinary_def |
| #SKM - Sensor attitude data block. Data given timestamped, not corrected. More... | |
| struct | KMdelayedHeave_def |
| #SKM - delayed heave. Included if available from sensor. More... | |
| struct | EMdgmSKMsample_def |
| #SKM - all available data. More... | |
| struct | EMdgmSKM_def |
| #SKM - data from attitude and attitude velocity sensors. More... | |
| struct | EMdgmSVPpoint_def |
| #SVP - Sound Velocity Profile. Data from one depth point contains information specified in this struct. More... | |
| struct | EMdgmSVP_def |
| #SVP - Sound Velocity Profile. Data from sound velocity profile or from CTD profile. Sound velocity is measured directly or estimated, respectively. More... | |
| struct | EMdgmSVTinfo_def |
| Part of Sound Velocity at Transducer datagram. More... | |
| struct | EMdgmSVTsample_def |
| #SVT - Sound Velocity at Transducer. Data sample. More... | |
| struct | EMdgmSVT_def |
| #SVT - Sound Velocity at Transducer. Data for sound velocity and temperature are measured directely on the sound velocity probe. More... | |
| struct | EMdgmSCLdataFromSensor_def |
| Part of clock datagram giving offsets and the raw input in text format. More... | |
| struct | EMdgmSCL_def |
| #SCL - CLock datagram. More... | |
| struct | EMdgmSDEdataFromSensor_def |
| Part of depth datagram giving depth as used, offsets, scale factor and data as received from sensor (uncorrected). More... | |
| struct | EMdgmSDE_def |
| #SDE - Depth datagram. More... | |
| struct | EMdgmSHIdataFromSensor_def |
| Part of Height datagram, giving corrected and uncorrected data as received from sensor. More... | |
| struct | EMdgmSHI_def |
| #SHI - Height datagram. More... | |
| struct | EMdgmMpartition_def |
| Multibeam (M) datagrams - data partition information. General for all M datagrams. More... | |
| struct | EMdgmMbody_def |
| Multibeam (M) datagrams - body part. Start of body of all M datagrams. More... | |
| struct | EMdgmMRZ_pingInfo_def |
| #MRZ - ping info. Information on vessel/system level, i.e. information common to all beams in the current ping. More... | |
| struct | EMdgmMRZ_txSectorInfo_def |
| #MRZ - sector information. More... | |
| struct | EMdgmMRZ_rxInfo_def |
| #MRZ - receiver specific information. More... | |
| struct | EMdgmMRZ_extraDetClassInfo_def |
| #MRZ - Extra detection class information. More... | |
| struct | EMdgmMRZ_sounding_def |
| #MRZ - Data for each sounding, e.g. XYZ, reflectivity, two way travel time etc. More... | |
| struct | EMdgmMRZ_extraSI_def |
| #MRZ - Extra seabed image samples. More... | |
| struct | EMdgmMRZ_def |
| #MRZ - Multibeam Raw Range and Depth datagram. The datagram also contains seabed image data. More... | |
| struct | EMdgmMWCtxInfo_def |
| #MWC - data block 1: transmit sectors, general info for all sectors More... | |
| struct | EMdgmMWCtxSectorData_def |
| #MWC - data block 1: transmit sector data, loop for all i = numTxSectors. More... | |
| struct | EMdgmMWCrxInfo_def |
| #MWC - data block 2: receiver, general info More... | |
| struct | EMdgmMWCrxBeamData_def |
| #MWC - data block 2: receiver, specific info for each beam. More... | |
| struct | EMdgmMWCrxBeamPhase1_def |
| #MWC - Beam sample phase info, specific for each beam and water column sample. numBeams * numSampleData = (Nrx * Ns) entries. Only added to datagram if phaseFlag = 1. Total size of phase block is numSampleData * int8_t. More... | |
| struct | EMdgmMWCrxBeamPhase2_def |
| #MWC - Beam sample phase info, specific for each beam and water column sample. numBeams * numSampleData = (Nrx * Ns) entries. Only added to datagram if phaseFlag = 2. Total size of phase block is numSampleData * int16_t. More... | |
| struct | EMdgmMWC_def |
| #MWC - Multibeam Water Column Datagram. Entire datagram containing several sub structs. More... | |
| struct | EMdgmCPOdataBlock_def |
| #CPO - Compatibility sensor position compatibility data block. Data from active sensor is referenced to position at antenna footprint at water level. Data is corrected for motion ( roll and pitch only) if enabled by K-Controller operator. Data given both decoded and corrected (active sensors), and raw as received from sensor in text string. More... | |
| struct | EMdgmCPO_def |
| #CPO - Struct of compatibility position sensor datagram. Data from active sensor will be motion corrected if indicated by operator. Motion correction is applied to latitude, longitude, speed, course and ellipsoidal height. If the sensor is inactive, the fields will be marked as unavailable, defined by the parameters define UNAVAILABLE_LATITUDE etc. More... | |
| struct | EMdgmCHEdata_def |
| #CHE - Heave compatibility data part. Heave reference point is at transducer instead of at vessel reference point. More... | |
| struct | EMdgmCHE_def |
| #CHE - Struct of compatibility heave sensor datagram. Used for backward compatibility with .all datagram format. Sent before #MWC (water column datagram) datagram if compatibility mode is enabled. The multibeam datagram body is common with the #MWC datagram. More... | |
| struct | EMdgmIIP_def |
| Definition of #IIP datagram containing installation parameters and sensor format settings. Details in separate document Installation parameters More... | |
| struct | EMdgmIOP_def |
| Definition of #IOP datagram containing runtime parameters, exactly as chosen by operator in the K-Controller/SIS menus. For detailed description of text strings, see the separate document Runtime parameters set by operator More... | |
| struct | EMdgmIB_def |
| #IB - Results from online built in test (BIST). Definition used for three different BIST datagrams, i.e. #IBE (BIST Error report), #IBR (BIST reply) or #IBS (BIST short reply). More... | |
Macros | |
| #define | MAX_NUM_BEAMS 1024 |
| #define | MAX_EXTRA_DET 1024 |
| #define | MAX_EXTRA_DET_CLASSES 11 |
| #define | MAX_SIDESCAN_SAMP 60000 |
| #define | MAX_SIDESCAN_EXTRA_SAMP 15000 |
| #define | MAX_NUM_TX_PULSES 9 |
| #define | MAX_ATT_SAMPLES 148 |
| #define | MAX_SVP_POINTS 2000 |
| #define | MAX_SVT_SAMPLES 1 |
| #define | MAX_DGM_SIZE 64000 |
| #define | MAX_NUM_MST_DGMS 256 |
| #define | MAX_NUM_MWC_DGMS 256 |
| #define | MAX_NUM_MRZ_DGMS 32 |
| #define | MAX_SPO_DATALENGTH 250 |
| #define | MAX_ATT_DATALENGTH 250 |
| #define | MAX_SVT_DATALENGTH 64 |
| #define | MAX_SCL_DATALENGTH 64 |
| #define | MAX_SDE_DATALENGTH 32 |
| #define | MAX_SHI_DATALENGTH 32 |
| #define | MAX_CPO_DATALENGTH 250 |
| #define | MAX_CHE_DATALENGTH 64 |
| #define | UNAVAILABLE_POSFIX 0xffff |
| #define | UNAVAILABLE_LATITUDE 200.0f |
| #define | UNAVAILABLE_LONGITUDE 200.0f |
| #define | UNAVAILABLE_SPEED -1.0f |
| #define | UNAVAILABLE_COURSE -4.0f |
| #define | UNAVAILABLE_ELLIPSOIDHEIGHT -999.0f |
| #define | EM_DGM_I_INSTALLATION_PARAM "#IIP" |
| #define | EM_DGM_I_OP_RUNTIME "#IOP" |
| #define | EM_DGM_S_POSITION "#SPO" |
| #define | EM_DGM_S_KM_BINARY "#SKM" |
| #define | EM_DGM_S_SOUND_VELOCITY_PROFILE "#SVP" |
| #define | EM_DGM_S_SOUND_VELOCITY_TRANSDUCER "#SVT" |
| #define | EM_DGM_S_CLOCK "#SCL" |
| #define | EM_DGM_S_DEPTH "#SDE" |
| #define | EM_DGM_S_HEIGHT "#SHI" |
| #define | EM_DGM_M_RANGE_AND_DEPTH "#MRZ" |
| #define | EM_DGM_M_WATER_COLUMN "#MWC" |
| #define | EM_DGM_C_POSITION "#CPO" |
| #define | EM_DGM_C_HEAVE "#CHE" |
| #define | SPO_VERSION 0 |
| #define | SKM_VERSION 1 |
| #define | SVP_VERSION 0 |
| #define | SVT_VERSION 0 |
| #define | SCL_VERSION 0 |
| #define | SDE_VERSION 0 |
| #define | SHI_VERSION 0 |
| #define | MRZ_VERSION 0 |
| #define | MWC_VERSION 0 |
| #define | CPO_VERSION 0 |
| #define | CHE_VERSION 0 |
| #define | IIP_VERSION 0 |
| #define | IOP_VERSION 0 |
| #define | BIST_VERSION 0 |
Typedefs | |
| typedef struct EMdgmHeader_def | EMdgmHeader |
| typedef struct EMdgmHeader_def * | pEMdgmHeader |
| typedef struct EMdgmScommon_def | EMdgmScommon |
| typedef struct EMdgmScommon_def * | pEMdgmScommon |
| typedef struct EMdgmSdataInfo_def | EMdgmSdataInfo |
| typedef struct EMdgmSdataInfo_def * | pEMdgmSdataInfo |
| typedef struct EMdgmSPOdataBlock_def | EMdgmSPOdataBlock |
| typedef struct EMdgmSPOdataBlock_def * | pEMdgmSPOdataBlock |
| typedef struct EMdgmSPO_def | EMdgmSPO |
| typedef struct EMdgmSPO_def * | pEMdgmSPO |
| typedef struct EMdgmSKMinfo_def | EMdgmSKMinfo |
| typedef struct EMdgmSKMinfo_def * | pEMdgmSKMinfo |
| typedef struct KMbinary_def | KMbinary |
| typedef struct KMbinary_def * | pKMbinary |
| typedef struct KMdelayedHeave_def | KMdelayedHeave |
| typedef struct KMdelayedHeave_def * | pKMdelayedHeave |
| typedef struct EMdgmSKMsample_def | EMdgmSKMsample |
| typedef struct EMdgmSKMsample_def * | pEMdgmSKMsample |
| typedef struct EMdgmSKM_def | EMdgmSKM |
| typedef struct EMdgmSKM_def * | pEMdgmSKM |
| typedef struct EMdgmSVPpoint_def | EMdgmSVPpoint |
| typedef struct EMdgmSVPpoint_def * | pEMdgmSVPpoint |
| typedef struct EMdgmSVP_def | EMdgmSVP |
| typedef struct EMdgmSVP_def * | pEMdgmSVP |
| typedef struct EMdgmSVTsample_def | EMdgmSVTsample |
| typedef struct EMdgmSVTsample_def * | pEMdgmSVTsample |
| typedef struct EMdgmSVT_def | EMdgmSVT |
| typedef struct EMdgmSVT_def * | pEMdgmSVT |
| typedef struct EMdgmSCLdataFromSensor_def | EMdgmSCLdataFromSensor |
| typedef struct EMdgmSCLdataFromSensor_def * | pEMdgmSCLdataFromSensor |
| typedef struct EMdgmSCL_def | EMdgmSCL |
| typedef struct EMdgmSCL_def * | pEMdgmSCL |
| typedef struct EMdgmSDEdataFromSensor_def | EMdgmSDEdataFromSensor |
| typedef struct EMdgmSDEdataFromSensor_def * | pEMdgmSDEdataFromSensor |
| typedef struct EMdgmSDE_def | EMdgmSDE |
| typedef struct EMdgmSDE_def * | pEMdgmSDE |
| typedef struct EMdgmSHIdataFromSensor_def | EMdgmSHIdataFromSensor |
| typedef struct EMdgmSHIdataFromSensor_def * | pEMdgmSHIdataFromSensor |
| typedef struct EMdgmSHI_def | EMdgmSHI |
| typedef struct EMdgmSHI_def * | pEMdgmSHI |
| typedef struct EMdgmMpartition_def | EMdgmMpartition |
| typedef struct EMdgmMpartition_def * | pEMdgmMpartition |
| typedef struct EMdgmMbody_def | EMdgmMbody |
| typedef struct EMdgmMbody_def * | pEMdgmMbody |
| typedef struct EMdgmMRZ_pingInfo_def | EMdgmMRZ_pingInfo |
| typedef struct EMdgmMRZ_pingInfo_def * | pEMdgmMRZ_pingInfo |
| typedef struct EMdgmMRZ_txSectorInfo_def | EMdgmMRZ_txSectorInfo |
| typedef struct EMdgmMRZ_txSectorInfo_def * | pEMdgmMRZ_txSectorInfo |
| typedef struct EMdgmMRZ_rxInfo_def | EMdgmMRZ_rxInfo |
| typedef struct EMdgmMRZ_rxInfo_def * | pEMdgmMRZ_rxInfo |
| typedef struct EMdgmMRZ_extraDetClassInfo_def | EMdgmMRZ_extraDetClassInfo |
| typedef struct EMdgmMRZ_extraDetClassInfo_def * | pEMdgmMRZ_extraDetClassInfo |
| typedef struct EMdgmMRZ_sounding_def | EMdgmMRZ_sounding |
| typedef struct EMdgmMRZ_sounding_def * | pEMdgmMRZ_sounding |
| typedef struct EMdgmMRZ_extraSI_def | EMdgmMRZ_extraSI |
| typedef struct EMdgmMRZ_extraSI_def * | pEMdgmMRZ_extraSI |
| typedef struct EMdgmMRZ_def | EMdgmMRZ |
| typedef struct EMdgmMRZ_def * | pEMdgmMRZ |
| typedef struct EMdgmMWCtxInfo_def | EMdgmMWCtxInfo |
| typedef struct EMdgmMWCtxInfo_def * | pEMdgmMWCtxInfo |
| typedef struct EMdgmMWCtxSectorData_def | EMdgmMWCtxSectorData |
| typedef struct EMdgmMWCtxSectorData_def * | pEMdgmMWCtxSectorData |
| typedef struct EMdgmMWCrxInfo_def | EMdgmMWCrxInfo |
| typedef struct EMdgmMWCrxInfo_def * | pEMdgmMWCrxInfo |
| typedef struct EMdgmMWCrxBeamData_def | EMdgmMWCrxBeamData |
| typedef struct EMdgmMWCrxBeamData_def * | pEMdgmMWCrxBeamData |
| typedef struct EMdgmMWCrxBeamPhase1_def | EMdgmMWCrxBeamPhase1 |
| typedef struct EMdgmMWCrxBeamPhase1_def * | pEMdgmMWCrxBeamPhase1 |
| typedef struct EMdgmMWCrxBeamPhase2_def | EMdgmMWCrxBeamPhase2 |
| typedef struct EMdgmMWCrxBeamPhase2_def * | pEMdgmMWCrxBeamPhase2 |
| typedef struct EMdgmMWC_def | EMdgmMWC |
| typedef struct EMdgmMWC_def * | pEMdgmMWC |
| typedef struct EMdgmCPOdataBlock_def | EMdgmCPOdataBlock |
| typedef struct EMdgmCPOdataBlock_def * | pEMdgmCPOdataBlock |
| typedef struct EMdgmCPO_def | EMdgmCPO |
| typedef struct EMdgmCPO_def * | pEMdgmCPO |
| typedef struct EMdgmCHEdata_def | EMdgmCHEdata |
| typedef struct EMdgmCHEdata_def * | pEMdgmCHEdata |
| typedef struct EMdgmCHE_def | EMdgmCHE |
| typedef struct EMdgmCHE_def * | pEMdgmCHE |
| typedef struct EMdgmIIP_def | dgm_IIP |
| typedef struct EMdgmIIP_def * | pdgm_IIP |
| typedef struct EMdgmIOP_def | dgm_IOP |
| typedef struct EMdgmIOP_def * | pdgm_IOP |
| typedef struct EMdgmIB_def | dgm_IB |
| typedef struct EMdgmIB_def * | pdgm_IB |
Definitions of structs used for building EM output datagrams of *.kmall format.
| #define MAX_NUM_BEAMS 1024 |
Maximum number of beams. Actual number of beams in datagram given by parameter numSoundingsMaxMain in struct EMdgmMRZ_rxInfo_def.
| #define MAX_EXTRA_DET 1024 |
Maximum number of extra detections. Actual number of extra detections in datagram given by parameter numExtraDetections in struct EMdgmMRZ_rxInfo_def.
| #define MAX_EXTRA_DET_CLASSES 11 |
Maximum number of classes of extra detections. Actual number of extra detection classes in datagram given by parameter numExtraDetectionClasses in struct EMdgmMRZ_rxInfo_def.
| #define MAX_SIDESCAN_SAMP 60000 |
Maximum number of seabed image / sidescan data samples. Actual number to be found in parameter SInumSamples in struct EMdgmMRZ_sounding_def.
| #define MAX_SIDESCAN_EXTRA_SAMP 15000 |
Maximum number of extra seabed image / sidescan data samples at the port and starboard flanks.
| #define MAX_NUM_TX_PULSES 9 |
Maximum number of TX pulses per ping. Actual length in datagram given by parameter numTxSectors in struct EMdgmMRZ_pingInfo_def.
| #define MAX_ATT_SAMPLES 148 |
Maximum number of attitude samples allowed in one datagram. Actual length in datagram given by parameter numSamplesArray in struct EMdgmSdataInfo_def
| #define MAX_SVP_POINTS 2000 |
Maximum number of sound velocity profile depth points. Actual length in datagram given by numSamples in the struct EMdgmSVP_def
| #define MAX_SVT_SAMPLES 1 |
Maximum number of sound velocity probe samples. Actual length in datagram given by numSamplesArray in the struct EMdgmSVTinfo_def
| #define MAX_DGM_SIZE 64000 |
Maximum length for datagram / UDP packet.
| #define MAX_NUM_MST_DGMS 256 |
Maximum number of #MST datagram partitions that can be sent from PU. See struct EMdgmMpartition_def.
| #define MAX_NUM_MWC_DGMS 256 |
Maximum number of #MWC datagram partitions that can be sent from PU. See struct EMdgmMpartition_def.
| #define MAX_NUM_MRZ_DGMS 32 |
Maximum number of #MRZ datagram partitions that can be sent from PU. See struct EMdgmMpartition_def.
| #define MAX_SPO_DATALENGTH 250 |
Maximum length (bytes) for sensor data from position sensor.
| #define MAX_ATT_DATALENGTH 250 |
Maximum length (bytes) for sensor data from attitude sensor.
| #define MAX_SVT_DATALENGTH 64 |
Maximum length (bytes) for sensor data from sensor for sound velocity at transducer.
| #define MAX_SCL_DATALENGTH 64 |
Maximum length (bytes) for sensor data from clock sensor.
| #define MAX_SDE_DATALENGTH 32 |
Maximum length (bytes) for sensor data from depth sensor.
| #define MAX_SHI_DATALENGTH 32 |
Maximum length (bytes) for sensor data from height sensor.
| #define MAX_CPO_DATALENGTH 250 |
Maximum length (bytes) for sensor data from position sensor (compatibility).
| #define MAX_CHE_DATALENGTH 64 |
Maximum length (bytes) for heave data used for water column (compatibility).
| #define UNAVAILABLE_POSFIX 0xffff |
Unavailable sensor data, output to datagram.
| #define UNAVAILABLE_LATITUDE 200.0f |
Unavailable sensor data, output to datagrams.
| #define UNAVAILABLE_LONGITUDE 200.0f |
Unavailable sensor data, output to datagram.
| #define UNAVAILABLE_SPEED -1.0f |
Unavailable sensor data output, to datagram.
| #define UNAVAILABLE_COURSE -4.0f |
Unavailable sensor data output, to datagram.
| #define UNAVAILABLE_ELLIPSOIDHEIGHT -999.0f |
Unavailable sensor data output, to datagram.


Ebook download page!
Please kindly enter your name and e-mail address, and a copy of the book will be sent to you via your email.
Full names
Email address
We'll never share your email with anyone else.
Submit


Uganda's first phone and laptop factory launched 22 Nov 2019, 18:01 by Ruth Nasejje President Museveni has launched the first phone and laptop factory in Uganda .


Weather 4cast
Search for any city you want to find the current weather.
Search By City
Get Weather
Past cities
Showing weather for:


Enjoying programmer anarchy: HappyPancake - Remoting
Note: This is the second post in a series of posts about my experiences working for HappyPancake:
- Introduction & Swedish culture.
- Working remote.
Programmer anarchy.The bit with Rinat.The dev stack.The infrastructure part.- Enjoyed programmer anarchy - looking for the next project
Working remote: a small quest
Tomas and HappyPancake are located in Sweden, and I live in Belgium, so there is some remoting involved.
Because we are working remote, quintessential communication is very important. It took us a while to figure out how we could do everything we wanted to do, but I think we currently pretty much nailed it… Here is an overview:
Email, documents and video conferences: Google and dropbox
No big surprises here; google offers a very polished and well-integrated platform at a very affordable cost, and we combine that with dropbox every once in a while, because we both have dropbox. We are not really anal about it, just pragmatic.
In the beginning we used GTalk a lot, but as now someone else is joining in (more about that later), we needed a new way to communicate….
Our virtual office: Campfire + hubot + shovel
After some time with GTalk and google Hangouts, we decided to have most communication over Campfire.
This was for several reasons:
- We have a fully searchable history of our conversations.
- The team member that will join us on Monday lives in a different time-zone; there is a difference of 5 hours here. This will allow him to chime in and make sure that we all understand each other.
Chat bots!!
- Hubot has some nice features, like
/remind me in [timespan] to [subject]
or/translate me [phrase]
, oryoutube me [some piece of music I'd like to listen to]
(although I do that in the sandbox room, not the R&D room). - Yesterday we started using shovel for devops, so we can deploy by typing
shovel deploy hpc_web to devserver
, and it reports to us back in the chat room, so everyone can see what we are doing. Shovel has both a campfire, a command line and a webservice interface, so we can invoke our devops scripts in multiple ways…
Cooperative brainstorming and analysis: Mindmup
This was somewhat of a challenge; we needed to find a way that we could organize and visualize our thoughts, and we tried several real-time collaborative platforms for that. We even tried using a tablet for that, on-screen drawing etc, but in the end, the thing that works pretty smooth is a tool called mindmup, which allows you to cooperatively work on a hierarchically organised notes, and I have to say it works perfect! We combine that with google hangouts, and we end up with an experience comparable to seeing each other in real life.
We also used an approach comparable to event storming, but ending up with use cases to model the domain, but more on that in another post!
Conclusion
Turns out that remoting is pretty workable if you understand the constraints you are working with, and not fight them but embrace them. Communication on a chat room might be a bit slower and more cumbersome, but the advantages far outweigh the disadvantages.


%NAVBAR%
Update one section at a time.
Display
Cycle through weather and enabled printers
%DISPLAYTABLE%
Display brightness
Save
Clock
Offset from UTC in hours
Clock format
24 hour
AM / PM
Date format
DD/MM/YY
MM/DD/YY
Save
Timings - enter values in seconds
Current weather update interval: (min 30 seconds)
Print monitor interval: (min 5 seconds)
Display cycle interval: (min 30 seconds)
Save
Reset
Reset settings
Forget Wifi


Kandi Burruss Shares A Throwback Photo Featuring The Old Lady Gang When The Ladies Were Younger
by Ron CollinsKandi Burruss shared a throwback photo featuring the Old Lady Gang ladies, but much younger. See the photo below.
‘#FBF with the #OldLadyGang when they were younger. That’s me being held by my #AuntBertha. @mamajoyce1_ has on the yellow dress.  My mom was the youngest of 14 kids.  Tons of cousins!’ Kandi capti0ned her post.
Someone commented: ‘Your grandma looked like she didn’t play any games.’
A follower told Kandi, ‘Omg I wish I could heart this a thousand times.  I met Aunt Nora at OLG and she is nothing short of amazing 🥰🥰🙏🏾🙏🏾’
Another commenter said: ‘My granny has 14 kids as well. I have 43 first cousins and God knows how many 2nd and 3rds 😅😅😅. Them lil ladies were getting it in back in the day 😅’
Someone else posted: ‘Nice! Wow, 14 kids. How many are still living? My dad had 15 siblings. Lol.’
One commenter wrote this: ‘Wow!!! I love this! Throwbacks are the best!
Not too long ago, it’s been revealed that Kandi seems to be sick and tired of Instagram’s changes.
You may be aware of the fact that the social media giant is taking away the likes, and other changes might come.
So, in order to be able to remain in touch with her fans, Kandi just made her phone number public!


The ilist is a template library modeled after the STL list. Instead of allocating a container for the elements, it uses base classes for the elements. This way much less alloc an free operations are needed, which saves a lot of cpu time and memory. Also when iterating thru the list one indirection less is needed. It uses the istd namespace.
template <class T> class list {
...
};
The list itself consisting of a head and tail pointer to a class T.
template <class T> class listElement {
...
};
Used as a base class for elements. This contains the forward and backward linking pointer and a pointer to the list itself.
list()
constructor, clears the list
~list()
destructor, removes all elements from the list
const T * front()
returns front (head) of list.
bool empty()
const T * back()
returns back (tail) of list.
void push_front(T * e)
Add an element to the front (head) of the list.
void push_back(T * e)
Add an element to the back (tail) of the list.
T * pop_front()
Remove an element from the front (head) of the list.
T * pop_back()
Remove an element from the back (tail) of the list.
void insertBefore(T * e, T * before)
Insert the element e before the element identified by 'before' in the list.
void insertBehind(T * e, T * behind)
Insert the element e behind the element identified by 'behind' in the list.
void swap(T * a, T * b)
Swaps the values of the two given listElement objects. The swap function of listElement must be overwritten, also the pointers a and b passed to swap must point to a valid object.
void sort(T * start = NULL, T * end = NULL)
Sorts the list by using quicksort. The sort will be done between start and end. If start is NULL, the start of the list will be used, and if end is NULL, the end of the list. So by calling sort() withouth parameters, the sorting will be done for the whole list. During sorting, the function will call listElement::compare() and listElement::swap(). So both of them must be implemented to not end up with an assertion.
listElement()
virtual ~listElement()
The destructor of a list element removes the element from the list.
const T * goNext()
Returns the next element in the list.
const T * goPrev()
Returns the previous element in the list.
void remove()
Removes the element from the list.
const list * getList()
Returns the list, in which this element is linked.
virtual int compare(T * e)
Will be called from list::sort() to know how to handle the item and the one passed to compare. The function need to return a value less than 0, if this is < e, zero if this is equal to e or a value greater than 0 if this is > e. If you don't whant to call list::sort, there is no need to override this function.
virtual void swap(T * with)
Will be called from list::sort() or list::swap() to swap the instance of the listElement object with the one passed. The implementation of the function is responsible to switch all fields of this and with. If you don't whant to call list::sort() or list::swap(), there is no need to override this function.
// use the ilist base class
class sample : public istd::listElement<sample> {
}
...
// defining the list
istd::list<sample> samples;
...
// iterating thru the list
for(class sample * s = samples.front(); s; s=s->goNext()) {
...
}


When checked, clicking the middle mouse button when the mouse pointer is over the message window will go to the next unread message.


--- layout: default title: "TheRedChannel" ---
TheRedChannel is a cybercarnet about state-makers, mark-makers, and state marks by Andrew Papenheim. That is: visual identity, branded communications, the people who make them, and the people who use them. It is also more of a general exercise in the art of egg gathering. Andrew's New Year's resolution was to tweet less. Blogs, essentially tweetstorms to which – blissfully – the reader cannot readily reply, make a decent ersatz. Thanks for visiting.
{{ post.excerpt }}


The following demo does not claim, nor does it intend to “solve”, COVID-19 detection. It is a demonstration for automatic COVID-19 detection using machine learning and is not meant to be a reliable, highly accurate COVID-19 diagnosis system, nor has it been professionally or academically vetted.


bmptopnm(1) bmptopnm(1) NAME bmptopnm - convert a BMP file into a portable anymap SYNOPSIS bmptopnm [bmpfile] DESCRIPTION Reads a Microsoft Windows or OS/2 BMP file as input. Produces a PBM, PGM, or PNM image as output. If the input is colormapped and contains only black and white, the output is PBM. If the input is colormapped and contains only black white and gray, the output is PGM. Otherwise, the output is PPM. This program cannot convert BMP files with compressed (run length encoded) image data. It recognizes the compression and issues an error message. This program cannot convert BMP files with 16 bits per pixel (only because the author did not have a complete specification for them). It recognizes the format and issues an error message. SEE ALSO ppmtobmp(1), ppmtowinicon(1), ppm(5) AUTHOR Copyright (C) 1992 by David W. Sanderson. 17 February 2002 bmptopnm(1)


cargo rustc
Compile a Rust package, and pass extra options to the compiler.
More information: home page
- Build the package or packages defined by the `Cargo.toml` manifest file in the current working directory:
cargo rustc
- Build artifacts in release mode, with optimizations:
cargo rustc --release
- Compile with architecture-specific optimizations for the current CPU:
cargo rustc --release -- -C target-cpu=native
- Compile with speed optimization:
cargo rustc -- -C opt-level 1|2|3
- Compile with [s]ize optimization (`z` also turns off loop vectorization):
cargo rustc -- -C opt-level s|z
- Check if your package uses unsafe code:
cargo rustc --lib -- -D unsafe-code
- Build a specific package:
cargo rustc --package package
- Build only the specified binary:
cargo --bin name


Griffith University
Great Barrier Reef
Australia's great natural wonder
Home
Frequency of activities
Sentiment analysis
Tweets by market
Word graph and word cloud
World map (click to select)
Pie chart for categories
Pie chart for selected category
Show tweets


Psalms 141:2
Let my prayer be set forth before thee as incense; and the lifting up of my hands as the evening sacrifice.


Set up list for:
"Your attention has a limited capacity – you can only fit so much in your mind at any
one time ... plan for how you'll do things, releasing the part of your attention that
it struggling to hold each item on your to-do list in mind."
-- Tom Stafford , BBC
Access your list on:


Proxy editing requirements
See T2455 to learn about proxy editing and why we want this in GES and Pitivi. This page is meant to brainstorm:
- User interface/user experience (UX) possibilities and requirements
- GES API requirements deriving from that. This also touches on media assets management in general.
Prior art if you don't know what proxy editing “feels” like:
- In Edius. This is an interesting example of a badly designed UI: pretty much all the options/preferences presented there are useless, the application should be smart enough to make those choices!
- In FCP X (alternative longer version)
- In Sony Vegas
- Others we should be looking at in particular? Some particularly great (short and to the point) video tutorials of other apps we ought to see? Let us know.
User experience
As T2455 indicates, we can envision two types of user experience: a semi-automatic and a fully-automated one. Since Pitivi is not the only application (now and in the future) using GES, we need to design the GES API to be flexible enough to accommodate the design needs of both kinds of applications.
In both cases, the experience must be:
- Intuitive: it should be a very easily discoverable feature
- With good visual indications of the process and progress. We should probably have some sort of “yellow/green light” (red for errors) icons somewhere near each clip in the media library to indicate the status of individual proxies. Remains to be seen how we can do this with iconview mode and listview mode without going insane.
- Fluid, with no negative performance impacts from the act of generating the clip “proxies”
Icons representation
Since the Media Library's iconview is meant to be compact and minimalistic (and has a fair amount of technical limitations), we could use the following icon metaphor system to indicate the states of proxies for assets:
Status icon Icon's opacity Thumbnail's opacity Meaning
None N/A 100% Proxies are disabled for this asset Gears/sync? 100% 50% A proxy is currently being generated for this asset Checkmark 70%? 100% Proxies are present and ready for this asset ⚠ (warning) 100% 100% The proxy could not be generated for this asset ⚠ or X 100% 50% A proxy file is present, but the original file is absent
Manual/semi-automated UX
In this mode, users would manually select which assets/clips use proxies, and when the proxies are generated. There would be no “automated” background processing. This is probably not what we want in Pitivi in terms of the default user experience, however the GES API should support that scenario. We could still provide this feature in pitivi by:
- Having an option in the preferences, under the “Performance” section: “Automatically create proxies for clips in the media library”
- If that option is disabled, show a toolbar button in the media library that, when clicked, generates the proxies for selected clips.
However this also means temporarily providing a “Cancel” button while those clips' proxies are being generated. Additionally to the “status lights” icons mentioned earlier, we could perhaps show a progressbar (with a “Stop” button on its right) below the media library (similar to when we're importing clips).
Jakub commented:
“Semi-automatic - I don't grok this experience. Why would I want to explicitly hold the burden of being a transcoding manager? I like the validity checking and ability to explicitly re-render a proxy though. Ran into issues in both kdenlive and FCPX where I spent ages looking for a faulty proxy.”
To balance things, Bassam commented:
"manual vs. automatic: however the ui is chosen, this should be a per project setting, not a choice of a different application. both workflows are valid, and the same person might opt for one or another depending on the specifics of the project. [...]
Fully-automated UX
Otherwise, the default behavior would be to transparently (and intelligently) create proxies for everything, in the background. When a proxy file does not exist for an asset (clip), create it and use it as soon as it has been created.
Performance requirements in the automated scenario are even more important than in the semi-automated scenario; while users can expect some delay (as long as there is a visual progress indication) when they manually trigger an action, they must absolutely not feel delays/sluggishness when such actions are triggered automatically. The generation of proxy clips in the background should not negatively impact system performance.
Jakub has a different opinion than Jeff's or Bassam's, suggesting (?) that we make proxy generation a modal (blocking, in terms of UI) operation:
"You mention the problem of indicating the transcoding process as if you could continue working with original assets and have that not stop you from editing work with original media. In case of offline editing (either having assets on external drive, or networked/cloud storage), the indication can be summed up to “tell me when my assets are safe to disconnect and I'm able to proceed editing offline”. For low performing systems, the background transcoding is just an illusion, you cannot really edit until your assets are transcoded. So I think both cases are best addressed by providing an aggregate progressbar telling me when all assets referenced from the project are transcoded, rather than colorcoding individual clips, or worrying about preview overlays. [...] For offline editing I would agree not choking the system competely with transcoding might be a good thing, but for the low performing system case you want the transcoding process to take the foreground so that the assets are ready sooner. You really can't do any 4k editing on a laptop and expect to also transcode proxies in the background."
GES API requirements
Control
- Proxies generation/processing needs to be pause-able
- When pitivi starts playback (or render) and needs the system's resources
- When the user pauses proxy generation (in the case of the semi-automated UX)
- Proxies generation needs to be cancel-able
- When the user asks to stop generating proxies for selected clips (in the case of the semi-automated UX)
- The ability to “force” regenerating the proxies for a given asset (for whatever reason)
- Delete a proxy (or all proxies) for a given asset
- Relocate/move proxies for a given asset or for all assets
- Ability to manually replace an offline asset.
Data integrity checking
- Need a way to detect incomplete or invalid proxies, to handle
various scenarios:
- The user has quit the application before it was done processing
- The application crashed
- The source file has changed (use a md5 on the first few bytes of the file like in pitivi/previewers.py and store that hash in the GES Asset?)
Signalling/notifying
- For each asset, report the proxies' encoding progress, so the application UI can show progressbars or some other form of visual indications
- Provide a way to signal to the application that an asset has its original offline, or its proxy offline, or whatever situation we can imagine, so the UI can let the user know about it.
- Tolerate and signal errors/failures.
Fault tolerance and sandboxing
- Tolerate and signal errors/failures.
- Processing should probably happen in a separate/sandboxed process, to ensure that GES/applications can't crash because of something going wrong during the processing of a proxy
- GES needs to handle the notion that an asset and/or any of its
proxies can go offline/online. For example, if the original clip is
not available but the proxy version is present, consider the
original “offline” and use the proxy version.
- The way we handle “missing” media needs to change: currently Pitivi just refuses to handle “partial” projects, but in theory it should “deal with it”. Even if all the assets of a clip (including proxies) are offline.
- If an asset or its proxies were moved/renamed externally, allow specifying the new location (already mostly implemented in GES assets?), but don't force it. Proxies/assets for which the user has not provided replacements are to be marked as temporarily “offline” (we should also save info about the last time it was seen, its metadata/attributes, etc.).
Additional API flexibility
- Multiple ways to handle offline assets for rendering and export:
- “Draft render” mode (low quality render using only the proxies instead of the original clips), as some applications might like to offer that feature.
- Rendering to a multimedia output file requires original assets
to be “online”. Otherwise, if only proxies are available, we
can:
- Warn the user about reduced quality. If some assets have no originals and no proxies, show a serious warning.
- Export only an EDL (edit decision list), but that's another story
- Provide a way to specify which containers, codecs and settings (ex: video resolution, bitrate/quality) to use for proxies. This will probably use a technology similar to what we see in Pitivi's render dialogs.
- Allow multiple proxies per asset (for multiple resolutions, for example). The application should be able to request a proxy to match a particular context (ex: a maximum resolution or something); for example, multicam editing could use very small versions if there is a big number (ex: 16) of camera angles to be displayed simultaneously. Or the media library could automatically show a playing thumbnail-sized video preview when putting the mouse over a clip.
- Ability to save, in a project formatter's data, the following
per-project overrides of the global app settings:
- A custom folder path for the proxies for that project (see also the “where to store the proxies?” item in the “outstanding questions” section on this page).
- Whether this project prefers fully-automated (or manual) handling of proxies (Bassam said: “However the ui is chosen, this should be a per project setting, not a choice of a different application. Both workflows are valid, and the same person might opt for one or another depending on the specifics of the project.”)
Outstanding questions
- Where to store the proxies? (beyond the obvious question of disk
space and tidiness, there's the question of people working across
networks that raises interesting questions)
- In pitivi we could default to the XDG user cache dir (which in this case would turn out to be ~/.cache/pitivi/proxies/)
- ...but Bassam insists that this can be overridden on a per-project basis. So in the project settings UI, we could have a checkbox to “Use a custom directory to store proxies” that enables a gtk folder chooser button right besides it. Unchecking the checkbox would clear the project's custom directory.
- Filenames of the actual proxy files depending on their location (global cache folder vs project folder?). For example, if a clip is called “foo.MOV”, should the proxies be called foo-360p.gesproxy, or foo--proxy-360p.webm, or C462NTH353.webm in the hidden cache folder, or...?
- Codecs? So far we're hesitating between MJPEG and VP8. MJPEG is handsdown the fastest codec to seek and to encode, since it is so simple and every frame is a keyframe - however, the filesize is rather big. VP8 is more configurable and can be made to approximate MJPEG's seeking performance, but it is significantly more expensive to encode.
- Resolutions, and how to handle aspect ratios. That is, how do you
determine the appropriate resolution depending on the aspect ratio
and resolution of the source material?
- Going with a hardcoded percentage (ex: 50% of the original's resolution) can be bound to fail in scenarios where the original has a huge native resolution (such as 4K).
- Alternatively, one can imagine a hardcoded (or configurable) “max resolution”, where clips bigger than that resolution will have proxies created to “fit the box” (in terms of width and height, whichever comes first). Hardcoding the box resolution might be problematic as computers become more powerful and screen resolutions increase.
- Ideally, we need a clever algorithm to figure out all of this automatically. Any rough ideas of the logic here? Let us know. Solutions where the software can be smart enough to figure the optimal resolution to use, instead of having the user deal with it, are preferred.
- Handling “tarball export” in Pitivi
The results of the search are