Module std.container
This module defines generic containers.
Construction
To implement the different containers both struct and class based approaches have been used. std.container_util.make allows for uniform construction with either approach.
import std.container; // Construct a red-black tree and an array both containing the values 1, 2, 3. // RedBlackTree should typically be allocated usingnew
RedBlackTree!int rbTree = new RedBlackTree!int(1, 2, 3); // Butnew
should not be used with Array Array!int array = Array!int(1, 2, 3); //make
hides the differences RedBlackTree!int rbTree2 = make!(RedBlackTree!int)(1, 2, 3); Array!int array2 = make!(Array!int)(1, 2, 3);
Note that make
can infer the element type from the given arguments.
import std.container; auto rbTree = make!RedBlackTree(1, 2, 3); // RedBlackTree!int auto array = make!Array("1", "2", "3"); // Array!string
Reference semantics
All containers have reference semantics, which means that after assignment both variables refer to the same underlying data.
To make a copy of a container, use the c.dup
container primitive.
import std.container, std.range; Array!int originalArray = make!(Array!int)(1, 2, 3); Array!int secondArray = originalArray; assert(equal(originalArray[], secondArray[])); // changing one instance changes the other one as well! originalArray[0] = 12; assert(secondArray[0] == 12); // secondArray now refers to an independent copy of originalArray secondArray = originalArray.dup; secondArray[0] = 1; // assert that originalArray has not been effected assert(originalArray[0] == 12);
Attention: If the container is implemented as a class, using an uninitialized instance can cause a null pointer dereference.
import std.container; RedBlackTree!int rbTree; rbTree.insert(5); // null pointer dereference
Using an uninitialized struct-based container will work, because the struct intializes itself upon use; however, up to this point the container will not have an identity and assignment does not create two references to the same data.
import std.container; // create an uninitialized array Array!int array1; // array2 does _not_ refer to array1 Array!int array2 = array1; array2.insertBack(42); // thus array1 will not be affected assert(array1.empty); // after initialization reference semantics work as expected array1 = array2; // now effects array2 as well array1.removeBack(); assert(array2.empty);
It is therefore recommended to always construct containers using std.container_util.make.
This is in fact necessary to put containers into another container.
For example, to construct an Array
of ten empty Array
s, use
the following that calls make
ten times.
import std.range, std.container, std.algorithm; Array!(Array!int) arrayOfArrays = make!(Array!(Array!int))( repeat(0, 10).map!(x => make!(Array!int)) );
Submodules
This module consists of the following submodules:
- The std.container.array module provides an array type with deterministic control of memory, not reliant on the GC unlike built-in arrays.
- The std.container.binaryheap module provides a binary heap implementation that can be applied to any user-provided random-access range.
- The std.container.dlist module provides a doubly-linked list implementation.
- The std.container.rbtree module implements red-black trees.
- The std.container.slist module implements singly-linked lists.
- The std.container.util module contains some generic tools commonly used by container implementations.
The primary range of a container
While some containers offer direct access to their elements e.g. via
opIndex
, c.front
or c.back
, access
and modification of a container's contents is generally done through
its primary range type,
which is aliased as C.Range
. For example, the primary range type of
Array!int
is Array!int.Range
.
If the documentation of a member function of a container takes a
a parameter of type Range
, then it refers to the primary range type of
this container. Oftentimes Take!Range
will be used, in which case
the range refers to a span of the elements in the container. Arguments to
these parameters must be obtained from the same container instance
as the one being worked with. It is important to note that many generic range
algorithms return the same range type as their input range.
import std.algorithm : equal, find; import std.container; import std.range : takeOne; auto array = make!Array(1, 2, 3); //find
returns an Array!int.Range advanced to the element "2" array.linearRemove(array[].find(2)); assert(array[].equal([1])); array = make!Array(1, 2, 3); // the range given tolinearRemove
is a Take!(Array!int.Range) // spanning just the element "2" array.linearRemove(array[].find(2).takeOne()); assert(array[].equal([1, 3]));
When any range can be passed as an argument to
a member function, the documention usually refers to the parameter's templated
type as Stuff
.
import std.algorithm : equal;
import std.container;
import std.range : iota;
auto array = make!Array(1, 2);
// the range type returned by iota
is completely unrelated to Array,
// which is fine for Array.insertBack:
array.insertBack(iota(3, 10));
assert(array[].equal([1, 2, 3, 4, 5, 6, 7, 8, 9]));
Container primitives
Containers do not form a class hierarchy, instead they implement a common set of primitives (see table below). These primitives each guarantee a specific worst case complexity and thus allow generic code to be written independently of the container implementation.
For example the primitives c.remove(r)
and c.linearRemove(r)
both
remove the sequence of elements in range r
from the container c
.
The primitive c.remove(r)
guarantees Ο(1
) complexity and
c.linearRemove(r)
relaxes this guarantee to Ο(n
) (where n
is the length of the container c
).
Since a sequence of elements can be removed from a doubly linked list
in constant time, DList
provides the primitive c.remove(r)
as well as c.linearRemove(r)
. On the other hand a
Array only offers c.linearRemove(r)
.
The following table describes the common set of primitives that containers
implement. A container need not implement all primitives, but if a
primitive is implemented, it must support the syntax described in the syntax column with the semantics described in the description column, and
it must not have a worst-case complexity worse than denoted in big-O notation in
the Ο(·
) column. Below, C
means a container type, c
is
a value of container type, nx
represents the effective length of
value x
, which could be a single element (in which case nx
is
1
), a container, or a range.
| Syntax | Ο(· ) | Description |
|---|---|---|
C(x) | nx | Creates a
container of type C from either another container or a range. The created container must not be a null reference even if x is empty. |
c.dup | nc | Returns a duplicate of the container. |
c ~ x | nc + nx | Returns the concatenation of c and r . x may be a single
element or an input range. |
x ~ c | nc + nx | Returns the concatenation of x and c . x may be a
single element or an input range type. |
| Iteration | ||
c.Range | The primary range type associated with the container. | |
c[] | log nc | Returns a range iterating over the entire container, in a container-defined order. |
c[a .. b] | log nc | Fetches a
portion of the container from key a to key b . |
| Capacity | ||
c.empty | 1 | Returns true if the
container has no elements, false otherwise. |
c.length | log nc | Returns the number of elements in the container. |
c.length = n | nc + n | Forces
the number of elements in the container to n . If the container
ends up growing, the added elements are initialized in a
container-dependent manner (usually with T.init ). |
c.capacity | log nc | Returns the maximum number of elements that can be stored in the container without triggering a reallocation. |
c.reserve(x) | nc | Forces capacity to at least x without reducing it. |
| Access | ||
c.front | log nc | Returns the first element of the container, in a container-defined order. |
c.moveFront | log nc | Destructively reads and returns the first element of the
container. The slot is not removed from the container; it is left
initialized with T.init . This routine need not be defined if front returns a ref . |
c.front = v | log nc | Assigns
v to the first element of the container. |
c.back | log nc | Returns the last element of the container, in a container-defined order. |
c.moveBack | log nc | Destructively reads and returns the last element of the
container. The slot is not removed from the container; it is left
initialized with T.init . This routine need not be defined if front returns a ref . |
c.back = v | log nc | Assigns
v to the last element of the container. |
c[x] | log nc | Provides indexed access into the container. The index type is container-defined. A container may define several index types (and consequently overloaded indexing). |
c.moveAt(x) | log nc | Destructively reads and returns the value at position x . The slot
is not removed from the container; it is left initialized with T.init . |
c[x] = v | log nc | Sets element at specified index into the container. |
c[x] op= v | log nc |
Performs read-modify-write operation at specified index into the container. |
| Operations | ||
e in c | log nc | Returns nonzero if e is found in c . |
c.lowerBound(v) | log nc | Returns a range of all elements strictly less than v . |
c.upperBound(v) | log nc | Returns a range of all elements strictly greater than v . |
c.equalRange(v) | log nc | Returns a range of all elements in c that are equal to v . |
| Modifiers | ||
c ~= x | nc + nx |
Appends x to c . x may be a single element or an
input range type. |
c.clear() | nc | Removes all
elements in c . |
c.insert(x) | nx * log nc |
Inserts x in c at a position (or positions) chosen by c . |
c.stableInsert(x) |
nx * log nc | Same as c.insert(x) ,
but is guaranteed to not invalidate any ranges. |
c.linearInsert(v) | nc | Same
as c.insert(v) but relaxes complexity to linear. |
c.stableLinearInsert(v) | nc |
Same as c.stableInsert(v) but relaxes complexity to linear. |
c.removeAny() | log nc |
Removes some element from c and returns it. |
c.stableRemoveAny() | log nc |
Same as c.removeAny() , but is guaranteed to not invalidate any
iterators. |
c.insertFront(v) | log nc |
Inserts v at the front of c . |
c.stableInsertFront(v) | log nc |
Same as c.insertFront(v) , but guarantees no ranges will be
invalidated. |
c.insertBack(v) | log nc |
Inserts v at the back of c . |
c.stableInsertBack(v) | log nc |
Same as c.insertBack(v) , but guarantees no ranges will be
invalidated. |
c.removeFront() | log nc |
Removes the element at the front of c . |
c.stableRemoveFront() | log nc |
Same as c.removeFront() , but guarantees no ranges will be
invalidated. |
c.removeBack() | log nc |
Removes the value at the back of c . |
c.stableRemoveBack() | log nc |
Same as c.removeBack() , but guarantees no ranges will be
invalidated. |
c.remove(r) | nr * log nc |
Removes range r from c . |
c.stableRemove(r) |
nr * log nc |
Same as c.remove(r) , but guarantees iterators are not
invalidated. |
c.linearRemove(r) | nc |
Removes range r from c . |
c.stableLinearRemove(r) | nc |
Same as c.linearRemove(r) , but guarantees iterators are not
invalidated. |
c.removeKey(k) | log nc |
Removes an element from c by using its key k .
The key's type is defined by the container. |
|
|
Authors
Steven Schveighoffer, Andrei Alexandrescu
License
Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at ).


Alesto is a small and unique consultancy company with years of information technologies experience within Telcos and Banking. We've delivered numerous high quality solutions and would love to assist any organisation - big or small acheve their project goals.
We provide solution design, architecturing and development services for a wide variety of industries such as Investment Banking, Telecoms, Mobile gaming and others.Full lifecycle delivery of low latency, high data volumes solutions with BigData and Virtualisation.
Alesto can help you set the initial development processes and choose the right tools from the OS space. We can organise your Agile environment and supporting tools to make your release cycles smooth and predictable.
Get in touch to dicsuss your goals.


| 07 | |
| SEP | |
| 2014 | Working with Margin, Border, and Padding in CSS |
|
Margins, borders, and padding are all ways to create white space and create visual boundaries between elements on a web page. It's important to remember that all three of these all take up space on the page. When you're trying to determine the width of the various elements on your page, you must take this into account and adjust the widths of the parent elements accordingly. BordersWhen a border is specified, the page element will render with a square bounding box around it. The color, style, and size of a border is specified in the CSS. In addition, it's possible to specify whether a border should go all the way around, or only appear on the top, bottom, left, or right sides of the element. In the example below, I have specified a red solid border that is two pixels wide and goes all the way around the element. Here is the text with a red border around it, but with margins and padding set to 0 PaddingPadding refers to the amount of space between an element and its parent element. In the example below, you can see that my border is still there, but that there is 10px of space between the text and the border. I've kept the border to show you where the edges of the text element lie. Here is the text with a red border around it, and with padding set to 10px. MarginMargin refers to the amount of space between the border of an element and its parent element. In the example below, I set the padding to 0px, but set a margin of 10px all the way around the text. While there's no extra space between the text and the border, there is 10px of space between the border and the edge of the parent element. Here is the text with a red border around it, and with the margin set to 10px. |


