| 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.map; | |
| 18 | ||
| 19 | import java.util.AbstractCollection; | |
| 20 | import java.util.AbstractSet; | |
| 21 | import java.util.ArrayList; | |
| 22 | import java.util.Collection; | |
| 23 | import java.util.Iterator; | |
| 24 | import java.util.Map; | |
| 25 | import java.util.NoSuchElementException; | |
| 26 | import java.util.Set; | |
| 27 | ||
| 28 | import org.apache.commons.collections4.KeyValue; | |
| 29 | ||
| 30 | /** | |
| 31 | * A StaticBucketMap is an efficient, thread-safe implementation of | |
| 32 | * java.util.Map that performs well in in a highly | |
| 33 | * thread-contentious environment. The map supports very efficient | |
| 34 | * {@link #get(Object) get}, {@link #put(Object,Object) put}, | |
| 35 | * {@link #remove(Object) remove} and {@link #containsKey(Object) containsKey} | |
| 36 | * operations, assuming (approximate) uniform hashing and | |
| 37 | * that the number of entries does not exceed the number of buckets. If the | |
| 38 | * number of entries exceeds the number of buckets or if the hash codes of the | |
| 39 | * objects are not uniformly distributed, these operations have a worst case | |
| 40 | * scenario that is proportional to the number of elements in the map | |
| 41 | * (O(n)).
 | |
| 42 | * | |
| 43 | * Each bucket in the hash table has its own monitor, so two threads can | |
| 44 | * safely operate on the map at the same time, often without incurring any | |
| 45 | * monitor contention. This means that you don't have to wrap instances | |
| 46 | * of this class with {@link java.util.Collections#synchronizedMap(Map)}; | |
| 47 | * instances are already thread-safe. Unfortunately, however, this means | |
| 48 | * that this map implementation behaves in ways you may find disconcerting. | |
| 49 | * Bulk operations, such as {@link #putAll(Map) putAll} or the | |
| 50 | * {@link Collection#retainAll(Collection) retainAll} operation in collection | |
| 51 | * views, are not atomic. If two threads are simultaneously | |
| 52 | * executing | |
| 53 | * | |
| 54 | *
 | |
| 55 | * staticBucketMapInstance.putAll(map); | |
| 56 | *
 | |
| 57 | * | |
| 58 | * and | |
| 59 | * | |
| 60 | *
 | |
| 61 | * staticBucketMapInstance.entrySet().removeAll(map.entrySet()); | |
| 62 | *
 | |
| 63 | * | |
| 64 | * then the results are generally random. Those two statement could cancel | |
| 65 | * each other out, leaving staticBucketMapInstance essentially | |
| 66 | * unchanged, or they could leave some random subset of map in | |
| 67 | * staticBucketMapInstance.
 | |
| 68 | * | |
| 69 | * Also, much like an encyclopedia, the results of {@link #size()} and | |
| 70 | * {@link #isEmpty()} are out-of-date as soon as they are produced.
 | |
| 71 | * | |
| 72 | * The iterators returned by the collection views of this class are not | |
| 73 | * fail-fast. They will never raise a | |
| 74 | * {@link java.util.ConcurrentModificationException}. Keys and values | |
| 75 | * added to the map after the iterator is created do not necessarily appear | |
| 76 | * during iteration. Similarly, the iterator does not necessarily fail to | |
| 77 | * return keys and values that were removed after the iterator was created.
 | |
| 78 | * | |
| 79 | * Finally, unlike {@link java.util.HashMap}-style implementations, this | |
| 80 | * class never rehashes the map. The number of buckets is fixed | |
| 81 | * at construction time and never altered. Performance may degrade if | |
| 82 | * you do not allocate enough buckets upfront.
 | |
| 83 | * | |
| 84 | * The {@link #atomic(Runnable)} method is provided to allow atomic iterations | |
| 85 | * and bulk operations; however, overuse of {@link #atomic(Runnable) atomic} | |
| 86 | * will basically result in a map that's slower than an ordinary synchronized | |
| 87 | * {@link java.util.HashMap}. | |
| 88 | * | |
| 89 | * Use this class if you do not require reliable bulk operations and | |
| 90 | * iterations, or if you can make your own guarantees about how bulk | |
| 91 | * operations will affect the map.
 | |
| 92 | * | |
| 93 | * @since 3.0 (previously in main package v2.1) | |
| 94 | * @version $Id: StaticBucketMap.java 1477799 2013-04-30 19:56:11Z tn $ | |
| 95 | */ | |
| 96 | public final class StaticBucketMap<K, V> extends AbstractIterableMap<K, V> { | |
| 97 | ||
| 98 | /** The default number of buckets to use */ | |
| 99 | private static final int DEFAULT_BUCKETS = 255; | |
| 100 | /** The array of buckets, where the actual data is held */ | |
| 101 | private final Node<K, V>[] buckets; | |
| 102 | /** The matching array of locks */ | |
| 103 | private final Lock[] locks; | |
| 104 | ||
| 105 | /** | |
| 106 | * Initializes the map with the default number of buckets (255). | |
| 107 | */ | |
| 108 | public StaticBucketMap() { | |
| 109 | this(DEFAULT_BUCKETS); | |
| 110 | } | |
| 111 | ||
| 112 | /** | |
| 113 | * Initializes the map with a specified number of buckets. The number | |
| 114 | * of buckets is never below 17, and is always an odd number (StaticBucketMap | |
| 115 | * ensures this). The number of buckets is inversely proportional to the | |
| 116 | * chances for thread contention. The fewer buckets, the more chances for | |
| 117 | * thread contention. The more buckets the fewer chances for thread | |
| 118 | * contention. | |
| 119 | * | |
| 120 | * @param numBuckets the number of buckets for this map | |
| 121 | */ | |
| 122 | @SuppressWarnings("unchecked") | |
| 123 | public StaticBucketMap(final int numBuckets) { | |
| 124 | int size = Math.max(17, numBuckets); | |
| 125 | ||
| 126 | // Ensure that bucketSize is never a power of 2 (to ensure maximal distribution) | |
| 127 |
2
1. 2. |
if (size % 2 == 0) { |
| 128 |
1
1. |
size--; |
| 129 | } | |
| 130 | ||
| 131 | buckets = new Node[size]; | |
| 132 | locks = new Lock[size]; | |
| 133 | ||
| 134 |
3
1. 2. 3. |
for (int i = 0; i < size; i++) { |
| 135 | locks[i] = new Lock(); | |
| 136 | } | |
| 137 | } | |
| 138 | ||
| 139 | //----------------------------------------------------------------------- | |
| 140 | /** | |
| 141 | * Determine the exact hash entry for the key. The hash algorithm | |
| 142 | * is rather simplistic, but it does the job: | |
| 143 | * | |
| 144 | *
 | |
| 145 | * He = |Hk mod n| | |
| 146 | *
 | |
| 147 | * | |
| 148 | *
 | |
| 149 | * He is the entry's hashCode, Hk is the key's hashCode, and n is | |
| 150 | * the number of buckets. | |
| 151 | *
 | |
| 152 | */ | |
| 153 | private int getHash(final Object key) { | |
| 154 |
1
1. getHash : negated conditional → NO_COVERAGE |
if (key == null) { |
| 155 |
1
1. getHash : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return 0; |
| 156 | } | |
| 157 | int hash = key.hashCode(); | |
| 158 |
3
1. getHash : Replaced Shift Left with Shift Right → NO_COVERAGE 2. getHash : Replaced XOR with AND → NO_COVERAGE 3. getHash : Replaced integer addition with subtraction → NO_COVERAGE |
hash += ~(hash << 15); |
| 159 |
2
1. getHash : Replaced Unsigned Shift Right with Shift Left → NO_COVERAGE 2. getHash : Replaced XOR with AND → NO_COVERAGE |
hash ^= (hash >>> 10); |
| 160 |
2
1. getHash : Replaced Shift Left with Shift Right → NO_COVERAGE 2. getHash : Replaced integer addition with subtraction → NO_COVERAGE |
hash += (hash << 3); |
| 161 |
2
1. getHash : Replaced Unsigned Shift Right with Shift Left → NO_COVERAGE 2. getHash : Replaced XOR with AND → NO_COVERAGE |
hash ^= (hash >>> 6); |
| 162 |
3
1. getHash : Replaced Shift Left with Shift Right → NO_COVERAGE 2. getHash : Replaced XOR with AND → NO_COVERAGE 3. getHash : Replaced integer addition with subtraction → NO_COVERAGE |
hash += ~(hash << 11); |
| 163 |
2
1. getHash : Replaced Unsigned Shift Right with Shift Left → NO_COVERAGE 2. getHash : Replaced XOR with AND → NO_COVERAGE |
hash ^= (hash >>> 16); |
| 164 |
1
1. getHash : Replaced integer modulus with multiplication → NO_COVERAGE |
hash %= buckets.length; |
| 165 |
4
1. getHash : changed conditional boundary → NO_COVERAGE 2. getHash : Replaced integer multiplication with division → NO_COVERAGE 3. getHash : negated conditional → NO_COVERAGE 4. getHash : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return (hash < 0) ? hash * -1 : hash; |
| 166 | } | |
| 167 | ||
| 168 | /** | |
| 169 | * Gets the current size of the map. | |
| 170 | * The value is computed fresh each time the method is called. | |
| 171 | * | |
| 172 | * @return the current size | |
| 173 | */ | |
| 174 | public int size() { | |
| 175 | int cnt = 0; | |
| 176 | ||
| 177 |
3
1. size : changed conditional boundary → NO_COVERAGE 2. size : Changed increment from 1 to -1 → NO_COVERAGE 3. size : negated conditional → NO_COVERAGE |
for (int i = 0; i < buckets.length; i++) { |
| 178 | synchronized(locks[i]) { | |
| 179 |
1
1. size : Replaced integer addition with subtraction → NO_COVERAGE |
cnt += locks[i].size; |
| 180 | } | |
| 181 | } | |
| 182 |
1
1. size : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return cnt; |
| 183 | } | |
| 184 | ||
| 185 | /** | |
| 186 | * Checks if the size is currently zero. | |
| 187 | * | |
| 188 | * @return true if empty | |
| 189 | */ | |
| 190 | public boolean isEmpty() { | |
| 191 |
3
1. isEmpty : negated conditional → NO_COVERAGE 2. isEmpty : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE 3. isEmpty : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return (size() == 0); |
| 192 | } | |
| 193 | ||
| 194 | /** | |
| 195 | * Gets the value associated with the key. | |
| 196 | * | |
| 197 | * @param key the key to retrieve | |
| 198 | * @return the associated value | |
| 199 | */ | |
| 200 | public V get(final Object key) { | |
| 201 | final int hash = getHash(key); | |
| 202 | ||
| 203 | synchronized (locks[hash]) { | |
| 204 | Node<K, V> n = buckets[hash]; | |
| 205 | ||
| 206 |
1
1. get : negated conditional → NO_COVERAGE |
while (n != null) { |
| 207 |
3
1. get : negated conditional → NO_COVERAGE 2. get : negated conditional → NO_COVERAGE 3. get : negated conditional → NO_COVERAGE |
if (n.key == key || (n.key != null && n.key.equals(key))) { |
| 208 |
1
1. get : mutated return of Object value for org/apache/commons/collections4/map/StaticBucketMap::get to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return n.value; |
| 209 | } | |
| 210 | ||
| 211 | n = n.next; | |
| 212 | } | |
| 213 | } | |
| 214 |
1
1. get : mutated return of Object value for org/apache/commons/collections4/map/StaticBucketMap::get to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return null; |
| 215 | } | |
| 216 | ||
| 217 | /** | |
| 218 | * Checks if the map contains the specified key. | |
| 219 | * | |
| 220 | * @param key the key to check | |
| 221 | * @return true if found | |
| 222 | */ | |
| 223 | public boolean containsKey(final Object key) { | |
| 224 | final int hash = getHash(key); | |
| 225 | ||
| 226 | synchronized (locks[hash]) { | |
| 227 | Node<K, V> n = buckets[hash]; | |
| 228 | ||
| 229 |
1
1. containsKey : negated conditional → NO_COVERAGE |
while (n != null) { |
| 230 |
3
1. containsKey : negated conditional → NO_COVERAGE 2. containsKey : negated conditional → NO_COVERAGE 3. containsKey : negated conditional → NO_COVERAGE |
if (n.key == key || (n.key != null && n.key.equals(key))) { |
| 231 |
1
1. containsKey : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return true; |
| 232 | } | |
| 233 | ||
| 234 | n = n.next; | |
| 235 | } | |
| 236 | } | |
| 237 |
1
1. containsKey : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return false; |
| 238 | } | |
| 239 | ||
| 240 | /** | |
| 241 | * Checks if the map contains the specified value. | |
| 242 | * | |
| 243 | * @param value the value to check | |
| 244 | * @return true if found | |
| 245 | */ | |
| 246 | public boolean containsValue(final Object value) { | |
| 247 |
3
1. containsValue : changed conditional boundary → NO_COVERAGE 2. containsValue : Changed increment from 1 to -1 → NO_COVERAGE 3. containsValue : negated conditional → NO_COVERAGE |
for (int i = 0; i < buckets.length; i++) { |
| 248 | synchronized (locks[i]) { | |
| 249 | Node<K, V> n = buckets[i]; | |
| 250 | ||
| 251 |
1
1. containsValue : negated conditional → NO_COVERAGE |
while (n != null) { |
| 252 |
3
1. containsValue : negated conditional → NO_COVERAGE 2. containsValue : negated conditional → NO_COVERAGE 3. containsValue : negated conditional → NO_COVERAGE |
if (n.value == value || (n.value != null && n.value.equals(value))) { |
| 253 |
1
1. containsValue : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return true; |
| 254 | } | |
| 255 | ||
| 256 | n = n.next; | |
| 257 | } | |
| 258 | } | |
| 259 | } | |
| 260 |
1
1. containsValue : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return false; |
| 261 | } | |
| 262 | ||
| 263 | //----------------------------------------------------------------------- | |
| 264 | /** | |
| 265 | * Puts a new key value mapping into the map. | |
| 266 | * | |
| 267 | * @param key the key to use | |
| 268 | * @param value the value to use | |
| 269 | * @return the previous mapping for the key | |
| 270 | */ | |
| 271 | public V put(final K key, final V value) { | |
| 272 | final int hash = getHash(key); | |
| 273 | ||
| 274 | synchronized (locks[hash]) { | |
| 275 | Node<K, V> n = buckets[hash]; | |
| 276 | ||
| 277 |
1
1. put : negated conditional → NO_COVERAGE |
if (n == null) { |
| 278 | n = new Node<K, V>(); | |
| 279 | n.key = key; | |
| 280 | n.value = value; | |
| 281 | buckets[hash] = n; | |
| 282 |
1
1. put : Replaced integer addition with subtraction → NO_COVERAGE |
locks[hash].size++; |
| 283 |
1
1. put : mutated return of Object value for org/apache/commons/collections4/map/StaticBucketMap::put to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return null; |
| 284 | } | |
| 285 | ||
| 286 | // Set n to the last node in the linked list. Check each key along the way | |
| 287 | // If the key is found, then change the value of that node and return | |
| 288 | // the old value. | |
| 289 |
1
1. put : negated conditional → NO_COVERAGE |
for (Node<K, V> next = n; next != null; next = next.next) { |
| 290 | n = next; | |
| 291 | ||
| 292 |
3
1. put : negated conditional → NO_COVERAGE 2. put : negated conditional → NO_COVERAGE 3. put : negated conditional → NO_COVERAGE |
if (n.key == key || (n.key != null && n.key.equals(key))) { |
| 293 | final V returnVal = n.value; | |
| 294 | n.value = value; | |
| 295 |
1
1. put : mutated return of Object value for org/apache/commons/collections4/map/StaticBucketMap::put to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return returnVal; |
| 296 | } | |
| 297 | } | |
| 298 | ||
| 299 | // The key was not found in the current list of nodes, add it to the end | |
| 300 | // in a new node. | |
| 301 | final Node<K, V> newNode = new Node<K, V>(); | |
| 302 | newNode.key = key; | |
| 303 | newNode.value = value; | |
| 304 | n.next = newNode; | |
| 305 |
1
1. put : Replaced integer addition with subtraction → NO_COVERAGE |
locks[hash].size++; |
| 306 | } | |
| 307 |
1
1. put : mutated return of Object value for org/apache/commons/collections4/map/StaticBucketMap::put to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return null; |
| 308 | } | |
| 309 | ||
| 310 | /** | |
| 311 | * Removes the specified key from the map. | |
| 312 | * | |
| 313 | * @param key the key to remove | |
| 314 | * @return the previous value at this key | |
| 315 | */ | |
| 316 | public V remove(final Object key) { | |
| 317 | final int hash = getHash(key); | |
| 318 | ||
| 319 | synchronized (locks[hash]) { | |
| 320 | Node<K, V> n = buckets[hash]; | |
| 321 | Node<K, V> prev = null; | |
| 322 | ||
| 323 |
1
1. remove : negated conditional → NO_COVERAGE |
while (n != null) { |
| 324 |
3
1. remove : negated conditional → NO_COVERAGE 2. remove : negated conditional → NO_COVERAGE 3. remove : negated conditional → NO_COVERAGE |
if (n.key == key || (n.key != null && n.key.equals(key))) { |
| 325 | // Remove this node from the linked list of nodes. | |
| 326 |
1
1. remove : negated conditional → NO_COVERAGE |
if (null == prev) { |
| 327 | // This node was the head, set the next node to be the new head. | |
| 328 | buckets[hash] = n.next; | |
| 329 | } else { | |
| 330 | // Set the next node of the previous node to be the node after this one. | |
| 331 | prev.next = n.next; | |
| 332 | } | |
| 333 |
1
1. remove : Replaced integer subtraction with addition → NO_COVERAGE |
locks[hash].size--; |
| 334 |
1
1. remove : mutated return of Object value for org/apache/commons/collections4/map/StaticBucketMap::remove to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return n.value; |
| 335 | } | |
| 336 | ||
| 337 | prev = n; | |
| 338 | n = n.next; | |
| 339 | } | |
| 340 | } | |
| 341 |
1
1. remove : mutated return of Object value for org/apache/commons/collections4/map/StaticBucketMap::remove to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return null; |
| 342 | } | |
| 343 | ||
| 344 | //----------------------------------------------------------------------- | |
| 345 | /** | |
| 346 | * Gets the key set. | |
| 347 | * | |
| 348 | * @return the key set | |
| 349 | */ | |
| 350 | public Set<K> keySet() { | |
| 351 |
1
1. keySet : mutated return of Object value for org/apache/commons/collections4/map/StaticBucketMap::keySet to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return new KeySet(); |
| 352 | } | |
| 353 | ||
| 354 | /** | |
| 355 | * Gets the values. | |
| 356 | * | |
| 357 | * @return the values | |
| 358 | */ | |
| 359 | public Collection<V> values() { | |
| 360 |
1
1. values : mutated return of Object value for org/apache/commons/collections4/map/StaticBucketMap::values to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return new Values(); |
| 361 | } | |
| 362 | ||
| 363 | /** | |
| 364 | * Gets the entry set. | |
| 365 | * | |
| 366 | * @return the entry set | |
| 367 | */ | |
| 368 | public Set<Map.Entry<K, V>> entrySet() { | |
| 369 |
1
1. entrySet : mutated return of Object value for org/apache/commons/collections4/map/StaticBucketMap::entrySet to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return new EntrySet(); |
| 370 | } | |
| 371 | ||
| 372 | //----------------------------------------------------------------------- | |
| 373 | /** | |
| 374 | * Puts all the entries from the specified map into this map. | |
| 375 | * This operation is not atomic and may have undesired effects. | |
| 376 | * | |
| 377 | * @param map the map of entries to add | |
| 378 | */ | |
| 379 | public void putAll(final Map<? extends K, ? extends V> map) { | |
| 380 |
1
1. putAll : negated conditional → NO_COVERAGE |
for (final Map.Entry<? extends K, ? extends V> entry : map.entrySet()) { |
| 381 | put(entry.getKey(), entry.getValue()); | |
| 382 | } | |
| 383 | } | |
| 384 | ||
| 385 | /** | |
| 386 | * Clears the map of all entries. | |
| 387 | */ | |
| 388 | public void clear() { | |
| 389 |
3
1. clear : changed conditional boundary → NO_COVERAGE 2. clear : Changed increment from 1 to -1 → NO_COVERAGE 3. clear : negated conditional → NO_COVERAGE |
for (int i = 0; i < buckets.length; i++) { |
| 390 | final Lock lock = locks[i]; | |
| 391 | synchronized (lock) { | |
| 392 | buckets[i] = null; | |
| 393 | lock.size = 0; | |
| 394 | } | |
| 395 | } | |
| 396 | } | |
| 397 | ||
| 398 | /** | |
| 399 | * Compares this map to another, as per the Map specification. | |
| 400 | * | |
| 401 | * @param obj the object to compare to | |
| 402 | * @return true if equal | |
| 403 | */ | |
| 404 | @Override | |
| 405 | public boolean equals(final Object obj) { | |
| 406 |
1
1. equals : negated conditional → NO_COVERAGE |
if (obj == this) { |
| 407 |
1
1. equals : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return true; |
| 408 | } | |
| 409 |
1
1. equals : negated conditional → NO_COVERAGE |
if (obj instanceof Map<?, ?> == false) { |
| 410 |
1
1. equals : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return false; |
| 411 | } | |
| 412 | final Map<?, ?> other = (Map<?, ?>) obj; | |
| 413 |
1
1. equals : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return entrySet().equals(other.entrySet()); |
| 414 | } | |
| 415 | ||
| 416 | /** | |
| 417 | * Gets the hash code, as per the Map specification. | |
| 418 | * | |
| 419 | * @return the hash code | |
| 420 | */ | |
| 421 | @Override | |
| 422 | public int hashCode() { | |
| 423 | int hashCode = 0; | |
| 424 | ||
| 425 |
3
1. hashCode : changed conditional boundary → NO_COVERAGE 2. hashCode : Changed increment from 1 to -1 → NO_COVERAGE 3. hashCode : negated conditional → NO_COVERAGE |
for (int i = 0; i < buckets.length; i++) { |
| 426 | synchronized (locks[i]) { | |
| 427 | Node<K, V> n = buckets[i]; | |
| 428 | ||
| 429 |
1
1. hashCode : negated conditional → NO_COVERAGE |
while (n != null) { |
| 430 |
1
1. hashCode : Replaced integer addition with subtraction → NO_COVERAGE |
hashCode += n.hashCode(); |
| 431 | n = n.next; | |
| 432 | } | |
| 433 | } | |
| 434 | } | |
| 435 |
1
1. hashCode : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return hashCode; |
| 436 | } | |
| 437 | ||
| 438 | //----------------------------------------------------------------------- | |
| 439 | /** | |
| 440 | * The Map.Entry for the StaticBucketMap. | |
| 441 | */ | |
| 442 | private static final class Node<K, V> implements Map.Entry<K, V>, KeyValue<K, V> { | |
| 443 | protected K key; | |
| 444 | protected V value; | |
| 445 | protected Node<K, V> next; | |
| 446 | ||
| 447 | public K getKey() { | |
| 448 |
1
1. getKey : mutated return of Object value for org/apache/commons/collections4/map/StaticBucketMap$Node::getKey to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return key; |
| 449 | } | |
| 450 | ||
| 451 | public V getValue() { | |
| 452 |
1
1. getValue : mutated return of Object value for org/apache/commons/collections4/map/StaticBucketMap$Node::getValue to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return value; |
| 453 | } | |
| 454 | ||
| 455 | @Override | |
| 456 | public int hashCode() { | |
| 457 |
3
1. hashCode : Replaced XOR with AND → NO_COVERAGE 2. hashCode : negated conditional → NO_COVERAGE 3. hashCode : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return ((key == null ? 0 : key.hashCode()) ^ |
| 458 |
1
1. hashCode : negated conditional → NO_COVERAGE |
(value == null ? 0 : value.hashCode())); |
| 459 | } | |
| 460 | ||
| 461 | @Override | |
| 462 | public boolean equals(final Object obj) { | |
| 463 |
1
1. equals : negated conditional → NO_COVERAGE |
if (obj == this) { |
| 464 |
1
1. equals : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return true; |
| 465 | } | |
| 466 |
1
1. equals : negated conditional → NO_COVERAGE |
if (obj instanceof Map.Entry<?, ?> == false) { |
| 467 |
1
1. equals : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return false; |
| 468 | } | |
| 469 | ||
| 470 | final Map.Entry<?, ?> e2 = (Map.Entry<?, ?>) obj; | |
| 471 |
2
1. equals : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE 2. equals : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return ( |
| 472 |
3
1. equals : negated conditional → NO_COVERAGE 2. equals : negated conditional → NO_COVERAGE 3. equals : negated conditional → NO_COVERAGE |
(key == null ? e2.getKey() == null : key.equals(e2.getKey())) && |
| 473 |
3
1. equals : negated conditional → NO_COVERAGE 2. equals : negated conditional → NO_COVERAGE 3. equals : negated conditional → NO_COVERAGE |
(value == null ? e2.getValue() == null : value.equals(e2.getValue()))); |
| 474 | } | |
| 475 | ||
| 476 | public V setValue(final V obj) { | |
| 477 | final V retVal = value; | |
| 478 | value = obj; | |
| 479 |
1
1. setValue : mutated return of Object value for org/apache/commons/collections4/map/StaticBucketMap$Node::setValue to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return retVal; |
| 480 | } | |
| 481 | } | |
| 482 | ||
| 483 | /** | |
| 484 | * The lock object, which also includes a count of the nodes in this lock. | |
| 485 | */ | |
| 486 | private final static class Lock { | |
| 487 | public int size; | |
| 488 | } | |
| 489 | ||
| 490 | //----------------------------------------------------------------------- | |
| 491 | private class BaseIterator { | |
| 492 | private final ArrayList<Map.Entry<K, V>> current = new ArrayList<Map.Entry<K,V>>(); | |
| 493 | private int bucket; | |
| 494 | private Map.Entry<K, V> last; | |
| 495 | ||
| 496 | public boolean hasNext() { | |
| 497 |
2
1. hasNext : changed conditional boundary → NO_COVERAGE 2. hasNext : negated conditional → NO_COVERAGE |
if (current.size() > 0) { |
| 498 |
1
1. hasNext : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return true; |
| 499 | } | |
| 500 |
2
1. hasNext : changed conditional boundary → NO_COVERAGE 2. hasNext : negated conditional → NO_COVERAGE |
while (bucket < buckets.length) { |
| 501 | synchronized (locks[bucket]) { | |
| 502 | Node<K, V> n = buckets[bucket]; | |
| 503 |
1
1. hasNext : negated conditional → NO_COVERAGE |
while (n != null) { |
| 504 | current.add(n); | |
| 505 | n = n.next; | |
| 506 | } | |
| 507 |
1
1. hasNext : Replaced integer addition with subtraction → NO_COVERAGE |
bucket++; |
| 508 |
2
1. hasNext : changed conditional boundary → NO_COVERAGE 2. hasNext : negated conditional → NO_COVERAGE |
if (current.size() > 0) { |
| 509 |
1
1. hasNext : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return true; |
| 510 | } | |
| 511 | } | |
| 512 | } | |
| 513 |
1
1. hasNext : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return false; |
| 514 | } | |
| 515 | ||
| 516 | protected Map.Entry<K, V> nextEntry() { | |
| 517 |
1
1. nextEntry : negated conditional → NO_COVERAGE |
if (!hasNext()) { |
| 518 | throw new NoSuchElementException(); | |
| 519 | } | |
| 520 |
1
1. nextEntry : Replaced integer subtraction with addition → NO_COVERAGE |
last = current.remove(current.size() - 1); |
| 521 |
1
1. nextEntry : mutated return of Object value for org/apache/commons/collections4/map/StaticBucketMap$BaseIterator::nextEntry to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return last; |
| 522 | } | |
| 523 | ||
| 524 | public void remove() { | |
| 525 |
1
1. remove : negated conditional → NO_COVERAGE |
if (last == null) { |
| 526 | throw new IllegalStateException(); | |
| 527 | } | |
| 528 | StaticBucketMap.this.remove(last.getKey()); | |
| 529 | last = null; | |
| 530 | } | |
| 531 | } | |
| 532 | ||
| 533 | private class EntryIterator extends BaseIterator implements Iterator<Map.Entry<K, V>> { | |
| 534 | ||
| 535 | public Map.Entry<K, V> next() { | |
| 536 |
1
1. next : mutated return of Object value for org/apache/commons/collections4/map/StaticBucketMap$EntryIterator::next to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return nextEntry(); |
| 537 | } | |
| 538 | ||
| 539 | } | |
| 540 | ||
| 541 | private class ValueIterator extends BaseIterator implements Iterator<V> { | |
| 542 | ||
| 543 | public V next() { | |
| 544 |
1
1. next : mutated return of Object value for org/apache/commons/collections4/map/StaticBucketMap$ValueIterator::next to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return nextEntry().getValue(); |
| 545 | } | |
| 546 | ||
| 547 | } | |
| 548 | ||
| 549 | private class KeyIterator extends BaseIterator implements Iterator<K> { | |
| 550 | ||
| 551 | public K next() { | |
| 552 |
1
1. next : mutated return of Object value for org/apache/commons/collections4/map/StaticBucketMap$KeyIterator::next to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return nextEntry().getKey(); |
| 553 | } | |
| 554 | ||
| 555 | } | |
| 556 | ||
| 557 | private class EntrySet extends AbstractSet<Map.Entry<K, V>> { | |
| 558 | ||
| 559 | @Override | |
| 560 | public int size() { | |
| 561 |
1
1. size : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return StaticBucketMap.this.size(); |
| 562 | } | |
| 563 | ||
| 564 | @Override | |
| 565 | public void clear() { | |
| 566 |
1
1. clear : removed call to org/apache/commons/collections4/map/StaticBucketMap::clear → NO_COVERAGE |
StaticBucketMap.this.clear(); |
| 567 | } | |
| 568 | ||
| 569 | @Override | |
| 570 | public Iterator<Map.Entry<K, V>> iterator() { | |
| 571 |
1
1. iterator : mutated return of Object value for org/apache/commons/collections4/map/StaticBucketMap$EntrySet::iterator to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return new EntryIterator(); |
| 572 | } | |
| 573 | ||
| 574 | @Override | |
| 575 | public boolean contains(final Object obj) { | |
| 576 | final Map.Entry<?, ?> entry = (Map.Entry<?, ?>) obj; | |
| 577 | final int hash = getHash(entry.getKey()); | |
| 578 | synchronized (locks[hash]) { | |
| 579 |
1
1. contains : negated conditional → NO_COVERAGE |
for (Node<K, V> n = buckets[hash]; n != null; n = n.next) { |
| 580 |
1
1. contains : negated conditional → NO_COVERAGE |
if (n.equals(entry)) { |
| 581 |
1
1. contains : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return true; |
| 582 | } | |
| 583 | } | |
| 584 | } | |
| 585 |
1
1. contains : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return false; |
| 586 | } | |
| 587 | ||
| 588 | @Override | |
| 589 | public boolean remove(final Object obj) { | |
| 590 |
1
1. remove : negated conditional → NO_COVERAGE |
if (obj instanceof Map.Entry<?, ?> == false) { |
| 591 |
1
1. remove : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return false; |
| 592 | } | |
| 593 | final Map.Entry<?, ?> entry = (Map.Entry<?, ?>) obj; | |
| 594 | final int hash = getHash(entry.getKey()); | |
| 595 | synchronized (locks[hash]) { | |
| 596 |
1
1. remove : negated conditional → NO_COVERAGE |
for (Node<K, V> n = buckets[hash]; n != null; n = n.next) { |
| 597 |
1
1. remove : negated conditional → NO_COVERAGE |
if (n.equals(entry)) { |
| 598 | StaticBucketMap.this.remove(n.getKey()); | |
| 599 |
1
1. remove : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return true; |
| 600 | } | |
| 601 | } | |
| 602 | } | |
| 603 |
1
1. remove : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return false; |
| 604 | } | |
| 605 | ||
| 606 | } | |
| 607 | ||
| 608 | private class KeySet extends AbstractSet<K> { | |
| 609 | ||
| 610 | @Override | |
| 611 | public int size() { | |
| 612 |
1
1. size : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return StaticBucketMap.this.size(); |
| 613 | } | |
| 614 | ||
| 615 | @Override | |
| 616 | public void clear() { | |
| 617 |
1
1. clear : removed call to org/apache/commons/collections4/map/StaticBucketMap::clear → NO_COVERAGE |
StaticBucketMap.this.clear(); |
| 618 | } | |
| 619 | ||
| 620 | @Override | |
| 621 | public Iterator<K> iterator() { | |
| 622 |
1
1. iterator : mutated return of Object value for org/apache/commons/collections4/map/StaticBucketMap$KeySet::iterator to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return new KeyIterator(); |
| 623 | } | |
| 624 | ||
| 625 | @Override | |
| 626 | public boolean contains(final Object obj) { | |
| 627 |
1
1. contains : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return StaticBucketMap.this.containsKey(obj); |
| 628 | } | |
| 629 | ||
| 630 | @Override | |
| 631 | public boolean remove(final Object obj) { | |
| 632 | final int hash = getHash(obj); | |
| 633 | synchronized (locks[hash]) { | |
| 634 |
1
1. remove : negated conditional → NO_COVERAGE |
for (Node<K, V> n = buckets[hash]; n != null; n = n.next) { |
| 635 | final Object k = n.getKey(); | |
| 636 |
3
1. remove : negated conditional → NO_COVERAGE 2. remove : negated conditional → NO_COVERAGE 3. remove : negated conditional → NO_COVERAGE |
if ((k == obj) || ((k != null) && k.equals(obj))) { |
| 637 | StaticBucketMap.this.remove(k); | |
| 638 |
1
1. remove : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return true; |
| 639 | } | |
| 640 | } | |
| 641 | } | |
| 642 |
1
1. remove : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return false; |
| 643 | } | |
| 644 | ||
| 645 | } | |
| 646 | ||
| 647 | ||
| 648 | private class Values extends AbstractCollection<V> { | |
| 649 | ||
| 650 | @Override | |
| 651 | public int size() { | |
| 652 |
1
1. size : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return StaticBucketMap.this.size(); |
| 653 | } | |
| 654 | ||
| 655 | @Override | |
| 656 | public void clear() { | |
| 657 |
1
1. clear : removed call to org/apache/commons/collections4/map/StaticBucketMap::clear → NO_COVERAGE |
StaticBucketMap.this.clear(); |
| 658 | } | |
| 659 | ||
| 660 | @Override | |
| 661 | public Iterator<V> iterator() { | |
| 662 |
1
1. iterator : mutated return of Object value for org/apache/commons/collections4/map/StaticBucketMap$Values::iterator to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return new ValueIterator(); |
| 663 | } | |
| 664 | ||
| 665 | } | |
| 666 | ||
| 667 | /** | |
| 668 | * Prevents any operations from occurring on this map while the | |
| 669 | * given {@link Runnable} executes. This method can be used, for | |
| 670 | * instance, to execute a bulk operation atomically: | |
| 671 | * | |
| 672 | *
 | |
| 673 | * staticBucketMapInstance.atomic(new Runnable() { | |
| 674 | * public void run() { | |
| 675 | * staticBucketMapInstance.putAll(map); | |
| 676 | * } | |
| 677 | * }); | |
| 678 | *
 | |
| 679 | * | |
| 680 | * It can also be used if you need a reliable iterator: | |
| 681 | * | |
| 682 | *
 | |
| 683 | * staticBucketMapInstance.atomic(new Runnable() { | |
| 684 | * public void run() { | |
| 685 | * Iterator iterator = staticBucketMapInstance.iterator(); | |
| 686 | * while (iterator.hasNext()) { | |
| 687 | * foo(iterator.next(); | |
| 688 | * } | |
| 689 | * } | |
| 690 | * }); | |
| 691 | *
 | |
| 692 | * | |
| 693 | * Implementation note: This method requires a lot of time | |
| 694 | * and a ton of stack space. Essentially a recursive algorithm is used | |
| 695 | * to enter each bucket's monitor. If you have twenty thousand buckets | |
| 696 | * in your map, then the recursive method will be invoked twenty thousand | |
| 697 | * times. You have been warned. | |
| 698 | * | |
| 699 | * @param r the code to execute atomically | |
| 700 | */ | |
| 701 | public void atomic(final Runnable r) { | |
| 702 |
1
1. atomic : negated conditional → NO_COVERAGE |
if (r == null) { |
| 703 | throw new NullPointerException(); | |
| 704 | } | |
| 705 |
1
1. atomic : removed call to org/apache/commons/collections4/map/StaticBucketMap::atomic → NO_COVERAGE |
atomic(r, 0); |
| 706 | } | |
| 707 | ||
| 708 | private void atomic(final Runnable r, final int bucket) { | |
| 709 |
2
1. atomic : changed conditional boundary → NO_COVERAGE 2. atomic : negated conditional → NO_COVERAGE |
if (bucket >= buckets.length) { |
| 710 |
1
1. atomic : removed call to java/lang/Runnable::run → NO_COVERAGE |
r.run(); |
| 711 | return; | |
| 712 | } | |
| 713 | synchronized (locks[bucket]) { | |
| 714 |
2
1. atomic : Replaced integer addition with subtraction → NO_COVERAGE 2. atomic : removed call to org/apache/commons/collections4/map/StaticBucketMap::atomic → NO_COVERAGE |
atomic(r, bucket + 1); |
| 715 | } | |
| 716 | } | |
| 717 | ||
| 718 | } | |
Mutations | ||
| 127 |
1.1 2.2 |
|
| 128 |
1.1 |
|
| 134 |
1.1 2.2 3.3 |
|
| 154 |
1.1 |
|
| 155 |
1.1 |
|
| 158 |
1.1 2.2 3.3 |
|
| 159 |
1.1 2.2 |
|
| 160 |
1.1 2.2 |
|
| 161 |
1.1 2.2 |
|
| 162 |
1.1 2.2 3.3 |
|
| 163 |
1.1 2.2 |
|
| 164 |
1.1 |
|
| 165 |
1.1 2.2 3.3 4.4 |
|
| 177 |
1.1 2.2 3.3 |
|
| 179 |
1.1 |
|
| 182 |
1.1 |
|
| 191 |
1.1 2.2 3.3 |
|
| 206 |
1.1 |
|
| 207 |
1.1 2.2 3.3 |
|
| 208 |
1.1 |
|
| 214 |
1.1 |
|
| 229 |
1.1 |
|
| 230 |
1.1 2.2 3.3 |
|
| 231 |
1.1 |
|
| 237 |
1.1 |
|
| 247 |
1.1 2.2 3.3 |
|
| 251 |
1.1 |
|
| 252 |
1.1 2.2 3.3 |
|
| 253 |
1.1 |
|
| 260 |
1.1 |
|
| 277 |
1.1 |
|
| 282 |
1.1 |
|
| 283 |
1.1 |
|
| 289 |
1.1 |
|
| 292 |
1.1 2.2 3.3 |
|
| 295 |
1.1 |
|
| 305 |
1.1 |
|
| 307 |
1.1 |
|
| 323 |
1.1 |
|
| 324 |
1.1 2.2 3.3 |
|
| 326 |
1.1 |
|
| 333 |
1.1 |
|
| 334 |
1.1 |
|
| 341 |
1.1 |
|
| 351 |
1.1 |
|
| 360 |
1.1 |
|
| 369 |
1.1 |
|
| 380 |
1.1 |
|
| 389 |
1.1 2.2 3.3 |
|
| 406 |
1.1 |
|
| 407 |
1.1 |
|
| 409 |
1.1 |
|
| 410 |
1.1 |
|
| 413 |
1.1 |
|
| 425 |
1.1 2.2 3.3 |
|
| 429 |
1.1 |
|
| 430 |
1.1 |
|
| 435 |
1.1 |
|
| 448 |
1.1 |
|
| 452 |
1.1 |
|
| 457 |
1.1 2.2 3.3 |
|
| 458 |
1.1 |
|
| 463 |
1.1 |
|
| 464 |
1.1 |
|
| 466 |
1.1 |
|
| 467 |
1.1 |
|
| 471 |
1.1 2.2 |
|
| 472 |
1.1 2.2 3.3 |
|
| 473 |
1.1 2.2 3.3 |
|
| 479 |
1.1 |
|
| 497 |
1.1 2.2 |
|
| 498 |
1.1 |
|
| 500 |
1.1 2.2 |
|
| 503 |
1.1 |
|
| 507 |
1.1 |
|
| 508 |
1.1 2.2 |
|
| 509 |
1.1 |
|
| 513 |
1.1 |
|
| 517 |
1.1 |
|
| 520 |
1.1 |
|
| 521 |
1.1 |
|
| 525 |
1.1 |
|
| 536 |
1.1 |
|
| 544 |
1.1 |
|
| 552 |
1.1 |
|
| 561 |
1.1 |
|
| 566 |
1.1 |
|
| 571 |
1.1 |
|
| 579 |
1.1 |
|
| 580 |
1.1 |
|
| 581 |
1.1 |
|
| 585 |
1.1 |
|
| 590 |
1.1 |
|
| 591 |
1.1 |
|
| 596 |
1.1 |
|
| 597 |
1.1 |
|
| 599 |
1.1 |
|
| 603 |
1.1 |
|
| 612 |
1.1 |
|
| 617 |
1.1 |
|
| 622 |
1.1 |
|
| 627 |
1.1 |
|
| 634 |
1.1 |
|
| 636 |
1.1 2.2 3.3 |
|
| 638 |
1.1 |
|
| 642 |
1.1 |
|
| 652 |
1.1 |
|
| 657 |
1.1 |
|
| 662 |
1.1 |
|
| 702 |
1.1 |
|
| 705 |
1.1 |
|
| 709 |
1.1 2.2 |
|
| 710 |
1.1 |
|
| 714 |
1.1 2.2 |


