UX Principles
Actions
- No right clicks
- No hover to access pertinent information
- Every click counts
Context Sensitivity
- App should be aware of action context to present the appropriate content
- Reuse established scenarios (Ex: accessing a task from different entry points should follow the same workflow)
- Role-based workflow
Persistence
- Ability to resume an order
- Ability to resume a note
Colors
Primary
$primary
#0D68A1
rgba(13,104,161,1)
$primary-dark
#132F50
rgba(18,46,81,1)
$primary-light
#DCE4EF
rgba(220,228,239,1)
$primary-light-alt
#BDCCDB
rgba(189,204,219,1)
$primary-lighter
#E2F3F8
rgba(226,243,248,1)
$primary-lightest
#F3F5F7
rgba(243,245,247,1)
Secondary
$secondary
#328443
rgba(51,133,67,1)
$secondary-light
#E4EFEC
rgba(228,239,236,1)
$secondary-dark
#256632
rgba(42,101,52,1)
Tertiary
$tertiary
#F8C54F
rgba(248,197,80,1)
$tertiary-dark
#E6B131
rgba(230,177,49,1)
$tertiary-darker
#FD9827
rgba(253,152,39,1)
$pure-yellow
#FEFC9E
rgba(254,252,158,1)
$orange-dark
#9E5200
rgba(158,82,0,1)
Supporting Colors
$pure-black
#000000
rgba(0,0,0,1)
$pure-white
#FFFFFF
rgba(255,255,255,1)
$red
#EB1700
rgba(255,8,0,1)
$red-dark
#C31300
rgba(195,19,0,1)
$red-lightest
#FFF1F1
rgba(255,241,241,1)
Greys
$grey-darkest
#555555
rgba(85,85,85,1)
$grey-darker
#767676
rgba(118,118,118,1)
$grey-dark
#BBBBBB
rgba(187,187,187,1)
$grey
#CCCCCC
rgba(204,204,204,1)
$grey-light
#DDDDDD
rgba(221,221,221,1)
$grey-lighter
#E6E6E6
rgba(230,230,230,1)
$grey-lightest
#F4F4F4
rgba(244,244,244,1)
The Staff Context Color Theme
$primary
#076F7D
rgba(,111,125,1)
$primary-dark
#05434B
rgba(5,67,75,1)
$primary-light
#CAE0DA
rgba(202,224,218,1)
$primary-light-alt
#E4EFEC
rgba(228,239,236,1)
Typography
Back to TopThe primary typeface used within the eHMP application is Source Sans Pro. Merriweather is the secondary typeface currently used only on the sign in screen.
Heading levels are based on the content hierarchy and viewed holistically throughout the application. For example, heading level 1 are used for main headings such as the application name, Enterprise Health Management Platform. Heading level 2, or secondary headings are reserved for the patient name.
Modals within the application are using heading level 4. If the modal is considered a detail modal, the content within the modals are divided into sections leading with a heading level 5, and the content that follow those headings are paragraphs.
Another example are the applet headers that currently using heading level 5, and the content within those applets are either heading level 6 or paragraphs.Heading Level 1
Regular: 20px
Heading Level 2
Regular: 18px
Heading Level 3
Bold: 16px
Heading Level 4
Bold: 14px (Mainly used for modal headings)
Heading Level 5
Bold: 12px
Heading Level 5 Alternative
Bold: 14px, All Caps, $primary-dark (Mainly used for applet headings)
Heading Level 6
Regular: 12px
This is paragraph text. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Regular: 11px
Buttons
Back to TopButtons are actionable objects that allow the users to interact with the application in ways such as triggering a modal or submitting a form. All buttons will have the base styling of font-weight: 600, font-size: 12px, padding: 6px 12px, border-radius: 2, box-shadow: 0px 1px 2px 0px rgba(0,0,0,0.3), and line-height 1.4.
Default
Default buttons (btn-default) have the $primary-light background color and are used when less attention needs to be called to the buttons. Examples of use are the CWADF buttons in the patient information bar, the global footer buttons, and in the footer of dialogs that have a white background.
The small default button (btn-sm) is used in the footers of modals and pop-overs.
Font-size: 11px, padding: 5px 10px
The extra-small default button (btn-xs) is used in smaller real estates such as the patient information bar, the global footer and previous/next buttons in the modal headers.
Font-size: 13px, border-radius: 20px, font-weight: 400, padding: 0 10px
Primary
Primary buttons (btn-primary) have the $primary background color and are used when more attention needs to be drawn to the buttons. The primary buttons usually contain the primary action in a workflow. Examples of use are the sign in button on the log in page and adding new observations, actions and notes inside of the tray.
The default primary button (btn-primary) is used primarily on the login page.
Default: Background color: $primary, Text color: $pure-white
Hover/Focus: Background color: $primary-dark, Text color: $pure-white
The extra-small primary button (btn-xs) is used in smaller real estates such as the Notes sub-tray buttons.
Font-size: 13px, border-radius: 20px, font-weight: 400, padding: 0 10px
The small primary button (btn-sm) is used when a white footer or no footer is present and a primary action must be taken.
Font-size: 11px, padding: 5px 10px
The large primary button (btn-lg) is used sparingly when appropriate. One of the locations is Nationwide Search in Patient Selection.
Font-size: 14px, padding: 10px 16px
Primary button paired with font awesome icons (Mainly used in navigations).
Other Button Styles
These other button styles are used in specific areas of the application.
Only using font awesome icons or custom designed icons. Button icons do not have visual text.
The green button with large font (btn-lg) is used for patient selection. After selecting a patient, the user must select the green button confirm your selection.
Font-size: 14px, padding: 10px 16px
The danger button (btn-danger) is used in global error dialogs.
Background color: $red, Text color: $pure-white
Hover/Focus: Background color: $red-dark, Text color: $pure-white
Background color: $primary, Text color: $pure-white
Hover/Focus: Background color: $primary-dark, Text color: $pure-white
Background color: $primary-dark, Text color: $pure-white
Hover/Focus: Background color: $primary-dark, Text color: $pure-white
Badges
Badges are used to visually display the total amount of items that are grouped together. This can usually be found in accordions where there are multiple results or multiple groupings. An example of badges is within the search records results.
Back to Top
Background color: $primary; Text color: $pure-white
Paired with font awesome icon
Labels
Labels are used to indicate severity level or other types of information.
Back to Top
Background color: $red; Text color: $pure-white
Background color: $red; Text color: $pure-white
Background color: $tertiary-darker; Text color: $pure-black
Background color: $grey-darker; Text color: $pure-white
Modals
Back to TopAlert Modal
Alert modals are used to interrupt the user's workflow. For example, if the user is attempting to delete a workspace, the application screen will have a blur effect and a modal will appear in the middle of the screen. The modal will provide information on the action the user is attempting to complete and will request the user to respond. The alert modal will always provide two options. One option is to move forward with the action, and the other is to cancel and return to the previous screen.
Details Modal
Details modals are used to provide the user with information about a specific record from the applet. Details modals appear in the middle of the screen after the user selects the details modal button from the applet toolbar within a row of an applet. Detail modals will have a previous and next button, which will allow the user to view the previous or next record within the applet. The previous button will be disabled if the user is currently on the first record, and similarly the next button will be disabled if the user is on the last record. The details modal will have 2 exit methods. One is at the top right of the modal appearing as an X icon, and the other is the on the bottom right of the modal appearing as text within a button titled, "Close". Each method will return the user to where they were previously in the application. Details modals are also moveable. The user is able to hover over the modal header and see that the cursor will change allowing them to select, hold, and then move the modal around if they wish to view other content simultaneously.
Growl Alerts
Back to TopGrowl alerts are used to indicate to the user that a write back has been successfully saved.
An unsuccessful save (system error) should be indicated by a modal so that it interrupts the workflow and makes the user aware of the error.
Form Elements
Back to TopFaux Tables
Back to TopA faux table may appear as a regular data table by using divs to give the look and feel of a table; however, it allows the user to interact with it in complex enhanced functionality and flexibility that a regular table does not allow.
It is currently used mainly in applets. A user may sort the data by selecting each column header. A blue caret will appear next to the applet header, which allows the user to sort ascending or descending. A user may also select any row of data within the applet and trigger either an applet toolbar or a detail modal. The applet toolbar is a toolbar that displays all the actions that a user can perform for that row, such as obtaining more information that will appear in an external window, open the detail modal, selecting a quick look, which will display a summary table of the information and much more.
Date Picker
Back to TopDropdown Calendar
The date picker has 2 methods that allow the user to input a date. The user can either select the icon calendar, which will display a calendar. The default date will be set to today, indicated by a blue background color and white font. The user can use the top left corner arrow to move to the pervious month; similarly can use the top right corner arrow to move to the following month. If the user selects the month, all of the months within the year will display. Once the user selects the desired month, the dates for that specific month will appear. On the view where all the months are displayed, the user can also select the year if the user wishes to choose another year other than the current year. The view will display 12 years at a time, and similarly to the dates, the user can use the left and right corner arrows to move forward or backwards in years. The user can always use the Today button at the bottom of the calendar to select today’s date.
Flexible Date Picker/Acceptable Formats
The other method is for the user to directly type in the desired date, by placing their cursor within the input field. Depending on the date field, there are restrictions on what formats are acceptable. The help icon next to the label fields, when selected, displays a list of acceptable formats. This date picker is called the flexible date picker, it not only accepts dates in the standard format of MM/DD/YYYY, it will accept text such as 't' for today, or 'y' for yesterday.
Workspaces
Back to TopPredefined Workspaces
Predefined workspaces are workspaces that are readily available in the application that cannot be deleted. The predefined workspaces are Overview, Timeline, Coversheet, Meds Review, Documents, and Summary. The Summary workspace is selected as the default workspace when a user arrives to the workspace; however, the user can select any workspace as the default through the workspace manager. These workspaces will contain preselected applets that the user also cannot customize; therefore the workspace editor icon will not appear in the workspace navigation as it does for custom workspaces.
Custom Workspaces
The user controls custom workspaces. The user can create a new workspace through the workspace manager and editor. The custom workspace allows the user to name the workspace that will appear in the workspace drop down. The user can personally select which applets to include in the workspace, along with what type of view, such as trend, summary, or expanded. Other actions such as removing applets or changing views can be controlled through the workspace editor along with resizing the applet container itself.
The applet chrome will change for user-defined workspaces. The additional icon that appears is the gear icon; when selected, the applet will list all the views that are available for that applet. The user can change the view of the applet without having to visit the workspace editor if not desired.
Workspace Manager
The workspace manager allows the user to manage all of their workspaces. Similar to the applet chrome, the workspace manager also has a set of functions at the top right hand corner. The plus icon allows users to create/add a new workspace, the filter icon will expand the filter input letting the user enter in text to filter through the workspaces listed below, and the X icon will close the workspace manager and return the user to their previous screen.
Within the workspace manager there are multiple actions that can occur. Creating a new workspace, setting the default view, copying, rearranging, removing, previewing, launching, and customizing. When a user creates a new workspace, the user should enter a name and a description for that workspace in the input field. This allows the user to easily recognize the workspace created, although the description is not required while the name of the workspace is required. The user can also add associated problems to this workspace by selecting the tag icon and using the search component. The author field will be auto populated with the user that is currently signed on to the application. Setting the desired default workspace can be simply completed by selecting the star icon next to the workspace name; however, only one workspace can be set as the default at any given time.
Duplicating the workspace is accomplished by selecting the copy icon. This will place the newly copied workspace directly below the workspace that it was copied from, instead of at the bottom of the list when a new workspace is created. The user can also rearrange the workspaces by selecting the double arrow icon and dragging the workspace tile up or down until the desired list is finalized. The user can also remove workspaces that were created accidently or no longer needed by selecting the trash can icon.
Previewing a workspace allows the user to have a sneak peak of the workspace before launching the workspace. The preview will appear in a separate modal. If the user has created the workspace, the user can launch the workspace, which at this time will close the workspace manager, or select customize if a new workspace is created, which will navigate them to the workspace editor.
Workspace Editor
The workspace editor lists all of the available applets that the user can choose from in a carousel layout. The user can select the left or right arrows of the carousel to cycle through the list of available applets. Once the user finds the desired applet, the user can simply drag that applet into the draft workspace area, indicated as the blue-bordered box. Once the user drags the applet into the blue box, the user will be presented with the available views for the particular applet, such as trend, summary, or expanded. At that point the user can select a view, or remove that applet. The user can repeat these actions until the desired workspace is finalized and then select the Accept button.
In the workspace editor footer, the user can also choose to delete this newly created workspace completely by selecting the Delete button, or return to the workspace manager to make more edits by selecting the Go To Workspace Manager button. If the user has no further edits and is ready to launch the newly created or edited workspace, the user should select the Accept button to close the workspace editor.
Applets
Back to TopApplet Chrome
The applet chrome consists of multiple buttons on the top right hand corner. These buttons allows the user to interact with that particular applet. The common features are refresh, help, and filter. Refresh allows the user to refresh the data, help allows user to access the help content that will open in a different window, and filter will expand a filter input right underneath the applet header and chrome, as the user enters in text the data will filter below. Other applet chrome features are the expanded view (only appears if the user is viewing a trend or summary view of the applet), which allows the user to view the applet in a wider display. From the expanded view, the user will see an X icon in replace of the expanded view, which will close the expanded view and return the user to their previous screen. At times the user will see a plus icon appear in the applet chrome. The plus icon indicates that a user is able to add data to that applet, such as an allergy. When the user selects the plus icon, the write back tray will open.
Applet Filter
Applets are provided with filtering capabilities. In predefined workspaces, the filtering allows the user to narrow down the applet results with keywords entered in the filter text. As the user enters in text, the results will filter below.
On custom workspaces, the applets allow for more enhanced filtering capabilities. The filtering can be accomplished by setting multiple keywords. For example, the user opens the filter input and enters in a keyword in the add filter field. The user can repeat this action until all desired keywords are entered, which will contribute to the filtering criteria. Once the user has all of the desired keywords, the user can label this search criteria by entering a name for it in the Edit Applet Filter Name field. This will make the name for this filter visible at all times.
Quick-look Menu
The quick-look menu is triggered by selecting the applet row if there is more than one way to interact with the row of record, otherwise the detail modal will appear on select. Some of the common actions in the quick-look menu is more information, detail modal, and quicklook view.
Trend Applets (Concept)
The trend view, or concept applet, provides a baseline of objects within a domain if sufficient data is available. Trend view will also contain any visual graphs that will display the trend for that particular record.
Pill Applet
The pill applet is also considered a trend view. The difference is the layout. Instead of rows and columns, the data will appear in a pill like form allowing the user to consume information differerently.
Summary and Expanded Applets (Record)
The summary and expanded applets displays a wider range of information for the particular applet. The summary view provides a partial detailed display of objects within a domain, while the expanded view provides most detailed display of objects within a domain.
Tray/Write-backs/Sub-tray
Back to TopWrite back are forms that allow users to enter information. The write back appears within the tray with various form elements. Depending on how the user enters the tray, the user could be presented with a summary tray, which displays a list of actionable items, for example, tasks that need to be completed or drafts of write backs that were not submitted. The Observations and Actions tray has multiple write backs, which will require the user to select which write back they wish to complete from a drop down menu. Each write back contains an actionable footer, which allows the user to perform actions such as cancel, delete, or accept. The delete and cancel function will appear in a popover right above the button. It confirms the action the user is attempting and requires the user to confirm in proceeding with the action or canceling to return to the write back. Once the write back is successfully submitted, the user will see a growl alert appear for confirmation.
Tray Loader
The tray has loading indicator in many cases, such as when the user first opens the write back. Another example is when the user submits the form, or switches views. The loading animation indicates to the user that the system is working on their request and that the user should wait until the system is complete.
Sub-tray
Some trays contain a sub-tray that provides additional information or more actionable items that can be performed with the write back. For example, the notes write back contains a sub-tray. Some of the actions are allowing the user to view content written by other providers, or appending content to the note.
Write back Popover
Write back popovers occur in the write back footer when the user attempts to cancel or delete a write back. Deleting a write back workflow appears when a draft was created, while cancel is persistent in all write backs. If the user attempts to delete, the delete popover will appear above the delete button asking requiring the user to confirm to proceed with deleting, or canceling to return to the write back. Likewise, if the user attempts to cancel a write back, the cancel popover will appear also requiring the user to respond.

