Search continues for suspect in toddler’s shooting death
SHREVEPORT, La. (AP) - Louisiana authorities have identified the victims of a shooting in Shreveport that left a man injured and his toddler daughter dead.
Police Cpl. Marcus Hines tells news outlets that they’re looking for a suspect, 19-year-old Ta’Darious Upshaw, who will face a charge of aggravated assault with a firearm.
Hines says police responded Friday about 5:30 p.m. and found two victims inside a car. He says 22-year-old Roderick Robinson and his 2-year-old daughter, Kynsley, were shot. Robinson was hit in the lower leg; Kynsley was struck in the head and later died at Ochsner LSU Health.
TOP STORIES
Nancy Pelosi goes for slam dunk -- and crashes to court
George Soros group asks Fox News to ban guest who claimed billionaire controls State Dept.
Franklin Graham calls on nation to pray for Trump as impeachment effort gains speed
Hines says anyone with information on Upshaw’s whereabouts is asked to contact Shreveport-Caddo Crimestoppers at<PHONE_NUMBER> or visit P3tips.com to leave an online tip. Crimestoppers also is offering a reward leading to the suspect’s arrest.
Sign up for Daily Newsletters
Copyright © 2019 The Washington Times, LLC.
Please read our comment policy before commenting.


| Package | com.whirled.contrib.card.graphics |
| Class | public class Text |
| Inheritance | Text flash.text.TextField |
| Property | Defined by | ||
|---|---|---|---|
| bottomY : Number Access the coordinate of the bottom of the text field.
| Text | ||
| centerY : Number Access the coordinate of the vertical center of the text field.
| Text | ||
| effectiveTextHeight : Number [read-only] Access the effective text height for use with vertical positioning.
| Text |
| Property | Defined by | ||
|---|---|---|---|
| _size : int | Text |
| Method | Defined by | ||
|---|---|---|---|
|
Text(size:int, foreColor:uint = 0xFFFFFF, backColor:uint = 0x000000)
Create a new standard text field of the given size.
| Text | ||
|
leftJustify():void
Set the text to left justify.
| Text | ||
|
rightJustify():void
Set the text to right justify.
| Text | ||
|
truncName(name:String):String
[static] Utility function to truncate a name.
| Text |
| Method | Defined by | ||
|---|---|---|---|
|
createFormat(size:int, italic:Boolean, color:uint):TextFormat
[static]
| Text | ||
|
createGlow(alpha:Number, size:int, strength:int, color:uint):GlowFilter
[static]
| Text |
| Constant | Defined by | ||
|---|---|---|---|
| BIG : int = 1 [static] Initialization constant for a big standard text field.
| Text | ||
| HUGE : int = 2 [static] Initialization constant for a huge standard text field.
| Text | ||
| HUGE_HARD_ITALIC : int = 4 [static] Initialization constant for a huge text field in italics with a hard outline.
| Text | ||
| SMALL : int = 0 [static] Initialization constant for a small standard text field.
| Text | ||
| SMALL_ITALIC : int = 3 [static] Initialization constant for a small text field in italics.
| Text |
| Constant | Defined by | ||
|---|---|---|---|
| EFFECTIVE_SIZES : Array [static]
| Text | ||
| FORMAT_PARAMS : Array [static]
| Text | ||
| MAX_NAME_LENGTH : int = 12 [static]
| Text | ||
| OUTLINE_PARAMS : Array [static]
| Text |
| bottomY | property |
bottomY:Number
[read-write]Access the coordinate of the bottom of the text field.
Implementation public function get bottomY():Number
public function set bottomY(value:Number):void
| centerY | property |
centerY:Number
[read-write]Access the coordinate of the vertical center of the text field.
Implementation public function get centerY():Number
public function set centerY(value:Number):void
| effectiveTextHeight | property |
effectiveTextHeight:Number
[read-only]Access the effective text height for use with vertical positioning.
Implementation public function get effectiveTextHeight():Number
| _size | property |
protected var _size:int
| Text | () | constructor |
public function Text(size:int, foreColor:uint = 0xFFFFFF, backColor:uint = 0x000000)
Create a new standard text field of the given size.
Parameterssize:int |
|
foreColor:uint (default = 0xFFFFFF )
|
|
backColor:uint (default = 0x000000 )
|
| createFormat | () | method |
protected static function createFormat(size:int, italic:Boolean, color:uint):TextFormat
Parameters
size:int |
|
italic:Boolean |
|
color:uint |
TextFormat |
| createGlow | () | method |
protected static function createGlow(alpha:Number, size:int, strength:int, color:uint):GlowFilter
Parameters
alpha:Number |
|
size:int |
|
strength:int |
|
color:uint |
GlowFilter |
| leftJustify | () | method |
public function leftJustify():void
Set the text to left justify.
| rightJustify | () | method |
public function rightJustify():void
Set the text to right justify.
| truncName | () | method |
public static function truncName(name:String):String
Utility function to truncate a name.
Parametersname:String |
String |
| BIG | constant |
public static const BIG:int = 1
Initialization constant for a big standard text field.
| EFFECTIVE_SIZES | constant |
protected static const EFFECTIVE_SIZES:Array
| FORMAT_PARAMS | constant |
protected static const FORMAT_PARAMS:Array
| HUGE | constant |
public static const HUGE:int = 2
Initialization constant for a huge standard text field.
| HUGE_HARD_ITALIC | constant |
public static const HUGE_HARD_ITALIC:int = 4
Initialization constant for a huge text field in italics with a hard outline.
| MAX_NAME_LENGTH | constant |
protected static const MAX_NAME_LENGTH:int = 12
| OUTLINE_PARAMS | constant |
protected static const OUTLINE_PARAMS:Array
| SMALL | constant |
public static const SMALL:int = 0
Initialization constant for a small standard text field.
| SMALL_ITALIC | constant |
public static const SMALL_ITALIC:int = 3
Initialization constant for a small text field in italics.


component
Documentation
engine
wide
component
component
Description
Members
Classes
Brief description
CharacterController
Character
controller
.
Controller
Controller
component
interface.
FreeController
Free
controller
.


This is version 2 of hmm. This takes separate html, js & css files and compiles them into a single file at run. You can view the original version at the subdomain root.
View the individual files below:


|
This is the very first publicly released version of this extension. Beatnik Inc. is excited to be able to expand the Music Object API further through the use of modular extensions that do not increase the code size of the core Music Object API. Our goal is to make your life as a sonified content developer easier, and to help you to create awesome content enhanced by the power of Beatnik's interactive music and audio capabilities.
For more information on Music Object extensions and how they can be used to create more compelling sonified content, consult the section About Music Object Extensions.


Pack 0:
Pack 1:
Pack 2:
Pack 3:
Pack 4:
Pack 5:
Pack 6:
Pack 7:
Pack 8:
Main:
Prop:
Ball:
File:
File:
Hack:
Expressions:
- Usually 1?
- Usually 1?
- Usually 1?
- Usually 1?
- Usually 1?
- Not Mega?
- Not Mega?
- Usually 0?
- Usually 1?
- Usually 1?
- Usually 1?
- Usually 1?
- Usually 1?
- Usually 1?
- Usually 0?
- Usually 0?


Open-source software framework that helps developers design, build, document, and consume RESTful Web services.
Administration and development platform for PostgreSQL.


title: Bar Chart
A bar chart is a way of showing data as bars.
It is sometimes used to show trend data, and the comparison of multiple data sets side by side.
var myBarChart = new Chart(ctx, {
type: 'bar',
data: data,
options: options
});
Or if you want horizontal bars.
var myBarChart = new Chart(ctx, {
type: 'horizontalBar',
data: data,
options: options
});
The following options can be included in a bar chart dataset to configure options for that specific dataset.
Some properties can be specified as an array. If these are set to an array value, the first value applies to the first bar, the second value to the second bar, and so on.
| Property | Type | Usage |
|---|---|---|
| data | Array<Number> |
The data to plot as bars |
| label | String |
The label for the dataset which appears in the legend and tooltips |
| xAxisID | String |
The ID of the x axis to plot this dataset on |
| yAxisID | String |
The ID of the y axis to plot this dataset on |
| backgroundColor | Color or Array<Color> |
The fill color of the bars. See Colors |
| borderColor | Color or Array<Color> |
Bar border color |
| borderWidth | Number or Array<Number> |
Border width of bar in pixels |
| borderSkipped | String or Array<String> |
Which edge to skip drawing the border for. Options are 'bottom', 'left', 'top', and 'right' |
| hoverBackgroundColor | Color or Array<Color> |
Bar background color when hovered |
| hoverBorderColor | Color or Array<Color> |
Bar border color when hovered |
| hoverBorderWidth | Number or Array<Number> |
Border width of bar when hovered |
An example data object using these attributes is shown below.
var data = {
labels: ["January", "February", "March", "April", "May", "June", "July"],
datasets: [
{
label: "My First dataset",
backgroundColor: "rgba(255,99,132,0.2)",
borderColor: "rgba(255,99,132,1)",
borderWidth: 1,
hoverBackgroundColor: "rgba(255,99,132,0.4)",
hoverBorderColor: "rgba(255,99,132,1)",
data: [65, 59, 80, 81, 56, 55, 40],
}
]
};
The bar chart has the a very similar data structure to the line chart, and has an array of datasets, each with colours and an array of data. We have an array of labels too for display. In the example, we are showing the same data as the previous line chart example.
These are the customisation options specific to Bar charts. These options are merged with the global chart configuration options, and form the options of the chart.
The default options for bar chart are defined in Chart.defaults.bar
.
| Name | Type | Default | Description |
|---|---|---|---|
| hover.mode | String | "label" | Label's hover mode. "label" is used since the x axis displays data by the index in the dataset. |
| scales | Object | - | - |
| scales.xAxes | Array | The bar chart officially supports only 1 x-axis but uses an array to keep the API consistent. Use a scatter chart if you need multiple x axes. | |
| Options for xAxes | |||
| type | String | "Category" | As defined in Scales. |
| display | Boolean | true | If true, show the scale. |
| id | String | "x-axis-0" | Id of the axis so that data can bind to it |
| stacked | Boolean | false | If true, bars are stacked on the x-axis |
| categoryPercentage | Number | 0.8 | Percent (0-1) of the available width (the space between the gridlines for small datasets) for each data-point to use for the bars. Read More |
| barPercentage | Number | 0.9 | Percent (0-1) of the available width each bar should be within the category percentage. 1.0 will take the whole category width and put the bars right next to each other. Read More |
| gridLines | Object | See Scales | |
| gridLines.offsetGridLines | Boolean | true | If true, the bars for a particular data point fall between the grid lines. If false, the grid line will go right down the middle of the bars. |
| scales.yAxes | Array | [{ type: "linear" }] |
|
| Options for xAxes | |||
| type | String | "linear" | As defined in Scales. |
| display | Boolean | true | If true, show the scale. |
| id | String | "y-axis-0" | Id of the axis so that data can bind to it. |
| stacked | Boolean | false | If true, bars are stacked on the y-axis |
You can override these for your Chart
instance by passing a second argument into the Bar
method as an object with the keys you want to override.
For example, we could have a bar chart without a stroke on each bar by doing the following:
new Chart(ctx, {
type: "bar",
data: data,
options: {
scales: {
xAxes: [{
stacked: true
}],
yAxes: [{
stacked: true
}]
}
}
}
});
// This will create a chart with all of the default options, merged from the global config,
// and the Bar chart defaults but this particular instance will have `stacked` set to true
// for both x and y axes.
We can also change these defaults values for each Bar type that is created, this object is available at Chart.defaults.bar
. For horizontal bars, this object is available at Chart.defaults.horizontalBar
.
The default options for horizontal bar charts are defined in Chart.defaults.horizontalBar
and are same as those of the bar chart, but with xAxes
and yAxes
swapped and the following additional options.
| Name | Type | Default | Description |
|---|---|---|---|
| Options for xAxes | |||
| position | String | "bottom" | |
| Options for yAxes | |||
| position | String | "left" |
The following shows the relationship between the bar percentage option and the category percentage option.
// categoryPercentage: 1.0
// barPercentage: 1.0
Bar: | 1.0 | 1.0 |
Category: | 1.0 |
Sample: |===========|
// categoryPercentage: 1.0
// barPercentage: 0.5
Bar: |.5| |.5|
Category: | 1.0 |
Sample: |==============|
// categoryPercentage: 0.5
// barPercentage: 1.0
Bar: |1.||1.|
Category: | .5 |
Sample: |==============|


