public final class Math extends Object
Math
contains methods for performing basic
numeric operations such as the elementary exponential, logarithm,
square root, and trigonometric functions.
Unlike some of the numeric methods of class
StrictMath
, all implementations of the equivalent
functions of class Math
are not defined to return the
bit-for-bit same results. This relaxation permits
better-performing implementations where strict reproducibility is
not required.
By default many of the Math
methods simply call
the equivalent method in StrictMath
for their
implementation. Code generators are encouraged to use
platform-specific native libraries or microprocessor instructions,
where available, to provide higher-performance implementations of
Math
methods. Such higher-performance
implementations still must conform to the specification for
Math
.
The quality of implementation specifications concern two
properties, accuracy of the returned result and monotonicity of the
method. Accuracy of the floating-point Math
methods is
measured in terms of ulps, units in the last place. For a
given floating-point format, an ulp of a
specific real number value is the distance between the two
floating-point values bracketing that numerical value. When
discussing the accuracy of a method as a whole rather than at a
specific argument, the number of ulps cited is for the worst-case
error at any argument. If a method always has an error less than
0.5 ulps, the method always returns the floating-point number
nearest the exact result; such a method is correctly
rounded. A correctly rounded method is generally the best a
floating-point approximation can be; however, it is impractical for
many floating-point methods to be correctly rounded. Instead, for
the Math
class, a larger error bound of 1 or 2 ulps is
allowed for certain methods. Informally, with a 1 ulp error bound,
when the exact result is a representable number, the exact result
should be returned as the computed result; otherwise, either of the
two floating-point values which bracket the exact result may be
returned. For exact results large in magnitude, one of the
endpoints of the bracket may be infinite. Besides accuracy at
individual arguments, maintaining proper relations between the
method at different arguments is also important. Therefore, most
methods with more than 0.5 ulp errors are required to be
semi-monotonic: whenever the mathematical function is
non-decreasing, so is the floating-point approximation, likewise,
whenever the mathematical function is non-increasing, so is the
floating-point approximation. Not all approximations that have 1
ulp accuracy will automatically meet the monotonicity requirements.
The platform uses signed two's complement integer arithmetic with
int and long primitive types. The developer should choose
the primitive type to ensure that arithmetic operations consistently
produce correct results, which in some cases means the operations
will not overflow the range of values of the computation.
The best practice is to choose the primitive type and algorithm to avoid
overflow. In cases where the size is int
or long
and
overflow errors need to be detected, the methods addExact
,
subtractExact
, multiplyExact
, and toIntExact
throw an ArithmeticException
when the results overflow.
For other arithmetic operations such as divide, absolute value,
increment, decrement, and negation overflow occurs only with
a specific minimum or maximum value and should be checked against
the minimum or maximum as appropriate.
| Modifier and Type | Field and Description |
|---|---|
static double |
E
The
double value that is closer than any other to
e, the base of the natural logarithms. |
static double |
PI
The
double value that is closer than any other to
pi, the ratio of the circumference of a circle to its
diameter. |
| Modifier and Type | Method and Description |
|---|---|
static double |
abs(double a)
Returns the absolute value of a
double value. |
static float |
abs(float a)
Returns the absolute value of a
float value. |
static int |
abs(int a)
Returns the absolute value of an
int value. |
static long |
abs(long a)
Returns the absolute value of a
long value. |
static double |
acos(double a)
Returns the arc cosine of a value; the returned angle is in the
range 0.0 through pi.
|
static int |
addExact(int x,
int y)
Returns the sum of its arguments,
throwing an exception if the result overflows an
int . |
static long |
addExact(long x,
long y)
Returns the sum of its arguments,
throwing an exception if the result overflows a
long . |
static double |
asin(double a)
Returns the arc sine of a value; the returned angle is in the
range -pi/2 through pi/2.
|
static double |
atan(double a)
Returns the arc tangent of a value; the returned angle is in the
range -pi/2 through pi/2.
|
static double |
atan2(double y,
double x)
Returns the angle theta from the conversion of rectangular
coordinates (
x , y ) to polar
coordinates (r, theta). |
static double |
cbrt(double a)
Returns the cube root of a
double value. |
static double |
ceil(double a)
Returns the smallest (closest to negative infinity)
double value that is greater than or equal to the
argument and is equal to a mathematical integer. |
static double |
copySign(double magnitude,
double sign)
Returns the first floating-point argument with the sign of the
second floating-point argument.
|
static float |
copySign(float magnitude,
float sign)
Returns the first floating-point argument with the sign of the
second floating-point argument.
|
static double |
cos(double a)
Returns the trigonometric cosine of an angle.
|
static double |
cosh(double x)
Returns the hyperbolic cosine of a
double value. |
static int |
decrementExact(int a)
Returns the argument decremented by one, throwing an exception if the
result overflows an
int . |
static long |
decrementExact(long a)
Returns the argument decremented by one, throwing an exception if the
result overflows a
long . |
static double |
exp(double a)
Returns Euler's number e raised to the power of a
double value. |
static double |
expm1(double x)
Returns ex -1.
|
static double |
floor(double a)
Returns the largest (closest to positive infinity)
double value that is less than or equal to the
argument and is equal to a mathematical integer. |
static int |
floorDiv(int x,
int y)
Returns the largest (closest to positive infinity)
int value that is less than or equal to the algebraic quotient. |
static long |
floorDiv(long x,
long y)
Returns the largest (closest to positive infinity)
long value that is less than or equal to the algebraic quotient. |
static int |
floorMod(int x,
int y)
Returns the floor modulus of the
int arguments. |
static long |
floorMod(long x,
long y)
Returns the floor modulus of the
long arguments. |
static int |
getExponent(double d)
Returns the unbiased exponent used in the representation of a
double . |
static int |
getExponent(float f)
Returns the unbiased exponent used in the representation of a
float . |
static double |
hypot(double x,
double y)
Returns sqrt(x2 +y2)
without intermediate overflow or underflow.
|
static double |
IEEEremainder(double f1,
double f2)
Computes the remainder operation on two arguments as prescribed
by the IEEE 754 standard.
|
static int |
incrementExact(int a)
Returns the argument incremented by one, throwing an exception if the
result overflows an
int . |
static long |
incrementExact(long a)
Returns the argument incremented by one, throwing an exception if the
result overflows a
long . |
static double |
log(double a)
Returns the natural logarithm (base e) of a
double
value. |
static double |
log10(double a)
Returns the base 10 logarithm of a
double value. |
static double |
log1p(double x)
Returns the natural logarithm of the sum of the argument and 1.
|
static double |
max(double a,
double b)
Returns the greater of two
double values. |
static float |
max(float a,
float b)
Returns the greater of two
float values. |
static int |
max(int a,
int b)
Returns the greater of two
int values. |
static long |
max(long a,
long b)
Returns the greater of two
long values. |
static double |
min(double a,
double b)
Returns the smaller of two
double values. |
static float |
min(float a,
float b)
Returns the smaller of two
float values. |
static int |
min(int a,
int b)
Returns the smaller of two
int values. |
static long |
min(long a,
long b)
Returns the smaller of two
long values. |
static int |
multiplyExact(int x,
int y)
Returns the product of the arguments,
throwing an exception if the result overflows an
int . |
static long |
multiplyExact(long x,
long y)
Returns the product of the arguments,
throwing an exception if the result overflows a
long . |
static int |
negateExact(int a)
Returns the negation of the argument, throwing an exception if the
result overflows an
int . |
static long |
negateExact(long a)
Returns the negation of the argument, throwing an exception if the
result overflows a
long . |
static double |
nextAfter(double start,
double direction)
Returns the floating-point number adjacent to the first
argument in the direction of the second argument.
|
static float |
nextAfter(float start,
double direction)
Returns the floating-point number adjacent to the first
argument in the direction of the second argument.
|
static double |
nextDown(double d)
Returns the floating-point value adjacent to
d in
the direction of negative infinity. |
static float |
nextDown(float f)
Returns the floating-point value adjacent to
f in
the direction of negative infinity. |
static double |
nextUp(double d)
Returns the floating-point value adjacent to
d in
the direction of positive infinity. |
static float |
nextUp(float f)
Returns the floating-point value adjacent to
f in
the direction of positive infinity. |
static double |
pow(double a,
double b)
Returns the value of the first argument raised to the power of the
second argument.
|
static double |
random()
Returns a
double value with a positive sign, greater
than or equal to 0.0 and less than 1.0 . |
static double |
rint(double a)
Returns the
double value that is closest in value
to the argument and is equal to a mathematical integer. |
static long |
round(double a)
Returns the closest
long to the argument, with ties
rounding to positive infinity. |
static int |
round(float a)
Returns the closest
int to the argument, with ties
rounding to positive infinity. |
static double |
scalb(double d,
int scaleFactor)
Returns
d ×
2scaleFactor rounded as if performed
by a single correctly rounded floating-point multiply to a
member of the double value set. |
static float |
scalb(float f,
int scaleFactor)
Returns
f ×
2scaleFactor rounded as if performed
by a single correctly rounded floating-point multiply to a
member of the float value set. |
static double |
signum(double d)
Returns the signum function of the argument; zero if the argument
is zero, 1.0 if the argument is greater than zero, -1.0 if the
argument is less than zero.
|
static float |
signum(float f)
Returns the signum function of the argument; zero if the argument
is zero, 1.0f if the argument is greater than zero, -1.0f if the
argument is less than zero.
|
static double |
sin(double a)
Returns the trigonometric sine of an angle.
|
static double |
sinh(double x)
Returns the hyperbolic sine of a
double value. |
static double |
sqrt(double a)
Returns the correctly rounded positive square root of a
double value. |
static int |
subtractExact(int x,
int y)
Returns the difference of the arguments,
throwing an exception if the result overflows an
int . |
static long |
subtractExact(long x,
long y)
Returns the difference of the arguments,
throwing an exception if the result overflows a
long . |
static double |
tan(double a)
Returns the trigonometric tangent of an angle.
|
static double |
tanh(double x)
Returns the hyperbolic tangent of a
double value. |
static double |
toDegrees(double angrad)
Converts an angle measured in radians to an approximately
equivalent angle measured in degrees.
|
static int |
toIntExact(long value)
Returns the value of the
long argument;
throwing an exception if the value overflows an int . |
static double |
toRadians(double angdeg)
Converts an angle measured in degrees to an approximately
equivalent angle measured in radians.
|
static double |
ulp(double d)
Returns the size of an ulp of the argument.
|
static float |
ulp(float f)
Returns the size of an ulp of the argument.
|
public static final double E
double
value that is closer than any other to
e, the base of the natural logarithms.public static final double PI
double
value that is closer than any other to
pi, the ratio of the circumference of a circle to its
diameter.public static double sin(double a)
The computed result must be within 1 ulp of the exact result. Results must be semi-monotonic.
a
- an angle, in radians.public static double cos(double a)
The computed result must be within 1 ulp of the exact result. Results must be semi-monotonic.
a
- an angle, in radians.public static double tan(double a)
The computed result must be within 1 ulp of the exact result. Results must be semi-monotonic.
a
- an angle, in radians.public static double asin(double a)
The computed result must be within 1 ulp of the exact result. Results must be semi-monotonic.
a
- the value whose arc sine is to be returned.public static double acos(double a)
The computed result must be within 1 ulp of the exact result. Results must be semi-monotonic.
a
- the value whose arc cosine is to be returned.public static double atan(double a)
The computed result must be within 1 ulp of the exact result. Results must be semi-monotonic.
a
- the value whose arc tangent is to be returned.public static double toRadians(double angdeg)
angdeg
- an angle, in degreesangdeg
in radians.public static double toDegrees(double angrad)
cos(toRadians(90.0))
to exactly
equal 0.0
.angrad
- an angle, in radiansangrad
in degrees.public static double exp(double a)
double
value. Special cases:
The computed result must be within 1 ulp of the exact result. Results must be semi-monotonic.
a
- the exponent to raise e to.a
,
where e is the base of the natural logarithms.public static double log(double a)
double
value. Special cases:
The computed result must be within 1 ulp of the exact result. Results must be semi-monotonic.
a
- a valuea
, the natural logarithm of
a
.public static double log10(double a)
double
value.
Special cases:
The computed result must be within 1 ulp of the exact result. Results must be semi-monotonic.
a
- a valuea
.public static double sqrt(double a)
double
value.
Special cases:
double
value closest to
the true mathematical square root of the argument value.a
- a value.a
.
If the argument is NaN or less than zero, the result is NaN.public static double cbrt(double a)
double
value. For
positive finite x
, cbrt(-x) ==
-cbrt(x)
; that is, the cube root of a negative value is
the negative of the cube root of that value's magnitude.
Special cases:
The computed result must be within 1 ulp of the exact result.
a
- a value.a
.public static double IEEEremainder(double f1, double f2)
f1 - f2
× n,
where n is the mathematical integer closest to the exact
mathematical value of the quotient f1/f2
, and if two
mathematical integers are equally close to f1/f2
,
then n is the integer that is even. If the remainder is
zero, its sign is the same as the sign of the first argument.
Special cases:
f1
- the dividend.f2
- the divisor.f1
is divided by
f2
.public static double ceil(double a)
double
value that is greater than or equal to the
argument and is equal to a mathematical integer. Special cases:
Math.ceil(x)
is exactly the
value of -Math.floor(-x)
.a
- a value.public static double floor(double a)
double
value that is less than or equal to the
argument and is equal to a mathematical integer. Special cases:
a
- a value.public static double rint(double a)
double
value that is closest in value
to the argument and is equal to a mathematical integer. If two
double
values that are mathematical integers are
equally close, the result is the integer value that is
even. Special cases:
a
- a double
value.a
that is
equal to a mathematical integer.public static double atan2(double y, double x)
x
, y
) to polar
coordinates (r, theta).
This method computes the phase theta by computing an arc tangent
of y/x
in the range of -pi to pi. Special
cases:
double
value closest to pi.
double
value closest to -pi.
double
value closest to pi/2.
double
value closest to -pi/2.
double
value closest to pi/4.
double
value closest to 3*pi/4.
double
value
closest to -pi/4.
double
value closest to -3*pi/4.The computed result must be within 2 ulps of the exact result. Results must be semi-monotonic.
y
- the ordinate coordinatex
- the abscissa coordinatepublic static double pow(double a, double b)
double
value.(In the foregoing descriptions, a floating-point value is
considered to be an integer if and only if it is finite and a
fixed point of the method ceil
or,
equivalently, a fixed point of the method floor
. A value is a fixed point of a one-argument
method if and only if the result of applying the method to the
value is equal to the value.)
The computed result must be within 1 ulp of the exact result. Results must be semi-monotonic.
a
- the base.b
- the exponent.a
b
.public static int round(float a)
int
to the argument, with ties
rounding to positive infinity.
Special cases:
Integer.MIN_VALUE
, the result is
equal to the value of Integer.MIN_VALUE
.
Integer.MAX_VALUE
, the result is
equal to the value of Integer.MAX_VALUE
.a
- a floating-point value to be rounded to an integer.int
value.Integer.MAX_VALUE
,
Integer.MIN_VALUE
public static long round(double a)
long
to the argument, with ties
rounding to positive infinity.
Special cases:
Long.MIN_VALUE
, the result is
equal to the value of Long.MIN_VALUE
.
Long.MAX_VALUE
, the result is
equal to the value of Long.MAX_VALUE
.a
- a floating-point value to be rounded to a
long
.long
value.Long.MAX_VALUE
,
Long.MIN_VALUE
public static double random()
double
value with a positive sign, greater
than or equal to 0.0
and less than 1.0
.
Returned values are chosen pseudorandomly with (approximately)
uniform distribution from that range.
When this method is first called, it creates a single new pseudorandom-number generator, exactly as if by the expression
new java.util.Random()
This new pseudorandom-number generator is used thereafter for
all calls to this method and is used nowhere else.
This method is properly synchronized to allow correct use by more than one thread. However, if many threads need to generate pseudorandom numbers at a great rate, it may reduce contention for each thread to have its own pseudorandom-number generator.
double
greater than or equal
to 0.0
and less than 1.0
.Random.nextDouble()
public static int addExact(int x, int y)
int
.x
- the first valuey
- the second valueArithmeticException
- if the result overflows an intpublic static long addExact(long x, long y)
long
.x
- the first valuey
- the second valueArithmeticException
- if the result overflows a longpublic static int subtractExact(int x, int y)
int
.x
- the first valuey
- the second value to subtract from the firstArithmeticException
- if the result overflows an intpublic static long subtractExact(long x, long y)
long
.x
- the first valuey
- the second value to subtract from the firstArithmeticException
- if the result overflows a longpublic static int multiplyExact(int x, int y)
int
.x
- the first valuey
- the second valueArithmeticException
- if the result overflows an intpublic static long multiplyExact(long x, long y)
long
.x
- the first valuey
- the second valueArithmeticException
- if the result overflows a longpublic static int incrementExact(int a)
int
.a
- the value to incrementArithmeticException
- if the result overflows an intpublic static long incrementExact(long a)
long
.a
- the value to incrementArithmeticException
- if the result overflows a longpublic static int decrementExact(int a)
int
.a
- the value to decrementArithmeticException
- if the result overflows an intpublic static long decrementExact(long a)
long
.a
- the value to decrementArithmeticException
- if the result overflows a longpublic static int negateExact(int a)
int
.a
- the value to negateArithmeticException
- if the result overflows an intpublic static long negateExact(long a)
long
.a
- the value to negateArithmeticException
- if the result overflows a longpublic static int toIntExact(long value)
long
argument;
throwing an exception if the value overflows an int
.value
- the long valueArithmeticException
- if the argument
overflows an intpublic static int floorDiv(int x, int y)
int
value that is less than or equal to the algebraic quotient.
There is one special case, if the dividend is the
Integer.MIN_VALUE and the divisor is -1
,
then integer overflow occurs and
the result is equal to the Integer.MIN_VALUE
.
Normal integer division operates under the round to zero rounding mode (truncation). This operation instead acts under the round toward negative infinity (floor) rounding mode. The floor rounding mode gives different results than truncation when the exact result is negative.
floorDiv
and the /
operator are the same. floorDiv(4, 3) == 1
and (4 / 3) == 1
.floorDiv
returns the integer less than or equal to the quotient
and the /
operator returns the integer closest to zero.floorDiv(-4, 3) == -2
,
whereas (-4 / 3) == -1
.
x
- the dividendy
- the divisorint
value that is less than or equal to the algebraic quotient.ArithmeticException
- if the divisor y
is zerofloorMod(int, int)
,
floor(double)
public static long floorDiv(long x, long y)
long
value that is less than or equal to the algebraic quotient.
There is one special case, if the dividend is the
Long.MIN_VALUE and the divisor is -1
,
then integer overflow occurs and
the result is equal to the Long.MIN_VALUE
.
Normal integer division operates under the round to zero rounding mode (truncation). This operation instead acts under the round toward negative infinity (floor) rounding mode. The floor rounding mode gives different results than truncation when the exact result is negative.
For examples, see floorDiv(int, int)
.
x
- the dividendy
- the divisorlong
value that is less than or equal to the algebraic quotient.ArithmeticException
- if the divisor y
is zerofloorMod(long, long)
,
floor(double)
public static int floorMod(int x, int y)
int
arguments.
The floor modulus is x - (floorDiv(x, y) * y)
,
has the same sign as the divisor y
, and
is in the range of -abs(y) < r < +abs(y)
.
The relationship between floorDiv
and floorMod
is such that:
floorDiv(x, y) * y + floorMod(x, y) == x
The difference in values between floorMod
and
the %
operator is due to the difference between
floorDiv
that returns the integer less than or equal to the quotient
and the /
operator that returns the integer closest to zero.
Examples:
floorMod
and the %
operator are the same. floorMod(4, 3) == 1
; and (4 % 3) == 1
%
operator.floorMod(+4, -3) == -2
; and (+4 % -3) == +1
floorMod(-4, +3) == +2
; and (-4 % +3) == -1
floorMod(-4, -3) == -1
; and (-4 % -3) == -1
If the signs of arguments are unknown and a positive modulus
is needed it can be computed as (floorMod(x, y) + abs(y)) % abs(y)
.
x
- the dividendy
- the divisorx - (floorDiv(x, y) * y)
ArithmeticException
- if the divisor y
is zerofloorDiv(int, int)
public static long floorMod(long x, long y)
long
arguments.
The floor modulus is x - (floorDiv(x, y) * y)
,
has the same sign as the divisor y
, and
is in the range of -abs(y) < r < +abs(y)
.
The relationship between floorDiv
and floorMod
is such that:
floorDiv(x, y) * y + floorMod(x, y) == x
For examples, see floorMod(int, int)
.
x
- the dividendy
- the divisorx - (floorDiv(x, y) * y)
ArithmeticException
- if the divisor y
is zerofloorDiv(long, long)
public static int abs(int a)
int
value.
If the argument is not negative, the argument is returned.
If the argument is negative, the negation of the argument is returned.
Note that if the argument is equal to the value of
Integer.MIN_VALUE
, the most negative representable
int
value, the result is that same value, which is
negative.
a
- the argument whose absolute value is to be determinedpublic static long abs(long a)
long
value.
If the argument is not negative, the argument is returned.
If the argument is negative, the negation of the argument is returned.
Note that if the argument is equal to the value of
Long.MIN_VALUE
, the most negative representable
long
value, the result is that same value, which
is negative.
a
- the argument whose absolute value is to be determinedpublic static float abs(float a)
float
value.
If the argument is not negative, the argument is returned.
If the argument is negative, the negation of the argument is returned.
Special cases:
Float.intBitsToFloat(0x7fffffff & Float.floatToIntBits(a))
a
- the argument whose absolute value is to be determinedpublic static double abs(double a)
double
value.
If the argument is not negative, the argument is returned.
If the argument is negative, the negation of the argument is returned.
Special cases:
Double.longBitsToDouble((Double.doubleToLongBits(a)<<1)>>>1)
a
- the argument whose absolute value is to be determinedpublic static int max(int a, int b)
int
values. That is, the
result is the argument closer to the value of
Integer.MAX_VALUE
. If the arguments have the same value,
the result is that same value.a
- an argument.b
- another argument.a
and b
.public static long max(long a, long b)
long
values. That is, the
result is the argument closer to the value of
Long.MAX_VALUE
. If the arguments have the same value,
the result is that same value.a
- an argument.b
- another argument.a
and b
.public static float max(float a, float b)
float
values. That is,
the result is the argument closer to positive infinity. If the
arguments have the same value, the result is that same
value. If either value is NaN, then the result is NaN. Unlike
the numerical comparison operators, this method considers
negative zero to be strictly smaller than positive zero. If one
argument is positive zero and the other negative zero, the
result is positive zero.a
- an argument.b
- another argument.a
and b
.public static double max(double a, double b)
double
values. That
is, the result is the argument closer to positive infinity. If
the arguments have the same value, the result is that same
value. If either value is NaN, then the result is NaN. Unlike
the numerical comparison operators, this method considers
negative zero to be strictly smaller than positive zero. If one
argument is positive zero and the other negative zero, the
result is positive zero.a
- an argument.b
- another argument.a
and b
.public static int min(int a, int b)
int
values. That is,
the result the argument closer to the value of
Integer.MIN_VALUE
. If the arguments have the same
value, the result is that same value.a
- an argument.b
- another argument.a
and b
.public static long min(long a, long b)
long
values. That is,
the result is the argument closer to the value of
Long.MIN_VALUE
. If the arguments have the same
value, the result is that same value.a
- an argument.b
- another argument.a
and b
.public static float min(float a, float b)
float
values. That is,
the result is the value closer to negative infinity. If the
arguments have the same value, the result is that same
value. If either value is NaN, then the result is NaN. Unlike
the numerical comparison operators, this method considers
negative zero to be strictly smaller than positive zero. If
one argument is positive zero and the other is negative zero,
the result is negative zero.a
- an argument.b
- another argument.a
and b
.public static double min(double a, double b)
double
values. That
is, the result is the value closer to negative infinity. If the
arguments have the same value, the result is that same
value. If either value is NaN, then the result is NaN. Unlike
the numerical comparison operators, this method considers
negative zero to be strictly smaller than positive zero. If one
argument is positive zero and the other is negative zero, the
result is negative zero.a
- an argument.b
- another argument.a
and b
.public static double ulp(double d)
double
value is the positive
distance between this floating-point value and the double
value next larger in magnitude. Note that for non-NaN
x, ulp(-x) == ulp(x)
.
Special Cases:
Double.MIN_VALUE
.
Double.MAX_VALUE
, then
the result is equal to 2971.
d
- the floating-point value whose ulp is to be returnedpublic static float ulp(float f)
float
value is the positive
distance between this floating-point value and the float
value next larger in magnitude. Note that for non-NaN
x, ulp(-x) == ulp(x)
.
Special Cases:
Float.MIN_VALUE
.
Float.MAX_VALUE
, then
the result is equal to 2104.
f
- the floating-point value whose ulp is to be returnedpublic static double signum(double d)
Special Cases:
d
- the floating-point value whose signum is to be returnedpublic static float signum(float f)
Special Cases:
f
- the floating-point value whose signum is to be returnedpublic static double sinh(double x)
double
value.
The hyperbolic sine of x is defined to be
(ex - e-x)/2
where e is Euler's number.
Special cases:
The computed result must be within 2.5 ulps of the exact result.
x
- The number whose hyperbolic sine is to be returned.x
.public static double cosh(double x)
double
value.
The hyperbolic cosine of x is defined to be
(ex + e-x)/2
where e is Euler's number.
Special cases:
1.0
.
The computed result must be within 2.5 ulps of the exact result.
x
- The number whose hyperbolic cosine is to be returned.x
.public static double tanh(double x)
double
value.
The hyperbolic tangent of x is defined to be
(ex - e-x)/(ex + e-x),
in other words, sinh(x)/cosh(x). Note
that the absolute value of the exact tanh is always less than
1.
Special cases:
+1.0
.
-1.0
.
The computed result must be within 2.5 ulps of the exact result.
The result of tanh
for any finite input must have
an absolute value less than or equal to 1. Note that once the
exact result of tanh is within 1/2 of an ulp of the limit value
of ±1, correctly signed ±1.0
should
be returned.
x
- The number whose hyperbolic tangent is to be returned.x
.public static double hypot(double x, double y)
Special cases:
The computed result must be within 1 ulp of the exact result. If one parameter is held constant, the results must be semi-monotonic in the other parameter.
x
- a valuey
- a valuepublic static double expm1(double x)
expm1(x)
+ 1 is much closer to the true
result of ex than exp(x)
.
Special cases:
The computed result must be within 1 ulp of the exact result.
Results must be semi-monotonic. The result of
expm1
for any finite input must be greater than or
equal to -1.0
. Note that once the exact result of
ex
- 1 is within 1/2
ulp of the limit value -1, -1.0
should be
returned.
x
- the exponent to raise e to in the computation of
ex
-1.x
- 1.public static double log1p(double x)
x
, the result of
log1p(x)
is much closer to the true result of ln(1
+ x
) than the floating-point evaluation of
log(1.0+x)
.
Special cases:
The computed result must be within 1 ulp of the exact result. Results must be semi-monotonic.
x
- a valuex
+ 1), the natural
log of x
+ 1public static double copySign(double magnitude, double sign)
StrictMath.copySign
method, this method does not require NaN sign
arguments to be treated as positive values; implementations are
permitted to treat some NaN arguments as positive and other NaN
arguments as negative to allow greater performance.magnitude
- the parameter providing the magnitude of the resultsign
- the parameter providing the sign of the resultmagnitude
and the sign of sign
.public static float copySign(float magnitude, float sign)
StrictMath.copySign
method, this method does not require NaN sign
arguments to be treated as positive values; implementations are
permitted to treat some NaN arguments as positive and other NaN
arguments as negative to allow greater performance.magnitude
- the parameter providing the magnitude of the resultsign
- the parameter providing the sign of the resultmagnitude
and the sign of sign
.public static int getExponent(float f)
float
. Special cases:
Float.MAX_EXPONENT
+ 1.
Float.MIN_EXPONENT
-1.
f
- a float
valuepublic static int getExponent(double d)
double
. Special cases:
Double.MAX_EXPONENT
+ 1.
Double.MIN_EXPONENT
-1.
d
- a double
valuepublic static double nextAfter(double start, double direction)
Special cases:
direction
is returned unchanged (as implied by the requirement of
returning the second argument if the arguments compare as
equal).
start
is
±Double.MIN_VALUE
and direction
has a value such that the result should have a smaller
magnitude, then a zero with the same sign as start
is returned.
start
is infinite and
direction
has a value such that the result should
have a smaller magnitude, Double.MAX_VALUE
with the
same sign as start
is returned.
start
is equal to ±
Double.MAX_VALUE
and direction
has a
value such that the result should have a larger magnitude, an
infinity with same sign as start
is returned.
start
- starting floating-point valuedirection
- value indicating which of
start
's neighbors or start
should
be returnedstart
in the
direction of direction
.public static float nextAfter(float start, double direction)
Special cases:
direction
is returned.
start
is
±Float.MIN_VALUE
and direction
has a value such that the result should have a smaller
magnitude, then a zero with the same sign as start
is returned.
start
is infinite and
direction
has a value such that the result should
have a smaller magnitude, Float.MAX_VALUE
with the
same sign as start
is returned.
start
is equal to ±
Float.MAX_VALUE
and direction
has a
value such that the result should have a larger magnitude, an
infinity with same sign as start
is returned.
start
- starting floating-point valuedirection
- value indicating which of
start
's neighbors or start
should
be returnedstart
in the
direction of direction
.public static double nextUp(double d)
d
in
the direction of positive infinity. This method is
semantically equivalent to nextAfter(d,
Double.POSITIVE_INFINITY)
; however, a nextUp
implementation may run faster than its equivalent
nextAfter
call.
Special Cases:
Double.MIN_VALUE
d
- starting floating-point valuepublic static float nextUp(float f)
f
in
the direction of positive infinity. This method is
semantically equivalent to nextAfter(f,
Float.POSITIVE_INFINITY)
; however, a nextUp
implementation may run faster than its equivalent
nextAfter
call.
Special Cases:
Float.MIN_VALUE
f
- starting floating-point valuepublic static double nextDown(double d)
d
in
the direction of negative infinity. This method is
semantically equivalent to nextAfter(d,
Double.NEGATIVE_INFINITY)
; however, a
nextDown
implementation may run faster than its
equivalent nextAfter
call.
Special Cases:
-Double.MIN_VALUE
d
- starting floating-point valuepublic static float nextDown(float f)
f
in
the direction of negative infinity. This method is
semantically equivalent to nextAfter(f,
Float.NEGATIVE_INFINITY)
; however, a
nextDown
implementation may run faster than its
equivalent nextAfter
call.
Special Cases:
-Float.MIN_VALUE
f
- starting floating-point valuepublic static double scalb(double d, int scaleFactor)
d
×
2scaleFactor
rounded as if performed
by a single correctly rounded floating-point multiply to a
member of the double value set. See the Java
Language Specification for a discussion of floating-point
value sets. If the exponent of the result is between Double.MIN_EXPONENT
and Double.MAX_EXPONENT
, the
answer is calculated exactly. If the exponent of the result
would be larger than Double.MAX_EXPONENT
, an
infinity is returned. Note that if the result is subnormal,
precision may be lost; that is, when scalb(x, n)
is subnormal, scalb(scalb(x, n), -n)
may not equal
x. When the result is non-NaN, the result has the same
sign as d
.
Special cases:
d
- number to be scaled by a power of two.scaleFactor
- power of 2 used to scale d
d
× 2scaleFactor
public static float scalb(float f, int scaleFactor)
f
×
2scaleFactor
rounded as if performed
by a single correctly rounded floating-point multiply to a
member of the float value set. See the Java
Language Specification for a discussion of floating-point
value sets. If the exponent of the result is between Float.MIN_EXPONENT
and Float.MAX_EXPONENT
, the
answer is calculated exactly. If the exponent of the result
would be larger than Float.MAX_EXPONENT
, an
infinity is returned. Note that if the result is subnormal,
precision may be lost; that is, when scalb(x, n)
is subnormal, scalb(scalb(x, n), -n)
may not equal
x. When the result is non-NaN, the result has the same
sign as f
.