GSoC : This week in SymPy #7
Open Source · GSoC · SymPyHi there! It's been seven weeks into GSoC and second half has started now. Here is the Progress so far.
Progress of Week 7
This week I Opened #9628, which is basically an attempt to make solveset
more robust, as I mentioned in my last post.
The idea is to tell the user about the domain of solution returned.
Now, It makes sure that n is positive, in the following example:
In [3]: x = Symbol('x', real=True)
In [4]: n = Symbol('n', real=True)
In [7]: solveset(Abs(x) - n, x)
Out[7]: Intersection([0, oo), {n}) U Intersection((-oo, 0], {-n})
Otherwise it will return an EmptySet()
In [6]: solveset(Abs(x) - n, x).subs(n, -1)
Out[6]: EmptySet()
Earlier:
In [12]: solveset(Abs(x) - n, x)
Out[12]: {-n, n}
So, for this to happen, we needed to make changes in the invert_real
:
if isinstance(f, Abs):
g_ys = g_ys - FiniteSet(*[g_y for g_y in g_ys if g_y.is_negative])
return _invert_real(f.args[0],
Union(g_ys, imageset(Lambda(n, -n), g_ys)), symbol)
Union(imageset(Lambda(n, n), g_ys).intersect(Interval(0, oo)),
imageset(Lambda(n, -n), g_ys).intersect(Interval(-oo, 0))),
symbol)
So, we applied set operations on the invert to make it return non-EmptySet only when there is a solution.
Now For more Complex Cases:
For the following case:
In [14]: invert_real(2**x, 2 - a, x)
Out[14]: (x, {log(-a + 2)/log(2)})
For the invert to be real, we must state that a
belongs to the Interval (-oo, 2]
otherwise it would be complex, but no set operation on {log(-a + 2)/log(2)}
can make the interval of a
to be in (-oo, 2]
.
Although, it does returns an EmptySet()
on substituting absurd values:
In [23]: solveset(2**x + a - 2, x).subs(a, 3)
Out[23]: EmptySet()
So, we need not make any changes to the Pow
handling in invert_real
& It's almost done now, except for a couple of TODO's:
- Document new changes
- Add More tests
Though, I will wait for final thumbs up from @hargup, regarding this.
from future import plan Week #7:
This week I plan to complete PR #9628 & get it Merged & start working on replacing old solve
in the code base with solveset
.
$ git log
Below is the list of other PR's I worked on:
PR #9671 : Simplify ComplexPlane({x}*{y})
to FiniteSet(x + I*y)
PR #9668 : Support solving for Dummy symbols in linsolve
PR #9666 : Equate S.Complexes with ComplexPlane(S.Reals*S.Reals)
PR #9628 : [WIP] Make invert_real more robust
PR #9587 : Add Linsolve Docs
PR #9500 : Documenting solveset
That's all for now, looking forward for week #8.


