|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object EasyPrint
public class EasyPrint
| Field Summary | |
|---|---|
static int |
BOTH
Draw String with both justify |
static int |
CENTER
Draw String in the center |
int |
currentPage
|
java.lang.String |
jobTitle
|
static int |
LEFT
Draw String with left alignment |
static int |
RIGHT
Draw String with right alignment |
static int |
SPREAD
Draw String to spread evenly |
int |
totalPages
|
static int |
VBOTH
Draw String in vertical justify |
static int |
VCENTER
Draw String in vertical center |
static int |
VERTICAL
Draw String in vertical |
static int |
VSPREAD
Draw String in vertical spread |
| Constructor Summary | |
|---|---|
EasyPrint()
|
|
EasyPrint(PageListener page)
|
| Method Summary | |
|---|---|
void |
addRow(java.lang.String id,
java.lang.String data)
Print a row in a table |
void |
addRow(java.lang.String id,
java.lang.String[] data)
Print a row in a table |
void |
addRowCell(java.lang.String id,
java.lang.String title,
int x,
int y,
int w,
int h,
int align)
Add a cell that compose a customized row. |
void |
addTable(java.lang.String id,
java.lang.String caption,
double startx,
java.lang.String[] column,
double[] width,
boolean[] wrap,
int[] align)
|
void |
addTableHeadCell(java.lang.String id,
java.lang.String title,
int x,
int y,
int w,
int h,
int align)
Add a cell that compose a customized table head. |
void |
clearRect(double x,
double y,
double width,
double height)
Clears the specified rectangle by filling it with the background color of the current drawing surface. |
void |
clipRect(double x,
double y,
double width,
double height)
Intersects the current clip with the specified rectangle. |
void |
closeRow(java.lang.String id)
Close a row and draw all queued cells on output device. |
void |
closeTable(java.lang.String id)
Close table and let drawParagraph to start after this table's last row. |
void |
copyArea(double x,
double y,
double width,
double height,
double dx,
double dy)
Copies an area of the component by a distance specified by dx and dy . |
void |
draw3DRect(double x,
double y,
double width,
double height,
boolean raised)
Draws a 3-D highlighted outline of the specified rectangle. |
void |
drawArc(double x,
double y,
double width,
double height,
int startAngle,
int arcAngle)
Draws the outline of a circular or elliptical arc covering the specified rectangle. |
void |
drawImage(byte[] buf,
double x,
double y,
double width,
double height)
Draws the specified image as has already been scaled to fit inside the specified rectangle. |
void |
drawImage(java.io.File file,
double x,
double y,
double width,
double height)
Draws an image stored in a file. |
void |
drawImageInParagraph(byte[] buf,
java.lang.String cap,
double x,
double y,
double width,
double height,
int align,
boolean forward)
Draws the specified image as has already been scaled to fit inside the specified rectangle. |
void |
drawImageInParagraph(byte[] buf,
java.lang.String cap,
double width,
double height,
int align)
Draws the specified image as has already been scaled to fit inside the specified rectangle. |
void |
drawImageInParagraph(java.io.File file,
java.lang.String cap,
double x,
double y,
double width,
double height,
int align,
boolean forward)
Draws the specified image as has already been scaled to fit inside the specified rectangle. |
void |
drawImageInParagraph(java.io.File file,
java.lang.String cap,
double width,
double height,
int align)
Draws the specified image as has already been scaled to fit inside the specified rectangle. |
void |
drawLine(double x1,
double y1,
double x2,
double y2)
Draws a line, using the current color, between the points (x1, y1) and (x2, y2)
in inches. |
void |
drawOval(double x,
double y,
double width,
double height)
Draws the outline of an oval. |
void |
drawParagraph(java.lang.String s)
Print a string at the first available column and forward cursor to proper position. |
void |
drawParagraph(java.lang.String s,
int style)
Print a string at the first available column and forward cursor to proper position. |
void |
drawPolygon(double[] xPoints,
double[] yPoints,
int nPoints)
Draws a closed polygon defined by arrays of x and y coordinates. |
void |
drawPolyline(double[] xPoints,
double[] yPoints,
int nPoints)
Draws a sequence of connected lines defined by arrays of x and y coordinates. |
void |
drawRect(double x,
double y,
double width,
double height)
Draws the outline of the specified rectangle. |
void |
drawRoundRect(double x,
double y,
double width,
double height,
double arcWidth,
double arcHeight)
Draws an outlined round-cornered rectangle using this graphics context's current color. |
void |
drawString(java.lang.String s,
double x,
double y)
Draws the text given by the specified string, using this graphics context's current font and color. |
void |
drawString(java.lang.String s,
double x,
double y,
double w,
int style)
Draws the text given by the specified string, using this graphics context's current font and color. |
void |
fill3DRect(double x,
double y,
double width,
double height,
boolean raised)
Paints a 3-D highlighted rectangle filled with the current color. |
void |
fillArc(double x,
double y,
double width,
double height,
int startAngle,
int arcAngle)
Fills a circular or elliptical arc covering the specified rectangle. |
void |
fillOval(double x,
double y,
double width,
double height)
Fills an oval bounded by the specified rectangle with the current color. |
void |
fillPolygon(double[] xPoints,
double[] yPoints,
int nPoints)
Fills a closed polygon defined by arrays of x and y coordinates. |
void |
fillRect(double x,
double y,
double width,
double height)
Fills the specified rectangle. |
void |
fillRoundRect(double x,
double y,
double width,
double height,
double arcWidth,
double arcHeight)
Draws an outlined round-cornered rectangle using this graphics context's current color. |
java.awt.Dimension |
getPreferredSize()
|
javax.swing.JComponent |
getPrintCanvas()
Get the JComponent where EasyPrint will paint. |
int |
getTotalPage()
Get the total page number of this print job |
int |
getViewingPage()
Get the page number being viewed. |
double[] |
getXY()
Get the cursor position. |
void |
load(java.io.File f)
Load commands from a File. |
void |
load(java.io.ObjectInputStream ois)
Load commands from an ObjectInputStream. |
void |
newPage()
Close current page and start next. |
protected void |
pageCreated(EasyPrint pb)
A EasyPrint created by constructor EasyPrint() will call this method when a new page is created. |
void |
preview()
View pages on screen. |
void |
print()
Show a Print Job dialog for print. |
void |
print(boolean background)
Try to print out pages. |
void |
print(boolean[] f)
|
void |
print(int pageNum)
Show a Print Job dialog to print a page. |
void |
print(int[] pageNum)
Show a Print Job dialog to print a list of pages. |
void |
save(java.io.File f)
Try to save commands to a File. |
void |
save(java.io.ObjectOutputStream oos)
Try to save commands to an ObjectOutputStream. |
void |
setClip(double x,
double y,
double width,
double height)
Sets the current clip to the rectangle specified by the given coordinates. |
void |
setColor(java.awt.Color aColor)
Sets this graphics context's current color to the specified color. |
void |
setCopy(int c)
Specifies the number of copies the application should render for jobs |
void |
setFont(java.lang.String fname,
int style,
double size)
Sets this graphics context's font to the specified font. |
void |
setFooter(java.lang.String display,
java.lang.String fontName,
int fontStyle,
double fontSize)
Set footer for each page. |
void |
setFooter(java.lang.String display,
java.lang.String fontName,
int fontStyle,
double fontSize,
double x,
double y,
double w,
int align)
Set footer for each page. |
void |
setGridOn(boolean on)
Draw grid for each page. |
void |
setHeader(java.lang.String display,
java.lang.String fontName,
int fontStyle,
double fontSize)
Set header for each page. |
void |
setHeader(java.lang.String display,
java.lang.String fontName,
int fontStyle,
double fontSize,
double x,
double y,
double w,
int align)
Set header for each page. |
void |
setLineWidth(double width)
Set Line Width. |
void |
setMedia(java.lang.String media)
Set paper size. |
void |
setOri(java.lang.String ori)
Set page orientation |
void |
setPageColumn(double[][] p)
Set columns for the current page. |
void |
setPaintMode()
Sets the paint mode of this graphics context to overwrite the destination with this graphics context's current color. |
void |
setPrinter(java.lang.String printer)
Specifies the destination printer for jobs |
void |
setRowGap(java.lang.String tid,
double gap)
Set the row gap in a table. |
void |
setTableBorder(java.lang.String id,
boolean on)
Indicate a table's border should be drawn or not. |
void |
setXORMode(java.awt.Color aColor)
Sets the paint mode of this graphics context to alternate between this graphics context's current color and the new specified color. |
void |
setXY(double x,
double y)
Set the cursor position. |
void |
viewNextPage()
Render next page. |
void |
viewPreviousPage()
Render previous page. |
void |
zoom(int dots)
Zoom in pages on screen. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int LEFT
public static final int RIGHT
public static final int CENTER
public static final int BOTH
public static final int SPREAD
public static final int VERTICAL
public static final int VBOTH
public static final int VCENTER
public static final int VSPREAD
public java.lang.String jobTitle
public int currentPage
public int totalPages
| Constructor Detail |
|---|
public EasyPrint()
public EasyPrint(PageListener page)
page
- page.pageCreated(EasyPrint) will be called when a new page is created.| Method Detail |
|---|
public double[] getXY()
public void setXY(double x, double y)
x
- The x coordiate in inchesy
- The y coordiate in inchespublic void clearRect(double x, double y, double width, double height)
The background color of offscreen images may be system dependent. Applications should
use setColor
followed by fillRect
to
ensure that an offscreen image is cleared to a specific color.
x
- the x coordinate of the rectangle to clear in inches.y
- the y coordinate of the rectangle to clear in inches.width
- the width of the rectangle to clear in inches.height
- the height of the rectangle to clear in inches.public void clipRect(double x, double y, double width, double height)
x
- the x coordinate of the rectangle to clear in inches.y
- the y coordinate of the rectangle to clear in inches.width
- the width of the rectangle to clear in inches.height
- the height of the rectangle to clear in inches.public void copyArea(double x, double y, double width, double height, double dx, double dy)
dx
and dy
. From the point specified
by x
and y
, this method
copies downwards and to the right. To copy an area of the
component to the left or upwards, specify a negative value for
dx
or dy
.
If a portion of the source rectangle lies outside the bounds
of the component, or is obscured by another window or component,
copyArea
will be unable to copy the associated
pixels. The area that is omitted can be refreshed by calling
the component's paint
method.
x
- the x coordinate of the source rectangle in inches.y
- the y coordinate of the source rectangle in inches.width
- the width of the source rectangle in inches.height
- the height of the source rectangle in inches.dx
- the horizontal distance to copy the pixels inches.dy
- the vertical distance to copy the pixels in inches.public void drawString(java.lang.String s, double x, double y)
s
- the string to be drawn.x
- the x coordinate in inches.y
- the y coordinate in inches.public void drawString(java.lang.String s, double x, double y, double w, int style)
s
- the string to be drawn.x
- the x coordinate in inches.y
- the y coordinate in inches.w
- the width of the drawing area in inches.style
- style for the text.LEFT
,
RIGHT
,
BOTH
,
CENTER
,
SPREAD
,
VERTICAL
,
VBOTH
,
VSPREAD
,
VCENTER
public void draw3DRect(double x, double y, double width, double height, boolean raised)
The colors used for the highlighting effect are determined
based on the current color.
The resulting rectangle covers an area that is
width + 1
inches wide
by height + 1
inches tall.
x
- the x coordinate of the rectangle to be drawn.y
- the y coordinate of the rectangle to be drawn.width
- the width of the rectangle to be drawn.height
- the height of the rectangle to be drawn.raised
- a boolean that determines whether the rectangle
appears to be raised above the surface
or sunk into the surface.public void drawArc(double x, double y, double width, double height, int startAngle, int arcAngle)
The resulting arc begins at startAngle
and extends
for arcAngle
degrees, using the current color.
Angles are interpreted such that 0 degrees
is at the 3 o'clock position.