After serving out a year of hard labor in the salt mines of Endovier for her crimes, 18-year-old assassin Celaena Sardothien is dragged before the Crown Prince. Prince Dorian offers her her freedom on one condition: she must act as his champion in a competition to find a new royal assassin. Her opponents are men-thieves and assassins and warriors from across the empire, each sponsored by a member of the king's council. If she beats her opponents in a series of eliminations, she'll serve the kingdom for four years and then be granted her freedom. Celaena finds her training sessions with the captain of the guard, Westfall, challenging and exhilarating. But she's bored stiff by court life. Things get a little more interesting when the prince starts to show interest in her ... but it's the gruff Captain Westfall who seems to understand her best. Then one of the other contestants turns up dead ... quickly followed by another. Can Celaena figure out who the killer is before she becomes a victim? As the young assassin investigates, her search leads her to discover a greater destiny than she could possibly have imagined.
The Free Novels Read Link


--- layout: post title: A Really Scary Story date: '2010-10-25T15:59:27-07:00' tags: tumblr_url: http://alexhwilliams.tumblr.com/post/1401451625/a-really-scary-story ---
After the IBM opening this morning, I left through a ground floor entrance. Everyone else climbed the arena stairs. I did not want to climb the stairs. I found an elevator and took it to the third floor. IT WAS REALLY DARK AND QUIET UP THERE. IT WAS KIND OF SCARY.
I wandered for what seemed like miles. I took an elevator to the first floor.
I live another day.