| Document number: | P1651R0 | |
|---|---|---|
| Date: | 2019-06-07 | |
| Audience: | Library Evolution Working Group | |
| Reply-to: | Tomasz Kamiński <tomaszkam at gmail dot com> |
bind_front
should not unwrap reference_wrapper
This paper proposes a change in the behaviour of the std::bind_front
in regards to the
bound arguments of the std::reference_wrapper<T>
type —
the arguments should not be unwrapped (passing rw.get()
to underlying callable),
and should be propagated unchanged instead (passing rw
unmodified to underlying callable).
This change is the result of analysis of use case provided by the Abseil team, that I have not considered during the initial design. The main motivation of the change is to reduce the extent of damage that may be implied by code that assumes "incorrect" behavior.
Before: bind_front has unwrapping semantic |
After: bind_front has propagation semantic |
|---|---|
|
Code that assumes propagation semantic may:
|
Code that assumes unwrapping semantic may:
|
|
Fixing code requires the implementation of a custom binder. |
Fixing code requires a cast to desired view type. |
Changes proposed in this paper need to be considered in the C++20 timeline, as they would constitute breaking change after the publication of standard in the current form.
Initial revision.
This paper discusses the behavior of the code that uses std::bind_front
in conjunction with std::reference_wrapper
instantations. To illustrate lets consider the following code:
Thingy thingy; auto boundFunctor = std::bind_front(func, std::ref(thingy));
There are two possible and conflicting behaviors of the boundFunctor()
invocation
(for purpose of presentation we refer to bound reference_wrapper
as thingyRef
):
func(thingyRef.get())
, i.e. passing Thingy &
— mimics behaviour of std::bind_front
w.r.t. reference_wrapper
,func(thingyRef)
, i.e. passing std::reference_wrapper<Thingy>
— std::reference_wrapper
is treated as any other class.std::reference_wrapper<Thingy>
to Thingy&
.
One of the situations when the difference between unwrapping and propagation semantic is visible, is when the functor is bound
with the reference to the object (e.g. std::reference_wrapper<std::string>
, and the code accepts an view
to it (e.g. std::string_view
). To illustrate lets consider:
void functionAcceptingStringView(std::string_view); void functionAcceptingSpanOfIntegers(std::span<int>); std::string s; auto fs = std::bind_front(&functionAcceptingStringView, std::ref(s)); std::vector<int> v; auto fv = std::bind_front(&functionAcceptingSpanOfIntegers, std::ref(v));
With the unwrapping (current) semantic, both fs()
and fv()
compiles correctly, as std::string_view
can be implicitly constructed from std::string&
and
std::span<int>
can be implicitly constructed from std::vector<int>&
.
In case if propagation semantic was provided, both invocation would not compile, as they would require two user defined conversion to be performed:
std::reference_wrapper<std::string>
→ std::string&
→ std::string_view
for fs()
, andstd::reference_wrapper<std::vector<int>>
→ std::vector<int>&
→ std::span<int>
for fv()
.std::ref
:
auto fs = std::bind_front(&functionAcceptingStringView, std::string_view(s)); auto fv = std::bind_front(&functionAcceptingSpanOfIntegers, std::span(v));
The difference between the propagation is unwrapping semantic, is that the former support rebinding of the argument.
This can be best illustrated with the implementation of the functor PartialApply
that implements function
currying in C++:
template <typename F> struct PartialApply { PartialApply(F f) : f(f) {} F f; template <typename... A> auto operator()(A const&... a) const { if constexpr (std::is_invocable<F const&, A const&...>::value) { return f(a...); } else { return bind_front(*this, a...); } } };
The intent of the above code is that the expression PartialApply(func)(a)(b)
is either:
func(a, b)
if that is well-formed,func
with a
and b and accepts consecutive arguments (rebounding).
The above implementation works flawlessly in case of the propagation semantic, however, it fails in the case of unwrapping
is used — in the case when rebinding is performed, copy of arguments that were originally passed via std::ref
is made.
In the most optimistic scenario the above issue will manifest as compilation error. This happens when move only type is passed by reference:
std::unique_ptr<Thingy> thingy; auto func = [](std::unique_ptr<Thingy>&, int) {}; PartialApply(func)(std::ref(thingy))(10);
In the case of copyable types, silently copy of the object will be created. This, of course, may have negative performance implication, but in the worst case can lead to dangling references:
std::string str; auto func = [](std::string& s, int) -> std::string& { return s; }; std::string& sref = PartialApply(func)(std::ref(s))(10); // sref refers to copy of str stored in PartialApply sref.push_back('a'); // use of dangling reference
Finally, the author is not aware of the way of fixing PartialApply
than reimplementing custom
bind_front
alternative that has propagation semantic.
The prominent use case for partial function application functions (like std::bind_front
and std::bind
),
is to provide a helper to compose given method on the class, with a specific object.
In case if invocation should be performed on existing object instance (not a copy), a std::reference_wrapper
was used
as follows:
auto bound = std::bind_front(&Object::method, std::ref(instance));
In the time when the std::bind_front
was originally proposed (also applies to std::bind
), the above code
to work property required unwrapping semantic (at least the for first argument).
This was changed with the resolution of LWG 2219: INVOKE
-ing a pointer to member with a reference_wrapper
as the object expression,
that have introduced dedicated handling for std::reference_wrapper
in INVOKE
,
and unwrapping of std::reference_wrapper
is no longer required to achieve this functionality.
As indicated in the motivation section, the difference between unwrapping and propagation semantic manifest itself in a very specific scenario. As a consequence, the user, unaware of this specific behavior, may accidentally create an erroneous code that depends on semantic other that one supplied by the standard. In that case, it would be desired that error is detected as early as possible, preferably at compile time.
In light of the above, this paper proposes to switch to propagation semantic, as code that assumes unwrapping becomes ill-formed. With the current behavior (unwrapping), the code that assumes propagation may lead to runtime bugs.
The change proposed in this paper has no impact on user-visible behaviour of std::bind_front
,
despite the fact that functors returned by this functor will now store std::reference_wrapper<T>
instead
of T&
, as:
std::bind_front
are not assignable, so the difference in assignment semantic is not visible to the user,reference_wrapper
, like references, is required to be trivially copyable,bind_front
is not currently usable in constexpr
context.In addition the P1065: constexpr INVOKE
applies constexpr
to std::reference_wrapper
.
The proposed wording changes refer to N4810 (C++ Working Draft, 2019-03-15).
Apply following changes to section [func.bind_front] Function template bind_front
:
template <class F, class... Args> unspecified bind_front(F&& f, Args&&... args);
- In the text that follows:
g
is a value of the result of abind_front
invocation,FD
is the typedecay_t<F>
,fd
is a target object ofg
([func.def]) of typeFD
initialized with initializer(std::forward<F>(f))
,BoundArgs
is a pack that denotes,
std::unwrap_ref_decay_t<Args>...bound_args
is a pack of bound argument entities ofg
([func.def]) of typesBoundArgs...
initialized with initializers(std::forward<Args>(args))...
respectively, andcall_args
is an argument pack used in a function call expression ([expr.call]) ofg
,
Update the value of the __cpp_lib_bind_front
in table "Standard library feature-test macros" of [support.limits.general] to reflect the date of approval of this proposal.
This paper can be implemented by simply replacing unwrap_ref_decay_t
with decay_t
in example implementation from "Implementability"
section of the P0365R5: Simplified partial function application paper.
Titus Winters and Abseil team for providing the feedback on the bind_front
and code example that motivated creation of this paper.
Samuel Benzaquen for providing feedback and corrections for this paper.
Special thanks and recognition goes to Sabre (http://www.sabre.com) for supporting the production of this proposal and author's participation in standardization committee.
INVOKE
-ing a pointer to member with a reference_wrapper
as the object expression,
(LWG2219, https://wg21.link/lwg2219)constexpr INVOKE
,
(P1065, https://wg21.link/p1065)


Verb objects are action words we use to classify the things we do.
Ideally, they’ll be brief and we’ll have only a few of them.
Likely examples include “Maintain,” “Build,” “Develop,” “Promote,” “Repair,” “Triage.”
Naturally, each Verb will have a spectrum of difficulty and access in Tasks.
Also, some Verbs, such as “Triage,” obviously require generally higher authority.
A TaskPrototype is the boilerplate from which Task objects are made. It has unique information about the task, such as Name and Description.
Some TaskPrototypes, such as “Sweep the Floor,” will have hundreds of Task objects associated with them.
A Task is a discrete, one-time action. It is created at a particular DateTime (typically generated from a TaskPrototype) and completed at a particular DateTime.
Others, such as “Turn the stage into storage,” may have one task in its lifetime.
TaskPrototype objects can never be changed once created; this would corrupt the integrity of the task objects which rely on them for name and description. Instead, they evolve. TaskPrototypes have a ManyToMany relationship with their evolutionary ancestors and descendents, ie, a single TaskPrototype might split into several, or many might merge into one.
Many tasks have smaller, “child” tasks that need to be completed as part of the completion of the larger, “parent” task.
This relationship is handled by the model TaskProgeny:
An implicit through-model from Task-=>Task.
Identifies a child, its parent, and the order of that child among its siblings.
TaskPrototype objects use TaskPrototypeProgeny in exactly the same way.
TaskPrototype has a method, .generate_task(), which creates a Task (in fact an entire Task family) whose prototype property points to the prototype in question.
Generates a task family based on this prototype.
In order to create the entire Task family, TaskPrototype.generate_task() iterates through .children.all().
Tasks are categorized in two ways, but Verb and Tag. Verbs are very broad, mutually exclusive categories. Tags are more specific and direct designations.
- Every Task has one Verb (“Maintain,” “Promote,” “Develop,” “Repair,” etc.)
- Tasks can have one or more tasks (“Tech Service,” “Cleaning,” “Coffee Bar Stuff,” etc.)
Every 10 minutes, a cronjob runs the management command task_generator.
The TaskGenerator model is
Takes a TaskPrototype and creates a task based on it every so often.
When task_generator is run, each RandomRecurringTaskGenerator is iterated through.
RandomRecurringTaskGenerator has a property, frequency, which is used to determine the likelihood of it being added to the Task queue.
If it is chosen, the TaskPrototype, .generate_task() is run.


General discussion about Komodo. For useful links and more info click the pinned messages to the right. DON'T DM @jl777
100 messages
Before 05-Dec-19 12:00 AM
ComputerGenie30-Jun-18 04:50 PM
I have exactly as many coins as Jeff's bastardized version of Agama allowed me to create(edited)
Tyrael30-Jun-18 04:50 PM
I raise 10 kmd to kick or at least ban this toon
ComputerGenie30-Jun-18 04:51 PM
If you don't like how many CoinX I have, then take that up with the devs of CoinX
PTYX30-Jun-18 04:55 PM
@Cya i will say, the Komodo team has better things to do than worry about who is hacking or not backing safecoin. These seem like personal concerns to me since no Komodo team member is involved. In fact, community members offered help in pointing out and patching their bugs.
Cya30-Jun-18 04:56 PM
yes @PTYX im aware, but i thought it should be known that this guy @ComputerGenie is not to be trusted.
i have no bad feelings towards kmd whatsoever but this guy... well..
PTYX30-Jun-18 04:56 PM
@computergenie while unconventional he is of help to us and hsnt given us a reason for Mistrust
Cya30-Jun-18 04:57 PM
and as he always shills kmd in the safe discord i thought this might be where id find him
i apologize for interuption.
ComputerGenie30-Jun-18 04:57 PM
If you release an app that says "click this button and get a free 5% of your balance" I'm clicking the feker; it's on you if you feked it to where it worked every 2 seconds
PTYX30-Jun-18 04:57 PM
I would stay away from safecoin since it seems they are touchy and can misconstrue any action from people who don't represent Komodo's core team
However, we can't control what third parties do.
Cya30-Jun-18 04:58 PM
yes im aware, as i said, i apologize for interupting, but i got a bit annoyed at the crap he keeps posting and i know he lurks in here.
ill back out now sorry again.
PTYX30-Jun-18 04:58 PM
I have personally reached out to their devs before and we have a neutral relationship. I wish them well in their project. Thank you for understanding :)
ComputerGenie30-Jun-18 05:02 PM
"but i got a bit annoyed at the crap he keeps posting "
Then perhaps you shouldn't have randomly tagged him out of the blue and asked him to post more?
Deleted User30-Jun-18 05:40 PM
If you release an app that says "click this button and get a free 5% of your balance" I'm clicking the feker; it's on you if you feked it to where it worked every 2 seconds
L, O, freaking L
did that really happened? how...? ho...?
no, i don't want to know
ComputerGenie30-Jun-18 05:43 PM
When CoinX forked and bastardized komodod and agama, they screwed up the code by commenting out entire blocks of it and (at that time) their bastardized agama let you collect interest infinitely
Deleted User30-Jun-18 05:44 PM
nooooooooooooo... so embarrassing
ComputerGenie30-Jun-18 05:47 PM
Sadly, they weren't embarrassed at all, they tried to blame Komodo because it didn't work as expected
looks like time to reboot my router
Deleted User30-Jun-18 05:48 PM
safecoin is attacking your router right now
ComputerGenie30-Jun-18 05:48 PM
LOL
Deleted User30-Jun-18 05:48 PM
their team
Tyrael30-Jun-18 05:48 PM
so SAFEcoin invented money on demand ? not bad
2
Deleted User30-Jun-18 05:49 PM
true innovation
ComputerGenie30-Jun-18 05:50 PM
Here's the really feked part:
They randomly invite/tag me into their shit and then come here bitching because I "keep" responding
Deleted User30-Jun-18 05:51 PM
that's shitcoin tier drama, i wouldn't participate
(wait, im participating right now )
ComputerGenie30-Jun-18 05:52 PM
normally, I don't but there's only so much email I can stand when I forget to leave their discord
jlbaseball1130-Jun-18 06:49 PM
I just read through all of that, gave me a good laugh, thanks!
BarterDEX: Decentralised Exchange and Cryptocurrency Market
ComputerGenie30-Jun-18 06:55 PM
File: BarterDEX-linux-x64-1.1.0.tar.gz
CRC-32: 80da132a
SHA-1: 12469a2e081d58c3495f814669dfc1114208c0ab
SHA-256: 586fe0766ae138d666331461ae2a7db14fd917c49889f52263dfd5731d305128
SHA-512: 2a926815ad7dbdbcfc7aaaf2fc6c7cc3bf1a84a0318eccb74ab5c85006107988c921dd95d1179bc5d653f9b7fe15a6aed1352913211291307dddea53be4ec887
is what I got
SatoriNakamoto30-Jun-18 06:56 PM
Thanks @ComputerGenie , that's what I got too
ComputerGenie30-Jun-18 06:57 PM
I think the posted checksums might relate to the initial release of 1.1 that was pulled due to a withdraw issue
[slack] <sapharic> That's good the free for all period has been removed. It will bing stability and could attract miners...that's really a great change to my opinion
[TPUX] Djith Wattignies01-Jul-18 10:03 AM
Would profitability increase for miners?
Mapofcoins heavily outdated
jorian01-Jul-18 10:11 AM
that dude occasionally passes by and drops some random text
[TPUX] Djith Wattignies01-Jul-18 10:20 AM
What dude?
jorian01-Jul-18 10:21 AM
cryptopiece
Robert Naus01-Jul-18 02:02 PM
What are all the coins used within Komodo, supernet ecosystem?
passcombo.com 🏴☠🏴01-Jul-18 02:25 PM
you can see them in Agama wallet - plus button, mostyl BTC clones and KMD assets
DeMarco01-Jul-18 02:52 PM
Electrum servers dead? My latest BD update won’t load any coins...say no electrum.
ComputerGenie01-Jul-18 02:54 PM
You have to go to "manage Coins", do a reset, manually add whatever coins(s) you want, and then restart
DeMarco01-Jul-18 02:57 PM
Ok good to know. That’s due to the recent version change?
ComputerGenie01-Jul-18 02:57 PM
correct, this wasn't in earlier releases.
BarterDEX has reached a point where it actually works with "too many" coins.
The current solution seemed the best option, I'm sure that over time it will become more intuitive and "user-friendly"
Dr.Terminus01-Jul-18 03:19 PM
when Hyperdex ?
ComputerGenie01-Jul-18 03:20 PM
last month(edited)
Dr.Terminus01-Jul-18 03:21 PM
full release ?
ComputerGenie01-Jul-18 03:21 PM
maybe go to #dex-hyperdex and ask?
bogybogy01-Jul-18 03:56 PM
Hy
How is everyone
We can see progress with the platform
Just a quick question the txs are on chain or off chain? thanks
GatewayBOT01-Jul-18 04:00 PM
[matrix] <polycryptoblog:matrix.org> Onchain
bogybogy01-Jul-18 04:00 PM
Thanks appreciated
CryptoHuff01-Jul-18 06:08 PM
How is everyones portfolio looking today?
ComputerGenie01-Jul-18 06:08 PM
like
As a whole, I'm down 25% over the last 26 days
jorian01-Jul-18 06:23 PM
@ComputerGenie you can answer that cryptopiece of all you want, but he's not gonna answer
ComputerGenie01-Jul-18 06:25 PM
meh, since when has the lack of a respondent stopped me from rambling on?
Thanks for coming! If you enjoyed #offthechain, on the 5th July we will be exploring the development of cross-chain transfers in Berlin.
Register and join us today: https://t.co/LLeRV4HerC
this sounds as a meetup where Komodo would have a lot to say


Action.ML was an ML hackathon hosted by FOX in addition to the ASU Luminosity lab, where the target was to develop deep learning models that could detect various aspects of a basketball game. We were asked to come up with novel models which could analyse streaming video in real-time to detect sequences such as attempting a three-pointer, crossing the half-way line, replay, etc. To make the task simpler, we were provided a dataset for each of the target sequences along with the image it correspond to to train the ML model.
My favourite aspect of this hackathon was the opportunity to develop deep learning models with a specific goal in mind, in addition to using AWS Sagemaker to train and deploy these models. Even though I extensively use AWS, Sagemaker is a service I stay away from owing to it's relatively higher cost. This was a good opportunity to explore Sagemaker and use it fully.
What I liked about Sagemaker:
- Use of Jupyter notebooks by default to build models. This made testing on the fly easier and allowed thorough debugging.
- Jupyter was stacked with almost all typical environments for building ML models. The Tensorflow environment was available to get started with Keras (which we ended up using), and there were a multitude of options tailor-fit for many use-cases.
What I didn't like about Sagemaker:
- The Sagemaker instance was regularly getting overwhelmed especially when running multiple jobs. Granted, using a larger instance could have fixed it (at a greater cost), but the inability to even access the server to force stop jobs was a downer.
In the end, our team (credits to my teammates) built a multi-layer CNN model with decent accuracy for train, test and validation. My key takeaways was on building complex ML models in AWS, training and testing them, and in the end save and deploy that model as an endpoint so new data can be quickly predicted.


Sample function code
Sample code is available for the following languages.
Node.js
The following example processes messages from DynamoDB, and logs their contents.
Example ProcessDynamoDBStream.js
console.log('Loading function'); exports.lambda_handler = function(event, context, callback) { console.log(JSON.stringify(event, null, 2)); event.Records.forEach(function(record) { console.log(record.eventID); console.log(record.eventName); console.log('DynamoDB Record: %j', record.dynamodb); }); callback(null, "message"); };
Zip up the sample code to create a deployment package. For instructions, see Deploy Node.js Lambda functions with .zip file archives.
Java 11
The following example processes messages from DynamoDB, and logs their contents. handleRequest
is
the handler that AWS Lambda invokes and provides event data. The handler uses the
predefined
DynamodbEvent
class, which is defined in the aws-lambda-java-events
library.
Example DDBEventProcessor.java
package example; import com.amazonaws.services.lambda.runtime.Context; import com.amazonaws.services.lambda.runtime.LambdaLogger; import com.amazonaws.services.lambda.runtime.RequestHandler; import com.amazonaws.services.lambda.runtime.events.DynamodbEvent; import com.amazonaws.services.lambda.runtime.events.DynamodbEvent.DynamodbStreamRecord; public class DDBEventProcessor implements RequestHandler<DynamodbEvent, String> { public String handleRequest(DynamodbEvent ddbEvent, Context context) { for (DynamodbStreamRecord record : ddbEvent.getRecords()){ System.out.println(record.getEventID()); System.out.println(record.getEventName()); System.out.println(record.getDynamodb().toString()); } return "Successfully processed " + ddbEvent.getRecords().size() + " records."; } }
If the handler returns normally without exceptions, Lambda considers the input batch of records as processed successfully and begins reading new records in the stream. If the handler throws an exception, Lambda considers the input batch of records as not processed and invokes the function with the same batch of records again.
Dependencies
-
aws-lambda-java-core
-
aws-lambda-java-events
Build the code with the Lambda library dependencies to create a deployment package. For instructions, see Deploy Java Lambda functions with .zip or JAR file archives.
C#
The following example processes messages from DynamoDB, and logs their contents. ProcessDynamoEvent
is the handler that AWS Lambda invokes and provides event data. The handler uses the
predefined
DynamoDbEvent
class, which is defined in the Amazon.Lambda.DynamoDBEvents
library.
Example ProcessingDynamoDBStreams.cs
using System; using System.IO; using System.Text; using Amazon.Lambda.Core; using Amazon.Lambda.DynamoDBEvents; using Amazon.Lambda.Serialization.Json; namespace DynamoDBStreams { public class DdbSample { private static readonly JsonSerializer _jsonSerializer = new JsonSerializer(); public void ProcessDynamoEvent(DynamoDBEvent dynamoEvent) { Console.WriteLine($"Beginning to process {dynamoEvent.Records.Count} records..."); foreach (var record in dynamoEvent.Records) { Console.WriteLine($"Event ID: {record.EventID}"); Console.WriteLine($"Event Name: {record.EventName}"); string streamRecordJson = SerializeObject(record.Dynamodb); Console.WriteLine($"DynamoDB Record:"); Console.WriteLine(streamRecordJson); } Console.WriteLine("Stream processing complete."); } private string SerializeObject(object streamRecord) { using (var ms = new MemoryStream()) { _jsonSerializer.Serialize(streamRecord, ms); return Encoding.UTF8.GetString(ms.ToArray()); } } } }
Replace the Program.cs
in a .NET Core project with the above sample. For instructions, see Deploy C# Lambda functions with .zip file archives.
Python 3
The following example processes messages from DynamoDB, and logs their contents.
Example ProcessDynamoDBStream.py
from __future__ import print_function def lambda_handler(event, context): for record in event['Records']: print(record['eventID']) print(record['eventName']) print('Successfully processed %s records.' % str(len(event['Records'])))
Zip up the sample code to create a deployment package. For instructions, see Deploy Python Lambda functions with .zip file archives.
Go
The following example processes messages from DynamoDB, and logs their contents.
import ( "strings" "github.com/aws/aws-lambda-go/events" ) func handleRequest(ctx context.Context, e events.DynamoDBEvent) { for _, record := range e.Records { fmt.Printf("Processing request data for event ID %s, type %s.\n", record.EventID, record.EventName) // Print new values for attributes of type String for name, value := range record.Change.NewImage { if value.DataType() == events.DataTypeString { fmt.Printf("Attribute name: %s, value: %s\n", name, value.String()) } } } }
Build the executable with go build
and create a deployment package. For instructions, see Deploy Go Lambda functions with .zip file archives.


Our STAAR Test Maker test creation software allows Educators to create tests in just a few easy steps: Select your subject, select your grade, choose which Expectations and Standards you are assessing, edit, rearrange, or author your own test items, and format the test just the way you want it.
Now you have an aligned, rigorous STAAR test ready to print.
STAAR Test Maker also includes the Progress Monitor application which allows teachers to create color-coded reports to easily interpret their students test data and pinpoint the areas in which students are excelling as well as in which topics they need assistance.
With built-in scanner support teachers can use the Apperson Advantage 1200 scanner to quickly grade tests.
Elementary, Middle, and High School EOC. These editions are sold as an unlimited site license for your school and can be installed in a shared folder on your school’s server or on individual computers.
Call us today at<PHONE_NUMBER> to a live, interactive web demonstrations of STAAR Test Maker
or click here to schedule a time for us to call you.


Achillea is widespread in Kosovo; so far 18 species have been recorded,
of which 10 are strictly protected species (Administrative directive of MESP no. 12/2017),
including Achillea alexandri-regis Bornm. & Rudsky, spread only in Oshlak (Sharri Mountains, Kosovo).
The purpose of this research was to identify morpho-anatomical
characteristics that could be used as markers for the accurate identification of
A. alexandri-regis. Morpho-anatomical characteristics were analyzed in 10 individuals, collected in Oshlak,
during the July 2017. For identification of anatomical characteristics, the leaves were cut into small pieces
(approximately 1cm2 ), while pigments were removed in advance with hydrogen peroxide and saturated chloral hydrate solution.
Microscopic analyzes were made with the Zeiss axiostar plus microscope. The following morphological characteristics were
analyzed: plant height (20-40 cm), phyllotaxy (alternate), length (3.05±0.63 cm) and width (0.75±0.22 cm) of stem leaves,
length (7.05±1.63 cm) and width (1.72±0.31 cm) of the basal leaves, their shape (linear to cuneate), inflorescence type
(corymb), the number of flowers in the inflorescence (16.75±6.66), the color of the flowers (yellow),
etc. While the anatomical structures analyzed in leaves were: number of stomas (98.4±16.87/mm2 in upper epidermis
and 102.9±17.91/mm2 in lower epidermis), stomas dimension (length: 33.7±2.22 μm in upper epidermis
and 33.2±2.22 μm in the lower epidermis; width: 26.2±1.10 μm in upper epidermis and 25.7±0.99 μm in lower epidermis),
the number of glandular trichomes (3.64 ±5.27/mm2 in upper epidermis and 1.57±2.16/mm2 in lower epidermis),
the number of trichomes (21.71±8.21/mm2 in upper epidermis and 20.86±4.26/mm2 in lower epidermis). Furthermore,
the thickness of the upper (27.07±1.06 μm) and lower (23.02±0.88 μm) epidermis, the thickness of
the palisade (99.8±4.56 μm) and spongy parenchyma (84.5±6.74 μm) were also analyzed too. On the stems
were analyzed the number (22.6±1.89) and the type of vascular bundles (collateral type).


{% extends "layout-v2.html" %} {% block pageScripts %} {% endblock %} {% block pageTitle %} NHS Cervical screening management system {% endblock %} {% block header %} {% include '../components/header.html' %} {% endblock %} {% block content %}
Which patient registration status do you want to include?
Which cervix status do you want to include?
What date type would you like to include?
What date range would you like to include?
Do you want to search by an age range?


General
What is MyOpinionMatters?
MyOpinionMatters is Ireland's leading market research community. Made up of thousands of men and women just like you, of all ages and from all over the country, MyOpinionMatters provides a definitive view on what Ireland thinks by asking people like you to share your thoughts and opinions on a range of matters - from the products and services you like, to current affairs, new trends, advertising campaigns and everything in between. All while earning points which can be converted into free gift cards from a range of brands you know and love or if you prefer, you can donate your earnings to a good cause or charity.
Who is Empathy Research?
Empathy Research Ltd. is a leading online research and community management specialist who owns and runs the MyOpinionMatters community. Empathy Research works with a wide range of clients including many well-known brands and services to provide valuable thoughts and opinions from people like you. For further information about Empathy Research, please visit the About Us section.
Why should I join the MyOpinionMatters community?
Enjoy the benefits of taking part in Ireland's leading research community by:
-
Getting free gift cards for your opinion - MyOpinionMatters members get rewarded for every survey completed and can choose from a wide range of Reward Partners
-
Helping shape the world around you - as a MyOpinionMatters member, your contributions through surveys greatly influence brands and organisations and help them improve their products & services
-
Being in the know & having fun - as a member of the MyOpinionMattersCommunity, you will be the first to review new products, services and advertising campaigns & we promise to make it fun along the way!


by Ananto Y. Wicaksono
Some Fun Facts
Some Fun Facts
Some Fun Facts
Bird Inside Shield
Shield Inside Bird
Indonesia is an archipelago country, located between Asia and Australia, and between the Indian and the Pacific Ocean.
How many islands in Indonesia?
a) 1,000 - 5,000
b) 5,000 - 10,000
c) 10,000 - 25,0000
d) 25,000 - 50,0000
According to a geospatial survey the National Coordinating Agency for Survey and Mapping, Indonesia has 13,466 islands. However, according to earlier survey by LAPAN, the Indonesian archipelago has 18,307 islands, and according to the CIA World Factbook, there are 17,508 islands.
Bhinneka Tunggal Ika
Mostly people speak Indonesian (Bahasa Indonesia) combining with their own local languages (e.g., Javanese, Sundanese, and Balinese)
Indonesia Language is affected by some other languages such as Arabic (1,495 words), Dutch (3,280 words), English (1,610 words) and Mandarin (290 words)
Indonesian is relative simple
Six official religions: Islam, Protestantism, Roman Catholicism, Hinduism, Buddhism and Confucianism. in 2017, ethnic religions must be recognised and included in an Indonesian identity card. Based on data collected by the Indonesian Conference on Religion and Peace (ICRP), there are about 245 unofficial religions in Indonesia.
There are 633 recognised ethnic groups in Indonesia. These are the six largest ethnic groups (Javanese, Sundanese, Batak, Sulawesi, Madurese, Betawi) that makes up more than two third of 237 million of the country's total population.
Nine world herigates has been recognized officially by The UNESCO (United Nations Educational, Scientific and Cultural Organization)
Site on the tentative list
World Seven Summits
Indonesia Seven Summits
Seven Favourite Indonesian Cuisine
Indonesian Satay
Beef Rendang / Nasi Padang
Gado Gado (Indonesian Salad with Peanut Sauce)
Who is Indonesia actress of Polish descent?
a) Natalia
b) Christina
c) Mayawati
d) Tamara
Access my presentation for free https://ansuf.github.io/eng
it's open source !