The center of the arc is the center of the rectangle whose origin
is (x, y) and whose size is specified by the
width
and height
arguments.
The resulting arc covers an area
width + 1
pixels wide
by height + 1
pixels tall.
The angles are specified relative to the non-square extents of the bounding rectangle such that 45 degrees always falls on the line from the center of the ellipse to the upper right corner of the bounding rectangle. As a result, if the bounding rectangle is noticeably longer in one axis than the other, the angles to the start and end of the arc segment will be skewed farther along the longer axis of the bounds.
x
- the x coordinate of the
upper-left corner of the arc to be drawn.y
- the y coordinate of the
upper-left corner of the arc to be drawn.width
- the width of the arc to be drawn.height
- the height of the arc to be drawn.startAngle
- the beginning angle.arcAngle
- the angular extent of the arc,
relative to the start angle.public void drawImage(byte[] buf, double x, double y, double width, double height)
The image is drawn inside the specified rectangle of this graphics context's coordinate space, and is scaled if necessary. Transparent pixels do not affect whatever pixels are already there.
This method will ensure the completion of drawing.
buf
- the specified image to be drawn.x
- the x coordinate in inches.y
- the y coordinate in inches.width
- the width of the rectangle in inches.height
- the height of the rectangle in inches.public void drawImage(java.io.File file, double x, double y, double width, double height)
The image is drawn inside the specified rectangle of this graphics context's coordinate space, and is scaled if necessary. Transparent pixels do not affect whatever pixels are already there.
This method will ensure the completion of drawing.
file
- the file stores the image to be drawn.x
- the x coordinate in inches.y
- the y coordinate in inches.width
- the width of the rectangle in inches.height
- the height of the rectangle in inches.public void drawImageInParagraph(byte[] buf, java.lang.String cap, double width, double height, int align)
The image is drawn inside a paragraph that have enough space for the image.
This method will ensure the completion of drawing.
buf
- the specified image to be drawn.cap
- a string describes the image.width
- the width of the rectangle in inches.height
- the height of the rectangle in inches.align
- alignment position.public void drawImageInParagraph(byte[] buf, java.lang.String cap, double x, double y, double width, double height, int align, boolean forward)
The image is drawn inside a paragraph that have enough space for the image.
This method will ensure the completion of drawing.
buf
- the specified image to be drawn.cap
- a string describes the image.x
- offset from paragraph left or right boundaryy
- offset from current cursor in paragraph.width
- the width of the rectangle in inches.height
- the height of the rectangle in inches.align
- alignment position.forward
- forward cursor's y positionpublic void drawImageInParagraph(java.io.File file, java.lang.String cap, double width, double height, int align)
The image is drawn inside a paragraph that have enough space for the image.
This method will ensure the completion of drawing.
file
- read Image from this file.cap
- a string describes the image.width
- the width of the rectangle in inches.height
- the height of the rectangle in inches.align
- alignment position.public void drawImageInParagraph(java.io.File file, java.lang.String cap, double x, double y, double width, double height, int align, boolean forward)
The image is drawn inside a paragraph that have enough space for the image.
This method will ensure the completion of drawing.
file
- read Image from this file.cap
- a string describes the image.x
- offset from left or right paragraph boundaryy
- offset from current cursor in paragraph.width
- the width of the rectangle in inches.height
- the height of the rectangle in inches.align
- alignment position.forward
- forward cursor's y position.public void drawLine(double x1, double y1, double x2, double y2)
(x1, y1)
and (x2, y2)
in inches.
x1
- the first point's x coordinate in inches.y1
- the first point's y coordinate in inches.x2
- the second point's x coordinate in inches.y2
- the second point's y coordinate in inches.public void drawOval(double x, double y, double width, double height)
x
, y
,
width
, and height
arguments.
x
- the x coordinate of the upper left
corner of the oval to be drawn in inches.y
- the y coordinate of the upper left
corner of the oval to be drawn in inches.width
- the width of the oval to be drawn in inches.height
- the height of the oval to be drawn in inches.public void drawPolygon(double[] xPoints, double[] yPoints, int nPoints)
This method draws the polygon defined by nPoint
line
segments, where the first nPoint - 1
line segments are line segments from
(xPoints[i - 1], yPoints[i - 1])
to (xPoints[i], yPoints[i])
, for
1 ≤ i ≤ nPoints
.
The figure is automatically closed by drawing a line connecting
the final point to the first point, if those points are different.
xPoints
- a an array of x
coordinates in inches.yPoints
- a an array of y
coordinates in inches.nPoints
- a the total number of points.public void drawPolyline(double[] xPoints, double[] yPoints, int nPoints)
xPoints
- an array of x points in inches.yPoints
- an array of y points in inches.nPoints
- the total number of pointspublic void drawRect(double x, double y, double width, double height)
x
and x + width
.
The top and bottom edges are at
y
and y + height
.
The rectangle is drawn using the graphics context's current color.
x
- the x coordinate
of the rectangle to be drawn in inches.y
- the y coordinate
of the rectangle to be drawn in inches.width
- the width of the rectangle to be drawn in inches.height
- the height of the rectangle to be drawn in inches.public void drawRoundRect(double x, double y, double width, double height, double arcWidth, double arcHeight)
x
and x + width
,
respectively. The top and bottom edges of the rectangle are at
y
and y + height
.
x
- the x coordinate of the rectangle to be drawn in inches.y
- the y coordinate of the rectangle to be drawn in inches.width
- the width of the rectangle to be drawn in inches.height
- the height of the rectangle to be drawn in inches.arcWidth
- the horizontal diameter of the arc
at the four corners in inches.arcHeight
- the vertical diameter of the arc
at the four corners in inches.public void fill3DRect(double x, double y, double width, double height, boolean raised)
x
- the x coordinate of the rectangle to be filled in inches.y
- the y coordinate of the rectangle to be filled in inches.width
- the width of the rectangle to be filled in inches.height
- the height of the rectangle to be filled in inches.raised
- a boolean value that determines whether the
rectangle appears to be raised above the surface
or etched into the surface.public void fillArc(double x, double y, double width, double height, int startAngle, int arcAngle)
The resulting arc begins at startAngle
and extends
for arcAngle
degrees.
Angles are interpreted such that 0 degrees
is at the 3 o'clock position.

