ZoomWidget Class
Provides Pan/Zoom functionality.
Constructor
ZoomWidget
-
params
-
[params.zoomRange=[0.05,
Parameters:
-
params
ObjectConstructor parameters
-
canvas
Selector | ElementThe element to apply pan/zoom to.
-
viewport
Selector | ElementThe element that will act as the viewport for the canvas.
-
bind
FunctionFunction that can bind to an event on an element.
-
unbind
FunctionFunction that can unbind from an event on an element.
-
height
FunctionA function that can return the height for some element.
-
width
FunctionA function that can return the width for some element.
-
offset
FunctionA function that can return {left:.., top:..} for some element
-
id
FunctionA function that can return an id for some element.
-
[domElement]
Function optionalA function that can translate between objects referenced by the widget and DOM elements. It might be the case that no tranlation is required - you deal only in DOM elements. But also you might use this with jQuery, and pass around jQuery selectors. So this function just normalises elements. If not supplied, the default function assumes elements are already DOM elements.
-
[events]
Object optionalOptional map of event handlers
-
[zoom]
Function optionalOptional function callback for when zoom changes. -
[pan]
Function optionalOptional function callback for when pan changes. -
[mousedown]
Function optionalOptional function callback for mousedown event. -
[mouseup]
Function optionalOptional function callback for mouseup event. -
[mousemove]
Function optionalOptional function callback for mousemove event. -
[maybeZoom]
Function optionalOptional interceptor for zoom. Returning false prevents zoom from occurring. -
[transformOrigin]
Function optionalOptional function callback for transform origin change. This is given the [x,y] (in percent) of the new origin, and the [left, top] (in absolute values) of the canvas.
-
-
[clamp=true]
Boolean optionalWhether to clamp when panning such that there is always content visible.
-
[clampZoom=true]
Boolean optionalWhether to clamp when zooming such that there is always content visible.
-
[clampToBackground=false]
Boolean optionalWhether or not to clamp to the background image. This flag means the widget will always ensure at least some of the background is visible. See
clampToBackgroundExtents
for a variant of this. -
[clampToBackgroundExtents=false]
Boolean optionalClamps movement so that when zoomed out, the background image always fills the viewport.
-
[onBackgroundReady]
Function optionalOptional callback to hit when the background image has loaded.
-
[panDistance=50]
Number optionalHow far, in pixels, to pan on pan nudge.
-
[zoom=1]
Number optionalInitial zoom for the widget.
-
[enableWheelZoom=true]
Boolean optionalWhether or not wheel zoom is enabled.
-
[wheelFilter]
Function optionalOptional function to call to check if wheel zooming should be enabled for the current event target.
-
[wheelZoomMetaKey=false]
Boolean optionalIf true, the "meta" key (CMD on Mac, Ctrl on windows/linux) must be pressed in order for wheel zoom to operate. This can be useful if your UI fills the screen in one or more axes and your users would not be able to scroll past the Surface widget.
-
[enablePan=true]
Boolean optionalWhether or not pan is enabled.
-
[enablePanButtons=true]
Boolean optionalWhether or not wheel pan buttons are drawn and enabled.
-
[enableAnimation=true]
Boolean optionalEnable animations for panning. Defaults to true.
-
[enabled=true]
Boolean optionalWhether or not the widget is enabled, ie. responding to mouse input.
-
[background]
Object optionalOptional background image parameters
-
[url]
String optionalURL for the background. Required for both single images and tiled backgrounds. -
[type="simple"]
String optional"simple" or "tiled" - the type of background. -
[tileSize]
Number optionalFor tiled backgrounds, provides the width and height of tiles. Every tile is assumed to have these dimensions, even if the tile has whitespace in it. -
[width]
Number optionalRequired for tiled backgrounds. Indicates the width of the full image. -
[height]
Number optionalRequired for tiled backgrounds. Indicates the height of the full image. -
[maxZoom]
Number optionalRequired for tiled backgrounds. Indicates the maximum zoom level. Zoom starts at 0 - fully zoomed out - and increases in integer values from there. Eash successive zoom level is twice the zoom of the previous level, meaning two times as many tiles in each direction.
-
-
[filter]
Function optionalOptional filter that will be called on down event, with the event target and the event. Returning true from this function means the widget should respond to the event.
-
[padding]
Number optionalOptional values for padding in the x/y axes to leave around the content. This is only of any use if you have disabled panning via mouse drag, since in that case the user sees only scroll bars and has no way of navigating beyond the content. Some padding makes the UI nicer to use. Default is [0,0].
-
[consumeRightClick=true]
Boolean optionalUseful for development: set this to false if you don't want the widget to consume context menu clicks.
-
[smartMinimumZoom=false]
Boolean optionalMeans that the lower zoom bound refers to a multiple of the content bounds, not the viewport.
-
-
[params.zoomRange=[0.05,
Number3] ] Zoom range for the widget.
Item Index
Methods
- add
- alignBackground
- applyZoomToElement
- centerBackground
- centerContent
- centerContentHorizontally
- centerContentVertically
- centerOn
- centerOnAndZoom
- centerOnHorizontally
- centerOnHorizontally
- findIntersectingNodes
- findNearbyNodes
- fixElement
- getApparentCanvasLocation
- getBoundsInfo
- getElementPositions
- getPan
- getTransformOrigin
- getViewportCenter
- getZoom
- getZoomRange
- isInViewport
- mapEventLocation
- mapLocation
- nudgeWheelZoom
- nudgeZoom
- pageLocation
- pan
- positionChanged
- positionElementAt
- positionElementAt
- positionElementAt
- relayout
- remove
- reset
- setApparentCanvasLocation
- setBackground
- setBoundsFor
- setClamping
- setEnabled
- setFilter
- setFilter
- setPan
- setSuspendRendering
- setTransformOrigin
- setTransFormOriginForElement
- setViewportCenter
- setWheelFilter
- setZoom
- setZoomRange
- showElementAt
- start
- zoomToBackground
- zoomToElements
- zoomToEvent
- zoomToFit
- zoomToFitIfNecessary
Methods
add
-
el
-
[id]
-
[pos]
Adds the given element to those that this widget is tracking.
Parameters:
-
el
ElementElement to begin tracking.
-
[id]
String optionalOptional id of the element. This might be called from a context in which the id is known already, so we can save some work.
-
[pos]
Number optionalOptional location for the node. If not provided, the position will be retrieved from a call to the DOM.
alignBackground
-
[axes]
Positions the widget so that the edges of the background align with the viewport. This method is useful for snapping to a corner of the background.
Parameters:
-
[axes]
String optionalSpec for the axes to align to. This should be a space-separated string containing a value for the x (allowed values
left
andright
) and, optionally, y (allowed valuestop
andbottom
) axes. The default value is"left top"
.
applyZoomToElement
-
el
-
[zoomToSet]
Applies either the widget's current zoom to the given element, or some supplied zoom.
Parameters:
-
el
ElementElement to set zoom on.
-
[zoomToSet]
Number optionalOptional zoom value; if omitted we use the widget's current zoom.
centerBackground
()
Position the widget so the background is centered in the viewport, without changing the current zoom.
centerContent
-
params
Centers the tracked content inside the viewport, but does not adjust the current zoom.
Parameters:
-
params
ObjectMethod parameters.
-
[bounds]
Object optionalBounds info. This is in an internal format and only used when this method is called by the widget itself. Otherwise it is calculated.
-
[doNotAnimate=false]
Boolean optionalIf true, don't animate while centering.
-
[onComplete]
Function optionalOptional function to call on operation complete (centering may be animated).
-
[onStep]
Function optionalOptional function to call on operation step (centering may be animated).
-
[doNotFirePanEvent=false]
Boolean optionalIf true, a pan event will not be fired.
-
centerContentHorizontally
-
params
Centers the tracked content inside the viewport horizontally, but does not adjust the current zoom.
Parameters:
-
params
ObjectMethod parameters.
-
[bounds]
Object optionalBounds info. This is in an internal format and only used when this method is called by the widget itself. Otherwise it is calculated.
-
[doNotAnimate=false]
Boolean optionalIf true, don't animate while centering.
-
[onComplete]
Function optionalOptional function to call on operation complete (centering may be animated).
-
[onStep]
Function optionalOptional function to call on operation step (centering may be animated).
-
[doNotFirePanEvent=false]
Boolean optionalIf true, a pan event will not be fired.
-
centerContentVertically
-
params
Centers the tracked content inside the viewport vertically, but does not adjust the current zoom.
Parameters:
-
params
ObjectMethod parameters.
-
[bounds]
Object optionalBounds info. This is in an internal format and only used when this method is called by the widget itself. Otherwise it is calculated.
-
[doNotAnimate=false]
Boolean optionalIf true, don't animate while centering.
-
[onComplete]
Function optionalOptional function to call on operation complete (centering may be animated).
-
[onStep]
Function optionalOptional function to call on operation step (centering may be animated).
-
[doNotFirePanEvent=false]
Boolean optionalIf true, a pan event will not be fired.
-
centerOn
-
element
-
[params]
Centers the given element in the viewport, vertically and/or horizontally.
Parameters:
-
element
Element | StringElement, or element id, to center.
-
[params]
Object optionalOptional extra parameters.
-
[horizontal=true]
Boolean optionalWhether or not to center horizontally
-
[vertical=true]
Boolean optionalWhether or not to center vertically
-
[doNotAnimate=false]
Boolean optionalIf true, animation will not be switched on for the operation.
-
[onComplete]
Boolean optionalOptional on complete callback
-
[onStep]
Boolean optionalOptional on animation step callback.
-
[fillRatio=0.4]
Number optional
-
centerOnAndZoom
-
element
-
[fillRatio=0.6]
Centers on the given element and then adjusts the zoom of the widget so that the short axis of the viewport
is [1 / fillRatio] larger than its corresponding axis on the centered node. fillRatio
is basically
a measure of how much context you want to see around the node on which you centered.
Parameters:
-
element
Element | StringElement, or element id, to center.
-
[fillRatio=0.6]
Number optionalProportional ratio of the corresponding node's edge to the viewport's short edge.
centerOnHorizontally
-
element
Centers the given element in the viewport, vertically only.
Parameters:
-
element
Element | StringElement, or element id, to center.
centerOnHorizontally
-
element
Centers the given element in the viewport, horizontally only.
Parameters:
-
element
Element | StringElement, or element id, to center.
findIntersectingNodes
-
origin
-
dimensions
-
[enclosed=false]
-
[filter]
Finds all nodes that intersect to any extent the rectangle defined by the given origin and dimensions. This rectangle is taken to be in the coordinate space of the page, ie. a value of [0,0] for the origin means the page's top/left corner. A future version could take an optional third argument specifying the element whose origin to use.
Parameters:
-
origin
Number[x,y] location for center of search. IMPORTANT: This is relative to the page origin.
-
dimensions
NumberWidth and height of search area.
-
[enclosed=false]
Boolean optionalIf true, returns only nodes that are enclosed by the given search area. Otherwise returns nodes that both intersect and are enclosed.
-
[filter]
Function optionalOptional filter function. This is passed the (id, node, boundingRect) of some element and should return true for elements that should be included in results.
Returns:
A list of objects containing {id:id, el:element, r:bounding rect} that either intersect or are enclosed by the search area.
findNearbyNodes
-
origin
-
radius
-
[mustBeInViewport=false]
-
[filter]
Finds all nodes whose centers are within a rectangle with origin
as its center, and
a width and height of radius / 2
.
Parameters:
-
origin
Number[x,y] location for center of search. IMPORTANT: This is relative to the page origin.
-
radius
NumberRadius of search.
-
[mustBeInViewport=false]
Boolean optionalIf true, first check that the given origin is within the viewport.
-
[filter]
Function optionalOptional filter function. Should return true for elements that should be included in results.
Returns:
A list of objects containing {id:id, el:element, r:bounding rect}, sorted in ascending order of distance of the center of the bounding rectangle from the given origin.
fixElement
-
el
-
constraints
-
pos
Appends an element to the content such that it is zoomed with everything else, but constrains pan in one or both axes so that the element remains fixed with respect to the viewport origin.
Parameters:
-
el
ElementThe DOM element to append.
-
constraints
ObjectFlags to indicate optional constraint to each axis.
-
pos
Number[left,top] location of the element's origin.
getApparentCanvasLocation
()
Returns the apparent [left,top] of the canvas inside the viewport - the coordinates, in real pixel values, of where the origin of the canvas appears to be. This apparent origin is not necessarily the same as the [left,top] values of the canvas, because the transform origin and zoom values change things. This function can be used in conjunction with the content bounds by widgets such as the miniview, to calculate what is actually visible in the viewport at some point in time.
Returns:
[Integer[]] [left,top] of the canvas, relative to the viewport's 0,0.
getBoundsInfo
()
Object
Gets the current bounds information.
Returns:
An object with these fields: w - width of the content h - height of the content x - minimum x value of all nodes in the content y - minimum y value of all nodes in the content vw - width of the viewport vh - height of the viewport padding - padding around the content (an array) z - smallest zoom that could result in all the content being visible inside the viewport zoom - current zoom
getElementPositions
()
Object
Returns the current map of element ids -> positions.
Returns:
Map of { id->[x,y]} positions.
getPan
()
Number
Gets the current [left,top] of the panned content.
Returns:
[left,top], in pixels, of the panned content, where [0,0] is the origin of the viewport.
getTransformOrigin
()
Number
Gets the current transform origin, in an object of the form [ left, top ]
. The coordinate space is pixels.
Returns:
[left,top] values for the transform origin.
getViewportCenter
()
Number
Gets the canvas location that corresponds to the center of the viewport. Note that this may describe a point outside of the content bounds.
Returns:
left,top location of the logical position on the canvas corresponding to the center of the viewport.
getZoom
()
Number
Gets the current zoom.
Returns:
Current zoom value
getZoomRange
()
Number
Gets the current zoom range.
Returns:
Array of [min, max] zoom values.
isInViewport
-
x
-
y
Returns whether or not the given point (relative to page origin) is within the viewport for the widget.
Parameters:
-
x
NumberX location of point to test
-
y
NumberY location of point to test
Returns:
True if the point is within the viewport, false if not.
mapEventLocation
-
event
-
[doNotAdjustForOffset=false]
Maps the page location of the given event to a value relative to the viewport origin, allowing for zoom and pan of the canvas. This takes into account the offset of the viewport in the page so that what you get back is the mapped position relative to the target element's [left,top] corner. If you wish, you can supply true for 'doNotAdjustForOffset', to suppress that behavior.
Parameters:
-
event
EventBrowser event
-
[doNotAdjustForOffset=false]
Boolean optionalWhether or not to adjust for the offset of the viewport in the page.
mapLocation
-
left
-
top
-
[doNotAdjustForOffset=false]
Maps the given page location to a value relative to the viewport origin, allowing for zoom and pan of the canvas. This takes into account the offset of the viewport in the page so that what you get back is the mapped position relative to the target element's [left,top] corner. If you wish, you can supply true for 'doNotAdjustForOffset', to suppress that behavior.
Parameters:
-
left
NumberX location
-
top
NumberY location
-
[doNotAdjustForOffset=false]
Boolean optionalWhether or not to adjust for the offset of the viewport in the page.
nudgeWheelZoom
-
delta
-
[e]
Nudges the wheel zoom by the given amount. This function is intended for use by components that control
zoom via the mouse wheel, and not for general usage. See nudgeZoom
for a more general version of this.
Parameters:
-
delta
NumberAmount to change zoom by.
-
[e]
Event optionalOriginal event that caused the nudge. May be null.
nudgeZoom
-
delta
-
[e]
Nudges the zoom by the given amount. Zoom will be clamped to the current zoom range in effect and the value that was ultimately set is returned from this function.
Parameters:
-
delta
NumberAmount to change zoom by. The value you pass in here is multiplied by 100 to give a percentage value: 1 is 100%, for instance, 0.05 is 5%. You can pass in negative numbers to zoom out.
-
[e]
Event optionalOriginal event that caused the nudge. May be null.
Returns:
The zoom that was set. Zoom will be clamped to the allowed range.
pageLocation
()
Integer
Decodes the page location from the given event, taking touch devices into account.
Returns:
[left, top] of the given event.
pan
-
dx
-
dy
-
[animate
Pans the content by dx and dy.
Parameters:
-
dx
NumberAmount to pan in X direction
-
dy
NumberAmount to pan in Y direction
-
[animate
Boolean= false] Whether or not to animate the pan.
positionChanged
-
el
-
[pos]
-
[id]
Registers that an element has changed position, updating bounds info as necessary.
Parameters:
-
el
ElementElement that has just moved.
-
[pos]
Number optionalNew position. If this is omitted, it will be calculated.
-
[id]
String optionalOptional id of the element. This might be called from a context in which the id is known already, so we can save some work.
positionElementAt
-
el
-
x
-
y
-
[xShift=0]
-
[yShift=0]
-
[ensureOnScreen=false]
Places (using style.left
and style.top
) the given element at the given x,y, which is taken to
mean an x,y value on the canvas. At zoom 1, with no panning, this will be the same as the given x,y value
relative to the viewport origin. But once the canvas has been zoomed and panned we have to map
to the altered coordinates. This function also takes into account the difference between the offset of the
viewport in the page and the offset of the given element. It is assumed, just because of what this method
does, that the given element will be positioned absolute
, but this method does nothing to ensure that.
Parameters:
-
el
Selector | Element | StringElement to position.
-
x
NumberX location on canvas to move element's left edge to.
-
y
NumberY location on canvas to move element's top edge to.
-
[xShift=0]
Number optionalOptional absolute number of pixels to shift the element by in the x axis after calculating its position relative to the canvas. Typically you'd use this to place something other than the top left corner of your element at the desired location.
-
[yShift=0]
Number optionalOptional absolute number of pixels to shift the element by in the y axis after calculating its position relative to the canvas.
-
[ensureOnScreen=false]
Boolean optionalIf true, will ensure that x and y positions are never negative.
positionElementAt
-
el
-
x
-
y
-
[xShift=0]
-
[yShift=0]
Places (using style.left
and style.top
) the given element at the given page x,y. It is assumed, just because of what this method
does, that the given element will be positioned absolute
, but this method does nothing to ensure that.
Parameters:
-
el
Selector | Element | StringElement to position.
-
x
NumberX location on canvas to move element's left edge to.
-
y
NumberY location on canvas to move element's top edge to.
-
[xShift=0]
Number optionalOptional absolute number of pixels to shift the element by in the x axis after calculating its position relative to the canvas. Typically you'd use this to place something other than the top left corner of your element at the desired location.
-
[yShift=0]
Number optionalOptional absolute number of pixels to shift the element by in the y axis after calculating its position relative to the canvas.
positionElementAt
-
el
-
evt
-
[xShift=0]
-
[yShift=0]
Places (using style.left
and style.top
) the given element at the page x,y corresponding to the given event. It is assumed, just because of what this method
does, that the given element will be positioned absolute
, but this method does nothing to ensure that.
Parameters:
-
el
Selector | Element | StringElement to position.
-
evt
EventEvent to position element at.
-
[xShift=0]
Number optionalOptional absolute number of pixels to shift the element by in the x axis after calculating its position relative to the canvas. Typically you'd use this to place something other than the top left corner of your element at the desired location.
-
[yShift=0]
Number optionalOptional absolute number of pixels to shift the element by in the y axis after calculating its position relative to the canvas.
relayout
-
boundsInfo
-
[doNotAnimate=false]
Tells the widget that a relayout has occurred. If panning is disabled, the widget will move the canvas element so that all content is visible, and adjust the transform origin so that the ui zooms from the apparent top left corner.
Parameters:
-
boundsInfo
ObjectBounds information, in the same format as the
getBoundsInfo
method returns. -
[doNotAnimate=false]
Boolean optionalIf true, the widget will not animate the change.
remove
-
el
Removes the given element from the list this widget is tracking. Note that this widget does not remove the element from the DOM.
Parameters:
-
el
Selector | ElementElement to stop tracking.
reset
()
Removes all tracked elements and resets the widget.
setApparentCanvasLocation
-
left
-
top
Sets the apparent canvas location - see the notes for getApparentCanvasLocation.
Parameters:
-
left
NumberValue in pixels for left edge of canvas.
-
top
NumberValue in pixels for top edge of canvas.
Returns:
[left,top] of the actual origin set, after clamping.
setBackground
-
params
Sets the background for the canvas element.
Parameters:
-
params
ObjectMethod parameters
-
[img]
Image optionalImage to use. Optional; you can also supply an image url
-
[url]
String optionalImage URL.
-
[type="simple"]
String optional"tiled" or "simple": whether to use a single background image or to tile it.
-
[tiling="logarithmic"]
String optionalDefault is "logarithmic": each layer is assumed to have a maximum of (2^level+1) tiles in each axis (for instance at level 0, 2 tiles in each axis. Alternatively you can set this to be "absolute", which means that at the maximum zoom level the number of tiles in each axis is computed as the size of the image in that axis divided by the tile size in that axis (rounded up of course). Then at subsequent levels below, the
-
[onBackgroundReady]
Function optionalOptional function to call when the image has loaded.
-
setBoundsFor
-
id
-
pos
-
w
-
h
Manually set the bounds (position, and x/y) for some element, by id.
Parameters:
-
id
StringID of the element to set bounds for.
-
pos
NumberOrigin of the element
-
w
NumberWidth of the element
-
h
NumberHeight of the element
setClamping
-
clamp
Sets whether or not the widget clamps the movement of the canvas during pan/zoom to ensure that the managed content never disappears from view.
Parameters:
-
clamp
BooleanWhether or not to clamp movement.
setEnabled
-
state
Sets whether or not the component should respond to mouse events.
Parameters:
-
state
BooleanWhether or not to respond to mouse events.
setFilter
-
f
Sets the filter used to determine whether or not a given event should begin a pan.
Parameters:
-
f
FunctionA function that will be given the current mouse event. You must return true from the function if you wish for a pan to begin.
setFilter
-
filterFn
Sets (or clears) the filter that will be called if the widget needs to know whether to respond to an event that would start a pan. By default, the widget responds to down events on the viewport or the canvas, but not on child nodes. You can supply a function that the widget will call in the event that the down event did not occur on the viewport or the canvas; returning true from this function will cause the pan to begin.
Parameters:
-
filterFn
FunctionFunction to set as the filter; may be null if you wish to clear it. The function should return true if it wants to honour the down event on the given element.
setPan
-
left
-
top
-
[animate
-
[onComplete]
-
[onStep]
Sets the position of the panned content's origin.
Parameters:
-
left
NumberPosition in pixels of the left edge of the panned content.
-
top
NumberPosition in pixels of the top edge of the panned content.
-
[animate
Boolean= false] Whether or not to animate the pan.
-
[onComplete]
Function optionalIf
animate
is set to true, an optional callback for the end of the pan. -
[onStep]
Function optionalIf
animate
is set to true, an optional callback for each frame in the pan.
setSuspendRendering
-
val
Sets whether or not rendering is suspended, which for the moment means that when updateBounds is called, the widget doesn't sort the bounds, since we know there will be more changes to the positions and/or sizes of elements.
Parameters:
-
val
ObjectTrue to suspend rendering, false to re-enable rendering. If an update was called during the time that rendering was suspended, the positions are sorted once rendering is re-enabled.
setTransformOrigin
-
left
-
top
Sets the current transform origin, in pixels. Used mainly to support save/restore state.
Parameters:
-
left
NumberPosition of the X coordinate of the transform origin.
-
top
NumberPosition of the Y coordinate of the transform origin.
setTransFormOriginForElement
-
el
-
xy
Sets the transform origin for some element. This is really just exposed as a helper, since there seems little point in reinventing the wheel if you have this widget in your codebase and you need to perform this operation. The Miniview uses this, for instance.
Parameters:
-
el
ElementElement to set transform origin for.
-
xy
NumberTransform origin for element.
setViewportCenter
-
xy
Sets the location of the canvas such that the given point appears at the center of the viewport.
Parameters:
-
xy
Numberleft, top location of the point on the canvas to position in the center of the viewport.
setWheelFilter
-
f
Sets the filter used to determine whether or not a given wheel event should be responded to.
Parameters:
-
f
FunctionA function that will be given the current mouse event. You must return false from the function if you wish for the wheel event to be responded to.
setZoom
-
z
-
[dontFireEvent=false]
Sets the current zoom, clamping it to the allowed range.
Parameters:
-
z
NumberZoom value. If this is outside the allowed bounds it will be clamped.
-
[dontFireEvent=false]
Boolean optionalIf true, a zoom event will not be fired.
Returns:
Current zoom. This may or may not be the value you asked for - it might have been clamped to the current allowed zoom range.
setZoomRange
-
zr
-
[doNotClamp]
Sets the current zoom range. By default, this method checks if the current zoom is within
the new range, and if it is not then setZoom
is called, which will cause the zoom to be clamped
to an allowed value in the new range. You can disable this by passing true
for doNotClamp
.
Parameters:
-
zr
NumberNew range, as an array consisting of [lower, upper] values. Lower must be less than upper.
-
[doNotClamp]
Boolean optionalIf true, will not check the current zoom to ensure it falls within the new range.
showElementAt
-
el
-
x
-
y
Takes some element that is in the DOM and moves it so that it appears at the given x,y over the canvas, allowing for the current zoom and pan. It is expected that the element is not one that is currently managed by the widget - a common use case for this is some dialog, which you do not want to append to the canvas since it would have the zoom effect applied.
Parameters:
-
el
Selector | Element | StringSelector, DOM element or element id representing the element to move.
-
x
NumberX location to move to.
-
y
NumberY location to move to.
start
-
e
Programmatically report a down event in order to kick the widget into action.
Parameters:
-
e
EventMouse event to use to kick things off.
zoomToBackground
-
[params.onComplete]
-
[params.onStep]
-
[params.doNotAnimate=false]
Zooms the display so that the background fits inside the viewport.
Parameters:
-
[params.onComplete]
Function optionalOptional function to call on operation complete (centering may be animated).
-
[params.onStep]
Function optionalOptional function to call on operation step (centering may be animated).
-
[params.doNotAnimate=false]
Boolean optionalIf true, centering content will not use animation.
zoomToElements
-
zParams
Zooms the display so that all the given elements fit inside the viewport.
Parameters:
-
zParams
Object-
elements
ElementList of DOM elements to zoom to.
-
[fill=0.90]
Number optionalA decimal indicating how much of the viewport to fill with the zoomed content.
-
[doNotZoomIfVisible=false]
Boolean optionalIf true and the widget determines the entire selection is already visible, the zoom will not be adjusted.
-
zoomToEvent
-
e
-
increment
Zooms the component by the given increment, centered on the location at which the given event occurred.
Parameters:
-
e
EventBrowser event
-
increment
NumberAmount to zoom by (a positive or negative number). If this takes the component out of the current zoom range, it will be clamped.
zoomToFit
-
[params.padding=0]
-
[params.fill=0.9]
-
[params.onComplete]
-
[params.onStep]
-
[params.doNotAnimate=true]
-
[params.doNotZoomIfVisible=false]
-
[params.doNotFirePanEvent=false]
Zooms the display so that all the tracked elements fit inside the viewport. This method will also,
by default, increase the zoom if necessary - meaning the default behaviour is to adjust the zoom so that
the content fills the viewport. You can suppress zoom increase by setting doNotZoomIfVisible:true
on the
parameters to this method.
Parameters:
-
[params.padding=0]
Number optionalOptional padding to leave around all elements.
-
[params.fill=0.9]
Number optionalAmount of the viewport to fill. By default, this method will zoom so that the content is 0.9 times the size of the viewport. Aesthetically this makes for a more pleasing result than filling the viewport entirely.
-
[params.onComplete]
Function optionalOptional function to call on operation complete (centering may be animated).
-
[params.onStep]
Function optionalOptional function to call on operation step (centering may be animated).
-
[params.doNotAnimate=true]
Boolean optionalBy default, the centering content step does not use animation. This is due to this method being used most often to initially setup a UI.
-
[params.doNotZoomIfVisible=false]
Boolean optionalIf true, no action is taken if the content is currently all visible.
-
[params.doNotFirePanEvent=false]
Boolean optionalIf true, a pan event will not be fired.
zoomToFitIfNecessary
-
[params.padding
-
[params.fill=0.9]
-
[params.onComplete]
-
[params.onStep]
-
[params.doNotAnimate=true]
Zooms the display so that all the tracked elements fit inside the viewport, but does not make any adjustments to zoom if all the elements are currently visible (it still does center the content though).
Parameters:
-
[params.padding
Number= 0] Optional padding to leave around all elements.
-
[params.fill=0.9]
Number optionalAmount of the viewport to fill. By default, this method will zoom so that the content is 0.9 times the size of the viewport. Aesthetically this makes for a more pleasing result than filling the viewport entirely.
-
[params.onComplete]
Function optionalOptional function to call on operation complete (centering may be animated).
-
[params.onStep]
Function optionalOptional function to call on operation step (centering may be animated).
-
[params.doNotAnimate=true]
Boolean optionalBy default, the centering content step does not use animation. This is due to this method being used most often to initially setup a UI.


Nothing guarantees your database is reachable, or even online, but that won’t stop others from trying to update it. How well does your system respond once it’s recovered, and what happens to all those offline updates?
In your concert app, a new event is added and organizers are tracking down sponsors. Once a deal is struck, the sponsor (and their agreement) is plugged into your database, although sometimes the network is down, and the updates need to be sent several times before they’re deemed successful.
You land your first sponsor and send the agreement off to your database, but the network’s down again. Not a big deal, it’s saved on your computer, and the system will periodically retry. For now, they just asked for their company logo on the concert page.
15 minutes later, the sponsor calls back, asking if they can put a banner at the event instead. Sure, what’s the harm. You plug it into your database, and this time, the network is back online.
We know the order of these updates, since we watched them unfold: first, it was a page logo, then it changed to a banner.
But sadly, your database doesn’t have that advantage. After sending off the banner request, suppose our old request finally comes through, overwriting the more recent data. That’s bad.
Since you can’t depend on electricity, servers, wifi, phone batteries, or cell service always being available, the updates you send should describe their own order, ensuring your database always knows which values to keep.
That’s why gun attaches time to each update. While computer time is almost never accurate, it’s often good enough for approximating.
Regardless of order, we can know which updates to keep, simply by comparing update time stamps.
Now, as easy as all this sounds, there’s more nuance. What happens if an update is applied with a timestamp two years in the future, does it prevent other writes from being acknowledged?


public class OctreeNode
extends java.lang.Object
| Constructor and Description |
|---|
OctreeNode(Model baseModel,
int maxElements,
int depth,
VecF3 corner,
float ribSize)
Basic constructor for OctreeNode
|
OctreeNode(OctreeNode other)
Copy constructor for OctreeNode
|
| Modifier and Type | Method and Description |
|---|---|
void |
addElement(OctreeElement element)
Add an element to this node.
|
void |
addElementSubdivided(OctreeElement element)
Add an element to the proper child.
|
void |
delete(javax.media.opengl.GL3 gl)
Deletion method for this octree node.
|
void |
draw(javax.media.opengl.GL3 gl,
ShaderProgram program,
MatF4 MVMatrix)
OpenGL draw method.
|
void |
finalizeAdding()
Finalize the addition of new elements to this node.
|
void |
init(javax.media.opengl.GL3 gl)
OpenGL initialization method.
|
public OctreeNode(Model baseModel, int maxElements, int depth, VecF3 corner, float ribSize)
baseModel
- The model to use for graphic representations of this node.maxElements
- The maximum amount of OctreeElement
s for this node.depth
- The depth for this node in the octree (root = 0).corner
- The corner location for the lower X, Y, Z values of the cube
represented by this node.ribSize
- The rib sizes for the cube represented by this node.public OctreeNode(OctreeNode other)
other
- the node to copy.public void init(javax.media.opengl.GL3 gl)
gl
- the currently bound GL instance.public void delete(javax.media.opengl.GL3 gl)
gl
- the currently bound GL instance.public void addElement(OctreeElement element)
element
- The OctreeElement
to add to this node.public void finalizeAdding()
maxElements
. Override this.public void addElementSubdivided(OctreeElement element)
element
- The element to add.public void draw(javax.media.opengl.GL3 gl, ShaderProgram program, MatF4 MVMatrix) throws UninitializedException
gl
- the current GL instance.program
- The ShaderProgram to use in the drawing process.MVMatrix
- The global Modelview Matrix.UninitializedException
- if this method was called before calling the
init(GL3)
method.


foo2lava-wrapper(1) foo2lava-wrapper(1) NAME foo2lava-wrapper - Convert Postscript into a LAVAFLOW or OPL printer stream SYNOPSIS foo2lava-wrapper [options] [ps-file] DESCRIPTION foo2lava-wrapper is a Foomatic compatible printer wrapper for the foo2lava printer driver. This script reads a Postscript ps-file or stan‐ dard input and converts it to Zenographics LAVAFLOW printer format for driving the Konica Minolta magicolor 1600W color laser printer, the Kon‐ ica Minolta magicolor 1680MF/1690MF AIO printer, the Konica Minolta magi‐ color 2480/2490 MF AIO printer, the Konica Minolta magicolor 2530 DL net‐ work color laser printer, and other Zenographics-based LAVAFLOW printers. This script can be used in a standalone fashion, but is intended to be called from a printer spooler system which uses the Foomatic printer database. COMMAND LINE OPTIONS Normal Options These are the options used to select the parameters of a print job that are usually controlled on a per job basis. -c Print in color (else monochrome).  _ Media 2530DL _ plain 0 transparency 4 thick stock 20 envelope 22 letterhead 23 postcard 25 labels 26 recycled 27 -p paper Paper size code to send to printer [2]. box; | n l | n l. 1 executive 25 A5 2 letter 26 A4 3 legal 45 B5jis 80 env Monarch 65 B5iso 81 env #10 90 env DL 91 env C5 92 env B5 835 4x6" photo 837 10x15cm photo -n copies Number of copies [1]. -r xresxyres Set device resolution in pixels/inch [1200x600]. -s source Source (Input Slot) code to send to printer [255]. | n l | n l. 1 Tray 1 255 auto 4 Tray 2 -t Draft mode. Every other pixel is white. -2 -3 -4 -5 -6 -8 -9 -10 -12 -14 -15 -16 -18 Print in N-up. Requires the psutils package. -o orient Orientation used for N-up. l l l. Portrait -op (normal) Landscape -ol (rotated 90 degrees anticlockwise) Seascape -os (rotated 90 degrees clockwise) Printer Tweaking Options These are the options used to customize the operation of foo2lava for a particular printer. -u xoffxyoff Set the offset of the start of the printable region from the upper left corner, in pixels [varies with paper size]. The defaults should work on the 2200DL and 2300DL, and have not been tested on any other printers. -l xoffxyoff Set the offset of the end of the printable region from the lower right corner, in pixels [varies with paper size]. The defaults should work on the 2200DL and 2300DL, and have not been tested on any other printers. -L mask Send the logical clipping values from -u/-l in the LAVAFLOW stream. foo2lava-wrapper always runs Ghostscript with the ideal page dimensions, so that the scale of the image is correct, regardless whether or not the printer has unprintable regions. This option is used to move the position of the clipped image back to where it belongs on the page. The default is to send the amount which was clipped by -u and -l, and should be good in most cases. l l. 0 don't send any logical clipping amounts 1 only send Y clipping amount 2 only send X clipping amount 3 send both X and Y clipping amounts -z model Model. The default is [0]. l l l. model protocol Description 0 LAVAFLOW magicolor 2490 MF 0 LAVAFLOW magicolor 2530 DL 1 OPL magicolor 2480 MF 2 LAVAFLOW magicolor 1600W 2 LAVAFLOW magicolor 1680MF 2 LAVAFLOW magicolor 1690MF Color Tweaking Options These are the options used to control the quality of color output. Color correction is currently a WORK IN PROGRESS. -g gsopts Additional options to pass to Ghostscript, such as -g“-dDITHERPPI=nnn”, etc. This option may appear more than once. -G profile.icm Convert profile.icm to a Postscript color rendering dictionary (CRD) using foo2zjs-icc2ps and adjust the printer colors by using the Postscript setcolorrendering operator. (WORK IN PROGRESS). -G gamma-file.ps Prepend gamma-file.ps to the Postscript input to perform color correction using the setcolortransfer Postscript operator. For example, the file might contain: {0.333 exp} {0.333 exp} {0.333 exp} {0.333 exp} setcolortransfer -I intent Select profile intent from the ICM file. 0=Perceptual, 1=Colori‐ metric, 2=Saturation, 3=Absolute. Default is 0 (perceptual). Debugging Options These options are used for debugging foo2lava and its wrapper. -S plane Output just a single color plane from a color print and print it on the black plane. The default is to output all color planes. l l. 1 Cyan 2 Magenta 3 Yellow 4 Black -D level Set Debug level [0]. EXAMPLES Create a monochrome LAVAFLOW stream from a Postscript document, examine it, and then print it using a RAW print queue: foo2lava-wrapper testpage.ps > testpage.zm lavadecode < testpage.zm lpr -P raw testpage.zm Create a color LAVAFLOW stream from a Postscript document: foo2lava-wrapper -c testpage.ps > testpage.zc FILES /usr/bin/foo2lava-wrapper SEE ALSO foo2lava(1), lavadecode(1) opldecode(1) AUTHOR Rick Richardson<EMAIL_ADDRESS>http://foo2zjs.rkkda.com/


name and flags pass flags pass 'foo'(sub command) or 'foo
e.g. -a -b -c --foo bar
e.g. -abc --foo bar
e.g. bar
e.g.
git -p clone git@github.com:vvakame/dtsm.git
↑ this!
name of this command.
e.g.
git -p clone git@github.com:vvakame/dtsm.git
↑ this!
parent command.
parsed option arguments.
parsed option values.
e.g.
git -p clone git@github.com:vvakame/dtsm.git
↑ this!
unknown options.
add action at this command selected.
allow unknown option. by default, An error occured if unknown option is included.
set description for this command.
exec action of command. this method MUST call after parse process.
}
add help this option. in general case, use default help option.
generate help text.
check arg is matches this command.
add option for this command. see {@link Option}.
parse argv.
}
create sub command.
new command instance
set usage for this command.
add show version option to this command.
Generated using TypeDoc
class of command.
cmd -v sub --path foo/bar buzz.txt ↑ this one!


The Labrador Retriever, also known as simply Labrador or Lab, is one of several kinds of retrievers, a type of gun dog.[3] Labradors are athletic, playful, and the most popular breed of dog by registered ownership in Australia, Canada, New Zealand,[4] the United Kingdom,[5] and the United States (since 1991).[6] A favourite assistance dog breed in these and other countries, Labradors are frequently trained to aid people who are blind and people with autism, act as therapy dogs, and perform screening and detection work for law enforcement and other official agencies.[6] They are prized as sporting and waterfowl hunting dogs.[7] A few kennels breeding dogs were in England; at the same time a combination of sheep protection policy (Newfoundland) and rabies quarantine (England) led to their gradual demise in their country of origin.[8]
Husky is a general name for a type of dog used to pull sleds in northern regions, differentiated from other sled-dog types by their fast pulling style.[1] They are "an ever-changing cross-breed of the...fastest dogs".[2] The Alaskan Malamute, by contrast, is "the largest and most powerful" sled dog,[3] and was used for heavier loads. Huskies are used in sled dog racing. In recent years companies have been marketing tourist treks with dog sledges for adventure travelers in snow regions as well.[4] Huskies are also today kept as pets, and groups work to find new pet homes for retired racing and adventure trekking dogs.[5]
The Beagle is a breed of small to medium-sized dog. A member of the hound group, it is similar in appearance to the foxhound, but smaller with shorter legs and longer, softer ears. Beagles are scent hounds, developed primarily for tracking hare, rabbit, deer, and other small game. They have a great sense of smell and tracking instinct that sees them employed as detection dogs for prohibited agricultural imports and foodstuffs in quarantine around the world. Beagles are intelligent but single-minded, and popular pets because of their size, even temper, and lack of inherited health problems. Although beagle-type dogs have existed for 2,500 years, the modern breed was developed in Great Britain around the 1830s from several breeds, including the Talbot Hound, the North Country Beagle, the Southern Hound, and possibly the Harrier. Beagles have been depicted in popular culture since Elizabethan times in literature and paintings, and more recently in film, television, and comic books. Snoopy of the comic strip Peanuts has been promoted as "the world's most famous beagle".


Flame Lord Kakai:
Hear me! I am Flame Lord Kakai, invested with the authority of Pa'agrio, the father of eternal flame, to lead the great Orc race. Young warrior, you are to my eyes like a flame of hope, hope that our race may yet achieve its former glory. What do you wish from me?
Listen to information about second class transfer.
Ask about the current situation
Clan
Alliance
Quest


Column & row move
To enable these features, use settings manualColumnMove: true
and manualRowMove: true
The draggable move handle appears:
- in the right part of the column header,
- in the top part of the row header.
State of the table has been restored.


what is your opinion about smoke it
Composition: one piece of beef - tomato- 5eyar- onion- 5as- katchup- myonaze-barbeque souce
Composition: Two pieces of beef - tomato- 5eyar- onion- 5as- katchup- myonaze-barbeque souce
Composition: one piece of beef - bacon slice- tomato- 5eyar- onion- 5as- katchup- myonaze-barbeque souce


First we need to add the relevant imports to the file so that it can be compiled and loaded by XMF. We import the parsers for XOCL and XML.
We import the Components and XML packages.
parserImport XOCL; parserImport XML::Parser; import Components; import XML::Parser; // Get ParserChannel and Ref
A grammar can now be constructed using XXML.
In the context of the ComponentModel class, we declare a Grammar definition, called ComponentModel.
context ComponentModel @Grammar ComponentModel
Associated with the Grammar are a number of grammar rules which state how the XML should be parsed.
ComponentModel ::= <ComponentModel> C = Component* N = Connector* </ComponentModel> { ComponentModel[components=C,connectors=N] }. Component ::= <Component n=name> P = Port* </Component> { Component[name=n,ports=P] }. Port ::= <Port n=name t=type i=id/> i := { Port[name=n,type=t] }. Connector ::= <Connector sid=source tid=target/> { Connector[source=Ref(sid),target=Ref(tid)] }. end
Each grammar rule describes a rule for recognizing the next bit of XML. It checks the next element tag and binds the variables to the attribute values. The child elements must match the rules defined by the child grammars and binds the variables to the result. If the match is successful then the XOCL action occurs and returns a value.
The ComponentModel grammar is defined to be the XML tag <ComponentModel> followed by some child grammars (it has no attributes). The child grammars bind the result of parsing a sequence of Components followed by a sequence of Connectors.
The rule is terminated by the tag </ComponentModel>
Every time the grammar rule is parsed, its effect is to unify the variables with the values that are parsed.
These values are then used to perform an XOCL action, which is written in curly brackets after the grammar expression.
Here, the action instantiates the class ComponentModel with the variable values.
Similar grammar rules are written for the other elements in the model.
The grammar for Component is straightforward - it returns a Component instance.
The grammar for a Port illustrates the use of an "id" which is associated with each new Port instance.
The grammar for a Connector uses this "id" to look up the values of the source and target ports of the Connector. This is performed using the Ref() operation. This is how cross-references are managed in XXML.


zip_with(f, xs, ys)
Return a list with the results of applying the function f to the corresponding pairs from xs and ys.
f
xs
ys
zip_with(`+`, [1, 2, 3], [4, 5, 6]) // [5, 7, 9]
Core Module Index | Contents


JAAC to observe fast on November 22
by Special CorrespondentThe Joint Advocates Associations Action Committee has called for a one-day fast on November 22 at the district court complexes urging the State government to withdraw the amendment made in the Tamil Nadu Public Service Commission rules with respect to selection of junior level judicial officers.
Addressing a press conference here on Monday, JAAC chairman P. Nandakumar claimed that the amendment made would result in advocates from other States who did not have any exposure to the local language take up the examination and get posted in the lower courts in Tamil Nadu.
The move would not only hinder the judicial process at the lower courts as the newly appointed Magistrates would not understand the proceedings conducted in Tamil but also affect the chances of Tamil advocates becoming judicial officers, he added.
Hence, he said, the JAAC would be observing a fast.


List
{{$index + 1}}
Submit
Review
Submit
{{$ctrl.test_start_text}}
Keep your pen and paper ready
Your timer will start when you press the start button
FASTER replies will get you bonus points
Start


Authors:Yasuhiro Shindo
Source:FERMAT, Volume17, Sep._Oct._2016-004
Abstract:This paper describes the heating properties of an improved resonant cavity applicator applied to a thermal therapy system for treating osteoarthritis (OA) in the knee. OA is one of the most common joint diseases in not only elderly people but also young athletes. OA restricts movement in patients’ daily lives and causes stiff and painful joints. In order to fight the progression of the disease, a microwave diathermy system is commonly used in clinics. For effective thermal therapy of OA, the deep tissue of the knee joint should be heated to 36-38o C. However, from my previous research, it was found that the microwave diathermy system's penetration depth was only 20mm. To establish a more effective thermal therapy method, a smaller resonant cavity applicator which allows the patient's leg to be set in a bent position was proposed. With the previous version of my resonant cavity applicator, OA patients had to keep their leg in a straight position. With this new applicator, allowing OA patients to keep their leg bent during the thermotherapy improves their comfort. Two cylindrical metal shields are used to focus the heating energy on the diseased joint, and the human knee is noninvasively heated. In this paper, I first presented the estimated SAR distributions using a cylindrical agar phantom. Second, the calculated results of the human knee model reconstructed from 2D CT images were discussed. Then, experimental results using an agar phantom that was shaped like a bent leg were shown. Finally, I evaluated the effectiveness of this applicator from these results. It was found that the newly developed resonant cavity applicator was of a practical size and was able to effectively heat the deep tissue inside the knee joint with the leg in a bent position.
Index Terms:Thermal therapy, Knee osteoarthritis (OA), Finite Element Method (FEM), Resonant cavity, SAR distribution.
View PDF
Deep Thermal Therapy System for Osteoarthritis of Knee Joint Using Resonant Cavity Applicator


Descriptive statistics describe the main features of a data set in quantitative terms.
This calculator will generate certain descriptive statistics for a sample data set and produce a visual representation of the distribution.
To generate random data simply press "Generate"
or
Enter values separated by commas such as 1, 2, 4, 7, 7, 10, 2, 4, 5.
Then press "Run"


5. Help & Questions
Join the chat room on Gitter and get help and support from the community.
You can as well can open an issue on Github (will be labeled as Question) and discuss it with people on Gitter.
Common Problems
Here’s a list of the common problems you might face, and the possible solutions.
I see a blank (white) page instead of the Laravel ‘Welcome’ page!
Run the following command from the Laravel root directory:
sudo chmod -R 777 storage bootstrap/cache
I see “Welcome to nginx” instead of the Laravel App!
Use http://<IP_ADDRESS>
instead of http://localhost
in your browser.
I see an error message containing (address already in use) or (port is already allocated)
Make sure the ports for the services that you are trying to run (22, 80, 443, 3306, etc.) are not being used already by other programs on the host, such as a built in apache
/httpd
service or other development tools you have installed.
I get NGINX error 404 Not Found on Windows.
- Go to docker Settings on your Windows machine.
- Click on the
Shared Drives
tab and check the drive that contains your project files. - Enter your windows username and password.
- Go to the
reset
tab and click restart docker.
The time in my services does not match the current time
- Make sure you’ve changed the timezone.
- Stop and rebuild the containers (
docker-compose up -d --build <services>
)
I get MySQL connection refused
This error sometimes happens because your Laravel application isn’t running on the container localhost IP (Which is <IP_ADDRESS>). Steps to fix it:
- Option A
- Check your running Laravel application IP by dumping
Request::ip()
variable usingdd(Request::ip())
anywhere on your application. The result is the IP of your Laravel container. - Change the
DB_HOST
variable on env with the IP that you received from previous step.
- Check your running Laravel application IP by dumping
- Option B
- Change the
DB_HOST
value to the same name as the MySQL docker container. The Laradock docker-compose file currently has this asmysql
- Change the
I get stuck when building nginx on (fetch mirrors.aliyun.com/alpine/v3.5/main/x86_64/APKINDEX.tar.gz)
As stated on #749, Already fixed，just set CHANGE_SOURCE
to false.
Custom composer repo packagist url and npm registry url
In China, the origin source of composer and npm is very slow. You can add WORKSPACE_NPM_REGISTRY
and WORKSPACE_COMPOSER_REPO_PACKAGIST
config in .env
to use your custom source.
Example:
WORKSPACE_NPM_REGISTRY=https://registry.npm.taobao.org
WORKSPACE_COMPOSER_REPO_PACKAGIST=https://packagist.phpcomposer.com
I got (Module build failed: Error: write EPIPE) while compiling react application
When you run npm build
or yarn dev
building a react application using webpack with elixir you may receive a Error: write EPIPE
while processing .jpg images.
This is caused of an outdated library for processing .jpg files in ubuntu 16.04.
To fix the problem you can follow those steps
1 - Open the .env
.
2 - Search for WORKSPACE_INSTALL_LIBPNG
or add the key if missing.
3 - Set the value to true:
WORKSPACE_INSTALL_LIBPNG=true
4 - Finally rebuild the workspace image
docker-compose build workspace


{% assign webmaster = site.data.members | where: "webmaster", "True" -%}
Below is a list of Kern Lab alumni and their "last known" (and hopefully current) position. If you are an alumnus and want to update your listing, please contact
the webmaster or submit an Issue / PR on GitHub.
{% assign sorted_alumni = site.data.alumni | sort: "enddate" | reverse %}
{%- for alum in sorted_alumni %}


---
layout: post
title: Oh joy!
category:
- Digital
- Street Photos
tags:
- antoniocapelo
- fotografia
- olympus
- pen e-p1
- photography
- photowal
- porto
- portugal
- rangefinder
- shutter hell up
- street
- vila do conde
status: publish
type: post
published: true
meta:
image_tag:
image_url: http://farm7.static.flickr.com/6151/6166469996_2f03ea782d.jpg
_edit_last: '1'
---
Some shots from my Olympus Pen E-P1 ."Digital goodness in a rangefinder format " :)
The camera can reproduce some great colors so, for some pictures it would be a seen to put them on Black and White!


To use the test suite, you must first install the Smart Card Shell.
You can start the test suite using
>load("p11-tests/hba/loadtests.js");
Tests can be selected using the right mouse button on the test suite, test group or test case node.
Before running the tests you may want to change the location of the PKCS#11 module in the loadtest.js file.
The following tests are defined


Page title
A short description of the kinds of content seen on this page.
Section heading (h2)
These headings introduce, respectively, sections and subsections within your body copy. As you create these headings, follow the same guidelines that you use when writing section headings: Be succinct, descriptive, and precise.


LIKES
COMMENTS
MESSAGES
SAVED
click here to see more details
click here to see more details
click here to see more details
click here to see more details


Blacksmith Duning:
Oh, you mean the Blood Succubus? I will exchange 1 Blood Succubus for 5 Blood Drevanuls and 5 Blood Werewolves. Or, perhaps you would prefer a game of chance?
Exchange at set rate.
Play game. [Guess correctly in 2 tries - 3 Blood Drevanuls]
Play game. [Guess correctly in 3 tries - 7 Blood Drevanuls]
Play game. [Guess correctly in 4 tries - 9 Blood Drevanuls]
Ask how to play.


About 2 weeks ago I decided to venture into the world of magical mushrooms. I only started experimenting with drugs this year, and mushrooms would be my first hallucinogenic drug experience. A friend and I ate them with apple juice as a chaser at about 8:45 AM. They tasted pretty gross but it was manageable. We were staying at a resort, so we decided to go and sit in this lounge area and wait for them to kick in. About 20 minutes later we became giggly and were acting kinda weird. I'm not sure if it was in anticipation or what. My friend, who weighs only 100 pounds, starting feeling it about then and said my face was melting off. I was surprised because I was expecting it to take a lot longer to kick in. We went into this bathroom and I started feeling a body high and the walls were closing in on us. We ran out, sat outside and smoked a cigarette. Plants were starting to look very weird and we got this weird urge to run and find a hidden meadow. So we did.
Thank god we were in nature and we knew that there would be a meadow across the street. We made our way over there, but got distracted when we decided to lay down in the grass road divider. We called some car over to us and asked them how to get 'downtown,' but I had a very hard time talking to them and understanding. This was about 45 minutes to an hour after we ate the mushrooms. We went through the barbed wire fence and walked around in some brushy forest-like area. Everything was so weird, and we felt fearless. We met a couple of trees, one named Henry who had a very distinct personality to us and we took a picture with him.
We noticed a clearing and upon arriving at it we realized it was the perfect meadow. Small grasses, wild flowers, beautiful bugs, everything we could ask for. By this time we were feeling it so powerfully that we could barely stand. We sat down and talked to the bugs. I spent about 2 hours looking at the clouds, which were making pictures, swirling and rolling like an ocean. Colors were bright, and everything was extremely over-stimulating. Ugly things were beautiful to me and the (real) bugs crawling all over my arm were not a threat, but my friends. I remember talking to a bee, saying, 'Look at you over there bee.  How great!' Or something bizarre like that.
I brought crayons and my journal to write in and I was glad I did. I had some intense thoughts about humanity and our existence.  I felt like shrooms were a tool for humans to use so we could see our wrongdoing and appreciate wildlife like we should. I remember thinking many other things that I don't remember, but that I wanted to write down but I couldn't because my words were crawling off the page.
After about 4 hours we decided to see somewhere new. We tried to walk downtown, but after about 10 minutes of being around some people and houses, we couldn't stand it and decided to get our hippy asses back to our meadow. We started sobering up and had a little picnic with apples and oranges (THE best apples and oranges I've ever eaten). We started to realize that there were nasty bugs and spiders crawling all over us and biting us. We got a little freaked out and walked back to the resort. Once in her house, the doors, cabinets, and everything seemed to have a life of their own and were breathing. We felt like smoking some weed, but we didn't have any. We took showers and walked around the resort a little more. The body high was gone and almost everything was normal; this was about 7 hours later. At about 12:30 that night we noticed that things were still tripping us out and we couldn't understand it.
Now it is almost 2 weeks later and I am either still slightly tripping or having flashbacks. I noticed yesterday when I was extremely tired and I was looking at this textured ceiling that it was swirling and moving a lot. It is hard to concentrate on things without spacing out. This doesn't happen too often, but it is kind of weird. I loved my experience with mushrooms and it really changed me in a way. Before, I used to litter and disrespect the environment, but now I think twice about it and have some respect. Mushrooms are great if you do the right amount, but just like many other drugs, I've heard of some scary trips by people who've taken too much (like my boyfriend). It's definitely my drug of choice, and even though I also love Ecstasy, last time I did it all I could think about were the wonderful mushrooms :) So eat up, and enjoy!
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


A role=timer
is a live region with an implicit aria-live=off
.
An aria-live=off
is not meant to announce dynamic changes "unless the user is currently focused on that region".
The following test has a role=timer
with a tabindex=0
to allow for testing with Virtual Cursor "focus" as well as keyboard focus.
role="timer"
in the DOM on page load
results
macOS 11.6 VoiceOver with Safari 15.1:
updates not announced when focused with VC or keyboard focus. Timer role announced.
JAWS 2022.2110.60 with Edge & Chrome 98:
updates not announced when focused with VC or keyboard focus. Timer role not announced.
JAWS 2022.2110.60 with Firefox 97.0.1:
no announcement of content made if focused with Tab key. VC focus announces current value but not dynamic updates. Timer role not announced.
NVDA 2021.3.3 with Edge & Chrome 98:
updates not announced when focused with VC or keyboard focus. Timer role not announced.
NVDA 2021.3.3 with Firefox 97.0.1:
updates not announced when focused with VC or keyboard focus. Timer role not announced.
Narrator with Win10 and Edge 98:
updates not announced when focused with VC or keyboard focus. Timer role announced.
Android 12 TalkBack with Firefox 95.2:
updates announced while VC focus remains on element. Timer role not announced.
Android 12 TalkBack with Chrome 96:
updates not announced when focused with VC. Timer role announced.
iOS 15.3.1 VoiceOver with Safari:
no announcement of dynamic content. Is difficult to swipe to the dynamically updating content. VO focus will often skip over the countdown timer (nothing to do with the role. iOS VO just doesn't seem to like moving focus to content that updates so frequently). Timer role not announced.


toc: false
copyright: false
assets: none
This is a note. Since it is outside a clause it is unstyled.
This
This is note 1, but since it is the only note, it is not numbered.
That
This is note 1, should be numbered
This is note 2, should also be numbered


eLCS package¶
Submodules¶
eLCS.Algorithm module¶
-
class
eLCS.Algorithm.
Algorithm
[source]¶ Bases:
object
The major controlling module of eLCS.
Includes the major run loop which controls learning over a specified number of iterations. Also includes periodic tracking of estimated performance, and checkpoints where complete evaluations of the eLCS rule population is performed.
Two options are available for the initialisation of the algorithm 1. Do a Population reboot using an existing saved rule population, or 2. Build the Population from scratch from given data
-
doContPopEvaluation
(isTrain)[source]¶ Performs evaluation of population via the copied environment.
Specifically developed for continuous phenotype evaulation. The population is maintained unchanging throughout the evaluation. Works on both training and testing data.
Parameters: isTrain – Returns:
-
doPopEvaluation
(isTrain)[source]¶ Performs a complete evaluation of the current rule population.
The population is unchanged throughout this evaluation. Works on both training and testing data.
Parameters: isTrain – Returns:
-
populationReboot
()[source]¶ Manages the reformation of a previously saved eLCS classifier population
-
eLCS.ClassAccuracy module¶
eLCS.Classifier module¶
-
class
eLCS.Classifier.
Classifier
(a=None, b=None, c=None, d=None)[source]¶ Bases:
object
This module defines an individual classifier within the rule population, along with all respective parameters.
Also included are classifier-level methods, including constructors(covering, copy, reboot) matching, subsumption, crossover, and mutation. Parameter update methods are also included
-
Mutation
(state, phenotype)[source]¶ Mutates the condition of the classifier. Also handles phenotype mutation. This is a niche mutation, which means that the resulting classifier will still match the current instance.
-
classifierCopy
(clOld, exploreIter)[source]¶ Constructs an identical Classifier. However, the experience of the copy is set to 0 and the numerosity is set to 1 since this is indeed a new individual in a population. Used by the genetic algorithm to generate offspring based on parent classifiers.
-
classifierCovering
(setSize, exploreIter, state, phenotype)[source]¶ Makes a new classifier when the covering mechanism is triggered.
The new classifier will match the current training instance. Covering will NOT produce a default rule (i.e. a rule with a completely general condition).
The classifier constructs phenotypes for: 1. Discrete Phenotypes 2. Continous Phenotypes
Parameters: - setSize (int) – The set numerosity sum
- exploreIter (int) – The current iteration
- state (list) – The state
- phenotype (int) – The state’s phenotype
-
equals
(cl)[source]¶ Returns if the two classifiers are identical in condition and phenotype. This works for discrete or continuous attributes or phenotypes.
-
isMoreGeneral
(cl)[source]¶ Returns if the classifier (self) is more general than cl. Check that all attributes specified in self are also specified in cl.
-
isSubsumer
()[source]¶ Returns if the classifier (self) is a possible subsumer. A classifier must be as or more accurate than the classifier it is trying to subsume.
-
rebootClassifier
(classifierList)[source]¶ Rebuilds a saved classifier as part of the population Reboot
-
uniformCrossover
(cl)[source]¶ Applies uniform crossover and returns if the classifiers changed. Handles both discrete and continuous attributes. #SWARTZ: self. is where for the better attributes are more likely to be specified #DEVITO: cl. is where less useful attribute are more likely to be specified
-
updateCorrect
()[source]¶ Increases the correct phenotype tracking by one. Once an epoch has completed, rule accuracy can’t change.
-
updateExperience
()[source]¶ Increases the experience of the classifier by one. Once an epoch has completed, rule accuracy can’t change.
-
eLCS.ClassifierSet module¶
-
class
eLCS.ClassifierSet.
ClassifierSet
(pop_reboot_path=None)[source]¶ Bases:
object
This module handles all the classifier sets
This includes the population, match set and correct sets along with mechanisms and heuristics that act on these sets.
This class can be initialized with the: 1. Creation of a new population, or 2. Reboots the population (i.e. read in from a previously saved population)
-
addClassifierToPopulation
(cl, covering)[source]¶ Adds a classifier to the set and increases the microPopSize value accordingly.
Parameters: - cl –
- covering –
Returns:
-
clearSets
()[source]¶ Clears out references in the match and correct sets for the next learning iteration.
-
deleteFromCorrectSet
(deleteRef)[source]¶ Delete reference to classifier in population, contained in self.corectSet.
Parameters: deleteRef – Returns:
-
deleteFromMatchSet
(deleteRef)[source]¶ Delete reference to classifier in population, contained in self.matchSet.
Parameters: deleteRef – Returns:
-
deleteFromPopulation
()[source]¶ Deletes one classifier in the population.
The classifier that will be deleted is chosen by roulette wheel selection considering the deletion vote. Returns the macro-classifier which got decreased by one micro-classifier.
-
deletion
(exploreIter)[source]¶ Returns the population size back to the maximum set by the user by deleting rules.
Parameters: exploreIter – Returns:
-
doCorrectSetSubsumption
()[source]¶ Executes correct set subsumption.
The correct set subsumption looks for the most general subsumer classifier in the correct set and subsumes all classifiers that are more specific than the selected one.
-
getFitnessSum
(setList)[source]¶ Returns the sum of the fitnesses of all classifiers in the set.
Parameters: setList – Returns:
-
getIdenticalClassifier
(newCl)[source]¶ Looks for an identical classifier in the population.
Parameters: newCl – Returns:
-
getPopTrack
(accuracy, exploreIter, trackingFrequency)[source]¶ Returns a formatted output string to be printed to the Learn Track output file.
Parameters: - accuracy –
- exploreIter –
- trackingFrequency –
Returns:
-
insertDiscoveredClassifiers
(cl1, cl2, clP1, clP2, exploreIter)[source]¶ Inserts both discovered classifiers and activates GA subsumption if turned on.
Also checks for default rule (i.e. rule with completely general condition) and prevents such rules from being added to the population, as it offers no predictive value within eLCS.
Parameters: - cl1 –
- cl2 –
- clP1 –
- clP2 –
- exploreIter –
Returns:
-
makeCorrectSet
(phenotype)[source]¶ Constructs a correct set out of the given match set
Parameters: phenotype – Returns:
-
makeEvalMatchSet
(state)[source]¶ Constructs a match set for evaluation purposes which does not activate either covering or deletion.
Parameters: state – Returns:
-
makeMatchSet
(state_phenotype, exploreIter)[source]¶ Constructs a match set from the population
Covering is initiated if the match set is empty or a rule with the current correct phenotype is absent.
Parameters: - state_phenotype (list) – Listing consisting of the training state and training phenotype
- exploreIter (int) – The current iteration
-
rebootPop
(pop_reboot_path)[source]¶ Remakes a previously evolved population from a saved text file
Parameters: pop_reboot_path – Returns:
-
removeMacroClassifier
(ref)[source]¶ Removes the specified (macro-) classifier from the population.
Parameters: ref – Returns:
-
runAttGeneralitySum
(isEvaluationSummary)[source]¶ Determine the population-wide frequency of attribute specification, and accuracy weighted specification.
Used in complete rule population evaluations.
Parameters: isEvaluationSummary – Returns:
-
runGA
(exploreIter, state, phenotype)[source]¶ The genetic discovery mechanism in eLCS is controlled here.
Parameters: - exploreIter –
- state –
- phenotype –
Returns:
-
runPopAveEval
(exploreIter)[source]¶ Calculates some summary evaluations across the rule population including average generality.
Parameters: exploreIter – Returns:
-
selectClassifierRW
()[source]¶ Selects parents using roulette wheel selection according to the fitness of the classifiers.
Returns:
-
selectClassifierT
()[source]¶ Selects parents using tournament selection according to the fitness of the classifiers.
-
setIterStamps
(exploreIter)[source]¶ Sets the time stamp of all classifiers in the set to the current time.
The current time is the number of exploration steps executed so far.
Parameters: exploreIter – Returns:
-
subsumeClassifier
(cl=None, cl1P=None, cl2P=None)[source]¶ Tries to subsume a classifier in the parents.
If no subsumption is possible it tries to subsume it in the current set.
Parameters: - cl –
- cl1P –
- cl2P –
Returns:
-
eLCS.Constants module¶
-
class
eLCS.Constants.
Constants
[source]¶ Bases:
object
Stores and manages all algorithm run parameters
Parameters are accessible anywhere in the rest of the algorithm code by importing cons
-
loadParameters
(config_file)[source]¶ Load the environment parameters from yaml configuration file
Parameters: config_file (str) – Path to the configuration yaml file Returns: Parameters read from yaml file Return type: dict
-
parseIterations
()[source]¶ Parse the ‘learningIterations’ string
Identify the maximum number of learning iterations as well as evaluation checkpoints
-
referenceEnv
(env)[source]¶ Store reference to OfflineEnvironment object
Parameters: env (Environment) – An OfflineEnvironment file
-
eLCS.DataManagement module¶
-
class
eLCS.DataManagement.
DataManagement
(trainFile, testFile, infoList=None)[source]¶ Bases:
object
Able to manage both training and testing data.
This module loads the dataset, detects and characterizes all attributes in the dataset, handles missing data, and finally formats the data so that it may be conveniently utilized by eLCS.
-
characterizeAttributes
(rawData)[source]¶ Determine range (if continuous) or states (if discrete) for each attribute and saves this information
Parameters: rawData – Returns:
-
characterizeDataset
(rawTrainData)[source]¶ Detect basic dataset parameters
Parameters: rawTrainData – Returns:
-
characterizePhenotype
(rawData)[source]¶ Determine range of phenotype values.
Parameters: rawData – Returns:
-
compareDataset
(rawTestData)[source]¶ Ensures that the attributes in the testing data match those in the training data.
Also stores some information about the testing data.
Parameters: rawTestData – Returns:
-
discriminateAttributes
(rawData)[source]¶ Determine whether attributes in dataset are discrete or continuous and saves this information.
Parameters: rawData – Returns:
-
discriminateClasses
(rawData)[source]¶ Determines number of classes and their identifiers.
Only used if phenotype is discrete.
Parameters: rawData – Returns:
-
discriminatePhenotype
(rawData)[source]¶ Determine whether the phenotype is Discrete(class-based) or Continuous
Parameters: rawData (list) – The raw data file loaded from
-
eLCS.OfflineEnvironment module¶
-
class
eLCS.OfflineEnvironment.
OfflineEnvironment
[source]¶ Bases:
object
In the context of data mining and classification tasks, the environment is a data set with a limited number of instances with X attributes and some endpoint (typically a discrete phenotype or class) of interest.
This module loads the data set, automatically detects features of the data by executing the DataManagement module
-
newInstance
(isTraining)[source]¶ Shifts the environment to the next instance in the data.
Parameters: isTraining – Returns:
-
resetDataRef
(isTraining)[source]¶ Resets the environment back to the first instance in the current data set.
Parameters: isTraining – Returns:
-
eLCS.OutputFileManager module¶
-
class
eLCS.OutputFileManager.
OutputFileManager
[source]¶ Bases:
object
This module contains the methods for generating the different output files generated by eLCS.
These files are generated at each learning checkpoint, and the last iteration. These include… * writePopStats: Summary of the population statistics * writePop: Outputs a snapshot of the entire rule population including classifier conditions, classes, and parameters.
-
writePop
(outFile, exploreIter, pop)[source]¶ Writes a tab delimited text file outputting the entire evolved rule population, including conditions, phenotypes, and all rule parameters.
Parameters: - outFile –
- exploreIter –
- pop –
Returns:
-
writePopStats
(outFile, trainEval, testEval, exploreIter, pop, correct)[source]¶ Makes output text file which includes all of the evaluation statistics for a complete analysis of all training and testing data on the current eLCS rule population.
Parameters: - outFile –
- trainEval –
- testEval –
- exploreIter –
- pop –
- correct –
Returns:
-
eLCS.Prediction module¶
eLCS.Timer module¶
-
class
eLCS.Timer.
Timer
[source]¶ Bases:
object
Tracks and stores the run time of algorithm and some of it’s major components
-
reportTimes
()[source]¶ Reports the time summaries for this run.
Returns a string ready to be printed out.
Returns: The time summaries for the run Return type: str
-
returnGlobalTimer
()[source]¶ Set the global end timer, call at very end of algorithm
Returns: The global time returned in minutes Return type: float
-


Qpid Proton 0.34.0 Release Notes
Proton is a high-performance, lightweight messaging library. More
about Qpid Proton.
For more information about this release, including download links and
documentation, see the release overview.
New features and improvements
- PROTON-2314 - [python] reconnect/failover is a bit of a mess
- PROTON-2315 - [python] BlockingConnection has no way to allow failover
- PROTON-2319 - [python] Remove support for python 2.6
- PROTON-2332 - Allow access to link properties in cpp binding
- PROTON-2338 - Allow proactor raw connections to be half closed
- PROTON-2339 - Introduce 'Drain buffers' event to proactor raw connection
- PROTON-2343 - Simplify and clean up build flag selection for different compilers
Bugs fixed
- PROTON-1914 - [c] receiver cannot settle an incomplete incoming message
- PROTON-2217 - Python detection logic prefers python2 over python3 when both are installed
- PROTON-2248 - [c] Codec pn_data_vfill() method doc has symbol and string types interchanged
- PROTON-2309 - [cpp] If reconnect is on client responds to a forced close from server by only closing the socket
- PROTON-2327 - Installed C example build fails using CMake 2.8.12
- PROTON-2328 - epoll proactor bug in tracking previous task used by a thread
- PROTON-2329 - Incorrect handling of commandline options in ssl.cpp example
- PROTON-2340 - Fix some proactor raw connection issues found with TSAN
- PROTON-2342 - Fails to build on Fedora rawhide
- PROTON-2344 - memory leak and close_waits in qpid-proton-c / python2-qpid-proton when dropping timeouted connection
- PROTON-2346 - Build failure on musl
- PROTON-2354 - C++ test failures on MacOS due to unexported symbols being hidden
- PROTON-2355 - Build failure with -DPROACTOR=none
Tasks
- PROTON-2320 - Apply autofixes to resolve some flake8 code formatting issues
Apache Qpid, Messaging built on AMQP; Copyright © 2015
The Apache Software Foundation; Licensed under
the Apache
License, Version 2.0; Apache Qpid, Qpid, Qpid Proton,
Proton, Apache, the Apache feather logo, and the Apache Qpid
project logo are trademarks of The Apache Software
Foundation; All other marks mentioned may be trademarks or
registered trademarks of their respective owners


{% extends "simple.html" %} {% block body %}
The tests are modified based on the latency between your browser and the test server. If your latency is high (slow connection speed), resources are programmed to take longer to load and the test may take longer (5-10 minutes). If your latency is low (fast connection speed), the test will be shorter (1-2 minutes). {% endblock %}


{% extends "base.html" %} {% load static %} {% load core_tags %} {% block content %} {% if request.user.is_authenticated %}
Have you ever had to fill out one of these less than specific charts when trying to keep up with a health issue?
You're not alone, which is why MonitorMe is here for you.


Numbers That Count
问题描述 :
The other day, Klyde filled an order for the number 31123314 and was amazed to discover that the inventory of this number is the same as the number–it has three 1s, one 2, three 3s, and one 4! He calls this an example of a “self-inventorying number”, and now he wants to find out which numbers are self-inventorying, or lead to a self-inventorying number through iterated application of the inventorying operation described below. You have been hired to help him in his investigations.
Given any non-negative integer n, its inventory is another integer consisting of a concatenation of integers c1d1c2d2…ckdk, where each ci and di is an unsigned integer, every ci is positive, the di satisfy 0 <= d1 < d2 < … < dk <= 9, and, for each digit d that appears anywhere in n, d equals di for some i and d occurs exactly ci times in the decimal representation of n. For instance, to compute the inventory of 5553141 we set c1 = 2, d1 = 1, c2 = 1, d2 = 3, etc., giving 21131435. The number<PHONE_NUMBER>000 has inventory 12011 (“twelve 0s, one 1”).
An integer n is called self-inventorying if n equals its inventory. It is called self-inventorying after j steps (j >= 1) if j is the smallest number such that the value of the j-th iterative application of the inventory function is self-inventorying. For instance, 21221314 is self-inventorying after 2 steps, since the inventory of 21221314 is 31321314, the inventory of 31321314 is 31123314, and 31123314 is self-inventorying.
Finally, n enters an inventory loop of length k (k >= 2) if k is the smallest number such that for some integer j (j >= 0), the value of the j-th iterative application of the inventory function is the same as the value of the (j + k)-th iterative application. For instance,<PHONE_NUMBER>19 enters an inventory loop of length 2, since the inventory of<PHONE_NUMBER>19 is<PHONE_NUMBER>19 and the inventory of<PHONE_NUMBER>19 is<PHONE_NUMBER>19, the original number (we have j = 0 in this case).
Write a program that will read a sequence of non-negative integers and, for each input value, state whether it is self-inventorying, self-inventorying after j steps, enters an inventory loop of length k, or has none of these properties after 15 iterative applications of the inventory function.
This problem contains multiple test cases!
The first line of a multiple input is an integer N, then a blank line followed by N input blocks. Each input block is in the format indicated in the problem description. There is a blank line between input blocks.
The output format consists of N output blocks. There is a blank line between output blocks.
输入:
输出:
n is self-inventorying
n is self-inventorying after j steps
n enters an inventory loop of length k
n can not be classified after 15 iterations
样例输入:
22 31123314<PHONE_NUMBER>19 21221314<PHONE_NUMBER>59 -1
样例输出:
22 is self-inventorying 31123314 is self-inventorying<PHONE_NUMBER>19 enters an inventory loop of length 2 21221314 is self-inventorying after 2 steps<PHONE_NUMBER>59 enters an inventory loop of length 2
//Memory Time //232K 32MS #include<iostream> #include<string> using namespace std; /*压缩数字串n，存放到t*/ void R(char* n,char* t) { int i,j; int time[10]={0}; //记录n中各个数字出现的次数 for(i=0;n[i];i++) time[ n[i]-'0' ]++; for(i=0,j=0;i<10;i++) { if(time[i]) { if(time[i]<10) //数字i出现次数<10，即占1位 { t[j++]=time[i]+'0'; t[j++]=i+'0'; } else //数字i出现次数>=10，即占2位 { t[j++]=time[i]/10+'0'; t[j++]=time[i]%10+'0'; t[j++]=i+'0'; } } } t[j]='\0'; return; } int main(int i,int j) { char n[16][85]; //n[0]为原串，n[1~15]分别为n连续压缩15次的数字串 while(cin>>n[0] && n[0][0]!='-') { bool flag1=false; //属性1，n is self-inventorying int flag2=0; //属性2，n is self-inventorying after j steps，顺便记录j int flag3=0; //属性3，n is enters an inventory loop of length k，顺便记录k for(i=1;i<=15;i++) R(n[i-1],n[i]); if(!strcmp(n[0],n[1])) //属性1，n压缩1次就是其本身 flag1=true; if(!flag1) { for(j=1;j<15;j++) if(!strcmp(n[j],n[j+1])) //属性2, n压缩j次后的数字串n[j]具有属性1 { flag2=j; break; } if(!flag2) { for(j=1;j<=15;j++) //属性3，两两枚举各次压缩的数字串，注意循环间隔>=2 { for(i=0;i<=j-2;i++) { if(!strcmp(n[j],n[i])) { flag3=j-i; break; } } if(flag3) break; } } } if(flag1) cout<<n[0]<<" is self-inventorying"<<endl; else if(flag2) cout<<n[0]<<" is self-inventorying after "<<flag2<<" steps"<<endl; else if(flag3) cout<<n[0]<<" enters an inventory loop of length "<<flag3<<endl; else cout<<n[0]<<" can not be classified after 15 iterations"<<endl; } return 0; }
解题转自：http://www.cnblogs.com/lyy289065406/archive/2011/08/09/2132774.html
网站不错，支持一个
比较基础，找些自信
好网站，肯定会火的
真心不错，力顶作者
#include <cstdio>
int main() {
//answer must be odd
int n, u, d;
while(scanf("%d%d%d",&n,&u,&d)==3 && n>0) {
if(n<=u) { puts("1"); continue; }
n-=u; u-=d; n+=u-1; n/=u;
n<<=1, ++n;
printf("%dn",n);
}
return 0;
}
递归还真是一门学问，学习了
第二种想法，我想来好久，为啥需要一个newhead，发现是把最后一个节点一直返回到嘴上面这层函数。厉害，这道题之前没样子想过。
能不能说下这个是用的什么算法策略？
为避免精度问题，PI值请使用arccos(-1)。应该是acos
辛苦了，顶
wt[n - 1]没错，因为下标是[0...n-1]


About
Authored By: Antoun Elkomos
I am a sophomore at New Jersey Institute of Technology studying Business & Information Systems. I want to further my education by getting a masters in BIS and working as a data analyst. I am currently looking for an internship to gain experience and maybe even land a full time job.
In my free time I take up photography, fishing, woodworking, and home renovating. I enjoy taking strolls on the beach at sunrise with my golden retriever!
One day I want to own my own construction company and flip houses on the side!


Index
Previous:
śiñj
Next:
śim
√śip (?)
'be smooth'
Such a root may possibly be inferred from
śípi
V.+,
śíprā
RV.,
śipitá
ÇB.


Bengal
The Bengal cat is a domesticated cat breed created from hybrids of domestic cats, especially the spotted Egyptian Mau, with the Asian leopard cat (Prionailurus bengalensis). The breed name comes from the leopard cat’s taxonomic name.
Bengals have a wild appearance; their golden shimmer comes from their leopard cat ancestry, and their coats may show spots, rosettes, arrowhead markings, or marbling. They are an energetic breed which needs much exercise and play.
History
Early history
The earliest mention of an Asian leopard cat × domestic cross was in 1889, when Harrison Weir wrote of them in Our Cats and All About Them.
The next recorded mention of an Asian Leopard Cat × domestic cat cross was in a 1924 Belgian scientific journal, and in 1941 a Japanese cat publication printed an article about one that was kept as a pet.
The early breeding efforts always stopped after just one or two generations. Jean Mill was the breeder who decided to make a domestic cat with a coat like a wild cat.
Bengals as a breed
Jean Mill of California is given credit for the modern Bengal breed. She had a degree in psychology from Pomona College and had taken several graduate classes in genetics at University of California, Davis.
She made the first known deliberate cross of an Asian leopard cat with a domestic cat (a black California tomcat). However, Bengals as a breed did not really begin in earnest until much later. In 1970, Mill resumed her breeding efforts and in 1975 she received a group of Bengal cats which had been bred for use in genetic testing at Loma Linda University by Willard Centerwall. Others also began breeding Bengals.
Cat registries
In 1983, the breed was officially accepted by The International Cat Association (TICA). Bengals gained championship status in 1991.
In 1997 The Governing Council of the Cat Fancy (GCCF) accepted Bengal cats.
In 1999 Fédération Internationale Féline (FIFe) accepted Bengal cats into their registry.
The Cat Fanciers' Association (CFA) was one of the last organizations to accept the Bengal cat into their registry. “The CFA board accepted the Bengal as Miscellaneous at the February 7, 2016 board meeting. In order for a Bengal cat to be registered with the CFA it must be F6 or later (6 generations removed from the Asian Leopard Cat or non-Bengal domestic cat ancestors).”
In 1999 The Australian Cat Federation (ACF) accepted the Bengal cat into their registry.
Early generation Bengal cat
Bengal cats from the first three filial generations of breeding (F1–F3) are considered “foundation cats” or “Early Generation” Bengals. The Early generation (F1–F3) males are frequently infertile. Therefore, female early generation Bengals of the F1, F2, and F3 are bred to fertile domestic Bengals.F1 hybrid Bengal females are fertile, thus they are used in subsequent, unidirectional back-cross matings to fertile domestic cat males. Some male Bengals produced viable sperm as early as the F2 back-cross generation: this is considered rare in the breeding communities, who regularly back-cross early generation females to late generation, fertile hybrid males. To be considered a domestic Bengal cat by the major cat registries, a Bengal must be at least four generations (F4) or more from the Asian leopard cat.


Menu Plan is a new app to make meal planning as easy as it gets. Add your recipes, put them on the calendar, go shopping for food. Share your data with other users.
Available for iPhone and iPad.
Available in English, Brazilian, Dutch, French, German, Italian, Spanish and Portuguese.
Skills: UI Design, Swift, SwiftUI, UIKit, Core Data, CloudKit, Core, WidgetKit, text and JSON processing - Custom Ruby On Rails backend - Amazon Alexa
Read Me Aloud guides young readers, validating their efforts and reinforcing their confidence.
The text is segmented into short sentences; the current sentence is highlighted. While the child reads, words are colored, one by one.
Available for iPad, in English and Italian.
Skills: UI Design, Swift, SwiftUI, Networking and sync, Speech Recognition, Image Processing, Text Processing - Custom Ruby On Rails backend with API and image rendering
My tunes is a score manager targeted at players of traditional music using the ABC notation format.
My tunes hosts a collection of tunes, can edit and import new tunes from ABC sources.
My Tunes generate music scores and audio playback.
Skills: UI Design, Swift, SwiftUI, Core Data, Networking, SQLite, Javascript, WKWebView, Parsing
Front end for a connected device for assistance to elderly people.
Skills: Swift, UIKit, networking, IoT, Realm
Together with the Mobile Team at Ferlini SRL, I worked on accessibility and UI tests for the new Banco Popolare app.
We made sure the app was fully accessibile by the visualy impaired, adding accessibility layers to custom components
We implemented a full suite of automatic tests to validate the app features.
Skills: Swift, UIKit, UI testing, accessibility
Together with the Mobile Team at NTNext, we developed the offical Hoover Group app for controlling appliances remotely.
Available for both the iPhone and the iPad, Hoover Wizard was the first app to control a full range of connected appliances on the market.
Skills: Objective-C, UIKit, Front end animations, architecture
Unstuck was developed to help professionals overcom their obstacles.
It featured rich animation and a completely custom UI.
Skills: Objective-C, UIKit, Front end animations, architecture
Clibe was the among the first apps to replicate the journal format on the iPad.
It featured a drawing, and image editor, on-device rendering of pages and custom animations.
Skills: Objective-C, UIKit, Front end animations, architecture


Neotime Visualization
Credits
This project is based on the
Seeplan Series
created by
Even Westvang
.


Experienced Team Lead with a demonstrated history of working in the non-profit organization management industry.
Responsible to collect tax invoice and help other jobs. Also got an overview for the whole business process in finance department including oil & gas flow, general accounting, budgeting and product costing.
Responsible to lead a team and doing online and offline marketing about Global Volunteer program in Cluster B AIESEC Surabaya consist of Universitas Airlangga, Universitas Hang Tuah, UPN Veteran Jatim, Universitas Kristen Petra and STIKOM Surabaya.
Responsible to lead a team and make online promotional tools about Global Citizen Program (now known as Global Volunteer).
Responsible to make promotional tools and the selection process of Global Leader Program.
GPA : 3.49


--- layout: post title: Linux is the New Drugs date: 2020-01-29 15:12:21.000000000 +07:00 type: post parent_id: '0' published: true password: '' status: publish categories: - Linux - technology tags: - altruism - computer - kde - kde plasma - kubuntu - linux mint - operating system meta: _thumbnail_id: '1304' _publicize_job_id: '40078314679' timeline_notification: '1580285544' author: login: setyawanaris email<EMAIL_ADDRESS>display_name: Aris Setyawan first_name: Aris last_name: Setyawan permalink: "/2020/01/29/linux-is-the-new-drugs/" excerpt: 'Linux are a robust operating system. Done by many people and communities from various parts of the world with one common interest: creating a better computing system for the world.' ---
It's been five years since I got rid of the operating system made by Bill Gates' giant company, and decided to use the Linux operating system on my laptop.
Initially, I decided to move to Linux only because I realized that my computing needs were not grandiose. I only need a laptop to write, listen to music, watch movies, surf the internet. I don't need software to design, edit videos or photos.
After reading here and there, Linux has fulfilled these needs. Linux is also free because it is licensed as an open-source, can be used without the need to pay like the next door's operating system.
The longer I tried Linux, I began to learn many things. And I'm addicted to Linux (So far I've used 4 different Linux distributions: Ubuntu, Debian, Linux Mint, and Kubuntu). This operating system is not created by a large company that pays its employees to write binary codes.
Therefore, of course there are still many obstacles here and there on Linux (especially when you install the beta version). Sometimes this operating system does not support laptop hardware, the speaker does not sound out, or the laptop touchpad cannot be moved.
Robust operating system. Done by many people and communities from various parts of the world with one common interest: creating a better computing system for the world. It's different from the goal of the giant company's operating system, right? When all is measured by numbers (read: $).
To fix the constraints on Linux, I began to browse Linux forums that were spread on the internet. There is always an answer exist there. On the realm of Linux, people always available to answer your questions. The teachers who volunteer to explore the problems presented by a new user, then explain step by step the solution to the problem.
Linux is a real example of what is called altruism. I'm amazed by how the thing works: Cross-country organic community networks, willing to give their time to coding, polish this operating system to be better and better.
Altruism is happen when someone answer every question in cyberspace forums. Helping a new user in a third world country that she/he doesn't even know, someone who has a name that is hard to spell with the tongue of an English speaker, someone who she/he may never meet in real world.
This altruism is done with the belief that a good life is when other people feel the same kindness as what we feel.
Linux is the new drugs. And I’m definitely addicted.
That's all.


|
FESTR 0.9
Finite-Element Spectral Transfer of Radiation
|
Charge-neutrality constraint helper class. More...
#include <Database.h>
Public Member Functions | |
| StoichZbar (const Database *const dp_in, const Table &tbl_in, const std::string &frt_in, const double nps_in, const unsigned short int nms_in, const std::vector< std::string > &mts_in, const std::vector< double > &fps_in) | |
| Parametrized constructor. More... | |
| StoichZbar (const StoichZbar &o)=default | |
| Copy constructor. More... | |
| StoichZbar & | operator= (const StoichZbar &o)=delete |
| Overloaded assignment operator. More... | |
| double | operator[] (const size_t ine) const |
| Charge-neutrality constraint. More... | |
Charge-neutrality constraint helper class.
Allows nearest_ne() to use nearest() from utils.h, which requires "double operator [](size_t)" method to be available
Definition at line 429 of file Database.h.
| StoichZbar::StoichZbar | ( | const Database *const | dp_in, |
| const Table & | tbl_in, | ||
| const std::string & | frt_in, | ||
| const double | nps_in, | ||
| const unsigned short int | nms_in, | ||
| const std::vector< std::string > & | mts_in, | ||
| const std::vector< double > & | fps_in | ||
| ) |
Parametrized constructor.
| [in] | dp_in | Pointer to parent Database object |
| [in] | tbl_in | Reference to Table object |
| [in] | frt_in | File-name root based on te, tr |
| [in] | nps_in | Total particle number density (particles/cm3) |
| [in] | nms_in | Number of materials |
| [in] | mts_in | Material IDs |
| [in] | fps_in | Fractional populations of materials |
Definition at line 401 of file Database.cpp.
|
default |
Copy constructor.
| [in] | o | StoichZbar object to be copied (shallow copy of dp OK) |
|
delete |
Overloaded assignment operator.
| [in] | o | StoichZbar object to be copied (shallow copy of dp OK) |
| double StoichZbar::operator[] | ( | const size_t | ine | ) | const |
Charge-neutrality constraint.
| [in] | ine | Index of electron-density point from Database |
Definition at line 412 of file Database.cpp.


The Travel & Tourism Competitiveness Report 2015 ranks India 52nd out of 141 countries overall. The report ranks the price competitiveness of India's tourism sector 8th out of 141 countries. It mentions that India has quite good air transport (ranked 35th), particularly given the country’s stage of development, and reasonable ground transport infrastructure (ranked 50th). The country also scores high on natural and cultural resources (ranked 12th).


Carrots or Garbage
Score:
0
Total Plays:
0
| Play Credits:
0
Pick one:
Carrots
OR
Garbage
Results
You guessed:
Results:
Achievements


CrimPapers
Articles published on 1 June 2020
On 1 June 2020, 10 new articles were published in 10 journals.
The Invisible Enclosure: How Community Supervision Inhibits Successful Reentry by Jennifer Marie Ortiz, Kimberly Wrigley
How Similar Are Modern Criminal Syndicates to Traditional Mafias? by Peter Reuter, Letizia Paoli
Were California’s Decarceration Efforts Smart? A Quasi-Experimental Examination of Racial, Ethnic, and Gender Disparities by Aaron Gottlieb, Pajarita Charles, Branden McLeod, Jean Kjellstrand, Janaé Bonsu
Policies on Consensual Sexual Activity in State Prisons by Sarah Gross, Ben Stickle
‘going Missing’ As A Maladaptive Coping Behavior For Adults Experiencing Strain by Laura Huey, Lorna Ferguson
Book Review: Tom Daems, Electronic Monitoring. Tagging Offenders in A Culture of Surveillance by Martine Herzog-Evans
Scrutinizing the U.s. Equality Act 2019: A Feminist Examination of Definitional Changes and Sociolegal Ramifications by Callie H. Burt
The National Death Index As A Source of Homicide Data: A Methodological Exposition of Promises and Pitfalls For Criminologists by Jennifer J. Tostlebe, David C. Pyrooz, Richard G. Rogers, Ryan K. Masters
The Relationship of Offending Style to Psychological and Social Risk Factors in A Sample of Adolescent Males by Sally‐ann Ashton,
maria Ioannou,
laura Hammond,
john Synnott
Are the Effects of Legitimacy and Its Components Invariant? Operationalization and the Generality of Sunshine and Tyler’s Empowerment Hypothesis by Bryanna Fox, Richard K. Moule, Chae M. Jaynes, Megan M. Parry


Account
{{data.name}}
{{data.tp_number}}
Name
Email
Tell us about yourself
TP Number
Update Password
Old Password
New Password
Update