{% extends "base.html" %} {% block main %}
The web application at {{ domain }}
requesting your identity is not secure.
To avoid leaking your identity to eavesdroppers, we have configured this login service not to respond to insecure web applications.
Websites that communicate in an encrypted manner with you use addresses that start with https
. The web application that sent
you here requested that we send the result of your login to an address starting with {{ scheme }}
, which does not provide encrypted
communications.
Anyone who is able to snoop on your connection, for example when you are connected to an unsecured public network, can
capture the authentication responses sent by this service to web applications using insecure {{ scheme }}
addresses.
At best, an attacker with a capture of a valid authentication response would just find out your username. At worst, they could successfully "replay" the same response to the same web application to try to log in as you. Whether a replay attack like this would be possible can depend on many factors, including how robust and strict the target web application is in its checking of authentication responses.
{% endblock %}


Comparison: Latitude vs X Click any plot to get an in-dephth analysis. vs. Max Temperature vs. Humidity vs. Cloudiness vs. Wind


§445-11 Exposed to view; penalty. All persons holding a license for any class or kind of business shall keep the license exposed to view, in some prominent place, convenient for inspection, on the premises for which the same is granted. Any person failing to comply with the requirements of this section shall be fined not less than $10 nor more than $50. [L 1890, c 28, §1; am L 1903, c 8, §2; am L 1909, c 151, §5; RL 1925, §1966; RL 1935, §2411; RL 1945, §7012; RL 1955, §155-12; HRS §445-11]
Case Notes
Section does not prevent exhibition of license in court in the person's defense. 8 H. 233 (1891).


Boxplots of the complete benchmark for each metric and data set
JURECZKO
AUC
F-measure
G-measure
MCC
recall
precision
accuracy
FILTERJURECZKO
AUC
F-measure
G-measure
MCC
recall
precision
accuracy
SELECTEDJUREZCKO
AUC
F-measure
G-measure
MCC
recall
precision
accuracy
MDP
AUC
F-measure
G-measure
MCC
recall
precision
accuracy
AEEEM (with LDHH and WCHU metrics)
AUC
F-measure
G-measure
MCC
recall
precision
accuracy
NETGENE
AUC
F-measure
G-measure
MCC
recall
precision
accuracy
RELINK
AUC
F-measure
G-measure
MCC
recall
precision
accuracy
Boxplots using all data aggregated over the data sets
AUC
F-measure
G-measure
MCC
recall
precision
accuracy


CEERS Project Goals
CEERS will demonstrate, test, and validate efficient extragalactic surveys with coordinated, overlapping parallel observations with the JWST instrument suite. The observations, tests, and data products will pave the way for Cycle 2 observations.
CEERS will also address key JWST science goals, including:
- constraining the abundance and physical nature of galaxies at z~9-13;
- constraining the physical conditions of star-formation and black hole growth via line diagnostics of galaxies at z>3;
- quantifying the first bulge and disk structures at z>3; and
- characterizing galaxy mid-IR emission to study dust-obscured star-formation and supermassive black hole growth at z~1-3
CEERS will therefore enable immediate community science exploring both extragalactic JWST science drivers:
Observing Modes
CEERS will obtain imaging and spectroscopy of the EGS HST legacy field field with six parallel JWST instrument modes.
- NIRCam imaging in 10 pointings, pairing the SW and LW filters
- NIRCam grism observations in 4 pointings
- NIRSpec R~1000 in 6 pointings
- NIRSpec R~100 in 4 pointings
- MIRI imaging in 6 pointings
The CEERS observations are schedulable in June and December (with a 180° flip). Note that the APT file linked below corresponds to the December window, though with an Oct 31, 2021, launch date CEERS would likely be scheduled in June 2022.
Download CEERS APT File (for December observations)
Download CEERS Public PDF
Community Products
The CEERS team will provide calibrated images and derived data products to the community in three planned releases. The planned data releases will include:
Pre-Cycle 1 (Launch + 5 months)
- Mock raw images and spectra for JWST sources (see CEERS SDR1, SDR2 and SDR3)
- Improved HST EGS mosaics and photometry catalogs (see CEERS HDR1)
Level 1 (Observations + 3 months)
- Initial reduction (v0.5) of NIRCam and MIRI image mosaics (see CEERS DR0.5 and DR0.6)
- Initial reduction (v0.5) of 2D and 1D NIRSpec and NIRCam grism spectra
Level 2 (Observations + 8 months)
- Improved reductions (v1) of all imaging and spectroscopy
- Preliminary PSF-matched NIRCam+HST photometric catalog
- Preliminary PSF-matched MIRI photometric catalog
- Preliminary spectroscopic catalog, including emission line fluxes and spectroscopic redshifts
- A sample of z>9 candidates for community follow-up


| |
|
- (#<widget> 'add type ?option value option value ...?)
- Add a new entry to the bottom of the menu. The new entry's type is given by type and must be one of cascade, checkbutton, command, radiobutton, or separator, or a unique abbreviation of one of the above.
If additional arguments are present, they specify any of the following options:
- #:activebackground value
- Specifies a background color to use for displaying this entry when it is active. If this option is specified as an empty string (the default), then the activeBackground option for the overall menu is used. If the tk_strictMotif variable has been set to request strict Motif compliance, then this option is ignored and the #:background option is used in its place. This option is not available for separator or tear-off entries.
- #:activeforeground value
- Specifies a foreground color to use for displaying this entry when it is active. If this option is specified as an empty string (the default), then the activeForeground option for the overall menu is used. This option is not available for separator or tear-off entries.
- #:accelerator value
- Specifies a string to display at the right side of the menu entry. Normally describes an accelerator keystroke sequence that may be typed to invoke the same function as the menu entry. This option is not available for separator or tear-off entries.
- #:background value
- Specifies a background color to use for displaying this entry when it is in the normal state (neither active nor disabled). If this option is specified as an empty string (the default), then the background option for the overall menu is used. This option is not available for separator or tear-off entries.
- #:bitmap value
- Specifies a bitmap to display in the menu instead of a textual label, in any of the forms accepted by Tk_GetBitmap. This option overrides the #:label option but may be reset to an empty string to enable a textual label to be displayed. If a #:image option has been specified, it overrides #:bitmap. This option is not available for separator or tear-off entries.
- #:columnbreak value
- When this option is zero, the appears below the previous entry. When this option is one, the menu appears at the top of a new column in the menu.
- #:command value
- Specifies a Tcl command to execute when the menu entry is invoked. Not available for separator or tear-off entries.
- #:compound value
- Specifies whether the menu entry should display both an image and text, and if so, where the image should be placed relative to the text. Valid values for this option are bottom, center, left, none, right and top. The default value is none, meaning that the button will display either an image or text, depending on the values of the #:image and #:bitmap options.
- #:font value
- Specifies the font to use when drawing the label or accelerator string in this entry. If this option is specified as an empty string (the default) then the font option for the overall menu is used. This option is not available for separator or tear-off entries.
- #:foreground value
- Specifies a foreground color to use for displaying this entry when it is in the normal state (neither active nor disabled). If this option is specified as an empty string (the default), then the foreground option for the overall menu is used. This option is not available for separator or tear-off entries.
- #:hidemargin value
- Specifies whether the standard margins should be drawn for this menu entry. This is useful when creating palette with images in them, i.e., color palettes, pattern palettes, etc. 1 indicates that the margin for the entry is hidden; 0 means that the margin is used.
- #:image value
- Specifies an image to display in the menu instead of a text string or bitmap The image must have been created by some previous invocation of image create. This option overrides the #:label and #:bitmap options but may be reset to an empty string to enable a textual or bitmap label to be displayed. This option is not available for separator or tear-off entries.
- #:indicatoron value
- Available only for checkbutton and radiobutton entries. Value is a boolean that determines whether or not the indicator should be displayed.
- #:label value
- Specifies a string to display as an identifying label in the menu entry. Not available for separator or tear-off entries.
- #:menu value
- Available only for cascade entries. Specifies the path name of the submenu associated with this entry. The submenu must be a child of the menu.
- #:offvalue valueAvailable only for checkbutton entries. Specifies the value to store in the entry's associated variable when the entry is deselected.
- #:onvalue value
- Available only for checkbutton entries. Specifies the value to store in the entry's associated variable when the entry is selected.
- #:selectcolor value
- Available only for checkbutton and radiobutton entries. Specifies the color to display in the indicator when the entry is selected. If the value is an empty string (the default) then the selectColor option for the menu determines the indicator color.
- #:selectimage value
- Available only for checkbutton and radiobutton entries. Specifies an image to display in the entry (in place of the #:image option) when it is selected. Value is the name of an image, which must have been created by some previous invocation of image create. This option is ignored unless the #:image option has been specified.
- #:state value
- Specifies one of three states for the entry: normal, active, or disabled. In normal state the entry is displayed using the foreground option for the menu and the background option from the entry or the menu. The active state is typically used when the pointer is over the entry. In active state the entry is displayed using the activeForeground option for the menu along with the activebackground option from the entry. Disabled state means that the entry should be insensitive: the default bindings will refuse to activate or invoke the entry. In this state the entry is displayed according to the disabledForeground option for the menu and the background option from the entry. This option is not available for separator entries.
- #:underline value
- Specifies the integer index of a character to underline in the entry. This option is also queried by the default bindings and used to implement keyboard traversal. 0 corresponds to the first character of the text displayed in the entry, 1 to the next character, and so on. If a bitmap or image is displayed in the entry then this option is ignored. This option is not available for separator or tear-off entries.
- #:value value
- Available only for radiobutton entries. Specifies the value to store in the entry's associated variable when the entry is selected. If an empty string is specified, then the #:label option for the entry as the value to store in the variable.
- #:variable value
- Available only for checkbutton and radiobutton entries. Specifies the name of a global value to set when the entry is selected. For checkbutton entries the variable is also set when the entry is deselected. For radiobutton entries, changing the variable causes the currently-selected entry to deselect itself.
The add widget command returns an empty string.
© Author
| Home
| Sitemap
|


Run the matcher
Below you can upload two ontologies as a file and run the matcher.
Upload
Select source ontology / KG file
Select target ontology / KG file
Run Matcher
Progress:
File upload:
Matching in progress (could take time...):
Result
Download resulting alignment file
Error


ecoWater
Profile
Logout
You can control your pump and check its data below
Turn Pump On
Turn Pump Off
Water Temperature
Water Level


SKYPE：dazzlingcolors
<EMAIL_ADDRESS>QQ：800075959
Mobile Phone：+86-18688405169（Manager:Stephen）
TEL：+86-20-29185929 （Salesman :Sarah);
+86-20-29186177（Salesman :Simon);
+86-20-28920930（Salesman :Skyler)
-
{volist name="pro_cate" id="vo"}
- {$vo.cat_name} {/volist}
Be The Best PMU Training School Newest Patent Technique Global Student Recruitment Dazzling Colors’ (namely ‘XCF’ ) is the best permanent makeup training and consulting company in china,that possesses the newest and advanced national patent for ‘Ecological Eyebrow ’technique, excellent teaching team and wellequipped classrooms. XCF has been launching student recruitment from all over the world. We are firmly convinced that every student or customer can acquire the newest and advanced technique and enjoy gorgeous services in XCF. Study whenever you’re free . Study untill you’re skill. Study freely all your life.…
-
{volist name="new_list" id="vo"}
- {$vo.title|substr=0,12}... {/volist}
|


