import threading
import weakref
from django.utils.inspect import func_accepts_kwargs
def _make_id(target):
if hasattr(target, '__func__'):
return (id(target.__self__), id(target.__func__))
return id(target)
NONE_ID = _make_id(None)
# A marker for caching
NO_RECEIVERS = object()
[docs]class Signal:
"""
Base class for all signals
Internal attributes:
receivers
{ receiverkey (id) : weakref(receiver) }
"""
def __init__(self, providing_args=None, use_caching=False):
"""
Create a new signal.
providing_args
A list of the arguments this signal can pass along in a send() call.
"""
self.receivers = []
if providing_args is None:
providing_args = []
self.providing_args = set(providing_args)
self.lock = threading.Lock()
self.use_caching = use_caching
# For convenience we create empty caches even if they are not used.
# A note about caching: if use_caching is defined, then for each
# distinct sender we cache the receivers that sender has in
# 'sender_receivers_cache'. The cache is cleaned when .connect() or
# .disconnect() is called and populated on send().
self.sender_receivers_cache = weakref.WeakKeyDictionary() if use_caching else {}
self._dead_receivers = False
[docs] def connect(self, receiver, sender=None, weak=True, dispatch_uid=None):
"""
Connect receiver to sender for signal.
Arguments:
receiver
A function or an instance method which is to receive signals.
Receivers must be hashable objects.
If weak is True, then receiver must be weak referenceable.
Receivers must be able to accept keyword arguments.
If a receiver is connected with a dispatch_uid argument, it
will not be added if another receiver was already connected
with that dispatch_uid.
sender
The sender to which the receiver should respond. Must either be
a Python object, or None to receive events from any sender.
weak
Whether to use weak references to the receiver. By default, the
module will attempt to use weak references to the receiver
objects. If this parameter is false, then strong references will
be used.
dispatch_uid
An identifier used to uniquely identify a particular instance of
a receiver. This will usually be a string, though it may be
anything hashable.
"""
from django.conf import settings
# If DEBUG is on, check that we got a good receiver
if settings.configured and settings.DEBUG:
assert callable(receiver), "Signal receivers must be callable."
# Check for **kwargs
if not func_accepts_kwargs(receiver):
raise ValueError("Signal receivers must accept keyword arguments (**kwargs).")
if dispatch_uid:
lookup_key = (dispatch_uid, _make_id(sender))
else:
lookup_key = (_make_id(receiver), _make_id(sender))
if weak:
ref = weakref.ref
receiver_object = receiver
# Check for bound methods
if hasattr(receiver, '__self__') and hasattr(receiver, '__func__'):
ref = weakref.WeakMethod
receiver_object = receiver.__self__
receiver = ref(receiver)
weakref.finalize(receiver_object, self._remove_receiver)
with self.lock:
self._clear_dead_receivers()
if not any(r_key == lookup_key for r_key, _ in self.receivers):
self.receivers.append((lookup_key, receiver))
self.sender_receivers_cache.clear()
[docs] def disconnect(self, receiver=None, sender=None, dispatch_uid=None):
"""
Disconnect receiver from sender for signal.
If weak references are used, disconnect need not be called. The receiver
will be removed from dispatch automatically.
Arguments:
receiver
The registered receiver to disconnect. May be none if
dispatch_uid is specified.
sender
The registered sender to disconnect
dispatch_uid
the unique identifier of the receiver to disconnect
"""
if dispatch_uid:
lookup_key = (dispatch_uid, _make_id(sender))
else:
lookup_key = (_make_id(receiver), _make_id(sender))
disconnected = False
with self.lock:
self._clear_dead_receivers()
for index in range(len(self.receivers)):
(r_key, _) = self.receivers[index]
if r_key == lookup_key:
disconnected = True
del self.receivers[index]
break
self.sender_receivers_cache.clear()
return disconnected
def has_listeners(self, sender=None):
return bool(self._live_receivers(sender))
[docs] def send(self, sender, **named):
"""
Send signal from sender to all connected receivers.
If any receiver raises an error, the error propagates back through send,
terminating the dispatch loop. So it's possible that all receivers
won't be called if an error is raised.
Arguments:
sender
The sender of the signal. Either a specific object or None.
named
Named arguments which will be passed to receivers.
Return a list of tuple pairs [(receiver, response), ... ].
"""
if not self.receivers or self.sender_receivers_cache.get(sender) is NO_RECEIVERS:
return []
return [
(receiver, receiver(signal=self, sender=sender, **named))
for receiver in self._live_receivers(sender)
]
[docs] def send_robust(self, sender, **named):
"""
Send signal from sender to all connected receivers catching errors.
Arguments:
sender
The sender of the signal. Can be any Python object (normally one
registered with a connect if you actually want something to
occur).
named
Named arguments which will be passed to receivers. These
arguments must be a subset of the argument names defined in
providing_args.
Return a list of tuple pairs [(receiver, response), ... ].
If any receiver raises an error (specifically any subclass of
Exception), return the error instance as the result for that receiver.
"""
if not self.receivers or self.sender_receivers_cache.get(sender) is NO_RECEIVERS:
return []
# Call each receiver with whatever arguments it can accept.
# Return a list of tuple pairs [(receiver, response), ... ].
responses = []
for receiver in self._live_receivers(sender):
try:
response = receiver(signal=self, sender=sender, **named)
except Exception as err:
responses.append((receiver, err))
else:
responses.append((receiver, response))
return responses
def _clear_dead_receivers(self):
# Note: caller is assumed to hold self.lock.
if self._dead_receivers:
self._dead_receivers = False
self.receivers = [
r for r in self.receivers
if not(isinstance(r[1], weakref.ReferenceType) and r[1]() is None)
]
def _live_receivers(self, sender):
"""
Filter sequence of receivers to get resolved, live receivers.
This checks for weak references and resolves them, then returning only
live receivers.
"""
receivers = None
if self.use_caching and not self._dead_receivers:
receivers = self.sender_receivers_cache.get(sender)
# We could end up here with NO_RECEIVERS even if we do check this case in
# .send() prior to calling _live_receivers() due to concurrent .send() call.
if receivers is NO_RECEIVERS:
return []
if receivers is None:
with self.lock:
self._clear_dead_receivers()
senderkey = _make_id(sender)
receivers = []
for (receiverkey, r_senderkey), receiver in self.receivers:
if r_senderkey == NONE_ID or r_senderkey == senderkey:
receivers.append(receiver)
if self.use_caching:
if not receivers:
self.sender_receivers_cache[sender] = NO_RECEIVERS
else:
# Note, we must cache the weakref versions.
self.sender_receivers_cache[sender] = receivers
non_weak_receivers = []
for receiver in receivers:
if isinstance(receiver, weakref.ReferenceType):
# Dereference the weak reference.
receiver = receiver()
if receiver is not None:
non_weak_receivers.append(receiver)
else:
non_weak_receivers.append(receiver)
return non_weak_receivers
def _remove_receiver(self, receiver=None):
# Mark that the self.receivers list has dead weakrefs. If so, we will
# clean those up in connect, disconnect and _live_receivers while
# holding self.lock. Note that doing the cleanup here isn't a good
# idea, _remove_receiver() will be called as side effect of garbage
# collection, and so the call can happen while we are already holding
# self.lock.
self._dead_receivers = True
[docs]def receiver(signal, **kwargs):
"""
A decorator for connecting receivers to signals. Used by passing in the
signal (or list of signals) and keyword arguments to connect::
@receiver(post_save, sender=MyModel)
def signal_receiver(sender, **kwargs):
...
@receiver([post_save, post_delete], sender=MyModel)
def signals_receiver(sender, **kwargs):
...
"""
def _decorator(func):
if isinstance(signal, (list, tuple)):
for s in signal:
s.connect(func, **kwargs)
else:
signal.connect(func, **kwargs)
return func
return _decorator
Oct 01, 2019


I woke to the sound of creaking bunk beds, rustling backpacks, and clanking poles. 5:30 a.m. Time to go. I put my boots on, packed my sleeping bag, and went downstairs.
Small talk of good weather and stellar walking conditions. There’s free bread, though it’s as stiff as stones. I devoured as much of it as my mouth could muster and went on my way.
The first day was supposed to be arduous: 27.4 kilometers from Saint-Jean to Roncesvalles, with a gradual gain of 1400 meters in elevation. It was dark, cold, and misty out.

For most of the morning, I walked along a narrow road populated by small farms and modest homes.  The air stank of manure and wheat, though I felt invigorated by a sense of new beginnings.
After 5-6 kilometers of walking in the twilight, I reached the base of the Pyrenees. I allowed myself a short break, then began my ascent. As I climbed higher into the sky, the sun rose to fulfill its daily task. Clumps of green became discernible blades of grass, darkness turned to shadow, cowbells and birdsong filled the air. The landscape was awakening.
I was amazed by the sheer variety of walkers - young and old; American and Canadian, English and Irish; German, Hungarian, Italian, Polish; Korean, Japanese… the list was endless.
It was easy to discern those who were on vacation from those who were in search of meaning. The vacationers were often the couples or groups. Their conversations were light, suffering was a force to be avoided, they lacked a spiritual connection to the Camino. Conversely, the seekers walked alone. They connected with other soloists and seekers, suffering was meaningful, the Camino had called to them.
Of course, these were only superficial observations. A person could be walking for deeply personal reasons, but had decided to go with others because they were simply terrified of walking alone. And certainly there were those who behaved like spiritual hound dogs on a life-or-death mission. They often lost sight of the very thing they were seeking - it was usually right under their noses.
After two hours of scaling the Pyrenees, I arrived at Refuge Orisson, an albergue about 8 kilometers west of Saint-Jean. I took a break and bought myself another round of breakfast – espresso with a Spanish tortilla. The mountainous air was cool and refreshing, the views from the terrace stunning.
Back on the road, I was greeted by a cheery social worker from South Korea named San. He didn’t speak much English, but he always had positive things to say, and he laughed at my jokes. I appreciated his lighthearted nature, and we got along just fine.
We met another South Korean named Jackie moments later. She had worked in the hospitality industry for a year before deciding that she was unsatisfied with her life. She was a seeker, and unlike San, her English was fluent. She understood my jokes but didn’t laugh at them the way San did. Regardless, we welcomed her company and walked together for the next two hours.
Solitude exists only in stolen moments during the early stages of the Camino. San and Jackie needed a break, so I continued on without them, knowing that we would meet again in Roncesvalles.
A continual stream of other pilgrims took their place. It was overwhelming at times, all the ‘Buen Caminos!’ and fleeting conversations. I appreciated their earnest attempts to connect, but I often wanted to be alone. That was something I was still in the process of learning: how to accept and be open to the unexpected.
I arrived at Roncesvalles early in the afternoon. It’s a small town with two restaurant-bars, a hotel, and a gothic monastery that accommodated 200 or so pilgrims. After checking in, I idled in the courtyard, called my parents, and wrote in my journal. Later, Jackie and I got a drink at the bar to celebrate our first full day of walking.
We went to the nearby restaurant for dinner with some of the other pilgrims. The standard pilgrim meal consisted of an appetizer, the main dish, and dessert. And of course, a bottle of red wine. Always.
Our tongues had grown loose thanks to the wine, and we began to exchange stories of who we were, where we came from, and why we were walking the Camino.
The Spanish couple at our table had recently returned to Spain after having lived in London for several years, stating that life in the city was too complicated. They preferred the simple lifestyle of Spain, and they were walking the Camino to celebrate their homecoming. Another man from Italy shared that he had been walking every year for the past five years. He liked the perspective he gained and the people he met.
“Everyone has a story to share on the Camino. I come here to learn and listen,” he said.
After dinner, I retreated to my bunk bed and journaled about the day.
Walking in unknown territory nourished me. I felt strong and powerful, small and humbled beneath the Spanish skies. Perhaps I was here to write the rest of my own story; to rediscover and map the terrain of my own heart.
I checked the contents of my rucksack again. Three outfits and two pairs of socks. A sleeping bag and a down jacket. Phone charger, toiletries, another set of shoes in addition to my boots. Just in case.
Emergency medical supplies for three days. The KIND bars have been shared and devoured; my 1-liter nalgene bottle is filled to the brim. My California license plate––the only item of sentimental value. A journal and my writing tools.
Nervousness. I take a deep breath.
Excitement. I let it go, slowly.
They’re two sides of the same coin, and I am standing on the precipice.