Supercentenarians and the oldest-old are concentrated into regions with no birth certificates and short lifespans The observation of individuals attaining remarkable ages, and their concentration into geographic sub-regions or ‘blue zones’, has generated considerable scientific interest. Proposed drivers of remarkable longevity include high vegetable intake, strong s...
Architecture for humans - Ayende @ Rahien I run across the follow on Twitter:for legacy systems/monoliths, if you want to understand the real business processes, look for the fields named: - "Comment...
New features in 0.9.45 @ PeachPie | PHP compiler to .NET PeachPie allows you to run PHP applications on .NET Core - faster, stabler and more secure.
Calling all .NET desktop and mobile developers! | .NET Blog We would love to hear about your experience with building client applications in .NET. Your feedback will greatly help us to improve the .NET tooling and ensure our roadmap focuses on your needs. Participate in shaping the future of the .NET client develo...
Update on .NET Standard adoption | .NET Blog It’s about two years ago that I announced .NET Standard 2.0. Since then we’ve been working hard to increase the set of .NET Standard-based libraries for .NET. This includes many of the BCL components, such as the Windows Compatibility Pack, but also other...
The reasons behind why I don't use AutoMapper. My list of AutoMapper disadvantages which you should consider before using it in your project.
Troy Hunt is coming to ITBN CONF-EXPO 2019 - Arthur Keleti's announcement If you are in security, we bet you already know who Mr. Troy Hunt is. If not, you will get to know him personally because, YES, he is coming to ITBN CONF-EXPO 2019, his first time ever in Budapest. Mr. Hunt will tell You about how he gets so much up to da...
The world's worst video card? Let's build a circuit that displays an image on a VGA monitor! In this video, I talk about how VGA signals work and build a circuit that provides the correct timing of sync signals so that a monitor recognizes the signal. Support these videos on Patreon:...
Add passwords to list of stuff CafePress made hash of storing, says infoseccer. 11m+ who used Facebook 'n' pals to sign in were lucky 11m other leaked users' p-words hashed with SHA-1
OpenSecrets The Center for Responsive Politics is the nation's premier research group tracking money in politics and its effect on elections and public policy.
Frieze Patterns — Numberphile Additional information A surprising link discussed by Professor Sergei Tabachnikov. Extra footage at: https://youtu.be/MJ1NAzpens4 Sergei Tabachnikov's homepage at Pennsylvania State University : http://www.math.psu.edu/tabachni/ David Eisenbud di...
Garbage collection in Python: things you need to know An introduction to garbage collection and reference counting techniques in Python.
Memory management in Python To speed-up memory operations and reduce fragmentation Python uses a special manager on top of the general-purpose allocator, called PyMalloc.
Semver Compare An online tool to compare semver versions useful for testing rules for pre-release names
You Can't Trust Companies to Tell the Truth About Data Breaches Last week, online sneaker-trading platform StockX asked its users to reset their passwords due to “recently completed system updates on the StockX platform.” In actuality, the company suffered a large data breach back in May, and only finally came clean a...
Frieze Patterns - Numberphile A surprising link discussed by Professor Sergei Tabachnikov. Extra footage at: https://youtu.be/MJ1NAzpens4 More links & stuff in full description below ↓↓↓ Sergei Tabachnikov's homepage at Pennsylvania State University : http://www.math.psu.edu/tabachni...
Stack Overflow handling in HotSpot JVM JVM stack layout, guard zone, stack banging, reserved pages - how HotSpot implements Stack Overflow check
Nick Craver - Stack Overflow: How We Do App Caching This is #5 in a very long series of posts on Stack Overflow’s architecture.Previous post (#4): Stack Overflow: How We Do Monitoring - 2018 EditionSo…cachin...
Mission-driven careers with Amanda Silver Join Amanda Silver, our first PM guest to learn more about how she accelerated her career with customer understanding and how she harnesses a sense of mission to stay motivated to achieve more. [1:08] - Amanda's roles through the years [3:45] - modern PM...
Improving .NET Core installation in Visual Studio and on Windows | .NET Blog Visual Studio 2019 version 16.3 and .NET Core 3.0 Preview 7 improve the installation experience of .NET Core on Windows. The goal is to reduce the number of .NET Core versions that might be on a machine. The improvements are based on customer feedback and...
egil/razor-components-testing-library A unit testing library for Blazor Components. You can easily define components under test in C# or Razor syntax and verify outcome using semantic HTML diffing/comparison logic. You can easily inter...
Try out Nullable Reference Types | .NET Blog Try out Nullable Reference Types With the release of .NET Core 3.0 Preview 7, C# 8.0 is considered "feature complete". That means that the biggest feature of them all, Nullable Reference Types, is also locked down behavior-wise for the .NET Core release.
ASP.NET Core Identity with FIDO2 WebAuthn MFA This article shows how FIDO2 WebAuthn could be used as 2FA and integrated into an ASP.NET Core Identity application. The FIDO2 WebAuthn is implemented using the fido2-net-lib Nuget package, and dem…
Semver Compare An online tool to compare semver versions useful for testing rules for pre-release names


