Trait providing assertion methods that can be called at compile time from macros to validate literals in source code.
An AnyVal
for positive Double
s.
An AnyVal
for positive Double
s.
Note: a PosDouble
may not equal 0. If you want positive
number or 0, use PosZDouble.
Because PosDouble
is an AnyVal
it
will usually be as efficient as an Double
, being
boxed only when a Double
would have been boxed.
The PosDouble.apply
factory method is
implemented in terms of a macro that checks literals for
validity at compile time. Calling
PosDouble.apply
with a literal
Double
value will either produce a valid
PosDouble
instance at run time or an error at
compile time. Here's an example:
scala> import anyvals._ import anyvals._ scala> PosDouble(1.0) res1: org.scalactic.anyvals.PosDouble = PosDouble(1.0) scala> PosDouble(0.0) <console>:14: error: PosDouble.apply can only be invoked on a positive (i > 0.0) floating point literal, like PosDouble(42.0). PosDouble(0.0) ^
PosDouble.apply
cannot be used if the value
being passed is a variable (i.e., not a literal),
because the macro cannot determine the validity of variables
at compile time (just literals). If you try to pass a
variable to PosDouble.apply
, you'll get a
compiler error that suggests you use a different factor
method, PosDouble.from
, instead:
scala> val x = 1.0 x: Double = 1.0 scala> PosDouble(x) <console>:15: error: PosDouble.apply can only be invoked on a floating point literal, like PosDouble(42.0). Please use PosDouble.from instead. PosDouble(x) ^
The PosDouble.from
factory method will inspect
the value at runtime and return an
Option[PosDouble]
. If the value is valid,
PosDouble.from
will return a
Some[PosDouble]
, else it will return a
None
. Here's an example:
scala> PosDouble.from(x) res4: Option[org.scalactic.anyvals.PosDouble] = Some(PosDouble(1.0)) scala> val y = 0.0 y: Double = 0.0 scala> PosDouble.from(y) res5: Option[org.scalactic.anyvals.PosDouble] = None
The PosDouble.apply
factory method is marked
implicit, so that you can pass literal Double
s
into methods that require PosDouble
, and get the
same compile-time checking you get when calling
PosDouble.apply
explicitly. Here's an example:
scala> def invert(pos: PosDouble): Double = Double.MaxValue - pos invert: (pos: org.scalactic.anyvals.PosDouble)Double scala> invert(1.1) res6: Double = 1.7976931348623157E308 scala> invert(Double.MaxValue) res8: Double = 0.0 scala> invert(0.0) <console>:15: error: PosDouble.apply can only be invoked on a positive (i > 0.0) floating point literal, like PosDouble(42.0). invert(0.0) ^ scala> invert(-1.0) <console>:15: error: PosDouble.apply can only be invoked on a positive (i > 0.0) floating point literal, like PosDouble(42.0). invert(-1.0) ^
This example also demonstrates that the
PosDouble
companion object also defines implicit
widening conversions when a similar conversion is provided in
Scala. This makes it convenient to use a
PosDouble
where a Double
is
needed. An example is the subtraction in the body of the
invert
method defined above,
Double.MaxValue - pos
. Although
Double.MaxValue
is a Double
, which
has no -
method that takes a
PosDouble
(the type of pos
), you
can still subtract pos
, because the
PosDouble
will be implicitly widened to
Double
.
An AnyVal
for positive Float
s.
An AnyVal
for positive Float
s.
Note: a PosFloat
may not equal 0. If you want positive
number or 0, use PosZFloat.
Because PosFloat
is an AnyVal
it
will usually be as efficient as an Float
, being
boxed only when an Float
would have been boxed.
The PosFloat.apply
factory method is implemented
in terms of a macro that checks literals for validity at
compile time. Calling PosFloat.apply
with a
literal Float
value will either produce a valid
PosFloat
instance at run time or an error at
compile time. Here's an example:
scala> import anyvals._ import anyvals._ scala> PosFloat(1.0F) res0: org.scalactic.anyvals.PosFloat = PosFloat(1.0) scala> PosFloat(0.0F) <console>:14: error: PosFloat.apply can only be invoked on a positive (i > 0.0F) floating point literal, like PosFloat(42.0F). PosFloat(0.0F) ^
PosFloat.apply
cannot be used if the value being
passed is a variable (i.e., not a literal), because
the macro cannot determine the validity of variables at
compile time (just literals). If you try to pass a variable
to PosFloat.apply
, you'll get a compiler error
that suggests you use a different factor method,
PosFloat.from
, instead:
scala> val x = 1.0F x: Float = 1.0 scala> PosFloat(x) <console>:15: error: PosFloat.apply can only be invoked on a floating point literal, like PosFloat(42.0F). Please use PosFloat.from instead. PosFloat(x) ^
The PosFloat.from
factory method will inspect
the value at runtime and return an
Option[PosFloat]
. If the value is valid,
PosFloat.from
will return a
Some[PosFloat]
, else it will return a
None
. Here's an example:
scala> PosFloat.from(x) res3: Option[org.scalactic.anyvals.PosFloat] = Some(PosFloat(1.0)) scala> val y = 0.0F y: Float = 0.0 scala> PosFloat.from(y) res4: Option[org.scalactic.anyvals.PosFloat] = None
The PosFloat.apply
factory method is marked
implicit, so that you can pass literal Float
s
into methods that require PosFloat
, and get the
same compile-time checking you get when calling
PosFloat.apply
explicitly. Here's an example:
scala> def invert(pos: PosFloat): Float = Float.MaxValue - pos invert: (pos: org.scalactic.anyvals.PosFloat)Float scala> invert(1.1F) res5: Float = 3.4028235E38 scala> invert(Float.MaxValue) res6: Float = 0.0 scala> invert(0.0F) <console>:15: error: PosFloat.apply can only be invoked on a positive (i > 0.0F) floating point literal, like PosFloat(42.0F). invert(0.0F) ^ scala> invert(-1.1F) <console>:15: error: PosFloat.apply can only be invoked on a positive (i > 0.0F) floating point literal, like PosFloat(42.0F). invert(-1.1F) ^
This example also demonstrates that the PosFloat
companion object also defines implicit widening conversions
when no loss of precision will occur. This makes it convenient to use a
PosFloat
where a Float
or wider
type is needed. An example is the subtraction in the body of
the invert
method defined above,
Float.MaxValue - pos
. Although
Float.MaxValue
is a Float
, which
has no -
method that takes a
PosFloat
(the type of pos
), you can
still subtract pos
, because the
PosFloat
will be implicitly widened to
Float
.
An AnyVal
for positive Int
s.
An AnyVal
for positive Int
s.
Note: a PosInt
may not equal 0. If you want positive
number or 0, use PosZInt.
Because PosInt
is an AnyVal
it will usually be
as efficient as an Int
, being boxed only when an Int
would have been boxed.
The PosInt.apply
factory method is implemented in terms of a macro that
checks literals for validity at compile time. Calling PosInt.apply
with
a literal Int
value will either produce a valid PosInt
instance
at run time or an error at compile time. Here's an example:
scala> import anyvals._ import anyvals._ scala> PosInt(1) res0: org.scalactic.anyvals.PosInt = PosInt(1) scala> PosInt(0) <console>:14: error: PosInt.apply can only be invoked on a positive (i > 0) integer literal, like PosInt(42). PosInt(0) ^
PosInt.apply
cannot be used if the value being passed is a variable (i.e., not a literal), because
the macro cannot determine the validity of variables at compile time (just literals). If you try to pass a variable
to PosInt.apply
, you'll get a compiler error that suggests you use a different factor method,
PosInt.from
, instead:
scala> val x = 1 x: Int = 1 scala> PosInt(x) <console>:15: error: PosInt.apply can only be invoked on an integer literal, like PosInt(42). Please use PosInt.from instead. PosInt(x) ^
The PosInt.from
factory method will inspect the value at runtime and return an Option[PosInt]
. If
the value is valid, PosInt.from
will return a Some[PosInt]
, else it will return a None
.
Here's an example:
scala> PosInt.from(x) res3: Option[org.scalactic.anyvals.PosInt] = Some(PosInt(1)) scala> val y = 0 y: Int = 0 scala> PosInt.from(y) res4: Option[org.scalactic.anyvals.PosInt] = None
The PosInt.apply
factory method is marked implicit, so that you can pass literal Int
s
into methods that require PosInt
, and get the same compile-time checking you get when calling
PosInt.apply
explicitly. Here's an example:
scala> def invert(pos: PosInt): Int = Int.MaxValue - pos invert: (pos: org.scalactic.anyvals.PosInt)Int scala> invert(1) res0: Int =<PHONE_NUMBER> scala> invert(Int.MaxValue) res1: Int = 0 scala> invert(0) <console>:15: error: PosInt.apply can only be invoked on a positive (i > 0) integer literal, like PosInt(42). invert(0) ^ scala> invert(-1) <console>:15: error: PosInt.apply can only be invoked on a positive (i > 0) integer literal, like PosInt(42). invert(-1) ^
This example also demonstrates that the PosInt
companion object also defines implicit widening conversions
when either no loss of precision will occur or a similar conversion is provided in Scala. (For example, the implicit
conversion from Int
to Float in Scala can lose precision.) This makes it convenient to
use a PosInt
where an Int
or wider type is needed. An example is the subtraction in the body
of the invert
method defined above, Int.MaxValue - pos
. Although Int.MaxValue
is
an Int
, which has no -
method that takes a PosInt
(the type of pos
),
you can still subtract pos
, because the PosInt
will be implicitly widened to Int
.
An AnyVal
for positive Long
s.
An AnyVal
for positive Long
s.
Note: a PosLong
may not equal 0. If you want positive
number or 0, use PosZLong.
Because PosLong
is an AnyVal
it
will usually be as efficient as an Long
, being
boxed only when an Long
would have been boxed.
The PosLong.apply
factory method is implemented
in terms of a macro that checks literals for validity at
compile time. Calling PosLong.apply
with a
literal Long
value will either produce a valid
PosLong
instance at run time or an error at
compile time. Here's an example:
scala> import anyvals._ import anyvals._ scala> PosLong(1L) res0: org.scalactic.anyvals.PosLong = PosLong(1) scala> PosLong(0L) <console>:14: error: PosLong.apply can only be invoked on a positive (i > 0L) integer literal, like PosLong(42L). PosLong(0L) ^
PosLong.apply
cannot be used if the value being
passed is a variable (i.e., not a literal), because
the macro cannot determine the validity of variables at
compile time (just literals). If you try to pass a variable
to PosLong.apply
, you'll get a compiler error
that suggests you use a different factor method,
PosLong.from
, instead:
scala> val x = 1L x: Long = 1 scala> PosLong(x) <console>:15: error: PosLong.apply can only be invoked on an integer literal, like PosLong(42L). Please use PosLong.from instead. PosLong(x) ^
The PosLong.from
factory method will inspect the
value at runtime and return an
Option[PosLong]
. If the value is valid,
PosLong.from
will return a
Some[PosLong]
, else it will return a
None
. Here's an example:
scala> PosLong.from(x) res3: Option[org.scalactic.anyvals.PosLong] = Some(PosLong(1)) scala> val y = 0L y: Long = 0 scala> PosLong.from(y) res4: Option[org.scalactic.anyvals.PosLong] = None
The PosLong.apply
factory method is marked
implicit, so that you can pass literal Long
s
into methods that require PosLong
, and get the
same compile-time checking you get when calling
PosLong.apply
explicitly. Here's an example:
scala> def invert(pos: PosLong): Long = Long.MaxValue - pos invert: (pos: org.scalactic.anyvals.PosLong)Long scala> invert(1L) res5: Long =<PHONE_NUMBER>854775806 scala> invert(Long.MaxValue) res6: Long = 0 scala> invert(0L) <console>:15: error: PosLong.apply can only be invoked on a positive (i > 0L) integer literal, like PosLong(42L). invert(0L) ^ scala> invert(-1L) <console>:15: error: PosLong.apply can only be invoked on a positive (i > 0L) integer literal, like PosLong(42L). invert(-1L) ^
This example also demonstrates that the PosLong
companion object also defines implicit widening conversions
when either no loss of precision will occur or a similar
conversion is provided in Scala. (For example, the implicit
conversion from Long
to Double in
Scala can lose precision.) This makes it convenient to use a
PosLong
where a Long
or wider type
is needed. An example is the subtraction in the body of the
invert
method defined above, Long.MaxValue
- pos
. Although Long.MaxValue
is a
Long
, which has no -
method that
takes a PosLong
(the type of pos
),
you can still subtract pos
, because the
PosLong
will be implicitly widened to
Long
.
An AnyVal
for non-negative Double
s.
An AnyVal
for non-negative Double
s.
Because PosZDouble
is an AnyVal
it will usually be
as efficient as an Double
, being boxed only when a
Double
would have been boxed.
The PosZDouble.apply
factory method is
implemented in terms of a macro that checks literals for
validity at compile time. Calling
PosZDouble.apply
with a literal
Double
value will either produce a valid
PosZDouble
instance at run time or an error at
compile time. Here's an example:
scala> import anyvals._ import anyvals._ scala> PosZDouble(1.1) res0: org.scalactic.anyvals.PosZDouble = PosZDouble(1.1) scala> PosZDouble(0.0) res1: org.scalactic.anyvals.PosZDouble = PosZDouble(0.0) scala> PosZDouble(-1.1) <console>:14: error: PosZDouble.apply can only be invoked on a non-negative (i >= 0.0) floating point literal, like PosZDouble(42.0). PosZDouble(-1.1) ^
PosZDouble.apply
cannot be used if the value
being passed is a variable (i.e., not a literal),
because the macro cannot determine the validity of variables
at compile time (just literals). If you try to pass a
variable to PosZDouble.apply
, you'll get a
compiler error that suggests you use a different factor
method, PosZDouble.from
, instead:
scala> val x = 1.1 x: Double = 1.1 scala> PosZDouble(x) <console>:15: error: PosZDouble.apply can only be invoked on a floating point literal, like PosZDouble(42.0). Please use PosZDouble.from instead. PosZDouble(x) ^
The PosZDouble.from
factory method will inspect
the value at runtime and return an
Option[PosZDouble]
. If the value is valid,
PosZDouble.from
will return a
Some[PosZDouble]
, else it will return a
None
. Here's an example:
scala> PosZDouble.from(x) res4: Option[org.scalactic.anyvals.PosZDouble] = Some(PosZDouble(1.1)) scala> val y = -1.1 y: Double = -1.1 scala> PosZDouble.from(y) res5: Option[org.scalactic.anyvals.PosZDouble] = None
The PosZDouble.apply
factory method is marked implicit, so that
you can pass literal Double
s into methods that require
PosZDouble
, and get the same compile-time checking you get when
calling PosZDouble.apply
explicitly. Here's an example:
scala> def invert(pos: PosZDouble): Double = Double.MaxValue - pos invert: (pos: org.scalactic.anyvals.PosZDouble)Double scala> invert(0.0) res6: Double = 1.7976931348623157E308 scala> invert(Double.MaxValue) res7: Double = 0.0 scala> invert(-1.1) <console>:15: error: PosZDouble.apply can only be invoked on a non-negative (i >= 0.0) floating point literal, like PosZDouble(42.0). invert(-1.1) ^
This example also demonstrates that the
PosZDouble
companion object also defines
implicit widening conversions when a similar conversion is
provided in Scala. This makes it convenient to use a
PosZDouble
where a Double
or wider
type is needed. An example is the subtraction in the body of
the invert
method defined above,
Double.MaxValue - pos
. Although
Double.MaxValue
is a Double
, which
has no -
method that takes a
PosZDouble
(the type of pos
), you
can still subtract pos
, because the
PosZDouble
will be implicitly widened to
Double
.
An AnyVal
for non-negative Float
s.
An AnyVal
for non-negative Float
s.
Because PosZFloat
is an AnyVal
it will usually be
as efficient as an Float
, being boxed only when a
Float
would have been boxed.
The PosZFloat.apply
factory method is
implemented in terms of a macro that checks literals for
validity at compile time. Calling
PosZFloat.apply
with a literal
Float
value will either produce a valid
PosZFloat
instance at run time or an error at
compile time. Here's an example:
scala> import anyvals._ import anyvals._ scala> PosZFloat(1.1F) res0: org.scalactic.anyvals.PosZFloat = PosZFloat(1.1) scala> PosZFloat(0.0F) res1: org.scalactic.anyvals.PosZFloat = PosZFloat(0.0) scala> PosZFloat(-1.1F) <console>:14: error: PosZFloat.apply can only be invoked on a non-negative (i >= 0.0F) floating point literal, like PosZFloat(42.0F). PosZFloat(-1.1F) ^
PosZFloat.apply
cannot be used if the value
being passed is a variable (i.e., not a literal),
because the macro cannot determine the validity of variables
at compile time (just literals). If you try to pass a
variable to PosZFloat.apply
, you'll get a
compiler error that suggests you use a different factor
method, PosZFloat.from
, instead:
scala> val x = 1.1F x: Float = 1.1 scala> PosZFloat(x) <console>:15: error: PosZFloat.apply can only be invoked on a floating point literal, like PosZFloat(42.0F). Please use PosZFloat.from instead. PosZFloat(x) ^
The PosZFloat.from
factory method will inspect
the value at runtime and return an
Option[PosZFloat]
. If the value is valid,
PosZFloat.from
will return a
Some[PosZFloat]
, else it will return a
None
. Here's an example:
scala> PosZFloat.from(x) res4: Option[org.scalactic.anyvals.PosZFloat] = Some(PosZFloat(1.1)) scala> val y = -1.1F y: Float = -1.1 scala> PosZFloat.from(y) res5: Option[org.scalactic.anyvals.PosZFloat] = None
The PosZFloat.apply
factory method is marked implicit, so that
you can pass literal Float
s into methods that require
PosZFloat
, and get the same compile-time checking you get when
calling PosZFloat.apply
explicitly. Here's an example:
scala> def invert(pos: PosZFloat): Float = Float.MaxValue - pos invert: (pos: org.scalactic.anyvals.PosZFloat)Float scala> invert(0.0F) res6: Float = 3.4028235E38 scala> invert(Float.MaxValue) res7: Float = 0.0 scala> invert(-1.1F) <console>:15: error: PosZFloat.apply can only be invoked on a non-negative (i >= 0.0F) floating point literal, like PosZFloat(42.0F). invert(-1.1F) ^
This example also demonstrates that the
PosZFloat
companion object also defines
implicit widening conversions when a similar conversion is
provided in Scala. This makes it convenient to use a
PosZFloat
where a Float
or wider
type is needed. An example is the subtraction in the body of
the invert
method defined above,
Float.MaxValue - pos
. Although
Float.MaxValue
is an Float
, which
has no -
method that takes a
PosZFloat
(the type of pos
), you
can still subtract pos
, because the
PosZFloat
will be implicitly widened to
Float
.
An AnyVal
for non-negative Int
s.
An AnyVal
for non-negative Int
s.
Because PosZInt
is an AnyVal
it will usually be
as efficient as an Int
, being boxed only when an
Int
would have been boxed.
The PosZInt.apply
factory method is implemented in terms of a
macro that checks literals for validity at compile time. Calling
PosZInt.apply
with a literal Int
value will either
produce a valid PosZInt
instance at run time or an error at
compile time. Here's an example:
scala> import anyvals._ import anyvals._ scala> PosZInt(1) res0: org.scalactic.anyvals.PosZInt = PosZInt(1) scala> PosZInt(0) res1: org.scalactic.anyvals.PosZInt = PosZInt(0) scala> PosZInt(-1) <console>:14: error: PosZInt.apply can only be invoked on a non-negative (i >= 0) integer literal, like PosZInt(42). PosZInt(-1) ^
PosZInt.apply
cannot be used if the value being passed is a
variable (i.e., not a literal), because the macro cannot determine
the validity of variables at compile time (just literals). If you try to
pass a variable to PosZInt.apply
, you'll get a compiler error
that suggests you use a different factor method, PosZInt.from
,
instead:
scala> val x = 1 x: Int = 1 scala> PosZInt(x) <console>:15: error: PosZInt.apply can only be invoked on an integer literal, like PosZInt(42). Please use PosZInt.from instead. PosZInt(x) ^
The PosZInt.from
factory method will inspect the value at runtime and return an Option[PosZInt]
. If
the value is valid, PosZInt.from
will return a Some[PosZInt]
, else it will return a None
.
Here's an example:
scala> PosZInt.from(x) res4: Option[org.scalactic.anyvals.PosZInt] = Some(PosZInt(1)) scala> val y = -1 y: Int = -1 scala> PosZInt.from(y) res5: Option[org.scalactic.anyvals.PosZInt] = None
The PosZInt.apply
factory method is marked implicit, so that
you can pass literal Int
s into methods that require
PosZInt
, and get the same compile-time checking you get when
calling PosZInt.apply
explicitly. Here's an example:
scala> def invert(pos: PosZInt): Int = Int.MaxValue - pos invert: (pos: org.scalactic.anyvals.PosZInt)Int scala> invert(0) res7: Int =<PHONE_NUMBER> scala> invert(Int.MaxValue) res8: Int = 0 scala> invert(-1) <console>:15: error: PosZInt.apply can only be invoked on a non-negative (i >= 0) integer literal, like PosZInt(42). invert(-1) ^
This example also demonstrates that the PosZInt
companion object also defines implicit widening conversions
when either no loss of precision will occur or a similar
conversion is provided in Scala. (For example, the implicit
conversion from Int
to Float in
Scala can lose precision.) This makes it convenient to use a
PosZInt
where an Int
or wider type
is needed. An example is the subtraction in the body of the
invert
method defined above, Int.MaxValue
- pos
. Although Int.MaxValue
is an
Int
, which has no -
method that
takes a PosZInt
(the type of pos
),
you can still subtract pos
, because the
PosZInt
will be implicitly widened to
Int
.
An AnyVal
for non-negative Long
s.
An AnyVal
for non-negative Long
s.
Because PosZLong
is an AnyVal
it will usually be
as efficient as an Long
, being boxed only when an
Long
would have been boxed.
The PosZLong.apply
factory method is implemented in terms of a
macro that checks literals for validity at compile time. Calling
PosZLong.apply
with a literal Long
value will
either produce a valid PosZLong
instance at run time or an
error at compile time. Here's an example:
scala> import anyvals._ import anyvals._ scala> PosZLong(1L) res0: org.scalactic.anyvals.PosZLong = PosZLong(1) scala> PosZLong(0L) res1: org.scalactic.anyvals.PosZLong = PosZLong(0) scala> PosZLong(-1L) <console>:14: error: PosZLong.apply can only be invoked on a non-negative (i >= 0L) integer literal, like PosZLong(42L). PosZLong(-1L) ^
PosZLong.apply
cannot be used if the value being passed is a
variable (i.e., not a literal), because the macro cannot determine
the validity of variables at compile time (just literals). If you try to
pass a variable to PosZLong.apply
, you'll get a compiler error
that suggests you use a different factor method, PosZLong.from
,
instead:
scala> val x = 1L x: Long = 1 scala> PosZLong(x) <console>:15: error: PosZLong.apply can only be invoked on an integer literal, like PosZLong(42L). Please use PosZLong.from instead. PosZLong(x) ^
The PosZLong.from
factory method will inspect the value at runtime and return an Option[PosZLong]
. If
the value is valid, PosZLong.from
will return a Some[PosZLong]
, else it will return a None
.
Here's an example:
scala> PosZLong.from(x) res4: Option[org.scalactic.anyvals.PosZLong] = Some(PosZLong(1)) scala> val y = -1L y: Long = -1 scala> PosZLong.from(y) res5: Option[org.scalactic.anyvals.PosZLong] = None
The PosZLong.apply
factory method is marked implicit, so that
you can pass literal Long
s into methods that require
PosZLong
, and get the same compile-time checking you get when
calling PosZLong.apply
explicitly. Here's an example:
scala> def invert(pos: PosZLong): Long = Long.MaxValue - pos invert: (pos: org.scalactic.anyvals.PosZLong)Long scala> invert(0L) res6: Long =<PHONE_NUMBER>854775807 scala> invert(Long.MaxValue) res7: Long = 0 scala> invert(-1L) <console>:15: error: PosZLong.apply can only be invoked on a non-negative (i >= 0L) integer literal, like PosZLong(42L). invert(-1L) ^
This example also demonstrates that the PosZLong
companion object also defines implicit widening conversions
when either no loss of precision will occur or a similar
conversion is provided in Scala. (For example, the implicit
conversion from Long
to Double in
Scala can lose precision.) This makes it convenient to use a
PosZLong
where a Long
or wider type
is needed. An example is the subtraction in the body of the
invert
method defined above, Long.MaxValue
- pos
. Although Long.MaxValue
is a
Long
, which has no -
method that
takes a PosZLong
(the type of pos
),
you can still subtract pos
, because the
PosZLong
will be implicitly widened to
Long
.
Companion object that facilitates the importing of CompileTimeAssertions
members as
an alternative to mixing in the trait.
Companion object that facilitates the importing of CompileTimeAssertions
members as
an alternative to mixing in the trait.
The companion object for PosDouble
that offers
factory methods that produce PosDouble
s,
implicit widening conversions from PosDouble
to
other numeric types, and maximum and minimum constant values
for PosDouble
.
The companion object for PosDouble
that offers
factory methods that produce PosDouble
s,
implicit widening conversions from PosDouble
to
other numeric types, and maximum and minimum constant values
for PosDouble
.
The companion object for PosFloat
that offers
factory methods that produce PosFloat
s,
implicit widening conversions from PosFloat
to
other numeric types, and maximum and minimum constant values
for PosFloat
.
The companion object for PosFloat
that offers
factory methods that produce PosFloat
s,
implicit widening conversions from PosFloat
to
other numeric types, and maximum and minimum constant values
for PosFloat
.
The companion object for PosInt
that offers factory methods that
produce PosInt
s, implicit widening conversions from PosInt
to other numeric types, and maximum and minimum constant values for PosInt
.
The companion object for PosInt
that offers factory methods that
produce PosInt
s, implicit widening conversions from PosInt
to other numeric types, and maximum and minimum constant values for PosInt
.
The companion object for PosLong
that offers
factory methods that produce PosLong
s, implicit
widening conversions from PosLong
to other
numeric types, and maximum and minimum constant values for
PosLong
.
The companion object for PosLong
that offers
factory methods that produce PosLong
s, implicit
widening conversions from PosLong
to other
numeric types, and maximum and minimum constant values for
PosLong
.
The companion object for PosZDouble
that offers
factory methods that produce PosZDouble
s, implicit
widening conversions from PosZDouble
to other
numeric types, and maximum and minimum constant values for
PosZDouble
.
The companion object for PosZDouble
that offers
factory methods that produce PosZDouble
s, implicit
widening conversions from PosZDouble
to other
numeric types, and maximum and minimum constant values for
PosZDouble
.
The companion object for PosZFloat
that offers
factory methods that produce PosZFloat
s, implicit
widening conversions from PosZFloat
to other
numeric types, and maximum and minimum constant values for
PosZFloat
.
The companion object for PosZFloat
that offers
factory methods that produce PosZFloat
s, implicit
widening conversions from PosZFloat
to other
numeric types, and maximum and minimum constant values for
PosZFloat
.
The companion object for PosZInt
that offers
factory methods that produce PosZInt
s, implicit
widening conversions from PosZInt
to other
numeric types, and maximum and minimum constant values for
PosZInt
.
The companion object for PosZInt
that offers
factory methods that produce PosZInt
s, implicit
widening conversions from PosZInt
to other
numeric types, and maximum and minimum constant values for
PosZInt
.
The companion object for PosZLong
that offers
factory methods that produce PosZLong
s, implicit
widening conversions from PosZLong
to other
numeric types, and maximum and minimum constant values for
PosZLong
.
The companion object for PosZLong
that offers
factory methods that produce PosZLong
s, implicit
widening conversions from PosZLong
to other
numeric types, and maximum and minimum constant values for
PosZLong
.
Trait providing assertion methods that can be called at compile time from macros to validate literals in source code.
The intent of
CompileTimeAssertions
is to make it easier to createAnyVal
s that restrict the values of types for which Scala supports literals:Int
,Long
,Float
,Double
,Char
, andString
. For example, if you are using odd integers in many places in your code, you might have validity checks scattered throughout your code. Here's an example of a method that both requires an oddInt
is passed (as a precondition, and ensures an odd *Int
is returned (as a postcondition):In either the precondition or postcondition check fails, an exception will be thrown at runtime. If you have many methods like this you may want to create a type to represent an odd
Int
, so that the checking for validity errors is isolated in just one place. By using anAnyVal
you can avoid boxing theInt
, which may be more efficient. This might look like:An
AnyVal
cannot have any constructor code, so to ensure that anyInt
passed to theOddInt
constructor is actually odd, the constructor must be private. That way the only way to construct a newOddInt
is via theapply
factory method in theOddInt
companion object, which can require that the value be odd. This design eliminates the need for placingrequire
andensuring
clauses anywhere else that oddInt
s are needed, because the type promises the constraint. ThenextOdd
method could, therefore, be rewritten as:Using the compile-time assertions provided by this trait, you can construct a factory method implemented vai a macro wthat causes a compile failure if
OddInt.apply
is passed anything besides an oddInt
literal. ClassOddInt
would look exactly the same as before:In the companion object, however, the
apply
method would be implemented in terms of a macro. Because theapply
method will only work with literals, you'll need a second method that can work an any expression of typeInt
. Although you could write a factory method that throws a runtime exception if a non-oddInt
is passed, we recommend afrom
method that returns anOption
. The returnedOption
can be processed to deal with the potential for non-odd values.The
apply
method refers to a macro implementation method in classPosIntMacro
. The macro implementation of any such method can look very similar to this one. The only changes you'd need to make is theisValid
method implementation and the text of the error messages.The
isValid
method just takes the underlying type and returnstrue
if it is valid, elsefalse
. This method is placed here so the same valiation code can be used both in thefrom
method at runtime and theapply
macro at compile time. Theapply
actually does just two things. It calls aensureValidIntLiteral
, performing a compile-time assertion that value passed toapply
is anInt
literal that is valid (in this case, odd). If the assertion fails,ensureValidIntLiteral
will complete abruptly with an exception that will contain an appropriate error message (one of the two you passed in) and cause a compiler error with that message. If the assertion succeeds,ensureValidIntLiteral
will just return normally. The next line of code will then execute. This line of code must construct an AST (abstract syntax tree) of code that will replace theOddInt.apply
invocation. We invoke the other factory method that returns anOption
, and since we've proven at compile time that thatOption
will be defined, we callget
on it.You may wish to use quasi-quotes instead of reify. The reason we use reify is that this also works on 2.10 without any additional plugin (i.e., you don't need macro paradise), and Scalactic supports 2.10.


{% extends 'base.html' %} {% block title %} Collection Sets {% endblock %} {% block content_header %}
| Name | Collections | Date Added | Groups | {% for collection_set in collection_set_list %}
|---|---|---|---|
| {{ collection_set.name }} | {{ collection_set.num_collections }} collection{{ collection_set.num_collections|pluralize}} | {{ collection_set.date_added }} | {{ collection_set.group }} |
No collection sets yet.
| Name | Collections | Date Added | Groups | {% for collection_set in collection_set_list_n %}
|---|---|---|---|
| {{ collection_set.name }} | {{ collection_set.num_collections }} collection{{ collection_set.num_collections|pluralize }} | {{ collection_set.date_added }} | {{ collection_set.group }} |


Ok, so we were up at Reelsounds on Memorial Day doing more work to the SKWM song. We did some tracking at FinerFoods, but needed to dump the tape to digital and continue on.
First problems were that the first verse of vox ended up on the guitar track too – not too good. Then we realized the vox mic was creating a weird phasing with the cymbals. So we decided to ditch the gtr/vox tracks and start from there.
So, we began with my rhythm guitar using a sweet Strat (a gift from Pat Methany), a Vari-Drive (thanx, Lucas!) and a Super Reverb. There were 8 (count em – 8!) mics on this amp. Ridiculous, but we have the power. Then we moved to some keys. AJ played some clavinet and then moved to a Hammond with the Leslie Rotating Speaker. Then we plugged in Nate’s Les Paul through a Rat into a 4×12″ cab powered by a Fender Bassman. Blazing solos – take after take. Yet, nothing was feeling like ‘it’. Finally, at the end of my rope, desperate, I found something. Then we moved on to some ‘gang vocals’, my lead vox, and a back-up vox.
We mixed for a couple hours. Thom and I weren’t sure if we were there, but our ears had had enough. We gave up for the day and I left with something of a mix.   He reloads it again and it sounds great.
Only problem, Bill’s guitar was unintentionally left out. Need to mix it into the mix.


| Date | Company | Price | Account | Category |
|---|---|---|---|---|
| 9/05/2016 | Sam's Club | $95.50 | Checking Primary x4327 | Shopping |
| 9/10/2016 | CVS | $20.95 | checking Primary x4327 | Shopping |
| 9/15/2016 | Macy's | $275.80 | Chase Credit Card x1940 | Retail |
| 9/21/2016 | Dell | $1,750.75 | Chase Credit Card x1940 | Shopping |
| 9/30/2016 | Delta Fuel Stop | $23.00 | Checking Primary x4327 | Car and Auto |
| 10/3/2016 | Chase Bank | $160 | Checking Primary x4327 | Cash |
| 10/4/2016 | Geico Insueance | $255.30 | American Express x2971 | Car and Auto |
| 10/12/2016 | Chase | $53.70 | Checking Primary x4327 | Financing Fees |
| 10/17/2016 | Delta Airlines | $895.25 | American Express x2971 | Travel |
| 10/17/2016 | Air B&B | $475 | American Express x2971 | Travel |
| 10/19/2016 | Wendy's | $15.39 | Cash/ Manual Entry | Food and Dining |
| 10/19/2016 | Venmo | $100 | Checking Primary x4327 | Miscelaneous |
| Date | Amount Spent |
|---|---|
| 3/15/2016 | $321.33 |
| 4/21/2016 | $2340.34 |
| 5/21/2016 | $724.17 |
| 6/21/2016 | $230.71 |
| 7/21/2016 | $8345.23 |
| 8/21/2016 | $245.12 |
| 9/21/2016 | $5663.54 |
| 10/21/2016 | $943.45 |
Hello,
can you please tell me how I can save money on brokerage fees for my investment accounts.
Hello John,
you can save by signing up for our Partner, Robin hood. They allow you to invest without brokerge fees by being completely mobile.
Thank you, I will download Robinhood now.
No Problem John. If you have any other questions, feel free to chat with us!


Restaurant Employer Read Clients Orders On His iPad
2:30m life style
2 comments
It’s no secret that the digital industry is booming. From exciting startups
to global brands, companies are reaching out to digital agencies, responding to
the new possibilities available. However, the industry is fast becoming overcrowded, heaving with agencies offering similar services —
on the surface, at least. Producing creative, fresh projects is the key to …
It’s no secret that the digital industry is booming. From exciting startups
to global brands, companies are reaching out to digital agencies, responding to
the new possibilities available. However, the industry is fast becoming overcrowded, heaving with agencies offering similar services —
on the surface, at least. Producing creative, fresh projects is the key to
It’s no secret that the digital industry is booming. From exciting startups
to global brands, companies are reaching out to digital agencies, responding to
the new possibilities available. However, the industry is fast becoming overcrowded, heaving with agencies offering similar services —
on the surface, at least. Producing creative, fresh projects is the key to
It’s no secret that the digital industry is booming. From exciting startups
to global brands, companies are reaching out to digital agencies, responding to
the new possibilities available. However, the industry is fast becoming overcrowded, heaving with agencies offering similar services —
on the surface, at least. Producing creative, fresh projects is the key to
…
Back to all posts


Home
About
Sign Up
As Voter
As Candidate
As Inspector
Login
As Voter
As Candidate
As Inspector
Contact


This is my first entry, although I will be submitting some entheogen experiences as I feel I owe something back to all you psychonauts who have assisted me on my own shamanic quest. But for now here is a little herbal smoking concoction I put together after studying many submissions on similar mixes and trials of each individual substance.
I bought these herbs from a local herbal store in the city after work this afternoon. On the way home I stopped past the liquor store and bought a bottle of Jim Beam. I love fridays! I am not attributing much of the effects I am feeling right now to the alcohol as the buzz I am feeling is predominantly herby and not so much alcoholic in nature.
To continue, I downed 2 bongs of Dagga to start with, waited three minutes to appreciate the effects which were quite subtle but nice. I then pulled two bongs of the Damiana and waited another three minutes for it to settle in. A fairly good buzz is flowing through my channels now. Still nothing compared to some good weed but definitely worth the dirt cheap price in that respect.
Finally I topped it off with two swift hits of the Catnip. Ten minutes later and I'm tuned in very sweetly indeed. The Catnip has seemed to potentiate the other two herbs pretty effectively. Definitely a mild euphoric feeling here. I'm experiencing heightened sensitivity to light and colours are brighter too. Things seem to have slowed down just a little bit and walking has a sort of floating sensation to it. I'm listening to Soundgarden's 'Superunknown' at the moment which has a vague echo effect to it. Very nice indeed.
Forty-five minutes in and I've only had two Jim Beams which I can tell is affecting me slightly but not really changing the effects of the herbs. Time to chop up a mix of all three. I've just taken three hits of all the herbs combined and I've been slotted straight into the place I was after smoking the herbs individually but the buzz feels amplified. There's a tingly, warm body-stoned feeling happening here. I like it!
An hour and fifteen minutes into the experiment and I've just polished off my third Jimmy. Now the alcohol is contributing a little bit of influence but not a great deal. It does seem to synergize nicely with this mix though. This is where I'll sit for a while and see how long I buzz for. I feel very relaxed and mildy euphoric at this stage. Unlike a Marijuana induced high, I have quite a clear and sharp mindset but with an enjoyable body-buzz that is now rivalling weed and alcohol combined.
Two hours on and one more glass of Jimmy and cola. The effects of the herbs are starting to subside ever so slightly but are still more prominent than the alcohol. I will end my report here and state that this blend is, in my opinion, a viable substitute for Marijuana. I needed to smoke a larger quantity but it still worked out a lot cheaper and without the drawbacks of weed, like paranoia and the scattered feeling. Hope you enjoy it.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


My name is Anthony Ochoa I am from Wichita, Kansas. I joined the United States Navy right out of highschool. While I was in the Navy I was a Master At Arms, essentially Base Police. When I left the Military I went to school at Everett Community College where I graduated with an Associates in English. I decided that I wanted to follow a passion of mine and become a writer. While I began writing my first book. I continued in the field of Security where I have been the site Supervisor for the Entire Boeing Everett plant, and am currently a Site Supervisor for Facebook. I am Married and have an 8 month old daughter, her name is Ainsley. I have been married for 3 years now and currently live in Lake Stevens. I am incredibly excited to start my journey in Coding and Software Development, and I am looking forward to working with all of you! Thank you for coming to my Ochie Talk.


Theremins.club
By Rúnar BergPlay the theremin with random strangers on the internet.
How do I use this? To play simply point your mouse to a desired location on the rainbowed canvas, press the mouse button and hold it. Release the button again to silence the theremin.
If you’re lucky enough to be playing on a touch screen display, it is enough for you to touch the canvas where you want to play it. Note that you can play multiple notes at the same time by using more than one finger.
The vertical axis represents volume (up means louder) and the horizontal axis represents pitch (right means higher). So to play a loud base, click the upper left corner. And to play a soft high tone, press and hold somewhere above the bottom right corner.
What are the strings in front of the rainbow? The strings in front of the rainbow are sort of like notes on a piano.  But if you do, a black note on a piano is represented here as a repeated color. With C and C♯ as yellow, D and D♯ as green, E as blue, etc. And if you really want to know, the left edge is tuned at A2 = 110 Hz, and the right edge is tuned at A6 = 1760 Hz.
What are jam sessions? If a session is to noisy
for you, you can create a new channel simply by entering a new
path in the address-bar of your browser, e.g.
/my-new-channel
,
your new session will then be listed under
jam sessions for others to join. If you
want a private session start your new channel with an
underscore, e.g.
/_my-secret-channel
,
and you’re channel won’t be listed under jam sessions.
How did you make this? This app uses the Web audio and Web sockets technology to connect your theremin session with everyone else’s. The backend is written in Rust using WS-RS, to handle the web socket connections, and Hyper, for HTTP connections. This app is MIT licenced and you can read (and fork) the source code on GitHub.


The Get_Version API call gets the main version ID string of the TMEX driver. Make sure that the buffer 'ID_buf' is at least 80 bytes to hold the ID string. The format for the main identification (ID) string is "xx_DLLNAME_Vz.zz_month/day/year (FULLNAME.DLL)" where:
_ - represent spaces
xx hardware type code 00 to 99 that the DLL uses.
00 general DLL requiring a BASFUN type interrupt
01 COM port DLL
02 LPT port DLL
03 contain type 00,01, and 02
FF indicates a version 3.00 main driver that has a selectable and configurable hardware drivers.
DLLNAME - the name of the DLL that ranges in length from 1 to 8 characters.
Vz.zz - version number. (i.e. V1.00) It could include other specifier such as ‘Alpha’ or ‘Beta’.
month/day/year - date DLL released
(FULLNAME.DLL) - is the full name of the DLL driver.
For a description of the above types, see the TMEX Type Descriptions.
Parameters
ID_buf
Specifies a pointer to a buffer to hold the main ID string.
Return Value
1 => ID string is in ID_buf.
0 => could not get the ID
-201 => Hardware_Specific driver not found and is required
See Also


Today, every team creates their own shared parameters which creates divided data on any given project. A single set of parameters adopted across the building industry gets us one step closer to the goal of a single model. Learn more.
Rather than a committee deciding on the standard, our community is empowered to decide what works best for us. The OpenRFA platform facilitates discussions and streamlines the process of proposing, approving and rejecting shared parameters.
Our platform streamlines the proposal, approval, and rejection process for new and existing parameters.
All questions, debates, and conversations are publicly shared online for posterity and full transparency.
The OpenRFA web app does not require special software or add-ins and is free to use.
Our database is built to allow for multiple languages and regional names while maintaining a single data set.
By standardizing shared parameters within Revit, you open up the capability for predictable queries and easier data manipulation through design, construction, and occupancy phases.
Share your experience with the OpenRFA community to help us define the standard.
Download our parameters and implement them on your projects today.
Download Parameters


The goal of steward is to make it easier to import, manage, and publish the metadata associated with data frames. This might be useful for:
Our current defintion of metadata includes the name, description and source of a dataset, as well as the name, type, and description of each of the variables in the dataset.
The name, steward, is an homage to the Data Stewardship class taught by Andee Kaplan and Ranae Dietzel (also an author of this package) at Iowa State University in Fall 2016.
You can install the development version of steward from GitHub with:
You can read about these capabilities in the getting started article:
Here are the first lines of a YAML file containing metadata from ggplot2’s diamonds
dataset, which is available as:
name: diamonds
title: Prices of 50,000 round cut diamonds
description: |
A dataset containing the prices and other attributes of almost 54,000 diamonds.
sources:
- title: DiamondSearchEngine
path: http://www.diamondse.info/
email: ""
- title: ggplot2 package
path: https://ggplot2.tidyverse.org/
email: ""
...
You can read this YAML file using stw_read_yaml()
:
diamonds_meta <-
stw_read_meta_yaml(system.file("metadata/diamonds.yml", package = "steward"))
print(diamonds_meta)
List of 7
$ name : chr "diamonds"
$ title : chr "Prices of 50,000 round cut diamonds"
$ description: chr "A dataset containing the prices and other attributes of almost 54,000 diamonds."
$ sources :List of 2
..$ :List of 3
.. ..$ title: chr "DiamondSearchEngine"
.. ..$ path : chr "http://www.diamondse.info/"
.. ..$ email: chr ""
..$ :List of 3
.. ..$ title: chr "ggplot2 package"
.. ..$ path : chr "https://ggplot2.tidyverse.org/"
.. ..$ email: chr ""
$ n_row : int(0)
$ n_col : int(0)
$ dict :Classes 'stw_dict', 'tbl_df', 'tbl' and 'data.frame': 10 obs. of 4 variables:
..$ name : chr [1:10] "price" "carat" "cut" "color" ...
..$ type : chr [1:10] "number" "number" "string" "string" ...
..$ description: chr [1:10] "price in US dollars ($326--$18,823)" "weight of diamond (0.2--5.01)" "quality of the cut (Fair, Good, Very Good, Premium, Ideal)" "diamond color, from D (best) to J (worst)" ...
..$ levels :List of 10
.. ..$ : NULL
.. ..$ : NULL
.. ..$ : chr [1:5] "Fair" "Good" "Very Good" "Premium" ...
.. ..$ : chr [1:7] "D" "E" "F" "G" ...
.. ..$ : chr [1:8] "I1" "SI2" "SI1" "VS2" ...
.. ..$ : NULL
.. ..$ : NULL
.. ..$ : NULL
.. ..$ : NULL
.. ..$ : NULL
- attr(*, "class")= chr "stw_meta"
To get a roxygen string from metadata, you can use the stw_to_roxygen()
function:
#' Prices of 50,000 round cut diamonds
#'
#' A dataset containing the prices and other attributes of almost 54,000 diamonds.
#'
#' @format
#'
#' \describe{
#' \item{price}{price in US dollars ($326--$18,823)}
#' \item{carat}{weight of diamond (0.2--5.01)}
#' \item{cut}{quality of the cut (Fair, Good, Very Good, Premium, Ideal)}
#' \item{color}{diamond color, from D (best) to J (worst)}
#' \item{clarity}{a measurement of how clear the diamond is (I1 (worst), SI2, SI1, VS2, VS1, VVS2, VVS1, IF (best))}
#' \item{x}{length in mm (0--10.74)}
#' \item{y}{width in mm (0--58.9)}
#' \item{z}{depth in mm (0--31.8)}
#' \item{depth}{total depth percentage = z / mean(x, y) = 2 * z / (x + y) (43--79)}
#' \item{table}{width of top of diamond relative to widest point (43--95)}
#' }
#'
#' @source [DiamondSearchEngine](http://www.diamondse.info/), [ggplot2 package](https://ggplot2.tidyverse.org/)
#'
"diamonds"
You may also be interested in the related functions: stw_use_roxygen()
and stw_write_roxygen()
.
Soon, we hope to add additional capabilities:
.Rd
file)


Tonight's meetup is kindly sponsored by:
“Festival package travel startup. 50+ staff, high pay, ping pong + beer.”
Funding Options is the free marketplace for business finance, using matching technology to help UK businesses access tens of millions of pounds in finance every year.
We help people to feel happier and more self-confident, by making it easy to dress well, using stylists and data science. Dedicated to maintaining a great working environment, minimising politics and maximising impact.
The trusted global platform that inspires and enables people to experience the best of the city. Operating in 107 cities, across 39 countries, it has an average monthly global audience reach of over 111 million across all platforms.
Website: https://djangolondon.com
Github: https://github.com/djangolondon/


MKSplitViewController Class Reference
| Inherits from | MKViewController : UIViewController |
| Declared in | MKSplitViewController.h |
Overview
Overview
MKSplitViewController is moch of UISplitViewController that can added to a navigation controller, tab bar controller or presented as a model view controller. When in landscape view both views are displayed, while in portrait only the detail view controller is displayed.
While in portrait view a back and list view button is added to the detail views navigation bar. The list button will display the title of the list view controller. The list button will cause the detail view to slide in from the left of the screen. The list view can be presented or dismissed at any time by calling the presentListController
or dismissListController
methods.
MKSplitViewController is for use on iPad only.
Usage Notes
MKSplitViewController creates its own navigation bars, if it is pushed onto a navaigation stack it will hide the navigation controllers navigation bar and replace it with its own.
The navigation navigation bars get their navigation items from the navigationItem property of the given view controllers.
Reqiured Classes
Required Catagories
- UIViewController+MKViewController
- UIView+MKMetrics
Tasks
Creation
-
- initWithListViewController:detailViewController:
Creates a new instance of MKSplitviewController using the given view controllers.
Child View Controllers
-
listViewController
Reference to the listViewController -
detailViewController
Refernce to the detailViewController
Display Controll
-
- presentListController
Presents the List View when in portrait mode. -
- dismissListController
Dismisses the List View when in portrait mode. -
listViewIsVisable
YES
if the list view is presented.
Instance Methods
dismissListController
Dismisses the List View when in portrait mode.
- (void)dismissListController
Declared In
MKSplitViewController.h
initWithListViewController:detailViewController:
Creates a new instance of MKSplitviewController using the given view controllers.
- (id)initWithListViewController:(UIViewController *)listViewController detailViewController:(UIViewController *)detailViewController
Parameters
- listViewController
- the view controller of the list view. This is typically a UITableViewController.
- detailViewController
- the view controller of the detail view
Return Value
MKSplitViewController instance
Declared In
MKSplitViewController.h
Properties
detailViewController
Refernce to the detailViewController
@property (nonatomic, retain, readonly) IBOutlet UIViewController *detailViewController
Declared In
MKSplitViewController.h
listViewController
Reference to the listViewController
@property (nonatomic, retain, readonly) IBOutlet UIViewController *listViewController
Declared In
MKSplitViewController.h


DigitalPolice
Hi,
Paris Hawker
Account setting
Payment setting
Change password
My public profile
Lock screen
Log out


This is a list of items currently being worked on for my projects.
🔀 Non Planned Upgrades
Ongoing updating and adding of generic upgrades to the static site. These are unscheduled additions to the website for design or content purposes. Can include re-structuring of navigation, renaming files, or adding new content as needed.
✔ Upgrade SolarDB Parent Javascript
During the construction of the static site verison of SolarDB, significant improvements were made to the chart and GUI Javascript code. The most significant being the date parsing of already loaded data. Add these improvements to the parent project.
❌ Better Javascript Parsing Ability
In preparation for an API in SolarDB, upgrade the Javascript to find the intersection of two sets of dates. Using this information it can request non redundant data and add it to the current set.
✔ Start Creation of RESTful API
Start by creating a read API in SolarDB for requesting point information from the database. Part of a larger series of upgrades for easy data access and insertion.
✔ Stop the Page Reloads
Create Javascript websocket to request data from SolarDB API without reloading the page.
❌ Upgrade Javascript to use API
Every time the submit button is pressed on the parent project, it reloads the entire dataset. Upgrade the Javascript to only ask for data it doesnt already have and request it from the SolarDB API.
❌ Upgrade API to Insert Data
Upgrade the SolarDB RESTful API so new information can be sent and added to the database. The format for the data will follow the original data format found here.


All Classes
JungDataFactory
JungObviousForest
JungObviousNetwork
JungObviousNetwork.JungGraph
JungObviousTree
JungObviousTree.JungTree
JungObviousView
JungObviousVisualization
ObviousVisualizationServer
WrapToJungGraph
WrapToJungTree


A comment about the user, if any.
The user's display name.
The user's e-mail address.
Whether the user has an empty password.
The user's home location.
The last time the user logged in.
The last time the user's photo was updated.
The number of times the user has been mentioned.
The number of tweets the user has posted.
The user's preferred pronouns.
The user's real name.
The user's role.
The user's room number.
Whether this user is starred.
Whether the user has un-noticed alerts.
The unique username.
Generated using TypeDoc
Represents a Twit-arr user.


{% extends "layout.html" %} {% block head %} {% endblock %} {% block content %}
When you visit our site, the first page that will be visible to you is the home page as shown above.
On all the pages at the top you will be able to see navigation bar to access other pages easily.
Footer is provided on the home page and the about page at the bottom to provide you with the quick links. A quick link to the guide is also provide in footer so that you can easily access it from other pages. 'FAQ's' link will take you to the frequently asked questions. You can visit our social media sites and follow us by clicking on the given icons.
On the about page, you will be able to get a clear idea about the site. Information on the features and statistics are given on this page. You can also discover the developer of this application along with their social media handles. You have the newsletter subscription form on this page as well. Make sure to fill in your email address in it to get latest updates in health related technologies and treatements.
Checkup page is the main focus of this web application. It is the destination which is most used by the users. Here you can diagnose the disease using the given symptoms.
Follow the folllowing steps to diagnose diseases:-
We have provided medibot for better experience of user. We will be improving it more in the coming time.
On Manoeuvre page, you will be able to see prevention of some common diseases. Trending diseases and how to prevent them are also provided on the page. Some diseases which can be prevented by practicing yoga are also mentioned. Atlast a setion for inculcating healthy habits is given.
On Bulletin page, you will be able to see latest health related news from all over the world. A feature of finding health center nearby is also provided.
On FAQ page, you will be able to see all the questions which are frequently asked by the user regarding Internsparks.
On Terms & conditions page, you will be able to see all terms and contions that have to be followed by the user while using our application.
Emergency number for health related emergency are provided in the footer both common and statewise.


{% extends "transformation-base.html" %} {% block content %} {% include "transformation/snippets/title_snippet.html" with format='CSV' %}
Please select a file to upload. We will try to guess the file parameters for you. After the content of the file is loaded, if you see any irregularities in the Data View section, please consider manually entering other parameters on the right and press the apply button.
How it works:
The actual conversion will take place on the LinDA server. Therefore, the selected file is first uploaded from your computer to the server. Then, an initial automatic guess is made for the line ending character(s), the column delimiter character, the string quoting character, and so on. This automatic guessing can be overwritten by the user (by altering the values in the entry fields and then pressing the apply button).
Select a file:
{{ form.upload_file }}
{{ form.upload_file.errors.as_text }}
| {{ form.line_end }} | {% if csvDialect.line_end %} proposed: {{ csvDialect.line_end }} {% endif %} | |
| {{ form.quotechar }} | {% if csvDialect.quotechar %} proposed: {{ csvDialect.quotechar }} {% endif %} | |
| {{ form.delimiter }} | {% if csvDialect.delimiter %} proposed: {{ csvDialect.delimiter }} {% endif %} | |
| {{ form.escape }} | {% if csvDialect.escape %} proposed: {{ csvDialect.escape }} {% endif %} |
| {{ field }} | {% endfor %}
| {{ field }} | {% endfor %}


Arrays are arguably the most important structure in programming and Computer Science. At their root, they form the basis of what we call Data Structures and allow the programmer to compose sets of data to use as inputs or outputs. This lesson will look closer at this important and valuable tool.
In JavaScript, declaring an array is very similar to declaring a variable like we did in the last lesson. However there is an important difference in syntax that you must note, and that is the use of the square-bracket operators [ and ]. The code example below shows how to declare an empty array.
Declaring an empty array such as the example above isn't terribly useful to us right now. We need to get values into this array. We can put data into an array one of two ways. The most common way is to push the data into the array based on some other inputs, but we will go over this later in the lesson. We can also put data into the array at declaration, by following the syntax below.
Using the console.log() function, we can print out the contents of an array similar to how we did with variables.
While console.log() is useful for outputting the full contents of an array, in actual programs we will rarely do this. Normally we access array values directly by their index or an iterator.
We can get the length of an array by using a special property on our array we can access by adding .length to the end of our array. This allows us to know exactly how many values we have in our array. This will become more important in our next lesson, but knowing it now will help you to understand indexes better. The example below shows the output of the length property for our favorite colors array.
Each value of an array has a numeric value that corresponds to the index of the value. Arrays in JavaScript are zero-based so these index values start at 0 and end at array.length - 1 of the array. For our favorite colors array the index of 2 corresponds to "orange", and the index of 0 corresponds to "blue". We can access a specific element or value of an array by using square-bracket operators at the end of the call to the array. The example below demonstrates this.
Oops, we had an extra value there. JavaScript, unlike many languages, doesn't consider accessing an array element that doesn't exist an error. Instead, it returns the value of undefined. This is a common source of errors, so make sure you remember to start counting from zero. You can also use a conditional to check if a value exists before you print it out.
JavaScript provides us with several methods to manipulate arrays. While there are close to 30 different actions we can take on an array, but for today we'll look at a few of the most important methods.
Arguably the most important is the ability to add or remove to the end of an array. We call these actions push and pop. When we push to an array, we add an element to the end of the array that contains our value. We can also pop off the last element of an array. The example below demonstrates how this works.
With our example, what if we wanted to complete the "call parents" action? In order to remove that from our list we'd need to do "make memes" first with the tools we currently have. However, there is another method called splice that allows us to add or remove specific elements.
Often, when we write the program we don't know where a specific value will be in an array. We can find the index of the element we want to remove using the indexOf method.
There are many other actions that we can take against our arrays, some of which we will go over in the next lesson. However, the ones we've reviewed here are the most common actions you'll take. Try the exercises to sharpen your skills with arrays.
Put all of these exercises in a single file.
When you are done with the exercises have Kevin or Adam check your work.


Data Analytics and Intelligent Systems Lab
Paving the way for the next industrial revolution through data
We are at a unique historical moment with conditions ripe for a new industrial revolution that is going to take us to a level of automation that had never been seen before. This revolution is driven by a serendipitous confluence of ubiquitous cyber-physical systems or internet of things, gargantuan computing power, inexpensive memory and major algorithmic developments in machine learning and artificial intelligence. It is happening all around us in the form of self-driving cars to human-like robots.
The competitive global environment, and the ever increasing demands on energy, environment and quality are subjecting process industries to a high level of economic pressure. However, the process industries are in possession of treasure troves of heterogenous data that are gravely under utilized. These incredible volumes of data that industries already possess are poised to provide a level of insight and information never realized before and thus alleviate the economic and competitive pressures. We are interested in developing novel algorithms and computational tools to bring this vision of automation to the process industry.
News
| Oct 1, 2018 | New Post Doctoral Research Position in Control Systems and Machine Learning - link here. |
| Jul 19, 2018 | DAIS Lab members set to present at ADCHEM 2018. For more information, visit the DAIS ADCHEM page. |
| Jul 5, 2017 | Lee Rippon received the prestigious Killam Doctoral Scholarship. |
| Jan 15, 2016 | Please check out our new paper on alarm design (to appear in AIChE Journal). |


|
HE_Mesh
6.0.1
|
Public Member Functions | |
| WB_Vector | getDirection (final int i) |
| WB_Vector | getNormal (final int i) |
| double | a (final int i) |
| double | b (final int i) |
| double | c (final int i) |
| double | getLength (final int i) |
| boolean | equals (final Object o) |
| boolean | isCCW () |
| WB_Ring | apply (final WB_Transform T) |
| WB_Point | getPoint (final int i) |
| double | getd (final int i, final int j) |
| float | getf (final int i, final int j) |
| WB_Point | getPointOnLine (final double t) |
| WB_Point | getParametricPointOnLine (final double t) |
| int | getNumberOfPoints () |
| WB_Segment | getSegment (final int i) |
| Public Member Functions inherited from wblut.geom.WB_PolyLine | |
| WB_Point | getPoint (final int i) |
| double | getd (final int i, final int j) |
| float | getf (final int i, final int j) |
| WB_Point | getPointOnLine (final double t) |
| WB_Point | getParametricPointOnLine (final double t) |
| WB_Vector | getDirection (final int i) |
| WB_Vector | getNormal (final int i) |
| double | a (final int i) |
| double | b (final int i) |
| double | c (final int i) |
| int | getNumberOfPoints () |
| WB_Segment | getSegment (final int i) |
| int | getNumberSegments () |
| double | getLength (final int i) |
| WB_PolyLine (final Collection<?extends WB_Coord > points) | |
| WB_PolyLine (final WB_Coord...points) | |
| boolean | equals (final Object o) |
| int | hashCode () |
| WB_PolyLine | apply (final WB_Transform T) |
| WB_CoordCollection | getPoints () |
Protected Member Functions | |
| WB_Ring () | |
| WB_Ring (final List<?extends WB_Coord > points) | |
| WB_Ring (final WB_Coord[] points) | |
| Protected Member Functions inherited from wblut.geom.WB_PolyLine | |
| WB_PolyLine () | |
Private Member Functions | |
| void | getDirections () |
Private Attributes | |
| WB_GeometryFactory | geometryfactory = new WB_GeometryFactory() |
|
protected |
|
protected |
| points |
References wblut.geom.WB_Ring.getDirections().
|
protected |
| points |
References wblut.geom.WB_Ring.getDirections().
| double wblut.geom.WB_Ring.a | ( | final int | i | ) |
a.x+b.y+c=0
| i |
| WB_Ring wblut.geom.WB_Ring.apply | ( | final WB_Transform | T | ) |
References wblut.geom.WB_GeometryFactory2D.createRing().
| double wblut.geom.WB_Ring.b | ( | final int | i | ) |
a.x+b.y+c=0
| i |
| double wblut.geom.WB_Ring.c | ( | final int | i | ) |
a.x+b.y+c=0
| i |
| boolean wblut.geom.WB_Ring.equals | ( | final Object | o | ) |
| double wblut.geom.WB_Ring.getd | ( | final int | i, |
| final int | j | ||
| ) |
| WB_Vector wblut.geom.WB_Ring.getDirection | ( | final int | i | ) |
Get direction.
| i |
|
private |
References wblut.geom.WB_Vector.getLength(), and wblut.geom.WB_Vector.normalizeSelf().
| float wblut.geom.WB_Ring.getf | ( | final int | i, |
| final int | j | ||
| ) |
| double wblut.geom.WB_Ring.getLength | ( | final int | i | ) |
| WB_Vector wblut.geom.WB_Ring.getNormal | ( | final int | i | ) |
Get a normal to the line.
| i |
References wblut.geom.WB_GeometryFactory3D.createVector(), wblut.geom.WB_Vector.cross(), wblut.geom.WB_Vector.div(), wblut.geom.WB_Vector.getLength(), and wblut.math.WB_Epsilon.isZero().
| int wblut.geom.WB_Ring.getNumberOfPoints | ( | ) |
| WB_Point wblut.geom.WB_Ring.getParametricPointOnLine | ( | final double | t | ) |
| WB_Point wblut.geom.WB_Ring.getPoint | ( | final int | i | ) |
| WB_Point wblut.geom.WB_Ring.getPointOnLine | ( | final double | t | ) |
| WB_Segment wblut.geom.WB_Ring.getSegment | ( | final int | i | ) |
| boolean wblut.geom.WB_Ring.isCCW | ( | ) |
This check catches cases where the ring contains an A-B-A configuration of points. This can happen if the ring does not contain 3 distinct points (including the case where the input array has fewer than 4 elements), or it contains coincident line segments.
If disc is exactly 0, lines are collinear. There are two possible cases: (1) the lines lie along the x axis in opposite directions (2) the lines lie on top of one another
(1) is handled by checking if next is left of prev ==> CCW (2) will never happen if the ring is valid, so don't check for it (Might want to assert this)
References wblut.geom.WB_Point.equals(), wblut.geom.WB_Ring.getNumberOfPoints(), wblut.geom.WB_Ring.getPoint(), wblut.geom.WB_Predicates.orient2D(), wblut.geom.WB_MutableCoordinate.xd(), and wblut.geom.WB_MutableCoordinate.yd().
|
private |


Javascript and the DOM
Technical blog sprint 3Sunday 23 February 2020
by Simon Hall
HTML, CSS, and Javascript
HTML
The html (hypertext markup language) document contains the content and structural elements of a web page. These elements and other content are listed, nested, named, and categorized. This content could be made up of containers, text, images, links, metadata and a host of other types of information. This is the foundational document.
Without the html part of the web page there is no web page.
If we compare this to a guitar the html would be the wood, strings, nut, bridge and other parts that make up the guitar. It is also the order and structure that the parts are put together in to form the guitar. Some of these elements of the guitar make up sub groups of items such as strings and frets.
CSS
The css (cascading style sheet) takes the elements in the html document and applies style to them. It provides all the styling on how the web page looks. It sets the colour, style, font, placement, transitions etc.
If we look back at our guitar analogy the css would be the shape of the body, the color, whether the fretboard is maple or rosewood etc.
Javascript
The javascript is the coding that allows the interactivity with the user. This will allow the webpage to react and display different information depending on input received by the user.
If we look at our guitar this would be the user playing the guitar by fretting and strumming the strings. It would also include things like turning the tuning heads to change the tuning of the guitar.
Control flow and loops
Control flow is the order (flow) in which the code is excuted. In it's most basic form control flows from top to bottom. There are different parts of code that can influence flow. For example an "if" statement is like a switch. It checks for a condition, if the condition is true it changes the path of the flow to include a code block. If the condition is false then it will ignore that particular code block and continue normally.
Loops are another example of controlling flow. A loop will, as its name suggests, cause the code to loop over the same piece of code over and over. It's important when writing loops that we include conditions that will break the loop and allow it the code to continue to execute. If we don't include those breaks then the code will be stuck in a loop forever and cause the browser to crash.
The DOM
The DOM, in reference to what we are doing is the html Document Object Model. This a representation of the html as a whole lot of objects that can be grabbed and manipulated by javascript or css. The objects are typically element object but could be any kind of node.
A node is any kind of object on a page. It could be the html object representing the whole page, an element of it, or even an attribute of the element. Using something like javascript we can access these various nodes as objects and manipulate them in anyway we can think of so long as we know how to provide the correct instructions.
Dev tools
Each browser offers some developer tools. This is an excellent set of tools not just for debugging but for design. It allows the developer to access various parts of a web page and manipulate them while visually watching what the effect is on the page.
As well as exploring elements and styles on a webpage we can also access the console to help with the writing of valid code. We can also access the code in the sources tab and save our changes. This can be very helpful.
The resources tab will also show us a whole lot of information about the requests, timing and other informaion about a website. We can also see the various storage values. There are a lot of in depth developer tools that we can use to explore various aspects of our web apps.


In a While, Crocodile: Giant Reptile Found Cut in Half on Liverpool Streets – Photos
Residents of the British city were shocked to know that a giant predator was rambling around Merseyside County, and even more astounded after seeing its dead body.
A woman in Liverpool, who noticed what she thought was a log on the pavement near a hospital, was horrified to discover a dismembered crocodile, Liverpool ECHO reported on Thursday.
The dangerous reptile, found in the Lower Lane area of Fazakerley, had been cut in half by someone.
After the photos hit social media, the alleged owner of the reptile was reportedly found. According to him, when he found it, the crocodile was already a stuffed animal.
"I found him in a skip in Burscough 18 years ago. I was only 12 and thought he was cool so I kept him. He was named Duncan, I don't know why, and he has been in my family for the last 18 years", the man, who preferred to remain anonymous, told journalists.
He added, that Duncan had recently been recovered from a friend's business, and was placed on a nearby roundabout as a joke.


Guardiola expecting tougher Atalanta at San Siro
MILAN, Nov 6 — Pep Guardiola said his side were expecting a tough clash against Atalanta at the San Siro today as Manchester City look to wrap up qualification for the Champions League knockout rounds with two games to spare.
The defending Premier League champions thrashed Atalanta 5-1 at home last month to make it three wins from three in Group C.
“Although it may seem the opposite given the result, we saw in Manchester that Atalanta is a very good team,” Guardiola told reporters yesterday.
“The last time we met the match was very even in the first half.
“Before the first fixture there might have been a danger, but they know now what to expect, they have experienced exactly what it takes to come up against them.”
City top their group with maximum points while Atalanta have lost all their three games in their Champions League debut.
A win would also be a boost before next weekend’s top-of-the-table clash with Liverpool.
“It’s a great week for us because we come to Italy and face Atalanta and then face Liverpool on Sunday,” said Guardiola.
“But after that there’s still three quarters of the season to play.”
“I want to qualify as soon as possible. Try to win tomorrow to be already there, one more year that would be incredible.
“But if not, there is Shakhtar at home and Dinamo Zagreb away and we will see.”
Atalanta will again be without influential striker Duvan Zapata, but coach Gian Piero Gasperini still believes they can get a result.
“For us it represents an opportunity for us to stay in the competition,” said Gasperini.
“It’s important to get a result.
“It’s going to be a very tough match but thankfully we start again at 0-0.
“We’re going to stay true to the brand of football that has got us this far. Going to try and harness all our ability tomorrow.
“No-one likes conceding a whole lot of goals but we’re going to stay true to our brand of football in a prestigious stadium like the San Siro which is known all around the world.
“For us, it represents an opportunity. With a positive result we’ll stay in Europe, even if it’s in the Europa League.” — AFP


WITNESS LIST Redistricting Committee March 4, 2000-10:00A Redistricting On: Blum, Edward (Self and Campaign for a Color-Blind America Legal Defense and Educational Foundation) Campos, Marc (Self) Castillo, John E. (Self and Council Member, City of Houston) Coleman, Rep. Garnet (House District 147) Damiani, Stephen (Self) Danburg, Rep. Debra (House District 137) Denton, Frank S. (Self and Conroe Lake Conroe Area Chamber of Commerce) Eschbach, Karl (Self) Garibay, Cruz Giovanni (Self and State Young Tejano Democrats) Hanna, David (Texas Legislative Council) Korbel, George (Self) Mata, Johnny (Self and League of United Latin American Citizens) Milburn, Ruth (Self and Common Cause) Mindiola, Tatcho (Self) Mirabal, Alfonso (U.S. Census Bureau) Murdoch, Dr. Steve (Self) Noriega, Rep. Rick (House District 145) Olivo, Rep. Dora (House District 27) Pate, A. J. (Self) Reyes, Jr., Frumencio (Self) Rodriguez, Olga Llamas (Self and Latina PAC) Schwartz, Barbara (League of Women Voters of Houston) Turner, Jr., Marshall L. (U.S. Census Bureau) Vasquez, Gabriel (Self and Council Member, City of Houston) Ware, Alan (Texas Legislative Council) Webster, Sr., Wade P. (Self) Wilkerson, Jr., Walter D. (Self and Montgomery County Republican Party) Williams, Rep. Tommy (House District 15) Yarbrough, Rep. Ken (House District 138) Zbranek, Rep. Zeb (House District 20) Registering, but not testifying: On: Deshotel, Rep. Joe (House District 22) Gentry, Fran (NAACP) Tillinghast, Scott (Self) Wood, Jerry (City of Houston)


All keybindings should be specified in
Mousetrap format. Examples:
-
a
-
z y
-
ctrl+a
-
command+a
-
a, ctrl+b, z y, command+c - multiple shortcuts that will be treated equivalently
Special keys names: backspace, tab, clear, enter, return, esc, escape, space, up, down, left, right, home, end, pageup, pagedown,
del, delete, and f1 through f19. In order to disable a keybinding, delete its keybinding in the textbox.
Note that not all search engines support all the keybindings.


Unfortunately I'm by myself at the moment and don't have anyone to test this with. However, I did find it interesting and will put this into practise when I see a friend later today. I think the idea of looping (confirming what was said) and dipping (checking in with yourself) while listening is very useful as these techniques will make you a better listener.
I will use the 'Do less than you can' technique. Currently I can concentrate for about five minutes before it starts to feel like a chore. Therefore, I will start aiming for three minutes at more regular intervals.
I will also use the 'One breath a day' technique. I like the idea of intending to mediate is itself a mediation. Therefore, focusing on just one full breath a day is a easy way to maintain the habit of being mindful.
I like the idea of 'looping' whereby you repeat back to the speaker what you think you heard them say. This is a great way to make sure communication is working. This can be used in all areas of life.


# -*- coding: utf-8 -*-
r""" Define some function to measure fairness of a vector of cumulated rewards, of shape `(nbPlayers, horizon)`.
- All functions are valued in :math:`[0, 1]`: :math:`100\%` means fully unfair (one player has :math:`0` rewards, another one has :math:`>0` rewards), and :math:`0\%` means fully fair (they all have exactly the same rewards).
- Reference: https://en.wikipedia.org/wiki/Fairness_measure and http://ica1www.epfl.ch/PS_files/LEB3132.pdf#search=%22max-min%20fairness%22.
"""
from __future__ import division, print_function # Python 2 compatibility
__author__ = "Lilian Besson"
__version__ = "0.5"
import numpy as np
[docs]def amplitude_fairness(X, axis=0):
r""" (Normalized) Amplitude fairness, homemade formula: :math:`1 - \min(X, axis) / \max(X, axis)`.
Examples:
>>> import numpy.random as rn; rn.seed(1) # for reproductibility
>>> X = np.cumsum(rn.rand(10, 1000))
>>> amplitude_fairness(X) # doctest: +ELLIPSIS
0.999...
>>> amplitude_fairness(X ** 2) # More spreadout # doctest: +ELLIPSIS
0.999...
>>> amplitude_fairness(np.log(1 + np.abs(X))) # Less spreadout # doctest: +ELLIPSIS
0.959...
>>> rn.seed(3) # for reproductibility
>>> X = rn.randint(0, 10, (10, 1000)); Y = np.cumsum(X, axis=1)
>>> np.min(Y, axis=0)[0], np.max(Y, axis=0)[0]
(3, 9)
>>> np.min(Y, axis=0)[-1], np.max(Y, axis=0)[-1]
(4387, 4601)
>>> amplitude_fairness(Y, axis=0).shape
(1000,)
>>> list(amplitude_fairness(Y, axis=0)) # doctest: +ELLIPSIS
[0.666..., 0.764..., ..., 0.0465...]
>>> X[X >= 3] = 3; Y = np.cumsum(X, axis=1)
>>> np.min(Y, axis=0)[0], np.max(Y, axis=0)[0]
(3, 3)
>>> np.min(Y, axis=0)[-1], np.max(Y, axis=0)[-1]
(2353, 2433)
>>> amplitude_fairness(Y, axis=0).shape
(1000,)
>>> list(amplitude_fairness(Y, axis=0)) # Less spreadout # doctest: +ELLIPSIS
[0.0, 0.5, ..., 0.0328...]
"""
X = np.asarray(X)
return 1 - (np.min(X, axis=axis) / np.max(X, axis=axis))
[docs]def std_fairness(X, axis=0):
r""" (Normalized) Standard-variation fairness, homemade formula: :math:`2 * \mathrm{std}(X, axis) / \max(X, axis)`.
Examples:
>>> import numpy.random as rn; rn.seed(1) # for reproductibility
>>> X = np.cumsum(rn.rand(10, 1000))
>>> std_fairness(X) # doctest: +ELLIPSIS
0.575...
>>> std_fairness(X ** 2) # More spreadout # doctest: +ELLIPSIS
0.594...
>>> std_fairness(np.sqrt(np.abs(X))) # Less spreadout # doctest: +ELLIPSIS
0.470...
>>> rn.seed(2) # for reproductibility
>>> X = np.cumsum(rn.randint(0, 10, (10, 100)))
>>> std_fairness(X) # doctest: +ELLIPSIS
0.570...
>>> std_fairness(X ** 2) # More spreadout # doctest: +ELLIPSIS
0.587...
>>> std_fairness(np.sqrt(np.abs(X))) # Less spreadout # doctest: +ELLIPSIS
0.463...
"""
X = np.asarray(X)
return 2 * np.std(X, axis=axis) / np.max(X, axis=axis)
[docs]def rajjain_fairness(X, axis=0):
r""" Raj Jain's fairness index: :math:`(\sum_{i=1}^{n} x_i)^2 / (n \times \sum_{i=1}^{n} x_i^2)`, projected to :math:`[0, 1]` instead of :math:`[\frac{1}{n}, 1]` as introduced in the reference article.
- cf. https://en.wikipedia.org/wiki/Fairness_measure#Jain.27s_fairness_index.
Examples:
>>> import numpy.random as rn; rn.seed(1) # for reproductibility
>>> X = np.cumsum(rn.rand(10, 1000))
>>> rajjain_fairness(X) # doctest: +ELLIPSIS
0.248...
>>> rajjain_fairness(X ** 2) # More spreadout # doctest: +ELLIPSIS
0.441...
>>> rajjain_fairness(np.sqrt(np.abs(X))) # Less spreadout # doctest: +ELLIPSIS
0.110...
>>> rn.seed(2) # for reproductibility
>>> X = np.cumsum(rn.randint(0, 10, (10, 100)))
>>> rajjain_fairness(X) # doctest: +ELLIPSIS
0.246...
>>> rajjain_fairness(X ** 2) # More spreadout # doctest: +ELLIPSIS
0.917...
>>> rajjain_fairness(np.sqrt(np.abs(X))) # Less spreadout # doctest: +ELLIPSIS
0.107...
"""
X = np.asarray(X)
n = X.shape[axis]
if n <= 1:
return 0
else:
return (n - (np.sum(X, axis=axis) ** 2) / (np.sum(X ** 2, axis=axis))) / (n - 1)
[docs]def mo_walrand_fairness(X, axis=0, alpha=2):
r""" Mo and Walrand's family fairness index: :math:`U_{\alpha}(X)`, **NOT** projected to :math:`[0, 1]`.
.. math::
U_{\alpha}(X) = \begin{cases}
\frac{1}{1 - \alpha} \sum_{i=1}^n x_i^{1 - \alpha} & \;\text{if}\; \alpha\in[0,+\infty)\setminus\{1\}, \\
\sum_{i=1}^{n} \ln(x_i) & \;\text{otherwise}.
\end{cases}
Examples:
>>> import numpy.random as rn; rn.seed(1) # for reproductibility
>>> X = np.cumsum(rn.rand(10, 1000))
>>> alpha = 0
>>> mo_walrand_fairness(X, alpha=alpha) # doctest: +ELLIPSIS
24972857.013...
>>> mo_walrand_fairness(X ** 2, alpha=alpha) # More spreadout # doctest: +ELLIPSIS
82933940429.039...
>>> mo_walrand_fairness(np.sqrt(np.abs(X)), alpha=alpha) # Less spreadout # doctest: +ELLIPSIS
471371.219...
>>> alpha = 0.99999
>>> mo_walrand_fairness(X, alpha=alpha) # doctest: +ELLIPSIS
1000075176.390...
>>> mo_walrand_fairness(X ** 2, alpha=alpha) # More spreadout # doctest: +ELLIPSIS
1000150358.528...
>>> mo_walrand_fairness(np.sqrt(np.abs(X)), alpha=alpha) # Less spreadout # doctest: +ELLIPSIS
1000037587.478...
>>> alpha = 1
>>> mo_walrand_fairness(X, alpha=alpha) # doctest: +ELLIPSIS
75173.509...
>>> mo_walrand_fairness(X ** 2, alpha=alpha) # More spreadout # doctest: +ELLIPSIS
150347.019...
>>> mo_walrand_fairness(np.sqrt(np.abs(X)), alpha=alpha) # Less spreadout # doctest: +ELLIPSIS
37586.754...
>>> alpha = 1.00001
>>> mo_walrand_fairness(X, alpha=alpha) # doctest: +ELLIPSIS
-999924829.359...
>>> mo_walrand_fairness(X ** 2, alpha=alpha) # More spreadout # doctest: +ELLIPSIS
-999849664.476...
>>> mo_walrand_fairness(np.sqrt(np.abs(X)), alpha=alpha) # Less spreadout # doctest: +ELLIPSIS
-999962413.957...
>>> alpha = 2
>>> mo_walrand_fairness(X, alpha=alpha) # doctest: +ELLIPSIS
-22.346...
>>> mo_walrand_fairness(X ** 2, alpha=alpha) # More spreadout # doctest: +ELLIPSIS
-9.874...
>>> mo_walrand_fairness(np.sqrt(np.abs(X)), alpha=alpha) # Less spreadout # doctest: +ELLIPSIS
-283.255...
>>> alpha = 5
>>> mo_walrand_fairness(X, alpha=alpha) # doctest: +ELLIPSIS
-8.737...
>>> mo_walrand_fairness(X ** 2, alpha=alpha) # More spreadout # doctest: +ELLIPSIS
-273.522...
>>> mo_walrand_fairness(np.sqrt(np.abs(X)), alpha=alpha) # Less spreadout # doctest: +ELLIPSIS
-2.468...
"""
X = np.asarray(X)
n = X.shape[axis]
if n <= 1:
return 0
else:
assert alpha >= 0, "Error: the parameter 'alpha' for mo_walrand_fairness() function has to be >= 0, but it was {} instead.".format(alpha) # DEBUG
if alpha == 1:
return np.sum(np.log(X))
else:
oneMalpha = 1. - alpha
return (1. / oneMalpha) * np.sum(X ** oneMalpha)
[docs]def mean_fairness(X, axis=0, methods=(amplitude_fairness, std_fairness, rajjain_fairness)):
""" Fairness index, based on mean of the 3 fairness measures: Amplitude, STD and Raj Jain fairness.
Examples:
>>> import numpy.random as rn; rn.seed(1) # for reproductibility
>>> X = np.cumsum(rn.rand(10, 1000))
>>> mean_fairness(X) # doctest: +ELLIPSIS
0.607...
>>> mean_fairness(X ** 2) # More spreadout # doctest: +ELLIPSIS
0.678...
>>> mean_fairness(np.sqrt(np.abs(X))) # Less spreadout # doctest: +ELLIPSIS
0.523...
>>> rn.seed(2) # for reproductibility
>>> X = np.cumsum(rn.randint(0, 10, (10, 100)))
>>> mean_fairness(X) # doctest: +ELLIPSIS
0.605...
>>> mean_fairness(X ** 2) # More spreadout # doctest: +ELLIPSIS
0.834...
>>> mean_fairness(np.sqrt(np.abs(X))) # Less spreadout # doctest: +ELLIPSIS
0.509...
"""
X = np.asarray(X)
fairnesses = np.array([m(X, axis=axis) for m in methods])
return np.mean(fairnesses, axis=0)
#: Default fairness measure
fairnessMeasure = mean_fairness
#: Mapping of names of measure to their function
fairness_mapping = {
# "amplitude_fairness": amplitude_fairness,
# "std_fairness": std_fairness,
# "rajjain_fairness": rajjain_fairness,
# "mean_fairness": mean_fairness,
# "fairnessMeasure": fairnessMeasure,
# "amplitude": amplitude_fairness,
# "std": std_fairness,
# "rajjain": rajjain_fairness,
# "mean": mean_fairness,
# "default": fairnessMeasure,
"Amplitude": amplitude_fairness,
"STD": std_fairness,
"RajJain": rajjain_fairness,
"MoWalrand": mo_walrand_fairness,
"Mean": mean_fairness,
"Default": fairnessMeasure,
}
# Only export and expose the useful functions defined here
__all__ = [
"amplitude_fairness",
"std_fairness",
"rajjain_fairness",
"mo_walrand_fairness",
"mean_fairness",
"fairnessMeasure",
"fairness_mapping",
]
# --- Debugging
if __name__ == "__main__":
# Code for debugging purposes.
from doctest import testmod
print("\nTesting automatically all the docstring written in each functions of this module :")
testmod(verbose=True)


Gary Duehr Erasures
Erasures
Taken from trains, these photographs capture glimpses of the landscape streaming past. The arch of a bridge, some power lines, a stand of trees on a hill.
In a way, the train’s speed can be thought of as erasing the scenery, smudging its tones, smearing together land and sky.
Sometimes a cloud’s brightness overwhelms. Or a dirty train window’s graininess obliterates the view. It is as if the solidity of things comes into question, as if the landscape might, at any moment, vanish completely.
"Erasures" is less about what’s out there than what flies past the corner of the eye.
Pigment prints on Amate paper, varnished on wood panel, 12" x 12".
Gary Duehr
November 2010


--- layout: page title: Learning ---
| Certificate | Issuer | Workload | Completion |
| Machine Learning Engineering for Production (MLOps) Specialization | DeepLearning.AI | [in progress] | |
| Generative Adversarial Networks (GANs) Specialization | DeepLearning.AI | 3 courses, 10 weeks | 2022 |
| TensorFlow Developer | DeepLearning.AI | 4 courses, 4 weeks | 2020 |
| Deep Learning Specialization | DeepLearning.AI | 5 courses, 16 weeks | 2019-2020 |
| Data Scientist with Python | DataCamp | 84 hours | 2018 |
| Data Scientist with R | DataCamp | 95 hours | 2017 |
| Certificate | Issuer | Completion |
| MSc Econometrics | Erasmus University Rotterdam, The Netherlands | 2018 |
| BSc Quantitative Methods in Economics and Information Systems | Warsaw School of Economics (SGH), Poland | 2016 |
| Certificate | Issuer | Completion |
| Dutch Language (B1) | Erasmus University Rotterdam | 2018 |
| Masterclass in Actuarial Sciences | Erasmus School of Economics & Allianz | 2017 |
| German Language, Allgemein- und Wirtschaftsdeutch (C1) | Warsaw School of Economics (SGH) | 2015 |
| English Language, Certificate of Proficiency in English (C2, grade A) | University of Cambridge | 2014 |


Does Agama have a self update function or do I have to download from the site each time?
you have to download from the site everytime
I'm worried about trusting verus, why do you guys trust them so much?
they are an ecosystem project, the repos are open source, the founders are public and have a good relationship with our project
We will have our own desktop litewallet when AtomicDEX desktop is released, till then, ocean qt wallet is developed by Komodo team and can be used for desktop native
@steinsg8
(edited)


|
Vkx
0.1.0
Vulkan C++ extensions
|
A directional light. More...
#include <Vkx/Light.h>
Public Member Functions | |
| DirectionalLight (int id) | |
| Constructor. More... | |
| DirectionalLight (int id, glm::vec4 const &ambient, glm::vec4 const &diffuse, glm::vec4 const &specular, glm::vec3 const &direction) | |
| Constructor. More... | |
| virtual | ~DirectionalLight () override=default |
| Destructor. | |
| void | setAmbientColor (glm::vec4 const &ambient) |
| Sets the ambient color. | |
| glm::vec4 | ambientColor () const |
| Returns the ambient color. | |
| void | setDiffuseColor (glm::vec4 const &diffuse) |
| Sets the diffuse color. | |
| glm::vec4 | diffuseColor () const |
| Returns the diffuse color. | |
| void | setSpecularColor (glm::vec4 const &specular) |
| Sets the specular color. | |
| glm::vec4 | specularColor () const |
| Returns the specular color. | |
| void | setDirection (glm::vec3 const &direction) |
| Sets the light's direction. | |
| glm::vec3 | direction () const |
| Returns the light's direction. | |
| void | set (glm::vec4 const &ambient, glm::vec4 const &diffuse, glm::vec4 const &specular, glm::vec3 const &direction) |
| Sets the values specific to directional lights. More... | |
| Public Member Functions inherited from Vkx::Light | |
| virtual | ~Light ()=default |
| Destructor. | |
| int | id () const |
| Returns the light's ID. | |
| int | type () const |
| Returns the light's type id. | |
| bool | isEnabled () const |
| Returns true if the light is enabled. | |
| void | enable (bool enabled=true) |
| Enables or disables the light. | |
Additional Inherited Members | |
| Public Types inherited from Vkx::Light | |
| enum | TypeId { CUSTOM = -1, AMBIENT, POINT, DIRECTIONAL, SPOT } |
| Type of light. | |
| Protected Member Functions inherited from Vkx::Light | |
| Light ()=delete | |
| Constructor. | |
| Light (int id, TypeId type) | |
| Constructor. More... | |
A directional light.
| Vkx::DirectionalLight::DirectionalLight | ( | int | id | ) |
Constructor.
The default constructor initializes a light with the following properties:
| id | An identifier for this light |
| Vkx::DirectionalLight::DirectionalLight | ( | int | id, |
| glm::vec4 const & | ambient, | ||
| glm::vec4 const & | diffuse, | ||
| glm::vec4 const & | specular, | ||
| glm::vec3 const & | direction | ||
| ) |
Constructor.
| id | An identifier for this light |
| ambient | Ambient color |
| diffuse | Diffuse color |
| specular | Specular color |
| direction | Direction of the light |
| void Vkx::DirectionalLight::set | ( | glm::vec4 const & | ambient, |
| glm::vec4 const & | diffuse, | ||
| glm::vec4 const & | specular, | ||
| glm::vec3 const & | direction | ||
| ) |
Sets the values specific to directional lights.
| ambient | Ambient color |
| diffuse | Diffuse color |
| specular | Specular color |
| direction | Direction of the light |


Loading...
remove_red_eye loading... favorite loading... favorite_border loading... comment loading...
loading description...
loading...


JerryRigEverything’s video gives another reason why you should skip the Pixel 4 XL
by AnmolZack from JerryRigEverything has been testing phones for quite some time now and his videos are usually geared towards the durability aspect of smartphones. While extreme sometimes, his tests usually simulate the kind of abuse a smartphone might endure in its entire life.
Today, Zack shared a new video which pushes Pixel 4 XL to its limits and the phone cracked under pressure, literally. JerryRigEverything’s video gave customers another reason why they should skip the Pixel 4 XL. While Pixel 4 XL is certainly not the first device to crack, it’s one of the few flagships to not make it to the end of the test in one piece.
As Zack pointed out in the video, the reason for multiple cracks is the bad antenna placement which reduces the structural integrity making it susceptible to bends and cracks. Unfortunately, the device developed four cracks on four sides which is definitely not good especially for a phone that costs $800. As Zack said, “Pixel tried to copy iPhone’s homework without changing anything and still managed to get all the answers wrong”.


Apparatus required:
5 stoppered bottles
Pipettes- 25ml, 10 ml
Conical flask- 250 ml
Burette- 50 ml
Measuring cylinder- 500 mlbr>
Beaker- 250 ml
Standard flask- 100 ml, 250 ml, 1000 ml
Procedure:
1.6.3 g of oxalic acid crystal are weighed and transferred to 1000 ml standard flask, diluted up to mark with distilled water and shaken well.
2.The above solution in the standard flask has the strength of 0.1N
3.Weigh 0.5, 1, 2, 3, & 4 gm of activated carbon in each of the conical flasks marked 1 to 5.
4.Transfer 100 ml oxalic acid of 0.1N to the above flasks marked 1 to 5 and close the flask opening by any closure.
5.Keep the flasks for agitation in an orbital shaker for 45 mins to 1 hour.
6.Stop agitation. Collece the flasks and filter the contents of each conical flask.
7.Pipette out 10 ml of the solution from the 1st flask in a clean conical flask.
8.Titrate against standard NaOH in a burette using phenolphthalein as indicator.
9.Colour changes from colourless to pale pink.
10.Repeat the trial to get concordant values and repeat the procedure for flask 2, 3,4, 5
11.Tabulate the results and plot the graph.
Formula to be Used :-
C*=K[V(C_0-C*)]^n
Where K and n are constants.
C* = Equilibrium concentration of adsorbate.
C0 = Initial concentration of the solute in the liquid.
V = known volume of solution with a known weight of adsorbent (volume solution/mass adsorbent).


Software Engineer, February 2013 - present
Designed and implemented system-level security sandboxing technology for a Web renderer
Refactored legacy code for asynchrony and process separation
Developed tools to investigate system-level performance on a novel mobile OS
Member of Technical Staff, May 2010 - January 2013
Maintained subsystems ranging from memory allocation to filesystem implementation to error reporting
Improved filesystem and memory management infrastructure owned by other groups
Debugged and fixed a variety of code, kernel and userlevel, as part of rotating bug triage duties
Upgraded the kernel build to a newer C compiler, modifying the compiler to make this possible
Implemented a system for kernel-specialized low-overhead detection of a class of memory usage errors
Researched potential applications of NAND flash memory for transparent persistence in garbage-collected managed runtime environments.
Improved crash recovery efficiency of NetBSD's software RAID driver
Gained primary responsibility for a small ISP's email system; significantly improved its performance
Analyzed and corrected defects in the NetBSD kernel, including Xen paravirtual drivers
M.S., Computer Science, 2010
B.A., Computer Science (high honors) and Mathematics, 2003
Honors project: composable object-orientation for agent-based modelling
Programming Languages: C, C++, Coq, Erlang, Forth, Haskell, JavaScript, m4, OCaml, Perl, Python, Rust, Scheme, sh/sed/AWK; TEX/LATEX, x86 assembly (i386, x86_64)
Operating Systems: Linux (Debian), FreeBSD, NetBSD, VMware ESXi
Revision Control: Git, Mercurial, Subversion, Perforce, CVS
Judges' Prize and 3rd place, ICFP Programming Competition, 2007 (as team of one)
Implemented the Rust language's optional pointer optimization
Lost the 20th International Obfuscated C Code Competition