Class S2Polygon
An S2Polygon is an S2Region object that represents a polygon. A polygon is defined by zero or more loops; recall that the interior of a loop is defined to be its left-hand side (see S2Loop). There are two different conventions for creating an S2Polygon:
- InitNested() expects the input loops to be nested hierarchically. The polygon interior then consists of the set of points contained by an odd number of loops. So for example, a circular region with a hole in it would be defined as two CCW loops, with one loop containing the other. The loops can be provided in any order.
When the orientation of the input loops is unknown, the nesting requirement is typically met by calling S2Loop::Normalize() on each loop (which inverts the loop if necessary so that it encloses at most half the sphere). But in fact any set of loops can be used as long as (1) there is no pair of loops that cross, and (2) there is no pair of loops whose union is the entire sphere.
- InitOriented() expects the input loops to be oriented such that the polygon interior is on the left-hand side of every loop. So for example, a circular region with a hole in it would be defined using a CCW outer loop and a CW inner loop. The loop orientations must all be consistent; for example, it is not valid to have one CCW loop nested inside another CCW loop, because the region between the two loops is on the left-hand side of one loop and the right-hand side of the other.
Most clients will not call these methods directly; instead they should use S2Builder, which has better support for dealing with imperfect data.
When the polygon is initialized, the given loops are automatically converted into a canonical form consisting of "shells" and "holes". Shells and holes are both oriented CCW, and are nested hierarchically. The loops are reordered to correspond to a preorder traversal of the nesting hierarchy; InitOriented may also invert some loops. The set of input S2Loop pointers is always preserved; the caller can use this to determine how the loops were reordered if desired.
Polygons may represent any region of the sphere with a polygonal boundary, including the entire sphere (known as the "full" polygon). The full polygon consists of a single full loop (see S2Loop), whereas the empty polygon has no loops at all.
Polygons have the following restrictions:
- Loops may not cross, i.e. the boundary of a loop may not intersect both the interior and exterior of any other loop.
- Loops may not share edges, i.e. if a loop contains an edge AB, then no other loop may contain AB or BA.
- Loops may share vertices, however no vertex may appear twice in a single loop (see S2Loop).
- No loop may be empty. The full loop may appear only in the full polygon.
Constructors
| Name | Description |
|---|---|
this
()
|
The default constructor creates an empty polygon. It can be made non-empty by calling Init(), Decode(), etc. |
this
(loops, s2debugOverride)
|
Convenience constructor that calls InitNested() with the given loops. |
this
(cell)
|
Convenience constructor that creates a polygon with a single loop corresponding to the given cell. |
this
(loop, s2debugOverride)
|
Convenience constructor that calls Init(S2Loop*). Note that this method automatically converts the special empty loop (see S2Loop) into an empty polygon, unlike the vector-of-loops constructor which does not allow empty loops at all. |
Methods
| Name | Description |
|---|---|
approxContains
(b, tolerance)
|
Returns true if this polgyon (A) approximately contains the given other polygon (B). This is true if it is possible to move the vertices of B no further than "tolerance" such that A contains the modified B. |
approxContains
(b, tolerance)
|
Returns true if this polgyon approximately contains the given polyline This is true if it is possible to move the polyline vertices no further than "tolerance" such that the polyline is now contained. |
approxDisjoint
(b, tolerance)
|
Returns true if this polgyon (A) and the given polygon (B) are approximately disjoint. This is true if it is possible to ensure that A and B do not intersect by moving their vertices no further than "tolerance". This implies that in borderline cases where A and B overlap slightly, this method returns true (A and B are approximately disjoint). |
approxDisjoint
(b, tolerance)
|
Returns true if this polgyon is approximately disjoint from the given polyline. This is true if it is possible to avoid intersection by moving their vertices no further than "tolerance". |
approxEquals
(b, tolerance)
|
Return true if two polygons are approximately equal to within the given tolerance. This is true if it is possible to move the vertices of the two polygons so that they contain the same set of points. |
approxIntersectWithPolyline
(a, snap_radius)
|
Similar to IntersectWithPolyline(), except that vertices will be dropped as necessary to ensure that all adjacent vertices in the sequence obtained by concatenating the output polylines will be farther than "snap_radius" apart. Note that this can change the number of output polylines and/or yield single-vertex polylines. |
approxSubtractFromPolyline
(a, snap_radius)
|
Same as ApproxIntersectWithPolyline, but subtracts this polygon from the given polyline. |
boundaryApproxEquals
(b, max_error)
|
Return true if two polygons have the same boundary except for vertex perturbations. Both polygons must have loops with the same cyclic vertex order and the same nesting hierarchy, but the vertex locations are allowed to differ by up to "max_error". |
boundaryEquals
(b)
|
Returns true if two polygons have the same boundary. More precisely, this method requires that both polygons have loops with the same cyclic vertex order and the same nesting hierarchy. (This implies that vertices may be cyclically rotated between corresponding loops, and the loop ordering may be different between the two polygons as long as the nesting hierarchy is the same.) |
boundaryNear
(b, max_error)
|
Return true if two polygons have boundaries that are within "max_error" of each other along their entire lengths. More precisely, there must be a bijection between the two sets of loops such that for each pair of loops, "a_loop->BoundaryNear(b_loop)" is true. |
clone
()
|
GetRectBound() returns essentially tight results, while GetCapBound() might have a lot of extra padding. Both bounds are conservative in that if the loop contains a point P, then the bound contains P also. |
contains
(b)
|
Return true if this polygon contains the given other polygon, i.e. if polygon A contains all points contained by polygon B. |
contains
(b)
|
Return true if this polygon contains the given polyline. This method returns an exact result, according to the following model: |
contains
(p)
|
The point 'p' does not need to be normalized. |
decode
(decoder)
|
Decodes a polygon encoded with Encode(). Returns true on success. |
destructiveUnion
(polygons)
|
Return a polygon which is the union of the given polygons. |
encode
(encoder)
|
Appends a serialized representation of the S2Polygon to "encoder". |
findValidationError
(error)
|
Returns true if this is *not* a valid polygon and sets "error" appropriately. Otherwise returns false and leaves "error" unchanged. |
getArea
()
|
Return the area of the polygon interior, i.e. the region on the left side of an odd number of loops. The return value is between 0 and 4*Pi. |
getCapBound
()
|
Cap surrounding rect bound. |
getCentroid
()
|
Return the true centroid of the polygon multiplied by the area of the polygon (see s2centroids.h for details on centroids). The result is not unit length, so you may want to normalize it. Also note that in general, the centroid may not be contained by the polygon. |
getDistance
(x)
|
Return the distance from the given point to the polygon interior. If the polygon is empty, return S1Angle::Infinity(). "x" should be unit length. |
getDistanceToBoundary
(x)
|
Return the distance from the given point to the polygon boundary. If the polygon is empty or full, return S1Angle::Infinity() (since the polygon has no boundary). "x" should be unit length. |
getLastDescendant
(k)
|
Return the index of the last loop that is contained within loop k. Returns num_loops() - 1 if k < 0. Note that loops are indexed according to a preorder traversal of the nesting hierarchy, so the immediate children of loop k can be found by iterating over loops (k+1)..GetLastDescendant(k) and selecting those whose depth is equal to (loop(k)->depth() + 1). |
getOverlapFractions
(a, b)
|
Return the overlap fractions between two polygons, i.e. the ratios of the area of intersection to the area of each polygon. |
getParent
(k)
|
Return the index of the parent of loop k, or -1 if it has no parent. |
getSnapLevel
()
|
If all of the polygon's vertices happen to be the centers of S2Cells at some level, then return that level, otherwise return -1. See also InitToSnapped() and s2builderutil::S2CellIdSnapFunction. Returns -1 if the polygon has no vertices. |
index
()
|
Returns the built-in S2ShapeIndex associated with every S2Polygon. This can be used in conjunction with the various S2ShapeIndex query classes (S2ClosestEdgeQuery, S2BooleanOperation, etc) to do things beyond what is possible with S2Polygon built-in convenience methods. |
initialize
(loop)
|
Initialize a polygon from a single loop. Note that this method automatically converts the special empty loop (see S2Loop) into an empty polygon, unlike the vector-of-loops InitNested() method which does not allow empty loops at all. |
initializeNested
(loops)
|
Create a polygon from a set of hierarchically nested loops. The polygon interior consists of the points contained by an odd number of loops. (Recall that a loop contains the set of points on its left-hand side.) |
initializeOriented
(loops)
|
Like InitNested(), but expects loops to be oriented such that the polygon interior is on the left-hand side of all loops. This implies that shells and holes should have opposite orientations in the input to this method. (During initialization, loops representing holes will automatically be inverted.) |
initializeToCellUnionBorder
(cells)
|
Initialize this polygon to the outline of the given cell union. In principle this polygon should exactly contain the cell union and this polygon's inverse should not intersect the cell union, but rounding issues may cause this not to be the case. |
initializeToComplement
(a)
|
Initialize this polygon to the complement of the given polygon. |
initializeToIntersection
(a, b)
|
Initialize this polygon to the intersection, union, difference (A - B), or symmetric difference (XOR) of the given two polygons. |
initializeToSimplified
(a, snap_function)
|
Snaps the input polygon according to the given "snap_function" and reduces the number of vertices if possible, while ensuring that no vertex moves further than snap_function.snap_radius(). |
initializeToSimplifiedInCell
(a, cell, snap_radius, boundary_tolerance)
|
Like InitToSimplified, except that any vertices or edges on the boundary of the given S2Cell are preserved if possible. This method requires that the polygon has already been clipped so that it does not extend outside the cell by more than "boundary_tolerance". In other words, it operates on polygons that have already been intersected with a cell. |
initializeToSnapped
(a, snap_function)
|
Snaps the vertices of the given polygon using the given SnapFunction (e.g., s2builderutil::IntLatLngSnapFunction(6) snaps to E6 coordinates). This can change the polygon topology (merging loops, for example), but the resulting polygon is guaranteed to be valid, and no vertex will move by more than snap_function.snap_radius(). See S2Builder for other guarantees (e.g., minimum edge-vertex separation). |
initializeToSnapped
(a, snap_level)
|
Convenience function that snaps the vertices to S2CellId centers at the given level (default level 30, which has S2CellId centers spaced about 1 centimeter apart). Polygons can be efficiently encoded by Encode() after they have been snapped. |
intersects
(b)
|
Return true if this polygon intersects the given other polygon, i.e. if there is a point that is contained by both polygons. |
intersects
(b)
|
Return true if this polygon intersects the given polyline. This method returns an exact result; see Contains(S2Polyline) for details. |
intersectWithPolyline
(a)
|
Intersect this polygon with the polyline "in" and return the resulting zero or more polylines. The polylines are returned in the order they would be encountered by traversing "in" from beginning to end. Note that the output may include polylines with only one vertex, but there will not be any zero-vertex polylines. |
invert
()
|
Invert the polygon (replace it by its complement). |
isEmpty
()
|
Return true if this is the empty polygon (consisting of no loops). |
isFull
()
|
Return true if this is the full polygon (consisting of a single loop that encompasses the entire sphere). |
isNormalized
()
|
Return true if every loop of this polygon shares at most one vertex with its parent loop. Every polygon has a unique normalized form. A polygon can be normalized by passing it through S2Builder (with no snapping) in order to reconstruct the polygon from its edges. |
isValid
()
|
Returns true if this is a valid polygon (including checking whether all the loops are themselves valid). Note that validity is checked automatically during initialization when --s2debug is enabled (true by default in debug binaries). |
numLoops
()
|
Return the number of loops in this polygon. |
numVertices
()
|
Total number of vertices in all loops. |
opEquals
(o)
|
Return true if two polygons have exactly the same loops. The loops must appear in the same order, and corresponding loops must have the same linear vertex ordering (i.e., cyclic rotations are not allowed). |
project
(x)
|
If the given point is contained by the polygon, return it. Otherwise return the closest point on the polygon boundary. If the polygon is empty, return the input argument. Note that the result may or may not be contained by the polygon. "x" should be unit length. |
projectToBoundary
(x)
|
Return the closest point on the polygon boundary to the given point. If the polygon is empty or full, return the input argument (since the polygon has no boundary). "x" should be unit length. |
release
()
|
Releases ownership of and returns the loops of this polygon, and resets the polygon to be empty. |
setS2debugOverride
(s2debugOverride)
|
Destroys the polygon and frees its loops. |
spaceUsed
()
|
Returns the total number of bytes used by the polygon. |
subtractFromPolyline
(a)
|
Same as IntersectWithPolyline, but subtracts this polygon from the given polyline. |
clone
()
|
Returns a deep copy of the region. |
contains
(cell)
|
Returns true if the region completely contains the given cell, otherwise returns false. |
getCapBound
()
|
Returns a bounding spherical cap that contains the region. The bound may not be tight. |
getCellUnionBound
(cellIds)
|
Returns a small collection of S2CellIds whose union covers the region. The cells are not sorted, may have redundancies (such as cells that contain other cells), and may cover much more area than necessary. |
getRectBound
()
|
Returns a bounding latitude-longitude rectangle that contains the region. The bound may not be tight. |
mayIntersect
(cell)
|
If this method returns false, the region does not intersect the given cell. Otherwise, either region intersects the cell, or the intersection relationship could not be determined. |
Inner classes
| Name | Description |
|---|---|
Shape
|
Wrapper class for indexing a polygon (see S2ShapeIndex). Once this object is inserted into an S2ShapeIndex it is owned by that index, and will be automatically deleted when no longer needed by the index. Note that this class does not take ownership of the polygon itself (see OwningShape below). You can also subtype this class to store additional data (see S2Shape for details). |