cfdm.NetCDFArray¶
-
class
cfdm.
NetCDFArray
(filename=None, address=None, dtype=None, shape=None, mask=True, units=False, calendar=False, missing_values=None, source=None, copy=True)[source]¶ Bases:
cfdm.data.mixin.filearraymixin.FileArrayMixin
,cfdm.data.abstract.array.Array
An underlying array stored in a netCDF file.
New in version (cfdm): 1.7.0
Initialisation
- Parameters
- filename: (sequence of)
str
, optional The name of the netCDF file(s) containing the array.
- address: (sequence of)
str
orint
, optional The identity of the netCDF variable in each file defined by filename. Either a netCDF variable name or an integer netCDF variable ID.
New in version <IP_ADDRESS>.
- dtype:
numpy.dtype
The data type of the array in the netCDF file. May be
None
if the numpy data-type is not known (which can be the case for netCDF string types, for example).- shape:
tuple
The array dimension sizes in the netCDF file.
- size:
int
Number of elements in the array in the netCDF file.
- ndim:
int
The number of array dimensions in the netCDF file.
- mask:
bool
If True (the default) then mask by convention when reading data from disk.
A netCDF array is masked depending on the values of any of the netCDF variable attributes
valid_min
,valid_max
,valid_range
,_FillValue
andmissing_value
.New in version (cfdm): 1.8.2
- units:
str
orNone
, optional The units of the netCDF variable. Set to
None
to indicate that there are no units. If unset then the units will be set during the first__getitem__
call.New in version (cfdm): <IP_ADDRESS>
- calendar:
str
orNone
, optional The calendar of the netCDF variable. By default, or if set to
None
, then the CF default calendar is assumed, if applicable. If unset then the calendar will be set during the first__getitem__
call.New in version (cfdm): <IP_ADDRESS>
- missing_values:
dict
, optional The missing value indicators defined by the netCDF variable attributes. See
get_missing_values
for details.New in version (cfdm): <IP_ADDRESS>
- source: optional
Convert source, which can be any type of object, to a
NetCDFArray
instance.All other parameters, apart from copy, are ignored and their values are instead inferred from source by assuming that it has the
NetCDFArray
API. Any parameters that can not be retrieved from source in this way are assumed to have their default value.Note that if
x
is also aNetCDFArray
instance thencfdm.NetCDFArray(source=x)
is equivalent tox.copy()
.New in version (cfdm): <IP_ADDRESS>
- copy:
bool
, optional If True (the default) then deep copy the input parameters prior to initialisation. By default the parameters are not deep copied.
New in version (cfdm): <IP_ADDRESS>
- ncvar: Deprecated at version <IP_ADDRESS>
Use the address parameter instead.
- varid: Deprecated at version <IP_ADDRESS>
Use the address parameter instead.
- group: Deprecated at version <IP_ADDRESS>
Use the address parameter instead.
- filename: (sequence of)
Inspection¶
Methods
Returns the array’s compression type. |
|
Return a subspace, defined by indices, of a numpy array. |
|
The missing value indicators from the netCDF variable. |
Attributes
Return an independent numpy array containing the data. |
|
Data-type of the array. |
|
Number of array dimensions. |
|
Shape of the array. |
|
Number of elements in the array. |
Units¶
Methods
The calendar of the array. |
|
The units of the array. |
File¶
Methods
The name of the file containing the array. |
|
Return the names of the data addresses in the files. |
|
Close the dataset containing the data. |
|
Return an open file object containing the data array. |
|
The name of the file containing the array. |
|
Return the names of files containing the data. |
|
The format of the files. |
|
Return the format of the files. |
|
The netCDF4 group structure of a netCDF variable. |
|
Whether or not to automatically mask the data. |
|
The name of the file containing the array. |
Miscellaneous¶
Return a deep copy of the array. |
|
Bring data on disk into memory. |
Special¶
Returns a subspace of the array as a numpy array. |
Docstring substitutions¶
Methods
Return the special docstring substitutions. |
|
Returns the substitutions that apply to methods of the class. |
|
Returns the class {{package}} substitutions package depth. |
|
Returns method names excluded in the class substitutions. |


An Internet of Things Controller for Programmers
Que is better that the average Internet of Things controller. With Que, anything with a API can become a thing - this means many of the internet-connected products you use everyday including Nest, Lono, or Spark and anything you make yourself can easily be connected and working in a short period of time, so you don't have to pull out your hair doing something that should be easy.
Que and Spark are the best way to automate your next project. With Que, your spark instantly has a ready-to-use dashboard. It doesn't even require any programming to get started - both on the spark and within Que. Just follow a simple wizard to link Que and the spark. And also, if you know some programming, your spark gains a simple javascript api that's functional within the browser. More information about setting up a spark can be found here.
Why does it make sense to control all of your devices, each from a seperate place? Que lets all connected devices be on one screen, for ease of access.


Timmy is a normal boy. He lives a normal life and lives in a normal house. He has a normal family and eats normal food. Everything about him is normal!
One day an alien showed up at Timmy’s house and abducted him
Timmy thought and thought about what the alien had said.
So Timmy went to explore the differences of the world. He saw places such as this.
And such as this. He lived happy knowing that being different is good.


--- title: Options subtitle: View all of the different options you can use to customise your carousel. layout: docs ---
It's very easy to customise your carousel by changing the options given to you. All you have to do is invoke the flexCarousel function and pass an object with the options you wish to change from the default value.
{% highlight html %} {% endhighlight %}For a full list of all the options available, read the table below. There is also an example link so that you can see a live demo of what each option does.
| Name | Type | Default | Description | Example |
|---|---|---|---|---|
arrows |
Boolean | true |
Determines whether a previous and next arrow should be shown on either side of the slides so that the user can change the active slide. | |
arrowsOverlay |
Boolean | true |
arrows must be set to true for this option to work. Determines whether the arrows overlay onto the active slide or have their own wrapping elements. |
|
autoplay |
Boolean | false |
Determines whether the active slide changes to the next slide on a time delay. | |
autoplaySpeed |
Integer | 5000 (ms) |
autoplay must be set to true for this option to work. Determines how long the active slide(s) will stay active for before transitioning to the next slide. |
|
circles |
Boolean | true |
Determines whether navigation circles should be shown at the bottom of the carousel for users to quickly select which slide to view. | |
circlesOverlay |
Boolean | true |
circles must be set to true for this option to work. Determines whether the circles overlay onto the active slide(s) or have their own wrapping elements. |
|
height |
String | null |
Defines whether a fixed height is to be added to the carousel selector element. | |
nextArrow |
String | '<svg>...</svg>' |
Defines the HTML code for the element which changes the active slide(s) to the next slide when clicked on. Out of the box, we use Font Awesome icons. | |
prevArrow |
String | '<svg>...</svg>' |
Defines the HTML code for the element which changes the active slide(s) to the previous slide when clicked on. Out of the box, we use Font Awesome icons. | |
slidesVisible |
Integer | 1 |
Defines how many slides are visible at any given time. | |
transition |
String | 'slide' |
Defines which transition should be used when changing the active slide(s). Current transitions available are: 'none' and 'slide' . |