Definition at line 36 of file proposal_evaluator.cpp.
◆ result_type
◆ proposal_operation_hardfork_visitor()
| graphene::chain::proposal_operation_hardfork_visitor::proposal_operation_hardfork_visitor |
( |
const database & |
_db, |
|
|
const fc::time_point_sec |
bt |
|
) |
| |
|
inline |
◆ operator()() [1/13]
template<typename T >
| void graphene::chain::proposal_operation_hardfork_visitor::operator() |
( |
const T & |
v | ) |
const |
|
inline |
◆ operator()() [2/13]
◆ operator()() [3/13]
◆ operator()() [4/13]
◆ operator()() [5/13]
◆ operator()() [6/13]
◆ operator()() [7/13]
◆ operator()() [8/13]
◆ operator()() [9/13]
◆ operator()() [10/13]
◆ operator()() [11/13]
◆ operator()() [12/13]
◆ operator()() [13/13]
◆ block_time
| const fc::time_point_sec graphene::chain::proposal_operation_hardfork_visitor::block_time |
◆ db
| const database& graphene::chain::proposal_operation_hardfork_visitor::db |
◆ next_maintenance_time
| const fc::time_point_sec graphene::chain::proposal_operation_hardfork_visitor::next_maintenance_time |
The documentation for this struct was generated from the following file:


Enum BuilderStage
Enumeration to represent the object builder stages.
Namespace: Unity.Builder
Assembly: Unity.Container.dll
Syntax
public enum BuilderStage
Remarks
The order of the values in the enumeration is the order in which the stages are run.
Fields
| Name | Description |
|---|---|
| Creation | Strategies in this stage create objects. Typically you will only have a single policy-driven creation strategy in this stage. |
| Fields | Strategies in this stage initialize fields. |
| Initialization | Strategies in this stage work on created objects. |
| Methods | Strategies in this stage do method calls. |
| PostInitialization | Strategies in this stage work on objects that are already initialized. Typical work done in this stage might include looking to see if the object implements some notification interface to discover when its initialization stage has been completed. |
| PreCreation | Strategies in this stage run before creation. Typical work done in this stage might include strategies that use reflection to set policies into the context that other strategies would later use. |
| Properties | Strategies in this stage work initialize properties. |


targetType
ImportHandler
termNames
Request
toCompute
Request
tools
scala
topLevel
SparkJLineCompletion
topLevelBase
SparkJLineCompletion
topLevelFor
SparkJLineCompletion
topLevelThreshold
SparkJLineCompletion
tos
CompilerCompletion
toString
Request
ComputedImports
SparkISettings
ids
TypeMemberCompletion
MemberHandler
totalSilence
SparkIMain
tp
CompilerCompletion
TypeMemberCompletion
trees
Request
truncate
TruncatingWriter
TruncatingWriter
SparkIMain
TypeAliasHandler
SparkMemberHandlers
TypeMemberCompletion
SparkJLineCompletion
typeNames
Request
typeOf
Request
SparkJLineCompletion
typeOfExpression
SparkIMain
typeOfTerm
SparkIMain
typesOfDefinedTerms
Request


SA's Klaasen and Kiwi partner a win away from claiming prestigious ATP Final
Cape Town - South Africa's Raven Klaasen and his New Zealand partner doubles partner Michael Venus have qualified for the final of the ATP Finals in London.
The pair beat Juan Sebastian Cabal and Robert Farah of Columbia in three sets, winning 6-7 (5/7), 7-6 (12-10) and 10-6.
In a closely contested match, the 39 winners that Klaasen and Venus managed compared with just 27 of their opponents helped them to victory.
The pair also managed 10 aces.
They now wait on the second semi-final encounter between Pierre-Hugues Herbert and Nicolas Mahut of France who take on Lukasz Kubot (Poland) and Marcelo Melo (Brazil) to see who they will face in the final.


Droid4Sample
Powered by
Smart&Soft
Development
The Smart&Soft Team:
<EMAIL_ADDRESS>Contact
e-mail:
support@smartnsoft.com


stdlib v22.1.4 gb_trees
This module provides Prof. Arne Andersson's General Balanced Trees. These have no storage overhead compared to unbalanced binary trees, and their performance is better than AVL trees.
This module considers two keys as different if and only if they do not compare equal (==
).
Link to this section Summary
Functions
Rebalances Tree1
. Notice that this is rarely necessary, but can be motivated when many nodes have been deleted from the tree without further insertions. Rebalancing can then be forced to minimize lookup times, as deletion does not rebalance the tree.
Removes the node with key Key
from Tree1
and returns the new tree. Assumes that the key is present in the tree, crashes otherwise.
Removes the node with key Key
from Tree1
if the key is present in the tree, otherwise does nothing. Returns the new tree.
Returns a new empty tree.
Inserts Key
with value Value
into Tree1
if the key is not present in the tree, otherwise updates Key
to value Value
in Tree1
. Returns the new tree.
Turns an ordered list List
of key-value tuples into a tree. The list must not contain duplicate keys.
Retrieves the value stored with Key
in Tree
. Assumes that the key is present in the tree, crashes otherwise.
Inserts Key
with value Value
into Tree1
and returns the new tree. Assumes that the key is not present in the tree, crashes otherwise.
Returns true
if Key
is present in Tree
, otherwise false
.
Returns true
if Tree
is an empty tree, othwewise false
.
Returns an iterator that can be used for traversing the entries of Tree
; see next/1
. The implementation of this is very efficient; traversing the whole tree using next/1
is only slightly slower than getting the list of all elements using to_list/1
and traversing that. The main advantage of the iterator approach is that it does not require the complete list of all elements to be built in memory at one time.
Returns an iterator that can be used for traversing the entries of Tree
; see next/1
. The difference as compared to the iterator returned by iterator/1
is that the first key greater than or equal to Key
is returned.
Returns the keys in Tree
as an ordered list.
Returns {``Key``, ``Value``}
, where Key
is the largest key in Tree
, and Value
is the value associated with this key. Assumes that the tree is not empty.
Looks up Key
in Tree
. Returns {value, ``Value``}
, or none
if Key
is not present.
Maps function F(K, V1) -> V2 to all key-value pairs of tree Tree1
. Returns a new tree Tree2
with the same set of keys as Tree1
and the new set of values V2
.
Returns {``Key``, ``Value``, ``Iter2``}
, where Key
is the smallest key referred to by iterator Iter1
, and Iter2
is the new iterator to be used for traversing the remaining nodes, or the atom none
if no nodes remain.
Returns the number of nodes in Tree
.
Returns {``Key``, ``Value``}
, where Key
is the smallest key in Tree
, and Value
is the value associated with this key. Assumes that the tree is not empty.
Returns a value Value
from node with key Key
and new Tree2
without the node with this value. Assumes that the node with key is present in the tree, crashes otherwise.
Returns a value Value
from node with key Key
and new Tree2
without the node with this value. Returns error
if the node with the key is not present in the tree.
Returns {``Key``, ``Value``, ``Tree2``}
, where Key
is the largest key in Tree1
, Value
is the value associated with this key, and Tree2
is this tree with the corresponding node deleted. Assumes that the tree is not empty.
Returns {``Key``, ``Value``, ``Tree2``}
, where Key
is the smallest key in Tree1
, Value
is the value associated with this key, and Tree2
is this tree with the corresponding node deleted. Assumes that the tree is not empty.
Converts a tree into an ordered list of key-value tuples.
Updates Key
to value Value
in Tree1
and returns the new tree. Assumes that the key is present in the tree.
Returns the values in Tree
as an ordered list, sorted by their corresponding keys. Duplicates are not removed.
Link to this section Functions
balance/1
balance(Tree1) -> Tree2 when Tree1 :: tree(Key, Value), Tree2 :: tree(Key, Value).
Rebalances Tree1
. Notice that this is rarely necessary, but can be motivated when many nodes have been deleted from the tree without further insertions. Rebalancing can then be forced to minimize lookup times, as deletion does not rebalance the tree.
delete/2
delete(Key, Tree1) -> Tree2 when Tree1 :: tree(Key, Value), Tree2 :: tree(Key, Value).
Removes the node with key Key
from Tree1
and returns the new tree. Assumes that the key is present in the tree, crashes otherwise.
delete_any/2
delete_any(Key, Tree1) -> Tree2 when Tree1 :: tree(Key, Value), Tree2 :: tree(Key, Value).
Removes the node with key Key
from Tree1
if the key is present in the tree, otherwise does nothing. Returns the new tree.
Returns a new empty tree.
enter/3
enter(Key, Value, Tree1) -> Tree2 when Tree1 :: tree(Key, Value), Tree2 :: tree(Key, Value).
Inserts Key
with value Value
into Tree1
if the key is not present in the tree, otherwise updates Key
to value Value
in Tree1
. Returns the new tree.
from_orddict/1
from_orddict(List) -> Tree when List :: [{Key, Value}], Tree :: tree(Key, Value).
Turns an ordered list List
of key-value tuples into a tree. The list must not contain duplicate keys.
Retrieves the value stored with Key
in Tree
. Assumes that the key is present in the tree, crashes otherwise.
insert/3
insert(Key, Value, Tree1) -> Tree2 when Tree1 :: tree(Key, Value), Tree2 :: tree(Key, Value).
Inserts Key
with value Value
into Tree1
and returns the new tree. Assumes that the key is not present in the tree, crashes otherwise.
is_defined/2
Returns true
if Key
is present in Tree
, otherwise false
.
Returns true
if Tree
is an empty tree, othwewise false
.
iterator/1
iterator(Tree) -> Iter when Tree :: tree(Key, Value), Iter :: iter(Key, Value).
Returns an iterator that can be used for traversing the entries of Tree
; see next/1
. The implementation of this is very efficient; traversing the whole tree using next/1
is only slightly slower than getting the list of all elements using to_list/1
and traversing that. The main advantage of the iterator approach is that it does not require the complete list of all elements to be built in memory at one time.
iterator_from/2
iterator_from(Key, Tree) -> Iter when Tree :: tree(Key, Value), Iter :: iter(Key, Value).
Returns an iterator that can be used for traversing the entries of Tree
; see next/1
. The difference as compared to the iterator returned by iterator/1
is that the first key greater than or equal to Key
is returned.
Returns the keys in Tree
as an ordered list.
Returns {``Key``, ``Value``}
, where Key
is the largest key in Tree
, and Value
is the value associated with this key. Assumes that the tree is not empty.
lookup/2
lookup(Key, Tree) -> none | {value, Value} when Tree :: tree(Key, Value).
Looks up Key
in Tree
. Returns {value, ``Value``}
, or none
if Key
is not present.
map/2
map(Function, Tree1) -> Tree2 when Function :: fun((K :: Key, V1 :: Value1) -> V2 :: Value2), Tree1 :: tree(Key, Value1), Tree2 :: tree(Key, Value2).
Maps function F(K, V1) -> V2 to all key-value pairs of tree Tree1
. Returns a new tree Tree2
with the same set of keys as Tree1
and the new set of values V2
.
next/1
next(Iter1) -> none | {Key, Value, Iter2} when Iter1 :: iter(Key, Value), Iter2 :: iter(Key, Value).
Returns {``Key``, ``Value``, ``Iter2``}
, where Key
is the smallest key referred to by iterator Iter1
, and Iter2
is the new iterator to be used for traversing the remaining nodes, or the atom none
if no nodes remain.
Returns the number of nodes in Tree
.
Returns {``Key``, ``Value``}
, where Key
is the smallest key in Tree
, and Value
is the value associated with this key. Assumes that the tree is not empty.
take/2
Returns a value Value
from node with key Key
and new Tree2
without the node with this value. Assumes that the node with key is present in the tree, crashes otherwise.
take_any/2
Returns a value Value
from node with key Key
and new Tree2
without the node with this value. Returns error
if the node with the key is not present in the tree.
take_largest/1
take_largest(Tree1) -> {Key, Value, Tree2} when Tree1 :: tree(Key, Value), Tree2 :: tree(Key, Value).
Returns {``Key``, ``Value``, ``Tree2``}
, where Key
is the largest key in Tree1
, Value
is the value associated with this key, and Tree2
is this tree with the corresponding node deleted. Assumes that the tree is not empty.
take_smallest/1
take_smallest(Tree1) -> {Key, Value, Tree2} when Tree1 :: tree(Key, Value), Tree2 :: tree(Key, Value).
Returns {``Key``, ``Value``, ``Tree2``}
, where Key
is the smallest key in Tree1
, Value
is the value associated with this key, and Tree2
is this tree with the corresponding node deleted. Assumes that the tree is not empty.
Converts a tree into an ordered list of key-value tuples.
update/3
update(Key, Value, Tree1) -> Tree2 when Tree1 :: tree(Key, Value), Tree2 :: tree(Key, Value).
Updates Key
to value Value
in Tree1
and returns the new tree. Assumes that the key is present in the tree.
Returns the values in Tree
as an ordered list, sorted by their corresponding keys. Duplicates are not removed.