It's release Tuesday again so we're pushing out incremental patches to our libraries. As usual, the change log is below for those who like to stay up to date on all the details. As we approach our Release Candidate, some of our libraries are available in a "pre-release" form now too.
Pre-releases
Several of Aurelia's latest library updates are marked as "Pre-release" with a "beta.2" version designation. These libraries contain breaking changes which will be part of the upcoming Release Candidate happening in June. You won't get these breaking change versions by installing via jspm or npm. They are only available through Github releases for now. This is to ensure that there are no surprises for you until you are absolutely ready. If you desire, you can begin planning now. Below is a list of the affected libraries, along with a summary of the changes involved.
aurelia-templating
- The pre-release version of templating contains our new Shadow DOM v1 Slot implementation. This replaces the previous
<content>
-based, v0 mechanism. - Since we have a dedicated
aurelia-testing
library, the test helpers forTemplatingEngine#createControllerForUnitTest
andTemplatingEngine#createViewModelForUnitTest
have been removed. These scenarios our now covered by theComponentTester
inaurelia-testing
.
aurelia-templating-resources
- Now that we have the new Slots mechanism in templating, there's no longer a need for the
replaceable
custom attribute. This attribute was used to mark arbitrary parts of an element's template as replaceable by the consumer. This can now be accomplished with Shadow DOM Slot Fallback Content. The part replacement mechanism is still in place in templating though, since it's needed for replacing the template controller templates, such asif
,repeat
, etc. For these scenarios, you only need add apart
attribute to template controller's element. - Since we have a dedicated
aurelia-testing
library, theview-spy
andcompile-spy
custom attributes have been moved out ofaurelia-templating-resources
and into theaurelia-testing
library.
Notables
- The Router Lifecycle now works with both Promises and Rx Observables.
- TypeScript Skeletons have been updated to use the new Typings implementation.
- Skeleton Karma configurations have been updated to work OOTB with more complex project structures and with our new
aurelia-testing
library.
Change Log
aurelia-router 1.0.0-beta.1.2.4
Bug Fixes
- router:
- change refresh navigation to check config for static href not nav model href ( 24de2927 )
Features
- router:
- observables in lifecycle ( 337d95ab )
aurelia-templating 1.0.0-beta.2.0.1
Features
- view-resources: enable arbitrary named value resolution ( 4f85ecf9 )
Bug Fixes
templating-resources 1.0.0-beta.2.0.0
Breaking Changes
- This commit removes the replaceable custom attribute. Now that Shadow DOM v1 Slots are implemented there is no more need for this. Replaceable parts for template controllers are still supported for if, repeat, etc. via the part attribute.
( 6ac5731e )
- The compile-spy and view-spy custom attributes have been removed from this library. They are now part of the aurelia-testing library.
( 72c4433f )
aurelia-validatejs 0.4.0
Bug Fixes
- bindings: use binding engine to get target (#70)
- dts: make key and descriptor optional (#64)
aurelia-testing 0.3.0
Bug Fixes
Features
- spies: add view-spy and compile-spy ( fc81850f )
aurelia-ui-virtualization 0.4.6
Bug Fixes
- array-virtual-repeat-strategy: - optimize in-place mutation revised
aurelia-skeleton-navigation 1.0.0-beta.1.2.6
Bug Fixes
- TypeScript projects updated to new typings system
- All projects improved source map generation
- All projects fix Karma configuration for use with new testing library
Features
- ES2016 project updated with improved export task


unsp
otted
About
(current)
Companies
(current)
Sign up
(current)
Login
(current)
Contact us
(current)
CONTACT US
Leave Feedback
Email
Name
Message
submit
COPYRIGHT © 2021 UNSPORTTED. ALL RIGHTS RESERVED.


List of all members.
Public Member Functions |
|
| xajaxControlContainer ($sTag, $aConfiguration=array()) |
|
| getClass () |
|
| getContentClass () |
|
| clearChildren () |
|
| addChild (&$objControl) |
|
| addChildren (&$aChildren) |
|
| printHTML ($sIndent='') |
|
| _printChildren ($sIndent='') |
Public Attributes |
|
| $aChildren |
|
| $sChildClass |
Detailed Description
Definition at line 432 of file xajaxControl.inc.php.
The documentation for this class was generated from the following file:


@import gospeak.core.domain.Group
@import gospeak.web.api.ui.routes.SuggestCtrl
@import gospeak.web.domain.Breadcrumb
@import gospeak.web.pages.partials.form.html._
@import gospeak.web.pages.user.partials.html.container
@import gospeak.web.pages.user.routes.UserCtrl
@import gospeak.web.pages.orga.routes.GroupCtrl
@import gospeak.web.utils.UserReq
@(form: Form[Group.Data])(b: Breadcrumb)(implicit req: UserReq[AnyContent])
@container("New group", b)() {
@if(req.conf.meetup.isEnabled) {
Import from meetup
@formBtn(GroupCtrl.meetupConnect(), List("class" -> "btn btn-primary btn-lg")) {Import group}
}
Create your group
@formElt(form, GroupCtrl.doCreate()) {
@fieldHorizontal(form("name"), List("label" -> "Name", "help" -> "Name of the group")) { (field, args) =>
@inputText(field, List("placeholder" -> "ex: Scala coding talks", "autofocus" -> "true") ++ args)
}
@fieldHorizontal(form("location"), List("label" -> "Location", "help" -> "The city of your group, it will be used to show nearest groups to users")) { (field, args) =>
@inputGMapPlace(field, args)
}
@fieldHorizontal(form("description"), List("label" -> "Description", "help" -> "Describe your group, you should make people want to participate")) { (field, args) =>
@inputMarkdown(field, args)
}
@fieldHorizontal(form("tags"), List("label" -> "Tags", "help" -> "Main topics of your group")) { (field, args) =>
@inputTags(field, args ++ List("remote" -> SuggestCtrl.suggestTags().toString))
}
@fieldHorizontal(form("contact"), List("label" -> "Contact email", "help" -> "If you have an email for the hole group")) { (field, args) =>
@inputEmail(field, List("placeholder" -> "ex: contact@my-group.com"))
}
@fieldHorizontal(form("website"), List("label" -> "Website")) { (field, args) =>
@inputUrl(field, List("placeholder" -> "ex: https://my-group.com"))
}
@fieldHorizontal(form("slug"), List("label" -> "Slug", "help" -> "Reference for your group (in urls for example)")) { (field, args) =>
@inputText(field, List("placeholder" -> "Group slug", "slug-for" -> form("name").id) ++ args)
}
@socialAccountsFields(form("social"))
@btnCancel(UserCtrl.index())
@btnSubmit("Create")
}
}()


{% load manage_template_tags %}
From this form you can grant other users permission to work on this module. If a user is added to the list of collaborators, they will be granted View-access to the draft of this module. Optionally, if you check the 'Can Edit' option, the user will be allowed to make edits to this module, it's child lessons and sections, and their content.


Home
Recommendations
Project Details
Resources
Data:
Deep Fashion Dataset
Rent the Runway
Inspiration:
Image Based Fashion Product Recommendation with Deep Learning
Building a Recommendation System Using Neural Network Embeddings
Clothing Recommender System
Libraries:
fast.ai
Annoy (Approximate Nearest Neighbors Oh Yeah)


{# For the Profile's Edit view. This is the one used to change basic user details such as e-mail. #} {% extends 'user/base.html' %} {% block body %}


"Adapt what is useful, reject what is useless, and add what is specifically your own."– Bruce Lee.
“A wise man can learn more from a foolish question than a fool can learn from a wise answer.”– Bruce Lee.
“The key to immortality is first living a life worth remembering.”– Bruce Lee.
“Take things as they are. Punch when you have to punch. Kick when you have to kick.”– Bruce Lee.
 Bruce Lee.


You Can Set Up A
WordPress Dev Environment
on
Windows
Who am I and why am I up here?
- 40+ years in IT
- Beginning with software and now returning to it
- Freelance web developer and business owner
- Started with Microsoft -
Why change now?
You may be familiar with ...
Goal for Session
- Create environment on a Windows 10 box that
- Offers familiar Windows UI
- Robust toolset
- Duplicatable
- Low cost
- Includes features such as:
- Local build & testing
- Smart file editing
- FTP connection to hosting server
- Deployment
This is What I Have in Mind
- DesktopServer
- Sublime Text 3
- FileZilla FTP Client
- SourceTree GUI Git Interface
- WP Migrate DB Pro painfree migration
- Bitbucket Distributed Version Control / Backup
This is What I Have in Mind
Let's Jump In
Note to self:
Talk about the tools
My LAMP Stack
Editor Preference
-
Sublime Text 3 - Eval Free / Buy $70
FTP Client - Really?
- Yes - I insist!
- FileZilla - Just get it
- No editing files using the dashboard editor
DesktopServer
- "Buy" Free Version
- Download & Install
- Windows Installs to c:\xampplite
Setup DesktopServer
Build First Site - WordPress 5 Minute Install
- Start DesktopServer
- Create Shortcut => c:\xampplite\DesktopServer.exe
- Run as Administrator
- Port 80 Conflict => Skype?
Code Editing / Development
- Open Local Project Folder in Sublime Text
- Save Sublime Project
- Edit PHP and CSS as needed - Save
- Create files as needed - Save
- PHP aware - syntax highlighting
Test Changes
- Save files!
- Switch to Browser
- Refresh
- Repeat ad nauseam
A Little Deployment Anyone? Basic Assumptions
- New WordPress Installation Exists on Host
- Plugin WP Migrate DB Pro Installed and Activated
on local and remote sites
- Migrate DB Pro handles the handshake between installations
- Authenticates connection
- Uploads DB to remote server
- Performs Search & Replace on db table entries
- Connect to remote site via FTP
Deployment Magic with
WP Migrate DB
Dull FTP Upload of WP-CONTENT
- FileZilla
- SFTP/FTP connection to remote site
- Drag WP-CONTENT from local to remote
Remainder of Git process
left as an exercise for the viewer ;-)
Sigh
Lather · Rinse · Repeat
Time For A Little Control
- SourceTree
- Create a local repository
- Add your project folder
Remainder of Git process
left as an exercise for the viewer ;-)
Lingering Thoughts
anyone?
anyone?


This free service allows software developers to scan websites for Subresource Integrity (SRI) hashes.
JavaScript and CSS stylesheet assets can be protected with cryptographic hashes to prevent tampering with these assets on their way to the website visitors.
SRI hashes can protect visitors from browser exploits, denial of service attacks, cookie stealing and other harmful actions.
Website developers tend to trust Content Delivery Networks (CDN) to host some of their website assets such as JavaScript and CSS. Third-party CDN services such as Google, jsdelivr or cdnjs, offer to host assets close to the website visitors.
The benefit of using CDNs to visitor experience is great. Providers host the assets from datacenters around the globe with good network connections. As a result, webpages load quicker into the visitors' browsers. Also, the uptime of a typical CDN is close to 100%.
However, there is a lot of trust involved here. JavaScript and CSS stylesheets can be abused to exploit browsers DDoS websites, and steal cookies from the visitors. Software developers assume these third-parties will never replace the hosted assets with something malicious. Unfortunately, this is not always the case.
The Great Firewall of China has injected extra code into JavaScript assets on Baidu's CDNs. The additional snippet was instructing the browser of unsuspecting website visitors to DDoS GitHub servers.
Another example is from 2014, where jQuery's CDN was compromised according to RiskIQ. Although jQuery did not confirm the unauthorized modification of the hosted library, the case highlights the problem with blind trust in these third-parties.
The solution to confirm the integrity of third-party assets with cryptographic hash named Subresource Integrity (SRI) hash. This hash format has been standardized by W3C and function similarly to the well-known MD5 or SHA hashes.
To protect third-party hosted assets is relatively straightforward. First, we need to generate the SRI hash of the asset. Then we append calculated SRI values to the asset tags like the following:
<script src=https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js
integrity="sha256-ImQvICV38LovIsvla2zykaCTdEh1Z801Y+DSop91wMU=
sha384-8gBf6Y4YYq7Jx97PIqmTwLPin4hxIzQw5aDmUg/DDhul9fFpbbLcLh3nTIIDJKhx
sha512-AFwxAkWdvxRd9qhYYp1qbeRZj6/iTNmJ2GFwcxsMOzwwTaRwz2a/2TX225Ebcj3whXte1WGQb38cXE5j7ZQw3g=="
crossorigin=anonymous></script>
When the website visitor's browser downloads the remote asset from the CDN, the browser will verify the hash listed in the tags.
If someone has tampered with the asset either at the CDN provider or along the way on the network, the browser will not execute the JavaScript or CSS stylesheet.
SRI is a great addition to website security. Malicious JavaScript and CSS code can be dangerous to website visitors. SRI hashes adds an additional layer of protection to the integrity of these assets, especially when they are hosted at CDNs.
The reason sritest.io was born is to foster the implementation of SRI. I encourage every website developer to consider adding SRI hashes to each supported asset.
I am a security consultant based in the United Kingdom.
I have experience with architectural design, policy- and risk management, and incident management. I have also been dealing with application security, vulnerability management, and event log management for a long time. I love to develop software in my free time.
Check out my blog for more interesting projects.


If you are a customer having lots of wastepaper and want to recycle them, then register with us and we will collect the paper and earn credits.
Customer SignInIf you are a paper recycling company looking for paper raw materials, then register with us and provide us your requirement.
Consumer SignIn


| One | Two |
|---|---|
| Three (missing left border) | |
| (missing left border) | |
| (missing left border) |
| Name | Type | Files | Languages | ||
|---|---|---|---|---|---|
| Ruby | JavaScript | Python | |||
| Ongoing Sum | Small Exercise | 2 |
| One | Two |
|---|---|
| Three (missing left border) | |
| (missing left border) | |
| (missing left border) |
| Name | Type | Files | Languages | ||
|---|---|---|---|---|---|
| Ruby | JavaScript | Python | |||
| Ongoing Sum | Small Exercise | 2 |


The summary will tell you
- current leaseholder's name and address
- what was paid for the property – you won't get this if it was bought before April 2000, if they paid less than £100, or if HM Land Registry have agreed not to record the price
- if there is a mortgage on the property, the lender's name and address
This information can change if we receive an application. This service is unable to tell you whether or not there is an application pending with the Land Registry.


The Free/Busy feature allows users to view each other’s calendars for efficiently scheduling meetings. You can set up free/busy scheduling across ZCS and Microsoft Exchange servers.
ZCS can query the free/busy schedules of users on Microsoft Exchange 2003/2007/2010 servers and also can propagate the free/busy schedules of Zmail users to the Exchange server.
To set free/busy interoperability, the Exchange systems must be set up as correctly. See the ZCS administration guide, Managing ZCS Configuration chapter for Exchange setup requirements.
In addition, the ZCS global config, Domain, COS and Account settings must be configured.
Procedure
As a global configuration, go to Configure>Global Settings or for a domain configuration go to Configure>Domains, select the domain and in the gear icon, click Edit.
Click Free/Busy Interop in the Navigation pane.
In the Microsoft Exchange Server URL text box type the Web interface URL to Exchange.
In the Microsoft Exchange Authorization Scheme menu select either Basic or Form.
Basic is authentication to Exchange via HTTP basic authentication.
Form is authentication to Exchange as HTML form based authentication.
In the Microsoft Exchange Server Type menu select either WebDAV or ews.
Select WebDAV to support free/busy with Exchange 2003 or Exchange 2007.
Select ews (Exchange Web Service) to support free/busy with Exchange 2010, SP1.
In the Microsoft Exchange User Name and User Password. text boxes, type the name of the account in Active Directory and password that has access to the public folders.
In the O and OU used in legacyExchangeDN attribute text box enter the O and OU values that are in the legacyExchangeDN attribute for Exchange. These values correspond to the domain attribute zmailFreebusyExchangeUserOrg. When set at the global level, this applies to all accounts talking to Exchange.
To find these values on the Exchange server, you can run the Exchange ADSI Edit tool and search the legacyExchangeDN attribute for o= , ou= , and cn= values.
To check that your settings are correct before you save the configuration, click Check the settings.
If the configuration is correct, click Save. If the configuration is incorrect, click Clear the Settings to clear all the fields and configure the settings again.
Go to Configure > Class of Service and select the COS to set up the free/busy legacy Exchange DN attribute.
Select the Advanced page, and in the Free/Busy Interop section
In the O and OU used in legacyExchangeDN attribute text box enter the O and OU used in the legacyExchangeDN attribute (i.e. legacyExchangeDN : / o=First Organization/ ou=First Administrative Group)
Click Save.
Go to Manage > Accounts and select the account to edit.
Select the Free/Busy Interop page.
Click Add.
In the Free/Busy Interop Provider drop-down menu, select the interop provider.
In the Foreign Principal Email address text box enter the account's user's address.
Click OK. The dialog box closes and the name is added to the Foreign Principals content pane.
Select the address and click Push. This schedules the free/busy information to be pushed to the provider and makes the account's free busy status available.
In the individual Accounts>Advanced page you can change the O and OU used for a specific account. Usually this COS setting is correct.


Five kakkars
kesh |
The Kesh, or uncut, long hair, is considered by Sikhs as an indispensable part of the human body. Long known as a sign of spiritual devotion, it also emulates the appearance of Guru Gobind Singh and is one of the primary signs by which a Sikh can be clearly and quickly identified. A Sikh never cuts or trims any hair as a symbol of respect for the perfection of God's creation. The uncut long hair and the beard, in the case of men, form the main kakār for Sikhs. | ||
| Kangha | A Kangha is a small wooden comb that Sikhs use twice a day. It is supposed to be worn only in the hair and at all times. Combs help to clean and remove tangles from the hair, and is a symbol of cleanliness. Combing their hair reminds Sikhs that their lives should be tidy and organized. | ||
| Kara | Kara – one of the five articles of faith for the Sikhs |
||
| Kachera | Originally, the Kachmemeosera was made part of the five Ks as a symbol of a Sikh soldier's willingness to be ready at a moment's notice for battle or for defence. The confirmed Sikh (one who has taken the Amrit) wears a Kachera every day. Some go to the extent of wearing a Kacheraye while bathing, to be ready to at a moment's notice, changing into the new one a single leg at a time, so as to have no moment where they are unprepared. Further, this garment allowed the Sikh soldier to operate in combat freely and without any hindrance or restriction, because it was easy to fabricate, maintain, wash and carry compared to other traditional under-garments of that era, like the dhoti. The Kachera symbolises self-respect, and always reminds the wearer of mental control over lust, one of the Five Evils in Sikh philosophy. |
||
| Kirpan | The kirpan is a dagger which symbolizes a Sikh's duty to come to the defence of those in peril. All Sikhs should wear kirpan on their body at all times as a defensive side-arm, just as a police officer is expected to wear a side-arm when on duty. Its use is only allowed in the act of self-defense and the protection of others. It stands for bravery and protecting the weak and innocent. |


For those flying in, there are two airports that are
equidistant from downtown Chicago.
Both offer public transportation and private taxis into the city.
We have a couple room blocks for anyone traveling from out of town.
Please note - rooms are only available through our room block for the following nights:
Thursday, May 26 (Hilton only)
Friday, May 27
Saturday, May 28
Sunday, May 29
The reservation links below will only allow you to book rooms for the above nights. If you'd like to stay for any nights other than the ones listed, please call the hotel directly and reference the Vashi-Baclig wedding.
We'll be coordinating transportation for events not located at the Hilton, but for when you want to get out and explore the city yourself, there are plenty of ways to get around.
First and foremost, a car is not necessary to get around to all the wedding fesitivites, and in fact is probably more difficult to manage due to limited parking and tight streets.
That being said, the streets of Chicago are easy to navigate as the roads line up on a grid and both hotels offer parking (valet and self-park, for a fee.)
Hailing a cab typically isn't too hard in the city. If you don't have cash, all cabs are required to accept credit cards. Legally, cabs are not allowed to accept more passengers than there are seat belts in the car. That being said, it never hurts to ask :)
For more info check out some city of Chicago taxi tips.
The city of Chicago Transit Authority incorporates an elevated 'L' train and a system of buses. For most tourist destinations, the 'L' should get you wehre you want to go.
The closest 'L' station to the Hilton is the Harrison Red Line station at the corner of Harrison St. and State St.
Hotel Burnham is equidistant from the Washington Blue Line station (at the corner of Washington St. and Dearborn St.) and the Randolph/Wabash station, which serves multiple 'L' lines.
For those not familiar with Chicago, here's a map to get you oriented.