The center of the arc is the center of the rectangle whose origin
is (x, y) and whose size is specified by the
width
and height
arguments.
The resulting arc covers an area
width + 1
inches wide
by height + 1
inches tall.
The angles are specified relative to the non-square extents of the bounding rectangle such that 45 degrees always falls on the line from the center of the ellipse to the upper right corner of the bounding rectangle. As a result, if the bounding rectangle is noticeably longer in one axis than the other, the angles to the start and end of the arc segment will be skewed farther along the longer axis of the bounds.
x
- the x coordinate of the
upper-left corner of the arc to be filled in inches.y
- the y coordinate of the
upper-left corner of the arc to be filled in inches.width
- the width of the arc to be filled in inches.height
- the height of the arc to be filled in inches.startAngle
- the beginning angle.arcAngle
- the angular extent of the arc,
relative to the start angle.public void fillOval(double x, double y, double width, double height)
x
- the x coordinate of the upper left corner
of the oval to be filled in inches.y
- the y coordinate of the upper left corner
of the oval to be filled in inches.width
- the width of the oval to be filled in inches.height
- the height of the oval to be filled in inches.public void fillPolygon(double[] xPoints, double[] yPoints, int nPoints)
This method draws the polygon defined by nPoint
line
segments, where the first nPoint - 1
line segments are line segments from
(xPoints[i - 1], yPoints[i - 1])
to (xPoints[i], yPoints[i])
, for
1 ≤ i ≤ nPoints
.
The figure is automatically closed by drawing a line connecting
the final point to the first point, if those points are different.
The area inside the polygon is defined using an even-odd fill rule, also known as the alternating rule.
xPoints
- a an array of x
coordinates in inches.yPoints
- a an array of y
coordinates in inches.nPoints
- a the total number of points.public void fillRect(double x, double y, double width, double height)
x
and x + width - 1
.
The top and bottom edges are at
y
and y + height - 1
.
The resulting rectangle covers an area
width
inches wide by
height
inches tall.
The rectangle is filled using the graphics context's current color.
x
- the x coordinate
of the rectangle to be filled in inches.y
- the y coordinate
of the rectangle to be filled in inches.width
- the width of the rectangle to be filled in inches.height
- the height of the rectangle to be filled in inches.public void fillRoundRect(double x, double y, double width, double height, double arcWidth, double arcHeight)
x
and x + width
,
respectively. The top and bottom edges of the rectangle are at
y
and y + height
.
x
- the x coordinate of the rectangle to be drawn in inches.y
- the y coordinate of the rectangle to be drawn.width
- the width of the rectangle to be drawn in inches.height
- the height of the rectangle to be drawn in inches.arcWidth
- the horizontal diameter of the arc
at the four corners in inches.arcHeight
- the vertical diameter of the arc
at the four corners in inches.public void setClip(double x, double y, double width, double height)
x
- the x coordinate of the new clip rectangle in inches.y
- the y coordinate of the new clip rectangle in inches.width
- the width of the new clip rectangle in inches.height
- the height of the new clip rectangle in inches.public void setColor(java.awt.Color aColor)
aColor
- the new rendering color.public void setFont(java.lang.String fname, int style, double size)
fname
- the font name.style
- the style constant for the Font. The style argument is an integer bitmask that may be PLAIN, or a bitwise union of BOLD and/or ITALIC (for example, ITALIC or BOLD|ITALIC). If the style argument does not conform to one of the expected integer bitmasks then the style is set to PLAIN.size
- the size of the Font in inchespublic void setPaintMode()
public void setXORMode(java.awt.Color aColor)
When drawing operations are performed, pixels which are the current color are changed to the specified color, and vice versa.
Pixels that are of colors other than those two colors are changed in an unpredictable but reversible manner; if the same figure is drawn twice, then all pixels are restored to their original values.
aColor
- the XOR alternation colorpublic void setMedia(java.lang.String media)
media
- the paper size like "A4", "B4".public void setOri(java.lang.String ori)
ori
- the page orientation, either "landscape" or "portrait".public void setPrinter(java.lang.String printer)
printer
- the destinationpublic void setCopy(int c)
c
- the number of copiespublic void setHeader(java.lang.String display, java.lang.String fontName, int fontStyle, double fontSize)
display
- the string to printfontName
- font namefontStyle
- the style constant for the Font. The style argument is an integer bitmask that may be PLAIN, or a bitwise union of BOLD and/or ITALIC (for example, ITALIC or BOLD|ITALIC). If the style argument does not conform to one of the expected integer bitmasks then the style is set to PLAIN.fontSize
- font size in inches.public void setHeader(java.lang.String display, java.lang.String fontName, int fontStyle, double fontSize, double x, double y, double w, int align)
display
- the string to printfontName
- font namefontStyle
- the style constant for the Font. The style argument is an integer bitmask that may be PLAIN, or a bitwise union of BOLD and/or ITALIC (for example, ITALIC or BOLD|ITALIC). If the style argument does not conform to one of the expected integer bitmasks then the style is set to PLAIN.fontSize
- font size in inches.x
- the x coordinate to draw.y
- the y coordinate to draw.w
- the width(height) of the head to draw.align
- alignment of the head.LEFT
,
RIGHT
,
BOTH
,
CENTER
,
SPREAD
,
VERTICAL
,
VBOTH
,
VSPREAD
,
VCENTER
public void setFooter(java.lang.String display, java.lang.String fontName, int fontStyle, double fontSize)
display
- the string to printfontName
- font namefontStyle
- the style constant for the Font. The style argument is an integer bitmask that may be PLAIN, or a bitwise union of BOLD and/or ITALIC (for example, ITALIC or BOLD|ITALIC). If the style argument does not conform to one of the expected integer bitmasks then the style is set to PLAIN.fontSize
- font size in inches.public void setFooter(java.lang.String display, java.lang.String fontName, int fontStyle, double fontSize, double x, double y, double w, int align)
display
- the string to printfontName
- font namefontStyle
- the style constant for the Font. The style argument is an integer bitmask that may be PLAIN, or a bitwise union of BOLD and/or ITALIC (for example, ITALIC or BOLD|ITALIC). If the style argument does not conform to one of the expected integer bitmasks then the style is set to PLAIN.fontSize
- font size in inches.x
- the x coordinate to draw.y
- the y coordinate to draw.w
- the width(height) of the head to draw.align
- alignment of the head.LEFT
,
RIGHT
,
BOTH
,
CENTER
,
SPREAD
,
VERTICAL
,
VBOTH
,
VSPREAD
,
VCENTER
public void newPage()
public void setLineWidth(double width)
width
- The line width, default is 1.1public void addTable(java.lang.String id, java.lang.String caption, double startx, java.lang.String[] column, double[] width, boolean[] wrap, int[] align)
id
- Table's idcaption
- Table's captionstartx
- left margin relative to current columncolumn
- Titles for each column. Set this to null for a customized header.width
- Widths for each column in inches.wrap
- wrap mode for each columm, true to wrap false to truncate.align
- Align style for each column.LEFT
,
RIGHT
,
BOTH
,
CENTER
,
SPREAD
public void closeTable(java.lang.String id)
id
- Table's idpublic void addTableHeadCell(java.lang.String id, java.lang.String title, int x, int y, int w, int h, int align)
id
- Table's idtitle
- string to display in the cellx
- row coordiate from up left corner for this cell.y
- column coordiate from up left corner for this cell.w
- how may columns the cell will occupy.h
- how may rows the cell will occupy.align
- an integer specify the alignmemt modeLEFT
,
RIGHT
,
BOTH
,
CENTER
,
SPREAD
public void addRowCell(java.lang.String id, java.lang.String title, int x, int y, int w, int h, int align)
id
- Table's idtitle
- string to display in the cellx
- row coordiate from up left corner for this cell.y
- column coordiate from up left corner for this cell.w
- how may columns the cell will occupy.h
- how may rows the cell will occupy.align
- an integer specify the alignmemt modeLEFT
,
RIGHT
,
BOTH
,
CENTER
,
SPREAD
public void closeRow(java.lang.String id)
id
- Table's idpublic void setTableBorder(java.lang.String id, boolean on)
id
- Table's idon
- true to print border, false not to printpublic void setPageColumn(double[][] p)
p
- array of (x,y,width,height) indicates each column's (x,y) and (width, height) in inches.public void drawParagraph(java.lang.String s, int style)
s
- string to be printedpublic void drawParagraph(java.lang.String s)
s
- string to be printedpublic void addRow(java.lang.String id, java.lang.String[] data)
id
- Table's iddata
- row data. If data.length > columns of the table, then ArrayOutOfBoundException will be thrown.public void addRow(java.lang.String id, java.lang.String data)
id
- Table's iddata
- row data. Default column seperator is | , row seperator is ; or new linepublic void preview()
public void zoom(int dots)
dots
- The dots per inches. Default is 72. You may set a larger number for dots to have a detailed view.public void print(int pageNum)
public void print(int[] pageNum)
public void print(boolean[] f)
public void print()
public void print(boolean background)
background
- false to invoke a print job dialog, true for background mode print.public void save(java.io.File f)
f
- destination File to save commandsload(java.io.ObjectInputStream)
public void save(java.io.ObjectOutputStream oos)
oos
- destination for commandsload(java.io.ObjectInputStream)
public void load(java.io.ObjectInputStream ois)
ois
- source of commmandspublic void load(java.io.File f)
f
- source of commmandspublic void setGridOn(boolean on)
on
- true to draw grid, false not to draw.public void setRowGap(java.lang.String tid, double gap)
tid
- Table's idgap
- true to draw grid, false not to draw. Default is 0.4protected void pageCreated(EasyPrint pb)
public java.awt.Dimension getPreferredSize()
public int getViewingPage()
public int getTotalPage()
public void viewPreviousPage()
public void viewNextPage()
public javax.swing.JComponent getPrintCanvas()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


Thanks for helping to map Toronto's History!
If you can determine exactly where the image was taken, click Locatable! and drag the marker to the right place on the map. You can use the search box to find named places ("High Park"), addresses ("140 Yonge") or cross streets ("Queens Quay and Bay"). If it's not clear where the image was taken or if the location is too general ("University of Toronto"), click Not Locatable. It's OK!
Feel free to go to the Archives site or to your favorite search engine to do extra sleuthing. And write anything interesting you notice or discover in the "Notes" box. Anyone from the Sidewalk Labs team would be thrilled to answer any questions. Thanks!!!
If there's only a single date, leave the "end" field blank. Only the year is important.
If there's only a range of dates ("1990-1995"), fill in both the start and end year fields.


|
ZOJ Problem Set - 1301
Mr. Black recently bought a villa in the countryside. Only one thing bothers him: although there are light switches in most rooms, the lights they control are often in other rooms than the switches themselves. While his estate agent saw this as a feature, Mr. Black has come to believe that the electricians were a bit absent-minded (to put it mildly) when they connected the switches to the outlets. One night, Mr. Black came home late. While standing in the hallway, he noted that the lights in all other rooms were switched off. Unfortunately, Mr. Black was afraid of the dark, so he never dared to enter a room that had its lights out and would never switch off the lights of the room he was in. After some thought, Mr. Black was able to use the incorrectly wired light switches to his advantage. He managed to get to his bedroom and to switch off all lights except for the one in the bedroom. You are to write a program that, given a description of a villa, determines how to get from the hallway to the bedroom if only the hallway light is initially switched on. You may never enter a dark room, and after the last move, all lights except for the one in the bedroom must be switched off. If there are several paths to the bedroom, you have to find the one which uses the smallest number of steps, where ``move from one room to another'', ``switch on a light'' and ``switch off a light'' each count as one step.
This line is followed by d lines containing two integers i and j each, specifying that room i is connected to room j by a door. Then follow s lines containing two integers k and l each, indicating that there is a light switch in room k that controls the light in room l. A blank line separates the villa description from the next one. The input ends with a villa having r = d = s = 0, which should not be processed.
If there is a solution to Mr. Black's problem, output the shortest possible sequence of steps that leads him to his bedroom and only leaves the bedroom light switched on. (Output only one shortest sequence if you find more than one.) Adhere to the output format shown in the sample below. If there is no solution, output a line containing the statement `The problem cannot be solved.' Output a blank line after each test case.
3 3 4 2 1 2 0 0 0
Villa #1 Villa #2 Source: Southwest Europe 1996 |


h1. Bootstrap heading

h2. Bootstrap heading

h3. Bootstrap heading

h4. Bootstrap heading

h5. Bootstrap heading

h6. Bootstrap heading

You can use the mark tag to highlight text.
This line of text is meant to be treated as deleted text.
This line of text is meant to be treated as no longer accurate.
This line of text is meant to be treated as an addition to the document.
This line of text will render as underlined
This line of text is meant to be treated as fine print.
This line rendered as bold text.
This line rendered as italicized text.

You can use the mark tag to highlight text.

This line of text is meant to be treated as deleted text.

<s>This line of text is meant to be treated as no longer accurate.</s>

This line of text is meant to be treated as an addition to the document.

This line of text will render as underlined

This line of text is meant to be treated as fine print.

This line rendered as bold text.

This line rendered as italicized text.

Lorem ipsum dolor sit amet, consectetur adipiscing elit.  Integer posuere erat a ante.

 Someone famous in Source Title


