railo-context.Component testbox.system.Assertion
Copyright Since 2005 TestBox Framework by Luis Majano and Ortus Solutions, Corp www.coldbox.org | www.ortussolutions.com This object represents our Assertion style DSL for Unit style testing
| Method Summary | |
|---|---|
any
|
assert(boolean expression, [any message=''])
Assert that the passed expression is true. |
any
|
between(any actual, any min, any max, [any message=''])
Assert that the passed in actual number or date is between the passed in min and max values. |
any
|
closeTo(any expected, any actual, any delta, [any datePart=''], [any message=''])
Assert that the passed in actual number or date is expected to be close to it within +/- a passed delta and optional datepart. |
any
|
deepKey(struct target, string key, [any message=''])
Assert that a given key exists in the passed in struct by searching the entire nested structure. |
private any
|
equalize(any expected, any actual)
PRIVATE Methods **********************************. |
any
|
fail([any message=''])
Fail assertion. |
private any
|
getIdentityHashCode(any target)
|
any
|
getStringName(any obj)
Get a string name representation of an incoming object. |
private any
|
getTargetLength(any target)
|
any
|
includes(any target, any needle, [any message=''])
Assert that the given "needle" argument exists in the incoming string or array with no case-sensitivity. |
any
|
includesWithCase(any target, any needle, [any message=''])
Assert that the given "needle" argument exists in the incoming string or array with case-sensitivity. |
any
|
instanceOf(any actual, string typeName, [any message=''])
Assert that the actual object is of the expected instance type. |
any
|
isEmpty(any target, [any message=''])
Assert that a a given string, array, structure or query is empty. |
any
|
isEqual(any expected, any actual, [any message=''])
Assert something is equal to each other, no case is required. |
any
|
isEqualWithCase(string expected, string actual, [any message=''])
Assert strings are equal to each other with case. |
any
|
isFalse(boolean actual, [any message=''])
Assert something is false. |
any
|
isGT(any actual, any target, [any message=''])
Assert that the actual value is greater than the target value. |
any
|
isGTE(any actual, any target, [any message=''])
Assert that the actual value is greater than or equal the target value. |
any
|
isLT(any actual, any target, [any message=''])
Assert that the actual value is less than the target value. |
any
|
isLTE(any actual, any target, [any message=''])
Assert that the actual value is less than or equal the target value. |
any
|
isNotEmpty(any target, [any message=''])
Assert that a a given string, array, structure or query is not empty. |
any
|
isNotEqual(any expected, any actual, [any message=''])
Assert something is not equal to each other, no case is required. |
any
|
isNotSameInstance(any expected, any actual, [any message=''])
Assert an object is not the same instance as another object. |
any
|
isSameInstance(any expected, any actual, [any message=''])
Assert an object is the same instance as another object. |
any
|
isTrue(boolean actual, [any message=''])
Assert something is true. |
any
|
key(any target, string key, [any message=''])
Assert that a given key exists in the passed in struct/object. |
any
|
lengthOf(any target, string length, [any message=''])
Assert the size of a given string, array, structure or query. |
any
|
match(string actual, string regex, [any message=''])
Assert that the actual data matches the incoming regular expression with no case sensitivity. |
any
|
matchWithCase(string actual, string regex, [any message=''])
Assert that the actual data matches the incoming regular expression with case sensitivity. |
any
|
notDeepKey(struct target, string key, [any message=''])
Assert that a given key DOES NOT exists in the passed in struct by searching the entire nested structure. |
any
|
notIncludes(any target, any needle, [any message=''])
Assert that the given "needle" argument exists in the incoming string or array with no case-sensitivity. |
any
|
notIncludesWithCase(any target, any needle, [any message=''])
Assert that the given "needle" argument does not exist in the incoming string or array with case-sensitivity. |
any
|
notInstanceOf(any actual, string typeName, [any message=''])
Assert that the actual object is NOT of the expected instance type. |
any
|
notKey(any target, string key, [any message=''])
Assert that a given key DOES NOT exist in the passed in struct/object. |
any
|
notLengthOf(any target, string length, [any message=''])
Assert the size of a given string, array, structure or query. |
any
|
notMatch(string actual, string regex, [any message=''])
Assert that the actual data does NOT match the incoming regular expression with no case sensitivity. |
any
|
notNull([any actual], [any message=''])
Assert something is not null. |
any
|
notThrows(any target, [any type=''], [any regex=''], [any message=''])
Assert that the passed in function will NOT throw an exception, an exception of a specified type or exception message regex. |
any
|
notTypeOf(string type, any actual, [any message=''])
Assert that is NOT a type of the incoming actual data, it uses the internal ColdFusion isValid() function behind the scenes. |
any
|
null([any actual], [any message=''])
Assert something is null. |
any
|
throws(any target, [any type=''], [any regex='.*'], [any message=''])
Assert that the passed in function will throw an exception. |
any
|
typeOf(string type, any actual, [any message=''])
Assert the type of the incoming actual data, it uses the internal ColdFusion isValid() function behind the scenes. |
| Methods inherited from class railo-context.Component |
|---|
| None |
| Method Detail |
|---|
Assert that the passed expression is true
expression
- The expression to testmessage
- The message to send in the failureAssert that the passed in actual number or date is between the passed in min and max values
actual
- The actual number or date to evaluatemin
- The expected min number or datemax
- The expected max number or datemessage
- The message to send in the failureAssert that the passed in actual number or date is expected to be close to it within +/- a passed delta and optional datepart
expected
- The expected number or dateactual
- The actual number or datedelta
- The +/- delta to range itdatePart
- If passed in values are dates, then you can use the datepart to evaluate itmessage
- The message to send in the failureAssert that a given key exists in the passed in struct by searching the entire nested structure
target
- The target object/structkey
- The key to check for existence anywhere in the nested structuremessage
- The message to send in the failurePRIVATE Methods **********************************
expected
actual
Fail assertion
message
- The message to send in the failuretarget
Get a string name representation of an incoming object.
obj
target
Assert that the given "needle" argument exists in the incoming string or array with no case-sensitivity
target
- The target object to check if the incoming needle exists in. This can be a string or arrayneedle
- The substring to find in a string or the value to find in an arraymessage
- The message to send in the failureAssert that the given "needle" argument exists in the incoming string or array with case-sensitivity
target
- The target object to check if the incoming needle exists in. This can be a string or arrayneedle
- The substring to find in a string or the value to find in an arraymessage
- The message to send in the failureAssert that the actual object is of the expected instance type
actual
- The actual data to checktypeName
- The typename to checkmessage
- The message to send in the failureAssert that a a given string, array, structure or query is empty
target
- The target object to check the length for, this can be a string, array, structure or querymessage
- The message to send in the failureAssert something is equal to each other, no case is required
expected
- The expected dataactual
- The actual data to testmessage
- The message to send in the failureAssert strings are equal to each other with case.
expected
- The expected dataactual
- The actual data to testmessage
- The message to send in the failureAssert something is false
actual
- The actual data to testmessage
- The message to send in the failureAssert that the actual value is greater than the target value
actual
- The actual valuetarget
- The target valuemessage
- The message to send in the failureAssert that the actual value is greater than or equal the target value
actual
- The actual valuetarget
- The target valuemessage
- The message to send in the failureAssert that the actual value is less than the target value
actual
- The actual valuetarget
- The target valuemessage
- The message to send in the failureAssert that the actual value is less than or equal the target value
actual
- The actual valuetarget
- The target valuemessage
- The message to send in the failureAssert that a a given string, array, structure or query is not empty
target
- The target object to check the length for, this can be a string, array, structure or querymessage
- The message to send in the failureAssert something is not equal to each other, no case is required
expected
- The expected dataactual
- The actual data to testmessage
- The message to send in the failureAssert an object is not the same instance as another object
expected
- The expected dataactual
- The actual data to testmessage
- The message to send in the failureAssert an object is the same instance as another object
expected
- The expected dataactual
- The actual data to testmessage
- The message to send in the failureAssert something is true
actual
- The actual data to testmessage
- The message to send in the failureAssert that a given key exists in the passed in struct/object
target
- The target object/structkey
- The key to check for existencemessage
- The message to send in the failureAssert the size of a given string, array, structure or query
target
- The target object to check the length for, this can be a string, array, structure or querylength
- The length to checkmessage
- The message to send in the failureAssert that the actual data matches the incoming regular expression with no case sensitivity
actual
- The actual data to checkregex
- The regex to check withmessage
- The message to send in the failureAssert that the actual data matches the incoming regular expression with case sensitivity
actual
- The actual data to checkregex
- The regex to check withmessage
- The message to send in the failureAssert that a given key DOES NOT exists in the passed in struct by searching the entire nested structure
target
- The target object/structkey
- The key to check for existence anywhere in the nested structuremessage
- The message to send in the failureAssert that the given "needle" argument exists in the incoming string or array with no case-sensitivity
target
- The target object to check if the incoming needle exists in. This can be a string or arrayneedle
- The substring to find in a string or the value to find in an arraymessage
- The message to send in the failureAssert that the given "needle" argument does not exist in the incoming string or array with case-sensitivity
target
- The target object to check if the incoming needle exists in. This can be a string or arrayneedle
- The substring to find in a string or the value to find in an arraymessage
- The message to send in the failureAssert that the actual object is NOT of the expected instance type
actual
- The actual data to checktypeName
- The typename to checkmessage
- The message to send in the failureAssert that a given key DOES NOT exist in the passed in struct/object
target
- The target object/structkey
- The key to check for existencemessage
- The message to send in the failureAssert the size of a given string, array, structure or query
target
- The target object to check the length for, this can be a string, array, structure or querylength
- The length to checkmessage
- The message to send in the failureAssert that the actual data does NOT match the incoming regular expression with no case sensitivity
actual
- The actual data to checkregex
- The regex to check withmessage
- The message to send in the failureAssert something is not null
actual
- The actual data to testmessage
- The message to send in the failureAssert that the passed in function will NOT throw an exception, an exception of a specified type or exception message regex
target
- The target function to execute and check for exceptionstype
- Match this type with the exception thrownregex
- Match this regex against the message+detail of the exceptionmessage
- The message to send in the failureAssert that is NOT a type of the incoming actual data, it uses the internal ColdFusion isValid() function behind the scenes
type
- The type to check, valid types are: array, binary, boolean, component, date, time, float, numeric, integer, query, string, struct, url, uuidactual
- The actual data to checkmessage
- The message to send in the failureAssert something is null
actual
- The actual data to testmessage
- The message to send in the failureAssert that the passed in function will throw an exception
target
- The target function to execute and check for exceptionstype
- Match this type with the exception thrownregex
- Match this regex against the message + detail of the exceptionmessage
- The message to send in the failureAssert the type of the incoming actual data, it uses the internal ColdFusion isValid() function behind the scenes
type
- The type to check, valid types are: array, binary, boolean, component, date, time, float, numeric, integer, query, string, struct, url, uuidactual
- The actual data to checkmessage
- The message to send in the failure