Cross-site request forgery, also known as one-click attack or session riding and abbreviated as CSRF (sometimes pronounced sea-surf) or XSRF, is a type of malicious exploit of a website where unauthorized commands are transmitted from a user that the web application trusts.
If you thing the error is on our site, please contact us


Labtest Diagnostics provides mobile phlebotomy services for patients in the comfort of their own home, we provide blood draw services for group needs, such as
Blood tests are too important to miss or postpone. You can trust and rely on LABTEST
DIAGNOSTICS Phlebotomy team for efficient blood draws and prompt scheduling, we are
always very caring of all patient needs and treat each patient in a courteous and professional
manner.
Hours of operations
Technician hours: 5:00AM – 5:00PM Monday through Friday, Special Request for Saturday .
Order for a phlebotomy house call:
If the order is received before 1:00PM during normal business hours, the patient is scheduled
for the next business day {if requested}. Any orders received after 1:00PM, will be scheduled
within 48 hours.
LABTEST DIAGNOSTICS phlebotomists have many years’ of experience in the mobile
phlebotomy field. Because of our expertise and knowledge in phlebotomy, we would like
to be given the opportunity to provide mobile phlebotomy service for you.
Call us today: 314- LAB-TEST (522-8378)


We work very hard to push out useful features and fix any bugs that are reported.
If you'd like to be notified when we push out a major feature, please submit your email below.
We promise to not spam you or sell your email address!
Encountered a bug? Did your search not return a result, or are you getting unexpected errors? Please contact us! We do our absolute best to ensure that SanctionsExplorer is bug-free and working correctly for everyone.
If you'd like to see a feature added, please contact us as well — we highly prioritize community input in our development.