Below are some examples:
Icons
Back to TopAction Icons (Universal)
- Settings
- Help
- Open Expanded View
- Close Expanded View
- Add
- Refresh
- Filter
- Edit
- Close/Cancel/Dismiss
- Remove
- User
- Comment
- Delete
Action Icons (Unique)
- Add to Stacked Graphs
- Tag for Concept-Invoked Workspace
- Quick Look
- Default Workspace
- Set to Default Workspace
- Empty Bell: No Alerts/Notifications
- Filled Bell: Alerts/Notifications
- Workspace Manager
- Broken Patient Context
- Non-local Site
- External Link
- Info Icon
- Details View
- Patient Selection
- Task Cannot Be Completed
- Duplicate Workspace
- Lab Order
- Bulk Edit User
- Staff User
- Patient User
Form Symbols
- Date
- Time
- Search
- Open Tray
- Close Tray
- Table Expand
- Table Collapse
- Dropdown Expand
- Dropdown Collapse
- Drill Down
Alert/Status Symbols
- Connection Stable | Successful
- Warning
- Error
- Connection Error
- Flagged


Sichuan (四川), is a landlocked province in Southwest China occupying most of the Sichuan Basin and the easternmost part of the Tibetan Plateau. The people of Sichuan speak a unique form of Mandarin, which took shape during the area's repopulation under the Ming.
| Capital | Chengdu |
| Area | 485,000 km2 |
| Population | 81,100,000 |


Google Groups hosts the quokka mailing lists. The lists can be accessed in several ways:
At present, there are 2 mailing lists, quokka-dev and quokka-user. The dev mailing list is intended for quokka committers only. The user list is the place to ask your questions.
| Archive | Subscribe |
|---|---|
| quokka-user |<EMAIL_ADDRESS>|
| quokka-dev |<EMAIL_ADDRESS>|


data class FromToCurrencyPair
A FROM -> TO pair of currencies. Used for convenience.
<init>
FromToCurrencyPair(from: Currency, to: Currency)
from
val from: Currency
to
val to: Currency