Game Of Thrones star denies coffee cup blunder
Game Of Thrones star Conleth Hill has denied being responsible for the show’s coffee cup controversy.
Viewers poked fun at the fantasy epic when a rogue container was spotted on a table during an episode in the final season earlier this year.
Emilia Clarke, 33, who played Daenerys Targaryen, later said co-star Hill, who portrayed master of spies Lord Varys, admitted being responsible.
But the actor, 54, told Channel 4’s Sunday Brunch: “I would need to have had Mr Man arms to leave a coffee cup there.
“I took a bullet for Emilia Clarke and she touted on me.”
He told the show: “You know, there’s no proof that I did it. So accuse away!”
And the actor quipped: “I’m just not making any comments until I have a lawyer … It definitely wasn’t product placement!”
Clarke, who was seen as a culprit, previously told Jimmy Fallon’s US talk show: “We had a party before the Emmys recently and Conleth, who plays Varys, who’s sitting next to me in that scene, he pulls me aside and he’s like, ‘Emilia, I have got to tell you something, love. The coffee cup was mine’.”
The hugely popular fantasy epic finished its eight-season run in May but many fans were left disappointed, signing an online petition calling for a remake of the last episodes with “competent writers”.
READ MORE
Chris Packham: Ant and Dec are ignoring me over Bushtucker Trials


Sign in below to play the game
Email address
We'll never share your email with anyone else.


We are here to meet you and your family's legal needs.
Welcome to Richmond Clark. We are a newly established legal practice based at Anniesland Cross in Glasgow.
We seek to offer a high-standard, cost-effective and straight-forward service for you and your family's private and personal legal requirements.


