iterator_to
Boost.MultiIndex provides eight different index types, which can be classified as shown in the table below. Ordered and sequenced indices, which are the most commonly used, have been explained in the basics section; the rest of index types can be regarded as variations of the former providing some added benefits, functionally or in the area of performance.
| type | specifier | |
|---|---|---|
| key-based | ordered | ordered_unique |
ordered_non_unique |
||
ranked_unique |
||
ranked_non_unique |
||
| hashed | hashed_unique |
|
hashed_non_unique |
||
| non key-based | sequenced |
|
random_access |
Key-based indices, of which ordered indices are the usual example, provide
efficient lookup of elements based on some piece of information called the
element key: there is an extensive suite of
key extraction
utility classes allowing for the specification of such keys. Fast lookup
imposes an internally managed order on these indices that the user is not
allowed to modify; non key-based indices, on the other hand, can be freely
rearranged at the expense of lacking lookup facilities. Sequenced indices,
modeled after the interface of std::list
, are the customary
example of a non key-based index.
Suppose we have a std::multiset
of numbers and we want to output
the values above the 75h percentile:
typedef std::multiset<int> int_multiset; void output_above_75th_percentile(const int_multiset& s) { int_multiset::const_iterator it=s.begin(); std::advance(it,s.size()*3/4); // linear on s.size(); std::copy(it,s.end(),std::ostream_iterator<int>(std::cout,"\n")); }
The problem with this code is that getting to the beginning of the desired subsequence involves a linear traversal of the container. Ranked indices provide the mechanisms to do this much faster:
typedef multi_index_container< int, indexed_by< ranked_non_unique<identity<int> > > > int_multiset; void output_above_75th_percentile(const int_multiset& s) { int_multiset::const_iterator it=s.nth(s.size()*3/4); // logarithmic std::copy(it,s.end(),std::ostream_iterator<int>(std::cout,"\n")); }
nth(n)
returns an iterator to the element whose rank, i.e. its distance
from the beginning of the index, is n
, and does so efficiently in logarithmic time.
Conversely, rank(it)
computes in logarithmic time the rank of the element
pointed to by it
, or size()
if it==end()
.
int_multiset::iterator it=s.insert(10).first; int_multiset::size_type r=s.rank(it); // rank of 10;
Ranked indices provide the same interface as ordered indices plus several rank-related operations.
The cost of this extra functionality is higher memory consumption due to some internal additional
data (one word per element) and somewhat longer execution times in insertion and erasure
—in particular, erasing an element takes time proportional to log(n)
, where
n
is the number of elements in the index, whereas for ordered indices this time is
constant.
The reference describes these indices in complete detail.
The specification of ranked indices is done exactly as with ordered indices,
except that ranked_unique
and ranked_non_unique
are used instead.
(ranked_unique | ranked_non_unique) <[(tag)[,(key extractor)[,(comparison predicate)]]]> (ranked_unique | ranked_non_unique) <[(key extractor)[,(comparison predicate)]]>
Besides nth
and rank
, ranked indices provide member functions
find_rank
,lower_bound_rank
,upper_bound_rank
,equal_range_rank
and range_rank
find
, lower_bound
etc.) but return ranks rather than iterators.
void percentile(int n,const int_multiset& s) { std::cout<<n<<" lies in the "<< s.upper_bound_rank(n)*100.0/s.size()<<" percentile\n"; }
You might think that upper_bound_rank(n)
is mere shorthand for
rank(upper_bound(n))
: in reality, though, you should prefer using
*_rank
operations directly as they run faster than the
alternative formulations.
Hashed indices constitute a trade-off with respect to ordered indices: if correctly used,
they provide much faster lookup of elements, at the expense of losing sorting
information.
Let us revisit our employee_set
example: suppose a field for storing
the Social Security number is added, with the requisite that lookup by this
number should be as fast as possible. Instead of the usual ordered index, a
hashed index can be resorted to:
#include <boost/multi_index_container.hpp> #include <boost/multi_index/hashed_index.hpp> #include <boost/multi_index/ordered_index.hpp> #include <boost/multi_index/identity.hpp> #include <boost/multi_index/member.hpp> struct employee { int id; std::string name; int ssnumber; employee(int id,const std::string& name,int ssnumber): id(id),name(name),ssnumber(ssnumber){} bool operator<(const employee& e)const{return id<e.id;} }; typedef multi_index_container< employee, indexed_by< // sort by employee::operator< ordered_unique<identity<employee> >, // sort by less<string> on name ordered_non_unique<member<employee,std::string,&employee::name> >, // hashed on ssnumber hashed_unique<member<employee,int,&employee::ssnumber> > > > employee_set
Note that the hashed index does not guarantee any particular ordering of the elements: so, for instance, we cannot efficiently query the employees whose SSN is greater than a given number. Usually, you must consider these restrictions when determining whether a hashed index is preferred over an ordered one.
Hashed indices replicate the interface as std::unordered_set
and
std::unordered_multiset
, with only minor differences where required
by the general constraints of multi_index_container
s, and provide
additional useful capabilities like in-place updating of elements.
Check the reference for a
complete specification of the interface of hashed indices,
and example 8 and
example 9 for practical applications.
Just like ordered indices, hashed indices have unique and non-unique variants, selected
with the specifiers hashed_unique
and hashed_non_unique
,
respectively. In the latter case, elements with equivalent keys are kept together and can
be jointly retrieved by means of the equal_range
member function.
Hashed indices specifiers have two alternative syntaxes, depending on whether tags are provided or not:
(hashed_unique | hashed_non_unique) <[(tag)[,(key extractor)[,(hash function)[,(equality predicate)]]]]> (hashed_unique | hashed_non_unique) <[(key extractor)[,(hash function)[,(equality predicate)]]]>
The key extractor parameter works in exactly the same way as for ordered indices; lookup, insertion, etc., are based on the key returned by the extractor rather than the whole element.
The hash function is the very core of the fast lookup capabilities of this type of
indices: a hasher is just a unary function object
returning an std::size_t
value for any given
key. In general, it is impossible that every key map to a different hash value, for
the space of keys can be greater than the number of permissible hash codes: what
makes for a good hasher is that the probability of a collision (two different
keys with the same hash value) is as close to zero as possible. This is a statistical
property depending on the typical distribution of keys in a given application, so
it is not feasible to have a general-purpose hash function with excellent results
in every possible scenario; the default value for this parameter uses
Boost.Hash, which often provides good
enough results.
The equality predicate is used to determine whether two keys are to be treated
as the same. The default
value std::equal_to<KeyFromValue::result_type>
is in most
cases exactly what is needed, so very rarely will you have to provide
your own predicate. Note that hashed indices require that two
equivalent keys have the same hash value, which
in practice greatly reduces the freedom in choosing an equality predicate.
The lookup interface of hashed indices consists in member functions
find
, count
and equal_range
.
Note that lower_bound
and upper_bound
are not
provided, as there is no intrinsic ordering of keys in this type of indices.
Just as with ordered indices, these member functions take keys
as their search arguments, rather than entire objects. Remember that
ordered indices lookup operations are further augmented to accept
compatible keys, which can roughly be regarded as "subkeys".
For hashed indices, a concept of
compatible key is also
supported, though its usefulness is much more limited: basically,
a compatible key is an object which is entirely equivalent to
a native object of key_type
value, though maybe with
a different internal representation:
// US SSN numbering scheme struct ssn { ssn(int area_no,int group_no,int serial_no): area_no(area_no),group_no(group_no),serial_no(serial_no) {} int to_int()const { return serial_no+10000*group_no+1000000*area_no; } private: int area_no; int group_no; int serial_no; }; // interoperability with SSNs in raw int form struct ssn_equal { bool operator()(const ssn& x,int y)const { return x.to_int()==y; } bool operator()(int x,const ssn& y)const { return x==y.to_int(); } }; struct ssn_hash { std::size_t operator()(const ssn& x)const { return boost::hash<int>()(x.to_int()); } std::size_t operator()(int x)const { return boost::hash<int>()(x); } }; typedef employee_set::nth_index<2>::type employee_set_by_ssn; employee_set es; employee_set_by_ssn& ssn_index=es.get<2>(); ... // find an employee by ssn employee e=*(ssn_index.find(ssn(12,1005,20678),ssn_hash(),ssn_equal()));
In the example, we provided a hash functor ssn_hash
and an
equality predicate ssn_equal
allowing for interoperability
between ssn
objects and the raw int
s stored as
SSN
s in employee_set
.
By far, the most useful application of compatible keys in the context of hashed indices lies in the fact that they allow for seamless usage of composite keys.
Hashed indices have
replace
,
modify
and
modify_key
member functions, with the same functionality as in ordered indices.
Due to the internal constraints imposed by the Boost.MultiIndex framework, hashed indices provide guarantees on iterator validity and exception safety that are actually stronger than required by the C++ standard with respect to unordered associative containers:
rehash
provides the strong exception safety guarantee
unconditionally. The standard only warrants it for unordered associative containers if the internal hash function and
equality predicate objects do not throw. The somewhat surprising consequence
is that a standard-compliant std::unordered_set
might erase
elements if an exception is thrown during rehashing!
Random access indices offer the same kind of functionality as
sequenced indices, with the extra advantages
that their iterators are random access, and operator[]
and at()
are provided for accessing
elements based on their position in the index. Let us rewrite a
container used in a previous example,
using random access instead of sequenced indices:
#include <boost/multi_index_container.hpp> #include <boost/multi_index/random_access_index.hpp> #include <boost/multi_index/ordered_index.hpp> #include <boost/multi_index/identity.hpp> // text container with fast lookup based on a random access index typedef multi_index_container< std::string, indexed_by< random_access<>, ordered_non_unique<identity<std::string> > > > text_container; // global text container object text_container tc;
Random access capabilities allow us to efficiently write code like the following:
void print_page(std::size_t page_num) { static const std::size_t words_per_page=50; std::size_t pos0=std::min(tc.size(),page_num*words_per_page); std::size_t pos1=std::min(tc.size(),pos0+words_per_page); // note random access iterators can be added offsets std::copy( tc.begin()+pos0,tc.begin()+pos1, std::ostream_iterator<std::string>(std::cout)); } void print_random_word() { std::cout<<tc[rand()%tc.size()]; }
This added flexibility comes at a price: insertions and deletions at positions
other than the end of the index have linear complexity, whereas these operations
are constant time for sequenced indices. This situation is reminiscent of the
differences in complexity behavior between std::list
and
std::vector
: in the case of random access indices, however,
insertions and deletions never incur any element copying, so the actual
performance of these operations can be acceptable, despite the theoretical
disadvantage with respect to sequenced indices.
Example 10 and example 11 in the examples section put random access indices in practice.
Random access indices are specified with the random_access
construct,
where the tag parameter is, as usual, optional:
random_access<[(tag)]>
All public functions offered by sequenced indices are also provided
by random access indices, so that the latter can act as a drop-in replacement
of the former (save with respect to their complexity bounds, as explained above).
Besides, random access
indices have operator[]
and at()
for positional
access to the elements, and member functions
capacity
and
reserve
that control internal reallocation in a similar manner as the homonym
facilities in std::vector
. Check the
reference for details.
std::vector
It is tempting to see random access indices as an analogue of std::vector
for use in Boost.MultiIndex, but this metaphor can be misleading, as both constructs,
though similar in many respects, show important semantic differences. An
advantage of random access indices is that their iterators, as well as references
to their elements, are stable, that is, they remain valid after any insertions
or deletions. On the other hand, random access indices have several disadvantages with
respect to std::vector
s:
std::vector
s by which elements are stored adjacent to one
another in a single block of memory.
replace
and
modify
.
This precludes the usage of many mutating
algorithms that are nonetheless applicable to std::vector
s.
In general, it is more instructive to regard random access indices as
a variation of sequenced indices providing random access semantics, instead
of insisting on the std::vector
analogy.
By design, index elements are immutable, i.e. iterators only grant
const
access to them, and only through the provided
updating interface (replace
, modify
and
modify_key
) can the elements be modified. This restriction
is set up so that the internal invariants of key-based indices are
not broken (for instance, ascending order traversal in ordered
indices), but induces important limitations in non key-based indices:
typedef multi_index_container< int, indexed_by< random_access<>, ordered_unique<identity<int> > > > container; container c; std::mt19937 rng; ... // compiler error: assignment to read-only objects std::shuffle(c.begin(),c.end(),rng);
What is unfortunate about the previous example is that the operation
performed by std::shuffle
is potentially compatible
with multi_index_container
invariants, as its result can be
described by a permutation of the elements in the random access index
with no actual modifications to the elements themselves. There are many
more examples of such compatible algorithms in the C++ standard library,
like for instance all sorting and partition functions.
Sequenced and random access indices provide a means to take advantage
of such external algorithms. In order to introduce this facility we need
a preliminary concept: a view of an index is defined as
some iterator range [first
,last
) over the
elements of the index such that all its elements are contained in the
range exactly once. Continuing with our example, we can apply
std::shuffle
on an ad hoc view obtained from the
container:
// note that the elements of the view are not copies of the elements // in c, but references to them std::vector<boost::reference_wrapper<const int> > v; BOOST_FOREACH(const int& i,c)v.push_back(boost::cref(i)); // this compiles OK, as reference_wrappers are swappable std::shuffle(v.begin(),v.end(),rng);
Elements of v
are reference_wrapper
s (from
Boost.Ref) to the actual elements
in the multi-index container. These objects still do not allow modification
of the referenced entities, but they are swappable,
which is the only requirement std::shuffle
imposes. Once
we have our desired rearrange stored in the view, we can transfer it to
the container with
c.rearrange(v.begin());
rearrange
accepts an input iterator signaling the beginning
of the external view (and end iterator is not needed since the length of
the view is the same as that of the index) and internally relocates the
elements of the index so that their traversal order matches the view.
Albeit with some circumventions, rearrange
allows for the
application of a varied range of algorithms to non key-based indices.
Please note that the view concept is very general, and in no way tied
to the particular implementation example shown above. For instance, indices
of a multi_index_container
are indeed views with respect to
its non key-based indices:
// rearrange as index #1 (ascending order) c.rearrange(c.get<1>().begin()); // rearrange in descending order c.rearrange(c.get<1>().rbegin());
The only important requirement imposed on views is that they must be
free, i.e. they are not affected by relocations on the base index:
thus, rearrange
does not accept the following:
// undefined behavior: [rbegin(),rend()) is not free with respect // to the base index c.rearrange(c.rbegin());
The view concept is defined in detail in the
reference.
See example 11 in the examples section
for a demonstration of use of rearrange
.
iterator_to
All indices of Boost.MultiIndex provide a member function called iterator_to
which returns an iterator to a given element of the container:
multi_index_container< int, indexed_by<sequenced<> > > c; ... // convoluted way to do c.pop_back() c.erase(c.iterator_to(c.back())); // The following, though similar to the previous code, // does not work: iterator_to accepts a reference to // the element in the container, not a copy. int x=c.back(); c.erase(c.iterator_to(x)); // run-time failure ensues
iterator_to
provides a way to retrieve an iterator to an element
from a pointer to the element, thus making iterators and pointers interchangeable
for the purposes of element pointing (not so for traversal) in many situations.
This notwithstanding, it is not the aim of iterator_to
to
promote the usage of pointers as substitutes for real iterators: the latter are
specifically designed for handling the elements of a container,
and not only benefit from the iterator orientation of container interfaces,
but are also capable of exposing many more programming bugs than raw pointers, both
at compile and run time. iterator_to
is thus meant to be used
in scenarios where access via iterators is not suitable or desireable:
Ordered and ranked indices are implemented by means of a data structure known as a red-black tree. Nodes of a red-back tree contain pointers to the parent and the two children nodes, plus a 1-bit field referred to as the node color (hence the name of the structure). Due to alignment issues, on most architectures the color field occupies one entire word, that is, 4 bytes in 32-bit systems and 8 bytes in 64-bit environments. This waste of space can be avoided by embedding the color bit inside one of the node pointers, provided not all the bits of the pointer representation contain useful information: this is precisely the case in many architectures where such nodes are aligned to even addresses, which implies that the least significant bit of the address must always be zero.
Boost.MultiIndex ordered and ranked indices implement this type of node compression
whenever applicable. As compared with common implementations of the STL
container std::set
, node compression can
result in a reduction of header overload by 25% (from 16 to 12 bytes on
typical 32-bit architectures, and from 32 to 24 bytes on 64-bit systems).
The impact on performance of this optimization has been checked to be negligible
for moderately sized containers, whereas containers with many elements (hundreds
of thousands or more) perform faster with this optimization, most likely due to
L1 and L2 cache effects.
Node compression can be disabled by globally setting the macro
BOOST_MULTI_INDEX_DISABLE_COMPRESSED_ORDERED_INDEX_NODES
.
Revised August 6th 2018
© Copyright 2003-2018 Joaquín M López Muñoz. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)


ReFailya
I have just noticed that if you fail a ReCaptcha challenge, it removes your comment text from the comment box.
That’s extremely unacceptable, and sorry it’s been going on this long. I’ll look into fixing it.
I have just noticed that if you fail a ReCaptcha challenge, it removes your comment text from the comment box.
That’s extremely unacceptable, and sorry it’s been going on this long. I’ll look into fixing it.


Alex Tips
Sign In
Total Tips Today
Dollar per Mile
Max
Today
All Time
Tip
Total
Dist.
8 miles
12 miles
New Tip
Today
This Week
This Month
This Year
All Time
Average Tip vs. Gender
Average Tip vs. Age
Distance vs. Tip


Geoffrey Duncan O.
Hi there! I'm Geoffrey Duncan Opiyo from Kampala, Uganda. I work as a Senior Specialist Engineer in Packet Core and Data Solutions at MTN Uganda where I build products used by millions of people all over the Uganda and World at large! I’ve also taught hundreds of internship students here at MTN and created some of the most popular learning materials, I want to take the skills I’ve gained through years of working with some of the best engineers in the world and transfer them directly to students! With CAN-DO spirit.
I also have a lot of experience in creating software, databases, mobile apps and websites for both myself and clients. I have programming experience in many different languages such as Flutter & Dart, PHP & Laravel, [HTML5, CSS & JavaScript], Python, Julia, Linux Shell Scripting and still learning more. However some of my favorite projects involve working on Flutter and Laravel for mobile E-Commerce as well as interactive web apps & application of Machine Learning in Agriculture using Python.
Future Aspirations: Research fellow, a consultant and, Techpreneur - with research interests in Autonomic Computing, AI/Machine Learning, Big Data using Scala, Hadoop, Apache Spark, Python & Julia.
Publication: A predictive machine learning application in agriculture: Cassava disease detection and classification with imbalanced dataset using convolutional neural networks https://doi.org/10.1016/j.eij.2020.02.007
Hobbies: Dancing, Gyming, Programming mobile apps for fun, Automobile rallies, Performance Cars diagnosis and tuning.
A representation of my proficiency in each skill
Used for Big Data analytics and still learning from graduate schoool
My area of expertise in 2G/3G/LTE networks
Forms a large part of my web-based projects
High performance Java technology
Used in most of my web based projects
Used in most of my web based projects
Used in most of my web based projects
Used in most of my Android and iOS Apps
First languages I was introduced to from campus
Used in managing packet core nodes
For Data Science and Machine Learning
For Data Science and Machine Learning
©2018 - 2020 "21hunters.app". All Rights Reserved.


Select Files
Select Video Files:
Annotation Mode
❮ Return to Menu
Report an Issue
You can report your issue on GitHub or by sending an email to<EMAIL_ADDRESS>Save JSON Filters
Reload JSON Filters


A puzzlescript file is divided into 8 sections:
Here are the possible formats of win conditions:
(neko puzzle - you win if there's no fruit left)
No Fruit
(sokoban - you win if every target point has a crate on it)
All Target On Crate
(you win if Love exists somewhere)
Some Love
(you win if there's some gold in the chest)
Some gold on chest
(you win if all gold has been taken from the chest)
No gold on chest
If you have multiple win conditions, they normally all have to be satisfied. This is the default, and usually will work fine for your games. However, sometimes you might find it useful to have multiple ways a player can finish a level. Typically, this happens because you have multiple types of levels with different win conditions.
For instance, you might want "overworld" levels, where you "win" an overworld level by moving to one of the exits (rather than by solving a puzzle). You might also just want a couple variants on the same idea; for instance, in a relatively traditional sokoban game, you might be ok with players having the choice to either cover all the targets with crates or making it to the exit.
To implement this, you'll want
(Section Neko)
(neko puzzle - you win if there's no fruit left)
No Fruit
Section Sokoban
(sokoban - you win if every target point has a crate on it)
All Target On Crate
Section Love
(you win if Love exists somewhere)
Some Love
Section FillChest
(you win if there's some gold in the chest)
Some gold on ChestToFill
Section EmptyChest
(you win if all gold has been taken from the chest)
No gold on ChestToEmpty
If you put this code into your game, you would be able to win in a whopping five ways. You would win immediately if there's no fruit, or if every target is covered by a crate, and so on.
As you can see, the only thing you need to do is separate each possible win type by the keyword 'Section'. Each win type should have a unique name; when you win a level, this name will be printed in the console for easier debugging. The very first win type (before any 'Section' keyword) is the 'default' win type, and does not get a name so that games not using this feature shouldn't notice any changes.
For technical reasons, win types cannot have a space in their name.
As with the simple case where there is only the default win type, you can put multiple win conditions in a single win type; all of them must be satisfied in order for the player to win in that way.
If the player satisfies the conditions of multiple win types at once, the engine will prefer whichever appears first when deciding which type of win to award the player.
These should do for most games, but if you want more advanced control over winning and losing, then you can specify your own win rules using commands.


Add Student Student Address Student Name Student's Branch Student's Batch Student's Class Add Student


Children’s flu programme back on track after delays
by James Illman- Fresh batches of children’s flu vaccine now available following delays
- RCGP says “it’s still early enough” for programme to have “maximum impact”
- Delay follows problems with drug testing process and WHO decision-making
Officials have restarted the distribution of a flu vaccine for one million children following “concerning delays”.
Public Health England told HSJ it had received fresh batches of the nasal spray vaccine from drug maker AstraZeneca and that stock was being distributed to primary schools and GP practices.
Every child aged between the ages of two and 11 is eligible for a free nasal spray for the first time this year as well as others in high risk groups.
Distribution of the vaccine had previously been delayed. This prompted senior clinicians, including the Royal College of GPs, to express concerns earlier this month about children being put at risk because they would not be inoculated in time.
The delay was caused by a combination of the World Health Organisation taking longer than expected to decide which flu strains should be included in the vaccine, and then further delays due to problems with AstraZeneca’s testing process.
RCGP chair Helen Stokes-Lampard told HSJ this week the fresh batches of the vaccine were now arriving at practices and that “it [was] still early enough in the flu season for them to have maximum impact if administered soon”.
She added: “While the delays had been frustrating for patients and GPs alike… The important thing is to make sure as many children as possible get vaccinated, so we would urge parents to arrange this for their child as soon as possible.”
The Royal College of Nursing’s professional lead for public health nursing Helen Donovan agreed with Dr Stokes-Lampard that there was still time to complete the process.
The pause had been a “challenge”, she told HSJ, but there was still time to get children and those in the various high risk groups vaccinated before the flu season, which usually starts to bite in late December or early January.
A senior public health manager however told HSJ the delay meant logistical challenges going forward. Catching up on a mass vaccinations programme in the New Year was “not ideal at all”, the senior figure said.
Ms Donovan explained the complex process had a six-month lead time from when the WHO sets out which virus drug makers need to put into the vaccine.
She added: “I don’t think there is much either the manufacturers or [NHS] policy makers could have done differently. It’s a complicated process, and sometimes these things happen.”
PHE confirmed to HSJ the pause had been lifted. It said in a statement: “We have now received further vaccine from AstraZeneca, and the temporary pause in ordering vaccines for the schools programme has been lifted.
“The primary schools-based flu vaccination programme is once again underway. Children that have underlying medical conditions who have had clinics cancelled at school should still go to [a] GP to get their vaccine.”


main | boonchuy.com
Welcome to my website. This is a place where I host and store my projects.Links to some stuff coming soon.
Hello from Anne#7000


The Magic Lantern Software Development Kit provides a library of properties for the Android platform. There is currently only one property which may be used to manage an image.


Sorts rows based on a source model string role. More...
| Import Statement: | import SortFilterProxyModel . |
| Inherits: |
StringSorter is a specialized RoleSorter that sorts rows based on a source model string role. StringSorter compares strings according to a localized collation algorithm.
In the following example, rows with be sorted by their lastName
role :
SortFilterProxyModel {
sourceModel: contactModel
sorters: StringSorter { roleName: "lastName" }
}
This property holds whether the sorter ignores punctation. if ignorePunctuation
is true
, punctuation characters and symbols are ignored when determining sort order.
Note: This property is not currently supported on Apple platforms or if Qt is configured to not use ICU on Linux.
This property holds whether the numeric mode of the sorter is enabled. This will enable proper sorting of numeric digits, so that e.g. 100 sorts after 99. By default this mode is off.


Non-interactive API statistics
From:
To:
Search
Carrier
Messages
Average Passengers
Received before STD
Carrier 1
12
7
54


Check licence rules
Before deciding to apply for a firearm licence, check the rules for possessing and using firearms.
You must
- have a place to store the firearm which is built to security standards
- have permission to shoot on the land firearms are used on
You can't
- possess and use firearms for personal protection
- possess and use firearms which are not professional, sporting, collecting or recreational reasons
You can
- use some firearms for target shooting
- use some firearms for target shooting at licence gun clubs
- use some firearms for humane killing of animals
- use firearms for expanding ammunition
- use some firearms for shooting live animals, for example foxes and deer
- use some firearms for clay pigeon shooting
- use self-loading shotguns for quarry shooting certain types of birds
- own firearms of historical importance
- use some firearms for exhibiting in collecting or as trophies
- use some firearms for theatre production and history re-enactionments
- use some firearms for treating animals with tranquillisers


SynProS - Synthesis of Programmatic Strategies
Overview
SynProS is a track in the MicroRTS AI Competition and it follows the same principles and prizes described in the competition. This track has been created to foster research in the synthesis of programmatic strategies (i.e., computer programs encoding strategies for playing games). We provide a domain-specific language (DSL) for MicroRTS, which defines the space of possible strategies. Competitors will submit intelligent systems for synthesizing programmatic strategies using our DSL.
The DSL can be described as the context-free grammar shown below, where S1 is the start symbol. The DSL accepts programs with branching and loops, and it implements a set of functions that assign actions to units in the game, such as "attack closest enemy." The DSL also implements Boolean functions such as "do I control 2 ranged units?". A detailed description of the functions implemented in the DSL can be found in MicroRTS's Wiki page.
The MicroRTS codebase includes a framework that implements the DSL to be used as part of the synthesizer that will be created by the competitors. The repository's wiki contains examples and guidance about how to use the framework for this competition. The DSL shouldn't be changed by the competitors.
| Date | Content |
|---|---|
| 1 July 2021 | Deadline for submitting synthesizers |
| 8 July 2021 | Deadline for submitting the GitHub repository with the description of the synthesizer |
| 9 July 2021 | Confirmation of all the competitors accepted |
| 30 July 2021 | Notification of results to authors |
Please contact us if you have questions about the competition.
- Rubens Moraes (Universidade Federal de Viçosa, Brazil)
- Levi Lelis (University of Alberta, Canada)
- Santiago Ontañón (Google Research, USA)
Competition Format and Resources Available
The synthesizers submitted to this track will be evaluated on the same maps used in the other tracks of the competition. Each participant is allowed to submit a synthesizer that will be used by the organizers to generate one programmatic strategy for each map. The programmatic strategy must be able to play on any starting location of the maps. Each synthesizer will run for a limited amount of time for each map (see details in the table below).
The synthesizer must produce a programmatic strategy within the time limit. If the synthesizer fails to produce a strategy within the time limit or if it exhausts the memory allowed for synthesis, the entry will be assigned a penalty score equivalent to a number of defeats equal to the number of participants in the competition.
The same participant/group can submit multiple synthesizers to the competition. We encourage submissions of multiple synthesizers only when the synthesizers implement different ideas. Synthesizers submited by the same participant/group that aren't substantially different (e.g., differ on a set of parameters) will be disqualified by the organizers.
We will follow the same set of rules used in the other tracks of the competition. The participants should read all rules before submitting their entries to the competition.
The competition will be run on machines running Linux. Each synthesizer will have access to the following resources (the synthesizer will be run by the competition organizers):
- Time limit for each map: 24 hours.
- CPU usage: Maximum of 8 CPU's will be available to each synthesizer.
- Memory: Maximum of 16 GB's of memory.
- Disk Space: Maximum of 1 GB in disk.
How to Submit Your Synthesizer
The participants can either submit your entire project or just the code of your synthesizer. The participants should follow the steps below to submit their synthesizer.
- Step 1. Check if your synthesizer implements a serialized file (using the class SerializableController to save your programmatic strategy) as output. This file needs to be compatible with the original framework, which means that you can't include new commands or changes the DSL.
- Step 2. Upload your project to a public GitHub repository. If the project uploaded to GitHub contains all we need to run the synthesizer, then jump to step 4.
- Step 3. If you need to add libraries, folders, or other resources, compact all we need to run your synthesizer in a zip file.
- Step 4. Send the link to your GitHub repository and the zip file with additional resources to<EMAIL_ADDRESS>Please include in the email any additional instruction needed to run your synthesizer.
The artifacts sent to the competition will be tested before the competition starts and the participants will be contacted if any issues arise.
Score and Classification
The score of a synthesizer on a map is computed as follows:
| Map Score = Winning Rate - (Winning Rate x 0.4 x Non-Interpretability Penalty) |
|---|
We explain below how winning rate and non-interpretability penalty are computed. The final score of a synthesizer is the average of the scores on all maps. The synthesizer with highest final score will be the winner of this track.
The table below shows an example of how the final score of a synthesizer is computed if two maps are used.
| Map | Winning Rate | Interpretability Penalty | Map Score |
|---|---|---|---|
| map 1 | 90.8 | 0.0 | 94.48 |
| map 2 | 82.4 | 0.94 | 51.42 |
| Total Score | 72.95 |
The winning rate is defined by the score in a round-robin tournament among all the entries. See the MicroRTS Competition rules page for more information.
Interpretability of the synthesized strategies is key in this track. We approximate the interpretability of a strategy with the size of the program encoding the strategy. Smaller programs will be deemed as more interpretable. The non-interpretability penalty used in the map score formula is computed based on the number of instructions used in the strategiy. If a strategy uses 10 or fewer instructions, then its non-interpretability penalty is 0.0. The penalty is increased by 0.01 for each instruction above 10, to a maximum of non-interpretability penalty of 1.0, as summarized in the table below.
| Number of Instructions | Non-Interpretability Penalty |
|---|---|
| less than or equal to 10 | 0.0 |
| Each instruction above 10 increases the penalty in | 0.01 |
| 100 or more | 1.0 |
Let's consider the following example of a programmatic strategy for playing MicroRTS.
for(u): if not HaveUnitsStrongest(Heavy,u): harvest(1,u) for(u): if not HaveQtdEnemiesbyType(Heavy,9): attack(Worker,closest,u) if not HaveUnitsStrongest(Ranged,u): moveaway(Worker,u) train(Worker,4,Right)The program uses 12 instructions: 2 for-loops, 3 ifs, 3 Boolean expressions, 4 commands that return actions. The non-interpretability score of this strategy is 0.02.
Related Publications
- Mariño, Julian R. H.; Moraes, Rubens O.; Oliveira, Tassiana C.; Toledo, Claudio; and Lelis, Levi H. S. 2021. Programmatic Strategies for Real-Time Strategy Games. In Proceedings of the Thirty-Fifth AAAI Conference on Artificial Intelligence. AAAI.


Male
Female
No Preference
Find A Doctor!


--- layout: post title: Two Bits, now in eBook form... date: 2009-05-28 22:11:37.000000000 -07:00 categories: - general news tags: [] status: publish type: post published: true meta: _edit_last: '1' author: login: ckelty email<EMAIL_ADDRESS>display_name: ckelty first_name: Christopher last_name: Kelty excerpt: !ruby/object:Hpricot::Doc options: {} ---
Another version...
Kiran "Jace" Jonnalagadda (a veteran silk-list member) created an epub version for the Sony e-Book reader (thanks jace)!


The Trans Safety Network have run an article about a UK parliamentary petition that as good as calls for the return of Section 28. It was initiated by Algerian state actors, and spread via various far-right, Islamaphobic and conspiracy influencers and hashtags. A grass-roots counter-petition is gaining ground, but it could do with more signatures.
data: gc_scum.csv, anti_gc_scum.csv
Last updated: {{ updated }}.
It is possible to obtain historial petition data via the Wayback Machine, see the source-code. This static site is refreshed daily, for free, using PythonAnywhere.


For NeCTAR clouds, login to the dashboard first. You can then either:
-
Download the credentials for your default allocation here
-
Get the credential files for a different NeCTAR allocation as per these instructions
Select the relvant ".zip" credentials file for automatic inclusion below:


English Folk Dance
Morris dancing usually accompanied by music. It is based on rhythmic stepping and the execution of choreographed figures by a group of dancers, usually wearing bell pads on their shins.
Interested? Want to know more, why not get in touch.
Contact
Morris Styles
-
Border
Traditions of Herefordshire, Shropshire and Worcestershire: counties along the border with Wales. Characteristics of the tradition as practised in the 19th and early 20th centuries include: blackface (in some areas), use of either a small strip of bells (in some areas) or no bells at all (in others), costume often consisting of ordinary clothes decorated with ribbons, strips of cloth, or pieces of coloured paper; or sometimes "fancy dress", small numbers of traditional dances in the team repertoire, often only one and rarely more than two, highly variable number of dancers in the set and configurations of the set (some sides had different versions of a dance for different numbers of dancers), and an emphasis on stick dances almost to the exclusion of hankie dances.
-
Cotswold
Traditions from these villages: Abingdon, Adderbury, Ascot-under-Wychwood, Badby, Bampton, Bidford, Bledington, Brackley, Bucknell, Chipping Campden, Ducklington, Eynsham, Headington Quarry, Hinton-in-the-Hedges, Ilmington, Kirtlington, Leafield, Longborough, Oddington, Sherbourne, Stanton Harcourt, Upton-upon-Severn and Wheatley.
The set dances include handkerchief dances, processional dances, stick dances and hand clapping dances, there are also jigs for one or two dancers. The men will usually wear a white shirt, white trousers or dark breeches and black shoes. Bells are worn below the knee, and the club costume may often be a coloured baldrick or a waistcoat.
-
North West
Tradition is named after the North West region of England and has always featured mixed and female sides, at least as far back as the 18th century.
Historically, most sides danced in various styles of shoes or boots, although dancing in clogs was also very common. Modern revivalist sides have tended more towards the wearing of clogs.The dances were often associated with rushcarts at the local wakes or holidays, and many teams rehearsed only for these occasions.
Morris Lessons
| Border Morris Classes |
Cotswold Morris Classes |
North West Morris Classes |
| Every Monday 8pm to 10pm |
Every Wednesday 8pm to 10pm |
Every Thursday 8pm to 10pm |
| £5 per visit or £150 per annual |


拼图游戏
time: 0:00
steps:0
Competitive Advanture
God Mod
lets getting started
its so hard let me pee first
start over


Cellular Automata Rule Explorer
A much more in-depth explanation of cellular automata can be obtained from other, more eloquent sources. A particularly comprehensive and eloquent source can be found in A New Kind of Science by Stephen Wolfram. In brief, a cellular automaton (singular) is a system composed of multiple discrete units called cells. These units each maintain some form of internal state. This state is changed by the operating rules and the current state of the cell, along with the states of the neighboring cells, over some discrete time steps.
One Dimensional Cellular Automata
In a one-dimensional cellular automaton, the constituent cells are aligned in a linear fashion. This is, each cell has at most two neighbors, a right and a left neighbor.
In the above example, cell B has two neighbors, cells A and C. So cell B’s state at time t will depend entirely upon the state of B at time t - 1 and the states of A and C at time t - 1.
An interesting effect occurs when the history of cell states is made visible over time. In the cellular automata explorer, I have implemented just such a view. There is a single line of cells in this one-dimensional automaton. It lives at the top of the screen and pushes its old states, in the form of black and white pixels (one pixel per cell), down and off the screen. The pattern grows like a fingernail out of this line of cells. Initially there is one cell set to “on” in the middle of the screen. As the history builds up, a pattern emerges from the interaction of the individual cells, mediated by the rule, which is 129 by default.
An Archetypical Programming Project
In the process of learning to program GUI applications on Linux, I decided to implement the Wolfram style one-dimensional cellular automaton. In the process of implementing this application, I had to use data structures and algorithms from the Standard Template Library, API calls from the GTK framework, and implement classes to support the cells in their neighborhoods. None of these activities represent any unique works on my part, but do form the ideal pattern of use for how to learn a programming environment. I had to learn about graphics, loading, manipulating, and displaying bitmaps, concepts like double buffering, and in order to get things running at an appropriate speed, various debugging and profiling techniques.
Since the original implementation, I have implemented the one-dimensional cellular automaton repeatedly on multiple platforms.
C++ / GTK
This implementation can be found on github under the name Cellular-Automata-Rule-Explorer. Aside from being the first implementation of this project, the C++/GTK version has some unique features.
There is an automated image capture feature which allows the user to automatically save the contents of the output to a png file on the file-system. This was triggered to happen each time a full screen of output had passed. This gives the ability to stitch together one continuous image showing the progress of the automaton over even a larger period of time than is possible in the program’s typical output. I refer to these longer images as tapestries.
A mechanism to vary the rules over time, without human intervention, was also added to this iteration of the project. The user may create a list of rules from which the program will randomly select at random intervals. This has the effect of producing a continuous stream of novel images, all containing rhyming motifs, resulting from applying the same rules repeatedly, to unique input configurations.
Javascript
The javascript implementation takes the form of a web app. The page is outlined by an html file, styled by a css file, and animated by the javascript portion of the project. This version of the web app accomplishes double buffering by using two canvas elements which are alternately hidden and shown. The old lines are copied and translated down one pixel to the hidden canvas, and the new line as drawn at the top. When this is completed, the shown canvas is hidden and the hidden show, effectively flipping the buffers. The source repository can be found on github under the name Celluar-Automata-Explorer.
Upon the initial completion of the javascript cellular automata project, I posted it to reddit.com/r/math for comments and suggestions, some of which were incorporated into the project.
Android
The latest iteration of the one-dimensional cellular automaton project is on the Android platform. I have two projects under way which are both incomplete. The first is an app which implements the now typical rule explorer behavior, start/stop, change rules, save the screen to an image file, etc. This version also provides the ability to set the current image as a wallpaper or to share the current image to any services that accept image sharing on the android, including but not limited to gmail, google plus, MMS, and twitter. This project is currently stalled while some threading issues are wrung out.
The second variety of Android app is a live wallpaper. This was implemented in a similar way to the continuously changing rules of the original C++/GTK app. There is a pre-set list of rules which were determined by trial and error to produce interesting and long-lived images when employed together. At a random time interval, a new rule is chosen from this list. A new feature was added to allow a wider selection of rules to be included. This feature also solves a problem that arose in the older version, the death of the automaton.
The metaphor of death is appropriate for this phenomenon. For when the states of all the cells in the automaton are identical, no more patterns may emerge. The only possible changes are entire rows of all black or all white. While there may be some oscillation between these two states depending upon the current rule, no columnar variation will ever be re-introduced.
So in order to re-animate the automaton, a watcher is placed in the program loop. This watcher is looking for cell uniformity. When all cells are on or all cells are off, the watcher randomly chooses to re-seed the automaton with either a single variant cell in the center of the linear array of cells, or to visit each cell, with a 0.5 probability of turning each cell on. So when the automaton does die, it is immediately re-seeded with life, and the patterns can continue.


Camera
IP Address
Camera Username
Purpose
--select--
Vehicle
Person
Features
Age
Gender
Tampering
Choose Cluster
--select--
Vehicle
Person
Camera ID
Submit


Example of implementing drag & drop using mouse events such as onPress, onMouseUp, and onMouseMove.
Some browsers can not load images or access pixel data when running local files, and may throw a security error or not work unless the content is running on a server.


Ocean [ao10], ocean, in The Outer Sea
Last updated Turn #135
Ocean [ao10], ocean, in The Outer Sea
------------------------------------------------------------------------
13: The Savvy Aardvark [ha5r], ship, 2 hulls, 1 rowing port, 6 sails,
13: 20% damaged, arrived from Ocean [ao09], owner:
13: Phantasm [n4b], Imperial Empire, duke, with two workers,
13: eight sailors
14: The Savvy Aardvark [ha5r], ship, 2 hulls, 1 rowing port, 6 sails,
14: 20% damaged, departed for Ocean [ao11].
Routes leaving Ocean:
North, to Ocean [an10], 6 days
East, to Ocean [ao11], 6 days
South, to Ocean [ap10], 6 days
West, to Ocean [ao09], 6 days


--- layout: post title: Custom Rake Task To Unload Fixtures disqus_id: /2006/10/02/custom-rake-task-to-unload-fixtures/ categories: - ruby-rails - workflow ---
I made a revised version of a rake task that I have used quite often, for unloading existing DB tables into fixture data and thought I would share. This rake task is the in correct name space and adds a "rake db:fixtures:unload" command to your rails project when you put this in "lib/tasks/foo.rake". It can take an optional TABLES variable or if none is present the whole array of DB tables are converted. I find this rake task helpful when dealing with LARGE databases.
{% highlight ruby %} namespace :db do namespace :fixtures do desc 'Create YAML test fixtures from data in specifed tables. Set table names by TABLES=foos,bars,etc' task :unload => :environment do sql = "SELECT * FROM %s" tables = ["schema_info"] ActiveRecord::Base.establish_connection (ENV['TABLES'] ? ENV['TABLES'].split(/,/) : ActiveRecord::Base.connection.tables).each do |table_name| i = "000" File.open("#{RAILS_ROOT}/test/fixtures/#{table_name}.yml", 'w') do |file| data = ActiveRecord::Base.connection.select_all(sql % table_name) file.write data.inject({}) { |hash, record| hash["#{table_name}_#{i.succ!}"] = record hash }.to_yaml end end end end end {% endhighlight %}


About Me
This is where I am supposed to have fun and write two stories about myself. Thing is, I am having quite a bit of trouble constructing a website like the once presented.
Here we are again, adding another paragraph to show my ability to take what I have gathered over the past two weeks and construct the homework example.


Module hais.ais¶
Implementation of Hamiltonian Annealed Importance Sampling (HAIS).
The implementation includes:
- partial momentum refresh across HMC moves (the main idea of Sohl-Dickstein and Culpepper).
- adaptive HMC step sizes to attempt to acheive an optimal acceptance rate.
-
class
hais.ais.
HAIS
(proposal=None, log_target=None, prior=None, log_likelihood=None, stepsize=0.5, smthd_acceptance_decay=0.9, adapt_stepsize=False, target_acceptance_rate=0.65, stepsize_dec=0.9, stepsize_inc=1.1, stepsize_min=1e-05, stepsize_max=1000.0)¶ An implementation of Hamiltonian Annealed Importance Sampling (HAIS).
-
__init__
(proposal=None, log_target=None, prior=None, log_likelihood=None, stepsize=0.5, smthd_acceptance_decay=0.9, adapt_stepsize=False, target_acceptance_rate=0.65, stepsize_dec=0.9, stepsize_inc=1.1, stepsize_min=1e-05, stepsize_max=1000.0)¶ Initialise the HAIS class.
The proposal and target distribution must be specified in one of two ways:
- either a proposal distribution \(q(x)\) and unnormalised log_target density \(p(x)\) should be supplied. In this case the i’th annealed density will be \(q(x)^{1-\beta_i}p(x)^{\beta_i}\)
- or a prior distribution \(q(x)\) and normalised log_likelihood density \(p(x)\) should be supplied. In this case the i’th annealed density will be \(q(x)p(x)^{\beta_i}\)
Parameters: - proposal – The proposal distribution.
- log_target – Function that returns a tensor evaluating \(\log p(x)\) (up to a constant).
- prior – The prior distribution.
- log_likelihood – Function that returns a tensor evaluating :the normalised log likelihood of \(x\).
- stepsize – HMC step size.
- smthd_acceptance_decay – The decay used when smoothing the acceptance rates.
- adapt_stepsize – If true the algorithm will adapt the step size for each chain to encourage the smoothed acceptance rate to approach a target acceptance rate.
- target_acceptance_rate – If adapting step sizes, the target smoothed acceptance rate. 0.65 is near the theoretical optimum, see “MCMC Using Hamiltonian Dynamics” by Radford Neal in the “Handbook of Monte Carlo” (2011).
- stepsize_dec – The scaling factor by which to reduce the step size if the acceptance rate is too low. Only used when adapting step sizes.
- stepsize_inc – The scaling factor by which to increase the step size if the acceptance rate is too high. Only used when adapting step sizes.
- stepsize_min – A hard lower bound on the step size. Only used when adapting step sizes.
- stepsize_max – A hard upper bound on the step size. Only used when adapting step sizes.
-
ais
(schedule)¶ Perform annealed importance sampling.
Parameters: schedule – temperature schedule
-
log_normalizer
(logw, samples_axis)¶ The log of the mean (over the samples_axis) of \(e^{logw}\)
-
-
hais.ais.
get_schedule
(T, r=4)¶ Calculate a temperature schedule for annealing.
Evenly spaced points in \([-r, r]\) are pushed through the sigmoid function and affinely transformed to \([0, 1]\).
\[\begin{split}t_i &= (\frac{2i}{T} - 1) r, \quad i = 0, \dots, T \\ s_i &= \frac{1}{1+e^{-t_i}} \\ \beta_i &= \frac{s_i - s_0}{s_T - s_0}\end{split}\]Parameters: - T – number of annealing transitions (number of temperatures + 1).
- r – defines the domain of the sigmoid.
Returns: A numpy array with shape (T+1,) that monotonically increases from 0 to 1 (the values are the \(\beta_i\)).
Return type: 1-D numpy array


To liquidate your holdings in an individual security, call the Liquidate
method and provide a ticker or Symbol
.
// Liquidate all IBM in your portfolio var orderIds = Liquidate("IBM");
# Liquidate all IBM in your portfolio order_ids = self.Liquidate("IBM")
You can pass an order tag to the Liquidate
method.
Liquidate("AAPL", "Liquidated");
self.Liquidate("AAPL", "Liquidated")


Cinema Database Examples
Small experiment
Big Experiment
Cars Database

Other Cinema Use Cases
Multi-control Dataset
Complex image
Comparison
Messy data


 I usually don't resort to using the work "suck," but in this case, it is so vastly appropriate.  It is two unbearable hours of meandering pointlessness. Well, no, "meandering" implies movement, and Blues Brothers 2000 contains no movement. It's a stagnant, dead-feeling motion picture containing absolutely nothing of interest. It's highlighted by hundreds of cameos, car chases, gun fire, and irritating stereotypes.
Now, I have to be at least partially fair: it's been a long time since I saw the original, so I wasn't sure what to expect from this. Also, I have no affinity to the Music that the characters in this film cherish so much. Maybe I should have rented the original film before subjecting myself to this; at least then I would not have been blindsided by the pure, toxic awfulness of this movie. But I didn't. I watched it cold turkey, and I was blindsided. I was shocked not only by how bad the film is in general, but how intensely boring it is from start to finish. Thirty minutes into the film, I felt like I had seen enough black suits and sunglasses to hold me over into the next millenium.
Dan Aykroyd stars as Elwood Blues. Upon getting released from prison in the beginning of the film, he learns that his brother is dead. So, the story of Blues Brothers 2000 contains scene after scene in which Elwood tries to reassemble his old band. There are like thirty people in this silly band, so there are a lot of scenes in which Elwood has to convince wary musicians that dodging bullets really is worth the rewards they get from playing their music. Notable members of the band include Mac (John Goodman) and Buster the kid (J. Evan Bonifant).
I'll not bother with the subplots. Like all truly hideous films, there are countless subplots that clog the film and suffocate the viewer. I'll just mention that some of them contain nuns, while others showcase Russian mobsters, Confederate militia men, and a police chase led by Joe Morton.
Even though I'm not a fan of the Music, I think I could have enjoyed the film, had it been made well. Even though I'm not familiar with the characters, the movie could have still drawn me in and made me interested. All the best sequels I've ever seen are accessible even to viewers who haven't seen the originals. I simply saw no point to make this movie. Well, I take that back--there are two scenes in which Dan Aykroyd makes anti-drug messages. Knowing Aykroyd's history and the fate of John Belushi, I can understand why these were included. And I can respect that. But it doesn't make the film good.
Each scene plods along and slumps into the next with absolutely no feeling of progression. Musicals, when done poorly, come across as dull and contrived, as if there's no reason to have the music at all. I don't watch musicals often, but I can tell when they feel smooth. This one doesn't feel smooth. When the characters break out into song, I just want them to stop and be silenced.
There was, however one scene that had me laughing--towards the end, there is a two-minute pileup of police cars. The cars go flying through the air at ridiculous heights and speeds, and it is entertaining (most of the car stunts, actually, are so exaggerated that they are entertaining). I also like John Goodman, though he doesn't do much in this film. Unfortunately, these two elements don't amount to a hill of beans when compared to the flat-out wretchedness portrayed in every other scene.
I suppose the worst moment is when the Brothers stumble across the militia men meeting. I don't know if there are really people like this in the world, but I didn't think it was funny to see them in this film, and I didn't think it was funny when the Brothers accidentally blow them up with their own explosives. And the film has no rules--penned by Aykroyd and director John Landis, the script is a dark creation, displaying characteristics of musicals, comedies, and farces; but with each passing scene, the ridiculous factor increases exponentially until finally there are hordes of people undergoing magical transformations into rats.
 It's a horribly dull, limp, and insipid attempt at an entertaining and energetic film. I can see how, if you love the first movie or you just love this Music, that you might find this entertaining. Like I said before, I don't know much about blues music. And, because of Blues Brothers 2000, I have no interest to ever learn anything about it.
>From 0-10: 2 Grade: F
Visit FILM PSYCHOSIS at http://www.pyramid.net/natesmovies
Nathaniel R. Atcheson
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


void STP_OnPortEnabled ( STP_BRIDGE* bridge, unsigned int portIndex, unsigned int speedMegabitsPerSecond, bool detectedPointToPointMAC, unsigned int timestamp );
Function which the application must call when the MAC_Operational parameter of a port (known otherwise as "link good" or "link up" in switch IC specs) changes to TRUE. See the Remarks section for more details.
true
when the port hardware detects a point-to-point link, or
false
otherwise. See the Remarks section for more information.For detailed information about the MAC_Operational parameter, see §11.2 and §11.3 in 802.1AC-2016.
The application can usually detect changes in the operational state of a port by polling an internal register of the PHY of a physical port. Refer to the specifications of the switch chip for details on how to do this.
You should check the electrical schematic of your device and, if needed, establish in
the application code a mapping between 1) the portIndex
values
that your application uses to communicate with the STP library, and 2) the port numbers that your
application uses to communicate with the switch IC. This mapping is not always a
1:1 mapping; it depends on the hardware particularities whether or not it is.
The detectedPointToPointMAC
parameter can usually be hardcoded by the application to true
with all modern hardware,
because such hardware uses exclusively point-to-point links: RJ45 connections, RMII buses,
fiber optic cable etc. The application should pass false
in case of non-point-to-point
links such as multi-drop coaxial cable. The STP library uses this parameter, together with
adminPointToPointMAC
, to compute operPointToPointMAC
. The current library code was tested
on real hardware only with
point-to-point links.
Execution of this function is a potentially lengthy process. It may call various callbacks multiple times.
The application must not call this function for already enabled ports (i.e., must not call it twice in a row). For convenience, the STP_GetPortEnabled is provided, which the application can use to check whether it had previously enabled or disabled a port.
This function must not be called from within an STP callback.


IContrib.org is a fundraising organization. We help raise funds by improving
the online donating experience. We make it especially easy for donors to
provide your organization with recurring funding. We work for you and act on
your behalf. Our donors utilize our infrastructure to pass their money DIRECTLY
to your charity. By pressing the 'Register' button below, you agree to the
following terms:
-
You permit IContrib.org to write receipts for tax-deductible donations on behalf
of your organization.
-
You acknowledge that a processing fee is subtracted at the time of donation
and this fee must be accounted for as a fundraising cost for your charity.
-
You agree that IContrib.org has the right to change its processing fee.
We commit to notifying the Point of Contact above by email at least 30 days
prior to a rate change.


HTML provides structure to a website using tags such as 'header', 'div' and 'link'. However with just that alone your website would be pretty boring. Adding in CSS brings the colour and styling to the website. Add Javascrpit on top of that and that'll bring more interactivity to the website. Think of HTML as a black and white picture and CSS as the colour which when added to the picture makes it pretty.
Control flow is using If and Else statements in order to control the
execution of the code. For example your crossing the road, 'if' the signal
is red you stop and wait or 'else' the signal is green and you cross the
road.
In programming, a loop is a piece of code that runs over and over again
until a condition is met. For example every workday (Monday-Friday) you go
to work until the weekend comes along.
The DOM is a programming interface that enables HTML and CSS to communicate with Javascript. The DOM is the most important piece as it provides you with thre missing link that ties these programmes together.
Both aarays and objects can be used to store data. Arrays store a collection of values whereas objects store data in key value pair.
Functions are useful because it means you don't have to rewrite the same code multiple times. It allows you reuse a block of code anywhere by calling on the function.


| DOSE: |
145 mg |
oral |
Cacti |
(extract) |
I submit this experience to erowid purely for speculative reading amongst interested internet-jockeys. Under no assumptions or intents whatsoever do I recommend such a foolhardy course of action to any living entity whatsoever - it's results may be a damaged psyche, sickness, HPPD or (theoretically) death. This means that under no circumstances imposed throughout the perpetuity of the universe should this regime be replicated.
Firstly, a little background information: I'm nineteen years old, partially employed, fairly healthy, and, until recently, morbidly depressed and cynical.
I'd been becoming progressively unstable through persistent drug usage - I'd normally abuse amphetamines / coke quite compulsively for days at a time, trip on LSD a few times a month, and ingest (smoke, snort, slam or swallow) any drug I could lay my grubby little mitts on. I was being treated for clinical depression with fluoxetine (40mg daily) and insomnia with 5mg diazepam, also daily.
My acquisition of mescaline, however, was through my own initiative - I'd been working with a couple of friends, some chems, and a few pounds of Trichocereus cacti (peruvian torch). I'd measured the resulting product at just over one gram (1150mg) which was subsequently divided into eight doses of around 145mg.
My reason for using mescaline was the result of some contemplation - my tool was either to be DXM or Mescaline. DXM was a good potential candidiate for this 'therapy' because i found it dissociated my emotional reflexes, allowing me to probe my psyche to extents which would normally be hindered by restraint. It also invoked a real clarity in my thought. However, because this mental analysis required my emotional faculties intact, I decided against purchasing pure powder. Mescaline's pontential lay not only in it's relative benignity, but also within the fact that it was almost a dead cert that, with the right lines of thought, mescaline could almost always provoke quite an intense emotional reaction.
I'd also been practising meditation for five months, and found the results quite astounding: It provided me with a mental acumen throughout my day-to-day life that I thought previously impossible. My imagination had become unfettered, but I was still a quivering nervous wreck without my meds. This psychotherapy I'd planned was not only for self-improvement, but to wean myself away from the addiction instilled in me by my GP.
Down to the plan of action: I would practise meditation on alternate days, once at lunchtime, and once around three hours before bedtime. If I found myself unable to concentrate, I'd take 50 - 200mg caffeine in the form of pro-plus, which would normally do the trick.
Mescaline would be ingested once every four days, so as to provide me with enough time to contemplate my findings and allow for an undisrupted life otherwise.
Prerequisites were that I smoked ABSOLUTELY no cannabis whatsoever, and no other recreational drugs. If I found myself particularly depressed, I'd allow myself a half-dose of prozac. If I found myself unable to sleep, I'd have to decline a sleeping pill.
My first session began at twelve noon, monday, just meditation. I approached my first meditative session with enthusiasm, as I was looking forward to this experience.
My results from meditation have been quite different from a lot of other people's: I've discussed with perhaps twenty other people who meditate ardently, and read roughly 300 other testimonials. I'd begin with deep breathing, in complete quiet: the phone would be taken off the hook and I'd be secluded in my room. This was a tad extensive, given, but I enjoy silence anyway. I'd focus on a 'seed': any object which sprang to mind normally, something neutral and unarousing, but still of some significance: sometimes a ball, a piece of fruit, stuff like that.
After an initial period of focus, I would feel peaceful, relaxed and solitary. This is where my meditation differs from other reports I've read: during this relaxed period, if I focus on a particular region near the stem of my brain, where the spinal cord meets, I'd begin to hear a ringing in my ears, and this would become quite loud. It corresponds to the same frequency I hear when I smoke DMT or 5-MeO DMT. My thoughts become spontaneous, and my imagination kicks in - I'd completely lose awareness of my self and my surroundings for a period of perhaps five minutes, and, although uncontrollable in this state, my mind becomes a cherished tool for enlightenment. I've come to many profound realisations in this state, and I've retained my memory for the majority of these realisations. To this date, however, I've still found no explanation for this unique phenomena (hyperventilation? HPPD?).
I spent the rest of the afternoon collecting my thoughts, and reviewing what I was about to do: I was very appprehensive, but I was determined to see this through to the end.
At around 8:40, I took the first dose of mescaline, as a primer for the dosage I'd set. Within 45 minutes of swallowing the capsule, I found myself hunched over the toilet, spewing into the pan, until I became breathless, my ribs hurt and my head throbbed. This was fleeting, and I soon found myself able to sit comfortably once more.
During this trip, I became very emotionally distraught, with my pitifully low self-esteem having the better of me. I cried for perhaps an hour, and I found that when finished, I was feeling quite relieved. I settled back into the chair and began concentrating on the seed.
Once peaking at this state, I was completely unaware of my body once more, but this time with no ear-ringing or strange catatonia. I began summarising what I'd try to attain over the next seven sessions: I wanted to set myself realistic targets, and, only having seven sessions wouldn't be nearly enough to iron out my neurotic little foibles. Some serious thinking had to be done to establish imperatives. Not easy.
After coming down, I wrote down these targets and set them aside inside a sealed envelope. I then wrote the targets singularly on seven cards, also in separate envelopes.
Although divulging these targets may seem useful to readers, I will not, because if anybody wants to replicate this 'therapy', I want them to go in with an unbiased mind, so as to set their own individual targets. Not everyone will benefit to the same magnitude or effect as me, which is why individual targets must be set.
Over the next month, with the combination of meditation and mescaline, I found myself able to do tasks I'd normally consider myself unable to do - I can now understand complicated mathematical procedures, I passed the Mensa IQ test, and I'm extremely articulate. My circadian rhythm has returned to a normal, healthy sleeping pattern, and I no longer take prozac.
Needless to say, I did default my ground rules during that month. Mescaline is a mentally abrasive drug, and there were times I was harbouring thoughts of suicide. I think I must have taken three or four prozac during that month, as well as two valiums.
As far as benefits stretch from this analysis and growth, I think I've reaped the lion's share - it's three months later and I'm constantly expanding. I now know the value of moderation and control, my memory's constantly improving and I'm less self-destructive in nature than previously. I'm completely off the meds, although I still enjoy ganja & speed in reasonable amounts (no six-day binges anymore). I'm less conceited and arrogant, and a hell of a lot more adaptable in my job and in my leisure.
I think that with adequate reasoning, I can advocate such an action to certain individuals - it's brought indescribable improvement to my life and it's helped me begin achieving my potential.
happy trails & peace
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Collection
Extends:
Direct Subclass:
Indirect Subclass:
Backbone.Collection - Collections are ordered sets of models. (http://backbonejs.org/#Collection)
You can bind "change" events to be notified when any model in the collection has been modified, listen for "add" and "remove" events, fetch the collection from the server, and use a full suite of Underscore.js methods.
Any event that is triggered on a model in a collection will also be triggered on the collection directly, for convenience. This allows you to listen for changes to specific attributes in any model in a collection, for example: documents.on("change:selected", ...)
Underscore methods available to Collection (including aliases):
See:
- http://underscorejs.org/#chain
- http://underscorejs.org/#contains
- http://underscorejs.org/#countBy
- http://underscorejs.org/#difference
- http://underscorejs.org/#each
- http://underscorejs.org/#every
- http://underscorejs.org/#filter
- http://underscorejs.org/#find
- http://underscorejs.org/#first
- http://underscorejs.org/#groupBy
- http://underscorejs.org/#indexBy
- http://underscorejs.org/#indexOf
- http://underscorejs.org/#initial
- http://underscorejs.org/#invoke
- http://underscorejs.org/#isEmpty
- http://underscorejs.org/#last
- http://underscorejs.org/#lastIndexOf
- http://underscorejs.org/#map
- http://underscorejs.org/#max
- http://underscorejs.org/#min
- http://underscorejs.org/#partition
- http://underscorejs.org/#reduce
- http://underscorejs.org/#reduceRight
- http://underscorejs.org/#reject
- http://underscorejs.org/#rest
- http://underscorejs.org/#sample
- http://underscorejs.org/#shuffle
- http://underscorejs.org/#some
- http://underscorejs.org/#sortBy
- http://underscorejs.org/#size
- http://underscorejs.org/#toArray
- http://underscorejs.org/#without
Example:
If using Backbone-ES6 by ES6 source one can create a module for a Backbone.Collection:
export default new Backbone.Collection(null,
{
model: Backbone.Model.extend(...)
});
or if importing a specific model class
import Model from '<MY-BACKBONE-MODEL>'
export default new Backbone.Collection(null,
{
model: Model
});
or use full ES6 style by using a getter for "model":
import Model from '<MY-BACKBONE-MODEL>'
class MyCollection extends Backbone.Collection
{
get model() { return Model; }
}
export default new MyCollection(); // If desired drop "new" to export the class itself and not an instance.
Constructor Summary
| Public Constructor | ||
| public |
constructor(models: Array<Model>, options: object) When creating a Collection, you may choose to pass in the initial array of models. |
Member Summary
| Public Members | ||
| public |
A comparator string indicating the attribute to sort. |
|
| public |
The length of the models array. |
|
| public |
The default Backbone.Model class to use as a prototype for this collection. |
|
| public |
An array of models in the collection. |
Method Summary
| Public Methods | ||
| public |
Add a model (or an array of models) to the collection, firing an "add" event for each model, and an "update" event afterwards. |
|
| public |
Get a model from a collection, specified by index. |
|
| public |
clone(): Collection Returns a new instance of the collection with an identical list of models. |
|
| public |
Convenience to create a new instance of a model within a collection. |
|
| public |
Fetch the default set of models for this collection from the server, setting them on the collection when they arrive. |
|
| public |
Just like |
|
| public |
Get a model from a collection, specified by an id, a cid, or by passing in a model. |
|
| public abstract |
Initialize is an empty function by default. |
|
| public |
Override this method to specify the attribute the collection will use to refer to its models in collection.get. |
|
| public |
|
|
| public |
Pluck an attribute from each model in the collection. |
|
| public |
Remove and return the last model from a collection. |
|
| public |
Add a model at the end of a collection. |
|
| public |
Remove a model (or an array of models) from the collection, and return them. |
|
| public |
Adding and removing models one at a time is all well and good, but sometimes you have so many models to change that you'd rather just update the collection in bulk. Use reset to replace a collection with a new list of models (or attribute hashes), triggering a single "reset" event at the end. Returns the newly-set models. For convenience, within a "reset" event, the list of any previous models is available as options.previousModels. Pass null for models to empty your Collection with options. Calling collection.reset() without passing any models as arguments will empty the entire collection. Here's an example using reset to bootstrap a collection during initial page load, in a Rails application: |
|
| public |
The set method performs a "smart" update of the collection with the passed list of models. |
|
| public |
Remove and return the first model from a collection. |
|
| public |
slice(): * Return a shallow copy of this collection's models, using the same options as native |
|
| public |
sort(options: object): Collection Force a collection to re-sort itself. |
|
| public |
sync(): * Uses Backbone.sync to persist the state of a collection to the server. |
|
| public |
Return an array containing the attributes hash of each model (via toJSON) in the collection. |
|
| public |
Add a model at the beginning of a collection. |
|
| public |
Return an array of all the models in a collection that match the passed attributes. |
| Protected Methods | ||
| protected |
_prepareModel(attrs: object, options: object): * Prepare a hash of attributes (or other model) to be added to this collection. |
|
| protected |
_reset() Resets all internal state. |
Public Constructors
public constructor(models: Array<Model>, options: object) source
When creating a Collection, you may choose to pass in the initial array of models. The collection's comparator may be included as an option. Passing false as the comparator option will prevent sorting. If you define an initialize function, it will be invoked when the collection is created. There are a couple of options that, if provided, are attached to the collection directly: model and comparator.
Pass null for models to create an empty Collection with options.
Public Members
Public Methods
public add(models: Model | Array<Model>, options: object): * source
Add a model (or an array of models) to the collection, firing an "add" event for each model, and an "update" event afterwards. If a model property is defined, you may also pass raw attributes objects, and have them be vivified as instances of the model. Returns the added (or preexisting, if duplicate) models. Pass {at: index} to splice the model into the collection at the specified index. If you're adding models to the collection that are already in the collection, they'll be ignored, unless you pass {merge: true}, in which case their attributes will be merged into the corresponding models, firing any appropriate "change" events.
Note that adding the same model (a model with the same id) to a collection more than once is a no-op.
Return:
| * |
Example:
var ships = new Backbone.Collection;
ships.on("add", function(ship) {
alert("Ahoy " + ship.get("name") + "!");
});
ships.add([
{name: "Flying Dutchman"},
{name: "Black Pearl"}
]);
public at(index: number): * source
Get a model from a collection, specified by index. Useful if your collection is sorted, and if your collection isn't sorted, at will still retrieve models in insertion order.
Params:
| Name | Type | Attribute | Description |
| index | number | Index for model to retrieve. |
Return:
| * |
public clone(): Collection source
Returns a new instance of the collection with an identical list of models.
public create(attrs: Model, options: object): * source
Convenience to create a new instance of a model within a collection. Equivalent to instantiating a model with a hash of attributes, saving the model to the server, and adding the model to the set after being successfully created. Returns the new model. If client-side validation failed, the model will be unsaved, with validation errors. In order for this to work, you should set the model property of the collection. The create method can accept either an attributes hash or an existing, unsaved model object.
Creating a model will cause an immediate "add" event to be triggered on the collection, a "request" event as the new model is sent to the server, as well as a "sync" event, once the server has responded with the successful creation of the model. Pass {wait: true} if you'd like to wait for the server before adding the new model to the collection.
Return:
| * |
Example:
var Library = Backbone.Collection.extend({
model: Book
});
var nypl = new Library;
var othello = nypl.create({
title: "Othello",
author: "William Shakespeare"
});
public fetch(options: object): * source
Fetch the default set of models for this collection from the server, setting them on the collection when they arrive. The options hash takes success and error callbacks which will both be passed (collection, response, options) as arguments. When the model data returns from the server, it uses set to (intelligently) merge the fetched models, unless you pass {reset: true}, in which case the collection will be (efficiently) reset. Delegates to Backbone.sync under the covers for custom persistence strategies and returns a jqXHR. The server handler for fetch requests should return a JSON array of models.
The behavior of fetch can be customized by using the available set options. For example, to fetch a collection, getting an "add" event for every new model, and a "change" event for every changed existing model, without removing anything: collection.fetch({remove: false})
jQuery.ajax options can also be passed directly as fetch options, so to fetch a specific page of a paginated collection: Documents.fetch({data: {page: 3}})
Note that fetch should not be used to populate collections on page load — all models needed at load time should already be bootstrapped in to place. fetch is intended for lazily-loading models for interfaces that are not needed immediately: for example, documents with collections of notes that may be toggled open and closed.
Params:
| Name | Type | Attribute | Description |
| options | object | Optional parameters |
Return:
| * |
Example:
Backbone.sync = function(method, model) {
alert(method + ": " + model.url);
};
var accounts = new Backbone.Collection;
accounts.url = '/accounts';
accounts.fetch();
public findWhere(attrs: object): * source
Just like where
, but directly returns only the first model in the collection that matches the passed
attributes.
Params:
| Name | Type | Attribute | Description |
| attrs | object | Attribute hash to match. |
Return:
| * |
public get(obj: Model): * source
Get a model from a collection, specified by an id, a cid, or by passing in a model.
Params:
| Name | Type | Attribute | Description |
| obj | Model | An instance of a model to search for by object, id, or cid. |
Return:
| * |
Example:
var book = library.get(110);
public abstract initialize() source
Initialize is an empty function by default. Override it with your own initialization logic.
public modelId(attrs: object): * source
Override this method to specify the attribute the collection will use to refer to its models in collection.get. By default returns the idAttribute of the collection's model class or failing that, 'id'. If your collection uses polymorphic models and those models have an idAttribute other than id you must override this method with your own custom logic.
Params:
| Name | Type | Attribute | Description |
| attrs | object | Attributes hash |
Return:
| * |
Example:
var Library = Backbone.Collection.extend({
model: function(attrs, options) {
if (condition) {
return new PublicDocument(attrs, options);
} else {
return new PrivateDocument(attrs, options);
}
},
modelId: function(attrs) {
return attrs.private ? 'private_id' : 'public_id';
}
});
public parse(resp: object, options: object): object source
parse
is called by Backbone whenever a collection's models are returned by the server, in fetch. The function is
passed the raw response object, and should return the array of model attributes to be added to the collection.
The default implementation is a no-op, simply passing through the JSON response. Override this if you need to
work with a preexisting API, or better namespace your responses.
Example:
var Tweets = Backbone.Collection.extend({
// The Twitter Search API returns tweets under "results".
parse: function(response) {
return response.results;
}
});
public pluck(attr: string): * source
Pluck an attribute from each model in the collection. Equivalent to calling map and returning a single attribute from the iterator.
Params:
| Name | Type | Attribute | Description |
| attr | string | Attribute key |
Return:
| * |
Example:
var stooges = new Backbone.Collection([
{name: "Curly"},
{name: "Larry"},
{name: "Moe"}
]);
var names = stooges.pluck("name");
alert(JSON.stringify(names));
public pop(options: object): * source
Remove and return the last model from a collection. Takes the same options as remove.
Params:
| Name | Type | Attribute | Description |
| options | object | Optional parameters |
Return:
| * |
public push(model: Model, options: object): * source
Add a model at the end of a collection. Takes the same options as add
.
Return:
| * |
public remove(models: Model | Array<Model>, options: object): * source
Remove a model (or an array of models) from the collection, and return them. Each model can be a Model instance, an id string or a JS object, any value acceptable as the id argument of collection.get. Fires a "remove" event for each model, and a single "update" event afterwards. The model's index before removal is available to listeners as options.index.
Return:
| * |
public reset(models: Array<Model>, options: object): * source
Adding and removing models one at a time is all well and good, but sometimes you have so many models to change that you'd rather just update the collection in bulk. Use reset to replace a collection with a new list of models (or attribute hashes), triggering a single "reset" event at the end. Returns the newly-set models. For convenience, within a "reset" event, the list of any previous models is available as options.previousModels. Pass null for models to empty your Collection with options.
Calling collection.reset() without passing any models as arguments will empty the entire collection.
Here's an example using reset to bootstrap a collection during initial page load, in a Rails application:
Return:
| * |
Example:
<script>
var accounts = new Backbone.Collection;
accounts.reset(<%= @accounts.to_json %>);
</script>
public set(models: Array<Model>, options: object): * source
The set method performs a "smart" update of the collection with the passed list of models. If a model in the list isn't yet in the collection it will be added; if the model is already in the collection its attributes will be merged; and if the collection contains any models that aren't present in the list, they'll be removed. All of the appropriate "add", "remove", and "change" events are fired as this happens. Returns the touched models in the collection. If you'd like to customize the behavior, you can disable it with options: {add: false}, {remove: false}, or {merge: false}.
Return:
| * |
Example:
var vanHalen = new Backbone.Collection([eddie, alex, stone, roth]);
vanHalen.set([eddie, alex, stone, hagar]);
// Fires a "remove" event for roth, and an "add" event for "hagar".
// Updates any of stone, alex, and eddie's attributes that may have
// changed over the years.
public shift(options: object): * source
Remove and return the first model from a collection. Takes the same options as remove
.
Params:
| Name | Type | Attribute | Description |
| options | object | Optional parameters |
Return:
| * |
public slice(): * source
Return a shallow copy of this collection's models, using the same options as native Array#slice
.
Return:
| * |
public sort(options: object): Collection source
Force a collection to re-sort itself. You don't need to call this under normal circumstances, as a collection with a comparator will sort itself whenever a model is added. To disable sorting when adding a model, pass {sort: false} to add. Calling sort triggers a "sort" event on the collection.
Params:
| Name | Type | Attribute | Description |
| options | object | Optional parameters |
public sync(): * source
Uses Backbone.sync to persist the state of a collection to the server. Can be overridden for custom behavior.
Return:
| * |
public toJSON(options: object): object source
Return an array containing the attributes hash of each model (via toJSON) in the collection. This can be used to serialize and persist the collection as a whole. The name of this method is a bit confusing, because it conforms to JavaScript's JSON API.
Params:
| Name | Type | Attribute | Description |
| options | object | Optional parameters |
Example:
var collection = new Backbone.Collection([
{name: "Tim", age: 5},
{name: "Ida", age: 26},
{name: "Rob", age: 55}
]);
alert(JSON.stringify(collection));
public unshift(model: Model, options: object): * source
Add a model at the beginning of a collection. Takes the same options as add
.
Return:
| * |
public where(attrs: object, first: boolean): * source
Return an array of all the models in a collection that match the passed attributes. Useful for simple cases of filter.
Return:
| * |
Example:
var friends = new Backbone.Collection([
{name: "Athos", job: "Musketeer"},
{name: "Porthos", job: "Musketeer"},
{name: "Aramis", job: "Musketeer"},
{name: "d'Artagnan", job: "Guard"},
]);
var musketeers = friends.where({job: "Musketeer"});
alert(musketeers.length);
Protected Methods
protected _prepareModel(attrs: object, options: object): * source
Prepare a hash of attributes (or other model) to be added to this collection.
Return:
| * |
protected _reset() source
Resets all internal state. Called when the collection is first initialized or reset.


Russia says it will return captured naval ships to Ukraine on Monday
by Andrew Osborn, Andrey KuzminBy Andrew Osborn and Andrey Kuzmin
MOSCOW (Reuters) - Russia will return three captured naval ships to Ukraine on Monday and is moving them to a handover location agreed with Kiev, Crimea’s border guard service was cited as saying by Russian news agencies on Sunday.
A Reuters reporter in Crimea, which Russian annexed from Ukraine in 2014, earlier on Sunday saw coastguard boats pulling the three vessels through the Kerch Strait toward the Black Sea where they could potentially be handed over to Ukraine.
Ukraine has been pushing for their return as a good will gesture from Moscow ahead of a possible four-way peace summit on eastern Ukraine next month.
“In accordance with agreements reached with Ukraine three Ukrainian ships ... are being towed to a location agreed with the Ukrainian side for their handover, which will take place on Nov. 18,” Crimea’s border service said on Sunday, according to Russian news agencies.
Crimea’s border service was not immediately available for comment on Sunday.
Related Coverage
Russia seized the ships off the coast of Crimea in November last year after opening fire on them and wounding several sailors. Moscow said the ships - two small Ukrainian armored artillery vessels and a tug boat - had illegally entered its territorial waters. Kiev denied that.
Russia returned the sailors who had been on board the ships to Ukraine in September as part of a prisoner exchange deal.
Russia’s Kommersant newspaper reported on Saturday that Moscow had decided to return the ships to Ukraine and that they would be towed into the Black Sea and handed over to Ukraine.
Various Russian media outlets have reported that the ships will be returned to Ukraine without their ammunition and documentation.
The move, if it happens, will be seen as a confidence-building measure ahead of the planned Ukraine summit.
The leaders of France, Germany, Russia and Ukraine will meet in Paris on Dec. 9 in an attempt to advance efforts for a peaceful resolution to the conflict in eastern Ukraine, the French presidency said on Friday.
A Kremlin aide was less equivocal on Sunday, saying such a summit was possible this year but that no date had yet been agreed.
More than 13,000 people have been killed in the more than five-year-old conflict in east Ukraine between pro-Russian separatists and Ukrainian government forces.
Relations between Ukraine and Russia collapsed following Moscow’s annexation of the Crimean peninsula, which prompted Western sanctions. Ukrainian President Volodymyr Zelenskiy won a landslide election victory in April promising to end the conflict.


We are a startup company that focuses on the need for shinguard security in soccer. The shinbone is the most commonly fractured long-bone in the sport and body and is very valuable to the player. So, our goal is to tend to this need by focusing on the material compositon and design of the soccer sock, implementing a pocket and an important top slot feature that allows for maximum stability of the shinguard.