| 1 | /* | |
| 2 | * Licensed to the Apache Software Foundation (ASF) under one or more | |
| 3 | * contributor license agreements. See the NOTICE file distributed with | |
| 4 | * this work for additional information regarding copyright ownership. | |
| 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 | |
| 6 | * (the "License"); you may not use this file except in compliance with | |
| 7 | * the License. You may obtain a copy of the License at | |
| 8 | * | |
| 9 | * http://www.apache.org/licenses/LICENSE-2.0 | |
| 10 | * | |
| 11 | * Unless required by applicable law or agreed to in writing, software | |
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, | |
| 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 14 | * See the License for the specific language governing permissions and | |
| 15 | * limitations under the License. | |
| 16 | */ | |
| 17 | package org.apache.commons.collections4.list; | |
| 18 | ||
| 19 | import java.io.IOException; | |
| 20 | import java.io.ObjectInputStream; | |
| 21 | import java.io.ObjectOutputStream; | |
| 22 | import java.io.Serializable; | |
| 23 | import java.lang.ref.WeakReference; | |
| 24 | import java.util.ArrayList; | |
| 25 | import java.util.Collection; | |
| 26 | import java.util.ConcurrentModificationException; | |
| 27 | import java.util.Iterator; | |
| 28 | import java.util.List; | |
| 29 | import java.util.ListIterator; | |
| 30 | ||
| 31 | /** | |
| 32 | * A List implementation with a ListIterator that | |
| 33 | * allows concurrent modifications to the underlying list. | |
| 34 | *
 | |
| 35 | * This implementation supports all of the optional {@link List} operations. | |
| 36 | * It extends AbstractLinkedList and thus provides the | |
| 37 | * stack/queue/dequeue operations available in {@link java.util.LinkedList}. | |
| 38 | *
 | |
| 39 | * The main feature of this class is the ability to modify the list and the | |
| 40 | * iterator at the same time. Both the {@link #listIterator()} and {@link #cursor()} | |
| 41 | * methods provides access to a Cursor instance which extends | |
| 42 | * ListIterator. The cursor allows changes to the list concurrent | |
| 43 | * with changes to the iterator. Note that the {@link #iterator()} method and | |
| 44 | * sublists do not provide this cursor behaviour. | |
| 45 | *
 | |
| 46 | * The Cursor class is provided partly for backwards compatibility | |
| 47 | * and partly because it allows the cursor to be directly closed. Closing the | |
| 48 | * cursor is optional because references are held via a WeakReference. | |
| 49 | * For most purposes, simply modify the iterator and list at will, and then let | |
| 50 | * the garbage collector to the rest. | |
| 51 | *
 | |
| 52 | * Note that this implementation is not synchronized. | |
| 53 | * | |
| 54 | * @see java.util.LinkedList | |
| 55 | * @since 1.0 | |
| 56 | * @version $Id: CursorableLinkedList.java 1533984 2013-10-20 21:12:51Z tn $ | |
| 57 | */ | |
| 58 | public class CursorableLinkedList<E> extends AbstractLinkedList<E> implements Serializable { | |
| 59 | ||
| 60 | /** Ensure serialization compatibility */ | |
| 61 | private static final long serialVersionUID =<PHONE_NUMBER>519411393L; | |
| 62 | ||
| 63 | /** A list of the cursor currently open on this list */ | |
| 64 | private transient List<WeakReference<Cursor<E>>> cursors; | |
| 65 | ||
| 66 | //----------------------------------------------------------------------- | |
| 67 | /** | |
| 68 | * Constructor that creates. | |
| 69 | */ | |
| 70 | public CursorableLinkedList() { | |
| 71 | super(); | |
| 72 |
1
1. |
init(); // must call init() as use super(); |
| 73 | } | |
| 74 | ||
| 75 | /** | |
| 76 | * Constructor that copies the specified collection | |
| 77 | * | |
| 78 | * @param coll the collection to copy | |
| 79 | */ | |
| 80 | public CursorableLinkedList(final Collection<? extends E> coll) { | |
| 81 | super(coll); | |
| 82 | } | |
| 83 | ||
| 84 | /** | |
| 85 | * The equivalent of a default constructor called | |
| 86 | * by any constructor and by readObject. | |
| 87 | */ | |
| 88 | @Override | |
| 89 | protected void init() { | |
| 90 |
1
1. init : removed call to org/apache/commons/collections4/list/AbstractLinkedList::init → NO_COVERAGE |
super.init(); |
| 91 | cursors = new ArrayList<WeakReference<Cursor<E>>>(); | |
| 92 | } | |
| 93 | ||
| 94 | //----------------------------------------------------------------------- | |
| 95 | /** | |
| 96 | * Returns an iterator that does not support concurrent modification. | |
| 97 | *
 | |
| 98 | * If the underlying list is modified while iterating using this iterator | |
| 99 | * a ConcurrentModificationException will occur. | |
| 100 | * The cursor behaviour is available via {@link #listIterator()}. | |
| 101 | * | |
| 102 | * @return a new iterator that does not support concurrent modification | |
| 103 | */ | |
| 104 | @Override | |
| 105 | public Iterator<E> iterator() { | |
| 106 |
1
1. iterator : mutated return of Object value for org/apache/commons/collections4/list/CursorableLinkedList::iterator to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return super.listIterator(0); |
| 107 | } | |
| 108 | ||
| 109 | /** | |
| 110 | * Returns a cursor iterator that allows changes to the underlying list in parallel. | |
| 111 | *
 | |
| 112 | * The cursor enables iteration and list changes to occur in any order without | |
| 113 | * invalidating the iterator (from one thread). When elements are added to the | |
| 114 | * list, an event is fired to all active cursors enabling them to adjust to the | |
| 115 | * change in the list. | |
| 116 | *
 | |
| 117 | * When the "current" (i.e., last returned by {@link ListIterator#next} | |
| 118 | * or {@link ListIterator#previous}) element of the list is removed, | |
| 119 | * the cursor automatically adjusts to the change (invalidating the | |
| 120 | * last returned value such that it cannot be removed). | |
| 121 | * | |
| 122 | * @return a new cursor iterator | |
| 123 | */ | |
| 124 | @Override | |
| 125 | public ListIterator<E> listIterator() { | |
| 126 |
1
1. listIterator : mutated return of Object value for org/apache/commons/collections4/list/CursorableLinkedList::listIterator to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return cursor(0); |
| 127 | } | |
| 128 | ||
| 129 | /** | |
| 130 | * Returns a cursor iterator that allows changes to the underlying list in parallel. | |
| 131 | *
 | |
| 132 | * The cursor enables iteration and list changes to occur in any order without | |
| 133 | * invalidating the iterator (from one thread). When elements are added to the | |
| 134 | * list, an event is fired to all active cursors enabling them to adjust to the | |
| 135 | * change in the list. | |
| 136 | *
 | |
| 137 | * When the "current" (i.e., last returned by {@link ListIterator#next} | |
| 138 | * or {@link ListIterator#previous}) element of the list is removed, | |
| 139 | * the cursor automatically adjusts to the change (invalidating the | |
| 140 | * last returned value such that it cannot be removed). | |
| 141 | * | |
| 142 | * @param fromIndex the index to start from | |
| 143 | * @return a new cursor iterator | |
| 144 | */ | |
| 145 | @Override | |
| 146 | public ListIterator<E> listIterator(final int fromIndex) { | |
| 147 |
1
1. listIterator : mutated return of Object value for org/apache/commons/collections4/list/CursorableLinkedList::listIterator to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return cursor(fromIndex); |
| 148 | } | |
| 149 | ||
| 150 | /** | |
| 151 | * Returns a {@link Cursor} for iterating through the elements of this list. | |
| 152 | *
 | |
| 153 | * A Cursor is a ListIterator with an additional | |
| 154 | * close() method. Calling this method immediately discards the | |
| 155 | * references to the cursor. If it is not called, then the garbage collector | |
| 156 | * will still remove the reference as it is held via a WeakReference. | |
| 157 | *
 | |
| 158 | * The cursor enables iteration and list changes to occur in any order without | |
| 159 | * invalidating the iterator (from one thread). When elements are added to the | |
| 160 | * list, an event is fired to all active cursors enabling them to adjust to the | |
| 161 | * change in the list. | |
| 162 | *
 | |
| 163 | * When the "current" (i.e., last returned by {@link ListIterator#next} | |
| 164 | * or {@link ListIterator#previous}) element of the list is removed, | |
| 165 | * the cursor automatically adjusts to the change (invalidating the | |
| 166 | * last returned value such that it cannot be removed). | |
| 167 | *
 | |
| 168 | * The {@link #listIterator()} method returns the same as this method, and can | |
| 169 | * be cast to a Cursor if the close method is required. | |
| 170 | * | |
| 171 | * @return a new cursor iterator | |
| 172 | */ | |
| 173 | public CursorableLinkedList.Cursor<E> cursor() { | |
| 174 |
1
1. cursor : mutated return of Object value for org/apache/commons/collections4/list/CursorableLinkedList::cursor to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return cursor(0); |
| 175 | } | |
| 176 | ||
| 177 | /** | |
| 178 | * Returns a {@link Cursor} for iterating through the elements of this list | |
| 179 | * starting from a specified index. | |
| 180 | *
 | |
| 181 | * A Cursor is a ListIterator with an additional | |
| 182 | * close() method. Calling this method immediately discards the | |
| 183 | * references to the cursor. If it is not called, then the garbage collector | |
| 184 | * will still remove the reference as it is held via a WeakReference. | |
| 185 | *
 | |
| 186 | * The cursor enables iteration and list changes to occur in any order without | |
| 187 | * invalidating the iterator (from one thread). When elements are added to the | |
| 188 | * list, an event is fired to all active cursors enabling them to adjust to the | |
| 189 | * change in the list. | |
| 190 | *
 | |
| 191 | * When the "current" (i.e., last returned by {@link ListIterator#next} | |
| 192 | * or {@link ListIterator#previous}) element of the list is removed, | |
| 193 | * the cursor automatically adjusts to the change (invalidating the | |
| 194 | * last returned value such that it cannot be removed). | |
| 195 | *
 | |
| 196 | * The {@link #listIterator(int)} method returns the same as this method, and can | |
| 197 | * be cast to a Cursor if the close method is required. | |
| 198 | * | |
| 199 | * @param fromIndex the index to start from | |
| 200 | * @return a new cursor iterator | |
| 201 | * @throws IndexOutOfBoundsException if the index is out of range | |
| 202 | * (index < 0 || index > size()). | |
| 203 | */ | |
| 204 | public CursorableLinkedList.Cursor<E> cursor(final int fromIndex) { | |
| 205 | final Cursor<E> cursor = new Cursor<E>(this, fromIndex); | |
| 206 |
1
1. cursor : removed call to org/apache/commons/collections4/list/CursorableLinkedList::registerCursor → NO_COVERAGE |
registerCursor(cursor); |
| 207 |
1
1. cursor : mutated return of Object value for org/apache/commons/collections4/list/CursorableLinkedList::cursor to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return cursor; |
| 208 | } | |
| 209 | ||
| 210 | //----------------------------------------------------------------------- | |
| 211 | /** | |
| 212 | * Updates the node with a new value. | |
| 213 | * This implementation sets the value on the node. | |
| 214 | * Subclasses can override this to record the change. | |
| 215 | * | |
| 216 | * @param node node to update | |
| 217 | * @param value new value of the node | |
| 218 | */ | |
| 219 | @Override | |
| 220 | protected void updateNode(final Node<E> node, final E value) { | |
| 221 |
1
1. updateNode : removed call to org/apache/commons/collections4/list/AbstractLinkedList::updateNode → NO_COVERAGE |
super.updateNode(node, value); |
| 222 |
1
1. updateNode : removed call to org/apache/commons/collections4/list/CursorableLinkedList::broadcastNodeChanged → NO_COVERAGE |
broadcastNodeChanged(node); |
| 223 | } | |
| 224 | ||
| 225 | /** | |
| 226 | * Inserts a new node into the list. | |
| 227 | * | |
| 228 | * @param nodeToInsert new node to insert | |
| 229 | * @param insertBeforeNode node to insert before | |
| 230 | * @throws NullPointerException if either node is null | |
| 231 | */ | |
| 232 | @Override | |
| 233 | protected void addNode(final Node<E> nodeToInsert, final Node<E> insertBeforeNode) { | |
| 234 |
1
1. addNode : removed call to org/apache/commons/collections4/list/AbstractLinkedList::addNode → NO_COVERAGE |
super.addNode(nodeToInsert, insertBeforeNode); |
| 235 |
1
1. addNode : removed call to org/apache/commons/collections4/list/CursorableLinkedList::broadcastNodeInserted → NO_COVERAGE |
broadcastNodeInserted(nodeToInsert); |
| 236 | } | |
| 237 | ||
| 238 | /** | |
| 239 | * Removes the specified node from the list. | |
| 240 | * | |
| 241 | * @param node the node to remove | |
| 242 | * @throws NullPointerException if node is null | |
| 243 | */ | |
| 244 | @Override | |
| 245 | protected void removeNode(final Node<E> node) { | |
| 246 |
1
1. removeNode : removed call to org/apache/commons/collections4/list/AbstractLinkedList::removeNode → NO_COVERAGE |
super.removeNode(node); |
| 247 |
1
1. removeNode : removed call to org/apache/commons/collections4/list/CursorableLinkedList::broadcastNodeRemoved → NO_COVERAGE |
broadcastNodeRemoved(node); |
| 248 | } | |
| 249 | ||
| 250 | /** | |
| 251 | * Removes all nodes by iteration. | |
| 252 | */ | |
| 253 | @Override | |
| 254 | protected void removeAllNodes() { | |
| 255 |
2
1. removeAllNodes : changed conditional boundary → NO_COVERAGE 2. removeAllNodes : negated conditional → NO_COVERAGE |
if (size() > 0) { |
| 256 | // superclass implementation would break all the iterators | |
| 257 | final Iterator<E> it = iterator(); | |
| 258 |
1
1. removeAllNodes : negated conditional → NO_COVERAGE |
while (it.hasNext()) { |
| 259 | it.next(); | |
| 260 |
1
1. removeAllNodes : removed call to java/util/Iterator::remove → NO_COVERAGE |
it.remove(); |
| 261 | } | |
| 262 | } | |
| 263 | } | |
| 264 | ||
| 265 | //----------------------------------------------------------------------- | |
| 266 | /** | |
| 267 | * Registers a cursor to be notified of changes to this list. | |
| 268 | * | |
| 269 | * @param cursor the cursor to register | |
| 270 | */ | |
| 271 | protected void registerCursor(final Cursor<E> cursor) { | |
| 272 | // We take this opportunity to clean the cursors list | |
| 273 | // of WeakReference objects to garbage-collected cursors. | |
| 274 |
1
1. registerCursor : negated conditional → NO_COVERAGE |
for (final Iterator<WeakReference<Cursor<E>>> it = cursors.iterator(); it.hasNext();) { |
| 275 | final WeakReference<Cursor<E>> ref = it.next(); | |
| 276 |
1
1. registerCursor : negated conditional → NO_COVERAGE |
if (ref.get() == null) { |
| 277 |
1
1. registerCursor : removed call to java/util/Iterator::remove → NO_COVERAGE |
it.remove(); |
| 278 | } | |
| 279 | } | |
| 280 | cursors.add(new WeakReference<Cursor<E>>(cursor)); | |
| 281 | } | |
| 282 | ||
| 283 | /** | |
| 284 | * Deregisters a cursor from the list to be notified of changes. | |
| 285 | * | |
| 286 | * @param cursor the cursor to deregister | |
| 287 | */ | |
| 288 | protected void unregisterCursor(final Cursor<E> cursor) { | |
| 289 |
1
1. unregisterCursor : negated conditional → NO_COVERAGE |
for (final Iterator<WeakReference<Cursor<E>>> it = cursors.iterator(); it.hasNext();) { |
| 290 | final WeakReference<Cursor<E>> ref = it.next(); | |
| 291 | final Cursor<E> cur = ref.get(); | |
| 292 |
1
1. unregisterCursor : negated conditional → NO_COVERAGE |
if (cur == null) { |
| 293 | // some other unrelated cursor object has been | |
| 294 | // garbage-collected; let's take the opportunity to | |
| 295 | // clean up the cursors list anyway.. | |
| 296 |
1
1. unregisterCursor : removed call to java/util/Iterator::remove → NO_COVERAGE |
it.remove(); |
| 297 |
1
1. unregisterCursor : negated conditional → NO_COVERAGE |
} else if (cur == cursor) { |
| 298 |
1
1. unregisterCursor : removed call to java/lang/ref/WeakReference::clear → NO_COVERAGE |
ref.clear(); |
| 299 |
1
1. unregisterCursor : removed call to java/util/Iterator::remove → NO_COVERAGE |
it.remove(); |
| 300 | break; | |
| 301 | } | |
| 302 | } | |
| 303 | } | |
| 304 | ||
| 305 | //----------------------------------------------------------------------- | |
| 306 | /** | |
| 307 | * Informs all of my registered cursors that the specified | |
| 308 | * element was changed. | |
| 309 | * | |
| 310 | * @param node the node that was changed | |
| 311 | */ | |
| 312 | protected void broadcastNodeChanged(final Node<E> node) { | |
| 313 | final Iterator<WeakReference<Cursor<E>>> it = cursors.iterator(); | |
| 314 |
1
1. broadcastNodeChanged : negated conditional → NO_COVERAGE |
while (it.hasNext()) { |
| 315 | final WeakReference<Cursor<E>> ref = it.next(); | |
| 316 | final Cursor<E> cursor = ref.get(); | |
| 317 |
1
1. broadcastNodeChanged : negated conditional → NO_COVERAGE |
if (cursor == null) { |
| 318 |
1
1. broadcastNodeChanged : removed call to java/util/Iterator::remove → NO_COVERAGE |
it.remove(); // clean up list |
| 319 | } else { | |
| 320 |
1
1. broadcastNodeChanged : removed call to org/apache/commons/collections4/list/CursorableLinkedList$Cursor::nodeChanged → NO_COVERAGE |
cursor.nodeChanged(node); |
| 321 | } | |
| 322 | } | |
| 323 | } | |
| 324 | ||
| 325 | /** | |
| 326 | * Informs all of my registered cursors that the specified | |
| 327 | * element was just removed from my list. | |
| 328 | * | |
| 329 | * @param node the node that was changed | |
| 330 | */ | |
| 331 | protected void broadcastNodeRemoved(final Node<E> node) { | |
| 332 | final Iterator<WeakReference<Cursor<E>>> it = cursors.iterator(); | |
| 333 |
1
1. broadcastNodeRemoved : negated conditional → NO_COVERAGE |
while (it.hasNext()) { |
| 334 | final WeakReference<Cursor<E>> ref = it.next(); | |
| 335 | final Cursor<E> cursor = ref.get(); | |
| 336 |
1
1. broadcastNodeRemoved : negated conditional → NO_COVERAGE |
if (cursor == null) { |
| 337 |
1
1. broadcastNodeRemoved : removed call to java/util/Iterator::remove → NO_COVERAGE |
it.remove(); // clean up list |
| 338 | } else { | |
| 339 |
1
1. broadcastNodeRemoved : removed call to org/apache/commons/collections4/list/CursorableLinkedList$Cursor::nodeRemoved → NO_COVERAGE |
cursor.nodeRemoved(node); |
| 340 | } | |
| 341 | } | |
| 342 | } | |
| 343 | ||
| 344 | /** | |
| 345 | * Informs all of my registered cursors that the specified | |
| 346 | * element was just added to my list. | |
| 347 | * | |
| 348 | * @param node the node that was changed | |
| 349 | */ | |
| 350 | protected void broadcastNodeInserted(final Node<E> node) { | |
| 351 | final Iterator<WeakReference<Cursor<E>>> it = cursors.iterator(); | |
| 352 |
1
1. broadcastNodeInserted : negated conditional → NO_COVERAGE |
while (it.hasNext()) { |
| 353 | final WeakReference<Cursor<E>> ref = it.next(); | |
| 354 | final Cursor<E> cursor = ref.get(); | |
| 355 |
1
1. broadcastNodeInserted : negated conditional → NO_COVERAGE |
if (cursor == null) { |
| 356 |
1
1. broadcastNodeInserted : removed call to java/util/Iterator::remove → NO_COVERAGE |
it.remove(); // clean up list |
| 357 | } else { | |
| 358 |
1
1. broadcastNodeInserted : removed call to org/apache/commons/collections4/list/CursorableLinkedList$Cursor::nodeInserted → NO_COVERAGE |
cursor.nodeInserted(node); |
| 359 | } | |
| 360 | } | |
| 361 | } | |
| 362 | ||
| 363 | //----------------------------------------------------------------------- | |
| 364 | /** | |
| 365 | * Serializes the data held in this object to the stream specified. | |
| 366 | */ | |
| 367 | private void writeObject(final ObjectOutputStream out) throws IOException { | |
| 368 |
1
1. writeObject : removed call to java/io/ObjectOutputStream::defaultWriteObject → NO_COVERAGE |
out.defaultWriteObject(); |
| 369 |
1
1. writeObject : removed call to org/apache/commons/collections4/list/CursorableLinkedList::doWriteObject → NO_COVERAGE |
doWriteObject(out); |
| 370 | } | |
| 371 | ||
| 372 | /** | |
| 373 | * Deserializes the data held in this object to the stream specified. | |
| 374 | */ | |
| 375 | private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException { | |
| 376 |
1
1. readObject : removed call to java/io/ObjectInputStream::defaultReadObject → NO_COVERAGE |
in.defaultReadObject(); |
| 377 |
1
1. readObject : removed call to org/apache/commons/collections4/list/CursorableLinkedList::doReadObject → NO_COVERAGE |
doReadObject(in); |
| 378 | } | |
| 379 | ||
| 380 | //----------------------------------------------------------------------- | |
| 381 | /** | |
| 382 | * Creates a list iterator for the sublist. | |
| 383 | * | |
| 384 | * @param subList the sublist to get an iterator for | |
| 385 | * @param fromIndex the index to start from, relative to the sublist | |
| 386 | * @return the list iterator for the sublist | |
| 387 | */ | |
| 388 | @Override | |
| 389 | protected ListIterator<E> createSubListListIterator(final LinkedSubList<E> subList, final int fromIndex) { | |
| 390 | final SubCursor<E> cursor = new SubCursor<E>(subList, fromIndex); | |
| 391 |
1
1. createSubListListIterator : removed call to org/apache/commons/collections4/list/CursorableLinkedList::registerCursor → NO_COVERAGE |
registerCursor(cursor); |
| 392 |
1
1. createSubListListIterator : mutated return of Object value for org/apache/commons/collections4/list/CursorableLinkedList::createSubListListIterator to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return cursor; |
| 393 | } | |
| 394 | ||
| 395 | //----------------------------------------------------------------------- | |
| 396 | /** | |
| 397 | * An extended ListIterator that allows concurrent changes to | |
| 398 | * the underlying list. | |
| 399 | */ | |
| 400 | public static class Cursor<E> extends AbstractLinkedList.LinkedListIterator<E> { | |
| 401 | /** Is the cursor valid (not closed) */ | |
| 402 | boolean valid = true; | |
| 403 | /** Is the next index valid */ | |
| 404 | boolean nextIndexValid = true; | |
| 405 | /** Flag to indicate if the current element was removed by another object. */ | |
| 406 | boolean currentRemovedByAnother = false; | |
| 407 | ||
| 408 | /** | |
| 409 | * Constructs a new cursor. | |
| 410 | * | |
| 411 | * @param parent the parent list | |
| 412 | * @param index the index to start from | |
| 413 | */ | |
| 414 | protected Cursor(final CursorableLinkedList<E> parent, final int index) { | |
| 415 | super(parent, index); | |
| 416 | valid = true; | |
| 417 | } | |
| 418 | ||
| 419 | /** | |
| 420 | * Removes the item last returned by this iterator. | |
| 421 | *
 | |
| 422 | * There may have been subsequent alterations to the list | |
| 423 | * since you obtained this item, however you can still remove it. | |
| 424 | * You can even remove it if the item is no longer in the main list. | |
| 425 | * However, you can't call this method on the same iterator more | |
| 426 | * than once without calling next() or previous(). | |
| 427 | * | |
| 428 | * @throws IllegalStateException if there is no item to remove | |
| 429 | */ | |
| 430 | @Override | |
| 431 | public void remove() { | |
| 432 | // overridden, as the nodeRemoved() method updates the iterator | |
| 433 | // state in the parent.removeNode() call below | |
| 434 |
2
1. remove : negated conditional → NO_COVERAGE 2. remove : negated conditional → NO_COVERAGE |
if (current == null && currentRemovedByAnother) { // NOPMD |
| 435 | // quietly ignore, as the last returned node was removed | |
| 436 | // by the list or some other iterator | |
| 437 | // by ignoring it, we keep this iterator independent from | |
| 438 | // other changes as much as possible | |
| 439 | } else { | |
| 440 |
1
1. remove : removed call to org/apache/commons/collections4/list/CursorableLinkedList$Cursor::checkModCount → NO_COVERAGE |
checkModCount(); |
| 441 |
1
1. remove : removed call to org/apache/commons/collections4/list/AbstractLinkedList::removeNode → NO_COVERAGE |
parent.removeNode(getLastNodeReturned()); |
| 442 | } | |
| 443 | currentRemovedByAnother = false; | |
| 444 | } | |
| 445 | ||
| 446 | /** | |
| 447 | * Adds an object to the list. | |
| 448 | * The object added here will be the new 'previous' in the iterator. | |
| 449 | * | |
| 450 | * @param obj the object to add | |
| 451 | */ | |
| 452 | @Override | |
| 453 | public void add(final E obj) { | |
| 454 | // overridden, as the nodeInserted() method updates the iterator state | |
| 455 |
1
1. add : removed call to org/apache/commons/collections4/list/AbstractLinkedList$LinkedListIterator::add → NO_COVERAGE |
super.add(obj); |
| 456 | // matches the (next.previous == node) clause in nodeInserted() | |
| 457 | // thus next gets changed - reset it again here | |
| 458 | next = next.next; | |
| 459 | } | |
| 460 | ||
| 461 | // set is not overridden, as it works ok | |
| 462 | // note that we want it to throw an exception if the element being | |
| 463 | // set has been removed from the real list (compare this with the | |
| 464 | // remove method where we silently ignore this case) | |
| 465 | ||
| 466 | /** | |
| 467 | * Gets the index of the next element to be returned. | |
| 468 | * | |
| 469 | * @return the next index | |
| 470 | */ | |
| 471 | @Override | |
| 472 | public int nextIndex() { | |
| 473 |
1
1. nextIndex : negated conditional → NO_COVERAGE |
if (nextIndexValid == false) { |
| 474 |
1
1. nextIndex : negated conditional → NO_COVERAGE |
if (next == parent.header) { |
| 475 | nextIndex = parent.size(); | |
| 476 | } else { | |
| 477 | int pos = 0; | |
| 478 | Node<E> temp = parent.header.next; | |
| 479 |
1
1. nextIndex : negated conditional → NO_COVERAGE |
while (temp != next) { |
| 480 |
1
1. nextIndex : Changed increment from 1 to -1 → NO_COVERAGE |
pos++; |
| 481 | temp = temp.next; | |
| 482 | } | |
| 483 | nextIndex = pos; | |
| 484 | } | |
| 485 | nextIndexValid = true; | |
| 486 | } | |
| 487 |
1
1. nextIndex : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return nextIndex; |
| 488 | } | |
| 489 | ||
| 490 | /** | |
| 491 | * Handle event from the list when a node has changed. | |
| 492 | * | |
| 493 | * @param node the node that changed | |
| 494 | */ | |
| 495 | protected void nodeChanged(final Node<E> node) { | |
| 496 | // do nothing | |
| 497 | } | |
| 498 | ||
| 499 | /** | |
| 500 | * Handle event from the list when a node has been removed. | |
| 501 | * | |
| 502 | * @param node the node that was removed | |
| 503 | */ | |
| 504 | protected void nodeRemoved(final Node<E> node) { | |
| 505 |
2
1. nodeRemoved : negated conditional → NO_COVERAGE 2. nodeRemoved : negated conditional → NO_COVERAGE |
if (node == next && node == current) { |
| 506 | // state where next() followed by previous() | |
| 507 | next = node.next; | |
| 508 | current = null; | |
| 509 | currentRemovedByAnother = true; | |
| 510 |
1
1. nodeRemoved : negated conditional → NO_COVERAGE |
} else if (node == next) { |
| 511 | // state where next() not followed by previous() | |
| 512 | // and we are matching next node | |
| 513 | next = node.next; | |
| 514 | currentRemovedByAnother = false; | |
| 515 |
1
1. nodeRemoved : negated conditional → NO_COVERAGE |
} else if (node == current) { |
| 516 | // state where next() not followed by previous() | |
| 517 | // and we are matching current (last returned) node | |
| 518 | current = null; | |
| 519 | currentRemovedByAnother = true; | |
| 520 |
1
1. nodeRemoved : Replaced integer subtraction with addition → NO_COVERAGE |
nextIndex--; |
| 521 | } else { | |
| 522 | nextIndexValid = false; | |
| 523 | currentRemovedByAnother = false; | |
| 524 | } | |
| 525 | } | |
| 526 | ||
| 527 | /** | |
| 528 | * Handle event from the list when a node has been added. | |
| 529 | * | |
| 530 | * @param node the node that was added | |
| 531 | */ | |
| 532 | protected void nodeInserted(final Node<E> node) { | |
| 533 |
1
1. nodeInserted : negated conditional → NO_COVERAGE |
if (node.previous == current) { |
| 534 | next = node; | |
| 535 |
1
1. nodeInserted : negated conditional → NO_COVERAGE |
} else if (next.previous == node) { |
| 536 | next = node; | |
| 537 | } else { | |
| 538 | nextIndexValid = false; | |
| 539 | } | |
| 540 | } | |
| 541 | ||
| 542 | /** | |
| 543 | * Override superclass modCount check, and replace it with our valid flag. | |
| 544 | */ | |
| 545 | @Override | |
| 546 | protected void checkModCount() { | |
| 547 |
1
1. checkModCount : negated conditional → NO_COVERAGE |
if (!valid) { |
| 548 | throw new ConcurrentModificationException("Cursor closed"); | |
| 549 | } | |
| 550 | } | |
| 551 | ||
| 552 | /** | |
| 553 | * Mark this cursor as no longer being needed. Any resources | |
| 554 | * associated with this cursor are immediately released. | |
| 555 | * In previous versions of this class, it was mandatory to close | |
| 556 | * all cursor objects to avoid memory leaks. It is no longer | |
| 557 | * necessary to call this close method; an instance of this class | |
| 558 | * can now be treated exactly like a normal iterator. | |
| 559 | */ | |
| 560 | public void close() { | |
| 561 |
1
1. close : negated conditional → NO_COVERAGE |
if (valid) { |
| 562 |
1
1. close : removed call to org/apache/commons/collections4/list/CursorableLinkedList::unregisterCursor → NO_COVERAGE |
((CursorableLinkedList<E>) parent).unregisterCursor(this); |
| 563 | valid = false; | |
| 564 | } | |
| 565 | } | |
| 566 | } | |
| 567 | ||
| 568 | //----------------------------------------------------------------------- | |
| 569 | /** | |
| 570 | * A cursor for the sublist based on LinkedSubListIterator. | |
| 571 | * | |
| 572 | * @since 3.2 | |
| 573 | */ | |
| 574 | protected static class SubCursor<E> extends Cursor<E> { | |
| 575 | ||
| 576 | /** The parent list */ | |
| 577 | protected final LinkedSubList<E> sub; | |
| 578 | ||
| 579 | /** | |
| 580 | * Constructs a new cursor. | |
| 581 | * | |
| 582 | * @param sub the sub list | |
| 583 | * @param index the index to start from | |
| 584 | */ | |
| 585 | protected SubCursor(final LinkedSubList<E> sub, final int index) { | |
| 586 |
1
1. |
super((CursorableLinkedList<E>) sub.parent, index + sub.offset); |
| 587 | this.sub = sub; | |
| 588 | } | |
| 589 | ||
| 590 | @Override | |
| 591 | public boolean hasNext() { | |
| 592 |
3
1. hasNext : changed conditional boundary → NO_COVERAGE 2. hasNext : negated conditional → NO_COVERAGE 3. hasNext : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return nextIndex() = 0; |
| 598 | } | |
| 599 | ||
| 600 | @Override | |
| 601 | public int nextIndex() { | |
| 602 |
2
1. nextIndex : Replaced integer subtraction with addition → NO_COVERAGE 2. nextIndex : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return super.nextIndex() - sub.offset; |
| 603 | } | |
| 604 | ||
| 605 | @Override | |
| 606 | public void add(final E obj) { | |
| 607 |
1
1. add : removed call to org/apache/commons/collections4/list/CursorableLinkedList$Cursor::add → NO_COVERAGE |
super.add(obj); |
| 608 | sub.expectedModCount = parent.modCount; | |
| 609 |
1
1. add : Replaced integer addition with subtraction → NO_COVERAGE |
sub.size++; |
| 610 | } | |
| 611 | ||
| 612 | @Override | |
| 613 | public void remove() { | |
| 614 |
1
1. remove : removed call to org/apache/commons/collections4/list/CursorableLinkedList$Cursor::remove → NO_COVERAGE |
super.remove(); |
| 615 | sub.expectedModCount = parent.modCount; | |
| 616 |
1
1. remove : Replaced integer subtraction with addition → NO_COVERAGE |
sub.size--; |
| 617 | } | |
| 618 | } | |
| 619 | ||
| 620 | } | |
Mutations | ||
| 72 |
1.1 |
|
| 90 |
1.1 |
|
| 106 |
1.1 |
|
| 126 |
1.1 |
|
| 147 |
1.1 |
|
| 174 |
1.1 |
|
| 206 |
1.1 |
|
| 207 |
1.1 |
|
| 221 |
1.1 |
|
| 222 |
1.1 |
|
| 234 |
1.1 |
|
| 235 |
1.1 |
|
| 246 |
1.1 |
|
| 247 |
1.1 |
|
| 255 |
1.1 2.2 |
|
| 258 |
1.1 |
|
| 260 |
1.1 |
|
| 274 |
1.1 |
|
| 276 |
1.1 |
|
| 277 |
1.1 |
|
| 289 |
1.1 |
|
| 292 |
1.1 |
|
| 296 |
1.1 |
|
| 297 |
1.1 |
|
| 298 |
1.1 |
|
| 299 |
1.1 |
|
| 314 |
1.1 |
|
| 317 |
1.1 |
|
| 318 |
1.1 |
|
| 320 |
1.1 |
|
| 333 |
1.1 |
|
| 336 |
1.1 |
|
| 337 |
1.1 |
|
| 339 |
1.1 |
|
| 352 |
1.1 |
|
| 355 |
1.1 |
|
| 356 |
1.1 |
|
| 358 |
1.1 |
|
| 368 |
1.1 |
|
| 369 |
1.1 |
|
| 376 |
1.1 |
|
| 377 |
1.1 |
|
| 391 |
1.1 |
|
| 392 |
1.1 |
|
| 434 |
1.1 2.2 |
|
| 440 |
1.1 |
|
| 441 |
1.1 |
|
| 455 |
1.1 |
|
| 473 |
1.1 |
|
| 474 |
1.1 |
|
| 479 |
1.1 |
|
| 480 |
1.1 |
|
| 487 |
1.1 |
|
| 505 |
1.1 2.2 |
|
| 510 |
1.1 |
|
| 515 |
1.1 |
|
| 520 |
1.1 |
|
| 533 |
1.1 |
|
| 535 |
1.1 |
|
| 547 |
1.1 |
|
| 561 |
1.1 |
|
| 562 |
1.1 |
|
| 586 |
1.1 |
|
| 592 |
1.1 2.2 3.3 |
|
| 597 |
1.1 2.2 3.3 |
|
| 602 |
1.1 2.2 |
|
| 607 |
1.1 |
|
| 609 |
1.1 |
|
| 614 |
1.1 |
|
| 616 |
1.1 |