Christopher Mills<EMAIL_ADDRESS>Twitter: @MisterXopher
make
./prog
make
./prog
(At the ">boot" prompt, type return)
(At the ":" prompt, type "rk(0,0)rkunix")
NOTE: To quit, press Control-E
Do small machines only need small programs? This program weighs in at just 3636 bytes, which is considerably lighter than the original machine it can replace.
This program can take you back to the start of everything, it is possible to run v0. Just type:
make
./v0
NOTE: To quit v0, press Control-E
You will be greeted with a familiar prompt of “login”. The username and password are “dmr” and “dmr”. To make things more familiar you’ll need to create ‘.’ as it hasn’t been invented yet on this image!
@ ln dd dmr .
An “ls” will reveal that C hasn’t been invented yet! IOBCC anyone? The compiler is “bc”. It producess assembly, which will then need to be assembled together in this order “ops.s bl.s hello.s bi.s” to produce a.out!
But wait, we said this was the start of it all! This program can also run a program that replaces an even larger machine that can run BSD 2.9. To start this,
make
./prog
(At the ">boot" prompt, type return)
(At the ":" prompt, type "rk(0,0)rkunix")
NOTE: To quit prog, press Control-E
This should now be very familiar and it is possible to compile and run one of the very first IOCCC entires “mullender.c”
But wait, there is even more! Try:
make
./v6
(At the "@" prompt, type "rkunix")
NOTE: To quit v6, press Control-E
This IOCCC entry is dedicated to the late Dennis M. Ritchie
Since this is the 25th “annual” IOCCC, I thought I should mark the occasion with a look back to its earliest roots. At the same time the contest enters its 34th year of providing a safe forum for poor C code, the C language itself is fast approching its 50th anniversary, along with the UNIX operating system whose history is so entwined with.
The program delivered here is both a full machine emulation of the original
PDP-7 that Ken Thompson used to write the first version of UNIX and a full
machine emulation of the PDP-11/40 used by subsequent UNIXes. The Makefile
can build versions that can run each of the following:
For reasons to be described in a bit, the last (BSD 2.9) is the default.
To run BSD 2.9, do make
to build prog
and then ./prog
to run it.
You should see a prompt from the first-stage bootloader that looks like
>boot
Type RETURN
at this point and you will get to the second-stage boot loader
that looks like
40Boot
:
The 40 in the prompt indicates that the bootloder has correctly determined that we are running on a PDP-11/40.
At this point, type the rather cryptic command rk(0,0)rkunix
– this tells
the system to look at the first partition on the first RK05 fixed disk, find
the rkunix
file and load it. You should eventually see the following:
>boot
40Boot
: rk(0,0)rkunix
Berkeley UNIX (Rev. 2.9.1) Sun Nov 20 14:55:50 PST 1983
mem = 135872
CONFIGURE SYSTEM:
xp ? csr 176700 vector 254 skipped: No CSR
rk 0 csr 177400 vector 220 attached
hk ? csr 177440 vector 210 skipped: No CSR
rl ? csr 174400 vector 160 skipped: No CSR
rp ? csr 176700 vector 254 skipped: No CSR
ht 0 csr 172440 vector 224 skipped: No CSR
tm 0 csr 172520 vector 224 skipped: No CSR
ts 0 csr 172520 vector 224 skipped: No CSR
dh ? csr 160020 vector 370 skipped: No CSR
dm ? csr 170500 vector 360 skipped: No autoconfig routines
dz ? csr 160110 vector 320 skipped: No CSR
dz ? csr 160110 vector 320 skipped: No CSR
dn 0 csr 175200 vector 300 skipped: No autoconfig routines
vp ? csr 177500 vector 174 skipped: No autoconfig routines
lp ? csr 177514 vector 200 skipped: No CSR
Erase=^?, kill=^U, intr=^C
#
Congratulations, you are running BSD UNIX 2.9 in single-user mode as root.
On the other hand, if you did a typo somewhere, the boot loader has probably
crashed and halted – if so, type Control-E to quit the simulation and try
again. If you did really badly, you might have corrupted the virtual disk.
If so, consider a make clean
to start from scratch.
Assuming you managed to type 15 characters correctly, You should be at the root prompt. Most of the commands you are familiar with work here (this was only a quarter of a century ago – how much could things have changed?). Let’s try some:
# ls
.cshrc .profile boot hkunix mnt tmp
.login 2.9stamp dev lib mullender.c unix
.msgsrc bin etc lost+found rkunix usr
# df
Filesystem Mounted on kbytes used free % used
/dev/rk0 / 1958 1688 270 86%
# cc mullender.c
# ./a.out
The program you’ve just run was the winner of the first IOCCC contest from 1984 (or was it 1894?), a personal favorite of mine. It is rather tightly bound to running on either a PDP-11 or a VAX. Now you have one.
Hitting Control-C will return you to the BSD UNIX prompt.  Here you can log in as root
and get a full timesharing session.
Feel free to try things like vi
. I’ve taken the liberty of editing the
.login
and .profile
files to set the console to a less traditional setup
so that you don’t have to wait for the Model 33 KSR teletype to move its
carriage. I’ve also predefined TERM
to vt100
, which will probably work
well enough with whatever sort of ANSI terminal emulation you are using.
Note that I have not mounted the /usr
disk here, so some commands from
/usr/bin
will be missing, along with all of the man
pages. They are
available online if you need them. Adding a second RK05 disk was
possible, but I didn’t get around to it… As the Judges can no doubt attest,
“Mid 2017” creeps up on you quicker than you expect. :)
Once you’ve had enough fun in BSD 2.9, type Control-E to exit the emulation.
Research UNIX v6 and BSD 2.9 use the same executable, but require a different
disk image. Type make v6
to build it, then type ./prog
to run it.
You should see the boot loader prompt which is a single @
:
@
At this point, you again must type a special incantation: rkunix
. After that
you should see:
@rkunix
mem = 1035
RESTRICTED RIGHTS
Use, duplication or disclosure is subject to
restrictions stated in Contract with Western
Electric Company, Inc.
#
You are now running a single-user session of v6 UNIX. You might want to start
with stty -lcase
because otherwise everything will be IN ALL CAPS.
Again, if you failed typing seven characters without making a mistake, you may need to use Control-E to quit the simulation.
Assuming you’re more careful than that, we can try a few commands:
@rkunix
mem = 1035
RESTRICTED RIGHTS
Use, duplication or disclosure is subject to
restrictions stated in Contract with Western
Electric Company, Inc.
# STTY -LCASE
# ls
bin
dev
etc
hpunix
lib
mnt
rkunix
rpunix
tmp
unix
usr
# cat > foo.c
main()
{
printf("Hello, World!\n");
}
# cc foo.c
# ./a.out
Hello, World!
Why is Version 6 interesting? Well, it was the oldest version that I could
find a boot image of that had a C compiler… This C compiler is recognizably
C, but not quite the same syntax as we have today. It’s much closer to the
B language from which it is derrived. In particular, this C compiler
would not be able to compile mullender.c
(as simple as it is), because the
following syntax features don’t exist yet:
short
data type doesn’t exist yet. Only int
(short
will show
up when long
comes, and the port to the Interdata 7/32 starts to make
the idea of portability become important).=
. It still uses
the older form taken from B, which looks like array[] { 1, 2, 3 };
It can still compile “Hello World!” (note that you must type a Control-D after
you finish entering the code, to let cat
see an end-of-file).
This version of UNIX doesn’t go into multi-user mode if you do a Control-D. Single-user mode was entered because the front-panel console switches were set to the magic number 0173030 (this can be changed with a re-compile).
Once you are done with Version 6, Type Control-E to exit the simulation.
Note that since both BSD 2.9 and UNIX v6 use the same PDP-11/40 emulation
code, and they use the same name for the disk (rk05.fs
), if you want to go
back to the BSD simulation, you should either delete rk05.fs
or do a
make clean
before you do a make
.
We now set the Wayback Machine to the very start of it all, 1969.
The story here is interesting and well worth a read. Bell Labs was pulling out of the Multics project and Ken Thompson and his collegues had become accustomed to the relatively nice programming environment. They also enjoyed the early computer game Space Travel and wanted another system to run it on. They found a PDP-7 which was already obsolete at the time to port Space Travel to. The primitive programming environment influenced Thompson to recreate parts of the Multics experience in the much more hardware-constrained PDP-7 environemnt. In the summer of 1969, with his wife out on a month-long vacation, Thompson re-wrote a filesystem emulation he had been experementing with to include an assembler, a shell, an editor and an operating system kernel and hence created the first version of UNIX (although it hadn’t been named that yet).
You can try out this version by typing make v0
. Since this version is a
native PDP-7 emulation, it gets its own binary. Type ./v0
to run it. You
should see the login prompt.
login:
There are two user accounts ken
and dmr
, with the passwords ken
and dmr
respectively. Let’s try the Dennis Richie’s dmr
account:
login: dmr
password: dmr
@ ls
. ?
Even though this is not Ken’s doing, I feel this gives me licence to
include this quote from the BSD fortune
program:
Ken Thompson has an automobile which he helped design.  Rather, if the driver makes any mistake, a giant “?” lights up in the center of the dashboard. “The experienced driver”, he says, “will usually know what’s wrong.”
What’s the deal here? Well, that’s a slightly long story. The short version
is we have gone so far back in the history of UNIX that we don’t have
filesystem paths yet. In other words, we can’t say something like
/bin/ls
yet, and the shell can’t store that path in $PATH
to search for it.
We also haven’t invented .
or ..
yet. In fact, the filesystem isn’t even
the traditional UNIX tree structure, it’s a directed graph of hard links…
ls
needs to be able to read ‘.
’, the current directory. dmr
’s home
directory doesn’t have that yet, but we can make it, because the home
directory has a hard link to dd
, which is the directory that holds all
of the user home directories (this will eventually become /
, the root
path). We can do
@ ln dd dmr .
To make the new link (note that ln
doesn’t support paths either, so you have
to give it three arguments – a directory in the current dir, a file in that
directory, and the new name).
Now ls
will work, and we can try some other things while we are here:
login: dmr
password: dmr
@ ln dd dmr .
@ ls
dd
system
as.s
b_readme
bi.s
bl.s
db.s
hello.b
ops.s
.
@ cat b_readme
Here is how to compile and run hello.b:
@ bc hello.b hello.s
@ as ops.s bl.s hello.s bi.s
I
II
ops.s
bl.s
hello.s
bi.s
@ a.out
Hello, World!
@ bc hello.b hello.s
@ as ops.s bl.s hello.s bi.s
I
II
ops.s
bl.s
hello.s
bi.s
@ a.out
Hello, World!
@
The last command is invoking the compiler for an exteremely early version of the B programming language, the predecessor to C. Thompson missed the convinience of writing code in a high-level language – Multics was written a version of PL/1 – and wanted the same convinience on UNIX. He preferred BCPL (a typeless language) to PL/1. As Dennis Ritchie wrote:
B can be thought of as C without types; more accurately, it is BCPL squeezed into 8K bytes of memory and filtered through Thompson’s brain.
A look at the B reference manual will show the strong correlation with C, and shows the source of a lot of C’s mysteriousness – some of which is preserved simply so that C could compile the dozens of lines of existing B code…
Thompson’s assembler was also extremely simple. It didn’t even know about
opcodes – these need to be defined in the first assembly file, with the
assembler OR-ing the opcode fields together (space was the “operator” for
logical OR). There is no link step – all files are provided to the assembler
on the command line, concatenated together and assembled, producing a single
a.out
(assembler output) file. Even after UNIX got a linker, a.out
remained the default name of the binary generated by the linker (and hence
also by cc
).
This system is still has the familiarity of UNIX, with all the two- and
three-letter commands, device files, shell redirection, the same core system
calls (read
, write
, open
, close
, creat
, fork
, etc.). There are a
number of differences still:
read
and write
do I/O on (18-bit) words. Character I/O to files needs
to unpack those to bytes, and of course deal with NUL
characters.exec
was performed by the shell directly. Arguments are passed as
four words (eight bytes), and space padded. This matches the format for
file names for open
and creat
.wait
does not yet exist. A more complicated mechanism for sending and
recieving messages (smes
and rmes
) are used instead.As usual, when you are done exploring UNIX v0, type Control-E to exit the simulator.
The program came about when I was looking for something to honor the pending
50th anniversary of the C language (because of the mercurial nature of IOCCC
contest scheduling, I chose not to wait for the actual 50th anniversary).
I had though of writing self-hosting compilers for a stripped-down version of
C, or maybe even a version of the B language… At the same time, I was
obsessed with the idea of allowing mullender.c
from 1984 to run. Although
that was still a possibility on an interpreted version of B or a stripped-down
version of C, it felt cheap, as it would be mullender.c
only in spirit.
It was during this time that I discovered that in 2016, members of the Unix Heritage Society got access to printouts of assembly-language source for the original version of UNIX. With what was a huge amount of work, they scanned in the printouts, fixed up the OCR translations, built assembler and file system tools from scratch and made an accurate simulation of Thompson’s PDP-7 that allowed them to get the system up and running. Although source for the entire kernel and about half of the user-space commands were present (including the runtime and libraries for the B compiler), the remainder needed to be written from scratch, including the shell. The final results of the project are available on github.
None of this was remotely easy (as I was to discover myself). The PDP-7 is long gone, and the documentation for it is less complete than one would like. In addition, the devices attached for it were a bit of a mystery. The disk system is referenced only in an old price list. It was a RB09 fixed disk, probably made by Burroughs. It is close to what was called the RC10 for the PDP-10, but with a different interface. And the system also included a custom display device called Graphics-2, which had been built in-house by AT&T. It can’t be completely ignored, because the kernel itself pokes at it (the UNIX crew used it as a second terminal – a “glass TTY”).
I decided that implementing this PDP-7 would be possible as an IOCCC entry.
The emulator emulates the full machine:
The PDP-7 is an odd duck by modern computer standards:
ADD
for one’s complement
and TAD
for two’s complement). The EAE is entirely one’s-complement.XCT
instruction, that executes the word loaded from memory as an
instruction.LAW
that loads the instruction opcode into the
accumulator.MUL
instruction expects
the second operand to be stored in memory after the instruction. This
pretty much requires the use of self-modifying code.The simulation handles everything I was able to discover about the PDP-7, even things that the UNIX code itself doesn’t use. For instance, it correctly implements the “trap mode” feature (a primitive form of supervisor mode) even though the kernel does not enable it. It also implements the microcoding of the EAE instructions even though the UNIX environment uses only the standard encodings. If you wanted to do a 11-bit multiply instead of an 18-bit one, it will probably work.
The simulation starts by loading a boot program off of the virtualized paper
tape, which is in a modified version of the RIM boot loader format. The
RIM format encodes each 18-bit word as three six-bit characters, using one bit
to denote the final word (which is executed directly and is usually a JMP
or
HLT
instruction). The load address comes from the console address switches.
Both of these are controlled by compile-time flags.
The emulator continues emulating instructions until it sees a HLT
instruction
which will cause it to exit. Console I/O is emulated by setting the terminal
into raw mode and polling via read
. Line-clock ticks (at 60 Hz) are done
by polling gettimeofday
. Dynamic frequency code arranges to reduce the
polling interval to a few polls per tick, so that simulation remains
responsive. Since we use the real wall-clock time, this means that the
emulated system will see time advance at the correct rate.
So now I have a system that can run UNIX v0. One problem remains… I don’t have permission to submit UNIX v0 to the IOCCC. It is not my code and the copyright for it remains the property of whoever owns that part of what was once Bell Labs – I believe it is Nokia at this point. I have worked around this problem in two ways:
First, I didn’t submit the source code or binary image for v0 UNIX as part of
my IOCCC entry. I merely submitted a Makefile
that can issue a curl
command to fetch a prebuilt v0 disk image from the github repository. I am
hoping this is considered part of “Legal abose of the rules” which is supposed
to be “somewhat encouraged”. As per RULE 12, I am justifying said abuse here,
in the remarks file.
Secondly, the choice to run the UNIX v0 code is optional. If you are worried
about Nokia’s lawyers running you to ground for running a 50-year old copy
of a binary image for a machine that is almost completely nonexistant, you
can just not do so. Delete the lines from the Makefile
and sleep well.
You still have two other UNIXes to play with.
What about the other two UNIX variants? These are both covered by licences that allow me to use them. Back in 2002, Caldera International released Research Unix versions 1-7 and 32V under a permissive BSD-like license. BSD UNIX is based off of v7 UNIX, and of course has its own permissive BSD licence. And in 2017, Nokia also released versions 8-10 under the condition that it will not assert copyright rights for non-commercial use.
So the newer UNIXes are in the clear. I doubt anyone actually cares about version 0 either, but technically it’s still under copyright.
So if I have a PDP-7 emulator, how do I run operating systems that expect a PDP-11? Simple… I emulate a PDP-11/40 on the PDP-7. I have written PDP-7 assembler code to emulate a PDP-11/40 with the following equipment:
This required a few tweaks to the emulator. The first problem is that the
RK05 disk is about 2.5 MB, but the RB09 is only about 2 MB. That’s easily
solveable – just add more tracks to the RB09. UNIX v0 is unlikely to notice
(although the number of tracks is a compile time parameter, and the v0
build commands set it to the correct value).
The second problem is that we are simulating a system that can have up to 124 Kwords of memory on a system with only 8 Kwords total. That meant I needed to virtualize the PDP-11/40’s physical memory (and add a few more tracks to the disk to hold the virtualization).
A large amount of time was spent tuning this code to be efficient. The memory virtualization uses part of the 8 Kword memory as an LRU cache, and uses a number of first-level microcaches to avoid having to do the LRU updates. This also serves to offload the complexity of the PDP-11’s segmentation logic from a large number of memory accesses (the PDP-11 does as many as eight accesses per instruction). Despite the super fast emulated disk, the PDP-7 code in the emulator is slow, mostly because it has to do a bunch of divides to convert the linear disk offset into a BCD-coded track and sector for the emulated RB09. I/O polling is again used, except this time it uses the PDP-7’s “skip on flag set” I/O instructions. As with the PDP-7 emulator itself, the PDP-11 emulator dynamically measures the instruction throughput relative to the line-clock tick, so that it only polls for I/O a few times per tick.
The one remaining problem is building the disk images themselves. Since the
PDP-11’s disk is 16-bit, but the PDP-7’s is 18-bit (which the emulator stores
in 32-bit int
s), a conversion program is needed to unpack the binary disk
images from 16 bits per word to 32. This in turn needs to be done in the
Makefile
using standard POSIX tools, which aren’t exactly good with binary.
I had a wierdly clever way to do this with od
, awk
and uudecode
that
I will leave as an exercise for the curious, but I decided it would be easier
to do it with the PDP-7 emulator itself, feeding a simple program in on its
boot tape. This required an additional tweak to the emulator, since by default
its console TTY is not eight-bit clean (in fact, UNIX v0 expects to see the
MSB set on the terminal reads, and sets it on writes, what is called “mark”
parity). This is also enabled by a compile-time setting (used only for the
builddisk
program).
Despite the complexity of the PDP-11 instruction set and its emulated I/O devices and the corresponding primitiveness of the PDP-7’s instruction set, the emulation itself is a suprisingly small amount of code, not really taxing the 8 Kword memory, with about 2.25 Kwords of actual code and a similar amount of space for the memory virtualization cache and disk block buffer, leaving nearly half (3.5 Kwords) of the memory unused. The simulator executes somewhere around 250 PDP-7 instructions per PDP-11 instruction. On my laptop, the PDP-7 is running somewhere in the neighborhood of 70 MIPS, which means the PDP-11 is running at about 0.3 MIPS, which is probably not too far off of its actual speed (the cycle time of an 11/40 was around a microsecond for simple instructions, but could be proportionally larger for instructions that did multiple memory accesses, which many did).
As an aside, although the idea of emulating the PDP-11 on an emulated PDP-7 came about from the realization that I needed a response to the late-discovered licence issue, I’m quite pleased with the result – it enables an interesting window on the dawn of the UNIX era. I feel that someone should complete the circle here by emulating a VAX 780 on the PDP-11 and run 4.2BSD on it, so that we can get the original runtime environment used for the first IOCCC.
The following command flags control the compilation:
-DI="image.fs"
: Name of the disk image file. This must be created
offline, and be of the correct size to avoid segmentation violations.-DA=4096
: Setting of the console address switches. This tells the RIM
bootloader where to load the boot image.-DS=0
: Setting of the console data switches. The PDP-7 emulation can
read these with the microcoded OAS
(OR switches into AC) instruction.
By proxy, the PDP-11 emulation can read them via the CSW
device.-DW=MAP_PRIVATE
: This sets the memory mapping for mmap
. Setting to
MAP_PRIVATE
makes the disk image be copy-on-write. Setting it to
MAP_SHARED
makes the disk image be sharable. Do the latter if you want
to preserve the disk contents between sessions.-DT=
: List of initializers for the termios
structure. The v0 UNIX
expects the terminal to be in half-duplex mode, echoing its input, with
swapped CR and NL. The PDP-11 UNIXes don’t.-DX=5
: The ASCII code of the control character that causes the simulation
to abort. If set to 0, there is no abort code.-DY=128
: Controls console I/O parity. If set to zero, the console is
eight-bit clean. If set to 128, the high bit is set on keyboard reads and
masked off on printer output (“mark” parity). UNIX v0 expects the latter.-DV=270
: The size of the disk, in tracks. The UNIX v0 disk has 200
tracks (each has 80 sectors of 64 18-bit words). The PDP-11 UNIXes
increase this to 270, to allow for the larger RK05 disk emulation
(406 tracks of twelve 256-word sectors), plus the space for the 124 Kwords
of virtualized memory and the 8 Kwords of emulator code.-DP="xxx"
: RIM bootstrap program paper tape image. Be careful with the
quoting here – there is at least three levels going on. In particular,
you will need to escape $
as $$
to protect it from make
.The ASCII art represents a torn piece of paper tape.
None of this could have been possible without the hard work of
Finally, thanks to my spouse for putting up with the many hours I spent on this nonsense, and treating “I’m working on my IOCCC entry” as an acceptable answer to queries about how I was spending my free time. Similarly, I apologise to those friends and coworkers who had to listen to me complain about obscure corner-case bugs in my code. The obsession is over, at least until next time…
© Copyright 1984-2018,
Leo Broukhis, Simon Cooper, Landon Curt Noll
- All rights reserved |