The Basternae Website:
http://basternae.org.
The Basternae Blog:
http://basternae.org/blog.
Editor:
The Basternae 3 Editor (written by Xangis) is our current editor. It runs natively on Windows using the .NET framework, and can also be used on Linux and MacOS with the Mono framework.
DikuEdit (written by Tavril of Duris and modified by Xangis) was our previous editor. It can be used to create zones, but does not have all the features of the new editor.
Our Codebase:
Magma, the original codebase, was written in C and based on UltraEnvy (a Diku derivative). The new codebase has been written from the ground up using C#. We have been able to re-use some of our fancy custom code from Basternae 2, but we do not use any of the original Diku/Envy code.
We will be releasing a Basternae-specific client that runs in Windows, Linux, and MacOS. So far it works best on Windows. Your old standbys of Zmud, Wintin, Tintin, and telnet will work, but the new client will have some added graphical elements. Note that we're not saying that this is going to be a graphical MUD.
This Guide:
I realize a lot of this guide won't apply to some of our more experienced zone writers who have been with us through the years. Some of it will. Since we're going to be proofreading each one of these, I figured it would be a good idea to at least level with each other on balance so I don't need to change eq stats, mobs, etc for balancing. In regards to your zone theme, I won't change a thing. Just keep it within taste (not too obscene, perverted, etc. or I'll send it back).
Submitting Your Zone:
Send finished zones to<EMAIL_ADDRESS>It's probably a good idea to zip them, since the files can be quite large.
Naming Your Zone:
Please do not send me your zone named forest.are.xml, ruins.are.xml, caves.are.xml, dungeon.are.xml, etc. There are soo many forest/ruins etc zones in the mud, it doesn't help me one bit when I try to go back for your zone and can't remember which of the forest.* it is. Try to name the files for your zone something easily understandable, like HumanHometown.are.xml or something similar if it's the human hometown. We're not on DOS anymore -- we can use long filenames.
---+-o0- Item Stats -0o-+---
We don't need supremely powerful equipment like perm-stoneskin or +30 max-strength swords. Please keep this in mind.
Attribute Bonuses / Penalties:
I'd like items to not boost a stat more than 1-4 for lower level equipment, 5-8 for higher. And remember, offsetting stuff with negatives doesn't necessarily make an item a bad piece of eq. I don't want any max_con, max_anything really in low-level zones, unless there is a very special reason.
Armor Values:
Below is a list of some standard ranges of AC values for the various equipment wear locations (that Xangis wrote up).  AC is based on the 100 to -100 point system. With a full suit of adamantine equipment of high quality, a player would have an unmodified AC of about -60. When dexterity bonuses, spellups, and silly magic earrings/rings are added, a player can easily get to -100.
| cloth | leather | metal | mithril/adamantium/duralithite | |
|---|---|---|---|---|
| badge | 0 | 0 | 1 | 1 |
| head | 1-3 | 3-4 | 7 | 9 |
| earrings/tail | 0 | 0 | 1 | 1 |
| eyes | 1 | 1-2 | 3 | 4 |
| face | 1-2 | 2-3 | 4-5 | 6-7 |
| neck | 1 | 2 | 3 | 4 |
| body | 2-8 | 5-13 | 12-22 | 20-28 |
| about body/cloak | 1-3 | 4-6 | 7-9 | 10-12 |
| on back | 1-2 | 2-3 | 4-5 | 6-7 |
| arms | 1-3 | 4-6 | 7-9 | 10-13 |
| wrist/horn | 1-2 | 3-5 | 6-7 | 8-9 |
| gloves | 1-2 | 2-3 | 4-5 | 6-7 |
| finger | 0 | 0 | 1 | 1 |
| waist | 1-2 | 2-3 | 4-5 | 6-7 |
| legs | 1-3 | 4-6 | 7-9 | 10-13 |
| feet | 1-3 | 2-4 | 5-6 | 7-8 |
| shield | 1-3 | 4-7 | 8-11 | 12-16 |
| Total averages: | 17-41 | 45-74 | 95-121 | 136-162 |
Weapons / +Hitroll and +Damroll:
I'd like to keep the weapons, hitroll, and damroll bonuses all relatively low on easy to obtain items. I don't see a need for an _earring_ to give +2 dam unless it's magic, but I can see a spiked bracer inflicting some combat pain. These are the _maximum_ stats on these items.
| Newbie | Lowbie | Midlevel | Highlevel | Epic | |
|---|---|---|---|---|---|
| (< L10) | (< L25) | (< L40) | (> L40) | (51+ quest items) | |
| Axe | 1d6 | 1d8 | 2d5 | 3d5 | 3d6 |
| Battleaxe | 1d8 | 1d10 | 2d6 | 3d6 | 4d5 |
| Great Axe (2h) | 1d9 | 2d6 | 2d8 | 2d10 | 2d13 |
| Dagger | 1d4 | 1d6 | 2d4 | 3d4 | 4d4 |
| Parrying Dagger | 1d3 | 1d5 | 2d3 | 3d3 | 3d4 |
| Knife | 1d3 | 1d5 | 2d3 | 3d3 | 4d3 |
| Dirk | 1d4 | 1d6 | 2d4 | 3d4 | 4d4 |
| Kris | 1d4 | 1d6 | 2d4 | 3d4 | 4d4 |
| Stiletto | 1d4 | 1d6 | 2d4 | 3d4 | 4d4 |
| Pick | 1d5 | 1d7 | 2d5 | 3d4 | 3d6 |
| Flail | 1d6 | 1d8 | 2d5 | 3d5 | 3d6 |
| Morningstar | 1d7 | 1d9 | 2d6 | 3d5 | 3d7 |
| Hammer | 1d6 | 1d7 | 2d4 | 3d4 | 3d5 |
| Warhammer (2h) | 1d6 | 1d8 | 2d5 | 3d5 | 3d6 |
| Longsword | 1d8 | 1d11 | 2d7 | 3d6 | 4d5 |
| Katana | 1d8 | 1d11 | 2d7 | 3d6 | 3d7 |
| Bastard Sword | 1d9 | 1d12 | 3d4 | 4d4 | 4d6 |
| Rapier | 1d7 | 1d9 | 2d5 | 2d8 | 3d6 |
| Scimitar | 1d8 | 1d10 | 2d7 | 3d6 | 4d5 |
| Khopesh | 1d8 | 1d10 | 2d6 | 2d9 | 2d11 |
| Falchion | 1d8 | 1d10 | 2d6 | 2d9 | 2d12 |
| Two-Handed Sword (2h) | 1d10 | 2d7 | 2d9 | 2d12 | 3d10 |
| Claymore (2h) | 1d10 | 2d7 | 3d6 | 3d7 | 5d5 |
| Flamberge (2h) | 1d10 | 2d7 | 2d9 | 2d11 | 2d14 |
| Mace | 1d6 | 1d8 | 2d5 | 3d5 | 3d6 |
| Spikedmace | 1d7 | 1d9 | 2d6 | 2d8 | 2d10 |
| Spear | 1d6 | 1d8 | 2d5 | 3d5 | 3d6 |
| Spear/Pike (2h) | 1d8 | 1d10 | 2d6 | 3d6 | 3d8 |
| Polearm (2h) | 1d10 | 1d12 | 2d7 | 4d5 | 5d6 |
| Halberd (2h) | 1d10 | 1d13 | 2d8 | 4d6 | 4d8 |
| Glaive (2h) | 1d9 | 1d11 | 2d7 | 2d10 | 3d10 |
| Naginata (2h) | 1d9 | 1d11 | 2d7 | 2d10 | 3d10 |
| Shortsword | 1d6 | 1d8 | 2d5 | 3d5 | 3d6 |
| Cutlass | 1d6 | 1d8 | 2d5 | 3d5 | 3d6 |
| Sabre | 1d7 | 1d9 | 2d6 | 3d6 | 3d7 |
| Wakizashi | 1d6 | 1d8 | 1d11 | 2d8 | 2d10 |
| Club | 1d4 | 1d6 | 2d4 | 2d6 | 2d8 |
| Spikedclub | 1d5 | 1d7 | 2d5 | 2d7 | 2d9 |
| Staff | 1d6 | 1d8 | 2d5 | 3d5 | 3d6 |
| Scepter | 1d5 | 1d7 | 2d4 | 2d7 | 2d9 |
| Quarterstaff (2h) | 1d7 | 1d9 | 2d6 | 2d8 | 3d7 |
| Whip | 1d3 | 1d5 | 2d3 | 3d3 | 3d4 |
| Lance (2h) | 1d10 | 1d12 | 2d7 | 2d10 | 3d10 |
| Sickle | 1d6 | 1d9 | 2d6 | 2d8 | 3d7 |
| Scythe (2h) | 1d9 | 1d11 | 2d7 | 2d10 | 3d10 |
| Fork | 1d5 | 1d8 | 2d5 | 3d4 | 4d5 |
| Trident (2h) | 1d9 | 1d11 | 2d7 | 2d10 | 3d9 |
| Horn | 1d4 | 1d6 | 2d4 | 3d4 | 4d4 |
| Claw | 1d4 | 1d6 | 2d4 | 3d4 | 4d4 |
| Fang | 1d3 | 1d5 | 2d4 | 2d6 | 3d5 |
| Nunchaku | 1d6 | 1d7 | 2d4 | 3d4 | 3d5 |
| Gythka (2h) | 1d9 | 1d11 | 2d7 | 2d10 | 3d9 |
| Chatkcha | 1d6 | 1d8 | 2d5 | 3d5 | 4d5 |
For weighting a one-handed sword so that it isn't dualable, I'd use a weight of 15-25 pounds.
A pretty safe guideline on +hitroll/+damroll on weapons is that it should never be more than one point for every 10 levels, and that's only if it was very hard to obtain. Don't be too henerous with hitroll and damroll. Just because that's the maximum doesn't mean you should go that high.
Weight:
This does matter. It makes a sword not dualable, for instance. It makes players encumbered when they carry 32 sets of adamantite platemail, or not able to move at all!
Extra Bits and Flags:
At risk of repeating myself, please don't add stoneskin eq, etc.
Takeable:
Make sure that all items meant to be taken by a pc are takeable. Quite often people will put items, which aren't worm by mobs but meant for player characters, in an inventory and forget to flag it takeable. People often forget to make keys takeable as well.
Artifacts:
Basternae 3 does not use artifacts. Do not add godlike items to your zone.
Item Descriptions:
Please make sure your objects have a main description (mandatory). You can add extra item descriptions if you like (optional). All descriptions for objects are made under the 'extra object description' menu, in the main edit object menu.
---+-o0- The Zone Itself -0o-+---
Themes:
I'd really like zones to have a purpose. Even if it's as generic as a sacred temple overrun by some demon, try to make a reason for mobs to be there rather than a random grouping of mobs. Also keep in mind the level of your intended players. Level 1s shouldn't be fighting demons/ethereal bossmobs. Level 50s shouldn't be fighting killer squirrels. Please keep zones within Medieval fantasy -- no smurfs, tanks, or space aliens.
Tips on Themes (for those who lack inspiration):
If you have a problem making a purpose for your zone, and are simply uncreative, pick up a newspaper and flip through the stories. Watch some television, or read a magazine. Even looking at some fantasy art on the net can give inspiration to a story. I _do_ however want to keep this based loosely on Medieval fantasy. Use your imagination and if it works, run with it. Please do not use names, places, items, etc straight out of D&D, White Wolf, Games Workshop, FASA, novels by Robert Jordan, Ed Greenwood, Margaret Weis, etc. Be creative!
Duplicate Rooms:
I'd really prefer that do this command minimally, to prevent repetitive rooms in a zone.  Alter the room name, or change the room description noticeably, etc, if you absolutely have to do this. If you submit a zone with a lot of copied rooms, we'll send it back to you to fix the rooms.
Spelling/Grammar:
If you would briefly look over your zone before you send it to me, and catch any obvious spelling or grammar errors, that would make our lives much much easier. Oh, and please nothing too profane. Do not use abbreviations, such as & for and, or 'btw' when you want to say 'by the way'. If you want to say 3, please write out the full 'three' instead of using the number. Please Capitalize Room Titles, with no punctuation in the room title. Refrain from using _underlines_ and *asterisks* to emphasize... if it is really necessary, use ANSI color codes to draw attention.
Indenting the Room Description:
Is not necessary. The MUD will do this automatically. As a guideline, try to write about three lines as a minimum for each room, unless there is a reason. Feel free to make rooms as long as you like, but really short room descriptions make it look as though the zone was either not finished or hastily thrown together.
Portals:
Make these ALLOW_ALL if everyone is to use them. If you want to limit this for some reason (like the necromancer portal), make it ALLOW_WHATEVER_CLASS. This should be a very rare instance that it is not ALLOW_ALL. Make sure the portal is not takeable, and that it has -1 charges to enter.
Secret Exits:
Make sure you hint these in the room descriptions well, or somehow give hints to the average player somewhere in the zone.
Doors:
Make sure there is a key if you make the door locked and not pickable/bashable. Make sure that key is takeable. If the "key" is a word, make sure there is a way to discover that word, by quest or extra room description of some sort.
Quests:
Please make this something the average player can figure out. I don't want quests to turn into an elitist thing that 5 people on a
AGGRO_EVIL/AGGRO_GOOD mobs:
Remember when making quests, that if a mob is aggro_evil an evil player cannot complete this. If this is the case, there had better be a really good reason. Like I said, I don't want this to be an elitist thing, but rather something any *good* or skilled player can do. Please don't use the aggro_one-side-of-the-racewar on every mob in your zone. Even if it may be a hometown, I'm looking for playability not necessarily reality.
Brief Mode:
Brief mode can be made less "appealing" by encouraging builders to continue working on their areas. Suppose you've got an outdoorsy area -- natural disasters and the weather are likely to shape the terrain, so why not drop a creek in the middle of what was once just rolling hills? A flood could do that :)
Keep the area fresh, and players will be FORCED to keep their eyes open, so to speak, unless they enjoy going on autopilot, and not knowing where they'll wind up ;)"
---+-o0- The Mobs -0o-+---
Mob Bits and Flags:
Remember, a hasted mob can waste a newbie. A hasted mob in the astral plane doesn't mean squat. Keep the location and the players you aim to cater your zone to in mind. Stoneskined mobs in newbie zones is kinda silly.
Shopkeepers:
Good idea to flag them sentinel. Shops are made by editing the mob that will be the shopkeeper, and where it says Q/S will be the options for quest/shop info.
---+-o0- Writing a Hometown -+-0o---
There are a lot of considerations in making a hometown that differ from making any other zone. For instance, how high a level should a player be able to get in a hometown? What equipment can be in a hometown? What zones might be related or near the hometown? How 'safe' should a hometown be? Should it be completely unraidable? These are all things you have to keep in mind. I don't want people sitting in their hometowns for most of their time on the mud because it is the best place to be. I'd prefer players maybe getting up to level 20 by mobs, then after that it get much harder or leave for other zones. I'd like the equipment to stay basic to some extent, so people have desire to do the other zones whose purpose is equipment.
Just because a hometown is 'evil' doesn't justify aggros. Make a reason for mobs to want to eat the players who live there if it is aggro. I'd like, however, the goodie hometowns to have fewer aggros.
Shops:
Players need a place to buy the basics as a newbie. I want the equipment in the shops to stay simple and geared to the lowbie player. Things a player would need to buy: water, food, spellbook, quill (use pen for the type), sword, dagger, basic armor, totems (if there are shamans in your race or hometown). Other things that could be bought: rope, disguise kits, torches/lanterns, backpacks, bags, *newbie* magic items. Keep this within reason, and prices in reason. Keep the basic food at like 1-5 copper, spellbook at 1-5 plat, sword at 1-10 plat, armor 1-15 plat.
Note on shop messages:
As of version 3.00f of DikuEdit, the shop messages have been reformatted to use $N for the player's name and $t for the amount of coins in a transaction. The editor will not accept %s any longer. Use the default messages of a new shop as an example of how the messages should be.
Inns, Fountains, and Banks:
Inns are cool, make one. :) If you add a fountain make it basic water. Sell other stuff if you want, but the free drink is just water. Oh, and add a bank.
Justice Mobs:
Justice is still under development, but you can add the mobs and set the justice flags and justice mob numbers on the area settings screen. Remember a Justice clerk to report to, a few mobs that are flagged witness, a jail area, etc. Remember to lock the jail, !bash, !pick. Put the key on the High Justice Clerk type.
Shopkeepers:
Make these all a relatively high level, but not something people will take out all the time for experience. I'm still toying with the idea of making all shopkeepers !exp. Good idea to make them sentinel as well, so they stay in their shops.
Repopulation Points:
Remember to add areas for the players to repop, be it the inn or an actual guild area for that class. I would prefer not in the inn, because it will make players learn their hometowns faster, and will keep some of the spamkilling that can occur to a minimum.
Teachers:
Make some mobs teachers that the players can get spells, skills, etc. Like the arch-mage in the proverbial tower. These are also good mobs to run a quest from. Teachers don't need to be unkillable or higher than mid-level, just something that players can learn from up to midlevel or so.
Experience:
I would like some mobs that a level 1-10 can kill for experience. Those are the levels players learn their hometowns at, so you might as well add some experience to invite them to learn it. I'd prefer players not use the hometown for over level 20 experience, for the most part.
A Note on Religion:
If you are planning a particular deity for your race, let me know. We are considering specializing clerics for racial quirks, and if you have something planned for your zone, we can certainly take that into consideration.
---+-o0- Frequently Asked Questions -0o-+---
"HOW MANY ROOMS SHOULD A ZONE BE?":
"CAN YOU CONNECT ZONES TO THIS ZONE AFTER I SUBMIT IT?"
"I'M NEW, AND HAVE NEVER WRITTEN A ZONE BEFORE."
"HOW DO I MAKE A DOOR LOCKED WITH A KEY?"
"HOW DO I MAKE A PASSWORD FOR A DOOR INSTEAD OF A KEY?"