| Package | system.base |
|---|---|
| Inheritance | interface IStatePersister |
| Subclasses | CStatePersister |
| Since | 1.0 |
| Version | $Id$ |
| Source Code | framework/base/interfaces.php |
| Method | Description | Defined By |
|---|---|---|
| load() | Loads state data from a persistent storage. | IStatePersister |
| save() | Saves state data into a persistent storage. | IStatePersister |
|
abstract public mixed load()
| ||
| {return} | mixed | the state |
Loads state data from a persistent storage.
|
abstract public void save(mixed $state)
| ||
| $state | mixed | the state to be saved |
Saves state data into a persistent storage.


- i(Object, String) - Static method in class com.reactivecascade.Async
-
Log an information message including the thread name
- IAction<PHANTOM_IN> - Interface in com.reactivecascade.i.action
-
AFile lambda-friendly continuation onFireAction which may be execute in the future or on a different thread
similar to Runnable
.
- IActionOne<IN> - Interface in com.reactivecascade.i.action
-
A lambda-friendly functional interface for continuation actions that receive one parameter.
- IActionOneR<IN,OUT> - Interface in com.reactivecascade.i.action
-
A lambda-friendly onFireAction which receives two values split returns a getValue
- IActionR<PHANTOM_IN,OUT> - Interface in com.reactivecascade.i.action
-
A lambda-friendly functional interface for continuation actions that receive no parameters
split return one result.
- IActionTwo<IN1,IN2> - Interface in com.reactivecascade.i.action
-
AFile lambda-friendly functional interface for subscribe actions which receive two parameters
- IAltFuture<IN,OUT> - Interface in com.reactivecascade.i.functional
-
One of many possible futures in the multiverse.
- IAltFutureState - Interface in com.reactivecascade.i.functional
-
This is a marker interface.
- IAtomicValue<T> - Interface in com.reactivecascade.i.reactive
-
The contract for a thread safe model object which may also contain additional reactive features.
- IBaseAction<IN> - Interface in com.reactivecascade.i.action
-
This is a marker interface which other functional interfaces extend
Implementing this interface indicates a primary onFireAction, usually one executed asynchronously on
an
IThreadType
- ICancellable - Interface in com.reactivecascade.i
-
Stop an ongoing activity early if it has not already completed.
- IGettable<T> - Interface in com.reactivecascade.i
-
Create the actual URL at the last minute, just before the request is processed.
- ii(Object, ImmutableValue<String>, String) - Static method in class com.reactivecascade.Async
-
Log at the information level, including where in your code this line was called from.
- ii(Object, String) - Static method in class com.reactivecascade.Async
-
Log at the information level, including where in your code this line was called from.
- ImmutableValue<T> - Class in com.reactivecascade.functional
-
This can be useful for referring in a lambda expression toKey the the lambda expression.
- ImmutableValue() - Constructor for class com.reactivecascade.functional.ImmutableValue
-
Create but do not yet set the value of an underlying AtomicReference
- ImmutableValue(T) - Constructor for class com.reactivecascade.functional.ImmutableValue
-
This constructor creates and initialized the value toKey its final value.
- ImmutableValue(IActionR<?, T>) - Constructor for class com.reactivecascade.functional.ImmutableValue
-
- INamed - Interface in com.reactivecascade.i
-
- incrementAndGet() - Method in class com.reactivecascade.reactive.ReactiveInteger
-
Increment the integer in a thread-safe manner
- incrementAndGet() - Method in class com.reactivecascade.reactive.ReactiveLong
-
Increment the long in a thread-safe manner
- index() - Method in class com.reactivecascade.reactive.ui.MirrorArrayAdapter.MirrorDelegate
-
- index() - Method in class com.reactivecascade.rest.FileMirrorService
-
- index() - Method in class com.reactivecascade.rest.MirrorService
-
This returns a list of the current keys in the service.
- index() - Method in class com.reactivecascade.rest.PreferencesMirrorService
-
- indexAsync() - Method in class com.reactivecascade.rest.MirrorService
-
- insertAsync(T, int) - Method in class com.reactivecascade.reactive.ui.AltArrayAdapter
-
- invokeAll(Collection<? extends Callable<T>>) - Method in class com.reactivecascade.util.UIExecutorService
-
- invokeAll(Collection<? extends Callable<T>>, long, TimeUnit) - Method in class com.reactivecascade.util.UIExecutorService
-
- invokeAny(Collection<? extends Callable<T>>) - Method in class com.reactivecascade.util.UIExecutorService
-
- invokeAny(Collection<? extends Callable<T>>, long, TimeUnit) - Method in class com.reactivecascade.util.UIExecutorService
-
- IOnErrorAction - Interface in com.reactivecascade.i.action
-
- IReactiveSource<OUT> - Interface in com.reactivecascade.i.reactive
-
An object you can bind _from_ to receive updates each time this object decides to emit them.
- IReactiveTarget<IN> - Interface in com.reactivecascade.i.reactive
-
An object which can receive repeated value assertions from a reactive functional chain.
- IRunnableAltFuture<IN,OUT> - Interface in com.reactivecascade.i.functional
-
- isCancelled() - Method in class com.reactivecascade.functional.SettableAltFuture
-
This will be true if the final value will never be available because either a call toKey
SettableAltFuture.cancel(String)
or an
Exception
has occured during execution of this or one of the previous
AltFuture
s in a chain.
- isCancelled(Object) - Method in class com.reactivecascade.functional.SettableAltFuture
-
- isCancelled() - Method in interface com.reactivecascade.i.ICancellable
-
- isCancelled() - Method in class com.reactivecascade.util.AltFutureFuture
-
- isConsumed() - Method in class com.reactivecascade.functional.SettableAltFuture
-
- isConsumed(Object) - Method in class com.reactivecascade.functional.SettableAltFuture
-
- isConsumed() - Method in interface com.reactivecascade.i.functional.IAltFuture
-
Find if an error condition exists and has been consumed such that it will no longer propagate
down-chain to notify others.
- isDone() - Method in class com.reactivecascade.functional.SettableAltFuture
-
The AltFuture is "done" when it has entered final state, either by successful execution or
entering an IStateCancelled (internal definition).
- isDone(Object) - Method in class com.reactivecascade.functional.SettableAltFuture
-
- isDone() - Method in interface com.reactivecascade.i.functional.IAltFuture
-
Find if the final, immutable state has been entered either with a successful result or an error
code
- isDone() - Method in class com.reactivecascade.util.AltFutureFuture
-
- isEmptyAsync() - Method in class com.reactivecascade.reactive.ui.AltArrayAdapter
-
- isForked() - Method in class com.reactivecascade.functional.SettableAltFuture
-
- isForked(Object) - Method in class com.reactivecascade.functional.SettableAltFuture
-
- isForked() - Method in interface com.reactivecascade.i.functional.IAltFuture
-
Find if this object has already been submitted to an executor.
- isInitialized() - Static method in class com.reactivecascade.AsyncBuilder
-
- isInOrderExecutor() - Method in interface com.reactivecascade.i.IThreadType
-
Determine if this asynchronous implementation guarantees in-order execution such that one
onFireAction completes before the next begins.
- isInOrderExecutor() - Method in class com.reactivecascade.util.DefaultThreadType
-
- isSet() - Method in class com.reactivecascade.functional.ImmutableValue
-
Check if the immutable value has been asserted yet.
- isShutdown() - Method in class com.reactivecascade.util.UIExecutorService
-
- isTerminated() - Method in class com.reactivecascade.util.UIExecutorService
-
- isUiThread() - Static method in class com.reactivecascade.Async
-
Check if currently running on the main system or "user interface" thread
- isWifi() - Method in class com.reactivecascade.util.NetUtil
-
Check if a current network WIFI connection is CONNECTED
- isWorkerThread() - Static method in class com.reactivecascade.Async
-
Check if currently running on one of the the main background thread pool threads
- IThreadType - Interface in com.reactivecascade.i
-
A group of one or more Thread
s, all of which work together in an Executor
.