Work
Here’s a list of the things I have worked on or built recently:
RUBY
2012 Rstatus
Contributing back to this decentralised microblogging platform. Pulling upstream changes and pushing to my own hub here.
2011-2012 Unbound
Freelancing on Rails 3 build for UK startup revolving around online patronage of published and unpublished writers. The site has generated a large amount of press.
I have been involved in all aspects of the project from refactoring the original code provided by an agency, upgrading the application to Rails 3.1, introducing testing, advising on version control methodologies and development workflow, as well as day-to-day feature delivery.
2011-2012 Diaspora
Contributing to this open source project when I can and now also hosting a pod.
2011 Thimbl
Contributed to this decentralized social net experiment, one of many from the Berlin collective Telekommunisten - my name in the credits here.
2011 Lovefresh
Freelanced for a UK startup specialising in linking producers of fresh local food with consumers. Helped build the Rails component of their platform which also incorporates an iPhone app.
Technology: built in Rails 2.3.8 (upgrading to 3 soon) using TDD/BDD (Rspec/Webrat) and HAML on the templating side. Full HTML5 interface including audio elements.
DRUPAL
2011-2012 The Economist
Current daytime role working as part of the London team for Economist Online. Larger distributed team includes a development unit from Hungary based in the London office and teams in New York and Austin Texas.
This is a team running a finely tuned agile methodology with code reviews, unit testing and continuous integration. I’m on the SWAT team which is responsible for ongoing maintenance and delivery of new features on the Economist website. From a Drupal perspective, development is on the cutting edge, making extensive use of Drush and Features for automation and deployment on the Pressflow distribution.
2010-2011 Turner Broadcasting:
Worked as a freelance Drupal developer on a range of international media sites - mainly build and maintenance of custom modules running on Pressflow.
Adult Swim (where I encountered the singular Aqua Teen Hunger Force).
2010 Comic Relief
Worked as a freelance developer on the Sport Relief 2010 campaign from start to finish, culminating with the live event itself (providing support from BT Tower). Built custom modules for the Drupal site and was instrumental in rebuilding the web services layer which provided a back end for the donation system and the childrens and project maps sections (Flash front end, back end AMF).
2005 - 2009 Jellyfish Online Marketing
Senior developer in an agile team for a leading UK SEM company. Involved in rebuild of entire company platform from a stew of table-based magazine subscription sites without version control or proper development methodologies into a new platform incorporating sites built using MVC (specifically Codeigniter), version control (svn with branching and merging), agile methodology (Scrum), code reviews and pair programming.
Jellyfish boasts many high profile clients in its portfolio, including Skype, BBC, The Economist, National Geographic and Dennis Publishing.


Naruto Uzumaki
Dattebayo
I Want to become the Hokage.
I'll Love Ichiraku Ramen
My Favourite Jutsu Is Rasen - shuriken


An open source project for cloud-based processing of satellite imagery to support the earth sciences.
Project Matsu is a collaboration between NASA and the Open Cloud Consortium to develop open source technology for cloud-based processing of satellite imagery to support the earth sciences. Technology developed by the collaboration include:
You can learn more from these five minute videos introducing some Matsu tools.


| |
sieve←{
b←⍵⍴{∧⌿↑(×/⍵)⍴¨~⍵↑¨1}q←2 3 5
b[⍳6⌊⍵]←(6⌊⍵)⍴0 0 1 1 0 1
49≥⍵:b
p←(≢q)↓{⍵/⍳⍴⍵}∇⌈⍵*0.5
m←1+⌊(⍵-1+p×p)÷2×p
b ⊣ p {b[⍺×⍺+2×⍳⍵]←0}¨ m
}
| a. |
Why is 1 not a prime?
(Some older math texts say 1 is a prime.)
|
| b. |
Write a version of sieve that
checks its argument and result.
assert←{⍺←'assertion failure' ⋄ 0∊⍵:⍺ ⎕signal 8 ⋄ shy←0}
sieve_chk←{
b←sieve ⍵
assert(,⍵)≡⍴b:
assert∧/b∊0 1:
...
b
}
(1⊣sieve_chk)¨ ⍳10
(1⊣sieve_chk)¨ ¯1 0 1∘.+2 3 5 7 11 13 17 19*2
|
| c. |
The function pco from the dfns workspace performs various prime computations.
In particular, b←10 pco r,s
is a boolean vector such that r+b/⍳≢b
are the primes in the half-open interval [r,s) .
Check that pco is consistent
with sieve
(and that pco is self-consistent).
|
|


|
EECS 448 Project
4-Final
Spotify Recommendation System
|
Gathers, vets and creates a playlist for songs. More...
Functions | |
| def | populatePlaylist.filterDifference (songsDict, threshold=threshold) |
| filterDifference More... | |
Variables | |
| int | populatePlaylist.newSongCount = 100 |
| Minimum amount of new songs to add to playlist. | |
| int | populatePlaylist.threshold = 250 |
| Maximum weighted difference allowed for songs that make it into the list. | |
| populatePlaylist.user = config_obj.get_user() | |
| populatePlaylist.tester = REKTUser.User() | |
| populatePlaylist.weights = Variance.getNewWeight(tester.stdDevs) | |
| populatePlaylist.results = OrderedDict() | |
| populatePlaylist.songs = Recommender.fetch(user, tester.profile) | |
| populatePlaylist.newTrackIDs = filterDifference(results) | |
Gathers, vets and creates a playlist for songs.
This script strings together the process of gathering songs to process, computing the weighted differnce from average, and adding the least different songs to a playlist on the user's Spotify account. This script is called after updating the user's database in the run.py script
| def populatePlaylist.filterDifference | ( | songsDict, | |
threshold = threshold |
|||
| ) |
filterDifference
Simple helper function to filter out dictionary entries with differences beyond a threshold value
| songsDict | A dictionary of the form Spotify track ID: weighted feature differences |
| threshold | An optional parameter specifying the upper bound for the cum of the weighted feature differences |
This is a helper method used to filter a dictionary type. The input dictionary contains the weighted feature-wise difference of each track ID, the sum of which must be below the threshold for the song to be considered a match.


Introducing SAAR
Spatial data analysis (SDA) tools to efficiently handle and explore spatial data have become readily available. Although these SDA tools have their own strengths and purposes, they suffer from limited support in terms of a development environment offering easy customization and high extensibility, a strength of open source software.
This is a stand-alone software package for SDA in a geographic information systems (GIS) environment, called Spatial Analysis using ArcGIS Engine and R (SAAR), which provides an integrated GIS and SDA environment. A set of SDA tools in SAAR utilizes functions in R using R.NET, while other tools were developed in .NET independent of R.
SAAR provides an efficient working environment for both general and advanced GIS users. For general GIS users with limited programming skills, SAAR furnishes advanced SDA tools in a popular ArcGIS environment with graphical user interfaces. For advanced GIS users, SAAR offers an extensible GIS platform to help them customize and implement SDA functions with relatively little development effort.
Functions in SAAR
Functions available in SAAR are classified into the following three broad categories: basic GIS and geo- visualization; exploratory spatial data analysis (ESDA); and confirmatory spatial data analysis (CSDA).
| GIS and geovisualization | ESDA | CSDA |
|---|---|---|
|
|
|
For more detail, please see Koo et al. (2018) in Transactions in GIS
Reference
Koo, H., Chun, Y., and Griffith, D. A. (2018). Integrating spatial data analysis functionalities in a GIS environment: Spatial Analysis using ArcGIS Engine and R (SAAR). Transactions in GIS, 22(3), 721-736.
SAAR Download
System requirements
Update notes
ESF tool
If you do not have an ArcGIS license, the ESF tool can be alternative. This is a stand-alone software package mainly for Moran eigenvector spatial filtering (MESF) in a GIS environment, which is developed by integraing DotSpatial and R using R.NET. This software also supports other spatial statistical tools for linear regression and spatial regression, and furthemore spatially varying coefficients.


Investment Calculator
Shares:
Purchase Price:
Sell Price:
Buy Commission:
Sell Commission:
Calculate
Results:
Purchased for:
Sold for:
Result:


Typhoon Ramon still en route to Babuyan; LPA enters PAR
Typhoon Ramon (Kalmaegi) is 120 kilometers east of Calayan, Cagayan, while the low pressure area is 930 kilometers east of Guiuan, Eastern Samar, early Tuesday, November 19
by Acor ArceoSubscribe
Email Address
Newsletters
- Glenda Gloria's Take this Tuesday
- Huddle by Miriam Grace Go
- The Newsbreak Agenda by Chay Hofileña
- Sometimes, all you need is video by Lilibeth Frondoso


| Projects | Completed | View | Code | Description |
| Tiny Lisp Interpreter | Aug 20, 2017 |
github
| github
| in node.js
|
| Vogler Analog Computer | Jul 14, 2017 |
codepen |
codepen |
in jQuery
|
| Unknown Nim-Variation | Jul 1, 2017 |
codepen |
github |
in react.js |
| TicTacToe As Dynamic Webpage | Jun 24, 2017 |
codepen |
github |
in JavaScript |
| Build a Pinterest Clone | Jun 19, 2017 |
heroku |
github |
in node.js
|
| Manage a Book Trading Club | Jun 8, 2017 |
heroku
| github |
in node.js |
| Chart the Stock Market | May 31, 2017 |
heroku |
github |
in node.js |
| Build a Nightlife Coordination App | May 23, 2017 |
heroku |
github |
in node.js |
| Build a Voting App | May 13, 2017 |
heroku |
github |
in node.js |
| File Metadata Microservice | May 03, 2017 |
heroku |
github |
in node.js |
| Map Data Across the Globe | Apr 14, 2017 |
codepen |
codepen |
in d3.js |
| Nat. Contiguity with Force Directed Graph | Apr 12, 2017 |
codepen |
codepen |
in d3.js |
|
| Visualize Data with a Heat Map | Apr 10, 2017 |
codepen |
codepen |
in d3.js |
| Build a Roguelike Dungeon Crawler Game | Apr 03, 2017 |
github |
github |
in react.js |
| Build the Game of Life | Mar 27, 2017 |
codepen |
codepen |
in react.js |
| Build a Recipe Box | Mar 24, 2017 |
codepen |
codepen |
in JavaScript
|
| Build a Simon Game | Mar 20, 2017 |
codepen |
codepen |
in jQuery |


Books
These are some helpful and higly recommended books for web development.
These are some helpful and higly recommended books for web development.
Click on a technology
Jon Duckett's book was my first. It is a beautifully designed book filled with examples. He goes over HTML and CSS in great depth, carefully explaining each principle in full before moving on.
Jon Duckett's next book is as informative as the first. JavaScript & jQuery is an indepth book on the language and its most popular library. He'll take you through the basics of programming to techniques like AJAX.
JavaScript has had a very bumpy development, making it in some ways a very strange language. Douglas Crockford explains in this book, the good parts of JavaScript and how to write elegant and beautiful code.
Kyle Simpson gives us a more complete view of JavaScript. This book gives you the basic background in JavaScript programming that you'll need to go further into his series.
this and Object Prototypes walks you through the this keyword and the complexities of JavaScript objects. Like the other books in the series, this book encourages us to understand, rather than avoid, the more complicated parts of the language.
Scope and Closures covers the difficult concept of closures, how they work, how scope works with closures, and how to best take advantage of them.
Types and Grammer goes in depth about the various types in JavaScript. It discusses coercion and how these types can be confounding or useful.
Continuing the YDKJS series, Kyle Simpson covers the async and await abilities of JavaScript and goes over optimizing the language's performance.
This is a fantastic book for a resource.
This is a fantastic book for a resource.
This is a fantastic book for a resource.
This is a fantastic book for a resource.
Angular is a popular framework and this book teaches everything you need to know to master it. The book is straightforward and has you building apps within minutes. While it may have TypeScript in the title, the book does not assume experience with TypeScript.