current
assistant professor of statistics
Econometric Institute, Erasmus School of Economics, Erasmus University Rotterdam
past
research fellow of statistics
Department of Law and Economics, UnitelmaSapienza University of Rome
education
qualifications
- National Qualification for Associate Professor (Italy, ASN II fascia), Statistics (SC 13/D1, June-2023)
awards and grants
- ESE starter grant (300000.- e, 2023)
- research grant for junior researcher “Avvio alla ricerca” (1270.- e, 2017)
- award in Stats under the Stars (an Italian Statistical Society competition): best report (2017)
- phd scholarship (3 years) at La Sapienza University of Rome (2016)
academic services
editorial services
- co-guest-editor of the special issue “Advances in statistical modelling, methods and applications” in METRON (2022)
- co-editor of “A. Balzanella, M. Bini, C. Cavicchia, R. Verde (Eds.), Book of Short Papers of SIS 2022. ISBN: 978-88-91932-31-0” (2022)
- reviewer for – in alphabetic order – Advances in Data Analysis and Classification; Annals of Operations Research; Behaviormetrika; BMC Psychology; Computational Statistics; Computational Statistics and Data Analysis; Journal of Classification; Journal of Data Science, Statistics and Visualisation; Journal of Statistical Computation and Simulation; METRON; Operational Research; PLOS ONE; SAGE Open; SN Business and Economics; Statistical Methods and Applications; Socio-Economic Planning Sciences
memberships
to download my complete cv please click here