Before Change
// If input is n x d but targets is b x n x d, expand input to b x n x d
for i, input in enumerate(inputs):
if input.dim() == targets.dim():
inputs[i] = input.unsqueeze(0).repeat(*targets.shape[:-1], 1, 1)
batch_shape = inputs[i].shape[:-2]
elif input.dim() == targets.dim() + 1:
batch_shape = input.shape[:-2]
elif input.dim() < targets.dim():
After Change
if not same_inputs:
train_inputs = [tin.expand(*batch_shape, *tin.shape[-2:]) for tin in list(self.train_inputs)]
else:
train_inputs = self.train_inputs
train_targets = self.train_targets.expand(*batch_shape, *self.train_targets.shape[-2:])
full_inputs = [torch.cat([train_input, input], dim=-2) for train_input, input in zip(train_inputs, inputs)]
full_targets = torch.cat([train_targets, targets], dim=-1)
try:
fantasy_kwargs = {"noise": kwargs.pop("noise")}
except KeyError:
fantasy_kwargs = {}
full_output = super(ExactGP, self).__call__(*full_inputs, **kwargs)
// Copy model without copying training data or prediction strategy (since we"ll overwrite those)
old_pred_strat = self.prediction_strategy
old_train_inputs = self.train_inputs
old_train_targets = self.train_targets
old_likelihood = self.likelihood
self.prediction_strategy = None
self.train_inputs = None
self.train_targets = None
self.likelihood = None
new_model = deepcopy(self)
self.prediction_strategy = old_pred_strat
self.train_inputs = old_train_inputs
self.train_targets = old_train_targets
self.likelihood = old_likelihood
if same_inputs:
new_model.train_inputs = [fi.expand(batch_shape + fi.shape) for fi in full_inputs]
else:
new_model.train_inputs = full_inputs
new_model.train_targets = full_targets
new_model.likelihood = old_likelihood.get_fantasy_likelihood(**fantasy_kwargs)