The best way to think about it, is to remember back to when you were a complete newbie. I remember that the dumb flower faerie robe and flower wreath was like the coolest equipment to me, because it had colorful ansi and I originally came from a mud with little to no ansi. Low levels aren't really about kickass equipment. Even as high levels, players will sometimes wear stuff if it looks too darn cool (despite mediocre stats) and they have a spare slot.
---+-o0- Zones we need -0o-+---
Hometowns are most necesssary. We'd like to have at least one hometown for each race. We'd also love to have permission to use zones that were on Basternae 2 that we don't have yet. All types of zones are pretty welcome at this point.
Revision History:
All versions have most likely been authored by a combination
of Thendar
and Xangis. Others may have contributed, but the
records have not survived.
Version 1 June 1999
Version 2 July 1999
Version 3 July 1999
Version 4 July 1999
Version 5 July 1999
Version 6 July 1999
Version 7 July 27, 1999
Version 8 August 5, 1999
Version 9 September 19, 1999
Version 10 October 27, 2003
Version 11 May 7, 2007
Version 12 April 11, 2010


Why WAZImap? A brief history
-
Since our first democratic elections in South Africa,
Media Monitoring Africa (MMA) has monitored the media’s coverage in the run up to the elections. While our media are overwhelmingly fair we have found a general tendency across all the media monitored (on average 50 different media titles for each period) to have their elections agenda set by political leaders and political parties contesting. With some clear and often excellent exceptions that prove we have quality journalism, the news on offer tends to be event based, and fails to focus on the bigger issues we face.
Despite issues of labour, unemployment, crime, health, education challenges, transformation, sustainability, land, racism, xenophobia, poverty, inequality, gender-based violence and child abuse being so prevalent, we see that each of these issues receive less than 2% of coverage. For a more comprehensive overview of the challenges in coverage and positive trends see our interactive elections analysis of the 2014 national elections at
elections2014.mediamonitoringafrica.org.
Census Reporter
+
A series of meetings and discussions between William, Wellington Radu (MMA head of programmes) Adi and then Greg Kempe (more about him shortly) resulted in the beginnings of a prototype. Through their networks and exposure, Adi and Greg identified an amazing tool that we could adapt, localise and replicate -
Census Reporter. Census Reporter was created in the USA as a Knight News Challenge project and was built by
Joe Germuska, John Keefe, Ryan Pitts, Ian Dees and Sara Schnadt.
Thanks to Census Reporter we already had an incredible tool to base Wazimap on. A huge amount of work still had to take place with localising, bringing in our own data, adding our own additional elements, including using the map as the basic point of entry to the data. By mashing census, elections and media data we had taken an amazing idea and developed it even further.
Journalism Tools
+
We are also aware of the many challenges faced in our newsrooms with shrinking budgets, and fewer journalists being expected to produce more and more stories. The questions we sought to answer included how to disrupt elections coverage and promote stories that cover issues. How could we help journalists get reliable factual information to back up and give context to stories? How could we help media unpack the different political dynamics in different hot spots? And finally how could we help media see elements of how they cover elections?
We had through our work on
NewsTools (Churnalism and NewsDiffs) already started focusing on how to make better use of data and explore data journalism. We had an idea that we could try and mash data from the census carried out by Stats SA together with elections results and media coverage. What we were not sure about was how we could do this.
In a great moment of serendipity, during a break at a Hack Hackers event in Johannesburg, our Director William Bird met up with Adi Eyal from
Code for South Africa. A brief chat and sparkle in Adi’s eyes said he was sure we could do something. He showed us his data journalism work (at that point looking at municipal issues in Cape Town) and we showed him ours (our elections coverage and NewsTools) and agreed that we could take our engagement forward.
Our one challenge was to raise the funds necessary, not only to build a new tool but also to help us update and upgrade our online media monitoring capacity. We used the national general elections in 2014 as our focal point. Our application to the Open Society Foundation for South Africa was successful and which meant we were able to start to realise our new vision for MMA.
Wazimap
+
The name Wazi is derived from the IsiXhosa word “ulwazi” for knowledge which we believed resonated with the aim of Wazimap. It was thanks largely to the coding brilliance of Greg and Adi that that we were able to get a version of Wazimap up and running before our elections in May 2014. Each time we added on requests for new information Greg would work his magic and the results would appear.
At the same time Greg was also working on MMA’s other new creation, “Dexter” a tool to help automate and capture the monitoring data for MMA. As a result of this tool, we were able to incorporate media coverage data into Wazimap. Our future plans will see further integration so that not only is Wazimap a means to gain facts and context to a place or issue, but it will also help journalists and other users see media trends, strengths and weaknesses in coverage.
Wazimap has already proven to be so successful that it is being adapted again for Kenya and Nigeria by Code for South Africa and we have more great things for Wazimap planned.
Play with Wazimap now.