Connected accounts
Add a person to your NHS login
{{ details({
"text": "What do I need to do to add someone",
"HTML": "
You will need to know the following
- their name
- their contact email address
- their postcode
- their date of birth
If you know their NHS number then you will not need to know their postcode or date of birth.
"
}) }}
Add a person
View people you have given access to
{{ table({
panel: false,
caption: "People you have given access to services",
firstCellIsHeader: false,
head: [
{
text: "Name"
},
{
text: "Service"
}
],
rows: [
[
{
text: "David Smith"
},
{
text: "myHealth, AsthmaApp"
}
],
[
{
text: "Susan Smith"
},
{
text: "myHealth"
}
],
[
{
text: "Hilda Smith"
},
{
text: "myHealth"
}
]
]
}) }}
View people you have access for
{{ table({
panel: false,
caption: "People you have access to",
firstCellIsHeader: false,
head: [
{
text: "Name"
},
{
text: "Service"
}
],
rows: [
[
{
text: "Tara Smith"
},
{
text: "myHealth"
}
],
[
{
text: "Susan Smith"
},
{
text: "myHealth"
}
]
]
}) }}
Revoke access
{{ details({
"text": "What happens when I revoke all access",
"HTML": "
When you revoke access to a service we will immedietely
- Can we do this? instruct the services to termimate all sessions relating to the person selected
- remove service from the person you have selected
we will not tell anyone that access has been revoked
"
}) }}
Revoke access
Revoke access to all users for all services
{{ details({
"text": "What happens when I revoke all access",
"HTML": "
When you revoke all access to all services we will immedietely
- Can we do this? instruct all services to termimate all sessions
- remove all services you have granted access
we will not tell anyone that access has been revoked
"
}) }}
Revoke all access to all services


Once at the second step, they'd have to return to the home page, log in again, then re-enter their arrival and departure data.
好 看不好看


Borrowing History
| Cover | Title | Author(s) | Date Borrowed | Due Date | Days Left | Status | Action |
|---|---|---|---|---|---|---|---|
| Eloquent Javascript | Marijn Haverbeke | 28/07/2017 | 10/08/2017 | 10 | Pending | Read Return | |
| Smashing Node.js | Guillermo Rauch | 28/07/2017 | 10/08/2017 | 10 | Pending | Read Return | |
| Kill the Lazy Cat | Emanuele DelBono | 28/07/2017 | 10/08/2017 | 0 | Returned | Read Return | |
| Slice Pythons | Emanuele DelBono | 28/07/2017 | 10/08/2017 | 0 | Returned | Read Return | |
| Uhuru | Rober Ruak | 28/07/2017 | 10/08/2017 | 0 | Returned | Read Return | |
| How to Kill Deadlines | Zed Shaw | 02/06/2017 | 10/06/2017 | 0 | Returned | Read Return | |
| Something Of Value | Rober Ruak | 28/07/2017 | 10/08/2017 | 0 | Returned | Read Return | |
| Things Fall Apart | Chinua Achebe | 28/07/2017 | 10/08/2017 | 0 | Returned | Read Return |


I love working on open-source projects! I've held many different roles in the open-source ecosystem. I started my own projects, sent in patches to other people's projects, packaged software for Linux distributions and Windows, created useful bug reports.
Software development is exciting for me. I like solving interesting problems and doing cool projects. I also enjoy tinkering around with new features in experimental git branches and discussing the course of projects on mailing lists. I love the social and collaborative open-source experience on platforms such as GitHub.
I'm a hobbyist game developer who regularly participates in game jams. I loved doing game jams so much that I even started up my own game jam platform! Game development allows for lots of creativity and holds many very interesting problems on every level of the stack.
I'm a Developer and Trusted User on Arch Linux, a Linux distribution for advanced users. I maintain lots of packages on that project. Often times, packages break and need patches in order to build. Due to Arch's philosophy, I usually speak to the affected software's projects directly and send in helpful patches and bug descriptions.
I graduated from the University of Hamburg with a Bachelor of Computer Science. For my Bachelor's thesis, I wrote a path tracer called trac0r in an attempt to evaluate the performance and feasibility of real-time path tracing.
I'm a knowledgeable system administrator for Linux systems. I've been diligently running web servers, mail systems and various minor services for years.
You can sometimes find me on various software conventions.
I occasionally create 3D art and models in Blender and 2D sprites with Inkscape.
You can expect me to pick up any additional languages reasonably quickly.
Along with those languages, I use a bunch of tools to accomplish different tasks. My favorite tools in no particular order: git, vim, valgrind, gdb, ansible, cmake, ssh, qtcreator
I'm also familiar with some of the popular libraries and frameworks in every language's ecosystem such as Boost, Qt, Django, Flask, Bootstrap, jQuery, AngularJS, React/Redux, Rocket, Diesel.
I have experience with high-performance computing using distributed memory (using MPI) and shared memory (using pthreads) as well as intermediate-level server operation.
Due to my activity in past projects, I have a firm understanding of how a Linux userland fits together at every level. I've made my own Linux distribution.
Additionally, I'm well-versed in automating and orchestrating servers. I can create deployment workflows for all kinds of applications, be it web, mobile or desktop. I know how and when to use cloud-based deployment platforms such as AWS.
I'm good at team communication, knowledge management and keep a consistent, dogmatic coding style. I value good documentation and tests. I'm no stranger to reading other peoples' code.
I can design APIs (both RESTful and not) as well as UIs and reason about UX. I program with security in mind.
I can reason about cache performance and data/cache coherency in regards to modern processors. I program in a performance-oriented manner while not over-thinking performance where it doesn't matter.
Consulting work for various clients.
This is a management application for Model United Nations conferences.
A collection of games made within 48 hours.
A game jam web application. I work on this project with a bunch of contributors.
A Linux distribution for advanced users. I'm a Developer and Trusted User maintaining many packages for this project.
This is a live distribution specialized for gaming and showing off the current state of the art open-source games.
Pseudoform was a technical demo for various modern graphics technologies.
This is a science fiction game modification of Battlefield 2142 for which I contributed 3D models and provided server hosting.
I made a customer management backend for this client.
Note: This list only contains either commercial projects or open-source projects I founded or contributed to by a significant amount. I don't list projects for which I only provided minor contributions.
I developed the current web site of this client.


Username
Password
Remember Me
Forgot Password?
Login
or sign in with
Don't have an account ?
Signup now!


TOMCATS A film review by Max Messier Copyright 2001 filmcritic.com filmcritic.com
The one statement used in defining a film that drives fear and loathing into my heart is invariably "an outlandish comedy." They try in vain to recycle the originality of American Pie, Porky's, Road Trip, or South Park, attempting to meld a T&A gross-out contest with a love story, and they always fail miserably.
Tomcats wins, hands-down, the lowest common denominator award so far this year. It's a trashy, sexist, crude comedy revolving around the values of commitment, honesty, and screwing your friends over for half a million dollars. In the process, it throws us numerous sex partners, Bill Maher playing a thug named Carlos, true love, and an escaping testicle.
Here's the plot. A group of seven buddies individually throw together $1,000 in a betting pool and the last man unwed gets the prize money. Jerry O'Connell, who will forever be the fat kid from Stand by Me, plays a two-dimensional struggling cartoonist named Michael, who ends up losing $51,000 in Vegas shooting craps. Unable to pay the debt, a quasi-take-no-shit mob boss named Carlos (Bill Maher) gives him 30 days to come up with the money or else forfeit his life. Michael concocts a scheme to win the pot, which has grown to $500,000 through mutual fund investing, by getting his buddy Kyle (Jake Busey, the man with the largest incisors in the world) married. Michael finds Natalie (Shannon Elizabeth), an old flame of Kyle's, and convinces her to marry him whereupon they'll split the money.
A few questions raced through my mind during the screening. Could Shasta McNasty be creditable as a romantic lead? How could Bill Maher play a thug named Carlos? Could that foreign-exchange chick from American Pie actually act her way through a movie with all of her clothes on? How could the screenwriter of Rosewood write and direct "an outlandish comedy"? How many chicks in skimpy outfits would there ultimately be?
Tomcats is as a light as the edited-for-TV version of Animal House. The acting is sub-par, the comedy is nonexistent, the thought of a man chasing a severed testicle through a hospital is pitiful, and a fat man falling down in every scene is only funny if it's Chris Farley. Which it isn't. The parody corniness also has to stop. I never imagined that John Woo's trademark use of birds, or rose petals falling onto a semi-naked girl would become instant clichés through overuse. With Tomcats, these routines get groans from the audience.
If bad acting, hot chicks in skimpy outfits, a script devoid of humor, champagne laced with a Viagra-like substance, lesbian threesomes, and Jerry O'Connell being whipped by an S&M grandmother are your idea of a hot date, Tomcats is the movie for you. If not, save your eight bucks and spend it at your local strip club.

