This is the API
The query contains a json object (names, values) and the request returns the list of documents (regulations) where the filter matches i.e. the document contains fields with those values.
http://operando.eu/policyDB/Regulations/
GET
The query filter to be matched - \"?filter=\"{json description}\"
Called when by the policy computation component when the regulator api requests that the regulation be deleted.
http://operando.eu/policyDB/Regulations/{reg_id}/
DELETE
Unique identifier representing a specific regulation
Get a specific legislation document via the id. This will return the full legislation document in json format.
http://operando.eu/policyDB/Regulations/{reg_id}/
GET
Unique identifier representing a specific user
Called by the policy computation component when a new regulation is added to OPERANDO.
http://operando.eu/policyDB/Regulations/{reg_id}/
POST
Unique identifier representing a specific user
The first instance of this regulation document
Called when by the policy computation component when the regulator api updates a regulation. Their new PrivacyRegulation document is stored in the policy DB.
http://operando.eu/policyDB/Regulations/{reg_id}/
PUT
Unique identifier representing a specific regulation
The changed instance of this PrivacyRegulation


There are a lot of questions and answers on the internet. This page lists resources that I have found useful, so I thought you might find them useful too.
Step one: download R to your appropriate system (Windows, Mac, and Linux).
Step two: download RStudio. RStudio has invested a lot of time and money to make using R much, much easier. It’s also free!
Step three: Read R for Data Science. This is a great guide written by Hadley Wickham, a prolific R programmer who has had fantastic positive impact on the landscape of R packages and practices. It introduces the principles of the tidyverse
- a set of R packages taht play really well together. They cover tools to data reading in/out, data manipulation, data visualisation, and tools for performing and summarising models.
If you are having problems with getting R or RStudio, check out this guide, from this guy. It covers installing R and RStudio in a little more detail.
To learn R, you need to learn how to get unstuck with R. This teaches you a really good process to iterate through when going through the process of getting unstuck.
To learn a new function or package, Quick-R, provides nice quick description of functions and other R-related things.
For all my other problems, I usually google the error message, or try my darndest to ask an reasonable question to google that describes my current dilemna, and then look read the appropriate blog post, or StackOVerflow Answer. RSeek is also basically a google search that filters by R related content.
I would also recommend checking out RStudio’s list of resources for learning R, and this blog post, which describes learning R from a social sciences background.
 The R and statistics community on twitter is both excellent and friendly.
Got a basic handle on R and are hankering for more? I recommend these free, online books by Hadley Wickham:
There is also a book, Ramarro, by quantide which seems similar(ish) to Hadley’s books.
R’s S3 classes are this really awesome minimal class of functions that can be super handy in R. They are described nicely in Hadley’s book, but I have also found these to be helpful:
This blog post, which also has such a suave blog layout.
This video by Andrew Robinson. Sides available here. Thanks to http://damjan.vukcevic.net/ for this information.
I have also written a blog post about S3 methods, and have a preprint on arxiv.
ggplot2
If you are going to do a plot in R, it should be in ggplot. It takes about 5 minutes to get the hang of, and once you’ve got it down you can create plots that make sense, behave how you expect, and look fantastic.
ggplot ollows a logical syntax adapted from the book “The Grammar of Graphics”. It makes visualisation make sense. And there are lots of other packages that build upon it to make it more awesome, such as GGally, ggalt, ggExtra, ggforce, gganimate, and ggbeeswarm, to name a few!
Here are some ggplot resources in order of usefulness
Plotly for R, written and maintained by Carson Sievert, is a very powerful and flexible interactive plotting enging in R. It has a fully fledged API for writing interactice graphics in R, as well as a fantastic function that gives the user a lot for free: ggplotly
. You can read more about plotly for R in Carson’s free and online book.
ggvis is another great package written by Hadley Wickham, which builds upon the structure of ggplot but it allows for more interactive, reactive, plot building. Examples can be found here here, and here.
More serious development on ggvis will apparently begin in 2018, as Hadley and his team at RStudio will be spending 2017 to make the everything in the tidyverse work well together. For the moment I would recommend using plotly to do your interactive graphics, although ggvis is still great!
shiny is a really awesome way to enhance your R script, package, or method. Shiny turns these into ‘apps’, that people can interact with.
tidyr::replace_na
.Probably the coolest thing ever. knitr
is this amazing package that allows the user to combine their code and document text, making research easier to reproduce, and it does this while looking slick and classy. The idea is essentially to let the human do the writing, and the computer handle displaying the results, so that reports can be easily constructed, and most importantly, reproduced easily.
Check out some really nice guides here and here, and from the awesome dude who created knitr here.
You can also augment your rmarkdown documents with templates. For example - rticles which is an r package that adds loads of rmarkdown templates. Currently, there are templates for the R Journal, the UseR Conference, Journal of Statistical Software, PLoS Computational Biology, and more!
If you want to learn statistics using R, check out this website containing 15 hours of an applied R statistics course from Stanford. They also have an excellent (and free!) book.
I use decision trees a lot in R, and I even wrote a little package that helps take care of some common tasks in interrogating decision trees. Here are a list of resources that I recommend using to learn about them:
This book from James et al - chapter 8 specifically refers to decision trees. They’ve also made the book free! Also their videos on decision trees are very useful. You can find a comprehensive list of all their videos and material at this website
This book chapter from the Handbook of Statistics is broad and general.
This page helps explain regression trees. Their gif demonstrating how decision trees choose splitting values is also really helpful.
This video on introduction to boosting trees for regression and classification by statsoft.
Spatial data analysis can be really different to anything else that you’ve done in R. Well, it was for me. Fortunately, recent awesome progress has been made on the simple features R package, officially supported by the RConsortium, and authored by Edzer Pebesma. The format of simple features is to adopt a standard dataframe format, where every row is a spatial feature, and the spatial features are described in a geometry list column. This is really fantastic, because it means that (for the most part), working with spatial data is very similar to working with regular dataframes, which is the bread and butter of analysis and data wrangling in R.
In particular, simple features is designed to play nicely with the tidyverse, and accordingly plays well with ggplot2, dplyr, purrr, and so on. It’s amazing. Anyway, here is a list of resources on using the simple features format:
The R Spatial Blog is a great way to stay updated with the latest changes in simple features.
A blog post by Matt Strimas-Mackey on how to use simple features with dplyr, tidyr, and ggplot2.
For more thoughts on R for spatial data analysis:
For interactive visualisation of spatial data, I really like RStudio’s leaflet, which is a port of the excellent JavaScript leaflet library is my go to place.
ggmap, is also great, as it produces static maps.
STATA do a great job of explaining multilevel and hierarchical models on their blog. I found these two blogs and video really helpful:
Just as it is important to have strong data visualisation skills, it is important to understand what makes a good looking document, poster, business card, and whatnot. To this end, you should read typography in ten minutes, and the summary of key rules of typography. One day I will purchase some fonts to pay him back.


Class Response
Core response: - http response wrapper carrying response headers and response body - sending response at application terminate process by Send(); method - completing MvcCore performance custom header at response sending
public static
|
#
GetInstance( integer $code = self::OK, array $headers = array(), string $body = '' )
Get everytime new instance of http response. |
public
|
#
__construct( integer $code = self::OK, array $headers = array(), string $body = '' )
Create new http response instance. |
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
boolean
|
|
public
boolean
|
|
public
|
|
protected
|
integer |
OK
|
#
200
|
integer |
MOVED_PERMANENTLY
|
#
301
|
integer |
SEE_OTHER
|
#
303
|
integer |
NOT_FOUND
|
#
404
|
integer |
INTERNAL_SERVER_ERROR
|
#
500
|
public static
array
|
$CodeMessages
|
#
array(
self::OK => 'OK',
self::MOVED_PERMANENTLY => 'Moved Permanently',
self::SEE_OTHER => 'See Other',
self::NOT_FOUND => 'Not Found',
self::INTERNAL_SERVER_ERROR => 'Internal Server Error',
)
|
public
integer
|
$Code
Response http code |
#
self::OK
|
public
array
|
$Headers
Response http headers |
#
array()
|
public
string
|
$Body
Response http body |
#
''
|


| Name: MRS. MANGALAMAM | Reg No: 12-4SMMHC18 |
|---|---|
| Age / Sex:38 YRS/F | Contact No:9980035203 |
| Marital Status:ML- 19YRS | Date:16/4/18 |
| Occupation:MAID | Dr. PJFP |
| Address: | DIAGNOSIS- |
FAN AIR HEADAHCE. IF GOES OUTSIDE ALSO FEELS HEADACHE.
MORNING CANT WAKE UP ALSO FEELS WEAK
PMS BREAST PAIN 5 DAYS TILL 3 DAYS AFTR PERIODS. CANT WEAR UNDERWEAR ALSO.
LEFT SIDE SHOULDER PAIN , HEAVINESS CANT HOLD ANYTHING WELL.
ANY COLD ITEM GETS COLD AND THROAT PAIN AND EAR PAIN.
BACK AND HIP PAIN SINCE.
RX:
LACHESIS 200 – 3 DOSES – 5 DAYS ONCE
KALI MUR 30 DISC 4-4-4-4.
28/4/18: 50% better. Apthous ulcers upper palate. Eruption on upper lip. Smtimes feels well smtimes no. palpitation and pain in the epigastrium.
LACHESIS 200 – 3 DOSES – 5 DAYS ONCE
KALI MUR 30 DISC 4-4-4-4.
Nat phos 6x 4-4-4-4.
9/6/18: headache more. Left shoulder and left ear pain. lmp: 1/6/18.
Chest pain better than before. Mandibular joint pain a bit. Back of neck and head pain.
Rx:
Lach1m – 1 dose. Tomo morning.
Tub 1m – 1 dose. Now
Pentaphos 2-0-2.
Rub 15 – nt 1 dose b.food
15 day medicine.


{% extends "base.html" %} {% load static %} {% load i18n %} {% block content %} 500 {% trans "Looks like the server's had a few too many! Time to go home." %} {% endblock content %}


Toggle navigation
{{post.title}} - Aaron Vontell
Home
Previous
Next
{{post.title}}
{{post.subtitle}}
{{post.class}}
Posted by
{{post.author}}
on {{post.date}}
Please enable JavaScript to view the
comments powered by Disqus.


---
title: "GROW YOUR OWN HERBS"
date: "2000-01-01 20:06:04 -06:00"
categories:
- adult
subtitle: "ONLINE"
layout: "events"
event-image: "grow-your-own-herbs.jpg"
event-dates: "THURSDAY JUNE 4"
event-location: "Online va Zoom"
button-type: "register"
tickets-link: "https://continue.utah.edu/lifelong/class/llhg_504_grow_your_own_herbs"
instructor-info: "Angie Decker, Red Butte Garden"
registration-info: " Phone Registration Available:801-587-5433
Lifelong Learning: LLHG 504"
member-cost: "$35"
public-cost: "$39"
event-notes: "online"
tickets-button: ""
published: false
---
THURSDAY JUNE 4
6:30-8:30PM
REGISTRATION REQUIRED
Tired of paying top dollar for fresh herbs, but don't want to miss out on the flavor burst only fresh herbs can give you? Time to grow your own! Whether you are planning a new culinary herb garden or improving an existing one, this class will help you get the most from your plot. We'll cover site and soil preparation, garden design, which herbs to plant, planting from seed versus cuttings, planting schedule, common pests and how to discourage them by inter-planting flowers, water and sun needs, and harvesting and storage. Each student will measure and plot their garden as we talk about space requirements for dozens of common edible herbs. We will also discuss cooking with fresh herbs. Co-sponsored by Lifelong Learning.


