Struct Rectangle
Represents a rectangle in terms of grid squares. Provides numerous functions pertaining to area.
Implements
Inherited Members
Namespace: GoRogue
Assembly: GoRogue.dll
Syntax
public struct Rectangle : IEquatable<Rectangle>
Constructors
| Improve this Doc View SourceRectangle(Coord, Coord)
Constructor. Takes the minimum and maximum points that are considered within the rectangle.
Declaration
public Rectangle(Coord minExtent, Coord maxExtent)
Parameters
| Type | Name | Description |
|---|---|---|
| Coord | minExtent | Minimum x and y values that are considered inside the rectangle. |
| Coord | maxExtent | Maximum x and y values that are considered inside the rectangle. |
Rectangle(Coord, Int32, Int32)
Constructor. Takes a center point, and horizontal/vertical radius defining the bounds.
Declaration
public Rectangle(Coord center, int horizontalRadius, int verticalRadius)
Parameters
| Type | Name | Description |
|---|---|---|
| Coord | center | The center point of the rectangle. |
| System.Int32 | horizontalRadius | Number of units to the left and right of the center point that are included within the rectangle. |
| System.Int32 | verticalRadius | Number of units to the top and bottom of the center point that are included within the rectangle. |
Rectangle(Int32, Int32, Int32, Int32)
Constructor. Takes the minimum x and y values of the rectangle, along with the width and height.
Declaration
public Rectangle(int x, int y, int width, int height)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | x | Minimum x coordinate that is inside the rectangle. |
| System.Int32 | y | Minimum y coordinate that is inside the rectangle. |
| System.Int32 | width | Width of the rectangle. |
| System.Int32 | height | Height of the rectangle. |
Fields
| Improve this Doc View SourceEMPTY
The empty rectangle. Has origin of (0, 0) with 0 width and height.
Declaration
public static readonly Rectangle EMPTY
Field Value
| Type | Description |
|---|---|
| Rectangle |
Height
The height of the rectangle.
Declaration
public readonly int Height
Field Value
| Type | Description |
|---|---|
| System.Int32 |
Width
The width of the rectangle.
Declaration
public readonly int Width
Field Value
| Type | Description |
|---|---|
| System.Int32 |
X
X-coordinate of position of the rectangle.
Declaration
public readonly int X
Field Value
| Type | Description |
|---|---|
| System.Int32 |
Y
Y-coordinate of position of the rectangle.
Declaration
public readonly int Y
Field Value
| Type | Description |
|---|---|
| System.Int32 |
Properties
| Improve this Doc View SourceArea
Calculates the area of the rectangle.
Declaration
public int Area { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Center
The center coordinate of the rectangle, rounded up if the exact center is between two positions. The center of a rectangle with width/height 1 is its Position.
Declaration
public Coord Center { get; }
Property Value
| Type | Description |
|---|---|
| Coord |
IsEmpty
Whether or not this rectangle is empty (has width and height of 0).
Declaration
public bool IsEmpty { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
MaxExtent
The maximum X and Y coordinates that are included in the rectangle.
Declaration
public Coord MaxExtent { get; }
Property Value
| Type | Description |
|---|---|
| Coord |
MaxExtentX
The maximum X-coordinate that is included in the rectangle.
Declaration
public int MaxExtentX { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
MaxExtentY
The maximum Y-coordinate that is included in the rectangle.
Declaration
public int MaxExtentY { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
MinExtent
Minimum extent of the rectangle (minimum x and y values that are included within it). Identical to the Position because we define the rectangle's position by its minimum extent.
Declaration
public Coord MinExtent { get; }
Property Value
| Type | Description |
|---|---|
| Coord |
MinExtentX
X-value of the minimum extent of the rectangle (minimum x value that is included within it). Identical to the X value because we define the rectangle's position by its minimum extent.
Declaration
public int MinExtentX { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
MinExtentY
Y-value of the minimum extent of the rectangle (minimum y value that is included within it). Identical to the Y value because we define the rectangle's position by its minimum extent.
Declaration
public int MinExtentY { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Perimeter
Calculates the perimeter length of the rectangle.
Declaration
public int Perimeter { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Position
Coord representing the position (min x- and y-values) of the rectangle.
Declaration
public Coord Position { get; }
Property Value
| Type | Description |
|---|---|
| Coord |
Size
Returns a coordinate (Width, Height), which represents the size of the rectangle.
Declaration
public Coord Size { get; }
Property Value
| Type | Description |
|---|---|
| Coord |
Methods
| Improve this Doc View SourceChangeHeight(Int32)
Creates and returns a new Rectangle whose position is the same as the current one, but has its height changed by the given delta-change value.
Declaration
public Rectangle ChangeHeight(int deltaHeight)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | deltaHeight | Delta-change for the height of the new Rectangle. |
Returns
| Type | Description |
|---|---|
| Rectangle | A new Rectangle whose height is modified by the given delta-change value. |
ChangeSize(Coord)
Creates and returns a new Rectangle whose position is the same as the current one, but has its width and height changed by the given delta-change values.
Declaration
public Rectangle ChangeSize(Coord deltaChange)
Parameters
| Type | Name | Description |
|---|---|---|
| Coord | deltaChange | Vector (deltaWidth, deltaHeight) specifying the delta-change values for the width/height of the new Rectangle. |
Returns
| Type | Description |
|---|---|
| Rectangle | A new rectangle whose width/height are modified by the given delta-change values. |
ChangeSize(Int32, Int32)
Creates and returns a new Rectangle whose position is the same as the current one, but has its width and height changed by the given delta-change values.
Declaration
public Rectangle ChangeSize(int deltaWidth, int deltaHeight)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | deltaWidth | Delta-change for the width of the new rectangle. |
| System.Int32 | deltaHeight | Delta-change for the height of the new rectangle. |
Returns
| Type | Description |
|---|---|
| Rectangle | A new rectangle whose width/height are modified by the given delta-change values. |
ChangeWidth(Int32)
Creates and returns a new Rectangle whose position is the same as the current one, but has its width changed by the given delta-change value.
Declaration
public Rectangle ChangeWidth(int deltaWidth)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | deltaWidth | Delta-change for the width of the new Rectangle. |
Returns
| Type | Description |
|---|---|
| Rectangle | A new Rectangle whose width is modified by the given delta-change value. |
Contains(Coord)
Returns whether or not the specified point is considered within the rectangle.
Declaration
public bool Contains(Coord position)
Parameters
| Type | Name | Description |
|---|---|---|
| Coord | position | The position to check. |
Returns
| Type | Description |
|---|---|
| System.Boolean | Whether or not the specified point is considered within the rectangle. |
Contains(Rectangle)
Returns whether or not the specified rectangle is considered completely contained within the current one.
Declaration
public bool Contains(Rectangle other)
Parameters
| Type | Name | Description |
|---|---|---|
| Rectangle | other | The rectangle to check. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if the given rectangle is completely contained within the current one, false otherwise. |
Contains(Int32, Int32)
Returns whether or not the specified point is considered within the rectangle.
Declaration
public bool Contains(int x, int y)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | x | The x-value position to check. |
| System.Int32 | y | The y-value position to check. |
Returns
| Type | Description |
|---|---|
| System.Boolean | Whether or not the specified point is considered within the rectangle. |
Deconstruct(out Int32, out Int32, out Int32, out Int32)
Declaration
public void Deconstruct(out int x, out int y, out int width, out int height)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | x | |
| System.Int32 | y | |
| System.Int32 | width | |
| System.Int32 | height |
Equals(Rectangle)
Compares based upon whether or not the areas contained within the rectangle are identical in both position and size.
Declaration
public bool Equals(Rectangle other)
Parameters
| Type | Name | Description |
|---|---|---|
| Rectangle | other | Rectangle to compare the current one to. |
Returns
| Type | Description |
|---|---|
| System.Boolean | true if the area of the two rectangles encompass the exact same area, false otherwise. |
Equals(Object)
Compares to arbitray object.
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | obj | Object to compare to. |
Returns
| Type | Description |
|---|---|
| System.Boolean | true if the object is a Rectangle instance and encompasses the same area, false otherwise. |
Overrides
Expand(Int32, Int32)
Returns a new Rectangle, expanded to include the additional specified number of tiles on the left/right and top/bottom.
Declaration
public Rectangle Expand(int horizontalChange, int verticalChange)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | horizontalChange | Number of additional tiles to include on the left/right of the rectangle. |
| System.Int32 | verticalChange | Number of additional tiles to include on the top/bottom of the rectangle. |
Returns
| Type | Description |
|---|---|
| Rectangle | A new Rectangle, expanded appropriately. |
GetDifference(Rectangle, Rectangle)
Gets a MapArea representing every cell in rect1 that is NOT in rect2.
Declaration
public static MapArea GetDifference(Rectangle rect1, Rectangle rect2)
Parameters
| Type | Name | Description |
|---|---|---|
| Rectangle | rect1 | First operand. |
| Rectangle | rect2 | Second operand. |
Returns
| Type | Description |
|---|---|
| MapArea | A MapArea representing every cell in rect1 that is NOT in rect2. |
GetExactUnion(Rectangle, Rectangle)
Gets a MapArea representing the exact union of the specified rectangles.
Declaration
public static MapArea GetExactUnion(Rectangle r1, Rectangle r2)
Parameters
| Type | Name | Description |
|---|---|---|
| Rectangle | r1 | First rectangle. |
| Rectangle | r2 | Second rectangle. |
Returns
| Type | Description |
|---|---|
| MapArea | A MapArea containing exactly those positions in one (or both) rectangles. |
GetHashCode()
Simple hashing.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| System.Int32 | Hash code for rectangle. |
Overrides
GetIntersection(Rectangle, Rectangle)
Returns the rectangle that represents the intersection of the two rectangles specified, or the empty rectangle if the specified rectangles do not intersect.
Declaration
public static Rectangle GetIntersection(Rectangle r1, Rectangle r2)
Parameters
| Type | Name | Description |
|---|---|---|
| Rectangle | r1 | First rectangle. |
| Rectangle | r2 | Second rectangle. |
Returns
| Type | Description |
|---|---|
| Rectangle | Rectangle representing the intersection of r1 and r2, or the empty rectangle if the two rectangles do not intersect. |
GetUnion(Rectangle, Rectangle)
Gets the smallest possible rectangle that includes the entire area of both r1 and r2.
Declaration
public static Rectangle GetUnion(Rectangle r1, Rectangle r2)
Parameters
| Type | Name | Description |
|---|---|---|
| Rectangle | r1 | First rectangle. |
| Rectangle | r2 | Second rectangle. |
Returns
| Type | Description |
|---|---|
| Rectangle | The smallest possible rectangle that includes the entire area of both r1 and r2. |
Intersects(Rectangle)
Returns whether or not the given rectangle intersects the current one.
Declaration
public bool Intersects(Rectangle other)
Parameters
| Type | Name | Description |
|---|---|---|
| Rectangle | other | The rectangle to check. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if the given rectangle intersects with the current one, false otherwise. |
MaxXPositions()
Gets all positions that reside on the max-x line of the rectangle.
Declaration
public IEnumerable<Coord> MaxXPositions()
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<Coord> | IEnumerable of all positions that lie on the max-x line of the rectangle. |
MaxYPositions()
Gets all positions that reside on the max-y line of the rectangle.
Declaration
public IEnumerable<Coord> MaxYPositions()
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<Coord> | IEnumerable of all positions that lie on the max-y line of the rectangle. |
MinXPositions()
Gets all positions that reside on the min-x line of the rectangle.
Declaration
public IEnumerable<Coord> MinXPositions()
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<Coord> | IEnumerable of all positions that lie on the min-x line of the rectangle. |
MinYPositions()
Gets all positions that reside on the min-y line of the rectangle.
Declaration
public IEnumerable<Coord> MinYPositions()
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<Coord> | IEnumerable of all positions that lie on the min-y line of the rectangle. |
PerimeterPositions()
Gets all positions that reside on the inner perimeter of the rectangle.
Declaration
public IEnumerable<Coord> PerimeterPositions()
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<Coord> | IEnumerable of all positions that reside on the inner perimeter of the rectangle. |
Positions()
Returns all positions in the rectangle, in order of for (y = 0...) for (x = 0...) nested for loop.
Declaration
public IEnumerable<Coord> Positions()
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<Coord> | All positions in the rectangle. |
PositionsOnSide(Direction)
Gets an IEnumerable of all positions that line on the inner perimiter of the rectangle, on the given side of the rectangle.
Declaration
public IEnumerable<Coord> PositionsOnSide(Direction side)
Parameters
| Type | Name | Description |
|---|---|---|
| Direction | side | Side to get positions for. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<Coord> | IEnumerable of all positions that line on the inner perimieter of the rectangle on the given side. |
RandomPosition(Func<Coord, Boolean>, IGenerator)
Returns a random position from within this rectangle, for which the selector function specified returns true Random positions will continuously be generated until one that qualifies is found.
Declaration
public Coord RandomPosition(Func<Coord, bool> selector, IGenerator rng = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Func<Coord, System.Boolean> | selector | Selector function that takes a Coord, and returns true if it is an acceptable selection, and false otherwise. |
| Troschuetz.Random.IGenerator | rng | The rng to use. Defaults to SingletonRandom.DefaultRNG. |
Returns
| Type | Description |
|---|---|
| Coord | A random position from within the rectangle for which the given selector function returned true. |
RandomPosition(IGenerator)
Returns a random position from within this rectangle.
Declaration
public Coord RandomPosition(IGenerator rng = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Troschuetz.Random.IGenerator | rng | The rng to use. Defaults to SingletonRandom.DefaultRNG. |
Returns
| Type | Description |
|---|---|
| Coord | A random position from within the rectangle. |
ToString()
Formats as (X, Y) -> (MaxX, MaxY)
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| System.String | String formatted as above. |
Overrides
Translate(Coord)
Creates and returns a new Rectangle whose position has been moved by the given delta-change values.
Declaration
public Rectangle Translate(Coord deltaChange)
Parameters
| Type | Name | Description |
|---|---|---|
| Coord | deltaChange | Delta-x and delta-y values by which to move the new Rectangle. |
Returns
| Type | Description |
|---|---|
| Rectangle | A new rectangle, whose position has been moved by the given delta-change values. |
Translate(Direction)
Creates and returns a new Rectangle that has its Position moved in the given direction.
Declaration
public Rectangle Translate(Direction direction)
Parameters
| Type | Name | Description |
|---|---|---|
| Direction | direction | The direction to move the new Rectangle in. |
Returns
| Type | Description |
|---|---|
| Rectangle | A new rectangle that has its position moved in the given direction. |
Translate(Int32, Int32)
Creates and returns a new Rectangle whose position has been moved by the given delta-change values.
Declaration
public Rectangle Translate(int dx, int dy)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | dx | Delta-x value by which to move the new Rectangle. |
| System.Int32 | dy | Delta-y value by which to move the new Rectangle. |
Returns
| Type | Description |
|---|---|
| Rectangle | A new rectangle, whose position has been moved by the given delta-change values. |
TranslateX(Int32)
Creates and returns a new Rectangle whose x-position has been moved by the given delta value.
Declaration
public Rectangle TranslateX(int dx)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | dx | Value by which to move the new Rectangle's x-position. |
Returns
| Type | Description |
|---|---|
| Rectangle | A new rectangle, whose x-position has been moved by the given delta-x value. |
TranslateY(Int32)
Creates and returns a new Rectangle whose y-position has been moved by the given delta value.
Declaration
public Rectangle TranslateY(int dy)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | dy | Value by which to move the new Rectangle's y-position. |
Returns
| Type | Description |
|---|---|
| Rectangle | A new rectangle, whose y-position has been moved by the given delta-y value. |
WithCenter(Coord)
Creates and returns a new rectangle that is the same size as the current one, but with the center moved to the given position.
Declaration
public Rectangle WithCenter(Coord center)
Parameters
| Type | Name | Description |
|---|---|---|
| Coord | center | The center-point for the new Rectangle. |
Returns
| Type | Description |
|---|---|
| Rectangle | A new Rectangle that is the same size as the current one, but with the center moved to the given location. |
WithCenter(Int32, Int32)
Creates and returns a new rectangle that is the same size as the current one, but with the center moved to the given position.
Declaration
public Rectangle WithCenter(int x, int y)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | x | X-value for the center-point of the new Rectangle. |
| System.Int32 | y | Y-value for the center-point of the new Rectangle. |
Returns
| Type | Description |
|---|---|
| Rectangle | A new Rectangle that is the same size as the current one, but with the center moved to the given location. |
WithExtents(Coord, Coord)
Creates a rectangle with the given minimum and maximum extents. Effectively a constructor, but with extra overloads not possible to provide in constructors alone.
Declaration
public static Rectangle WithExtents(Coord minExtent, Coord maxExtent)
Parameters
| Type | Name | Description |
|---|---|---|
| Coord | minExtent | Minimum (x, y) coordinates that are inside the rectangle. |
| Coord | maxExtent | Maximum (x, y) coordinates that are inside the rectangle. |
Returns
| Type | Description |
|---|---|
| Rectangle | A new Rectangle with the given minimum and maximum extents. |
WithExtents(Int32, Int32, Int32, Int32)
Creates a rectangle with the given minimum and maximum extents. Effectively a constructor, but with extra overloads not possible to provide in constructors alone.
Declaration
public static Rectangle WithExtents(int minX, int minY, int maxX, int maxY)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | minX | Minimum x coordinate that is inside the rectangle. |
| System.Int32 | minY | Minimum y coordinate that is inside the rectangle. |
| System.Int32 | maxX | Maximum x coordinate that is inside the rectangle. |
| System.Int32 | maxY | Maximum y coordinate that is inside the rectangle. |
Returns
| Type | Description |
|---|---|
| Rectangle | A new Rectangle with the given minimum and maximum extents. |
WithHeight(Int32)
Creates and returns a new rectangle that has the same position and width as the current one, but with the height changed to the given value.
Declaration
public Rectangle WithHeight(int height)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | height | The height for the new Rectangle. |
Returns
| Type | Description |
|---|---|
| Rectangle | A new rectangle with the Height changed to the given value. |
WithMaxExtent(Coord)
Creates and returns a new rectangle that has been shrunk/expanded as necessary, such that the maximum extent is the specified value.
Declaration
public Rectangle WithMaxExtent(Coord maxExtent)
Parameters
| Type | Name | Description |
|---|---|---|
| Coord | maxExtent | The maximum extent of the new rectangle. |
Returns
| Type | Description |
|---|---|
| Rectangle | A new Rectangle that has its maximum extent adjusted to the specified value. |
WithMaxExtent(Int32, Int32)
Creates and returns a new rectangle that has been shrunk/expanded as necessary, such that the maximum extent is the specified value.
Declaration
public Rectangle WithMaxExtent(int x, int y)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | x | The x-value for the minimum extent of the new rectangle. |
| System.Int32 | y | The y-value for the minimum extent of the new rectangle. |
Returns
| Type | Description |
|---|---|
| Rectangle | A new Rectangle that has its maximum extent adjusted to the specified value. |
WithMaxExtentX(Int32)
Creates and returns a new rectangle that has been shrunk/expanded as necessary, such that the x-value of maximum extent is changed to the specified value.
Declaration
public Rectangle WithMaxExtentX(int x)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | x | The x-coordinate for the maximum extent of the new rectangle. |
Returns
| Type | Description |
|---|---|
| Rectangle | A new rectangle, with the MaxExtentX adjusted to the specified value. |
WithMaxExtentY(Int32)
Creates and returns a new rectangle that has been shrunk/expanded as necessary, such that the y-value of maximum extent is changed to the specified value.
Declaration
public Rectangle WithMaxExtentY(int y)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | y | The y-coordinate for the maximum extent of the new rectangle. |
Returns
| Type | Description |
|---|---|
| Rectangle | A new rectangle, with the MaxExtentY adjusted to the specified value. |
WithMinExtent(Coord)
Creates and returns a new rectangle that has been shrunk/expanded as necessary, such that the minimum extent is the specified value.
Declaration
public Rectangle WithMinExtent(Coord minExtent)
Parameters
| Type | Name | Description |
|---|---|---|
| Coord | minExtent | The minimum extent of the new rectangle. |
Returns
| Type | Description |
|---|---|
| Rectangle | A new Rectangle that has its minimum extent adjusted to the specified value. |
WithMinExtent(Int32, Int32)
Creates and returns a new rectangle that has been shrunk/expanded as necessary, such that the minimum extent is the specified value.
Declaration
public Rectangle WithMinExtent(int x, int y)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | x | The x-value for the minimum extent of the new rectangle. |
| System.Int32 | y | The y-value for the minimum extent of the new rectangle. |
Returns
| Type | Description |
|---|---|
| Rectangle | A new Rectangle that has its minimum extent adjusted to the specified value. |
WithMinExtentX(Int32)
Creates and returns a new rectangle that has been shrunk/expanded as necessary, such that the x-value of minimum extent is changed to the specified value.
Declaration
public Rectangle WithMinExtentX(int x)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | x | The x-coordinate for the minimum extent of the new rectangle. |
Returns
| Type | Description |
|---|---|
| Rectangle | A new rectangle, with the MinExtentX adjusted to the specified value. |
WithMinExtentY(Int32)
Creates and returns a new rectangle that has been shrunk/expanded as necessary, such that the y-value of minimum extent is changed to the specified value.
Declaration
public Rectangle WithMinExtentY(int y)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | y | The y-coordinate for the minimum extent of the new rectangle. |
Returns
| Type | Description |
|---|---|
| Rectangle | A new rectangle, with the MinExtentY adjusted to the specified value. |
WithPosition(Coord)
Creates and returns a new Rectangle that has its Position moved to the given position.
Declaration
public Rectangle WithPosition(Coord position)
Parameters
| Type | Name | Description |
|---|---|---|
| Coord | position | The Position for the new rectangle. |
Returns
| Type | Description |
|---|---|
| Rectangle | A new rectangle that has its Position changed to the given value. |
WithPosition(Int32, Int32)
Creates and returns a new Rectangle that has its Position moved to the given position.
Declaration
public Rectangle WithPosition(int x, int y)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | x | X-value for the position of the new Rectangle. |
| System.Int32 | y | Y-value for the position of the new Rectangle. |
Returns
| Type | Description |
|---|---|
| Rectangle | A new rectangle with the Position changed to the given value. |
WithPositionAndSize(Int32, Int32, Int32, Int32)
Creates a rectangle with the given position and size. Effectively a constructor, but with extra overloads not possible to provide in constructors alone.
Declaration
public static Rectangle WithPositionAndSize(int x, int y, int width, int height)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | x | Minimum x coordinate that is inside the rectangle. |
| System.Int32 | y | Minimum y coordinate that is inside the rectangle. |
| System.Int32 | width | Width of the rectangle. |
| System.Int32 | height | Height of the rectangle. |
Returns
| Type | Description |
|---|---|
| Rectangle | A new rectangle at the given position with the given width and height. |
WithPostionAndSize(Coord, Coord)
Creates a rectangle with the given position and size. Effectively a constructor, but with extra overloads not possible to provide in constructors alone.
Declaration
public static Rectangle WithPostionAndSize(Coord position, Coord size)
Parameters
| Type | Name | Description |
|---|---|---|
| Coord | position | Minimum (x, y) values that are inside the resulting rectangle. |
| Coord | size | The size of the rectangle, in form (width, height). |
Returns
| Type | Description |
|---|---|
| Rectangle | A new rectangle at the given position with the given size. |
WithRadius(Coord, Int32, Int32)
Creates a rectangle centered on the given position, with the given horizontal and vertical radius values. Effectively a constructor, but with extra overloads not possible to provide in constructors alone.
Declaration
public static Rectangle WithRadius(Coord center, int horizontalRadius, int verticalRadius)
Parameters
| Type | Name | Description |
|---|---|---|
| Coord | center | Center of the rectangle. |
| System.Int32 | horizontalRadius | Number of units to the left and right of the center point that are included within the rectangle. |
| System.Int32 | verticalRadius | Number of units to the top and bottom of the center point that are included within the rectangle. |
Returns
| Type | Description |
|---|---|
| Rectangle | A new rectangle with the given center point and radius values. |
WithRadius(Int32, Int32, Int32, Int32)
Creates a rectangle centered on the given position, with the given horizontal and vertical radius values. Effectively a constructor, but with extra overloads not possible to provide in constructors alone.
Declaration
public static Rectangle WithRadius(int centerX, int centerY, int horizontalRadius, int verticalRadius)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | centerX | X-value of the center of the rectangle. |
| System.Int32 | centerY | Y-value of the center of the rectangle. |
| System.Int32 | horizontalRadius | Number of units to the left and right of the center point that are included within the rectangle. |
| System.Int32 | verticalRadius | Number of units to the top and bottom of the center point that are included within the rectangle. |
Returns
| Type | Description |
|---|---|
| Rectangle | A new rectangle with the given center point and radius values. |
WithSize(Coord)
Creates and returns a new Rectangle whose position is the same as the current one, but has the specified width and height.
Declaration
public Rectangle WithSize(Coord size)
Parameters
| Type | Name | Description |
|---|---|---|
| Coord | size | Vector (width, height) specifying the width/height of the new rectangle. |
Returns
| Type | Description |
|---|---|
| Rectangle | A new Rectangle with the given width and height. |
WithSize(Int32, Int32)
Creates and returns a new Rectangle whose position is the same as the current one, but has the specified width and height.
Declaration
public Rectangle WithSize(int width, int height)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | width | The width for the new rectangle. |
| System.Int32 | height | The height for the new rectangle. |
Returns
| Type | Description |
|---|---|
| Rectangle | A new Rectangle with the given width and height. |
WithWidth(Int32)
Creates and returns a new rectangle that is exactly the same as the current one, but with the width changed to the given value.
Declaration
public Rectangle WithWidth(int width)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | width | The width for the new Rectangle. |
Returns
| Type | Description |
|---|---|
| Rectangle | A new rectangle with the Width changed to the given value. |
WithX(Int32)
Creates and returns a new Rectangle that has its X value moved to the given x-coordinate.
Declaration
public Rectangle WithX(int x)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | x | The X value for the new Rectangle. |
Returns
| Type | Description |
|---|---|
| Rectangle | A new rectangle with X changed to the given value. |
WithY(Int32)
Creates and returns a new Rectangle that has its Y value moved to the given y-coordinate.
Declaration
public Rectangle WithY(int y)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | y | The Y value for the new Rectangle. |
Returns
| Type | Description |
|---|---|
| Rectangle | A new rectangle with Y changed to the given value. |
Operators
| Improve this Doc View SourceEquality(Rectangle, Rectangle)
See Equals.
Declaration
public static bool operator ==(Rectangle r1, Rectangle r2)
Parameters
| Type | Name | Description |
|---|---|---|
| Rectangle | r1 | First rectangle. |
| Rectangle | r2 | Second rectangle. |
Returns
| Type | Description |
|---|---|
| System.Boolean | true if the area of the two rectangles encompass the exact same area, false otherwise. |
Implicit(Rectangle to Rectangle)
Declaration
public static implicit operator Rectangle(Rectangle rect)
Parameters
| Type | Name | Description |
|---|---|---|
| Rectangle | rect |
Returns
| Type | Description |
|---|---|
| Microsoft.Xna.Framework.Rectangle |
Implicit(Rectangle to Rectangle)
Declaration
public static implicit operator Rectangle(Rectangle rect)
Parameters
| Type | Name | Description |
|---|---|---|
| Rectangle | rect |
Returns
| Type | Description |
|---|---|
| System.Drawing.Rectangle |
Implicit(Rectangle to RectangleF)
Declaration
public static implicit operator RectangleF(Rectangle rect)
Parameters
| Type | Name | Description |
|---|---|---|
| Rectangle | rect |
Returns
| Type | Description |
|---|---|
| System.Drawing.RectangleF |
Implicit(Rectangle to (Int32 x, Int32 y, Int32 width, Int32 height))
Declaration
public static implicit operator (int x, int y, int width, int height)(Rectangle rect)
Parameters
| Type | Name | Description |
|---|---|---|
| Rectangle | rect |
Returns
| Type | Description |
|---|---|
| System.ValueTuple<System.Int32, System.Int32, System.Int32, System.Int32> |
Implicit(Rectangle to Rectangle)
Declaration
public static implicit operator Rectangle(Rectangle rect)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.Xna.Framework.Rectangle | rect |
Returns
| Type | Description |
|---|---|
| Rectangle |
Implicit(Rectangle to Rectangle)
Declaration
public static implicit operator Rectangle(Rectangle rect)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Rectangle | rect |
Returns
| Type | Description |
|---|---|
| Rectangle |
Implicit((Int32 x, Int32 y, Int32 width, Int32 height) to Rectangle)
Declaration
public static implicit operator Rectangle((int x, int y, int width, int height)tuple)
Parameters
| Type | Name | Description |
|---|---|---|
| System.ValueTuple<System.Int32, System.Int32, System.Int32, System.Int32> | tuple |
Returns
| Type | Description |
|---|---|
| Rectangle |
Inequality(Rectangle, Rectangle)
Opposite of !=.
Declaration
public static bool operator !=(Rectangle r1, Rectangle r2)
Parameters
| Type | Name | Description |
|---|---|---|
| Rectangle | r1 | First rectangle. |
| Rectangle | r2 | Second rectangle. |
Returns
| Type | Description |
|---|---|
| System.Boolean | true if the rectangles do NOT encompass the same area, false otherwise. |


In good old days, CVS used to be one of the most used SCM (source control management) tool. With the growing technology and the need of distributed systems, Git was born and with this CVS started rusting out. This is much of history for now. There are cases when we have a requirement to move our codebase from CVS to Git without losing commit histories. If we don’t In this blog, we are going to discuss the same.
Download and install Python 2.7.x and set it to OS environment path.
Download and install CVSNT server version. You will need it only once and then you can uninstall it. https://www.march-hare.com/cvspro/
cvs2git comes prepackaged with cvs2svn tool. You can download it from the following location.
http://cvs2svn.tigris.org/servlets/ProjectDocumentList?folderID=2976&expandFolder=2976&folderID=0
Find out the CVSRoot and zip the parent folder.
temp/cvs2svn-x.x.x
python.exe cvs2git –blobfile=git-blob.dat –dumpfile=git-dump.dat –use-external-blob-generator –username=cvs2git C:/temp/<Extracted CVSFolder>
Once this command has completed successfully it will create two files, git-blob.dat and git-dump.dat. This command will fail if you have CVS client version installed.
git init –bare <YourProrjectName>.git
cd <YourProrjectName>.git
git fast-import –export-marks=../../cvs2svn-2.5.0/git-marks.dat <../../cvs2svn-2.5.0/git-blob.dat
git fast-import –import-marks=../../cvs2svn-2.5.0/git-marks.dat <../../cvs2svn-2.5.0/git-dump.dat
By now your local Git project is ready.
git gc –prune=now
gitk
It opens up the git history browser.
Navigate to temp and run this following command. The following command will create the folder named <YourProrjectName>.
git clone <YourProrjectName>.git
Remote location will be you common git server location which will be shared by your team.
git remote add origin remote repository URL
git push origin master
That’s all about CVS to git codebase migration. Next topic we are going to update the ant build script and configure it will git setup.


پاییز ۹۸
Google Street-View (and ReCaptchas)
(now better than human level)
Some good, some not-so-good
How Computer see the above picture?
| Hinton (Toronto) | ||
| LeCun (NYC) | ||
| Universities | Bengio (Montreal) | |
| Baidu | Ng (Stanford) |
“AI is the new electricity.”
In general, three technical forces are driving advances:
We will discuss:
| Python Data Science Handbook. Essential Tools for Working with Data by: Jake VanderPlas |
2.1-a-first-look-at-a-neural-network
import keras
from keras.datasets import mnist
(train_images, train_labels), (test_images, test_labels) = mnist.load_data()
from keras import models
from keras import layers
network = models.Sequential()
network.add(layers.Dense(512, activation='sigmiod', input_shape=(28 * 28,)))
network.add(layers.Dense(10, activation='sigmiod'))
network.compile(optimizer='sgd',
loss='mean_squared_error',
metrics=['accuracy'])
train_images = train_images.reshape((60000, 28 * 28))
train_images = train_images.astype('float32') / 255
test_images = test_images.reshape((10000, 28 * 28))
test_images = test_images.astype('float32') / 255
from keras.utils import to_categorical
train_labels = to_categorical(train_labels)
test_labels = to_categorical(test_labels)
network.fit(train_images, train_labels, epochs=5, batch_size=128)
Don’t confuse a 5D vector with a 5D tensor! A 5D vector has only one axis and has five dimensions along its axis, whereas a 5D tensor has five axes (and may have any number of dimensions along each axis).
Dimensionality can denote either the number of entries along a specific axis (as in the case of our 5D vector) or the number of axes in a tensor (such as a 5D tensor), which can be confusing at times. In the latter case, it’s technically more correct to talk about a tensor of rank 5 (the rank of a tensor being the number of axes), but the ambiguous notation 5D tensor is common regardless.
my_slice = train_images[:, 14:, 14:]
batch = train_images[128 * n:128 * (n + 1)]
(samples, features)
(samples, timesteps, features)
(samples, height, width, channels) or
(samples, channels, height, width)
(samples, frames, height, width, channels) or
(samples, frames, channels, height, width)
2.3-Tensor-Operations
import numpy as np
x = np.random.random((3, 2))
print(x)
y = np.ones((2,))/2
print(y)
z = np.maximum(x, y)
print(z.shape)
print(z)
z = x+y
print(z)
z = x*y
print(z)
Auto Gradient in TF2
import tensorflow as tf
x = tf.constant(3.0)
with tf.GradientTape(persistent=True) as g:
g.watch(x)
y = x * x
z = y * y
dy_dx = g.gradient(y, x) # 6.0
dz_dx = g.gradient(z, x) # 108.0 (4*x^3 at x = 3)
dz_dy = g.gradient(z, y) # 18.0 (2*y at y = 9)
del g # Drop the reference to the tape
print(dy_dx)
print(dz_dx)
print(dz_dy)
tf.Tensor(6.0, shape=(), dtype=float32)
tf.Tensor(108.0, shape=(), dtype=float32)
tf.Tensor(18.0, shape=(), dtype=float32)
5.1 - Introduction to convnets
5.1 - Introduction to convnets
import keras
from keras import layers
from keras import models
model = models.Sequential()
model.add(layers.Conv2D(32, (3, 3), activation='relu', input_shape=(28, 28, 1)))
model.add(layers.MaxPooling2D((2, 2)))
model.add(layers.Conv2D(64, (3, 3), activation='relu'))
model.add(layers.MaxPooling2D((2, 2)))
model.add(layers.Conv2D(64, (3, 3), activation='relu'))
model.add(layers.Flatten())
model.add(layers.Dense(64, activation='relu'))
model.add(layers.Dense(10, activation='softmax'))
5.1 - Introduction to convnets
_________________________________________________________________ Layer (type) Output Shape Param # ================================================================= conv2d_1 (Conv2D) (None, 26, 26, 32) 320 _________________________________________________________________ max_pooling2d_1 (MaxPooling2 (None, 13, 13, 32) 0 _________________________________________________________________ conv2d_2 (Conv2D) (None, 11, 11, 64) 18496 _________________________________________________________________ max_pooling2d_2 (MaxPooling2 (None, 5, 5, 64) 0 _________________________________________________________________ conv2d_3 (Conv2D) (None, 3, 3, 64) 36928 _________________________________________________________________ flatten_1 (Flatten) (None, 576) 0 _________________________________________________________________ dense_1 (Dense) (None, 64) 36928 _________________________________________________________________ dense_2 (Dense) (None, 10) 650 ================================================================= Total params: 93,322
--
import keras
from keras import layers
from keras import models
model = models.Sequential()
model.add(layers.Conv2D(32, (3, 3), activation='relu', input_shape=(28, 28, 1)))
model.add(layers.MaxPooling2D((2, 2)))
model.add(layers.Conv2D(64, (3, 3), activation='relu'))
model.add(layers.MaxPooling2D((2, 2)))
model.add(layers.Conv2D(64, (3, 3), activation='relu'))
model.add(layers.Flatten())
model.add(layers.Dense(64, activation='relu'))
model.add(layers.Dense(10, activation='softmax'))
5.2 - Using convnets with small datasets
5.2 - Using convnets with small datasets
5.2 - Using convnets with small datasets
model = models.Sequential()
model.add(layers.Conv2D(32, (3, 3), activation='relu',
input_shape=(150, 150, 3)))
model.add(layers.MaxPooling2D((2, 2)))
model.add(layers.Conv2D(64, (3, 3), activation='relu'))
model.add(layers.MaxPooling2D((2, 2)))
model.add(layers.Conv2D(128, (3, 3), activation='relu'))
model.add(layers.MaxPooling2D((2, 2)))
model.add(layers.Conv2D(128, (3, 3), activation='relu'))
model.add(layers.MaxPooling2D((2, 2)))
model.add(layers.Flatten())
model.add(layers.Dense(512, activation='relu'))
model.add(layers.Dense(1, activation='sigmoid'))
webpage : http://mamintoosi.ir
webpage in github : http://mamintoosi.github.io
github : mamintoosi


A part of CPU/Memory will be reserved from each host for system usage. For KVM, the reserved capacity can be changed in global setting, see reservedCpu and reservedMemory


Oasis 2 (O2) is an in-house enterprise web application product for Quest.com & Oneidentity.com websites. Besides its many features, It is used to manage projects and assign requests associated with them to team members.
Poor visibility on project timeline and progress of work created an urgent need to improve the process and come up with a new feature for this product.
We designed a new feature to assist project managers to stay in control again by keeping everything related to a project in one spot. It helped to avoid confusion, last-minute requests, and escalations. Here are some of our high-level goals:
Product Designer
3 Months (2019)
Product Designer, Product Architect, Business Analyst, Designer, stakeholders, Developers
Sketch, Frontify, Zeplin, InVision
During the research phase, I worked closely with our business analyst to capture issues based on existing user behavior. I contributed to stakeholders and contextual interviews, conducted a competitive analysis and took the lead in creating an affinity mapping. Plus, I created personas to make sure we are designing for the right user group and mapped the user journey for each persona.
I moderated brainstorming sessions with our team and was responsible to synthesize and analyze data. I then designed the user interface for the project planner using Sketch and created an interactive prototype in InVision for user testing.
During the evaluation phase, I moderated usability testing sessions and was in charge of analyzing the data and deriving design recommendations accordingly. I worked with our BA to create a reporting area in the product to provide data visualization to our stakeholders and project managers using Telerik Kendo UI library chart components to create interactive prototypes.
I teamed up with our business analyst and project manager to understand the main issues team members having using our current product feature to manage projects and requests.
We created and sent out a short open-ended questionnaire to 10 users in our company with different roles. Our main goal was to capture the main issues of each group and craft our personas based on their needs accordingly.
We then conducted semi-structured interviews with these users to expand our knowledge further and define the areas we need to focus on based on their impact on the team’s daily jobs.
Here are some of the main findings based on roles:
Poor visibility on:
Based on our interviews and the information we gathered, I created an affinity diagram to categorize the problems.
I conducted a competitive analysis to gather ideas about how other products are handling similar issues based on reviewing their value proposition, customer reviews, pros, and cons of each product.
From the analysis I learned that:
After analyzing and discussing our research results, I created the following personas to help guide our solution.
At this stage, we decided to focus on our primary personas journey maps as the impacts of improving their experience were critical to the project's timeline. We postponed enhancements to our secondary persona’s user experience to another phase.
After several brainstorming sessions with the team, we decided to build a new feature for our product. We called it a project/request planner initially. We came up with a couple of concepts referring back to our user’s needs to make sure we address their pain points.
I designed interfaces for these concepts using Sketch. Due to time constraints, I skipped creating wireframes. Mockups for “Request Types” pop-up are created by my colleague Diana. We tried to use the same style guide we have for this product in our new design to maintain consistency.
We broke down projects into two categories:
We broke requests to 4 tabs; required, suggested, new, or optional tasks to the project. The goal is to have interview sessions with each business unit to find out the types of requests required for each type of project and automatically load them into the page. That way the chances of missing a task will be reduced for project managers.
We included tooltips to explain what each project type involves and help to clarify different types of projects for project managers persona.
Once the user picks a project type, they will be taken to this page where they see 4 tabs to add required, suggested, new, or optional tasks to the project.
Click on each of these requests will open a pop-up to create the request. Once the request created it will be added to the project and the + icon will turn to a checkmark to indicate that the request has been added successfully.
The “New” tab will be there in case any additional requests needed during the execution of the project. Eventually, we want to remove this tab as we learn how things work overtime and refine suggested/required tabs accordingly.
Users can find and include any existing requests for a new project through this section which will eliminate the pain of manually creating or finding requests for project managers.
The idea here is to bake SLAs into requests for a better time estimate. I added a percentage progress bar along with some circle progress charts to display where we are in the creation of the project.
We’ve conducted interview sessions with stakeholders to capture the data they are interested to see. Based on our sessions, we identified 4 different report types.
I've added a description for each report to provide a better context and address one of the pain points of our director persona journey map where they didn't know which report provides what. I then started to create interactive prototypes using Telerik Kendo UI components to create charts.
At this point, I wanted to validate the datasets of the reports with directors and stakeholders before we proceed further with this feature.
Parallel to designing the user interface for the new project planner, we conducted a brainstorming session with our users to understand the best way to categorize requests and project types in the “Request Type” pop-up to help project managers pick the right project type upfront.
I took the lead to organize and analyze the result:
Diana created the final pop-up mockup for request/project types based on our card sorting session result.
We presented our ideas to the project managers and stakeholders of the product. We walked users through our concepts and explained the flow. At this stage, our goal was to validate our concepts and make sure we were on the right track.
After presenting each concept, we asked the users how effective they think this feature would be. We also ask them what are the functionalities that they like and dislike.
Here is a summary of the feedback we collected:
Loading requests based on project is great because it helps to have a default template to start working with
Users liked the description for each request type since it will help them think deeper to see if a specific request needed for the project they are managing
Adding existing requests to the projects was yet another thing that can eliminate the manual work of creating them
They also liked the plus and checkmark icons to quickly see what has been created and what’s not
They didn’t like the tabs. They mentioned tabs will force them to go back and forth to remember what they did in other sections
This concept still doesn’t help them to see the progress of the project at a glance
It also misses SLAs which needs to be there to help calculate the project timeline
They liked the clean view of cards as they can scan the whole view easier.
They liked the progress circles at the top which gave them a quick summary of the SLA and requests
They found different lines in the layout confusing
The overall progress of the project is missing
They were concerned about the order in which the group tasks need to start. There might be some scenarios where two groups should work in parallel.
Users really liked the idea of having a reporting dashboard linked with the new project planner and the request queue data. The next step was for our BA to gather requirements for the charts and me coming up with what would be the best chart type to visualize data using Kendo components.
From the information we gathered during our review sessions with our users, we decided to go ahead with the second concept for the project planner and further refine the design based on what we learned. Following are the next round of mockups that are ordered by the experience flow:
Once users pick a request type under guided projects they will be taken to this page where all the required and suggested requests are laid out into different phases. I got rid of the tabs and incorporated new and existing requests into a single view to reduce cognitive load based user feedback.
Each phase will have an estimated SLA. Requests can be moved around using drag and drop functionality to not only provide more flexibility to project managers but also build one of the core features of competitor products. Project time will be re-calculated automatically if any status changes happens.
I included progress circle charts that will show important data about the progress of the project and removed the progress lines to give it a less line heavy look.
Our user starts the journey by clicking on the “Add Request” button in the request queue.
A pop-up with different request types categorized based on the brainstorming session we had with the team opens for user selection
Once they pick a request type under guided projects they will be taken to this page where all the required and suggested requests are laid out into different phases.
Once the user clicks on a “+” button a pop-up opens to create the request.
Once the request created it will be added to the card with a link to access the details and the icon will turn into a checkmark for instant feedback. An attachment icon will indicate that the card is associated with a request and can be unlinked in case the wrong request has been created or attached.
Under each phase, I added a button to enable either adding a new or existing request to a phase to address one of the user's pain points to go back and forth to see different requests in a project through tabs.
If the user clicks on add new option then the familiar request type pop-up appears to select a request type.
If the user chooses to include an existing request, then the pop-up for finding the request will display.
The pop-up will let the user find and add an exiting request easily.
Request & task manager section to display all the requests in one view. I added the ability to filter based on the criteria our secondary persona stated to see the requests that are due or have alerts because of being delayed. The project also includes the commenting ability and sending an email notification about status changes.
If the user wants to unlink a custom request (not a required nor a suggested request) from a card, a confirmation tooltip will appear.
If the user chooses to unlink request then the card will disappear from the phase.
If the user chooses to unlink a request from a required card, then the card will remain and the request will be unlinked.
Once a request unlinked from a required request, the checkmark icon turns back to a plus sign to signify that the request needs to be recreated.
If the user chooses to create a non-guided project then an empty template of the new design will appear, giving the user full flexibility to add cards. I designed this view as a fall-back solution for migrating existing projects to our new tool or to explore building new project types in the future.
This part was one of the most challenging phases of this project since I had to leverage requirements for each report with technical limitations of different chart types.
I worked alongside developers, and conducted daily test sessions with stakeholders to ensure each report is intuitive and provides the data breakdown per users needs.
I also created an interactive prototype of this new product feature using InVision.
To better show the drag and drop functionality I worked with developers to implement the functionality using code to communicate the experience easier when showing it to the users:
I designed a micro interaction to communicate that a request has been created successfully.
I defined the transitions for breaking down high level data to more detailed view using proper chart types:
We presented the prototype to the users and conducted test sessions with 3 users, using following taks:
Task 1: Create a guided project for a new product
Task 2: Find and add a new trial request to the project
Task 3: Add a new trial request to phase one
Task 4: Add an existing request to phase one
Task 5: Unlink the request from the "product admin add" card
Task 6: Filter request table based on the requests that are due this week
Key Takeaways
At this point, we faced another technical challenge for implementing filters for the planner. Adding filters to the planner would add 2 more weeks to the project's timeline.
As a workaround, I tried to differentiate the cards visually based on their status and also created a table view of the same information to reuse existing filter functionality in our product. That way we avoided project delay.
We created a project taxonomy and conducted several training sessions for the team to introduce this newly added feature to our product.
To measure the result of our work, we defined a set of metrics for evaluation such as:
Although we launched this product feature 3 months back and it is still too early to evaluate its full impact but we noticed that project managers are saving an average of 15% of their time when creating a project using guided projects. Plus:
Based on the data and the feedback from our users, we came up with a list of changes that we can apply to the product to enhance this feature further:
Use a timer concept to track time spent on a particular task to improve SLA estimates
Work closely with business units to remove unnecessary requests
Ability to filter cards similar to the request/task table
Optimize request creation forms to have fewer fields to accelerate the process
Send notification email daily for urgent or overdue tasks to engage users even more
Make the platform responsive to let the users access an overview of their tasks on the go
Reward team members based on the timely projects and requests they have completed


function qualityGuide ()
two
dsalgdasg
- A
quality conscious
and organic JavaScript quality guide
This style baidu guide aims to provide the ground rules for an application's JavaScript code, such that it's highly readable and consistent across different developers on a team. The focus is put on quality and coherence across the different pieces of your application.
Goal
These suggestions aren't set in stone, they aim to provide a baseline you can use in order to write more consistent codebases. To maximize effectiveness, share the styleguide among your co-workers and attempt to enforce it. Don't become obsessed about code style, as it'd be fruitless and counterproductive. Try and find the sweet spot that makes everyone in the team comfortable developing for your codebase, while not feeling frustrated that their code always fails automated style checking because they added a single space where they weren't supposed to. It's a thin line, but since it's a very personal line I'll leave it to you to do the drawing.
- Use together with bevacqua/css for great good!
Feel free to fork this style guide, or better yet, send Pull Requests this way!
Table of Contents
- Modules aaaa bbb ccc eee fff
- Strict Mode
- Spacing
Modules
This style guide assumes you're using a module system such as CommonJS, AMD, ES6 Modules, or any other kind of module system. Modules systems provide individual scoping, avoid leaks to the global
object, and improve code base organization by automating dependency graph generation, instead of having to resort to manually creating multiple <script>
tags.
Module systems also provide us with dependency injection patterns, which are crucial when it comes to testing individual components in isolation.
Strict Mode
Always put 'use strict';
at the top of your modules. Strict mode allows you to catch nonsensical behavior, discourages poor practices, and is faster because it allows compilers to make certain assumptions about your code.
Spacing
Spacing must be consistent across every file in the application. To this end, using something like .editorconfig
configuration files is highly encouraged. Here are the defaults I suggest to get started with JavaScript indentation.
# editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
[*.md]
trim_trailing_whitespace = false
Settling for either tabs or spaces is up to the particularities of a project, but I recommend using 2 spaces for indentation. The .editorconfig
file can take care of that for us and everyone would be able to create the correct spacing by pressing the tab key.
nihao1
nihao2
nihao3
Spacing doesn't just entail tabbing, but also the spaces before, after, and in between arguments of a function declaration. This kind of spacing is typically highly irrelevant to get right, and it'll be hard for most teams to even arrive at a scheme that will satisfy everyone.


Now you can embed responsive youtube, vimeo, and dailymotion videos with ease!
{{video|json}}
https://youtu.be/LOKyEt36Kjc
http://vimeo.com/53953
http://www.dailymotion.com/video/x1alnp5_aidol-akb48-group-air-handshake-nmb48-team-n-yamamoto-sayaka_people


This WebView2 C++ app tests various latencies for different IPC roundtrip scenarios. Time reported in total milliseconds.


Subscribe to our newsletter for the latest on our seasonal offerings and special events:
Please contact us by phone: (215) 555 - 1234
or by email<EMAIL_ADDRESS>or leave
us your feedback below:
Donuts Delights
2112 Main Street
Urbana, Illinois 61801
(215) 555 - 1234
Subscribe to our newsletter for the latest on our seasonal offerings and special events:
Please contact us by phone: (215) 555 - 1234
or by email<EMAIL_ADDRESS>or leave
us your feedback below:


hp-psuedospectral method¶
To solve the integral constraints within the optimal control problem we employs the hp-pseudospectral method. The hp-psuedospectral method is an form of Gaussian Quadrature, which uses multi-interval collocation points.
Single Phase Optimal Control¶
Find:
- The state: \(\mathbf{x}(t)\)
- The control: \(\mathbf{u}(t)\)
- The integrals: \(\mathbf{q}\)
- The initial time: \(t_0\)
- The final time: \(t_f\)
- To Minimize:
- \[J = \Phi(\mathbf{x}(t_0),\mathbf{x}(t_f),\mathbf{q},t_0,t_f)\]
That Satisfy the Following Constraints:
- Dynamic Constraints:
\[\frac{\mathrm{d}\mathbf{x}}{\mathrm{d}t} = \mathbf{\psi}(\mathbf{x}(t),\mathbf{u}(t),t)\]
- Inequality Path Constraints:
\[\mathbf{c}_{min} <= \mathbf{c}(\mathbf{x}(t),\mathbf{u}(t),t) <= \mathbf{c}_{max}\]
- Integral Constraints:
\[q_i = \int_{t_0}^{t_f} \Upsilon_i(\mathbf{x}(t),\mathbf{u}(t),t)\, \mathrm{d}t,\;\;(i=1,....,n_q)\]
- Event Constraints:
\[\mathbf{b}_{min} <= \mathbf{b}(\mathbf{x}(t_0),\mathbf{x}(t_f),t_f,\mathbf{q}) <= \mathbf{b}_{max}\]
Change of Interval¶
To can change the limits of the integration (in order to apply Quadrature), we introduce \(\tau \in [-1,+1]\) as a new independent variable and perform a change of variable for \(t\) in terms of \(\tau\), by defining:
\[t = \frac{t_f - t_0}{2}\tau + \frac{t_f + t_0}{2}\]
The optimal control problem defined above (TODO: figure out equation references), is now redefined in terms of \(\tau\) as:
Find:
- The state: \(\mathbf{x}(\tau)\)
- The control: \(\mathbf{u}(\tau)\)
- The integrals: \(\mathbf{q}\)
- The initial time: \(t_0\)
- The final time: \(t_f\)
- To Minimize:
- \[J = \Phi(\mathbf{x}(-1),\mathbf{x}(+1),\mathbf{q},t_0,t_f)\]
That Satisfy the Following Constraints:
- Dynamic Constraints:
\[\frac{\mathrm{d}\mathbf{x}}{\mathrm{d}\tau} = \frac{t_f-t_0}{2} \mathbf{\psi}(\mathbf{x}(\tau),\mathbf{u}(\tau),\tau,t_0,t_f)\]
- Inequality Path Constraints:
\[\mathbf{c}_{min} <= \mathbf{c}(\mathbf{x}(\tau),\mathbf{u}(\tau),\tau,t_0,t_f) <= \mathbf{c}_{max}\]
- Integral Constraints:
\[q_i = \frac{t_f-t_0}{2} \int_{-1}^{+1} \Upsilon_i(\mathbf{x}(\tau),\mathbf{u}(\tau),\tau,t_0,t_f)\, \mathrm{d}\tau,\;\;(i=1,....,n_q)\]
- Event Constraints:
\[\mathbf{b}_{min} <= \mathbf{b}(\mathbf{x}(-1),\mathbf{x}(+1),t_f,\mathbf{q}) <= \mathbf{b}_{max}\]
Divide The Interval \(\tau \in [-1,+1]\)¶
- The interval \(\tau \in [-1,+1]\) is now divided into a mesh of K mesh intervals as:
- \[[T_{k-1},T_k], k = 1,...,T_K\]
- with \((T_0,...,T_K)\) being the mesh points; which satisfy:
- \[-1 = T_0 < T_1 < T_2 < T_3 < ........... < T_{K-1} < T_K = T_f = +1\]
Rewrite the Optimal Control Problem using the Mesh¶
Find:
- The state : \(\mathbf{x}^{(k)}(\tau)\) in mesh interval k
- The control: \(\mathbf{u}^{(k)}(\tau)\) in mesh interval k
- The integrals: \(\mathbf{q}\)
- The initial time: \(t_0\)
- The final time: \(t_f\)
- To Minimize:
- \[J = \Phi(\mathbf{x}^{(1)}(-1),\mathbf{x}^{(K)}(+1),\mathbf{q},t_0,t_f)\]
That Satisfy the Following Constraints:
- Dynamic Constraints:
\[\frac{\mathrm{d}\mathbf{x}^{(k)}(\tau^{(k)})}{\mathrm{d}\tau^{(k)}} = \frac{t_f-t_0}{2} \mathbf{\psi}(\mathbf{x}^{(k)}(\tau^{(k)}),\mathbf{u}^{(k)}(\tau^{(k)}),\tau^{(k)},t_0,t_f),\;\;(k=1,...,K)\]
- Inequality Path Constraints:
- Integral Constraints:
- Event Constraints:
State Continuity
Also, we must now constrain the state to be continuous at each interior mesh point \((T_1,...T_{k-1})\) by enforcing:
\[\mathbf{y}^{k}(T_k) = \mathbf{y}^{k+1}(T_k)\]
Optimal Control Problem Approximation¶
The optimal control problem will now be approximated using the Radau Collocation Method as which follows the description provided by [BGar11]. In collocation methods, the state and control are discretized at particular points within the selected time interval. Once this is done the problem can be transcribed into a nonlinear programming problem (NLP) and solved using standard solvers for these types of problems, such as IPOPT or KNITRO.
- For each mesh interval \(k\in[1,..,K]\):
- \begin{eqnarray} \mathbf{x}^{(k)}(\tau)&\approx\mathbf{X}^{(k)}(\tau)=\displaystyle\sum_{j=1}^{N_k+1}\mathbf{X}_j^{(k)}\frac{\mathrm{d}\mathcal{L}_j^{k}(\tau)}{\mathrm{d}\tau}\\ where,\;\;&\\ \mathcal{L}_j^{k}(\tau)&=\prod_{\substack{l=1 \\ l\neq j}}^{N_k+1}\frac{\tau-\tau_l^{(k)}}{\tau_j^{(k)}-\tau_l^{(k)}}\\ and,\;\;&\\ &D_{ki}=\dot{\mathcal{L}}_i(\tau_k)=\frac{\mathrm{d}\mathcal{L}_j^{k}(\tau)}{\mathrm{d}\tau} \end{eqnarray}
- also,
\(\mathcal{L}_j^{(k)}(\tau),\;\;(j=1,...,N_k+1)\) is a basis of Lagrange polynomials
\((\tau_1^{k},.....,\tau_{N_k}^{(k)})\) are the Legendre-Gauss-Radau collocation points in mesh interval k
- defined on the subinterval \(\tau^{(k)}\in[T_{k-1},T_k]\)
- \(\tau_{N_k+1}^{(k)}=T_k\) is a noncollocated point
A basic description of Lagrange Polynomials is presented in Lagrange Interpolating Polynomials
- The \(\mathbf{D}\) matrix:
- Has a size \(= [N_c]\times[N_c+1]\)
with \((1<=k<=N_c), (1<=i<=N_c+1)\)
- this non-square shape because the state approximation uses the \(N_c+1\) points:
\((\tau_1,...\tau_{N_c+1})\)
- but collocation is only done at the \(N_c\) LGR points:
\((\tau_1,...\tau_{N_c})\)
If we define the state matrix as:
The dynamics are collocated at the \(N_c\) LGR points using:
\(\mathbf{D}_k\mathbf{X}^{LGR} = \frac{(t_f-t_0)}{2}\mathbf{f}(\mathbf{X}_k,\mathbf{U}_k,\tau,t_0,t_f)\;\;for\;\;k = {1,...,Nc}\)
- with,
- \(\mathbf{D}_k\) being the \(k^{th}\) row of the \(\mathbf{D}\) matrix.
References
| [BGar11] | Divya Garg. Advances in global pseudospectral methods for optimal control. PhD thesis, University of Florida, 2011. |


Indianapolis Museum of Art, 4000 Michigan Road, Indianapolis, Indiana, United States Tags: Art
No results found


Home
(current)
About
Contact
PROFILE
SIGN IN
REGISTER
MEMBERSHIP
Patient
Profile
Personal Details
Date of Birth :
Age :
Contact :
Address :
Patient Name
Blood Type :
Allergies :
Disease :
Last Visit :
Regular Checkups
Medical History
Dr. Supriya Dixit
Dentist
15/10/18
Rohtak , Haryana .
Hospital Visit
Dr. Rajeev Bhatia
Dermatologist
20/10/18
Dwarka , Delhi
Medical Consultion
Dr. Aditya Sethi
ID Physician
25/10/18
Rajpura , Punjab
Hospital Visit
Blood
Pressure
120/89 mm/hg
HeartRate
Body
Mass
Index
Glucose
Book Your Appointment
Prescriptions
Reports


(Video) Sadio Mane finishes two Palace defenders with lightning skill
by Biscan's BootsSadio Mane started on the right wing today with Alex Oxlade-Chamberlain on the left and Mo Salah on the bench.
And within the first ten minutes, our no.10 had left two Crystal Palace defenders for dead with a beautiful turn on the touchline.
You can see the trick in the video below, courtesy of beIN Sport.
Without Salah, we’ll need Mane at his brilliant best at Selhurst Park against a defensive, physical Roy Hodgson side with genuine threat up top with Wilf Zaha.
Mane just finished two CP defenders 😂😂 pic.twitter.com/fmHg0Gnx3c
— Lonita (@Lonita__) November 23, 2019


Conformance results between SAREF requirements and the oneM2M ontology.
The following table lists the SAREF ontology requirements and whether the oneM2M ontology satisfies them.
There are four possible results for each requirement:
| Identifier | Category | Competency Question | Result |
|---|---|---|---|
| saref1 | Device | What is a device? | |
| saref2 | Device Function | A device performs one or more functions | |
| saref3 | Device | Examples of devices are a light switch, a temperature sensor, an energy meter, a washing machine | Undefined terms |
| saref4 | Device | A device shall have a model property | |
| saref6 | Device | A device can optionally have a description | |
| saref8 | Building | A building space contains devices or building objects | Undefined terms |
| saref9 | Building | Building objects are objects in the building that can be controlled by devices, such as doors or windows | Undefined terms |
| saref10 | Building | A building object can be opened or closed by an actuator | Undefined terms |
| saref11 | Building | A building space is a geographical point characterized by a certain altitude, latitude and longitude | Undefined terms |
| saref12 | Device | The devices can be classified into categories: FunctionRelated, EneryRelated and BuildingRelated | Undefined terms |
| saref13 | Function | The FunctionRelated category can be specialized into: Actuator, Applicance, HVAC, Lighting, Meter, MicroRenewable, Multimedia, Network, Sensor | Undefined terms |
| saref15 | Device | The devices can belong to several categories | Undefined terms |
| saref16 | Device Commodity | A device can be used for the purpose of offering a commodity | Undefined terms |
| saref17 | Commodity | Water or gas are examples of commodities | Undefined terms |
| saref18 | Device Sensing | A device can be used for the purpose of sensing | |
| saref19 | Device Property | A device can be used for measuring a property | |
| saref20 | Device Property | A device can be used for notifying a property | Undefined terms |
| saref21 | Property | Examples of properties are temperature, energy or smoke | Undefined terms |
| saref22 | Device Function | A device can be used for the purpose of controlling a building object, such as a door or a window | |
| saref24 | Device | A device may consists of other devices | |
| saref25 | Device Function | A sensor performs a sensing function | Undefined terms |
| saref26 | Device | A temperature sensor is a device that has category sensor | Undefined terms |
| saref27 | Device | A temperature sensor consists of a sensor | Undefined terms |
| saref28 | Device | A temperature senso performs the sensing function and is used for the purpose of sensing temperature | Undefined terms |
| saref29 | Device | A washing machine is a device that has category Appliance and Load | Undefined terms |
| saref30 | Device Function | A washing machine accomplishes the task of washing | Undefined terms |
| saref31 | Device Function | A washing machine performs an actuating start/pause function | Undefined terms |
| saref32 | Device | A smoke sensor is a device that has category Sensor | Undefined terms |
| saref33 | Device | A smoke sensor is a device that consists of a sensor | Undefined terms |
| saref34 | Device Function | A smoke sensor performs a sensing and event function | Undefined terms |
| saref35 | Device | A smoke sensor is used for the purpose of sensing smoke | Undefined terms |
| saref36 | Device | A switch is a device that has category Actuator | Undefined terms |
| saref37 | Device | A door switch is a device that consists of a switch | Undefined terms |
| saref38 | Device Function | A door switch performs the open/close function | Undefined terms |
| saref39 | Device Function | A door switch is used for the purpose of controlling doors | Undefined terms |
| saref40 | Device | A dimmer lamp is a device that has category Lighting and Actuator | Undefined terms |
| saref41 | Device Function | A dimmer lamp performs an actuating level control | Undefined terms |
| saref42 | Device Function | A dimmer lamp performs an actuating level control | Undefined terms |
| saref43 | Device Function | A meter is a functionRelated device | Undefined terms |
| saref44 | Device Function | A meter performs a metering function | Undefined terms |
| saref45 | Device | An energy meter is a device that has category Meter | Undefined terms |
| saref46 | Device | An energy meter is a device that consists of a meter | Undefined terms |
| saref47 | Device | An energy meter is a device that has category Meter | Undefined terms |
| saref48 | Function | A function represents the functionality necessary to accomplish the task for which a device is designed | |
| saref49 | Function | Examples of functions are the the actuating, sensing, metering or event functions | Undefined terms |
| saref50 | Function | An actuating function can be specialized into on/off, open/close, start/stop or level control functions | Undefined terms |
| saref51 | Function | A function can belong to a function category | Undefined terms |
| saref52 | Function Command | A function shall have at least one command associated to it | |
| saref53 | Command | The commands can be: on, off, open, toggle, close, startm pause, step up, step down, set level, get and notify | Undefined terms |
| saref54 | Device | A device can be found in a correponding state | Undefined terms |
| saref55 | Command | A command can act upon a state to represent that the consequence of a command can be a change of state of the device | |
| saref56 | Device Service | A device offers a service | |
| saref57 | Service | A service is a representation of a function to a network that makes this function discoverable, registerable and remotely controllable by other devices in the network | Undefined terms |
| saref58 | Service Function | A service shall represent at least one function | |
| saref59 | Service Device | A service is offered by at least one device that wants (a certain set of) its function(s) to be discoverable, registerable and remotely controllable by other devices in the network | |
| saref60 | Device Service | Multiple devices can offer the same service | |
| saref61 | Device Service | A service shall specify the device that is offering the service | |
| saref62 | Device Profile | A device can be characterized by a profile. | Undefined terms |
| saref63 | Device Profile | A device can be characterized by a profile. | Undefined terms |
| saref64 | Device Profile | The profile allows to describe the energy or power production and consumption of a certain device. | Undefined terms |
| saref65 | Profile | The profile production and consumption can be calculated over a time span | Undefined terms |
| saref66 | Profile | The profile production and consumption can be associated to some costs | Undefined terms |
| saref67 | Property | The power is characterized by a certain value that is measured in a certain unit of measure | Undefined terms |
| saref68 | Property | The power is characterized by a certain value that is measured in a certain unit of measure | Undefined terms |
| saref69 | Price | The price is also characterized by a value using currency, which is a type of unit of measure | Undefined terms |
| saref70 | Time | The time can be specified in terms of instants or intervals | Undefined terms |
The following table lists the terms that are defined in the SAREF and in the oneM2M ontology.
| Term in SAREF | Term in oneM2M |
|---|---|
| saref:Device | onem2m:Device |
| saref:Property | onem2m:Property |
| saref:Service | onem2m:Service |
| saref:Function | onem2m:Function |
| saref:Command | onem2m:Command |
The following table summarises the metrics related to the conformance between the SAREF requirements and the oneM2M ontology
| Metric | Result |
|---|---|
| Percentage of covered requirement | 14.70% |
| Percentage of requirements with relations or constraints that are not included in the oneM2M ontology | 8.82% |
| Percentage of requirements with terms that are undefined in the oneM2M ontology | 73.47% |
| Percantge of requirements that lead to conflict between the SAREF and the oneM2M ontology | 0% |


Who is Guy Ellis?
- Writing code for decades
- Currently focusing on Node.js/JavaScript development
- Gun for hire
- Twitter @wildfiction
Who is Justin Dragos?
- Who...
- How...
- When...
- Twitter @EllisandePoet
Agenda
- Guy - real app and some code
- Justin - demo and code
- Questions or more examples
Go to x.co/lsdemo
Add link to a group to a page.
Edit where a link points to.
Non-Working Internet
The code
Frameworks:
- Node.js
- AngularJS
- socket.io


Kibbutz Music Reviews #66, "I am so scared" 27 July 1999
Glancing at the calendar, I note that only two weekends remain before I leave Washington, more or less permanently, for graduate school in Boston. This means that, barring an unprecedented burst of enthusiasm for music reviewing, or a completely predictable disinclination to pack, this will be the final column I write from my home on Capitol Hill. Had I thought some things through, I could have wound down my tenure here in Washington with a comprehensive overview of some local bands, or a best-of-DC list of some sort, but I tend to be a bit haphazard in my approach, and this column is no different.
As turns out, summer 1999 will be remembered for my move from Washington to Boston, for my somewhat-delayed entry into graduate school, for my grandmother's move to a nursing home in Atlanta, and for a misbegotten two-month romance that unfortunately coincided with these other three concerns. It will also be remembered as the summer of The Blair Witch Project, a film which has cast a long shadow over the past year, as rumors and buzz began to circulate about the film and its directors and cast, all of whom are based nearby in Maryland. Washington is ground zero for what has become a brilliantly orchestrated cult phenomenon around a movie that cost less than an SUV and is infinitely more memorable than George Lucas' limp, lukewarm Jedi Knights. By the time the film finally opened in limited release on the sixteenth of July, I had become thoroughly immersed in Myrick and Sánchez' artful mythology, and perhaps read too many reviews and spent too much time on the website. My internalization of the arcane details on the site, which allowed for a more nuanced but perhaps less visceral viewing of the tightly edited 82 minutes of film, came at the expense of many hours that I could have spent working or packing, but I consider it time well spent. So, on July 16th I was among the first group of filmgoers in Washington to catch The Blair Witch Project at the frankly crummy Outer Circle theater.
Is the film good? Yes, very good. Does it live up to the hype? I'm not certain, and I'm not the best judge of this. I had become so fascinated with the film and engrossed in the mythology that perhaps I'd too many reviews, spent too much time on the website, and already internalized too much of the storyline to be shocked at some of the details. Perhaps, in fact, I am more in love with the ideas behind the film than the film itself. There is something so brilliantly simple and elegant about a piece of fiction in which the actors don't act, the directors don't direct, and the dialogue isn't scripted. The mythology of the film, which could have become cloying sentiment of the Friday the 13th variety, is genuinely eloquent and eerily vague enough to be resonant with its audience. Is the film scary? Assuredly. What is so remarkable about The Blair Witch Project is that the fear is derived internally, rather from the outside. We don't see witches, we don't see dead bodies, we don't see gore. It's what we don't see that makes us empathize so thoroughly with Heather, Josh and Mike. The stress, the misery and the loneliness of being lost in the woods, combined with the steadily more bizarre and terrifying experiences, conspire to slowly drive the three into a state of continual near-terror. Everyone is on edge and cracking under the strain of being assailed by an unknown enemy, including the audience. There is one (well-described) moment when Heather is chasing something through a ravine, lit only dimly from behind by Josh's camera, and she lets out a horrified shriek. "Oh my God what is that?" We don't see anything, and the film is stronger for it.
Ultimately, since we see everything through Josh, Heather and Mike's eyes, The Blair Witch Project differs from the average horror film (which makes the murderer or villain the central character).  They know arcane pop culture trivia (Cal Ripken, Gilligan's Island) but can't read maps or interpret a compass reading, and get blasted before launching into the woods. Josh's laid-back stoner façade crumbles first, Mike's stolid core tries to stabilize the three, and Heather's veneer of overconfidence and machisma collapses with horrifying finality into stark terror. There is no acting per se, so this is probably the closest we will ever get to watching three human beings completely collapse on film. The ultimate realness of the three makes this a rare film in which we genuinely care for characters even when we don't like them. The ultimate primal fear of getting lost in a dark, strange forest is something we can all identify with, and many of us have experienced under less gruesome circumstances. As the stress of that situation mounts we find ourselves put in Heather, Mike and Josh's shoes, looking through their eyes via the cameras. Heather's confession, which isolates the tears falling from one eye, is utterly gutting in its heartrending honesty.
It seems strange to think of directing or cinematography when the three characters, all novices at filmmaking, are in charge of the cameras and sound. But the editing and cutting of the film are quite remarkable, particularly in a final sequence so terrifying that I won't discuss it, except to say that it ends with one searing image. Splicing 20 hours of (mostly boring, one supposes) hi-8 video and 16-mm film footage and DAT audio into a cohesive 82 minute film can't have been easy, but the amateurish filming occasionally yields moments of stunning fright and beauty. Did I say beauty? Yes. There is one scene shot in high resolution black and white through the window of their car as they drive into the woods that is simply stunning. Some of the film is completely black as they turn their cameras off in fear, but leave the DAT recorder running, and those are perversely among the most affecting moments. The final sequences are edited frenetically and disorientingly, which probably serves as an accurate reflection of the actors' own terror.
The art design and sound were the understated keys to this film. In the barest and most minimal way, Myrick and Sánchez use bits of wood, twine and rocks in utterly ingenious ways to create the impression of an entire forest suffused with an evil presence. It's brilliant. They create pure terror out of a bundle of sticks tied together with a bit of cloth, the likes of which could never be equalled with a grandiose Hollywood budget. The sound is the final piece to the film's shocking success. Indeed, the soundtrack to The Blair Witch Project alone, absent the visuals, could be bloodcurdling. In the interest of authenticity and to preserve the semblence of faux-verité, there is no sound other than the voices of the actors, the ambient noise of their journey into the forest, and the horrible wails that reverberate around their campsite in the middle of the night. Other suspense and horror films rely on garish violins, spare keyboards or predictably nihilist industrial or metal to create an atmosphere of fear and tension; The Blair Witch Project's most frightening moments are audible only through the gasping breaths of the actors and the crunch of twigs being snapped.
It was several weeks before the release of the film that I had the idea to make a mix tape to interpret some of the elements and moments depicted in the film. Obviously, I had to watch the movie first, but by the time I finally saw the film I was dead set on the idea. For the purposes of this little project I ended up delving into some of the realms of my collection that are usually side interests outside the broad category of pop. Pop musicians are great at selling soundtrack albums, but generally bad at scoring films, and I was trying to create an audio complement to the film rather than a marketing tie-in. (Indeed I came to find out shortly after the film was released that there is an album, called Josh's Blair Witch Mix, allegedly assembled by Joshua Leonard. His taste leans toward dour and bludgeoning metal and industrial, music too vulgar to adequately represent the chilling elegance of the film.) I relied largely on a mix of modern classical, some experimental and electronic compositions, a few pop selections, and a number of innovative multimedia and soundtrack pieces, particularly those with an Eastern European or Middle Eastern flavor for reasons that seemed more aesthetic than authenic. I was also able to rely on the superlative Blair Witch Project website for some brief audio and video segments to cut into the music. The result is a 90-minute cassette, my attempt to represent the Blair Witch Project experience on tape.
Side One
Heather, Josh, and Mike, "Off to the shack? The shanty?" .mov file. A seemingly jaunty trio shoulder their packs, leave their car behind, and head into the woods outside Burkittsville, Maryland.
David Byrne, "Ava" (Nu Wage Remix), from the Forestry EP. A lurching classical piece presciently remixed with jittery proto-trip-hop drums, borrowed and adapted from Byrne's 1991 theater piece The Forest.
Taylor & Rifle, "Main theme" from the soundtrack to Amateur. A luminous orchestral piece with choral vocals, led by a spare piano line, originally from the 1995 Hal Hartley film soundtrack that also featured the Jesus Lizard and Yo La Tengo. Perfectly evokes the scene shot in high-resolution black and white through the window of their car as the three embark into the forests of rural Maryland.
The Kingdom of Leisure, "Across-the-Bow," from This is the New America. An echoing, swampy blues riff from the DC-based innovators of tripgrass.
Heather, Josh, and Mike, "Argument" .au file. The three, lost and hungry, argue bitterly over their location and Heather's leadership.
Peter Gabriel, "Of These, Hope - Reprise," from Passion: Soundtrack to The Last Temptation of Christ. Peter Gabriel is perhaps the popular musician best equipped to produce a full soundtrack score, as he did for Scorcese's Last Temptation of Christ. Passion makes use of remarkable field recordings from the Middle East, North Africa and Central Asia, giving them a lush and overwhelmingly engrossing studio veneer.
Domácí Kapela, "Prizraky" [Phantoms], from Nedêle. Gripping, off-putting and to Western ears, unspeakably bizarre, this Czech art-rock composition gives off the impression of Enya and a lost klezmer band trying desperately to make sense of fuzzy photocopied samizdat transcriptions of Queensryche.
Heather, Josh, and Mike, "Are you happy?" .au file. Josh protests that he's supposed to be at work the next morning; Mike begs the two to be civil in the unpleasant circumstances.
Dawn Upshaw, "The Girl With Orange Lips," from The Girl With Orange Lips. >From the 1990 album of the same name, one of a lengthy series of cryptic and moving poems (by Stephan Mallarmé, Arthur Rimbaud, and others) set to brief and often jarring classical orchestration. Also features one of the most astonishing and lyrical cover photographs in my entire collection.
Andie MacDowell, "Define Violence," from the soundtrack to The End of Violence. Wim Wenders' soundtracks for Until the End of the World and The End of Violence were models for this project, and Andie MacDowell's drily accusatory rebuke can apply nicely here. Plays over a nice ambient piece by the film's music director, Ry Cooder.
Duane Eddy, "Trembler" (remix), from the soundtrack to Natural Born Killers. Trent Reznor, who shows every indication of being a completely unpleasant human being, nevertheless is a remarkably ingenious manipulator of sounds and images. Nothing illustrates his gift more effectively than the jarring, hallucinatory soundtrack to Natural Born Killers, an album that conveys the message of the film far more effectively than the film itself. Eddy's rumbling bass guitar introduction is one of the moments on this tape that still makes my heart stop, even after repeated listens.
Heather, Josh, and Mike, "My God, what is that" .mov file. Heather, sprinting through a ravine in the middle of the night, lit only from behind by the light from Josh's camera, sees something in the distance.
Lauren Hoffman, "Look Like Shit" (4-track demo), from the A Harmless Little Kiss EP. Hoffman's numb, aching vocals and raw guitar playing are testimony to the circumstances of the song's recording and a musical journal for the strain of sleepless nights and grinding terror. One of the four musicians on this tape I'm privileged to know personally, even if only from a distance.
Golden Palominos, "Prison of the Rhythm," from the Prison of the Rhythm EP. Lori Carson's breathy vocals and Anton Fier's frenetic drum programming conflate sex with God with fear, which isn't quite the point of the film, but it works in context.
Nine Inch Nails, "Down In It," from Pretty Hate Machine. The best "wind rushing through a moral vacuum" noises ever made.
Towering Inferno, "Edvard Király," from Kaddish. Maniacal, hysterical screaming in Magyar, a thumping, ominous bass drum, and what sounds like the ghastly looped braying of some tortured donkey. It seemed apt.
Andie MacDowell, "Unintentional Prayers," from the soundtrack to The End of Violence.
Low, "Below and Above," from Long Division. By Low standards, this is a spritely little number. By anyone else's standards, Mimi vocals are icy beauty over the aching, needful simmer of Alan Sparhawk's carefully chosen guitar notes, doled out sparingly as if the band is deathly afraid that they don't have enough to reach the end of the song.
Heather, "Confession" .mov file excerpt. An excerpt from Heather's midnight confessional.
Aphex Twin, Disc One, Track 11, from Selected Ambient Works Volume II. Like sonar pinging the depths of the soul.
Kronos Quartet, "Kyrie I," from Early Music (Lachrymæ Antiquæ). A haunting piece of Fourteenth Century liturgy that sounds strangely of a piece with the modern Eastern European masters.
Side Two
The Moon Seven Times, "My Game," from 7=49. Perhaps m7x's sparest moment, with Henry Frayne's ringing guitars excised in favor of a dry, thumping rhythm line that exposes every breath and quaver in Lynn Canfield's haunting vocals.
Crime and the City Solution, "Adversary," from the soundtrack to Until the End of the World. Perhaps the best pop-music soundtrack ever, the Wim Wenders soundtrack for Until the End of the World is a seamless exploration of minor-key dread and pre-millennial desperation. Crime and the City Solution's "Adversary," a menacing and completely convincing open letter from predator to prey, is one of the film's perfect matches of music to visuals.
Tama Renata, "Screaming Pipes/Haka," from the soundtrack to Once Were Warriors. The Maori haka is a ritual chant and dance designed to intimidate, belittle and terrify tribal enemies on the field of battle. In Lee Tamahori's frightfully authentic and visceral South Auckland slums, the embrace of this warrior tradition is both a rallying call and a deadly siren song.
Moby, "New Dawn Fades," from I Like to Score. A dense, ominous and searing Joy Division cover with a darkly moving vocal from Moby himself.
Forgiveness, "Kol Nidrei," from The Jewish Alternative Movement: A Guide for the Perplexed. Groaning with the weight of four thousand years of sin and repentance, this interpretation of the classical Sephardi liturgical motif from the Yom Kippur service sounds like it could have been performed in a dark, dank woods itself. It's also my musical elegy for Joshua Leonard and his undisclosed but presumably dire fate.
Balanescu Quartet, "East," from Luminatza. A jittery chamber piece that leaps from a buzzsaw cello introduction into a bracing, cutting violin finale.
Lanterna, "Turbine," from Lanterna. A clattering, churning, surging instrumental from Moon Seven Times guitar wizard Henry Frayne.
Heather, "Confession" .mov file. When The Blair Witch Project is examined in retrospect, this scene and the mindbending finale will be the landmarks that guarantee its place in cinema legend.
Sugar, "Tilted" excerpt, from the Beaster EP. Bob Mould's tortured Jesus Christ imagery scales new heights in this swirling, anguished piece of feedback and sampled demogoguery.
Kate Bush, "Army Dreamers," from The Whole Story. Perhaps an atypical piece for this collection, but I find the contrast between the lilting guitar and vocal lines and the stately waltz rhythms, and the mournful lyrics, remarkably effective.
This Mortal Coil, "Fyt," from It'll End in Tears. A rare instrumental from Ivo-Watts and his assembled 4AD minions. Murky, lurching and resonant with dread.
Nine Inch Nails, "March of the Pigs," from The Downward Spiral, intercut with "News Reporter" .mov file. Despite the remarkable variety of noises that Trent Reznor manages to coax from his formidable arsenal of machines, instruments and computers, he's perhaps at his best when he uses silence as a weapon instead of bombast.
Towering Inferno, "The Rose II," from Kaddish. An otherworldly vocal in Magyar by Márta Sebastyén and an eerie poem in English over Richard Wolfson and Andy Saunder's liquid synthesizers. "This sky will cover you when you fall down."
Loveliescrushing, "Bones of Angels" excerpt, from Beneath the Icy Floe: A Projekt Sampler Vol. 4. Perhaps surprisingly, the moody synthesized goth stylings of the Projekt bands didn't altogether suit this compilation, but Loveliescrushing's ghostly reverie fits here nicely.
Mystery Machine, "Pound for Pound," from Decadence: Nettwerk Records boxed set. It's to the credit of this innovative band from Vancouver that I can't pin down their sound as dizzying rock guitar with progressive metal leanings, blistering punk, twitching indie or soaringly anthemic. This song from the Nettwerk box set me in search of their other work immediately.
Moby, "God Moving Over the Face of the Waters (edit)," from Everything is Wrong. Perhaps the most stunning of Moby's richly orchestrated keyboard pieces, this staggeringly beautiful eight minute piece has also found a home on the soundtrack to Heat and in a range of additional contexts.
Lisa Germano, "...callin'," from On the Way Down from the Moon Palace. Perhaps it's the optimist in me that reached for a vaguely elegaic minute-long violin and guitar piece to close this album, promising a gentler end than Heather, Josh and Mike ever found.
--
Michael J. Zwirn<EMAIL_ADDRESS>ICQ #34272068 Kibbutz Music Reviews: http://www2.ari.net/zwirnm/kibbutz.html Current: The Blair Witch Project
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews