All the Segmenting Options
This feature requires Manager user level or higher.
With MailChimp, you can use list and subscriber information to target and filter subscribers into segments. Our segmentation options are extensive, so you can choose a single condition or combine up to five conditions with positive and negative relationships to target the right subscribers for each campaign.
In this article, you'll find all the segmentation criteria available to you. For more information about segments, check out our segmentation overview and recipes articles, too.
- When you create a static segment in MailChimp, you can target specific subscribers in your list and save them in a segment to reuse later. Since the segments are static, they can't be edited, updated, or added to as subscribers change their subscription preferences, edit their profile information, or as new subscribers sign up for your list.
- The availability of segmenting options depends on the data for your list. For example, you won't have the option to segment by e-commerce data if you don't have e-commerce data associated with your list.
- MailChimp allows you to create segments based on scheduled and draft campaign activity. However, these future segments only work properly after the scheduled or draft campaign is sent and MailChimp generates its report.
- You can create and save a campaign to be sent to a future segment in advance. You'll be able to schedule or send the campaign after the segmenting campaign is sent.
Subscriber Profile Data
For each segmentation condition we show here, you'll find a short description of what it controls, and a table that displays all of the options in the drop-down menus. In most cases, there are only three choices to make, but for some condition types, a fourth drop-down menu will appear.
In almost all cases, you won't see all of the options that appear on this page in the drop-down menu in your account. The drop-down menus that appear in your account are limited to what data is available in the list you're working with.
Automation Activity
Automation report data is available in segmenting options, so you can pull segments of subscribers based on whether they've started or completed a certain Automation workflow.
| Operators Available | Action |
|---|---|
|
Choose workflow from list |
Campaign Activity
Create segments based on how subscribers have interacted with your campaigns. For example, use a combination of segmenting critera to target subscribers who were sent recent campaigns, but did not open campaigns. Sent campaigns and draft campaigns are available. All Recent Campaigns pulls data from the 500 most recent campaigns sent to your list.
| Operators Available | Parameters |
|---|---|
|
|
Conversations Activity
MailChimp's Conversations feature tracks email replies from your subscribers. Use this condition to segment for subscribers who have responded to campaigns via email. Sent campaigns and draft campaigns are available. All Recent Campaigns pulls data from the 500 most recent campaigns sent to your list.
| Operators Available | Parameters |
|---|---|
|
|
Date Added
Use the Date Added condition to create a segment based on the date a subscriber signs up or is imported to your list.
| Operators Available | Parameters | Action |
|---|---|---|
|
|
Choose campaign from list, or choose date |
Email Client
If you have different campaign designs for people who use different mailbox applications, you can segment based on Email Client. Only one client can be selected per condition, but up to five conditions can be selected for any segment.
| Operators Available | Parameters |
|---|---|
|
|
Info Changed
Each time a subscriber updates his or her profile with MailChimp, we'll make a note. Use the Info Changed condition to create a segment based on when your subscriber's profile was last updated.
| Operators Available | Parameters | Action |
|---|---|---|
|
|
Choose campaign from list, or choose date |
Language
MailChimp tries to detect your subscriber's language when they sign up or click links in your campaign.
| Operators Available | Parameters |
|---|---|
|
English, Arabic, Afrikaans, Belarusian, Bulgarian, Catalan, Chinese, Croatian, Czech, Danish, Dutch, Estonian, Farsi, Finnish, French (France), French (Canada), German, Greek, Hebrew, Hindi, Hungarian, Icelandic, Indonesian, Irish, Italian, Japanese, Khmer, Korean, Latvian, Lithuanian, Maltese, Malay, Macedonian, Norwegian, Polish, Portuguese (Brazil), Portuguese (Portugal), Romanian, Russian, Serbian, Slovak, Spanish (Mexico), Spanish (Spain), Swahili, Swedish, Tamil, Thai, Turkish, Ukrainian, Vietnamese, Custom |
Location
You can use three types of subscriber location data to create segments: geolocation data, address field data from your list, or ZIP code field data from your list.
Geolocation Data
Location segments use geolocation data, which we automatically detect from subscribers who sign up with a MailChimp form or engage with your campaigns. Location segments don't include data from list fields like Address or ZIP code.
| Operators Available | Parameters |
|---|---|
| is within | Choose distance and type city, state, and country in field. Click Validate Location. |
| is not within | Choose distance and type city, state, and country in field. Click Validate Location. |
| is in country | Choose country. |
| is not in country | Choose country. |
| is in US state | Choose state. |
| is not in US state | Choose state. |
| is in ZIP (US-only) |
Type five-digit ZIP code in field. |
| is not in ZIP (US-only) |
Type five-digit ZIP code in field. |
| is unknown |
Member Rating
Use the Member Rating condition to create a segment of your most or least engaged subscribers.
| Operators Available | Action |
|---|---|
|
Hover and click over star rating. |
Poll/Survey Activity
Use the Poll/Survey Activity condition if you have campaigns that use our poll or survey merge tags. You can segment by which subscribers did or did not respond. Surveys allow you to segment on votes for specific responses.
| Operators Available | Parameters | Actions |
|---|---|---|
|
|
|
Signup Source
Choose Signup Source to segment your subscribers by how they were added to your list. You'll only see the sources you used to create your list, so if you've never imported a list or you haven't used an integration, you won't see those options.
| Operators Available | Parameters |
|---|---|
|
|
Merge Fields
If your imported list contains extra information about each subscriber, you can use it to target your campaigns. Under the Merge Fields section of the drop-down menu, you'll see the column labels you imported with your list.
These fields are based on the column labels in your list and vary for each user and list. Below, you'll see some common examples.
Text Fields
| Parameters | Operators Available | Action |
|---|---|---|
|
|
|
|
|
Choose date using date picker, or type the month/day |
Address Fields
Address segments use address field data that was added or imported to your list. Address segments do not include data from ZIP code list fields, or geolocation data.
| Parameters | Operators Available | Actions |
|---|---|---|
|
|
|
ZIP Fields
ZIP code segments use ZIP code field data that was added or imported to your list. This segment type only works with five-digit United States ZIP codes. ZIP code segments do not include data from Address list fields, or geolocation data.
| Parameters | Operators Available | Actions |
|---|---|---|
|
|
|
Groups
| Parameter | Operators Available | Actions |
|---|---|---|
| Group: "Group Title..." |
|
Click labels in list; use CTRL or CMD to select multiple |
E-commerce
When you integrate your e-commerce platform with MailChimp, we’ll track your subscribers’ purchase activity so you can target campaigns to specific buyers. You can segment based on specific items, categories, amount spent, and more. Check out all our e-commerce options.
Integrations
Available options will vary by what integrations are connected in your MailChimp account.
VIPs
If you've marked a subscriber as a VIP in MailChimp, you can segment for those subscribers under the Integrations section.
| Operators Available |
|---|
|
Mandrill Activity
Mandrill users can pass back Mandrill data to segment their lists in MailChimp based on sends, opens, and clicks for emails marked with specific tags.
| Operators Available | Action |
|---|---|
|
Choose tag from list. Use CTRL/CMD to select multiple. |
Goal Activity
After setting up the Goal integration, you can send targeted campaigns to subscribers based on their Goal activity. Type in the URL, domain, or other URL-string into the Goal Activity field provided.
To use this segmentation condition, you need to have embedded the Goal tracking code in your webpages.
| Operators Available | Action |
|---|---|
|
Type URL-string into field |
Goal Last Visited
The Goal Last Visited option lets you use Goal activity to target subscribers based on when they last visited a webpage with the Goal tracking script installed.
| Operators Available | Parameters | Actions |
|---|---|---|
|
|
|
SurveyMonkey Activity
After you create a campaign using our SurveyMonkey integration, you can build segments based on whether your recipients have interacted with your survey.
| Operators Available | Action |
|---|---|
|
Choose survey from list |
Social
If you've activated Social Profiles for your list, you can create segments based on your subscribers' social data: Age, Following/Fan, Gender, Influence Rating, and Social Network.
| Type of Data | Operators | Parameters |
|---|---|---|
| Age |
|
|
| Following/Fan |
|
|
| Gender |
|
|
| Social Network |
|
|
| Type of Data | Operators Available | Action |
|---|---|---|
| Influence Rating |
|
Hover and click over star rating. |
You can combine up to five Social Profiles conditions to build a segment. If you’re looking over your Social Profiles stats in the Lists section of MailChimp, you can click the Send to Segment button next to any statistic to open the Campaign Builder and create a campaign to send to that segment.
Operator Glossary
When you create a segment, you choose an "operator," which is usually the second choice and something like "is" or "is not." Different conditions display different operators. Here's a list of the ones you might see.
| Operator | Description |
|---|---|
| is | Form field data exactly matches the text you input. |
| is not | Form field data does not match exactly the text you input. |
| contains | Form field data contains the text you input. |
| does not contain | Form field data does not contain the text you input. |
| is greater than | Form field data is larger than the number you input. |
| is less than | Form field data is smaller than the number you input. |
| is before | Form field date comes before the date you select. |
| is after | Form field date comes after the date you select. |
| opened | Report data shows subscriber opened a campaign. |
| did not open | Report data shows subscriber did not open a campaign. |
| clicked | Report data shows subscriber clicked any link in a campaign. |
| did not click | Report data shows subscriber didn't click any links in a campaign. |
| was sent | Report data shows subscriber was sent a campaign. This only tracks whether a message was sent from MailChimp, it doesn't account for campaigns that aren't received for any reason. |
| was not sent | Report data shows subscriber wasn't sent a campaign. This only tracks whether a message was sent from MailChimp, it doesn't account for campaigns that aren't received for any reason. |
| source was | Subscriber signed up from the source you select. |
| source was not | Subscriber signed up from a source other than what you select. |
| has replied | Conversations activity shows that subscriber has replied to a campaign. |
| has not replied | Conversations activity shows that subscriber hasn't replied to a campaign. |
| is within | The geolocation of the subscriber is inside the distance radius you select. |
| is not within | The geolocation of the subscriber is beyond or outside of the distance radius you select. |
| is in country/U.S. state/zip | The geolocation of the subscriber is inside the country, state, or zip code you select. |
| is not in country/U.S. state/zip | The geolocation of the subscriber is not inside the country, state, or zip code you select. |
| is unknown | Geolocation data for these subscribers is unavailable. As subscribers engage with your campaigns, MailChimp pinpoints their location, so this field will populate and change over time. |
| starts with | Form field data starts with the text you input. |
| ends with | Form field data ends with the text you input |
| is blank | Form field is empty. |
| is not blank | Form field contains any value. |
| one of | Subscriber is a member of, or interested in, any of the interest groups you select. |
| none of | Subscriber is a member of, or interested in, none of the interest groups you select. |
| all of | Subscriber is a member of, or interested in, all of the interest groups you select. |
| is a member of | Subscriber profile shows they're a VIP or member of Golden Monkeys. This operator is also used with Social Profiles, when subscribers have profiles on certain social networks. |
| is not a member of | Subscriber profile shows they are not VIP or member of Golden Monkeys. This operator is also used with Social Profiles, when subscribers don't have profiles on certain social networks. |
| is following you on | Subscriber is following you on the social network selected.(Requires Social Profiles.) |
| is not following you on | Subscriber isn't following you on the social network selected. (Requires Social Profiles.) |
| has started |
|
| has not started |
|
| has completed |
|
| has not completed |
|