|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.xml.xpath.XPathFactory org.apache.xpath.jaxp.XPathFactoryImpl
public class XPathFactoryImpl
The XPathFactory builds XPaths.
| Field Summary | |
|---|---|
private static java.lang.String |
CLASS_NAME
Name of class as a constant to use for debugging. |
private boolean |
featureSecureProcessing
State of secure processing feature. |
private javax.xml.xpath.XPathFunctionResolver |
xPathFunctionResolver
XPathFunctionResolver for this XPathFactory and created XPaths. |
private javax.xml.xpath.XPathVariableResolver |
xPathVariableResolver
XPathVariableResolver for this XPathFactory and created XPaths |
| Fields inherited from class javax.xml.xpath.XPathFactory |
|---|
DEFAULT_OBJECT_MODEL_URI, DEFAULT_PROPERTY_NAME |
| Constructor Summary | |
|---|---|
XPathFactoryImpl()
|
| Method Summary | |
|---|---|
boolean |
getFeature(java.lang.String name)
Get the state of the named feature. |
boolean |
isObjectModelSupported(java.lang.String objectModel)
Is specified object model supported by this XPathFactory ? |
javax.xml.xpath.XPath |
newXPath()
Returns a new XPath object using the underlying
object model determined when the factory was instantiated. |
void |
setFeature(java.lang.String name,
boolean value)
Set a feature for this XPathFactory and
XPath s created by this factory. |
void |
setXPathFunctionResolver(javax.xml.xpath.XPathFunctionResolver resolver)
Establish a default function resolver. |
void |
setXPathVariableResolver(javax.xml.xpath.XPathVariableResolver resolver)
Establish a default variable resolver. |
| Methods inherited from class javax.xml.xpath.XPathFactory |
|---|
newInstance, newInstance |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final java.lang.String CLASS_NAME
Name of class as a constant to use for debugging.
private javax.xml.xpath.XPathFunctionResolver xPathFunctionResolver
XPathFunctionResolver for this XPathFactory and created XPaths.
private javax.xml.xpath.XPathVariableResolver xPathVariableResolver
XPathVariableResolver for this XPathFactory and created XPaths
private boolean featureSecureProcessing
State of secure processing feature.
| Constructor Detail |
|---|
public XPathFactoryImpl()
| Method Detail |
|---|
public boolean isObjectModelSupported(java.lang.String objectModel)
Is specified object model supported by this
XPathFactory
?
isObjectModelSupported
in class javax.xml.xpath.XPathFactory
objectModel
- Specifies the object model which the returned
XPathFactory
will understand.
true
if XPathFactory
supports
objectModel
, else false
.
java.lang.NullPointerException
- If objectModel
is null
.
java.lang.IllegalArgumentException
- If objectModel.length() == 0
.public javax.xml.xpath.XPath newXPath()
Returns a new XPath
object using the underlying
object model determined when the factory was instantiated.
newXPath
in class javax.xml.xpath.XPathFactory
XPath
public void setFeature(java.lang.String name, boolean value) throws javax.xml.xpath.XPathFactoryConfigurationException
Set a feature for this XPathFactory
and
XPath
s created by this factory.
Feature names are fully qualified URI
s.
Implementations may define their own features.
An XPathFactoryConfigurationException
is thrown if this
XPathFactory
or the XPath
s
it creates cannot support the feature.
It is possible for an XPathFactory
to expose a feature
value but be unable to change its state.
See XPathFactory
for full documentation
of specific features.
setFeature
in class javax.xml.xpath.XPathFactory
name
- Feature name.value
- Is feature state true
or false
.
javax.xml.xpath.XPathFactoryConfigurationException
- if this
XPathFactory
or the XPath
s
it creates cannot support this feature.
java.lang.NullPointerException
- if name
is
null
.public boolean getFeature(java.lang.String name) throws javax.xml.xpath.XPathFactoryConfigurationException
Get the state of the named feature.
Feature names are fully qualified URI
s.
Implementations may define their own features.
An XPathFactoryConfigurationException
is thrown if this
XPathFactory
or the XPath
s
it creates cannot support the feature.
It is possible for an XPathFactory
to expose a feature
value but be unable to change its state.
getFeature
in class javax.xml.xpath.XPathFactory
name
- Feature name.
javax.xml.xpath.XPathFactoryConfigurationException
- if this
XPathFactory
or the XPath
s
it creates cannot support this feature.
java.lang.NullPointerException
- if name
is
null
.public void setXPathFunctionResolver(javax.xml.xpath.XPathFunctionResolver resolver)
Establish a default function resolver.
Any XPath
objects constructed from this factory will use
the specified resolver by default.
A NullPointerException
is thrown if
resolver
is null
.
setXPathFunctionResolver
in class javax.xml.xpath.XPathFactory
resolver
- XPath function resolver.
java.lang.NullPointerException
- If resolver
is
null
.public void setXPathVariableResolver(javax.xml.xpath.XPathVariableResolver resolver)
Establish a default variable resolver.
Any XPath
objects constructed from this factory will use
the specified resolver by default.
A NullPointerException
is thrown if resolver
is null
.
setXPathVariableResolver
in class javax.xml.xpath.XPathFactory
resolver
- Variable resolver.
java.lang.NullPointerException
- If resolver
is
null
.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


You've told us you intend in to be in business. All your answers indicate you are similar to someone who is undertaking a hobby.
Please come back and use the tool again if things change. For example, if you:
You can't claim a deduction for any losses from your creative work if it is a hobby.
It's a myth that there is a dollar threshold to be in a business. Some people can have very expensive hobbies! What matters is whether, as a whole, your activity is commercial with an aim to make a profit. Once you're in business, there are dollar thresholds that can affect your tax obligations.
Based on what you’ve told us, these are your government obligations.


Detective guardrails
This page is for Amazon Web Services (AWS) Identity and Access Management (IAM) Home Office cloud users who want to understand what alerting we apply through AWS Guardrails in AWS accounts.
This content explains:
- what guardrails are
- what detective guardrails are
- how to implement detective guardrails
- guardrails organisational unit (OU) mapping
- monitoring detective guardrails
- cost of detective guardrails
- links to proposed and future guardrails
What are guardrails?
A guardrail is a high-level rule that provides ongoing governance for your Amazon Web Services (AWS) environment. Guardrails provide controls that govern and monitor resources when they are applied to accounts or organisational units (OU) in AWS organisations.
Back to side navigationDetective guardrails
A detective guardrail detects non-compliant resources within accounts. Alerts are then sent to a dashboard with guardrails either being compliant, non-compliant or not enabled. A detective guardrail does not prevent or remediate non-compliant resources. It will simply flag non-compliance. Detective guardrails are implemented using AWS Config and AWS Lambda.
Back to side navigationImplement detective guardrails
To implement detective guardrails, you need AWS Config and an active Config recorder in each AWS account. You can then implement the rules in one of two ways.
- Deploy AWS Config rules to accounts through a service such as AWS CloudFormation aligned to specific OUs.
- Use AWS Security Hub to act as a central dashboard, with each AWS account added as a child account within Security Hubs.
Security Hub comes with security standards that can be deployed for both the Center for Internet Security (CIS) AWS Foundation Benchmark and AWS Foundational Security Best Practices standard. This automatically deploys the relevant Config rules and other checks that extend beyond those Config can achieve on its own. These are deployed into child accounts and Security Hub provides a central dashboard for visibility. Security Hub also integrates the findings from other products including GuardDuty operating in child accounts.
Back to side navigationOU mapping
Guardrails can be applied to either individual accounts, or AWS organisations OUs. Applying them to individual OU's simplifies management because they also apply to all child accounts under the OU. It also allows the boundary of guardrail groups to be easily identified.
Mapping guardrails to OUs also allows groups of accounts to have stricter or more relaxed governance applied to them. For example, accounts under a production OU may have stricter compliance requirements than sandbox accounts under a sandbox OU. Eventually each of the guardrails identified will be mapped to individual OUs.
Back to side navigationMonitoring
Detective guardrails are the same if you implement them using AWS Config or AWS Security Hub. They require a team to review the results and take actions from them. In the future they must implement reactive security controls and automation.
Back to side navigationCosts
Due to detective guardrails use of AWS Config, they do have costs associated with them. So, there will be additional charges in each account. There are charges for each configuration item recorded per account, per month and the number of config rule evaluations undertaken on resources per month. The total charges per account will depend upon the number of resources and config rule evaluations undertaken.
Full details on AWS Config pricing
Proposed and future guardrails
Back to start of navigation treeBack to top


Yesterday evening, I finished a two day trek up the Lake District that I have been planning for a couple of weeks. Starting from Windermere, I would walk up Langdale, then over Stake Pass to finish in Keswick. It went a little something like this… A couple of weeks ago, I booked train tickets to take me from Lichfield to Windermere, then a return from Penrith back to Lichfield.
The original idea was to walk from Windermere, over High Street dropping back down over Ullswater to complete in Penrith. However, the weather forecasts a few days before I travelled changed my plans. The predication was -12 windchill, 45mph gusts, hail, thunder and snow. The original wildcamp on High Street was a bit optimistic, especially as I was trying to recover from a cold. Therefore, use of campsites was chosen, well, I deserve a little luxury!!
Furious route planning suggested a change of route, and my final choice was:
- Train to Windermere
- Bus to Ambleside
- Walk over Loughrigg to Langdale
- Camp at Langdale NT campsite
- Complete walk up Langdale, then over Stake Pass and then down Borrowdale
- Camp at Hollows Farm campsite
- Follow rest of Cumbria Way to Keswick, then Bus back to Penrith to return home by train.
With route planning and transport arranged, all I had to do was pack and travel, both of which I managed to complete without too much fussing. I finally walked out of Ambleside around 13:00 Thursday afternoon. Weather changed between warm sun, to cloudy to heavy rain, but I kept walking, eager to enjoy my latest voyage into the Lakes. Over Loughrigg, the terrain was ok, and I looked forward to the impending views into Langdale, certainly one of the most imposing views in the Lake District.
When they came, they did not disappoint, and the continued walk along the river to the campsite was great. Some nice trail walking over forest and rooty trails was a good warm up to the bigger walk on Friday. However, with an hour left of the walk, I was eager to get to the campsite to pitch the tent in the relative dry, but the rain came. And came. And came. Heavy rain persisted during pitching, unpacking and even walking to the Old Dungeon Ghyll for a Chicken and Leek pie. Good conversation with some fellow walkers helped the food and Ale down, and I left about 8:30 in the pitch black to get an early nights sleep.
And sleep I got, straight through until about 5am. When I wake, I generally fail to fall asleep again, so rather than lazing around, I got up, put a coffee on, had a shower, and started walking about 7:30am. My route card suggested a 9:30 start so initially, I thought the two hour head start would simply allow slower wonderings. However, following my great nights sleep, and eagerness to see Borrowdale, my progress suggested that I could make Hollows Farm by lunchtime - not dusk.
The weather was glorious, the sun warming up and casting a lovely yellow light over the head of Langdale. Truely breathtaking, and reaching the top of the pass, I was struck by the moon like surface - peat groughs gave a strange ground formation and unfortunately meant I was nearly constantly in the shade of the sun. It was cold up there, but started to warm up again as I started the descent into Borrowdale.
Walking down this familiar dale, I managed a fair old pace, helped by the coolish temperature and finally found myself at Grange about 13:00 - 5 hours before I was meant to be there. There was no chance I would stay and camp at the originally planned site, so I decided to continue the rest of the walk, hopefully making Keswick by sunset….
This plan was equally easily made, getting into town around 17:00. A final walk up Chestnut Hill got me to Castlerigg Hall Campsite, and pitch the tent on a very sodden field by 18:00. This allowed me to enjoy a pizza and garlic bread, a Cumberland Ale or 3 and a few chats with other walkers. The chats tended to concentrate on the amazing weather enjoyed today. Not a single drop of rain all day, and rarely a cloud in the sky. Yeah, it was cold, but I would gladly take an offer for that kind of day in October.
Back in the tent again by 8:30. Tried to sleep, and laughed to myself hearing some fellow mountain bikers struggling to get their tent pitched in the dark, cold evening.
I slept until around 5am again, but this time, I could hear the rain. And it did rain. A lot. All day. Having already completed all the planned walking the day before, I had a lie in until 9am, then went for a full English breakfast at the campsite eatery. Very pleasant it was too. I then went back and packed my rucksack, and walked down to Keswick bus station.
The bus got me to Penrith by about 12:30 which meant a 2 hour 20 minute wait for the train, which dragged, especially watching the constant rain outside. The train journey itself also went extremely slowly, mainly due to a diversion through Manchester. Time went even more slowly as I felt a little guilty for sitting on a packed train, smelling of cow poo. Still, somethings never change.
Good weekend all in all. Looking forward to next multidayer……


Guess Show!
menu
Let's Draw!
About
The player is drawing...
You are not logged in yet.
vpn_key
Login via GitHub
Chatting Area
Snape is typing...
Submit