Visit filmcritic.com on the Web at http://www.filmcritic.com
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Master Selsia:
So the Ivory Tower is connected to this...
Tread carefully so as not to cause any undue incidents.
Keep up the good work!


Reports any unnecessary uses of the super
qualifier in method calls and fields references. A super qualifier is unnecessary
when the field or method of the super class is not overridden in the calling class.
Use the checkbox below to ignore qualifiers, which help to distinguish super members access from the same named members of the outer class.
See also
- Java | Visibility issues | Access of inherited field looks like access of element in surrounding code
- Java | Visibility issues | Call to inherited method looks like call to local method


After watching a few introductory videos on complex numbers and how they could generate fractals, I decided to implement a few complex number functions in JavaScript. This is the result.
To generate a fractal (in this case, the Mandelbrot set), simply click on the blue "Generate" button at the bottom of the area. If you want to see more of the fractal, simply bump up the "Maximum Iterations" value. After a point (specifically >600) it starts to become ludicrously slow to generate, so I've stopped it there.
Speaking of speed, you can decrease the quality by clicking on one of the "Quality" buttons. This will help with speed problems once you start exploring the fractal further.
You can center the view anywhere on the screen. Simply click on your new center in the fractal area. To zoom in, increase the "Zoom Factor" by around 1. You can also view the path that the complex numbers take by toggling the "Line tracking" feature.
"Switch Mode" allows you to toggle between Mandelbrot and Julia sets. With Julia sets, you can adjust the real and imaginary components to get different fractals. "Reset Settings" does what you think it does.
Don't forget, to see your changes in action, click the "Generate" button. However, clicking on the fractal to set the pan values is immediate, so you might have to wait a bit for the fractal to generate.


Enum -
VirtualMachinePowerState(vim.VirtualMachine.PowerState)
- Property of
-
InvalidPowerState, VirtualMachineRuntimeInfo, VirtualMachineSnapshotTree
- Parameter to
-
CheckMigrate_Task, MigrateVM_Task, ValidateMigration
Enum Description
The PowerState type defines a simple set of states for a virtual machine:
poweredOn, poweredOff, and suspended. This type does not model substates,
such as when a task is running to change the virtual machine state.
If the virtual machine is in a state with a task in progress, it
transitions to a new state when the task completes. For example, a virtual
machine continues to be in the poweredOn state while a suspend task
is running, and changes to the suspended state once the task finishes.
As a consequence of this approach, clients interested in monitoring
the status of a virtual machine should typically track the
activeTask data object in addition to the
powerState object.
Enum Constants
| Name | Description |
| poweredOff |
The virtual machine is currently powered off.
|
| poweredOn |
The virtual machine is currently powered on.
|
| suspended |
The virtual machine is currently suspended.
|
Show WSDL type definition


Scratch Profile Embed BETA
Embed your Scratch profile on your website
This is only, for me, the big updates. For all bug fixes and other things, see the GitHub commit history.
Update 14 July 2018
- • New View on Scratch button
- • The "About me" and "What I'm working on" paragraphs can't be larger than 500px
Update 17 July 2018
- • The "What I'm working on" works now !
- • The "About me" and "What I'm working on" has some margin.
Update 25 July 2018
- • The Thimble remix bar is gone!
- • The presentation site was (almost) fully remade.
- • Improvement to the "View on Scratch" button.
Update 30 July 2018
- • Improvement to the View on Scratch button
- • Using the new Scratch blue
Update 26 September 2018
- • An error message is shown if the user can't be found.
Update 20 October 2018
- • Added a loader.
- • Prefix the CSS code correctly.
Update 7 January 2019
- • The "Use it" page asks for feedback.
- • Happy new year 2019 ! 🎉


{% extends 'base.html' %} {% load ratings %} {% block content %} {% if messages %} {% for message in messages %}
| # | Book Title | Book by | Author | |
|---|---|---|---|---|
| {{ forloop.counter }} | {{ book.title }} | {{ book.user }} | {{ book.author }} | |
| You have no book in your booklist, start by adding one. |


| Package | system.base |
|---|---|
| Inheritance | interface IUserIdentity |
| Subclasses | CBaseUserIdentity, CUserIdentity |
| Since | 1.0 |
| Version | $Id$ |
| Source Code | framework/base/interfaces.php |
| Method | Description | Defined By |
|---|---|---|
| authenticate() | Authenticates the user. | IUserIdentity |
| getId() | Returns a value that uniquely represents the identity. | IUserIdentity |
| getIsAuthenticated() | Returns a value indicating whether the identity is authenticated. | IUserIdentity |
| getName() | Returns the display name for the identity (e.g. username). | IUserIdentity |
| getPersistentStates() | Returns the additional identity information that needs to be persistent during the user session. | IUserIdentity |
|
abstract public boolean authenticate()
| ||
| {return} | boolean | whether authentication succeeds. |
Authenticates the user. The information needed to authenticate the user are usually provided in the constructor.
|
abstract public mixed getId()
| ||
| {return} | mixed | a value that uniquely represents the identity (e.g. primary key value). |
Returns a value that uniquely represents the identity.
|
abstract public boolean getIsAuthenticated()
| ||
| {return} | boolean | whether the identity is valid. |
Returns a value indicating whether the identity is authenticated.
|
abstract public string getName()
| ||
| {return} | string | the display name for the identity. |
Returns the display name for the identity (e.g. username).
|
abstract public array getPersistentStates()
| ||
| {return} | array | additional identity information that needs to be persistent during the user session (excluding id). |
Returns the additional identity information that needs to be persistent during the user session.


AppDelegate Class Reference
| Inherits from | UIResponder |
|---|---|
| Conforms to | UIApplicationDelegate |
| Declared in | AppDelegate.h AppDelegate.m |
– checkFirstLaunch
Function to check the first launch of the screen
- (BOOL)checkFirstLaunch
Return Value
returns true if this is the first launch
Declared In
AppDelegate.m
– markFirstLaunch
This function marks the first launch of app in user defaults
- (void)markFirstLaunch
Declared In
AppDelegate.m
– selectRootViewController
Function to decide which Viewcontroller to take on launch, this basically switches the start view based on the fact if user has launched the app before or not. On first launch it will show launch screen with instructions, on every next launch it will directly take the user to voting screen
- (UIViewController *)selectRootViewController
Return Value
return the appropriate viewcontroller
Declared In
AppDelegate.m


You are using a browser that already supports placeholders, so the polyfill is not needed here.
Load this page in IE9 or another older browser if you want to try this out


JavaScript to enable keyboard arrow navigation (for accessibility) on focusable elements.
Try it out by tabbing into the list and use your `up` and `down` keyboard arrows - a11yarrows will traverse the selector elements only


John Doe
Administrator
Account
Profile
Change Password
Logout
System Management
System Setting
Allowed Expert Tip
:
On
Off
Share Price
:
Update
Number of Shares
:
Update
Allowed Pools
:
V4
V5
V65
V75
V86
Update


Reproduce the halfnorm() function found in the 'faraway' package using the 'ggplot2' API.
| Version: | 1.1.2 |
| Depends: | R (≥ 3.1.0) |
| Imports: | ggplot2 (≥ 2.0.0), ggrepel (≥ 0.6.5) |
| Suggests: | covr, testthat |
| Published: | 2017-06-06 |
| Author: | Nathan Eastwood [aut, cre] |
| Maintainer: | Nathan Eastwood <nathan.eastwood at icloud.com> |
| BugReports: | https://github.com/nathaneastwood/gghalfnorm/issues |
| License: | AGPL-3 |
| URL: | https://github.com/nathaneastwood/gghalfnorm |
| NeedsCompilation: | no |
| Materials: | README |
| CRAN checks: | gghalfnorm results |
| Reference manual: | gghalfnorm.pdf |
| Package source: | gghalfnorm_1.1.2.tar.gz |
| Windows binaries: | r-devel: gghalfnorm_1.1.2.zip, r-release: gghalfnorm_1.1.2.zip, r-oldrel: gghalfnorm_1.1.2.zip |
| OS X binaries: | r-release: gghalfnorm_1.1.2.tgz, r-oldrel: gghalfnorm_1.1.2.tgz |
| Old sources: | gghalfnorm archive |
Please use the canonical form https://CRAN.R-project.org/package=gghalfnorm to link to this page.


This is the x-axis value used for the chartName. Typically it's the build number, but any numeric value can be used.
This value is optional. If unspecified, the build number is used.


THE POSTMAN (IL POSTINO) A film review by Christopher Null Copyright 1995 Christopher Null
The story surrounding the making of THE POSTMAN is almost as interesting as the film itself. English/Austrian Michael Radford was hand-picked by the star of the picture, Italian Massimo Troisi, to direct the dramatization of a Chilean novel about the story of Pablo Neruda (Phillippe Noiret), a Chilean poet exiled to an Italian island, where he befriends a local fisherman-cum-letter carrier.
Radford accepted the assignment, and Troisi assumed the title role of Mario, a simple Everyman whom Neruda slowly cultivates from tongue-tied wallflower to smooth Romeo. With Neruda's advice and introduction to poetry, Mario is able to overcome his awkwardness and enchant the woman of his dreams, the darkly beautiful Beatrice (Maria Grazia Cucinotta), and subsequently he convinces her to marry him. His transformation complete, Mario finds inside himself the romanticism and courage that we all wish for.
Radford, director of the spectacular 1984, creates a memorable and refreshing film about unadulterated love without resorting to gimmicks like modern Hollywood romances do. In THE POSTMAN, Troisi brings to starkly realistic life the character of Mario as the personification of emotion--feeling strongly for both a woman and his mentor.
Only a few problems stand out as noticeable. The subtitle translation could use some work, and the characters tend to mumble on occasion, making the extraction of emotion from a language I don't understand all the more difficult. Otherwise, I have no complaints. Everything in this unlikely movie seems to work well. Even THE POSTMAN's slow pacing fits the film perfectly.
The eye-popper to the story surrounding the film is that Troisi, a man with a long history of heart problems, died some 12 hours after the film wrapped. One could speculate that his devotion to the project kept him alive just long enough to finish shooting. And if that doesn't say something about what you can expect to see from Troisi on the screen, I don't know what does.
RATING: ****
+---------------------------------------+ |* Unquestionably awful | |** Sub-par on many levels | |*** Average quality, hits and misses | |**** Good, memorable film | |***** Perfection |
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


what should you choose?
- This tool will not tell you what you should choose. That is up to you to decide with the help of your doctor.
- However, the tool can suggest based on your current answers and the values we can measure from them, that:
- Your treatment preferences align Unknown with
Please return the tablet to the front desk.


