1. Communication overview
Remote-music service needs to be connected to server, to be able to control music playback remotely. Server has two endpoints: client server (CS) and player server (PS). To access information about remote players connected to service — access CS It provides with information about connected players, their current song, song queue and playback timestamp. To report information to the server, player would use a PS.
Communication can be done through number of different ways. For client it is web socket (ws), TCP, or RESTful HTTP api. For players it is ws or TCP. Note, the type of communication depends on server configuration and can differ from each other (eg. client is serving only ws requests while players communicate to the server through tcp).
NOTE: Only the web socket is currently being worked on.
2. Client WS API specification
All messages sent through ws should be in valid JSON format and be structured in such way:
| Field Name |
Possible values |
Description |
| type
| string
| Request type
|
| payload?
| Any
| The additional information to process request
|
Server responses are formatted as such:
| Field Name |
Possible values |
Description |
| type
| string
| Type of a message
|
| payload
| Object
| The response payload
|
There are following requests available:
-
players
returns the array of currently connected players with theirs id’s
Client request
{
"type":"players"
}
Server response
{
"type":"players",
"payload": {
"id-of-a-player-1":"name-of-a-player-1",
"id-of-a-player-2":"name-of-a-player-2",
…
}
}
-
playerStatus
returns the currents status of a particular player
See also: Player status payload formatting
Client request
{
"type":"playerStatus",
"payload": {
"id":"id-of-a-player",
"queueLimit":10 // Optional: the max amount of songs in queue. Defaults to 0
}
}
Server response
{
"type":"playerStatus",
"payload": {
"id":"player-id"
"name":"player-name"
"status":{
"current": {
"title":"Doom Days",
"artist":"Bastille",
"album":"Doom Days",
"length":140, // length of song in seconds
"artwork":"http://url-to-artwork" //Optional
"metadata":{/**additional metadata**/>} //Optional
},
"progress": 130, // current timestamp in seconds
"playing": true, // current play state
"queue": [
{/** Song **/},
…
] // the list of queued up song
}
}
-
subscribe
First, subscription must be requested to a particular player
by their id, after that server will notify about change that
occurred in the player status.
If player becomes unavailable - subscription message with status field set to null will be sent
See also: Player status payload formatting
Client request
{
"type":"subscribe",
"payload": {
"id":"id-of-a-player",
"queueLimit":10 // Optional: the max amount of songs in queue. Defaults to 0
}
}
Server responses
{
"type":"subscription",
"payload": {
"id":"player-id"
"name":"player-name"
"status":{
"current": {
"title":"Doom Days",
"artist":"Bastille",
"album":"Doom Days",
"length":140, // length of song in seconds
"artwork":"http://url-to-artwork" //Optional
"metadata":{/**additional metadata**/>} //Optional
},
"progress": 130, // current timestamp in seconds
"playing": true, // current play state
"queue": [
{/** Song **/},
…
] // the list of queued up song
}
}
-
unsubscribe
Removes subscription from player specified by its id
Client request
{
"type":"unsubscribe",
"payload":"player-id"
}
-
subscriptionStatus
Returns the status of a subscription
Client request
{
"type":"subscriptionStatus",
"payload":"player-id"
}
Server response
{
"type":"subscriptionStatus",
"payload":{
"id":"player-id",
"subscribed":false //status of the subscription
}
}
-
subscriptions
Return all of the statuses for the players connected to server
Client request
{
"type":"subscriptions"
}
Server response
{
"type":"subscriptions",
"payload":[
"player-id-1",
"player-id-2",
…
]
}
-
statusChange
Set the status change of player specified by id
See also: Player change payload formatting
Client request
{
"type":"statusChange",
"payload":{
"id":"player-id",
"current": {
"title":"Doom Days",
"artist":"Bastille",
"album":"Doom Days",
"length":140, // length of song in seconds
"artwork":"http://url-to-artwork" //Optional
"metadata":{/**additional metadata**/} //Optional
},
"progress": 130, // current timestamp in seconds
"playing": true, // current play state
"queue": [
{/** Song **/},
…
] // the list of queued up song
}
}
-
queueUp
Add songs to the queue
Client request
{
"type":"queueUp",
"payload":{
"id":"player-id",
"position":0, // position in queue where to insert new song
"songs":[
{/**Song**/},
…
]
}
}
-
serviceToken
Store refresh token to a music service on the server to be transfered to different clients. New values will override previous set for such service
If you want to invalidate service's token send null as a refresh token
Client request
{
"type":"serviceToken",
"payload": {
"service":"name-of-a-service",
"token":"refresh-token-to-be-synced"
}
}
-
tokenTransfer
Transfer currently saved service token to a list of specified players. If token sent is undefined or null currently set player token will be invalidated
Client request
{
"type":"tokenTransfer",
"payload": {
"service":"name-of-a-service",
"ids":[
"id-of-a-player1",
"id-of-a-player2"
]
}
}
3. Player WS API specification
Player API is simular to client one in that requests and responses have same JSON formatting.
For clinet requests:
| Field Name |
Possible values |
Description |
| type
| string
| Request type
|
| payload?
| Any
| The additional information to process request
|
And for server responses:
| Field Name |
Possible values |
Description |
| type
| string
| Type of a message
|
| payload
| Object
| The response payload
|
Yet there is still a difference. Players must provide heartbeat messages
and respond to ping requests with their current status. Heartbeat messages should be sent
every N seconds where N is specified in the initial player registration server response.
See also: Player status formatting for player requests
Server ping request
{
"type":"ping"
}
Client pong response
{
"type":"pong",
"payload":{
"current": {
"title":"Doom Days",
"artist":"Bastille",
"album":"Doom Days",
"length":140, // length of song in seconds
"artwork":"http://url-to-artwork" //Optional
"metadata":{/**additional metadata**/} //Optional
},
"progress": 130, // current timestamp in seconds
"playing": true, // current play state
"queue": [
{/** Song **/},
…
] // the list of queued up songs
}
}
Client heartbeat message
{
"type":"heartbeat",
"payload":{
"current": {
"title":"Doom Days",
"artist":"Bastille",
"album":"Doom Days",
"length":140, // length of song in seconds
"artwork":"http://url-to-artwork" //Optional
"metadata":{/**additional metadata**/} //Optional
},
"progress": 130, // current timestamp in seconds
"playing": true, // current play state
"queue": [
{/** Song **/},
…
] // the list of queued up songs
}
}
Player registration
Another difference to client API is that players must first send registration request to access any of the
player APIs. Server response will contain the heartbeat time interval and assaigned unique player ID.
Registration request
{
"type":"register",
"payload":"player-name" //Visible name of a player
}
Registration response
{
"type":"register",
"payload": {
"id":"newly-assigned-player-id",
"interval":30 //The interval at which heartbeat messages should be sent
}
}
If heartbeat or pong (ping response) messages are not recieved,
player will be unregistered, and the cooresponding message will be transmitted:
Unregistartion event
{
"type":"unregister"
}
Responding to remote change
Additionally player must take into consideration server "statusChange" calls.
When such message is recieved, player should change internal state according to message,
and respond with its status. Be aware that statusChange messages could be partial
(eg. when only play state should change every other field could be ommited)
If player initiated change (eg. user on the local machine changed song manually),
player should send "statusChange" message to keep server and clients in sync.
Additionally, on music skip or when playback continuue to the next song,
"statusChange" message should be sent immidiately after.
See also: Player change formatting for player requests
Server "statusChange" event
{
"type":"statusChange",
"payload":{
"current": {
"title":"Doom Days",
"artist":"Bastille",
"album":"Doom Days",
"length":140, // length of song in seconds
"artwork":"http://url-to-artwork" //Optional
"metadata":{/**additional metadata**/} //Optional
},
"progress": 130, // current timestamp in seconds
"playing": true, // current play state
"queue": [
{/** Song **/},
…
] // the list of queued up songs
}
}
Client response
{
"type":"statusChange",
"payload":{
"current": {
"title":"Doom Days",
"artist":"Bastille",
"album":"Doom Days",
"length":140, // length of song in seconds
"artwork":"http://url-to-artwork" //Optional
"metadata":{/**additional metadata**/} //Optional
},
"progress": 130, // current timestamp in seconds
"playing": true, // current play state
"queue": [
{/** Song **/},
…
] // the list of queued up songs
}
}
Token transfer
Server can promt player to get a new refresh token for a service specified.
If current token is invalid, player can send statusChange
with a service info field for a service set to 1.
Server "tokenTransfer" event
{
"type":"tokenTransfer",
"payload":{
"service":"service-name",
"token":"refresh-token"
}
}


module Query:sig
..end
Domain specific language for constructing queries.
Currently only a select query is supported.
Currently, the expression language permits construction arithmetic and logical expressions on the base types (int, float, str and bool).
type'a
t ='a Ogre.query
type
exp
logical expression language, defined as
exp ::= str `string` | int `int64` | float `float` | bool `bool` | `'a attribute`.(`'b field`) | `'b field`.[`int`] | exp <bop> exp | <uop> exp bop ::= <aop> | <lop> | <cop> uop ::= not aop ::= + | - lop ::= || | && | ==> cop ::= < | > | = | <> | <= | >=
In the grammar above, the names delimited with backticks represent
types of OCaml values, that should be passed at these syntactic
locations (sort of an unquoting), for example, str "hello"
is
an expression, as well as student.(gpa)
assuming that
student
is a value of type 'a attribute
and gpa
is a field
of type 'b field
.
Not all expressions are well-formed, as they also must obey to the typing rules. The typing rules are simple (informally):
0. x <bop> y
is wff if x
and y
are of the same type;
1. x.(y)
is wff if y
is a field of attribute x
;
2. x <aop> y
is wff if x
and y
are float or int;
3. not x
is wff if x
is bool
4. x <lop> y
is wff if x
and y
are bool
5. x <cop> y
has type bool.
type
join
join statement.
The join
statement is a list of equality classes. Each
equality class defines a query constraint, requiring all
elements of the class to be equal. The elements of the class are
field variables, constructed with the field
function. There
are two kinds of the field variables:
field y ~from:x
.field y
.A fully qualified variable matches only with the corresponding field expression, e.g., an equality class
[field teacher ~from:student; field id ~from:teacher]
emposes a constraint student.(teacher) = teacher.(id)
, and is
roughly equivalent to the SQL's
INNER JOIN teacher ON student.id = teacher.id
Note: it is OK to use where
clause instead of the join
clause to join attributes, if it makes the query more
readable. There is no performance penalty.
The unqualified variable matches with the same fields ignoring
the attribute name, for example, an equality class field
, will impose an equality constraint on values from all
classidclassid
fields of the selected attributes. Given a concrete
select query:
select (from student $teacher) ~join:[[field classid]]
a constraint student.(classid) = teacher.(classid)
is
constructed. Another way to construct the same selection is:
select (from student $teacher)
~where:student.(classid) = teacher.(classid)
type 'a
tables
a selection of attributes.
The tables clause can be constructed using the following grammar:
tables ::= from attr | <tables> $ attr
In other words, there are two constructors, a prefix from
, and an infix
attrattr1 $ attr2
, e.g.,
from students $ teachers $ classes
val select : ?where:exp ->
?join:join list list -> 'a tables -> 'a t
select ~where ~join (from t1 t2 ... tm)
selects attributes
t1
, t2
, ..., tm
, join them by the fields specified in the
join
clause, and filters those that satisfy the condition
defined with the where
clause.
Examples:
Select all students that has the GPA rate greater than 3.8.
select
~where:(student.(gpa) > float 3.8)
(from students)
Select all students and their corresponding teachers, that have a GPA greater than 3.8 (assuming that teacher is a foreign key to the table of teachers).
select
~where:(student.(gpa) > float 3.8)
~join:[[field teacher ~from:student; field id ~from:teacher]]
(from students)
You may notice, that the select
query lacks the SQL's WHAT
clause, i.e., it is not possible or needed to specify columns. The
reason for this, is that the query used as a value that is
passed to some command constructor, (e.g.,foreach
), that can
work with fields individually, e.g., the following is a complete
correspondance of the SQL's:
SELECT name FROM students WHERE gpa > 3.5
foreach Query.(select
~where:(student.(gpa) > float 3.8)
(from students))
~f:(fun s -> return (Student.name s))
It is nearly three times as long, but in return it is type-safe, and composable.
val from : ('a, 'b -> 'c) Ogre.attribute -> (('a -> 'r) -> 'r) tables
from attr
adds an attribute attr
to the query. An attribute
can be referenced in the query if it occurs in the from
clause. Otherwise the query is not well-formed.
val ($) : ('a -> 'b -> 'r) tables ->
('b, 'c -> 'd) Ogre.attribute -> ('a -> 'r) tables
attrs $ attr
appends an attribute attr
to the sequence of
chosen attributes attrs
.
val field : ?from:('a, 'b -> 'c) Ogre.attribute -> 'd Ogre.field -> join
field name
creates an unqualified join variable.
field name ~from:attr
creates a qualified join variable.
See the Ogre.Query.join
type description, for the explanation of the
join
expressions and joining.
module Array:sig
..end
Defines a subscripting syntax for creating field variables.
module String:sig
..end
Defines field subscripting syntax.
val str : string -> exp
str x
creates a string constant.
val int : int64 -> exp
int x
creates an integer constant
val bool : bool -> exp
bool x
creates a logic constant
val float : float -> exp
float x
creates a real number constant.
val (&&) : exp -> exp -> exp
x && y
conjunction
val (||) : exp -> exp -> exp
x || y
disjunction
val (==>) : exp -> exp -> exp
x ==> y
implication.
Be aware that the precedence of OCaml operator ==> is higher than a common precedence of the implication operator in mathematics.
That means, that an expression x && y ==> x && z
is parsed as
x && (y ==> x) && z
.
The rule of the thumb is to always put parenthesis in an expression, that has an implication, as even if you're aware of the precedence issue, it is not known to a reader of your code, whether you were aware, or wrote this code by a mistake.
val not : exp -> exp
not x
logical negation.
val (<) : exp -> exp -> exp
x < y
less than
val (>) : exp -> exp -> exp
x > y
greater than
val (=) : exp -> exp -> exp
x = y
equality
val (<>) : exp -> exp -> exp
x <> y
nonequality
val (<=) : exp -> exp -> exp
x <= y
less than or equal
val (>=) : exp -> exp -> exp
x >= y
greater or equal
val (+) : exp -> exp -> exp
x + y
summation
val (-) : exp -> exp -> exp
x - y
subtracting


This is a paragraph of test followed by a list. This is a paragraph of text followed by a list. This is a paragraph of text followed by a list. This is a paragraph of text.
This is a test
This is a test
A
B
C
test
test
test
test
test
Another list
Quote me me me me
Quote me me me me
Quote quote me
Normal paragraph
import os
os.path.listdir()
eins
zwei
test
This is a list item with two paragraphs.
This is the second paragraph in the list item. You're only required to indent the first line. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Another item in the same list.
* * Test that this does not recurse


Profile Form
Preprocessing Table Records
| Document | Term | Stemmed | Frequency | |
|---|---|---|---|---|
| {{ record[0] }} | {{ record[1] }} | {{ record[2] }} | {{ record[3] }} | {{ record[4] }} |
No records to show...
{% extends 'admin/master.html' %}
{% block body %}
{{ super() }}
{% if current_user.is_authenticated %}
No records to show...
Preprocessing
Case Folding, Tokenizing, Filtering (Stopword Removal) and Stemming
Profile Form
Preprocessing Table Records
{% for record in tableRecords %}
Document
Term
Stemmed
Frequency
{% endfor %}
{{ record[0] }}
{{ record[1] }}
{{ record[2] }}
{{ record[3] }}
{{ record[4] }}
Authentication
This example shows how you can use Flask-Admin in an admin template,
here I used AdminLTE and Flask-Security for authentication.
You can register as a regular user, or log in as a superuser with the following credentials:
email: admin
password: admin


VELVET GOLDMINE (director/writer:Todd Haynes; screenwriter: James Lyons; cinematographer: Maryse Alberti; cast: Ewan McGregor (Curt Wild), Jonathan Rhys-Meyers (Brian Slade), Toni Collette (Mandy Slade), Christian Bale (Arthur Stuart), Eddie Izzard (Jerry Divine), Emily Woof (Shannon), Michael Feast (Cecil), 1998)
Reviewed by Dennis Schwartz
I'm not a fan of glam rock, my musical partialities are more in the line for classical music or '60s rock. Glam is the kind of music that is pretty to look at for short periods of time but when more closely scrutinized could turn ugly. That is both the virtue and problem with this entertaining and stylish celebration of the rock music scene by Todd Haynes (Safe/Poison), that has the right musical feel but offers no depth and little character development in its story. This fictionalized story is a thin disguise for David Bowie's bio, and it was able along the way to rip-off the Citizen Kane way of telling a biography in a fictionalized way. And if that weren't enough of a splash in the water of cause célèbre, Haynes throws a bit of the Oscar Wilde biography into the fiction presented. He, of course, can be assumed to be the patron saint for all such "rock dandies."
Glam rock star Brian Slade (Jonathan Rhys Meyers), who acts catlike as a character named Maxwell Demon, predicts his own death onstage. The death is found out to be a hoax and his career is ruined. It is 1984, ten years later than that incident, and a New York newspaper editor assigns a reporter Arthur Stuart (Christian Bale) to see if he can dig up what happened to the rock star, sending him back to London, the reporter's place of birth and early tribulation.
The reporter interviews his first manager, who is seen in a wheelchair (remember Joseph Cotten in Citizen Kane!), as he tells of how he was dastardly replaced by the flamboyant manager Jerry Divine (Brit comedian-Izzard), and then he interviews the star's ex-wife Mandy (Collette), now a drunken burnout, as he tries to unravel the mysteries of the enigmatic performer. What he finds is a show biz of glitter glamor, a musician wearing a mask so he can become who he is, the coming out party for a bisexual revolution, the wreckage of a marriage and his career (similar to Orson Welles's Hollywood career going down after Citizen Kane), and the great love affair between Brian and an American performance artist, the junkie Curt Wild (Ewan McGregor), who influences that style of performing onto Brian, seeing dollar signs in Brian's eyes instead of the love that was in Brian's eyes. It resulted in a ménage à trois, among Brian, Curt, and Mandy, taking place in the swinging London of the 1970s, with a most unsentimental view of their lifestyle being presented.
The film works best as a music video and if you like the music, you'll probably love the film. As a film it was a colorful spectacle, wonderfully performed, very energetic, and it had some witty dialogue; but, it failed to tell a cohesive story and failed to capture what that period of the 1970s was about. It was hard to tell what Haynes was trying to expose or tell about this fictionalized Bowie-Ziggy Stardust-like character. The film made no comment about the money angle in the business, or the public- or- the private thoughts of the musician. It was all vague and superficial, I suppose, just like glamor is. Besides, I don't really know how worthwhile it is to uncover his mystery life-like who cares! Anyway, he wasn't made into an interesting character by Slade's characterization of him-I think David Bowie is a much more interesting character than Brian Slade. When Mandy explains his downfall by saying he got lost in a lie, it is hard to feel any sympathy for him or for those he took down with him.
If you don't mind having an empty feeling after seeing a film, then this one could be your kind of nourishment. There was some attempt to bring a deeper storyline into focus, as the sexually inhibited reporter assigned to the story was actually in attendance on the night of Slade's hoax, and he was shown in flashback to be influenced by the performer's sexual freedom, discovering his own bisexuality through the performance. The suggestion made was that these performers are role models and influence many teens-for good or bad. Unfortunately, the film did not pick up on that thread of the story, as it continued on in its glitzy musical style. The last serious thing it said, comes about in a conversation between Arthur and Curt in a morbid neighborhood bar, where Curt says:"We set out to change the world- but just changed ourselves." Arthur says, "What's wrong with that?" Curt, "If you don't look at the world." I guess something must have happened to the two performing artists along the way, but it must have happened offscreen, because it didn't happen onscreen.
REVIEWED ON 1/19/2000 GRADE: C+
Dennis Schwartz: "Ozus' World Movie Reviews"
http://www.sover.net/~ozus
<EMAIL_ADDRESS>© ALL RIGHTS RESERVED DENNIS SCHWARTZ
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


Arcade Games
An arcade game or coin-op game is a coin-operated entertainment machine typically installed in public businesses such as restaurants, bars and amusement arcades.
An arcade game or coin-op game is a coin-operated entertainment machine typically installed in public businesses such as restaurants, bars and amusement arcades.


Summary
Stats generated on November 11, 2015 00:00:00.During the last 14 days, a total of 42 different nicks were seen on #gofigure.
Activity: Last 14 Days
Average Daily Activity: Last 14 Days
Most Active Users
| Nick | Number of lines | Avg. words per line | Avg. chars per line | Last seen | Random quote |
|---|


Techstars Startup Weekend Latinx in Tech aims to inspire potential entrepreneurs in the Latinx community to breathe life into their ideas and learn how to bridge the gap from ideation to prototype with customer validation.
Our main focus is on tech solutions, but we welcome all ideas that will help to create a futurefueled by Latinx leadership and experiences.
We're here to help as a community and as family. We are investing in your success and this event is for everyone and anyone who is a part of the Latinx community or a strong ally. We welcome everyone, regardless of your professional background. We foster safe spaces for full expression of yourself.
The dedicated teams on the ground make this possible as well as local sponsors! Learn more about them here:
{{#each data.cities}}{{name}}
{{/each}}
Startup Weekends are all about action and less talk. Let's continue to build community that is rich in diversity, perseverance, and innovation together. Let's do this!
#latinxtech #SWLA #SWOAK #SWCHI #SWMIA#SWNYC
The complex intersectionalities of the Latinx (La-teen-ex) population in the U.S. coupled with their increasing technology consumption make this ethnic group one of the most misunderstood, yet powerful communities of our time. By 2060, over a quarter of the entire U.S. population will be Latinx - that’s about 119MM people - representing over a trillion dollars of economic power.
As of 2013, Latinx Millennials and Gen-Z comprised 58% of the Latinx population. These groups are proving to be a game-changing consumer segment across markets because of the way they are influencing their communities across race, culture, politics, gender identity and language -- case in point, the term Latinx.
Imagine what could happen if we gathered 500 entrepreneurially-minded Latinxs and allies over 54 hours, in 5 different cities, to identify and design technology solutions to problems disproportionately facing the U.S. Latinx community? What if we facilitated mentorship by some of the most talented technologists, business innovators, and prominent investors?
This Startup Weekend event is part of a 5-city Latinx in Tech campaign going on throughout Hispanic Heritage Month. Join us in this special edition of Startup Weekends across the US to prove that we can all learn, work, and create together in order to deliver better outcomes for our communities.
Startup Weekend Latinx is happenings thanks to the work and support from the following organizations.
Contact us if interested in sponsoring and volunteering opportunities.
Need help to attend? fill out this form to request scholarship information.


TickedOff Web Portal
Home
Reskin
Manage Accounts
(current)
Educational Material
Manage Questionnaire
(current)
Admin
Profile
Logout
Profile
*These fields are required
*
Name:
*
Email:
*
Current Password:
New Password:
The new password must be at least 8 characters long and contain at least an uppercase letter, a number and a symbol
Verify New Password:
Update
Back
Saved!
User profile changes have been saved.
Are you sure?
Are you sure that you want to apply these changes to your profile?
Error
Password fields do not match.
The new password does not meet required criteria.
Please make sure that all required fields are filled in.
Are you sure you want to logout?


Examples of various configuration settings
Acknowledgements: Original
STIX2 bundle
was created by
Caitlin Huey
.


Multithreading is the capacity to execute simultaneously multiple executions independently from each other. This feature is essential in distributed systems for many reasons. For example, threads can be used to service different clients requesting the same service independently, so they do not interfere with each other. In this section, we present the multithreading support of OiL and how it is used.
Lua does not provide standard support for multithreading. However, it provides the concept of coroutines, which can be used to implement a cooperative multithreading infrastructure. Unlike preemptive multithreading, as provided by Java or POSIX Threads, the execution switch between threads does not occur automatically. Instead the code executed by the coroutine must explicitly signal for execution switch by operation <%=link"LuaManual.coroutine.yield"%>. For further information about Lua coroutines, see <%=link"LuaManual.Coroutines"%>.
Coroutines provide means to create independent execution threads, however it is up to the application to manage the execution of these threads. To perform this management, OiL uses a coroutine scheduler. The scheduler keeps a collection of all the threads of the system. These threads are then scheduled for execution, in such way that whenever a coroutine yields its execution, the scheduler chooses another coroutine for execution following a round-robin algorithm.
Since the coroutine scheduler is not part of the standard virtual machine of Lua, it must be created and started by the application.
This can be done by operation <%=link("Reference.oil.main")%> that creates and initiates the execution of the scheduler with a single thread registered that executes the function mainbody
provided as parameter.
After this operations is called, other threads can be created with operation <%=link("Reference.oil.newthread")%> that creates new coroutines to execute a function.
Since the thread scheduler is not integrated to the underlying operating system, any blocking system call performed by a thread will eventually suspend the execution of the application as a whole since the coroutine does not yield the execution back to the scheduler. This is particularly true for file operations that suspend the entire execution of the application regardless of the number of other independent threads that might be ready to execute.


--- layout: post title: FallettiVision date: 2006-03-16 00:00:00 categories: business mobile ---
Mr Falletti, Commercial Director here at FP, has been blogging for a little while now. Well worth a read - particularly if, unlike me, you can read Italian and tell me what he's saying...


--- layout: post status: publish published: true title: "肠胃炎的食疗, for Xiaoni" author: Leask author_login: leask author_email<EMAIL_ADDRESS>author_url: https://leaskh.com wordpress_id: 451 wordpress_url: http://leaskh.wordpress.com/2006/10/17/%e8%82%a0%e8%83%83%e7%82%8e%e7%9a%84%e9%a3%9f%e7%96%97-for-xiaoni date: '2006-10-17 10:21:35 +0800' date_gmt: '2006-10-17 10:21:35 +0800' categories: - Life tags: [] comments: [] ---


Cylinder Capacity: 998 cc
Power: 147 kW (200 PS) at 13.500/min
Transmission: 6-speed
Brakes/Front: Hydraulic dual disc, Ø 320 mm
Brakes/Rear: Hydraulic single disc, Ø 220 mm
Dry/Wet Weight: 181 kg / 199 kg


Saturday, September 13, 2003
When I was a kid, the source of universal knowledge at home was
the set of dusty encyclopedias that my Mom inherited from somewhere. Today, it's
the Internet, via Google. That in itself makes Google the fulfillment of most
sci-fi novels' description of the the-store-of-all-human knowledge (I wish the
text of all books were up, but that'll happen in time...).
Anyway, it
didn't hit me just how comprehensive Google was 'til I typed in '"Joe Grammer"
wife' yesterday (I was calling and wanted to be prepared to address his very
nice wife by name in case she answered the phone). In 0.39 seconds, Google gave
45 results, the 3rd of which contained Joe's wife's name! It was Joe himself
who'd mentioned his wife's name in a mailing list post but still, that's pretty
damn scary...


6-pack
Clean. Simple. Energy.
Everything you need with nothing you don’t.
Caffeine sourced from all natural guayusa tea and guarana.
Our unique blend of caffeine with L-Theanine gives you energy without jitters or crash
Suggested use:
- Pre-workout
- Pre-party
- Studying


Hi guys!
Can you advice me what's the better way to send historical data (15 minutes consumption for over 1 year) to EmonCMS?
All that data are in .xls (excel) files.
Is it possible to see that historical data in a graphic? As far as I understand, the feeds only update with new data arrived after the creation of the feed.
For example, if I've sent data from April 12 to today, is there a way to create a graphic now to see that data?
Edit: Is there any local with all the documentation for emoncms? I'm also trying to install some modules but all the info in the github of the modules are for linux users and I'm on windows, so I'm failing miserably on installing those modules...
Re: [How to] Send historical data. Create historical feeds
Hi Bruno,
There isn't currently an off the shelf solution for uploading historical data, The script discussed in your "Import .csv files" thread could be used to present data of any age to emoncms, the .xls files are easily converted to a csv format the script can read or the script can be altered to suit a raw csv file.
The difficulty is at the emoncms end, feed data of -5years to +48hrs can be accepted by emoncms but it can only write to feeds that have a start point earlier than the data being saved. So if you where to be be able to create a feed with a backdated meta file it might be possible to save data up to 5 years old.
This isn't the case with the low-write version of emoncms, you could manually create a feed from historic data for it to read but part of the "low-write" changes prevent any data being overwritten or backdated beyond the last entry.
As a global rough rule of thumb emoncms modules need to be copied or cloned into the "Modules" folder of emoncms and then just go to admin -> update&check. any module specific instructions are normally explained in the modules readme.md.
Regards using a windows server, I'm sure it is just a capable as a linux server but I think the difficulties you have experienced to date are indicative of things to come if you persist with windows. The majority of users use linux for emoncms it's certainly developed on linux so the support from the community will be linux biased, and getting answers to windows questions maybe difficult.
Paul
Re: [How to] Send historical data. Create historical feeds
Do you know how to create such feed?
We'll probably set a new server in linux (not a shared server) to be able to have access to a linux command line and install some modules using the readme guidelines. Hopefully that server comes with redis from default :p
Re: [How to] Send historical data. Create historical feeds
Not off-hand, but I wouldn't expect it to be too difficult.
Perhaps you and Marc( mpruessmeier ) could collaborate as I believe he is looking for something very similar in his "Post Processing" thread.I have not long ago added a couple of links to hopefully help him find a solution.
I would be happy to chip in if I can but I'm busy working on something else right now and I do not have the required knowledge (or time to research it) to do it for you.right now.
Paul
Also back on your original thread Frankster ( fversteegen ) is trying to do the exact same thing too, using your script.
Re: [How to] Send historical data. Create historical feeds
Thanks Paul :)
Having the ability to create new feeds which use past data is something that I believe is very important and that I'll need in the future (for example, if need to create a new ratio - kWh/ºC or something - I most likely wanna see the past ratio not only the future ones).
Hope this can be done "easily" :D
Re: [How to] Send historical data. Create historical feeds
In fact if you use a PHPtimeseries you may find it easier as there is no meta file and so you just need to "insert" old data into the system created feed.
Take a look at this python phptimeseries reader as a starting block or there is this (similar ) reader written in PHP or this PHPfina to PHPtimeseries converter that could be combined to create a "CSV to PHPtimeseries converter" maybe.
Paul
Re: [How to] Send historical data. Create historical feeds
Just saw you had posted while I was writing, It is a feature that many people may find useful, I think the reality is there is not (currently) enough demand for in-built past data conversion, but being able to add historic data as a one time upload is a huge step in the right direction.
The need to to historic calculations is exactly what Marc requires so as I pointed out in his thread currently the best (only) way to do that is externally. But once you have cracked it once it will be easy to replicate, possibly even automate or implement into a module perhaps.
Paul


Storyboard UniDirectionalAssocJson
adding flipbook to protocol changes.
SDMLibJsonIdMap idMap = (SDMLibJsonIdMap) BigBrotherCreator.createIdMap("#"); FlipBook flipBook = idMap.createFlipBook(); BigBrother bigBrother = new BigBrother(); idMap.put("#bb", bigBrother);
extend uni directional assco with objects and check flipbook for change protocol


Shop MY MARKETS Consumer Electronics packaging&printing apparel machinery Beauty & Personal care kitchen vehicles


---
layout: post
title: Oriflame Giordani Gold Body Cream Review
tags:
- Oriflame
status: publish
type: post
published: true
meta:
_edit_last: '2'
_yoast_wpseo_linkdex: '91'
_yoast_wpseo_focuskw: Oriflame Giordani Gold Body Cream Review
_yoast_wpseo_title: Oriflame Giordani Gold Body Cream Review
_yoast_wpseo_metadesc: Oriflame Giordani Gold Body Cream Review. Fragranced moisturizer
which calms and releases stress and gives soft supple skin.
_yoast_wpseo_meta-robots-noindex: '0'
_yoast_wpseo_meta-robots-nofollow: '0'
_yoast_wpseo_meta-robots-adv: none
_yoast_wpseo_sitemap-include: ! '-'
_yoast_wpseo_sitemap-prio: ! '-'
_yoast_wpseo_canonical: ''
_yoast_wpseo_redirect: ''
_thumbnail_id: '5849'
_yoast_wpseo_metakeywords: ''
---
Oriflame Giordani Gold Body Cream Review
I have a good news, its FRIDAY!!!, this would be my first complete free weekend after 1.5 months. Seriously I have so many plans.. I have to go decor shopping, make some good use of ongoing sales, arrange house, watch TV etc etc. Coming to the product under spotlight today is the Oriflame Giordani Gold Body Cream. I have using this cream for the last 2-3 months and quite happy with it, so thought of sharing this today.
Price: Rs.449 for 250 ml
The packaging is tub and bulky(which I usually don't prefer), but I like this one. A semi translucent jar with a golden lid does make the packaging look good. The cream consistency is light and the texture is smooth. It takes a while to get absorbed into the skin and the fragrance is just awesome.
Fragrance is on fruity notes. Anyone who does not like fruity smell, will not like this cream. Fragrance has to be the highlight of this cream, and I keep it as my night moisturizer. It calms and does make me feel relaxed.
Best part is that the fragrance lingers on the skin for good 2-3 hours.
Its not a a heavy dose body cream, and you(Normal skin) might have to apply every 5-6 hours. I once used it as hand cream, but left me with sweaty palms, so its strictly not meant as hand cream. This cream can be used both for winters and summer.
This is my night time cream and I love it. Would recommend only to those, who love a dose of fragrance while sleeping, to relieve the stress and enjoy a good night sleep.
Have you tried the Oriflame Giordani Gold Body Cream ?
What plans for weekend ?


minikube provisions and manages local Kubernetes clusters optimized for development workflows.
Use "minikube <command> --help" for more information about a given command.


Chart Caption
Row0Col0
col1
col2
col3
row1
$1,000
$700
$300
row2
$900
$700
$600
row3
$800
$600
$500
row4
$700
$500
$400
row5
$1,000
$800
$700


Many people think that they cannot help this process because they do not have enough knowledge, but this is wrong because they can help porters work better and faster. Test submitted updates or new ports which are posted on the ports mailing list. By doing this, you reduce the latency of commits and also increase the number of ports to be committed. Many ports are not committed because of lack of testing.
The ports tree is developed against -current; there is no guarantee that new ports or updates will work correctly on the other branches. This means you should upgrade your system and ports tree to -current. Instructions on how to do this can be found at the following current page. It is also recommended that you subscribe to the ports and ports-changes mailing lists. This way, you will be notified about new or updated ports and about changes in the ports tree.
/usr/ports/mystuff/
directory and test from there.
Updates are generally a diff against the -current ports tree, so it is best
to copy the port to mystuff/
and apply the diff to prevent tree
breakage.
If the previous version of the port is installed, it is a good idea to remove
it before building the newer version to avoid side effects, like symbols
missing from the older version of a library.
Step-by-step building is needed to verify that every target, see ports(7), is achieved correctly:
MASTER_SITES
specified to make sure they
are all valid sources.
distinfo
file.
To download the distfiles from all defined sources and to check their
checksum you can run this command line from within the directory of
the port:
$ for ms in $(make show=MASTER_SITES); do make clean=dist; make fetch checksum MASTER_SITES=$ms; done
prepare
target is automatically invoked
before extract
and should install all {BUILD,LIB}_DEPENDS
for this port (such as
bzip2).
patches/
directory.
USE_LIBTOOL=gnu
which uses a patched version from ports.
GNU libtool is notorious for undesired 'features' on OpenBSD, so
if the port does not build with the libtool from base, that should
be fixed and there should be a XXX comment about why in the ports
Makefile
.
${WRKBUILD}/CMakeCache.txt
${WRKBUILD}/CMakeFiles/CMakeError.log
${WRKBUILD}/CMakeFiles/CMakeOutput.log
SEPARATE_BUILD
variable to 'Yes'
and test if the build still works.
{BUILD,RUN}_DEPENDS
, check that TEST_DEPENDS
is
defined correctly.
/usr/local
.
LIB_DEPENDS
or WANTLIB
.
The result should be empty.
The above variables should be inspected when you see lines starting "Extra"
or "Missing."
pkg/PLIST*
and/or
pkg/PFRAG*
are wrong.
INSTALL
script works correctly, and does
not overwrite any files in /etc
.
/etc
.
@extra
and/or
@extraunexec
annotations in pkg/PLIST*
.
Remaining pkg/
files like DESCR
and
MESSAGE
should be checked for grammar and typos.
Paragraphs should be formatted using
fmt(1) and wrapped at 80 characters.
Example:
# make install 2>&1 | /usr/ports/infrastructure/bin/portslogger .This will redirect the output into a log file located in the current directory.
Finally, once the port is found to be okay, other ports depending on it should
also be tested, to check whether they are still working correctly.
The show-required-by
make target will help to find other ports
which depend on the current one.
Makefile
for correct dependencies, typos,
incorrect links, useless or missing variables, correct licensing and categories.
Those who are more skilled can help by examining patches, as well as
providing diffs to correct bugs, add flavors, or other enhancements.
These diffs should be done with the -uNprx CVS
options.
cvs diff -uNp
can also be used to generate patches against the CVS
repository.


XML\XSL Viewer
Select an XML data file and an XSL stylesheet
with which to view it. The results will appear in the frame at left.
XML data files
auction1.xml4
auction2.xml4
auction3.xml4
The XML data displayed here is a fragment from the Auction Demo
available with the Microsoft MSXML Parser.
XSL Stylesheets
raw-xml.xsl4
bids-table.xsl4
bids-table2.xsl4
sort-bidder.xsl4
sort-bidder-.xsl4
sort-bidder-price.xsl4
sort-bidder-price-.xsl4
summary.xsl4
price-graph.xsl4
Stylesheet source can be viewed with the "raw-xml" stylesheet by clicking here.
Click on a data file to resume viewing XML data.
© 2000 Microsoft Corporation. All rights reserved. Terms of use.


Laboratory 6 - string operations
Operands comparisons
CMP d,s
it compares the value of the operands (the operands are not modified) - fictive substraction d - s
it modifies the flags OF, SF, ZF, AF, PF and CF
TEST d,s
fictive logical operation d AND s
it modifies the flags OF, CF, SF, ZF, PF
Conditional jumps
When we want to compare two signed numbers, we should use "less than" and "greater than", and when we want to compare unsigned numbers, we should use
"below" and "above".
Conditional jump instructions
Loop instructions
[instruction] label
Assembly language 80x86 has special instructions for performing loops: LOOP, LOOPE, LOOPNE and JCXZ
LOOP instruction has the effect of reexecuting the block of instructions starting at label, while the value of register CX is different than 0.
First it decrements the register CX, then it makes the test and possibly the jump. The jump is "short" (max. 127 bytes).
LOOPE instruction (LOOP while Equal) is different than LOOP regading the end condition, the loop ending whether if CX=0 or if ZF=1.
When using LOOPNE (LOOP while Not Equal) the loop ends if CX=0 or ZF=0.


{% extends "horizon/common/_modal_form.html" %} {% load i18n %} {% block modal-body-right %}
{% blocktrans trimmed %}
"Manage" an existing volume from a Cinder host. This will make the volume visible within
OpenStack.
This is equivalent to the cinder manage command.
{% endblocktrans %}


You must set the position and size of each widget after its created, or it won't be visible. The simplest runtime approach is to set the position and size of the widgets during class initialization once.
You could use the resource editor and set the position and size at compile time. Or you could use the class AspectSizable that has the needed functions to set the position and size of a widget at runtime as most of the samples do. ( All widgets derive from AspectSizable. ) Or you may be able to use the emerging Sally IDE which has the ability to generate SmartWin++ windows. A new alternative is to use the Anchors class.
In order to respond to a changing runtime situation, you can layout the widgets at runtime. Fixed positions and size become tedious to implement, especially as the program design changes, and they do not adapt well to a changing runtime situation. You will run into cases in which screen space is either wasted or crucial data is hidden. The program may not adapt well to smaller screen sizes such as are seen in mobile devices.
Typically you create all the widgets in an init function, call a layout
function, and then pass a member function to onSized( func ) so that layout is
called for each user resize event. Note that you don't put the onSized()
call before you create the widgets, or the resize logic will encounter NULL
widgets.
void init()
{
Creation here
layout();
onSized( &HelloWinClass::isResized );
}
void isResized( const WindowSizedEventResult & sz )
{
layout();
}
void layout()
{
Actual layout code here
}
The main issue is: How should the position and size of the widget change as the application state changes ?
There are three general approaches:
The Anchors class approach is to specify fixed sizes of various widgets,
insert them into Anchor instance with
"void addAnchored( SmartWin::Widget* widget, int anchors )"
and then just call "void resizeAnchored()" in the onSized() handler.
You can specify anchors such as AnchoredItem::left or AnchoredItem::top to
make the widgets stick to the parent's window according to the anchors.
You divide the Rectangle by generating smaller Rectangles using Rectangle generator functions.
Start with the client rectangle of the window, which can be retrieved with
getSizeClientArea(). Then use the Rectangle member functions to return other
smaller Rectangles. For example,
SmartWin::Rectangle r( getSizeClientArea().size );
Rectangle lowerHalf = r.bottom( 0.5 );
Rectangle lowright_quarter = lowerHalf.right( 0.5 );
Notice that lowright_quarter has 1/4 the area of r, and is its upper left is
positioned at the center of r. These also achieve the same result:
Rectangle lowright_quarter = r.bottom( 0.5 ).right( 0.5 );
Rectangle lowright_quarter = r.bottom().right();
Some other Rectangle functions are:
Rectangle left ( double portion= 0.5 );
Rectangle right ( double portion= 0.5 );
Rectangle top ( double portion= 0.5 );
Rectangle bottom ( double portion = 0.5 );
(The new rectangle's size is the old * portion)
Rectangle getLeft ( long x );
Rectangle getRight ( long x );
Rectangle getTop ( long y );
Rectangle getBottom ( long y );
(The new rectangle's size is the x or y value)
Rectangle row ( int row, int rows );
Rectangle col ( int column, int columns );
(Divides the rectangle into rows or columns, and returns the rectangle for the
zero based row or col. r2= r1.row( 1, 3) would give you the middle row.)
Rectangle subRect ( double x_fraction, double y_fraction,
double width_fraction, double height_fraction );
((Move left and down by x_fraction, y_fraction of the size. Make the new size
be width_fraction, height_fraction of the old size. )
Once you get the desired rectangle, you can use the widget method setSize(
Rectangle &r)
If its too much trouble to generate the rectangles, and then call setSize(),
there are combination methods that does row and column extraction and setSize
together:
void setSizeAsCol ( const Rectangle & rect, int rows, int
rownum );
void setSizeAsRow ( const Rectangle & rect, int cols, int
colnum );
If you keep dividing the rectangles into smaller rectangles until you have the desired position for each widget, you will have the #3 layout scheme.
Use the Place class, which sets the
The Place class has a empty constructor which corresponds to starting with a rectangle based at 0,0 and unlimited size. However you will normally use:
setBoundsBorder( Rectangle & rect, int border_x= 0, int border_y= 0 )
rect specifies the bounding rectangle, and border_x and border_y specify the desired inter-widget spacing. The first widget will therefore have x position of rect.pos.x + border_x.
positionToRight( Rectangle & obj ) is the fundamental routine that sets obj.pos, and internally advances the "current position" according to the obj.size. So obj.size is a input and obj.pos is an output of this function. Afterwards, obj is just the rectangle we want for a setSize( obj ); The method is to place the objects from left to right until there is not enough room in the bounding rectangle on this row, and then start a new row just below the previous row. Note that repeated calls for widgets of different sizes works with setPositionPerPlace(). You can start a new row with:
newRow()
This approach lets the widgets take advange of all the available space and the proportions of the window. For the last widget to be placed in the rectangle, there is a function that allocates all the remaining space available in the bounding rectangle:
sizeForRemainingSpace( Rectangle obj )
Like positionToRight(), it sets obj.pos and takes as input obj.size. You might do a NewRow() just before calling sizeForRemainingSpace().
But suppose you don't know what the best size should be for the widgets. Place has sizeOfCell( rows, cols, Point &Size ) that will set a size Point by dividing up the bounding rectangle into rows and columns, and also takes into account the broders set in setBoundsBorder(). So you can use sizeofCell to generate the size, and then positionToRight() to set the position. This situation is common enough that the AspectSizable implements the:
void setSizeAsGridPerPlace( SmartWin::Place & bound, int rows, int cols );
which takes a Place class and the number of rows/columns of the grid, calculates the desired size, places the rectangle, and then does the setSize() all in one call. There is a similar combined widget function that uses the existing size of the widget for placement:
void setPositionPerPlace( SmartWin::Place &bound );
So you would set the widget size in intialization code, and then in the layout
code call setPositionPerPlace(). To clarify, the difference bewteen the two is
that setSizeAsGridPerPlace() resizes the Widget into a grid cell first, while
setPositionPerPlace() preserves the existing size, and puts the widget into the
rectangle in a teletype manner: left to right, and then a new row as needed.
Are you tired of not having your text fit in the button ? Well, there is a AspectSizable function:
Point getTextSize( tstring & text )
that returns the dimensions of the text given the font used in the widget. You may need some extra padding to account for the widget itself, and you can use the widget function:
void setSizePerTextPerPlace( Place &bound, tstring &text, int extraX= 0, int extraY= 0 )
to combine the getTextSize() and setPositionPerPlace() functions. This is the layout approach #2. A wish list item is a way to scale the font according to the available size.
Notice that the Rectangle division functions are pure math in BasicTypes.cpp, the Place.h class knows nothing about widgets; it only sets a Rectangle position, and then updates per the Rectangle size it was just given. The Widget knowledgable portion remains in AspectSizeable.h, which is shared by all widgets.


http://acm.hdu.edu.cn/showproblem.php?pid=4586
Problem Description
There is a dice with n sides, which are numbered from 1,2,…,n and have the equal possibility to show up when one rolls a dice. Each side has an integer ai on it. Now here is a game that you can roll this dice once, if the i-th side is up, you will get ai
yuan. What’s more, some sids of this dice are colored with a special different color. If you turn this side up, you will get once more chance to roll the dice. When you roll the dice for the second time, you still have the opportunity to win money and rolling
chance. Now you need to calculate the expectations of money that we get after playing the game once.
yuan. What’s more, some sids of this dice are colored with a special different color. If you turn this side up, you will get once more chance to roll the dice. When you roll the dice for the second time, you still have the opportunity to win money and rolling
chance. Now you need to calculate the expectations of money that we get after playing the game once.
Input
Input consists of multiple cases. Each case includes two lines.
The first line is an integer n (2<=n<=200), following with n integers ai(0<=ai<200)
The second line is an integer m (0<=m<=n), following with m integers bi(1<=bi<=n), which are the numbers of the special sides to get another more chance.
The first line is an integer n (2<=n<=200), following with n integers ai(0<=ai<200)
The second line is an integer m (0<=m<=n), following with m integers bi(1<=bi<=n), which are the numbers of the special sides to get another more chance.
Output
Just a real number which is the expectations of the money one can get, rounded to exact two digits. If you can get unlimited money, print inf.
Sample Input
6 1 2 3 4 5 6 0 4 0 0 0 0 1 3
Sample Output
3.50 0.00
/** hdu 4586 概率dp 题目大意：给定一个骰子，有n个面，掷得i面朝上获得a[i]的money，其中有m个面掷得其中之一朝上除了获得money外，并获得再掷一次的机会 问掷一个回合获得money的期望 解题思路：（kuangbin） 设所求期望为ans 那么ans=1/N *(A[B[1]]+ans) + 1/N *(A[B[2]]+ans) + ...1/N *(A[B[M]]+ans) + 1/N A[k]+.... ans=M/N *ans+1/N*(A[1]+A[2]+A[3]+....+A[N]); (N-M)ans= A[1]+A[2]+...+A[N]=sum; 如果sum==0,答案为0.00 如果sum!=0,N-M==0 答案为inf 否则答案就是sum/(N-M); */ #include <stdio.h> #include <string.h> #include <iostream> #include <algorithm> using namespace std; int n,m; int a[1005],b[1005]; int main() { while(~scanf("%d",&n)) { double sum=0; for(int i=0;i<n;i++) { scanf("%d",&a[i]); sum+=a[i]; } scanf("%d",&m); for(int i=0;i<m;i++) { scanf("%d",&b[i]); } if(sum==0.0)printf("0.00\n"); else if(n==m)printf("inf\n"); else printf("%.2lf\n",sum/(n-m)); } return 0; }
Problem Description
There is a dice with n sides, which are numbered from 1,2,…,n and have the equal possibility to show up when one rolls a dice. Each side has an integer ai on it. Now here is a game that you can roll this dice once, if the i-th side is up, you will get ai
yuan. What’s more, some sids of this dice are colored with a special different color. If you turn this side up, you will get once more chance to roll the dice. When you roll the dice for the second time, you still have the opportunity to win money and rolling
chance. Now you need to calculate the expectations of money that we get after playing the game once.
yuan. What’s more, some sids of this dice are colored with a special different color. If you turn this side up, you will get once more chance to roll the dice. When you roll the dice for the second time, you still have the opportunity to win money and rolling
chance. Now you need to calculate the expectations of money that we get after playing the game once.
Input
Input consists of multiple cases. Each case includes two lines.
The first line is an integer n (2<=n<=200), following with n integers ai(0<=ai<200)
The second line is an integer m (0<=m<=n), following with m integers bi(1<=bi<=n), which are the numbers of the special sides to get another more chance.
The first line is an integer n (2<=n<=200), following with n integers ai(0<=ai<200)
The second line is an integer m (0<=m<=n), following with m integers bi(1<=bi<=n), which are the numbers of the special sides to get another more chance.
Output
Just a real number which is the expectations of the money one can get, rounded to exact two digits. If you can get unlimited money, print inf.
Sample Input
6 1 2 3 4 5 6 0 4 0 0 0 0 1 3
Sample Output
3.50 0.00
版权声明：本文为博主原创文章，未经博主允许不得转载。
参考：http://blog.csdn.net/lvshubao1314/article/details/43488131
(adsbygoogle = window.adsbygoogle || []).push({});
网吧不在吸烟区抽烟的不配拥有妈妈
鸣人不是只有300吗怎么买的聊这么多东西
鸣人不是只有300吗怎么买的聊这么多东西
鸣人不是只有300吗怎么买的聊这么多东西
鸣人不是只有300吗怎么买的聊这么多东西
鸣人不是只有300吗怎么买的聊这么多东西
鸣人不是只有300吗怎么买的聊这么多东西
鸣人不是只有300吗怎么买的聊这么多东西
鸣人不是只有300吗怎么买的聊这么多东西


The Page you are looking for doesn't exist or another error occurred. Go back, or head over to Framed Joomla Template to choose a new direction.


# Microservices
3 March 2017
Dan Hersam
## But first, a short interlude...
![](images/GM_Gartner_Hype_Cycle.png)
Note:
Gives a view of how a technology or application will evolve over time.
Technology Trigger
Peak of Inflated Expectations
Trough of Disillusionment
Slope of Enlightenment
Plateau of Productivity
## Google Trends of Microservices
![](images/google-trends-microservices.png)
## What Are Microservices?
> An independently deployable component of bounded scope that supports interoperability through message-based communication.
-- Irakli Nadareishvili
> Loosely coupled service-oriented architecture with bounded contexts.
-- Adrian Cockcroft, Battery Ventures
> Small, autonomous services that work together.
-- Sam Newman, Thoughtworks
## How To Recognize One in the Wild
![](images/in_the_wild.gif)
## Does One Thing Well
(Single Responsibility Principle)
Note:
Small and Focused - Specialized. Like updateCustomer, or calculatePrice
## Autonomous
Note:
Must be decoupled from other services and isolated - decentralized, Replaceability
Golden rule: can you make a change to a service and deploy it by itself without changing anything else?
## Elastic
Note:
Scale appropriately depending on the usage
## Resilient
Note:
Fault-tolerant and provide a reasonable recovery timeframe if something goes wrong.
## Decentralized
Note:
Data too - no need for one massive database
## Microservices
![](images/roundabout.jpg)
Note:
Separate business units. Large company = employees = one job.
## ... vs a Monolith
![](images/train.jpg)
Note:
Startup, one employee = many hats. Don't know how the tracks fit the analogy
## Best Practices?
* Data Store for Each Microservice
* Keep Code at a Similar Level of Maturity
* Do a Separate Build for Each Microservice
* Deploy in Containers
* Treat Servers as Stateless
Note:
From Netflix's experience. Treat servers as cattle, not pets. Avoid "snowflake" systems in which you depend on individual servers to perform specialized functions.
## Why Use Microservices?
## Common Problems with Monoliths
* Technical debt
* Fear to change
* Tightly-coupled
* Lack of ownership
* Hard to scale out
* All or nothing deployment
* Code complexity and maintainability
Note:
Explain each one on this slide
## Key Benefits of Microservices
* Scaling
* Resilience
* Composable
* Evolutionary
* Ease of Deployment
* Choose Your Technology
* Organizational Alignment
* Increased Development Speed
Note:
Briefly - following slides in more detail
## Scaling
![](images/monster-tricycle.jpg)
Note:
Instead of trying to scale one part of your tricycle, use a Ferrari and a Jeep.
Resilience
## Composable
![](images/legos-legot.jpg)
Note:
Flexible - put together for different purposes
## Evolutionary
![](images/evolution.jpg)
## Ease of Deployment
![](images/indy-deployment.gif)
Choose Your Technology
## Organizational Alignment
![](images/Too_Many_Cooks.png)
Note:
Reduce the number of people working on a single codebase. Great for distributed teams
...The Two Pizza Rule
## Increased Development Speed
![](images/faster.gif)
## Production Ready?
* Uber
* Amazon
* Netflix
* Spotify
* SoundCloud
# BUT...
## Not A Silver Bullet
New Common Problems
Traceability
Network Latency
Message Routing
Service Discovery
Operations Overhead
Eventual Consistency
## What About SOA?
Note:
Service Oriented Architecture - very sensible idea - modularity and message-based communication. But much of the SOA principles don't help to split big parts into smaller ones. SOA - shared domain models, Microservices - distributed. Enterprise Service Bus vs HTTP
## What About Decomposition?
* Requires Same Technology
* Lose Scaling Independently
* Lose Independent Deployment
* Less Resiliency
Note:
E.g. Modules or Shared Libraries
Many of the advantages of a microservice-based architecture come from its granular nature and the fact that it gives you many more choices for solving problems. Can similar decompositional techniques achieve the same benefits?
Technically, it should be possible to create well-factored, independent modules within a single monolithic process. And yet this rarely happens. The modules themselves soon become tightly coupled with the rest of the code, surrendering one of their key benefits. Having a process boundary separation does enforce clean hygiene in this respect (or at least makes it harder to do the wrong thing)
## Should You Start Using Microservices?
## Conway's Law
> Any organization that designs a system will produce a design whose structure is a copy of the organization's communication structure.

* What skills do they have?
* How are development and operations divided?
* How are responsibilities divided between teams?
## Other Considerations...
## Sufficiently Large Project
Note:
Microservices are ideal for big systems that warrant the complexity of microservices (they don't come for free). Large, distributed teams.
## Focused on replaceability
Note:
Microservices can allow you to be more flexible and swap out components that aren't working well
## Deep Understanding of Problem Domain
Note:
You need to know the problem domain well before being able to correctly break it down into subdomains.
## Second Version of Existing System
Note:
Ideal scenario because you know the domain extremely well
## How To Introduce Change?
> Find small changes that can unfold in a way that creates large
> effects
-- Gareth Morgan
Note:
Author of Images of Organization
## This Presentation
[microservices.snapmagic.com](https://microservices.snapmagic.com/)
## References
1. _Microservice Architecture_ by Irakli Nadareishvili
1. _Building Microservices_ by Sam Newman
1. _Microservices from Day One_ by Cloves Carneiro Jr.
1. _Production-Ready Microservices_ by Susan J. Fowler
1. _Microservices on AWS by Matthias_ Jung
Note:
Microservices on AWS = presentation at AWS Summit 2016. Yes, that Susan Fowler
# Questions?


Midterm Elections 2018: Live ResultsThe Wall Street Journal
The Bumps Ahead for Autonomous VehiclesThe Wall Street Journal
Why a 60-Year-Old Spy Plane Still MattersThe Wall Street Journal
Gen Z Is Coming to Your Office. Get Ready to Adapt.The Wall Street Journal
The Spotify IPO PlaylistThe Wall Street Journal
How Music in Figure Skating Has ChangedThe Wall Street Journal
Murder in America seriesThe Wall Street Journal
How Much Do CEOs Make?The Wall Street Journal
The Damage Left in Irma's WakeThe Wall Street Journal
Objects We’re Watching in OrbitThe Wall Street Journal
U.S. Social Sentiment IndexThe Wall Street Journal
2017 The Year in PhotosThe Wall Street Journal
Turnover Under TrumpThe Wall Street Journal
How to Make a Phone Call in 2017The Wall Street Journal
Who's next? Top searched candidates by party.? Google Trends
Guess the 2016 Electoral College MapThe Wall Street Journal
How the Dow Breached 20000The Wall Street Journal
Early GOP debate: who was top searched?Google Trends
Welfare check: Less money is going to basic assistanceThe Center for Investigative Reporting
The New Face of American ImmigrationThe Wall Street Journal


| Date |
_pageDate
A Date object representing the month/year that the calendar is initially set to
|
| Array |
_renderStack
A copy of the initial render functions created before rendering.
|
| Array |
_selectedDates
The private list of initially selected dates.
|
| Array[](Integer[]) |
cellDates
The collection of calendar cell dates that is parallel to the cells collection.
|
| HTMLTableCellElement[] |
cells
The collection of calendar table cells
|
| Object |
Config
The configuration object used to set up the calendars various locale and style options.
|
| HTMLTableCellElement |
headerCell
The HTML cell element that represents the main header cell TH used in the calendar table
|
| String |
id
The id that uniquely identifies this calendar.
|
| Date |
maxDate
A Date object representing the maximum selectable date
|
| Date |
minDate
A Date object representing the minimum selectable date
|
| HTMLElement |
oDomContainer
The DOM element reference that points to this calendar's container element.
|
| Date |
pageDate
A Date object representing the month/year that the calendar is currently set to
|
| CalendarGroup |
parent
The parent CalendarGroup, only to be set explicitly by the parent group
|
| Array[] |
renderStack
The list of render functions, along with required parameters, used to render cells.
|
| Array[](Integer[]) |
selectedDates
The list of currently selected dates.
|
| Boolean |
shellRendered
A boolean indicating whether the shell of the calendar has already been rendered to the page
|
| HTMLTableElement |
table
The HTML table element that represents this calendar
|
| Date |
today
A Date object representing today's date.
|
| HTMLTableCellElement[] |
weekFooterCells
The collection of calendar week footer cells
|
| HTMLTableCellElement[] |
weekHeaderCells
The collection of calendar week header cells
|
| String |
DATE
Type constant used for renderers to represent an individual date (M/D/Y)
|
| Integer |
DISPLAY_DAYS
Constant that represents the total number of date cells that are displayed in a given month
including
|
| String |
MONTH
Type constant used for renderers to represent a month across any year
|
| String |
MONTH_DAY
Type constant used for renderers to represent an individual date across any year (M/D)
|
| String |
RANGE
Type constant used for renderers to represent a range of individual dates (M/D/Y-M/D/Y)
|
| String |
STOP_RENDER
Constant used for halting the execution of the remainder of the render stack
|
| String |
WEEKDAY
Type constant used for renderers to represent a weekday
|
Class YAHOO.widget.Calendar_Core
Object | +--YAHOO.widget.Calendar_Core
- Direct Known Subclasses:
- YAHOO.widget.Calendar2up_Cal, YAHOO.widget.Calendar
class
YAHOO.widget.Calendar_Core
Field Summary [top]
Method Summary [top]
| void |
_addRenderer
The private method used for adding cell renderers to the local render stack.
|
| Boolean |
_fieldArraysAreEqual
Converts a date field array [yyyy,mm,dd] to a JavaScript Date object.
|
| Integer |
_indexOfSelectedFieldArray
Gets the index of a date field array [yyyy,mm,dd] in the current list of selected dates.
|
| Array[](Integer[]) |
_parseDate
Converts a date string to a date field array
|
| Array[](Integer[]) |
_parseDates
Converts a multi or single-date string to an array of date field arrays
|
| Array[](Integer[]) |
_parseRange
Converts a date range to the full list of included dates
|
| Date |
_toDate
Converts a date field array [yyyy,mm,dd] to a JavaScript Date object.
|
| Array[](Integer[]) |
_toFieldArray
Converts a date (either a JavaScript Date object, or a date string) to the internal data structure
used to represent dates: [[yyyy,mm,dd],[yyyy,mm,dd]].
|
| void |
_unload
|
| void |
addMonthRenderer
Adds a month to the render stack.
|
| void |
addMonths
Adds the designated number of months to the current calendar month, and sets the current
calendar page date to the new month.
|
| void |
addRenderer
Adds a renderer to the render stack.
|
| void |
addWeekdayRenderer
Adds a weekday to the render stack.
|
| void |
addYears
Adds the designated number of years to the current calendar, and sets the current
calendar page date to the new month.
|
| String |
buildDayLabel
Builds the date digit that will be displayed in calendar cells
|
| String |
buildMonthLabel
Builds the date label that will be displayed in the calendar header or
footer, depending on configuration.
|
| void |
buildShell
Builds the calendar table shell that will be filled in with dates and formatting.
|
| void |
buildShellBody
Builds the calendar shell body (6 weeks by 7 days)
|
| void |
buildShellFooter
Builds the calendar shell footer.
|
| void |
buildShellHeader
Builds the calendar shell header by inserting a THEAD into the local calendar table.
|
| void |
clear
Clears the selected dates in the current calendar widget and sets the calendar
to the current month and year.
|
| void |
clearAllBodyCellStyles
Removes all styles from all body cells in the current calendar table.
|
| void |
clearElement
Clears the inner HTML, CSS class and style information from the specified cell.
|
| void |
customConfig
This method is called when subclasses need to override configuration variables
or create new ones.
|
| Date[] |
deselect
Deselects a date or a collection of dates on the current calendar.
|
| Date[] |
deselectAll
Deselects all dates on the current calendar.
|
| Date[] |
deselectCell
Deselects a date on the current calendar by referencing the index of the cell that should be deselected.
|
| Date[] |
getSelectedDates
Gets the list of currently selected dates from the calendar.
|
| void |
init
Initializes the calendar widget.
|
| Boolean |
isDateOOM
Determines whether a given date is OOM (out of month).
|
| void |
nextMonth
Navigates to the next month page in the calendar widget.
|
| void |
nextYear
Navigates to the next year in the currently selected month in the calendar widget.
|
| void |
onBeforeDeselect
Event executed before a date is deselected in the calendar widget.
|
| void |
onBeforeSelect
Event executed before a date is selected in the calendar widget.
|
| void |
onChangePage
Event executed when the user navigates to a different calendar page.
|
| void |
onClear
Event executed when the calendar widget is completely cleared to the current month with no selections.
|
| void |
onDeselect
Event executed when a date is deselected in the calendar widget.
|
| void |
onRender
Event executed when the calendar widget is rendered.
|
| void |
onReset
Event executed when the calendar widget is reset to its original state.
|
| void |
onSelect
Event executed when a date is selected in the calendar widget.
|
| void |
previousMonth
Navigates to the previous month page in the calendar widget.
|
| void |
previousYear
Navigates to the previous year in the currently selected month in the calendar widget.
|
| void |
render
Renders the calendar after it has been configured.
|
| void |
renderBody
Appends the calendar body.
|
| String |
renderBodyCellRestricted
Renders the current calendar cell as a non-selectable "black-out" date using the default
restricted style.
|
| String |
renderCellDefault
Renders a single standard calendar cell in the calendar widget table.
|
| String |
renderCellNotThisMonth
Applies the default style used for rendering dates that are not a part of the current
month (preceding or trailing the cells for the current month)
|
| void |
renderCellStyleHighlight1
|
| void |
renderCellStyleHighlight2
|
| void |
renderCellStyleHighlight3
|
| void |
renderCellStyleHighlight4
|
| String |
renderCellStyleSelected
Applies the default style used for rendering selected dates to the current calendar cell
|
| String |
renderCellStyleToday
Applies the default style used for rendering today's date to the current calendar cell
|
| void |
renderFooter
Appends the contents of the calendar widget footer into the shell.
|
| void |
renderHeader
Appends the header contents into the widget header.
|
| Object |
renderOutOfBoundsDate
BEGIN BUILT-IN TABLE CELL RENDERERS
|
| void |
renderRowFooter
Renders the row footer for a week.
|
| void |
renderRowHeader
Renders the row header for a week.
|
| void |
renderShell
Outputs the calendar shell to the DOM, inserting it into the placeholder element.
|
| void |
reset
Resets the calendar widget to the originally selected month and year, and
sets the calendar to the initial selection(s).
|
| void |
resetRenderers
Resets the render stack of the current calendar to its original pre-render value.
|
| Date[] |
select
Selects a date or a collection of dates on the current calendar.
|
| Date[] |
selectCell
Selects a date on the current calendar by referencing the index of the cell that should be selected.
|
| void |
setMonth
Sets the calendar's month explicitly.
|
| void |
setupConfig
This method is called to initialize the widget configuration variables, including
style, localization, and other display and behavioral options.
|
| void |
setYear
Sets the calendar's year explicitly.
|
| void |
subtractMonths
Subtracts the designated number of months from the current calendar month, and sets the current
calendar page date to the new month.
|
| void |
subtractYears
Subtcats the designated number of years from the current calendar, and sets the current
calendar page date to the new month.
|
| Boolean |
validate
Validates the calendar widget.
|
| void |
wireCustomEvents
This function can be extended by subclasses to attach additional DOM events to
the calendar.
|
| void |
wireDefaultEvents
Wires the local DOM events for the Calendar, including cell selection, hover, and
default navigation that is used for moving back and forth between calendar pages.
|
| Object |
_getBrowser
END GETTER/SETTER METHODS
|
| void |
addCssClass
Adds the specified CSS class to the element passed to this method.
|
| void |
prependCssClass
|
| void |
removeCssClass
Removed the specified CSS class from the element passed to this method.
|
| void |
setCssClasses
Sets the specified array of CSS classes into the referenced element
|
Field Detail [top]
_pageDate
Date
_pageDate
A Date object representing the month/year that the calendar is initially set to
_renderStack
Array
_renderStack
A copy of the initial render functions created before rendering.
_selectedDates
Array
_selectedDates
The private list of initially selected dates.
cellDates
Array[](Integer[])
cellDates
The collection of calendar cell dates that is parallel to the cells collection. The array contains dates field arrays in the format of [YYYY, M, D].
cells
HTMLTableCellElement[]
cells
The collection of calendar table cells
Config
Object
Config
The configuration object used to set up the calendars various locale and style options.
headerCell
HTMLTableCellElement
headerCell
The HTML cell element that represents the main header cell TH used in the calendar table
id
String
id
The id that uniquely identifies this calendar. This id should match the id of the placeholder element on the page.
maxDate
Date
maxDate
A Date object representing the maximum selectable date
minDate
Date
minDate
A Date object representing the minimum selectable date
oDomContainer
HTMLElement
oDomContainer
The DOM element reference that points to this calendar's container element. The calendar will be inserted into this element when the shell is rendered.
pageDate
Date
pageDate
A Date object representing the month/year that the calendar is currently set to
parent
CalendarGroup
parent
The parent CalendarGroup, only to be set explicitly by the parent group
renderStack
Array[]
renderStack
The list of render functions, along with required parameters, used to render cells.
selectedDates
Array[](Integer[])
selectedDates
The list of currently selected dates. The data format for this local collection is
an array of date field arrays, e.g:
[
[2004,5,25],
[2004,5,26]
]
shellRendered
Boolean
shellRendered
A boolean indicating whether the shell of the calendar has already been rendered to the page
table
HTMLTableElement
table
The HTML table element that represents this calendar
today
Date
today
A Date object representing today's date.
weekFooterCells
HTMLTableCellElement[]
weekFooterCells
The collection of calendar week footer cells
weekHeaderCells
HTMLTableCellElement[]
weekHeaderCells
The collection of calendar week header cells
DATE
String
DATE
Type constant used for renderers to represent an individual date (M/D/Y)
DISPLAY_DAYS
Integer
DISPLAY_DAYS
Constant that represents the total number of date cells that are displayed in a given month
including
MONTH
String
MONTH
Type constant used for renderers to represent a month across any year
MONTH_DAY
String
MONTH_DAY
Type constant used for renderers to represent an individual date across any year (M/D)
RANGE
String
RANGE
Type constant used for renderers to represent a range of individual dates (M/D/Y-M/D/Y)
STOP_RENDER
String
STOP_RENDER
Constant used for halting the execution of the remainder of the render stack
WEEKDAY
String
WEEKDAY
Type constant used for renderers to represent a weekday
Constructor Detail [top]
YAHOO.widget.Calendar_Core
YAHOO.widget.Calendar_Core
()
- Parameters:
-
id
- The id of the table element that will represent the calendar widget -
containerId
- The id of the container element that will contain the calendar table -
monthyear
- The month/year string used to set the current calendar page -
selected
- A string of date values formatted using the date parser. The built-in default date format is MM/DD/YYYY. Ranges are defined using MM/DD/YYYY-MM/DD/YYYY. Month/day combinations are defined using MM/DD. Any combination of these can be combined by delimiting the string with commas. Example: "12/24/2005,12/25,1/18/2006-1/21/2006"
Method Detail [top]
_addRenderer
void
_addRenderer
The private method used for adding cell renderers to the local render stack.
This method is called by other methods that set the renderer type prior to the method call.
_fieldArraysAreEqual
Boolean
_fieldArraysAreEqual
Converts a date field array [yyyy,mm,dd] to a JavaScript Date object.
- Returns:
- The boolean that represents the equality of the two arrays
_indexOfSelectedFieldArray
Integer
_indexOfSelectedFieldArray
Gets the index of a date field array [yyyy,mm,dd] in the current list of selected dates.
- Returns:
- The index of the date field array within the collection of selected dates. -1 will be returned if the date is not found.
_parseDate
Array[](Integer[])
_parseDate
Converts a date string to a date field array
- Returns:
- A date field array representing the string passed to the method
_parseDates
Array[](Integer[])
_parseDates
Converts a multi or single-date string to an array of date field arrays
- Returns:
- An array of date field arrays
_parseRange
Array[](Integer[])
_parseRange
Converts a date range to the full list of included dates
- Returns:
- An array of date field arrays
_toDate
Date
_toDate
Converts a date field array [yyyy,mm,dd] to a JavaScript Date object.
- Returns:
- JavaScript Date object representing the date field array
_toFieldArray
Array[](Integer[])
_toFieldArray
Converts a date (either a JavaScript Date object, or a date string) to the internal data structure
used to represent dates: [[yyyy,mm,dd],[yyyy,mm,dd]].
- Returns:
- Array of date field arrays
_unload
void
_unload
addMonthRenderer
void
addMonthRenderer
Adds a month to the render stack. The function reference passed to this method will be executed
when a date cell matches the month passed to this method.
addMonths
void
addMonths
Adds the designated number of months to the current calendar month, and sets the current
calendar page date to the new month.
addRenderer
void
addRenderer
Adds a renderer to the render stack. The function reference passed to this method will be executed
when a date cell matches the conditions specified in the date string for this renderer.
addWeekdayRenderer
void
addWeekdayRenderer
Adds a weekday to the render stack. The function reference passed to this method will be executed
when a date cell matches the weekday passed to this method.
addYears
void
addYears
Adds the designated number of years to the current calendar, and sets the current
calendar page date to the new month.
buildDayLabel
String
buildDayLabel
Builds the date digit that will be displayed in calendar cells
- Returns:
- The formatted day label
buildMonthLabel
String
buildMonthLabel
Builds the date label that will be displayed in the calendar header or
footer, depending on configuration.
- Returns:
- The formatted calendar month label
buildShell
void
buildShell
Builds the calendar table shell that will be filled in with dates and formatting.
This method calls buildShellHeader, buildShellBody, and buildShellFooter (in that order)
to construct the pieces of the calendar table. The construction of the shell should
only happen one time when the calendar is initialized.
buildShellBody
void
buildShellBody
Builds the calendar shell body (6 weeks by 7 days)
buildShellFooter
void
buildShellFooter
Builds the calendar shell footer. In the default implementation, there is
no footer.
buildShellHeader
void
buildShellHeader
Builds the calendar shell header by inserting a THEAD into the local calendar table.
clear
void
clear
Clears the selected dates in the current calendar widget and sets the calendar
to the current month and year.
clearAllBodyCellStyles
void
clearAllBodyCellStyles
Removes all styles from all body cells in the current calendar table.
clearElement
void
clearElement
Clears the inner HTML, CSS class and style information from the specified cell.
customConfig
void
customConfig
This method is called when subclasses need to override configuration variables
or create new ones. Values can be explicitly set as follows:
this.Config.Style.CSS_CELL = "newcalcell";
this.Config.Locale.MONTHS_SHORT = ["Jan", "Fév", "Mars", "Avr", "Mai", "Juin", "Juil", "Août", "Sept", "Oct", "Nov", "Déc"];
deselect
Date[]
deselect
Deselects a date or a collection of dates on the current calendar. This method, by default,
does not call the render method explicitly. Once deselection has completed, render must be
called for the changes to be reflected visually.
- Returns:
- Array of JavaScript Date objects representing all individual dates that are currently selected.
deselectAll
Date[]
deselectAll
Deselects all dates on the current calendar.
- Returns:
- Array of JavaScript Date objects representing all individual dates that are currently selected. Assuming that this function executes properly, the return value should be an empty array. However, the empty array is returned for the sake of being able to check the selection status of the calendar.
deselectCell
Date[]
deselectCell
Deselects a date on the current calendar by referencing the index of the cell that should be deselected.
This method is used to easily deselect a single cell (usually with a mouse click) without having to do
a full render. The selected style is removed from the cell directly.
- Returns:
- Array of JavaScript Date objects representing all individual dates that are currently selected.
getSelectedDates
Date[]
getSelectedDates
Gets the list of currently selected dates from the calendar.
- Returns:
- An array of currently selected JavaScript Date objects.
init
void
init
Initializes the calendar widget. This method must be called by all subclass constructors.
isDateOOM
Boolean
isDateOOM
Determines whether a given date is OOM (out of month).
- Returns:
- true if the date is OOM
nextMonth
void
nextMonth
Navigates to the next month page in the calendar widget.
nextYear
void
nextYear
Navigates to the next year in the currently selected month in the calendar widget.
onBeforeDeselect
void
onBeforeDeselect
Event executed before a date is deselected in the calendar widget.
onBeforeSelect
void
onBeforeSelect
Event executed before a date is selected in the calendar widget.
onChangePage
void
onChangePage
Event executed when the user navigates to a different calendar page.
onClear
void
onClear
Event executed when the calendar widget is completely cleared to the current month with no selections.
onDeselect
void
onDeselect
Event executed when a date is deselected in the calendar widget.
onRender
void
onRender
Event executed when the calendar widget is rendered.
onReset
void
onReset
Event executed when the calendar widget is reset to its original state.
onSelect
void
onSelect
Event executed when a date is selected in the calendar widget.
previousMonth
void
previousMonth
Navigates to the previous month page in the calendar widget.
previousYear
void
previousYear
Navigates to the previous year in the currently selected month in the calendar widget.
render
void
render
Renders the calendar after it has been configured. The render() method has a specific call chain that will execute
when the method is called: renderHeader, renderBody, renderFooter.
Refer to the documentation for those methods for information on
individual render tasks.
renderBody
void
renderBody
Appends the calendar body. The default implementation calculates the number of
OOM (out of month) cells that need to be rendered at the start of the month, renders those,
and renders all the day cells using the built-in cell rendering methods.
While iterating through all of the cells, the calendar checks for renderers in the
local render stack that match the date of the current cell, and then applies styles
as necessary.
renderBodyCellRestricted
String
renderBodyCellRestricted
Renders the current calendar cell as a non-selectable "black-out" date using the default
restricted style.
- Returns:
- YAHOO.widget.Calendar_Core.STOP_RENDER if rendering should stop with this style, null or nothing if rendering should not be terminated
renderCellDefault
String
renderCellDefault
Renders a single standard calendar cell in the calendar widget table.
All logic for determining how a standard default cell will be rendered is
encapsulated in this method, and must be accounted for when extending the
widget class.
- Returns:
- YAHOO.widget.Calendar_Core.STOP_RENDER if rendering should stop with this style, null or nothing if rendering should not be terminated
renderCellNotThisMonth
String
renderCellNotThisMonth
Applies the default style used for rendering dates that are not a part of the current
month (preceding or trailing the cells for the current month)
- Returns:
- YAHOO.widget.Calendar_Core.STOP_RENDER if rendering should stop with this style, null or nothing if rendering should not be terminated
renderCellStyleHighlight1
void
renderCellStyleHighlight1
renderCellStyleHighlight2
void
renderCellStyleHighlight2
renderCellStyleHighlight3
void
renderCellStyleHighlight3
renderCellStyleHighlight4
void
renderCellStyleHighlight4
renderCellStyleSelected
String
renderCellStyleSelected
Applies the default style used for rendering selected dates to the current calendar cell
- Returns:
- YAHOO.widget.Calendar_Core.STOP_RENDER if rendering should stop with this style, null or nothing if rendering should not be terminated
renderCellStyleToday
String
renderCellStyleToday
Applies the default style used for rendering today's date to the current calendar cell
- Returns:
- YAHOO.widget.Calendar_Core.STOP_RENDER if rendering should stop with this style, null or nothing if rendering should not be terminated
renderFooter
void
renderFooter
Appends the contents of the calendar widget footer into the shell. By default,
the calendar does not contain a footer, and this method must be implemented by
subclassing the widget.
renderHeader
void
renderHeader
Appends the header contents into the widget header.
renderOutOfBoundsDate
Object
renderOutOfBoundsDate
BEGIN BUILT-IN TABLE CELL RENDERERS
renderRowFooter
void
renderRowFooter
Renders the row footer for a week. The date passed in should be
the first date of the given week.
renderRowHeader
void
renderRowHeader
Renders the row header for a week. The date passed in should be
the first date of the given week.
renderShell
void
renderShell
Outputs the calendar shell to the DOM, inserting it into the placeholder element.
reset
void
reset
Resets the calendar widget to the originally selected month and year, and
sets the calendar to the initial selection(s).
resetRenderers
void
resetRenderers
Resets the render stack of the current calendar to its original pre-render value.
select
Date[]
select
Selects a date or a collection of dates on the current calendar. This method, by default,
does not call the render method explicitly. Once selection has completed, render must be
called for the changes to be reflected visually.
- Returns:
- Array of JavaScript Date objects representing all individual dates that are currently selected.
selectCell
Date[]
selectCell
Selects a date on the current calendar by referencing the index of the cell that should be selected.
This method is used to easily select a single cell (usually with a mouse click) without having to do
a full render. The selected style is applied to the cell directly.
- Returns:
- Array of JavaScript Date objects representing all individual dates that are currently selected.
setMonth
void
setMonth
Sets the calendar's month explicitly.
setupConfig
void
setupConfig
This method is called to initialize the widget configuration variables, including
style, localization, and other display and behavioral options.
Config: Container for the CSS style configuration variables.
Config.Style - Defines the CSS classes used for different calendar elements
CSS_CALENDAR : Container tableCSS_HEADER :CSS_HEADER_TEXT : Calendar headerCSS_FOOTER : Calendar footerCSS_CELL : Calendar day cellCSS_CELL_OOM : Calendar OOM (out of month) cellCSS_CELL_SELECTED : Calendar selected cellCSS_CELL_RESTRICTED : Calendar restricted cellCSS_CELL_TODAY : Calendar cell for today's dateCSS_ROW_HEADER : The cell preceding a row (used for week number by default)CSS_ROW_FOOTER : The cell following a row (not implemented by default)CSS_WEEKDAY_CELL : The cells used for labeling weekdaysCSS_WEEKDAY_ROW : The row containing the weekday label cellsCSS_BORDER : The border style used for the default UED renderingCSS_CONTAINER : Special container class used to properly adjust the sizing and floatCSS_NAV_LEFT : Left navigation arrowCSS_NAV_RIGHT : Right navigation arrowCSS_CELL_TOP : Outlying cell along the top rowCSS_CELL_LEFT : Outlying cell along the left rowCSS_CELL_RIGHT : Outlying cell along the right rowCSS_CELL_BOTTOM : Outlying cell along the bottom rowCSS_CELL_HOVER : Cell hover styleCSS_CELL_HIGHLIGHT1 : Highlight color 1 for styling cellsCSS_CELL_HIGHLIGHT2 : Highlight color 2 for styling cellsCSS_CELL_HIGHLIGHT3 : Highlight color 3 for styling cellsCSS_CELL_HIGHLIGHT4 : Highlight color 4 for styling cells
Config.Locale - Defines the locale string arrays used for localization
MONTHS_SHORT : Array of 12 months in short format ("Jan", "Feb", etc.)MONTHS_LONG : Array of 12 months in short format ("Jan", "Feb", etc.)WEEKDAYS_1CHAR : Array of 7 days in 1-character format ("S", "M", etc.)WEEKDAYS_SHORT : Array of 7 days in short format ("Su", "Mo", etc.)WEEKDAYS_MEDIUM : Array of 7 days in medium format ("Sun", "Mon", etc.)WEEKDAYS_LONG : Array of 7 days in long format ("Sunday", "Monday", etc.)DATE_DELIMITER : The value used to delimit series of multiple dates (Default: ",")DATE_FIELD_DELIMITER : The value used to delimit date fields (Default: "/")DATE_RANGE_DELIMITER : The value used to delimit date fields (Default: "-")MY_MONTH_POSITION : The value used to determine the position of the month in a month/year combo (e.g. 12/2005) (Default: 1)MY_YEAR_POSITION : The value used to determine the position of the year in a month/year combo (e.g. 12/2005) (Default: 2)MD_MONTH_POSITION : The value used to determine the position of the month in a month/day combo (e.g. 12/25) (Default: 1)MD_DAY_POSITION : The value used to determine the position of the day in a month/day combo (e.g. 12/25) (Default: 2)MDY_MONTH_POSITION : The value used to determine the position of the month in a month/day/year combo (e.g. 12/25/2005) (Default: 1)MDY_DAY_POSITION : The value used to determine the position of the day in a month/day/year combo (e.g. 12/25/2005) (Default: 2)MDY_YEAR_POSITION : The value used to determine the position of the year in a month/day/year combo (e.g. 12/25/2005) (Default: 3)
Config.Options - Defines other configurable calendar widget options
SHOW_WEEKDAYS : Boolean, determines whether to display the weekday headers (defaults to true)LOCALE_MONTHS : Array, points to the desired Config.Locale array (defaults to Config.Locale.MONTHS_LONG)LOCALE_WEEKDAYS : Array, points to the desired Config.Locale array (defaults to Config.Locale.WEEKDAYS_SHORT)START_WEEKDAY : Integer, 0-6, representing the day that a week begins onSHOW_WEEK_HEADER : Boolean, determines whether to display row headersSHOW_WEEK_FOOTER : Boolean, determines whether to display row footersHIDE_BLANK_WEEKS : Boolean, determines whether to hide extra weeks that are completely OOMNAV_ARROW_LEFT : String, the image path used for the left navigation arrowNAV_ARROW_RIGHT : String, the image path used for the right navigation arrow
setYear
void
setYear
Sets the calendar's year explicitly.
subtractMonths
void
subtractMonths
Subtracts the designated number of months from the current calendar month, and sets the current
calendar page date to the new month.
subtractYears
void
subtractYears
Subtcats the designated number of years from the current calendar, and sets the current
calendar page date to the new month.
validate
Boolean
validate
Validates the calendar widget. This method has no default implementation
and must be extended by subclassing the widget.
- Returns:
- Should return true if the widget validates, and false if it doesn't.
wireCustomEvents
void
wireCustomEvents
This function can be extended by subclasses to attach additional DOM events to
the calendar. By default, this method is unimplemented.
wireDefaultEvents
void
wireDefaultEvents
Wires the local DOM events for the Calendar, including cell selection, hover, and
default navigation that is used for moving back and forth between calendar pages.
_getBrowser
Object
_getBrowser
END GETTER/SETTER METHODS
addCssClass
void
addCssClass
Adds the specified CSS class to the element passed to this method.
prependCssClass
void
prependCssClass
removeCssClass
void
removeCssClass
Removed the specified CSS class from the element passed to this method.
setCssClasses
void
setCssClasses
Sets the specified array of CSS classes into the referenced element


Welcome to my cupcake shop.
A great cupcake for the spooky fall season. Gummy worms, chocolate frosting, M&Ms.
A beautiful colorful rainbow cupcake to get your Pride on!
Just a vanilla cupcake with sprinkles.
Follow us on Instagram to see more.


Yay, the first Tuesday of every month, time for a monthly status update! Erm, wait, it’s Wednesday, huh. With all the hustle and bustle of running starbeam.one lately, I’ve dedicated Tuesday to creating and publishing the Stand-up & Shine (& Shill) video, and then Wednesday to announcing it here with this blog. ✌
1,500 Flares of Volume (500 in 2 weeks 🤯) It seems like only two weeks ago we managed to reach our first 1,000 Flares of volume after 5.
Continue reading