During my spare time, I relish the great outdoors, conversing in French, and jamming with musicians on percussion. In the temperate climate of northern California, luxuriating in fresh mountain or coastal air in meditative worship of the Creator rejuvenates my mind, body, and soul. If the weather reaches extremes, I will sometimes surf longboard in the Pacific, or write comedy acts for amateur open mic nights.
Common to many internet users, I also enjoy cat videos and the occasional hype about Bitcoin's next breakthrough.


ASP.NET - React/Redux - Node.js - MongoDB - SQL
C# - Typescript - Docker - Kubernetes
I live in Indianapolis with my wife Amanda. I love the outdoors, travel, and solving problems with tech. I started my programming journey buy quiting my sales job in 2019 to explore webdevelopment. In early 2020 I worked on my first freelance fullstack MERN project in Lets Convention.
I really enjoyed solving problems and wathcing things come together to create a functional solution. Since then I have been working as an Associate Software Developer and studing Software Development at Eleven Fifty Academy


Spring-Image
Spring-Name
Select Spring name
Leaf Spring
Compressive Spring
Tensile Spring
Disk Spring
Torsional Spring
Conical Spring
Select Spring name
Leaf Spring
Compressive Spring
Tensile Spring
Disk Spring
Torsional Spring
Conical Spring
Select Spring name
Leaf Spring
Compressive Spring
Tensile Spring
Disk Spring
Torsional Spring
Conical Spring
Select Spring name
Leaf Spring
Compressive Spring
Tensile Spring
Disk Spring
Torsional Spring
Conical Spring
Select Spring name
Leaf Spring
Compressive Spring
Tensile Spring
Disk Spring
Torsional Spring
Conical Spring
Select Spring name
Leaf Spring
Compressive Spring
Tensile Spring
Disk Spring
Torsional Spring
Conical Spring
Next


new Town(population, name)
Creates new instance of Town.
Parameters:
| Name | Type | Description |
|---|---|---|
population |
Number | population of the town |
name |
String | name of the town |
- Source:
Methods
-
getPeople(maxPeople) → {Number}
-
Generates random number of people wanting to enter the vehicle, removes a fraction of people that couldn't enter from the pool of available people and returns the number of people that entered.
Parameters:
Name Type Description maxPeople
Number maximum number of people that can enter the vehicle - Source:
Returns:
number of people entering the vehicle- Type
- Number


|
| boolean | authUser (String username, String password) |
| |
| JSONObject | addField (String fieldName, double longitude, double latitude) |
| |
| JSONArray | getAllFields () |
| |
| boolean | addWeatherStationData (long weatherStationId, double temperature, double barometricPressure, double windSpeed, double relativeHumidity, long airQualityIndex) |
| |
◆ addField()
| JSONObject iotclient.Message.addField |
( |
String |
fieldName, |
|
|
double |
longitude, |
|
|
double |
latitude |
|
) |
| |
|
inline |
Adds a field to a database table.
This method creates JSONObject with key "FIELDADD" having a value of another JSONObject which contains details for a field which are obtained from the parameters of this method. Root object is then sent to a server via sendWithJsonObjectReturn() function which is going to return all details for the newly created field.
- Parameters
-
| fieldName | Name of the field as a string |
| longitude | Geographical longitude of the field |
| latitude | Geographical latitude of the field |
- Returns
- JSONObject with the details of the newly created field.
◆ addWeatherStationData()
| boolean iotclient.Message.addWeatherStationData |
( |
long |
weatherStationId, |
|
|
double |
temperature, |
|
|
double |
barometricPressure, |
|
|
double |
windSpeed, |
|
|
double |
relativeHumidity, |
|
|
long |
airQualityIndex |
|
) |
| |
|
inline |
Inputs a weather data to a database table.
This function creates JSONObject with key "WEATHERSTATIONDATAADD" key having a value of another JSONObject containing weather data which is obtained from the parameters of this function.
First parameter, weatherStationId must be a valid ID number of previously present weather station on the system. Otherwise, adding weatherStationData would fail and this function will return false.
- Parameters
-
| weatherStationId | ID number of weather station this data belongs |
| temperature | Temperature |
| barometricPressure | Barometric pressure |
| windSpeed | Wind speed |
| relativeHumidity | Relative humidity, in percentage |
| airQualityIndex | Air quality index |
- Returns
- Boolean value, true if data is successfully entered in a database.
◆ authUser()
| boolean iotclient.Message.authUser |
( |
String |
username, |
|
|
String |
password |
|
) |
| |
|
inline |
Authenticates the user based on username and password combination.
This method creates JSONObject with key "AUTHUSER" having a value of another JSONObject which contains username and password. Root object is then send to a server via sendWithBooleanReturn() function, which is going to return true if username and password combination is present in a database table.
- Parameters
-
| username | Username in string format |
| password | Password in string format |
- Returns
- Boolean value, true only if user is successfully authenticated.
◆ getAllFields()
| JSONArray iotclient.Message.getAllFields |
( |
| ) |
|
|
inline |
Gets all fields from a database table.
This function creates JSONObject with key "RETURNALLFIELDS" having a value of true. Object is then sent to a server via sendWithJsonArrayReturn() function which is going to return JSONArray of JSONObjects, one JSONObject for each field in the database.
- Returns
- JSONArray containing information for all fields in the database table.
The documentation for this class was generated from the following file:
- /home/ivica/Coding/Java/CS_IOT/iotclient/src/iotclient/Message.java


The reaction function, i.e. the working business logic being served by substation at a given url-matching expression and request method.
substation
Selecting groups in the url, filled by the request url provided by the user.


Home
Cruise
Resort
California Adventure
Testimonials
Prices
Select One Choice from List-Memory Upgrade
8 GB add $49
12 GB add $98
16 GB add $159
Select One Choice from List-HDD Upgrade
1 TB HD add $109
1.5 TB HD add $150
2 TB HD add $199
250 GB SSD add $299
Select One Choice from List- Network Upgrade
56K V90 or X2 Modem add $109
10/100 NIC add $79
Combo Modem and NIC add $279
Calculate
The new calculated price:


It’s the standard markup language for documents designed to be displayed in a web environment. Html uses things like elements to add digital images to web pages or text. Html can also be used with other programing languages such as Javascript to make quizzes and take user input or linked with frameworks like bootstrap to visually organize and stylize your html web pages.


FAQ¶
What’s the status of this project?¶
As of mid-2021 Geoxarray is being actively developed, but slowly. Geoxarray is still in its early stages and will heavily depend on other projects like xarray, rasterio, pyresample, and pyproj. Some of the intended features for Geoxarray are still wishful thinking and will depend on changes in other scientific Python libraries and decisions by the larger community that Geoxarray will get the most of Geoxarray.
Want to help move development along? See the Contributing page for information on how to contribute including submitting feedback and viewing existing bug reports and feature requests.
How is this documentation structured?¶
The Geoxarray project is trying hard to stick to the documentation structure described in this presentation by Daniele Procida. This is partly as an experiment to see how a new project can fit into this “rigid” structure. It is also an experiment as there aren’t many projects in the geospatial scientific python ecosystem that makes these hard boundaries between sections of their documentation. Is it working?
Tutorials (Learning Oriented): Teach the user what they might want to do and walk them through it. Longer form instructions on how to go from nothing to something useful. Tutorials avoid a lot of detail to stay focused on finished a task. This means they also won’t list all the available options/choices either. A tutorial will decide what the user does and accomplishes.
How-To (Problem Oriented): Recipes to solve a specific problem. Less hand-holding and more straight to the point. In general these will be shorter than tutorials as they assume the user already knows a little bit about what they’re doing. Explanation of how Geoxarray works is limited in how-tos and will generally go in “Topics”. Similar to Tutorials, we limit explanation so that we can act and accomplish things as quickly as possible. A user finds a how-to because they know they have a specific problem they want to solve.
Reference (Information Oriented): Low-level details about the interfaces (ex. API docs).
Topics/Discussion (Understanding Oriented): Human-friendly explanation of what exists in Geoxarray and why things are the way they are in Geoxarray. These will generally not include actual code except for simple examples or to make a point. These should leverage the other sections of documentation to provide more low-level and hands-on information.
The FAQ document is left for anything that doesn’t quite fit into any of the above sections.


logs package¶
Submodules¶
logs.logDecorator module¶
-
class
logs.logDecorator.
log
(base)[source]¶ Bases:
object
decorator for logging values
This decorator can be used for injecting a logging function into a particular function. This takes a function and injects a logger as the first argument of the decorator. For the generated logger, it is also going to insert the time at which the paticular function was called, and then again when the function was finished. These serve as convinient functions for inserting values into the decorator.
initialize the decorator
- Parameters
base ({str}) – The string used for prepending the value of the decorator with the right path for this function.
-
class
logs.logDecorator.
logInit
(base, level, specs)[source]¶ Bases:
object
initialize the decorator for logging
This generates a decorator using a fresh file with the right date and time within the function name. This way it will be east to find the last log file generated using a simple script in the case that a person wants to generate instantaneous statistics for the last run.
Initialize the logger object for the program
This logger object generates a new logger object. This is able to handle significantly improved logging capabilities in comparison to earlier versions of the cutter. For details of the available functionality, check the logging documentation.
- Parameters
base ({str}) – name that starts the logging functionality
level ({str}) – One of the different types if logs available -
CRITICAL
,ERROR
,WARNING
,INFO
andDEBUG
. These wil be mapped to one of the correct warning levels with the logging facility. In case there is an input that is not one shown here, it will be automatically be mapped toINFO
.specs ({dict}) – Dictionary specifying the different types if formatters to be generated while working with logs.
Module contents¶
Module containing helper classes for logging
This module contains two classes. The first one will be used for
generating a new logger object, and another one for uisng that logging
object for new tasks. Each class is modeled as a decorator, that will
inject a logging.getLogger
instance as a first parameter of the
function. This function furthermore logs the starting and ending times
of the logs, as well as the time taken for the function, using the
time.time
module.
Configuration Information¶
Configuring the logger is done with the help of the configuration file
config/config.json
. Specifically, the logging
key identifies all
configuration associated with logging information within this file. An
example if the logging
section is shown below. Details of the different
sections will be described in the documentation that follows.
"logging":{
"logBase" : "holmuskTest",
"level" : "INFO",
"specs" : {
"file":{
"todo" : true,
"logFolder": "logs"
},
"stdout":{
"todo" : false
},
"logstash":{
"todo" : false,
"version" : 1,
"port" : 5959,
"host" : "localhost"
}
}
}
The "level"
Segment¶
The logging module comes preconfigured to log at the "INFO"
level.
However this can be set to one of the following levels, and is mapped
to their respective logging levels.
'CRITICAL'
mapped tologging.CRITICAL
'ERROR'
mapped tologging.ERROR
'WARNING'
mapped tologging.WARNING
'INFO'
mapped tologging.INFO
'DEBUG'
mapped tologging.DEBUG
The "specs"
Segment¶
This module comes preconfigured for a number of logging sinks. The logs can go
either to a logging file, to the stdout, or to logstash. Each section has a
parameter "todo"
that will determine whether a particular sink shall be
added to the logging handler. The other parameters for each section is described
below.
The "specs.file"
Segment¶
This segment is used for sending the logger output directly to a file. A base folder
should be soecified within which the logging file should be generated. Each time the
program is run, a new file is generated in the form YYYY-MM-DD_hh-mm-ss.log
. The
default formatting string used is:
"%(asctime)s - %(name)s - %(levelname)s - %(message)s"
.
The "specs.stdout"
Segment¶
The output can potentially also be sent to the standard output if this section is turned
on using the doto
key.  The default formatting
string used is:
"%(asctime)s - %(name)s - %(levelname)s - %(message)s"
.
The "specs.logstash"
Segment¶
It is also possible to use logstash as a sink. This is entirely JSON based. This uses TCP rather than the standard UDP. For configuring the logstash server, make sure to add the input:
tcp {
'port' => '5959'
'codec' => 'json'
}
The input port should match the port specified in the config/config.json
the config file.
If your logstash is running on a different machine, make sure that you specify the host IP
along with the port. An example output is shown:
{
"@timestamp" => 2018-08-12T03:49:25.212Z,
"level" => "ERROR",
"type" => "logstash",
"port" => 55195,
"@version" => "1",
"host" => "Sankha-desktop.local",
"path" => "/Users/user/Documents/programming/python/test/mytests/mnop/src/lib/testLib/simpleLib.py",
"message" => "Unable to add the two values [3] and [a]:\nunsupported operand type(s) for +: 'int' and 'str'",
"tags" => [],
"logger_name" => "mnop.lib.simpleLib.simpleTestFunction",
"stack_info" => nil
}
This can then be sent to elasticsearch. If you need specific things filtered, you can directly use the filtering capabilities of logstash to generate this information.