public class BooleanArrays extends java.lang.Object
In particular, the ensureCapacity()
, grow()
,
trim()
and setLength()
methods allow to handle
arrays much like array lists. This can be very useful when efficiency (or
syntactic simplicity) reasons make array lists unsuitable.
Note that BinIO
and TextIO
contain several methods make it possible to load and save arrays of primitive types as sequences
of elements in DataInput
format (i.e., not as objects) or as sequences of lines of text.
There are several sorting methods available. The main theme is that of letting you choose the sorting algorithm you prefer (i.e., trading stability of mergesort for no memory allocation in quicksort). Several algorithms provide a parallel version, that will use the number of cores available. Some algorithms also provide an explicit indirect sorting facility, which makes it possible to sort an array using the values in another array as comparator.
All comparison-based algorithm have an implementation based on a type-specific comparator.
As a general rule, sequential radix sort is significantly faster than quicksort or mergesort, in particular on random-looking data. In the parallel case, up to a few cores parallel radix sort is still the fastest, but at some point quicksort exploits parallelism better.
If you are fine with not knowing exactly which algorithm will be run (in particular, not knowing exactly whether a support array will be allocated),
the dual-pivot parallel sorts in Arrays
are about 50% faster than the classical single-pivot implementation used here.
In any case, if sorting time is important I suggest that you benchmark your sorting load with your data distribution and on your architecture.
Arrays
| Modifier and Type | Class and Description |
|---|---|
protected static class |
BooleanArrays.ForkJoinQuickSort |
protected static class |
BooleanArrays.ForkJoinQuickSort2 |
protected static class |
BooleanArrays.ForkJoinQuickSortComp |
protected static class |
BooleanArrays.ForkJoinQuickSortIndirect |
| Modifier and Type | Field and Description |
|---|---|
static boolean[] |
EMPTY_ARRAY
A static, final, empty array.
|
static Hash.Strategy<boolean[]> |
HASH_STRATEGY
A type-specific content-based hash strategy for arrays.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean[] |
copy(boolean[] array)
Returns a copy of an array.
|
static boolean[] |
copy(boolean[] array,
int offset,
int length)
Returns a copy of a portion of an array.
|
static boolean[] |
ensureCapacity(boolean[] array,
int length)
Ensures that an array can contain the given number of entries.
|
static boolean[] |
ensureCapacity(boolean[] array,
int length,
int preserve)
Ensures that an array can contain the given number of entries, preserving just a part of the array.
|
static void |
ensureFromTo(boolean[] a,
int from,
int to)
Ensures that a range given by its first (inclusive) and last (exclusive) elements fits an array.
|
static void |
ensureOffsetLength(boolean[] a,
int offset,
int length)
Ensures that a range given by an offset and a length fits an array.
|
static void |
ensureSameLength(boolean[] a,
boolean[] b)
Ensures that two arrays are of the same length.
|
static boolean |
equals(boolean[] a1,
boolean[] a2)
Deprecated.
Please use the corresponding
Arrays method, which is intrinsified in recent JVMs. |
static void |
fill(boolean[] array,
boolean value)
Deprecated.
Please use the corresponding
Arrays method. |
static void |
fill(boolean[] array,
int from,
int to,
boolean value)
Deprecated.
Please use the corresponding
Arrays method. |
static boolean[] |
grow(boolean[] array,
int length)
Grows the given array to the maximum between the given length and
the current length multiplied by two, provided that the given
length is larger than the current length.
|
static boolean[] |
grow(boolean[] array,
int length,
int preserve)
Grows the given array to the maximum between the given length and
the current length multiplied by two, provided that the given
length is larger than the current length, preserving just a part of the array.
|
static void |
mergeSort(boolean[] a)
Sorts an array according to the natural ascending order using mergesort.
|
static void |
mergeSort(boolean[] a,
BooleanComparator comp)
Sorts an array according to the order induced by the specified
comparator using mergesort.
|
static void |
mergeSort(boolean[] a,
int from,
int to)
Sorts the specified range of elements according to the natural ascending order using mergesort.
|
static void |
mergeSort(boolean[] a,
int from,
int to,
boolean[] supp)
Sorts the specified range of elements according to the natural ascending order using mergesort, using a given pre-filled support array.
|
static void |
mergeSort(boolean[] a,
int from,
int to,
BooleanComparator comp)
Sorts the specified range of elements according to the order induced by the specified
comparator using mergesort.
|
static void |
mergeSort(boolean[] a,
int from,
int to,
BooleanComparator comp,
boolean[] supp)
Sorts the specified range of elements according to the order induced by the specified
comparator using mergesort, using a given pre-filled support array.
|
static void |
parallelQuickSort(boolean[] x)
Sorts an array according to the natural ascending order using a parallel quicksort.
|
static void |
parallelQuickSort(boolean[] x,
boolean[] y)
Sorts two arrays according to the natural lexicographical
ascending order using a parallel quicksort.
|
static void |
parallelQuickSort(boolean[] x,
boolean[] y,
int from,
int to)
Sorts the specified range of elements of two arrays according to the natural lexicographical
ascending order using a parallel quicksort.
|
static void |
parallelQuickSort(boolean[] x,
BooleanComparator comp)
Sorts an array according to the order induced by the specified
comparator using a parallel quicksort.
|
static void |
parallelQuickSort(boolean[] x,
int from,
int to)
Sorts the specified range of elements according to the natural ascending order using a parallel quicksort.
|
static void |
parallelQuickSort(boolean[] x,
int from,
int to,
BooleanComparator comp)
Sorts the specified range of elements according to the order induced by the specified
comparator using a parallel quicksort.
|
static void |
parallelQuickSortIndirect(int[] perm,
boolean[] x)
Sorts an array according to the natural ascending order using a parallel indirect quicksort.
|
static void |
parallelQuickSortIndirect(int[] perm,
boolean[] x,
int from,
int to)
Sorts the specified range of elements according to the natural ascending order using a parallel indirect quicksort.
|
static void |
quickSort(boolean[] x)
Sorts an array according to the natural ascending order using quicksort.
|
static void |
quickSort(boolean[] x,
boolean[] y)
Sorts two arrays according to the natural lexicographical ascending order using quicksort.
|
static void |
quickSort(boolean[] x,
boolean[] y,
int from,
int to)
Sorts the specified range of elements of two arrays according to the natural lexicographical
ascending order using quicksort.
|
static void |
quickSort(boolean[] x,
BooleanComparator comp)
Sorts an array according to the order induced by the specified
comparator using quicksort.
|
static void |
quickSort(boolean[] x,
int from,
int to)
Sorts the specified range of elements according to the natural ascending order using quicksort.
|
static void |
quickSort(boolean[] x,
int from,
int to,
BooleanComparator comp)
Sorts the specified range of elements according to the order induced by the specified
comparator using quicksort.
|
static void |
quickSortIndirect(int[] perm,
boolean[] x)
Sorts an array according to the natural ascending order using indirect quicksort.
|
static void |
quickSortIndirect(int[] perm,
boolean[] x,
int from,
int to)
Sorts the specified range of elements according to the natural ascending order using indirect quicksort.
|
static boolean[] |
reverse(boolean[] a)
Reverses the order of the elements in the specified array.
|
static boolean[] |
reverse(boolean[] a,
int from,
int to)
Reverses the order of the elements in the specified array fragment.
|
static boolean[] |
setLength(boolean[] array,
int length)
Sets the length of the given array.
|
static boolean[] |
shuffle(boolean[] a,
int from,
int to,
java.util.Random random)
Shuffles the specified array fragment using the specified pseudorandom number generator.
|
static boolean[] |
shuffle(boolean[] a,
java.util.Random random)
Shuffles the specified array using the specified pseudorandom number generator.
|
static void |
stabilize(int[] perm,
boolean[] x)
Stabilizes a permutation.
|
static void |
stabilize(int[] perm,
boolean[] x,
int from,
int to)
Stabilizes a permutation.
|
static void |
swap(boolean[] x,
int a,
int b)
Swaps two elements of an anrray.
|
static void |
swap(boolean[] x,
int a,
int b,
int n)
Swaps two sequences of elements of an array.
|
static boolean[] |
trim(boolean[] array,
int length)
Trims the given array to the given length.
|
public static final boolean[] EMPTY_ARRAY
public static final Hash.Strategy<boolean[]> HASH_STRATEGY
This hash strategy may be used in custom hash collections whenever keys are
arrays, and they must be considered equal by content. This strategy
will handle null
correctly, and it is serializable.
public static boolean[] ensureCapacity(boolean[] array, int length)
If you cannot foresee whether this array will need again to be
enlarged, you should probably use grow()
instead.
array
- an array.length
- the new minimum length for this array.array
, if it contains length
entries or more; otherwise,
an array with length
entries whose first array.length
entries are the same as those of array
.public static boolean[] ensureCapacity(boolean[] array, int length, int preserve)
array
- an array.length
- the new minimum length for this array.preserve
- the number of elements of the array that must be preserved in case a new allocation is necessary.array
, if it can contain length
entries or more; otherwise,
an array with length
entries whose first preserve
entries are the same as those of array
.public static boolean[] grow(boolean[] array, int length)
If you want complete control on the array growth, you
should probably use ensureCapacity()
instead.
array
- an array.length
- the new minimum length for this array.array
, if it can contain length
entries; otherwise, an array with
max(length
,array.length
/φ) entries whose first
array.length
entries are the same as those of array
.public static boolean[] grow(boolean[] array, int length, int preserve)
If you want complete control on the array growth, you
should probably use ensureCapacity()
instead.
array
- an array.length
- the new minimum length for this array.preserve
- the number of elements of the array that must be preserved in case a new allocation is necessary.array
, if it can contain length
entries; otherwise, an array with
max(length
,array.length
/φ) entries whose first
preserve
entries are the same as those of array
.public static boolean[] trim(boolean[] array, int length)
array
- an array.length
- the new maximum length for the array.array
, if it contains length
entries or less; otherwise, an array with
length
entries whose entries are the same as
the first length
entries of array
.public static boolean[] setLength(boolean[] array, int length)
array
- an array.length
- the new length for the array.array
, if it contains exactly length
entries; otherwise, if it contains more than
length
entries, an array with length
entries
whose entries are the same as the first length
entries of
array
; otherwise, an array with length
entries
whose first array.length
entries are the same as those of
array
.public static boolean[] copy(boolean[] array, int offset, int length)
array
- an array.offset
- the first element to copy.length
- the number of elements to copy.length
elements of array
starting at offset
.public static boolean[] copy(boolean[] array)
array
- an array.array
.@Deprecated public static void fill(boolean[] array, boolean value)
Arrays
method.array
- an array.value
- the new value for all elements of the array.@Deprecated public static void fill(boolean[] array, int from, int to, boolean value)
Arrays
method.array
- an array.from
- the starting index of the portion to fill (inclusive).to
- the end index of the portion to fill (exclusive).value
- the new value for all elements of the specified portion of the array.@Deprecated public static boolean equals(boolean[] a1, boolean[] a2)
Arrays
method, which is intrinsified in recent JVMs.a1
- an array.a2
- another array.public static void ensureFromTo(boolean[] a, int from, int to)
This method may be used whenever an array range check is needed.
a
- an array.from
- a start index (inclusive).to
- an end index (exclusive).java.lang.IllegalArgumentException
- if from
is greater than to
.java.lang.ArrayIndexOutOfBoundsException
- if from
or to
are greater than the array length or negative.public static void ensureOffsetLength(boolean[] a, int offset, int length)
This method may be used whenever an array range check is needed.
a
- an array.offset
- a start index.length
- a length (the number of elements in the range).java.lang.IllegalArgumentException
- if length
is negative.java.lang.ArrayIndexOutOfBoundsException
- if offset
is negative or offset
+length
is greater than the array length.public static void ensureSameLength(boolean[] a, boolean[] b)
a
- an array.b
- another array.java.lang.IllegalArgumentException
- if the two argument arrays are not of the same length.public static void swap(boolean[] x, int a, int b)
x
- an array.a
- a position in x
.b
- another position in x
.public static void swap(boolean[] x, int a, int b, int n)
x
- an array.a
- a position in x
.b
- another position in x
.n
- the number of elements to exchange starting at a
and b
.public static void quickSort(boolean[] x, int from, int to, BooleanComparator comp)
The sorting algorithm is a tuned quicksort adapted from Jon L. Bentley and M. Douglas McIlroy, “Engineering a Sort Function”, Software: Practice and Experience, 23(11), pages 1249−1265, 1993.
Note that this implementation does not allocate any object, contrarily to the implementation
used to sort primitive types in Arrays
, which switches to mergesort on large inputs.
x
- the array to be sorted.from
- the index of the first element (inclusive) to be sorted.to
- the index of the last element (exclusive) to be sorted.comp
- the comparator to determine the sorting order.public static void quickSort(boolean[] x, BooleanComparator comp)
The sorting algorithm is a tuned quicksort adapted from Jon L. Bentley and M. Douglas McIlroy, “Engineering a Sort Function”, Software: Practice and Experience, 23(11), pages 1249−1265, 1993.
Note that this implementation does not allocate any object, contrarily to the implementation
used to sort primitive types in Arrays
, which switches to mergesort on large inputs.
x
- the array to be sorted.comp
- the comparator to determine the sorting order.public static void parallelQuickSort(boolean[] x, int from, int to, BooleanComparator comp)
The sorting algorithm is a tuned quicksort adapted from Jon L. Bentley and M. Douglas McIlroy, “Engineering a Sort Function”, Software: Practice and Experience, 23(11), pages 1249−1265, 1993.
This implementation uses a ForkJoinPool
executor service with
Runtime.availableProcessors()
parallel threads.
x
- the array to be sorted.from
- the index of the first element (inclusive) to be sorted.to
- the index of the last element (exclusive) to be sorted.comp
- the comparator to determine the sorting order.public static void parallelQuickSort(boolean[] x, BooleanComparator comp)
The sorting algorithm is a tuned quicksort adapted from Jon L. Bentley and M. Douglas McIlroy, “Engineering a Sort Function”, Software: Practice and Experience, 23(11), pages 1249−1265, 1993.
This implementation uses a ForkJoinPool
executor service with
Runtime.availableProcessors()
parallel threads.
x
- the array to be sorted.comp
- the comparator to determine the sorting order.public static void quickSort(boolean[] x, int from, int to)
The sorting algorithm is a tuned quicksort adapted from Jon L. Bentley and M. Douglas McIlroy, “Engineering a Sort Function”, Software: Practice and Experience, 23(11), pages 1249−1265, 1993.
Note that this implementation does not allocate any object, contrarily to the implementation
used to sort primitive types in Arrays
, which switches to mergesort on large inputs.
x
- the array to be sorted.from
- the index of the first element (inclusive) to be sorted.to
- the index of the last element (exclusive) to be sorted.public static void quickSort(boolean[] x)
The sorting algorithm is a tuned quicksort adapted from Jon L. Bentley and M. Douglas McIlroy, “Engineering a Sort Function”, Software: Practice and Experience, 23(11), pages 1249−1265, 1993.
Note that this implementation does not allocate any object, contrarily to the implementation
used to sort primitive types in Arrays
, which switches to mergesort on large inputs.
x
- the array to be sorted.public static void parallelQuickSort(boolean[] x, int from, int to)
The sorting algorithm is a tuned quicksort adapted from Jon L. Bentley and M. Douglas McIlroy, “Engineering a Sort Function”, Software: Practice and Experience, 23(11), pages 1249−1265, 1993.
This implementation uses a ForkJoinPool
executor service with
Runtime.availableProcessors()
parallel threads.
x
- the array to be sorted.from
- the index of the first element (inclusive) to be sorted.to
- the index of the last element (exclusive) to be sorted.public static void parallelQuickSort(boolean[] x)
The sorting algorithm is a tuned quicksort adapted from Jon L. Bentley and M. Douglas McIlroy, “Engineering a Sort Function”, Software: Practice and Experience, 23(11), pages 1249−1265, 1993.
This implementation uses a ForkJoinPool
executor service with
Runtime.availableProcessors()
parallel threads.
x
- the array to be sorted.public static void quickSortIndirect(int[] perm, boolean[] x, int from, int to)
The sorting algorithm is a tuned quicksort adapted from Jon L. Bentley and M. Douglas McIlroy, “Engineering a Sort Function”, Software: Practice and Experience, 23(11), pages 1249−1265, 1993.
This method implement an indirect sort. The elements of perm
(which must
be exactly the numbers in the interval [0..perm.length)
) will be permuted so that
x[perm[i]] ≤ x[perm[i + 1]]
.
Note that this implementation does not allocate any object, contrarily to the implementation
used to sort primitive types in Arrays
, which switches to mergesort on large inputs.
perm
- a permutation array indexing x
.x
- the array to be sorted.from
- the index of the first element (inclusive) to be sorted.to
- the index of the last element (exclusive) to be sorted.public static void quickSortIndirect(int[] perm, boolean[] x)
The sorting algorithm is a tuned quicksort adapted from Jon L. Bentley and M. Douglas McIlroy, “Engineering a Sort Function”, Software: Practice and Experience, 23(11), pages 1249−1265, 1993.
This method implement an indirect sort. The elements of perm
(which must
be exactly the numbers in the interval [0..perm.length)
) will be permuted so that
x[perm[i]] ≤ x[perm[i + 1]]
.
Note that this implementation does not allocate any object, contrarily to the implementation
used to sort primitive types in Arrays
, which switches to mergesort on large inputs.
perm
- a permutation array indexing x
.x
- the array to be sorted.public static void parallelQuickSortIndirect(int[] perm, boolean[] x, int from, int to)
The sorting algorithm is a tuned quicksort adapted from Jon L. Bentley and M. Douglas McIlroy, “Engineering a Sort Function”, Software: Practice and Experience, 23(11), pages 1249−1265, 1993.
This method implement an indirect sort. The elements of perm
(which must
be exactly the numbers in the interval [0..perm.length)
) will be permuted so that
x[perm[i]] ≤ x[perm[i + 1]]
.
This implementation uses a ForkJoinPool
executor service with
Runtime.availableProcessors()
parallel threads.
perm
- a permutation array indexing x
.x
- the array to be sorted.from
- the index of the first element (inclusive) to be sorted.to
- the index of the last element (exclusive) to be sorted.public static void parallelQuickSortIndirect(int[] perm, boolean[] x)
The sorting algorithm is a tuned quicksort adapted from Jon L. Bentley and M. Douglas McIlroy, “Engineering a Sort Function”, Software: Practice and Experience, 23(11), pages 1249−1265, 1993.
This method implement an indirect sort. The elements of perm
(which must
be exactly the numbers in the interval [0..perm.length)
) will be permuted so that
x[perm[i]] ≤ x[perm[i + 1]]
.
This implementation uses a ForkJoinPool
executor service with
Runtime.availableProcessors()
parallel threads.
perm
- a permutation array indexing x
.x
- the array to be sorted.public static void stabilize(int[] perm, boolean[] x, int from, int to)
This method can be used to stabilize the permutation generated by an indirect sorting, assuming that
initially the permutation array was in ascending order (e.g., the identity, as usually happens). This method
scans the permutation, and for each non-singleton block of elements with the same associated values in x
,
permutes them in ascending order. The resulting permutation corresponds to a stable sort.
Usually combining an unstable indirect sort and this method is more efficient than using a stable sort, as most stable sort algorithms require a support array.
More precisely, assuming that x[perm[i]] ≤ x[perm[i + 1]]
, after
stabilization we will also have that x[perm[i]] = x[perm[i + 1]]
implies
perm[i] ≤ perm[i + 1]
.
perm
- a permutation array indexing x
so that it is sorted.x
- the sorted array to be stabilized.from
- the index of the first element (inclusive) to be stabilized.to
- the index of the last element (exclusive) to be stabilized.public static void stabilize(int[] perm, boolean[] x)
This method can be used to stabilize the permutation generated by an indirect sorting, assuming that
initially the permutation array was in ascending order (e.g., the identity, as usually happens). This method
scans the permutation, and for each non-singleton block of elements with the same associated values in x
,
permutes them in ascending order. The resulting permutation corresponds to a stable sort.
Usually combining an unstable indirect sort and this method is more efficient than using a stable sort, as most stable sort algorithms require a support array.
More precisely, assuming that x[perm[i]] ≤ x[perm[i + 1]]
, after
stabilization we will also have that x[perm[i]] = x[perm[i + 1]]
implies
perm[i] ≤ perm[i + 1]
.
perm
- a permutation array indexing x
so that it is sorted.x
- the sorted array to be stabilized.public static void quickSort(boolean[] x, boolean[] y, int from, int to)
The sorting algorithm is a tuned quicksort adapted from Jon L. Bentley and M. Douglas McIlroy, “Engineering a Sort Function”, Software: Practice and Experience, 23(11), pages 1249−1265, 1993.
This method implements a lexicographical sorting of the arguments. Pairs of
elements in the same position in the two provided arrays will be considered a single key, and
permuted accordingly. In the end, either x[i] < x[i + 1]
or x[i]
== x[i + 1]
and y[i] ≤ y[i + 1]
.
x
- the first array to be sorted.y
- the second array to be sorted.from
- the index of the first element (inclusive) to be sorted.to
- the index of the last element (exclusive) to be sorted.public static void quickSort(boolean[] x, boolean[] y)
The sorting algorithm is a tuned quicksort adapted from Jon L. Bentley and M. Douglas McIlroy, “Engineering a Sort Function”, Software: Practice and Experience, 23(11), pages 1249−1265, 1993.
This method implements a lexicographical sorting of the arguments. Pairs of
elements in the same position in the two provided arrays will be considered a single key, and
permuted accordingly. In the end, either x[i] < x[i + 1]
or x[i]
== x[i + 1]
and y[i] ≤ y[i + 1]
.
x
- the first array to be sorted.y
- the second array to be sorted.public static void parallelQuickSort(boolean[] x, boolean[] y, int from, int to)
The sorting algorithm is a tuned quicksort adapted from Jon L. Bentley and M. Douglas McIlroy, “Engineering a Sort Function”, Software: Practice and Experience, 23(11), pages 1249−1265, 1993.
This method implements a lexicographical sorting of the arguments. Pairs of
elements in the same position in the two provided arrays will be considered a single key, and
permuted accordingly. In the end, either x[i] < x[i + 1]
or x[i]
== x[i + 1]
and y[i] ≤ y[i + 1]
.
This implementation uses a ForkJoinPool
executor service with
Runtime.availableProcessors()
parallel threads.
x
- the first array to be sorted.y
- the second array to be sorted.from
- the index of the first element (inclusive) to be sorted.to
- the index of the last element (exclusive) to be sorted.public static void parallelQuickSort(boolean[] x, boolean[] y)
The sorting algorithm is a tuned quicksort adapted from Jon L. Bentley and M. Douglas McIlroy, “Engineering a Sort Function”, Software: Practice and Experience, 23(11), pages 1249−1265, 1993.
This method implements a lexicographical sorting of the arguments. Pairs of
elements in the same position in the two provided arrays will be considered a single key, and
permuted accordingly. In the end, either x[i] < x[i + 1]
or x[i]
== x[i + 1]
and y[i] ≤ y[i + 1]
.
This implementation uses a ForkJoinPool
executor service with
Runtime.availableProcessors()
parallel threads.
x
- the first array to be sorted.y
- the second array to be sorted.public static void mergeSort(boolean[] a, int from, int to, boolean[] supp)
This sort is guaranteed to be stable: equal elements will not be reordered as a result of the sort. Moreover, no support arrays will be allocated.
a
- the array to be sorted.from
- the index of the first element (inclusive) to be sorted.to
- the index of the last element (exclusive) to be sorted.supp
- a support array containing at least to
elements, and whose entries are identical to those
of a
in the specified range.public static void mergeSort(boolean[] a, int from, int to)
This sort is guaranteed to be stable: equal elements will not be reordered as a result
of the sort. An array as large as a
will be allocated by this method.
a
- the array to be sorted.from
- the index of the first element (inclusive) to be sorted.to
- the index of the last element (exclusive) to be sorted.public static void mergeSort(boolean[] a)
This sort is guaranteed to be stable: equal elements will not be reordered as a result
of the sort. An array as large as a
will be allocated by this method.
a
- the array to be sorted.public static void mergeSort(boolean[] a, int from, int to, BooleanComparator comp, boolean[] supp)
This sort is guaranteed to be stable: equal elements will not be reordered as a result of the sort. Moreover, no support arrays will be allocated.
a
- the array to be sorted.from
- the index of the first element (inclusive) to be sorted.to
- the index of the last element (exclusive) to be sorted.comp
- the comparator to determine the sorting order.supp
- a support array containing at least to
elements, and whose entries are identical to those
of a
in the specified range.public static void mergeSort(boolean[] a, int from, int to, BooleanComparator comp)
This sort is guaranteed to be stable: equal elements will not be reordered as a result
of the sort. An array as large as a
will be allocated by this method.
a
- the array to be sorted.from
- the index of the first element (inclusive) to be sorted.to
- the index of the last element (exclusive) to be sorted.comp
- the comparator to determine the sorting order.public static void mergeSort(boolean[] a, BooleanComparator comp)
This sort is guaranteed to be stable: equal elements will not be reordered as a result
of the sort. An array as large as a
will be allocated by this method.
a
- the array to be sorted.comp
- the comparator to determine the sorting order.public static boolean[] shuffle(boolean[] a, int from, int to, java.util.Random random)
a
- the array to be shuffled.from
- the index of the first element (inclusive) to be shuffled.to
- the index of the last element (exclusive) to be shuffled.random
- a pseudorandom number generator (please use a XorShift* generator).a
.public static boolean[] shuffle(boolean[] a, java.util.Random random)
a
- the array to be shuffled.random
- a pseudorandom number generator (please use a XorShift* generator).a
.public static boolean[] reverse(boolean[] a)
a
- the array to be reversed.a
.public static boolean[] reverse(boolean[] a, int from, int to)
a
- the array to be reversed.from
- the index of the first element (inclusive) to be reversed.to
- the index of the last element (exclusive) to be reversed.a
.Copyright © 2019. All rights reserved.