My Linux installation crashed this morning which got me thinking so much about doing regular backups and making sure everything is secure. It’s been a weird week really, one of my mates got his website hacked too so I’ve had to think a lot on web security as well. I’m a Drupaler and he was running Joomla!, the CMS I dabbled in when I got started into web development. I hope to show you some of the cool things one can do to secure a Joomla! Site, with hacktivists on the prowl now more than ever (for better or worse) it helps to take measures against seeing the photo my friend woke up to find . 1.Use safe and secure extensions
Joomla! Is open source with a large developer community. Whereas the positives of that far outweigh the negatives, it makes it a little vulnerable to poor written extensions that may otherwise be unsecure. To find if you are using safe and secure 3rd party extensions, check here:http://docs.joomla.org/Vulnerable_Extensions_List. It’s a compiled list of vulnerable extensions. Bookmark it for future reference.
2.Choose the best host
It’s useless to implement security features and host your website with a host which doesn’t have proper security layers and offer easy access to hackers. It defeats all the work you might otherwise put in. A lot of hosts nowadays have well customized solutions for different CMSs, Joomla!, Drupal, etc. Ask around the Joomla! community for the best host in your location/country. Use this as refence:http://resources.joomla.org/directory/support-services/hosting.html Important: Make sure you ask if the server will have apache mod_php, fast-cgi, suphp or cgi.
3.Quit Legacy mode
To use the latest extensions in security, you need to install the latest extensions which take advantage of the most recent tricks and hacks. What happens when a developer codes is they create an extension compatible with the latest stable joomla release first. Full backwards compatibility is sometimes difficult to achieve because of the changes in the latest software iteration. Put simply, a latest software release fixes bugs and allows developers to do something they couldn’t do with a previous version. Use native extensions.
4. Folder permissions
A lot of newbies have trouble knowing which permissions to have for different files and folders. It’s even worse if you’re moving between different Oss. Remember I said its important to know the hosting environment with regards to apache mod_php, fast-cgi, suphp or cgi? Well here’s why:
a) mod_php
If the files have an owner other than nobody’ or ‘wwwrun’ you need to make sure all change s are done only via ftp.
Use the following permissions:
DocumentRoot directory: 711 (e.g. public_html)
Files: 644
Directories: 755 (specify an owner for each of them)
Cache and tmp directories: 777 (these directories will contain files owned by the web user - apache/nobody/wwwdata, etc)
b) If a Joomla! installation is hosted on apache with fast-cgi, suphp or cgi that runs as a different user, then you should set your permissions as follows:
DocumentRoot directory: 711 (e.g. public_html)
PHP files: 600 (400 if you are truly paranoid)
HTML and image files: 644 (444 if you are truly paranoid)
Directories: 755 (711 if you are paranoid, but not for directories which need to be listed)
Temp and cache directories: 700 (these are written as your user)
6. Install Jsecure
It’s an extension tha hides the admin page. Just to give them a hard time if they want to try and use it to gain access :D
13. Consider SEF URLs
Search Engine Friendly (SEF) urls like article/blogpost instead of the default joomla urls make it harder for hackers to figure how the website is configured. They also help in making sure search engine crawlers to index your website easily. Find a good component to do this for you.
14.Upgrade and back up regularly.
Make sure you keep in touch with the latest instance of joomla. Do ugrades whenever there’s a patch available. Backups should also be done often as well, you never when the site is take down by a hacktivist. Good web hosts do automated back ups but its always safe to have your own, relaunching the site will definitely take less time.
Thanks for reading this article. Its part one of this series on Joomla! Security, follow me on Twitter @mukwenhac to keep updated on new content. I’d appreciate you leave a comment below.
Credits: The Joomla Wiki at: docs.joomla.org


@@include("../partials/head.html")
Oops! Sorry, we couldn’t find the page you were looking for. If you think this is a problem with us, please Contact us
© Geeks. 2021 Codescandy.


--- layout: page title: About header-img: "img/about-bg.png" ---
I'm a Full Stack Web Developer and Educator. I discovered web development through my insatiable curiosity for technology and drive to understand why and how things work. Follow my blog to learn more about my experiences coding, tinkering, and learning!


Manu Tuilagi's girlfriend is Chantelle Garrity with whom he has 18-month-old daughter
Tuilagi is one of the key parts of the England squad and is being cheered on from the stands by his girlfriend and daughter
by Aaron Flanagan, https://www.mirror.co.uk/authors/aaron-flanagan/Manu Tuilagi's settled home life has been credited for keeping his career on track as he prepares to play in the Rugby World Cup Final.
Tuilagi became a father 18 months ago and settling down with fiancee Chantelle Garrity has helped him focus on the latter stages of his international career.
Chantelle is a Manchester University graduate who went on to work in her family's Leicestershire-based construction company as a business development manager.
She now spends the majority of her time at home looking after their daughter, Leilani Lea'auta, whose name translates to 'heavenly flower'.
Chantelle has posted a host of pictures on Instagram of Lani sending messages of support to Tuilagi.
She was over in Tokyo for the early stages of the competition before heading home, while it is unknown if she will be travelling back again for the final.
In three photos featured on Chantelle's Instagram, Lani is seen wearing an England shirt.
A chalkboard is also featured on the pics, one with the message reading "go daddy" from before the semi-final vs New Zealand and another saying "so proud daddy" following the game.
The settled home life that Tuilagi lead is partly responsible for the success he is now having on the pitch, according to England defence coach John Mitchell.
"He's also older now, he's also a father and that brings responsibilities and a different maturity as well," Mitchell said.
"He's in a particularly good space because he is being managed well, he is being led well which then leads to his own leadership taking ownership of it.
"He is just that much older. He's obviously been through a few rugby movies in his time and this stage doesn't always come around."
Buy the official programme for the Rugby World Cup final for just £10 at reachsportshop.com


Welcome to the Spark documentation!
This readme will walk you through navigating and building the Spark documentation, which is included here with the Spark source code. You can also find documentation specific to release versions of Spark at https://spark.apache.org/documentation.html.
Read on to learn more about viewing documentation in plain text (i.e., markdown) or building the documentation yourself. Why build it yourself? So that you have the docs that correspond to whichever version of Spark you currently have checked out of revision control.
The Spark documentation build uses a number of tools to build HTML docs and API docs in Scala, Java, Python, R and SQL.
You need to have Ruby and Python installed. Also install the following libraries:
$ sudo gem install jekyll jekyll-redirect-from rouge
If your ruby version is 3.0 or higher, you should also install webrick
.
$ sudo gem install jekyll jekyll-redirect-from webrick
Note: If you are on a system with both Ruby 1.9 and Ruby 2.0 you may need to replace gem with gem2.0.
If you’d like to generate R documentation, you’ll need to install Pandoc and install these libraries:
$ sudo Rscript -e 'install.packages(c("knitr", "devtools", "testthat", "rmarkdown"), repos="https://cloud.r-project.org/")'
$ sudo Rscript -e 'devtools::install_version("roxygen2", version = "7.1.1", repos="https://cloud.r-project.org/")'
Note: Other versions of roxygen2 might work in SparkR documentation generation but RoxygenNote
field in $SPARK_HOME/R/pkg/DESCRIPTION
is 7.1.1, which is updated if the version is mismatched.
To generate API docs for any language, you’ll need to install these libraries:
$ sudo pip install 'sphinx<3.1.0' mkdocs numpy pydata_sphinx_theme ipython nbsphinx numpydoc
We include the Spark documentation as part of the source (as opposed to using a hosted wiki, such as the github wiki, as the definitive documentation) to enable the documentation to evolve along with the source code and be captured by revision control (currently git). This way the code automatically includes the version of the documentation that is relevant regardless of which version or release you have checked out or downloaded.
In this directory you will find text files formatted using Markdown, with an “.md” suffix. You can
read those text files directly if you want. Start with index.md
.
Execute jekyll build
from the docs/
directory to compile the site. Compiling the site with
Jekyll will create a directory called _site
containing index.html
as well as the rest of the
compiled files.
$ cd docs
$ jekyll build
You can modify the default Jekyll build as follows:
# Skip generating API docs (which takes a while)
$ SKIP_API=1 jekyll build
# Serve content locally on port 4000
$ jekyll serve --watch
# Build the site with extra features used on the live page
$ PRODUCTION=1 jekyll build
You can build just the Spark scaladoc and javadoc by running ./build/sbt unidoc
from the $SPARK_HOME
directory.
Similarly, you can build just the PySpark docs by running make html
from the
$SPARK_HOME/python/docs
directory. Documentation is only generated for classes that are listed as
public in __init__.py
. The SparkR docs can be built by running $SPARK_HOME/R/create-docs.sh
, and
the SQL docs can be built by running $SPARK_HOME/sql/create-docs.sh
after building Spark first.
When you run jekyll build
in the docs
directory, it will also copy over the scaladoc and javadoc for the various
Spark subprojects into the docs
directory (and then also into the _site
directory). We use a
jekyll plugin to run ./build/sbt unidoc
before building the site so if you haven’t run it (recently) it
may take some time as it generates all of the scaladoc and javadoc using Unidoc.
The jekyll plugin also generates the PySpark docs using Sphinx, SparkR docs
using roxygen2 and SQL docs
using MkDocs.
NOTE: To skip the step of building and copying over the Scala, Java, Python, R and SQL API docs, run SKIP_API=1
jekyll build
. In addition, SKIP_SCALADOC=1
, SKIP_PYTHONDOC=1
, SKIP_RDOC=1
and SKIP_SQLDOC=1
can be used
to skip a single step of the corresponding language. SKIP_SCALADOC
indicates skipping both the Scala and Java docs.
jekyll serve --watch
will only watch what’s in docs/
, and it won’t follow symlinks. That means it won’t monitor your API docs under python/docs
or elsewhere.
To work around this limitation for Python, install entr
and run the following in a separate shell:
cd "$SPARK_HOME/python/docs"
find .. -type f -name '*.py' \
| entr -s 'make html && cp -r _build/html/. ../../docs/api/python'
Whenever there is a change to your Python code, entr
will automatically rebuild the Python API docs and copy them to docs/
, thus triggering a Jekyll update.