WITNESS LIST Study Comsn on Water Environmental Flows Committee November 3, 2004 - 9:30A Interim Charges ON: Brandes, Bob Consulting Engineer (Science Advisory Committee), Austin, TX Callaway, Glenda Consultant (Galveston Bay Foundation), Houston, TX Hess, Myron Attorney (National Wildlife Foundation), Austin, TX Light, Dudley (Self), Waco, TX Wassenich, Dianne Executive Director (San Marcos River Foundation), San Marcos, TX


Posted by Nicholas Branco on 24 August 2018
Posted by Nicholas Branco on 4 August 2018
Posted by Nicholas Branco on 28 July 2018
Posted by Nicholas Branco on 10 June 2018


| Project Name |
Description |
GitHub Link |
| Hello-world |
web page says hello in different languages
programming languages used: HTML
|
Hello-world |
| Cookie-recipe |
web page saying cookie recipe of different flavors
programming languages used: HTML
|
Cookie-recipe |
| Goodbye |
webpage saying goodbye in different languages
programming languages used: HTML
|
Goodbye |
| Favorite-things |
webpage related to my favorite people and things
programming languages used: HTML
|
Favorite-things |
| Food |
webpage about different types of food i like
programming languages used: HTML
|
Food |
| My-first-website |
This is my first webpage in Epicodus. It contain all my favorite things
programming languages used: HTML, CSS
|
My-first-website |
| My-dog |
webpage about my Dog
programming languages used: HTML, CSS
|
My-dog |
| Branching-website |
created a wepage to test branching function
programming languages used: HTML, CSS
|
Branching-website |
| Resort |
Created a webpage giving all the necessary information about our resort
programming languages used: HTML, CSS
|
Resort |
| Cupcake |
web page saying cupcake recipe of different flavors
programming languages used: HTML, CSS
|
Cupcake |
| Boring-lecture |
web page listing all the boring subject of mine
programming languages used: HTML, CSS
|
Boring-lecture |
| Media-query-practice |
web page to practice Media query function
programming languages used: HTML, CSS/li>
|
Media-query-practice |
| Animal-shelter |
web page where you can check the animals on our shelter company and if want you can book them
programming languages used: HTML, CSS
|
Animal-shelter |
| Bootstrap-practice |
web page to practice Bootstrap functions
programming languages used: HTML, CSS (Bootstrap)
|
Bootstrap-practice |
| Vacation-site |
web page which gives detail information about my favorite vacation place
programming languages used: HTML, CSS (Bootstrap)
|
Vacation-site |
| Wikipedia-rebuild |
A program that will create Wikipedia main home wepage
programming languages used: HTML, CSS (Bootstrap)
|
Wikipedia-rebuild |


“We turned back through the city, and walked along watching the zopilotes with their bald heads and foul dingy-black plumage. They were sitting in compact rows on parapets of houses and churches, and seemed specially to affect the cross of the cathedral, where they perched, two on each arm, and some on the top. When some offal was thrown into the streets, they came down leisurely upon it, one after another; their appearance and deportment reminding us of the undertaker's men in England coming down from the hearse at the public-house door, when the funeral is over.” — Edward Burnett Tylor, Anahuac


This of course in no way replaces the RDocumentation project, which should be considered the final world on all things R
. Instead it will be our own idiosyncratic little reference guide. Please suggest additions as you encounter the need for them—bonus points for sending syntax and an example.


This is the partial for view 1.
Sign In
Login Name
Login name cannot be empty
Password
Password cannot be empty.
Not a user?
Click here
to sign up


29 November 2005
Indonesia
The Ministry of Health in Indonesia has confirmed a further case of human infection with the H5N1 avian influenza virus. The case is a 16-year-old boy from West Java Province. He developed symptoms of fever and cough on 6 November, followed by breathing difficulties a few days later. He was hospitalized on 16 November and remains in stable condition.
A field investigation of this case determined that two siblings had died 5 days before his hospitalization. His two brothers, aged 7 and 20 years, had onset of illness on 3 November and died on 11 November, following symptoms of fever and breathing difficulty. The presumptive diagnosis was typhoid fever. No samples were taken before burial, which precludes definitive diagnosis. WHO reports laboratory-confirmed cases only.
No other cases of influenza-like illness were detected in the 80 households of the village.
The field investigation found that chickens in the family household had died during the two weeks preceding onset of illness in the deceased brothers. Samples from animals have been collected for testing and the investigation continues.
The newly confirmed case brings the total number in Indonesia to 12. Of these cases, 7 were fatal.
China
At the invitation of the Chinese Ministry of Health, WHO is participating in a joint mission to Anhui Province to investigate circumstances surrounding the recent detection of two human cases of H5N1 infection in that province. Both cases, which were confirmed by laboratory tests earlier this month, occurred in female farmers aged 24 and 35 years. Both cases were fatal.
The team will be gathering information about the sources of exposure in these two cases and will also assess the effectiveness of public health measures introduced in the areas. The two cases lived some distance apart; no link between the two cases is thought to exist.
China has recently experienced a recurrence of outbreaks of highly pathogenic H5N1 avian influenza in poultry. Beginning in mid-October of this year, officials have reported 25 fresh outbreaks in poultry in nine provinces. To date, the country has reported 3 laboratory-confirmed cases of human infection, of which two were fatal.