Trademark Usage Guidelines
The following guidelines apply to the use of all Inventit Marks licensed pursuant to the Terms:
- You must use the appropriate legend for the Mark: ® for registered trademarks, TM for unregistered trademarks, and SM for unregistered service marks.
- You shall not use any Inventit Mark to disparage Inventit, its products or services, or in a manner which, in Inventit's reasonable judgment, may diminish or damage its goodwill in the Mark or imply endorsement by Inventit. You agree to cease all such uses upon written notification by Inventit. You agree not to take any action which might lead a third party to think Inventit's Mark is owned by you, or which might adversely impact Inventit's reputation. You shall at all times use the Inventit Marks in a manner consistent with trademark laws.
- You shall notify Inventit immediately of any improper, infringing, confusing or unauthorized use of Inventit's Marks of which you become aware.
- You shall not alter the appearance of any Inventit Mark or obscure such Mark in any way. Changing the color, font, or proportions of any Inventit Mark is prohibited.
- Questions concerning proper use of the Marks shall be directed to contact[AT]yourinventit.com.


I created this website so it could act as a nicely laid out memory for a future me. I love guitars and I was very heavy on buying, selling, and trading them. Lately, I have not been able to do it nearly as much, but that doesn't mean that I still don't enjoy aquiring new guitars or any instrument for that matter. This website will serve as a overview of the guitars I have and currently do own, just so down the road, I can look at it and remember everyone of them.
To accompany this Home page, I have created three additional pages. The first is an About Me page that just gives a quick look at who I am. The second is a Collection page which shows a picture of each of my guitars and gives some detail on it. Lastly, I added a contact page in case you wanted to get in touch.