BMW, Great Wall to build new China plant for electric cars
MUNICH: BMW and its partner Great Wall Motor said they plan to build a plant in China with a capacity of 160,000 cars per year, and which will produce BMW's electric MINI brand and Great Wall Motor models.
The €650 million plant is due for completion in 2022.
Automakers and suppliers are scrambling to meet tough new Chinese quotas for less polluting cars. Those rules call for electric and rechargeable hybrid vehicles to account for a fifth of total sales by 2025.
The new joint venture Spotlight Automotive, will be based in Zhangjiagang near Shanghai and eventually employ 3,000 staff.
Earlier this month, Great Wall gained domestic regulatory approval for the new plant.
Great Wall is China's top sport utility vehicle and pick-up truck maker. It also builds Ora, an affordable battery electric vehicle brand in Baoding, the city where it is based.
BMW is following the footsteps of larger peer Volkswagen , which is readying two Chinese factories to build electric cars next year, and which will have a combined production capacity of 600,000 vehicles.
Tesla is aiming for more than 500,000 cars a year by building a new factory in Shanghai.


Data Scientist
Research Data Scientist
Research and Innovation Manager
Design Researcher
Head of Research and Development
Quantum Lead


|
How to write great container images
Containers are packed with many misconceptions, leading to disappointing misuse of what's a truly remarkable underlying technology. One very popular misuse of Docker is how images are made. blog.bejarano.io Ricard Bejarano
|
|
Bringing service workers to Google Search
Search for just about any topic on Google, and you're presented with an instantly recognizable page of meaningful, relevant results. web.dev Jeff Posnick
|
|
The cost of JavaScript in 2019
One large change to the cost of JavaScript over the last few years has been an improvement in how fast browsers can parse and compile script. v8.dev Addy Osmani
|
|
Why I don't use web components
None of this should be taken as criticism of the hard work that has been done on web components. It's possible that I have made some errors in this post, in which case I'd welcome corrections. dev.to Rich Harris
|
|
Vue's Darkest Day
Today I was amazed to see the usually positive and friendly VueJS community descend into a bitter war. Two weeks ago Vue creator Evan You released a Request for Comment (RFC) for a new function-based way of writing Vue components in the upcoming Vue 3.0. dev.to Daniel Elkington
|
|
Top tips for web performance
Use srcset to automatically choose the right image size. According to HTTP Archive, a typical mobile web page weighs over 2.6 MB, and more than two thirds of that weight is images. That's a great opportunity for optimization! web.dev Sam Dutton
|
|
A Svelte Chat with Rich Harris!
What an exciting episode for you today!Rich Harris, the creator and lead developer of Svelte and Sapper, joins me to talk all about why he made Svelte, what he's learned from making Svelte, and what he sees as the next big thing he wants to add to Svelte!Have a watch and a listen and let me know wha www.youtube.com
Harry Wolff
|
|
Vue/RFC - Expose logic-related component options via function-based APIs
Is this like Python 3 / Angular 2 / Do I have to rewrite all my code? No. The new API is 100% compatible with current syntax and purely additive. All new additions are contained within the new setup() function. 3.0 will support 2. github.com Evan You
|
|
Announcing Frontity 1.0!
Today, we’re incredibly excited to introduce Frontity 1.0 to the world! ? This is an important milestone for us here at Frontity but also for all of you, who have shown interest in this project and provided support in many different ways since the beginning. dev.to Reyes Martínez
|


KindleKit
KindleKit is a micro iOS Dynamic Framework with the single purpose of parsing user’s notes and hightlights from Kindle eBook Reader generated ‘CSV’ files. These csv files user receives when he decides to export its Notes. Then Amazon sends email to user’s email containing its notes in csv
and pdf
files.
Build using Swift 4.2, Xcode 10, supports iOS 11.0+
Usage
- import module KindleKit in the file you want to use the framework
- Invoke the static function
KindleKit.parse(kindleCSV: String)
passing the csv string. - In return you will receive
KindleKit.NotesContainer
which is object that contains all data from this csv if it is in valid format.
Example
import UIKit
import KindleKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
guard let parsed = try? KindleKit.parse(kindleCSV: csvString) else { return }
print(parsed)
}
}
Installation
Carthage Installation
- In your
Cartfile
addgithub "stoqn4opm/KindleKit"
- Link the build framework with the target in your XCode project
For detailed instructions check the official Carthage guides here
Manual Installation
- Download the project and build the shared target called
KindleKit
- Add the product in the list of
embed frameworks
list inside your project’s target or create a work space withKindleKit
and your project and link directly the product ofKindleKit
‘s target to your targetembed frameworks
list
Licence
The framework is licensed under MIT licence. For more information see file LICENCE


Welcome to our page
Select Light
Select Tempetature Type
Something else
Red
Blue
Green
Enter standby


Id
Player Name
Age
Position
Goals
Cards
DELETE
Info
Name:
Age
Position
Goals
Cards
Add
To Main
Logout


job_stream.common¶
The core job_stream adapter in Python. This file is responsible for providing adaptations for all of the needed C++ code.
Warning
New users should look at using the job_stream.inline
module instead
of the classes in this file.
Example usage:
from job_stream import common
class AddOne(common.Job):
def handleWork(self, work):
self.emit(work + 1)
common.work.extend([ 8, 9 ])
common.run({
'jobs': [
{ 'type': AddOne }
]
})
# 9 and 10 will be printed
Or:
r = job_stream.map([8, 9], lambda w: w+1) print(r) # [ 9, 10 ] will be printed
Members¶
-
class
job_stream.common.
Frame
((object)arg1) → None :[source]¶ Bases:
_job_stream.Frame
Base class for a Frame. A Frame is a special type of reducer that performs some special behavior based on the work that begins the reduction. Typically this is used for checking termination conditions in a recurring algorithm:
import job_stream class AddAb(job_stream.Job):
- def handleWork(self, w):
- self.emit(w + ‘Ab’)
- class MakeAtLeastTenLetters(job_stream.Frame):
- def handleFirst(self, store, w):
- store.word = w
- def handleNext(self, store, w):
- store.word = w
- def handleDone(self, store):
- if len(store.word) < 10:
- self.recur(store.word)
- else:
- self.emit(store.word)
job_stream.common.work = [ ‘abracadabra’, ‘Hey’, ‘Apples’ ] # This’ll print out the unmodified abracadabra, add two Ab’s to Apples, and # four Ab’s to Hey job_stream.common.run({
- ‘jobs’: [ {
- ‘frame’: MakeAtLeastTenLetters, ‘jobs’: [ AddAb ]
} ]
})
- C++ signature :
- void __init__(_object*)
__init__( (object)arg1) -> None :
- C++ signature :
- void __init__(_object*)
-
_forceCheckpoint
((Frame)arg1, (bool)arg2) → None :¶ Force a checkpoint after this work. If True is passed, cause the program to crash afterwards.
- C++ signature :
- void _forceCheckpoint(PyFrame {lvalue},bool)
-
emit
((Frame)arg1, (object)arg2) → None :¶ Emit to only target (outside of frame)
- C++ signature :
- void emit(PyFrame {lvalue},boost::python::api::object)
-
handleDone
(store)[source]¶ Called when the reduction is finished. The reduction will be marked as unfinished if a recur() happens.
-
handleFirst
(store, work)[source]¶ Called for the first work, which starts a reduction. Store is an empty Object() to which this method may assign attributes.
-
postSetup
()[source]¶ Called when self.config is set and the Frame is fully ready for work, but before any work is accepted.
-
recur
((Frame)arg1, (object)arg2) → None :¶ Recur to only target
- C++ signature :
- void recur(PyFrame {lvalue},boost::python::api::object)
- recur( (Frame)arg1, (object)arg2, (str)arg3) -> None :
Recur to specific target
- C++ signature :
- void recur(PyFrame {lvalue},boost::python::api::object,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)
-
class
job_stream.common.
Job
((object)arg1) → None :[source]¶ Bases:
_job_stream.Job
Base class for a standard job (starts with some work, and emits zero or more times). Handles registration of job class with the job_stream system.
Example: import job_stream class MyJob(job_stream.Job):
‘’‘Adds 8 to an integer or floating point number’‘’ def handleWork(self, work):
self.emit(work + 8)job_stream.common.work = [ 1, 2, 3.0 ] # This will print 9, 10, and 11.0 job_stream.run({ ‘jobs’: [ MyJob ] })
- C++ signature :
- void __init__(_object*)
__init__( (object)arg1) -> None :
- C++ signature :
- void __init__(_object*)
-
_forceCheckpoint
((Job)arg1, (bool)arg2) → None :¶ Force a checkpoint after this work. If True is passed, cause the program to crash afterwards.
- C++ signature :
- void _forceCheckpoint(PyJob {lvalue},bool)
-
emit
((Job)arg1, (object)arg2) → None :¶ Emit to only target
- C++ signature :
- void emit(PyJob {lvalue},boost::python::api::object)
- emit( (Job)arg1, (object)arg2, (str)arg3) -> None :
Emit to specific target out of list
- C++ signature :
- void emit(PyJob {lvalue},boost::python::api::object,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)
-
class
job_stream.common.
Object
(**kwargs)[source]¶ Bases:
object
A generic object with no attributes of its own.
-
class
job_stream.common.
Reducer
((object)arg1) → None :[source]¶ Bases:
_job_stream.Reducer
Base class for a Reducer. A Reducer combines work emitted from the last stage of a reduction, eventually emitting its own result to the next link in the processing chain.
Example: import job_stream class AddLetterA(job_stream.Job):
- def handleWork(self, w):
- self.emit(w + ‘A’)
- class CountLetters(job_stream.Reducer):
‘’‘Counts the number of letters passed to it’‘’ def handleInit(self, store):
store.count = 0- def handleAdd(self, store, work):
- store.count += len(work)
- def handleJoin(self, store, other):
- store.count += other.count
- def handleDone(self, store):
- self.emit(store.count)
job_stream.common.work = [ ‘Hello’, ‘World’ ] # Here the reduction starts at the global scope, so it will print out 12, # which is the original 10 letters plus the two new letter A’s. print(“First:”) job_stream.run({
‘reducer’: CountLetters, ‘jobs’: [ AddLetterA ]}) # This config has the reduction starting as part of the first job rather # than the global scope, so this will print 6 twice (once for each work that # we initially passed in). print(“Second:”) job_stream.run({
- ‘jobs’: [
- {
- ‘reducer’: CountLetters, ‘jobs’: [ AddLetterA ]
}
]
})
- C++ signature :
- void __init__(_object*)
__init__( (object)arg1) -> None :
- C++ signature :
- void __init__(_object*)
-
_forceCheckpoint
((Reducer)arg1, (bool)arg2) → None :¶ Force a checkpoint after this work. If True is passed, cause the program to crash afterwards.
- C++ signature :
- void _forceCheckpoint(PyReducer {lvalue},bool)
-
emit
((Reducer)arg1, (object)arg2) → None :¶ Emit to only target (outside of reducer)
- C++ signature :
- void emit(PyReducer {lvalue},boost::python::api::object)
-
handleDone
(store)[source]¶ Called when the reduction is finished. The reduction will be marked as unfinished if a recur() happens.
-
handleInit
(store)[source]¶ Called when a reduction is started. Store is a python object that should be modified to remember information between invocations.
-
postSetup
()[source]¶ Called when self.config is set and the Job is fully ready for work, but before any work is accepted.
-
recur
((Reducer)arg1, (object)arg2) → None :¶ Recur to only target
- C++ signature :
- void recur(PyReducer {lvalue},boost::python::api::object)
- recur( (Reducer)arg1, (object)arg2, (str)arg3) -> None :
Recur to specific target
- C++ signature :
- void recur(PyReducer {lvalue},boost::python::api::object,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)
-
exception
job_stream.common.
_StackAlreadyPrintedError
[source]¶ Bases:
Exception
An exception to be used if the stack trace has already been printed, and an exception needs to be raised just to communicate to job_stream to abort.
-
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
class
job_stream.common.
_Work
[source]¶ Bases:
list
List of initial work sent into job_stream. If left empty, work comes from stdin.
-
append
(object) → None -- append object to end¶
-
clear
() → None -- remove all items from L¶
-
copy
() → list -- a shallow copy of L¶
-
count
(value) → integer -- return number of occurrences of value¶
-
extend
(iterable) → None -- extend list by appending elements from the iterable¶
-
index
(value[, start[, stop]]) → integer -- return first index of value.¶ Raises ValueError if the value is not present.
-
insert
()¶ L.insert(index, object) – insert object before index
-
pop
([index]) → item -- remove and return item at index (default last).¶ Raises IndexError if list is empty or index is out of range.
-
remove
(value) → None -- remove first occurrence of value.¶ Raises ValueError if the value is not present.
-
reverse
()¶ L.reverse() – reverse IN PLACE
-
sort
(key=None, reverse=False) → None -- stable sort *IN PLACE*¶
-
-
job_stream.common.
_cpuThreadTime
()[source]¶ Returns the current thread’s CPU time in seconds. Used for tests of profiling, mostly.
-
job_stream.common.
_initMultiprocessingPool
()[source]¶ The multiprocessing pool is initialized lazily by default, to avoid overhead if no jobs are using multiprocessing
-
job_stream.common.
getCpuCount
()[source]¶ Retunrs the number of CPUs in the cluster. Must be called within a job_stream, or will raise an error.
-
job_stream.common.
getHostCpuCount
()[source]¶ Returns the number of CPUs on this host. Must be called within a job_stream, or will raise an error.
-
job_stream.common.
getRank
()[source]¶ Returns the rank (integer index) of this processor. Typically, this value is checked against 0 for work that should only happen once, e.g. init code.
-
job_stream.common.
invoke
(progAndArgs, transientErrors=[], maxRetries=20)[source]¶ Since it can be difficult to launch some programs from an MPI distributed application, job_stream provides invoke functionality to safely launch an external program (launching an application such as Xyce, for instance, can cause problems if the environment variables are not doctored appropriately).
progAndArgs: list, [ ‘path/to/file’, *args ]
- transientErrors: list of strings, if any of these strings are found in the
stderr of the program, then any non-zero return code is considered a transient error and the application will be re-launched up to maxRetries times.
Note that “No child processes” is automatically handled as transient.
- maxRetries: The maximum number of times to run the application if there are
- transient errors. Only the final (successful) results are returned.
Returns: (contents of stdout, contents of stderr)
-
job_stream.common.
map
(func, *sequence, **kwargs)[source]¶ Returns [ func(*a) for a in sequence ] in a parallel manner. Identical to the builtin map(), except parallelized.
kwargs - Passed to job_stream.run().
-
job_stream.common.
run
(configDictOrPath, **kwargs)[source]¶ Runs the given YAML file or config dictionary.
- Acceptable kwargs:
checkpointFile - (string) The file to use for checkpoint / restore checkpointInterval - (float) The time between the completion of one
checkpoint and the starting of the next, in seconds.- checkpointSyncInterval - (float) The time between all processors
- thinking they’re ready to checkpoint and the actual checkpoint.
- handleResult - (callable) The default is to print out repr(result). If
- specified, this function will be called instead with the output work as an argument. Note that this goes outside of checkpointing! If you are saving work into an array, for example, and want to be checkpoint-safe, this method MUST save what it needs to file.