During the third presidential debate, Trump says, “I don’t know Putin. I have no idea… I never met Putin. This is not my best friend.” Also during the debate he said, “I have nothing to do with Putin. I've never spoken to him.”
Source: The Independent (UK)


Next: Limitation and Advantages
Up: The Deblending Algorithm
Previous: Basics of the algorithm
Our solution is an iterative scheme to reduce the host contamination of the QSO spectrum in an empirical way as good as possible. When we subtract the scaled QSO spectrum
from each spaxel in the datacube during the initial iteration. The signal in the central spaxel of the residual datacube will then be
by design. Since the host galaxy emission is spatially extended, their normalised scale factors will be higher than that of the QSO and for all spaxels around the centre. Some level of host galaxy emission will therefore remain in the residual datacube around the QSO position. We define a certain region around the one used to construct the QSO spectrum, i.e. 8 spaxels around the central one or any other selection of spaxels that appears best suited, to extract a host galaxy spectrum
from the residual datacube. The idea is now to decontaminate the QSO spectrum
iteratively by subtracting the extracted host spectrum from the QSO spectrum
|
(5) |
Here, we have made the implicit assumption that host continuum and line emission follow the same light distribution , which is not necessarily true, but in most cases only can be constrained externally from broad-band images with an analytic profile. If no external information is available at all, the flux of the host galaxy spectrum needs to be extrapolated based on other assumption as discussed in the next paragraph.
In each of the subsequent iterations a cleaned QSO spectrum is created via
and subtracted from the initial datacube. After a few iterations (3-4) the QSO spectrum usually converges to a stable solution. We provide an illustration of the iterative process in Fig. 2, which also outlines the basic steps that can be summarised as follows:
- 1.
- Extraction of
from the IFU datacube (e.g. the spectrum of the brightest spaxel or a co-added spectrum over a few central spaxels).
- 2.
- Determination of based on the broad emission lines above the continuum.
- 3.
- Subtraction of
from the initial datacube.
- 4.
- Reconstruction of
by co-adding several spaxel from
and assuming some analytic distribution for and/or .
- 5.
- Decontamination of
with
.
- 6.
- Iterate steps 2-5 until the QSO spectrum converges.
Figure 2:
Illustration of the iterative deblending process used by QDeblend
.
|
Next: Limitation and Advantages
Up: The Deblending Algorithm
Previous: Basics of the algorithm
Bernd Husemann
2011-04-07


Adding a URL Link
How to insert a link to a URL located on another web site using the TelerikEditorProvider for the RTE.
- Highlight the text/object for the link - OR - Place you cursor where you want to insert the link.
- Click the Hyperlink Manager (CTRL + K) button. This opens the Hyperlink Manager with the Hyperlink tab pre-selected.
- In the URL text box, enter the URL address for this link.
- Optional. At Track Clicks, to track the number of clicks on this link - OR - to disable link tracking. Enabling this option will update the URL displayed in the URL field above.
- In the Link Text text box, enter/edit the text for this link. If you highlighted text at Step 1, then this field will be pre-populated with that text. Note: This field is not displayed when adding a link to an image.
- Optional. At Target, select the target window for this link.
- Optional. In the Tooltip text box, enter a tool tip to be displayed when a user places their mouse over this link.
- Optional. At CSS Class, select a class for the link - OR - Select Clear Class to use the default class.
-
Click the OK button confirm.


I am a software engineer currently doing my full stack course in Moringa School
I have always wanted to be a software engineer because I like the idea of making
software that can be used by different people in the world to solve their different needs
I also have a background in tech having graduated in Kabarak University in Information tecnology in 2019.
Other achievments inlcude:
| Name of the organisation | position |
|---|---|
| UN-World Food Program | Data Enumerator |
| Kenya National Bureau of Statistics | ICT-Supervisor |
| Nairobi City Water and Sewage Company | ICT Intern |
This is a website menu for Anita's Kitchen,
where customers can order their favourite in a more
modern way rather than the old booklets
learn more
languages used
This is a website about my favourite band One Direction
you will get to know the members and some of their best
Albums and songs
see more
languages used:
This is an e commerce website for requesting for laundry services learn more
languages used;


