About a month ago, I released a “production ready” Redis cluster client library for Ruby. It is named Renoir and was pushed to rubygems.org: https://rubygems.org/gems/renoir.
It was surprising that there had been no reliable Redis Cluster client library for Ruby in spite of the fact that Redis 3.0 had been released about two years ago. In fact, there exist several implementations but their README always say like “this library is not yet production ready.” Because a reliable library are needed for my work, I tried to develop such a library, and now it would reach a certain degree of quality. This post gives a brief introduction to Renoir; a concept and current features are explained.
Renoir Example
For example, Renoir could be used like this:
require 'renoir'
rc = Renoir::Client.new(cluster_nodes: ['<IP_ADDRESS>:30001'])
p rc.set('hoge', 123, nx: true) # keyslot is 1525
p rc.zrange('fuga', 0, -1, with_scores: true) # keyslot is 9097
Suppose that a Redis cluster is running and one of the cluster nodes is listening the port 30001 on the local host. The initializer of Renoir::Client
takes at least an address of a node in a cluster and remaining node addresses will be automatically retrieved. In this example, SET
and ZRANGE
commands are sent to the cluster. Because the keys for these commands have different “keyslots”, each command have to be sent to different nodes unless those keyslots are assigned to same node. But you don’t need to worry about that here because the primary job of Renoir is to manage such directions automatically.
You may notice that the methods and arguments of Renoir::Client
are same as the redis gem. So it is! Renoir is designed to provide compatible interface with the redis gem. Thus you can communicate with a Redis cluster as well as communicating with single Redis server by the redis
gem.
If you would like to test this code, execute gem install renoir
and create a Redis cluster on local machine with a node listening port 30001 (the official create-cluster
script is useful to create such a cluster).
Features
Handling MOVED/ASK redirections
Of course, this is the main feature. User can send commands to Redis cluster in a similar manner as sending ones to a single Redis instance because Renoir catches MOVED/ASK redirection responses and resend commands to an appropriate node automatically. Note that the number of redirections can be limited by max_redirection
option to prevent too many redirections.
Maintaining cluster information
Renoir maintains information of a cluster. In particular, keyslots assignment information is important because a target node, which holds a key(slot) of a command, could be determined without sending request, i.e., probability of redirection and then latency are dramatically reduced. Although master/slave information is available, all commands are sent to only master nodes and there is no plan to support slaves so far.
Validating singleness of command keyslots
Renoir checks whether keyslots of keys in a command are all the same before sending and the command fails if it is not. This is fine because sending a command accessing multi-keyslots is useless. Besides, Renoir basically refuses a command without a key because a target node is unknown. Sending a command to all nodes could be an option but it would be scary to use because request timing is uncontrollable by user. Instead, Renoir::Client#each_node
method could be used to send no-key commands in more controllable way, like this:
keys = rc.each_node.flat_map do |node| # node is a `::Redis` instance
sleep 0.01
node.keys('test_*')
end
rc.each_node(&:bgsave)
Supporting transaction and command pipelining
Renoir::Client#multi
and #pipelined
could be used for transaction and command pipelining:
rc.multi do |tx|
tx.set('hoge{1}', 123)
tx.get('hoge{1}')
tx.get('fuga{1}')
end
rc.pipelined do |pipeline|
pipeline.set('hoge{1}', 123)
pipeline.get('hoge{1}')
pipeline.get('fuga{1}')
end
The commands will be sent to a node only if all keyslots of the commands are same. Hence it is highly recommended to use keys hash tags.
Unfortunately, these commands are not well compatible with the ones of the redis
gem; a return value of a command inside the block is useless because a “future” variable is not yet supported. All responses are returned as a return value of #multi
/#pipelined
, though.
This gem has been used at my work for a messaging delivery system which handles millions of requests in a minute and it works very well so far. But it lacks real world examples. So it would be greatly appreciated if you could use it!
The source code is available on GitHub: https://github.com/saidie/renoir and documentation is also available: http://www.rubydoc.info/gems/renoir.
Future work
- Support “future” variables in
#multi
and#pipelined
- Add a connection adapter for the
redic
gem
Acknowledgment
My code is originated to the first reference implementation by antirez.
comments powered by Disqus


---
layout: default
title: Dynamic Tensor Rematerialization
---
Dynamic Tensor Rematerialization(DTR)
Marisa Kirisame, Steven Lyubomirsky, Altan Haan, Jennifer Brennan, Mike He, Jared Roesch, Tianqi Chen, Zachary Tatlock
DTR:
- Is a very simple Tensor Level Runtime Cache
- Save GPU memory for DNN training by recomputing result when needed.
- Save 3x memory for 20% extra compute time!
- Due to the simplicity, can be easily implemented into different deep learning framework.
Technical Dive
- Gradient Checkpointing is a technique to save memory for Deep Neural Network training.
- Or more generally, for reverse-mode automatic differentiation.
- However, memory planning is np-complete.
- Checkpointing also has to deal with program with arbitary control flow.
- To combat this, previous work made different restriction which sacrifice performance or usability.
- Some works models the program as a stack machine with no heap...
- And suffers performance degradtion when the assumption is broken!
- (For example, NN with highway connection/branching).
- Other works use an ILP solver, which consume lots of time to find the optimal memory planning.
- And can only be used for program/framework without control flow, posing problem for real world adoption.
- Additionally, gradient checkpointing couple derivative calculation, with memory saving by recomputing.
- This add complexity and limit applications range.
- DTR tackle the problems above by planning the memory greedily at runtime, instead of as a compiler pass.
- This solves the control flow and stack machine issue, as we do not model the program in anyway!
- However, with a novel cache eviction policy, we are still able to achieve great performance.
Adoption:
MegEngine