Singular
Reset
Pause
Set Value
Add
Subtract
Multiply by
Divide by
Repeated (50/s)
Set hexation
Set pentation
Set tetration
Set exponent
Set multiplier
Set adder
0.00
Show Options
Hide Options
Notations
Word Notation (Limit of e33003)
Scientific Notation
Standard Notation
Digit Count
Save
Themes
Coming someday


{% extends 'gwells/base.html' %} {% block title %}{% endblock %} {% block bodyheading_block %}The Drill Experts{% endblock %} {% block introduction_block %}
Welcome Bobby Wellersby.
{% endblock %} {% block body_block %} {% if settings.ENABLE_DATA_ENTRY %} {% endif %}The information provided should not be used as a basis for making financial or any other commitments. The Government of British Columbia accepts no liability for the accuracy, availability, suitability, reliability, usability, completeness or timeliness of the data or graphical depictions rendered from the data. Read our Disclaimer and Privacy pages for more information.


Connect Request
would like to connect to your account
This site is requesting access to your nuBox account. Always make sure you trust the sites you interact with.


Following account creation requests are waiting for your approval
| Serial No |
user ID |
Name |
Email |
Company Name |
Requested On |
Address |
City |
State |
Country |
Zipcode |
Current Status |
Action |
| No requests pending for your approval |
| {{data.serialNo}} |
{{data.id}} |
{{data.name}} |
{{data.email}} |
{{data.companyName}} |
{{data.registrationRequestDate}} |
{{data.address}} |
{{data.city}} |
{{data.state}} |
{{data.country}} |
{{data.zipcode}} |
{{data.status}} |
|
|
|


By default, exceptions are reported but Concordion continues processing the rest of the test. (More details)
However, fixtures can be annotated with @FailFast
to stop further
processing if an exception is encountered. This can be useful if further processing
after an exception is undesirable (e.g. because it's slow, could cause corruption or
would make the results hard to explain to others). It is possible to
specify specific exceptions on the @FailFast
annotation.
Note that the @FailFast annotation is transitive when used with the run command. That is:
When the fixture is annotated with @FailFast
and processes the following:
<p concordion:execute="myExceptionThrower()"> This method throws an exception. </p> <p concordion:execute="myMethod()"> This method executes quietly. </p>
It does not call
myMethod()
in the Java fixture code because the exception thrown by the
first method call stops further processing of the test.


Go to the source code of this file.
◆ ENABLE_P2P_DEBUGGING_API
| #define ENABLE_P2P_DEBUGGING_API 1 |
Define this to enable debugging code in the p2p network interface. This is code that would never be executed in normal operation, but is used for automated testing (creating artificial net splits, tracking where messages came from and when)
◆ HSR_NET_DEFAULT_DESIRED_CONNECTIONS
| #define HSR_NET_DEFAULT_DESIRED_CONNECTIONS 20 |
◆ HSR_NET_DEFAULT_MAX_CONNECTIONS
| #define HSR_NET_DEFAULT_MAX_CONNECTIONS 200 |
◆ HSR_NET_DEFAULT_P2P_PORT
| #define HSR_NET_DEFAULT_P2P_PORT 40888 |
◆ HSR_NET_DEFAULT_PEER_CONNECTION_RETRY_TIME
| #define HSR_NET_DEFAULT_PEER_CONNECTION_RETRY_TIME 30 |
◆ HSR_NET_DELEGATE_DESIRED_CONNECTIONS
| #define HSR_NET_DELEGATE_DESIRED_CONNECTIONS 50 |
◆ HSR_NET_FUTURE_SYNC_BLOCKS_GRACE_PERIOD_SEC
| #define HSR_NET_FUTURE_SYNC_BLOCKS_GRACE_PERIOD_SEC (60 * 60) |
We prevent a peer from offering us a list of blocks which, if we fetched them all, would result in a blockchain that extended into the future. This parameter gives us some wiggle room, allowing a peer to give us blocks that would put our blockchain up to an hour in the future, just in case our clock is a bit off.
◆ HSR_NET_INSUFFICIENT_RELAY_FEE_PENALTY_SEC
| #define HSR_NET_INSUFFICIENT_RELAY_FEE_PENALTY_SEC 15 |
◆ HSR_NET_MAX_BLOCKS_PER_PEER_DURING_SYNCING
| #define HSR_NET_MAX_BLOCKS_PER_PEER_DURING_SYNCING 100 |
◆ HSR_NET_MAX_INVENTORY_SIZE_IN_MINUTES
| #define HSR_NET_MAX_INVENTORY_SIZE_IN_MINUTES 2 |
◆ HSR_NET_MAX_ITEMS_PER_PEER_DURING_NORMAL_OPERATION
| #define HSR_NET_MAX_ITEMS_PER_PEER_DURING_NORMAL_OPERATION 1 |
◆ HSR_NET_MAXIMUM_QUEUED_MESSAGES_IN_BYTES
| #define HSR_NET_MAXIMUM_QUEUED_MESSAGES_IN_BYTES (512 * 10000 * 10) |
◆ HSR_NET_MIN_BLOCK_IDS_TO_PREFETCH
| #define HSR_NET_MIN_BLOCK_IDS_TO_PREFETCH 10000 |
Instead of fetching all item IDs from a peer, then fetching all blocks from a peer, we will interleave them. Fetch at least this many block IDs, then switch into block-fetching mode until the number of blocks we know about but haven't yet fetched drops below this
◆ HSR_NET_PEER_DISCONNECT_TIMEOUT
| #define HSR_NET_PEER_DISCONNECT_TIMEOUT 20 |
◆ HSR_NET_PEER_HANDSHAKE_INACTIVITY_TIMEOUT
| #define HSR_NET_PEER_HANDSHAKE_INACTIVITY_TIMEOUT 200 |
◆ HSR_NET_PROTOCOL_VERSION
| #define HSR_NET_PROTOCOL_VERSION 106 |
◆ HSR_NET_TEST_P2P_PORT
◆ HSR_NET_TEST_SEED_IP
| #define HSR_NET_TEST_SEED_IP "<IP_ADDRESS>" |
◆ HSR_PEER_DATABASE_RETRY_DELAY
| #define HSR_PEER_DATABASE_RETRY_DELAY 15 |
AFter trying all peers, how long to wait before we check to see if there are peers we can try again.
◆ MAX_MESSAGE_SIZE
| #define MAX_MESSAGE_SIZE (512 * 10000 * 5) |
512 * HSR_BLOCKCHAIN_MAX_PENDING_QUEUE_SIZE * 5


We have been very busy setting up the new infrastructure for Kubecast
and we thought it would be great to test it… and what a better way to test that testing in Production??
In this episode Ivan and Milos talk about the podcast, the idea and what do they expect to achieve in life and with kubernetes in particular.
I know, I know, this is not the first episode… but we’re recording it


Mexico's murder rate up, official warns of 'narcoterrorism'
by The Associated Press, StaffMEXICO CITY -- Mexico's murder rate inched up 2 per cent in the first 10 months of the year, but the latest violence has included much more brazen challenges to authorities.
Federal officials said late Wednesday there have been 29,414 homicides so far in 2019, compared to 28,869 in the same period of 2018.
But northern border cities like Ciudad Juarez and Nuevo Laredo have seen a constant round of drug gang blockades recently, with gunmen burning buses and trucks to block roads and bridges.
The governor of the border state of Tamaulipas, where Nuevo Laredo is located, says the gangs have committed acts of "narcoterrorism."
Gov. Francisco Garcia says the gangs used civilians as "human shields."
President Andres Manuel Lopez Obrador said his administration had managed to "stabilize" the rise in killings.