Worth The Risk
Worth The Risk is my own short film about a man living in the (fictional) war torn nation of Yaban. It was my first short film which I wrote and produced over the course of a year (with a lot of help).
Credits:
Director - Utku Melemetci
Co-director - Nayad Sefer
Main character - Aykut Engin
Ahmet - Hasan Tanilmis
Amara - Busra Ucar
Sagal Sniper and Gunman - Nayad Sefer
President - Arek Melemetci
Screenplay and Post prod. - Utku Melemetci
Special thanks:
Beril Afsar Melemetci
Selin Atasoy


--- layout: page title: "jQuery: Novice to Ninja" prev: OEBPS/ch07.html next: OEBPS/ch09.html book_path: books/earle-castledine-craig-sharkie-jquery-novice-to-ninja-_oeb/ --- {% include JB/setup %} {% raw %}
selectable
behavior to our list. Making an
element selectable gives the user the ability to lasso any of the element’s children to select them: if you
click on one element and then drag over subsequent elements, they are
all highlighted. You can then process the selection
however you see fit. Perfect for administrating boring lists! The
behavior we’re aiming to create is illustrated in Figure 8.1.
In addition to lassoing, the selectable behavior also lets you add
nonsequential items to the list using the
Ctrl key (as you can do in most desktop
applications).

bad singer

old

plastic surgery

broke
 …
 <button id="approve">Approve</button> <button id="reject">Reject</button> <button id="clear">Clear</button>