| Package | com.allurent.flexunit2.vfu.errors |
| Class | public class BlessableError |
| Inheritance | BlessableError flexunit.framework.AssertionFailedError |
| Subclasses | BitmapNotMatchBaselineError, MissingBaselineError |
| Property | Defined by | ||
|---|---|---|---|
| actualBitmap : Bitmap
BitmapData that shows the tested component's appearance, as
determined by running visual test.
| BlessableError | ||
| actualBMD : BitmapData
BitmapData that shows the tested component's appearance, as
determined by running visual test.
| BlessableError | ||
| itemForAllTestsList : Object
This prop is used in VfuTestRunnerBase.mxml - a kludge to facilitate
tacking VFU onto FlexUnit.
| BlessableError | ||
| itemForFailureList : Object
This prop is used in VfuTestRunnerBase.mxml - a kludge to facilitate
tacking VFU onto FlexUnit.
| BlessableError | ||
| testID : String
This is the same testID that is passed into
VfuTestCase.testSequence.addAssertComponentMatchBaseline()
in your test methods.
| BlessableError | ||
| url : String
URL where Visual FlexUnit hopes to find baseline image file.
| BlessableError |
| Method | Defined by | ||
|---|---|---|---|
|
BlessableError(message:String = "")
| BlessableError |
| actualBitmap | property |
public var actualBitmap:Bitmap
BitmapData that shows the tested component's appearance, as determined by running visual test.
This property can be used as the source for data binding.
| actualBMD | property |
public var actualBMD:BitmapData
BitmapData that shows the tested component's appearance, as determined by running visual test.
This property can be used as the source for data binding.
| itemForAllTestsList | property |
public var itemForAllTestsList:Object
This prop is used in VfuTestRunnerBase.mxml - a kludge to facilitate tacking VFU onto FlexUnit. Details on its use are in that file.
| itemForFailureList | property |
public var itemForFailureList:Object
This prop is used in VfuTestRunnerBase.mxml - a kludge to facilitate tacking VFU onto FlexUnit. Details on its use are in that file.
| testID | property |
public var testID:String
This is the same testID that is passed into VfuTestCase.testSequence.addAssertComponentMatchBaseline() in your test methods.
This property can be used as the source for data binding.
| url | property |
public var url:String
URL where Visual FlexUnit hopes to find baseline image file. If not found this class's subclass, MissingBaselineError, carries the URL so that actualBitmap can be blessed and saved to this loc.
This property can be used as the source for data binding.
| BlessableError | () | constructor |
public function BlessableError(message:String = "")
Parameters
message:String (default = " ")
|


This tutorial shows how to set up a Sakuli test using the CLI and how to use a combination of the native and DOM-based features of Sakuli.
Sakuli will bootstrap a test suite with the following command. A detailed explanation on what files are needed, can be found in anatomy chapter.
npx @sakuli/cli create project . --package
npm i
This step is optional but we recommend using typescript. For example, in case of a missing await
typescript will throw
an error during compilation. But this tutorial will also work if you decide to not use typescript.
npx sakuli enable-typescript .
For Typescript to find the respective test-files, you need to change the file extension from .js
for JavaScript to .ts
for TypeScript or create a new file. After doing so, it is necessary to update testsuite.suite
for Sakuli to find the
testfile.
For this tutorial we will create a test that opens the 10 Step Guide to E2E Monitoring
whitepaper only using native interaction
and download the document. As we only want to use native interaction we can set testsuite.uiOnly=true
in the testsuite.properties
.
First we are going to open a chromium browser, navigate to the whitepaper section and download the whitepaper.
(async () => {
const tc = new TestCase();
const env = new Environment();
const chromium = new Application('chromium-browser --incognito');
const screen = new Region();
await tc.addImagePaths('./assets');
try {
await env.setSimilarity(0.99);
await chromium.setSleepTime(3);
await chromium.open();
await env.type('sakuli.io/wp')
.type(Key.ENTER)
.getRegionFromFocusedWindow()
.waitForImage('open_whitepaper.png', 3)
.mouseMove()
.click();
tc.endOfStep('open whitepaper');
} catch (e) {
await tc.handleException(e);
} finally {
tc.saveResult();
}
})();
The following section will describes the details of the test. As a first step we want to open the chromium browser and
use incognito mode. This can be achieved by opening the application with the respective parameter:
const chromium = new Application('chromium-browser --incognito');
As we are using multiple screenshot for this testcase, we will add them to a new folder and therefore eliminate cluttering of the
testcase folder. Hence you need to use tc.addImagePaths("./assets")
to tell Sakuli to look into this folder. The base
directory during the Sakuli test is the corresponding testcase folder.
Next we are setting the similarity level for image recognition. The higher the value you choose, the higher the matching score must be. You can also change this within your test to react to different matching-score needs.
As the operating system needs some time to start the application (in this case the browser), we will set a sleeptime.
After the chromium browser is opened the focus will be on the url-tab by default - we can just start typing the url we want to navigate to and hit Enter. The next step is to get the region of the desktop and search for the icon of the whitepaper:
After clicking the icon, the whitepaper PDF will be opened in a new tab. To verify whether the whitepaper was opened correctly, we try to find the following screenshot on the screen:
To do so, we add the following lines to our test:
await env.setSimilarity(0.98);
await screen.waitForImage('whitepaper.png', 3);
tc.endOfStep('validate open whitepaper');
As a last step we want to print this whitepaper as a pdf (saving it to the file-system). We can do this with the following code:
await env.type(Key.P, Key.CTRL)
.getRegionFromFocusedWindow()
.waitForImage("print_dialog.png",2)
.mouseMove()
.click()
.sleep(1)
.type("sakuli-tutorial")
.type(Key.ENTER);
tc.endOfStep("download whitepaper");
With CTRL+P
we open the print dialog which could look like this.
Now we need to move the mouse to the save button and click using this screenshot:
Afterwards another pop up dialog appears, which allows us to change the name of the pdf-file.
For this instance we want to name it sakuli-tutorial
.
In the end we need to press enter to save the file.
The complete Sakuli test should look like this:
(async () => {
const tc = new TestCase();
const env = new Environment();
const chromium = new Application('chromium-browser --incognito');
const screen = new Region();
await tc.addImagePaths('./assets');
try {
await env.setSimilarity(0.99);
await chromium.setSleepTime(3);
await chromium.open();
await env.type('sakuli.io/wp')
.type(Key.ENTER)
.getRegionFromFocusedWindow()
.waitForImage('open_whitepaper.png', 3)
.mouseMove()
.click();
tc.endOfStep('open whitepaper');
await env.setSimilarity(0.98);
await screen.waitForImage('whitepaper.png', 3);
tc.endOfStep('validate open whitepaper');
await env.type(Key.P, Key.CTRL)
.getRegionFromFocusedWindow()
.waitForImage("print_dialog_save.png",2)
.mouseMove()
.click()
.sleep(1)
.type("sakuli-tutorial")
.type(Key.ENTER);
tc.endOfStep("download whitepaper");
await chromium.close();
} catch (e) {
await tc.handleException(e);
} finally {
tc.saveResult();
}
})();
When the testsuite.uiOnly
is set to false
, you can use both DOM based- and native interaction simultaneously. For our example above we can exchange the steps for opening chromium and navigating to sakuli.io/wp just with _navigateTo("https://sakuli.io/wp")
.
(async () => {
const tc = new TestCase();
const env = new Environment();
const screen = new Region();
await tc.addImagePaths('./assets');
try {
await env.setSimilarity(0.99);
await _navigateTo("https://sakuli.io/wp");
await _click(_image(0, _in(_div("flexedContainer"))));
tc.endOfStep('open whitepaper');
await screen.waitForImage('whitepaper.png', 3);
tc.endOfStep('validate open whitepaper');
await env.type(Key.P, Key.CTRL)
.getRegionFromFocusedWindow()
.waitForImage("print_dialog.png",2)
.mouseMove()
.click()
.sleep(1)
.type("sakuli-tutorial")
.type(Key.ENTER);
tc.endOfStep("download whitepaper");
} catch (e) {
await tc.handleException(e);
} finally {
tc.saveResult();
}
})();