Another common problem faced by many Unity developers is the unexpected expansion of the managed heap. In Unity, the managed heap expands much more readily than it shrinks. Furthermore, Unity’s garbage collection strategy tends to fragment memory, which can prevent a large heap from shrinking.
The “managed heap” is a section of memory that is automatically managed by the memory manager of a Project’s scripting runtime (Mono or IL2CPP). All objects created in managed code must be allocated on the managed heap(2) (Note: Strictly speaking, all non-null reference-typed objects and all boxed value-typed objects must be allocated on the managed heap).
In the above diagram, the white box represents a quantity of memory apportioned to the managed heap, and the colored boxes within it represent data values stored within the managed heap’s memory space. When additional values are needed, more space is allocated from within the managed heap.
The garbage collector runs periodically(3) (Note: The exact timing is platform-dependent). This sweeps through all objects on the heap, marking for deletion any objects that are no longer referenced. Unreferenced objects are then deleted, freeing up memory.
Crucially, Unity’s garbage collection – which uses the Boehm GC algorithm – is non-generational and non-compacting. “Non-generational” means that the GC must sweep through the entire heap when performing a collection pass, and its performance therefore degrades as the heap expands. “Non-compacting” means that objects in memory are not relocated in order to close gaps between objects.
The above diagram shows an example of memory fragmentation. When an object is released, its memory is freed. However, the freed space does not become part of a single large pool of “free memory”. The objects on either side of the freed object may still be in use. Because of this, the freed space is a “gap” between other segments of memory (this gap is indicated by the red circle in the diagram). The newly-freed space can therefore only be used to store data of identical or lesser size than the freed object.
When allocating an object, remember that the object must always occupy a contiguous block of space in memory.
This leads to the core problem of memory fragmentation: while the overall amount of space available in the heap may be substantial, it is possible that some or all of that space is in small “gaps” between allocated objects. In this case, even though there may be enough total space to accommodate a certain allocation, the managed heap cannot find a large enough block of contiguous memory in which to fit the allocation.
However, if a large object is allocated and there is insufficient contiguous free space to accommodate the object, as illustrated above, the Unity memory manager performs two operations.
First, if it has not already done so, the garbage collector runs. This attempts to free up enough space to fulfill the allocation request.
If, after the GC runs, there is still not enough contiguous space to fit the requested amount of memory, the heap must expand. The specific amount that the heap expands is platform-dependent; however, most Unity platforms double the size of the managed heap.
The core issues with managed heap expansion are twofold:
Unity does not often release the memory pages allocated to the managed heap when it expands; it optimistically retains the expanded heap, even if a large portion of it is empty. This is to prevent the need to re-expand the heap should further large allocations occur.
On most platforms, Unity eventually releases the pages used by empty portions of the managed heap back to the operating system. The interval at which this occurs is not guaranteed and should not be relied upon.
The address space used by the managed heap is never returned to the operating system.
For 32-bit programs, this can lead to address space exhaustion if the managed heap expands and contracts many times. If a program’s available memory address space is exhausted, the operating system will terminate the program.
For 64-bit programs, the address space is sufficiently large that this is extremely unlikely to occur for programs whose running time does not exceed the average human lifespan.
Many Unity projects are found to operate with several tens or hundreds of kilobytes of temporary data being allocated to the managed heap each frame. This is often extremely detrimental to a project’s performance. Consider the following math:
If a program allocates one kilobyte (1kb) of temporary memory each frame, and is running at 60 frames per second, then it must allocate 60 kilobytes of temporary memory per second. Over the course of a minute, this adds up to 3.6 megabytes of garbage in memory. Invoking the garbage collector once per second is likely to be detrimental to performance, but allocating 3.6 megabytes per minute is problematic when attempting to run on low-memory devices.
Further, consider loading operations. If a large number of temporary objects are generated during a heavy Asset-loading operation, and those objects are referenced until the operation completes, then the garbage collector is unable to release those temporary objects and the managed heap needs to expand – even though many of the objects it contains will be released a short time later.
Keeping track of managed memory allocations is relatively simple. In Unity’s CPU Profiler, the Overview has a “GC Alloc” column. This column displays the number of bytes allocated on the managed heap in a specific frame (4) (Note: Note that this is not identical to the number of bytes temporarily allocated during a given frame. The profile displays the number of bytes allocated in a specific frame, even if some/all of the allocated memory is reused in subsequent frames). With the “Deep Profiling” option enabled, it’s possible to track down the method in which these allocations occur.
Note that some script methods cause allocations when running in the Editor, but do not produce allocations after the project has been built. GetComponent
is the most common example; this method always allocates when executed in the Editor, but not in a built project.
In general, it is strongly recommended that all developers minimize managed heap allocations whenever the project is in an interactive state. Allocations during non-interactive operations, such as Scene loading, are less problematic.

When using C#’s Collection classes or Arrays, consider reusing or pooling the allocated Collection or Array whenever possible. The Collection classes expose a Clear method which eliminates the Collection’s values but does not release the memory allocated to the Collection.
void Update() {
List<float> nearestNeighbors = new List<float>();
findDistancesToNearestNeighbors(nearestNeighbors);
nearestNeighbors.Sort();
// … use the sorted list somehow …
}
This is particularly useful when allocating temporary “helper” Collections for complex computations. A very simple example might be the following code:
In this example, the nearestNeighbors
List is allocated once per frame in order to collect a set of data points. It’s very simple to hoist this List out of the method and into the containing class, which avoids allocating a new List each frame:
List<float> m_NearestNeighbors = new List<float>();
void Update() {
m_NearestNeighbors.Clear();
findDistancesToNearestNeighbors(NearestNeighbors);
m_NearestNeighbors.Sort();
// … use the sorted list somehow …
}
In this version, the List’s memory is retained and reused across multiple frames. New memory is only allocated when the List needs to expand.
There are two points to consider when using closures and anonymous methods.
First, all method references in C# are reference types, and are therefore allocated on the heap. Temporary allocations can be easily created by passing a method reference as an argument. This allocation occurs regardless of whether the method being passed is an anonymous method or a predefined one.
Second, converting an anonymous method to a closure significantly increases the amount of memory required to pass the closure to method receiving it.
Consider the following code:
List<float> listOfNumbers = createListOfRandomNumbers();
listOfNumbers.Sort( (x, y) =>
(int)x.CompareTo((int)(y/2))
);
This snippet uses a simple anonymous method to control the sorting order of the list of numbers created on the first line. However, if a programmer wished to make this snippet reusable, it is tempting to substitute the constant 2
for a variable in local scope, like so:
List<float> listOfNumbers = createListOfRandomNumbers();
int desiredDivisor = getDesiredDivisor();
listOfNumbers.Sort( (x, y) =>
(int)x.CompareTo((int)(y/desiredDivisor))
);
The anonymous method now requires the method to be able to access the state of a variable outside of the method’s scope, and so has become a closure. The desiredDivisor
variable must be passed into the closure somehow so that it can be used by the actual code of the closure.
To do this, C# generates an anonymous class that can retain the externally-scoped variables needed by the closure. A copy of this class is instantiated when the closure is passed to the Sort
method, and the copy is initialized with the value of the desiredDivisor
integer.
Because executing the closure requires instantiation of a copy of its generated class, and all classes are reference types in C#, then executing the closure requires allocation of an object on the managed heap.
In general, it is best to avoid closures in C# whenever possible. Anonymous methods and method references should be minimized in performance-sensitive code, and especially in code that executes on a per-frame basis.
Currently, inspection of code generated by IL2CPP reveals that the simple declaration and assignment of a variable of type System.Function
allocates a new object. This is true whether the variable is explicit (declared in a method/class) or implicit (declared as an argument to another method).
As such, any use of anonymous methods under the IL2CPP scripting backend allocates managed memory. This is not the case under the Mono scripting backend.
Furthermore, IL2CPP displays dramatically different levels of managed memory allocation depending on the way in which a method argument is declared. Closures, as expected, allocate the most memory per call.
Unintuitively, predefined methods allocate nearly as much memory as closures when passed as arguments under the IL2CPP scripting backend. Anonymous methods generate the least amount of transient garbage on the heap, by one or more orders of magnitude.
Therefore, if a project is intended to ship on the IL2CPP scripting backend, there are three key recommendations:
Prefer coding styles that do not require passing methods as arguments.
When unavoidable, prefer anonymous methods over predefined methods.
Avoid closures, regardless of scripting backend.
Boxing is one of the most common sources of unintended temporary memory allocations found in Unity projects. It occurs whenever a value-typed value is utilized as a reference type; this most often occurs when passing primitive value-typed variables (such as int
and float
) to object-typed methods.
In this extremely simple example, the integer in x is boxed in order to be passed to the object.Equals
method, because the Equals
method on object
requires that an object
be passed to it.
int x = 1;
object y = new object();
y.Equals(x);
C# IDEs and compilers generally do not issue warnings about boxing, even though it leads to unintended memory allocations. This is because the C# language was developed with the assumption that small temporary allocations would be efficiently handled by generational garbage collectors and allocation-size-sensitive memory pools.
While Unity’s allocator does use different memory pools for small and large allocations, Unity’s garbage collector is not
generational and therefore cannot efficiently sweep out the small, frequent temporary allocations generated by boxing.
Boxing should be avoided wherever possible when writing C# code for Unity runtimes.
Boxing shows up in CPU traces as calls to one of a few methods, depending on the scripting backend in use. These generally take one of the following forms, where <some class>
is the name of some other class or struct, and …
is some number of arguments:
<some class>::Box(…)
Box(…)
<some class>_Box(…)
It can also be located by searching the output of a decompiler or IL viewer, such as the IL viewer tool built into ReSharper or the dotPeek decompiler. The IL instruction is “box”.
One common cause of boxing is the use of enum
types as keys for Dictionaries. Declaring an enum
creates a new value type that is treated like an integer behind the scenes, but enforces type-safety rules at compile time.
By default, a call to Dictionary.add(key, value)
results in a call to Object.getHashCode(Object)
. This method is used to obtain the appropriate hash code for the Dictionary’s key, and is used in all methods that accept a key: Dictionary.tryGetValue, Dictionary.remove
, etc.
The Object.getHashCode
method is reference-typed, but enum
values are always value types. Therefore, for enum-keyed Dictionaries, every method call results in the key being boxed at least once.
The following code snippet illustrates a simple example that demonstrates this boxing problem:
enum MyEnum { a, b, c };
var myDictionary =
new Dictionary<MyEnum, object>();
myDictionary.Add(MyEnum.a, new object());
To solve this problem, it is necessary to write a custom class that implements the IEqualityComparer
interface and assign an instance of that class as the Dictionary’s comparer (Note: This object is usually stateless, and therefore can be reused with different Dictionary instances to save memory).
The following is a simple example of an IEqualityComparer for the above code snippet.
public class MyEnumComparer : IEqualityComparer<MyEnum> {
public bool Equals(MyEnum x, MyEnum y) {
return x == y;
}
public int GetHashCode(MyEnum x) {
return (int)x;
}
}
An instance of the above class could be passed to the Dictionary’s constructor.
In Unity’s version of the Mono C# compiler, use of the foreach
loop forces Unity to box a value each time the loop terminates (Note: The value is boxed once each time the loop as a whole finishes executing. It does not box once per iteration of the loop, so memory usage remains the same regardless of whether the loop runs two times or 200 times). This is because the IL generated by Unity’s C# compiler constructs a generic value-type Enumerator in order to iterate over the value collection.
This Enumerator implements the IDisposable
interface, which must be called when the loop terminates. However, calling interface methods on value-typed objects (such as structs and Enumerators) requires boxing them.
Examine the following very simple example code:
int accum = 0;
foreach(int x in myList) {
accum += x;
}
The above, when run through Unity’s C# compiler, produces the following Intermediate Language:
.method private hidebysig instance void
ILForeach() cil managed
{
.maxstack 8
.locals init (
[0] int32 num,
[1] int32 current,
[2] valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator<int32> V_2
)
// [67 5 - 67 16]
IL_0000: ldc.i4.0
IL_0001: stloc.0 // num
// [68 5 - 68 74]
IL_0002: ldarg.0 // this
IL_0003: ldfld class [mscorlib]System.Collections.Generic.List`1<int32> test::myList
IL_0008: callvirt instance valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator<!0/*int32*/> class [mscorlib]System.Collections.Generic.List`1<int32>::GetEnumerator()
IL_000d: stloc.2 // V_2
.try
{
IL_000e: br IL_001f
// [72 9 - 72 41]
IL_0013: ldloca.s V_2
IL_0015: call instance !0/*int32*/ valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator<int32>::get_Current()
IL_001a: stloc.1 // current
// [73 9 - 73 23]
IL_001b: ldloc.0 // num
IL_001c: ldloc.1 // current
IL_001d: add
IL_001e: stloc.0 // num
// [70 7 - 70 36]
IL_001f: ldloca.s V_2
IL_0021: call instance bool valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator<int32>::MoveNext()
IL_0026: brtrue IL_0013
IL_002b: leave IL_003c
} // end of .try
finally
{
IL_0030: ldloc.2 // V_2
IL_0031: box valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator<int32>
IL_0036: callvirt instance void [mscorlib]System.IDisposable::Dispose()
IL_003b: endfinally
} // end of finally
IL_003c: ret
} // end of method test::ILForeach
} // end of class test
The most relevant code is the __finally { … }__
block near the bottom. The callvirt
instruction discovers the location of the IDisposable.Dispose
method in memory before invoking the method, and requires that the Enumerator be boxed.
In general, foreach
loops should be avoided in Unity. Not only do they box, but the method-call cost of iterating over collections via Enumerators is generally much slower than manual iteration via a for
or while
loop.
Note that the C# compiler upgrade in Unity 5.5 significantly improves Unity’s ability to generate IL. In particular, the boxing operations has been eliminated from foreach
loops. This eliminates the memory overhead associated with foreach
loops. However, the CPU performance difference compared to equivalent Array-based code remains, due to method-call overhead.
A more pernicious and less-visible cause of spurious array allocation is the repeated accessing of Unity APIs that return arrays. All Unity APIs that return arrays create a new copy of the array each time they are accessed. It is extremely non-optimal to access an array-valued Unity API more often than necessary.
As an example, the following code spuriously creates four copies of the vertices
array per loop iteration. The allocations are occur each time the .vertices
property is accessed.
for(int i = 0; i < mesh.vertices.Length; i++)
{
float x, y, z;
x = mesh.vertices[i].x;
y = mesh.vertices[i].y;
z = mesh.vertices[i].z;
// ...
DoSomething(x, y, z);
}
This can be trivially refactored into a single array allocation, regardless of the number of loop iterations, by capturing the vertices
array before entering the loop:
var vertices = mesh.vertices;
for(int i = 0; i < vertices.Length; i++)
{
float x, y, z;
x = vertices[i].x;
y = vertices[i].y;
z = vertices[i].z;
// ...
DoSomething(x, y, z);
}
While the CPU cost of accessing a property once is not very high, repeated accesses within tight loops create CPU performance hotspots. Further, repeated accesses unnecessarily expand the managed heap.
This problem is extremely common on mobile, because the Input.touches
API behaves similarly to the above. It is extremely common for projects to contain code similar to the following, where an allocation occurs each time the .touches
property is accessed.
for ( int i = 0; i < Input.touches.Length; i++ )
{
Touch touch = Input.touches[i];
// …
}
This can, of course, be trivially improved by hoisting the array allocation out of the loop condition:
Touch[] touches = Input.touches;
for ( int i = 0; i < touches.Length; i++ )
{
Touch touch = touches[i];
// …
}
However, there are now versions of many Unity APIs that do not cause memory allocations. These should generally be favored, when they’re available.
int touchCount = Input.touchCount;
for ( int i = 0; i < touchCount; i++ )
{
Touch touch = Input.GetTouch(i);
// …
}
Converting the above example to the allocation-less Touch API is simple:
Note that the property access (Input.touchCount
) is still kept outside the loop condition in order to save the CPU cost of invoking the property’s get
method.
Some teams prefer to return empty arrays instead of null
when an array-valued method needs to return an empty set. This coding pattern is common in many managed languages, particularly C# and Java.
In general, when returning a zero-length array from a method, it is considerably more efficient to return a pre-allocated singleton instance of the zero-length array than to repeatedly create empty arrays(5) (Note: Naturally, an exception should be made when the array is resized after being returned).
Footnotes
(1) This is because, on most platforms, readback from GPU memory is extremely slow. Reading a Texture from GPU memory into a temporary buffer for use by CPU code (e.g. Texture.GetPixel
) would be very nonperformant.
(2) Strictly speaking, all non-null reference-typed objects and all boxed value-typed objects must be allocated on the managed heap.
(3) The exact timing is platform-dependent.
(4) Note that this is not identical to the number of bytes temporarily allocated during a given frame. The profile displays the number of bytes allocated in a specific frame, even if some/all of the allocated memory is reused in subsequent frames.
(5) Naturally, an exception should be made when the array is resized after being returned.