#tags { list-style-type: none; margin: 0; padding: 0; } #tags li { border: 1px solid #ccc; float: left; width: 60px; height: 60px; font-size:1.1em; margin:3px; padding:0.4em; text-align:center; }With our grid ready to go, we have to add the jQuery UI library to the page. Now it’s time to tell the tag list to become selectable: Fire up your browser and check it out. Hrrm … has anything actually happened? Well, yes, it has, but it’s invisible. The
selectable
method works by adding class
attributes to selected items, so
unless we assign styles to those class
es, we’ll be unable to see anything
happening. If you inspect the list items with Firebug as you select
them, you’ll see the changes occurring. Let’s have a stab at styling
selected elements:
#tags .ui-selecting { background: #FEFF9F; } #tags .ui-selected { background-color:#eEeF8F; }
ui-selecting
class
is applied as the user is in the
process of selecting elements, and the
ui-selected
class
is added as soon as they stop. If you
try it now, you’ll see you can lasso some squares. It’s quite a natural
interaction, which is exactly what you want from your page components.
You can also click while holding down the Ctrl key to
select individual items.
Our next task is to help with the duplicate tags. In a
tagging system, the number of tags for each term is important; so,
rather than just deleting duplicates, we’ll write some code to select
any tags that match the user’s selection. For instance, if a user clicks
on “A-lister,” all the “A-lister” tags will be highlighted.
We need to know which events we can hook into from the
jQuery UI component. Consulting the documentation,
we’re able to capture the
start
,
stop
,
selecting
,
unselecting
,
selected
, and
unselected
events. We could capture the
selecting
event and remove duplicates as the user
moves the mouse, but it might be a bit confusing. We’ll stick with the
stop
event, which fires as soon as the user completes
the selection:
$('#tags').selectable({ stop: function() { // The user stopped selecting! } });
var names = $.map($('.ui-selected, this'), function(element, i) { return $(element).text(); }); $('li', this) .filter(function() { return ($.inArray($(this).text(), names) != -1); }) .addClass('ui-selected');
$('.ui-selected',
this)
. This looks like a regular jQuery selector, but there’s
a second parameter. It turns out that the complete definition for the
jQuery selector is actually $(expression, context)
;
we’ve just been omitting the second parameter. The
context
defines where jQuery should
look for your selector; by default, it looks everywhere on the page, but
by specifying our unordered list as the context, the expression will be
limited to elements inside the list.
$.map
and
$.inArray
. The utility methods jQuery
provides are mostly for working on JavaScript arrays, and that’s what
we’re doing here. First, we create an array called
names
, which we populate using the
$.map
method.
The $.map
method allows you to take
each element in the array, process it in some manner, and return the
results as a new array. You use it when you want to transform every
element in the same way. We want to transform our jQuery selection
into a simple list of tag text, so we pass in the selection, and
define an anonymous function to return each element’s text. Hey
presto: an array of tag text!
The map
function can also be used
directly on a selection, where we could rewrite the name-grabbing code
like so:var names = $('.ui-selected, this').map(function(i, element){ return $(element).text(); });
map
,
filter
, and Friendsmap
and
filter
functions are
examples of
higher order functions; that is, they are
functions that take functions as parameters to apply to our lists.
Providing a conventional interface to list manipulation is quite
powerful: it lets you transform your data in a simple, readable
manner. In fact, the map
and
filter
operations (as well as a bunch of
other iteration methods) have been added to the recent
versions of JavaScript.
filter
function uses
the $.inArray
utility method, which searches an
array (but only plain JavaScript arrays, not jQuery selections) for a
specified value. Given an array and a search term, like
$.inArray(value, array)
, it will return the value’s
index in the array. Helpfully, it will return -1
if
the value is not found in the array. Remember
that filter
expects us to return either
true
or false
—so we just check
to see if
$.inArray
returns
-1
, and return true
or
false
as appropriate. Using
filter
in this way allows us to search our
array of tag texts for each list item’s text; if it’s in there, it’s a
duplicate, so we return it to the filter to be selected.
ui-selected
class
on them:
$('#approve').click(function() { $('#tags') .find('.ui-selected') .addClass('approve') .removeClass('ui-selected reject'); }); $('#reject').click(function() { $('#tags') .find('.ui-selected') .addClass('reject') .removeClass('ui-selected approve'); }); $('#clear').click(function() { $('#tags') .find('li') .removeClass('ui-selected approve reject'); $('#approved').val(''); });
approve
or reject
class
when the user clicks on our buttons,
also being sure to remove the ui-selected
class
, since we want to style approved
tags differently from selected ones.
But what if we wanted to, say, send this information to the
server? Perhaps it would be good to store the list of approved tags in
a
hidden form field, so that the server can access it for
processing. Let’s update the #approve
click handler
to iterate over the approved items, and append each item’s index to a
hidden field in a simple pipe-delimited format:
$('#approve').click(function() { var approvedItems = ""; $('#tags') .find('.ui-selected') .addClass('approve') .removeClass('ui-selected reject') .each(function() { approvedItems += $(this).index() + "|"; }); $('#approved').val(approvedItems); });
#clear
button click handler to clear that input’s value:
Thanks to the
index
method, we now know which
items in the list have been approved. index
will tell you an item’s position inside its parent element. Our control is impressive in how easy it is to
use. The jQuery UI Selectable plugin is doing a lot of work behind the
scenes to allow lists to be selectable, but the end result is a
natural-feeling component, and that’s exactly what we want.

Beau Dandy

Glendatronix

BMX Spandex Corporation

Maxwell Zilog

Computadors

sort
function on them.
We’ll try to build a reusable list-sorting widget. We’ll call it
SORTER
, and then call
SORTER.sort(list)
to sort a list in ascending order,
and SORTER.sort(list, 'desc')
to sort in descending
order. We’ll assume that the selector passed in will match ordered or
unordered lists, but let’s see if we can make that happen:
var SORTER = {}; SORTER.sort = function(which, dir) { SORTER.dir = (dir == "desc") ? -1 : 1; $(which).each(function() { // Find the list items and sort them var sorted = $(this).find("> li").sort(function(a, b) { return $(a).text().toLowerCase() > $(b).text().toLowerCase() ? ↵SORTER.dir : -SORTER.dir; }); $(this).append(sorted); }); };
desc
was passed in
as the dir
parameter, and set the
SORTER.dir
variable accordingly. All we need to do is
grab all the first-level child list elements and give them a sort. We
only want the first-level items; if we grabbed further levels, they’d be
sorted and dragged up to the parent level. Because calling
sort
reverts our selections to raw JavaScript,
we need to rewrap them in the $()
to be able to call
the jQuery text
method and compare their
values. We also convert the values to lowercase, which makes the sorting
case-insensitive.
sort
Functionsort
function is plain old
JavaScript. It sorts an array based on either default rules such as sorting
numerically for numbers and alphabetically for strings, or by the
results of the function you pass to it. sort
will go over the contents of the array and pass them to your function
in pairs. If your function returns 1
,
sort
will swap the items and place the second
one first. If your function returns -1
, JavaScript
will put the first item first. Finally, if your function returns
0
, sort
will consider that
both items are equal and no sorting will take place.
SORTER.dir
variable to -1
or
1
, depending on the direction. Then in the
sort
comparison function, we perform a further
calculation: if a
is less than b
,
we return -SORTER.dir
. If the direction comes in as
-1
, we process it as -(-1)
, which
is 1
; so if we’re trying to sort descending, the
return values are swapped.
Once we’ve sorted the items, we can reinsert them into the list in
the correct order. Remember, the append
function removes the element first, so it removes the item and appends
it in the correct position.
To test it out, we’ll add some buttons to our HTML and call
SORTER.sort
from their
click
event handlers:
select
elements, especially those with
multiple="multiple"
(that is, select boxes which
appear as selectable lists of items).
select
elements: one contains A-list
celebrities, and one has every other celebrity in the system. Yet fame
is extremely fickle, and an A-lister today can be a nobody tomorrow,
so the client wants to be able to easily swap the celebrities between
lists. We’ll add a few controls to the interface to enable this, as
shown in Figure 8.2.
This is the HTML we’re dealing with, consisting of the two
select
elements and a few buttons
for performing various operations:
<select id="candidates" multiple="multiple" size="8"> <option value="142">Beau Dandy</option> … </select> <select id="a-listers" multiple="multiple" size="8"> <option value="232">Johnny Stardust</option> … </select>
 <input type="button" id="swapLeft" value=">" /> <input type="button" id="swapRight" value="<" /> …

SWAPLIST
object that will contain all the functionality we’ll build. This can
then be reused anytime we need to play with select
elements:
var SWAPLIST = {}; SWAPLIST.swap = function(from, to) { $(from) .find(':selected') .appendTo(to); }
swap
function that
accepts selector strings targeting two lists: a source list and a
destination list. The first task we want to do is to grab any items
that are currently selected. We can do this using the
find
action with the
:selected
form filter. This filter
will return any form elements that have the attribute selected
set. Then we can move the
selection over to the destination list with
appendTo
. Easy! And once we’ve defined this
functionality, we can apply it to any two lists by calling our
swap
method from appropriate click
handlers:
$('#swapLeft').click(function() { SWAPLIST.swap('#candidates', '#a-listers'); }); $('#swapRight').click(function() { SWAPLIST.swap('#a-listers', '#candidates'); });
SWAPLIST
object.
How about swapping all elements? That’s even
easier:
SWAPLIST.swapAll = function(from,to) { $(from) .children() .appendTo(to); }
SWAPLIST
object that does
this:
SWAPLIST.invert = function(list) { $(list) .children() .prop('selected', function(i, selected) { return !selected; }); }
selected
property using the
prop
action. prop
is very similar to
attr
(which we’ve seen before), except it is used
to set
properties, rather than attributes.
Generally, if it’s a Boolean
true
/false
value, we should use
prop
, but the full list of properties and
attributes (as well as an in-depth discussion about the two methods)
can be found on the jQuery
documentation site.
We use the prop
function to set our
list items to !$(this).prop('selected')
. The
JavaScript
NOT (!
) operator (the exclamation
mark) inverts the Boolean value, so if the value is
true
it becomes false
, and if it
is false
it becomes true
.
prop
with a Function
Parameterprop
action and seen it’s similar to the
attr
action, but we’re taking
advantage of some advanced functionality. Previously, we used the
attr(key, value)
action to set attributes to a
static value, but prop
and
attr
also lets us pass in a
function to determine the value to set. The function will be passed
two parameters: the index of the element and its current value. The
returned value
of the function becomes the attribute’s new value. For our
invert
method, we return the opposite of
the element’s current selection value—so each element is toggled. We
can do this kind of dynamic processing with stacks of commands:
text
, html
,
val
, addClass
,
wrap
… and many more!
SWAPLIST.search = function(list, search) { $(list) .children() .prop('selected', false) .filter(function() { if (!search) { return false; } return $(this) .text() .toLowerCase() .indexOf(search.toLowerCase()) > - 1 }) .prop('selected', true); }
selected
to false
).
Next, we’re using the filter
action to find
any elements we’re searching for.
The
filter
action accepts a
function as a parameter, and runs that function against
every jQuery object in the selection. If the function returns
true
, the element stays in the selection. But if
the function returns false
—it’s gone … out of the
selection, and unaffected by further processing.
To find elements we care about, we check to see if the text they
contain has the text we’re looking for within it. To do this we use
the
text
action that gives us a
string. We convert it to lowercase (so the search will be
case-insensitive), and check to see if our source
text is located in the element string. The JavaScript
indexOf
method will find the
position of a string inside another string; for example,
"hello".indexOf('ll');
will return
2
(the index starts at 0
, as
usual). If the substring is not found,
indexOf
will return -1
,
which is what we’re checking for here.
Whichever elements remain in the jQuery selection after the
filter
function runs must contain the keyword
we’re looking for. Once again, we use the
prop
method to select them.
To use the search method we created, we could attach it to a
click
handler, so the user types a word and then
clicks a search button. Even better is to attach a
keyup
handler to the input
itself, so it selects as you
type:

A-list Celebrities

In a successful band

Johnny Stardust

Glendatronix

 …
Famous because they're rich

Dot-Com millionaires

Joel Mynor
 …
class
es you can use to customize
the display. The handle
class
will be assigned to the element we’ll
insert to act as the toggle handle. When a branch of the tree is opened,
it will receive the opened
class
; otherwise, it will have the closed
class
. We’ve used these classes below to add
a CSS sprite, which will change between a plus sign and a minus
sign:
.handle { background: transparent url(tree-handle.png) no-repeat left top; display: block; float: left; width: 10px; height: 10px; cursor: pointer; } .closed { background-position: left top; } .opened { background-position: left -10px; }
ul
categories. Then we’ll add in a
new element before the category title that contains a
click
event handler; this will open and close its
branch:
$('#celebTree ul') .hide() .prev('span') .before('') .prev() .addClass('handle closed') .click(function() { // plus/minus handle click });
span
element—that’s the
subcategory title. Then we insert a new span
element right before the title.
Because our handle was added before the title, we need to move
back to it with the prev
action. We add the
handle
and closed
(it’s closed by default because of the
hide
action) class
es to it, and an event handler for when
it’s clicked.
At this stage the tree will be fully collapsed, with our brand-new
handle prepended to the titles. All that’s left to do is toggle the
branches when we click on it:
// plus/minus handle click $(this) .toggleClass('closed opened') .nextAll('ul') .toggle();
closed
and opened
class
es with
toggleClass
. If you specify
multiple class
names with
toggleClass
, any specified class
that exists on the element is removed,
and any that are absent from the element are added.
toggleClass
toggleClass
is
that it accepts a second parameter: a Boolean value that specifies
whether the class
should be added
or removed. This might sound strange, but it’s a nice shortcut.
Consider this code:
if (x == 1) { $(this).addClass('opened'); } else { $(this).removeClass('opened'); }With the
toggleClass(class, switch)
syntax,
we can replace the if
statement with the following
concise syntax:
$(this).toggleClass('opened', x == 1);
nextAll
action. jQuery will check
the next sibling, see that it’s a span
element (the category title), filter it
out based on our expression, and move to the next sibling … which is a
ul
item. Bingo! We just toggle this
and the tree swings open and closed.
on
method in the section called “Prepare for the Future: on
and
off
” in Chapter 6. on
handles event
delegation for you—that’s the magic that makes it possible.
To acquire a better understanding of how event delegation works
and why it’s important, let’s use it for real. We’ll start with the
following HTML, which displays our products in a categorized
list:
Selection: --Choose a celebrity--

 A-List

Beau Dandy

Glendatronix

 B-List

Mo' Fat

DJ Darth Fader

click
event handler to every list
item—$('#picker li').click(…)
—we
could end up with hundreds of handlers. This would severely impact performance, as the browser
would need to keep track of them all, checking each one whenever a click
occurred on the page. With event delegation, we add our lone event
handler to the parent of the list, and then access the target of the
event to determine the element that was actually clicked on. The
target
property of an event is the
actual DOM element, so it needs to be wrapped in the jQuery selector to
obtain a jQuery object:
$('#picker').click(function(e) { $('#current').text($(e.target).text()); });Our list acts as if each item has its own handler! But there’s one small gotcha to be aware of: event delegation works because of event bubbling (which we looked at in the section called “Event Propagation ” in Chapter 5). The events will bubble up until our parent handler catches them. The problem occurs if a handler catches the event before the parent and stops the event from propagating (with
e.stopPropagation
, or "return
false"
). If the event is stopped on its way up, event
delegation will fail. That’s why it’s important that you know how events
are being handled under the hood; it will save you a lot of headaches
when dealing with otherwise incomprehensible bugs.
We’ve handled any clicks with a single handler, but we now need to
find out a bit more about where the element is located. Specifically,
how can we find out which category the element is in? How about
this:
$('#picker').click(function(e) { $('.selected').removeClass('selected'); $(e.target).addClass('selected'); var celebrity = $(e.target).text(); var category = $(e.target) .closest('.category') .find('.title') .text(); $('#current').text(category + " > " + celebrity); });
closest
method to
find the closest element with the category
class
. If the element itself doesn’t have
that class
,
closest
will check its parent and so on, until
it finds a matching element. This saves us having long strings of
parent().parent().parent()
, and also lets us be more
flexible in how we structure our HTML.
position: fixed
can be used to affix
the thead
element in place. However,
position: fixed
can only position an element
relative to the viewport, rather than its containing element. This means
that for tables contained inside other elements (which will almost
always be the case), we need to turn to jQuery.
Let’s look at how we can achieve this effect. Our markup is the
same Celebrities table we added zebra-striping to back in Chapter 2:

 Id	 Name	 Occupation	 Approx. Location	 Price

 …

thead
around is tricky.
Some browsers let you move it with impunity, while in others it’s
surprisingly resistant to styling. So we’ll employ a trick: we’ll
duplicate the contents of the thead
in the form of an unordered list, styled to look exactly like the
thead
. Then we’ll give that
position: absolute;
, and move it around the screen
as the user scrolls.
We start by creating a TABLE
widget to hold our
code, with a fixHeader
method that we’ll use
for our fixed headers effect. The method will expect to receive a
selector string pointing at a table on the page. We start by storing a
few selections inside variables and in data
, to
speed up our subsequent code:
var TABLE = {}; TABLE.fixHeader = function(table) { $(table).each(function() { var $table = $(this); var $thead = $table.find('thead'); var $ths = $thead.find('th'); $table.data('top', $thead.offset().top); $table.data('left', $thead.offset().left); $table.data('bottom', $table.data('top') + $table.height() - ↵$thead.height()); …
each
, and store
a reference to the table
itself
($table
), the thead
($thead
), and the
collection of th
elements it contains
($ths
). Finally, we store the left and top offsets of
the $thead
, as well as the location of the bottom of
the table (to avoid the header moving past the bottom!).
each
When Writing Selector-based
Functionseach
loop. But in the interests of preparing for the future, and making our
code reusable, we’ve included the loop anyway; even if the
table
selector returns multiple tables, our
function will handle them all with grace.
ul
—and copy over the contents of the table
header:
var $list = $('

'); $ths.each(function(i) { _th = $(this); $list.append($("

") .addClass(_th.attr("class")) .html(_th.html()) .width(_th.width()) .click(function() { _th.click() }) ).hide().css({left: $table.data('left'),top: $table.data('top')}); }); $('body').append($list);
th
elements
collected in $ths
, we use an
each
action to go through each one and craft
our mimics. We copy the original elements’ class
, HTML contents,
width
, and click
event handlers.
Some of this is unnecessary in our simple example, but it’s good to be
prepared! After the list is fully populated, we hide it and position it
directly over our real thead
before
slipping it into the page.
thead
mimic now nicely
in place, we need to react to the scroll
event and
position it appropriately:
$(window).scroll(function() { clearTimeout(timer); timer = setTimeout(function() { if ($table.data('top') < $(document).scrollTop() && ↵$(document).scrollTop() < $table.data('bottom')) { $list .show() .stop() .animate({ top: $(document).scrollTop(), opacity: 1 }); } else { $list.fadeOut(function() { $(this).css({top: $table.data('top')}); }); } }, 100); });
scroll
event fires; it’s a very short time, but
enough to ensure that we avoid constantly animating as the user scrolls.
We check to see if we’ve scrolled the thead
out of the viewport, but not past the
bottom of the table; if we have, we reveal our mimic and animate it to
the correct position. If we’ve scrolled back high enough so that the
original thead
is visible, or down
past the bottom of the table, we fade out the impostor list (and
position it back at the top, so that it animates from the correct
position when it reappears).
And there you have it! We can call our
TABLE.fixHeader("#celebs")
and scroll the page, and
the new “thead
” follows along to keep
the identifying labels visible at all times.
$('#celebs') .find('tr:first') .clone() .insertAfter('#celebs tr:nth-child(10n)');This solution starts out simply enough: grabbing the first table row and cloning it with the
clone
method. Then
comes the clever bit: the
nth-child selector
is perfect for adding the rows right where we want them. You might be a
little baffled by the way we’ve used it, though, as its syntax differs a
bit from the other filters we’ve seen. At its most basic, if you give it
a simple integer, it will select that index. For example, if you
selected :nth-child(2)
, you’d receive the third child
element.
But the :nth-child
selector also accepts other
values, which cause it to select multiple rows at the same time. If you
pass in the text values even
or
odd
, you’ll select all the even or odd child
elements. Coolest of all, you can pass it an equation to figure out
which children to select!
You can use the letter “n” to indicate repetition; for example,
:nth-child(10n)
will select every tenth row. You can
then augment this with a plus or minus to offset which rows are
selected. For example, if you want to select the third row, and then
every tenth row after that, you could use
:nth-child(10n+3)
. And if you like to think
backwards, you could achieve the same result with
:nth-child(10n-7)
.
That all works okay, but it does have a bug: if the last row of
the table matches our equation, the header row will be repeated as the
final row, which looks a bit weird. Additionally, we want to apply the
repeating header to a couple of tables, and avoid having to copy and
paste code. In the next chapter, we’ll look at making our code reusable
via plugins, but for now we’ll keep it simple and stick with a trusty
widget object:
var TABLE = {}; TABLE.repeatHeader = function(table, every) { $(table).each(function() { var $this = $(this); var rowsLen = $this.find('tr:not(:first)').length; $(this).find('tr:first') .clone() .insertAfter($this.find('tr:nth-child(' + every + 'n)')); if ((rowsLen) % every === 0) { $this.find('tr:last').remove(); } }); }
$(this)
element and grab the number of rows in the
table. It’s important to store the number of rows in advance, because
when we repeat our table headers the number of rows is going to
change.
Next comes the workhorse: we copy out the first row (as we did
before) and insert it every “nth” row. This needed to be slightly
rewritten with a find
action, so it could be
run on any of a number of tables matched by the selector; otherwise,
it’s exactly the same as our first effort.
The final part of the code does a small bit of math to determine
whether we’ve added a header as the final row of the table; if the total
number of rows divides evenly by our repeater number, we need to remove
the last row.

<

0 of x ↵

>

 …

var TABLE = {}; TABLE.paginate = function(table, pageLength) { // 1. Set up paging information … // 2. Set up the navigation controls … // 3. Show initial rows … pagination = function (direction) { // 4. Move previous and next var reveal = function (current) { // 5. Reveal the correct rows … }; } };
// 1. Set up paging information var $table = $(table); var $rows = $table.find('tbody > tr'); var numPages = Math.ceil($rows.length / pageLength) - 1; var current = 0;
div
, then back down to the navigation
section. This approach lets you apply the same code to any tables that
have been structured appropriately:
// 2. Set up the navigation controls var $nav = $table .parents('.table-wrapper') .find('.wrapper-paging ul'); var $back = $nav.find('li:first-child a'); var $next = $nav.find('li:last-child a');
pagination
function with the direction we
want to move:
$nav.find('a.paging-this strong').text(current + 1); $nav.find('a.paging-this span').text(numPages + 1); $back .addClass('paging-disabled') .click(function() { pagination('<'); }); $next.click(function() { pagination('>'); });
:lt()
and
:gt()
filters, but when it comes time
to show, say, rows 10 to 20, the selectors will get a bit messy.
Luckily for us there’s the
slice
action, which takes a
start index and an end index as parameters, and returns only the
objects within that range:
// 3. Show initial rows $rows .hide() .slice(0, pageLength) .show();
// 4. Move previous and next if (direction == "<") { // previous if (current > 1) { (current -= 1); } else if (current == 1) { (current -= 1); $back.addClass("paging-disabled"); } } else { // next if (current < numPages - 1) { current += 1; } else if (current == numPages - 1) { current += 1; $next.addClass("paging-disabled"); } } reveal(current);
current
variable but not the
table itself. To do so, we create an internal function called
reveal
:
// 5. Reveal the correct rows var reveal = function (current) { $back.removeClass("paging-disabled"); $next.removeClass("paging-disabled"); $rows .hide() .slice(current * pageLength, current * pageLength + pageLength) .show(); $nav.find("a.paging-this b").text(current + 1); }
reveal
starts by clearing the disabled
class
es, so that our buttons
avoid becoming stranded in a disabled state. We then use the
slice
method again to select the correct rows
to display.
input
elements, as shown in Figure 8.8.
The cells that contain your tabular data provide an excellent
opportunity to store information as we manipulate the markup; this is
actually a trick we used in our form controls. What we’ve yet to
experience, though, is a row element to group our work area. Let’s see
how to use it:
<form action="null" method="post">

 ID	 Name	 Occupation	 Approx. Location	 Price

 203A	 Johnny Stardust	 Front-man	 Los Angeles	 $39.95
 …
TABLE.formwork = function(table) { var $tables = $(table); $tables.each(function () { var _table = $(this); _table .find('thead tr') .append($(' 	')); _table .find('tbody tr') .append($('<input type="button" ↵value="Edit"/>	')) }); $tables.find('.edit :button').on('click', function(e) { TABLE.editable(this); e.preventDefault(); }); }
TABLE.formwork
method looks for the
selector we pass in, and then the rows in the thead
and tbody
, adding an extra edit
cell to each. The thead
cell is empty, but it’s there to
retain the table’s column structure, and the tbody
addition holds the button that
switches the row into edit mode.
Now comes the good part. We want our buttons to work in two
states: an edit mode and a save mode. We also want all the cells other
than our button-containing cells to become editable. Here’s how we’re
going to do it:
TABLE.editable = function(button) { var $button = $(button); var $row = $button.parents('tbody tr'); var $cells = $row.children('td').not('.edit'); if ($row.data('flag')) { // in edit mode, move back to table // cell methods $row.data('flag', false); $button.text('Edit'); } else { // in table mode, move to edit mode // cell methods $row.data('flag', true); $button.text('Save'); } };
click
event from
TABLE.formwork
passes in the button for the
row we want to edit, so we’ll use that to cache references to the
parent row and the other cells it contains. We use
parents
on the $button
object to find the row, and children
on the
$row
(excluding the edit cell with
not
) to find all the other cells.
In the if
statement, we set a
data
flag to let us know that the row is in
edit mode, and change the button text to reflect that. All that
remains is to switch out the cell contents.
We’ll look at the code in reverse order, to present the simpler
code first. The easiest part of what we need to do is
exit edit mode:
$cells.each(function () { var _cell = $(this); _cell.html(_cell.find('input').val()); });
val
of the input
in the _cell
, and
add it as the _cell
’s
html
. Since we need to refer to the cell more than once (even
if it’s only twice!), we save it in a variable first to speed up
performance.
Now for the code required to change into
edit mode:
$cells.each(function () { var _cell = $(this); _cell.data('text',_cell.html()) .html(''); var $input = $('<input type="text" />') .val(_cell.data('text')) .width(_cell.width() - 16); _cell.append($input); });
input
s, or we’ll break the layout.
Before we empty each cell, though, we store the current contents in
data
so that we can use them later.
We’re going to append
an input
we create, and as we’ve seen, it’s
important to manipulate anything we create before
we add it to the DOM. The input
’s
width is set smaller than the width of the cell to avoid any layout
breakage, and we grab the data we just saved to serve as the
input
element’s default value.
Try it out, and you’ll be impressed by how smoothly it works.
Are you starting to feel like a ninja now?
next
or
previous
functions we can hook into.
Naturally, jQuery can help us out. Thanks to its sophisticated
selector engine, we can do whatever we want; it might just require a
bit of thinking. To start with, we know we need to grab the table; in
our case, it’s good old #celebs
. From here we need
to try to find the checkboxes in the first column of each row.
Next, we should retrieve the table rows, #celebs
tr
, and then the first columns of each row, #celebs
tr td:nth-child(1)
. Finally, we make sure we’re only
selecting checkboxes: #celebs tr td:nth-child(1)
:checkbox
. That’s quite the selector! How far we’ve come
from our simple $('tr:odd')
.
We place another checkbox (with an id
of checker
) in the thead
of our table. Because it’s in a
th
rather than a td
, our selector will ignore it. To this we
can attach a click
handler to turn on/off all the
checkboxes by setting all the checkboxes’ checked
property to that of the top
checkbox:
var chkSelector = 'tr td:nth-child(1) :checkbox'; $('#checker').click(function() { $('#celebs ' + chkSelector) .prop('checked', $(this).prop('checked')); });
chkSelector
) because we want to reuse it
later.
e.shiftKey
contained within the
click
event itself; there’s no need for us to
capture keystrokes or the like! We can also check the
ctrlKey,
altKey, and
metaKey in the same manner.
How about finding out which row was clicked on? For that we can
just jump up the DOM and find the parent row of the checkbox, then
fetch its index using index
. Another easy
one.
Next, we have to know where the user last
clicked, so that we can have a start and end point for checking boxes.
The easiest way for us to do this is to store each click in the table
using the data
method. That’s a lot of
information, so let’s put it into practice:
$('#celebs ' + chkSelector).click(function(e) { var $table = $(this).parents('table'); var lastRow = $table.data('lastRow'); var thisRow = $(this).parents('tr').index(); if (lastRow !== undefined && e.shiftKey) { var numChecked = 0; var start = lastRow < thisRow ? lastRow : thisRow; var end = lastRow > thisRow ? lastRow : thisRow; $table .find(chkSelector) .slice(start, end) .prop('checked', true); } $table.data('lastRow', thisRow); });
lastRow
value (it will be undefined the first time
through, before we’ve stored a click value on the table
), and the user is also holding down
Shift.
With the source and destination rows in hand, we now need to
figure out which is further down the table, so we can make sure that
the starting point is before the end point. Then we
slice
up our checkbox selection with jQuery’s
slice
method. With our freshly sliced jQuery
selection in hand, we can finish it off by checking all the remaining
checkboxes in the selection. Now you can easily select ranges of rows
in a highly intuitive manner!


I can see potential in general sports medicine and for monitoring elite athletes. The system would be of value to us when monitoring our players here at NUFC.
---
title: Providing athletes with an edge through real-world joint analytics
description: The next generation of functional sports performance insights
---
The next generation of functional sports performance insights.
Providing athletes with an edge through
real-world joint analytics
I can see potential in general sports medicine and for monitoring elite athletes. The system would be of value to us when monitoring our players here at NUFC.


Personalization Setup Instructions for Spartacus
Note: Spartacus 1.x is no longer maintained. Please upgrade to the latest version.
For the following steps, the Electronics sample site is used along with the Spartacus Sample Data Addon.
Back End Extension Requirements
Make sure all the required personalization extensions and AddOns are installed in your SAP Commerce Cloud instance. For more information, see the Personalization installation instructions for your release.
Back End CORS Settings
As described in Configure Personalization for Commerce Web Services, add occ-personalization-id
and occ-personalization-time
to the following settings:
corsfilter.commercewebservices.allowedHeaders
corsfilter.commercewebservices.exposedHeaders
Note: These settings are for SAP Commerce Cloud version 2005 or newer. For SAP Commerce Cloud version 1905 or older, use the following settings instead:
corsfilter.ycommercewebservices.allowedHeaders
corsfilter.ycommercewebservices.exposedHeaders
If a setting doesn’t exist, create it.
If the setting already exists, add the new values to the end, including a space before. For example, allowedHeaders
might look like this:
origin content-type accept authorization occ-personalization-id occ-personalization-time
Note: You can edit these settings using HAC, but you can also add these parameters to local.properties
in the hybris/config
folder or in the project.properties
file of ycommercewebservices.
Personalization Configuration in Backoffice
-
In Backoffice, go to
Personalization > Configuration > Personalization Configuration
. -
Select Electronics Site.
-
In the Properties tab, General section, add Spartacus Electronics Site to Set of base sites.
-
In the Commerce Web Services tab, set Personalization for Commerce Web Services to True.
To test that the configuration is working:
- Send an OCC REST API call to your site. You should see
Occ-Personalization-Id
in the response header. - Send the call again but with
Occ-Personalization-Id: yourid
in the header, and you should also seeOcc-Personalization-Time
.
Enabling Personalization in Spartacus
In app.module.ts
, add the following to the settings in the B2cStorefrontModule.withConfig
section:
personalization: {
enabled: true,
},
Testing Personalization
To test your own configurations, you can try out the steps in the following Personalization tutorials:
For more information, see Peronalization in the SAP Help Portal.
Setting Up Personalization Context For Spartacus (Optional)
The personalization context contains information about personalization details like segments and actions which influence displayed content. Such information can be used by reporting tools.
Sample personalization context :
{
"actions": [
{
"action_code": "actionCanonLoverSpa",
"action_type": "CxCmsActionResult",
"variation_code": "canonLoverSpa",
"variation_name": "canonLoverSpa",
"customization_code": "CategoryLoversSpa",
"customization_name": "CategoryLoversSpa"
},
{
"action_code": "canonLoverSearchProfileActionSpa",
"action_type": "CxSearchProfileActionResult",
"variation_code": "canonLoverSpa",
"variation_name": "canonLoverSpa",
"customization_code": "CategoryLoversSpa",
"customization_name":"CategoryLoversSpa"
}
],
"segments": [
"USER_ANONYMOUS",
"CanonLover",
"CATEGORY brand_10"
]
}
Back End
-
The
personalizationaddon
extension.The
personalizationaddon
is needed to expose the personalization context on the storefront. It should be added tolocalextension.xml
.... <extension name="personalizationaddon" /> ...
-
The PersonalizationScriptComponent
The personalizationaddon contains the PersonalizationScriptComponent, which should be inserted into PlaceholderContentSlot. You can run the impex below to add PersonalizationScriptComponent to your content catalog. Remember to set $contentCatalog parameter to the proper content catalog value.
$contentCatalog = electronics-spaContentCatalog $stageContentCV = catalogVersion(CatalogVersion.catalog(Catalog.id[default=$contentCatalog]), CatalogVersion.version[default=Staged])[default=$contentCatalog:Staged] # ----------------------------------------------------------------------- # Component needed for personalization context visible in storefront # ----------------------------------------------------------------------- INSERT_UPDATE PersonalizationScriptComponent; $stageContentCV[unique = true]; uid[unique = true] ; name ; ; ; PersonalizationScriptComponent ; PersonalizationScript ; PersonalizationScript ; ; INSERT_UPDATE ContentSlot; $stageContentCV[unique = true]; uid[unique = true] ; active; cmsComponents(uid, $stageContentCV)[mode = append] ; ; PlaceholderContentSlot ; true ; PersonalizationScriptComponent $onlineContentCV = catalogVersion(CatalogVersion.catalog(Catalog.id[default=$contentCatalog]), CatalogVersion.version[default=Online])[default=$contentCatalog:Online] # ----------------------------------------------------------------------- # Component needed for personalization context visible in storefront # ----------------------------------------------------------------------- INSERT_UPDATE PersonalizationScriptComponent; $onlineContentCV[unique = true]; uid[unique = true] ; name ; ; ; PersonalizationScriptComponent ; PersonalizationScript ; PersonalizationScript ; ; INSERT_UPDATE ContentSlot; $onlineContentCV[unique = true]; uid[unique = true] ; active; cmsComponents(uid, $onlineContentCV)[mode = append] ; ; PlaceholderContentSlot ; true ; PersonalizationScriptComponent
Frontend - Spartacus
Spartacus contains PersonalizationContextService, which enables access to personalization context. If you would like to use information from personalization context, you can subscribe to it and get PersonalizationContext object.
export interface PersonalizationContext {
actions: PersonalizationAction[];
segments: string[];
}
export interface PersonalizationAction {
action_name: string;
action_type: string;
customization_name?: string;
customization_code?: string;
variation_name?: string;
variation_code?: string;
}
Below you can find a sample test service, which displays personalization context in the console.
import { Injectable } from '@angular/core';
import {PersonalizationContextService} from "./personalization-context.service";
@Injectable({
providedIn: 'root',
})
export class PersonalizationTestService {
constructor(
protected service : PersonalizationContextService
) {
this.service.getPersonalizationContext().subscribe(evt => console.log(evt));
}
getServiceName(): String {
return 'PersonalizationTestService';
}
}


Conceptual Model
profile
profileId (primary key)
profileActivationToken
profileAvatarUrl
profileEmail
profileFirstName
profileHash
profileLastName
profileUsername
trail
trailId (primary key)
trailAvatarUrl
trailDescription
trailDifficulty
trailHigh
trailLatitude
trailLength
trailLow
trailLongitude
trailName
photo
photoId (primary key)
photoProfileId (foreign key)
photoTrailId (foreign key)
photoDateTime
photoUrl
tag
tagId (primary key)
tagName
trailTag
trailTagTraiId (primary key)
trailTagProfileId (foreign key)
trailTagTagId (primary key)
rating
ratingProfileId (foreign key)
ratingTrailId (foreign key)
ratingValue
ratingDifficulty
Relationships
One profile can search for many trails (1 to n)
One profile can add many photos (1 to n)
One profile can add many trail tags (1 to n)
One trail can have many photos (1 to n)
One trail can have many ratings (1 to n)
Many trails can have many tags (m to n)
Many profiles can rate many trails (m to n)
ERD
Wireframes


<reqcontp>
The <reqcontp>
element specifies a technical publication that can be
used to fulfill a condition before performing a task. It may also specify a publication
that is required in order to fulfill the condition, such as a list of local regulations.
Category: Task requirements domain


{% extends "base.html" %} {% block styles %} {{ super() }} {% endblock %} {% block page_content %}
The one I got was “My First Lab - Duo Scope”....................................................................................................... ..........................................................
This is about a cat called Scratchy, a guy called Mitch and some cosmic defenders. You will learn to program in a simple language called Scratch and your projects will be part of the adventure.
This is about a cat called Scratchy, a guy called Mitch and some cosmic defenders. You will learn to program in a simple language called Scratch and your projects will be part of the adventure.
(More info here)....................................................................................................... ..........................................................
(More info here)....................................................................................................... ..........................................................
{% endblock %}


| html_notebook {rmarkdown} | R Documentation |
Format for converting from R Markdown to an HTML notebook.
html_notebook( toc = FALSE, toc_depth = 3, toc_float = FALSE, number_sections = FALSE, fig_width = 7, fig_height = 5, fig_retina = 2, fig_caption = TRUE, code_folding = "show", theme = "default", highlight = "textmate", mathjax = "default", extra_dependencies = NULL, css = NULL, includes = NULL, md_extensions = NULL, pandoc_args = NULL, output_source = NULL, self_contained = TRUE, ... )
toc |
|
toc_depth |
Depth of headers to include in table of contents |
toc_float |
|
number_sections |
|
fig_width |
Default width (in inches) for figures |
fig_height |
Default height (in inches) for figures |
fig_retina |
Scaling to perform for retina displays (defaults to 2, which
currently works for all widely used retina displays). Set to |
fig_caption |
|
code_folding |
Enable document readers to toggle the display of R code
chunks. Specify |
theme |
Visual theme ("default", "cerulean", "journal", "flatly",
"darkly", "readable", "spacelab", "united", "cosmo", "lumen", "paper",
"sandstone", "simplex", or "yeti"). Pass |
highlight |
Syntax highlighting style. Supported styles include
"default", "tango", "pygments", "kate", "monochrome", "espresso", "zenburn",
"haddock", and "textmate". Pass |
mathjax |
Include mathjax. The "default" option uses an https URL from a
MathJax CDN. The "local" option uses a local version of MathJax (which is
copied into the output directory). You can pass an alternate URL or pass
|
extra_dependencies |
Additional function arguments to pass to the
base R Markdown HTML output formatter |
css |
One or more css files to include |
includes |
Named list of additional content to include within the
document (typically created using the |
md_extensions |
Markdown extensions to be added or removed from the
default definition or R Markdown. See the |
pandoc_args |
Additional command line options to pass to pandoc |
output_source |
Define an output source for R chunks (ie,
outputs to use instead of those produced by evaluating the
underlying R code). See |
self_contained |
Produce a standalone HTML file with no external
dependencies. Defaults to |
... |
Additional function arguments to pass to the
base R Markdown HTML output formatter |
See the online
documentation for additional details on using the html_notebook
format.


Tnine
问题描述 :
Now I will give you the workflow of Tnine in T days, the company has received N projects’ requests, but it need not to accept all.
Each project will give four conditions 1) It will needs M employees;2) It must be started on the day S and finished on the day E. Meantime, it can not be interrupted;3) The project can offer P profits. 4) You can assume in one day will not have more than one project.
Each employee who joins a project will get a day off after finishing the work, it means Kongyi will not ask an employee to join a new project in the second day after he finished his project. And Kongyi knows some of workers’ cooperation will get extra profits. Now your job is to help Kongyi to arrange the eight employees and choose which projects to accept to maximize the total profits.
输入:
The first line of each test case contains two integers T (0 < T ≤ 100000) and N (0 < N ≤ 500). Then following N lines give the description of the projects. Each line contains four non-negative integers M (0 < M ≤ 8), S, E (0 < S, E ≤ T) and P. With the same meaning described above.
The next line contains a single integer Q (0 ≤ Q < 2^8), denotes Q descriptions of cooperation as following.
Each description is a single line, the first integer q shows the number of employees in this cooperation. Then the following q integers mean those q employees’ id (0 ≤ id < 8) and the last integer means the extra profits F. That means a team contains those employees will take extra profits F.
Note that if a team contains more than one kind of cooperation, we will chose the maximum extra profits to add.
See the sample input for further details.
输出:
The first line of each test case contains two integers T (0 < T ≤ 100000) and N (0 < N ≤ 500). Then following N lines give the description of the projects. Each line contains four non-negative integers M (0 < M ≤ 8), S, E (0 < S, E ≤ T) and P. With the same meaning described above.
The next line contains a single integer Q (0 ≤ Q < 2^8), denotes Q descriptions of cooperation as following.
Each description is a single line, the first integer q shows the number of employees in this cooperation. Then the following q integers mean those q employees’ id (0 ≤ id < 8) and the last integer means the extra profits F. That means a team contains those employees will take extra profits F.
Note that if a team contains more than one kind of cooperation, we will chose the maximum extra profits to add.
See the sample input for further details.
样例输入:
10 3 3 2 5 2 3 6 7 1 8 9 10 2 2 3 1 3 7 2 3 4 5 3 1 15 3 3 1 5 3 6 6 7 1 2 8 11 1 2 4 2 5 6 3 3 2 2 3 2 10 1 4 1 10 1 2 3 0 1 2 1 3 1 2 3 2
样例输出:
9 8 3
救援今天继续，我们仍在守候，请你们也不要轻言放弃。MH370，全中国都准备接机！
救援今天继续，我们仍在守候，请你们也不要轻言放弃。MH370，全中国都准备接机！
救援今天继续，我们仍在守候，请你们也不要轻言放弃。MH370，全中国都准备接机！
救援今天继续，我们仍在守候，请你们也不要轻言放弃。MH370，全中国都准备接机！
救援今天继续，我们仍在守候，请你们也不要轻言放弃。MH370，全中国都准备接机！
救援今天继续，我们仍在守候，请你们也不要轻言放弃。MH370，全中国都准备接机！
救援今天继续，我们仍在守候，请你们也不要轻言放弃。MH370，全中国都准备接机！
救援今天继续，我们仍在守候，请你们也不要轻言放弃。MH370，全中国都准备接机！
救援今天继续，我们仍在守候，请你们也不要轻言放弃。MH370，全中国都准备接机！
救援今天继续，我们仍在守候，请你们也不要轻言放弃。MH370，全中国都准备接机！
救援今天继续，我们仍在守候，请你们也不要轻言放弃。MH370，全中国都准备接机！
救援今天继续，我们仍在守候，请你们也不要轻言放弃。MH370，全中国都准备接机！
救援今天继续，我们仍在守候，请你们也不要轻言放弃。MH370，全中国都准备接机！
第一题还是比较考验智商~
学习了
这种题解就相当于直接贴代码了，，想看的是思路
顺利测试通过了，多谢
终于找到一篇能看懂的，mark
此题答案确实应该是A。文中已修改，感谢一楼的提醒！
刚开始学习，为啥会报错了
学算法中的数据结构学到一定程度会乐此不疲的，比如其中的2－3树，类似的红黑树，我甚至可以自己写个逻辑文件系统结构来。
第二种解法如果数组有重复元素 就不正确
mark, 备用
很有意思，可惜我很菜啊
嗯，是写错了，文中以更改。MAX ( L(X[0..m-2], Y[0..n-1]), L(X[0..m-1], Y[0..n-2])


Across: 1. Confuse flyer about total amount returned (6) 4. Around 4, Lawrence leaves superlative inspection (7) 9. Following Treebeard to 21st century? (9) 10. No work in Glossop for Polish? (5) 11. Part of his poem was done, so Larkin turned to the sun (5) 12. Eric Steel moved into city (9) 13. Most profound nuisance on river! (7) 15. Leave Bob to sample conversation (6) 17. Sat around with little sister in stoppage (6) 19. He grows things in this? (7) 22. Test assistant with final position (9) 24. Player carries Penny in race (5) 26. He attempts to rein in eight reindeer initially (5) 27. "Mistress, a rat!" I moan (9) 28. Ah! I yawn in Constable's cart (3 4) 29. British consumed and defeated! (6) Down: 1. Brian is lucky (7) 2. Speck left in traveller's accommodation (5) 3. Hides right and left pages outside (9) 4. Looking for Earl with mixed gin (7) 5. Ogre holds trendy scoundrel (5) 6. Successful candidates don't lean over very far... (9) 7. ...They are unsuccessful repairing soles right inside (6) 8. Dance back to vote (6) 14. Limit Rex, yet Tim runs free! (9) 16. Neighbours' sound is soft rock (9) 18. No, it's at new position (7) 19. House from before the '60s? (6) 20. Northern warder returns to be selected again (7) 21. Put down whisky (6) 23. Country vehicle carries raw material (5) 25. Can't 'e perform? (5)


*** END USER LICENSE AGREEMENT ***
IMPORTANT: PLEASE READ THIS LICENSE CAREFULLY BEFORE USING THIS SOFTWARE.
By receiving, opening the file package, and/or using BrawlKing Community Guides("Software") containing this software, you agree that this End User User License Agreement(EULA) is a legally binding and valid contract and agree to be bound by it. You agree to abide by the intellectual property laws and all of the terms and conditions of this Agreement.
Unless you have a different license agreement signed by Zachary Bagley your use of BrawlKing Community Guides indicates your acceptance of this license agreement and warranty.
Subject to the terms of this Agreement, Zachary Bagley grants to you a limited, non-exclusive, non-transferable license, without right to sub-license, to use BrawlKing Community Guides in accordance with this Agreement and any other written agreement with Zachary Bagley. Zachary Bagley does not transfer the title of BrawlKing Community Guides to you; the license granted to you is not a sale. This agreement is a binding legal agreement between Zachary Bagley and the purchasers or users of BrawlKing Community Guides.
If you do not agree to be bound by this agreement, remove BrawlKing Community Guides from your computer now and, if applicable, promptly return to Zachary Bagley by mail any copies of BrawlKing Community Guides and related documentation and packaging in your possession.
BrawlKing Community Guides and the license herein granted shall not be copied, shared, distributed, re-sold, offered for re-sale, transferred or sub-licensed in whole or in part except that you may make one copy for archive purposes only. For information about redistribution of BrawlKing Community Guides contact Zachary Bagley.
You shall not allow others to use, copy or evaluate copies of BrawlKing Community Guides.
You shall use BrawlKing Community Guides in compliance with all applicable laws and not for any unlawful purpose. Without limiting the foregoing, use, display or distribution of BrawlKing Community Guides together with material that is pornographic, racist, vulgar, obscene, defamatory, libelous, abusive, promoting hatred, discriminating or displaying prejudice based on religion, ethnic heritage, race, sexual orientation or age is strictly prohibited.
Each licensed copy of BrawlKing Community Guides may be used on one single computer location by one user. Use of BrawlKing Community Guides means that you have loaded, installed, or run BrawlKing Community Guides on a computer or similar device. If you install BrawlKing Community Guides onto a multi-user platform, server or network, each and every individual user of BrawlKing Community Guides must be licensed separately.
You may make one copy of BrawlKing Community Guides for backup purposes, providing you only have one copy installed on one computer being used by one person. Other users may not use your copy of BrawlKing Community Guides . The assignment, sublicense, networking, sale, or distribution of copies of BrawlKing Community Guides are strictly forbidden without the prior written consent of Zachary Bagley. It is a violation of this agreement to assign, sell, share, loan, rent, lease, borrow, network or transfer the use of BrawlKing Community Guides. If any person other than yourself uses BrawlKing Community Guides registered in your name, regardless of whether it is at the same time or different times, then this agreement is being violated and you are responsible for that violation!
This Software contains copyrighted material, trade secrets and other proprietary material. You shall not, and shall not attempt to, modify, reverse engineer, disassemble or decompile BrawlKing Community Guides. Nor can you create any derivative works or other works that are based upon or derived from BrawlKing Community Guides in whole or in part.
Zachary Bagley's name, logo and graphics file that represents BrawlKing Community Guides shall not be used in any way to promote products developed with BrawlKing Community Guides . Zachary Bagley retains sole and exclusive ownership of all right, title and interest in and to BrawlKing Community Guides and all Intellectual Property rights relating thereto. Copyright law and international copyright treaty provisions protect all parts of BrawlKing Community Guides, products and services. No program, code, part, image, audio sample, or text may be copied or used in any way by the user except as intended within the bounds of the single user program. All rights not expressly granted hereunder are reserved for Zachary Bagley.You will indemnify, hold harmless, and defend Zachary Bagley , its employees, agents and distributors against any and all claims, proceedings, demand and costs resulting from or in any way connected with your use of Zachary Bagley's Software.
In no event (including, without limitation, in the event of negligence) will Zachary Bagley be liable for any consequential, incidental, indirect, special or punitive damages whatsoever (including, without limitation, damages for loss of profits, loss of use, business interruption, loss of information or data, or pecuniary loss), in connection with or arising out of or related to this Agreement, BrawlKing Community Guides or the use or inability to use BrawlKing Community Guides or the furnishing, performance or use of any other matters hereunder whether based upon contract, tort or any other theory including negligence.
Except as expressly stated in writing, Zachary Bagley makes no representation or warranties in respect of this Software and expressly excludes all other warranties, expressed or implied, oral or written, including, without limitation, any implied warranties of merchantable quality or fitness for a particular purpose.
This Agreement shall be governed by the law of the United States applicable therein. You hereby irrevocably attorn and submit to the non-exclusive jurisdiction of the courts of United States therefrom. If any provision shall be considered unlawful, void or otherwise unenforceable, then that provision shall be deemed severable from this License and not affect the validity and enforceability of any other provisions.
Any failure to comply with the terms and conditions of this Agreement will result in automatic and immediate termination of this license. Upon termination of this license granted herein for any reason, you agree to immediately cease use of BrawlKing Community Guides and destroy all copies of BrawlKing Community Guides supplied under this Agreement. The financial obligations incurred by you shall survive the expiration or termination of this license.
THIS SOFTWARE AND THE ACCOMPANYING FILES ARE PROVIDED "AS IS" AND WITHOUT WARRANTIES AS TO PERFORMANCE OR MERCHANTABILITY OR ANY OTHER WARRANTIES WHETHER EXPRESSED OR IMPLIED.
You agree that Zachary Bagley may collect and use information gathered in any manner as part of the product support services provided to you, if any, related to BrawlKing Community Guides.Zachary Bagley may also use this information to provide notices to you which may be of use or interest to you.


[lab];
notice members research ...
This is sample to help your costomizing. I hope you satisfied whith our wepsite.
Navigation
Font
Font Size
Background
학번 : = $num ?>
반 : = $class ?>
조 : = $team ?>
Language


fun Activity.hideKeyboard(): Unit
tool used to hide the keyboard from an activity |
|
fun Activity.lockOrientation(currentOrientation: Int = this.resources.configuration.orientation): Unit
lock the activity orientation in landscape or portrait |
|
fun Activity.setFullScreen(): Unit
used to set the activity to full screen |
|
fun Activity.showToolbar(): Unit
show the hidden toolbar in the activity |
|
fun Activity.unLockOrientation(): Unit
unlock the activity locked orientation |


| Class and Description |
|---|
| Barn
Barn Class is implemented as a View class (Project is trying to approach to Model-view-controller design pattern)
This class contain the View design and button action of this Panel - Barn
|
| Base_Component
Base_Component Class is implemented as a update class (Project is trying to approach to Model-view-controller design pattern)
This class mainly be called to update the Stats, energy, dialog, Inventory
It also have the component for menu bar/ menu item and a proceed button as all this trigger an update
|
| Controller
Controller Class is implemented as a Controller-class (Project is trying to approach to Model-view-controller design pattern)
This class contain most of the method for trigger button that change data with certain algorithm (Unrelated to GUI design)
It interact with Model class- Game_Profile to create data for the View class
Mostly do calculation at the back and only display message in Dialog label to show user the result
|
| Crop_Plot
Crop Plot Class is implemented as a Model-class (Project is trying to approach to Model-view-controller design pattern)
This class specifically implemented for data storing for action in crop panel in Crop panel (Unrelated to GUI design)
this data class is implemented as crop Panel have Seeding, Watering and Harvesting which require multiple variable and a complicated algorithm
|
| Game_Profile
Game_Profile Class is implemented as a Model class (Project is trying to approach to Model-view-controller design pattern)
This class implemented as a data base for all View and Controller class.
|
| GUI_setup
This Class is implemented as a View and Controller class (Project is trying to approach to Model-view-controller design pattern)
It create the First frame for game setup with all init of GUI and the setup frame
(I learnt how to use card layout and switch between panel but I decided to keep this frame setup as it shows a progress of learning
and I belive seperating Game Setup and Game body does make the game "cleaner" in some aspect)
|
| Inventory
Inventory Class is implemented as a View class (Project is trying to approach to Model-view-controller design pattern)
This class implemented to display content to the user
Contain all label in Inventory for displaying certain value / quantity
|


Rock, Paper, Scissors
Remember: Rock beats Scissors, Scissors beats Paper, Paper beats Rock
Player Column
Game Column
CPU Column


History of All Rides given and Taken
Offer a Ride Now
History of All Rides given and Taken
Request for a Ride Now


President Obama said Tuesday the United States will launch a major, military-led response in West Africa to the deadly Ebola outbreak that has reached epidemic proportions and now poses “a potential threat to global security.”
Obama announced the stepped-up effort against the virus, which has killed at least 2,400 people in five West African countries, at the Centers for Disease Control and Prevention in Atlanta.
He said the response was the largest in the Centers’ 68-year history and that the Defense Department was chosen to lead field operations because it was “better that any other organization on earth” in such efforts.
“It’s spreading out of control,” Obama said. “We have to act fast. We cannot dawdle on this one. We have to move with force.”
Published reports earlier in the day said Obama would announce that he was sending 3,000 military personnel. But he did not say in his roughly 15-minute announcement how many people would be deployed.
Obama said the U.S. would also lead the international response by providing medical and logistical support to help the region’s “overwhelmed” health-care systems. He also said he would increase the number of beds needed in the region to isolate and treat victims of the epidemic.
“Faced with this outbreak, the world is looking to the United States,” Obama said.
The president said the possibility of an outbreak in the United States is “extremely low.” However, he said officials are taking extra precautions including advanced airport screenings and preparing hospital personnel “in the unlikely event” the virus reaches this country.
The Defense Department has asked Congress for nearly $500 million in existing funds to be put toward the effort.
The new initiatives include training as many as 500 health care workers a week; erecting 17 health-care facilities with roughly 100 beds each; setting up a joint command headquartered in Liberia to coordinate between U.S. and international relief efforts; providing home health-care kits to hundreds of thousands of households, including 50,000 that the U.S. Agency for International Development (USAID) will deliver this week.
The fight against Ebola is considered, in part, a national security issue because the disease threatens fragile governments in Africa and could lead to more safe havens for terrorists. The request falls under the jurisdiction of the Pentagon because the military has the capacity to set up quarantine camps.
Officials told the Associated Press that it would take about two weeks for U.S. forces to get on the ground. The U.S. effort will include medics and corpsmen for treatment and training, engineers to help erect the treatment facilities and specialists in logistics to assist in patient transportation.
The administration’s decision to enlist the Defense Department has also raised concerns that the task is pulling the already-stretched military away from other missions, including vital counter-terrorism operations.
According to a senior military official, Gen. Martin Dempsey, Chairman of the Joint Chiefs of Staff, said at a recent meeting: "The Department of Defense's number one priority is combating Ebola."
The centers and the USAID are already involved.
The death toll in the Ebola outbreak is expected to reach 10,000 before six months from now. And Obama said Tuesday the number could reach the 100,000 without a full, urgent response.
Hardest hit by the outbreak are Liberia, Sierra Leone and Guinea. The virus also has reached Nigeria and Senegal. Ebola is spread through direct contact with the bodily fluids of sick patients, making doctors and nurses especially vulnerable to contracting the virus that has no vaccine or approved treatment.
Four Americans, including three doctors, have been or are being treated for the virus in the U.S.
On Monday, U.S. Ambassador to the United Nations Samantha Power called for an emergency meeting of the U.N. Security Council on Thursday, warning that the potential risk of the virus could "set the countries of West Africa back a generation."
Power said the meeting Thursday would mark a rare occasion when the Security Council, which is responsible for threats to international peace and security, addresses a public health crisis.
Fox News' Jennifer Griffin, Justin Fishel, Lucas Tomlinson, and Chad Pergram and The Associated Press contributed to this report.


XSLT v0.70
This is a jQuery Plugin for Google's AJAXSLT. It gives you the
ability to transform XML/XSL from JavaScript. AJAXSLT is a parser itself, the library does not depend on
your browser being able to do XSL transforms. The plugin also provides functionality to load XML/XSL through
$.ajax() calls and transform them.
Table of Contents
XSLT
Table of Contents
License
- Plugin
- AJAXSLT
Download
Demo
Reference
- $.xslt.version
- $.xslt.textToXML(text)
- $.xslt.xmlToText(xml)
- $.xslt(options)
- $(...).xslt(options)
Notes
License
This plugin is divided in two parts for licensing, even though it is a single file. It is clearly
marked in the file where my code ends and Google's code begins.
License - Plugin
The part of the code that I made is under MIT or Public Domain license. Whichever suits your needs.
License - AJAXSLT
The code for Google's AJAXSLT is incorporated in the file. This part of the code has the following license:
Copyright (c) 2005,2006 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its contributors
may be used to endorse or promote products derived from this
software without specific prior written permission.

Download
You can download the plugin below. The size of the file is about 115kb, but with JSMin it drops to 68kb,
and JSMin+GZ drops it to a mere 15kb.
Download
Demo
This is one of the lamest demo's ever, but you can see it in action in the simplest way
here.
Reference
Reference - $.xslt.version
Object with two members: plugin and ajaxslt.
Reference - $.xslt.textToXML(text)
Converts a text string containing XML to an XML node usable by AJAXSLT. Really just calls the xmlParse
function from AJAXSLT. It only exists to provide a jQuery-like function for a common operation.
Reference - $.xslt.xmlToText(xml)
Converts an XML node to a text string. Really just calls the xmlText function from AJAXSLT.
It only exists to provide a jQuery-like function for a common operation.
Reference - $.xslt(options)
This is the core of the XSLT plugin and together with the $(...).xslt(options) function probably
all you need to use and know about.
This function can take XML and XSL from text strings and XML nodes, if necessary retrieve them from the
server through $.ajax() calls both synchronously and asynchronously, use AJAXSLT to do the
transformation and provide that back as return value or to a callback or assign it to DOM elements. It
also provides caching.
Parameters
All parameters are passed through the options object. Members:
-
xml / xsl (null): A text string or XML/DOM node representing XML or XSL. Omit or set
to null to use the URL variants instead.
-
xmlUrl / xslUrl (null): URLs to retrieve the XML/XSL from. These are only used if the
xml or xsl members are set to null. Note that you can load one from an URL and provide
the other normally without issue.
-
xmlCache / xslCache (true): Use the internal cache? If set to true (default),
XML/XSL loaded externally through the xmlUrl and xslUrl members are saved to and loaded
from an internal cache. If set to false, this cache will not be used - note that the results will
also not be saved to the cache. Also note that if you set this to false, you still need to take measures
like sending the correct headers and maybe using a parameter in the URL to make sure the data is not
pulled from the browser cache.
-
callback (null): Function to call when the transformation is complete. The callback function
is passed one parameter: the transformed data (as a text string). The parameter will be false if
an error has occured.
-
target (null): A target to assign with the results of the transform. The assignment is done
by $(target).html(result), so you can set target to a DOM element, a jQuery object, a string,
etc.
-
dataTypeXML (false): Use dataType = 'xml' in $.ajax calls? 'html' is used by default. This
option is disabled by default. Advantages of using it is that the XML objects are created by the browser
natively, which is probably faster than the JavaScript parser in AJAXSLT. Disadvantages are that Internet
Explorer will choke if the correct headers are not sent, and ofcourse there may be differences in
the parsing by the different browsers.
Return values
The return value of the function can be either the transformed XML as a text string, true or false.
-
string: The operation was successful, and the value is the transformed XML.
-
true: The operation has gone async and is working in the background. The callback, if any, will be called
when the operation is complete and the target, if any, assigned with the result of the transform. See Async
vs. Sync below for more information.
-
false: An error has occured. Note that this may also be passed to the callback function.
Async vs. Sync
The function running Async or Sync depends on a number of factors.
By default, the function runs sync, and returns the transformation result. However, if any files need to be loaded
through $.ajax() calls (which means that they are not in cache or caching is disabled) the function may go
async. However, it will only go async if either a callback or target is provided. If no callback or target is
provided, the $.ajax() calls will be made sync as well (which can make the browser temporarily unresponsive).
Ofcourse, the callback function is called wether the function goes async or not.
Reference - $(...).xslt(options)
This function is practically the same as the $.xslt(options) function. The differences are that
the target option is automatically set to the jQuery object and the function returns this to
maintain chainability instead of true, false, or html.
Notes
AJAXSLT is a very nice library, but it does not implement XSLT in full. Most common things are supported
though. It also breaks fairly easily and it can be hard to find where the problem is at.
Ofcourse, the plugin has not changed the AJAXSLT code, so it's function names run the risk of conflicting
with your own.
Laters
Laters and have fun,
- Chainfire


A blog article.
Public Properties | |
| const | DIR = 'articles' |
| const | MAP |
| const | TYPE = 'article' |
| Public Properties inherited from AbstractEntity | |
| const | DIR = '' |
| All subclasses must redeclare this to match their REST directory (without container). More... | |
| const | TYPE = '' |
| All subclasses must redeclare this to match their types. More... | |
| Public Properties inherited from Data | |
| const | MAP = [] |
| const | PATCH = [] |
Public Methods | |
| magic string | getAuthor () |
| Blog | getBlog () |
| magic string | getBlogId () |
| injected More... | |
| magic string | getBodyHtml () |
| Comment[] | getComments () |
| int | getCommentsCount () |
| magic string | getCreatedAt () |
| magic string | getHandle () |
| magic null Image | getImage () |
| magic string | getPublished () |
| magic string | getPublishedAt () |
| magic string | getSummaryHtml () |
| magic string | getTags () |
| magic null string | getTemplateSuffix () |
| magic string | getTitle () |
| magic string | getUpdatedAt () |
| magic string | getUserId () |
| Comment | newComment () |
| Factory. More... | |
| magic Comment[] | selectComments (callable $filter) |
fn( Comment $comment ): bool More... | |
| magic $this | setAuthor (string $author) |
| magic $this | setBodyHtml (string $html) |
| magic $this | setHandle (string $handle) |
| magic $this | setImage (?Image $image) |
| magic $this | setPublished (string $published) |
| magic $this | setPublishedAt (string $iso8601) |
| magic $this | setSummaryHtml (string $html) |
| magic $this | setTags (string $tags) |
| magic $this | setTemplateSuffix (?string $suffix) |
| magic $this | setTitle (string $title) |
| Public Methods inherited from AbstractEntity | |
| string | __toString () |
| null string | getId () |
| string[] | getPoolKeys () |
| bool | hasId () |
| $this | reload () |
| Fully reloads the entity from Shopify. More... | |
| Public Methods inherited from Data | |
| mixed | __call (string $method, array $args) |
| __construct ($caller, array $data=[]) | |
| string | serialize () |
| Dehydrated JSON encode. More... | |
| array | toArray () |
| void | unserialize ($serialized) |
| Public Methods inherited from CreateTrait | |
| $this | create () |
| Public Methods inherited from DeleteTrait | |
| void | delete () |
| Public Methods inherited from UpdateTrait | |
| $this | update () |
| Public Methods inherited from MetafieldTrait | |
| Metafield[] | getMetafields () |
| Metafield | newMetafield () |
| Factory. More... | |
Protected Methods | |
| _container () | |
| The container/owner object, if any. More... | |
| Protected Methods inherited from AbstractEntity | |
| mixed | _get (string $field) |
| Lazy-loads missing fields. More... | |
| void | _onDelete () |
| void | _onSave () |
| void | _reload (string $field) |
| Protected Methods inherited from Data | |
| mixed | _hydrate (string $class, $item) |
| A factory that also hydrates / caches entities. More... | |
| array | _select ($subject, callable $filter,... $args) |
Magic method: selectField(callable $filter) More... | |
| $this | _setData (array $data) |
| Clears all diffs and sets all data, hydrating mapped fields. More... | |
| $this | _setField (string $field, $value) |
| Sets a value, hydrating if mapped, and clears the diff. More... | |
| Protected Methods inherited from CreateTrait | |
| string | _dir () |
The POST directory. More... | |
| Protected Methods inherited from MetafieldTrait | |
| string | _metafieldType () |
Additional Inherited Members | |
| Protected Properties inherited from Data | |
| Api | $api |
| Pool | $pool |
| Public Static Methods inherited from AbstractEntity | |
| static null self | load ($caller, string $id, array $query=[]) |
| static self[] | loadAll ($caller, string $path, array $query=[]) |
| const MAP |
|
protected |
| magic string getAuthor | ( | ) |
| magic string getBlogId | ( | ) |
injected
| magic string getBodyHtml | ( | ) |
| int getCommentsCount | ( | ) |
| magic string getCreatedAt | ( | ) |
| magic string getHandle | ( | ) |
| magic null Image getImage | ( | ) |
| magic string getPublished | ( | ) |
| magic string getPublishedAt | ( | ) |
| magic string getSummaryHtml | ( | ) |
| magic string getTags | ( | ) |
| magic null string getTemplateSuffix | ( | ) |
| magic string getTitle | ( | ) |
| magic string getUpdatedAt | ( | ) |
| magic string getUserId | ( | ) |
| magic $this setAuthor | ( | string | $author | ) |
| magic $this setBodyHtml | ( | string | $html | ) |
| magic $this setHandle | ( | string | $handle | ) |
| magic $this setPublished | ( | string | $published | ) |
| magic $this setPublishedAt | ( | string | $iso8601 | ) |
| magic $this setSummaryHtml | ( | string | $html | ) |
| magic $this setTags | ( | string | $tags | ) |
| magic $this setTemplateSuffix | ( | ?string | $suffix | ) |
| magic $this setTitle | ( | string | $title | ) |


---
title: Horticulture References
layout: default
---
Horticulture References
General reference
- The American Horticulture Society, A-Z Encyclopedia of Garden Plants. DK Publishing 1996.
- Brenzel, Kathleen. Sunset Western Garden Book. Sunset Publishing Corporation, 1998
- Bienz, D.R. The Why and How of Home Horticulture. W.H. Freeman and Co, 1980.
- Capon, Brian. Botany for Gardeners. Timber Press, Inc., 1990
Perennials
- Armitage, Allan. Herbaceous Perennial Plants. Stipes Publishing, 1989.
- Darke, Rick. The Color Encyclopedia of Ornamental Grasses. Timber Press, 1999.
- Still, Steven. Manual of Herbaceous Ornamental Plants, Stipes Publishing, 1994.
- DiSabato-Aust, Tracy. The Well Tended Perennial Garden, Timber Press. 1998
- Valleau, John M. Perennial Gardening Guide, Valleybrook International Venture, Inc. 1998.
- Springer, Lauren. The Undaunted Garden. Fulcrum Publishing, 1994
- Brenzel, Kathleen. Woody Plants. Sunset Western Garden Book. Sunset Publishing Corporation, 1998
- Dirr, Michael A. Dirr's Hardy Trees and Shrubs. Timber Press, Inc., 1997
- Dirr, Michael A. Manual of Woody Landscape Plants. Stipes Publishing, 1998.
- Poor, Janet Meakin. Plants That Merit Attention: Trees. Timber Press, 1984.
- Poor, Janet Meakin and Brewster, Nancy Peterson. Plants That Merit Attention: Shrubs. Timber Press, 1996.
Natives and Waterwise Landscaping
- Busco, Janice and Morin, Nancy. Native Plants for High-Elevation Western Gardens. Fulcrum Publishing, 2003.
- Keane, Terry. Water-Wise Landscaping. Utah State University Extension, 1995.
- Knopf, Jim Waterwise Landscaping with Trees, Shrubs & Vines. Chamisa Books, 1999.
- Springer, Lauren. The Undaunted Garden. Fulcrum Publishing, 1994
- Mielke, Judy. Native Plants for Southwestern Landscapes. Universtiy of Texas Press, 1993.
- Mee,Wendy; Barnes, Jared; Kjelgren, Roger; Sutton, Richard; Cerney, Teresa; Johnson, Craig. Waterwise - Native Plants for Intermountain Landscapes. Utah State University Press, 2003.
- Phillips, Judith. Plants for Natural Gardens. Museum of New Mexico Press, 1995.


!false. It's funny because it's true.
There are only 10 kinds of people in this world: those who know binary and those who don’t.
The generation of random numbers is too important to be left to chance.
Two bytes meet. The first byte asks, “Are you ill?” The second byte replies, “No, just feeling a bit off.”


settings
add
settings
General
photo_size_select_actual
Background
dashboard
Gallery
Icon Color:
#ffffff
file_upload
Choose a file
or drop it here.
extension
widget Gallery
code
New Widget
General Settings
file_upload
Choose a file
or drop it here.
Gallery


Open, Variable-Rate MetroMortgage |
|
In the Open, Variable-Rate
MetroMortgage, your interest rate will equal Prime and will vary as does
Prime. Meanwhile, your monthly payment remains fixed for up to one year.
When rates go down, a greater portion of your monthly payment is applied
to the principal. Alternatively, when rates increase, a greater portion of
your total payment is applied to the interest.
MetroMortgage Advantage - 10 Ways to pay off
your mortgage faster and save!
|
You can pay off an open
mortgage at any time in full or in part, without penalty, or convert it to
a Closed, Fixed Rate MetroMortgage.
Consider this MetroMortgage if:
|
Accounts and Services | Current Rates
Copyright © Surrey Metro Savings September 4, 1996


© 2012-2013 Debian Code Search - Contact / Send Feedback
dcs-web {{.version}}, see github.com/Debian/dcs


property Size: Cardinal; //read only
The size is obtained by calculating 2order. Since the lookup table works faster for sizes that are a power of 2, the size property is read only and can only be affected by changing the order.


Introduction¶
PyDIAMONDS-Background is an extension to the Python bindings of the DIAMONDS code, which is available at
https://github.com/muma7490/PyDIAMONDS . It provides a simple interface, with which the user is able to fit signal,
providing a model that describes it. The package depends on numpy
and pyDiamonds
.
Be sure to checkout the PyDIAMONDS code, as further documentation is provided there.
First example¶
A simple example.py of the background extension would look like this:
from pyDiamondsBackground import Background
from pyDiamondsBackground.models import WhiteNoiseOnlyModel
bg = Background(kicID='123456789',modelObject=WhiteNoiseOnlyModel,rootPath="exampleFiles")
bg.run()
bg.writeResults("exampleFiles/results/KIC123456789/run","background_")
This example expects the following file structure:
-rootPath/
-example.py
-exampleFiles/
-data/
-KIC123456789.txt
-results/
-KIC123456789/
-run/
-background_hyperParameters_noise.txt
-NyquistFrequency.txt
Line by line explanation¶
At the start, import necessary packages:
from pyDiamondsBackground import Background
from pyDiamondsBackground.models import WhiteNoiseOnlyModel
Next you need to setup the nested sampler:
bg = Background(kicID='123456789',model=WhiteNoiseOnlyModel,rootPath="exampleFiles")
These three parameters are the simplest way to setup the Background class:
kicID
: This parameter defines the name of the object. It will be used to find the dataFile (in this case dataFile KIC*kicID*.txt) as well as the subfolder below results KIC*kicID*.model
: This parameter defines the model which is used by DIAMONDS. This can be one of the default models provided by the package, or a custom model, which has to be derived frommodels.BackgroundModel
rootPath
: This is the path where Background will look for the necessary files to create the internal objects.- You don’t necessarily have to set this path, but if you don’t, you need to provide the rest of the optional parameters (see section about optional parameters). If you only set the optional parameters partially, you need to set this parameter (for which parameters are totally optional, see below). In general, parameters that are not set will be read through files, parameters that are set will not be read through files.
After the object is created, you can call run:
bg.run()
This will start the process of fitting the data. After the data is fitted, you can write the results to file. This is
only possible, if rootPath
is set:
bg.writeResults("exampleFiles/results/KIC123456789/run","background")
The first parameter of writeResults defines the folder where the data is written, the second parameter defines a prefix to the the fileNames.
This example shows how to work with the Background code provided you want to use files. There is also the possibility of directly setting all parameters through the constructor.
File descriptions¶
The Background code can handle a couple of different files. These have to fulfill the requirements of existing within
different subfolders, which have to be contained in the rootPath
. In the folder rootPath/data/
you can have the
following files:
KIC$kicID$.txt
: This is the datafile on which the Background code will work. It has to be 2-dimensional, where the first column defines the x-Axis, the second defines the y-Axis
In the folder rootPath/results/
you can have the following files:
KIC$kicID$/background_hyperParamters_$name$.txt
: This file defines the uniform priors used for the fitting. Their dimension is checked within the code and has to be equal the length set inside the model. The $name$ is also defined by the model.KIC$kicID$/NyquistFrequency.txt
: This file defines the Nyquist frequency for the dataset.KIC$kicID$/NSMC_configuringParameters.txt
: This file contains the configuring parameters for the Nested sampler used within Background. In general, you don’t need to create this file or set the parameters via the constructor, default values are provided within Background.KIC$kicID$/Xmeans_configuringParameters.txt
: This file contains the configuring parameters for the KmeansClusterer. In general, you don’t need to create this file or set the parameters via the constructor, default values are provided within Background.
Other parameters¶
Background provides also the possibility to set other parameters directly through the constructor. These are
data
(the dataset), priors
(the uniform priors) and nyquistFrequency
(the nyquist frequency). If you set
these you don’t need to set the root path (see examples folder for an example).


Holly Walsh (born 1980-11-08[ref]) has appeared in 53 episodes between 2009-2016. Holly Walsh on IMDB. Holly Walsh on Wikipedia. Holly Walsh on Chortle.