Azadi March: Fazlur Rehman convenes APC
by https://www.facebook.com/dunyanewsISLAMABAD (Dunya News) - Jamiat Ulema-e-Islam-Fazl (JUI-F) chief Maulana Fazlur Rehman has convened All Parties Conference (APC) to meet today (Monday) at his residence to formulate future strategy for the Azadi March, Dunya News reported.
All opposition parties have been invited to attend the All Parties Conference (APC).
According to sources, Pakistan People s Party (PPP) chairman Bilawal Bhutto Zardari will not attend the APC as he is scheduled to address a public rally in Bahawalpur on Monday. Bilawal Bhutto will be represented in the APC by the PPP senior leaders.
Sources further said that Pakistan Muslim League-Nawaz (PML-N) president Shahbaz Sharif s participation in the APC is also in doubt as he is due to attend party s Central Executive Committee meeting in Lahore. He will be represented in the APC by senior PML-N leaders.
Meanwhile, leadership of Pashtunkhwa Milli Awami Party (PkMAP), Awami National Party (ANP), National Party (NP), Qaumi Watan Party (QWP), Jamiat Ulema-e-Pakistan (JUP) and Markazi Jamiat Ahle Hadees will attend the All Parties Conference.
Sources also said that the future course of action regarding anti-government Azadi March and sit-in will be decided in consultation with other political parties during the All Parties Conference.


a77
|
||||||
|
|
|
674
22 1000
Generators Generators are the tools that take the models designed by the System Designer and produce client and server code to help you create your database and application. The generators take into account not only the models but your business rules as well to help design an application that fits your needs. The generators include the following tools:
These tools make Oracle Designer/2000 a very powerful package. Designer/2000 is a powerful and complex combination of tools that can help with the entire design process of your information system. Because it is quite complex, it is not for smaller installations that have only a few tables with relatively few relationships. Third-Party ToolsSeveral very good utilities that can assist you with the design of your database are on the market today. Among others, these third-party tools include ERwin/ERX from Logic Works, S-Designor from SDP Technologies, and SQL Coder from Platinum Technologies. All three of these tools are very good and easy to use; all three are on a much smaller scale than the Designer/2000 suite from Oracle. If you are in a small-to-medium business and dont have the need for a tool as complex and sophisticated as Designer/2000, one of these third-party products may be just for you.
ERwin/ERX from Logic Works ERwin/ERX is similar to Designer/2000 but is not as complex to use. ERwin/ERX graphically builds relationships between tables; from that information, it produces Oracle definition code that can assist you in building the database. ERwin/ERX can also create PL/SQL code for triggers and stored procedures. By using a graphical tool such as ERwin/ERX, it is easy to view the relationships between tables and clusters and see how constraints must function. The use of such a tool can help you visually represent the relationships between tables you might otherwise miss when designing a database by hand. S-Designor from SDP Technologies S-Designor is a third-party tool that functions in much the same way as Designer/2000 but on a smaller scale. S-Designor is a Windows application that graphically lets you input your business and application models; from that information, it creates Oracle definition code you can use to create an Oracle database. S-Designor interfaces with tools such as PowerBuilder, SQLWindows, and others to provide a complete database and application design tool. With S-Designor, you can create not only database definitions but constraints, views, triggers, and stored procedures as well. Because S-Designor is not as sophisticated c02 and complex as Designer/2000, it may be ideal for moderate-to-small database installations. Because the product works with application design tools with which you are already familiar, no additional overhead is incurred by having to learn a new application development tool. SQL Coder from Platinum Technologies SQL Coder is another excellent tool that can help you properly design and implement your server database. SQL Coder can assist you to properly implement objects such as stored procedures, triggers, packages, views, tables, and so on. By employing this kind of tool to assist you in the design phase, you can avoid errors and design a more optimal database. By examining the layout of your database, SQL Coder can help with the design of the database and can offer suggestions, such as where indexes would be useful. As with the other database design tools mentioned in this chapter, SQL Coder can be used standalone or in conjunction with application development tools available from Platinum Technologies or other vendors.
Application Development ToolsYou can use application development tools to assist in the prototyping, development, and deployment of applications. When you use application development tools, you can quickly deploy very good applications with relatively little effort. However, you should keep in mind a few caveats when using this type of tool. Some tools are easy to use and require very little training before applications can be deployed. However, the more sophisticated tools typically allow you to create much more sophisticated applications. This is not to say that the easy-to-use application development tools are not goodthey can be very good. But some of them may have some limitations if you try to use them for very sophisticated applications.
|
| 702 |
|


Double-click in the "Middle Office" box to see its children.
Double-click in the "Trade Lifecycle" box to see its children.


--- title: Resources layout: default ---
Files & guides, for free or to buy!
The Complete Guide to Case Studies
$9
A guide to nailing every aspect of the product design case study.
1k+ downloads · 180+ likes
Portfolio Presentation Guide & Template
Free
How to ace the product design portfolio presentation.
5k+ downloads · 500+ likes
Design System Documentation Kit
Free
Beautiful, ready-made design systems documentation components.
2.7k+ downloads · 240+ likes
Auto Layout Table Kit
Free
Practical ready-made components to start designing tables in Figma.
2.1k+ downloads · 100+ likes


An inspection is required to be conducted on {{vm.inspectiondate| date: "medium" }} in {{vm.property}}. This is in relation to your request {{vm.summary}}.
Please respond if you are able to accommodate the said schedule.
Need help?
If you have any questions email us on<EMAIL_ADDRESS>call 02 9818 6842 or contact your Strata manager.
Ace Body Online © 2018