Package com.google.zxing.oned
package com.google.zxing.oned
-
ClassDescriptionDecodes Codabar barcodes.This class renders CodaBar as
boolean[]
.Decodes Code 128 barcodes.This object renders a CODE128 code as aBitMatrix
.Decodes Code 39 barcodes.This object renders a CODE39 code as aBitMatrix
.Decodes Code 93 barcodes.This object renders a CODE93 code as a BitMatrixImplements decoding of the EAN-13 format.This object renders an EAN13 code as aBitMatrix
.Implements decoding of the EAN-8 format.This object renders an EAN8 code as aBitMatrix
.Implements decoding of the ITF format, or Interleaved Two of Five.This object renders a ITF code as aBitMatrix
.A reader that can read all available UPC/EAN formats.Encapsulates functionality and implementation that is common to one-dimensional barcodes.Encapsulates functionality and implementation that is common to all families of one-dimensional barcodes.Implements decoding of the UPC-A format.This object renders a UPC-A code as aBitMatrix
.Encapsulates functionality and implementation that is common to UPC and EAN families of one-dimensional barcodes.Encapsulates functionality and implementation that is common to UPC and EAN families of one-dimensional barcodes.Implements decoding of the UPC-E format.This object renders an UPC-E code as aBitMatrix
.


Snyk test report
Regular Expression Denial of Service (ReDoS)
Detailed paths
Overview
brace-expansion
is a package that performs brace expansion as known from sh/bash.
Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) attacks.
Running:
const expand = require('brace-expansion');
expand('{,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\n}')
Will hang for long periods of time.
Details
The Regular expression Denial of Service (ReDoS) is a type of Denial of Service attack. Many Regular Expression implementations may reach edge cases that causes them to work very slowly (exponentially related to input size), allowing an attacker to exploit this and can cause the program to enter these extreme situations by using a Regex string and cause the service to hang for a large periods of time.
You can read more about Regular Expression Denial of Service (ReDoS)
on our blog.
Remediation
Upgrade brace-expansion
to version 1.1.7 or higher.
References
Remote Code Execution
Detailed paths
Overview
ejs
is a popular JavaScript templating engine.
Affected versions of the package are vulnerable to Remote Code Execution by letting the attacker under certain conditions control the source folder from which the engine renders include files.
You can read more about this vulnerability on the Snyk blog.
There's also a Cross-site Scripting & Denial of Service vulnerabilities caused by the same behaviour.
Details
ejs
provides a few different options for you to render a template, two being very similar: ejs.render()
and ejs.renderFile()
. The only difference being that render
expects a string to be used for the template and renderFile
expects a path to a template file.
Both functions can be invoked in two ways. The first is calling them with template
, data
, and options
:
ejs.render(str, data, options);
ejs.renderFile(filename, data, options, callback)
The second way would be by calling only the template
and data
, while ejs
lets the options
be passed as part of the data
:
ejs.render(str, dataAndOptions);
ejs.renderFile(filename, dataAndOptions, callback)
If used with a variable list supplied by the user (e.g. by reading it from the URI with qs
or equivalent), an attacker can control ejs
options. This includes the root
option, which allows changing the project root for includes with an absolute path.
ejs.renderFile('my-template', {root:'/bad/root/'}, callback);
By passing along the root directive in the line above, any includes would now be pulled from /bad/root
instead of the path intended. This allows the attacker to take control of the root directory for included scripts and divert it to a library under his control, thus leading to remote code execution.
The fix introduced in version 2.5.3
blacklisted root
options from options passed via the data
object.
Disclosure Timeline
- November 27th, 2016 - Reported the issue to package owner.
- November 27th, 2016 - Issue acknowledged by package owner.
- November 28th, 2016 - Issue fixed and version
2.5.3
released.
Remediation
The vulnerability can be resolved by using the GitHub integration to generate a pull-request from your dashboard or ignored by running snyk ignore
from the command-line interface.
Otherwise, Upgrade ejs
to version 2.5.3
or higher.
References
Cross-site Scripting (XSS)
Detailed paths
Overview
ejs
is a popular JavaScript templating engine.
Affected versions of the package are vulnerable to Cross-site Scripting by letting the attacker under certain conditions control and override the filename
option causing it to render the value as is, without escaping it.
You can read more about this vulnerability on the Snyk blog.
There's also a Remote Code Execution & Denial of Service vulnerabilities caused by the same behaviour.
Details
ejs
provides a few different options for you to render a template, two being very similar: ejs.render()
and ejs.renderFile()
. The only difference being that render
expects a string to be used for the template and renderFile
expects a path to a template file.
Both functions can be invoked in two ways. The first is calling them with template
, data
, and options
:
ejs.render(str, data, options);
ejs.renderFile(filename, data, options, callback)
The second way would be by calling only the template
and data
, while ejs
lets the options
be passed as part of the data
:
ejs.render(str, dataAndOptions);
ejs.renderFile(filename, dataAndOptions, callback)
If used with a variable list supplied by the user (e.g. by reading it from the URI with qs
or equivalent), an attacker can control ejs
options. This includes the filename
option, which will be rendered as is when an error occurs during rendering.
ejs.renderFile('my-template', {filename:'<script>alert(1)</script>'}, callback);
The fix introduced in version 2.5.3
blacklisted root
options from options passed via the data
object.
Disclosure Timeline
- November 28th, 2016 - Reported the issue to package owner.
- November 28th, 2016 - Issue acknowledged by package owner.
- December 06th, 2016 - Issue fixed and version
2.5.5
released.
Remediation
The vulnerability can be resolved by using the GitHub integration to generate a pull-request from your dashboard or ignored by running snyk ignore
from the command-line interface.
Otherwise, Upgrade ejs
to version 2.5.5
or higher.
References
Denial of Service (DoS)
Detailed paths
Overview
ejs
is a popular JavaScript templating engine.
Affected versions of the package are vulnerable to Denial of Service by letting the attacker under certain conditions control and override the localNames
option causing it to crash.
You can read more about this vulnerability on the Snyk blog.
There's also a Remote Code Execution & Cross-site Scripting vulnerabilities caused by the same behaviour.
Details
ejs
provides a few different options for you to render a template, two being very similar: ejs.render()
and ejs.renderFile()
. The only difference being that render
expects a string to be used for the template and renderFile
expects a path to a template file.
Both functions can be invoked in two ways. The first is calling them with template
, data
, and options
:
ejs.render(str, data, options);
ejs.renderFile(filename, data, options, callback)
The second way would be by calling only the template
and data
, while ejs
lets the options
be passed as part of the data
:
ejs.render(str, dataAndOptions);
ejs.renderFile(filename, dataAndOptions, callback)
If used with a variable list supplied by the user (e.g. by reading it from the URI with qs
or equivalent), an attacker can control ejs
options. This includes the localNames
option, which will cause the renderer to crash.
ejs.renderFile('my-template', {localNames:'try'}, callback);
The fix introduced in version 2.5.3
blacklisted root
options from options passed via the data
object.
Disclosure Timeline
- November 28th, 2016 - Reported the issue to package owner.
- November 28th, 2016 - Issue acknowledged by package owner.
- December 06th, 2016 - Issue fixed and version
2.5.5
released.
Remediation
The vulnerability can be resolved by using the GitHub integration to generate a pull-request from your dashboard or ignored by running snyk ignore
from the command-line interface.
Otherwise, Upgrade ejs
to version 2.5.5
or higher.
References
Regular Expression Denial of Service (DoS)
Detailed paths
Overview
A Regular expression Denial of Service (ReDoS) vulnerability exists in hawk
package, affecting version 4.1.0 and below.
"The Regular expression Denial of Service (ReDoS) is a Denial of Service attack, that exploits the fact that most Regular Expression implementations may reach extreme situations that cause them to work very slowly (exponentially related to input size). An attacker can then cause a program using a Regular Expression to enter these extreme situations and then hang for a very long time." 1
References
- https://github.com/hueniverse/hawk/issues/168
- https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS
Cross-site Scripting (XSS)
Detailed paths
Overview
jquery
is JavaScript library for DOM operations.
Affected versions of the package are vulnerable to Cross-site Scripting (XSS) attacks when a cross-domain ajax request is performed without the dataType
option causing text/javascript
responses to be executed.
Remediation
Upgrade jquery
to version 3.0.0
or higher.
References
Denial of Service (DoS)
Detailed paths
Overview
jquery
is JavaScript library for DOM operations.
Affected versions of the package are vulnerable to Denial of Service (DoS) due to removing a logic that lowercased attribute names. Any attribute getter using a mixed-cased name for boolean attributes goes into an infinite recursion, exceeding the stack call limit.
Remediation
Upgrade jquery
to version 3.0.0 or higher.
References
Content & Code Injection (XSS)
Detailed paths
Overview
marked
is a markdown parser and compiler used for rendering markdown content to html. It is vulnerable to content injection attack allowing the attacker to bypass its output sanitization (sanitize: true
) protection. Using the HTML Coded Character Set, attackers can inject javascript:
code snippets into the output. For example, the following input javascript֍ocument;alert(1)
will result in alert(1)
being executed when the user clicks on the link.
Remediation
Upgrade marked
to version 0.3.6 or higher.
. Alternatively you can use remarkable
or other markdown libraries.
References
Cross-site Scripting (XSS) via Data URIs
Detailed paths
Overview
marked
is a markdown parser and compiler used for rendering markdown content to html.
Affected versions of the package allowed the use of data:
URIs for all mime types by default potentially opening a door for Cross-site Scripting (XSS) attacks.
Details
Data URIs enable embedding small files in line in HTML documents, provided in the URL itself. Attackers can craft malicious web pages containing either HTML or script code that utilizes the data URI scheme, allowing them to bypass access controls or steal sensitive information.
An example of data URI used to deliver javascript code. The data holds <script>alert('XSS')</script>
tag in base64 encoded format.
[xss link](data:text/html;base64,PHNjcmlwdD5hbGVydCgnWFNTJyk8L3NjcmlwdD4K)
Remediation
The fix is merged to the master branch but not yet published to npm.
References
Regular Expression Denial of Service (DoS)
Detailed paths
Overview
minimatch
is a minimalistic matching library used for converting glob expressions into JavaScript RegExp objects.
An attacker can provide a long value to the minimatch
function, which nearly matches the pattern being matched. This will cause the regular expression matching to take a long time, all the while occupying the event loop and preventing it from processing other requests and making the server unavailable (a Denial of Service attack).
"The Regular expression Denial of Service (ReDoS) is a Denial of Service attack, that exploits the fact that most Regular Expression implementations may reach extreme situations that cause them to work very slowly (exponentially related to input size). An attacker can then cause a program using a Regular Expression to enter these extreme situations and then hang for a very long time." 1
Remediation
Upgrade minimatch
to version 3.0.2
or greater.
References
- https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS
- https://github.com/isaacs/minimatch/commit/6944abf9e0694bd22fd9dad293faa40c2bc8a955
Regular Expression Denial of Service (DoS)
Detailed paths
Overview
moment
is a lightweight JavaScript date library for parsing, validating, manipulating, and formatting dates.
Affected versions of the package are vulnerable to Regular Expression Denial of Service (ReDoS) attacks for any locale that has separate format and standalone options and format
input can be controlled by the user.
An attacker can provide a specially crafted input to the format
function, which nearly matches the pattern being matched. This will cause the regular expression matching to take a long time, all the while occupying the event loop and preventing it from processing other requests and making the server unavailable (a Denial of Service attack).
Disclosure Timeline
- October 19th, 2016 - Reported the issue to package owner.
- October 19th, 2016 - Issue acknowledged by package owner.
- October 24th, 2016 - Issue fixed and version
2.15.2
released.
References
Remote Memory Exposure
Detailed paths
Overview
A potential memory disclosure vulnerability exists in mongoose.
A Buffer
field in a MongoDB document can be used to expose sensitive
information such as code, runtime memory and user data into MongoDB.
Details
Initializing a Buffer
field in a document with integer N
creates a Buffer
of length N
with non zero-ed out memory.
Example:
var x = new Buffer(100); // uninitialized Buffer of length 100
// vs
var x = new Buffer('100'); // initialized Buffer with value of '100'
Initializing a MongoDB document field in such manner will dump uninitialized
memory into MongoDB.
The patch wraps Buffer
field initialization in mongoose by converting a
number
value N
to array [N]
, initializing the Buffer
with N
in its
binary form.
Proof of concept
var mongoose = require('mongoose');
mongoose.connect('mongodb://localhost/bufftest');
// data: Buffer is not uncommon, taken straight from the docs: http://mongoosejs.com/docs/schematypes.html
mongoose.model('Item', new mongoose.Schema({id: String, data: Buffer}));
var Item = mongoose.model('Item');
var sample = new Item();
sample.id = 'item1';
// This will create an uninitialized buffer of size 100
sample.data = 100;
sample.save(function () {
Item.findOne(function (err, result) {
// Print out the data (exposed memory)
console.log(result.data.toString('ascii'))
mongoose.connection.db.dropDatabase(); // Clean up everything
process.exit();
});
});
Remediation
Upgrade mongoose
to version >= 3.8.39 or >= 4.3.6.
References
Regular Expression Denial of Service (DoS)
Detailed paths
Overview
The Regular expression Denial of Service (ReDoS) vulnerability exists in the ms
package, affecting version 0.7.0 and below.
Details
ms
is a milliseconds conversion utility, used to convert a time period string (i.e. "2 days"
, "1h"
) into milliseconds integer.
The regular expression used by the function to parse the time is vulnerable to a denial of service attack, where extremely long strings passed to ms()
can take a long time to process, subsequently blocking the event loop for that extended period.
"The Regular expression Denial of Service (ReDoS) is a Denial of Service attack, that exploits the fact that most Regular Expression implementations may reach extreme situations that cause them to work very slowly (exponentially related to input size). An attacker can then cause a program using a Regular Expression to enter these extreme situations and then hang for a very long time." 1
Remediation
Upgrade ms
to version 0.7.1.
References
Regular Expression Denial of Service (DoS)
Detailed paths
Overview
negotiator
is an HTTP content negotiator for Node.js. Versions prior to 0.6.1
are vulnerable to Regular expression Denial of Service (ReDoS) attack when parsing "Accept-Language" http header.
An attacker can provide a long value in the Accept-Language header, which nearly matches the pattern being matched. This will cause the regular expression matching to take a long time, all the while occupying the thread and preventing it from processing other requests. By repeatedly sending multiple such requests, the attacker can make the server unavailable (a Denial of Service attack).
Details
The Regular expression Denial of Service (ReDoS) is a Denial of Service attack, that exploits the fact that most Regular Expression implementations may reach extreme situations that cause them to work very slowly (exponentially related to input size). An attacker can then cause a program using a Regular Expression to enter these extreme situations and then hang for a very long time. [1]
Remediation
Upgrade negotiator
to to version 0.6.1
or greater.
References
- https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS
- https://github.com/jshttp/negotiator/commit/26a05ec15cf7d1fa56000d66ebe9c9a1a62cb75c
Prototype Override Protection Bypass
Detailed paths
Overview
qs
is a querystring parser that supports nesting and arrays, with a depth limit.
By default qs
protects against attacks that attempt to overwrite an object's existing prototype properties, such as toString()
, hasOwnProperty()
,etc.
From qs
documentation:
By default parameters that would overwrite properties on the object prototype are ignored, if you wish to keep the data from those fields either use plainObjects as mentioned above, or set allowPrototypes to true which will allow user input to overwrite those properties. WARNING It is generally a bad idea to enable this option as it can cause problems when attempting to use the properties that have been overwritten. Always be careful with this option.
Overwriting these properties can impact application logic, potentially allowing attackers to work around security controls, modify data, make the application unstable and more.
In versions of the package affected by this vulnerability, it is possible to circumvent this protection and overwrite prototype properties and functions by prefixing the name of the parameter with [
or ]
. e.g. qs.parse("]=toString")
will return {toString = true}
, as a result, calling toString()
on the object will throw an exception.
Example:
qs.parse('toString=foo', { allowPrototypes: false })
// {}
qs.parse("]=toString", { allowPrototypes: false })
// {toString = true} <== prototype overwritten
For more information, you can check out our blog.
Disclosure Timeline
- February 13th, 2017 - Reported the issue to package owner.
- February 13th, 2017 - Issue acknowledged by package owner.
- February 16th, 2017 - Partial fix released in versions
6.0.3
,6.1.1
,6.2.2
,6.3.1
. - March 6th, 2017 - Final fix released in versions
6.4.0
,6.3.2
,6.2.3
,6.1.2
and6.0.4
Remediation
Upgrade qs
to version 6.4.0
or higher.
Note: The fix was backported to the following versions 6.3.2
, 6.2.3
, 6.1.2
, 6.0.4
.
References
Remote Memory Exposure
Detailed paths
Overview
request
is a simplified http request client.
A potential remote memory exposure vulnerability exists in request
. If a request
uses a multipart attachment and the body type option is number
with value X, then X bytes of uninitialized memory will be sent in the body of the request.
Note that while the impact of this vulnerability is high (memory exposure), exploiting it is likely difficult, as the attacker needs to somehow control the body type of the request. One potential exploit scenario is when a request is composed based on JSON input, including the body type, allowing a malicious JSON to trigger the memory leak.
Details
Constructing a Buffer
class with integer N
creates a Buffer
of length N
with non zero-ed out memory.
Example:
var x = new Buffer(100); // uninitialized Buffer of length 100
// vs
var x = new Buffer('100'); // initialized Buffer with value of '100'
Initializing a multipart body in such manner will cause uninitialized memory to be sent in the body of the request.
Proof of concept
var http = require('http')
var request = require('request')
http.createServer(function (req, res) {
var data = ''
req.setEncoding('utf8')
req.on('data', function (chunk) {
console.log('data')
data += chunk
})
req.on('end', function () {
// this will print uninitialized memory from the client
console.log('Client sent:\n', data)
})
res.end()
}).listen(8000)
request({
method: 'POST',
uri: 'http://localhost:8000',
multipart: [{ body: 1000 }]
},
function (err, res, body) {
if (err) return console.error('upload failed:', err)
console.log('sent')
})
Remediation
Upgrade request
to version 2.68.0 or higher.
References
semver Regular Expression Denial of Service (DoS)
Detailed paths
Overview
The semver module uses regular expressions when parsing a version string. For a carefully crafted input, the time it takes to process these regular expressions is not linear to the length of the input. Since the semver module did not enforce a limit on the version string length, an attacker could provide a long string that would take up a large amount of resources, potentially taking a server down. This issue therefore enables a potential Denial of Service attack. This is a slightly differnt variant of a typical Regular Expression Denial of Service (ReDoS) vulnerability.
Remediation
Update to a version 4.3.2 or greater. From the issue description [2]: "Package version can no longer be more than 256 characters long. This prevents a situation in which parsing the version number can use exponentially more time and memory to parse, leading to a potential denial of service."
References
- [1] https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS
- [2] https://github.com/npm/npm/releases/tag/v2.7.5
Directory Traversal
Detailed paths
Overview
Versions prior to 0.2.5 did not properly prevent path traversal. Literal dots in a path were resolved out, but url encoded dots were not. Thus, a request like /%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/etc/passwd
would leak sensitive files and data from the server.
As of version 0.2.5, any '/../'
in the request path, urlencoded or not, will be replaced with '/'
. If your application depends on url traversal, then you are encouraged to please refactor so that you do not depend on having ..
in url paths, as this tends to expose data that you may be surprised to be exposing.
Remediation
Upgrade to version 0.2.5 or greater.
References
- https://github.com/isaacs/st#security-status
- http://blog.npmjs.org/post/80277229932/newly-paranoid-maintainers