---
layout: post
title: 'The Pirate Bay: bloccato in Italia?'
date: '2008-08-10T12:09:00.002+02:00'
author: Andrea Fortuna
tags:
- berlusconi
- the pirate bay
- Internet
- filtri
modified_time: '2012-04-26T14:20:32.773+02:00'
blogger_id: tag:blogger.com,1999:blog-1948348952555789070.post-6348430039278203465
blogger_orig_url: http://oldsite.andreafortuna.org/2008/08/pirate-bay-bloccato-in-italia_2391.html
---
Lo leggo su Mashable:
One might think it a stretch to take a label given to Mussolini by history and place it atop Silvio Berlusconi’s head, but that’s precisely what The Pirate Bay have done. Why for? The Italian government’s organizing of a clean sweep of Italian ISPs to prevent access to the BitTorrent website.


Yesterday the React Native team shipped v0.4. Those of us working on the web team just a few feet away couldn't just be shown up like that so we're shipping v0.13.2 today as well! This is a bug fix release to address a few things while we continue to work towards v0.14.
The release is now available for download:
We've also published version 0.13.2
of the react
and react-tools
packages on
npm and the react
package on bower.
strokeDashoffset
, flexPositive
, flexNegative
to the list of unitless CSS propertiesscoped
- for <style>
elementshigh
, low
, optimum
- for <meter>
elementsunselectable
- IE-specific property to prevent user selectionstyle={null}
didn't properly update
style
uglify
dependency to prevent a bug in IE8hasOwnProperty
as an object key