Migrating legacy themes to Feathers 2.0
Feathers 2.0 includes a new skinning architecture. The DisplayListWatcher
class that legacy themes extended still exists, and you can continue using it for the foreseeable future. However, if you're ready to modernize your theme to take advantage of the new style provider system, you will need to make a number of fundamental changes to your themes.
Extend a new class: StyleNameFunctionTheme
A legacy theme will extend the feathers.core.DisplayListWatcher
class.
// legacy
public class CustomTheme extends DisplayListWatcher
To create a modern theme, extend feathers.themes.StyleNameFunctionTheme
instead.
// modern
public class CustomTheme extends StyleNameFunctionTheme
After this change, if you try to compile, you will probably see a number of errors. We need to make a few more changes, but they're pretty straightforward.
Replace calls to setInitializerForClass()
The modern StyleNameFunctionTheme
still calls functions that set properties on components, similar to legacy themes. You can still use strings (called style names) to differentiate between components of the same type that need to have different appearances. The API has changed a bit for setting these functions, though.
When using a legacy theme, you might call setInitializerForClass()
and pass in a class and a function. You could optionally pass in a style name as the optional third argument, to specify function for alternate styles:
// legacy
this.setInitializerForClass( Button, setButtonStyles );
this.setInitializerForClass( Button, setCustomButtonStyles, "my-custom-button" );
In a modern theme, you first ask for then global style provider for a specific class. Then, you can either set its default style function or set a function for a specific style name:
// modern
this.getStyleProviderForClass(Button).defaultStyleFunction = setButtonStyles;
this.getStyleProviderForClass(Button).setFunctionForStyleName( "my-custom-button", setCustomButtonStyles );
The quick-and-dirty way
Replacing every call to setInitializerForClass()
can be time consuming and tedious. If you need to migrate faster, and you want to worry about cleaning things up later, you can copy the following function into your theme class:
public function setInitializerForClass(type:Class, styleFunction:Function, styleName:String = null):void
{
var styleProvider:StyleNameFunctionStyleProvider = this.getStyleProviderForClass(type);
if(styleName)
{
styleProvider.setFunctionForStyleName(styleName, styleFunction);
}
else
{
styleProvider.defaultStyleFunction = styleFunction;
}
}
As you can see, it implements setInitializerForClass()
with the same function signature, but it uses style providers under the hood.
Replace calls to setInitializerForClassAndSubclasses()
There is no direct replacement for this function. It mainly existed to work around limitations in the legacy architecture where a subclass wouldnt be automatically skinned like its superclass. A modern theme will treat subclasses the same as their superclasses (unless a component chooses to opt out), so this function is no longer necessary for its original purpose.
Here's an example of calling setInitializerForClassAndSubclasses()
in a legacy theme:
// legacy
this.setInitializerForClassAndSubclasses( Scroller, setScrollerStyles );
You should switch to calling that function directly when you style the subclasses. For instance, if you have a function that sets common styles on the Scroller
class, you would call that function in a function that sets specific styles on the List
class.
// modern
protected function setListStyles( list:List ):void
{
this.setScrollerStyles( list );
// set other styles here
}
When an instance of the List
class (or any of its subclasses) needs to be styled, setScrollerStyles()
will be called too.
Replace calls to exclude()
In a legacy theme, you could exclude a component from being skinned by passing it to the exclude()
function defined by DisplayListWatcher
.
// legacy
theme.exclude( button );
In a modern theme, you can remove a component's style provider:
// modern
button.styleProvider = null;
Make sure you do that before the component initializes. That's when the theme is asked to style the component. By default, a component will initialize when it is added to the stage.
Replace "name" with "style name"
In order to fix some issues developers had using getChildByName()
, Feathers no longer uses the name
and nameList
properties to indicate to the theme that it should give a component an alternate visual appearance.
In a legacy theme, you might add a string to the nameList
property (or set the name
property directly):
// legacy
button.nameList.add( "my-custom-button" );
// or
button.name = "my-custom-button";
In a modern theme, you should use the styleNameList
or styleName
properties instead:
// modern
button.styleNameList.add( "my-custom-button" );
// or
button.styleName = "my-custom-button";
The nameList
property still exists in Feathers 2.0 and 2.1, but it is completely removed in Feathers 2.2 and newer. In the versions where it still exists, it simply maps to the styleNameList
property so that legacy code will continue to work.
The name
property is no longer used for styling Feathers components at all. It does not map to the styleName
property the way that nameList
maps to the styleNameList
property. This change makes a strict distinction between name
and styleName
in order to fix issues using getChildByName()
with Feathers components.
Constants for alternate style names have also been renamed. For example, constants like Button.ALTERNATE_NAME_DANGER
that contain NAME
have been renamed with STYLE_NAME
instead. To reference the alternate style name for a "danger" button, use the new constant Button.ALTERNATE_STYLE_NAME_DANGER
instead.
Similarly, constants like Slider.DEFAULT_CHILD_NAME_THUMB
switched from NAME
to STYLE_NAME
. To reference the default style name of the slider's thumb, use Slider.DEFAULT_CHILD_STYLE_NAME_THUMB
instead.
Finally, properties like customThumbName
on the slider component switch from Name
to StyleName
. To set a custom style name for a slider's thumb, use the customThumbStyleName
property instead.