Jeffrey Epstein guards face charges of falsifying prison records
A grand jury indictment made public in New York on Tuesday accused guards Toval Noel and Michael Thomas of failing to perform checks on Epstein every half hour, as required, and of fabricating log entries to show they had
by James Rodger, https://www.facebook.com/jamesrodgerjournalistTwo prison officers responsible for guarding Jeffrey Epstein on the night he killed himself have been charged with falsifying prison records.
A grand jury indictment made public in New York on Tuesday accused guards Toval Noel and Michael Thomas of failing to perform checks on Epstein every half hour, as required, and of fabricating log entries to show they had.
Prosecutors allege that instead of making their required rounds, the two guards sat at their desks, browsed the internet and walked around the unit's common area.
During one two-hour period, the indictment said, both appeared to have been asleep.
The charges against the officers are the first in connection with the wealthy financier's death in August at the Metropolitan Correctional Centre in New York, where he had been awaiting trial on sex trafficking charges.
The city's medical examiner ruled Epstein's death a suicide. Prosecutors said surveillance cameras confirmed that no one else entered the area in which he was housed.
"As alleged, the defendants had a duty to ensure the safety and security of federal inmates in their care at the Metropolitan Correctional Centre.
"Instead, they repeatedly failed to conduct mandated checks on inmates, and lied on official forms to hide their dereliction," US Attorney Geoffrey S Berman said.
A lawyer for Thomas, Montell Figgins, said both guards are being "scapegoated".
"We feel this a rush to judgment by the US attorney's office," he said. "They're going after the low man on the totem pole here."
Noel's lawyer did not immediately return a phone message.
Both correctional officers appeared in federal court on Tuesday afternoon. Not guilty pleas were entered on their behalf.
Noel and Thomas will both be released on 100,000-dollar bond.


Jevois Info
Refresh
Jevois Live
Horizontal Flip
2x Display
Video Mappings (beta)
Loading failed
Refresh
Jevois CMD
Execute
Clear
Notice
Must run `run.py` with `sudo`. Otherwise, it cannot execute `jevois-cmd`.
Deploy this server with `sudo` on the Internet might have security issues.
Change `setmapping` in `CMD` will not override the camera resolution.


Gen Z Critics is committed to diversity and inclusion. We strongly encourage people from historically underrepresented groups in media and entertainment to apply.
All applicants must be 24 years old or younger. Finalists from previous years may not participate.
Your application must include the following:
- 1 document including the following (this document should not contain any identifying information):
- 1 review of a film that has transported you out of the quarantine/COVID-19 era. Your review must have a creative title. While it is preferred that you submit a review that has not already been published elsewhere, it is not required. The list of suggested films is provided for inspiration; however, as theaters have been closed and movie release dates have been delayed, this year applicants may write about a film from any period.
- 1 essay response to the prompt: “How can we increase interest in film criticism among young people?” This essay should also have a creative title.
- 1 document with the following:
- The full name you would like to be attached to your author's profile, year in school, email, and the city where you’re based
- Name of school, if currently attending
- A short personal bio
- A headshot (should you choose to write reviews for our website, this will be posted, along with your personal bio, on the 2020 members page of our website).
Each part of the application must be written in Times New Roman, 12 pt. font, on a Word document. The review and essay are each limited to two pages (single-spaced); your application, in its entirety, should be formatted like this sample. You can submit your application by emailing it to<EMAIL_ADDRESS>Upon submitting your application, you will immediately become a member of Gen Z Critics.
The deadline for submissions is January 15, 2021, 11:59 PM EST. Five finalists will be determined by professional film critics from organizations such as the New York Film Critics Circle and the Boston Society of Film Critics. All applicants will be contacted with the results via email by mid-March.
Contest winners will be selected to participate in an online round table discussion moderated by a professional film critic. Their work will be published on the Gen Z Critics website, and they will also receive an all-access pass to the National Film Festival for Talented Youth.
Still not sure if you want to apply? Watch this video and reconsider.
Suggested films
- The Photograph
- The Invisible Man
- Bad Boys for Life
- Dolittle
- Portrait of a Lady on Fire
- Miss Americana
- Weathering with You
- The Gentlemen
- The Rhythm Section
- Gretel & Hansel
- Birds of Prey
- The Grudge
- Downhill
- Sonic the Hedgehog
- Fantasy Island
- The Call of the Wild
- Onward
- Bloodshot
- Trolls World Tour
- Scoob!
- The Lovebirds
- Artemis Fowl
- TENET
- Mulan
- The SpongeBob Movie
- Wonder Woman 1984
- Antebellum
- Bill & Ted Face the Music
- The New Mutants
- A Quiet Place Part II
- Never Rarely Sometimes Always
- Bad Education
- Bacurau
- Beastie Boys Story
- Emnma.
- First Cow
- Saint Frances
- Selah and the Spades
- A Shaun the Sheep Movie: Farmageddon
- Tigertail
- To All the Boys: P.S. I Still Love You
- Valley Girl
- The Whistlers
- Wendy
- The French Dispatch
- Snake Eyes
- Soul
- Happiest Season
- No Time To Die
- Raya and the Last Dragon
- Free Guy
- Dune
- West Side Story
- Coming 2 America
- The Croods 2
- Tom and Jerry
- Top Gun: Maverick
- Promising Young Woman
- The Personal History of David Copperfield
- The Woman in the Window


"""
.. module:: checkpoint
:synopsis: Conveniency class to create checkpoints for network training.
"""
import os
import time
from os.path import join, exists, isdir, getmtime
from nutsml.config import Config
"""
.. module:: checkpoint
:synopsis: Creation of checkpoints with network weights and parameters.
"""
[docs]class Checkpoint(object):
"""
A factory for checkpoints to periodically save network weights and other
hyper/configuration parameters.
| Example usage:
|
| def create_network(lr=0.01, momentum=0.9):
| model = Sequential()
| ...
| optimizer = opt.SGD(lr=lr, momentum=momentum)
| model.compile(optimizer=optimizer, metrics=['accuracy'])
| return KerasNetwork(model), optimizer
|
| def parameters(network, optimizer):
| return dict(lr = optimizer.lr, momentum = optimizer.momentum)
|
| def train_network():
| checkpoint = Checkpoint(create_network, parameters)
| network, optimizer = checkpoint.load()
|
| for epoch in xrange(EPOCHS):
| train_err = train_network()
| val_err = validate_network()
|
| if epoch % 10 == 0: # Reduce learning rate every 10 epochs
| optimizer.lr /= 2
|
| checkpoint.save_best(val_err)
|
Checkpoints can also be saved under different names, e.g.
| checkpoint.save_best(val_err, 'checkpoint'+str(epoch))
And specific checkpoints can be loaded:
| network, config = checkpoint.load('checkpoint103')
If no checkpoint is specified the most recent one is loaded.
"""
[docs] def __init__(self, create_net, parameters, checkpointspath='checkpoints'):
"""
Create checkpoint factory.
>>> def create_network(lr=0.1):
... return 'MyNetwork', lr
>>> def parameters(network, lr):
... return dict(lr = lr)
>>> checkpoint = Checkpoint(create_network, parameters)
>>> network, lr = checkpoint.load()
>>> network, lr
('MyNetwork', 0.1)
:param function create_net: Function that takes keyword parameters
and returns a nuts-ml Network and and any other values or objects
needed to describe the state to be checkpointed.
Note: parameters(*create_net()) must work!
:param function parameters: Function that takes output of create_net()
and returns dictionary with parameters (same as the one that are
used in create_net(...))
:param string checkpointspath: Path to folder that will contain
checkpoint folders.
"""
if not exists(checkpointspath):
os.makedirs(checkpointspath)
self.basepath = checkpointspath
self.create_net = create_net
self.parameters = parameters
self.state = None # network and other objets
self.network = None # only the network
self.config = None # bestscore and other checkpoint params
[docs] def dirs(self):
"""
Return full paths to all checkpoint folders.
:return: Paths to all folders under the basedir.
:rtype: list
"""
paths = (join(self.basepath, d) for d in os.listdir(self.basepath))
return [p for p in paths if isdir(p)]
[docs] def latest(self):
"""
Find most recently modified/created checkpoint folder.
:return: Full path to checkpoint folder if it exists otherwise None.
:rtype: str | None
"""
dirs = sorted(self.dirs(), key=getmtime, reverse=True)
return dirs[0] if dirs else None
[docs] def datapaths(self, checkpointname=None):
"""
Return paths to network weights, parameters and config files.
If no checkpoints exist under basedir (None, None, None) is returned.
:param str|None checkpointname: Name of checkpoint. If name is None
the most recent checkpoint is used.
:return: (weightspath, paramspath, configpath) or (None, None, None)
:rtype: tuple
"""
name = checkpointname
if name is None:
path = self.latest()
if path is None:
return None, None, None
else:
path = join(self.basepath, name)
if not exists(path):
os.makedirs(path)
return (join(path, 'weights'), join(path, 'params.json'),
join(path, 'config.json'))
[docs] def save(self, checkpointname='checkpoint'):
"""
Save network weights and parameters under the given name.
:param str checkpointname: Name of checkpoint folder. Path will be
self.basepath/checkpointname
:return: path to checkpoint folder
:rtype: str
"""
weightspath, paramspath, configpath = self.datapaths(checkpointname)
self.config.timestamp = time.time()
self.network.save_weights(weightspath)
state = self.state if hasattr(self.state, '__iter__') else [self.state]
Config(self.parameters(*state)).save(paramspath)
Config(self.config).save(configpath)
return join(self.basepath, checkpointname)
[docs] def save_best(self, score, checkpointname='checkpoint', isloss=False):
"""
Save best network weights and parameters under the given name.
:param float|int score: Some score indicating quality of network.
:param str checkpointname: Name of checkpoint folder.
:param bool isloss: True, score is a loss and lower is better otherwise
higher is better.
:return: path to checkpoint folder
:rtype: str
"""
bestscore = self.config.bestscore
if (bestscore is None
or (isloss and score < bestscore)
or (not isloss and score > bestscore)):
self.config.bestscore = score
self.config.isloss = isloss
self.save(checkpointname)
return join(self.basepath, checkpointname)
[docs] def load(self, checkpointname=None):
"""
Create network, load weights and parameters.
:param str|none checkpointname: Name of checkpoint to load. If None
the most recent checkpoint is used. If no checkpoint exists yet
the network will be created but no weights loaded and the
default configuration will be returned.
:return: whatever self.create_net returns
:rtype: object
"""
weightspath, paramspath, configpath = self.datapaths(checkpointname)
params = Config().load(paramspath) if paramspath else None
state = self.create_net(**params) if params else self.create_net()
self.network = state[0] if hasattr(state, '__iter__') else state
self.state = state
if weightspath:
self.network.load_weights(weightspath)
defaultconfig = Config(bestscore=None, timestamp=None)
self.config = Config().load(configpath) if configpath else defaultconfig
return state