The page you requested could not be found. If you think this is an error, please help us by contacting our support.
Thank you.


First deployment to Google Kubernetes engine
The hostname of the container is
{{ hostname }}
and its IP is
{{ ip }}
.
CI/CD rules the net!


X
Item:
Red Chair
Price:
$40.00
Issued:
04.10.2014
Paid:
Unpaid
Payee:
James Avon
Welcome back!
Cashflow $157.32
Invoices
Paid
Amount
Due


Executes an action on an actuator that is part of the IoT environment.
Triggers an IFTTT webhook that has been previously configured as part of an applet.
Deploys or undeploys a component that is part of the IoT environment.


- A source file which is subsequently deleted
- does not cause an error0.21354s
- SimpleCov::SourceFile::Line
- raises ArgumentError when initialized with invalid src0.00189s
- raises ArgumentError when initialized with invalid coverage0.00014s
- raises ArgumentError when initialized with invalid line_number0.00008s
- a source line
- has equal line_number, line and number0.00088s
- returns "# the ruby source" as src0.00009s
- has line number 50.00007s
- returns the same for source as for src0.00034s
- flagged as skipped!
- is not never0.00012s
- is not missed0.00010s
- is not covered0.00032s
- is skipped0.00009s
- status is skipped0.00006s
- A source line with no code
- is not covered0.00010s
- status is never0.00010s
- is not skipped0.00008s
- is never0.00347s
- is not missed0.00010s
- has nil coverage0.00007s
- A source line without coverage
- has coverage of 00.00045s
- is not never0.00009s
- is missed0.00007s
- status is missed0.00007s
- is not covered0.00038s
- is not skipped0.00010s
- A source line with coverage
- is not skipped0.00009s
- is not missed0.00007s
- status is covered0.00007s
- is not never0.00010s
- is covered0.00010s
- has coverage of 30.00006s
- SimpleCov::Formatter::MultiFormatter
- .[]
- constructs a formatter with multiple children0.01255s
- a file where everything is skipped and missed #563
- has 0.0 covered_percent0.00023s
- has 0.0 covered_strength0.00014s
- a source file initialized with some coverage data
- has 'class Foo' as line(2).source0.00035s
- has all source lines of type SimpleCov::SourceFile::Line0.00069s
- returns lines number 2, 3, 4, 7 for covered_lines0.00032s
- has 16 source lines0.00031s
- has source equal to src0.00009s
- has a filename0.00021s
- returns lines number 1, 5, 6, 9, 10, 16 for never_lines0.00030s
- returns lines number 8 for missed_lines0.00048s
- has a project filename which removes the project directory0.00010s
- has 80% covered_percent0.00032s
- returns line numbers 11, 12, 13, 14, 15 for skipped_lines0.00051s
- has source_lines equal to lines0.00029s
- a file where nothing is ever executed mixed with skipping #563
- has 0.0 covered_strength0.00018s
- has 0.0 covered_percent0.00015s
- simulating potential Ruby 1.9 defect -- see Issue #56
- has 16 source lines regardless of extra data in coverage array0.00032s
- prints a warning to stderr if coverage array contains more data than lines in the file0.00368s
- a file where everything is skipped/irrelevamt but executed #563
- has 0.0 covered_strength0.00025s
- has 0.0 covered_percent0.00018s
- a file that is never relevant
- has 0.0 covered_percent0.00014s
- has 0.0 covered_strength0.00011s
- without ENV[HOME]
- shouldn't raise any errors0.00097s
- SimpleCov::SourceFile
- doesn't match a new SimpleCov::StringFilter 'some/path'0.00011s
- doesn't match a parent directory with a new SimpleCov::StringFilter0.00008s
- doesn't match a parent directory with a new SimpleCov::ArrayFilter0.00009s
- matches a new SimpleCov::ArrayFilter when a custom class that returns true is passed as array0.00009s
- doesn't match a new SimpleCov::ArrayFilter when a file path different than /sample.rb/ is passed as array0.00008s
- doesn't match a new SimpleCov::BlockFilter that is not applicable0.00007s
- doesn't match a new SimpleCov::ArrayFilter when a custom class that returns false is passed as array0.00007s
- matches a new SimpleCov::StringFilter 'spec/fixtures'0.00007s
- matches a new SimpleCov::BlockFilter that is applicable0.00007s
- matches a new SimpleCov::StringFilter '/fixtures/'0.00007s
- doesn't match a new SimpleCov::ArrayFilter when a block that returns false is passed as array0.00006s
- matches a new SimpleCov::ArrayFilter when two file paths including 'sample.rb' are passed as array0.00014s
- matches a new SimpleCov::StringFilter 'spec/fixtures/sample.rb'0.00007s
- doesn't match a new SimpleCov::RegexFilter /^/fixtures//0.00007s
- matches a new SimpleCov::RegexFilter //fixtures//0.00007s
- doesn't match a new SimpleCov::ArrayFilter when a file path different than 'sample.rb' is passed as array0.00010s
- matches a new SimpleCov::ArrayFilter when /sample.rb/ is passed as array0.00007s
- matches a new SimpleCov::ArrayFilter when a block is passed as array and returns true0.00006s
- doesn't match a new SimpleCov::StringFilter 'foobar'0.00007s
- matches a new SimpleCov::RegexFilter /^/spec//0.00013s
- matches a new SimpleCov::StringFilter 'sample.rb'0.00007s
- matches a new SimpleCov::ArrayFilter when 'sample.rb' is passed as array0.00011s
- with no filters set up and a basic source file in an array
- returns a FileList after filtering0.00010s
- returns 1 item after executing SimpleCov.filtered on files when using an always-false block filter0.00008s
- returns 0 items after executing SimpleCov.filtered on files when using a "sample" string filter0.00009s
- returns 0 items after executing SimpleCov.filtered on files when using a "spec/fixtures" string filter0.00023s
- returns 0 items after executing SimpleCov.filtered on files when using a block filter that returns true0.00009s
- returns 1 item after executing SimpleCov.filtered on files when using a "fooo" string filter0.00007s
- .class_for_argument
- returns SimpleCov::StringFilter for a string0.00005s
- returns SimpleCov::RegexFilter for a string0.00007s
- returns SimpleCov::RegexFilter for a string0.00004s
- SimpleCov::RawCoverage
- merges frozen resultsets0.00009s
- with two faked coverage resultsets
- a merge
- has proper results for sample_controller.rb0.00015s
- has proper results for resultset1.rb0.00016s
- has proper results for user.rb0.00014s
- has proper results for three.rb0.00017s
- has proper results for conditionally_loaded_2.rb0.00013s
- has proper results for conditionally_loaded_1.rb0.00015s
- has proper results for parallel_tests.rb0.00016s
- has proper results for sample.rb0.00013s
- has proper results for resultset2.rb0.00015s
- inside fixtures/frameworks
- has return code 0 when running testunit_good.rb0.21455s
- has return code 1 when running rspec_bad.rb0.27697s
- has non-0 return code when running testunit_bad.rb0.21363s
- has return code 0 when running rspec_good.rb0.23386s
- SimpleCov::CommandGuesser
- correctly guesses "Functional Tests" for functional tests0.00013s
- correctly guesses "Integration Tests" for integration tests0.00007s
- correctly guesses "RSpec" for RSpec0.00008s
- correctly guesses "Unit Tests" for unit tests0.00007s
- correctly guesses "Cucumber Features" for cucumber features0.00006s
- defaults to RSpec because RSpec constant is defined0.00006s
- SimpleCov::Result
- has the correct least covered file0.00093s
- has 17 never lines0.00062s
- has 14 lines of code0.00076s
- has the correct covered percentages0.00057s
- has 5 skipped lines0.00035s
- has the correct covered strength0.00066s
- has 11 covered lines0.00056s
- has 3 missed lines0.00055s
- has the correct covered percent0.00060s
- when unconfigured
- returns nil0.00008s
- when configured
- returns the configured glob0.00007s
- and configured again with nil
- returns nil0.00010s
- with a (mocked) Coverage.result
- with groups set up that do not match all files
- returns all groups as instances of SimpleCov::FileList0.00022s
- has 1 item per group0.00010s
- has sample.rb in "Ungrouped" group0.00019s
- has 3 groups0.00015s
- with groups set up for all files
- has sample_controller.rb in 'Controllers' group0.00016s
- has user.rb in 'Models' group0.00018s
- has 3 groups0.00020s
- and simple formatter being used
- returns a formatted string with result.format!0.00065s
- and multi formatter being used
- returns an array containing formatted string with result.format!0.00066s
- a simple cov result initialized from that
- responds to covered_percentages0.00070s
- returns an instance of SimpleCov::FileList for source_files and files0.00096s
- has 3 filenames0.00009s
- has accurate covered percentages0.00055s
- responds to least_covered_file0.00026s
- responds to total_lines0.00009s
- responds to missed_lines0.00012s
- responds to covered_percent0.00008s
- has accurate covered percent0.00057s
- has files equal to source_files0.00009s
- has 3 source files0.00012s
- responds to covered_strength0.00009s
- responds to covered_lines0.00008s
- has accurate least covered file0.00041s
- dumped with to_hash
- is a hash0.00017s
- loaded back with from_hash
- has the same command_name0.00014s
- has the same covered_percentages0.00090s
- has the same timestamp0.00012s
- has 3 source files0.00013s
- has the same original_result0.00010s
- has the same covered_percent0.00103s
- with some filters set up
- has [80.0, 80.0] covered percentages0.00040s
- has 2 files in a new simple cov result0.00012s
- has 80 covered percent0.00028s
- with two faked coverage resultsets
- returns an empty hash when the resultset cache file is not present0.00153s
- returns an empty hash when the resultset cache file is empty0.00020s
- and results generated from those
- with stored results
- returns a hash containing keys ['result1' and 'result2'] for resultset0.00253s
- returns proper values for merged_result0.00317s
- has stored data in resultset_path JSON file0.00256s
- with merging disabled
- returns nil for SimpleCov.result0.00358s
- with second result way above the merge_timeout
- has only one result in SimpleCov::ResultMerger.results0.00375s
- SimpleCov::LastRun
- defines a last_run_path0.00075s
- writes json to its last_run_path that can be parsed again0.00042s
- but the last_run file does not exist
- returns nil0.00024s
- an empty result
- returns nil0.00044s
- a non empty result
- reads json from its last_run_path0.00035s