Ru
Account Settings
Ru
General Settings
Profile picture
Choose file
Jpg,png,bmp,size - 400*400
Password
Change Password
Full Name
Email Adress
Save Changes


MR OLAJIDE LUCAS Gulf Coastal Internatoinal bank, Victoria Island Branch, Lagos, Nigeria. ATTN, I am MR OLAJIDE LUCAS Branch Manager with Bank of the North Victoria Island Branch Lagos Nigeria,I have an urgent and very profitable business proposition for you that should be handled with extreme confidentiality. On January 6,1999 a Foreign Oil Consultant and contractor with the Nigerian National Petroleum Corporation (NNPC) Mr. James Herbert by name made a numbered time Fixed Deposit for twelve calendar months valued at US$38.6M(Thirty Eight Million, Six Hundred United States Dollars Only) in my branch. Upon maturity I sent a routine notification in accordance with the Bank policy to his forwarding address but got no reply. After a month we sent a reminder and finally wediscovered from his contract employers the Nigerian National Petroleum Corporation (NNPC) that Mr. James Herbert died from an automobile accident. On further investigation, we found out that he died without making a Will and all attempts to trace his next of kin was fruitless. I therefore made further investigations and discovered that Mr. James Herbert did not declare any next of kin or relations in all his official documents including his Bank Deposit paperwork in my Bank,and according to Nigerian Law, at the expiration of 5 years the money will revert to the ownership of the Nigerian Government if nobody applies to claim the fund. This prompted us to contact you.We will like to front you as the next of kin of our late client thereby making you the legal beneficiary of the sum of $38.6 million U.S Dollars that is presently in my branch. I contacted you because it is against our code of ethics to own and operate foreign accounts and your assistance would be needed to claim the money in the Security Company . We have unanimously agreed that 25% of the entire sum would be for you if you agree to take part in this profitable transaction,70% for me and 2 of my colleagues while the remaining 5% would be used to pay back the expenses that may be incurred during the course of the transaction by both parties after the fund has been claimed as the next of kin. In the event that you are genuinely interested in the transaction,there are some information would be needed from you to commence transaction. FULL NAME,CONTACT ADDRESS,PHONE AND FAX NUMBER. The transaction is 100% risk free as all modalities has been perfected to ensure the hitch free success of the transaction. I await your urgent response THANKS FOR CO-OPERATION MR OLAJIDE LUCAS


Minimal Face-Api.js
See original github at
https://github.com/justadudewhohacks/face-api.js
Save an image of a character from the Big Bang Theory and then drag the image from your computer onto the top of the pre-loaded image.


In most cases, we recommend using controlled components to implement forms. In a controlled component, form data is handled by a React component. The alternative is uncontrolled components, where form data is handled by the DOM itself.
To write an uncontrolled component, instead of writing an event handler for every state update, you can use a ref to get form values from the DOM.
For example, this code accepts a single name in an uncontrolled component:
class NameForm extends React.Component {
constructor(props) {
super(props);
this.handleSubmit = this.handleSubmit.bind(this);
this.input = React.createRef();
}
handleSubmit(event) {
alert('A name was submitted: ' + this.input.current.value);
event.preventDefault();
}
render() {
return (
<form onSubmit={this.handleSubmit}>
<label>
Name:
<input type="text" ref={this.input} />
</label>
<input type="submit" value="Submit" />
</form>
);
}
}
Since an uncontrolled component keeps the source of truth in the DOM, it is sometimes easier to integrate React and non-React code when using uncontrolled components. It can also be slightly less code if you want to be quick and dirty. Otherwise, you should usually use controlled components.
If it's still not clear which type of component you should use for a particular situation, you might find this article on controlled versus uncontrolled inputs to be helpful.
In the React rendering lifecycle, the value
attribute on form elements will override the value in the DOM. With an uncontrolled component, you often want React to specify the initial value, but leave subsequent updates uncontrolled. To handle this case, you can specify a defaultValue
attribute instead of value
. Changing the value of defaultValue
attribute after a component has mounted will not cause any update of the value in the DOM.
render() {
return (
<form onSubmit={this.handleSubmit}>
<label>
Name:
<input
defaultValue="Bob"
type="text"
ref={this.input} />
</label>
<input type="submit" value="Submit" />
</form>
);
}
Likewise, <input type="checkbox">
and <input type="radio">
support defaultChecked
, and <select>
and <textarea>
supports defaultValue
.
In HTML, an <input type="file">
lets the user choose one or more files from their device storage to be uploaded to a server or manipulated by JavaScript via the File API.
In React, an <input type="file" />
is always an uncontrolled component because its value can only be set by a user, and not programmatically.
You should use the File API to interact with the files. The following example shows how to create a ref to the DOM node to access file(s) in a submit handler:
embed:uncontrolled-components/input-type-file.js


Create Marking Rubric
Add an entry first...
Add Entry
Duplicate Entry
Start Adding Answer Spaces
Variable
Value
Backup Marking Rubric
Download rubric as CSV file
Download
Load rubric from CSV file
Encode diaries, surveys, or quizzes
Documents to encode
Starting date of documents (DD/MM/YYY)
Encode All Documents


"Learning never exhausts the mind."- Leonardo da Vinci
I’m a software programmer, designer, team leader, and writer. I’ve spent about than 2 years designing, architecting, and building web-services and solutions. Passionate about learning new Technologies and solving problems. This is my first of many applications that I plan to build.