How To Play The Game
Your goal is first to collect the five keys. Three of them can be found, two
of them are given to you by specific characters if you can get their karma
high enough when talking to them. Try and choose replies that you think will
result in an increase in their karma. You will not always be right!
Each key opens a specific door for each artifact. How to identify a door is
up to you to figure out! It isn't as obvious as it seems! It is also up to
you to determine which key goes with which door (but, you will not have to
select a key... as long as you have a key in inventory, that is good enough).
Use the arrow keys to move. Note that you will not be able to reach the very
edges of the maps, you will be stopped a few spaces before it.
Press the A key to switch between Attack mode (red border) and Talk mode
(blue border). When in Attack mode, you will attack any character you come
into contact with. When in Talk mode, you will talk to any non-belligerent
character who's language you can speak.
Contact with a character triggers battle or talking (if you can speak the
character's language).
Press the W key to switch weapons. You will be presented with a list of
the weapons you have. Press the appropriate key shown, or spacebar to cancel.
Press the C key to cast a spell. You will be presented with a list of the
spells you have. Press the appropriate key shown, or speacebar to cancel.
Press the I key to see your inventory. Press spacebar when done. This cannot
be done in battle or when talking to a character.
Press the P button to pick up an item (gold, key, artifact, health or spell
scroll). You must be standing on top of it.
Press E to enter a community (castle, town or village). You must be standing
on it.
Press S to save your game. This cannot be done in battle or when talking to
a character. To continue your game later, from the title screen, enter the
name of your player, and click Continue Game. Note that the name must match
exactly what you entered when you started the game (except for case, which
will be ignores).
Press H to see a help screen.
When in battle, press F to fire a projectile weapon. You must have
previously switched to a projectil weapon (slingshot or crossbow).
To quit the game, simply close the window. However, note that your progress
IS NOT automatically saved! If you do not save first, too bad for you!
Note that whenever battle or a conersation with a character ends, that
character is randomly placed elsewhere on the map, so you will not be able
to immediately engage them again.
In each of the two towns you will find a store. To enter the store, simply
step onto the tiles directly in front of it. You will be presented with
a menu where you can select items to purchase, if you have enough gold of
course! Press spacebar to exit the store.
One word of caution: it is possible to kill the keymasters before they have
given you their key, in which case the game is unwinnable. More importantly,
Mallizant has booby-trapped them to explode with magical force when killed (if
they are still in posession of the key), which means that if they go, you go!
So, don't attack any being unless you are sure they are not a keymaster!
Finally, you should be familiar with the things you will encounter as you
explore Xandor...
Here is a summary of the tiles you will encounter:
Boulder (you cannot walk on this)
Bridge
Castle Faldon (must be standing in middle to enter)
Thick forest (you cannot walk on this)
Thin forest
Grass
Thick mountains (you cannot walk on this)
Thin mountains
Swamp (this saps 1 unit of health per move)
The town of Rallador
The town of Triyut
The unnamed village
Deep water (you cannot walk on this)
Shallow water (you cannot walk on this)
Here is a summary of the items you can pick up:
Gold
Health
Blue key
Green key
Red key
Silver key
Yellow key
Spell scroll
Here is a summary of the five artifacts you must retrieve:
The Ankh
The Medallion of the Sun
The Scroll of Life
The Crystal Skull
The Staff of Tiuwahha
Here is a summary of the characters you will encounter, and whether you can
talk to them or not, and whether they will always attack you (belligerent)
or not:
Demon (cannot talk to them, always belligerent)
(can talk to them, sometimes belligerent)
(can talk to them, never belligerent)
(can talk to them, never belligerent)
(cannot talk to them, sometimes belligerent)
(cannot talk to them, aways belligerent)
(can talk to them, sometimes belligerent)
(can talk to the, sometimes belligerent)
That's it. Have fun!


Dr Haeri is a Senior Lecturer in the Mechanical and Aerospace Engineering department at University of Edinburgh. Prior to this, he was Lecturer at Strathclyde University. He also is a member of Institute of Mechanical Engineers (MIMechE) and a Fellow of Higher Education Academy (FHEA). He is an expert in fluid flow computer simulations with application to fundemtal and industrial problems. He has formal training both in Engineering (PhD University of Southampton, MSc with Distinction) and Computer Science (MSc with Distinction, University of Warwick). He has a track record in simulation of particulate and granular flows, turbulence modelling external flows. He has collaborations with DEM Solution and has previously worked with Victrex, Vestas UK and Rolls-Royce (through EPSRC Projects).


max_waitedit
This setting is used by the allocation, cluster_routing, reindex, replicas, restore, and snapshot actions.
This setting must be a positive integer, or -1
.
This setting specifies how long in seconds to wait to see if the action has completed before giving up. This option is used in conjunction with wait_interval, which is the number of seconds to wait between checking to see if the given action is complete.
The default value for this setting is -1
, meaning that Curator will wait
indefinitely for the action to complete.
action: allocation description: "Apply shard allocation filtering rules to the specified indices" options: key: ... value: ... allocation_type: ... wait_for_completion: True max_wait: 300 wait_interval: 10 filters: - filtertype: ...
action: cluster_routing description: "Apply routing rules to the entire cluster" options: routing_type: value: ... setting: enable wait_for_completion: True max_wait: 300 wait_interval: 10
actions: 1: description: "Reindex index1 into index2" action: reindex options: wait_interval: 9 max_wait: -1 request_body: source: index: index1 dest: index: index2 filters: - filtertype: none
action: replicas description: >- Set the number of replicas per shard for selected indices to 'count' options: count: ... wait_for_completion: True max_wait: 600 wait_interval: 10 filters: - filtertype: ...
actions: 1: action: restore description: Restore my_index from my_snapshot in my_repository options: repository: my_repository name: my_snapshot indices: my_index include_global_state: False wait_for_completion: True max_wait: 3600 wait_interval: 10 filters: - filtertype: state state: SUCCESS exclude: - filtertype: ...
action: snapshot description: >- Snapshot selected indices to 'repository' with the snapshot name or name pattern in 'name'. Use all other options as assigned options: repository: my_repository name: my_snapshot include_global_state: True wait_for_completion: True max_wait: 3600 wait_interval: 10 filters: - filtertype: ...


KochiOrgBook Sub Projects
KochiOrgBook Association Wallet (KOBAW)
KochiOrgBook is an instance of OrgBook. It is a Credential Registry where VCs of associations under a particular jurisidction are stored in a decentralised manner. It is also referred to as the association wallet. It comes with a front end where user's can search for the registered associations or about a particular credential.
KOBConnect
KOBConnect is the digital wallet application. The users can use it to store credentials and can access these stored credentials with ease. The wallet application is going to come with basic set of authentication to provide security for the user.
KOBRegistry
Verifiable Credential Registry(VCR) is going to reside in the KOBRegistry. It is going to mediate the creation and verification of issuer identifiers, keys and other relevant data like verifiable credential schemas and revocation registries.
KOBDflow
It is the decentralized workflow application for KOB. It provides a mechanism to consume various services available. It gives the user's a pictorial view on how a particular credential can be achieved.
KOBman
KOBman utility helps one to create a development environment with ease. KOBman provides each environment bundled with their dependencies so that programmers can focus on their development work.
KOBVON
It is the Verifiable Organisations Network for the city of Kochi. It helps to establish a better way to find, issue, store and share trustworthy data about organizations.
KOB Phone number verification service
A user can avail this service to get a verified digital credential for their phone number stating the ownership of the user over his/her phone number. It means that you can prove the phone number, that you share to avail services, is used by you and no one else. The credential will be stored in the user's wallet application and the user will have complete control over his/her credential.
KOB Address verification service
A user can avail this service to get a digital credential proving their domicile. It proves that you are a person living in a particular place. It can be useful when the user has to provide his/her address for availing other services. The credential will be stored in the user's wallet application and the user will have complete control over this credential.
KOB Email verification service
Users can avail this service to get a digital credential proving the ownership of their email-id. This credential helps the users to prove that the email-id is being controlled by the user and no one else. This can be used when you provide your email-id to avail services. The credential will be stored in the user's wallet application and the user will have complete control over the credential.
KochiOrgBook Public Identity Utility (KOBPIU)
KochiOrgBook Public Identity Utility is the underlying identity network. All the DIDs will be hosted upon the identity network. The identity utility network is similar to that of Sovrin network. The difference is that, KOBPIU is focused for the city of Kochi. KOBPIU maps to the ToIP Technical Stack Layer 1.
KochiOrgBook Community Cloud (KOBCC)
KOBCC is a cloud platform where any association within the city of Kochi, who does not have the necessary infrastructure to host a node, can avail the same service from a third-party who is registered with the KochiOrgBook.
KOBSearch
KOBSearch is a search service for KochiOrgBook. Any user registered with KOB can avail this service and search for Associations registered in KOB, any credential, a public DID and can also search for entities within any association with necessary permissions.
The search can be done at three level,
- Ledger Level - A user can search for a public DID.
- Wallet Level - A user can search for any Associations registered with KOB.
- VCR Level - A user with necessary permissions can search at the Association's VCR for entities registered with that Association.


|
C++ Actor Framework 0.19
|
An "owning" pointer to an actor shell in the sense that it calls quit()
on the shell when going out of scope.
More...
#include <typed_actor_shell.hpp>
Public Types | |
| using | handle_type = typed_actor< Sigs... > |
| using | element_type = typed_actor_shell< Sigs... > |
Public Member Functions | |
| constexpr | typed_actor_shell_ptr (std::nullptr_t) noexcept |
| typed_actor_shell_ptr (typed_actor_shell_ptr &&other) noexcept=default | |
| typed_actor_shell_ptr & | operator= (typed_actor_shell_ptr &&other) noexcept=default |
| typed_actor_shell_ptr (const typed_actor_shell_ptr &other)=delete | |
| typed_actor_shell_ptr & | operator= (const typed_actor_shell_ptr &other)=delete |
| handle_type | as_actor () const noexcept |
| Returns an actor handle to the managed actor shell. | |
| void | detach (error reason) |
| element_type * | get () const noexcept |
| element_type * | operator-> () const noexcept |
| element_type & | operator* () const noexcept |
| bool | operator! () const noexcept |
| operator bool () const noexcept | |
Friends | |
| template<class Handle > | |
| actor_shell_ptr_t< Handle > | make_actor_shell (actor_system &, async::execution_context_ptr) |
| Creates a new actor_shell and registers it at the actor system. | |
An "owning" pointer to an actor shell in the sense that it calls quit()
on the shell when going out of scope.


Autocomplete for django models. Form widgets and admin integration examples.
Simple install into a virtualenv:
$ pip install git+https://github.com/darrylcousins/django-autocomplete.git
Get the test project from github:
$ git clone https://github.com/darrylcousins/django-project.git
$ cd django-project
The test project uses django-bootstrap3 and bootstrapped3 admin. these extra packages can be installed with:
$ pip install -r requirements.txt
The test project has some tests:
$ python manage.py test project
The tables and sample data can be installed with:
$ python manage.py migrate
$ python manage.py loaddata project/fixtures/project.json
And can be run with:
$ python manage.py runserver 9000
There are no urls beyond the admin screens and api json views. It attempts to demonstrate the autocomplete widgets. All models demonstrate some aspect of the widgets.
To set up models to use the autocomplete widgets they need to have a api view that will return json which is a list of the items filtered by the request variable term, which itself is the default search variable sent with request by the jqueryui autocomplete widget.
The design decision of this package is to have configuration made at the model level:
>>> class MyModel(models.Model):
... autocomplete = AutocompleteMeta(
... name=name,
... path='api/filter/mymodel'
The meta model has other attributes that may be set.
Permissions may be set for the autocomplete in three ways. As a boolean, if true then the request user must be authenticated, if a string then the single permission is checked, if a list then the user must have all permissions in the list (see has_perms).
The default is None:
... permissions=True, # user must be authenticated
... permissions='is_staff', # user must have permission is_staff
... permissions=['is_staff'], # user must have all permissions in list of permissions
The default is to filter on all Char and Text fields but the developer can define the fields to search on:
... fields=['name', 'description'],
The default behaviour is to also search on searchable fields in the models related by ForeignKey, but this can be disabled:
... follow_fks=False,
... )
Note
setting an attribute autocomplete that is an instance of django_autocomplete.meta.AutocompleteMeta is required for each model chosen to use autocomplete widgets.
As can be seen above, each model sets its path to the api view. In order for these views to be created set the following in urls.py:
url(r'', include('django_autocomplete.urls')),
Note
do not use a prefix (e.g. r’api/’) as only the path set by MyModel.autocomplete.path is used.
Once this is done then the view (following the MyModel example) /api/filter/mymodel/ will be available to the autocomplete widgets:
http://localhost:8000/api/filter/mymodel/?term=se
The view used to answer the get request is django_autocomplete.views.AutocompleteView. This view has its own search method but the developer can provide a custom search method for the autocomplete. From the django_autocomplete.views.AutocompleteView:
// the developer can implement own search method
if hasattr(self.model.objects, 'search'):
queryset = self.model.objects.search(
self.model.objects.all(),
self.request,
[term])
else:
queryset = self.search(
self.model.objects.all(),
[term])
The only examples found in the example project hooks the widgets into the bootstrapped3 admin. To use the widgets all that is required in most cases is to set formfield_overrides:
class MyModelAdmin(admin.ModelAdmin):
formfield_overrides = {
models.ForeignKey: {'widget': AutocompleteSelectWidget},
models.ManyToManyField: {'widget': AutocompleteSelectMultipleWidget},
}
Equally so for inlines formsets:
class MyModelInline(admin.TabularInline):
formfield_overrides = {
models.ForeignKey: {'widget': AutocompleteSelectWidget},
models.ManyToManyField: {'widget': AutocompleteSelectMultipleWidget},
}
AutocompleteSelectMultipleWidget can also be used in reverse many to one relationships but an admin form will be required. See project.forms.CountryModelForm for an example.
Note
For inlines the template dmin/inlines/inline_tabular.html has been altered to hook the widgets into the javascript.
There is a autocomplete widget for generic content types. Simplest implementation is as above:
class TaggedItemAdmin(admin.ModelAdmin):
model = TaggedItem
formfield_overrides = {
models.ForeignKey: {'widget': AutocompleteCTWidget},
}
But some assumptions are made, namely the object_id is assumed to be name object_id. More finely grained implementation will use formfield_for_foreignkey:
def formfield_for_foreignkey(self, db_field, request, **kwargs):
if db_field.rel.to == ContentType:
kwargs['widget'] = AutocompleteCTWidget
kwargs['widget'].object_field = 'object_id'
return super(TaggedItemAdmin, self).formfield_for_foreignkey(db_field, request, **kwargs)
Although untested it should allow for a different name for the object_id field and for models with more than one GenericForeignKey.
It has not been tested for inline forms but there is an example of usage in django-project.
django_autocomplete.widgets.SearchInput can be used in the bootstrapped3 admin list views to provide autocomplete search for autocomplete enabled models. On selection in the autocomplete the change form view is displayed. The standard search form is then also included which abides by the ModelAdmin.search_fields to filter the list.
This must be explicitly configured in the ModelAdmin:
from django_autocomplete.forms import searchform_factory
class MyModelAdmin(admin.ModelAdmin):
model = MyModel
search_form = searchform_factory(MyModel)
Note
The template admin/search_form.html tests for the presence of the attribute model_admin.search_form and renders the form if defined.
Each of the widgets need to be aware of the model they are searching. Thus they have access to the autocomplete attribute of the model. The example form projects.forms.SearchForm provides and example of setting up a form to be model aware. It closely follows the django ModelForm to do so.


Foster boy, 14, 'raped' and tortured girl, 6, to death while babysitting
A 14 year-old foster child reportedly raped then tortured a six year-old girl to death after being left to babysit.
Antonio Evans attacked Destine King and her siblings, a seven year-old girl and nine year-old boy, in Memphis, Tennessee, in December 2015.
All three of his victims were also in foster care at the time.
Evans, who is now 18, admitted adult charges of second-degree murder and aggravated child abuse on Friday.
He was originally also charged with rape of a child under eight, although that charge was later dropped, with Evans now jailed for 30 years.
Evans punched, kicked, slapped and whipped his victims while his foster mom was at work, with Destine vomiting and passing out after three days of abuse.
Advertisement Advertisement
Police were called to the family’s home, with Destine taken to hospital, where she died five days later.

Both suffered severe bruising on their faces and across their bodies.
Evans was being fostered by Destine’s older sister at the time of the killing.
Her siblings were removed from their home and placed in another foster home after being treated for their injuries.
Speaking at his daughter’s funeral, Destine’s distraught dad Trevin King told the Commercial Appeal: ‘I just miss her so much.
‘We just had fun all the time and she was just so happy and wonderful.’

‘I just wanted to say how much we are going to miss her as part of the family for the short time that we got to be with her.’


Successfully verified *Yeah*
You can start using the app.
Could not verify your registration.
Please retry or contact the adminstrator./
Login


Howdy! Here's a list of awesome computer scientists. Do you know any others? Add to the list yourself.
ABOUT (normal) ADMIN (deep url) ADMIN TRANSLATE (test lazy load)
DE EN


| 2015-03-14 09:08 UTC+08 |
Warning
|
It's a very looooooooooooooooooooooong warning |
| 2015-03-15 09:08 UTC+08 |
Comment
|
It's a very looooooooooooooooooooooong comment |
| 2015-03-16 19:28 UTC+08 |
Error
|
It's a very looooooooooooooooooooooong error |
| 2015-03-16 21:28 UTC+08 |
Info
|
It's a very looooooooooooooooooooooong info |
| 2015-03-16 21:28 UTC+08 |
Info
|
It's a very looooooooooooooooooooooong info |
| 2015-03-14 09:08 UTC+08 |
Warning
|
It's a very looooooooooooooooooooooong warning |
| 2015-03-14 09:08 UTC+08 |
Warning
|
It's a very looooooooooooooooooooooong warning |
| 2015-03-16 19:28 UTC+08 |
Error
|
It's a very looooooooooooooooooooooong error |
| 2015-03-16 21:28 UTC+08 |
Info
|
It's a very looooooooooooooooooooooong info |


The 5 at 5: Thursday
Five minutes, five stories, five o’clock…
by Garreth MacNameeEVERY WEEKDAY EVENING, TheJournal.ie brings you the five biggest stories of the day.
1. #ROSSLARE: Gardaí and emergency services have boarded a ferry at Rosslare Port in which 16 people were found in the back of a truck.
2. #BONUS: The Christmas bonus for social welfare recipients is set to be paid out in the first week of December.
3. #KEVIN LUNNEY: Gardaí have made a total of four new arrests in relation to the abduction of Quinn Industrial Holdings director Kevin Lunney.
4. #JAB AND BLOCK: The HSE has urged vulnerable groups to get vaccinated after new data showed that the annual flu season is expected to arrive within weeks.
5.


Gold Leaf Tree Services Pty Ltd provides you with professional and personalised tree services at a competitive cost.
Gold Leaf Tree Services aim to have a lasting relationship with you and provide regular, accurate and honest advice that is easy to understand.
We provide quality workmanship and keep on top of the latest developments in arboriculture to provide you with solutions so you receive optimum value from your trees.
Our services include:


HR system
Add Employee
Name
Email
Department
Call-Center
Information-Technology
Human-Resources
Name
Email
Department
Salary


Order Here
Choose your Pizza size:
Small (10")
Medium (12")
Large (15")
Choose Toppings:
Pepperoni
Mushroom
Onions
Sausage
Bacon
Order Pizza
Epicodus Pizza
1
TAX
$
Total: $
Thanks for ordering from Epicodus Pizza!
Order Again


You can use 3 typical testing flows for REDIRECT and EMBEDDED SCA approaches with Swagger.
To open Swagger page of XS2ASandbox locally start all the services with docker command from Getting Started. After starting all the services, go to your local XS2A Interface Swagger Page
To open Swagger page on the cloud follow this link.


[gecode-users] Initialize IntVArArgs from variable array a
peter Tomson
pikapikanaoufel at gmail.com
Wed Oct 2 05:21:34 CEST 2013
hi all !
in my model i have to get the interger variables from a vector , So i used
this code that i found in MPG :
IntVarArgs (const std::vector< IntVar > &a);
but i have an error about the const : type name not allowed!!!!!!!!!!
honnestly i declared an IntVarArray R, after that i wrote that code, So do
i do any thing wrong ??? Do i mis ay thing ??
Thank you very much for your hepl
PETER
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20131002/82f1a6bd/attachment.html>
More information about the users
mailing list


WY – Sen. John Barrasso (R) and Sen. Michael B. Enzi (R)
Committees
John Barrasso is the #2 Republican on the Senate Committee on Energy and Natural Resources
HEP Grants
In the past 9 years, this state has received: 2 HEP grants, totalling $205,000
Year Institution Amount ($)
------ --------------------- ------------
2019 University of Wyoming 0
2018 University of Wyoming 205,000
SC Contracts
This state received no SC contracts from 2012-2020
NSF MPS Grants
In the past 9 years, this state has received: 56 NSF MPS grants, totalling $10,231,721
Year Institution Amount ($)
------ --------------------- ------------
2020 University Of Wyoming 31,000
2019 University Of Wyoming 767,905
2018 University Of Wyoming 1,733,969
2017 University Of Wyoming 767,973
2016 University Of Wyoming 1,345,655
2015 University Of Wyoming 546,600
2014 University Of Wyoming 2,483,679
2013 University Of Wyoming 1,166,598
2012 University Of Wyoming 1,388,342
SULI/CCI Interns
From 2014-2018, this state had 9 SULI/CCI interns
# Interns Program College
----------- --------- ---------------------------------
8 SULI University of Wyoming
1 CCI Western Wyoming Community College
9 — — Back to top
WY-00 – Rep. Liz Cheney (R) – Wikipedia
HEP Grants
In the past 9 years, this district has received: $205,000 in SC HEP grants.
Institution Amount ($) Start End Principal Investigator Project Title
--------------------- ------------ ------- ----- ------------------------ ----------------------------------------------------------------------
University of Wyoming 205,000 2018 2020 Myers, Adam EBOSS AND DESI: LSS CATALOGS, TARGETING AND SPECTROSCOPIC CONTAMINANTS
SC Contracts
This district received no SC contracts from 2012-2020
NSF MPS Grants
In the past 9 years, this district has received: $10,231,721 in NSF MPS grants.
Year Institution Amount ($)
------ --------------------- ------------
2020 University Of Wyoming 31,000
2019 University Of Wyoming 767,905
2018 University Of Wyoming 1,733,969
2017 University Of Wyoming 767,973
2016 University Of Wyoming 1,345,655
2015 University Of Wyoming 546,600
2014 University Of Wyoming 2,483,679
2013 University Of Wyoming 1,166,598
2012 University Of Wyoming 1,388,342
SULI/CCI Interns
From 2014-2018, this district had 9 SULI/CCI interns
Term Name College Host Lab Program
----------- ------------------------------ --------------------------------- -------------------------------------- ---------
Summer 2018 Olivia Terry University of Wyoming Lawrence Berkeley National Laboratory SULI
Summer 2016 Alexandra Elise Garcia Poulsen University of Wyoming Idaho National Laboratory SULI
Summer 2016 Jonathan Pullum University of Wyoming Idaho National Laboratory SULI
Summer 2015 John Brouwer University of Wyoming Idaho National Laboratory SULI
Summer 2014 Christopher Meadows University of Wyoming Lawrence Livermore National Laboratory SULI
Summer 2014 Steven Levesque University of Wyoming Idaho National Laboratory SULI
Summer 2014 Katherine Miranda Bobo Western Wyoming Community College Idaho National Laboratory CCI
Spring 2015 Talysa Stockert University of Wyoming National Renewable Energy Laboratory SULI
Spring 2014 Hunter Weston Storaci University of Wyoming Lawrence Livermore National Laboratory SULI


Rich HTML email in Spring with Thymeleaf
In this article we will show how to use Thymeleaf templates for composing email messages of several kinds, and we will integrate this with Spring’s email utilities in order to configure a simple but powerful email system.
Note that, although this article —and the corresponding example app— uses the Spring Framework, Thymeleaf can also be used for processing email templates in an application without Spring.
Prerequisites
This article assumes you are familiar with both Thymeleaf and Spring 4. We will not dive into Spring Mail details, for further information please take a look at the Email chapter at the Spring Documentation.
Example application
All the code in this article comes from a working example application you can download from the documentation page or from github. Downloading this application, executing it and exploring its source code is highly recommended (note that you will have to configure your SMTP user name and password at configuration.properties
).
Sending email with Spring
First, you need to configure a Mail Sender object in your Spring configuration, as in the following code (your specific configuration needs might differ):
@Bean
public JavaMailSender mailSender() throws IOException {
Properties properties = configProperties();
JavaMailSenderImpl mailSender = new JavaMailSenderImpl();
mailSender.setHost(properties.getProperty("mail.server.host"));
mailSender.setPort(Integer.parseInt(properties.getProperty("mail.server.port")));
mailSender.setProtocol(properties.getProperty("mail.server.protocol"));
mailSender.setUsername(properties.getProperty("mail.server.username"));
mailSender.setPassword(properties.getProperty("mail.server.password"));
mailSender.setJavaMailProperties(javaMailProperties());
return mailSender;
}
private Properties configProperties() throws IOException {
Properties properties = new Properties();
properties.load(new ClassPathResource("configuration.properties").getInputStream());
return properties;
}
private Properties javaMailProperties() throws IOException {
Properties properties = new Properties();
properties.load(new ClassPathResource("javamail.properties").getInputStream());
return properties;
}
Note that the previous code is getting the configuration from the properties files configuration.properties
and javamail.properties
on your classpath.
Spring provides a class called MimeMessageHelper
to ease the creation of email messages. Let’s see how to use it together with our mailSender
.
final MimeMessage mimeMessage = this.mailSender.createMimeMessage();
final MimeMessageHelper message = new MimeMessageHelper(mimeMessage);
message.setFrom("sender@example.com");
message.setTo("recipient@example.com");
message.setSubject("This is the message subject");
message.setText("This is the message body");
this.mailSender.send(mimeMessage);
Thymeleaf HTML email templates
Using Thymeleaf for processing our email templates would allow us to use some interesting features:
- Expressions in Spring EL.
- Flow control: iterations, conditionals, …
- Utility functions: date/number formatting, dealing with lists, arrays…
- Easy i18n, integrated with our application’s Spring internationalization infrastructure.
- Natural templating: our email templates can be static prototypes, written by UI designers.
- etc…
Also, given the fact that Thymeleaf has no dependencies on the servlet API, there would be no need at all to create or send this HTML email from a web application. The techniques explained here could be used with little or no change in a standalone application with no web UI.
Our goals
Our example application will be sending four types of emails:
- Simple HTML (with internationalized greeting).
- HTML text with an attachment.
- HTML text with an inline image.
- HTML text edited by the user.
Spring configuration
In order to process our templates, we will need to configure our TemplateEngine
in our Spring configuration:
/**
* THYMELEAF: View Resolver - implementation of Spring's ViewResolver interface.
*/
@Bean
public ViewResolver viewResolver() {
ThymeleafViewResolver viewResolver = new ThymeleafViewResolver();
viewResolver.setTemplateEngine(templateEngine());
return viewResolver;
}
/**
* THYMELEAF: Template Engine (Spring4-specific version).
*/
@Bean
public SpringTemplateEngine templateEngine() {
SpringTemplateEngine templateEngine = new SpringTemplateEngine();
templateEngine.addTemplateResolver(emailTemplateResolver());
templateEngine.addTemplateResolver(webTemplateResolver());
return templateEngine;
}
/**
* THYMELEAF: Template Resolver for email templates.
*/
private TemplateResolver emailTemplateResolver() {
TemplateResolver templateResolver = new ClassLoaderTemplateResolver();
templateResolver.setPrefix("/mail/");
templateResolver.setTemplateMode("HTML5");
templateResolver.setOrder(1);
return templateResolver;
}
/**
* THYMELEAF: Template Resolver for webapp pages.
*/
private TemplateResolver webTemplateResolver() {
TemplateResolver templateResolver = new ServletContextTemplateResolver();
templateResolver.setPrefix("/WEB-INF/templates/");
templateResolver.setTemplateMode("HTML5");
templateResolver.setOrder(2);
return templateResolver;
}
Note that we have configured two template resolvers for our engine: one for the email templates —which come from our resources directory and therefore are loaded by a ClassLoaderTemplateResolver
— and another one for the web templates that support the example application itself —which loads its templates from the servlet context, as most Spring web applications do.
Of course, if we were creating a non-web application, we would not need either the webTemplateResolver
or the viewResolver
beans at all.
Executing the Template Engine
At some point in our code, we will need to execute our template engine in order to create the text of our messages. We have chosen to do this in an EmailService
class, so that it stays clear that we consider this a responsibility of our business layer (and not the web layer).
As usual in Thymeleaf, before executing we will need to populate a context containing all the variables we want to use during template execution. Given the fact that our email processing is not web-dependent, an instance of Context
will do:
final Context ctx = new Context(locale);
ctx.setVariable("name", recipientName);
ctx.setVariable("subscriptionDate", new Date());
ctx.setVariable("hobbies", Arrays.asList("Cinema", "Sports", "Music"));
ctx.setVariable("imageResourceName", imageResourceName); // so that we can reference it from HTML
final String htmlContent = this.templateEngine.process("email-inlineimage.html", ctx);
Our email-inlineimage.html
is the template file we will use for sending emails with an inlined image, and it looks like:
<!DOCTYPE html>

<title th:remove="all">Template for HTML email with inline image</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

Hello, Peter Static!

 10}">
Wow! You've got a long name (more than 10 chars)!

You have been successfully subscribed to the Fake newsletter on
28-12-2012

Your hobbies are:

Reading

Writing

Bowling

You can find your inlined image just below this text.

Regards,

The Thymeleaf Team

Let’s remark some points:
- The former template is fully WYSIWYG; you can check how it looks just by opening it with your browser. That’s much better than sending an email to see the result, isn’t it?
- We can use all Thymeleaf features. Here for example we have used i18n with a parameterized
#{...}
expression,th:each
to iterate over a list,#dates
to format a date… - The
img
element has a hardcodedsrc
value —nice for prototyping—, which will be substituted at runtime by something likecid:image.jpg
matching the attached image filename.
Putting it all together
The service class
Finally, let’s see how the method executing this email template at our EmailService
service class would look like:
public void sendMailWithInline(
final String recipientName, final String recipientEmail, final String imageResourceName,
final byte[] imageBytes, final String imageContentType, final Locale locale)
throws MessagingException {
// Prepare the evaluation context
final Context ctx = new Context(locale);
ctx.setVariable("name", recipientName);
ctx.setVariable("subscriptionDate", new Date());
ctx.setVariable("hobbies", Arrays.asList("Cinema", "Sports", "Music"));
ctx.setVariable("imageResourceName", imageResourceName); // so that we can reference it from HTML
// Prepare message using a Spring helper
final MimeMessage mimeMessage = this.mailSender.createMimeMessage();
final MimeMessageHelper message =
new MimeMessageHelper(mimeMessage, true, "UTF-8"); // true = multipart
message.setSubject("Example HTML email with inline image");
message.setFrom("thymeleaf@example.com");
message.setTo(recipientEmail);
// Create the HTML body using Thymeleaf
final String htmlContent = this.templateEngine.process("email-inlineimage.html", ctx);
message.setText(htmlContent, true); // true = isHtml
// Add the inline image, referenced from the HTML code as "cid:${imageResourceName}"
final InputStreamSource imageSource = new ByteArrayResource(imageBytes);
message.addInline(imageResourceName, imageSource, imageContentType);
// Send mail
this.mailSender.send(mimeMessage);
}
Note that we have used an org.springframework.core.io.ByteArrayResource
object to attach the image uploaded by the user, which we previously converted into a byte[]
.
You could also make use of FileSystemResource
to attach a file directly from the filesystem —thus avoiding loading it into memory—, or UrlResource
to attach a remote file.
The controller
Now for the controller method that calls our service:
/*
* Send HTML mail with inline image
*/
@RequestMapping(value = "/sendMailWithInlineImage", method = RequestMethod.POST)
public String sendMailWithInline(
@RequestParam("recipientName") final String recipientName,
@RequestParam("recipientEmail") final String recipientEmail,
@RequestParam("image") final MultipartFile image,
final Locale locale)
throws MessagingException, IOException {
this.emailService.sendMailWithInline(
recipientName, recipientEmail, image.getName(),
image.getBytes(), image.getContentType(), locale);
return "redirect:sent.html";
}
Cannot be easier. Note how we use a Spring MVC MultipartFile
object to model the uploaded file and pass its contents on to the service.
More examples
For the sake of brevity, we have only detailed one of the four types of email we want our application to send. However, you can see the source code required for creating all four types of emails at the springmail
example application you can download from the documentation page.


Akan names are derived from Ghanian culture. Frequently in Ghana, children are given their first names as 'day name' which corresponds to the day in the week they were bornt.
The following are Ghanian day names:
| S/No | DAY | MALE | FEMALE |
|---|---|---|---|
| 1 | Sunday | Kwasi | Akosua |
| 2 | Monday | Kwadwo | Adwoa |
| 3 | Tuesday | Kwabena | Abenaa |
| 4 | Wednesday | Kwaku | Akua |
| 5 | Thursday | Yaw | Yaa |
| 6 | Friday | Kofi | Afua |
| 7 | Saturday | Kwame | Ama |
Enter Your Details Below:


The flash provides a way to pass temporary objects between actions. Anything you place in the flash will be exposed to the very next action and then cleared out. This is a great way of doing notices and alerts, such as a create action that sets flash[:notice] = "Successfully created" before redirecting to a display action that can then expose the flash to its template. Actually, that exposure is automatically done. Example:
class WeblogController < ActionController::Base def create # save post flash[:notice] = "Successfully created post" redirect_to :action => "display", :params => { :id => post.id } end def display # doesn't need to assign the flash notice to the template, that's done automatically end end display.rhtml <% if @flash[:notice] %>
<%= @flash[:notice] %>
<% end %>
This example just places a string in the flash, but you can put any object in there. And of course, you can put as many as you like at a time too. Just remember: They‘ll be gone by the time the next action has been performed.
See docs on the FlashHash class for more details about the flash.
Methods
Classes and Modules
Class ActionController::Flash::FlashHashPublic Class methods
[ show source ]
# File vendor/rails/actionpack/lib/action_controller/flash.rb, line 27 27: def self.included(base) 28: base.send :include, InstanceMethods 29: 30: base.class_eval do 31: alias_method :assign_shortcuts_without_flash, :assign_shortcuts 32: alias_method :assign_shortcuts, :assign_shortcuts_with_flash 33: 34: alias_method :process_cleanup_without_flash, :process_cleanup 35: alias_method :process_cleanup, :process_cleanup_with_flash 36: end 37: end


Insurance
Health Insurance
Blue Cross Blue Shield
Enrollee ID
DZW10022300000
Issuer
890300989
RxBIN
004366
RxGRP
RX4655
Vision
Yes
Dental
No
Find Doctors On My Insurance
Hey Calum!
XCheck out the Find Doctors section. It'll automatically load doctors in your area on your Insurance.


?P.
SINTENIS:
PLANTAE
PORTORICENSES.
/
/&
//
/
t/-..........
t*t
S&TWtZ&C
tf/
Av,
188*^"
'
det.
I.
Urban.
T.udwigia
nctovalvis,
(Jacq.)
Raven
Determined
by
T.P.
RanaBOOrthy
1980
Missouri
Botanical
Garden
J;
IMAGED
botanical
Q
A
R
X
&
00819663
Legend -
Level of confidence that token is an accurately-transcribed word
extremely low
very low
low
undetermined
medium
high
very high


Nandini Menon
Captain
Birthday : 6th May
Age : 19
Hobbies : Coding and Playing Table-Tennis
Leo Varghese
Vice-Captain
Birthday : 12th November
Age : 20
Hobbies : Coding and Watching Movies
Judith George
Member
Birthday : 1st September
Age : 19
Hobbies : Playing and Watching Movies
Kevin Jose
Member
Birthday : 13th October
Age : 20
Hobbies : Cycling, Watching Movies and Playing Badminton
Prasanth P M
Member
Birthday : 22nd October
Age : 19
Hobbies : Playing Football, Drawing and Singing
Sneha Anna Joshy
Member
Birthday : 28th May
Age : 19
Hobbies : Cooking, Reading and Writing
Sreelakshmi Pradeep
Member
Birthday : 26th August
Age : 20
Hobbies : Listening to Music, Doodle Arts, Pencil Drawing and Gardening
Teena John
Member
Birthday : 30th June
Age : 19
Hobbies : Singing and Reading


RUSHMORE
Starring: Jason Schwartzman, Olivia Williams and Bill Murray Written by: Wes Anderson & Owen Wilson Directed by: Wes Anderson
While watching Wes Anderson's Rushmore, it may be surprising to think that the role of Max Fischer, the film's anti-hero, was not written with Jason Schwartzman in mind. The young actor, making his film debut as a 15 year old student at the exclusive Rushmore Academy is so perfect in the role that it comes as a shock that Anderson auditioned some two thousand other prospective stars before discovering Schwarztman.
Schwartzman plays Max, a student who is more interested in his extra-curricular activities (such as writing edgy plays like "Serpico" and being president of the Rushmore Beekeepers) but sees his grades suffer as a result. On the brink of being thrown out, he lands himself in even more hot water when he falls for first grade teacher Rosemary Cross (Olivia Williams) and enlists the help of millionaire acquaintance Herman Blume (the great Bill Murray) to build an aquarium (on Rushmore's baseball field) in her honour. Unfortunately for everyone involved, Blume finds that he has feelings for Miss Cross as well, which gets in the way of Max's plans to woo her.
Max is one of the best-written characters we've yet seen in the 90s, and Schwartzman plays him to perfection in one of the finest comedy performances ever given by someone of his age. As everyone else has probably already pointed out, he is reminiscent of a young Dustin Hoffman (although I was reminded more of Paul from "The Wonder Years", from a visual standpoint, at least). Hopefully, if he avoids typecasting as weird, quirky loner-types he should earn himself a good career. Bill Murray is his equal as Blume, displaying a depth we haven't yet seen from him. While this isn't his best performance (that honour goes to Groundhog Day) he is still terrific here. Williams isn't given much to do except react to Schwartzman and Murray, but still does fine work.
Rushmore seems to go just a little too long but, while it isn't a perfect film, it is a definate must-see for anyone who wants to see that rarity, an American coming-of-age film that actually works well without an excessive amount of sentimentality. Anderson has created a modern classic with a star who should, with any luck, rise to even greater success.
4.5 out of 5
--- Nigel Bridgeman<EMAIL_ADDRESS>The Movie Pages - a movie page: http://www.losfer.com/movies
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


I was completely terrified. We were hiking downhill towards the Pacific Ocean, and I was fighting visions of slipping, tumbling down the hillside.
It was my first hike. In retrospect, it was not steep or challenging or particularly precipitous. But growing up in the flat plains of the Midwest, I had made it to my early twenties without a single hike (and was questioning the rationality of this strange subspecies known as “hikers”).
Many years later, I managed to hike the Inca Trail, where I mostly conquered my lingering fears of hiking.
Well, our data inventory was our Inca Trail, and let me just say…
Try some foothills before you scale a mountain
In other words - consider starting with something smaller than a full scale inventory (i.e. listing all of your data). In our case, our program had been around for awhile and the inventory was a natural progression. But for programs that are just starting, an inventory can take a lot of work without visible results. Ideally, you should have some successes or examples in place before starting an inventory.
Here are some ideas for alternatives to doing a full scale inventory:
- Topic Inventory. Collect and list all the data around a service or topic like Housing or Transit or Recreation and then pair it with a strategic release.
- Top Five. Ask departments to list their top 5 datasets. See DataLA.
- Department Dives. Dive deep into a handful of departments and inventory (and maybe publish) their data. See Philly.
- Initiative Inventory. Start with a specific problem or challenge your City is facing and inventory the data related to that. Again, couple with a strategic release.
- Stop at Systems. Simply identifying systems that generate data could be a natural stopping point. Our legislation was more specific and the dataset inventory is super helpful to have, but it’s one way to go.
Alternatively - do the full scale inventory, but use these alternatives as an implementation or phasing strategy. Whatever you do…
Break it into steps
Our legislative requirement to inventory our data didn’t come with a set of instructions. And we didn’t find a lot of guidance out there (though maybe we missed it). So we broke it into 3 phases:
- Identify data sources
- Brainstorm datasets
- Complete dataset inventory
Without these discrete tasks, the inventory felt too big and scary to accomplish. And for each of those steps…
Provide guidance and support
Our Data Coordinators (representatives from each department) ultimately had to deliver the inventory. (And FYI, they are the true heroes here.) So we did our best to support them every step of the way and make it as easy as possible for them to complete the work. During this phase your data coordinators are your users. Craft empathy for them and leverage user-centered design to support them.
Tools we provided:
- Guidebooks, webinars and workshops
- Shared definitions (e.g. data steward, data source) - thank you GovFresh
- Activities to motivate the process
- Templates designed to ease input
- Custom support and consulting for complicated departments
- A single online resource portal for Data Coordinators to go to
- Deadlines, including intermediate deadlines (they actually asked for this ;-)
Check out our Data Inventory Resources, but before you use them…
Implement quality control and maintenance
At each stage in the process, plan to allocate time and energy to ensure quality submissions. If you don’t do this, your inventory will be less useful. This takes a lot of work (try to minimize by thinking thoughtfully about your data collection strategy) but it’s worth it. Just budget the time. Also, come up with a plan for maintaining the inventory and always, always…
Track progress
We tracked the status of each department through each phase (and deadline) of the inventory. This forced us to checkin and helped us identify the need for targeted outreach and support. It also made us accountable to our legislative requirements.
At this point, 75% of our departments have completed the inventory, which you can check out here. We decided to go live with the inventory despite not having all departments ready. That’s also where tracking comes into play. We have rolled the tracking into our quarterly report and are accepting department submissions on a rolling, monthly basis.
Anticipate future needs: Inventory as platform
Your inventory is a one time chance to capture a lot of awesome information. Don’t waste it. Now that we have this tremendous resource in place, we are building all sorts of stuff on top of it. More on this in subsequent blog-posts but we are using the inventory to:
- Create publishing plans
- Automate monitoring and performance metrics in publishing and open data
- Conduct dataset management
- Build tools to endorse datasets for publication
- Provide data dating / data concierge services
- And more…stay tuned ;-)
And again, thanks to our amazing Data Coordinators for making this possible!


DocParser Class
The doc parser accepts a map of files to file content.
Once parse()
is called, various properties will be populated
with the parsers data (aggregated in the 'data'
property).
Constructor
Item Index
Methods
- _addAttrs
- _addLazyAttr
- _addOutOfOrder
- _aggregateAttrs
- _attrCfgHash
- _baseDestroy
- _baseInit
- _cloneDefaultValue
- _defAttrChangeFn
- _defDestroyFn
- _defInitFn
- _destroyHierarchy
- _filterAdHocAttrs
- _fireAttrChange
- _getAttr
- _getAttrCfg
- _getAttrCfgs
- _getAttrInitVal
- _getAttrs
- _getClasses
- _getFullType
- _getInstanceAttrCfgs
- _getStateVal
- _getType
- _hasPotentialSubscribers
- _initAttrHost
- _initAttribute
- _initAttrs
- _initBase
- _initHierarchy
- _initHierarchyData
- _isLazyAttr
- _monitor
- _normAttrVals
- _parseType
- _preInitEventCfg
- _protectAttrs deprecated
- _publish
- _resolveFor
- _set
- _setAttr
- _setAttrs
- _setAttrVal
- _setStateVal
- addAttr
- addAttrs
- addTarget
- after
- attrAdded
- before
- bubble
- destroy
- detach
- detachAll
- extract
- fire
- get
- getAttrs
- getEvent
- getTargets
- handlecomment
- init
- modifyAttr
- on
- once
- onceAfter
- parse
- parseType
- processblock
- publish
- removeAttr
- removeTarget
- reset
- set
- setAttrs
- stringlog
- subscribe deprecated
- toString
- transform
- unindent
- unsubscribe deprecated
- unsubscribeAll deprecated
Properties
- _allowAdHocAttrs
- CORRECTIONS
- DIGESTERS
- name deprecated
- TAGLIST
Attributes
Methods
_addAttrs
-
cfgs
-
values
-
lazy
Implementation behind the public addAttrs method.
This method is invoked directly by get if it encounters a scenario in which an attribute's valueFn attempts to obtain the value an attribute in the same group of attributes, which has not yet been added (on demand initialization).
Parameters:
-
cfgs
ObjectAn object with attribute name/configuration pairs.
-
values
ObjectAn object with attribute name/value pairs, defining the initial values to apply. Values defined in the cfgs argument will be over-written by values in this argument unless defined as read only.
-
lazy
BooleanWhether or not to delay the intialization of these attributes until the first call to get/set. Individual attributes can over-ride this behavior by defining a lazyAdd configuration property in their configuration. See addAttr.
_addLazyAttr
-
name
-
[lazyCfg]
Finishes initializing an attribute which has been lazily added.
_addOutOfOrder
-
name
-
cfg
Utility method used by get/set to add attributes encountered out of order when calling addAttrs().
For example, if:
this.addAttrs({
foo: {
setter: function() {
// make sure this bar is available when foo is added
this.get("bar");
}
},
bar: {
value: ...
}
});
_aggregateAttrs
-
allAttrs
A helper method, used by _initHierarchyData to aggregate attribute configuration across the instances class hierarchy.
The method will protect the attribute configuration value to protect the statically defined default value in ATTRS if required (if the value is an object literal, array or the attribute configuration has cloneDefaultValue set to shallow or deep).
Parameters:
-
allAttrs
ArrayAn array of ATTRS definitions across classes in the hierarchy (subclass first, Base last)
Returns:
The aggregate set of ATTRS definitions for the instance
_attrCfgHash
()
private
Utility method to define the attribute hash used to filter/whitelist property mixes for this class for iteration performance reasons.
_baseDestroy
()
private
Internal destroy implementation for BaseCore
_baseInit
()
private
Internal initialization implementation for BaseCore
_cloneDefaultValue
-
cfg
This method assumes that the value has already been checked to be an object. Since it's on a critical path, we don't want to re-do the check.
Parameters:
-
cfg
Object
_defAttrChangeFn
-
e
-
eventFastPath
Default function for attribute change events.
Parameters:
-
e
EventFacadeThe event object for attribute change events.
-
eventFastPath
BooleanWhether or not we're using this as a fast path in the case of no listeners or not
_defInitFn
-
e
Default init event handler
Parameters:
-
e
EventFacadeEvent object, with a cfg property which refers to the configuration object passed to the constructor.
_destroyHierarchy
()
private
Destroys the class hierarchy for this instance by invoking the destructor method on the prototype of each class in the hierarchy.
_filterAdHocAttrs
-
allAttrs
-
userVals
Parameters:
-
allAttrs
ObjectThe set of all attribute configurations for this instance. Attributes will be removed from this set, if they belong to the filtered class, so that by the time all classes are processed, allCfgs will be empty.
-
userVals
ObjectThe config object passed in by the user, from which adhoc attrs are to be filtered.
Returns:
The set of adhoc attributes passed in, in the form of an object with attribute name/configuration pairs.
_fireAttrChange
-
attrName
-
subAttrName
-
currVal
-
newVal
-
opts
-
[cfg]
Utility method to help setup the event payload and fire the attribute change event.
Parameters:
-
attrName
StringThe name of the attribute
-
subAttrName
StringThe full path of the property being changed, if this is a sub-attribute value being change. Otherwise null.
-
currVal
AnyThe current value of the attribute
-
newVal
AnyThe new value of the attribute
-
opts
ObjectAny additional event data to mix into the attribute change event's event facade.
-
[cfg]
Object optionalThe attribute config stored in State, if already available.
_getAttr
-
name
Provides the common implementation for the public get method, allowing Attribute hosts to over-ride either method.
See get for argument details.
Parameters:
-
name
StringThe name of the attribute.
Returns:
The value of the attribute.
_getAttrCfg
-
name
Returns an object with the configuration properties (and value) for the given attribute. If attrName is not provided, returns the configuration properties for all attributes.
Parameters:
-
name
StringOptional. The attribute name. If not provided, the method will return the configuration for all attributes.
Returns:
The configuration properties for the given attribute, or all attributes.
_getAttrCfgs
()
Object
protected
Returns an aggregated set of attribute configurations, by traversing the class hierarchy.
Returns:
The hash of attribute configurations, aggregated across classes in the hierarchy This value is cached the first time the method, or _getClasses, is invoked. Subsequent invocations return the cached value.
_getAttrInitVal
-
attr
-
cfg
-
initValues
Returns the initial value of the given attribute from either the default configuration provided, or the over-ridden value if it exists in the set of initValues provided and the attribute is not read-only.
Parameters:
Returns:
The initial value of the attribute.
_getAttrs
-
attrs
Implementation behind the public getAttrs method, to get multiple attribute values.
Parameters:
-
attrs
Array | booleanOptional. An array of attribute names. If omitted, all attribute values are returned. If set to true, all attributes modified from their initial values are returned.
Returns:
An object with attribute name/value pairs.
_getClasses
()
Function[]
protected
Returns the class hierarchy for this object, with BaseCore being the last class in the array.
Returns:
An array of classes (constructor functions), making up the class hierarchy for this object. This value is cached the first time the method, or _getAttrCfgs, is invoked. Subsequent invocations return the cached value.
_getFullType
-
type
Returns the fully qualified type, given a short type string. That is, returns "foo:bar" when given "bar" if "foo" is the configured prefix.
NOTE: This method, unlike _getType, does no checking of the value passed in, and is designed to be used with the low level _publish() method, for critical path implementations which need to fast-track publish for performance reasons.
Parameters:
-
type
StringThe short type to prefix
Returns:
The prefixed type, if a prefix is set, otherwise the type passed in
_getInstanceAttrCfgs
-
allCfgs
A helper method used to isolate the attrs config for this instance to pass to addAttrs
,
from the static cached ATTRS for the class.
Parameters:
-
allCfgs
ObjectThe set of all attribute configurations for this instance. Attributes will be removed from this set, if they belong to the filtered class, so that by the time all classes are processed, allCfgs will be empty.
Returns:
The set of attributes to be added for this instance, suitable
for passing through to addAttrs
.
_getStateVal
-
name
-
[cfg]
Gets the stored value for the attribute, from either the internal state object, or the state proxy if it exits
Parameters:
Returns:
The stored value of the attribute
_getType
()
private
If the instance has a prefix attribute and the event type is not prefixed, the instance prefix is applied to the supplied type.
_hasPotentialSubscribers
-
fullType
Parameters:
-
fullType
StringThe fully prefixed type name
Returns:
Whether the event has potential subscribers or not
_initAttrHost
-
attrs
-
values
-
lazy
Constructor logic for attributes. Initializes the host state, and sets up the inital attributes passed to the constructor.
Parameters:
-
attrs
ObjectThe attributes to add during construction (passed through to addAttrs). These can also be defined on the constructor being augmented with Attribute by defining the ATTRS property on the constructor.
-
values
ObjectThe initial attribute values to apply (passed through to addAttrs). These are not merged/cloned. The caller is responsible for isolating user provided values if required.
-
lazy
BooleanWhether or not to add attributes lazily (passed through to addAttrs).
_initAttribute
()
private
Initializes AttributeCore
_initAttrs
-
attrs
-
values
-
lazy
Utility method to set up initial attributes defined during construction, either through the constructor.ATTRS property, or explicitly passed in.
Parameters:
-
attrs
ObjectThe attributes to add during construction (passed through to addAttrs). These can also be defined on the constructor being augmented with Attribute by defining the ATTRS property on the constructor.
-
values
ObjectThe initial attribute values to apply (passed through to addAttrs). These are not merged/cloned. The caller is responsible for isolating user provided values if required.
-
lazy
BooleanWhether or not to add attributes lazily (passed through to addAttrs).
_initBase
-
config
Internal construction logic for BaseCore.
Parameters:
-
config
ObjectThe constructor configuration object
_initHierarchy
-
userVals
Initializes the class hierarchy for the instance, which includes initializing attributes for each class defined in the class's static ATTRS property and invoking the initializer method on the prototype of each class in the hierarchy.
Parameters:
-
userVals
ObjectObject with configuration property name/value pairs
_initHierarchyData
()
private
A helper method used by _getClasses and _getAttrCfgs, which determines both the array of classes and aggregate set of attribute configurations across the class hierarchy for the instance.
_isLazyAttr
-
name
Checks whether or not the attribute is one which has been added lazily and still requires initialization.
Parameters:
-
name
StringThe name of the attribute
Returns:
true if it's a lazily added attribute, false otherwise.
_monitor
-
what
-
eventType
-
o
This is the entry point for the event monitoring system. You can monitor 'attach', 'detach', 'fire', and 'publish'. When configured, these events generate an event. click -> click_attach, click_detach, click_publish -- these can be subscribed to like other events to monitor the event system. Inividual published events can have monitoring turned on or off (publish can't be turned off before it it published) by setting the events 'monitor' config.
Parameters:
-
what
String'attach', 'detach', 'fire', or 'publish'
-
eventType
String | CustomEventThe prefixed name of the event being monitored, or the CustomEvent object.
-
o
ObjectInformation about the event interaction, such as fire() args, subscription category, publish config
_normAttrVals
-
valueHash
Utility method to normalize attribute values. The base implementation simply merges the hash to protect the original.
Parameters:
-
valueHash
ObjectAn object with attribute name/value pairs
Returns:
An object literal with 2 properties - "simple" and "complex", containing simple and complex attribute values respectively keyed by the top level attribute name, or null, if valueHash is falsey.
_parseType
()
private
Returns an array with the detach key (if provided), and the prefixed event name from _getType Y.on('detachcategory| menu:click', fn)
_preInitEventCfg
-
config
Handles the special on, after and target properties which allow the user to easily configure on and after listeners as well as bubble targets during construction, prior to init.
Parameters:
-
config
ObjectThe user configuration object
_protectAttrs
-
attrs
Utility method to protect an attribute configuration hash, by merging the entire object and the individual attr config objects.
Parameters:
-
attrs
ObjectA hash of attribute to configuration object pairs.
Returns:
A protected version of the attrs argument.
_publish
-
fullType
-
etOpts
-
ceOpts
The low level event publish implementation. It expects all the massaging to have been done
outside of this method. e.g. the type
to fullType
conversion. It's designed to be a fast
path publish, which can be used by critical code paths to improve performance.
Parameters:
Returns:
The published event. If called without etOpts
or ceOpts
, this will
be the default CustomEvent
instance, and can be configured independently.
_resolveFor
-
value
Takes a non-namespaced classname and resolves it to a namespace (to support @for
)
Parameters:
-
value
StringThe classname to resolve
Returns:
The resolved namespace + classname
_set
-
name
-
val
-
[opts]
Allows setting of readOnly/writeOnce attributes. See set for argument details.
Parameters:
Returns:
A reference to the host object.
_setAttr
-
name
-
value
-
[opts]
-
force
Provides the common implementation for the public set and protected _set methods.
See set for argument details.
Parameters:
Returns:
A reference to the host object.
_setAttrs
-
attrs
-
[opts]
Implementation behind the public setAttrs method, to set multiple attribute values.
Parameters:
Returns:
A reference to the host object.
_setAttrVal
-
attrName
-
subAttrName
-
prevVal
-
newVal
-
[opts]
-
[attrCfg]
Updates the stored value of the attribute in the privately held State object, if validation and setter passes.
Parameters:
-
attrName
StringThe attribute name.
-
subAttrName
StringThe sub-attribute name, if setting a sub-attribute property ("x.y.z").
-
prevVal
AnyThe currently stored value of the attribute.
-
newVal
AnyThe value which is going to be stored.
-
[opts]
Object optionalOptional data providing the circumstances for the change.
-
[attrCfg]
Object optionalOptional config hash for the attribute. This is added for performance along the critical path, where the calling method has already obtained the config from state.
Returns:
true if the new attribute value was stored, false if not.
_setStateVal
-
name
-
value
Sets the stored value for the attribute, in either the internal state object, or the state proxy if it exits
Parameters:
-
name
StringThe name of the attribute
-
value
AnyThe value of the attribute
addAttr
-
name
-
config
-
lazy
Adds an attribute with the provided configuration to the host object.
The config argument object supports the following properties:
- value <Any>
- The initial value to set on the attribute
- valueFn <Function | String>
-
A function, which will return the initial value to set on the attribute. This is useful for cases where the attribute configuration is defined statically, but needs to reference the host instance ("this") to obtain an initial value. If both the value and valueFn properties are defined, the value returned by the valueFn has precedence over the value property, unless it returns undefined, in which case the value property is used.
valueFn can also be set to a string, representing the name of the instance method to be used to retrieve the value.
- readOnly <boolean>
- Whether or not the attribute is read only. Attributes having readOnly set to true cannot be modified by invoking the set method.
- writeOnce <boolean> or <string>
-
Whether or not the attribute is "write once". Attributes having writeOnce set to true,
can only have their values set once, be it through the default configuration,
constructor configuration arguments, or by invoking set.
The writeOnce attribute can also be set to the string "initOnly", in which case the attribute can only be set during initialization (when used with Base, this means it can only be set during construction)
- setter <Function | String>
-
The setter function used to massage or normalize the value passed to the set method for the attribute. The value returned by the setter will be the final stored value. Returning Attribute.INVALID_VALUE, from the setter will prevent the value from being stored.
setter can also be set to a string, representing the name of the instance method to be used as the setter function.
- getter <Function | String>
-
The getter function used to massage or normalize the value returned by the get method for the attribute. The value returned by the getter function is the value which will be returned to the user when they invoke get.
getter can also be set to a string, representing the name of the instance method to be used as the getter function.
- validator <Function | String>
-
The validator function invoked prior to setting the stored value. Returning false from the validator function will prevent the value from being stored.
validator can also be set to a string, representing the name of the instance method to be used as the validator function.
- lazyAdd <boolean>
- Whether or not to delay initialization of the attribute until the first call to get/set it. This flag can be used to over-ride lazy initialization on a per attribute basis, when adding multiple attributes through the addAttrs method.
The setter, getter and validator are invoked with the value and name passed in as the first and second arguments, and with the context ("this") set to the host object.
Configuration properties outside of the list mentioned above are considered private properties used internally by attribute, and are not intended for public use.
Parameters:
-
name
StringThe name of the attribute.
-
config
ObjectAn object with attribute configuration property/value pairs, specifying the configuration for the attribute.
NOTE: The configuration object is modified when adding an attribute, so if you need to protect the original values, you will need to merge the object.
-
lazy
Boolean(optional) Whether or not to add this attribute lazily (on the first call to get/set).
Returns:
A reference to the host object.
addAttrs
-
cfgs
-
values
-
lazy
Configures a group of attributes, and sets initial values.
NOTE: This method does not isolate the configuration object by merging/cloning. The caller is responsible for merging/cloning the configuration object if required.
Parameters:
-
cfgs
ObjectAn object with attribute name/configuration pairs.
-
values
ObjectAn object with attribute name/value pairs, defining the initial values to apply. Values defined in the cfgs argument will be over-written by values in this argument unless defined as read only.
-
lazy
BooleanWhether or not to delay the intialization of these attributes until the first call to get/set. Individual attributes can over-ride this behavior by defining a lazyAdd configuration property in their configuration. See addAttr.
Returns:
A reference to the host object.
addTarget
-
o
Registers another EventTarget as a bubble target. Bubble order is determined by the order registered. Multiple targets can be specified.
Events can only bubble if emitFacade is true.
Included in the event-custom-complex submodule.
Parameters:
-
o
EventTargetthe target to add
after
-
type
-
fn
-
[context]
-
[arg*]
Subscribe to a custom event hosted by this object. The supplied callback will execute after any listeners add via the subscribe method, and after the default function, if configured for the event, has executed.
Parameters:
Returns:
A subscription handle capable of detaching the subscription
attrAdded
-
name
Checks if the given attribute has been added to the host
Parameters:
-
name
StringThe name of the attribute to check.
Returns:
true if an attribute with the given name has been added, false if it hasn't. This method will return true for lazily added attributes.
before
()
Executes the callback before a DOM event, custom event or method. If the first argument is a function, it is assumed the target is a method. For DOM and custom events, this is an alias for Y.on.
For DOM and custom events: type, callback, context, 0-n arguments
For methods: callback, object (method host), methodName, context, 0-n arguments
Returns:
detach handle
bubble
-
evt
Propagate an event. Requires the event-custom-complex module.
Parameters:
-
evt
CustomEventthe custom event to propagate
Returns:
the aggregated return value from Event.Custom.fire
destroy
()
BaseCore
chainable
Destroy lifecycle method. Invokes destructors for the class hierarchy.
Returns:
A reference to this object
detach
-
type
-
fn
-
context
Detach one or more listeners the from the specified event
Parameters:
-
type
String | ObjectEither the handle to the subscriber or the type of event. If the type is not specified, it will attempt to remove the listener from all hosted events.
-
fn
FunctionThe subscribed function to unsubscribe, if not supplied, all subscribers will be removed.
-
context
ObjectThe custom object passed to subscribe. This is optional, but if supplied will be used to disambiguate multiple listeners that are the same (e.g., you subscribe many object using a function that lives on the prototype)
Returns:
the host
detachAll
-
type
Removes all listeners from the specified event. If the event type is not specified, all listeners from all hosted custom events will be removed.
Parameters:
-
type
StringThe type, or name of the event
extract
-
filemap
-
dirmap
Accepts a map of filenames to file content. Returns a map of filenames to an array of API comment block text. This expects the comment to start with / * on its own line, and end with / on its own line. Override this function to provide an alternative comment parser.
Parameters:
Returns:
A map of filenames to an array of extracted comment text.
fire
-
type
-
arguments
Fire a custom event by name. The callback functions will be executed from the context specified when the event was created, and with the following parameters.
The first argument is the event type, and any additional arguments are passed to the listeners as parameters. If the first of these is an object literal, and the event is configured to emit an event facade, that object is mixed into the event facade and the facade is provided in place of the original object.
If the custom event object hasn't been created, then the event hasn't been published and it has no subscribers. For performance sake, we immediate exit in this case. This means the event won't bubble, so if the intention is that a bubble target be notified, the event must be published on this object first.
Parameters:
-
type
String | ObjectThe type of the event, or an object that contains a 'type' property.
-
arguments
Object*an arbitrary set of parameters to pass to the handler. If the first of these is an object literal and the event is configured to emit an event facade, the event facade will replace that parameter after the properties the object literal contains are copied to the event facade.
Returns:
True if the whole lifecycle of the event went through, false if at any point the event propagation was halted.
get
-
name
Returns the current value of the attribute. If the attribute has been configured with a 'getter' function, this method will delegate to the 'getter' to obtain the value of the attribute.
Parameters:
-
name
StringThe name of the attribute. If the value of the attribute is an Object, dot notation can be used to obtain the value of a property of the object (e.g.
get("x.y.z")
)
Returns:
The value of the attribute
getAttrs
-
attrs
Gets multiple attribute values.
Parameters:
-
attrs
Array | booleanOptional. An array of attribute names. If omitted, all attribute values are returned. If set to true, all attributes modified from their initial values are returned.
Returns:
An object with attribute name/value pairs.
getEvent
-
type
-
prefixed
Returns the custom event of the provided type has been created, a falsy value otherwise
Parameters:
Returns:
the custom event or null
getTargets
()
Returns an array of bubble targets for this object.
Returns:
EventTarget[]
handlecomment
-
comment
-
file
-
line
Transforms a JavaDoc style comment block (less the start and end of it) into a list of tag/text pairs. The leading space and '*' are removed, but the remaining whitespace is preserved so that the output should be friendly for both markdown and html parsers.
init
-
cfg
Init lifecycle method, invoked during construction. Sets up attributes and invokes initializers for the class hierarchy.
Parameters:
-
cfg
ObjectObject with configuration property name/value pairs
Returns:
A reference to this object
modifyAttr
-
name
-
config
Updates the configuration of an attribute which has already been added.
The properties which can be modified through this interface are limited to the following subset of attributes, which can be safely modified after a value has already been set on the attribute: readOnly, writeOnce, broadcast and getter.
on
-
type
-
fn
-
[context]
-
[arg*]
Subscribe a callback function to a custom event fired by this object or from an object that bubbles its events to this object.
Callback functions for events published with emitFacade = true
will
receive an EventFacade
as the first argument (typically named "e").
These callbacks can then call e.preventDefault()
to disable the
behavior published to that event's defaultFn
. See the EventFacade
API for all available properties and methods. Subscribers to
non-emitFacade
events will receive the arguments passed to fire()
after the event name.
To subscribe to multiple events at once, pass an object as the first argument, where the key:value pairs correspond to the eventName:callback, or pass an array of event names as the first argument to subscribe to all listed events with the same callback.
Returning false
from a callback is supported as an alternative to
calling e.preventDefault(); e.stopPropagation();
. However, it is
recommended to use the event methods whenever possible.
Parameters:
Returns:
A subscription handle capable of detaching that subscription
once
-
type
-
fn
-
[context]
-
[arg*]
Listen to a custom event hosted by this object one time.
This is the equivalent to on
except the
listener is immediatelly detached when it is executed.
Parameters:
Returns:
A subscription handle capable of detaching the subscription
onceAfter
-
type
-
fn
-
[context]
-
[arg*]
Listen to a custom event hosted by this object one time.
This is the equivalent to after
except the
listener is immediatelly detached when it is executed.
Parameters:
Returns:
A subscription handle capable of detaching that subscription
parse
-
filemap
-
dirmap
Extracts and transforms the filemap provided to constructor
Parameters:
Returns:
this parser instance. The total results are available in parser.data.
parseType
-
type
-
[pre=this._yuievt.config.prefix]
Takes the type parameter passed to 'on' and parses out the various pieces that could be included in the type. If the event type is passed without a prefix, it will be expanded to include the prefix one is supplied or the event target is configured with a default prefix.
Returns:
an array containing: the detach category, if supplied, the prefixed event type, whether or not this is an after listener, the supplied event type
processblock
-
an
Processes all the tags in a single comment block
Parameters:
-
an
Arrayarray of the tag/text pairs
publish
-
type
-
opts
Creates a new custom event of the specified type. If a custom event by that name already exists, it will not be re-created. In either case the custom event is returned.
Parameters:
-
type
Stringthe type, or name of the event
-
opts
Objectoptional config params. Valid properties are:
- 'broadcast': whether or not the YUI instance and YUI global are notified when the event is fired (false)
- 'bubbles': whether or not this event bubbles (true) Events can only bubble if emitFacade is true.
- 'context': the default execution context for the listeners (this)
- 'defaultFn': the default function to execute when this event fires if preventDefault was not called
- 'emitFacade': whether or not this event emits a facade (false)
- 'prefix': the prefix for this targets events, e.g., 'menu' in 'menu:click'
- 'fireOnce': if an event is configured to fire once, new subscribers after the fire will be notified immediately.
- 'async': fireOnce event listeners will fire synchronously if the event has already fired unless async is true.
- 'preventable': whether or not preventDefault() has an effect (true)
- 'preventedFn': a function that is executed when preventDefault is called
- 'queuable': whether or not this event can be queued during bubbling (false)
- 'silent': if silent is true, debug messages are not provided for this event.
- 'stoppedFn': a function that is executed when stopPropagation is called
- 'monitored': specifies whether or not this event should send notifications about when the event has been attached, detached, or published.
- 'type': the event type (valid option if not provided as the first parameter to publish)
Returns:
the custom event
removeAttr
-
name
Removes an attribute from the host object
Parameters:
-
name
StringThe name of the attribute to be removed.
reset
-
name
Resets the attribute (or all attributes) to its initial value, as long as the attribute is not readOnly, or writeOnce.
Parameters:
-
name
StringOptional. The name of the attribute to reset. If omitted, all attributes are reset.
Returns:
A reference to the host object.
set
-
name
-
value
-
[opts]
Sets the value of an attribute.
Parameters:
-
name
StringThe name of the attribute. If the current value of the attribute is an Object, dot notation can be used to set the value of a property within the object (e.g.
set("x.y.z", 5)
). -
value
AnyThe value to set the attribute to.
-
[opts]
Object optionalOptional data providing the circumstances for the change.
Returns:
A reference to the host object.
setAttrs
-
attrs
-
[opts]
Sets multiple attribute values.
Parameters:
Returns:
A reference to the host object.
stringlog
-
data
Parses the JSON data and formats it into a nice log string for filename and line number:
/file/name.js:123
Parameters:
-
data
ObjectThe data block from the parser
Returns:
The formatted string.
subscribe
()
deprecated
subscribe to an event
toString
()
String
Default toString implementation. Provides the constructor NAME and the instance guid, if set.
Returns:
String representation for this object
transform
-
commentmap
Transforms a map of filenames to arrays of comment blocks into a JSON structure that represents the entire processed API doc info and relationships between elements for the entire project.
Parameters:
-
commentmap
ObjectThe hash of files and parsed comment blocks
Returns:
The transformed data for the project
unindent
-
content
Normalizes the initial indentation of the given content so that the first line is unindented, and all other lines are unindented to the same degree as the first line. So if the first line has four spaces at the beginning, then all lines will be unindented four spaces. Ported from Selleck
Parameters:
-
content
StringText to unindent.
Returns:
Unindented text.
unsubscribe
()
deprecated
detach a listener
unsubscribeAll
-
type
Removes all listeners from the specified event. If the event type is not specified, all listeners from all hosted custom events will be removed.
Parameters:
-
type
StringThe type, or name of the event
Properties
_allowAdHocAttrs
Boolean
protected
This property controls whether or not instances of this class should allow users to add ad-hoc attributes through the constructor configuration hash.
AdHoc attributes are attributes which are not defined by the class, and are not handled by the MyClass._NON_ATTRS_CFG
Default: undefined (false)
DIGESTERS
Object
final
A map of the default tag processors, keyed by the tag name. Multiple tags can use the same digester by supplying the string name that points to the implementation rather than a function.
TAGLIST
Array
final
A list of known tags. This populates a member variable during initialization, and will be updated if additional digesters are added.
Attributes
currentclass
String
The class currently being parsed
Fires event currentclassChange
Fires when the value for the configuration attribute currentclass
is
changed. You can listen for the event using the on
method if you
wish to be notified before the attribute's value has changed, or
using the after
method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
e
EventFacadeAn Event Facade object with the following attribute-specific properties added:
currentfile
String
The file currently being parsed
Fires event currentfileChange
Fires when the value for the configuration attribute currentfile
is
changed. You can listen for the event using the on
method if you
wish to be notified before the attribute's value has changed, or
using the after
method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
e
EventFacadeAn Event Facade object with the following attribute-specific properties added:
currentmodule
String
The module currently being parsed
Fires event currentmoduleChange
Fires when the value for the configuration attribute currentmodule
is
changed. You can listen for the event using the on
method if you
wish to be notified before the attribute's value has changed, or
using the after
method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
e
EventFacadeAn Event Facade object with the following attribute-specific properties added:
currentsubmodule
String
The submodule currently being parsed
Fires event currentsubmoduleChange
Fires when the value for the configuration attribute currentsubmodule
is
changed. You can listen for the event using the on
method if you
wish to be notified before the attribute's value has changed, or
using the after
method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
e
EventFacadeAn Event Facade object with the following attribute-specific properties added:
destroyed
Boolean
readonly
Flag indicating whether or not this object has been through the destroy lifecycle phase.
Default: false
Fires event destroyedChange
Fires when the value for the configuration attribute destroyed
is
changed. You can listen for the event using the on
method if you
wish to be notified before the attribute's value has changed, or
using the after
method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
e
EventFacadeAn Event Facade object with the following attribute-specific properties added:
digesters
Digesters process the tag/text pairs found in a comment block. They are looked up by tag name. The digester gets the tagname, the value, the target object to apply values to, and the full block that is being processed. Digesters can be declared as strings instead of a function -- in that case, the program will try to look up the key listed and use the function there instead (it is an alias). Digesters can return a host object in the case the tag defines a new key block type (modules/classes/methods/events/properties)
Fires event digestersChange
Fires when the value for the configuration attribute digesters
is
changed. You can listen for the event using the on
method if you
wish to be notified before the attribute's value has changed, or
using the after
method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
e
EventFacadeAn Event Facade object with the following attribute-specific properties added:
dirmap
A map of file names to directory name. Provided in case this needs to be used to reset the module name appropriately -- currently not used
Fires event dirmapChange
Fires when the value for the configuration attribute dirmap
is
changed. You can listen for the event using the on
method if you
wish to be notified before the attribute's value has changed, or
using the after
method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
e
EventFacadeAn Event Facade object with the following attribute-specific properties added:
emitters
Emitters will be schemas for the types of payloads the parser will emit. Not implemented.
Fires event emittersChange
Fires when the value for the configuration attribute emitters
is
changed. You can listen for the event using the on
method if you
wish to be notified before the attribute's value has changed, or
using the after
method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
e
EventFacadeAn Event Facade object with the following attribute-specific properties added:
filemap
The map of file names to file content.
Fires event filemapChange
Fires when the value for the configuration attribute filemap
is
changed. You can listen for the event using the on
method if you
wish to be notified before the attribute's value has changed, or
using the after
method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
e
EventFacadeAn Event Facade object with the following attribute-specific properties added:
initialized
Boolean
readonly
Flag indicating whether or not this object has been through the init lifecycle phase.
Default: false
Fires event initializedChange
Fires when the value for the configuration attribute initialized
is
changed. You can listen for the event using the on
method if you
wish to be notified before the attribute's value has changed, or
using the after
method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
e
EventFacadeAn Event Facade object with the following attribute-specific properties added:
mainmodule
String
The main documentation block for the module itself.
Fires event mainmoduleChange
Fires when the value for the configuration attribute mainmodule
is
changed. You can listen for the event using the on
method if you
wish to be notified before the attribute's value has changed, or
using the after
method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
e
EventFacadeAn Event Facade object with the following attribute-specific properties added:
syntaxtype
String
Comment syntax type.
Fires event syntaxtypeChange
Fires when the value for the configuration attribute syntaxtype
is
changed. You can listen for the event using the on
method if you
wish to be notified before the attribute's value has changed, or
using the after
method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
e
EventFacadeAn Event Facade object with the following attribute-specific properties added:
Events
destroy
Lifecycle event for the destroy phase, fired prior to destruction. Invoking the preventDefault method on the event object provided to subscribers will prevent destruction from proceeding.
Subscribers to the "after" moment of this event, will be notified after destruction is complete (and as a result cannot prevent destruction).
Event Payload:
-
e
EventFacadeEvent object
init
Lifecycle event for the init phase, fired prior to initialization. Invoking the preventDefault() method on the event object provided to subscribers will prevent initialization from occuring.
Subscribers to the "after" momemt of this event, will be notified after initialization of the object is complete (and therefore cannot prevent initialization).
Event Payload:
-
e
EventFacadeEvent object, with a cfg property which refers to the configuration object passed to the constructor.


Åre Skiweek is a skiing event particularly for students. Sportsektionen has a tradition of arranging an annual trip to Åre during Åre Skiweek, and this year is no exception. Åre is not only a great skiing location but also has a nightlife which no other skiing region can match.
This year we have signed up for 20 persons, where living accommodations most likely will be split into four or five apartments in central Åre. We will not be able to register for additional spots once our 20 are gone, so be sure to sign up as soon as possible!
Please note that this does not include travelling arrangements to or from Åre. There are however multiple options available, like train, airplane or bus.
For more info about Åre Skiweek, visit the official website at SkiStar.
For any questions, contact us at<EMAIL_ADDRESS>*An additional deposition fee of 200 SEK will be paid prior to, or at arrival in Åre. The 200 SEK will be handed back after leaving the apartment in good condition.