Cycles of Lanes
问题描述 :
Each of the M lanes of the Park of Polytechnic University of Bucharest connects two of the N crossroads of the park (labeled from 1 to N). There is no pair of crossroads connected by more than one lane and it is possible to pass from each crossroad to each other crossroad by a path composed of one or more lanes. A cycle of lanes is simple when passes through each of its crossroads exactly once.
The administration of the University would like to put on the lanes pictures of the winners of Regional Collegiate Programming Contest in such way that the pictures of winners from the same university to be on the lanes of a same simple cycle. That is why the administration would like to assign the longest simple cycles of lanes to most successful universities. The problem is to find the longest cycles? Fortunately, it happens that each lane of the park is participating in no more than one simple cycle (see the Figure).
The administration of the University would like to put on the lanes pictures of the winners of Regional Collegiate Programming Contest in such way that the pictures of winners from the same university to be on the lanes of a same simple cycle. That is why the administration would like to assign the longest simple cycles of lanes to most successful universities. The problem is to find the longest cycles? Fortunately, it happens that each lane of the park is participating in no more than one simple cycle (see the Figure).
输入:
On the first line of the input file the number T of the test cases will be given. Each test case starts with a line with the positive integers N and M, separated by interval (4 <= N <= 4444). Each of the next M lines of the test case contains the labels of one of the pairs of crossroads connected by a lane.
输出:
For each of the test cases, on a single line of the output, print the length of a maximal simple cycle.
样例输入:
1 7 8 3 4 1 4 1 3 7 1 2 7 7 5 5 6 6 2
样例输出:
4
解题代码:
import java.util.ArrayList; import java.util.Arrays; import java.util.Scanner; import java.util.List; public class Main { private int n;//顶点个数 private boolean[] used;//节点状态,值为false的是未访问的 private List< ArrayList< Integer>> G;//邻接表 private int maxlen=0;//最小环的长度 private int[] num;//记录搜索到某顶点时已搜索过的顶点数 public Main(int n,List< ArrayList< Integer>> G){ this.n=n; this.G=G; used=new boolean[n+1]; num=new int[n+1]; } private void dfs(int v, int t) { num[v] = t; //搜索到v时,已搜索过的顶点数 used[v] = true; int x = G.get(v).size(); for(int i = 0; i < x; i++){ //对V的每一个邻接点 if(!used[G.get(v).get(i)]){ //没有发现环 dfs(G.get(v).get(i), t + 1); } else //发现环 { if(maxlen < num[v] - num[G.get(v).get(i)] + 1) maxlen = num[v] - num[G.get(v).get(i)] + 1; } } } public void go(){ for(int i = 1; i <= n; i++){ //遍历每一个顶点 if(!used[i]) dfs(i, 1); //深度优先搜索 } if(maxlen > 2) System.out.printf("%d\n", maxlen); else System.out.println("0"); } public static void main(String[] args) { Scanner sc = new Scanner(System.in); int t=sc.nextInt(); while(t-->0){ int n=sc.nextInt(); int m=sc.nextInt(); List< ArrayList< Integer>> G; G = new ArrayList< ArrayList< Integer>>();//初始化邻接表 for(int i = 1;i<=n+1;i++) G.add(new ArrayList< Integer>()); for(int i=0;i< m;i++){ int u = sc.nextInt(); int v = sc.nextInt(); G.get(u).add(v); G.get(v).add(u); } Main ma=new Main(n,G); ma.go(); } } }
(adsbygoogle = window.adsbygoogle || []).push({});
Good task for the group. Hold it up for every yeara??s winner. This is a excellent oppotunity for a lot more enhancement. Indeed, obtaining far better and much better is constantly the crucial. Just like my pal suggests on the truth about ab muscles, he just keeps obtaining much better.
aha, welcome!
居然看懂了
写的好····· Pollard Rho快速因数分解
感觉我好像很多都不会做。。。。
总数为2n，遍历到第n个，就是中间的位置
DFS方法的原理还是不太清楚啊
a是根先忽略掉，递归子树。剩下前缀bejkcfghid和后缀jkebfghicd，分拆的原则的是每个子树前缀和后缀的节点个数是一样的，根节点出现在前缀的第一个，后缀的最后一个。根节点b出现后缀的第四个位置，则第一部分为四个节点，前缀bejk，后缀jkeb，剩下的c出现在后缀的倒数第2个，就划分为cfghi和 fghic，第3部分就为c、c
有点意思
多谢支持！
打字员路过。。。。。。算法是啥。。。能干嘛。。。。。。。。能吃么。。哎
第15行代码，/n/n，应该改为\n\n
有些说不通吧，只有1个孩子肯定是男孩了
97行缺一个分号


Healthy Living
Home
BMI
Exercise
Products
Recipes
Breakfast
Lunch
Dinner
Contact
Eat Good, Feel Good
List of products sold by us
To help your Healthy Lifestyle.
@(Product: List[models.Products]) @main("Products") { @if(flash.containsKey("success")) {
@flash.get("success")
}
ID
name
price
stock
@for(p <- products) {
@p.getId
@p.getName
€ @("%.2f".format(p.getPrice))
@p.getStock
}
Add a Product


{% extends '1layout.html' %} {% block body %}
$341
$261
$134
Lorem Ipsum is simply dummy text of the printing and typesetting industry. the Lorem Ipsum has been the industry's standard dummy text ever since the you.


WEBVTT 00:11.000 --> 00:13.000 vertical:rl We are in New York City 00:13.000 --> 00:16.000 We're actually at the Lucern Hotel, just down the street 00:16.000 --> 00:18.000 from the American Museum of Natural History 00:18.000 --> 00:20.000 And with me is Neil deGrasse Tyson 00:20.000 --> 00:22.000 Astrophysicist, Director of the Hayden Planetarium
Kind: subtitles/captions/descriptions metadata chapters
You need JavaScript for this service.
Source code available under CC0.


Trading_FeedbackSummaryType Class Reference
| Inherits from | NSObject |
| Conforms to | PicoBindable |
| Declared in | Trading_FeedbackSummaryType.h Trading_FeedbackSummaryType.m |
Overview
Specifies all feedback summary information (except Score). Contains
FeedbackPeriodArrayType objects that each convey feedback counts for positive,
negative, neutral, and total feedback counts - for various time periods each. Also
conveys counts of bid retractions for the predefined time periods.
@ingroup EBayAPIInterface
Tasks
-
bidRetractionFeedbackPeriodArray
Bid retractions count, for multiple predefined time periods preceding
property
the call. Returned if no detail level is specified. -
negativeFeedbackPeriodArray
Negative feedback entries count, for multiple predefined time periods preceding
property
the call. Returned if no detail level is specified. -
neutralFeedbackPeriodArray
Neutral feedback entries count, for multiple predefined time periods preceding
property
the call. Returned if no detail level is specified. -
positiveFeedbackPeriodArray
Positive feedback entries count, for multiple predefined time periods
property
preceding the call. Returned if no detail level is specified. -
totalFeedbackPeriodArray
Total feedback score, for multiple predefined time periods preceding the
property
call. Returned if no detail level is specified. -
neutralCommentCountFromSuspendedUsers
Number of neutral comments received from suspended users. Returned if no
property
detail level is specified. -
uniqueNegativeFeedbackCount
Total number of negative Feedback comments, including weekly repeats. Returned if no detail level is specified.
property -
uniquePositiveFeedbackCount
Total number of positive Feedback comments, including weekly repeats. Returned if no detail level is specified.
property -
uniqueNeutralFeedbackCount
Total number of neutral Feedback comments, including weekly repeats. Returned if no detail level is specified.
property -
sellerRatingSummaryArray
Container for information about detailed seller ratings (DSRs)
property
that buyers have left for a seller.
Sellers have access to the number of ratings they’ve received, as well as
to the averages of DSRs they’ve received in each
DSR area (i.e., to the average of ratings in the item-description area, etc.).
The DSR feature is available on the United Kingdom site
and on the following other sites: AU (site ID 15), BEFR (site ID 23),
BENL (site ID 123), FR (site ID 71), IE (site ID 205), IN (site ID 203),
IT (site ID 101), and PL (site ID 212). The DSR feature is available on the other
API-enabled country sites, including the US site (site ID 0). -
sellerRoleMetrics
Container for information about 1 year feedback metric as seller.
property -
buyerRoleMetrics
Container for information about 1 year feedback metric as buyer.
property -
any
(public property)
property
Properties
any
(public property)
@property (nonatomic, retain) NSMutableArray *any
Discussion
(public property)
entry type : PicoAnyElement, wrapper for primitive anyelement
Declared In
Trading_FeedbackSummaryType.h
bidRetractionFeedbackPeriodArray
Bid retractions count, for multiple predefined time periods preceding
the call. Returned if no detail level is specified.
@property (nonatomic, retain) Trading_FeedbackPeriodArrayType *bidRetractionFeedbackPeriodArray
Discussion
Bid retractions count, for multiple predefined time periods preceding
the call. Returned if no detail level is specified.
type : class Trading_FeedbackPeriodArrayType
Declared In
Trading_FeedbackSummaryType.h
buyerRoleMetrics
Container for information about 1 year feedback metric as buyer.
@property (nonatomic, retain) Trading_BuyerRoleMetricsType *buyerRoleMetrics
Discussion
Container for information about 1 year feedback metric as buyer.
type : class Trading_BuyerRoleMetricsType
Declared In
Trading_FeedbackSummaryType.h
negativeFeedbackPeriodArray
Negative feedback entries count, for multiple predefined time periods preceding
the call. Returned if no detail level is specified.
@property (nonatomic, retain) Trading_FeedbackPeriodArrayType *negativeFeedbackPeriodArray
Discussion
Negative feedback entries count, for multiple predefined time periods preceding
the call. Returned if no detail level is specified.
type : class Trading_FeedbackPeriodArrayType
Declared In
Trading_FeedbackSummaryType.h
neutralCommentCountFromSuspendedUsers
Number of neutral comments received from suspended users. Returned if no
detail level is specified.
@property (nonatomic, retain) NSNumber *neutralCommentCountFromSuspendedUsers
Discussion
Number of neutral comments received from suspended users. Returned if no
detail level is specified.
type : NSNumber, wrapper for primitive int
Declared In
Trading_FeedbackSummaryType.h
neutralFeedbackPeriodArray
Neutral feedback entries count, for multiple predefined time periods preceding
the call. Returned if no detail level is specified.
@property (nonatomic, retain) Trading_FeedbackPeriodArrayType *neutralFeedbackPeriodArray
Discussion
Neutral feedback entries count, for multiple predefined time periods preceding
the call. Returned if no detail level is specified.
type : class Trading_FeedbackPeriodArrayType
Declared In
Trading_FeedbackSummaryType.h
positiveFeedbackPeriodArray
Positive feedback entries count, for multiple predefined time periods
preceding the call. Returned if no detail level is specified.
@property (nonatomic, retain) Trading_FeedbackPeriodArrayType *positiveFeedbackPeriodArray
Discussion
Positive feedback entries count, for multiple predefined time periods
preceding the call. Returned if no detail level is specified.
type : class Trading_FeedbackPeriodArrayType
Declared In
Trading_FeedbackSummaryType.h
sellerRatingSummaryArray
Container for information about detailed seller ratings (DSRs)
that buyers have left for a seller.
Sellers have access to the number of ratings they’ve received, as well as
to the averages of DSRs they’ve received in each
DSR area (i.e., to the average of ratings in the item-description area, etc.).
The DSR feature is available on the United Kingdom site
and on the following other sites: AU (site ID 15), BEFR (site ID 23),
BENL (site ID 123), FR (site ID 71), IE (site ID 205), IN (site ID 203),
IT (site ID 101), and PL (site ID 212). The DSR feature is available on the other
API-enabled country sites, including the US site (site ID 0).
@property (nonatomic, retain) Trading_SellerRatingSummaryArrayType *sellerRatingSummaryArray
Discussion
Container for information about detailed seller ratings (DSRs)
that buyers have left for a seller.
Sellers have access to the number of ratings they’ve received, as well as
to the averages of DSRs they’ve received in each
DSR area (i.e., to the average of ratings in the item-description area, etc.).
The DSR feature is available on the United Kingdom site
and on the following other sites: AU (site ID 15), BEFR (site ID 23),
BENL (site ID 123), FR (site ID 71), IE (site ID 205), IN (site ID 203),
IT (site ID 101), and PL (site ID 212). The DSR feature is available on the other
API-enabled country sites, including the US site (site ID 0).
type : class Trading_SellerRatingSummaryArrayType
Declared In
Trading_FeedbackSummaryType.h
sellerRoleMetrics
Container for information about 1 year feedback metric as seller.
@property (nonatomic, retain) Trading_SellerRoleMetricsType *sellerRoleMetrics
Discussion
Container for information about 1 year feedback metric as seller.
type : class Trading_SellerRoleMetricsType
Declared In
Trading_FeedbackSummaryType.h
totalFeedbackPeriodArray
Total feedback score, for multiple predefined time periods preceding the
call. Returned if no detail level is specified.
@property (nonatomic, retain) Trading_FeedbackPeriodArrayType *totalFeedbackPeriodArray
Discussion
Total feedback score, for multiple predefined time periods preceding the
call. Returned if no detail level is specified.
type : class Trading_FeedbackPeriodArrayType
Declared In
Trading_FeedbackSummaryType.h
uniqueNegativeFeedbackCount
Total number of negative Feedback comments, including weekly repeats. Returned if no detail level is specified.
@property (nonatomic, retain) NSNumber *uniqueNegativeFeedbackCount
Discussion
Total number of negative Feedback comments, including weekly repeats. Returned if no detail level is specified.
type : NSNumber, wrapper for primitive int
Declared In
Trading_FeedbackSummaryType.h
uniqueNeutralFeedbackCount
Total number of neutral Feedback comments, including weekly repeats. Returned if no detail level is specified.
@property (nonatomic, retain) NSNumber *uniqueNeutralFeedbackCount
Discussion
Total number of neutral Feedback comments, including weekly repeats. Returned if no detail level is specified.
type : NSNumber, wrapper for primitive int
Declared In
Trading_FeedbackSummaryType.h
uniquePositiveFeedbackCount
Total number of positive Feedback comments, including weekly repeats. Returned if no detail level is specified.
@property (nonatomic, retain) NSNumber *uniquePositiveFeedbackCount
Discussion
Total number of positive Feedback comments, including weekly repeats. Returned if no detail level is specified.
type : NSNumber, wrapper for primitive int
Declared In
Trading_FeedbackSummaryType.h


I am currently curious for some ideas on a Cleric Monk Shadowdancer build. I generally see this build as two weapon kama fighters which is under debate as to whether or not that is legal. I personally believe it is. the off hand attacks with flurry are legal at 99% of tabletop d&d games why wouldnt it be legal in a computer game? Anyways, i was curious about anyones ideas for this build. Mostly for PvP usage.


Class Trophies
Game Jolt allows you to add trophies to your games!
Trophies come in four materials: bronze, silver, gold, and platinum. This is to reflect how difficult it is to achieve a trophy. A bronze trophy should be easy to achieve, whereas a platinum trophy should be very hard to achieve.
On Game Jolt, trophies are always listed in order from easiest to most difficult to achieve. You can also tag trophies on the site as "secret". A sercet trophy's image and description is not visible until a gamer has achieved it.Inherited Members
Namespace: GameJolt.Services
Assembly: GameJolt.dll
Syntax
public sealed class Trophies : Service
Methods
| Improve this Doc View SourceFetch(Credentials, Nullable<Boolean>, Int32[], Action<Response<Trophy[]>>)
Returns one trophy or multiple trophies, depending on the parameters passed in.
Declaration
public void Fetch(Credentials credentials, bool? achieved = default(bool? ), int[] ids = null, Action<Response<Trophy[]>> callback = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Credentials | credentials | The user's credentials for which the trophies should be fetched. |
| System.Nullable<System.Boolean> | achieved | Pass in true to return only the achieved trophies for a user. Pass in false to return only trophies the user hasn't achieved. Leave blank (null) to retrieve all trophies. |
| System.Int32[] | ids | You may pass an array of trophy IDs here if you want to return a subset of all the trophies.
Passing a trophy_id will ignore the |
| System.Action<Response<Trophy[]>> | callback | Action that is called on completion or error. |
FetchAsync(Credentials, Nullable<Boolean>, Int32[])
Returns one trophy or multiple trophies, depending on the parameters passed in.
Declaration
public Task<Response<Trophy[]>> FetchAsync(Credentials credentials, bool? achieved = default(bool? ), int[] ids = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Credentials | credentials | The user's credentials for which the trophies should be fetched. |
| System.Nullable<System.Boolean> | achieved | Pass in true to return only the achieved trophies for a user. Pass in false to return only trophies the user hasn't achieved. Leave blank (null) to retrieve all trophies. |
| System.Int32[] | ids | You may pass an array of trophy IDs here if you want to return a subset of all the trophies.
Passing a trophy_id will ignore the |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<Response<Trophy[]>> |
RemoveAchieved(Credentials, Int32, Action<Response>)
Remove a previously achieved trophy for a particular user.
Declaration
public void RemoveAchieved(Credentials credentials, int id, Action<Response> callback = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Credentials | credentials | The user's credentials for which the trophy should be removed. |
| System.Int32 | id | The id of the trophy to remove. |
| System.Action<Response> | callback | Action that is called on completion or error. |
RemoveAchievedAsync(Credentials, Int32)
Remove a previously achieved trophy for a particular user.
Declaration
public Task<Response> RemoveAchievedAsync(Credentials credentials, int id)
Parameters
| Type | Name | Description |
|---|---|---|
| Credentials | credentials | The user's credentials for which the trophy should be removed. |
| System.Int32 | id | The id of the trophy to remove. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<Response> |
SetAchieved(Credentials, Int32, Action<Response>)
Sets a trophy as achieved for a particular user.
Declaration
public void SetAchieved(Credentials credentials, int id, Action<Response> callback = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Credentials | credentials | The user's credentials for which the trophy should be unlocked. |
| System.Int32 | id | The id of the trophy to unlock. |
| System.Action<Response> | callback | Action that is called on completion or error. |
SetAchievedAsync(Credentials, Int32)
Sets a trophy as achieved for a particular user.
Declaration
public Task<Response> SetAchievedAsync(Credentials credentials, int id)
Parameters
| Type | Name | Description |
|---|---|---|
| Credentials | credentials | The user's credentials for which the trophy should be unlocked. |
| System.Int32 | id | The id of the trophy to unlock. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<Response> |


'The Wings of the Dove'
A movie review by Walter Frith
A number of people who read my reviews have recently contacted me and asked why I changed my rating system in my recent reviews of 'Firestorm' and 'The Boxer' from five stars to four. They mentioned to me that they preferred the five star system and suggested that I return to it. I guess if something isn't broken, it shouldn't be fixed, as the old saying goes, so, I will return to the five star rating system I am humbly known for. An now, on with the review.....
A division of society's classes has always offered the opportunity for great film making.
'The Wings of the Dove' is based on the novel by Henry James and is adapted for the screen by Hossein Amini and is set in the Victorian era, 1910 to be exact, and tells a very subtle story of poverty's desperation striving for notoriety and a better way of living. The book is actually set closer to the turn of the century but is moved forward a few years to 1910, perhaps as an attempt to show the more slowly eroding traditions of the 19th century in terms of honour and tradition to the very different social trends the 20th century would bring.
Two British lovers, Kate and Merton (Helena Bonham Carter and Linus Roache) star in this rather cold yet meaningful study of morality and conscience. Kate's mother is deceased and her father is a hopeless alcoholic living in the excesses of poverty. Through the course of their relationship in the film, they meet a young American girl named Millie (Alison Elliott) whom they discover is dying from a disease that is undisclosed to the audience. They find that she is quite wealthy. She meets Merton and later asks Kate what kind of man he is since she is aware they know each other but never counting on the plot that is devised against her by the two of them. Kate and Merton plot for him to marry Millie, suspecting and almost certainly counting on the fact that she will leave her money to him upon her death and Kate and Merton can finally be together enjoying a better way of life. As the film moves on, all the characters eventually know more or less what is happening.
The picture is nurtured and given a very gentle tone courtesy of director Iain Softley who allocates a great amount of detail to the overall quality and outcome of the film. Helena Bonham Carter has won virtually every major critic's award for this film and she has a good shot at the Academy Award.
The Victorian era is paid tribute to in a very flattering manner as everything from the costumes to the set design and the moody photography is given great attention.
'The Wings of the Dove' runs a surprisingly short 108 minutes but because it is such a laid back film with ongoing dialogue that is never boring and is the type of story that is always interesting to watch, it may have done its service as a short but satisfying offering to the medium of film..
OUT OF 5 > * * *
Visit 'FILM FOLLOW-UP' by Walter Frith at:
http://home.netinc.ca/~wfrith/movies.htm
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Revolutionize and redefine your business. Nitro’s technology and business experts use NitroServer to automate and optimize your business. We help you streamline processes to increase quality, efficiency and revenues.
At Nitro, we believe being a smart business means that real-time insights are being used to make better business decisions. We also know that getting those insights requires eliminating the barriers to your data, applications, systems, clouds and devices.
That’s why we designed NitroServer, a user-friendly and intuitive mobilization platform that enables businesses to easily adapt and securely connect back-end systems to mobile applications and the Internet of Things.
To truly be competitive, businesses need to to do one or more of the following:


USD/CAD retreats to 1.3200 area on broad USD weakness
by Eren Sengezer- US President Trump's meeting with FOMC's Powell weighs on USD.
- US Dollar Index extends daily slide toward 97.70.
- Crude oil remains under pressure to help pair keep losses limited.
The USD/CAD pair lost its traction during the American trading hours and fell to a fresh session low of 1.3201 pressured by a broad-based USD weakness. As of writing, the pair was trading at 1.3210, losing 0.1% on a daily basis.
Earlier in the session, the Federal Reserve in a statement announced that the Federal Open Market Committee (FOMC) Chairman Jerome Powell met with US President Donald Trump and Treasury Secretary Steven Mnuchin. Following the meeting, Trump, via Twitter, said that they have discussed "interest rates, negative interest, low inflation, easing, dollar strength."
The US Dollar Index, which tracks the USD's value against a basket of six major currencies, turned south on Trump's comments and was last down 0.26% on the day at 97.75.
Trade headlines push crude oil prices lower
On the other hand, after CNBC's Beijing Bureau Chief, Eunice Yoon, reported that China was pessimistic about reaching a trade deal with the US, crude oil met a fresh selling wave. The barrel of West Texas Intermediate (WTI) broke below the $57 handle and made it difficult for the commodity-related CAD to continue to gather strength. At the moment, the WTI is down 1.85% on the day at $56.70.
There won't be any significant macroeconomic data releases on Thursday and investors will be waiting for Wednesday's inflation report from Canada and FOMC October meeting minutes.
Technical levels to watch for
USD/CAD
| Overview | |
|---|---|
| Today last price | 1.3203 |
| Today Daily Change | -0.0024 |
| Today Daily Change % | -0.18 |
| Today daily open | 1.3227 |
| Trends | |
|---|---|
| Daily SMA20 | 1.3154 |
| Daily SMA50 | 1.3209 |
| Daily SMA100 | 1.3201 |
| Daily SMA200 | 1.3277 |
| Levels | |
|---|---|
| Previous Daily High | 1.3254 |
| Previous Daily Low | 1.3216 |
| Previous Weekly High | 1.3272 |
| Previous Weekly Low | 1.3212 |
| Previous Monthly High | 1.3349 |
| Previous Monthly Low | 1.3042 |
| Daily Fibonacci 38.2% | 1.3231 |
| Daily Fibonacci 61.8% | 1.324 |
| Daily Pivot Point S1 | 1.3211 |
| Daily Pivot Point S2 | 1.3195 |
| Daily Pivot Point S3 | 1.3173 |
| Daily Pivot Point R1 | 1.3249 |
| Daily Pivot Point R2 | 1.3271 |
| Daily Pivot Point R3 | 1.3287 |


| Name | Score |
| Database Management Systems | 30L |
| Computer Architecture | 30 |
| Optimization Methods | 26 |
| Computer Networks | 25 |
| Distributed Programming | N/A |
| Big Data | N/A |
| Name | Score |
| Database Management Systems | 30L |
| Computer Architecture | 30 |
| Optimization Methods | 26 |
| Computer Networks | 25 |
| Distributed Programming | N/A |
| Big Data | N/A |


Components
Purchases
Builds
Sales
Administration
Add new purchase
Add new build
Add new sale
{{getAppTitle(title,document.*)}}
Balance: {{formatPrice(state.balance,2)}}
Remote server
Enable
replication
Database tweaks
Remove orphaned
components
Rebuild database
Ok


| Professor Ben Forbes |
Chair, MPharm Programme Examination Board |
| Dr Richard Parsons |
Deputy Chair, MPharm Programme Examination Board |
| Professor Peter Hylands (until November 2018) |
Senior Tutor |
| Professor Khuloud Al-Jamal |
Erasmus Coordinator |
| Dr Paul Royall |
Careers Liaison |
| Mrs Janique Waghorn |
Academic Placements Coordinator |
| Mrs Rita Shah |
Team-Based Learning (IPE) Pharmacy Lead |
| Year Leaders and Deputy Leaders |
MPharm 1 Science underpinning practice |
Year Leader: Dr Richard Parsons
Professional Lead: Mr Barry Jubraj |
- Biochemical Basis of Therapeutics (4BBP0131)
- Dr Richard Parsons
- Principles of Clinical Care (4BBP0132)
- Miss Lynda Cameron
- Physical Pharmaceutics (4BBP0133)
- Dr Bahijja Raimi-Abraham
- Chemistry of Drugs (4BBP0134)
- Dr Miraz Rahman
|
|
MPharm 2 Science informing practice |
Year Leader: Dr Paul Royall
Professional Lead: Mrs Rita Shah |
- Formulation and Analysis of Drugs (5BBP0259)
- Dr Paul Royall
- Nervous System (5BBP0256)
- Dr Anita Toscani & Mr Barry Jubraj
- Respiratory and Musculoskeletal Systems (5BBP0257)
- Dr Daniele Castagnolo
- Cardiovascular and Renal Systems (5BBP0258)
- Professor Graham Davies
|
|
MPharm 3 Science influencing practice |
Year Leader: Dr Driton Vllasaliu
Professional Lead: Miss Niusha Shekarian |
- Medicines Discovery and Development (6BBP0361)
- Dr Cécile Dreiss
- Gastrointestinal System and Skin (6BBP0362)
- Dr Driton Vllasaliu
- Infection and Pharmaceutical Microbiology (6BBP0363)
- Dr Kenneth Bruce
- Endocrine System and Cancer (6BBP0364)
- Mrs Janique Waghorn
|
|
MPharm 4 Science advancing practice |
Year Leader and Professional Lead: Dr Jig Patel |
- Research Project (7BBP0422)
- Professor Khuloud Al-Jamal
- Emerging Therapeutics and Modern Medicine (7BBP0424)
- Dr Dave Barlow
- Clinical Decision Making (7BBP0423)
- Dr Jig Patel
|
|


The Burj Khalifa, known as the Burj Dubai prior to its inauguration in 2010, is a skyscraper in Dubai, United Arab Emirates
The Dubai Mall is a shopping mall in Dubai. It is the largest mall in the world by total land area, and the 26th-largest shopping mall in the world by gross leasable area, tying with West Edmonton Mall and Fashion Island —both of which are older than it. It has a total retail floor area of 502,000 square metres.
A vast water park in Dubai with zip lines, slides through shark-filled lagoons & a splash area for kids.
Prices start from 7000 USD
Click here to book your spot