Notebooks
Story: Men who hunted lions with bones
Men who hunted lions with bones
Title
Men who hunted lions with bones
Collection
Summary
Two brothers succesfully hunt Lions with bones, until the younger brother goes out hunting alone and is killed. The elder brother waits at home for his younger brother and the Lions come and kill him.
Comments
1) See also Further details of 'Men who hunted lions with bones', 2) |han≠kass'o heard this story from his maternal grandmother (≠kammi), 3) p.7551v: the names of edible plants and where they are found, including the |xam name for gum arabic, 4) p.7552v: (13 October 1878) the names of edible plants found in Bushmanland (found near water), 5) pp.7553v-7554v: see Edible plants found near water, 6) This story is found in Book VIII-18
Contributors
|han≠kass'o (Klein Jantje) (VIII)
Date
23 (started) – 24 September 1878 (story finished)
Categories
Keywords
Early Race (or First Bushmen) , Early Race (and the men who hunted Lions with bones) , hunting (men who hunted Lions with bones) , hunting (and the Early Race) , Lion (its eyes are thought to be stars) , Lion (its eyes 'shining approach') , Lion (its nature and habits) , Lion (hunted by men of the Early Race with bones) , Lion (eaten by the men of the Early Race) , bones (men who hunted Lions with) , bones (the efficacy of hunting with different) , bones (that can knock a Lion down and kill it) , song (of the man who hunted Lions with bones) , song (the elder brother's) , foolish (men who hunted Lions with bones) , wind (the younger brother's) , wind (of a man who has killed a lion) , wind (of a man who has been killed by a lion) , wind (men who hunted Lions with bones) , stars (the lion's eyes resemble) , stars (the eyes of two Lions resemble) , stars (and men who hunted Lions with bones) , death (of the men who hunted Lions with bones) , plants (edible) , plants (found near water) , plants (found in Bushmanland) , names (of edible plants found in Bushmanland) , names (of plants found near water)
Story Pages
7551-7572


www.defensecode.com/public/DefenseCode_Unix_WildCards_Gone_Wild.txt
This works anywhere in linux that may be using wildcards. Novel idea but still useful.
Example below, but tl;dr is that: there is a command being run like: ls *
When you use *, it's not passed as * to ls. It does an ls and passes every file to ls. So if you create a file like '-la', then when ls is reading every file in the directory....ls -la is passed and executed!
Necessary: touch -- -la
the '--' argument to touch tells touch that there are no further arguments. This allows you to actually create a file named "-la"
Another example: touch -- --checkpoint=1 creates a file called "--checkpoint=1"
Any flag for any binary should be possible. A few are listed in the subpages under Wildcard Injection, but the idea is the same.
Let's check one very basic wildcard argument injection example.
[root@defensecode public]# ls -al
total 20
drwxrwxr-x. 5 leon leon 4096 Oct 28 17:04 .
drwx------. 22 leon leon 4096 Oct 28 16:15 ..
drwxrwxr-x. 2 leon leon 4096 Oct 28 17:04 DIR1
drwxrwxr-x. 2 leon leon 4096 Oct 28 17:04 DIR2
drwxrwxr-x. 2 leon leon 4096 Oct 28 17:04 DIR3
-rw-rw-r--. 1 leon leon 0 Oct 28 17:03 file1.txt
-rw-rw-r--. 1 leon leon 0 Oct 28 17:03 file2.txt
-rw-rw-r--. 1 leon leon 0 Oct 28 17:03 file3.txt
-rw-rw-r--. 1 nobody nobody 0 Oct 28 16:38 -rf
We have directory with few subdirectories and few files in it.
There is also file with '-rf' filename ther owned by the user 'nobody'.
Now, let's run 'rm *' command, and check directory content again.
[root@defensecode public]# rm *
[root@defensecode public]# ls -al
total 8
drwxrwxr-x. 2 leon leon 4096 Oct 28 17:05 .
drwx------. 22 leon leon 4096 Oct 28 16:15 ..
-rw-rw-r--. 1 nobody nobody 0 Oct 28 16:38 -rf
Directory is totally empty, except for '-rf' file in it.
All files and directories were recursively deleted, and it's pretty obvious what happened...
When we started 'rm' command with asterisk argument, all filenames in current
directory were passed as arguments to 'rm' on command line, exactly same as
following line:
[user@defensecode WILD]$ rm DIR1 DIR2 DIR3 file1.txt file2.txt file3.txt -rf
Since there is '-rf' filename in current directory, 'rm' got -rf option as the
last argument, and all files in current directory were recursively deleted.
We can also check that with strace:
[leon@defensecode WILD]$ strace rm *
execve("/bin/rm", ["rm", "DIR1", "DIR2", "DIR3", "file1.txt", "file2.txt",
"file3.txt", "-rf"], [/* 25 vars */]) = 0
^- HERE
Now we know how it's possible to inject arbitrary arguments to the unix
shell programs. In the following chapter we will discuss how we can abuse that
feature to do much more than just recursively delete files.


See the HathiTrust Accessibility page for more information.
This is a failed approach. See more compatible idea.
Bread & Circuses, by Patrick Brantlinger. ... Brantlinger, Patrick.
Rights: Public Domain.
Go to the text-only view of this item.
See the HathiTrust Accessibility page for more information.


Battery Status API
API not supported
Current Status
Is battery in charge?
unavailable
Battery will be charged in
unavailable
seconds
Battery will be discharged in
unavailable
seconds
Current battery level:
unavailable
/1
Log
Clear log


© Ambius, a divion of Rentokal Initial pic. All rights reserved. You are receiving this email because of your relationship with Ambius. If you would like to edit your interests or no longer recieve these emails, you can safely and easily unsubscribe from below.
Our mailing address is Ambius, a division of Rentokil Initial plc 1125 Berkshire Blvd Suite 150 Reading, PA 19610


--- layout: default body_class: impress-not-supported ---
Your browser doesn't support the required features , so you are presented with a simplified version of this page.
For the best experience please use the latest Chrome, Safari or Firefox browser.
{% include title.html %}
{% include pages/mixiner.html %}
{% include pages/github-io.html %}
{% include pages/angular-app.html %}
Use a spacebar or arrow keys to navigate


This Is Why You Should Download This Fantastic App
Want To Know More? Join Our Mailing List.
Summary, once again, of your app's awesomeness
This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
Last updated 3 mins ago
This card has supporting text below as a natural lead-in to additional content.
Last updated 3 mins ago
This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action.
Last updated 3 mins ago


Wakanda is a small nation located in equatorial Africa, it is surrounded by the nations of Narobia, Uganda, Kenya, Somalia, and Ethiopia, and was named for its native inhabitants, the Wakandans. Wakanda is a nation of vast contrasts. While tribal in government and relatively primitive in certain aspects of its culture, Wakanda possesses technology often more sophisticated than anywhere else on earth .[1]


FPS (zero for "random"):
60
Step Freq:
60
Adaptive Step Freq:
FPS (zero for "random"):
30
Step Freq:
30
Adaptive Step Freq:
Start Sim
Read matching blog post for explanation


<EMAIL_ADDRESS>+1212-226-3126
Mon - Sat: 8.00 - 17.00, Sunday Closed
Our Social
Home
About Us
Service
Service
Service Detail
Projects
Project
Project Details
Blog
Our Blog
Blog Detail
Contact
Brooklyn,
New York
849 Diamond Str, 07th Floor, NY 10012, New York,
United State America
Email:
<EMAIL_ADDRESS>Call directly:
+1<PHONE_NUMBER>
Brand Offices:
Allentown PA | Allanta, GA | Chicago, IL | Dallas, TX,
Edison, NJ | Houston, TX
Work Hours:
Mon - Sat: 8.00 - 17.00, Sunday closed
contact us
We Always Here
To Help You
Send Message


|
BomberCat
|
| CApplication | Application is the main class of the game |
| CBomb | Small class to represent a single Bomb |
| CComputerPlayer | |
| CCoordinates | Trivial structure with int x and int y positions |
| CExplosion | Computes the explosion position and size |
| CFileManager | FileManager is "static" class which manages loading/saving from/to files |
| CGame | Game class is core class of the game |
| CHumanPlayerArrows | Class HumanPlayerArrows inherits from Player, defines Human Player playing with arrows + shift |
| CHumanPlayerWASD | Class HumanPlayerWASD inherits from Player, defines Human Player playing with WASD + space |
| CMap | Class Map represents game map made of tiles |
| CPlayer | Base class Player to represent any player * |
| CTextureManager | "static" class to manage texture loading and drawing * |
| CVector2D | Simple struct to represent pair of coordinates x and y, supports == and != operators * |


An entire system for smart city control!
Here you can simulate traffic using our Simulation Zone, perform Scheduling Analysis and specifically test our incredible advanced scheduling algorithm, on given maps, or customized by your choice.


Affiliate program
Main website
THIS NICE PICTURE
will be designed individually
for each program
call to action
(optional)


Functions | |
| get_mod_result (i, add_vec(1), nodes_in_level/2^level) | |
| disp ([ind neigh_ind]) | |
| B (node,:) | |
| B (:, node) | |
| B (:, neigh) | |
| if | mod (val, n+1) |
Variables | |
| function [B] | |
| elseif | type |
| B = A | |
| nodes_in_level = 2^levels | |
| for | level |
| for | j |
| neigh_ind = j*nodes_in_level/2^level+cur_perm(i) | |
| node = level*nodes_in_level+node_ind | |
| neigh = level*nodes_in_level+neigh_ind | |
| for | ne |
| for | add |
| for | time |
| temp = A(node,:) + A(neigh,:) | |
| else | val = mod(val,n+1) |
| B | ( | : | , |
| neigh | |||
| ) |
| B | ( | : | , |
| node | |||
| ) |
| B | ( | node | , |
| : | |||
| ) |
| disp | ( | ) |
| get_mod_result | ( | i | , |
| add_vec(1) | , | ||
| nodes_in_level/2^ | level | ||
| ) |
| for add |
| B = A |
| for j |
| for level |
| neigh = level*nodes_in_level+neigh_ind |
| neigh_ind = j*nodes_in_level/2^level+cur_perm(i) |
| node = level*nodes_in_level+node_ind |
| nodes_in_level = 2^levels |
| for time |


Git repository with all code of this example.
In this example show how authenticate on CppComet and how send personal messages to users via CppComet
Open the example in two or more browsers, Copy your `USER_ID` from one window and paste it into another window in the field labeled 'Identificator of user who must will receive the message` enter the message text and press send. You will see that the message will come only to the window with the same USER_ID you specified when sending it.


!= include('Styles.html'); ?>
Demo form
* Required
What's Your Name?
*
How Much Is A Heap?
*
Measured in grains of sand
What Color Is A Mirror?
*
White
Silver
Black
Green
No color
What Is The Age Of The World?
*
2000 years
5000 years
200,000 years
4.543 billion years
14 billion years
How Much Does A Cloud Weigh?
Upload Nice Pic
Choose file
No file chosen
!= include('Scripts.html'); ?>


{% extends "base.html" %} {% block title %}Lexwheels Admin page{% endblock %} {% block navbar %} {% if g.user %}
A place to transform owners and their cars.


Toggle navigation
Rohit's House of Travel
Contact Us
About Us
Home
About Us
Sample website made by Rohit Ramesh using Bootstrap.
Feel free to check it out.


Save your business money by moving to VOIPconnect
by PartnerMany South African businesses are still using traditional phone lines, which means they are losing out on the benefits of next-generation VoIP services.
VoIP and cloud communications offer companies high-quality voice services at a fraction of the cost of PSTN or mobile calls.
For companies looking to migrate from traditional Telkom lines, Connection Telecom’s VOIPconnect product is a logical choice.
Excellent pricing
VOIPconnect offers companies a reliable and high-quality voice service with competitive pricing and free inter-company and inter-community calls.
Apart from cost savings and convenience, companies also get a real-time view of call activity and can prevent potential call abuse.
This service works over numerous connectivity methods – including fibre, wireless, and fixed-LTE – and delivers exceptional voice quality.
Businesses will also enjoy excellent security and lower infrastructure costs thanks to Connection Telecom’s hosted platform in Teraco’s data centres.
To move your service to Connection Telecom is quick and easy. Furthermore, companies have the option to keep their existing numbers or use new non-geographic and geographic numbers.
For more information on VOIPconnect, visit Connection Telecoms’ voice and connectivity page.
This article was published in partnership with Connection Telecom.


6 Week 6: Dotplots
6.1 Goals
- You’ll learn how to draw simple dotcharts…
- and why they’re better than pie charts.
- You’ll gain some experience in debugging R code with typos :)
6.2 Pie charts, bar charts, and dotplots
The three graphs below all show the same data (the proportion of sales of a pie producer by pie taste).3
The graph on the left is a traditional pie chart. Though common, this type of graph has serious shortcomings, for which reason it should rarely be used:
Pie charts aren’t very flexible: When the number of categories is larger than here, pie charts are hardly comprehensible. It’s also difficult to add additional information to pie charts (e.g., the proportion of sales by taste the year before; see below).
Readers gauge the numbers (in this case: the proportions) that the pie chart represents less accurately than when they’re presented in a bar chart or in a dot plot (Cleveland & McGill 1984).
The graph in the middle is a bar chart, the one of the right a dot plot. Both are better choices than pie charts. For one things, they’re more flexible. For instance, you can add the sales from the year before to both graphs—as separate bars or by using different symbols. This would be difficult to accomplish in a pie chart:
I prefer dot plots because it’s easier to visualise a large number of categories and I find them less ‘busy’.
Tip: If you prefer bar charts: It’s usually better to plot the bars next to each other rather than to stack them on top of each other.
Tip: Don’t use pie charts.
Incidentally, if you enter the following command in R,
the help page for the pie()
function opens.
Then scroll down to the section Note
.
# Help page for pie()
?pie
6.3 Tutorial
We’ll use data from Vanhove (2017) (see Moodle). For this study, I recruited 175 native speakers of Dutch from Belgium and the Netherlands. I showed them 44 German words with Dutch cognates (e.g., Stadt (NL stad) or Schiff (NL schip)) and asked them to choose their gender-marked definitive article (der (masculine), die (feminine), das (neuter)). Dutch and German are closely related languages, but there are a number of cognates whose grammatical gender differs between both languages. The Dutch word strand (beach), for instance, is neuter, whereas the German word Strand is masculine. One of the research questions was if Belgian and Dutch participants were more likely to choose the neuter article das if the German word’s Dutch cognate is neuter than when it has common gender.4
Read in this dataset in R
:
<- read_csv(here("data", "GermanArticleChoices.csv")) dat
## Rows: 88 Columns: 6
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (5): Stimulus, Country, DutchCognate, GermanGender, DutchGender
## dbl (1): NeuterResponses
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
The first few rows should look as follows:
head(dat)
## # A tibble: 6 × 6
## Stimulus Country NeuterResponses DutchCognate GermanGender DutchGender
## <chr> <chr> <dbl> <chr> <chr> <chr>
## 1 Stadt Belgium 0 stad feminine common
## 2 Stadt The Netherlands 0 stad feminine common
## 3 Saal Belgium 0 zaal masculine common
## 4 Saal The Netherlands 0.0674 zaal masculine common
## 5 Nacht Belgium 0.0652 nacht feminine common
## 6 Nacht The Netherlands 0.0225 nacht feminine common
The column NeuterResponses
contains the proportion of neuter article
(das)
choices per German word (Stimulus
) per (Country
).
The column GermanGender
contains the word’s correct gender (in German);
the column DutchGender
contains the grammatical gender of the word’s Dutch cognate.
6.3.1 A first attempt
We can plot the proportion of das choices per word separately per country (Belgium vs. the Netherlands). This will show us how strongly the response pattern varies per word and whether Belgian and Dutch speakers of Dutch show different preferences. The code and comments show how to build this dot plot:
Tip: You’ll learn more by typing in these commands yourself and adding your own comments than by copy-pasting them. For this reason, I added a couple of typos and left out a couple of commas and brackets – all for you to find and fix, enjoy!
ggplot(dat,
aes(x = NeuteResponses,
y = Stimulus,
shape = Country)) +
geom_point()
6.3.2 Highlight differences between different categories of stimuli
The plot above doesn’t offer an answer to the research question
since the difference between stimuli with different Dutch genders
isn’t highlighted.
To accomplish this, we can plot stimuli with neuter cognates and
those with common-gender cognates in different boxes (facetting,
see the tutorial on line charts).
(To see what scales = "free_y"
and space = "free_y"
accomplish,
leave these parameters out of the call, i.e., using just facet_grid(DutchGender ~.)
.)
ggplot(dat,
aes(x = NeuterResponses,
y = Stimulus
shape = Country)) +
geom_point() +
facet_grid(rows = vars(DutchGender), # split up vertically by Dutch gender
scales = "free_y",
space = "free_y")
This graph shows pretty clearly that both Belgian and Dutch speakers of Dutch pick das more often if the German word has a neuter-gender cognate than when it has a common-gender cognate: The points in the lower box lie more to the right than those in the upper box. With a single exception (Boot), there is no overlap between these two distributions.
Additionally, the responses of Belgian and Dutch participants don’t seem to vary much from one another. (For instance, we don’t observe that most triangles lie to the right of the circles or that Belgian participants prefer das for Wurst and Dutch participants don’t.)
6.3.3 A final attempt
The previous graph is good enough. But we can do better still. German is taught in school in both Flanders and the Netherlands, and at least some participants will have known which words are neuter in German and which aren’t. So some of the variation between the stimuli will be attributable to the stimuli’s German gender. To highlight this, we can split up the graph not only by the words’ Dutch gender, but also by their German gender. And we still have to label the axes!
ggplot(dat,
aes(x = NeuterResponses,
y = Stimulus,
shape = Country)) +
geom_point()
facet_grid(rows = vars(DutchGender, GermanGender), # split up by Dutch and German gender
scales = "free_y", space = "free_y") +
xlab("Proportion 'das'") + # axis label for x
ylab("") # the y axis is self-explanatory
The upper three boxes show feminine, masculine and neuter German words with common-gender cognates; the lower three boxes show feminine, masculine and neuter German words with neuter-gender cognates. The graph shows that the factor Dutch gender is the most important determinant of the participants’ article choices. But the factor German gender also plays a role: When a German word is neuter, both Belgian and Dutch people choose das more often than when it’s feminine or masculine.
6.3.4 Optional: Possible improvements and further information
- Now the words are sorted alphabetically in each box. But this order can be customised.
- The symbols used in the graph above are difficult to distinguish optically. They, too, can be changed.
If you’re interested in these possibilities, please refer to https://janhove.github.io/reporting/2016/08/30/drawing-a-dotplot.
The versatility and usefulness of dotplots in linguistics is highlighted by Sönning (2016). Another useful introduction is Jacoby (2006).
I don’t expect you to carry out these additional steps. But perhaps they’re useful to you in the future.
6.4 For other kinds of data
In the tutorial above, we worked with proportions. But you can use dot plots for other types of data, too. See http://perceptualedge.com/articles/b-eye/dot_plots.pdf for some examples.
6.5 Exercise
Baten (2011) was interested in the acquisition of the German case system
by Flemish pupils. He reported his results in elaborate tables;
we’ll focus on the accuracy data for accusative and dative pronouns
(e.g., dich vs. dir) that occur after prepositions.
I tabulated the results in ErgebniseBaten2011.csv
(Moodle).
This data set contains 4 columns:
Grade
: Baten’s participants were pupils from 10th, 11th and 12th grade.TargetCase
: The correct form was either an accusative or a dative pronoun.Position
: Some pronouns occurred after a preposition that is either always followed by an accusative (e.g., bis) or always followed by a dative (e.g., nach); these are marked asfixed-preposition
. Other pronouns occurred after a preposition that could be followed by both an accusative or a dative, depending on its meaning (e.g., in and auf;wechsel-preposition
).
Below you’ll find two graphs. Both highlight that there’s a huge leap in accuracy between 10th and 11th grade. Moreover, accuracy is higher for the ‘fixed’ prepositions than for the ‘Wechselpräpositionen’. (This is slightly clearer in the second graph, I think.)
Your task: Draw both graphs yourself. Hand in the compiled HTML report.