{% extends "_base.html" %} {% block title %}My Account{% endblock %} {% block content %}
Below you find an overview of the upcoming discussion sessions during the unconference. Please click the REGISTER button to register for individual sessions.
{% if topics %}| Topic | Time and date (CEST) | Register |
|---|---|---|
| {{ each }} {% if each in my_topic_registrations %} {% endif %} | {{ each.start_date|date:"l d M Y · H:i" }}-{{ each.end_date|date:"H-i" }} |
Complete your profile so that people know more about your research interests and background.
{% if request.user.people.image %} Edit profile {% else %} Complete now {% endif %}As an author we ask you to upload a presentation of your work by May 15
{% if my_presentations %}Manage{% else %}Upload now{% endif %}
{% if False %} {% endif %}{% if my_discussions %} Use this section to update your discussion session. {% else %} Please upload a final title and overview of your session by May 10 {% endif %}
{% if False %} {% endif %}{% if my_outputs %} Manage your path to action {% else %} Use this section to update your path to action document. {% endif %}
{% if my_outputs %} {% for each in my_outputs %} {% endfor %} {% endif %}Did you complete your payment yet? If not, please find the payment instructions here.
{% endif %} {% endblock %}


A SHORT FILM ABOUT LOVE A film review by James Berardinelli Copyright 1995 James Berardinelli
RATING (0 TO 10): 9.5
Poland, 1988 Running Length: 1:26 MPAA Classification: Not Rated (Mature themes, sex)
Cast: Grazyna Szapolowska, Olaf Lubaszenko, Stefina Iwinska Director: Krzysztof Kieslowski Producer: Ryszard Chutkowski Screenplay: Krzysztof Kieslowski and Krzysztof Piesiewicz Cinematography: Witold Adamek Music: Zbigniew Preisner In Polish with subtitles
Commandment Six: "Thou shalt not commit adultery."
A SHORT FILM ABOUT LOVE, the second of Krzysztof Kieslowski's DECALOGUE episodes to be transformed into a feature film (the other being A SHORT FILM ABOUT KILLING), takes a unique look at the emotional latticework that interconnects love, lust, and sexual obsession. Hypnotically engrossing, this picture delves deep into the psyches of its two main characters, employing irony, humor, and drama to weave a masterful tale of human interaction that will leave an indelible imprint on all who view it.
A question that people have pondered for ages is whether there exists a pure form of romantic love -- an attraction so deep and innocent that sex becomes an unwanted distraction. For eighty-six minutes in A SHORT FILM ABOUT LOVE, Kieslowski explores this issue. Nothing is resolved, except perhaps an understanding of the great pain and fragility that can result from the simple act of opening one's heart.
The story begins with nineteen-year old Tomek (Olaf Lubaszenko) training a telescope on the windows of an apartment opposite his. Inside, a beautiful, older woman, Magda (Grazyna Szapolowska), is undressing. Initially, we assume that Tomek is watching for the titillation value, but, as we observe him night after night, it becomes clear that he's more interested in Magda when she's fully clothed and engaged in some mundane activity than when her actions turn sexual. In fact, when she goes to bed with a man, Tomek trains the telescope away.
As his obsession deepens, Tomek is no longer content with merely watching. He begins to make phone calls and pilfer letters, then eventually works up the courage to meet Magda face-to-face. In a guilty, rushed confession, he tells all. At first, Magda is furious and seeks her own form of revenge, but eventually she finds herself drawn to the young man. One night, after the two go out on a relatively harmless date, she invites him into her apartment and proceeds to shatter his illusions.  Once home, he slits his wrists.
Tomek survives the suicide attempt, but while he's in the hospital, Magda is riddled with guilt. She begins to obsess over him, trying to find out everything she can about his life and friends. She uses a pair of binoculars to watch his apartment, waiting for his return. She turns away her lover, unwilling (or unable) to engage in sex while Tomek is away.
Certainly, the central irony in the film is how the tables are turned. The object of voyeurism becomes the voyeur. The loved one becomes the lover. In the end, it's not clear whether or not Magda has fallen for Tomek, but we recognize that she is experiencing deep pangs of guilt for what she did, and that she craves his return to innocence. She would like nothing more than for him to return to spying on her. Recognizing too late her power to wound, Magda seeks redemption. Obliquely, the closing scene of A SHORT FILM ABOUT LOVE indicates she might find it. In this, the resolution is vastly different than that of DECALOGUE 6, which concluded with an emotionless Tomek admitting to Magda that he will never spy on her again. Coupled with several added scenes that build character and fill plot holes, this different ending gives a new and more satisfying outlook to the story than the one presented in DECALOGUE.
During the scene when Tomek is in Magda's apartment, a fascinating change in point-of-view occurs. Up to then, everything had been from Tomek's perspective. All of our glimpses of Magda's rooms had been through his telescope. Then, it all changes. When Tomek runs from the apartment, we remain inside with Magda, watching him through a window. >From that moment on, the story is told from Magda's viewpoint. This unique way of framing things allows for greater development and understanding of both characters.
As in WHITE, Kieslowski uses comedy to set up several scenes. There are a lot of very funny moments in A SHORT FILM ABOUT LOVE. However, even beyond the comic undercurrent, there are many comparisons between this movie and the middle entry in the THREE COLORS trilogy. Both deal with diseased relationships, sexual obsession, and the need for equality. And, in voyeurism, A SHORT FILM ABOUT LOVE shares a thread with RED.
Love is probably the most commonly presented theme in all motion pictures. Most of the time, it is used as a plot device, so rarely is there a thoughtful examination of the dynamics of the emotion. A SHORT FILM ABOUT LOVE is the exception, and what a magnificent exception it is. With actors that give finely-tuned performances and a script that is richly detailed, the movie is nothing short of a masterpiece. There is more real feeling in this brief feature than in a hundred full-length Hollywood romantic comedies.
- James Berardinelli<EMAIL_ADDRESS>The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


---
layout: default
title: Pricing Table
---
Starter
FREE
- 1 user
- Unlimited projects
- 2GB storage
Order Now
Advanced
$49/mo
- 10 users
- Unlimited projects
- 20GB storage
Order Now
Mega
$199/mo
- Unlimited users
- Unlimited projects
- 100GB storage
Order Now
Starter
FREE
- 1 user
- Unlimited projects
- 2GB storage
Order Now
Advanced
$49/mo
- 10 users
- Unlimited projects
- 20GB storage
Order Now


6 Best Pre-Black Friday 2019 Smart TV Deals At Best Buy
by Forbes FindsBlack Friday may still be a few weeks away, but many major retailers have announced some incredible deals. In fact, at Best Buy right now you can already take advantage of some incredible TV deals — and if you find something you like, then it may better to simply buy now and relax on Black Friday.A smart TV connects you to much more than just your channels. Using these aptly named devices, you can share content between your smartphone and TV, control various internet-enabled devices around your home, ask Alexa to tune into your most-loved channels and even program it to find your favorite sports teams so you’ll never miss a game. All-in-all, it means a more seamless entertainment experience that you’ll be excited to come home to after a long day at the office.
The Samsung smart TVs on this list are currently available from Best Buy at a heavy discount. With big-ticket items, these cost savings can add up to a whopping $800.
In order to save you time (and of course, money), we’ve narrowed down this list to five exceptional TVs that have earned high ratings from Best Buy customers. Each TV is built with a stunning 4K display, bringing you cinema-quality picture in the comfort of your own living room. In sizes ranging from 55-inch to 75-inch, you’re bound to find a smart TV that will bring new life (and intelligent life at that) to your space.
Samsung 55-inch Class Frame Series LED Smart TV
Original Price: $1,500
Sale Price: $1,400
It’s a Van Gogh! It’s a Matisse! It’s a… Samsung? As a member of the Samsung Frame Series, this TV turns into a stunning piece of art when not in use. The device will automatically cycle through its digital artwork via its art mode feature, which adapts the image on the screen to display optimally based on room light conditions. While a little gimmicky in its description, in person, it’s hard not to notice this Samsung, even when it’s not in use — and that’s part of the point. With multiple supported HDR formats, Dolby Digital Plus sound and excellent motion clarity, this TV is a showstopper (both when it’s on and idling in the background).
Shop Now: $1,400
Samsung 55-inch Q60R Series Smart TV
Original Price: $900
Sale Price: $700
The Samsung Q60R series is a great way to get access to Samsung’s QLED technology without having to shell out the big bucks on much more expensive offerings. This TV comes with a 4K resolution, support for HDR and offers Samsung’s Quantum Processor 4K.
For the uninitiated, Samsung’s QLED tech is built to deliver bright, vivid colors and a natural image. While entry-level models in Samsung’s QLED range, like this one, can’t handle black levels as well as the company’s more expensive QLED offerings, their blacks are still deep and relatively natural — which seriously helps deliver quality content. Last but not least, the 55-inch size of the TV is perfect for immersive watching in small-to-medium living rooms. All that to say, if you’re looking for an ultra-high-end TV at a relatively affordable price, this is the one to get.
Shop Now: $700
Samsung 65-inch Q60R Series Smart TV
Original Price: $1,200
Sale Price: $1000
Looking to step things up a little when it comes to TV size? The Q60R is also available in a 65-inch model, which is perfect for larger living rooms and ultra-immersive content. The TV still leverages Samsung’s awesome QLED tech, and like the smaller TV, it still offers the ultra-smart Tizen operating system that allows you to connect the TV to your smart home, watch all your favorite content, and so on.
At $999.99, the 65-inch Samsung Q60R TV is an absolute steal — and well worth considering if you'd like a large TV for a bit less.
Shop Now: $1000
Samsung 65-inch Q70 Series Smart TV
Original Price: $1,400
Sale Price: $1,200
The Samsung Q60R series is great, but if you want to take things to the next level, it’s worth considering the Samsung Q70 Series. The Q70 takes the awesome QLED tech and adds a new technology called local dimming, which makes for much deeper black levels and a higher level of contrast. The end result is that the image will look a lot more natural, especially during night scenes and other dark images. More dimming zones is better, and this TV offers 48.
The TV still offers the awesome smart tech on offer by the other TVs on this list, and at $1,200, it is a great option for a high-end TV.
Shop Now: $1200
Samsung 75-inch Q70 Series Smart TV
Original Price: $2,700
Sale Price: $2000
65 inches is pretty big, but if you really want to impress, perhaps it’s worth considering a 75-inch TV instead. This 75-inch TV offers all the same awesome features as the 65-inch model but adds a little extra screen — which is perfect for large living rooms and immersive experiences.
The discounts are bigger here too — while the 75-inch Samsung Q70 is normally available for $2,700, the TV has been discounted by a whopping $700 to $2000.
Shop Now: $2000
Samsung 75-inch Q90 Series Smart TV
Original Price: $4,300
Sale Price: $3,500
The Samsung Q90 series is among the best of the best, so if you want an incredible TV and don’t mind shelling out the cash for it, then the 75-inch Samsung Q90 TV is the way to go. Remember when we talked about the fact that more dimming zones make for better image quality? This TV offers full array local dimming with hundreds of dimming zones, and as a result, you’ll get excellent, deep black levels that look natural all the time. The TV is super smart, offers AirPlay 2 connectivity and boasts a super classy design too.
Normally a hefty $4,300, at only $3,500 the TV may still be expensive, but it’s actually a pretty great deal for the incredible image quality that you’ll get from it.
Shop Now: $3,500