Nora is a leading and the most advanced clear aligner treatment in the world. We believe everyone deserves a healthy, beautiful smile, and technology enables us to make straight teeth more accessible and affordable for all.
Our network of dentists and orthodontists are committed to providing you with a truly exceptional orthodontic experience. We’ve dedicated our education and expertise to deliver smiles our patients love.
Curabitur blandit tempus porttitor. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
Founder & Designer
Project Manager
Developer
We see modern dentistry in creating and developing a community where everyone has access to dental care services.
To improve the overall health of local residents and guests of the area by providing free preventative dental care.
The approach of Dental Clinic dental clinic is based on a reasonable treatment plan created together by the dentist and patient.


CITIZEN RUTH A film review by James Berardinelli Copyright 1996 James Berardinelli
RATING (0 TO 10): 7.0 Alternative Scale: *** out of ****
United States, 1996 U.S. Release Date: 12/13/96 (limited); 12/25/96 (wider) Running Length: 1:46 MPAA Classification: R (Profanity, mature themes) Theatrical Aspect Ratio: 1.85:1
Cast: Laura Dern, Swoosie Kurtz, Kurtwood Smith, Mary Kay Place, M.C. Gainey, Kelly Preston, Burt Reynolds, Tippi Hendren Director: Alexander Payne Producers: Cathy Konrad and Cary Woods Screenplay: Alexander Payne and Jim Taylor Cinematography: James Glennon Music: Rolfe Kent U.S. Distributor: Miramax Films
The average movie about the abortion debate tends to be preachy, melodramatic, and unbearably solemn. So, it comes as something of a shock that the latest venture to the front line of the pro-life/pro- choice battle is actually a *comedy*. Director/co-writer Alexander Payne has taken the slogans, name-calling, and behind-the-scenes tactics, and created a vicious satire that skewers (and probably offends) those on both sides of the issue. There's a serious message here, as well -- that in a war between ideologies, it's too easy to lose sight of the individual.
As ambitious and unconventional as Payne's approach is, however, it doesn't always succeed. The most serious and the most outrageous elements of the film occasionally work against one another. CITIZEN RUTH is moderately more successful than THE LAST SUPPER in attempting an evenhanded lampoon, but there are times when the comic elements seem forced and overplayed.
Laura Dern (RAMBLING ROSE) is Ruth Stoops, a glue-sniffing, alcoholic drifter who has been arrested 16 times for "hazardous vapor inhalation". She has given birth to four children, all of whom have been taken away from her by the government. (She's a walking definition of the term "unfit mother".) Her family and friends have disowned or abandoned her. Now, after being jailed for getting high on patio sealant, she learns that she's pregnant again. The judge decides to allow charges of felony criminal endangerment of the fetus, but tells Ruth that if she gets an abortion, he'll reconsider. Suddenly, Ruth's case becomes a lightning rod for local activists.  The situation rapidly develops into a war where the weapons are coercion and bribery, and the last thing anyone seems to care about is Ruth.
CITIZEN RUTH starts out dark and grim, with the first ten minutes devoted to exposing Ruth in various states of degradation.  It's an uncomfortable way to begin any film, especially one that wants us to laugh. I'll give Payne credit for being daring, but his approach is not an unqualified success. The switch to comedy is unheralded, and may alienate more viewers than it entices. Personally, while I found the transition disconcerting, the results are ultimately worthwhile.
Laura Dern gives an excellent performance, allowing herself to be photographed in an extremely unattractive fashion, with no makeup, dark circles under her eyes, and lank, unwashed hair hanging below her shoulders. She plays Ruth as a selfish, but very human, character who only cares about the pro-life and pro-choice movements in relation to how she can benefit from them (preferably financially). In an odd way, the strength of Dern's acting could almost be seen as detrimental to the film. If Ruth wasn't this believable, the most over-the-top aspects of the satire wouldn't feel as overbearing.
Every character except Ruth is a pure caricature -- the personification of an exaggerated point-of-view. The most obvious example of this is the national pro-life leader.  Holy and pious in public, he is shown to be vain, greedy, and arrogant in private (he even has a personal "boy toy" servant). Reynolds' liberal counterpart, portrayed by Tippi Hendren, is presented as more subdued, possibly because she has much less screen time.
CITIZEN RUTH has its share of bitingly funny moments, and some of the comedy is quite inventive. By structuring the film as a satire, Payne is able to make statements about the abortion issue that no straight film would likely attempt, and, as is often the case, there's a great deal of truth buried in the humor. In fact, CITIZEN RUTH's weakest moments occur not when it's savaging social causes and political concerns, but when it attempts to inject conventional drama into its exaggerated, outrageous milieu.
- James Berardinelli e-mail<EMAIL_ADDRESS>ReelViews web site: http://www.cybernex.net/~berardin
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


  He is a 40-year-old single, homosexual man. And their bond is very special and unbreakable.
We at Bright Side found this story absolutely beautiful and can’t wait to tell our readers about Luca and Alba.
Life for Alba had a very rough start, her young mom rejected her as soon as she saw that her daughter was born with a special medical condition. And this was only the first rejection of many. In Italy, many families want to adopt children, however only very few of them would consider taking a child with special needs.
When Alba was only 13 days old, 20 potential families had already said “no” to adopting her, until the right person joined the scene and since then life for both of them changed forever.
Luca Trapanese always wanted to be a dad. But the law in Italy was very conservative and until 2017 adoption for single parents was not possible. Even when it became legally possible, it still wasn’t easy.
Since Luca had made the decision to adopt a child, he knew that he wanted to take care of somebody with a severe illness, a serious disability, or behavioral issues. When he was a teenager, his best friend was diagnosed with terminal cancer and Luca stayed with him until the very end. He saw and felt all the pain, desperation, and fear and knew that he wanted to spend his life helping those who need it.
Since then he had been volunteering at a local church helping people with critical illnesses and disabilities. And when he got the opportunity to adopt a kid with Down Syndrome, he wasn’t afraid, he knew that he was ready for it and that he could take good care of a child with special needs.
When he got the phone call, he couldn’t get to the hospital fast enough. There, he found the little princess in a tiny crib and he instantly felt that special bond that only a parent and child can have and immediately he felt that she was his daughter.
Alba is 18 months old now and she looks as happy as only a very loved person can be. And so does her dad, Luca. It really seems that both of them, Luca and Alba, needed each other and in this story, everyone has won the biggest prize, love and family.
Today Alba has a loving family, friends, uncles, grandparents, and a dad who all love her to the moon and back and give her that love every day to help her grow. And we are so happy for both of them.
What do you think about this story? What would you tell Luca and Alba and other families like them, if you had the chance? Tell us in the comment section below.
Preview photo credit trapaluca / instagram, trapaluca / instagram


API Documentation¶
Contents
reqwire.helpers¶
Various helper utilities.
reqwire.helpers.cli¶
Helpers for command-line applications.
-
class
reqwire.helpers.cli.
ConsoleWriter
(verbose=True)[source]¶ Facilitates writing formatted, informational messages to a TTY.
-
echo
(message, *args, **kwargs)[source]¶ Wraps
click.echo()
.Parameters: - message – The message to write to stdout.
- *args – Used to format message.
- **kwargs – Used to format message.
-
error
(message, *args, **kwargs)[source]¶ Prints an error message.
Parameters: - message – The message to write to stdout.
- *args – Used to format message.
- **kwargs – Used to format message.
-
fatal
(message, *args, **kwargs)[source]¶ Prints a fatal message.
Parameters: - message – The message to write to stdout.
- *args – Used to format message.
- **kwargs – Used to format message.
-
info
(message, *args, **kwargs)[source]¶ Prints an informational message.
Parameters: - message – The message to write to stdout.
- *args – Used to format message.
- **kwargs – Used to format message.
-
-
reqwire.helpers.cli.
emojize
(message, **kwargs)[source]¶ Wrapper around
emoji.emojize()
for Windows compatibility.Emoji are not well supported under Windows. This function not only checks
sys.platform
, but the file/proc/version
as well to prevent “emojification” on the Windows Subsystem for Linux (WSL, otherwise known as Ubuntu on Windows).Parameters: - message – The format string. See
emoji.emojize()
for more information. Any emoji placeholders will be removed if Windows or WSL are detected. - **kwargs – Passed to
emoji.emojize()
.
- message – The format string. See
reqwire.helpers.requirements¶
Helpers for managing Python package requirements.
-
reqwire.helpers.requirements.
build_ireq_set
(specifiers, index_urls=None, resolve_canonical_names=True, resolve_versions=True, sort_specifiers=True)[source]¶ Builds a set of install requirements.
Parameters: - specifiers – A list of specifier strings.
- index_urls – List of Python package indexes. Only used if
resolve_canonical_names or resolve_versions is
True
. - resolve_canonical_names – Queries package indexes provided by index_urls for the canonical name of each specifier. For example, flask will get resolved to Flask.
- resolve_versions – Queries package indexes for latest package versions.
- sort_specifiers – Sorts specifiers alphabetically.
Returns: A set of
HashableInstallRequirement
.
-
reqwire.helpers.requirements.
get_canonical_name
(package_name, index_urls=None, *args)[source]¶ Returns the canonical name of the given Python package.
Parameters: - package_name – The package name.
- index_urls – A list of Python package indexes.
- *args – Command-line options and arguments passed to pip.
Returns: The canonical name of a package, or
None
if no packaging could be found in the given search indexes.
-
class
reqwire.helpers.requirements.
HashableInstallRequirement
(req, comes_from, source_dir=None, editable=False, link=None, as_egg=False, update=True, pycompile=True, markers=None, isolated=False, options=None, wheel_cache=None, constraint=False)[source]¶ A hashable version of
pip.req.InstallRequirement
.
-
reqwire.helpers.requirements.
parse_requirements
(filename, *args)[source]¶ Parses a requirements source file.
Parameters: - filename – The requirements source filename.
- *args – Command-line options and arguments passed to pip.
Returns: A set of
pip.req.InstallRequirement
, and apip.index.PackageFinder
instance.
-
class
reqwire.helpers.requirements.
PyPiHtmlParser
(search=None, *args, **kwargs)[source]¶ An HTML parse for Python package indexes.
-
class
reqwire.helpers.requirements.
PyPiHtmlParserState
[source]¶ An enumeration of parsing states for
PyPiHtmlParser
.-
collecting_package_name
= <PyPiHtmlParserState.collecting_package_name: 1>¶ The state indicating a package anchor tag is being visited.
-
found_package_name
= <PyPiHtmlParserState.found_package_name: 2>¶ The state indicating a package matching a search was visited.
-
waiting
= <PyPiHtmlParserState.waiting: 0>¶ The default parser state.
-
-
class
reqwire.helpers.requirements.
RequirementFile
(filename, requirements=None, nested_cfiles=None, nested_rfiles=None, index_urls=None)[source]¶ Represents a Python requirements.txt file.
-
extra_index_urls
¶ Extra Python package index URLs.
-
index_url
¶ A Python package index URL.
-
parse
(*args)[source]¶ Parses a requirements file.
Parameters: *args – Command-line options and arguments passed to pip. Returns: A set of requirements, index URLs, nested constraint files, and nested requirements files. The nested constraint and requirements files are sets of
RequirementFile
instances.
-
-
reqwire.helpers.requirements.
resolve_ireqs
(requirements, prereleases=False, intersect=False, *args, **kwargs)[source]¶ Resolves install requirements with piptools.
Parameters: - requirements – An iterable of
pip.req.InstallRequirement
. - prereleases – Whether or not to include prereleases.
- intersect – Return only install requirements that intersect with requirements. Default behavior is to include the entire dependency graph as produced by piptools.
- *args – Command-line options and arguments passed to pip.
- **kwargs – Passed to
piptools.resolver.Resolver
.
Returns: A set of
pip.req.InstallRequirement
.- requirements – An iterable of
-
reqwire.helpers.requirements.
resolve_specifier
(specifier, prereleases=False, *args)[source]¶ Resolves the given specifier.
Parameters: - specifier – A specifier string.
- prereleases – Whether or not to include prereleases.
- *args – Command-line options and arguments passed to pip.
Returns: A set of
pip.req.InstallRequirement
.
-
reqwire.helpers.requirements.
update_ireq_name
(install_requirement, package_name)[source]¶ Updates the name of an existing install requirement.
Parameters: - install_requirement – A
pip.req.InstallRequirement
instance. - package_name – The new package name.
Returns: The install_requirement with mutated requirement name.
- install_requirement – A
-
reqwire.helpers.requirements.
write_requirements
(filename, requirements, index_url=None, extra_index_urls=None, header=None)[source]¶ Writes install requirements to a file.
Note that this function is destructive and will overwrite any existing files.
Parameters: - filename – The output filename.
- requirements – An iterable of
pip.req.InstallRequirement
. - index_url – The primary Python package index URL.
- extra_index_urls – Extra package index URLs.
- header – A header string to prepend to the file.
reqwire.config¶
Provides configuration and configuration defaults.
reqwire.errors¶
Provides custom exception classes.
reqwire.scaffold¶
Scaffold supporting files and directories.
-
reqwire.scaffold.
build_filename
(working_directory, tag_name, extension='.in', prefix='src')[source]¶ Constructs a path to a tagged requirement source file.
Parameters: - working_directory – The parent directory of the source file.
- tag_name – The tag name.
- extension – The file extension. Defaults to .in.
- prefix – The subdirectory under the working directory to create the source file in. Defaults to src.
-
reqwire.scaffold.
build_source_header
(format_string='# Generated by reqwire on %c\n{nested_cfiles}{nested_rfiles}{index_url}{extra_index_urls}\n', index_url=None, extra_index_urls=None, nested_cfiles=None, nested_rfiles=None, timestamp=None)[source]¶ Builds a header for requirement source file.
Parameters: - format_string – A format string containing one or more of the
following keys: nested_cfiles, nested_rfiles,
index_url, and extra_index_urls. The format string
may also include
strftime
formatting directives. - index_url – A Python package index URL.
- extra_index_urls – Extra Python package index URLs.
- nested_cfiles – A set of nested constraint files.
- nested_rfiles – A set of nested requirement files.
- timestamp – A
datetime.datetime
object. If not provided, defaults to the current datetime.
Returns: The rendered header string.
- format_string – A format string containing one or more of the
following keys: nested_cfiles, nested_rfiles,
index_url, and extra_index_urls. The format string
may also include
-
reqwire.scaffold.
DEFAULT_HEADER
= '# Generated by reqwire on %c\n{nested_cfiles}{nested_rfiles}{index_url}{extra_index_urls}\n'¶ The default header format string for requirement source files.
-
reqwire.scaffold.
extend_source_file
(*args, **kwargs)[source]¶ Adds requirements to an existing requirement source file.
Parameters: - working_directory – The parent directory of the source file.
- tag_name – The tag name.
- specifiers – A list of specifiers.
- extension – The file extension. Defaults to .in.
- index_url – A Python package index URL.
- extra_index_urls – Extra Python package index URLs.
- lookup_index_urls – Python package index URLs used to search for packages during resolving. This parameter is only useful if an attempt is made to add packages found only in indexes that are only specified in nested requirement source files.
- resolve_canonical_names – Queries package indexes provided by index_urls for the canonical name of each specifier. For example, flask will get resolved to Flask.
- resolve_versions – Queries package indexes for latest package versions.
-
reqwire.scaffold.
init_source_dir
(working_directory, mode=511, create_parents=True, exist_ok=False, name='src')[source]¶ Creates a requirements source directory.
Parameters: - working_directory – The parent directory of the source file.
- mode – Permissions with which to create source file. Defaults to 0o777.
- create_parents – Whether or not parent directories should be created if missing.
- exist_ok – Does not raise an
OSError
if directory creation failed. - name – The name of the subdirectory to create under the working directory. Defaults to src.
-
reqwire.scaffold.
init_source_file
(working_directory, tag_name, extension='.in', index_url=None, extra_index_urls=None, encoding=None, errors=None, mode=438, overwrite=False)[source]¶ Creates a requirements source file.
Parameters: - working_directory – The requirements working directory.
- tag_name – The tag name.
- extension – The file extension. Defaults to ”.in”.
- index_url – Base URL of Python package index.
- extra_index_urls – Iterable of URLs of secondary package indexes.
- encoding – Passed to
io.open()
when creating source file. - errors – Passed to
io.open()
when creating source file. - mode – Permissions with which to create source file. Defaults to 0o666.
- overwrite – Whether or not to overwrite an existing source file.
Returns: Path to source file.


Complete with culprit and bug
Complete with culprit and bug no regression confidence
Complete with culprit and bug no culprit confidence
Complete with no culprit and bug
Complete with an upper bound (longstanding flake)
Complete with a lower bound (unreproducible flake)
Running without regression range
Pending without regression range
Running culprit analysis
pending culprit analysis
Regression range with error
Culprit analysis with error


--- layout: page title: Publications header: Publications group: navigation ---
ORCID: 0000-0002-9843-8988
Abrahams, K.A. et al., 2016. Identification of KasA as the cellular target of an anti-tubercular scaffold. Nature communications, 7, p.12581. Available at: http://dx.doi.org/10.1038/ncomms12581.
Connor, T.R. et al., 2016. CLIMB (the Cloud Infrastructure for Microbial Bioinformatics): an online resource for the medical microbiology community. Microbial Genomics, 2(9). Available at: http://mgen.microbiologyresearch.org/content/journal/mgen/10.1099/mgen.0.000086 [Accessed November 8, 2016].
Diallo, B. et al., 2016. Resurgence of Ebola Virus Disease in Guinea Linked to a Survivor With Virus Persistence in Seminal Fluid for More Than 500 Days. Clinical infectious diseases: an official publication of the Infectious Diseases Society of America, 63(10), pp.1353–1356. Available at: http://dx.doi.org/10.1093/cid/ciw601.
Dudas, G. et al., 2016. Virus genomes reveal the factors that spread and sustained the West African Ebola epidemic. bioRxiv, p.071779. Available at: http://biorxiv.org/content/early/2016/09/02/071779.1.abstract [Accessed November 7, 2016].
Faria, N.R. et al., 2016. Mobile real-time surveillance of Zika virus in Brazil. Genome medicine, 8(1), p.97. Available at: http://dx.doi.org/10.1186/s13073-016-0356-2
Gerasimidis, K. et al., 2016. The effect of DNA extraction methodology on gut microbiota research applications. BMC research notes, 9, p.365. Available at: http://dx.doi.org/10.1186/s13104-016-2171-7.
Keita, M. et al., 2016. Unusual Ebola Virus Chain of Transmission, Conakry, Guinea, 2014-2015. Emerging infectious diseases, 22(12), pp.2149–2152. Available at: http://dx.doi.org/10.3201/eid2212.160847.
McMurray, C.L. et al., 2016. Staphylococcal species heterogeneity in the nasal microbiome following antibiotic prophylaxis revealed by tuf gene deep sequencing. Microbiome, 4(1), p.63. Available at: http://dx.doi.org/10.1186/s40168-016-0210-1.
Quick, J. et al., 2016. Real-time, portable genome sequencing for Ebola surveillance. Nature, 530(7589), pp.228–232. Available at: http://dx.doi.org/10.1038/nature16996.
Sissoko, D. et al., 2016. Ebola virus persistence in breast milk after no reported illness: a likely source of virus transmission from mother to child. Clinical infectious diseases: an official publication of the Infectious Diseases Society of America. Available at: http://dx.doi.org/10.1093/cid/ciw793.
Stoiber, M.H. et al., 2016. De novo Identification of DNA Modifications Enabled by Genome-Guided Nanopore Signal Processing. bioRxiv, p.094672. Available at: http://www.biorxiv.org/content/early/2016/12/15/094672.abstract [Accessed December 31, 2016].
{% assign year = '' %} {% for pub in site.data.pubs %} {% capture pub_date %}{{ pub.PubDate | split:" " | first }}{% endcapture %} {% if pub_date != year %}{{ pub.AuthorList | array_to_sentence_string }} {{ pub.Title }} {{ pub.Source }} {{ pub.SO }} ({{ pub.DOI }})
{% endfor %}


--- layout: post date: 2010-06-11 time: "12:00:00" authors: ["Greg Wilson"] title: Thought for the Day tags: ["Education"] ---
We talked of the education of children; and I asked him what he thought was the best way to teach them first. Johnson: "Sir, it is no matter what you teach them first, any more than what leg you shall put into your breeches first. Sir, you may stand disputing which is best to put in first, but in the mean time your breech is bare. Sir, while you are considering which of two things you should teach your child first, another boy has learnt them both."
— Boswell, Life of Samuel Johnson


College got you too broke to get your own Netflix account, but the FOMO of hearing your friends talk about shows annoys you? We've got you covered! Find people who want to share Netflix accounts with you!


Home
Home
Hello Books
Profile
Borrowed Books
Leslie Burugu
About
Software engineer & open source enthusiast
Hobbies
Programming,indie music and travelling.
View Borrowing history
Title
Publisher
Complete
Actions
A Brief History of Time
Bantam Dell Publishing Group
Stephen Hawking
Return
Upload a different photo
Choose file


The extj-ajax
component is a client-side binding to a server-side XHR datasource,
supporting paging, sorting, and filtering.
The API was designed for both version 4 and 5 of Sencha's ExtJS Grid (available free under GPL 3), and full documentation can be found on Sencha's web site.
<sortable-table pageSize="10"> <extjs-ajax role="datasource" url="extjs/grid-filter.php"></extjs-ajax> </sortable-table>
The server is hosted in the Netherlands, so users outside of Europe might notice extra latency loading data
Data is loading = {{loading}}
<extjs-ajax url="http://www.stevenskelton.ca/sortable-table/examples/extjs/grid-filter.php" start=[int] length=[int] sortColumn=[string] sortDescending=[boolean] columns='[ {"name":"id"}, {"name":"name"}, {"name":"last"}, {"name":"volume"}, {"name":"daily"}, {"name":"ytd"} ]' ></extjs-ajax>
Waiting for Query
Start
Paging first record indicator. This is the start point in the current data set (0 index based - i.e. 0 is the first record).
Length
Number of records that the table can display in the current draw. It is expected that the number of records returned will be equal to this number, unless the server has fewer records to return. Note that this can be -1 to indicate that all records should be returned (although that negates any benefits of server-side processing!)
Sort Column
Descending
Column by which to sort the records.
Filter Columns
Columns to filter by.
Loading
{{dataSize}} Total Records
{{data.length}} Records Returned
Column Filters


About me
Projects
Contact
<EMAIL_ADDRESS>To showcase some of my PHP skills, I made a simple email form. Try it out and send me an email!
Your name:
(So I know who I'm talking to)
Your email:
(So I know how to reply to you)
Message Body: (You can press the enter key while in the message field)


JavaScript client for the ALKS API, usable in both modern browsers and node.js
It provides a lightweight wrapper around the ALKS REST API, with the following features:
For browser usage, it expects fetch
(and Promises) to be available. If they're not, you'll need to polyfill them.
Install with NPM like this
npm install alks.js
or Yarn
yarn install alks.js
// Using ES2015 module syntax
import * as ALKS from 'alks.js';
// Using node's require syntax
const ALKS = require('alks.js');
const myAlks = ALKS.create({
baseUrl: 'https://your.alks-host.com',
accessToken: 'abc123',
});
myAlks.getKeys({
account: '012345678910/ALKSPowerUser',
role: 'PowerUser',
sessionTime: 1
}).then((creds) => {
console.log(`here are your temporary access keys:
Access Key: ${creds.accessKey}
Secret Key: ${creds.secretKey}
Session Token: ${creds.sessionToken}`);
});
View the API documentation
To update the API documentation from the source, run npm run docs
Run both node.js and browser tests with npm test
(must have Chrome installed)
Generated using TypeDoc


Package : com.danehansen.display
Class : public class Parallax
Inheritance : Parallax > Object
A class for parallaxing based on mouse position or device orientation. The root of the parallax object would be the parent housing all the children that should be parallaxed. This object could even be the document or window if desired. You can also pass in a singular jQuery object. Along with the JavaScript instantiation, some markup is required as well to make the effect work. Any child nodes that are intended to be parallaxed should include either/both data-parallax-x
and data-parallax-y
attributes, which should be set as numbers representing the distance in pixels the child node will travel on that axis. Negative nubmers can be used to have a reversed parallax effect. Top and left css values are fine to have on the child nodes, as this effect uses translate3d
to move the children.

var parallax=new Parallax(document.getElementById("parallax_wrapper"));


Version Update:
We will be updating the method of generating passwords to a more secure and widely accepted method
About


Sorry, PINT is down for maintenance right now...but fear not! We're working on it and you'll be sharing pints in no time :)


Each Nasal Spray contains 120 sprays, Directions 1 or 2
sprays into each nostrils
20-minutes before activity
Contains up to 60 applications Directions: Apply a small amount (2 to 3 pumps) to the mucus membrane, beneath
the clitoris, and thoroughly
rub it in for 3-4 minutes to
help absorption
Buy Both
Exotic™ Nasal Spray
and Exotic™ Pleasure
Feminine Gel
Buy in New Zealand
Buy 1 Spray for $59
Shipping New Zealand: $7 *All prices are in New Zealand dollars
Buy in New Zealand
Buy 1 Gel for $59
Shipping New Zealand: $7
*All prices are in New Zealand dollars
Buy Special Package in New Zealand
Buy 1 Spray + 1 Gel for $99
Free shipping
*Save $40 + Free shipping in New Zealand $7 = TOTAL SAVING $47
*All prices are in New Zealand dollars
Buy Special Package in New Zealand
Buy 2 Sprays for $99 Free shipping *Save $40 + Free shipping in New Zealand $7 = TOTAL SAVING $47 *All prices are in New Zealand dollars
Buy Special Package in New Zealand
Buy 2 Gels for $99
Free shipping
*Save $40 + Free shipping in New Zealand $7 = TOTAL SAVING $47
*All prices are in New Zealand dollars
Buy Special Package in New Zealand
Buy 2 Sprays + 1 Gel for $130
Free shipping
*Save $47 + Free shipping in New Zealand $7 = TOTAL SAVING $54
*All prices are in New Zealand
Buy in World Wide
Buy 1 Spray for $59
Shipping World Wide: $15
*All prices are in New Zealand dollars
Buy in World Wide
Buy 1 Gel for $59
Shipping World Wide: $15
*All prices are in New Zealand dollars
Buy Special Package in World Wide
Buy 2 Sprays + 1 Gel for $130
Free shipping
*Save $47 + Free shipping World Wide $15 = TOTAL SAVING $62
*All prices are in New Zealand
Buy Special Package in World Wide
Buy 3 Sprays for $130
Free shipping *Save $47 + Free shipping World Wide $15 = TOTAL SAVING $62
*All prices are in New Zealand dollars
Buy Special Package in World Wide
Buy 3 Gels for $130
Free shipping
*Save $47 + Free shipping World Wide $15 = TOTAL SAVING $62
*All prices are in New Zealand dollars
Buy Special Package in World Wide
Buy 2 Sprays + 2 Gels for $177
Free shipping
*Save $59 + Free shipping World Wide $15 = TOTAL SAVING $74
*All prices are in New Zealand


Alfredo De la Fuente
Passionate learner, eclectic idealist
'Nothing is built on stone, all is built on sand; but we must build as if the sand were stone.'
– Jorge Luis Borges
'Nothing is built on stone, all is built on sand; but we must build as if the sand were stone.'
– Jorge Luis Borges
I received my MSc (with Distinction) in Statistical Learning Theory from Skoltech and Higher School of Economics, supervised by Maxim Panov. I worked on unsupervised graph embedding as member of the Structural Learning Group.
My research interests currently lie within Representation Learning, Statistical learning theory, Generative Models and Reinforcement Learning. My updated CV is available here.
This website constitutes a personal experimental mechanism to hierarchically organize my thoughts, thus forcing myself to remain in a creative state of mind by improving my writing skills and developing a constant learning habit.
News
| May 22, 2022 | Joined Google as a Software Engineer. Moved to NY. |
| Oct 10, 2020 |
Started working as an Applied Research Scientist at |
| Jun 10, 2019 | Our work with Robert Aduviri on disentagled representations was orally presented at the ICML 2019 LatinX in AI Research Workshop |
| May 6, 2019 | Presented our work on node embeddings at the ICLR 2019 Representation Learning on Graphs and Manifolds Workshop |
| Feb 1, 2019 | Won the ICLR 2019 Reproducibility Challenge for the ‘Variational Sparse Coding’ replication effort. |
| Dec 8, 2018 | Poster presentation at NeurIPS 2018 LXAI Research Workshop |
| Jun 15, 2018 | Succesfully finished first year of master program (Interview) |
| Sep 1, 2017 | Started Statistical Learning Theory master program in Moscow. |


sphinx-quickstart on Wed Mar 20 16:01:31 2019. You can adapt this file completely to your liking, but it should at least contain the root toctree directive.
Welcome to Route_Dynamics’s documentation!¶
Indices and tables¶
-
base.
distance_measure
(route_shp)[source]¶ Calculates the distance between points along the route and calculates the cumulative distance.
route_shp: shapefile for the selected route; output of read_shape()
distance: list containing the distance between each point [meters] cum_distance: array of the total route distance at each point along the route (e.g. the first point will have a distance of 0, and the last point will equal the total route distance) [meters]
-
base.
extract_point_df
(route_shp)[source]¶ Extracts coordinates for all points along the route.
route_shp: shapefile for the selected route; output of read_shape()
linestring_route_df: dataframe containing the coordinates for every point along the route
-
base.
gradient
(route_shp, rasterfile)[source]¶ Calculates the elevation and road grade at each point along the route.
route_shp: shapefile for the selected route; output of read_shape() rasterfile: elevation data file (.tif)
elevation_meters: the elevation at each point along the route route_gradient: the road grade (e.g. slope) at each point along the route route_cum_distance: the total route distance at each point along the route [m] route_distance: the distance between each point [m]
-
base.
make_lines
(gdf, gradient, idx, geometry='geometry')[source]¶ Creates a line between each point; iterative function for make_multi_lines(), so it is not called directly.
gdf: dataframe of coordinates; output of extract_pts_df() gradient: the road grade (e.g. slope) at each point along the route; output of gradient() idx: index geometry: DEFAULT = ‘geometry’
df_line: dataframe containing the line segments
-
base.
make_multi_lines
(linestring_route_df, elevation_gradient)[source]¶ Creates a geo dataframe containing the road grade and linestring for each point along the route.
linestring_route_df: dataframe of coordinates; output of extract_pts_df() elevation_gradient: the road grade (e.g. slope) at each point along the route; output of gradient()
gdf_route: geodataframe with columns [‘gradient’, ‘geometry’]
-
base.
profile_plot
(elevation, elevation_gradient, route_cum_distance, route_num)[source]¶ Creates two plots. First shows elevation vs. distance. Second shows absolute grade vs. distance.
elevation: the elevation at each point along the route elevation_gradient: the road grade at each point along the route route_cum_distance: the total route distance at each point along the route [m] route_num: route number (integer)
plt: Elevation vs. distance and absolute grade vs. distance plots
-
base.
read_shape
(shapefile, route_num)[source]¶ Reads shapefile and selects desired route.
shapefile: route geospatial data (.shp file) route_num: route number (integer)
route_shp: shapefile for the selected route
-
base.
route_map
(gdf_route)[source]¶ Creates interactive map for the desired route.
gdf_route: geodataframe output from make_multi_lines()
route_map: interactive map that displays the desired route and road grade
-
base.
route_metrics
(elevation, elevation_gradient, route_cum_distance, distance, route_num)[source]¶ Estimates route difficulty based on four test metrics.
elevation: the elevation at each point along the route elevation_gradient: the road grade at each point along the route route_cum_distance: the total route distance at each point along the route [m] distance: the distance between each point [m] route_num: route number (integer)
display_metrics: string of metrics results metric_values: results of metrics calculations
-
single_route.
route_analysis_all
(route_num, shapefile, rasterfile)[source]¶ - input the number of route, then output an interactive map of the route, elevation and road grade profiles, and metrics calculated for the route.
Also will save the route as shapefile named ‘route_shp’.
route_num: Desired route number (integer) shapefile: route geospatial data (.shp file) rasterfile: elevation data file (.tif)
map_display: interactive map for desired route route_plot: elevation and grade profiles for desired route display_metrics: results of metrics calculations
-
single_route.
route_analysis_df
(route_num, shapefile, rasterfile)[source]¶ - input the number of route, then output a GeoDataFrame with gradient and geometry
information of that route, and elevation_gradient for each line segment. Also will save the route as shapefile named ‘route_shp’.
route_num: desired route number (integer) shapefile: route geospatial data (.shp file) rasterfile: elevation data file (.tif)
gdf_route: geodataframe with columns [‘gradient’, ‘geometry’]
-
single_route.
route_analysis_map
(route_num, shapefile, rasterfile)[source]¶ - input the number of route, then output an interactive map showing the route and road grade.
Also will save the route as shapefile named ‘route_shp’.
route_num: desired route number (integer) shapefile: route geospatial data (.shp file) rasterfile: elevation data file (.tif)
map_display: interactive map for desired route
-
single_route.
route_analysis_metrics
(route_num, shapefile, rasterfile)[source]¶ - input the number of route, then output the metrics calculated for that route.
Also will save the route as shapefile named ‘route_shp’.
route_num: Desired route number (integer) shapefile: route geospatial data (.shp file) rasterfile: elevation data file (.tif)
display_metrics: results of metrics calculations
-
single_route.
route_analysis_profile
(route_num, shapefile, rasterfile)[source]¶ - input the number of route, then output elevation and road grade profiles.
Also will save the route as shapefile named ‘route_shp’.
route_num: desired route number (integer) shapefile: route geospatial data (.shp file) rasterfile: elevation data file (.tif)
route_plot: elevation and grade profiles for desired route
-
multiple_route.
routes_analysis_ranking
(route_list, shapefile, rasterfile)[source]¶ Computes the four chosen metrics values for each bus routes in route_list and display them on a bar plot for ease of comparison
route_list: A list of bus routes to be compared (Integers) shapefile: route geospatial data (.shp file) rasterfile: elevation data file (.tif)
bar plot: showing results comparison between bus routes according to the four metrics chosen


Football: Man City's appeal to CAS ruled inadmissible
MONTREUX, Switzerland: Manchester City's appeal to the Court of Arbitration for Sport (CAS) against a UEFA financial fair play investigation has been dismissed, the tribunal's general secretary Matthieu Reeb said on Friday (Nov 15).
"CAS ruled that the appeal filed by Manchester City football club is inadmissible," Reeb told reporters. The English Premier League champions lodged their appeal in June against an investigation by the European football body into potential breaches by the club of its financial fair play policy.


Week 1 Technical Post
The three websites that I've chosen to discuss are:
Reddit, for me, is my be all end all in terms of the internet. Sure, Facebook or Google can do social media or search, and are vital parts of the Internet and daily life today, but Reddit, to me, is my connection both the Internet and the happenings on it, but also my connection to myriads of smaller communities, as well as keeping me up to date about news that I would normally not know about.
When I first started to use Reddit, I saw it as a boring, uninteresting site. But it's functional, pragmatic, simple, and with the combination of the type of users, also progressive and liberal, even if there is a little bit of "being in a bubble".
Basically what it does is aggregate and provide a mechanism of ranking user submitted content. It's also broken down in what's called "subreddits" where fans of... say Game of Thrones fans can submit and rate content.
In terms of actual design and look and feel about the site, I like it. As I said before, at first it looked too simple, maybe even "ugly" to me, after I had been so used to the flashy sites with Flash when I first started using Reddit. But it made digesting the information easier, the comment trees to be easily followed, and allowed quicker browsing and loading. Everything is pretty much self explanatory and easy to get through; simplicity really works well there.
 The search function does not work very well, and in general it's hard to look for a post, since there are no real ways to "tag" or give "attributes" to a submission.
All in all, it's a great site to kill time and great way to digest information in an up to date manner. However, don't expect to keep track of everything, and the site itself can get very busy (slow due to traffic).
Google is one of the engine's of the internet. Simple, functional, relevant, as well as interconnected and omnicscient, it drives so many of daily user's browsing and information seeking. It also connects people in what they're looking for, setting them down the right path.
Visually, I really like it. The simplicity allows you to pack as much relevant information as possible. It also allows them to add those celebatory images for different events and holidays. Esepcially since when you first get to the google site, the Search bar, and two buttons, is really all you see.
Which takes us into of design and function. When the home page, which is really just the search bar, hasn't changed in terms of design since it's inception, you know the design and related fucntionality works- especially if you know the different ways to search (by domain, with operators, etc.)
The only downsides for me, however, is once you get past the regular text search. At least in my opinion, and I know this is a lot harder to search than vs. pure text, but the news, video, and Image search is not as robust and easy to search through as the regular search. Text search for an image or video doesn't really make as much sense, especially if you're looking for visual elements. Howerver this is less of a problem with Google versus how different media is stored and gathered.
All in all, it's hard to do search better than Google. However once you get outside that core compentency, like videos or images, or try to do shopping or connecting to the other Google services, it's a little unwieldly.
Amazon
Amazon is comprehensive, predictive, easy, connected, but a little cluttered.
When it comes to online shopping, it's hard to beat Amazon. Especially with it's breadth of different products that is offered, the ease of delivering these items to your home, the user reviews, and algorithm that suggest items to be bought; no other shopping site offers that sort of total service.
Looking for products is easy. Looking for related products is also easy. And once you set up easy payment system, buying can be as simple as one click. And when you're a shopping website, it makes a lot of sense to make buying things incredibly easy, which Amazon does.
The only problem with the design of the site, is that since there is so many different things that are offered, there can be an overwhelming amount of options. Unfortunately, there's really no way to be able to filter down on the options if it's something you don't know much about (you can filter by brand and cost, but if you're not knowledgeable, it's hard to exclude things you dont know about).
Ultimately, Amazon, as a shopping site, is the most comprehensive site out there. And since theyre branching out into providing other services, like streaming video, it's only getting better. However, they do offer possiblly too much, allowing quality products to be obfuscated by other lesser products.


Feeding
Crested geckos primarily eat fruit; in the pet trade, you can buy pre-made food called crested gecko diet. It is a powdery substance that comes in bags or bottles usually, and when mixed with water will form a baby food-like soft mush that your gecko will eat. The most recommended brands are Pangea and Repashy.


Cellular structure and organization; physiological processes; classification; reproduction and development; relationship of plant groups. Students who have passed BIOL 240W may not schedule this course
During the course of the semester, the student will:
You will be expected to check in every day or every other day for any announcements or updates. The amount of time spent looking over the material typically is correlated with quiz and exam grade: the more time spent studying usually translates into a better grade. Although this is an online course, you should expect to spend a similar amount of time on the material that you would for an inperson class. The general rule for studying is as follows: for every one hour of lecture, you should spend 2.5 to 3 hours studying the material. That means for a three-credit course, you should spend 7.5 to 9 hours per week studying and completing assignments if you intend to do well (“A” or “B” level).
You will complete 11 labs related to the material covered during that week. The lab materials must be ordered through Carolina Biological Supplies, and will be delivered to your home. The labs are designed for you to complete at your home, with the exception of one lab, where you will be required to go to a local park, arboretum, or botanical garden. Though in some cases the lab will reinforce concepts covered in the book and in the PowerPoints, the lab may also cover a unique topic. For this reason, material covered in lab activities will be included on exams. If you have completed all 11 labs, only your 10 best scores will count towards your grade.
Each week one or more short quizzes covering that week’s chapter contents must be completed. The quizzes are designed to ensure that you keep up with your reading and study. The quizzes will be in a true/false, matching, or multiple-choice type format and are intended to reinforce the main concepts in each chapter. Utilize the weekly objectives as a study guide for the quizzes and exams. These quizzes will only be open for a limited time, so do not go for extended periods of time (days, weeks) without having logged into the course. I typically do not re-open quizzes unless in the case of technical difficulties from my end. If you miss one or a few quizzes, this will not negatively affect your grade. If you have taken all 23 quizzes, only your 20 best scores will count towards your grade.
During the semester, you will watch two documentaries: The Botany of Desire, broken into four parts of 30 minutes each, and America’s Lost Landscape: The Tallgrass Prairie which is 60 minutes. This is a total of five discussion forums. For each forum, you will be asked to post a response or answers questions. Your first post is due 24 hours prior to the due date for the assignment. If the post is late, no points will be awarded (see discussion instructions in the week 1 module on Canvas for more detailed instructions). The discussions are worth 25 points each.
One lab will require that you write a formal lab report. This is meant to give you practice at scientific writing. You will complete a peer-review draft, a rough draft, and a final draft (see the instruction in the Effects of Ethylene on Fruit Ripening Lab and the individual Lab Report assignments on Canvas for more details).
During the semester, you will have three exams and a final exam over the material covered. These exams will include true/false, multiple-choice, and/or matching questions; in addition there may be diagrams to label and/or short free-response questions. Exams will cover material for each “unit”: Exam 1 will cover material from the beginning of the course until the first exam, Exam 2 will cover material after Exam 1 until the second exam, and so forth. The final will be similar in format to the midterm exams. The only differences will be that the final will be slightly (about 50%) longer, and will be cumulative. The cumulative section will be about 33% of the final, and the remainder will be material covered after the third midterm. All exams will be delivered online, but they will be proctored, using Examity (see Examity section under University Policies). You will have a window of about 72 hours to take your exam, but you must schedule it in advance through the Examity tab in Canvas. If you make changes to your scheduled exam time less than 24 hours before the start of the exam window, Examity will charge you a fee of $3.
| Assignment | Breakdown | Points | Drop |
|---|---|---|---|
| Labs | 11 x 25pts | 225 | 1 |
| Chapter Quizzes | 23 x 5pts | 100 | 3 |
| Video Discussions | 5 x 25pts | 125 | N/A |
| Lab Report | 1 x 100pts | 100 | N/A |
| Exams | 3 x 100pts | 300 | N/A |
| Final Exam | 1 x 150pts | 150 | N/A |
| Letter Grade | Points |
|---|---|
| A | 930-1000 |
| A- | 900-929 |
| B+ | 870-899 |
| B | 830-869 |
| B- | 800-829 |
| C+ | 770-799 |
| C | 700-769 |
| D | 600-699 |
| F | < 599 |


Publications
Steingrimsson, J.A., Diao, L., & Strawderman, R. L. Censoring Unbiased Regression Trees and Ensembles. Journal of the American Statistical Association. (In Press).
Hu, C., & Steingrimsson, J.A.,. Personalized Risk Prediction in Clinical Oncology Research: Applications and Practical Issues Using Survival Trees and Random Forests. Journal of Biopharmaceutical Statistics. (In Press).
Steingrimsson, J.A., & Strawderman, R.L. (2017). Estimation in the semiparametric accelerated failure time model with missing covariates: improving efficiency through augmentation. Journal of the American Statistical Association. Volume 519. 1221-1235.
Steingrimsson, J.A., Hanley, D.F, & Rosenblum, M. (2017). Improving precision by adjusting for baseline variables in randomized trials with binary outcomes, without regression model assumptions. Contemporary Clinical Trials. Volume 54. 18-24. [Code included in web appendix].
Steingrimsson, J.A., Diao, L., Molinaro, A.M., & Strawderman, R. L. (2016). Doubly Robust survival trees. Statistics in Medicine. Volume 35. Issue 20. 3595 – 3612.
Vangay, P., Steingrimsson, J.A., Wiedmann, M., & Stasiewicz, M.J. (2014). Classification of Listeria monocytogenes persistence in retail delicatessen environments using expert elicitation and machine learning. Risk Analysis. Volume 34. Issue 10. 1830 – 1845.
Preprints
Rosenblum, M, & Steingrimsson, J.A. Matching the Efficiency Gains of the Logistic Regression Estimator while Avoiding its Interpretability Problems, in Randomized Trials.
Steingrimsson, J. A., Betz, J., Qian, T., and Rosenblum, M. Optimized Adaptive Enrichment Designs for Multi-ArmTrials: Learning which Subpopulations Benefit from Different Treatments.
Betz, J., Steingrimsson, J. A., Qian, T., and Rosenblum, M. Comparison of Adaptive Randomized Trial Designs for Time-to-Event Outcomes that Expand Versus Restrict Enrollment Criteria, to Test Non-Inferiority.
Steingrimsson, J. A. & Yang, J. Subgroup Identification using Covariate Adjusted Interaction Trees.
*Indicates joint first authors


List View Example
-
Joe Smith
Did you run your TPS reports? -
Glayds Astin
How about dinner at 3?  -
Phylicia Manor
Urgent message from .... -
Charles Seat
Go local sports team! -
Sebastian Schmid
Thanks for scrolling this far -
Patsy Lenzi
This is just filler content. -
Aretha Walk
Almost to the bottom -
Natalie White
Thanks for scrolling to the bottom.


{% load staticfiles %}
Couchbase Cloud Hosting
Couchbase Labs
Deployment Form
Select a Cloud Provider
Select
AWS
GCE
RackSpace
Azure
Cloud Account Configuration and Deployment Details


Ethereum (ETH) Stuck In Range While Bitcoin Is Sliding
- Ethereum price failed to continue above $190 and declined below $188 against the US Dollar.
- The price is currently correcting higher, but it is likely to face resistance near $187-$188.
- There is a connecting bearish trend line forming with resistance near $187 on the hourly chart of ETH/USD (data feed via Kraken).
- Bitcoin is trading with a bearish angle below the $8,950 and $9,000 resistance levels.
Ethereum price is trading in a broad range versus the US Dollar, while bitcoin is struggling. ETH price might revisit the $182 range support area in the near term.
Ethereum Price Analysis
Yesterday, there was a decent increase in Ethereum above the $188 resistance against the US Dollar. ETH even surpassed the $190 resistance area and the 100 hourly simple moving average.
However, the price struggled to gain strength above $190 and formed a high near the $192 level. Later, there was a downward move below the $188 support area and the 100 hourly simple moving average.
Moreover, the price traded below the 50% Fib retracement level of the upward move from the $180 swing low to $192 high. The bulls even failed to defend the $185 support and the price tested the $183 area.
Ethereum is currently correcting higher and trading near the $186 level. Additionally, it is trading near the 23.6% Fib retracement level of the recent decline from the $192 high to $184 swing low.
On the upside, an immediate resistance is near the $187 level. More importantly, there is a connecting bearish trend line forming with resistance near $187 on the hourly chart of ETH/USD, coinciding with the 100 hourly SMA.
If there is an upside break above the trend line and the 100 hourly SMA, the price could test the $188 resistance area. Any further gains may perhaps push the price towards the $192 swing high in the near term.
Conversely, the price could decline further if it fails to clear the $188 resistance. An immediate support is near the $184 level. The main supports are near the $182 and $180 levels, below which the bears are likely to gain strength.
Looking at the chart, Ethereum price seems to be trading in a broad range between $180 and $190. A successful close on the either side could trigger the next move. As long as there is no daily close below $180, there are chances of a fresh increase towards $200 and $205.
ETH Technical Indicators
Hourly MACD – The MACD for ETH/USD is about to move into the bullish zone.
Hourly RSI – The RSI for ETH/USD is currently rising and it is likely to clear the 50 level.
Major Support Level – $182
Major Resistance Level – $188


A large study suggests that many heart procedures are unnecessary or premature for people with ...
PHILADELPHIA - PHILADELPHIA (AP) - A large study suggests that many heart procedures are unnecessary or premature for people with stable disease.
Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.


[count(talk)] sessions at [count(event)] events ([count(upcoming)] events upcoming)
TBD
Talk
Keynote
Workshop
Panel
Video
Slides
,
Feedback
[name]


Hong Kong Airlines delays salaries as protests hit tourism
HONG KONG: Low-cost carrier Hong Kong Airlines said Friday (Nov 29) it will delay salary payments to some staff, warning its business has been "severely affected" by the political unrest in the city.
Nearly six months of protests in the international finance hub have dealt its tourism sector a massive blow, and airlines serving the city have struggled.
READ: Hong Kong to allow airlines to keep airport slots despite cutting capacity
"Hong Kong Airlines' business is severely affected by the social unrest in Hong Kong and a sustained weak travel demand," the carrier said in a statement.
"With November being a low travel season, our revenue has dipped significantly, impacting our payroll for the month."
It said November salaries for all staff except cabin crew and overseas employees would now be delayed until December 6, but insisted the "one-off salary arrangement does not impact our daily operation".
READ: Hong Kong gears up for weekend protests after rare lull in violence
Hong Kong Airlines is owned by struggling Chinese conglomerate HNA Group, which has been looking to lower its debt burden.
Earlier this year it unloaded another low-cost carrier - HK Express - to rival Cathay Pacific and it also cut some operations.
MORE: Our coverage of the Hong Kong protests
In early November, Hong Kong Transport and Housing Bureau ordered the airline to take further steps to improve its financial situation.
The tourism industry in Hong Kong has been battered by nearly six months of pro-democracy protests that have become increasingly violent, with arrivals falling by half.
The crisis comes as the economy was already feeling pressure from the China-US trade war, plunging into recession during the third quarter.
Cathay has also had a torrid year, hit by the collapse in arrivals and punished by Chinese regulators because some of its staff voiced support for the pro-democracy protests.
Singapore Airlines, China Eastern and Virgin Australia have all cut flights to Hong Kong this year.
Follow us on Telegram for the latest on Hong Kong: https://cna.asia/telegram


ngZoom examples
Instant zoom lens
Lens with a «remote» zoom window
Fallback for missing full-size image


Handles to derived datatypes can be passed to a communication call wherever a
datatype argument is required.
A call of the form MPI_SEND(buf, count, datatype , ...), where
, is interpreted as if the call was passed a new datatype
which is the
concatenation of count copies of datatype.
Thus,
MPI_SEND(buf, count, datatype, dest, tag, comm) is equivalent to,
MPI_TYPE_CONTIGUOUS(count, datatype, newtype) MPI_TYPE_COMMIT(newtype) MPI_SEND(buf, 1, newtype, dest, tag, comm).Similar statements apply to all other communication functions that have a count and datatype argument.
Suppose that a send operation MPI_SEND(buf, count, datatype, dest, tag, comm) is executed, where datatype has type map,
and extent extent. (Empty entries of ``pseudo-type'' MPI_UB and MPI_LB are not listed in the type map, but they affect the value of extent.) The send operation sends entries, where entry is at location
and has type typej, for and j = 0 ,..., n-1. These entries need not be contiguous, nor distinct; their order can be arbitrary.
The variable stored at address addri,j in the calling program should be of a type that matches typej, where type matching is defined as in section Type matching rules . The message sent contains entries, where entry has type typej.
Similarly, suppose that a receive operation MPI_RECV(buf, count, datatype, source, tag, comm, status) is executed, where datatype has type map,
with extent extent. (Again, empty entries of ``pseudo-type'' MPI_UB and MPI_LB are not listed in the type map, but they affect the value of extent.) This receive operation receives entries, where entry is at location
and has type typej. If the incoming message consists of k elements, then we must have ; the -th element of the message should have a type that matches typej.
Type matching is defined according to the type signature of the corresponding datatypes, that is, the sequence of basic type components. Type matching does not depend on some aspects of the datatype definition, such as the displacements (layout in memory) or the intermediate types used.
Example
This example shows that type matching is defined in terms of
the basic types that a derived type consists of.
... CALL MPI_TYPE_CONTIGUOUS( 2, MPI_REAL, type2, ...) CALL MPI_TYPE_CONTIGUOUS( 4, MPI_REAL, type4, ...) CALL MPI_TYPE_CONTIGUOUS( 2, type2, type22, ...) ... CALL MPI_SEND( a, 4, MPI_REAL, ...) CALL MPI_SEND( a, 2, type2, ...) CALL MPI_SEND( a, 1, type22, ...) CALL MPI_SEND( a, 1, type4, ...) ... CALL MPI_RECV( a, 4, MPI_REAL, ...) CALL MPI_RECV( a, 2, type2, ...) CALL MPI_RECV( a, 1, type22, ...) CALL MPI_RECV( a, 1, type4, ...)Each of the sends matches any of the receives.
A datatype may specify overlapping entries. The use of such a datatype in a receive operation is erroneous. (This is erroneous even if the actual message received is short enough not to write any entry more than once.)
A datatype may specify overlapping entries. If such a datatype is used in a receive operation, that is, if some part of the receive buffer is written more than once by the receive operation, then the call is erroneous.
Suppose that MPI_RECV(buf, count, datatype, dest, tag, comm, status) is executed, where datatype has type map,
The received message need not fill all the receive buffer, nor does it need to fill a number of locations which is a multiple of n. Any number, k, of basic elements can be received, where . The number of basic elements received can be retrieved from status using the query function MPI_GET_ELEMENTS.
MPI_GET_ELEMENTS( status, datatype, count)
[ IN status] return status of receive operation (Status)
[ IN datatype] datatype used by receive operation (handle)
[ OUT count] number of received basic elements (integer)
int MPI_Get_elements(MPI_Status *status, MPI_Datatype datatype, int *count)
MPI_GET_ELEMENTS(STATUS, DATATYPE, COUNT, IERROR)
INTEGER STATUS(MPI_STATUS_SIZE), DATATYPE, COUNT, IERROR
The previously defined
function, MPI_GET_COUNT (Sec. Return status
), has
a different behavior.
It returns the number of ``top-level
entries'' received, i.e. the number of ``copies'' of type
datatype.
In the previous example, MPI_GET_COUNT
may return any integer value k, where
.
If MPI_GET_COUNT returns k, then the number of basic
elements received (and the value returned by
MPI_GET_ELEMENTS)
is
. If the number of basic elements received is not a
multiple of n, that is, if the receive operation has not received an
integral number of datatype ``copies,'' then
MPI_GET_COUNT returns the value MPI_UNDEFINED.
Example
Usage of MPI_GET_COUNT and MPI_GET_ELEMENT.
... CALL MPI_TYPE_CONTIGUOUS(2, MPI_REAL, Type2, ierr) CALL MPI_TYPE_COMMIT(Type2, ierr) ... CALL MPI_COMM_RANK(comm, rank, ierr) IF(rank.EQ.0) THEN CALL MPI_SEND(a, 2, MPI_REAL, 1, 0, comm, ierr) CALL MPI_SEND(a, 3, MPI_REAL, 1, 0, comm, ierr) ELSE CALL MPI_RECV(a, 2, Type2, 0, 0, comm, stat, ierr) CALL MPI_GET_COUNT(stat, Type2, i, ierr) ! returns i=1 CALL MPI_GET_ELEMENTS(stat, Type2, i, ierr) ! returns i=2 CALL MPI_RECV(a, 2, Type2, 0, 0, comm, stat, ierr) CALL MPI_GET_COUNT(stat, Type2, i, ierr) ! returns i=MPI_UNDEFINED CALL MPI_GET_ELEMENTS(stat, Type2, i, ierr) ! returns i=3 END IF
The function MPI_GET_ELEMENTS can also be used after a probe to find the number of elements in the probed message. Note that the two functions MPI_GET_COUNT and MPI_GET_ELEMENTS return the same values when they are used with basic datatypes.
[] Rationale.
The extension given to the definition of MPI_GET_COUNT seems
natural: one would expect this function to return the value of the
count argument, when the receive buffer is filled.
Sometimes datatype represents
a basic unit of data one wants to transfer,
for example, a record in an array of records (structures).
One should be able to find out how many components were received
without bothering to divide by the number of elements in each
component. However, on other occasions, datatype is used to
define a complex layout of data in the receiver memory, and does not represent
a basic unit of data for transfers. In such cases, one needs to use
the function MPI_GET_ELEMENTS.
( End of rationale.)
[] Advice
to implementors.
The definition implies that a receive cannot change the value of
storage outside the entries defined to compose the communication
buffer.
In particular, the definition implies that padding space in a structure
should not be modified when such a structure is copied from one process to
another. This would
prevent the obvious optimization of copying the structure, together
with the padding, as one contiguous block.
The implementation is free to do this optimization when it does not
impact the outcome of the computation.
The user can ``force'' this optimization by explicitly including
padding as part of the message.
( End of advice to implementors.)