--- layout: default title: 'Research' ---
My research interests lie in small area estimation, spatial statistics, computational statistics, and Bayesian inference. Most recently, I have been working on accounting for positional error in spatial models, and on developing new methods for aggregating spatial predictions with respect to a population distribution in a survey statistical context. I am also interested in statistics applications in earth sciences. I have been involved in helping to develop both the SUMMER and fields packages in R. SUMMER (Spatio-Temporal Under-Five Mortality Methods for Estimation) is a package for spatio-temporal smooth of complex survey data, and fields and a package with classical methods for spatial statistics modeling and spatial data visualization. I am always interested in forming new collaborations, including interdisciplinary ones. If this is something you are interested in, please contact me. You can find detailed information about my publications, software, talks, and other work on my CV.


Response Status Code
The same way you can specify a response model, you can also declare the HTTP status code used for the response with the parameter status_code
in any of the path operations:
@app.get()
@app.post()
@app.put()
@app.delete()
- etc.
from fastapi import FastAPI
app = FastAPI()
@app.post("/items/", status_code=201)
async def create_item(name: str):
return {"name": name}
Note
Notice that status_code
is a parameter of the "decorator" method (get
, post
, etc). Not of your path operation function, like all the parameters and body.
The status_code
parameter receives a number with the HTTP status code.
It will:
- Return that status code in the response.
- Document it as such in the OpenAPI schema (and so, in the user interfaces):
Note
Some response codes (see the next section) indicate that the response does not have a body.
FastAPI knows this, and will produce OpenAPI docs that state there is no response body.
About HTTP status codes¶
Note
If you already know what HTTP status codes are, skip to the next section.
In HTTP, you send a numeric status code of 3 digits as part of the response.
These status codes have a name associated to recognize them, but the important part is the number.
In short:
100
and above are for "Information". You rarely use them directly. Responses with these status codes cannot have a body.200
and above are for "Successful" responses. These are the ones you would use the most.200
is the default status code, which means everything was "OK".- Another example would be
201
, "Created". It is commonly used after creating a new record in the database. - A special case is
204
, "No Content". This response is used when there is no content to return to the client, and so the response must not have a body.
300
and above are for "Redirection". Responses with these status codes may or may not have a body, except for304
, "Not Modified", which must not have one.400
and above are for "Client error" responses. These are the second type you would probably use the most.- An example is
404
, for a "Not Found" response. - For generic errors from the client, you can just use
400
.
- An example is
500
and above are for server errors. You almost never use them directly. When something goes wrong at some part in your application code, or server, it will automatically return one of these status codes.
Tip
To know more about each status code and which code is for what, check the MDN documentation about HTTP status codes.
Shortcut to remember the names¶
Let's see the previous example again:
from fastapi import FastAPI
app = FastAPI()
@app.post("/items/", status_code=201)
async def create_item(name: str):
return {"name": name}
201
is the status code for "Created".
But you don't have to memorize what each of these codes mean.
You can use the convenience variables from starlette.status
.
from fastapi import FastAPI
from starlette.status import HTTP_201_CREATED
app = FastAPI()
@app.post("/items/", status_code=HTTP_201_CREATED)
async def create_item(name: str):
return {"name": name}
They are just a convenience, they hold the same number, but that way you can use the editor's autocomplete to find them:
Changing the default¶
Later, in the Advanced User Guide, you will see how to return a different status code than the default you are declaring here.