How to pick a design specialty
A new designer's guide to understanding the differences between job titles in the design industry
I’ve seen this question appear in places like Tavern, Quora, and I’ve also been asked by designers new to the field how all the various job titles interact with one another. Where do they overlap, what skills are different, what’s the difference between an interaction and UX designer, and so on. I want to weigh in on this confusing question to attempt to bring some clarity to the matter.
Design is the layer between customer and business
When I speak of Design with a capital D, I’m referring to the process of design in the broadest sense. All designers are working on the same thing: to make the experience of a product, service, or marketing message the best that it can possibly be. The experience is the layer — the glue, if you will — between the customer and the apparatus created by engineers and business people. The boundaries of this experience encompass everything from marketing communication to the experience of using an API and searching through documentation.
The way designers describe what they do is impossible to understand outside the context of the product they’re producing and the audience they’re producing it for. A product designer who designs medical devices for the elderly will have an entirely different skillset than a product designer for a consumer ride-sharing startup.
Specialists versus Generalists
One of the easiest ways to make some sense of the field of job titles is to draw a line between the specialized disciplines and the generalist disciplines, and then understand what these disciplines mean in the context of the customer you’re serving and the company environment you’re working in.
- Specialized Designers — Those who focus on a particular point in time or a specific aspect of the design (such as a visual designer, who might only work on UI polish, or an interaction designer who will zoom in on the nitty gritty of how users interact with controls). They may work across a product lifecycle, but will generally be focused on a single aspect of it. Specialists thrive on larger teams who can oversee the disciplines the specialist doesn’t cover.
- Generalist Designers — Those who generalize and see a product through a wider chunk of its lifecycle (such as a product designer or entrepreneur who will design a product from initial idea all the way through implementation). They tend to be more wholistic in their thinking, often pulling in techniques and findings from unrelated fields to enhance their design, yet not diving as deep as the specialist. They tend to thrive in younger companies where specialization is a liability rather than an asset.
All designers are user experience designers
All Designers are user experience designers, if you care to be pedantic with me for a moment. Since all designers work along the customer-facing spectrum, all designers have the capacity to affect the experience positively or negatively.
Within that umbrella, however, the specialists and generalists break down more specifically like this:
- Design & User Experience
- Specialized Designers
- Interaction designers
- Visual designers
- UI designers
- and so on…
- Generalist Designers
- Digital product designers
- Physical product designers
- Certain interaction designers
- and so on…
- Specialized Designers
How to pick the right design specialty for you
When most people ask about job titles, they want to know not only what the work looks like, but also what kind of jobs might be available if they pursue the path.
Though this is just one person’s advice, this is the best method I’ve found for reasoning through this problem.
If you answer the following two questions honestly and accurately, you’ll be pretty close to narrowing down an ideal specialty:
Who do you want to serve?
When I say “serve” in this context, I mean your end-user. Though design is about flexibly and creatively solving problems in unfamiliar problem spaces, having a connection to your end-user goes a long way toward helping you overcome the more uncomfortable aspects of design. For example, humbly accepting your user knows more about their problem than you do, or seeking the opinion of colleagues even if it means showing unpolished work. These are all things that become much easier when you genuinely care about the effect your solution has on your audience.
Furthermore, this helps you understand the size of the job market you’ll be entering, and what an average day might look like. For instance, if you’re really interested in building products to help small business owners run their businesses more effectively, then you might look at jobs in mobile app design and follow a few companies that successfully deliver products to this customer base.
In broad strokes, here are a few customer categories to consider in the software space (this is not a comprehensive list):
- B2B customers — Business customers have very specific needs with very specific budgets, and are eager to pay for the solution that fits their needs the best. Business customers tend to be more accessible, fewer in number, and extremely loyal — as long as you can deliver on a demanding feature list better than your competitors. Common companies for designers in this space are usually online, software-as-a-service based.
- Consumer market — Consumer facing software has a different set of requirements, and carries with it the allure of designing for a massive audience. Designing for the broader consumer market means your design decisions may intimately affect the lives of many. Simultaneously, the consumer market tends to be more fickle than business customers, adopting fad products that are here today, gone tomorrow. As a new designer, it can be difficult to stand out in the overcrowded consumer space.
- Specific customer vertical — Another way to think about who you design for is to pick a specific demographic or vertical you care a lot about. If you’re interested in wine, then you might build a great career at an agency that does business with a lot of wineries. If you’re more of a social enterprise type, the non-profit world is in serious need of talented designers. Specializing in a vertical (but not necessarily a skillset) allows you to make a name for yourself more easily, which can be a platform for uncovering more interesting design opportunities in the future.
What kind of company do you want to work for?
Different stages of a company’s lifecycle carries with it different perks, responsibilities, and downsides. The following generalizations are almost too broad to be useful, so take this with a grain of salt.
- Early Stage / Small Product Companies (Startups and companies usually with fewer than ~50 people) — Designers in these types of companies tend to need a more generalist skillset, a bouyant spirit, and a willingness to tackle new challenges for which they might be ill-equipped to handle.
- Good for:
- Product & Interaction Designers — These specialties thrive at small startups whose main, and sometimes only offering, is a single product or experience. These designers relish the opportunity to practice their skills across the entire spectrum and are frequently delivering prototypes that look, behave, and sometimes are coded exactly like the final product.
- Visual Designers — Many visual designers in smaller companies get a wide variety of work, from marketing and communications design to UI and web design. The upside is that you might get the opportunity to design a pet favorite project like an icon set. The downside is that if you want to only work on projects you like, chances are you’ll be too busy with a million things to focus on just that.
- UX Designers — UX design as a broad category is a role frequently seen at small companies. Similar to product designers, the UX designer’s responsibilities may extend even beyond those of the product designers to also consider the documentation and support process, and may also take on more of the research and customer feedback responsibilities. In a lot of cases, the UX designer may take on product management responsibilities (or the other way around) until the company grows to a size where separate roles for product management and UX are required.
- Good for:
- Mid Stage / Larger Product Companies — People will draw the lower line of what defines a “mid-size” company as anywhere from 50 people to 500 people depending on their experience. However, the general rule of thumb is that once a company graduates from its startup phase to its grownup phase, designers are encouraged to specialize their skillset. This effect becomes more and more pronounced as company size and maturity increases.
- Good for:
- User Researchers — If you are more interested in the research aspect of the design process, you will likely be happier in a larger company that has the budget and wherewithal to conduct proper user research and actually execute on the discoveries uncovered. Smaller companies typically don’t have the time, bandwidth, or budget to yield satisfying results in my experience.
- Visual Designers — Visual designers in these types of companies have more of a chance to specialize, and frequently have more structure and mentorship in their design process. The upside is there are layers of managers to both shield you from the whims of management and help you learn; the downside is there are layers of managers.
- UI Designers — Though UI designers thrive at startups, doing UI design at a larger or later stage company affords you the luxury of diving more deeply. For instance, you might be able to analyze all the ways you can code a link underline for maximum aesthetic viability, whereas that same behavior would get you thrown overboard at a startup.
- UX Designers — UX designers at larger companies might use similar tools as UX designers at small companies, but they can go into significantly greater depth when at a company that invests in user experience and design. There is typically more time, rigor, and formal testing that goes into an enterprise-level UX process.
- Good for:
- Agencies, Studios, and Consultancies — Agencies are a bit of a different animal. Agency designers have to be skilled at communicating about design more so than their counterparts, as project stakeholders rotate on an ongoing basis. On the one hand, agency life results in a wider variety of projects. On the other, many describe it feeling very impersonal, and that they have no connection to the end result other than the paycheck. Most of the job titles mentioned above can be found in the agency world, and the company size rules apply as well. Larger agencies are more likely to work with larger companies, and designers in that world will likely be more encouraged to specialize. Boutique agencies are more likely to work with smaller companies (though not always), but these designers will always be called on to be multi-disciplinary.
Conclusion
To sum up, while the job titles in the design world are diverse, they’re largely made up by designers attempting to communicate the process of design to a world that doesn’t think the same way.
It’s confusing and will require some research to wrap your head around. However, follow these principles as a jumping off point for your research and you’ll have a much easier time of it.
- Decide if you want to specialize or generalize your skillset
- Decide who you care about working for, and
- Decide what kind of company you want to work in
Finally, make sure to take advantage of design communities to ask for advice and critique as much as possible. This will minimize the time you spend bumbling around.


{{ partial "header.html" . }} 404 Page not found! This is not the page you are looking for. Perhaps you'd like to start from the beginning? {{ partial "footer.html" . }}
This is not the page you are looking for.
Perhaps you'd like to start from the beginning?