YUI Test Standalone Library
YUI Test is a testing framework for browser-based JavaScript solutions. Using YUI Test, you can easily add unit testing to your JavaScript solutions. While not a direct port from any specific xUnit framework, YUI Test does derive some characteristics from nUnit and JUnit.
YUI Test features:
- Rapid creation of test cases through simple syntax.
- Advanced failure detection for methods that throw errors.
- Grouping of related test cases using test suites.
- Mock objects for writing tests without external dependencies.
- Asynchronous tests for testing events and Ajax communication.
- DOM Event simulation in all A-grade browsers (through Event).
Using Test Cases
The basis of YUI Test is the YUITest.TestCase
object. A TestCase
object is created by using the
YUITest.TestCase
constructor and passing in an object containing methods and other information with which
to initialize the test case. Typically, the argument is an object literal, for example:
var testCase = new YUITest.TestCase({
name: "TestCase Name",
//traditional test names
testSomething : function () {
//...
},
testSomethingElse : function () {
//...
}
});
In this example, a simple test case is created named "TestCase Name". The name
property is automatically applied to the test case so that it can be distinguished from other test cases that may be run during the same cycle. The two methods in this example are tests methods ( testSomething()
and testSomethingElse())
, which means that they are methods designed to test a specific piece of functional code. Test methods are indicatd by their name, either using the traditional manner of prepending the word test
to the method name, or using a "friendly name," which is a sentence containing the word "should" that describes the test's purpose. For example:
var testCase = new YUITest.TestCase({
name: "TestCase Name",
//friendly test names
"Something should happen here" : function () {
//...
},
"Something else should happen here" : function () {
//...
}
});
Regardless of the naming convention used for test names, each should contain one or more assertions that test data for validity.
setUp() and tearDown()
As each test method is called, it may be necessary to setup information before it's run and then potentially clean up that information
after the test is run. The setUp()
method is run before each and every test in the test case and likewise the tearDown()
method is run
after each test is run. These methods should be used in conjunction to create objects before a test is run and free up memory after the
test is run. For example:
var testCase = new YUITest.TestCase({
name: "TestCase Name",
//---------------------------------------------
// Setup and tear down
//---------------------------------------------
setUp : function () {
this.data = { name : "Nicholas", age : 28 };
},
tearDown : function () {
delete this.data;
},
//---------------------------------------------
// Tests
//---------------------------------------------
testName: function () {
YUITest.Assert.areEqual("Nicholas", this.data.name, "Name should be 'Nicholas'");
},
testAge: function () {
YUITest.Assert.areEqual(28, this.data.age, "Age should be 28");
}
});
In this example, a setUp()
method creates a data object with some basic information. Each property of the data object is checked with
a different test, testName()
tests the value of data.name
while testAge()
tests the value of data.age
. Afterwards, the data object is deleted
to free up the memory. Real-world implementations will have more complex tests, of course, but they should follow the basic pattern you see in the above code.
Note: Both setUp()
and tearDown()
are optional methods and are only used when defined.
init() and destroy()
Sometimes you may need to initialize some data before all test are run in a single test case. The init()
method is run once before the tests start to run (also before the first call to setUp()
. Likewise, the destroy()
method is run just once after every test has been executed (and after the last tearDown()
call). For example:
var testCase = new YUITest.TestCase({
name: "TestCase Name",
//---------------------------------------------
// init and destroy
//---------------------------------------------
init : function () {
this.data = { name : "Nicholas", age : 28 };
},
destroy : function () {
delete this.data;
},
//---------------------------------------------
// Tests
//---------------------------------------------
testName: function () {
YUITest.Assert.areEqual("Nicholas", this.data.name, "Name should be 'Nicholas'");
},
testAge: function () {
YUITest.Assert.areEqual(28, this.data.age, "Age should be 28");
}
});
In this example, a init()
method creates a data object with some basic information. Each property of the data object is checked with
a different test, testName()
tests the value of data.name
while testAge()
tests the value of data.age
. Afterwards, the data object is deleted
to free up the memory using destroy()
. Unlike the previous example using setUp()
and tearDown()
, both tests are running on the same object.
Note: Both init()
and destroy()
are optional methods and are only used when defined. You can use init()
and destroy()
together with setUp()
and tearDown()
for maximum amount of control over test data.
Ignoring Tests
There may be times when you want to ignore a test (perhaps the test is invalid for your purposes or the functionality is being re-engineered and so it shouldn't be tested at this time). To specify tests to ignore,
use the _should.ignore
property and name each test to skip as a property whose value is set to true
:
var testCase = new YUITest.TestCase({
name: "TestCase Name",
//---------------------------------------------
// Special instructions
//---------------------------------------------
_should: {
ignore: {
testName: true //ignore this test
}
},
//---------------------------------------------
// Setup and tear down
//---------------------------------------------
setUp : function () {
this.data = { name : "Nicholas", age : 28 };
},
tearDown : function () {
delete this.data;
},
//---------------------------------------------
// Tests
//---------------------------------------------
testName: function () {
YUITest.Assert.areEqual("Nicholas", this.data.name, "Name should be 'Nicholas'");
},
testAge: function () {
YUITest.Assert.areEqual(28, this.data.age, "Age should be 28");
}
});
Here the testName()
method will be ignored when the test case is run. This is accomplished by first defining the special _should
property and within it, an ignore
property. The ignore property is an object containing name-value pairs representing the names of the tests
to ignore. By defining a property named "testName" and setting its value to true
, it says that the method named "testName"
should not be executed.
Intentional Errors
There may be a time that a test throws an error that was expected. For instance, perhaps you're testing a function that should throw an error if invalid data
is passed in. A thrown error in this case can signify that the test has passed. To indicate that
a test should throw an error, use the _should.error
property. For example:
function sortArray(array) {
if (array instanceof Array){
array.sort();
} else {
throw new TypeError("Expected an array");
}
}
var testCase = new YUITest.TestCase({
name: "TestCase Name",
//---------------------------------------------
// Special instructions
//---------------------------------------------
_should: {
error: {
testSortArray: true //this test should throw an error
}
},
//---------------------------------------------
// Tests
//---------------------------------------------
testSortArray: function () {
sortArray(12); //this should throw an error
}
});
In this example, a test case is created to test the standalone sortArray()
function, which simply accepts an array and calls its sort()
method.
But if the argument is not an array, an error is thrown. When testSortArray()
is called, it throws an error because a number is passed into sortArray()
.
Since the _should.error
object has a property called "testSortArray" set to true
, this indicates that testSortArray()
should
pass only if an error is thrown.
It is possible to be more specific about the error that should be thrown. By setting a property in _should.error
to a string, you can
specify that only a specific error message can be construed as a passed test. Here's an example:
function sortArray(array) {
if (array instanceof Array){
array.sort();
} else {
throw new TypeError("Expected an array");
}
}
var testCase = new YUITest.TestCase({
name: "TestCase Name",
//---------------------------------------------
// Special instructions
//---------------------------------------------
_should: {
error: {
testSortArray: "Expected an array"
}
},
//---------------------------------------------
// Tests
//---------------------------------------------
testSortArray: function () {
sortArray(12); //this should throw an error
}
});
In this example, the testSortArray()
test will only pass if the error that is thrown has a message of "Expected an array".
If a different error occurs within the course of executing testSortArray()
, then the test will fail due to an unexpected error.
If you're unsure of the message but know the type of error that will be thrown, you can specify the error constructor for the error you're expecting to occur:
function sortArray(array) {
if (array instanceof Array){
array.sort();
} else {
throw new TypeError("Expected an array");
}
}
var testCase = new YUITest.TestCase({
name: "TestCase Name",
//---------------------------------------------
// Special instructions
//---------------------------------------------
_should: {
error: {
testSortArray: TypeError
}
},
//---------------------------------------------
// Tests
//---------------------------------------------
testSortArray: function () {
sortArray(12); //this should throw an error
}
});
In this example, the test will pass if a TypeError
gets thrown; if any other type of error is thrown,
the test will fail. A word of caution: TypeError
is the most frequently thrown error by browsers,
so specifying a TypeError
as expected may give false passes.
To narrow the margin of error between checking for an error message and checking the error type, you can create a specific error
object and set that in the _should.error
property, such as:
function sortArray(array) {
if (array instanceof Array){
array.sort();
} else {
throw new TypeError("Expected an array");
}
}
var testCase = new YUITest.TestCase({
name: "TestCase Name",
//---------------------------------------------
// Special instructions
//---------------------------------------------
_should: {
error: {
testSortArray: new TypeError("Expected an array")
}
},
//---------------------------------------------
// Tests
//---------------------------------------------
testSortArray: function () {
sortArray(12); //this should throw an error
}
});
Using this code, the testSortArray()
method will only pass if a TypeError
object is thrown with a message of
"Expected an array"; if any other type of error occurs, then the test fails due to an unexpected error.
Note: If a test is marked as expecting an error, the test will fail unless that specific error is thrown. If the test completes without an error being thrown, then it fails.
Assertions
Test methods use assertions to check the validity of a particular action or function. An assertion method tests (asserts) that a condition is valid; if not, it throws an error that causes the test to fail. If all assertions pass within a test method, it is said that the test has passed. The simplest assertion is YUITest.Assert()
, which takes two arguments: a condition to test and a message. If the condition is not true, then an assertion error is thrown with the specified message. For example:
var testCase = new YUITest.TestCase({
name: "TestCase Name",
testUsingAsserts : function () {
YUITest.Assert(value == 5, "The value should be five.");
YUITest.Assert(flag, "Flag should be true.");
}
});
In this example, testUsingAsserts()
will fail if value
is not equal to 5 of flag
is not set to true
. The YUITest.Assert()
method may be all that you need, but there are advanced options available. The YUITest.Assert
object contains several assertion methods that can be used to validate data.
Topics covered in this section include:
- Equality Assertions
- Sameness Assertions
- Data Type Assertions
- Special Value Assertions
- Forced Failures
Equality Assertions
The simplest assertions are areEqual()
and areNotEqual()
. Both methods accept three arguments: the expected value,
the actual value, and an optional failure message (a default one is generated if this argument is omitted). For example:
var testCase = new YUITest.TestCase({
name: "TestCase Name",
testEqualityAsserts : function () {
YUITest.Assert.areEqual(5, 5); //passes
YUITest.Assert.areEqual(5, "5"); //passes
YUITest.Assert.areNotEqual(5, 6); //passes
YUITest.Assert.areEqual(5, 6, "Five was expected."); //fails
}
});
These methods use the double equals (==
) operator to determine if two values are equal, so type coercion may occur. This means
that the string "5"
and the number 5
are considered equal because the double equals sign converts the number to
a string before doing the comparison. If you don't want values to be converted for comparison purposes, use the sameness assertions instead.
Sameness Assertions
The sameness assertions are areSame()
and areNotSame()
, and these accept the same three arguments as the equality
assertions: the expected value, the actual value, and an optional failure message. Unlike the equality assertions, these methods use
the triple equals operator (===
) for comparisions, assuring that no type coercion will occur. For example:
var testCase = new YUITest.TestCase({
name: "TestCase Name",
testSamenessAsserts : function () {
YUITest.Assert.areSame(5, 5); //passes
YUITest.Assert.areSame(5, "5"); //fails
YUITest.Assert.areNotSame(5, 6); //passes
YUITest.Assert.areNotSame(5, "5"); //passes
YUITest.Assert.areSame(5, 6, "Five was expected."); //fails
}
});
Note: Even though this example shows multiple assertions failing, a test will stop as soon as one assertion fails, causing all others to be skipped.
Data Type Assertions
There may be times when some data should be of a particular type. To aid in this case, there are several methods that test the data type of variables. Each of these methods accepts two arguments: the data to test and an optional failure message. The data type assertions are as follows:
isArray()
- passes only if the value is an instance ofArray
.isBoolean()
- passes only if the value is a Boolean.isFunction()
- passes only if the value is a function.isNumber()
- passes only if the value is a number.isObject()
- passes only if the value is an object or a function.isString()
- passes only if the value is a string.
These are used as in the following example:
var testCase = new YUITest.TestCase({
name: "TestCase Name",
testDataTypeAsserts : function () {
YUITest.Assert.isString("Hello world"); //passes
YUITest.Assert.isNumber(1); //passes
YUITest.Assert.isArray([]); //passes
YUITest.Assert.isObject([]); //passes
YUITest.Assert.isFunction(function(){}); //passes
YUITest.Assert.isBoolean(true); //passes
YUITest.Assert.isObject(function(){}); //passes
YUITest.Assert.isNumber("1", "Value should be a number."); //fails
YUITest.Assert.isString(1, "Value should be a string."); //fails
}
});
In addition to these specific data type assertions, there are two generic data type assertions.
The isTypeOf()
method tests the string returned when the typeof
operator is applied to a value. This
method accepts three arguments: the type that the value should be ("string", "number",
"boolean", "undefined", "object", or "function"), the value to test, and an optional failure message.
For example:
var testCase = new YUITest.TestCase({
name: "TestCase Name",
testTypeOf : function () {
YUITest.Assert.isTypeOf("string", "Hello world"); //passes
YUITest.Assert.isTypeOf("number", 1); //passes
YUITest.Assert.isTypeOf("boolean", true); //passes
YUITest.Assert.isTypeOf("number", 1.5); //passes
YUITest.Assert.isTypeOf("function", function(){}); //passes
YUITest.Assert.isTypeOf("object", {}); //passes
YUITest.Assert.isTypeOf("undefined", this.blah); //passes
YUITest.Assert.isTypeOf("number", "Hello world", "Value should be a number."); //fails
}
});
If you need to test object types instead of simple data types, you can also use the isInstanceOf()
assertion, which accepts three
arguments: the constructor function to test for, the value to test, and an optional failure message. This assertion uses the instanceof
operator to determine if it should pass or fail. Example:
var testCase = new YUITest.TestCase({
name: "TestCase Name",
testInstanceOf : function () {
YUITest.Assert.isInstanceOf(Object, {}); //passes
YUITest.Assert.isInstanceOf(Array, []); //passes
YUITest.Assert.isInstanceOf(Object, []); //passes
YUITest.Assert.isInstanceOf(Function, function(){}); //passes
YUITest.Assert.isInstanceOf(Object, function(){}); //passes
YUITest.Assert.isTypeOf(Array, {}, "Value should be an array."); //fails
}
});
Special Value Assertions
There are numerous special values in JavaScript that may occur in code. These include true
, false
, NaN
,
null
, and undefined
. There are a number of assertions designed to test for these values specifically:
isFalse()
- passes if the value isfalse
.isTrue()
- passes if the value istrue
.isNaN()
- passes if the value isNaN
.isNotNaN()
- passes if the value is notNaN
.isNull()
- passes if the value isnull
.isNotNull()
- passes if the value is notnull
.isUndefined()
- passes if the value isundefined
.isNotUndefined()
- passes if the value is notundefined
.
Each of these methods accepts two arguments: the value to test and an optional failure message. All of the assertions expect the
exact value (no type cohersion occurs), so for example calling isFalse(0)
will fail.
var testCase = new YUITest.TestCase({
name: "TestCase Name",
testSpecialValues : function () {
YUITest.Assert.isFalse(false); //passes
YUITest.Assert.isTrue(true); //passes
YUITest.Assert.isNaN(NaN); //passes
YUITest.Assert.isNaN(5 / "5"); //passes
YUITest.Assert.isNotNaN(5); //passes
YUITest.Assert.isNull(null); //passes
YUITest.Assert.isNotNull(undefined); //passes
YUITest.Assert.isUndefined(undefined); //passes
YUITest.Assert.isNotUndefined(null); //passes
YUITest.Assert.isUndefined({}, "Value should be undefined."); //fails
}
});
Forced Failures
While most tests fail as a result of an assertion, there may be times when
you want to force a test to fail or create your own assertion method. To do this, use the
fail()
method to force a test method to fail immediately:
var testCase = new YUITest.TestCase({
name: "TestCase Name",
testForceFail : function () {
YUITest.Assert.fail(); //causes the test to fail
}
});
In this case, the testForceFail()
method does nothing but force
the method to fail. Optionally, you can pass in a message to fail()
which will be displayed as the failure message:
var testCase = new YUITest.TestCase({
name: "TestCase Name",
testForceFail : function () {
YUITest.Assert.fail("I decided this should fail.");
}
});
When the failure of this method is reported, the message "I decided this should fail." will be reported.
Mock Objects
Mock objects are used to eliminate test dependencies on other objects. In complex software systems, there's often multiple
object that have dependence on one another to do their job. Perhaps part of your code relies on the XMLHttpRequest
object to get more information; if you're running the test without a network connection, you can't really be sure if the test
is failing because of your error or because the network connection is down. In reality, you just want to be sure that the correct
data was passed to the open()
and send()
methods because you can assume that, after that point,
the XMLHttpRequest
object works as expected. This is the perfect case for using a mock object.
To create a mock object, use the YUITest.Mock()
method to create a new object and then use YUITest.Mock.expect()
to define expectations for that object. Expectations define which methods you're expecting to call, what the arguments should be,
and what the expected result is. When you believe all of the appropriate methods have been called, you call YUITest.Mock.verify()
on the mock object to check that everything happened as it should. For example:
//code being tested
function logToServer(message, xhr){
xhr.open("get", "/log.php?msg=" + encodeURIComponent(message), true);
xhr.send(null);
}
//test case for testing the above function
var testCase = new YUITest.TestCase({
name: "logToServer Tests",
testPassingDataToXhr : function () {
var mockXhr = YUITest.Mock();
//I expect the open() method to be called with the given arguments
YUITest.Mock.expect(mockXhr, {
method: "open",
args: ["get", "/log.php?msg=hi", true]
});
//I expect the send() method to be called with the given arguments
YUITest.Mock.expect(mockXhr, {
method: "send",
args: [null]
});
//now call the function
logToServer("hi", mockXhr);
//verify the expectations were met
YUITest.Mock.verify(mockXhr);
}
});
In this code, a mock XMLHttpRequest
object is created to aid in testing. The mock object defines two
expectations: that the open()
method will be called with a given set of arguments and that the send()
method will be called with a given set of arguments. This is done by using YUITest.Mock.expect()
and passing in the
mock object as well as some information about the expectation. The method
property indicates the method name
that will be called and the args
property is an array of arguments that should be passed into the method. Each
argument is compared against the actual arguments using the identically equal (===
) operator, and if any of the
arguments doesn't match, an assertion failure is thrown when the method is called (it "fails fast" to allow easier debugging).
The call to YUITest.Mock.verify()
is the final step in making sure that all expectations have been met. It's at this stage
that the mock object checks to see that all methods have been called. If open()
was called but send()
was not, then an assertion failure is thrown and the test fails. It's very important to call YUITest.Mock.verify()
to test
all expectations; failing to do so can lead to false passes when the test should actually fail.
In order to use mock objects, your code must be able to swap in and out objects that it uses. For example, a hardcoded
reference to XMLHttpRequest
in your code would prevent you from using a mock object in its place. It's sometimes
necessary to refactor code in such a way that referenced objects are passed in rather than hardcoded so that mock objects
can be used.
Note that you can use assertions and mock objects together; either will correctly indicate a test failure.
Special Argument Values
There may be times when you don't necessarily care about a specific argument's value. Since you must always specify the correct number of arguments being passed in, you still need to indicate that an argument is expected. There are several special values you can use as placeholders for real values. These values do a minimum amount of data validation:
YUITest.Mock.Value.Any
- any value is valid regardless of type.YUITest.Mock.Value.String
- any string value is valid.YUITest.Mock.Value.Number
- any number value is valid.YUITest.Mock.Value.Boolean
- any Boolean value is valid.YUITest.Mock.Value.Object
- any non-null
object value is valid.YUITest.Mock.Value.Function
- any function value is valid.
Each of these special values can be used in the args
property of an expectation, such as:
YUITest.Mock.expect(mockXhr, {
method: "open",
args: [YUITest.Mock.Value.String, "/log.php?msg=hi", YUITest.Mock.Value.Boolean]
});
The expecation here will allow any string value as the first argument and any Boolean value as the last argument.
These special values should be used with care as they can let invalid values through if they are too general. The
YUITest.Mock.Value.Any
special value should be used only if you're absolutely sure that the argument doesn't
matter.
Property Expectations
Since it's not possible to create property getters and setters in all browsers, creating a true cross-browser property
expectation isn't feasible. YUI Test mock objects allow you to specify a property name and it's expected value when
YUITest.Mock.verify()
is called. This isn't a true property expectation but rather an expectation that the property
will have a certain value at the end of the test. You can specify a property expectation like this:
//expect that the status property will be set to 404
YUITest.Mock.expect(mockXhr, {
property: "status",
value: 404
});
This example indicates that the status
property of the mock object should be set to 404 before
the test is completed. When YUITest.Mock.verify()
is called on mockXhr
, it will check
the property and throw an assertion failure if it has not been set appropriately.
Asynchronous Tests
YUI Test allows you to pause a currently running test and resume either after a set amount of time or
at another designated time. The TestCase
object has a method called wait()
. When wait()
is called, the test immediately exits (meaning that any code after that point will be ignored) and waits for a signal to resume
the test.
A test may be resumed after a certain amount of time by passing in two arguments to wait()
: a function to execute
and the number of milliseconds to wait before executing the function (similar to using setTimeout()
). The function
passed in as the first argument will be executed as part of the current test (in the same scope) after the specified amount of time.
For example:
var testCase = new YUITest.TestCase({
name: "TestCase Name",
//---------------------------------------------
// Setup and tear down
//---------------------------------------------
setUp : function () {
this.data = { name : "Nicholas", age : 29 };
},
tearDown : function () {
delete this.data;
},
//---------------------------------------------
// Tests
//---------------------------------------------
testAsync: function () {
YUITest.Assert.areEqual("Nicholas", this.data.name, "Name should be 'Nicholas'");
//wait 1000 milliseconds and then run this function
this.wait(function(){
YUITest.Assert.areEqual(29, this.data.age, "Age should be 29");
}, 1000);
}
});
In this code, the testAsync()
function does one assertion, then waits 1000 milliseconds before performing
another assertion. The function passed into wait()
is still in the scope of the original test, so it has
access to this.data
just as the original part of the test does. Timed waits are helpful in situations when
there are no events to indicate when the test should resume.
If you want a test to wait until a specific event occurs before resuming, the wait()
method can be called
with a timeout argument (the number of milliseconds to wait before considering the test a failure). At that point, testing will resume only when the resume()
method is called. The
resume()
method accepts a single argument, which is a function to run when the test resumes. This function
should specify additional assertions. If resume()
isn't called before the timeout expires, then the test fails. The following tests to see if the Anim
object has performed its
animation completely:
var testCase = new YUITest.TestCase({
name: "TestCase Name",
//---------------------------------------------
// Tests
//---------------------------------------------
testAnimation : function (){
//animate width to 400px
var myAnim = new Y.Anim({
node: '#testDiv',
to: {
width: 400
},
duration: 3
});
var test = this;
//assign oncomplete handler
myAnim.on("end", function(){
//tell the TestRunner to resume
test.resume(function(){
YUITest.Assert.areEqual(myAnim.get("node").get("offsetWidth"), 400, "Width of the DIV should be 400.");
});
});
//start the animation
myAnim.run();
//wait until something happens
this.wait(3100);
}
});
In this example, an Anim
object is used to animate the width of an element to 400 pixels. When the animation
is complete, the end
event is fired, so that is where the resume()
method is called. The
function passed into resume()
simply tests that the final width of the element is indeed 400 pixels. Once the event handler is set up, the animation begins.
In order to allow enough time for the animation to complete, the wait()
method is called
with a timeout of 3.1 seconds (just longer than the 3 seconds needed to complete the animation). At that point, testing stops until the animation completes and resume()
is called or until 3100 milliseconds have passed.
Test Suites
For large web applications, you'll probably have many test cases that should be run during a testing phase. A test suite helps to handle multiple test cases
by grouping them together into functional units that can be run together. To create new test suite, use the YUITest.TestSuite
constructor and pass in the name of the test suite. The name you pass in is for logging purposes and allows you to discern which TestSuite
instance currently running. For example:
//create the test suite
var suite = new YUITest.TestSuite("TestSuite Name");
//add test cases
suite.add(new YUITest.TestCase({
//...
}));
suite.add(new YUITest.TestCase({
//...
}));
suite.add(new YUITest.TestCase({
//...
}));
Here, a test suite is created and three test cases are added to it using the add()
method. The test suite now contains all of the
information to run a series of tests.
It's also possible to add other multiple TestSuite
instances together under a parent TestSuite
using the same add()
method:
//create a test suite
var suite = new YUITest.TestSuite("TestSuite Name");
//add a test case
suite.add(new YUITest.TestCase({
//...
});
//create another suite
var anotherSuite = new YUITest.TestSuite("test_suite_name");
//add a test case
anotherSuite.add(new YUITest.TestCase({
//...
});
//add the second suite to the first
suite.add(anotherSuite);
By grouping test suites together under a parent test suite you can more effectively manage testing of particular aspects of an application.
Test suites may also have setUp()
and tearDown()
methods. A test suite's setUp()
method is called before
the first test in the first test case is executed (prior to the test case's setUp()
method); a test suite's tearDown()
method executes after all tests in all test cases/suites have been executed (after the last test case's tearDown()
method). To specify
these methods, pass an object literal into the YUITest.TestSuite
constructor:
//create a test suite
var suite = new YUITest.TestSuite({
name : "TestSuite Name",
setUp : function () {
//test-suite-level setup
},
tearDown: function () {
//test-suite-level teardown
}
});
Test suite setUp()
and tearDown()
may be helpful in setting up global objects that are necessary for a multitude of tests
and test cases.
Context Data
Managing data amongst test suites and test cases can be difficult, which is why YUI Test has a concept called context data. When the test runner starts to execute, it creates an empty object. The object is passed in as an argument to every init()
, destroy()
, setUp()
, tearDown()
, and every test function. Because the same object is passed into each method (it "visits" each method), you have the opportunity to add, remove, or change data on the object that other tests might need. This is an advanced piece of functionality that may not be necessary for every group of tests, but allows powerful data sharing where necessary. Example:
var testCase = new YUITest.TestCase({
name: "TestCase Name",
init: function(data){
data.foo = "bar";
},
testValueOfFoo : function (data) {
YUITest.Assert.areEqual("bar", data.foo);
}
});
Context data persists even once a test case is completed, so it can be passed from test suites to test cases and persist to other test cases. For example:
var testSuite = new YUITest.TestSuite({
name: "Test Suite Name",
setUp: function(data){
data.topLevel = 1;
}
});
testSuite.add(new YUITest.TestCase({
name: "First Test Case",
init: function(data){
data.foo = "bar";
},
testValueOfFoo : function (data) {
YUITest.Assert.areEqual("bar", data.foo); //from init
},
testValueOfTopLevel: function(data){
YUITest.Assert.areEqual(1, data.topLevel); //from test suite
}
});
testSuite.add(new YUITest.TestCase({
name: "Second Test Case",
testValueOfFoo : function (data) {
YUITest.Assert.areEqual("bar", data.foo); //from init in First Test Case
},
testValueOfTopLevel: function(data){
YUITest.Assert.areEqual(1, data.topLevel); //from test suite
}
});
Running Tests
In order to run test cases and test suites, use the YUITest.TestRunner
object. This object is a singleton that
simply runs all of the tests in test cases and suites, reporting back on passes and failures. To determine which test cases/suites
will be run, add them to the YUITest.TestRunner
using the add()
method. Then, to run the tests, call the run()
method:
//add the test cases and suites
YUITest.TestRunner.add(testCase);
YUITest.TestRunner.add(testSuite);
//run all tests
YUITest.TestRunner.run();
If at some point you decide not to run the tests that have already been added to the TestRunner
, they can be removed by calling clear()
:
YUITest.TestRunner.clear();
Making this call removes all test cases and test suites that were added using the add()
method.
TestRunner Events
The YUITest.TestRunner
provides results and information about the process by publishing several events. These events can occur at four
different points of interest: at the test level, at the test case level, at the test suite level, and at the YUITest.TestRunner
level.
The data available for each event depends completely on the type of event and the level at which the event occurs.
Test-Level Events
Test-level events occur during the execution of specific test methods. There are three test-level events:
YUITest.TestRunner.TEST_PASS_EVENT
- occurs when the test passes.YUITest.TestRunner.TEST_FAIL_EVENT
- occurs when the test fails.YUITest.TestRunner.TEST_IGNORE_EVENT
- occurs when a test is ignored.
For each of these events, the event data object has three properties:
type
- indicates the type of event that occurred.testCase
- the test case that is currently being run.testName
- the name of the test that was just executed or ignored.
For YUITest.TestRunner.TEST_FAIL_EVENT
, an error
property containing the error object
that caused the test to fail.
TestCase-Level Events
There are two events that occur at the test case level:
YUITest.TestRunner.TEST_CASE_BEGIN_EVENT
- occurs when the test case is next to be executed but before the first test is run.YUITest.TestRunner.TEST_CASE_COMPLETE_EVENT
- occurs when all tests in the test case have been executed or ignored.
For these two events, the event data object has three properties:
type
- indicates the type of event that occurred.testCase
- the test case that is currently being run.
For TEST_CASE_COMPLETE_EVENT
, an additional property called results
is included. The results
property is an object containing the aggregated results for all tests in the test case (it does not include information about tests that
were ignored). Each test that was run has an entry in the result
object where the property name is the name of the test method
and the value is an object with two properties: result
, which is either "pass" or "fail", and message
, which is a
text description of the result (simply "Test passed" when a test passed or the error message when a test fails). Additionally, the
failed
property indicates the number of tests that failed in the test case, the passed
property indicates the
number of tests that passed, and the total
property indicates the total number of tests executed. A typical results
object looks like this:
{
failed: 1,
passed: 1,
ignored: 0,
total: 2,
type: "testcase",
name: "Test Case 0",
test0: {
result: "pass",
message: "Test passed",
type: "test",
name: "test0"
},
test1: {
result: "fail",
message: "Assertion failed",
type: "test",
name: "test1"
}
}
The TEST_CASE_COMPLETE_EVENT
provides this information for transparency into the testing process.
TestSuite-Level Events
There are two events that occur at the test suite level:
YUITest.TestRunner.TEST_SUITE_BEGIN_EVENT
- occurs when the test suite is next to be executed but before the first test is run.YUITest.TestRunner.TEST_SUITE_COMPLETE_EVENT
- occurs when all tests in all test cases in the test suite have been executed or ignored.
For these two events, the event data object has three properties:
type
- indicates the type of event that occurred.testSuite
- the test suite that is currently being run.
The TEST_SUITE_COMPLETE_EVENT
also has a results
property, which contains aggregated results for all of the
test cases (and other test suites) it contains. Each test case and test suite contained within the main suite has an entry in the
results
object, forming a hierarchical structure of data. A typical results
object may look like this:
{
failed: 2,
passed: 2,
ignored: 0,
total: 4,
type: "testsuite",
name: "Test Suite 0",
testCase0: {
failed: 1,
passed: 1,
ignored: 0,
total: 2,
type: "testcase",
name: "testCase0",
test0: {
result: "pass",
message: "Test passed."
type: "test",
name: "test0"
},
test1: {
result: "fail",
message: "Assertion failed.",
type: "test",
name: "test1"
}
},
testCase1: {
failed: 1,
passed: 1,
ignored: 0,
total: 2,
type: "testcase",
name: "testCase1",
test0: {
result: "pass",
message: "Test passed.",
type: "test",
name: "test0"
},
test1: {
result: "fail",
message: "Assertion failed.",
type: "test",
name: "test1"
}
}
}
This example shows the results for a test suite with two test cases, but there may be test suites contained within test suites. In that case, the hierarchy is built out accordingly, for example:
{
failed: 3,
passed: 3,
ignored: 0,
total: 6,
type: "testsuite",
name: "Test Suite 0",
testCase0: {
failed: 1,
passed: 1,
ignored: 0,
total: 2,
type: "testcase",
name: "testCase0",
test0: {
result: "pass",
message: "Test passed.",
type: "test",
name: "test0"
},
test1: {
result: "fail",
message: "Assertion failed.",
type: "test",
name: "test1"
}
},
testCase1: {
failed: 1,
passed: 1,
ignored: 0,
total: 2,
type: "testcase",
name: "testCase1",
test0: {
result: "pass",
message: "Test passed.",
type: "test",
name: "test0"
},
test1: {
result: "fail",
message: "Assertion failed.",
type: "test",
name: "test1"
}
},
testSuite0:{
failed: 1,
passed: 1,
ignored: 0,
total: 2,
type: "testsuite",
name: "testSuite0",
testCase2: {
failed: 1,
passed: 1,
ignored: 0,
total: 2,
type: "testcase",
name: "testCase2",
test0: {
result: "pass",
message: "Test passed.",
type: "test",
name: "test0"
},
test1: {
result: "fail",
message: "Assertion failed.",
type: "test",
name: "test1"
}
}
}
}
In this code, the test suite contained another test suite named "testSuite0", which is included in the results along with its test cases. At each level, the results are aggregated so that you can tell how many tests passed or failed within each test case or test suite.
TestRunner-Level Events
There are two events that occur at the YUITest.TestRunner
level:
YUITest.TestRunner.BEGIN_EVENT
- occurs when testing is about to begin but before any tests are run.YUITest.TestRunner.COMPLETE_EVENT
- occurs when all tests in all test cases and test suites have been executed or ignored.
The data object for these events contain a type
property, indicating the type of event that occurred. COMPLETE_EVENT
also includes a results
property that is formatted the same as the data returned from TEST_SUITE_COMPLETE_EVENT
and
contains rollup information for all test cases and tests suites that were added to the TestRunner
.
Subscribing to Events
You can subscribe to particular events by calling the subscribe()
method. Your event handler code
should expect a single object to be passed in as an argument. This object provides information about the event that just occured. Minimally,
the object has a type
property that tells you which type of event occurred. Example:
function handleTestFail(data){
alert("Test named '" + data.testName + "' failed with message: '" + data.error.message + "'.");
}
var TestRunner = YUITest.TestRunner;
TestRunner.subscribe(TestRunner.TEST_FAIL_EVENT, handleTestFail);
TestRunner.run();
In this code, the handleTestFail()
function is assigned as an event handler for TEST_FAIL_EVENT
. You can also
use a single event handler to subscribe to any number of events, using the event data object's type
property to determine
what to do:
function handleTestResult(data){
var TestRunner = YUITest.TestRunner;
switch(data.type) {
case TestRunner.TEST_FAIL_EVENT:
alert("Test named '" + data.testName + "' failed with message: '" + data.error.message + "'.");
break;
case TestRunner.TEST_PASS_EVENT:
alert("Test named '" + data.testName + "' passed.");
break;
case TestRunner.TEST_IGNORE_EVENT:
alert("Test named '" + data.testName + "' was ignored.");
break;
}
}
TestRunner.subscribe(TestRunner.TEST_FAIL_EVENT, handleTestResult);
TestRunner.subscribe(TestRunner.TEST_IGNORE_EVENT, handleTestResult);
TestRunner.subscribe(TestRunner.TEST_PASS_EVENT, handleTestResult);
TestRunner.run();
Viewing Results
There are two ways to view test results. The first is to output test results to the Console component. To do so, you need only create a new Console instance; the result results will be posted to the logger automatically:
YUI({ logInclude: { TestRunner: true } }).use("console", function(Y){
//tests go here
//initialize the console
var yconsole = new Y.Console({
newestOnTop: false
});
yconsole.render('#log');
//run the tests
YUITest.TestRunner.run();
});
If you are using a browser that supports the console
object (Firefox with Firebug installed, Safari 3+, Internet Explorer 8+, Chrome), then you can
direct the test results onto the console. To do so, make sure that you've specified your YUI
instance to use the console when logging:
YUITest.TestRunner.run();
You can also extract the test result data using the YUITest.TestRunner.getResults()
method. By default, this method
returns an object representing the results of the tests that were just run (the method returns null
if called
while tests are still running). You can optionally specify a format in which the results should be returned. There are four
possible formats:
YUITest.TestFormat.XML
- YUI Test XML (default)YUITest.TestFormat.JSON
- JSONYUITest.TestFormat.JUnitXML
- JUnit XMLYUITest.TestFormat.TAP
- TAP
You can pass any of these into YUITest.TestRunner.getResults()
to get a string with the test result information properly
formatted. For example:
YUI({ useBrowserConsole: true }).use("test", function(Y){
//tests go here
//get object of results
var resultsObject = YUITest.TestRunner.getResult();
//get XML results
var resultsXML = YUITest.TestRunner.getResult(YUITest.TestFormat.XML);
});
The XML format outputs results in the following format:
<report name="YUI Test Results" passed="5" failed="3" ignored="1" total="5">
<testsuite name="yuisuite" passed="5" failed="0" ignored="0" total="5">
<testcase name="Y.Anim" passed="5" failed="0" ignored="0" total="5">
<test name="test_getEl" result="pass" message="Test passed" />
<test name="test_isAnimated" result="pass" message="Test passed" />
<test name="test_stop" result="pass" message="Test passed" />
<test name="test_onStart" result="pass" message="Test passed" />
<test name="test_endValue" result="pass" message="Test passed" />
</testcase>
</testsuite>
</report>
The JSON format requires that a JSON serializer be available. The native JSON
utility is used when available. Otherwise, you'll need to point YUITest.Util.JSON
at an implementation containing the stringify() method
. If you're using YUI 2.x, you can point to YAHOO.lang.JSON
; if you're using YUI 3.x, you can point to Y.JSON
; otherwise, you can use the json2.js library. Results are output in a format that follows the object/array hierarchy of the results object, such as:
{
"passed": 5,
"failed": 0,
"ignored": 0,
"total": 0,
"type": "report",
"name": "YUI Test Results",
"yuisuite":{
"passed": 5,
"failed": 0,
"ignored": 0,
"total": 0,
"type": "testsuite",
"name": "yuisuite",
"Y.Anim":{
"passed": 5,
"failed": 0,
"ignored": 0,
"total": 0,
"type":"testcase",
"name":"Y.Anim",
"test_getEl":{
"result":"pass",
"message":"Test passed.",
"type":"test",
"name":"test_getEl"
},
"test_isAnimated":{
"result":"pass",
"message":"Test passed.",
"type":"test",
"name":"test_isAnimated"
},
"test_stop":{
"result":"pass",
"message":"Test passed.",
"type":"test",
"name":"test_stop"
},
"test_onStart":{
"result":"pass",
"message":"Test passed.",
"type":"test",
"name":"test_onStart"
},
"test_endValue":{
"result":"pass",
"message":"Test passed.",
"type":"test",
"name":"test_endValue"
}
}
}
}
The JUnit XML format outputs results in the following format:
<?xml version="1.0" encoding="UTF-8" ?>
<testsuites>
<testsuite name="Y.Anim" failures="0" total="5" time="0.0060">
<testcase name="test_getEl" time="0.0"></testcase>
<testcase name="test_isAnimated" time="0.0010"></testcase>
<testcase name="test_stop" time="0.0010"></testcase>
<testcase name="test_onStart" time="0.0010"></testcase>
<testcase name="test_endValue" time="0.0010"></testcase>
</testsuite>
</testsuites>
Note that there isn't a direct mapping between YUI Test test suites and JUnit test suites, so some of the hierarchical information is lost.
The TAP format outputs results in the following format:
1..5
#Begin report YUI Test Results (0 failed of 5)
#Begin testcase Y.Anim (0 failed of 5)
ok 1 - testGetServiceFromUntrustedModule
ok 2 - testGetServiceFromTrustedModule
ok 3 - testGetServiceFromService
ok 4 - testGetServiceMultipleTimesFromService
ok 5 - testGetServiceMultipleTimesFromUntrustedModule
#End testcase Y.Anim
#End report YUI Test Results
The XML, JSON, and JUnit XML formats produce a string with no extra white space (white space and indentation shown here is for readability purposes only).
Code Coverage Data
If you've instrumented the JavaScript to test using YUI Test Coverage, then you can retrieve the coverage information by using the YUITest.TestRunner.getCoverage()
method. By default, this method
returns an object representing the coverage data of the tests that were just run (the method returns null
if called
while tests are still running). You can optionally specify a format in which the results should be returned. There are four
possible formats:
YUITest.CoverageFormat.JSON
- JSONYUITest.CoverageFormat.XdebugJSON
- JSON formatted Xdebug
You can pass any of these into YUITest.TestRunner.getCoverage()
to get a string with the test result information properly formatted. As mentioned earlier, you need to ensure that YUITest.Util.JSON
is pointing to a valid JSON
object.
Test Reporting
When all tests have been completed and the results object has been returned, you can post those results to a server
using a YUITest.Reporter
object. A YUITest.Reporter
object creates a form that is POSTed
to a specific URL with the following fields:
results
- the serialized results object.useragent
- the user-agent string of the browser.timestamp
- the date and time that the report was sent.
You can create a new YUITest.Reporter
object by passing in the URL to report to. The results object can
then be passed into the report()
method to submit the results:
var reporter = new YUITest.Reporter("http://www.yourserver.com/path/to/target");
reporter.report(results);
The form submission happens behind-the-scenes and will not cause your page to navigate away. This operation is one direction; the reporter does not get any content back from the server.
There are four predefined serialization formats for results objects:
YUITest.TestFormat.XML
(default)YUITest.TestFormat.JSON
YUITest.TestFormat.JUnitXML
YUITest.TestFormat.TAP
The format in which to submit the results can be specified in the YUITest.Reporter
constructor by passing in the appropriate
YUITest.TestFormat
value (when no argument is specified, YUITest.TestFormat.XML
is used:
var reporter = new YUITest.Reporter("http://www.yourserver.com/path/to/target", YUITest.TestFormat.JSON);
Custom Fields
You can optionally specify additional fields to be sent with the results report by using the addField()
method.
This method accepts two arguments: a name and a value. Any field added using addField()
is POSTed along with
the default fields back to the server:
reporter.addField("color", "blue");
reporter.addField("message", "Hello world!");
Note that if you specify a field name that is the same as a default field, the custom field is ignored in favor of the default field.


Navigation with Sub-Navigation using CSS Transitions and Animations Made for Codepen Challenge #cpc-fork-nav #codepenchallenge


|
SST/Macro
|
Public Member Functions | |
| MpiCall (OTF2_TimeStamp start, OTF2TraceReplayApp *app, MPI_CALL_ID id, const char *name) | |
| sstmac::timestamp | GetStart () |
| sstmac::timestamp | GetEnd () |
| void | SetTrigger (std::function< void()>) |
| bool | IsReady () |
| void | Trigger () |
| const char * | ToString () |
Static Public Member Functions | |
| static void | assert_call (MpiCall *cb, std::string msg) |
Public Attributes | |
| OTF2_TimeStamp | start_time |
| OTF2_TimeStamp | end_time |
| std::function< void()> | on_trigger |
| OTF2TraceReplayApp * | app |
| bool | isready |
| MPI_CALL_ID | id |
| const char * | name |


Next steps
- Login at LINK
- Create new thresholds
- Subscribe to existing sensors with your created thresholds
New sensors
Your floodway or bridge is not covered with a sensor? You can easily create a new sensor in the application. You you can decide if you want to make it private for own purposes or to make it public to share it with other users. To build an own sensor with a Raspberry Pi, please follow the following instructions
LINK.


NP-
`Prev `__
N
`Next `__
--------------
**NP-**: /N·P/, pref.
Extremely. Used to modify adjectives describing a level or quality of
difficulty; the connotation is often ‘more so than it should be’. This
is generalized from the computer-science terms NP-hard and NP-complete;
NP-complete problems all seem to be very hard, but so far no one has
found a proof that they are. NP is the set of
Nondeterministic-Polynomial problems, those that can be completed by a
nondeterministic Turing machine in an amount of time that is a
polynomial function of the size of the input; a solution for one
NP-complete problem would solve all the others. “Coding a BitBlt
implementation to perform correctly in every case is NP-annoying.”
Note, however, that strictly speaking this usage is misleading; there
are plenty of easy problems in class NP. NP-complete problems are hard
not because they are in class NP, but because they are the hardest
problems in class NP.
--------------
+----------------------------+----------------------------+-----------------------------------+
| `Prev `__ | `Up <../N.html>`__ | `Next `__ |
+----------------------------+----------------------------+-----------------------------------+
| notwork | `Home <../index.html>`__ | NSA line eater |
+----------------------------+----------------------------+-----------------------------------+


new Player()
Represents the game player.
- Source:
Methods
-
isDefaultName() → {Boolean}
-
Indicates whether the current object has the system default name.
- Source:
Returns:
True if the player name has the system default value. False if otherwise.- Type
- Boolean
-
load()
-
Loads the saved player state. If no saved state can be found, then default values are used instead.
- Source:
-
save()
-
Saves the current player state.
- Source:
-
scorePoint()
-
Used to notify the player object that a point has been scored.
- Source:
-
wipeSave()
-
Erases the saved player state.
- Source:


|
ActionComponents
04.05.00
Customizable UI and time-saving tools for iOS development with Xamarin and Visual Studio.
|
Public Member Functions | |
| ACToastAppearance () | |
| Initializes a new instance of the ActionComponents.ACToastAppearance class. More... | |
| void | Flatten () |
| Flattens the ActionComponents.ACToastAppearance to match the new iOS 7 design language More... | |
| void | Flatten (UIColor backgroundColor) |
| Flattens the ActionComponents.ACToastAppearance to match the new iOS 7 design language More... | |
| void | Flatten (UIColor backgroundColor, UIColor foregroundColor) |
| Flattens the ActionComponents.ACToastAppearance to match the new iOS 7 design language More... | |
Properties | |
| float | textSize [get, set] |
| Gets or sets the size of the text. More... | |
| float | cornerRadius [get, set] |
| Gets or sets the corner radius. More... | |
| UIColor | textColor [get, set] |
| Gets or sets the color of the text. More... | |
| UIColor | textShadow [get, set] |
| Gets or sets the text shadow. More... | |
| UIColor | background [get, set] |
| Gets or sets the background color More... | |
| bool | flat [get, set] |
| Gets or sets a value indicating whether this ActionComponents.ACToastAppearance is flat. More... | |
| ActionComponents.ACToastAppearance.ACToastAppearance | ( | ) |
Initializes a new instance of the ActionComponents.ACToastAppearance class.
| void ActionComponents.ACToastAppearance.Flatten | ( | ) |
Flattens the ActionComponents.ACToastAppearance to match the new iOS 7 design language
| void ActionComponents.ACToastAppearance.Flatten | ( | UIColor | backgroundColor | ) |
Flattens the ActionComponents.ACToastAppearance to match the new iOS 7 design language
| backgroundColor | Background color. |
| void ActionComponents.ACToastAppearance.Flatten | ( | UIColor | backgroundColor, |
| UIColor | foregroundColor | ||
| ) |
Flattens the ActionComponents.ACToastAppearance to match the new iOS 7 design language
| backgroundColor | Background color. |
| foregroundColor | Foreground color. |
|
getset |
Gets or sets the background color
The background.
|
getset |
Gets or sets the corner radius.
The corner radius.
|
getset |
Gets or sets a value indicating whether this ActionComponents.ACToastAppearance is flat.
true
if flat; otherwise, false
.
This value was added to support the iOS 7 degisn language
|
getset |
Gets or sets the color of the text.
The color of the text.
|
getset |
Gets or sets the text shadow.
The text shadow.
|
getset |
Gets or sets the size of the text.
The size of the font.


User Functions Reference¶
These are the primary functions that control model import and execution.
-
class
pysd.
PySD
(component_class)[source]¶ PySD is the default class charged with running a model.
It can be initialized by passing an existing component class.
The import functions pull models and create this class.
-
extend_dataframe
(state_df, return_columns)[source]¶ Calculates model values at given system states This is primarily an internal method used by the run function
-
run
(params={}, return_columns=[], return_timestamps=[], initial_condition='original', collect=False, **intg_kwargs)[source]¶ Simulate the model’s behavior over time. Return a pandas dataframe with timestamps as rows, model elements as columns.
Parameters: - params (dictionary) – Keys are strings of model component names. Values are numeric or pandas Series. Numeric values represent constants over the model integration. Timeseries will be interpolated to give time-varying input.
- return_timestamps (list, numeric, numpy array(1-D)) – Timestamps in model execution at which to return state information. Defaults to model-file specified timesteps.
- return_columns (list of string model component names) – Returned dataframe will have corresponding columns. Defaults to model stock values.
- initial_condition (‘original’/’o’, ‘current’/’c’, (t, {state})) –
The starting time, and the state of the system (the values of all the stocks) at that starting time.
- ‘original’ (default) uses model-file specified initial condition
- ‘current’ uses the state of the model after the previous execution
- (t, {state}) lets the user specify a starting time and (possibly partial) list of stock values.
- collect (binary (T/F)) – When running multiple simulations, collect the results in a way that we can access down the road.
- intg_kwargs (keyword arguments for odeint) – Provides precice control over the integrator by passing through keyword arguments to scipy’s odeint function. The most interesting of these will be tcrit, hmax, mxstep.
Examples
>>> model.run(params={'exogenous_constant':42}) >>> model.run(params={'exogenous_variable':timeseries_input}) >>> model.run(return_timestamps=[1,2,3.1415,4,10]) >>> model.run(return_timestamps=10) >>> model.run(return_timestamps=np.linspace(1,10,20))
See also
pysd.set_components()
- handles setting model parameters
pysd.set_initial_condition()
- handles setting initial conditions
-
set_components
(params)[source]¶ Set the value of exogenous model elements. Element values can be passed as keyword=value pairs in the function call. Values can be numeric type or pandas Series. Series will be interpolated by integrator.
Examples
>>> br = pandas.Series(index=range(30), values=np.sin(range(30)) >>> set_components(birth_rate=br) >>> set_components(birth_rate=10)
-
set_initial_condition
(initial_condition)[source]¶ Set the initial conditions of the integration. There are several ways to do this:
- ‘original’/’o’ : Reset to the model-file specified initial condition.
- ‘current’/’c’ : Use the current state of the system to start the next simulation. This includes the simulation time, so this initial condition must be paired with new return timestamps
- (t, {state}) : Lets the user specify a starting time and list of stock values.
>>> model.set_initial_condition('original') >>> model.set_initial_condition('current') >>> model.set_initial_condition( (10,{teacup_temperature:50}) )
See also: pysd.set_state()
-
-
pysd.
read_vensim
(mdl_file)[source]¶ - Construct a model from Vensim .mdl file.
Translate a vensim model file into a python class.


Google Cloud Functions Operators¶
GcfFunctionDeleteOperator¶
Use the operator to delete a function from Google Cloud Functions.
For parameter definition, take a look at
GcfFunctionDeleteOperator
.
Arguments¶
The following examples of OS environment variables show how you can build function name to use in the operator:
GCP_PROJECT_ID = os.environ.get('GCP_PROJECT_ID', 'example-project')
GCP_LOCATION = os.environ.get('GCP_LOCATION', 'europe-west1')
GCF_SHORT_FUNCTION_NAME = os.environ.get('GCF_SHORT_FUNCTION_NAME', 'hello').\
replace("-", "_") # make sure there are no dashes in function name (!)
FUNCTION_NAME = 'projects/{}/locations/{}/functions/{}'.format(GCP_PROJECT_ID,
GCP_LOCATION,
GCF_SHORT_FUNCTION_NAME)
Using the operator¶
delete_task = GcfFunctionDeleteOperator(
task_id="gcf_delete_task",
name=FUNCTION_NAME
)
Templating¶
template_fields = ('name', 'gcp_conn_id', 'api_version')
More information¶
See Google Cloud Functions API documentation to delete a function.
GcfFunctionDeployOperator¶
Use the operator to deploy a function to Google Cloud Functions. If a function with this name already exists, it will be updated.
For parameter definition, take a look at
GcfFunctionDeployOperator
.
Arguments¶
In the example DAG the following environment variables are used to parameterize the operator’s definition:
GCP_PROJECT_ID = os.environ.get('GCP_PROJECT_ID', 'example-project')
GCP_LOCATION = os.environ.get('GCP_LOCATION', 'europe-west1')
GCF_SHORT_FUNCTION_NAME = os.environ.get('GCF_SHORT_FUNCTION_NAME', 'hello').\
replace("-", "_") # make sure there are no dashes in function name (!)
FUNCTION_NAME = 'projects/{}/locations/{}/functions/{}'.format(GCP_PROJECT_ID,
GCP_LOCATION,
GCF_SHORT_FUNCTION_NAME)
GCF_SOURCE_ARCHIVE_URL = os.environ.get('GCF_SOURCE_ARCHIVE_URL', '')
GCF_SOURCE_UPLOAD_URL = os.environ.get('GCF_SOURCE_UPLOAD_URL', '')
GCF_SOURCE_REPOSITORY = os.environ.get(
'GCF_SOURCE_REPOSITORY',
'https://source.developers.google.com/'
'projects/{}/repos/hello-world/moveable-aliases/master'.format(GCP_PROJECT_ID))
GCF_ZIP_PATH = os.environ.get('GCF_ZIP_PATH', '')
GCF_ENTRYPOINT = os.environ.get('GCF_ENTRYPOINT', 'helloWorld')
GCF_RUNTIME = 'nodejs6'
GCP_VALIDATE_BODY = os.environ.get('GCP_VALIDATE_BODY', True)
Some of those variables are used to create the request’s body:
body = {
"name": FUNCTION_NAME,
"entryPoint": GCF_ENTRYPOINT,
"runtime": GCF_RUNTIME,
"httpsTrigger": {}
}
When a DAG is created, the default_args dictionary can be used to pass arguments common with other tasks:
default_args = {
'start_date': dates.days_ago(1)
}
Note that the neither the body nor the default args are complete in the above examples.
Depending on the variables set, there might be different variants on how to pass source
code related fields. Currently, you can pass either sourceArchiveUrl
,
sourceRepository
or sourceUploadUrl
as described in the
Cloud Functions API specification.
Additionally, default_args
or direct operator args might contain zip_path
parameter
to run the extra step of uploading the source code before deploying it.
In this case, you also need to provide an empty sourceUploadUrl
parameter in the body.
Using the operator¶
Depending on the combination of parameters, the Function’s source code can be obtained from different sources:
if GCF_SOURCE_ARCHIVE_URL:
body['sourceArchiveUrl'] = GCF_SOURCE_ARCHIVE_URL
elif GCF_SOURCE_REPOSITORY:
body['sourceRepository'] = {
'url': GCF_SOURCE_REPOSITORY
}
elif GCF_ZIP_PATH:
body['sourceUploadUrl'] = ''
default_args['zip_path'] = GCF_ZIP_PATH
elif GCF_SOURCE_UPLOAD_URL:
body['sourceUploadUrl'] = GCF_SOURCE_UPLOAD_URL
else:
raise Exception("Please provide one of the source_code parameters")
The code to create the operator:
deploy_task = GcfFunctionDeployOperator(
task_id="gcf_deploy_task",
project_id=GCP_PROJECT_ID,
location=GCP_LOCATION,
body=body,
validate_body=GCP_VALIDATE_BODY
)
You can also create the operator without project id - project id will be retrieved from the GCP connection used:
deploy2_task = GcfFunctionDeployOperator(
task_id="gcf_deploy2_task",
location=GCP_LOCATION,
body=body,
validate_body=GCP_VALIDATE_BODY
)
Templating¶
template_fields = ('project_id', 'location', 'gcp_conn_id', 'api_version')
Troubleshooting¶
If during the deploy you see an error similar to:
“HttpError 403: Missing necessary permission iam.serviceAccounts.actAs for on resource<EMAIL_ADDRESS>Please grant the roles/iam.serviceAccountUser role.”
it means that your service account does not have the correct Cloud IAM permissions.
Assign your Service Account the Cloud Functions Developer role.
Grant the user the Cloud IAM Service Account User role on the Cloud Functions runtime service account.
The typical way of assigning Cloud IAM permissions with gcloud is shown below. Just replace PROJECT_ID with ID of your Google Cloud Platform project and SERVICE_ACCOUNT_EMAIL with the email ID of your service account.
gcloud iam service-accounts add-iam-policy-binding \
<EMAIL_ADDRESS>\
--member="serviceAccount:[SERVICE_ACCOUNT_EMAIL]" \
--role="roles/iam.serviceAccountUser"
You can also do that via the GCP Web console.
See Adding the IAM service agent user role to the runtime service for details.
If the source code for your function is in Google Source Repository, make sure that your service account has the Source Repository Viewer role so that the source code can be downloaded if necessary.
More information¶
See Google Cloud API documentation to create a function.


The website I will be analyzing is the usability of Bellevue Library search bar option and results access. The url is https://kcls.org/locations/1492/. The criteria that I will use to test the page will be:
The navigation of the search criteria and breakdown of the search
Does it have visual appeal for obvious information?
Is it free of visual distractions?
Is it effective?
Navigation and Breakdown
The search bar is right at the top of the home page and easy to find. Once typing in a book or author, you do get a number of results with the covers of most books and DVDs. You have the options on the side bar to just show books, DVDs, audio books or e-books. This is a great feature since the results come up in no particular order and are all jumbled together with questionable “relevance” order. That being said, after selecting “books” (an example) that is where the breakdown options stop. There is no specific option to look for author, title or subject like fiction, biography until you scroll to the bottom below the obvious text options for other selections.
Visual Appeal
The layout of the site is very plain with white background and black text. It is direct; however I would move the bar breakdown for author, genre, and title above the search results since this is what I am used to with most modern sites. It does seem like it would benefit from a layout that would catch the eye when searching for a book or other media material.
Distractions
There are no ads or pop ups which a plus when it comes to government-run sites. At the moment, though, there is an important message box at the top that is a reminder of a library closer. The way it is set up though looks like an error to me and made it seem at first that there was something wrong with my search criteria.
Effectiveness
With getting used to the search bar and its results are effective. You just have to learn how to weed out the thousands of results that come with it and learn where everything is to do that. I would say using a modern approach to the site by switching around the option as to where they are on the page would help a great deal.


Squirrel
{{version}}
Projects
Settings
Build history
Build queue
...
No builds in the queue.
Powered by jetty://