- SanityCheck - Class in cpsr
-
- SanityCheck() - Constructor for class cpsr.SanityCheck
-
- SanityCheck.SanityPlanner - Class in cpsr
-
- SanityCheck.SanityPlanner() - Constructor for class cpsr.SanityCheck.SanityPlanner
-
- SanityCheck.SanitySimulator - Class in cpsr
-
- SanityCheck.SanitySimulator(long) - Constructor for class cpsr.SanityCheck.SanitySimulator
-
- sanityCPSRCheck() - Method in class cpsr.SanityCheck
-
- sanityTPSRCheck() - Method in class cpsr.SanityCheck
-
- serializeDataSet(DataSet, String) - Static method in class cpsr.stats.Basic
-
Serializes a DataSet to Results folder.
- setContent(C) - Method in class afest.datastructures.tree.decision.DTNode
-
Set the label of the node to the given label.
- setData(DataSet) - Method in class cpsr.environment.components.Action
-
Sets the data set.
- setData(DataSet) - Method in class cpsr.environment.components.Observation
-
Sets the data set.
- setLeftChild(N) - Method in class afest.datastructures.tree.BinaryTreeNode
-
- setLeftChild(N) - Method in interface afest.datastructures.tree.interfaces.IBinaryTreeNode
-
Set the left child of the node.
- setMaxID(int) - Method in class cpsr.environment.components.Action
-
- setMaxID(int) - Method in class cpsr.environment.components.Observation
-
- setMaxRunLength(int) - Method in class cpsr.environment.simulation.ASimulator
-
- setMaxRunLength(int) - Method in interface cpsr.environment.simulation.ISimulator
-
Sets the max run length
- setParent(N) - Method in class afest.datastructures.tree.BinaryTreeNode
-
- setParent(N) - Method in interface afest.datastructures.tree.interfaces.IBinaryTreeNode
-
Set the parent of the node.
- setRightChild(N) - Method in class afest.datastructures.tree.BinaryTreeNode
-
- setRightChild(N) - Method in interface afest.datastructures.tree.interfaces.IBinaryTreeNode
-
Set the right child of the node.
- setSplit(T) - Method in class afest.datastructures.tree.decision.DTNode
-
Set the split of this node to the given split.
- setTrainData(HashMap<String, ArrayList<Double>>, ArrayList<Double>) - Method in class cpsr.planning.ertapprox.AERTEnsembleGrower
-
Sets training data for growing ERTEnsembles
- simulateTestRuns(int, APSRPlanner) - Method in class cpsr.environment.simulation.ASimulator
-
- simulateTestRuns(int, APSRPlanner) - Method in interface cpsr.environment.simulation.ISimulator
-
- simulateTrainingRuns(int, TrainingDataSet) - Method in class cpsr.environment.simulation.ASimulator
-
- simulateTrainingRuns(int, APSRPlanner, TrainingDataSet) - Method in class cpsr.environment.simulation.ASimulator
-
- simulateTrainingRuns(int, TrainingDataSet) - Method in interface cpsr.environment.simulation.ISimulator
-
Performs simulation using random actions.
- simulateTrainingRuns(int, APSRPlanner, TrainingDataSet) - Method in interface cpsr.environment.simulation.ISimulator
-
- SingleEnsembleERTQPlanner - Class in cpsr.planning.ertapprox.singleensemble
-
Class for planning with fitted q and single ensemble.
- SingleEnsembleERTQPlanner(APSR, TrainingDataSet) - Constructor for class cpsr.planning.ertapprox.singleensemble.SingleEnsembleERTQPlanner
-
Constructs fittedQ from PSR and DataSet.
- SingleEnsembleFeatureBuilder - Class in cpsr.planning.ertapprox.singleensemble
-
Class defines methods used to build features for use
use Q-iteration planning algorithm.
- SingleEnsembleFeatureBuilder(TrainingDataSet, APSR) - Constructor for class cpsr.planning.ertapprox.singleensemble.SingleEnsembleFeatureBuilder
-
Constructs feature builder from an DataSet and PSR.
- SingleEnsembleQFunction - Class in cpsr.planning.ertapprox.singleensemble
-
Class for Q-Functions implicitly represented by
single ensemble of trees.
- SingleEnsembleQFunction(DataSet, APSR, SingleERTEnsemble) - Constructor for class cpsr.planning.ertapprox.singleensemble.SingleEnsembleQFunction
-
Constructs SingleEnsembleQFunction from DataSet, PSR, and an
ERT ensemble.
- SingleERTEnsemble - Class in cpsr.planning.ertapprox.singleensemble
-
- SingleERTEnsemble(Forest<String, Double>, DataSet) - Constructor for class cpsr.planning.ertapprox.singleensemble.SingleERTEnsemble
-
Creates and ERTEnsemble from a Forest object defined in afest package
- SingleERTEnsembleGrower - Class in cpsr.planning.ertapprox.singleensemble
-
- SingleERTEnsembleGrower(DataSet, IPSR) - Constructor for class cpsr.planning.ertapprox.singleensemble.SingleERTEnsembleGrower
-
Constructs SingleERTEnsembleGrower from DataSet and PSR
- size() - Method in class afest.datastructures.tree.decision.erts.ERTMemoryLessPoint
-
- size() - Method in class afest.datastructures.tree.decision.erts.ERTPoint
-
- size() - Method in class afest.datastructures.tree.decision.Forest
-
Return the size of the forest (number of trees contained in it).
- size() - Method in interface afest.datastructures.tree.decision.interfaces.IPoint
-
Return the number of features contained in the Point.
- size() - Method in class cpsr.environment.components.ActObSequenceSet
-
- split(T) - Method in class afest.datastructures.tree.decision.DTNode
-
Return true if the element is contained in the split, false otherwise.
- STABILITY_CONSTANT - Static variable in class cpsr.model.TPSR
-
- std(List<Double>, double) - Static method in class cpsr.stats.Basic
-
- std(List<Double>) - Static method in class cpsr.stats.Basic
-
- sum(List<Double>) - Static method in class cpsr.stats.Basic
-


“Bubble Gum, Bubble Gum, in the dish, how many pieces do you wish?”
Alex and Karyn were at it again.
The rules of the game are quite simple. Given p people (p > 0), one of the p people is chosen to pick a number n (n > p) representing the number of pieces of bubble gum desired. Once this value is chosen, the people are iterated through, one at a time, starting at 1, from “left” to “right”, starting with the person who chose the number. Iterating is done in a circular fashion, meaning that once the person on the far right is reached, the next person in the iteration will be the person on the far left. Upon reaching n, the person at that location is the winner.
Given a list of names, followed by the name of the person choosing the number of pieces of bubble gum, followed by the number that person chose, determine who wins the game.
The first value in the input file will be an integer t (0 < t < 1000) representing the number of test cases in the input file. Following this, on a case by case basis, will be a list of the names of the people (p), on a single line. Names will be no larger than 20 characters in length and all names are unique. There will be no more than 20 names. Each name is followed by a space, save for the last name, which is followed by a newline. On the next line is the name of the person choosing the number of pieces of bubble gum, followed by a newline. The test case is concluded with the number of pieces of gum n (p < n < 1000), which is also followed by a newline.
The first value in the input file will be an integer t (0 < t < 1000) representing the number of test cases in the input file. Following this, on a case by case basis, will be a list of the names of the people (p), on a single line. Names will be no larger than 20 characters in length and all names are unique. There will be no more than 20 names. Each name is followed by a space, save for the last name, which is followed by a newline. On the next line is the name of the person choosing the number of pieces of bubble gum, followed by a newline. The test case is concluded with the number of pieces of gum n (p < n < 1000), which is also followed by a newline.
3
Alex Karyn Maude
Karyn
5
Alex Karyn Maude
Alex
6
Alex Karyn Zach Becca Maude
Zach
8
Maude
Maude
Maude
(adsbygoogle = window.adsbygoogle || []).push({});
不要脸，吃你妈的B去
不要脸，吃你妈的B去
不要脸，吃你妈的B去
不要脸，吃你妈的B去
不要脸，吃你妈的B去
不要脸，吃你妈的B去
不要脸，吃你妈的B去
不要脸，吃你妈的B去
不要脸，吃你妈的B去
不要脸，吃你妈的B去
不要脸，吃你妈的B去
有些说不通吧，只有1个孩子肯定是男孩了
没错的，再乘以m的就多余了
对，还是这种实现比较好理解。虽然效率有点低
第二块代码if(it != mp.end())应改为if(it != mp.end() && (i+1)!=(it->second +1))；因为第二种解法如果数组有重复元素 就不正确
总结的很全面，学习了！
根本过不了。。。。
清华也会出这么无聊的题
int L[m+1][n+1];这样定义出错，这个在gcc上可以编译通过 在VS上不行 应该改为new 或者vector
m /= i; 是一直在变的。参考这一篇关于质因数的http://www.acmerblog.com/integer-factorization-5124.html
Dijkstra 不适合有负权值的边吧
这配图…..
第二个方法挺不错。NewHead代表新的头节点，通过递归找到最后一个节点之后，就把这个节点赋给NewHead，然后一直返回返回，中途这个值是没有变化的，一边返回一边把相应的指针方向颠倒，最后结束时返回新的头节点到主函数。
代码可真够长的！
遍历了所有的情况(2^n)，tmp数组就是由当前遍历的状态s推算出的


CA Module
RA
Create New RA Office
Create New RA Officer
Delete RA Officer
CA
View All Certificate Requests
Verify Requests
Authorize Requests
Logout
Role
CA Office
Pending CA Verification
Pending CA Authorization
Certificate Requests Overview
Select RA Office
Total Requests
{{ctrl.loadedData.totalRequests}}
Pending RA Verification
{{ctrl.loadedData.pendingRaVerification}}
Pending RA Authorization
{{ctrl.loadedData.pendingRaAuthorization}}
Pending CA Verification
{{ctrl.loadedData.pendingCaVerification}}
Pending CA Authorization
{{ctrl.loadedData.pendingCaAuthorization}}
Processed By CA, Ready to Generate
{{ctrl.loadedData.readyToGenerate}}
Certificate Ready to Download
{{ctrl.loadedData.certificateReadyToDownload}}
Cancelled
{{ctrl.loadedData.cancelled}}
Todo List
Verify Requests
Authorize Requests


About the ADA
The Australian Data Archive (ADA) is a consortium of leading national Australian universities, managed by the Australian National University (ANU). ADA was established at the ANU in 1981 with a brief to provide a national service for the collection and preservation of computer readable data relating to social, political and economic affairs and to make these data available for further analysis.
A team of professional data archivists, advised by a panel of leading social scientists, provides both stewardship and outreach services to the Australian community. The archive:
- acquires, documents, preserves and disseminates data online to a broad range of social science researchers in the university, government, and other sectors
- provides the only comprehensive social science data collection in Australia, with a catalogue of around 2070 data sets
- holds data from Australian surveys, opinion polls and censuses and includes data from other countries within the Asia Pacific region
- is continually expanding and diversifying its collection
- provides specialist services within specific subject areas, including Indigenous studies, electoral behaviour, criminology and some humanities disciplines, and within specific data types, including quantitative, qualitative, time series and panel data, and historical statistics
- locates and manages access to overseas social science data sets required by Australian based researchers
- adopts, develops and applies standards in line with international best practice
- belongs to international organisations (such as the International Federation of Data Organizations and the International Association of Social Science Information Service and Technology) and plays a major role in cross-national collaborative projects
- plays an important role on behalf of the Australian Research Council (ARC) through the management and dissemination of ARC funded data collections arising from Discovery and Linkage grants
As well as the central management at the ANU, archive nodes have been progressively established across the country. These currently include The University of Queensland, the University of Western Australia, the University of Technology, Sydney and the University of Melbourne. These nodes provide a national coverage of specialist services and thematic archives with particular foci.
The ANU Supercomputer Facility provides the online data services and supporting infrastructure, and develops this cyberinfrastructure for the needs of the consortium.