Contents
- Process 'Energy' Input Parameter
- Process 'Material' Input Parameter
- Process 'Options' Input Parameter
- Process 'Thickness' Input Parameter
- Initialize output variables
- Main Loop: preform calculation for each material
- Parse material
- Look up the data, average contributions of different elements and save
- Lookup density and atomic molar mass if needed
- Calculate Transmission if needed
- if Energy has a spectrum than integrate
- Cast output in a chosen format
function X = PhotonAttenuation(Material, Energy, Options, Thickness)
% PhotonAttenuation provides photon attenuation in different materials. % % X = PhotonAttenuation(Material, Energy, Options, Thickness) % Function providing the attenuation and energy absorption of x-ray and % gamma-ray photons in various materials including mixtures and compounds, % based on NIST report 5632, by J. Hubbell and S.M. Seltzer. % % Input : % 1) Material - string, number or array of strings, numbers or cells % describing material type. % - Element atomic number Z - in 1 to 100 range % - Element symbols - 'Pb', 'Fe' % - Element names - 'Lead', 'Iron', 'Cesium' or 'Caesium' % - Some common names and full compound names - 'Water', 'Polyethylene' % (see function PhysProps for more details) % - Compound formulas - 'H2SO4', 'C3H7NO2'- those are case sensitive % - Mixtures of any of above with fractions by weight - like % 'H(0.057444)C(0.774589)O(0.167968)' for Bakelite or % 'B(10)H(11)C(58)O(21)' for Borated Polyethylene (BPE-10) % 2) Energy - Energy of the photons. Can be single energy or vector of % energies. Several formats are allowed: % - Energy in MeV, should be in [0.001, 20] MeV range. % - Wavelengths in nano-meters. Encoded as negative numbers. The valid % range is 6.1982e-5 to 1.2396 nm; % - Continuous Spectrum - Encoded in 2 columns: column one contains % energy in MeV and column two contains relative number of photons at that % energy. Spectrum is assumed to be continuous and output is % calculated through integration using 'trapz' function. % 3) Options - specifies what to return. String or number: % 1 - 'mac' - function returns Mass Attenuation Coefficients in cm^2/g % 2 - 'meac' - function returns Mass Energy-Absorption Coefficients % in cm^2/g. See link below for more info: % http://physics.nist.gov/PhysRefData/XrayMassCoef/chap3.html % 3 - 'cross section' or 'x' - function returns cross section in barns per % atom (convert to cm^2 per atom by multiplying by 10^-24). % Available only for elements. % 4 - 'mean free path' or 'mfp' - function returns mean free path (in cm) of % photon in the given material . Available only for chemicals % recognized by 'PhysProps' function (since density is needed). % 5 - 'transmission' or 't' - fraction of protons absorbed by given thickness % of material % 6 - 'ln_T' - log of transmission % 7 - 'lac' - Linear Attenuation Coefficients in 1/cm same as 1/(Cross % Section) or mac*density. % 8 - 'half value layer' or 'hvl' - function returns half-value layer (in cm) of % photon in the given material . Available only for chemicals % recognized by 'CompoundProps' function (since density is needed). % 9 - 'tenth value layer' or 'tvl' - analogous to 'hvl' . % 4) Thickness - Thickness of material in cm. Either scalar or vector of % the same length as number of materials. Negative numbers indicate % mass thickness measured in g/cm^2 (density*thickness). Needed only % if energy spectrum is used or in case of Options set to % 'Transmission'. % Output : % X - output depends on 'Options' parameter. Columns always correspond % to the materials and rows correspond to energy. In case of spectrum % input only single row is returned. % % History: % Written by Jarek Tuszynski (SAIC), 2006 % Updated by Jarek Tuszynski (Leidos), 2014<EMAIL_ADDRESS>% Inspired by John Schweppe Mathematica code available at % http://library.wolfram.com/infocenter/MathSource/4267/ % Tables are based on NIST's XAAMDI and XCOM databases. See % PhotonAttenuationQ function for more details. % % Examples: % %% Plot Cross sections of elements for different energy photons % figure % Z = 1:100; % elements with Z in 1-100 range % E = logspace(log10(0.001), log10(20), 500); % define energy grid % X = PhotonAttenuation(Z, E, 'cross section'); % imagesc(log10(X)); colorbar; % title('Cross sections of elements for different energy photons'); % xlabel('Atomic Number of Elements'); % ylabel('Photon Energy in MeV'); % set(gca,'YTick',linspace(1, length(E), 10)); % set(gca,'YTickLabel',1e-3*round(1e3*logspace(log10(0.001), log10(20), 10))) % % %% Plot Photon Attenuation Coefficients, using different input styles % figure % E = logspace(log10(0.001), log10(20), 500); % define energy grid % Z = {'Concrete', 'Air', 'B(10)H(11)C(58)O(21)', 100, 'Ag'}; % mac = PhotonAttenuation(Z, E, 'mac'); % loglog(E, mac); % legend({'Concrete', 'Air', 'BPE-10', 'Fermium', 'Silver'}); % ylabel('Attenuation in cm^2/g'); % xlabel('Photon Energy in MeV'); % title('Photon Attenuation Coefficients for different materials');
Process 'Energy' Input Parameter
s = size(Energy); nEnergy = prod(s); Spectrum = []; if (min(s)==2) if (s(1)==2), Energy=Energy'; end Spectrum = Energy(:,2); Energy = Energy(:,1); Spectrum = Spectrum / trapz(Energy, Spectrum); % normalize spectrum nEnergy = 1; % this is a spectrum output will be an array instead of matrix end Energy = Energy(:); if (any(Energy<0)) idx = find(Energy<0); PlanckConstant = 4.1350e-021; % Planks constant in MeV*sec SpeedOfLight = 299792458E9; % in nano meters per second WaveLength = -Energy(idx); Energy(idx) = (PlanckConstant*SpeedOfLight) ./ WaveLength; end if (any(Energy<0.0009) || any(Energy>21)) warning('PhotonAttenuation:wrongEnergy',... 'Warning in PhotonAttenuation function: energy is outside of the recomended range from 0.001 MeV to 20 MeV'); end
Error using PhotonAttenuation (line 93) Not enough input arguments.
Process 'Material' Input Parameter
if (ischar (Material)), Material = {Material}; end if (isnumeric(Material)), Material = num2cell(Material); end nMaterial = length(Material);
Process 'Options' Input Parameter
OptNames = {'mac','meac', 'cross section', 'mean free path', 'transmission', 'ln_t', 'lac', 'half value layer', 'tenth value layer', ... 'mac','meac', 'x', 'mfp', 't', 'log_t', 'lac', 'hvl', 'tvl'}; nOpt = length(OptNames)/2; if (nargin<3), Options = 1; end if (ischar(Options)) Options = find(strcmpi( Options, OptNames),1); if (Options>nOpt), Options=Options-nOpt; end else if (Options>nOpt), Options=[]; end end if (isempty(Options)) error(['Error in PhotonAttenuation function: Options parameter was not recognized: ', Options]); end param = (Options==2)+1; % param=2 if Option==2 and param=1 otherwise
Process 'Thickness' Input Parameter
if (nargin<4), Thickness=1; end if (length(Thickness)==1 && nMaterial>1) Thickness = repmat(Thickness(1), 1, nMaterial); end if (length(Thickness)>1 && nMaterial==1) nMaterial = length(Thickness); Material = repmat(Material(1), 1, nMaterial); end if (length(Thickness)~=nMaterial) error('Error in PhotonAttenuation function: missmatch between lengths or Material and Thickness arrays'); end
Initialize output variables
if (isempty(Spectrum)), X = zeros(nEnergy,nMaterial); else X = zeros(1 ,nMaterial); end u = 1.6605402E-24 ; % atomic mass unit (1/12 of the mass of C-12) barns = 1E24; % barns
Main Loop: preform calculation for each material
old_material = [];
for iMat = 1:nMaterial
Parse material
VARIABLES: Z - array of element numbers contained in the material Ratios - array of element ratios in the material MatStr - string representation of the material
material = Material{iMat}; if (isempty(material)) error('Error in PhotonAttenuation function: compound formula was empty'); end if (~isempty(old_material) && length(old_material)==length(material) && all(old_material==material)) if (Option<3 && isempty(Spectrum)) % a shortcut for common configuration X(:,iMat) = mu; continue; end end if (ischar(material)) % check if this is element name or known compound [Z, Ratios] = ParseChemicalFormula(material); if (isempty(Z)) error(['Error in PhotonAttenuation function: compound formula was not recognized: ', material]); end MatStr = material; elseif (isnumeric(material)) Z = material; Ratios = 1; MatStr = num2str(material); else error('Error in PhotonAttenuation function: compound formula was not recognized.'); end if (length(Z)>1 && Options==3) error('Error in PhotonAttenuation function: Cross section "Option" is only supported for elements.'); end
Look up the data, average contributions of different elements and save
mu = PhotonAttenuationQ(Z, Energy, param); old_material = material; % old_material will store the name of material for which we calculated mu Ratios = Ratios(:) / sum(Ratios); % normalize ratios so they add up to one % if mu is 2D (spectrum and compound) it will become 1D % if mu is 1D (because of compound) it will become scalar % if mu is 1D (because of spectrum) it will not change % if mu is a scalar (monoenergetic & element) it will not change mu = mu * Ratios;
Lookup density and atomic molar mass if needed
if (Options>=3 || ~isempty(Spectrum)) PP = PhysProps(material); Density = PP{1,2}; A = Z/PP{1,1}; % atomic molar mass in g/mol if (Options>3 && isnan(Density)) error(['Error in PhotonAttenuation function: Physical properties of "',... MatStr,'" not found in PhysProps function.']); end if (Options==3 && isnan(A)) % calculate <Z/A> and atomic molar mass P = PhysProps(Z); ZA = [P{:,1}]'; % extract <Z/A> of all elements in the compound A = Z/dot(R,ZA); % atomic molar mass in g/mol if (isnan(A)) error(['Error in PhotonAttenuation function: Physical properties of "',... MatStr,'" not found in PhysProps function.']); end end end
Calculate Transmission if needed
if (Options==5 || Options==6 || ~isempty(Spectrum)) % a shortcut for common configuration if(Thickness(iMat)>0), MassThick = Thickness(iMat)*Density; % mass thickness measured in g/cm^2 else MassThick = -Thickness(iMat); end % user provided linear thickness MassThick = max(MassThick, 1e-6); T = exp(-mu*MassThick); % always convert to transmission end
if Energy has a spectrum than integrate
if (~isempty(Spectrum)) T = trapz(Energy, T.*Spectrum); % integrate over energy (T become a scalar) mac = -log(T)/MassThick; else mac = mu; end
Cast output in a chosen format
switch (Options) case {1,2} % mac & meac x = mac; case 3 % 'cross section' x = mac * (barns*u*A); case 4 % 'mean free path' x = 1./(mac*Density); case 5 % 'transmission' x = T; case 6 % 'log T' x = -log(T); case 7 % 'linear attenuation coefficiant' x = mac*Density; case 8 % 'half-value layer' x = -log(0.5)./(mac*Density); case 9 % 'tenth-value layer' x = -log(0.1)./(mac*Density); end X(:,iMat) = x; if (any(isnan(X(:,iMat)))) error(['Error in PhotonAttenuation function: Physical properties of "',... MatStr,'" not found in PhysProps function.']); end
end


WebWindowLib - Hello World Example
This is a .NET Core application. It is displaying a native OS window that contains
whatever webview technology is present in your OS:
- When running on Windows, it uses webview2 (backed by the new Chromium-based Edge)
- When running on Mac, it uses WKWebView (backed by Safari)
- When running on Linux, it uses WebKitGTK+2 (backed by WebKit)
Native API results
- IP Address:
- Machine Name:
- OS Version:
- Environment Variables:
Log
Errors