Police say small portion of U.K. theatre ceiling collapses
by The Associated Press, StaffLONDON -- Police in London say several people were injured when a small portion of a theatre's ceiling collapsed during a performance in London's West End.
Emergency services were called to Piccadilly Theatre on Wednesday night after part of the ceiling crashed down into the auditorium during a performance of Arthur Miller's "Death of a Salesman." The play stars American actor Wendell Pierce.
London's Metropolitan Police say that "a few" people suffered minor injuries and that emergency services remained on scene.
Journalist Martin George says there were screams coming from the audience as part of the ceiling came crashing down. He says that afterward "everyone got up and streamed down the stairs."


1.6 (2/11/2012)
- Features
- #8352: Refactored GuestProcesses to
return a ProcessCollection class that inherits from the Dictionary. Added a FindProcess method
to ProcessCollection. Added a WaitForVMWareUserProcessInGuest function that waits for the vmware
user process to exist. Added WaitForVMwareUserProcess msbuild task. Added WaitForVMwareUserProcess
methods to IVMWareVirtualMachine COM interface. Added snapshot support and GetConfiguration method
to VMWareTest in VMWareLibUnitTests.
- #1627 and #8267: The host, username, and password
parameters are now required when connecting to a vmware esx\esxi\vi server and an
ArgumentException is thrown if they are invalid.
- #8622: Catching and throwing new
Exception in VMWareLib to include more relevant details on the exception.
- #8357: Added ability to pass options and
a timeout to the Vestris.VMWareLib.Tools.Windows.Shell.RunCommandInGuest method.
- #9691: Added generated xml documentation
files to the zip download.
- Bugs
- #251057: Added missing VMWareComTools.dll.
- Misc
- Added the specified number of milliseconds to a thrown TimeoutException.
1.5 (11/3/2010)
- Features
- Added support for VixCOM 1.8.1, 1.9 and 1.10. VMWareTasks works against all 1.6.2,
1.7.0, 1.8.0, 1.8.1, 1.9 and 1.10 versions.
- Added Vestris.VMWareLib.MSBuildTasks.dll that adds support for MSBuild with MSBuild
tasks that implement most common functions.
- Added
Vestris.VMWareLib.VMWareRootSnapshotCollection.RemoveSnapshot
that accepts a configurable timeout.
- Added documentation on contributing to VMWareTasks, including how to setup a development
environment.
- Added
Vestris.VMWareLib.VMWareVirtualMachine.RunProgramInGuest
that
accepts a timeout, but no options.
- Interface Changes
- The
VMWareVirtualMachine.OpenUrlInGuest
API has been marked obsolete.
It will be removed in a future release.
- Bugs
- 5138:
Tools.Windows.Shell.GetEnvironmentVariables fails with a "File not found" error
on some x64 systems where %tmp% resolves to a non-existent path.
- 214878:
Library throws
RPC_E_WRONG_THREAD
in apartment-threaded scenarios.
1.4 (11/28/2009)
- Features
- Added support for VixCOM 1.8.0. VMWareTasks works and tested against all 1.6.2,
1.7.0, 1.8.0 versions.
- Added support for VMWare Player. Requires VixCOM 1.8.0.
- Interface Changes
- VMWareSnapshotCollection, VMWareRootSnapshotCollection and VMWareSnapshot are now
IDisposable.
- VMWareSharedFolderCollection is now IDisposable.
- VMWareRootSnapshotCollection.CreateSnapshot now returns a VMWareSnapshot that needs
to be disposed of.
- Bugs
- VMWareVirtualMachine.Snapshots.CreateSnapshot AVs against ESX4.
1.3 (08/27/2009)
- Features
- Added support for VixCOM 1.7.0. VMWareTasks works against both 1.6.2 and 1.7.0.
- Added a VMWareComLib and VMWareComTools that expose a full scriptable COM interface.
- Added a vestris-vmwarecomlib.jar and vestris-vmwarecomtools.jar that exposes a Com4J
JNI wrapper for VMWareComLib and VMWareComTools to Java clients.
- Misc
- All VMWareLib.Tools objects are now IDisposable and explicitly release reference
to the virtual machine.
- All assemblies are strongly named and signed.
- The source in the release package can now be built without any changes.
- Bugs
- VMWareRootSnapshotCollection.CreateSnapshot doesn't pass flags to the COM API.
- Interface Changes
- VMWareVirtualHost.ConnectToVMWareServer takes an additional username and password.
Pass blank values to connect to a local VMWare Server 1.x.
1.2 (04/13/2009)
- Completed VixCOM API full support.
- 1626:
VMWareVirtualHost.Register and Unregister.
- 1631:
VMWareVirtualMachine.InstallTools.
- 1629:
VMWareVirtualMachine.Snapshots.Enabled.
- 1630:
VMWareVirtualMachine.GetFileInfoInGuest.
- 2688:
VMWareVirtualMachine.Clone and VMWareSnapshot.Clone.
- 2691:
VMWareVirtualMachine.Delete.
- 1628:
VMWareVirtualMachine.BeginRecording and EndRecording, VMWareSnapshot.BeginReplay
and EndReplay.
- 1633:
VMWareVirtualMachine.Reset, Suspend, Pause, UnPause, IsPaused and IsSuspended.
- 1913:
VMWareVirtualHost.IsConnected.
- 1634:
VMWareVirtualMachine.RunScriptInGuest.
- 1632:
VMWareVirtualMachine.OpenUrlInGuest.
- 1635:
VMWareVirtualMachine.UpgradeVirtualHardware.
- Added an optional VMWareTools package built on top of VMWareLib that implements
additional common VMWare tasks.
- VMWareLib.Tools.GuestOS.IpAddress: guest operating system IP address information.
- VMWareLib.Tools.GuestOS.ReadFile, ReadFileLines and ReadFileBytes: read remote files
as binary data or text with encoding support.
- 2232:
VMWareLib.Tools.Windows.Shell.GetEnvironmentVariables: obtain logged-in user environment.
- VMWareLib.Tools.Windows.Shell.RunCommandInGuest: runs commands and collect console
output.
- VMWareLib.Tools.Windows.MappedNetworkDrive: maps guest operating system network
resources.
- Interface changes
- VMWareVirtaulMachine.PowerOn no longer calls WaitForRenamed VMWareVirtualMachine.Login
into LoginInGuest and renamed VMWareVirtualMachine.Logout to LogoutFromGuest to
be consistent with VIX COM API and allow power-on without tools installed.
- Misc
- Added VMWareVirtualMachine.ShutdownGuest and PowerOff that allow specifying shutdown
parameters explicitly.
- Added support for VMWare Server with VMWareVirtualMachine.ConnectToVMWareServer.
- Exposed a VMWareVirtualMachine.LoginInGuest function with power options.
- Lots of new documentation with examples.
- Bugs
- GetNamedSnapshot behaves differently on Workstation and VI, now throws exception
when snapshot not found. Use FindSnapshotByName to get a null result when the snapshot
doesn't exist.
- KillProcessInGuest unit test needs to wait for process to actually die according
to VMWare docs.
- Removing a shared folder doesn't remove it from the collection when not the same
object.
- Fixed different behavior of ListDirectoryInGuest between Workstation and VI.
- API-level errors aren't surfaced and the callback wait will never be set when
VixCOM is not installed.
1.1 (02/12/2008)
- First release off CodePlex.
- Improved timeout model from busy to blocking job-based wait.
- Added support for snapshots with duplicate names.
- New Sandcastle-generated CHM documentation.
- Built with Visual Studio 2008, targeting .NET 2.0.


Challenge 6
Create Account
This form is required to login our site
User name:
Full name:
Email
Confirm Email
Password:
Confirm Password:
Choose Image