SA Police and Facebook to fight kidnappings
by Staff WriterThe South African Police Service and Facebook will collaborate to combat child kidnappings and find missing children.
In a letter seen by MyBroadband, SAPS notified staff that Facebook’s Amber Alert for Missing Children functionality will be activated in South Africa on 6 December 2019.
Amber Alerts are messages sent to the public to assist in locating abducted or missing children.
Facebook is already working with the National Center for Missing and Exploited Children in the US to broadcast these alerts to Facebook users in the country.
These alerts are sent to users’ Facebook news feeds and include photos and details of the missing children.
Link to Facebook Headquarters
In its letter, SAPS outlined how Amber Alerts would work in South Africa.
It emphasised that the alerts can only be activated upon the request of the police, and not by members of the public or NGOs.
Missing children must therefore first be reported to the police before an Amber Alert can be issued.
“The National Bureau for Missing Persons will send the Amber Alert to the Facebook International Head Quarters, who will communicate the alert to all Facebook users within a 160km radius from the global positioning coordinates, town, or city where the child was last seen,” the letter stated.
“Once Facebook receives the activation email from the SAPS’ Bureau for Missing Persons, the global security team will prepare and activate the alert on Facebook within minutes.”
The Amber Alert will then remain active for 24 hours or until the law enforcement agency cancels the alert, with the public able to report any relevant details via the 086 00 10111 Crime Stop hotline.
The information will then be relayed to the relevant investigating officer, who will be able to send updates to Facebook – including when a child or suspect is spotted.
Required information
In order to send the request for an Amber Alert to Facebook, SAPS said it would require the following information:
- A completed SAPS 55(A) form.
- An A1 statement from parent or guardian (the case reporter).
- Proof of a registered enquiry on CAS/ICDMS function 13.1.
- Circulated material, if already circulated.
- The latest-available photograph of the missing child, and, if possible, any assisting information such as the description of the suspect.
- A completed Amber Alert template.
Facebook’s guidelines for suitable cases
Facebook has set out these guidelines to determine whether a case is worthy of an alert:
- The child should preferably be under the age of 13 years old and at imminent risk of death or serious bodily harm. If the child is older than 13 years and under 18 years of age, a written motivation by the investigating officer is crucial.
- The information must be meaningful and adequate, allowing the public to assist the police in locating the missing child.
- Comprehensive background information must be provided by the investigating officer.
- It is preferred that the disappearance be recent and not a ‘cold-case’ or long outstanding cases. However, this is not absolute and will be considered with motivation.
- The investigating officer can, at any time, request the removal of an Amber Alert and a reissue in a different 160km radius, if confirmed sightings of the child were received in a different area.
In certain instances, the National or Provincial Head of Family Violence, Child Protection, and Sexual Offences can request an emergency Amber Alert with basic information, after which the minimum required information must be provided as soon as possible.
To activate an Amber Alert, members of the public will have to contact the Bureau for Missing Persons at Detective Service Division by telephone at<PHONE_NUMBER> and send an email with all the required information to childamberalert@saps.gov.za.