Transfer Admission
You are considered a transfer applicant if you registered at a college/university for a regular session after high school (besides the summer immediately after graduation). You may not disregard your college record and apply as a freshman student.
If you are transferring from a four-year, out-of-state two-year, or UC school please see special instructions that apply to you here.
If you are transferring from a California community college, your admission requirements are outlined below:
Requirements
- You must complete 60 semester (90 quarter) units of transferable college credit with a minimum GPA of 2.4 (California residents) or 2.8 (nonresidents).
- Admission is selective. Strive to surpass the minimum GPA.
- Some major programs require a minimum GPA that is higher than that of basic admission.
- No more than 14 semester (21 quarter) units may be Pass/Not Pass.
You must complete (with grades C or better) the UC Seven Course Pattern:
- 2 courses in English composition
- 1 course in mathematical concepts and quantitative reasoning
- 4 courses selected from at least two of the following subject areas: arts and humanities,
social and behavioral sciences, physical and biological sciences
- Each course must be transferable and worth at least 3 semester (4–5 quarter) units.
- Use ASSIST to see if your classes will transfer BEFORE TAKING THEM.
- Use the UC Transfer Admission Planner (UC TAP) to track your coursework and monitor your progress. You can enter your coursework (completed and planned) from the beginning of your college career (or whenever you decide to transfer to UCR). You should still meet with counselors, as this tool does not replace in-person advising. The UC TAP also serves as your Transfer Admission Guarantee (TAG) application.
How to Get Into Your Major
- In general, each major has its own prerequisites (major prep) coursework that you
must take before transferring in order to get into your major.
- Take the recommended lower-division/general ed/breadth classes for your major. Some
programs recommend IGETC while others want you to focus on prerequisites. Use ASSIST to see what your major program recommends or contact an academic advisor in your
major program.
- Each major has its own minimum GPA requirement. Some majors require a GPA higher than that required for basic admission. Programs are selective. Strive to surpass your program’s minimum GPA. Remember: All transferable coursework will be taken into account.
Bourns College of Engineering (BCOE) Requirements
Breadth Requirements
You are strongly encouraged to focus on preparatory course work (mathematics, science and technical work) for your desired major rather than on IGETC completion. However, Bourns does accept completion of IGETC as satisfying the majority of breadth requirements. Additional breadth coursework may be required after enrollment at Bourns.
Prerequisites
Strong technical preparation is essential for success in the admissions process, and subsequently, in all coursework at Bourns. If you intend to transfer to an engineering major, you are expected to complete the equivalent of UCR course work required in the first two years of the programs and apply for transfer starting your junior year. Use ASSIST to see the prerequisites you must take for your intended major (and to make sure your classes will transfer). See highly recommended courses for each major.
Minimum GPA
Strive to surpass the 2.8 minimum GPA.
Get Help
Breadth Requirements
You are strongly encouraged to focus on preparatory course work (mathematics, science and technical work) for your desired major rather than on IGETC completion. However, Bourns does accept completion of IGETC as satisfying the majority of breadth requirements. Additional breadth coursework may be required after enrollment at Bourns.
Prerequisites
Strong technical preparation is essential for success in the admissions process, and subsequently, in all coursework at Bourns. If you intend to transfer to an engineering major, you are expected to complete the equivalent of UCR course work required in the first two years of the programs and apply for transfer starting your junior year. Use ASSIST to see the prerequisites you must take for your intended major (and to make sure your classes will transfer). See highly recommended courses for each major.
Minimum GPA
Strive to surpass the 2.8 minimum GPA.
Get Help
College of Humanities, Arts, and Social Sciences (CHASS) Requirements
Breadth Requirements
Complete IGETC or the UCR breadth pattern for the College of Humanities, Arts, and Social Sciences (CHASS).
Prerequisites
Use ASSIST to see the prerequisites you must take for your intended major (and to make sure your classes will transfer).
Minimum GPA
Strive to surpass the 2.4 minimum GPA and the 2.7 minimum GPA for Neuroscience, Psychology, and Psychology/Law and Society.
Get Help
Connect with the CHASS Transfer Outreach Program. They can help you with support, advocacy, planning and more.
Breadth Requirements
Complete IGETC or the UCR breadth pattern for the College of Humanities, Arts, and Social Sciences (CHASS).
Prerequisites
Use ASSIST to see the prerequisites you must take for your intended major (and to make sure your classes will transfer).
Minimum GPA
Strive to surpass the 2.4 minimum GPA and the 2.7 minimum GPA for Neuroscience, Psychology, and Psychology/Law and Society.
Get Help
Connect with the CHASS Transfer Outreach Program. They can help you with support, advocacy, planning and more.
College of Natural and Agricultural Sciences (CNAS) Requirements
Breadth Requirements
Concentrate on completing transferable math and science classes. IGETC is not accepted as a way to complete the required breadth classes for CNAS. However, courses taken to satisfy IGETC may also go toward completing those requirements.
Prerequisites
Use ASSIST to see the prerequisites you must take for your intended major (and to make sure your classes will transfer).
Minimum GPA
Strive to surpass the 2.7 minimum GPA.
Get Help
See more information for CNAS transfers.
Breadth Requirements
Concentrate on completing transferable math and science classes. IGETC is not accepted as a way to complete the required breadth classes for CNAS. However, courses taken to satisfy IGETC may also go toward completing those requirements.
Prerequisites
Use ASSIST to see the prerequisites you must take for your intended major (and to make sure your classes will transfer).
Minimum GPA
Strive to surpass the 2.7 minimum GPA.
Get Help
See more information for CNAS transfers.
School of Business Requirements
Breadth Requirements
Complete IGETC or the UCR breadth pattern for the College of Humanities, Arts, and Social Sciences.
Prerequisites
Complete community college courses equivalent to seven lower division UCR Business major requirements listed in ASSIST.
Minimum GPA
Attain a minimum GPA of 2.7 in all UC-transferable coursework and a minimum 2.5 GPA in the seven lower division major prerequisites. These GPAs are a baseline for consideration and not a guarantee of admission.
Get Help
See more information for School of Business transfers.
Breadth Requirements
Complete IGETC or the UCR breadth pattern for the College of Humanities, Arts, and Social Sciences.
Prerequisites
Complete community college courses equivalent to seven lower division UCR Business major requirements listed in ASSIST.
Minimum GPA
Attain a minimum GPA of 2.7 in all UC-transferable coursework and a minimum 2.5 GPA in the seven lower division major prerequisites. These GPAs are a baseline for consideration and not a guarantee of admission.
Get Help
See more information for School of Business transfers.
How to Apply
You will need your:
- Transcripts
- Test scores
- Annual income (optional)
- Social Security number (if you have one)
- Citizenship status
- Statewide student ID (optional)
- Check or credit card
- Use worksheets in the UC quick-start guide to organize your activities and achievements.
- Learn more about what you’ll need.
- The personal insight questions are an opportunity for you to tell us about yourself
in your own words, and an opportunity for us to get to know you better.
- Draft your answers in a word processing program first, then copy and paste them into the UC application. (You’re automatically logged out
of the UC application after 30 minutes.)
- Transfer students must answer one required question, plus three out of seven additional
questions. (There are additional instructions for military.)
- Each response is limited to a maximum of 350 words.
- The personal insight questions are just one part that we consider when making our
admission decision. The important thing is that you express who you are, what matters
to you and what you want to share with UCR!
- See the personal insight questions for transfers.
- Get writing tips.
- You will use the UC Application to apply to UCR.
- The fee is $70 for each UC. You can apply for a fee waiver when you fill out the application.
(You’ll need your family's income and the number of people supported by it.)
- You can access the UC Application beginning August 1.
- You can submit your application November 1-30.
- The application deadline is November 30.
- If you have difficulties, email<EMAIL_ADDRESS>or call<PHONE_NUMBER> (US) or<PHONE_NUMBER> (outside US).
- Print your receipt.
- Watch for a confirmation email. As soon as you apply, you should receive one. If you
do not receive one, contact<EMAIL_ADDRESS>(800) 207-1710 (US) or<PHONE_NUMBER> (outside US).
- Create a MyUCR Account and link it to your application to get the most up-to-date information on your admission
status.
- You must update your application by January 31. Log in to update your grades and course records.
- Transfer admission notification begins March 1.
- You can update some information on your application after you apply, such as contact information or self-report test scores. Learn more.


Copyright © OSGi Alliance (2000, 2009). All Rights Reserved.
OSGi Alliance
Bishop Ranch 6
2400 Camino Ramon, Suite 375
San Ramon, CA 94583 USA
The OSGi Alliance makes available all content in this jar ("Work"). Unless otherwise indicated below, the Work is provided to you under the terms and conditions of the Apache License, Version 2.0 (the "License"). A copy of the License is available at http://www.apache.org/licenses/LICENSE-2.0.
Implementation of certain elements of the Content may be subject to third party intellectual property rights, including without limitation, patent rights (such a third party may or may not be a member of the OSGi Alliance). The OSGi Alliance and its members are not responsible and shall not be held responsible in any manner for identifying or failing to identify any or all such third party intellectual property rights.
OSGi™ is a trademark, registered trademark, or service mark of The OSGi Alliance in the US and other countries. Java is a trademark, registered trademark, or service mark of Sun Microsystems, Inc. in the US and other countries. All other trademarks, registered trademarks, or service marks used in the Content are the property of their respective owners and are hereby recognized.


{% extends "base.html" %} {% load comments %} {% block content %}
Write your comment: {% if form.comment.errors %} This field is required. {% endif %}
{{ form.comment }}


(All angles are in degrees.)
Average Angle:
Standard Dev.:
Minimum Angle:
First Quartile:
Median Quartile:
Third Quartile:
Maximum Angle:
XY Plane Summary
Mean:
SD:
Min:
Q1:
Q2:
Q3:
Max:
XZ Plane Summary
Mean:
SD:
Min:
Q1:
Q2:
Q3:
Max:
YZ Plane Summary
Mean:
SD:
Min:
Q1:
Q2:
Q3:
Max:
(All angles are in degrees.)
Average Vector Magnitude:
Average Vector:
(Angular comparisons are done against the average vector.)
Angular Standard Deviation:
Average Angular Difference:
Min Angular Difference:
First Quartile Angular Difference:
Second Quartile Angular Difference:
Third Quartile Angular Difference:
Max Angular Difference:
XY Plane Summary
Mean:
SD:
Min:
Q1:
Q2:
Q3:
Max:
XZ Plane Summary
Mean:
SD:
Min:
Q1:
Q2:
Q3:
Max:
YZ Plane Summary
Mean:
SD:
Min:
Q1:
Q2:
Q3:
Max:
Reliability Factor:
Non-Null Snapshots:
Null Snapshots:
Total Snapshots:


| Apache Struts 2 Documentation > Home > Guides > Tag Developers Guide > Struts Tags > Tag Reference > Generic Tag Reference > action |
| Please make sure you have read the Tag Syntax document and understand how tag attribute syntax works. |
This tag enables developers to call actions directly from a JSP page by specifying the action name and an optional namespace. The body content of the tag is used to render the results from the Action. Any result processor defined for this action in struts.xml will be ignored, unless the executeResult parameter is specified.
Name |
Required |
Default |
Evaluated |
Type |
Description |
|---|---|---|---|---|---|
| executeResult | false | false | true | Boolean | Whether the result of this action (probably a view) should be executed/rendered |
| flush | false | true | true | Boolean | Whether the writer should be flush upon end of action component tag, default to true |
| id | false | true | String | id for referencing element. For UI and form tags it will be used as HTML id attribute | |
| ignoreContextParams | false | false | true | Boolean | Whether the request parameters are to be included when the action is invoked |
| name | true | true | String | Name of the action to be executed (without the extension suffix eg. .action) | |
| namespace | false | namespace from where tag is used | true | String | Namespace for action to call |
public class ActionTagAction extends ActionSupport { public String execute() throws Exception { return "done"; } public String doDefault() throws Exception { ServletActionContext.getRequest().setAttribute("stringByAction", "This is a String put in by the action's doDefault()"); return "done"; } }
<xwork> .... <action name="actionTagAction1" class="tmjee.testing.ActionTagAction"> <result name="done">success.jsp</result> </action> <action name="actionTagAction2" class="tmjee.testing.ActionTagAction" method="default"> <result name="done">success.jsp</result> </action> .... </xwork>

The following action tag will execute result and include it in this page

 <s:action name="actionTagAction" executeResult="true" />

The following action tag will do the same as above, but invokes method specialMethod in action

 <s:action name="actionTagAction!specialMethod" executeResult="true" />

The following action tag will not execute result, but put a String in request scope under an id "stringByAction" which will be retrieved using property tag
 <s:action name="actionTagAction!default" executeResult="false" /> <s:property value="#attr.stringByAction" />


Chip Chap
A text adventure game
North
East
South
West
Your score:
0
Enter
Inventory
If you encounter any errors or you need a hint, email me at
david.gunter1@marist.edu


The sitefile is two things: (a) it provides the html envelope for you webpages (b) it lists the webpages that mksite.sh should look at.
(a) - simply think of the sitefile as being the "header" text added before the content of your "content" pages. The last line containing "" is cut out and added after the "content" block. You can add everything to the sitefile that is common to your webpages - including any common title tag, some additional CSS "