{Daemon, Configuration, Installer} = require ".."
util = require "util"
The command
module is loaded when the pow
binary runs. It parses
any command-line arguments and determines whether to install Pow’s
configuration files or start the daemon itself.
{Daemon, Configuration, Installer} = require ".."
util = require "util"
Set the process’s title to pow
so it’s easier to find in ps
,
top
, Activity Monitor, and so on.
process.title = "pow"
Print valid command-line arguments and exit with a non-zero exit
code if invalid arguments are passed to the pow
binary.
usage = ->
console.error "usage: pow [--print-config | --install-local | --install-system [--dry-run]]"
process.exit -1
Start by loading the user configuration from ~/.powconfig
, if it
exists. The user configuration affects both the installer and the
daemon.
Configuration.getUserConfiguration (err, configuration) ->
throw err if err
printConfig = false
createInstaller = null
dryRun = false
for arg in process.argv.slice(2)
Set a flag if –print-config is requested.
if arg is "--print-config"
printConfig = true
Cache the factory method for creating a local or system installer if necessary.
else if arg is "--install-local"
createInstaller = Installer.getLocalInstaller
else if arg is "--install-system"
createInstaller = Installer.getSystemInstaller
Set a flag if a dry run is requested.
else if arg is "--dry-run"
dryRun = true
Abort if we encounter an unknown argument.
else
usage()
Abort if a dry run is requested without installing anything.
if dryRun and not createInstaller
usage()
Print out the current configuration in a format that can be
evaluated by a shell script (eval $(pow --print-config)
).
else if printConfig
underscore = (string) ->
string.replace /(.)([A-Z])/g, (match, left, right) ->
left + "_" + right.toLowerCase()
shellEscape = (string) ->
"'" + string.toString().replace(/'/g, "'\\''") + "'" #'
for key, value of configuration.toJSON()
util.puts "POW_" + underscore(key).toUpperCase() +
"=" + shellEscape(value)
Create the installer, passing in our loaded configuration.
else if createInstaller
installer = createInstaller configuration
If a dry run was requested, check to see whether any files need to be installed with root privileges. If yes, exit with a status of 1. If no, exit with a status of 0.
if dryRun
installer.needsRootPrivileges (needsRoot) ->
exitCode = if needsRoot then 1 else 0
installer.getStaleFiles (files) ->
util.puts file.path for file in files
process.exit exitCode
Otherwise, install all the requested files, printing the full path of each installed file to stdout.
else
installer.install (err) ->
throw err if err
Start up the Pow daemon if no arguments were passed. Terminate the process if the daemon requests a restart.
else
daemon = new Daemon configuration
daemon.on "restart", -> process.exit()
daemon.start()


Revelstoke Ski Resort
Revelstoke ski resort is a difficult and hardcore resort located deep in the BC rockies. The town is far and isolated from all major cities making this a destination resort. This resort is not family focused. There are few activities outside of the resort. Revelstoke townsite is not well developed. This makes this a purly skiing destination.


International Workshop on Runtime and Operating Systems for Supercomputers
Washington, D.C., USA, June 27, 2017
Outline
Application Challenges and Motivation
Telemetry as HPC Platform Service
Context Graph Model
Interaction and Interface
Prototype
Discussion
Definition
HPC Telemetry Data
Any data that describes the state of an HPC platform and the state of
the process-based representation of the applications running on it.
1
Application Challenges & Motivation
A Normal Day at the Office
Strange runtime distribution of homogeneous tasks
Finding the Culprint
Added logging to the application to understand where time is spent
Some tasks spent 10x longer downloading input dataset
A faulty edge switch caused external connectivity issues on some nodes
Introduced helper tasks that collect process-level metrics
Some tasks spent a hughe amount of time in IO Wait
A strange problem with Lustre caused slow filesystem I/O on a small set of nodes
Another Intresting Case
Again, an unexpected runtime distribution of supposedly
homogeneous simulation tasks
Finding the Culprint
Used the same instrumentation strategy
Outlier tasks run out of memory and stall
Specific structural properties of the input data would cause the
algorithm to take a different trajectory
Consequences
We encountered unexpected "dynamic behavior", both on the system as well
as on the application side
Knowing that these are no edge cases, we started making
our "debugging" approach a more vital part of the application framework:
Collecting process- and OS-level information during all runs
Applying simple adaptive strategies to mitigate issues at runtime:
Blacklist 'weird' nodes
Reducing the task-packing (preempt other tasks on the node) when
memory usage exceeds threshold
Experience & Lessons Learned
Instrumetation requires a lot of effort
Collecting and analysing data (at scale) is non-trivial
Interpreting and feeding the data to the application is difficult
Existing tooling is sparse and mostly geard toward post-mortem,
parallel code debugging
Without knowing and understanding the platform "anatomy" and context, data
can be difficult to interpret, e.g., what is considered "poor" I/O,
what is the spatial layout of processes across nodes?
Experience & Lessons Learned cont.
Application-specific instrumentation is wide spread technique to mitigate heterogeneity, dynamic behavior, etc.
Adressing the issue is expensive, but ignoring it can be expensive, too:
2
Telemetry as HPC Platform Service
Status Quo: Application-Driven
Application-level collection and processing of telemtry data can cause a lot of overhead.
Platform Service Approach
Telemetry service takes over data collection and provides data access and higher-level functions to applications
Requirements
Captures the time-variant physicla anatomy and
properties of applications
Captures the time-variant anatomy and
properties of the HPC platform
Describes the mapping between the two (contex!)
Allows for arbitrary levels of detail
Provides programmatic access to the data
Allows offloading data analytics, e.g. extracting trends from streams of raw data
Has notifications capabilities
Requirements cont.
Keeps historic data (possibly in condensed form)
Is deployable at scale (think exascale!)
Consistent across platforms
3
Context Graph Model
Graph-Based Model
Provides the context in which time-series can be embedded
We use attributed graphs to describe entities and their relationships
Graphs provide a intuitive way to model arbitrary levels of complexity
A single context graph (CG) captures the connections between the
platform anatomy (sub-)graph (PAG) and the application anatomy
(sub-)graphs (AAG)
Spatial-Temporal Dynamics
Anatomy and structure of platform and applications is not static:
Application process start and stop
Nodes appear and disappear
Hardware (e.g., GPUs or FPGAs) is added
...
All nodes and edges have timestamps that qualify their existence
To get a snapshot of the platform and applications at a
specific point in time, the graph can be queried for a specific
time or time range


Examples of Basic JNIPort
This section is an example of using the lowish-level interfaces of package 'CU Java Base',
which are described here.
We read a .ZIP file using Java's zip file handling classes.
A parallel example uses the higher-level
facilities provided by automatic wrapper generation (and especially, ghost classes)
to perform the same tasks.
One general point about this example: we use the low-level methods directly
throughout, which is certainly not how you would use them in practice. The better
way is to define wrapper classes and provide convenient Smalltalk-style methods
that are built on top of the low-level API. In fact you'd probably want to use
the Wrapper Wizard to help with this, rather than do it all by hand.
Ensure that a JMV is running, and open a new workspace. We start,
as always, by getting a reference to the JVM object:
jvm := JVM current.
Now we need to get a reference to the class static standing for the Java class,
java.util.zip.ZipFile :
zfClass := jvm findClass: #'java.util.zip.ZipFile'.
Now we'll open a ZIP file. For this example, we'll use the DolphinJNIHelper.zip file
that should be in the Metagnostic\Extras folder. Use the file dialog to find that file:
zfName := FileOpenDialog showModal.
Now we create a new ZipFile object from that filename, this will be equivalent to the Java code:
String zfName = // whatever;
java.util.zip.ZipFile zipfile = new java.util.zip.ZipFile(zfName);
At the level of this API, we have to build an argument array explicitly. First we convert
the Smalltalk String to a Java String, then allocate a JNIValueArray
big enough to hold 1 argument, and add the string to it. It is vitally
important that we keep a separate reference to the Java string, because the argument
array (which is a kind of ExternalStructure ) does not
do so itself. (If you start getting inexplicable NullPointerExceptions
then it's quite probably because you've forgotten this point.)
zfName := zfName asJavaString: jvm.
args := (JNIValueArray new: 1)
objectAt: 1 put: zfName;
yourself.
Now we want to call the constructor. All references to Java methods (and fields, in fact)
must have a “signature” string (necessary because Java allows method overloading).
The signature for a constructor that takes a String argument is '(Ljava/lang/String;)V'. For
an explanation of this odd construction, see the rules for
forming signatures. Once we have worked out the proper signature, we can use that and the
argument vector to call the constructor:
sig := '(Ljava/lang/String;)V'.
zipfile := zfClass callConstructorSignature: sig withArguments: args.
If there are no arguments to the constructor, then a simpler form can be used (since the
signature is necessarily '()V'), the method is #callConstructor .
We may as well find out how many entries there are in the ZIP file, in this case the Java
method takes no arguments and returns an int so we can use a
pre-packaged shortcut to avoid messing with signatures:
zipfile callIntMethod: 'size'.
"--> 6"
Now we'll iterate over the elements of the ZipFile; we start by getting the Java
java.util.Enumeration iterator. In this case we have to
provide a signature:
sig := '()Ljava/util/Enumeration;'.
entries := zipfile callObjectMethod: 'entries' signature: sig.
The entries object is an instance of some Java class
that implements the java.util.Enumeration interface, (for
some reason, ZipFile returns a Enumeration
rather than the newer Iterator ); it is actually an instance
of some inner class in ZipFile (so its class name is something like
“java.util.zip.ZipFile$2”). It has the Java methods
hasMoreElements() and
nextElement() that are guaranteed by the interface.
So we could iterate over the entries with a loop like:
entries := zipfile callObjectMethod: 'entries' signature: sig.
[entries callBooleanMethod: 'hasMoreElements'] whileTrue:
[| next |
next := entries callObjectMethod: 'nextElement'.
Transcript display: next; cr].
Which is ugly, even though we can take advantage of the shortcut method
#callObjectMethod: which “knows” that
the signature is '()Ljava/lang/Object'.
JNIPort comes with a better way to iterate over a
Enumeration (or an Iterator ).
Sending #asAnEnumeration (or
#asAnIterator ) to the
entries object will answer an adaptor that implements
the basics of the <ReadableStream> protocol. You can then
use the common Smalltalk iteration style:
entries := (zipfile callObjectMethod: 'entries' signature: sig)
asAnEnumeration.
[entries atEnd] whileFalse:
[Transcript display: entries next; cr].
or, if you prefer:
entries := zipfile callObjectMethod: 'entries' signature: sig.
entries asAnEnumeration do:
[:each | Transcript display: each; cr].
which is marginally more efficient than the explicit loops, since it avoids repeatedly
looking up the method names/signatures.
By the way, the adaptor object only implements a small part of the Smalltalk
<ReadableStream> protocol. You can get a more complete implementation
by either writing the other wrapper methods yourself <grin> or by
asking for a further level of adaptor by sending
#asReadStream .
Now to read one of the files from inside the ZipFile. We start by getting the
appropriate ZipEntry, this will be the equivalent of the Java code:
java.util.zip.ZipEntry entry
= zipfile getEntry("DolphinJNIHelper/DolphinJNIHelper.h");
The signature in this case is '(Ljava/lang/String;)Ljava/util/zip/ZipEntry;',
and we also have to build another argument array, so the code is:
sig := '(Ljava/lang/String;)Ljava/util/zip/ZipEntry;'.
name := 'DolphinJNIHelper/DolphinJNIHelper.h' asJavaString: jvm.
args := (JNIValueArray new: 1)
objectAt: 1 put: name;
yourself.
entry := zipfile
callObjectMethod: 'getEntry'
signature: sig
withArguments: args.
By now, you should have a very clear idea of why I wrote the wrapper generation
features.
If you check the Java documentation then you'll see that you can ask
the ZipEntry for a fair raft of data. What you can't do is get the contents of
the file, for that you have to go back to the ZipFile (that's just the way the
Java class is designed), so:
sig := '(Ljava/util/zip/ZipEntry;)Ljava/io/InputStream;'.
args := (JNIValueArray new: 1)
objectAt: 1 put:entry;
yourself.
stream := zipfile
callObjectMethod: 'getInputStream'
signature: sig
withArguments: args.
This answers an object that is of some subclass of
java.io.InputStream . Because there is a registered
wrapper class for InputStream , actually
JavaIoInputStream , the stream
object will be an instance of some subclass of that. The mismatch between Java's IO
design and Smalltalk's is quite bad, and I haven't been able to create a completely
Smalltalk-flavoured interface to Java streams, however you can ask the stream for
its #upToEnd (you can't use
#contents because that requires a positionable stream
and Java's streams aren't arbitrarily seekable). Since the stream in question is
binary, the answered collection will be a ByteArray .
So we can get the contents of the file by saying:
bytes := stream upToEnd.
Transcript nextPutAll: bytes asString; flush.
That's almost the end of the example. We may as well clean up properly, though:
zipfile callVoidMethod: 'close'.
Finally, to see an example of what happens when Java code throws exceptions,
try getting a ZipEntry again now that the ZipFile has been closed:
sig := '(Ljava/lang/String;)Ljava/util/zip/ZipEntry;'.
name := 'xxx' asJavaString: jvm.
args := (JNIValueArray new: 1)
objectAt: 1 put: name;
yourself.
entry := zipfile
callObjectMethod: 'getEntry'
signature: sig
withArguments: args.
Which should give a normal Smalltalk walkback. You can trap the error in various
ways, one is:
[zipfile callObjectMethod: 'getEntry' signature: sig withArguments: args]
on: JavaException
do: [:err | err notify].
Another:
exClass := jvm findClass: #'java.lang.IllegalStateException'.
[zipfile callObjectMethod: 'getEntry' signature: sig withArguments: args]
on: exClass
do: [:err | Transcript display: 'Too bad'; cr].
|