4 NHANES: A New Sample
4.1 Creating A New Subset, Carefully
Suppose we wanted to select a new sample from the NHANES
data, but now, we’ll have some additional requirements.
- We want to start by looking only at subjects whose Age is at least 21 and at most 79, so we avoid some of the problems we saw in the previous samples with children and adults being included together in a study of height, as well as the use of Age = 80 for all subjects ages 80 and older.
- We want to look at some of the additional variables available in the NHANES data.
-
ID
andSurveyYr
to identify the participants and the survey period for each response. -
Age
as we’ve seen before, in years. -
Height
as we’ve seen before, in centimeters. -
Gender
which we’ll rename asSex
again. -
Pulse
= 60 second pulse rate (in beats per minute). -
BPSysAve
= Systolic Blood Pressure, in mm Hg (and we’ll rename thisSBP
). -
SleepTrouble
= Yes means the subject has told a health professional that they had trouble sleeping. -
PhysActive
= Yes means the subject does moderate or vigorous-intensity sports, fitness or recreational activity. -
MaritalStatus
= one of Married, Widowed, Divorced, Separated, NeverMarried or LivePartner (living with partner.) -
HealthGen
= self-reported rating of general health, one of Excellent, Vgood (Very Good), Good, Fair or Poor.
-
- Next, we’ll deal with missing data by omitting from our sample any subjects with missingness on any of the variables we’ve selected.
- Next, we only want to include unique subjects, with distinct values across the variables we are interested in. (The original
NHANES
data frame contains numerous repeated rows, where individuals from under-represented sociodemographic groups are included several times so as to mirror the characteristics of the US population in 2009-10 and 2011-12 more closely.)
Once we’ve identified the complete set of responses that meet the four requirements above, we will then take a random sample of 1,000 observations, without replacement, from that group.
Can you see how the code below accomplishes these tasks?
set.seed(431004)
nh_4 <- NHANES %>%
filter(Age > 20 & Age < 80) %>%
select(ID, SurveyYr, Gender, Age, Height,
Pulse, BPSysAve, SleepTrouble, PhysActive,
MaritalStatus, HealthGen) %>%
rename(Sex = Gender, SBP = BPSysAve) %>%
filter(complete.cases(.)) %>%
distinct() %>%
slice_sample(n = 1000, replace = FALSE)
nh_4
# A tibble: 1,000 x 11
ID SurveyYr Sex Age Height Pulse SBP
<int> <fct> <fct> <int> <dbl> <int> <int>
1 54401 2009_10 male 52 171. 100 106
2 52249 2009_10 male 43 190. 78 120
3 63461 2011_12 female 21 161 86 111
4 68429 2011_12 male 27 190. 86 113
5 52661 2009_10 male 71 170. 66 120
6 55949 2009_10 female 78 160. 58 157
7 53913 2009_10 female 75 161. 58 124
8 63852 2011_12 male 50 174. 50 104
9 68833 2011_12 male 41 160. 62 116
10 61941 2009_10 male 22 172 88 112
# ... with 990 more rows, and 4 more variables:
# SleepTrouble <fct>, PhysActive <fct>,
# MaritalStatus <fct>, HealthGen <fct>
4.2 Numerical Summary of nh_4
summary(nh_4)
ID SurveyYr Sex Age
Min. :51630 2009_10:516 female:495 Min. :21.00
1st Qu.:56374 2011_12:484 male :505 1st Qu.:34.00
Median :61578 Median :47.00
Mean :61669 Mean :47.27
3rd Qu.:66927 3rd Qu.:60.00
Max. :71915 Max. :79.00
Height Pulse SBP
Min. :144.2 Min. : 44.00 Min. : 80.0
1st Qu.:161.5 1st Qu.: 64.00 1st Qu.:109.0
Median :168.4 Median : 72.00 Median :119.0
Mean :168.8 Mean : 72.66 Mean :120.9
3rd Qu.:176.1 3rd Qu.: 80.00 3rd Qu.:129.2
Max. :199.6 Max. :128.00 Max. :196.0
SleepTrouble PhysActive MaritalStatus HealthGen
No :733 No :489 Divorced :120 Excellent:103
Yes:267 Yes:511 LivePartner : 83 Vgood :264
Married :527 Good :430
NeverMarried:183 Fair :163
Separated : 34 Poor : 40
Widowed : 53
4.3 Distribution of Heights
What is the distribution of height in this new sample?
ggplot(data = nh_4, aes(x = Height)) +
geom_histogram()
`stat_bin()` using `bins = 30`. Pick better value with
`binwidth`.
We can do several things to clean this up.
- We’ll change the color of the lines for each bar of the histogram.
- We’ll change the fill inside each bar to make them stand out a bit more.
- We’ll add a title and relabel the horizontal (x) axis to include the units of measurement.
- We’ll avoid the warning by selecting a number of bins (we’ll use 25 here) into which we’ll group the heights before drawing the histogram.
ggplot(data = nh_4, aes(x = Height)) +
geom_histogram(bins = 25, col = "yellow", fill = "blue") +
labs(title = "Height of NHANES subjects ages 21-79",
x = "Height in cm.")
4.3.1 Changing a Histogram’s Fill and Color
The CWRU color guide (https://case.edu/umc/our-brand/visual-guidelines/) lists the HTML color schemes for CWRU blue and CWRU gray. Let’s match that color scheme.
cwru.blue <- '#0a304e'
cwru.gray <- '#626262'
ggplot(data = nh_4, aes(x = Height)) +
geom_histogram(binwidth = 2, col = cwru.gray, fill = cwru.blue) +
labs(title = "Height of NHANES subjects ages 21-79",
x = "Height in cm.") +
theme_bw()
Note the other changes to the graph above.
- We changed the theme to replace the gray background.
- We changed the bins for the histogram, to gather observations into groups of 2 cm. each.
4.4 Height and Sex
ggplot(data = nh_4, aes(x = Sex, y = Height, color = Sex)) +
geom_point() +
labs(title = "Height by Sex for NHANES subjects ages 21-79",
y = "Height in cm.")
This plot isn’t so useful. We can improve things a little by jittering the points horizontally, so that the overlap is reduced.
ggplot(data = nh_4, aes(x = Sex, y = Height, color = Sex)) +
geom_jitter(width = 0.2) +
labs(title = "Height by Sex (jittered) for NHANES subjects ages 21-79",
y = "Height in cm.")
Perhaps it might be better to summarise the distribution in a different way. We might consider a boxplot of the data.
4.4.1 A Boxplot of Height by Sex
ggplot(data = nh_4, aes(x = Sex, y = Height, fill = Sex)) +
geom_boxplot() +
labs(title = "Boxplot of Height by Sex for NHANES subjects ages 21-79",
y = "Height in cm.")
Or perhaps we’d like to see a pair of histograms?
4.4.2 Histograms of Height by Sex
ggplot(data = nh_4, aes(x = Height, fill = Sex)) +
geom_histogram(color = "white", bins = 20) +
labs(title = "Histogram of Height by Sex for NHANES subjects ages 21-79",
x = "Height in cm.") +
facet_wrap(~ Sex)
Can we redraw these histograms so that they are a little more comparable, and to get rid of the unnecessary legend?
ggplot(data = nh_4, aes(x = Height, fill = Sex)) +
geom_histogram(color = "white", bins = 20) +
labs(title = "Histogram of Height by Sex for NHANES subjects ages 21-79 (Revised)",
x = "Height in cm.") +
guides(fill = "none") +
facet_grid(Sex ~ .)
4.5 Looking at Pulse Rate
Let’s look at a different outcome, the pulse rate for our subjects.
Here’s a histogram, again with CWRU colors, for the pulse rates in our sample.
ggplot(data = nh_4, aes(x = Pulse)) +
geom_histogram(binwidth = 1, fill = cwru.blue, col = cwru.gray) +
labs(title = "Histogram of Pulse Rate: NHANES subjects ages 21-79",
x = "Pulse Rate (beats per minute)")
Suppose we instead bin up groups of 5 beats per minute together as we plot the Pulse rates.
ggplot(data = nh_4, aes(x = Pulse)) +
geom_histogram(binwidth = 5, fill = cwru.blue, col = cwru.gray) +
labs(title = "Histogram of Pulse Rate: NHANES subjects ages 21-79",
x = "Pulse Rate (beats per minute)")
Which is the more useful representation will depend a lot on what questions you’re trying to answer.
4.5.1 Pulse Rate and Physical Activity
We can also split up our data into groups based on whether the subjects are physically active. Let’s try a boxplot.
ggplot(data = nh_4, aes(y = Pulse, x = PhysActive, fill = PhysActive)) +
geom_boxplot() +
labs(title = "Pulse Rate by Physical Activity Status for NHANES ages 21-79")
As an accompanying numerical summary, we might ask how many people fall into each of these PhysActive
categories, and what is their “average” Pulse
rate.
nh_4 %>%
group_by(PhysActive) %>%
summarise(count = n(), mean(Pulse), median(Pulse)) %>%
knitr::kable(digits = 2)
| PhysActive | count | mean(Pulse) | median(Pulse) |
|---|---|---|---|
| No | 489 | 73.36 | 72 |
| Yes | 511 | 71.98 | 72 |
The knitr::kable(digits = 2)
piece of this command tells R Markdown to generate a table with some attractive formatting, and rounding any decimals to two figures.
4.5.2 Pulse by Sleeping Trouble
ggplot(data = nh_4, aes(x = Pulse, fill = SleepTrouble)) +
geom_histogram(color = "white", bins = 20) +
labs(title = "Histogram of Pulse Rate by Sleep Trouble for NHANES subjects ages 21-79",
x = "Pulse Rate (beats per minute)") +
guides(fill = "none") +
facet_grid(SleepTrouble ~ ., labeller = "label_both")
How many people fall into each of these SleepTrouble
categories, and what is their “average” Pulse rate?
nh_4 %>%
group_by(SleepTrouble) %>%
summarise(count = n(), mean(Pulse), median(Pulse)) %>%
knitr::kable(digits = 2)
| SleepTrouble | count | mean(Pulse) | median(Pulse) |
|---|---|---|---|
| No | 733 | 72.41 | 72 |
| Yes | 267 | 73.32 | 72 |
4.5.3 Pulse and HealthGen
We can compare the distribution of Pulse rate across groups by the subject’s self-reported overall health (HealthGen
), as well.
ggplot(data = nh_4, aes(x = HealthGen, y = Pulse, fill = HealthGen)) +
geom_boxplot() +
labs(title = "Pulse by Self-Reported Overall Health for NHANES ages 21-79",
x = "Self-Reported Overall Health", y = "Pulse Rate") +
guides(fill = "none")
How many people fall into each of these HealthGen
categories, and what is their “average” Pulse rate?
nh_4 %>%
group_by(HealthGen) %>%
summarise(count = n(), mean(Pulse), median(Pulse)) %>%
knitr::kable(digits = 2)
| HealthGen | count | mean(Pulse) | median(Pulse) |
|---|---|---|---|
| Excellent | 103 | 71.30 | 72 |
| Vgood | 264 | 71.15 | 70 |
| Good | 430 | 72.70 | 72 |
| Fair | 163 | 74.23 | 72 |
| Poor | 40 | 79.15 | 76 |
4.5.4 Pulse Rate and Systolic Blood Pressure
ggplot(data = nh_4, aes(x = SBP, y = Pulse)) +
geom_point() +
geom_smooth(method = "loess", formula = y ~ x) +
labs(title = "Pulse Rate vs. SBP for NHANES subjects, ages 21-79")
4.5.5 Sleep Trouble vs. No Sleep Trouble?
Could we see whether subjects who have described SleepTrouble
show different SBP-pulse rate patterns than the subjects who haven’t?
- Let’s try doing this by changing the shape and the color of the points based on
SleepTrouble
.
ggplot(data = nh_4,
aes(x = SBP, y = Pulse,
color = SleepTrouble, shape = SleepTrouble)) +
geom_point() +
geom_smooth(method = "loess", formula = y ~ x) +
labs(title = "Pulse Rate vs. SBP for NHANES subjects, ages 21-79")
This plot might be easier to interpret if we faceted by SleepTrouble
, as well.
ggplot(data = nh_4,
aes(x = SBP, y = Pulse,
color = SleepTrouble, shape = SleepTrouble)) +
geom_point() +
geom_smooth(method = "loess", formula = y ~ x) +
labs(title = "Pulse Rate vs. SBP for NHANES subjects, ages 21-79") +
facet_wrap(~ SleepTrouble, labeller = "label_both")
4.6 General Health Status
Here’s a Table of the General Health Status results. Again, this is a self-reported rating of each subject’s health on a five point scale (Excellent, Very Good, Good, Fair, Poor.)
nh_4 %>%
tabyl(HealthGen)
HealthGen n percent
Excellent 103 0.103
Vgood 264 0.264
Good 430 0.430
Fair 163 0.163
Poor 40 0.040
The HealthGen data are categorical, which means that summarizing them with averages isn’t as appealing as looking at percentages, proportions and rates.
Another, somewhat simpler way to get a table of this sort of information uses the tabyl
function from the janitor
package in R.
# tabyl is part of the janitor package
# already loaded: library(janitor)
nh_4 %>%
tabyl(HealthGen)
HealthGen n percent
Excellent 103 0.103
Vgood 264 0.264
Good 430 0.430
Fair 163 0.163
Poor 40 0.040
I don’t actually like the title of percent
here, as it’s really a proportion, but that can be adjusted, and we can add a total.
nh_4 %>%
tabyl(HealthGen) %>%
adorn_totals() %>%
adorn_pct_formatting()
HealthGen n percent
Excellent 103 10.3%
Vgood 264 26.4%
Good 430 43.0%
Fair 163 16.3%
Poor 40 4.0%
Total 1000 100.0%
When working with an unordered categorical variable, like MaritalStatus
, the same approach can work.
nh_4 %>%
tabyl(MaritalStatus) %>%
adorn_totals() %>%
adorn_pct_formatting()
MaritalStatus n percent
Divorced 120 12.0%
LivePartner 83 8.3%
Married 527 52.7%
NeverMarried 183 18.3%
Separated 34 3.4%
Widowed 53 5.3%
Total 1000 100.0%
4.6.1 Bar Chart for Categorical Data
Usually, a bar chart is the best choice for a graphing a variable made up of categories.
There are lots of things we can do to make this plot fancier.
ggplot(data = nh_4, aes(x = HealthGen, fill = HealthGen)) +
geom_bar() +
guides(fill = "none") +
labs(x = "Self-Reported Health Status",
y = "Number of NHANES subjects",
title = "Self-Reported Health Status in NHANES subjects ages 21-79")
Or, we can really go crazy…
nh_4 %>%
count(HealthGen) %>%
mutate(pct = round(prop.table(n) * 100, 1)) %>%
ggplot(aes(x = HealthGen, y = pct, fill = HealthGen)) +
geom_bar(stat = "identity", position = "dodge") +
scale_fill_viridis_d() +
guides(fill = "none") +
geom_text(aes(y = pct + 1, # nudge above top of bar
label = paste0(pct, '%')), # prettify
position = position_dodge(width = .9),
size = 4) +
labs(x = "Self-Reported Health Status",
y = "Percentage of NHANES subjects",
title = "Self-Reported Health Status in NHANES subjects ages 21-79") +
theme_bw()
4.6.2 Working with Tables
We can add both row and column marginal totals, and compare subjects by Sex, as follows…
nh_4 %>%
tabyl(Sex, HealthGen) %>%
adorn_totals(c("row", "col"))
Sex Excellent Vgood Good Fair Poor Total
female 54 132 205 81 23 495
male 49 132 225 82 17 505
Total 103 264 430 163 40 1000
If we like, we can make this look a little more polished with the knitr::kable
function…
nh_4 %>%
tabyl(Sex, HealthGen) %>%
adorn_totals(c("row", "col")) %>%
knitr::kable()
| Sex | Excellent | Vgood | Good | Fair | Poor | Total |
|---|---|---|---|---|---|---|
| female | 54 | 132 | 205 | 81 | 23 | 495 |
| male | 49 | 132 | 225 | 82 | 17 | 505 |
| Total | 103 | 264 | 430 | 163 | 40 | 1000 |
Or, we can get a complete cross-tabulation, including (in this case) the percentages of people within each Sex that fall in each HealthGen category (percentages within each row) like this.
nh_4 %>%
tabyl(Sex, HealthGen) %>%
adorn_totals("row") %>%
adorn_percentages("row") %>%
adorn_pct_formatting() %>%
adorn_ns() %>%
knitr::kable()
| Sex | Excellent | Vgood | Good | Fair | Poor |
|---|---|---|---|---|---|
| female | 10.9% (54) | 26.7% (132) | 41.4% (205) | 16.4% (81) | 4.6% (23) |
| male | 9.7% (49) | 26.1% (132) | 44.6% (225) | 16.2% (82) | 3.4% (17) |
| Total | 10.3% (103) | 26.4% (264) | 43.0% (430) | 16.3% (163) | 4.0% (40) |
And, if we wanted the column percentages, to determine which sex had the higher rate of each HealthGen status level, we can get that by changing the adorn_percentages to describe results at the column level:
nh_4 %>%
tabyl(Sex, HealthGen) %>%
adorn_totals("col") %>%
adorn_percentages("col") %>%
adorn_pct_formatting() %>%
adorn_ns() %>%
knitr::kable()
| Sex | Excellent | Vgood | Good | Fair | Poor | Total |
|---|---|---|---|---|---|---|
| female | 52.4% (54) | 50.0% (132) | 47.7% (205) | 49.7% (81) | 57.5% (23) | 49.5% (495) |
| male | 47.6% (49) | 50.0% (132) | 52.3% (225) | 50.3% (82) | 42.5% (17) | 50.5% (505) |
4.6.3 SBP by General Health Status
Let’s consider now the relationship between self-reported overall health and systolic blood pressure.
ggplot(data = nh_4, aes(x = HealthGen, y = SBP, fill = HealthGen)) +
geom_boxplot() +
labs(title = "SBP by Health Status, Overall Health for NHANES ages 21-79",
y = "Systolic Blood Pressure", x = "Self-Reported Overall Health") +
guides(fill = "none")
We can see that not too many people self-identify with the “Poor” health category.
| HealthGen | count | mean(SBP) | median(SBP) |
|---|---|---|---|
| Excellent | 103 | 118.4854 | 116.0 |
| Vgood | 264 | 118.1250 | 116.0 |
| Good | 430 | 121.2209 | 119.5 |
| Fair | 163 | 124.1840 | 123.0 |
| Poor | 40 | 129.6000 | 125.5 |
4.6.4 SBP by Physical Activity and General Health Status
We’ll build a panel of boxplots to try to understand the relationships between Systolic Blood Pressure, General Health Status and Physical Activity. Note the use of coord_flip
to rotate the graph 90 degrees, and the use of labeller
within facet_wrap
to include both the name of the (Physical Activity) variable and its value.
ggplot(data = nh_4, aes(x = HealthGen, y = SBP, fill = HealthGen)) +
geom_boxplot() +
labs(title = "SBP by Health Status, Overall Health for NHANES ages 21-79",
y = "Systolic BP", x = "Self-Reported Overall Health") +
guides(fill = "none") +
facet_wrap(~ PhysActive, labeller = "label_both") +
coord_flip()
4.6.5 SBP by Sleep Trouble and General Health Status
Here’s a plot of faceted histograms, which might be used to address similar questions related to the relationship between Overall Health, Systolic Blood Pressure and Sex.
ggplot(data = nh_4, aes(x = SBP, fill = Sex)) +
geom_histogram(color = "white", bins = 20) +
labs(title = "SBP by Sex, Overall Health for NHANES ages 21-79",
x = "Systolic BP") +
guides(fill = "none") +
facet_grid(HealthGen ~ Sex)
4.7 Conclusions
This is just a small piece of the toolbox for visualizations that we’ll create in this class. Many additional tools are on the way, but the main idea won’t change. Using the ggplot2
package, we can accomplish several critical tasks in creating a visualization, including:
- Identifying (and labeling) the axes and titles
- Identifying a type of
geom
to use, like a point, bar or histogram - Changing fill, color, shape, size to facilitate comparisons
- Building “small multiples” of plots with faceting
Good data visualizations make it easy to see the data, and ggplot2
’s tools make it relatively difficult to make a really bad graph.


ERASER (1996) A film review by Michael Redman Copyright 1996 Michael Redman
**(out of ****)
Another Arnold Schwarzenegger movie and this time with even _Bigger Guns_.
(I am tempted to end right here. That one sentence just about says it all.)
This time around Ah-nold is an FBI agent who specializes in creating new identities for and guarding high-profile participants in the government's witness protection program. His assignment is Vanessa Williams who has a computer disk filled with secrets (doesn't everybody nowadays?) about her former employer.
The company, along with key officials in the FBI and Defense Department, is set to sell enormous amounts of the newest high-tech monster electro-magnetic guns to the big bad terrorist. Our hero and damsel in distress have to stop them virtually single-handedly.
There's nothing remarkably new here. In fact several key plot elements are repeated from "Mission Impossible". Not to give too much away, but there's a mole in the organization, Schwarzenegger is suspect and guess who the real traitor is. There's even the same scene where he escapes a situation by shooting through a glass wall and creates a giant flood; here, complete with alligators.
The role is not a stretch for the body builder. It's not much different from any of his others, but he has that one persona mastered. Williams is adequate, but not more, in the obligatory babe in danger identity. The best acting comes from James Caan, but even he has been better. James Coburn is charismatic, but has only a bit part.
The comic sidekick is Robert Pastorelli (Elliot in "Murphy Brown") as Johnny C who brings a group of Mafioso in to help out. More like violent Three Stooges than threatening crime lords, these wiseguys provide some of the best scenes.
In order to enjoy a Schwarzenegger film, you have to suspend disbelief...and logic and the laws of physics and any hope for a story that makes sense. But if you can do that, you'll enjoy scenes like the one where he dives out of a jet, catches up with a parachute in midair and then has a shoot-out with the plane.
Nothing amazing, not even a great Arnold movie, but catch it at a matinee and it's worth the price of admission if no-brain action is what you're looking for.
[Note: this appeared in "The Bloomington Voice", Bloomington, Indiana, 6/27/96, Michael Redman can be reached at<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


Based on what you've told us:
Message to alert the user to a problem goes here
Optional description of the errors and how to correct them
Check your personal details
Message to alert the user to a problem goes here
Optional description of the errors and how to correct them
Look at your name, signature and other details.
{% endblock %}


How to Use¶
This guide will give you information about how to use the documentation to create the same documenation
Step 1
Go to this documenation page and follow the tutorials.
Step 2
Create your own repository just like this sphinxSimDoc repo was created.
Step 3
Use the documentation tutorial to make a new repo having all the rst files included in this repo.
Step 4
Make the docs and you will be able to have your own sampledoc ready
Alternatively¶
Go straight to the index page of this doc and you can follow the instructions from there itself without having to go to the above documentation page.
This page is created in using the earlier mentioned tutorial page. Hence the recursive nature.


eucarc
creates EC2 credentials for the current user as
defined by OS_TENANT_NAME:OS_USERNAME
.
eucarc
sources openrc
at the beginning
(which in turn sources stackrc
and localrc
)
in order to set credentials to create EC2 credentials in Keystone.
OS_TENANT_NAME:OS_USERNAME
.
EC2_URL=$(keystone catalog --service ec2 | awk '/ publicURL / { print $4 }')
OS_TENANT_NAME:OS_USERNAME
.
export S3_URL=$(keystone catalog --service s3 | awk '/ publicURL / { print $4 }')
CREDS=$(keystone ec2-credentials-create) export EC2_ACCESS_KEY=$(echo "$CREDS" | awk '/ access / { print $4 }') export EC2_SECRET_KEY=$(echo "$CREDS" | awk '/ secret / { print $4 }')
exercises/bundle.sh
demonstrated
retrieving certificates using the Nova CLI.
EC2_PRIVATE_KEY=pk.pem EC2_CERT=cert.pem NOVA_CERT=cacert.pem EUCALYPTUS_CERT=${NOVA_CERT}
© Openstack Foundation 2011-2013 — An OpenStack program created by Rackspace Cloud Builders


Welcome to our Privacy Policy
Your privacy is critically important to us.
It is Deigex Inc.'s policy to respect your privacy regarding any information we may collect while operating our website. This Privacy Policy applies to https://deigex.com (hereinafter, "us", "we", or "https://deigex.com"). We respect your privacy and are committed to protecting personally identifiable information you may provide us through the Website. We have adopted this privacy policy ("Privacy Policy") to explain what information may be collected on our Website, how we use this information, and under what circumstances we may disclose the information to third parties. This Privacy Policy applies only to information we collect through the Website and does not apply to our collection of information from other sources.
This Privacy Policy, together with the Terms and conditions posted on our Website, set forth the general rules and policies governing your use of our Website. Depending on your activities when visiting our Website, you may be required to agree to additional terms and conditions.
Website Visitors
Like most website operators, Deigex Inc. collects non-personally-identifying information of the sort that web browsers and servers typically make available, such as the browser type, language preference, referring site, and the date and time of each visitor request. Deigex Inc.'s purpose in collecting non-personally identifying information is to better understand how Deigex Inc.'s visitors use its website. From time to time, Deigex Inc. may release non-personally-identifying information in the aggregate, e.g., by publishing a report on trends in the usage of its website.
Deigex Inc. also collects potentially personally-identifying information like Internet Protocol (IP) addresses for logged in users and for users leaving comments on https://www.deigex.com blog posts. Deigex Inc. only discloses logged in user and commenter IP addresses under the same circumstances that it uses and discloses personally-identifying information as described below.
Gathering of Personally-Identifying Information
Certain visitors to Deigex Inc.'s websites choose to interact with Deigex Inc. in ways that require Deigex Inc. to gather personally-identifying information. The amount and type of information that Deigex Inc. gathers depends on the nature of the interaction. For example, we ask visitors who sign up for a blog at https://www.deigex.com to provide a username and email address.
Security
The security of your Personal Information is important to us, but remember that no method of transmission over the Internet, or method of electronic storage is 100% secure. While we strive to use commercially acceptable means to protect your Personal Information, we cannot guarantee its absolute security.
Links To External Sites
Our Service may contain links to external sites that are not operated by us. If you click on a third party link, you will be directed to that third party's site. We strongly advise you to review the Privacy Policy and terms and conditions of every site you visit.
We have no control over, and assume no responsibility for the content, privacy policies or practices of any third party sites, products or services.
Https://www.deigex.com uses Google AdWords for remarketing
Https://www.deigex.com uses the remarketing services to advertise on third party websites (including Google) to previous visitors to our site. It could mean that we advertise to previous visitors who haven't completed a task on our site, for example using the contact form to make an enquiry. This could be in the form of an advertisement on the Google search results page, or a site in the Google Display Network. Third-party vendors, including Google, use cookies to serve ads based on someone's past visits. Of course, any data collected will be used in accordance with our own privacy policy and Google's privacy policy.
You can set preferences for how Google advertises to you using the Google Ad Preferences page, and if you want to you can opt out of interest-based advertising entirely by cookie settings or permanently using a browser plugin.
Aggregated Statistics
Deigex Inc. may collect statistics about the behavior of visitors to its website. Deigex Inc. may display this information publicly or provide it to others. However, Deigex Inc. does not disclose your personally-identifying information.
Cookies
To enrich and perfect your online experience, Deigex Inc. uses "Cookies", similar technologies and services provided by others to display personalized content, appropriate advertising and store your preferences on your computer.
A cookie is a string of information that a website stores on a visitor's computer, and that the visitor's browser provides to the website each time the visitor returns. Deigex Inc. uses cookies to help Deigex Inc. identify and track visitors, their usage of https://www.deigex.com, and their website access preferences. Deigex Inc. visitors who do not wish to have cookies placed on their computers should set their browsers to refuse cookies before using Deigex Inc.'s websites, with the drawback that certain features of Deigex Inc.'s websites may not function properly without the aid of cookies.
By continuing to navigate our website without changing your cookie settings, you hereby acknowledge and agree to Deigex Inc.'s use of cookies.
E-commerce
Those who engage in transactions with Deigex Inc. – by purchasing Deigex Inc.'s services or products, are asked to provide additional information, including as necessary the personal and financial information required to process those transactions. In each case, Deigex Inc. collects such information only insofar as is necessary or appropriate to fulfill the purpose of the visitor's interaction with Deigex Inc.. Deigex Inc. does not disclose personally-identifying information other than as described below. And visitors can always refuse to supply personally-identifying information, with the caveat that it may prevent them from engaging in certain website-related activities.
Privacy Policy Changes
Although most changes are likely to be minor, Deigex Inc. may change its Privacy Policy from time to time, and in Deigex Inc.'s sole discretion. Deigex Inc. encourages visitors to frequently check this page for any changes to its Privacy Policy. Your continued use of this site after any change in this Privacy Policy will constitute your acceptance of such change.


Grab your knitting needles and yarn and get ready to learn how to knit! How to Knit: A complete introduction for beginners is a step by step tutorial for new knitters to follow along and learn to knit. The complete video is 45 minutes long and jam packed with knitting know-how for the new knitter. The video has been divided into 3
Show more
NO COMMENTS YET


Kotlin
Q1. You would like to print each score on its own line with its cardinal position. Without using var or val, which method allows iteration with both the value and its position?
fun main(){
val highScores = listOf(4000, 2000, 10200, 12000, 9030)
- [x]
.withIndex()
references
- [ ]
.forEachIndexed()
- [ ]
.forEach()
- [ ]
.forIndexes()
Q2. When the Airplane class is instantiated, it displays Aircraft = null, not Aircraft = C130 why?
abstract class Aircraft {
init { println("Aircraft = ${getName()}") }
abstract fun getName(): String
}
class Airplane(private val name: String) : Aircraft() {
override fun getName(): String = name
}
- [ ] Classes are initialized in the same order they are in the file, therefore, Aircraft should appear after Airplane
- [ ] The code needs to pass the parameter to the base class's primary constructor. Since it does not, it receives a null
- [ ] Abstract function always returns null
- [ ] A superclass is initialized before its subclass. Therefore, name has not been set before it is rendered
Q3. Kotlin interfaces ad abstract classes are very similar. What is one thing abstract class can do that interfaces cannot?
- [ ] Only abstract classes are inheritable by subclasses
- [ ] Only abstract classes can inherit from multiple superclasses
- [ ] Only abstract classes can have abstract methods
- [x] Only abstract classes can store state reference
Q4. Inside an extension function, what is the name of the variable that corresponds to the receiver object
- [ ] The variable is named it
- [x] The variable is named this reference
- [ ] The variable is named receiver
- [ ] The variable is named default
Q5. Your application has an add function. How could you use its invoke methods and display the results?
fun add(a: Int, b: Int): Int {
return a + b
}
- [ ]
println(add(5,10).invoke())
- [x]
println(::add.invoke(5, 10))
reference
- [ ]
println(::add.invoke{5, 10})
[ ] println(add.invoke(5,10))
#### Q6. What is the entry point for a Kotlin application?
- [ ]
fun static main(){}
- [x]
fun main(){}
- [ ]
fun Main(){}
[ ] public static void main(){}
Q7. You are writing a console app in Kotlin that processes test entered by the user. If the user enters an empty string, the program exits. Which kind of loop would work best for this app? Keep in mind that the loop is entered at least once
- [x] a do..while loop
- [ ] a for loop
- [ ] a while loop
- [ ] a forEach loop
Q8. You pass an integer to a function expecting type Any. It works without issue. Why is a primitive integer able to work with a function that expects an object?
fun showHashCode(obj: Any){
println("${obj.hasCode()}")
}
fun main() {
showHashCode(1)
}
- [ ] While the code runs, it does not produce correct results
- [ ] The integer is always a class
- [ ] The compiler runs an implicit .toClass() method on the integer
- [x] The integer is autoboxed to a Kotlin Int class
Q9. You have started a long-running coroutine whose job you have assigned to a variable named task. If the need arose, how could you abort the coroutine?
val task = launch {
// long running job
}
- [ ]
task.join()
- [ ]
task.abort()
- [ ]
job.stop()
- [ ]
task.cancel()
Q10. You are attempting to assign an integer variable to a long variable, but Kotlin compiler flags it as an error. Why?
- [ ] You must wrap all implicit conversion in a try/catch block
- [ ] You can only assign Long to an Int, not the other way around
- [x] There is no implicit conversion from Int to Long reference
- [ ] All integers in Kotlin are of type Long
Q11. You have written a snippet of code to display the results of the roll of a six-sided die. When the die displays from 3 to 6 inclusive, you want to display a special message. Using a Kotlin range, what code should you add?
when (die) {
1 -> println("die is 1")
2 -> println("die is 2")
___ -> printlin("die is between 3 and 6")
else -> printlin("dies is unknown")
}
- [x]
3,4,5,6
- [x]
in 3..6
reference
- [ ]
3 : 6
- [ ]
{3,4,5,6}
Q12. The function typeChecker receiver a parameter obj of type Any. Based upon the type of obj, it prints different messages for Int, String, Double, and Float types; if not any of the mentioned types, it prints "unknown type". What operator allows you to determine the type of an object?
- [ ] instanceof
- [x] is
- [ ] typeof
- [ ] as
Q13. This code does not print any output to the console. What is wrong?
firstName?.let {
println("Greeting $firstname!")
}
- [ ] A null pointer exception is thrown
- [x] firstName is equal to null
- [ ] firstName is equal to an empty string
- [ ] firstName is equal to Boolean false
Q14. You have a function simple() that is called frequently in your code. You place the inline prefix on the function. What effect does it have on the code?
inline fun simple(x: Int): Int{
return x * x
}
fun main() {
for(count in 1..1000) {
simple(count)
}
}
- [ ] The code will give a stack overflow error
- [x] The compiler warns of insignificant performance impact
- [ ] The compiler warns of significant memory usage
- [ ] The code is significantly faster
Q15.How do you fill in the blank below to display all of the even numbers from 1 to 10 with least amount of code?
for (_____) {
println("There are $count butterflies.")
}
- [ ]
count in 1..10
- [x]
count in 2..10 step 2
- [ ]
count in 1..10 % 2
- [ ]
var count=2; count <= 10; count+=2
Q16. What value is printed by println()?
val set = setOf("apple", "pear", "orange", "apple")
println(set.count())
Q17. Which line of code shows how to display a nullable string's length and shows 0 instead of null?
- [ ]
println(b!!.length ?: 0)
- [x]
println(b?.length ?: 0)
- [ ]
println(b?.length ?? 0)
- [ ]
println(b == null? 0: b.length)
Q18. In the file main.kt, you ae filtering a list of integers and want to use an already existing function, removeBadValues. What is the proper way to invoke the function from filter in the line below?
val list2 = (80..100).toList().filter(_____)
- [x]
::removeBadValues
reference
- [ ]
GlobalScope.removeBadValues()
- [ ]
Mainkt.removeBadValues
- [ ]
removeBadValues
Q19. Which code snippet correctly shows a for loop using a range to display "1 2 3 4 5 6"?
- [ ]
for(z in 1..7) println("$z ")
- [x]
for(z in 1..6) print("$z ")
- [ ]
for(z in 1 to 6) print("$z ")
- [ ]
for(z in 1..7) print("$z ")
Q20. You are upgrading a Java class to Kotlin. What should you use to replace the Java class's static fields?
- [ ] an anonymous object
- [ ] a static property
- [x] a companion object
- [ ] a backing field
Q21. Your code need to try casting an object. If the cast is not possible, you do not want an exception generated, instead you want null to be assigned. Which operator can safely cast a value?
- [x] as?
- [ ] ??
- [ ] is
- [ ] as
Q22. Kotlin will not compile this code snippet. What is wrong?
class Employee
class Manager : Employee()
- [x] In order to inherit from a class, it must be marked open
- [ ] In order to inherit from a class, it must be marked public
- [ ] In order to inherit from a class, it must be marked sealed
- [ ] In order to inherit from a class, it must be marked override
Q23. Which function changes the value of the element at the current iterator location?
- [ ]
change()
- [ ]
modify()
- [ ]
set()
- [ ]
assign()
Q24. From the Supervisor subclass, how do you call the Employee class's display() method?
open class Employee(){
open fun display() = println("Employee display()")
}
class Supervisor : Employee() {
override fun display() {
println("Supervisor display()")
}
}
- [ ]
Employee.display()
- [ ]
::display()
- [x]
super.display()
- [ ]
override.display()
Q25. The code below compiled and executed without issue before the addition of the line declaring errorStatus. Why does this line break the code?
sealed class Status(){
object Error : Status()
class Success : Status()
}
fun main(){
var successStatus = Status.Success()
var errorStatus = Status.Error()
}
- [ ] StatusError is an object, not a class and cannot be instantiated
- [ ] Only one instance of the class Status can be instantiated at a time
- [ ] Status.Error must be declared as an immutable type
- [ ] Status.Error is pribate to class and cannot be declared externally
Q26. The code below is expected to display the numbers from 1 to 10, but it does not. Why?
val seq = sequence { yieldAll(1..20) }
.filter { it < 11 }
println(seq)
- [ ] You cannot assign a sequence to a variable
- [x] To produce result, a sequence must have terminal operation. In this case, it needs a .toList()
- [ ] The .filter{ it < 11 } should be .filter{ it > 11 }
- [ ] The yieldAll(1..20) should be yieldAll(1..10)
Q27. What three methods does this class have?
class Person
- [x]
equals(), hashCode(), and toString()
reference
- [ ]
equals(), toHash(), and super()
- [ ]
print(), println(), and toString()
- [ ]
clone(), equals(), and super()
Q28. Which is the proper way to declare a singleton named DatabaseManager?
- [x]
object DatabaseManager {}
- [ ]
singleton DatabaseManager {}
- [ ]
static class DatabaseManager {}
- [ ]
data class DatabaseManager {}
Q29. In order to subclass the Person class, what is one thing you must do?
abstract class Person(val name: String){
abstract fun displayJob(description: String)
}
- [ ] The subclass must be marked sealed
- [x] You must override the displayJob() method reference
- [ ] You must mark the subclass as final
- [ ] An abstract class cannot be extended, so you must change it to open
Q30. The code snippet below translates a database user to a model user. Because their names are both User, you must use their fully qualified names, which is cumbersome. You do not have access to either of the imported classes' source code. How can you shorten the type names?
import com.tekadept.app.model.User
import com.tekadept.app.database.User
class UserService{
fun translateUser(user: com.tekadept.app.database.User): User =
com.tekadept.app.model.User("${user.first} ${user.last}")
}
- [ ] Use import as to change the type name
- [ ] Create subtypes with shorter names
- [ ] Create interfaces with shorter names
- [ ] Create extension classes with shorter names
- [ ]
obj.classInfo()
- [ ]
obj.typeInfo()
- [x]
obj::class.simpleName
reference
- [ ]
obj::class
Q32. Which is the correct declaration of an integer array with a size of 5?
- [ ]
val arrs[5]: Int
- [x]
val arrs = IntArray[5]
reference
- [ ]
val arrs: Int[5]
- [ ]
val arrs = Array<Int>(5)
Q33. You have created a class that should be visible only to the other code in its module. Which modifier do you use?
- [x]
internal
reference
- [ ]
private
- [ ]
public
- [ ]
protected
Q34. Kotlin has two equality operators, == and ===. What is the difference?
- [ ] == determines if two primitive types are identical. === determines if two objects are identical
- [ ] == determines if two references point to the same object. === determines if two objects have the same value
- [ ] == determines if two objects have the same value. === determines if two strings have the same value
- [x] == determines if two objects have the same value. === determines if two references point to the same object reference
Q35. Which snippet correctly shows setting the variable max to whichever variable holds the greatest value, a or b, using idiomatic Kotlin?
- [ ]
val max3 = a.max(b)
- [ ]
val max = a > b ? a : b
- [x]
val max = if (a > b) a else b
- [ ]
if (a > b) max = a else max = b
Q36. You have an enum class Signal that represents the state of a network connection. You want to print the position number of the SENDING enum. Which line of code does that?
- [ ]
println(Signal.SENDING.position())
- [ ]
println(Signal.SENDING.hashCode())
- [ ]
println(Signal.SENDING)
- [x]
println(Signal.SENDING.ordinal)
reference
Q37. Both const and @JvmField create constants. What can const do that @JvmField cannot?
- [ ] const is compatible with Java, but @JvmField is not
- [ ] The compiler will inline const so it is faster and more memory efficient
- [ ] Virtually any type can be used with const but not @JvmField
- [ ] const can also be used with mutable types
Q38. You have a when expression for all of the subclasses of the class Attribute. To satisfy the when, you must include an else clause. Unfortunately, whenever a new subclass is added, it returns unknown. You would prefer to remove the else clause so the compiler generates an error for unknown subtypes. What is one simple thing you can do to achieve this?
- [ ] Replace
open
with closed
- [ ] Replace
open
with sealed
- [ ] Replace
open
with private
- [ ] Replace
open
with public
Q39. You would like to know each time a class property is updated. Which code snippet shows a built-in delegated property that can accomplish this?
- [ ]
Delegates.watcher()
- [x]
Delegates.observable()
reference
- [ ]
Delegates.rx()
- [ ]
Delegates.observer()
Q40. Why doesn't this code compile?
- [ ] infix function must be marked public
- [ ] In Kotlin, add is a keyword
- [ ] Extension functions use it, not this, as the default parameter name
- [ ] infix functions cannot have default values
Q41. What is the correct way to initialize a nullable variable?
- [ ]
val name = null
- [ ]
var name: String
- [ ]
val name: String
- [x]
val name: String? = null
Q42. Which line of code is a shorter, more idiomatic version of the displayed snippet?
- [ ]
val len = x?.let{x.len} else {-1}
- [ ]
val len = x!!.length ?: -1
- [ ]
val len:Int = (x != null)? x.length : -1
- [x]
val len = x?.length ?: -1
Q43. You are creating a Kotlin unit test library. What else should you add to make the following code compile without error?
- [ ] The extension function should be marked public
- [ ] Add the prefix operator to the shouldMatch extension function
- [ ] The code is not legal in Kotlin
- [ ] Add the prefix infix to the shouldMatch extension function
Q44. What is the difference between the declarations of COLOR and SIZE?
- [ ] Since COLOR and SIZE are both immutable, they are identical internally
- [ ] Both are immutable, but the use of the keyword const makes COLOR slower and less space efficient than SIZE
- [ ] const makes COLOR faster, but not compatible with Java. Without const, SIZE is still compatible with Java
- [ ] Both are immutable, but the use of the keyword const makes COLOR faster and mroe space efficient than SIZE


Thunderstorm in Glasgow, July 25, 2013
Rattle my heart, four-chambered sound
loosen my language from my teeth
tumble raaed out from a fallow throat
and a forgotten year
when hunched in barracks beneath the rain
that gushed from gutters, corrugated roofs
one sister clutched her mother’s hand
and one strained, strained against her grip
wanting the wet, the loud, the dark, the bright,
to shake hands with that searing flash
and make it her friend.
Say aasfi, say ghaymi,
unbury the words with this digging rain,
remember how gardens seemed to sprout from stone
as water struck it, drops unnumbered
fountaining upwards as if to try
for a place in the sky again.
Say aaskar, say hammam,
recall wondering why soldiers
needed such a big bathroom anyway—
while the storm sluiced over eaves and doors
and stirred into the sea—
gather the words like clouds to burst,
but remember too, the vicious truth:
when the sky lashed hard and cracked the air,
when you hipped your fists and stared it down,
shouting patience, shouting peace
as only a child can—
you left raaed, ghaymi, aasfi, hammam,
aaskar in your mother’s hand,
spoke English to the rain.


Hi! I’m a senior at Cal studying Computer Science, Integrative Biology, and English. If you can’t tell from all my majors, I love learning and trying new things! I discovered computer science at the end of my junior year when on a whim I took CS61A, the introductory CS class at Cal. I loved the class so much that I decided that I would add the major no matter how late in the game it was and still graduate in four years! I hope to find ways to combine my multiple backgrounds and create software that can really help people.
I was raised in the boonies of Pioneertown, CA where we lived on a dirt trail and most of my neighbors had some form of livestock. We had four horses, two goats, five dogs, two cats, a pig, a handful of chickens, and then there was me, the youngest of nine children. My parents were a part of the Hare Krishna movement when they were younger so all of us ended up with Indian names. You'll have to ask me to list them off.
Living with so many animals probably first sparked my interest in biology and after a year at Cal I was set on the course to be a wildlife biologist, then a doctor, no, a vet. I simply could not settle on one course of life with biology. All I knew was that I wanted to do something that could impact people. When I started learning how to program I was so excited that I could finally build things and get some hands on experience!
I'm excited to move forward with my computer science career and continue to build new things. I am extremely interested in efficient algorithms, artificial intelligence, computational biology, and graphic design. There is a lot to learn, but I hope to find an awesome position as a Software Engineer and continue to build new hacks just for fun!
Housemates is a web application written in Python using the Flask microframework. I wanted to create a website that would help housemates manage the yuckier parts of living together, such as who does which chores and when. Housemates using my website can track bills and receive friendly text reminders when bill due dates are approaching. Each house receives its own private space to post house events and send messages to each other.
My team and I built a simple platformer game using the Pyglet game framework at a 12 hour hackathon and won 6th place! All of the graphics were designed and drawn by us using Photoshop and imported into the game framework. Octi, the alien protagonist of our game, has been separated from his dad, and using his special teleportation jumps has to navigate through the dangerous human world to return to his parent. Feel free to download and try out the game from my github!
For my compilers class I designed and wrote a JavaScript DSL that helps users compose regular expressions using method chaining, function composition, and set operations, e.g. intersect, complement, union. The set operations functionality parses REs to create ASTs which are then converted into automata (NFAs and DFAs) that after applying the set operation are converted back into brand new REs that the user did not have to compose.
For my networking class, I implemented a stateful active application-layer firewall in Python. My firewall generated packets in response to denied packets as well as log selected http transcations over TCP connections. The firewall first takes in a set of rules to apply to incoming and outgoing packet. Each IPv4 packet is parsed to determine the necessary fields such as source and destination addresses as well as protocol type (TCP, UDP, or ICMP) and the correct rule is applied to determine whether to drop or pass the packet. (email me for the code)
For my compilers class, I wrote a complete interpreter in Javascript for a simple language called CS164. It is capable of defining variables, functions, dictionaries, lists, lambdas, coroutines, objects with protocol based inheritance, and much more! In addition, it is also tail call optimized! (email me for the code)
For my data structures class, I wrote a compressor engine in Java that could compress any type of file or even directories. The engine first scans through the file byte-by-byte and determines the best encoding map with Huffman Encoding. Then the files stream into the compressor which encodes them. (email me for the code)
For my final project in data structures. I built a puzzle solver in Java that takes in the initial game state of a puzzle and some type of goal. Then the program chooses the best option of graph searches to find the optimal solution. The graph searches I used were A*, Iterative deepening, depth-first search and combinations of these algorithms. I also wrote the heuristic functions to greatly prune the search states. (email me for the code)


You are looking for a world class management system to monitor/manage telecom/networking and IoT devices.
We provide software and services to deliver a complete management solution that is secure, scalable, and easy to use.
Our experience, and being a “one stop shop” for your management needs along with 100% customer satisfaction sets us apart.
You are a device manufacturer looking for an EMS or enhance your existing EMS/NMS.
You are a warehouse, campus, office, dealership or parking garage interested in lowering lighting costs.