?มม??I
H
1
1
?
jpjES
?
[>
|
y
1
HiV
&
li
PLANTS
OF
BAHAMA
ISLANDS
Panicum
chapmani
Vasey
Long
Island:
in
thin
soil
on
rock
flats,
Grays
cemetery.
NewYo*
Botanical
Garten
1L0S1HB
TRACY
HERBARIUM
(TAES),
TEXAS
A&M
UNIVERSITY
Setaria
chapmani
(Vasey)
Pilger
Pet,
by
W.
E.
Fox
IH.
Septentej997_
In
small
clumps,
November
19,
1977
D.
S.
Correli
49129
Herbarium
FAIRCHILD
TROPICAL
GARDEN
1605142
Legend -
Level of confidence that token is an accurately-transcribed word
extremely low
very low
low
undetermined
medium
high
very high


mind
the
gap
SQUARES
012
warning!
more unfunny punniness!
Nothing fancy here; I just thought a striped background would look cool. I did learn about 'viewport units', though, to get the linear gradient to not repeat.


O.C.F.R.
Reports
Members
Certifications
Update Member
First Name
Last Name
Position
Sex
Address
Work Phone
Radio Number
Station Number
All
1
2
3
Status
Active
Not Active
Date of Birth
Start Date
Email Address


{{item.price.india | currency: selectedCurrency}}
{{item.price.us | currency: selectedCurrency}}
{{item.price.aus | currency: selectedCurrency: 'code'}}
{{item.price.uk | currency: selectedCurrency}}


{% extends '../layouts/template.html' %} {% block title %}Check my State Pension - {{mvpversion}}{% endblock %} {% block serviceName %}Check my State Pension{% endblock %} {% block main %} {% include '../persephone_login.html' %}
You have 3 years where you can pay voluntary contributions to make them count towards your pension. You also have 2 years that are too late to pay.
{% include './ni_record_text.html' %}


A driven software developer in training
- Procedural Programming
- Object Orientation Programming (OOP)
- Test Driven Development
- Lithium-ion cell prototyping and testing
- Characterization of particles and coatings
- Safety Committee Member
- Quality control of fasteners by infrared lasers
- Developed macros for increased efficiency in data collection from instruments
- Analyze data for inconsistencies and test for errors in software for updates
- delvelopment of Biosensors by Localized Surface Plasmon Resonance on spectroscopy
Other than my professional aspirations, I enjoy traveling and discovering new perspectives on the human condition.
A current side project I am developing is a dashboard app used to assist Real Estate investors in prioritizing and organizing projects


---
layout: post
title: links for 2007-09-18
date: 2007-09-18 00:00:00
---
-
"My god … Trutap developers take stage and peform Boys-II-Men-style jingle"
-
"Trutap, the latest company wanting to give the world’s teenagers access to their lives on mobile phones, will launch on Friday."

-
"The nice thing is that they do aggregrate messaging from multiple networks and platforms."
-
"They're ending with a flourish, a hilarious a capella rendition of their theme song"


Chapter 9
Recipes
1 - Customizing Bootstrap Builds by Cherry-picking Sass Partials
2 - Cleaning up unused CSS with UnCSS and Grunt
3 - Removing CSS comments with grunt-strip-css-comments
Writing a PostCSS Plugin
Getting Started
“Create Your Own Plugin” tutorial
Plugin Boilerplate
Plugin Guidelines
AST explorer with playground
Documentation and Support
PostCSS API
Ask questions
PostCSS twitter
with latest updates.
Tools
Selector parser
Value parser
Property resolver
Function resolver
Font parser
Dimension parser
for
number
,
length
and
percentage
.
Sides parser
for
margin
,
padding
and
border
properties.
Font helpers
Margin helpers


{% extends "layout.html" %} {% block title %}Error{% endblock %} {% block body %} Whoops, looks like something went wrong. {% endblock %}


HTML5 Document Structure Example
This page is OK for major browsers.
Google
Bing
This is the section example article--> section-->p then this


Who Am I?
I am an allround web developer. I am a senior programmer with good knowledge of front-end techniques. I love structure and order and I also stand for quality. I love spending time on fixing little details and optimizing web apps. Also I like working in a team, you'll learn faster and much more. As the saying goes: 'two heads are better than one'.
Details
Name:
Thierry Ntirandekura
Age:
25 years old
Location:
Kigali city, Rwanda
Status:
Single
Experience
"Don't just learn, experience."
― Roy T. Bennett
Education
Kepler University
Jan 2020 - Mar 2020
Software testing
Sofware testing is the Lorem ipsum dolor, et consectetur adipisicing elit. Rerum tempora quasi nulla repudiandae ex incidunt eum ullam recusandae nam, in, quos ea modi!
Kepler University
Jan 2020 - Mar 2020
Software testing
Sofware testing is the Lorem ipsum dolor, sit amet consectetur adipisicing elit. Rerum tempora quasi nulla repudiandae ex incidunt eum ullam recusandae nam, in, quos ea modi!
Kepler University
Jan 2020 - Mar 2020
Software testing
Sofware testing is the Lorem ipsum dolor, sit amet cone ex incidunt e!
Kepler University
Jan 2020 - Mar 2020
Software testing
Sofware testing is the Lorem ipsum dolor, sit apudiandae ex incidunt eum ullam recusandae nam, in, quos ea modi!
Careers
Kepler University
Jan 2020 - Mar 2020
Software testing
Sofware testing is the Lorem ipsum dolor, nulla repudiandae ex incidunt eum ullam recusandae nam, in, quos ea modi!
Kepler University
Jan 2020 - Mar 2020
Software testing
Sofware testing is the Lorem ipsum dolor, asi nulla repudiandae ex incidunt eum ullam recusandae nam, in, quos ea modi!
My abilities
My skills levels
Coding skills
- html90%
- css80%
- Js75%
- Flex box80%
- css grid80%
- Node Js70%
- Fire base65%
- SQL75%
- Figma70%
- Git/Git-flow40%
- VSCode90%
- Command line50%
Other tech skills
- MS-Word90%
- Google Docs 75%
- Trello95%
- Google Sheets 75%
- MS Excel 80%
My Projects
Would you be interested in some of my projects?
click on github
This is
This is
This is
This is
This is
This is
My Blog
"Would you like to see my blogs?
Time is yours


ACADEMIC ADVISING: AN APPROACH TO EVALUATION
by
Harriet C, Seligsohn
A dissertation submitted in partial fulfillment of the requirements " for the degree of Doctor of Philosophy in the College of Education in the University of South Florida
December, 1976
Major Professor: Annie W. Ward


04 May 2000
Disease Outbreak Reported
The Human Services Department, Public Health Division of the Government of Victoria, Australia has confirmed sixty-six cases, including 2 deaths. All the patients, with one exception had visited the Melbourne Aquarium after 11 April 2000.
Laboratory results for all the cases show Legionnella pneumophila serogroup 1. Test results are pending on a further number of patients who had been to the aquarium and had developed respiratory illness symptoms.
Laboratory test results have also confirmed the presence of legionella bacteria in the cooling towers of the Melbourne Aquarium, which were immediately disinfected. The health authorities have set up a Legionnaires' disease hotline to provide advice and continue to investigate the outbreak.
For further information, please see the Government of Victoria, Australia web site.


Download Code
In this tutorial we will present a simultaneous control problem in a linear system dependent on parameters. We will use the MATLAb DyCon Toolbox library.
Setup
In this tutorial we need DyCon Toolbox, to install it we will have to write the following in our MATLAB console:
unzip('https://github.com/DeustoTech/DyCon-Computational-Platform/archive/master.zip')
addpath(genpath(fullfile(cd,'DyCon-toolbox-master')))
StartDyConToolbox
You can see the code of this tutorial write the following line:
open T06ODET0002_Simultaneous
Problem definition
The simultaneous control problem is defined as:
subject to:
where:
Numerical Implementation
First we import the CasAdi library in order to create symbolic variables
import casadi.*
%% In this case $\nu_i$ are
M = 50;
nu = linspace(1,6,M);
Then we create the matrices of linear dynamics.
With these matrices we create the ode
object
Nt = 500;T = 0.8;
tspan = linspace(0,T,Nt);
%% create linear dynamic
iode = linearode(A,B,tspan);
%% set initial condition
Y0 = ones(2, 1);
iode.InitialCondition = repmat(Y0,M,1);
then we create the optimal control problem
% Get Symbolical variable
Ys = iode.State.sym;
Us = iode.Control.sym;
ts = SX.sym('t'); %% <= Create a symbolical time
% Set Target
YT = zeros(2, 1);YT = repmat(YT,M,1);
%
PathCost = casadi.Function('L' ,{ts,Ys,Us},{ (1/2)*(Us'*Us) });
FinalCost = casadi.Function('Psi',{Ys} ,{ 1e7*((Ys-YT).'*(Ys-YT)) });
% Create the optimal control
iocp = ocp(iode,PathCost,FinalCost);
Solve Optimal Control Problem with ipopt solver
U0 = ZerosControl(iode);
[Uopt ,Yopt] = IpoptSolver(iocp,U0);
This is Ipopt version 3.12.3, running with linear solver mumps.
NOTE: Other linear solvers might be more efficient (see Ipopt documentation).
Number of nonzeros in equality constraint Jacobian...: 199700
Number of nonzeros in inequality constraint Jacobian.: 0
Number of nonzeros in Lagrangian Hessian.............: 600
Total number of variables............................: 50500
variables with only lower bounds: 0
variables with lower and upper bounds: 0
variables with only upper bounds: 0
Total number of equality constraints.................: 50000
Total number of inequality constraints...............: 0
inequality constraints with only lower bounds: 0
inequality constraints with lower and upper bounds: 0
inequality constraints with only upper bounds: 0
iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls
0 1.0000000e+09 1.12e-02 7.88e+00 -1.0 0.00e+00 - 0.00e+00 0.00e+00 0
1 4.0934345e+06 1.26e-13 5.63e-09 -1.0 1.66e+02 - 1.00e+00 1.00e+00f 1
Number of Iterations....: 1
(scaled) (unscaled)
Objective...............: 2.0467172272726700e+01 4.0934344545453396e+06
Dual infeasibility......: 5.6305735629536002e-09 1.1261147125907198e-03
Constraint violation....: 1.2612133559741778e-13 1.2612133559741778e-13
Complementarity.........: 0.0000000000000000e+00 0.0000000000000000e+00
Overall NLP error.......: 5.6305735629536002e-09 1.1261147125907198e-03
Number of objective function evaluations = 2
Number of objective gradient evaluations = 2
Number of equality constraint evaluations = 2
Number of inequality constraint evaluations = 0
Number of equality constraint Jacobian evaluations = 2
Number of inequality constraint Jacobian evaluations = 0
Number of Lagrangian Hessian evaluations = 1
Total CPU secs in IPOPT (w/o function evaluations) = 1.391
Total CPU secs in NLP function evaluations = 0.027
EXIT: Optimal Solution Found.
t_proc [s] t_wall [s] n_eval
nlp_f 0.000381 0.00038 2
nlp_g 0.0042 0.0042 2
nlp_grad_f 0.00167 0.00167 3
nlp_hess_l 0.00331 0.00332 1
nlp_jac_g 0.026 0.026 3
solver 1.48 1.36 1
Elapsed time is 3.853462 seconds.
Compute Free solution
Yfree = solve(iode,U0*0);
Yfree = full(Yfree);
Visualization
fig = figure;
fig.Units = 'norm';fig.Position = [0.1 0.1 0.6 0.5];
%%
plotSimu(tspan,Yfree,Yopt,Uopt,M)
Figure 1. The different colors represent the dynamic system under different parameters. It can be seen how the same control is obtained acting for all the dynamic systems is capable of driving the systems to the target.


Hello,
first of all: congrat for the community great job, really interesting stuff !
I built a natural swimming pool (yes, with laguna, frog and other little animals ...) and I plan to use my raspberry to setup a remote temperature monitor for the water, and maybe a consumption monitor for the pump. The idea is to log water temperature over months, in order to prevent for algae ...
For the water temperature, do you think the kit (http://shop.openenergymonitor.com/emontx-temperature-node/) could be used for that ? It seems to be waterproof, but what about staying under water 365 days/year ? Also, I will need to protect the EmonTX in a box against hot sun and snow in winter. Do you now some waterproof boxes ?
Sincereley,
David
Re: Pool temperature monitor
Encapsulated DS18B20 temperature sensor looks to me to be waterproof, but you could check with the shop. If they don't pick this up, PM Trystan Lea or Glyn Hudson. You can probably negotiate the encapsulated sensor in place of the on-board one in the kit, if you ask nicely.
You cannot of course put the box and transmitter under water - the r.f. will struggle to get out. Most suppliers do a range of IP65 enclosures, e.g. http://spiratronics.com/pcb-hardware-and-enclosures/project-cases/ip-rat...
Re: Pool temperature monitor
I am in a process of doing the same, to start measuring pool temperature and also heater consumption. Yes its very good to have water resitant sensor but I would never put that to hang inside the pool for three reasons: 1) water gets eventually in as water resistant sensors are not intended to be used underwater. 2) if the measurement electronics is mains powered there is always a risk for s shock in case of a fault. 3) estethically hanging wires are not really appreciatwd and generate a tangling risk for children etc. My preferred installation is inside the filtration housing with a proper brass sensor pocket. This way the water temp is measured in a point of constant flow near the pump allowing also the current consumption being measured. Most likely will take the needed 5v from pump control electronics and install CT to the power input cable and just run the ds18b20 cable out from the pool electronics control box to have a watertight installation.
Re: Pool temperature monitor
Thanks Robert, I will ask Trystan/Glyn. Also thank for the url for cases.
Any hint to help me choose between 433 Mhz vs 868 Mhz ?
David
Re: Pool temperature monitor
sorry I found a post : http://openenergymonitor.org/emon/node/502 on that question
Re: Pool temperature monitor
Hello Petrick,
right ! My first intent was to hide the EmonTX box with stones (this is a natural pool, so with lot of stones nearby), but it is better to put the system near the filtration, that's a really good idea !
You mention a "brass sensor pocket", is the DS18b20 already delivered with such thing ?
Re: Pool temperature monitor
Any plumbing supplier should do thermopockets, does not need to be so long but tip in the flow more or less. Threads make it easy to install to a plastics cabinet into a hole with a bit smaller than threaed diameter ... and just with some pvc glue or silicone it makes a watertight seal. The 18b20 sensor goes inside.
http://www.mkwheatingcontrols.co.uk/advanced_search_result.php?keywords=Brass+pocket&x=0&y=0
Re: Pool temperature monitor
Here is a similar project that what I am working with. The YHDC TA12L CT saturation current is still to be tested. I used 100 Ohm burden sensor with it and it seems to work just fine with calibration value 19.6. 1-wire sensor is water resistant model as you can see from the picture.
Attached preliminary script for it, should be fully compatible with emontx too (even I used jeenode as happened to have one).
Re: Pool temperature monitor
wow ! Thanks for the information, I still need to dig a bit for the system that I have in mind, but I will probably give it a try in the next weeks ...
thanks,
David
Re: Pool temperature monitor
You could always use a thermistor based temperature sensor.
I use flying lead thermistors with a potted end in cold water storage tanks. You just need to weigh the sensor down at the end or it tends to want to float.
The alternative is to have a thermistor based immersion sensor mounted on a float. You wouldn't need a pocket for it. Pockets are only used in pipe work so you can remove the sensor.
Re: Pool temperature monitor
stuntmonkey, is the view about not needing a pocket based on an experience or a point of a view ? My personal expererience with diving and underwater electronics suggest that waterproof sensors lifetime expectance underwater is very short increasing need for service.
Re: Pool temperature monitor
You can buy thermistors as just a bead if you search around but I buy them packaged as a room sensor, immersion sensor, duct sensor, outside air sensor etc.
The immersion sensor is already pre-packaged in a metal probe with a plastic head which is waterproof. If you power the node via a battery you could enclose everything in the plastic head of the sensor.
http://www.sontay.com/products/temperature/temperature-sensors-and-pockets
From memory the potted flying lead sensors have a stainless steel end.
Below is a picture of a long duct sensor I have hooked up to a JeeNode. Its identical to the immersion sensor but about twice the length.
https://www.dropbox.com/sc/wbi6zwlu9q7aqe7/0Fd9ZhGkfq
Re: Pool temperature monitor
Hello,
it has been a while since I can find time to continue ... (too much work ;) )
However, now, everything is built and seems ok. The emontx send correct temperature values to the raspberry and the nice emoncs do the rest.
However, I am a bit surprised by the RFM12b, 868 Mhz (or maybe I do not get it right) : I initially wanted to place the emontx near the pool and the raspberry inside the house, about 15 meters away max, but I can get no signal. I manage to have a reliable connection only when I position the raspberry at the first floor with the window open. When it is closed: no signal. I am a bit surprised because I read that distance around 100m could be reach and I did not think that a simple window can change reception.
I used the emontx_lowpower_temperature.ino from the github. I only change the time_between_readings to be 1.5 min.
Any hints ?
thanks,
David
Re: Pool temperature monitor
Do you have efficient Low E windows? If so they can have a metal coating that blocks radio waves.
Re: Pool temperature monitor
no ... I tried at another place, and tried to orient the antenna in a better way. It seems to work more or less ... With a 1.5 min update, I manage to have about 1 measure every 10-15 min ...
Re: Pool temperature monitor
You could slow the data rate for the link. The rate is set (in the emonTx) with a low-level statement similar to this:
rfm_write(0xC606); // approx 49.2 Kbps, as used by emonTx
You will need to look at the RFM12B data sheet to work out the number to write knowing the rate you want (generally the slower you transmit, the more it reduces the bandwidth and increases the range), and of course you'll need to do the same thing with the RFM12B at the receiving end.
Do you think you might not have two 868 MHz modules? There's a photo showing the difference between a 433 MHz and an 868 MHz module in RFM12B - Part 1 - Hardware Overview
Re: Pool temperature monitor
Hi Petrik. I read your sketch for Arduino and I have one question for you. In description in your sketch you have calibration 20, but calculate is 5A / 0.005A(5mA) / 100ohm(burden resistor) = 10. Why do you have in loop calibration 19.6? I don't understand that. Thanks for your answer. Dan
Re: Pool temperature monitor
Thanks for your advices.
I tried to set the data rate to 9.579kbps with : rf12_control(0xC623); //Data Rate = 9.579kbps
in the emontx_lowpower_temperature.ino file but I do not know in which file to change this value on the raspberry/emoncms. Maybe somewhere in /var/www/emoncms/Modules/raspberrypi ?
Re: Pool temperature monitor
quick update : it seems related to the elevation of the emontx. The connexion is bad when it is to close to the ground...
Strange behavior in the emoncms : I updated it (git pull) and recreate the database (to remove old values), but now, my "input" tab shows about 30 different nodes with numerous "name" in each, while I only have one emontx (node=18). Anyone experienced similar thing ?
Re: Pool temperature monitor
If you have the two ends of the radio link set to different data rates, then the receiver cannot properly interpret the data and you are seeing rubbish. It is exactly the same thing as when the emonTx serial port is set to one baud rate and the Arduino serial window is set to another. You'll need a Raspberry Pi expert to tell you where to set it in there. You could try searching likely looking files for the text string "0xC606", or this page: http://wiki.openenergymonitor.org/index.php?title=RFM12Pi_V2 might give you some clues.
MartinR has in the past suggested 0xC657 for 3.8918 kbps.
Re: Pool temperature monitor
Hello,
I still havent find how to change on the rfm12pi side ...
However, I think (not sure) that my still increasing numbers of nodes in the emoncms (more than 30000 !) could come from the upgrade I did : I follow the steps : http://wiki.openenergymonitor.org/index.php?title=RFM12Pi_V2#Upgrading_R...
and this strange crazy number of inputs seems to be related to this firmware upgrade. Maybe I did something wrong ?
Re: Pool temperature monitor
Hi,
I think Robert is right, if you look at the source code for the firmware you uploaded to the rfm12pi (https://github.com/mharizanov/RFM2Pi/blob/master/firmware/RF12_Demo_atme... ) at line 233 you have
rf12_control(0xC049);
You will probably have to change that to the same value you used in your transmitter sketch, compile it and upload it following the procedure described in the page you linked ... Please be aware that it is just an educated guess :)
Re: Pool temperature monitor
No, it's not that line - the hex value must be C6xx. "C0xx" is a low battery & clock divider command.
I think you'll need to add a similar line but using the same constant as you use in your emonTx:
rf12_control(0xC657);
How to obtain the last 2 digits is on Page 17 of the Hope RFM12B data sheet: 4. Data Rate Command.
(Thanks for the source file reference, madmatt.)
dsarrut:
You're not saying whether you have different rates at each end. If you have, you cannot come to any conclusions about another fault because that alone will turn the data stream into rubbish. If you have gone back and the same data rate is the same at both ends, then you need to check what you did to upgrade.
Re: Pool temperature monitor
Robert: I used the same rate at each end.
I tried to add a line with rf12_control, and upload to the raspberry (I compile with arduino and upload the hex file), but no luck yet ... I will continue next time ...
Re: Pool temperature monitor
If there is a lot of noise (other transmissions in air) then 1.5min may be too long interval, sometimes in here it takes 2-3 transmissions to get through as a lot of other transmissions on 868mhz area too.
maybe there is an overflow error in the emontx script that has been modified so that something overflows to "node" variable space. my pool monitor script has been working now for few months so that can be tried too if there is an error. distance is 15m through 3-4 brick walls in between tx and rfm12pi, for my rfm12pi i have an external 868mhz antenna with magnetic base just to be sure.
(the calibration value was based on different ct and different burden - but at the end i ended up using normal ct as the wire was too thick for this kind of smaller ct)
Re: Pool temperature monitor
Hello !
back from vacation, I tried to setup again the emontx + temp sensor. I set the interval to 10sec. The distance between emontx and the raspberry is about 20m, but the emontx is very close to the ground. Here are the results :
1 - the "node" variable space is still growing in the emoncms interface, with tens of "fake" nodes. Even if I delete them, they reappear with seconds/minutes later.
2 - the temperature is sometimes correct but sometimes not, with random values (105 C, -40, or change in temperature of more than few tenth of degree), making the daily monitoring unusable
I don't know what to do now ... Maybe adding an external antenna could help ?
I also tried to change the datarate with rf12_control on the rfm12pi, but when I compile the RF12_Demo_atmega328.ino and upload on the pi (using avrdude -v -c arduino -p ATMEGA328P -P /dev/ttyAMA0 -b 38400 -U flash:w:Rf12_Demo_atmega328.cpp.hex) it does not work anymore : I probably do not know how to proceed ...
Any hints ?
David
Re: Pool temperature monitor
Regarding the unsuccessful trial to change the data rate : I probably did not select the correct board type into arduino in order to obtain the .hx from the corrected RF12_Demo_atmega328.ino ... Is it Arduino Nano ATMega328 ?
Re: Pool temperature monitor
There may be something wrong with the code or even noise on same band ?
I have around 15 meters from pool with 3 thick concrete walls in between and no issues except these odd collisions using script posted here and rfm12pi.
The temperature odd reading is most likely the way how 1-wire is implemented and fails sometimes to read the sensor.
Re: Pool temperature monitor
Probably late for you, but the answer is no.
http://wiki.openenergymonitor.org/index.php?title=RFM12Pi_V2#Modified_Op...


Hello
We want to set up a multi user emoncms platform with different privileges.
We provide a large number of emonTX nodes for a special industrial application. We resell the emonTX nodes to partners and distributors (lets say over the channel) and they sell it to the end customer. We forecast a couple of hundreds or may be thousands. We want to manage all these end customers over one emoncms admin login. We want to run some analytics afterwards on all these data.
The partner will have access to emoncms too. The installation of emonTX at the end customer will be done by the partner. He needs just to enter the Node ID number over our customized emonTX (we have a LCD + Keypad on it).
For logistic reasons we think that all emonTX's over all customers will have the same API key. We can set up many emonTX with the same API and production will be easy. So we don’t need to let the partner to enter the very long API key to prevent entry mistakes and many support cases.
Each individual customer has access on emoncms as well. They need to have access to define their dashboard and view them. But they don’t have access to modify all other features of emoncms.
So I summarize it:
- End customer: multiuser/several independent customers who can login onto our emoncms server. The should have access only to the dashboard- read and write. All other views are not visible to them
- Partner: partners should have access to emoncms. The should have access only to the dashboard- read only and only to their customers they sold emonTX.
- Admin Access: One admin account for all customers.
Is it possible to do that? Is our concept ok or do you have an other proposal?
Many thanks for answers
Re: multiuser - 3 tier emoncms application
Great idea, but as I just startet learning emoncms I can't ad anything than my +1 to your idea...
Re: multiuser - 3 tier emoncms application
That was brilliant idea so Brisco where did it reach. We want to see that it's done because now the emoncms architecture is almost flat no user stratification and privileges.
Re: multiuser - 3 tier emoncms application
I think this would be a great addition it has come up many times but unfortunately no dice!
Heres another recent enquiry http://openenergymonitor.org/emon/node/10163#comment-28337
and here is a similar request http://openenergymonitor.org/emon/node/3574
Paul
Re: multiuser - 3 tier emoncms application
>>For logistic reasons we think that all emonTX's over all customers will have the same API key. We can set up many emonTX with the same API and production will be easy. So we don’t need to let the partner to enter the very long API key to prevent entry mistakes and many support cases.
That sounds like a bad idea to me. SOOOO many nasty things happen when keys are shared in ventures with many people.
Re: multiuser - 3 tier emoncms application
That sounds like a bad idea to me. SOOOO many nasty things happen when keys are shared in ventures with many people.
Got to agree with that As a friend used to say, "That's an accident looking for a place to happen."
Re: multiuser - 3 tier emoncms application
You are both right! Sharing api-keys is never a good idea. None the less multi-level users is a very good idea.
This suggestion isn't a million miles away from the "shared production encryption key" suggestion during recent RF network discussions. Rather than users being tempted to share keys it would be far better to provide an alternative secure method.
Paul


Certified ScrumMaster; Proficient in Software Development Life Cycle (SDLC)
Front-end Back-end Integration, Release Management
JavaScript, CSS, HTML, jQuery, Node.js, MySQL, MongoDB, ORM.
Product Development, Cross-functional Collaboration
Direct Email:laura_lee1201@yahoo.com


Registration
Registration saved! Please check your email for confirmation.
Registration failed! Please check your input and try again.
Due to our IT policies we are unable to process the entered email address. Please contact
<EMAIL_ADDRESS>for further assistance.
Login name already registered! Please choose another one.
The password and its confirmation do not match!


CityBuddy is a new start-up that aims to connect and meet people in Nottingham through fun activities. That could be from playing boardgames to climbing. We are not quite ready yet, we will keep up updated if you put your email in below.


Lorem ipsum dolor sit amet consectetur
Lorem ipsum dolor sit amet consectetur
If this is supported, background colors should be green or orange depending on input device hover support. If there is no background, this media query does not work.
caniemail.com, 2022.


| Results 1 - 10 of 5875 ListGrid |
|
android - Android - An Open Handset Alliance Project
Activity: High - Updated: Today - Stars: 3488 Welcome to the Android project Primary Android resources include: Android Developer Home Page Android Developer Documentation, including the Getting Started Guide, and the API Refer... Google, Android |
|
simulationcraft - World of Warcraft DPS Simulator
Activity: High - Updated: Today - Stars: 483 SimulationCraft is a tool to explore combat mechanics in the popular MMO RPG World of Warcraft (tm). It is a multi-player event driven simulator written in C++ that models player character dama... warcraft, wow, simulation, worldofwarcraft |
|
cyanogenmod - CyanogenMod Android ROM
Activity: High - Updated: Today - Stars: 1063 CyanogenMod is a community enhanced distribution of Android for a wide variety of phones and tablets. Visit for documentation, wiki, and the forums. This Google Code site is only for bug reports.... |
|
mobileterminal - A GUI Terminal application for the iPhone
Activity: Medium - Updated: Today - Stars: 455 This is the home of MobileTerminal.app, a terminal emulator application for the iPhone. MobileTerminal.app is NOT an SSH client, nor Telnet for that matter. It can however be used to execute a console... iphone, terminal, ssh, telnet, gui, interface, graphical |
|
android-wifi-tether - Wireless Tether for Root Users
Activity: High - Updated: Today - Stars: 4616 This program enables tethering (via wifi) for "rooted" handsets running android (such as the Android DevPhone 1). Clients (your laptop for example) can connect via wifi (ad-hoc mode)and get access to ... Android, Root, Wifi, Tethering |
|
wiquery - Wicket integration with jQuery and jQuery UI
Activity: High - Updated: Last 7 days - Stars: 224 wiQuery aims to bind jQuery and jQuery UI within the Java Wicket framework, a Java framework providing a real way to create web applications with an OO approach. C... java, wicket, jQuery, jQueryUI, wickext, jquery4wicket, javascript, WiQuery, wicket1.5, wicket6.0 |
|
ps3mediaserver - Java Upnp Media Server, dedicated to PS3
Activity: High - Updated: Today - Stars: 4484 PS3 Media Server is a DLNA compliant Upnp Media Server for the PS3, written in Java, with the purpose of streaming or transcoding any kind of media files, with minimum configuration. It's backed u... java, ps3, upnp, dlna, media, transcode, streaming |
|
dolphin-emu - Dolphin, a Gamecube / Wii / Triforce Emulator
Activity: High - Updated: Today - Stars: 1585 Originally developed by F|RES & ector. Now open source under GPL v2 with lots of contributors. Dolphin is a Gamecube, Wii and Triforce (the arcade machine based on the Gamecube) emulator whic... gamecube, wii, nintendo, console, emulator, simulator, dynarec, jit, powerpc, triforce |
|
pysimplesoap - Python Simple SOAP Library
Activity: High - Updated: Last 30 days - Stars: 67 Python Simple SOAP library for client and server webservices interfaces, aimed to be as small and easy as possible, supporting most common functionality. Simple: less than 200LOC client/ser... Python, Webservices, soap |
|
mp4sdk - mp4sdk
Activity: Low - Updated: Earlier this year - Stars: 20 mp4sdk是一个源代码开放的,主要在MP4上开发软件的平台,使用c/c++语言,支持win32同步调试. 有按键,触摸,声音基本接口,兼容ANSI C,支持多种图片解码,支持�... mp4sdk |


This is a simple component that doesn't generate events; the only things that is required is property binding
The max ({{max}}) and value ({{curValue}}) properties are bound through bind-* semantics
Text from Angular: {{text}}
The checkbox will generate an event every time the value is changed
AngularDart can listen to these events through the on-* syntax
Every time the value changes, the curValue ({{curValue}}) scope variable will update
The slide is bound to the curValue scope variable ({{curValue}})


+++ title = "Adam from Dublin" slug = "adam-from-dublin" date = 2008-01-28T16:00:00+10:00 tags = ["fellow-travellers", "irish", "eccentric-encounters"] locations = ["thailand/ko-tao"] draft = false summary = """
Adam's one of the quieter and less permanently-drunk Irishmen I've met over the past year. Nevertheless, he's still a right good ambassador of his booze-loving homeland: he can down his buckets all night with the best of 'em. Adam's been in my Open Water course since Friday; although somehow, I managed to avoid meeting him properly until today. Once we met, it didn't take long for us to click — or for the glasses to clink.
""" +++Adam's one of the quieter and less permanently-drunk Irishmen I've met over the past year. Nevertheless, he's still a right good ambassador of his booze-loving homeland: he can down his buckets all night with the best of 'em. Adam's been in my Open Water course since Friday; although somehow, I managed to avoid meeting him properly until today. Once we met, it didn't take long for us to click — or for the glasses to clink.
{{< galleryphoto "2008-01-28-16-00-00--adam-demonstrates-that-he-is-a-padi-certified-bucket.jpg" >}}


Mint
About
How it Works
Get Started
Contact
Login
Welcome!
First Name
Last Name
Mobile Number
Email
Password
Birthday
Female
Male


Oklahoma business briefcase for Nov. 22, 2019
Art offerings grow at Shoppes at Northpark
North Gallery & Studio at the Shoppes at Northpark is growing, with original work from a new group of Oklahoma artists to be exhibited in the space next door.
In July, artists Patricia Triplett and Janetta Smith opened North Gallery & Studio as a space to create and sell their work and that of others, such as Oklahoma City artist Bert Seabourn. They also offer workshops and classes to help artists pursue their own craft.
This month, The Studios at North Gallery & Studio will debut with galleries for paintings, sculptures and Native American pottery and basketry as well as a working art studio.
“We realized how hard it was for individual artists to have all the resources necessary to create a successful art business. We wanted to use our position as an established gallery to help our local artists,” Smith said of the studio and gallery space.
Legislators represent Oklahoma in Taiwan
State Sen. Roland Pederson, Lt. Gov. Matt Pinnell and other regional legislative leaders recently comprised the Southern United States Legislature Leaders Delegation, discussing opportunities for trade and investment in both Oklahoma and the southern U.S. with Taiwanese officials.
Pederson was selected as a delegate for the trip due to his expertise in Oklahoma’s agricultural economy, Pinnell said.
“It was an honor to lead a delegation of legislative leaders from Oklahoma, Louisiana, Mississippi and Texas to Taiwan last week,” Pinnell said. “It was a great opportunity to strengthen the bonds between our states and Taiwan. On the trip, we emphasized the opportunities for trade between Oklahoma and Taiwan, particularly with Oklahoma wheat and beef.”
Staff reports


:navtop
:lheading Map
A map that shows georeferenced point data. This can be integrated with other displays, e.g., clicking on a point will highlight that location in
a line chart.
- If a Geojson or Kml layer is specified then the layer is displayed instead of the points. The location of each point is used to
find a containing map feature. That map feature is then colored as defined below.
- pruneFeatures. If set to true than any map feature that does not have a corresponding point will not be shown.
r
- The colorBy attribute specifies the field that is used to color the points or the map segments.
The colorTable attribute specifies a color table to
use and the colorByMin and colorByMax attributes are option and are used to define a color range.
- The centerOnFilterChange will cause the map to recenter when the data is subset from the selection filters.
- The displayDiv, when specified, is the id of a div tag that the map will display the details of
a point or map segment as the user mouses over it. The [ug::attr {displayDiv="mapDisplay${entryid}"}] macro
allows one to specify a unique div id for pages that may have multiple map displays. The div looks like:
[wiki::text {

}]
There is a full example shown below.
{{display_map width="100%" height="400"
geojsonLayer="entry id of a geojson file"
geojsonLayerName="Layer name"
kmlLayer="entry id of a kml file"
kmlLayerName="Layer name"
pruneFeatures="true"
colorBy="total_ballots"
colorTable="inversegrayscale"
colorByMin="min value"
colorByMax="max value"
displayDiv="mapDisplay${entryid}"}}
ExampleImage 1: Map
Image 2: Chloropleth Map
This is the wiki text used in the above example:
:heading Map
+row
+col-md-6
{{display_map column="1" width="-100" height="500" includeData="false" showTitle="false"
title="Colored by total ballots"
geojsonLayer="7c8f5e25-e569-4ca9-b389-5bb03cdb138b"
geojsonLayerName="Precincts"
displayAsMap="true"
pruneFeatures="true"
colorBy="total_ballots"
colorBar="inversegrayscale"
displayDiv="mapDisplay${entryid}"
}}
-col
+col-6
:heading Map Details
-col
-row
:lheading Map Animation
The map display can be configured to provide a time-based animation of the points with the following attributes.
doAnimation="true" - enable animation
animationShowSlider="true" - show the slider
animationDateFormat="yyyyMMdd" or "yyyy" - default is the fully formatted date
animationMode="cumulative" or "sliding" - how the time window is moved
animationSteps="60" - how many steps
animationWindow="year" or "month" or "day" or "hour" or "minute" or "second" - override the animationSteps
animationSpeed="250" - time in milliseconds between each step
:lheading Map Labels
You can display text labels at each point with the following attributes:
labelTemplate="text template with ${field id} macros. Use _nl_ for new lines"
labelFontColor="#000"
labelFontSize="12px"
labelFontFamily="'Open Sans', Helvetica Neue, Arial, Helvetica, sans-serif"
labelFontWeight="plain"
labelAlign="lb" //See http://dev.openlayers.org/docs/files/OpenLayers/Feature/Vector-js.html
align is of the form "hv" where h is "l|c|r" (left, center, right) and v is "t|n|b" (top,middle,bottom)
labelXOffset="0"
labelYOffset="0"
labelOutlineColor="#fff")
labelOutlineWidth="0"
:lheading Map Sizes
//Define the point radius
radius="4"
//define a field to size by
sizeBy="<field>"
//use a log scale
sizeByLog=true
//Size min/max
sizeByRadiusMin=1
sizeByRadiusMax=15
:lheading Map Colors
//Field to color by
colorBy="<field>cnt"
//Color table
colorTable="blue_green_red"
//Or colors
colors="color1,color2,...,colorN"
//Use a log scale
colorByLog=true
//Set the stroke color
strokeColor="#fff0"
//Map string values to colors
colorByMap="value:color,...,value:color"
//These are used in conjunction with a vector map layer
//If true then count the points within each map feature and use that as the color by value
colorByCount=true
//Suffix to show on map click
doCountLabel="clubs"
//If true then prune out the features that don't have any data points in them
pruneFeatures="true"
:lheading Map Shapes
Define different shapes to display in the map.
//Define a different icon to use
pointIcon="/repository/dutchbrothers.png"
//Define a different shape
shape="star|cross|x|square|triangle|circle|lightning|rectangle|church"
//Map values to shape
shapeBy=<field>
shapeByMap="value1:shape1,...,valueN:shapeN"


Getting Started
First you must sign up.
Here are the two most popular sites.
ESPN Fantasy Football
The most popular fantasy football site but some people think that it looks outdated, but it is still quite functional.
Yahoo Fantasy Football
Not as popular as ESPN but many consider it to be nicer looking and more feature packed.


Nick
Nick is the dreamer of our duo. He’s the one who dreamt up this lifestyle (then almost backed out a few times when I (Caitlyn) started ACTUALLY planning it). Nick is a creative, entrepreneurial software engineer who is passionate about living the best life possible. Decision-making processes for him involve a huge amount of research and weighing of all the options (so it took us a while to nail down our plans for this lol). Oh, and shortly after he dreamt the work/travel deal up he took a personality test at work. Turns out his Myers-Briggs type is INTP - laughably (and appropriately) deemed the most likely to be ok with living “homeless.” He’s also the best dad to our two fur babies Baiden and Zed!
Caitlyn
The master planner and coordinator of the trip, I'm the one who pulls the reins back on some of Nick’s visions and get us from point A to B with some semblance of a plan :) This means while Nick is researching and looking into options, I'm sweating bullets trying to get a decision to be made so I can get things checked off my lists. When Nick starts talking about building a tiny house instead of picking up the Airstream we’d settled on, I'm urging him to stick with the plan (and trying not to hyperventilate about the last minute change of direction). I do online marketing for small businesses, which Nick automates with his software skills.
Zed (aka “Z” or “Z Man”)
I’m pretty sure we could start an instagram for this guy named “Grumpy Dog.” Because every year, Z has become more and more of a grumpy old guy. He prefers to call it “regal” but whatever, he’s grumpy. We love him lots though, and he’s responsible for getting us outside much more than we would without him. His favorite pastimes are cuddling with his mom, looking out the window/door, whining, swimming, and running :)
Baiden (aka “Little Man” or “B Man”)
B Man is Z’s annoying little brother. He’s the homebody who loves to cuddle and chew on his toy bones in the Airstream. When he’s outside, he can be found swimming for hours in whatever body of water is nearby or pouncing on or biting his brother. He also drinks wayyyy too much water for his own good. He still hasn’t realized the correlation between the amount he drinks and the amount he will need to pee directly afterwards - no endless water bowls for this guy! Gotta love this little goober :)


New Facebook app pays people to take part in surveys
SAN FRANCISCO, Nov 26 — Facebook yesterday introduced a “Viewpoints” app in the US that pays members of the social network for taking part in surveys.
The new market research app will be used to improve the Facebook “family” of offerings including Instagram, WhatsApp, Portal, Oculus and the core online social network, according to product manager Erez Naveh.
The app could blunt criticism that Facebook keeps to itself profits made by taking advantage of data shared on the social network.
“We believe the best way to make products better is to get insights directly from people who use them,” Naveh said in an online post.
Points can be accumulated to earn payments, which will be sent to people via PayPal.
People who set up accounts in the Viewpoints app will be invited to take part in programs, the first a well-being survey intended to gather insights that can be used to curb negative effects of social media and enhance its benefits, according to Naveh.
Personal information such as name, age, gender, and country of residence will be gathered while setting up Viewpoints accounts, which are only open to people 18 years of age or older.
“We won’t sell your information from this app to third parties,” Naveh said.
“We also won’t publicly share your Facebook Viewpoints activity on Facebook or on other accounts you’ve linked without your permission.”
Viewpoints is only available to US Facebook members, but the California-based internet giant planned to expand it to more countries next year. — AFP-Relaxnews


SET
Section: SQL Commands (7)Updated: 2012-08-14
Index Return to Main Contents
NAME
SET - change a run-time parameterSYNOPSIS
SET [ SESSION | LOCAL ] configuration_parameter { TO | = } { value | 'value' | DEFAULT } SET [ SESSION | LOCAL ] TIME ZONE { timezone | LOCAL | DEFAULT }
DESCRIPTION
The SET command changes run-time configuration parameters. Many of the run-time parameters listed in in the documentation can be changed on-the-fly with SET. (But some require superuser privileges to change, and others cannot be changed after server or session start.) SET only affects the value used by the current session.
If SET (or equivalently SET SESSION) is issued within a transaction that is later aborted, the effects of the SET command disappear when the transaction is rolled back. Once the surrounding transaction is committed, the effects will persist until the end of the session, unless overridden by another SET.
The effects of SET LOCAL last only till the end of the current transaction, whether committed or not. A special case is SET followed by SET LOCAL within a single transaction: the SET LOCAL value will be seen until the end of the transaction, but afterwards (if the transaction is committed) the SET value will take effect.
The effects of SET or SET LOCAL are also canceled by rolling back to a savepoint that is earlier than the command.
If SET LOCAL is used within a function that has a SET option for the same variable (see CREATE FUNCTION [create_function(7)]), the effects of the SET LOCAL command disappear at function exit; that is, the value in effect when the function was called is restored anyway. This allows SET LOCAL to be used for dynamic or repeated changes of a parameter within a function, while still having the convenience of using the SET option to save and restore the caller's value. However, a regular SET command overrides any surrounding function's SET option; its effects will persist unless rolled back.
- Note: In PostgreSQL versions 8.0 through 8.2, the effects of a SET LOCAL would be canceled by releasing an earlier savepoint, or by successful exit from a PL/pgSQL exception block. This behavior has been changed because it was deemed unintuitive.
PARAMETERS
- SESSION
- Specifies that the command takes effect for the current session. (This is the default if neither SESSION nor LOCAL appears.)
- LOCAL
- Specifies that the command takes effect for only the current transaction. After COMMIT or ROLLBACK, the session-level setting takes effect again. Note that SET LOCAL will appear to have no effect if it is executed outside a BEGIN block, since the transaction will end immediately.
- configuration_parameter
- Name of a settable run-time parameter. Available parameters are documented in in the documentation and below.
- value
- New value of parameter. Values can be specified as string constants, identifiers, numbers, or comma-separated lists of these, as appropriate for the particular parameter. DEFAULT can be written to specify resetting the parameter to its default value (that is, whatever value it would have had if no SET had been executed in the current session).
Besides the configuration parameters documented in in the documentation, there are a few that can only be adjusted using the SET command or that have a special syntax:
- SCHEMA
- SET SCHEMA 'value' is an alias for SET search_path TO value. Only one schema can be specified using this syntax.
- NAMES
- SET NAMES value is an alias for SET client_encoding TO value.
- SEED
-
Sets the internal seed for the random number generator (the
function random). Allowed values are
floating-point numbers between -1 and 1, which are then
multiplied by 231-1.
The seed can also be set by invoking the function setseed:
SELECT setseed(value);
- TIME ZONE
-
SET TIME ZONE value is an alias
for SET timezone TO value. The
syntax SET TIME ZONE allows special syntax
for the time zone specification. Here are examples of valid
values:
-
- 'PST8PDT'
- The time zone for Berkeley, California.
- 'Europe/Rome'
- The time zone for Italy.
- -7
- The time zone 7 hours west from UTC (equivalent to PDT). Positive values are east from UTC.
- INTERVAL '-08:00' HOUR TO MINUTE
- The time zone 8 hours west from UTC (equivalent to PST).
- LOCAL
- DEFAULT
- Set the time zone to your local time zone (that is, the server's default value of timezone; if this has not been explicitly set anywhere, it will be the zone that the server's operating system defaults to).
-
See in the documentation for more information about time zones.
NOTES
The function set_config provides equivalent functionality; see in the documentation. Also, it is possible to UPDATE the pg_settings system view to perform the equivalent of SET.
EXAMPLES
Set the schema search path:
SET search_path TO my_schema, public;
Set the style of date to traditional POSTGRES with ``day before month'' input convention:
SET datestyle TO postgres, dmy;
Set the time zone for Berkeley, California:
SET TIME ZONE 'PST8PDT';
Set the time zone for Italy:
SET TIME ZONE 'Europe/Rome';
COMPATIBILITY
SET TIME ZONE extends syntax defined in the SQL standard. The standard allows only numeric time zone offsets while PostgreSQL allows more flexible time-zone specifications. All other SET features are PostgreSQL extensions.
SEE ALSO
RESET [reset(7)], SHOW [show(7)]
Index
This document was created by man2html, using the manual pages.
Time: 05:34:16 GMT, December 24, 2015


Depei Zhang
P1: LC214. Shortest Palindrome
Time complexity: O(N)
Leetcode runtime & memory (Python3): 40 ms (91.25%) & 17.1 MB
Solution:
P2: LC1392. Longest Happy Prefix
Time complexity: O(N)
Leetcode runtime & memory (Python3): 236 ms (84.62%) & 18.8 MB
Solution:


Creating a 3D Chess game, it's assets and making the game playable by learning Unity Game Engine, Blender for Asset creation and C# for the working of the game.
Video games and chess became sensations of every house after the COVID-19 pandemic and the Netflix series, Queen's Gambit. Inspired by these we would like to create our own version of Chess for our Computer Graphics and Multimedia Project Component.
Current approaches to creating chess include 2D Chess using a certain programming language,using a game engine and using javascript to create chess on browser.
Asset Creation using Blender by JGN Games Youtube channel :
https://youtu.be/TXwaiTOlK9g
Unity Documentation :
https://docs.unity3d.com/Manual/index.html
Blender Documentation :
https://docs.blender.org/manual/en/latest/
3D Chess in Unity by GameDevChief :
https://www.youtube.com/watch?v=cWgo0ak_8sE
Enabling Real Time Ray Tracing in Unity :
https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@7.1/manual/Ray-Tracing-Getting-Started.html


Dunkin' bans the ‘double-cup' as it swaps foam for paper
by EndPlayBOSTON (AP) - The Dunkin' coffee chain says customers will have to do without a "double cup" for their iced drinks.
A new campaign focused in Massachusetts and Rhode Island tells customers they can no longer nest their iced drinks in a second, foam cup for extra insulation as the company moves to eliminate its polystyrene cups.
The brand says the double-cup habit was started in New England and is most common there. But by Dec. 1, all the region's stores will swap foam cups for paper ones that the company says are more environmentally friendly.
New ads tell customers that the "double cup is breaking up" because the chain's relationship with foam isn't sustainable. Cold drinks are being marketed as "iced, delicious and single."
The company says its foam cups will be eliminated worldwide next year.