{# created by Chirath R<EMAIL_ADDRESS>{% load static %}
Foss@Amrita is a club where you spend time to learn more about software
development and write excellent code.
Click here to join the club.
This club gives solid training to the students in the basics of computer science and hence students are able to excel.
There are lots of skills you don't get to learn in the classrooms. Here we emphasise starting from basics such as how to type correctly and to gain speed, writing code, ability to read large code base (more than 1000s of lines of code) and debugging, making presentations and many more…
This club is pretty informal and is operational from 2007. The alumni of the club are all over the world and in top companies as well such as Cisco, Amazon, Flipkart, Google, VMWare etc. As members of the club you get some guidance from the alumni at a later point of time as well. Also there are many who are doing PhD or Masters in reputed universities all over the world. Students from the club has got various opportunities such as doing paid internships in New Zealand, Israel, US and Europe. Our students are also invited for talks all over the world, invited to deliver workshops in IITs and many more.
You may be aware that our FOSS club has one of the largest number of Google Summer of Code Interns in India. We are getting better and better every year.
We have a lot of fun in the club!
The club is open for students from all branches. There is no particular test or anything for entry. Therefore we have a big problem identifying those that are really serious in working.
You don't need to have any prior experience or knowledge.Only one condition, the ability to work really hard to improve yourself. Work on the tasks below, and when you are ready.
Click here to apply for the club membership.
We are a group of passionate students who work hard to attain our dreams. If you are interested in joining the club, please click the button below.
Join Us


Definition at line 88 of file CGeomCompiler.h.
Public Attributes | |
| std::vector< int > | vertex |
| Vertices that make up this polygon. In drawing order. | |
| std::vector< int > | texcoord |
| Texture coordinates associated with the vertices. | |
| std::vector< int > | edge |
| Edges that make up this polygon. | |
| CPlane | plane |
| CVector | center |
| void * | data |
| Custom data field. |


Welcome to ev-reduce’s documentation!¶
Description¶
The framework is a flexible tool to define event sources, handlers of events, and produce an action from a handler
Event source emits an event. Event = (type, event_data)
All reducers that listen to event type got called and passed (event, global_data).
The reducers map events to an action based on current data. they also modify data and return (action, data)
The action is (label, action_data). It is passed to every action handler.
Testing¶
run python setup.py test
for testing
Module docs¶
-
class
evv3.
SyncModel
¶ This model is the very basic implemetation of ev-reduce api. The event generators are merged into a single generator and for every event a corresponding reducer is called.
Everything is going on in a single thread
-
add_actor
(act)¶ Add an actor that will be called after every reducer rerturns an action
- Parameters
act (callable) – a callable that takes Action and returns None if the action succeded. Otherviwse an ev-red.Error event will be fired with data returned
-
add_reducer
(reducer, subscribe=[])¶ Add a reducer that subscribes to events
- Parameters
reducer (callable) – a callable that takes event and data and returns action and modified data.
subscribe (list) – list of tokens that specify type of event to which the reducer will be called
-
add_source
(src)¶ Add a generator of events
- Parameters
src (generator) – a generator that yields an Event
-
start
()¶ Start execution
-


Problem 1. Numbers
Write a script that prints all the numbers from 1 to N.
Please enter N:
(Result...)
Write a script that prints all the numbers from 1 to N.
(Result...)
Write a script that prints all the numbers from 1 to N, that are not divisible by 3 and 7 at the same time
(Result...)
Write a script that finds the max and min number from a sequence of numbers.
(Result...)
(Result...)
Write a script that finds the lexicographically smallest and largest property in document, window and navigator objects.
(Result...)
(Result...)
(Result...)


--- layout: default title: Books description: Books published by the members of the iMED Lab. keywords: book, time-frequency, s-transform, energy concentration, classification, extraction ---
Legend: PA – Principal Author; SRA - Senior Responsible Author; CPA - Co-Principal Author; CA – Contributing Author


70 sovereigns of jewels stolen
by Special CorrespondentRamanathapuram
A three-member gang has burgled a locked house at Theruvakottai village under Thiruvadanai police limit in the early hours of Sunday and decamped with 70 sovereigns of jewels and cash of ₹ 15,000.
Police said Sarada, 58, who was living alone in the house after her husband had gone abroad for employment, went to Madurai on Saturday to visit a relative when the gang entered the house by bending and removing irons rods in a window.
They broke open an almirah and decamped with the jewels and cash kept in a cloth bag, police said. After noticing some unusual noise, neighbours came out around 3 a.m. when the burglars broke open the front door and escaped on a two-wheeler.
Deputy Superintendent of Police Pugazhendi Ganesh visited the spot and launched an investigation. Police pressed a sniffer dog into service and a technical team to lift finger prints. Special teams were formed to crack the case, police said.


PREDICTIVE MAINTENANCE OF AFV ENGINE
VIBRATION: $VIBRATION ((m/s
2
)
2
)
COOLANT TEMP: $COOLENTTEMP℃
OIL PRESSURE: $OILPRESSURE Kg/cm
2
THE PREDICTED ENGINE HRS OF TANK IS: $PREDICTED WHILE THE REAL ENGINE HRS IS: $REAL
REMAINING USEFUL ENGINE LIFE IS: $REMAINING
THE TANK IS $HEALTH
BACK


A Class used for running experiments.
More...
#include <ioh/experiment.hpp>
template<typename ProblemType>
class ioh::Experimenter< ProblemType >
A Class used for running experiments.
- Template Parameters
-
| ProblemType | The type of the problems used in the experiments, needs to be a subclass of ioh::problem::Problem. |
◆ Experimenter()
template<typename ProblemType >
Constructs an Experimenter object from a Suite object and an Logger object.
- Parameters
-
| suite | A suite object |
| logger | A csv logger object |
| algorithm | a function pointer of type Algorithm |
| independent_runs | the number of repetitions default = 1 |
◆ independent_runs()
template<typename ProblemType >
Set's the number of independent runs to be used in run.
- Parameters
-
◆ logger()
template<typename ProblemType >
Get method for.
- Returns
- Private
◆ suite()
template<typename ProblemType >
Get method for suite_
- Returns
- Private
suite_
◆ operator<<
template<typename ProblemType >
| std::ostream& operator<< |
( |
std::ostream & |
os, |
|
|
const Experimenter< ProblemType > & |
obj |
|
) |
| |
|
friend |
Prints a verbose representation of an Experimenter object to an output stream.
- Parameters
-
- Returns
- The output steam
The documentation for this class was generated from the following file:


{{< layout2}} {{$pageTitle}}Photo uploaded{{/pageTitle}} {{$header}}
We’ll check it manually. We may ask for another photo if something doesn’t look right.
If your customer isn't happy with this photo, check another photo.


{% include('snippets/head.html') %}
This is a basic fixed menu template using fixed size containers.
A text container is used for the main container, which is useful for single column layouts
| Organizações | Header | Header |
|---|---|---|
| {{organization['display_name']|safe}} | Cell | Cell |


The Staff Team
The staff team of MyServer is experienced, professional, and here to give you the best experience on our server. The two owners are BlexieKing and Bae4lyfe; they're dedicated to giving you the best time on the server as possible. The owners work closely with the rest of the staff team. You'll see us online and can join with the IP "play.myserver.net".
Our Skills
Staff Management
78%
Java Development
96%
Web Development
98%


Watch Live: Fourth Public Democrat Impeachment Inquiry Hearing | Breitbart
House Democrats will hold the fourth public hearing of their impeachment inquiry on Tuesday with the testimonies of Ambassador Kurt Volker, former U.S. special envoy to Ukraine; and Mr. Tim Morrison, former special assistant to the President and senior director for Europe and Russia, National Security Council.
by Amanda HouseThe House Intelligence Committee hearing, chaired by Adam Schiff (D-CA), is set to begin at 2:30 p.m. Eastern and follows an earlier hearing Tuesday which featured the testimonies of Ms. Jennifer Williams, special advisor for Europe and Russia, Office of the Vice President; and Army Lt. Col. Alexander Vindman, director for European Affairs, National Security Council.
Watch Tuesday’s first hearing below:


public final class SplittableRandom extends Object
SplittableRandom
supports methods for
producing pseudorandom numbers of type int
, long
,
and double
with similar usages as for class
Random
but differs in the following ways:
split()
constructs and returns a new
SplittableRandom instance that shares no mutable state with the
current instance. However, with very high probability, the
values collectively generated by the two objects have the same
statistical properties as if the same quantity of values were
generated by a single thread using a single SplittableRandom
object. fork/join-style
computation using random numbers might include a
construction of the form new
Subtask(aSplittableRandom.split()).fork()
.
stream.parallel()
mode.Instances of SplittableRandom
are not cryptographically
secure. Consider instead using SecureRandom
in security-sensitive applications. Additionally,
default-constructed instances do not use a cryptographically random
seed unless the system property
java.util.secureRandomSeed
is set to true
.
| Constructor and Description |
|---|
SplittableRandom()
Creates a new SplittableRandom instance that is likely to
generate sequences of values that are statistically independent
of those of any other instances in the current program; and
may, and typically does, vary across program invocations.
|
SplittableRandom(long seed)
Creates a new SplittableRandom instance using the specified
initial seed.
|
| Modifier and Type | Method and Description |
|---|---|
DoubleStream |
doubles()
Returns an effectively unlimited stream of pseudorandom
double values from this generator and/or one split from it; each value
is between zero (inclusive) and one (exclusive). |
DoubleStream |
doubles(double randomNumberOrigin,
double randomNumberBound)
Returns an effectively unlimited stream of pseudorandom
double values from this generator and/or one split from it; each value
conforms to the given origin (inclusive) and bound (exclusive). |
DoubleStream |
doubles(long streamSize)
Returns a stream producing the given
streamSize number of
pseudorandom double values from this generator and/or one split
from it; each value is between zero (inclusive) and one (exclusive). |
DoubleStream |
doubles(long streamSize,
double randomNumberOrigin,
double randomNumberBound)
Returns a stream producing the given
streamSize number of
pseudorandom double values from this generator and/or one split
from it; each value conforms to the given origin (inclusive) and bound
(exclusive). |
IntStream |
ints()
Returns an effectively unlimited stream of pseudorandom
int
values from this generator and/or one split from it. |
IntStream |
ints(int randomNumberOrigin,
int randomNumberBound)
Returns an effectively unlimited stream of pseudorandom
int values from this generator and/or one split from it; each value
conforms to the given origin (inclusive) and bound (exclusive). |
IntStream |
ints(long streamSize)
Returns a stream producing the given
streamSize number
of pseudorandom int values from this generator and/or
one split from it. |
IntStream |
ints(long streamSize,
int randomNumberOrigin,
int randomNumberBound)
Returns a stream producing the given
streamSize number
of pseudorandom int values from this generator and/or one split
from it; each value conforms to the given origin (inclusive) and bound
(exclusive). |
LongStream |
longs()
Returns an effectively unlimited stream of pseudorandom
long values from this generator and/or one split from it. |
LongStream |
longs(long streamSize)
Returns a stream producing the given
streamSize number
of pseudorandom long values from this generator and/or
one split from it. |
LongStream |
longs(long randomNumberOrigin,
long randomNumberBound)
Returns an effectively unlimited stream of pseudorandom
long values from this generator and/or one split from it; each value
conforms to the given origin (inclusive) and bound (exclusive). |
LongStream |
longs(long streamSize,
long randomNumberOrigin,
long randomNumberBound)
Returns a stream producing the given
streamSize number of
pseudorandom long values from this generator and/or one split
from it; each value conforms to the given origin (inclusive) and bound
(exclusive). |
boolean |
nextBoolean()
Returns a pseudorandom
boolean value. |
double |
nextDouble()
Returns a pseudorandom
double value between zero
(inclusive) and one (exclusive). |
double |
nextDouble(double bound)
Returns a pseudorandom
double value between 0.0
(inclusive) and the specified bound (exclusive). |
double |
nextDouble(double origin,
double bound)
Returns a pseudorandom
double value between the specified
origin (inclusive) and bound (exclusive). |
int |
nextInt()
Returns a pseudorandom
int value. |
int |
nextInt(int bound)
Returns a pseudorandom
int value between zero (inclusive)
and the specified bound (exclusive). |
int |
nextInt(int origin,
int bound)
Returns a pseudorandom
int value between the specified
origin (inclusive) and the specified bound (exclusive). |
long |
nextLong()
Returns a pseudorandom
long value. |
long |
nextLong(long bound)
Returns a pseudorandom
long value between zero (inclusive)
and the specified bound (exclusive). |
long |
nextLong(long origin,
long bound)
Returns a pseudorandom
long value between the specified
origin (inclusive) and the specified bound (exclusive). |
SplittableRandom |
split()
Constructs and returns a new SplittableRandom instance that
shares no mutable state with this instance.
|
public SplittableRandom(long seed)
seed
- the initial seedpublic SplittableRandom()
public SplittableRandom split()
split()
method,
and the same expected statistical properties apply to the
entire set of generators constructed by such recursive
splitting.public int nextInt()
int
value.int
valuepublic int nextInt(int bound)
int
value between zero (inclusive)
and the specified bound (exclusive).bound
- the upper bound (exclusive). Must be positive.int
value between zero
(inclusive) and the bound (exclusive)IllegalArgumentException
- if bound
is not positivepublic int nextInt(int origin, int bound)
int
value between the specified
origin (inclusive) and the specified bound (exclusive).origin
- the least value returnedbound
- the upper bound (exclusive)int
value between the origin
(inclusive) and the bound (exclusive)IllegalArgumentException
- if origin
is greater than
or equal to bound
public long nextLong()
long
value.long
valuepublic long nextLong(long bound)
long
value between zero (inclusive)
and the specified bound (exclusive).bound
- the upper bound (exclusive). Must be positive.long
value between zero
(inclusive) and the bound (exclusive)IllegalArgumentException
- if bound
is not positivepublic long nextLong(long origin, long bound)
long
value between the specified
origin (inclusive) and the specified bound (exclusive).origin
- the least value returnedbound
- the upper bound (exclusive)long
value between the origin
(inclusive) and the bound (exclusive)IllegalArgumentException
- if origin
is greater than
or equal to bound
public double nextDouble()
double
value between zero
(inclusive) and one (exclusive).double
value between zero
(inclusive) and one (exclusive)public double nextDouble(double bound)
double
value between 0.0
(inclusive) and the specified bound (exclusive).bound
- the upper bound (exclusive). Must be positive.double
value between zero
(inclusive) and the bound (exclusive)IllegalArgumentException
- if bound
is not positivepublic double nextDouble(double origin, double bound)
double
value between the specified
origin (inclusive) and bound (exclusive).origin
- the least value returnedbound
- the upper bound (exclusive)double
value between the origin
(inclusive) and the bound (exclusive)IllegalArgumentException
- if origin
is greater than
or equal to bound
public boolean nextBoolean()
boolean
value.boolean
valuepublic IntStream ints(long streamSize)
streamSize
number
of pseudorandom int
values from this generator and/or
one split from it.streamSize
- the number of values to generateint
valuesIllegalArgumentException
- if streamSize
is
less than zeropublic IntStream ints()
int
values from this generator and/or one split from it.int
valuespublic IntStream ints(long streamSize, int randomNumberOrigin, int randomNumberBound)
streamSize
number
of pseudorandom int
values from this generator and/or one split
from it; each value conforms to the given origin (inclusive) and bound
(exclusive).streamSize
- the number of values to generaterandomNumberOrigin
- the origin (inclusive) of each random valuerandomNumberBound
- the bound (exclusive) of each random valueint
values,
each with the given origin (inclusive) and bound (exclusive)IllegalArgumentException
- if streamSize
is
less than zero, or randomNumberOrigin
is greater than or equal to randomNumberBound
public IntStream ints(int randomNumberOrigin, int randomNumberBound)
int
values from this generator and/or one split from it; each value
conforms to the given origin (inclusive) and bound (exclusive).randomNumberOrigin
- the origin (inclusive) of each random valuerandomNumberBound
- the bound (exclusive) of each random valueint
values,
each with the given origin (inclusive) and bound (exclusive)IllegalArgumentException
- if randomNumberOrigin
is greater than or equal to randomNumberBound
public LongStream longs(long streamSize)
streamSize
number
of pseudorandom long
values from this generator and/or
one split from it.streamSize
- the number of values to generatelong
valuesIllegalArgumentException
- if streamSize
is
less than zeropublic LongStream longs()
long
values from this generator and/or one split from it.long
valuespublic LongStream longs(long streamSize, long randomNumberOrigin, long randomNumberBound)
streamSize
number of
pseudorandom long
values from this generator and/or one split
from it; each value conforms to the given origin (inclusive) and bound
(exclusive).streamSize
- the number of values to generaterandomNumberOrigin
- the origin (inclusive) of each random valuerandomNumberBound
- the bound (exclusive) of each random valuelong
values,
each with the given origin (inclusive) and bound (exclusive)IllegalArgumentException
- if streamSize
is
less than zero, or randomNumberOrigin
is greater than or equal to randomNumberBound
public LongStream longs(long randomNumberOrigin, long randomNumberBound)
long
values from this generator and/or one split from it; each value
conforms to the given origin (inclusive) and bound (exclusive).randomNumberOrigin
- the origin (inclusive) of each random valuerandomNumberBound
- the bound (exclusive) of each random valuelong
values,
each with the given origin (inclusive) and bound (exclusive)IllegalArgumentException
- if randomNumberOrigin
is greater than or equal to randomNumberBound
public DoubleStream doubles(long streamSize)
streamSize
number of
pseudorandom double
values from this generator and/or one split
from it; each value is between zero (inclusive) and one (exclusive).streamSize
- the number of values to generatedouble
valuesIllegalArgumentException
- if streamSize
is
less than zeropublic DoubleStream doubles()
double
values from this generator and/or one split from it; each value
is between zero (inclusive) and one (exclusive).double
valuespublic DoubleStream doubles(long streamSize, double randomNumberOrigin, double randomNumberBound)
streamSize
number of
pseudorandom double
values from this generator and/or one split
from it; each value conforms to the given origin (inclusive) and bound
(exclusive).streamSize
- the number of values to generaterandomNumberOrigin
- the origin (inclusive) of each random valuerandomNumberBound
- the bound (exclusive) of each random valuedouble
values,
each with the given origin (inclusive) and bound (exclusive)IllegalArgumentException
- if streamSize
is
less than zeroIllegalArgumentException
- if randomNumberOrigin
is greater than or equal to randomNumberBound
public DoubleStream doubles(double randomNumberOrigin, double randomNumberBound)
double
values from this generator and/or one split from it; each value
conforms to the given origin (inclusive) and bound (exclusive).randomNumberOrigin
- the origin (inclusive) of each random valuerandomNumberBound
- the bound (exclusive) of each random valuedouble
values,
each with the given origin (inclusive) and bound (exclusive)IllegalArgumentException
- if randomNumberOrigin
is greater than or equal to randomNumberBound
Dracula Javadoc Sample, Made with Allan Im.


JetSeT is an open source C/Python framework to reproduce radiative and accelerative processes acting in relativistic jets, allowing to fit the numerical models to observed data. The main features of this framework are:
handling observed data: re-binning, definition of data sets, bindings to astropy tables and quantities definition of complex numerical radiative scenarios: Synchrotron Self-Compton (SSC), external Compton (EC) and EC against the CMB
Constraining of the model in the pre-fitting stage, based on accurate and already published phenomenological trends. In particular, starting from phenomenological parameters, such as spectral indices, peak fluxes and frequencies, and spectral curvatures, that the code evaluates automatically, the pre-fitting algorithm is able to provide a good starting model,following the phenomenological trends that I have implemented. fitting of multiwavelength SEDs using both frequentist approach (iminuit) and bayesian MCMC sampling (emcee)
Self-consistent temporal evolution of the plasma under the effect of radiative and accelerative processes, both first order and second order (stochastic acceleration) processes.
Important
Acknowledgements: if you use this code in any kind of scientific publication please cite the following papers:


KSI Lands Rick Ross & Lil Baby For "Down Like That"
The Boss and The Baby secure the vlogger bag.
by Mitch FindlayDown Like That
KSI Feat. Rick Ross & Lil Baby
Editor Rating: HOTTTTT
User Rating: n/a - 0% (0)
Once again, a YouTube star has linked up with some hip-hop heavyweights. Not entirely far removed from the much-maligned Jake Paul & Gucci Mane collaboration, KSI has united Lil Baby and Rick Ross to his musical cause. The end result is a decent, if not entirely spectacular dose of melodic rap, tinged ever-so-slightly with dubstep elements. For what it's worth, KSI sounds comfortable on an instrumental, kicking things off with some opening bars. "I’m cold with this, slow man down like Freezer," he spits. "Wanna backstab like Frieza, dictate death like Caesar."
Rick Ross slides through next, dropping off a brief and admittedly phoned-in verse. Still, it's never a bad thing to hear an update from this particular boss, whose presence and gravitas are statements in themselves. Lil Baby fares no better, capable though not exerting himself in the slightest. "My concierge don’t ever stop me," he raps.  While the track itself is fine, look for more excitement to pop off in KSI's upcoming boxing match with Logan Paul on November 9th.
Quotable Lyrics
I’m cold with this
Slow man down like Freezer
Wanna backstab like Frieza
Dictate death like Caesar
Always come through with a bee
Got to do a lot to trouble me


RiakUtils
public class RiakUtils
| Method Summary | |
|---|---|
| static void | buildRestPath(mixed client, mixed bucket, mixed key, mixed spec, mixed params) Given a RiakClient, RiakBucket, Key, LinkSpec, and Params, construct and return a URL. |
| static void | get_value(mixed key, mixed array, mixed defaultValue) |
| static void | httpRequest(mixed method, mixed url, mixed request_headers) Given a Method, URL, Headers, and Body, perform and HTTP request, and return an array of arity 2 containing an associative array of response headers and the response body. |
| static void | parseHttpHeaders(mixed headers) Parse an HTTP Header string into an asssociative array of response headers. |
public static void buildRestPath(mixed client, mixed bucket, mixed key, mixed spec, mixed params)
Given a RiakClient, RiakBucket, Key, LinkSpec, and Params, construct and return a URL.
public static void get_value(mixed key, mixed array, mixed defaultValue)
public static void httpRequest(mixed method, mixed url, mixed request_headers)
Given a Method, URL, Headers, and Body, perform and HTTP request, and return an array of arity 2 containing an associative array of response headers and the response body.
public static void parseHttpHeaders(mixed headers)
Parse an HTTP Header string into an asssociative array of response headers.
Utility functions used by Riak library.


This photo of Ambassador Sondland smirking for the cameras as he testifies before Congress perfectly sums up the impeachment hearing chaos
by Ashley Collman- A Washington Post photo of Ambassador Gordon Sondland testifying before the House on Wednesday in the impeachment hearings is gaining attention on social media.
- The photo shows Sondland smirking against a background of dozens of reporters angling for a picture of the ambassador.
- Sondland told the House panel that he was pressured to work with President Donald Trump's personal lawyer, Rudy Giuliani, to convince the Ukrainians to investigate Hunter Biden.
- Follow our live coverage of the hearing here.
- Visit Business Insider's homepage for more stories.
A Washington Post photo is gaining traction on social media for capturing the drama of President Donald Trump's impeachment hearings.
The photo shows Ambassador Gordon Sondland smirking at the camera, as a sea of photojournalists angle for a shot behind him.
One Twitter user compared it to famous photo of President Donald Trump, smiling to himself during a dinner at Mar-a-Lago.
Others came up with captions for the photo, imagining what Sondland was thinking to himself when the picture was taken.
"You're probably wondering why I paid a million dollars to be here," The Daily Show tweeted, referencing the idea that Sondland "bought" his ambassadorship.
Sondland is testifying before the house as part of President Trump's impeachment hearings.
He told the House panel on Wednesday that he was forced to work with the president's lawyer, Rudy Giuliani, to pressure the Ukrainians to conduct politically-motivated investigations in exchange for military aid and a White House visit.