|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object android.support.v4.app.ShareCompat.IntentBuilder
public static class ShareCompat.IntentBuilder
IntentBuilder is a helper for constructing Intent#ACTION_SEND
and
Intent#ACTION_SEND_MULTIPLE
sharing intents and starting activities
to share content. The ComponentName and package name of the calling activity
will be included.
| Method Summary | |
|---|---|
ShareCompat.IntentBuilder |
addEmailBcc(java.lang.String address)
Add an email address to be used in the "bcc" field of the final Intent. |
ShareCompat.IntentBuilder |
addEmailBcc(java.lang.String[] addresses)
Add an array of email addresses to be used in the "bcc" field of the final Intent. |
ShareCompat.IntentBuilder |
addEmailCc(java.lang.String address)
Add an email address to be used in the "cc" field of the final Intent. |
ShareCompat.IntentBuilder |
addEmailCc(java.lang.String[] addresses)
Add an array of email addresses to be used in the "cc" field of the final Intent. |
ShareCompat.IntentBuilder |
addEmailTo(java.lang.String address)
Add an email address to be used in the "to" field of the final Intent. |
ShareCompat.IntentBuilder |
addEmailTo(java.lang.String[] addresses)
Add an array of email addresses to be used in the "to" field of the final Intent. |
ShareCompat.IntentBuilder |
addStream(Uri streamUri)
Add a stream URI to the data that should be shared. |
Intent |
createChooserIntent()
Create an Intent that will launch the standard Android activity chooser, allowing the user to pick what activity/app on the system should handle the share. |
static ShareCompat.IntentBuilder |
from(Activity launchingActivity)
Create a new IntentBuilder for launching a sharing action from launchingActivity. |
Intent |
getIntent()
Retrieve the Intent as configured so far by the IntentBuilder. |
ShareCompat.IntentBuilder |
setChooserTitle(java.lang.CharSequence title)
Set the title that will be used for the activity chooser for this share. |
ShareCompat.IntentBuilder |
setChooserTitle(int resId)
Set the title that will be used for the activity chooser for this share. |
ShareCompat.IntentBuilder |
setEmailBcc(java.lang.String[] addresses)
Set an array of email addresses to BCC on this share. |
ShareCompat.IntentBuilder |
setEmailCc(java.lang.String[] addresses)
Set an array of email addresses to CC on this share. |
ShareCompat.IntentBuilder |
setEmailTo(java.lang.String[] addresses)
Set an array of email addresses as recipients of this share. |
ShareCompat.IntentBuilder |
setHtmlText(java.lang.String htmlText)
Set an HTML string to be sent as part of the share. |
ShareCompat.IntentBuilder |
setStream(Uri streamUri)
Set a stream URI to the data that should be shared. |
ShareCompat.IntentBuilder |
setSubject(java.lang.String subject)
Set a subject heading for this share; useful for sharing via email. |
ShareCompat.IntentBuilder |
setText(java.lang.CharSequence text)
Set the literal text data to be sent as part of the share. |
ShareCompat.IntentBuilder |
setType(java.lang.String mimeType)
Set the type of data being shared |
void |
startChooser()
Start a chooser activity for the current share intent. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static ShareCompat.IntentBuilder from(Activity launchingActivity)
launchingActivity
- Activity that the share will be launched from
public Intent getIntent()
To create an intent that will launch the activity chooser so that the user
may select a target for the share, see createChooserIntent()
.
public Intent createChooserIntent()
public void startChooser()
Note that under most circumstances you should use
ShareCompat.configureMenuItem()
to add a Share item to the menu while
presenting a detail view of the content to be shared instead
of invoking this directly.
public ShareCompat.IntentBuilder setChooserTitle(java.lang.CharSequence title)
title
- Title string
public ShareCompat.IntentBuilder setChooserTitle(int resId)
resId
- Resource ID of the title string to use
public ShareCompat.IntentBuilder setType(java.lang.String mimeType)
mimeType
- mimetype of the shared data
Intent#setType(String)
public ShareCompat.IntentBuilder setText(java.lang.CharSequence text)
text
- Text to share
Intent#EXTRA_TEXT
public ShareCompat.IntentBuilder setHtmlText(java.lang.String htmlText)
EXTRA_TEXT
has not already been supplied,
a styled version of the supplied HTML text will be added as EXTRA_TEXT as
parsed by Html.fromHtml
.
htmlText
- A string containing HTML markup as a richer version of the text
provided by EXTRA_TEXT.
setText(CharSequence)
public ShareCompat.IntentBuilder setStream(Uri streamUri)
This replaces all currently set stream URIs and will produce a single-stream ACTION_SEND intent.
streamUri
- URI of the stream to share
Intent#EXTRA_STREAM
public ShareCompat.IntentBuilder addStream(Uri streamUri)
streamUri
- URI of the stream to share
Intent#EXTRA_STREAM
,
Intent#ACTION_SEND
,
Intent#ACTION_SEND_MULTIPLE
public ShareCompat.IntentBuilder setEmailTo(java.lang.String[] addresses)
addresses
- Email addresses to send to
Intent#EXTRA_EMAIL
public ShareCompat.IntentBuilder addEmailTo(java.lang.String address)
address
- Email address to send to
Intent#EXTRA_EMAIL
public ShareCompat.IntentBuilder addEmailTo(java.lang.String[] addresses)
addresses
- Email addresses to send to
Intent#EXTRA_EMAIL
public ShareCompat.IntentBuilder setEmailCc(java.lang.String[] addresses)
addresses
- Email addresses to CC on the share
Intent#EXTRA_CC
public ShareCompat.IntentBuilder addEmailCc(java.lang.String address)
address
- Email address to CC
Intent#EXTRA_CC
public ShareCompat.IntentBuilder addEmailCc(java.lang.String[] addresses)
addresses
- Email addresses to CC
Intent#EXTRA_CC
public ShareCompat.IntentBuilder setEmailBcc(java.lang.String[] addresses)
addresses
- Email addresses to BCC on the share
Intent#EXTRA_BCC
public ShareCompat.IntentBuilder addEmailBcc(java.lang.String address)
address
- Email address to BCC
Intent#EXTRA_BCC
public ShareCompat.IntentBuilder addEmailBcc(java.lang.String[] addresses)
addresses
- Email addresses to BCC
Intent#EXTRA_BCC
public ShareCompat.IntentBuilder setSubject(java.lang.String subject)
subject
- Subject heading for this share
Intent#EXTRA_SUBJECT
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


KeyboardManagerEvent
public enum KeyboardManagerEvent
The object contains type of keyboard transition and parsed userInfo
dictionary
data object
-
UIKeyboardWillShow notification case event
Declaration
Swift
case willShow(KeyboardManagerEvent.Data)
-
UIKeyboardDidShow notification case event
Declaration
Swift
case didShow(KeyboardManagerEvent.Data)
-
UIKeyboardWillHide notification case event
Declaration
Swift
case willHide(KeyboardManagerEvent.Data)
-
UIKeyboardDidHide notification case event
Declaration
Swift
case didHide(KeyboardManagerEvent.Data)
-
UIKeyboardWillChangeFrame notification case event
Declaration
Swift
case willFrameChange(KeyboardManagerEvent.Data)
-
UIKeyboardDidChangeFrame notification case event
Declaration
Swift
case didFrameChange(KeyboardManagerEvent.Data)
-
Object with
See moreUIKeyboardFrameBeginUserInfoKey
andUIKeyboardFrameEndUserInfoKey
notification’suserInfo
valuesDeclaration
Swift
public struct Frame
-
Keyboard notification’s
See moreuserInfo
parsed objectDeclaration
Swift
public struct Data


Controller is currenty connected to game
Controller is currently unactive
Final Score
Please enter your name to go on leaderboard
Connection to mobile has been lost
Game will automatically try to connect to mobile device
Game will be canceled after 10 seconds!
Phone is currently unactive
Please focus window to resume gameplay!
Lost connection with desktop
Waiting for desktop game to start
You have hit an astroid!


fun classificationPopulated(@NotNullgroup:java.lang.String): void
Called when classification data for a specific group of classifications is populated from the
API call. If all the data is loaded then mMoreInfoButton is set to be visible.
Parameters
group - a group of classifications populated by the API


We care about investors—so we're bringing traditional theories of legal advocacy into the crypto sphere by letting trustless experts compete to sway token scores. The result is a decentralized ratings platform offering truly objective token valuations.
VEVA is a peer-to-peer network of trustless experts, resulting in completely decentralized token ratings.
We use a prosecutor-and-jury model to extract the best arguments and facts while minimizing noise and bias.
The end result of our whole system is, of course, our token ratings.
You can click on any coin to learn more, see historical data and read the briefs——or keep exploring to see our full ratings!
| Rating | Name | Ticker | Price | Market Cap | Last 5 Ratings | Last Review | Consensus | More |
|---|---|---|---|---|---|---|---|---|
| 1 | Bitcoin | BTC | $9,126 | 160,000,000,000 | 8.1 | 2 weeks ago | Bear | more |
| 2 | Ethereum | ETH | $779 | 17,000,000,000 | 9.2 | 4 days ago | Strong Bull | more |
| 3 | Ripple | XRP | $0.86 | 15,000,000,000 | 5.5 | 5 days ago | Strong Bear | more |
| 4 | Neo | NEO | $77 | 9,000,000,000 | 9.2 | 2 weeks ago | Bull | more |
| 5 | Litecoin | LTC | $188 | 11,000,000,000 | 4.0 | 1 day ago | Bull | more |
| 6 | Monero | XMR | $299 | 2,000,000,000 | 7.9 | 1 month ago | Strong Bull | more |
| 7 | Tronix | TRX | $299 | 4,000,000,000 | 1.9 | 1 day ago | Strong Bear | more |
| 8 | Cardano | ADA | $0.29 | 8,000,000,000 | 6.6 | 3 weeks ago | Bull | more |
| 9 | Nem | XEM | $0.39 | 3,000,000,000 | 5.0 | 6 days ago | Neutral | more |
| 10 | EOS | EOS | $18 | 14,000,000,000 | 4.4 | 1 month ago | Bear | more |
Subscribe for news about events, new ratings, and more!
We'd love to hear from you! feel free to reach out with questions, comments, or just to say hello... or, you can apply to become an analyst using our application form! There is a signifcant waitlist, but don't worry, we will be in touch as soon as we can.
VEVA, Inc.
Palo Alto,
California,
USA
Email<EMAIL_ADDRESS>Phone: +1 555 5555
Twitter: @vevaone
Telegram: t.me/vevaone
Your application was sent successfully!
There was a problem.... please try again!


Happy day, I am mr Peter anika, a staff of the finance ministry in Liberia. Please if you have contact in your country or a safe accommodation for a total sum of $5 million in cash,kindly reach me through my email address. Your progress response will enable me disclose the nature of the deal and my terms. Note that, i would want you to maintain the spirit of honesty,transparency and confidentiality in case we conclude to move ahead.Reach me too on<EMAIL_ADDRESS>looking forward to receiving your punctual response, Send also your contact phone number, for oral disscussion. Best wishes, Peter anika ________________________________________ Sfida subito i tuoi amici online! http://www.jumpy.mediaset.it/Canali_J/Giochi/Directory/Giochi_Multiplayer1.shtml


This package provides facilities for parsing and "compiling" XSLT stylesheets as well as executing the stylesheet with a source document to effect a transformation.


Testing. 1 2 3
SoundCloud is an online audio distribution platform and music sharing website based in Berlin, Germany.
It enables its users to upload, promote, and share audio.
Top 3 SoundCloud Artists That Went Mainstream:
Submit your favourite SoundCloud artist below:
Learn More


Game Flow
Help Me Pick New Logo Through 3 April 2016!
I am in the process of running a logo design contest on 99designs and have created a poll with 6 of the best logo designs I've received. I would love for you to vote on the logo design. It only takes a minute.
Like Sci-Fi? Read My New Online Fiction Series.
Do you like Sci-Fi? While I finish up my next novel, I have started an online fiction series called Forbearance. Picking up from the canteen scene in Bellicose, we meet Keius Minjen, a postal marine, as he tries to survive the battle planet Guna to exact revenge and one day liberate his homeland.
Sign-up if you want me to send you news about upcoming installments of Forbearance or my other writings.
INTERACTIVE HISTORY GAME Game flow
The flow of game is divided to rounds, with each round equaling 1, 5, 10 or any other number of years, as decided by the GM. Each round is divided to three phases: events, action declaration and resolution phase. In the Elyria game each round equals 1 year.
In the events phase any important events occuring during the year are determined and preliminary resolved. The events happen somewhen during the present round, or at the latter half of the previous round. Unless the happening time is explicitly specified it can be assumed that the ruling agencies will know about them by the middle of the round and will have time to make some kind of action regarding them. Different types of of events include:
- . Disasters (~10%25 chance for a 5 year period). This represents a random regressive element in the game.
- . Critical junctures resulting from societal/political unrest.
- . Some actions may have resulted in delayed effects. Their occurance is declared at this point.
- . In Elyria there are also lesser events, which may be positive or negative. They are determined randomly so that each society has ~10%25 chance to get an event per round.
In the actions declaration phase the actions of the ruling agency are declared. The last phase is the resolution phase. The declared actions are resolved in an appropriate order. The results result in regressions (some attributes drop), improvements (attributes increase) or incidentals and reactions (minor changes). The GM does most of his job at this phase. In Elyria the declaration and resolution phases overlap – the actions of the societies are resolved in the order they are recieved by the GM (or when the GM manages to find the time to resolve them).
See also: disasters and critical junctures Determinants
Each society has certain determinants or attributes. The attributes may be roughly divided to three groups: primary, political and capabilities. Most determinants have one of 9 possible values ranging in numerical values from -4 to +4: Miserable, Terrible, Poor, Mediocre, Fair, Good, Great, Superb and Legendary. Depending on context the attribute values may also have different kinds of labels, e.g. in quantity/size context they are Tiny, Very Small, Small, Mediocre, Fair, Big/large, Great, Huge and Vast.
The determinants are described on the determinants page.
See also: conversion from Aria to FUDGE, FUDGE dice. Actions
The actions represent the major policies and strategies set forth by the ruling agency, represented by the player. They are totally freeform. The player tells the GM what he tries and how he goes about it. The GM then decides approriate difficulity for the task and the attributes that are used to resolve it. Different kinds of actions are listed below:
Internal: develop/invest, intrigue, observation, elections, fundamental,
taxation, exile, civil war, negotiations
External: raid, observation, intimidation, diplomacy, espionage,
overtures, sanctions, block, alliance
Number of actions
In ARIA IH rules the number of actions a society had per game round depended among other things on its scope. IMO, this is not right. The scope just effects the … er … scope of the actions. Instead the number of actions for each society is the same. In Elyria the basic number of actions per round is 4. The players may also submit fewer actions, in which case they concentrate more on the remaining actions thus gaining a bonus, or more actions, in which case they divide their attention and get a penalty.
See also the details. Scope of actions
Typically societies only perform actions in their own scope. As an example of actions of different sized societies, consider the following list:
Build
One Person: build a new barn
Barony: build a new village
Empire: settle a small valley, including 10 villages
Develop
One person: develop a mining claim, extend the existing tunnel by 50 yards
Barony: develop a large mine, double production
Empire: develop 17 mines scattered throughout a mountain range
War
One person: murder his neighbor
Barony: sack some local villages, maybe beseige and take a nearby castle
Empire: invade and conquer an entire barony with several castles
Societies usually do not make actions of lesser scope – that should be beneath the notice of the ruling agency. However, if this is desired, or if you want to make actions in higher scope, then the scope difference can be used as a modifier. A particularly important case where the scope of the society has a significant effect on action resolution is research. However, this is handled in more detail in the special issues section.
There may be societies with radically difference scopes in the game at the same time. This raises the question of game balance, because in principle it would be easy for the big society to crush the smaller one. The balance comes from the huge empire and the tiny village not playing in the same league. The empire may conquer the village, but the village still exists regardless, though its environment may have radically changed. Strategic and normal actions
Finally there is an important mechanic by which the scope and timeframe of different kinds of actions can be taken into account. Obviously an intrigue action may take very little time to accomplish, while a development action, such as building a grand navy, should take several years to accomplish. This is what strategic actions are for. They correspond to longterm actions, like development, research, longterm military campaigns etc. They typically have permanent effects and can considerably change the society. In the actual game the player declares a strategic action, the GM tells how much time it’ll take to accomplish, and only after this time has gone the action is resolved. Note that the player has to spend an action each round for the strategic action as long as it continues.
The normal actions are short-term: raids, small campaigns, intrigue, observation, negotiation, etc. They are used to support strategic actions, respond to actions by other societies, make smaller scale improvements and to resolve other short-term actions. E.g. thinking of war one could use a normal action to conquer an important city and a strategic action to ensure its control.
See also the details. Effects of actions
The results of actions effect the determinants of the society. Alternatively they may effect other actions. Normal actions only have temporary effects, typically 1-2 rounds. A rule of thumb for determining the effects of an action is to take the action result as a number (like -2 for severe failure or +1 for success) and distribute an equal number of plusses or minuses to appropriate determinant over the next few years. Strategic actions typically have much more long-lasting, or even permanent effects.
Some actions are special in the sense that their effects will not be obvious at first. They will build up momentum and finally reach their goal only slowly. An example would be a suggesfull exploration mission across unknown land which would uncover a new trading route. No immediate effect will appear, but over the course of several years the trading route grows in magnitude and finally increases the base Trade determinant of the society by one.
The delayed effects will have a base value which must increase to +1 for the effect to take place. Each round a 4DF is rolled for each effect, added to the base value, and if the result is >=0, the base value is increased by one. Until they occur, the delayed effects are very sensitive to other events in the society. A delayed effect represents a potential in the society. The expection times for different base values are: 127 years (-4), 27 years (-3), 10 years (-2), 5 years (-1) and 2 years (0). Of course the variances are considerable.
The effects may be accompanied by incidentals (single but important events) and reactions (behavioral changes in the populace). These give a special flavour to the game, and are therefore recommended. In Elyria the results are always described to create a feeling of history to the game. This amounts to the same thing as incidentals and reactions. In Elyria it is generally left to the players to flesh out the results; the GM only provides the primary events and results. This way the players have more control over their society. It also saves quite a lot of work from the GM…
See also: resolution. Special considerations Technological advancement
Technological (or magical) advancement is a major subject in a game where whole societies are involved. There are three areas where available technology is especially important: agriculture (as it defines how many people can live per certain area), military force and trade. Available technology can really warp results, and because the IH rules do not yet have a good system to take it into account, technological advancement can severily unbalance the game.
Overall, there are 4 important aspects of society which keep technology at bay:
- . Innovative research is very hard. Thus it usually requires considerable amounts of effort, time and money.
- . The attitude of people: spending money and resources on something that does not pay back in a few years will seem very silly
- . Innovative research will cause all kinds of unstabilities as old allies become weak and new powerful factions form new groups
- . It is not enough just to make the invention: you have to build the infrastructure/knowledgebase to make it widespread enough to have any real effect, otherwise it’s just a toy or a curiosity.
A fifth aspect balancing the game is that assimilating new technology and techniques is a lot easier than inventing it in the first place. Thus, the flow of technology from high-tech societies towards low-tech societies typically ensures that a balance is achieved over time.
Technological advancement is performed in two steps: making the innovation and spreading it. The innovations may be refinements of existing crafts (sharper weapons, harder tools) or developing of a new craft (e.g. wider art approach, a true innovation or use of existing technology in a new way: etching with acid, case hardening). However to achieve a permanent effect, a development (or similar) action to make its use spread. This is typically easier for smaller societies.
See also the details. Playing key persons and organisations
Players may also play something else besides ruling agency; smaller societies (secret societies like free masons, or churches) or single individuals (key persons, heroes, saints). The key persons will have lots of political influence (although not as much as the ruling agency). The heroes will have some exceptional abilities, for example ‘strategist’ to gain +1 to all war related actions, or ‘Machiavelli’ to gain +1 to all intrigue attempts. The saints may also have some exceptional abilities, like ‘guru’ to gain +1 to all influence actions, or ‘mystical powers’ to gain +1 to war related actions or whatever. Too easy and too hard actions
If the task is clearly too easy (or too hard) for a person, the social effects of success (failure) are limited appropriately. For example if a person with a superb skill attempts an easy task, rolls a 0, and scores a superb success, the social influence is limited to the equivalent of a partial success, since the result was what everybody expected. Similarily if a person is forced to attempt something far out of his ability and fails, the attempt has only slight repercussions (partial failure), since nobody really expected a success. If the task was not forced upon him, a stupidity modifier is applied… What about the other societies?
I have found that the most work is not to invent what happens in a given society, but rather what happens in the other, non-player societies. I think a suitable way to handle them would be to roll them events in the events phase, something along the lines: disaster, economic depression, civil war, revolution, raid, war, change in philosophical orientation, and not care too much about the details.


Years in Review
If men could learn from history, what lessons it might teach us! But passion and party blind our eyes, and the light which experience gives us is a lantern on the stern which shines only on the waves behind.
- Samuel Taylor Coleridge
This page chronicles noteworthy events and statistics about the Bahamas back to the year 2000. Click on any reference link to find a more detailed article!
2016
- Loretta Butler-Turner becomes first woman to serve as Leader of the Opposition in Parliament [Ref]
- The FNM’s four Senators — appointed by Hubert Minnis — resigned following a vote of no confidence in Hubert Minnis as leader of the FNM party, allowing Loretta Butler-Turner to appoint Senators to serve at her pleasure [Ref]
- Loretta Butler-Turner appoints Leader of the Democratic National Alliance (DNA) Branville McCartney to the Senate and as Leader of Opposition Business [Ref]
- Loretta Butler-Turner appoints Rodney Moncur, Jude Knowles, and Monique Gomez as senators [Ref]
- Hubert Minnis faces removal as leader of the FNM by “rebel 7” but ultimately keeps position [Ref]
- Potential Ebola case ultimately ruled out [Ref]
- Zika cases confirmed in the Bahamas. CDC adds country to interim alert list [Ref]
- FNM Chairman Michael Pintard resigns as chairman and senator amid ongoing Peter Nygard &/Louis Bacon scandal [Ref]
- Second Bahamian Carnival held with budget of $7 million [Ref]
- Bahamians vote to deny women equal rights - again [Ref]
- Moody’s downgrades Bahamas’ credit rating to baa3, two ranks away from junk status, with stable outlook [Ref]
- Hurricane Matthew devastates Bahamas [Ref]
- Bahamas Power and Light (BPL) takes over Bahamas Electric Corporation (BEC) [Ref]
- Byran Woodside, former FNM Minister of State, joins the PLP [Ref]
- Simone Cambridge of Queen’s College named ABMS to attend McGill University to study Art History & Urban Studies [Ref]
2015
- Perry Christie says Baha Mar is not running out of cash (May 2015) [Ref]
- Baha Mar files for bankruptcy (July 2015) [Ref]
- Government budgets $9 million, spends $12.9 million on carnival [Ref]
- Fred Smith demands the immediate passage of a Freedom of Information Act [Ref]
- Rubis fuel spill in Marathon potentially exposes residents to cancer-causing agents [Ref] [Ref 2]
- MPs vote overwhelmingly against appointing a committee to investigate the Rubis gasoline spill of 2012 [Ref]
- Minimum wage increase from $150 to $210 per week planned to go into effect on August 15th [Ref]
- Hurricane Joaquin devastates the Bahamas [Ref]
- Marco City MP Gregory Moss resigns from the PLP to form the United Democratic Party [Ref]
- PLP Bamboo Town MP Renward Wells and PLP Fort Charlotte MP Dr. Andre Rollins join the FNM [Ref]
- Damian Gomez, Minister of State for Legal Affairs and MP for Central and South Eleuthera, resigned from Perry Christie’s cabinet [Ref]
- Sea Wall constructed in response to expectation that Bahamas will lose 80% of land by the end of the century [Ref] 149 murders, high levels of violent armed crimes, highest recorded to date [Ref]
- Value added tax (VAT) goes into effect [Ref]
- Domonic McDonald named ABMS to attend the University of Western Ontario and study Political Science and International Relations [Ref]
- Murder count: 149 - Highest recorded ever, 5th consecutive year over 100[Ref]
Deeper 2015 Year in Review by Elcott Coleby here Deeper 2015 Year in Review by Adrian Gibson here
2014
- Baha Mar announces it will not be ready to open in December as planned [Ref]
- Moody’s downgrades Bahamas’ credit rating to baa2 and changes outlook to stable [Ref]
- Groups unite for freedom of information rally [Ref]
- Audit reveals $10 million deficit in pharmacy inventory between the physical count and what was reflected on the Princess Margaret Hospital information systems [Ref]
- Resolution passes in House to borrow $16.1 million to transition COB to university status [Ref]
- Dr. Hubert Minnis defeats Loretta Butler-Turner to retain leadership of the FNM [Ref]
- Gabrielle Moss from XYZ named ABMS to attend Johns Hopkins University and study Applied Mathematics [Ref]
- Princess Margaret Hospital reports 40 more rape cases in 2013 than Royal Bahamas Police Force reports. [Ref]
- Princess Margaret Hospital reports 519 shot or stabbed in 2013 while Royal Bahamas Police Force reports 10 attempted murders. Accuracy of RBPF statistics questioned. [Ref]
- Highest recorded crime rate ever - last was 2013 [[Ref needed]][#]
- Murder count: 122 - Third highest murder rate among 13 Caribbean countries again [Ref] [[Ref2]][51]
2013
- Referendum to legalize gambling and establish national lottery defeated after at least $1.5 million spent on advertising for a yes vote [Ref]
- Why referendums are a terrible way to do anything* [Ref]
- Final stage of airport reconstruction completed [Ref]
- Perry Christie refuses to answer whether Lyford Cay billionaire, Peter Nygard, donated money to the PLP, Peter states he has [Ref]
- Several PLP MPs filmed at private meeting with Peter Nygard [Ref]
- The Royal Bahamas Defense Force refuses to investigate claims that one of its officers raped and impregnated a 24 year old Cuban woman while at the Carmichael Road Detention Center. They had just completed an investigation into claims its officers beat male Cuban detainees. [Ref]
- Value Added Tax discussed for implementation in 2014 [Ref]
- Shannon Butler from Queen’s College named ABMS to attend St. Andrew’s University and study Medicine [Ref]
- Highest recorded crime rate ever - last was 2012 [[Ref needed]][#]
- Murder count: 119 - Third highest murder rate among 13 Caribbean countries[Ref]
Deeper 2013 Year in Review by Bahama Pundit here
2012 - Election Year
- PLP wins election in landslide with 29/38 seats, the same number of seats they won in the 2002 election [Ref]
- Hubert Ingraham resigns as FNM party leader and as MP [Ref]
- Dr. Hubert Minnis wins unopposed to be new FNM party leader [Ref]
- Limited overseas voting becomes available [Ref]
- National debt stands at $5 billion - 50% of GDP. [Ref]
- Unemployment nationwide is 15.9% [Ref]
- Moody’s downgrades Bahamas’ credit rating to baa1 with negative outlook [Ref]
- Hurricane Sandy devastates the Bahamas. [Ref]
- Rubis gasoline spill of 2012 (*info on this spill) [[Ref needed]][#]
- Theophilus Moss from St. Augustine’s College named ABMS to attend Johns Hopkins University and study Mechanical Engineering [Ref]
- Highest recorded crime rate ever - last was 2011 [[Ref needed]][#]
- Murder count: 111 - First decrease since 2008, second consecutive year over 100, 26% unsolved by the end of the year [Ref]
- 97 rapes recorded across the Bahamas - 12 (additional) attempted, and 167 (additional) statutory [Ref]
Deeper 2012 Year in Review by Bahamas B2B here
2011
- BTC privatization finalized with sale of 51% of shares to Cable & Wireless Communications (CWC) [Ref]
- Branville McCartney resigns from the FNM and forms the DNA [Ref]
- New sport stadium to be constructed via financial assistance from the Chinese government will be top-knotch sporting facility [Ref]
- Moody’s revises Bahamas outlook from stable to negative [Ref]
- First stage of airport reconstruction completed [Ref]
- Hurricane Irene devastates Bahamas [Ref]
- Jamia Moss from St. Augustine’s College named ABMS to attend the College of St. Benedict and study Biochemistry and Spanish [Ref]
- Highest recorded crime rate ever - last was 2010 [[Ref needed]][#]
- Murder count: 127 - Highest recorded to date and ~50% were unsolved by the end of the year [Ref]
- 107 rapes recorded across the Bahamas - 84 on New Providence, 28 (additional) attempted, and 179 (additional) statutory rapes [Ref]
2010
- Clifford Bowe named ABMS to attend Georgia Institute of Technology [Ref]
- Highest recorded crime rate ever - last was 2009 [[Ref needed]][#]
- Murder count: 94 - Highest recorded to date and 5th highest among 15 caribbean countries at that time [Ref]
- 54 rapes recorded on New Providence [Ref]
2009
- Marital rape bill put forward by FNM but withdrawn due to public criticism [Ref needed]
- New Providence Road Improvement Project begins with a budget of $60 million and a timeline of 33.5 months.
- It would be completed after 48 months at over $240 million, four times the original amount [Ref]
- Jenna Chaplin named ABMS to attend University of The Pacific and study Fine Arts and Psychology [Ref]
- Highest recorded crime rate ever - last was 2008 [[Ref needed]][#]
- Murder count: 87 - Highest recorded to date [Ref]
2008
- The 2008 global financial crisis begins which will drastically affect nearly every country on Earth - potentially the worst financial crisis since the Great Depression[Ref]
- Hurricane Hanna devastates the Bahamas. [Ref]
- Genymphas Higgs named ABMS to attend Drexel University and study Biomedical Engineering [Ref]
- Highest recorded crime rate ever - last was 2007 [[Ref needed]][#]
- Murder count: 72 [Ref]
2007 - Election Year
- FNM wins election and inherits ~$8 million in budget surplus - which will turn into a $600 million deficit by 2012 [Ref] [Ref 2]
- Plans for Baha Mar announced [Ref]
- Lisa Rodgers from St. Andrews named ABMS to attend Brown University and study Education [Ref]
- Highest recorded crime rate ever - last was 2006 [[Ref needed]][#]
- Murder count: 78 - Highest recorded to date [Ref]
2006
- Kyle Chea named ABMS to attend Vassar College to study Medicine and Foreign Languages [Ref]
- Highest crime rate ever! [[Ref needed]][#]
- Murder count: 60 [Ref]
2005
- Hurricane Katrina and Wilma devastates the Bahamas. [Ref]
- Andrea Culmer named ABMS to attend McGill University to study Chemistry / Medicine [Ref]
- Highest recorded crime rate ever - last was 2004 [[Ref needed]][#]
- Murder count: 50 [Ref]
2004
- Hurricane Frances and Hurricane Jeanne [Ref]
- Sharelle Ferguson named ABMS to attend Harvard University and study Social Studies [Ref]
- Highest recorded crime rate ever - last was 2002 [[Ref needed]][#]
- Murder count: 44 [Ref]
2003
- Moody’s changes Bahamas’ A3 rating outlook from positive to stable [Ref]
- Sebastian Hutchinson named ABMS to attend the University of Pennsylvania and study Finance and Accounting [Ref]
- Murder count: 50 [Ref]
2002 - Election Year
- The PLP wins the election in a landslide, defeating the governing FNM [Ref]
- Bahamians vote to deny women equal rights [Ref]
- Moody’s changes Bahamas’ A3 rating outlook from stable to positive [Ref]
- Dr. Peter Blair from St. Andrew’s named ABMS to attend Duke University and study Physics and Mathematics [Ref]
- Highest recorded crime rate ever! [[Ref needed]][#]
- Murder count: 52 [Ref]
Deeper 2002 Year in Review here
2001
- The September 11 terrorist attack occurs and consequent measures increase the difficulty of traveling to the US [Ref]
- Moody’s changes Bahamas’ A3 rating outlook from positive to stable [Ref]
- Hurricane Michelle hits the Bahamas [Ref]
- Murder count: 43 [Ref]
2000
- Ricardo Davis named All Bahamas Merit Scholar (ABMS) to attend Queen’s University and study Biochemistry [Ref]
- Murder count: 73 [Ref]
Acronyms
FNM: Free National Movement
PLP: Political Liberal Party
MP: Memeber of Parliament
BPL: Bahamas Power & Light
BEC: Bahamas Electrical Corporation
BTC: Bahamas Telecommunications Company
CDC: Centers for Disease Control and Prevention


Bridgewater Associates bets over $1 billion on market drop: WSJ
by Reuters(Reuters) - Bridgewater Associates LP, a hedge fund founded by billionaire Ray Dalio, has bet more than $1 billion that stock markets around the world will fall by March, the Wall Street Journal reported on Friday, citing people familiar with the matter.
The bet, assembled over a span of months and executed by a handful of Wall Street firms, including Goldman Sachs Group Inc (N:GS) and Morgan Stanley (N:MS), would pay off for the world's biggest hedge fund if either the S&P 500 (SPX) or the Euro Stoxx 50 (STOXX50E) — or both — declines, the report said.
The bet is made up of put options, contracts that give investors the right to sell stocks at a specific price by a certain date. The options expire in March and currently represent one of the largest bearish bets against the market, the report added.
Bridgewater Associates was not immediately available for comment.


Home
Shop
Contact
About us
Shoppinglist
List
Login
test
PHP Form Validation Example
Name:
E-mail:
Website:
Comment:
Gender:
Female
Male
CONTACT: SHOP: OUTDOOR LIVE TEL:<PHONE_NUMBER>8


PSU COIN
Home
Balance
Balance
PSU
(Student ID) Recipient
PSUCOIN
(PROFILE) Recipient
View on Etherscan
×
Loading .....


Ms. Magazine [ http://msmagazine.com/ ]
Ms on iPad [ http://store.feminist.org/getandgivems.aspx ]
Get the Ms. app, print edition, or both! [ http://store.feminist.org/getandgivems.aspx ]
Dear Dry,
1 in 5.  The vast majority of these rapes will be perpetrated by acquaintances and are never reported to law enforcement.
But now student activists are taking on the epidemic of campus rape to change how colleges treat survivors.
*Our latest issue of “Ms.”* [ http://msmagazine.com/winterspring2014/index.asp ] follows the growing momentum on campuses across the country, identifying the latest strategies in preventing and responding to sexual assault.
*Get the full story in our newest edition of “Ms.”! [ http://store.feminist.org/getandgivems.aspx ]***
Also featured in this issue that you won’t want to miss:
* Cofounder of “Ms”. and feminist leader Gloria Steinem looks ahead at the unfinished work of the feminist movement
* The Catholic Church hierarchy is now being confronted by the U.N. Committee on the Rights of the Child on its decades of priest sexual abuse
* In the face of a gridlocked Congress that won’t raise the federal minimum wage, cities, states and President Obama are acting to right the inequity
* “Ms. "examines the impact of Congressional cuts to food stamps
*Join "Ms”. today. [ http://store.feminist.org/getandgivems.aspx ]* Choose the format that fits your life: digital only, print only, or digital and print. Now you can take “Ms”. with you on the go.
For women’s equality.
Kathy Spillar
Katherine Spillar
Executive Editor
PS: If you join the “Ms”. community, you can have the latest issue sent straight to your mailbox and read it digitally on the Ms. app for only $29.95. [ http://store.feminist.org/getandgivems.aspx ]
“You have received this e-mail because of your interest in promotions and Ms. magazine. To unsubscribe, please click here. [ http://org.salsalabs.com/o/1400/p/salsa/supporter/unsubscribe/public/index.sjs?unsubscribe_page_KEY=494 ]”
1600 Wilson Boulevard, Suite 801, Arlington, VA 22209 |<PHONE_NUMBER> | webmaster@feminist.org


|
Machine Learning with R Basel R Bootcamp |
adapted from xkcd.com
In this practical, you’ll practice the basics of fitting and exploring regression models in R.
By the end of this practical you will know how to:
BaselRBootcamp
R project. It should already have the folders 1_Data
and 2_Code
. Make sure that the data file(s) listed in the Datasets
section are in your 1_Data
folder# Done!
Fitting_practical.R
in the 2_Code
folder.# Done!
library()
load the set of packages for this practical listed in the packages section above.# Load packages necessary for this script
library(tidyverse)
library(caret)
college_train.csv
. Using the following template, load the dataset into R as college_train
:# Load in college_train.csv data as college_train
college_train <- read_csv(file = "1_Data/college_train.csv")
college_train
# A tibble: 500 x 18
Private Apps Accept Enroll Top10perc Top25perc F.Undergrad P.Undergrad
<chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
1 Yes 1202 1054 326 18 44 1410 299
2 Yes 1415 714 338 18 52 1345 44
3 Yes 4778 2767 678 50 89 2587 120
4 Yes 1220 974 481 28 67 1964 623
5 Yes 1981 1541 514 18 36 1927 1084
6 Yes 1217 1088 496 36 69 1773 884
7 No 8579 5561 3681 25 50 17880 1673
8 No 833 669 279 3 13 1224 345
9 No 10706 7219 2397 12 37 14826 1979
10 Yes 938 864 511 29 62 1715 103
# … with 490 more rows, and 10 more variables: Outstate <dbl>,
# Room.Board <dbl>, Books <dbl>, Personal <dbl>, PhD <dbl>,
# Terminal <dbl>, S.F.Ratio <dbl>, perc.alumni <dbl>, Expend <dbl>,
# Grad.Rate <dbl>
dim()
function.# Print number of rows and columns of college_train
dim(XXX)
# Print number of rows and columns of college_train
dim(college_train)
[1] 500 18
names()
functionnames(XXX)
names(college_train)
[1] "Private" "Apps" "Accept" "Enroll" "Top10perc"
[6] "Top25perc" "F.Undergrad" "P.Undergrad" "Outstate" "Room.Board"
[11] "Books" "Personal" "PhD" "Terminal" "S.F.Ratio"
[16] "perc.alumni" "Expend" "Grad.Rate"
View()
. How does it look?View(XXX)
# Convert character to factor
college_train <- college_train %>%
mutate_if(is.character, factor)
In caret
, we define the computational nuances of training using the trainControl()
function. Because we’re learning the basics of fitting, we’ll set method = "none"
for now. (Note that you would almost never do this for a real prediction task, you’ll see why later!)
# Set training resampling method to "none" to keep everything super simple
# for demonstration purposes. Note that you would almost never
# do this for a real prediction task!
ctrl_none <- trainControl(method = "none")
Grad.Rate
) as a function of one feature PhD
(percent of faculty with PhDs). Save the result as an object Grad.Rate_glm
. Specifically,…form
argument to Grad.Rate ~ PhD
.data
argument to your training data college_train
.method
argument to "glm"
for regression.trControl
argument to ctrl_none
, the object you created previously.# Grad.Rate_glm: Regression Model
# Criterion: Grad.Rate
# Features: PhD
Grad.Rate_glm <- train(form = XX ~ XX,
data = XX,
method = "XX",
trControl = XX)
# Grad.Rate_glm: Regression Model
# Criterion: Grad.Rate
# Features: PhD
Grad.Rate_glm <- train(form = Grad.Rate ~ PhD,
data = college_train,
method = "glm",
trControl = ctrl_none)
summary()
function, by setting the function’s first argument to Grad.Rate_glm
.# Show summary information from the regression model
summary(XXX)
# Show summary information from the regression model
summary(Grad.Rate_glm)
Call:
NULL
Deviance Residuals:
Min 1Q Median 3Q Max
-43.83 -10.44 0.49 10.93 41.47
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 41.372 3.382 12.23 < 2e-16 ***
PhD 0.330 0.045 7.33 9.1e-13 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for gaussian family taken to be 257)
Null deviance: 141641 on 499 degrees of freedom
Residual deviance: 127832 on 498 degrees of freedom
AIC: 4197
Number of Fisher Scoring iterations: 2
# For every increase of one in PhD (the percent of faculty with a PhD), the expected graduation rate increases by 0.33
glm_fit
. Tip: Set the first argument to Grad.Rate_glm
.# Get fitted values from the Grad.Rate_glm model and save as glm_fit
glm_fit <- predict(XXX)
# Get fitted values from the model and save as glm_fit
glm_fit <- predict(Grad.Rate_glm)
glm_fit
object using the code below - what are these values? Do they look reasonable? That is, are they in the range of what you expect the criterion to be?# Plot glm_fit
hist(glm_fit)
# Yes, values appear to be within 40 and 80, which is what we expect from the truth population.
criterion
as the actual graduation rates.# Define criterion as Grad.Rate
criterion <- college_train$Grad.Rate
postResample()
function, with the fitted values as the prediction, and the criterion as the observed values.Specifically,
pred
argument to glm_fit
(your fitted values).obs
argument to criterion
(a vector of the criterion values).# Regression Fitting Accuracy
postResample(pred = XXX, # Fitted values
obs = XXX) # criterion values
# Regression Fitting Accuracy
postResample(pred = glm_fit, # Fitted values
obs = criterion) # criterion values
RMSE Rsquared MAE
15.9895 0.0975 12.8633
# On average, the model fits are 12.8633 away from the true values.
# Whether this is 'good' or not depends on you :)
accuracy
- Raw absolute errorsaccuracy_agg
- Aggregate (i.e.; mean) absolute errors# accuracy - a dataframe of raw absolute errors
accuracy <- tibble(criterion = criterion,
Regression = glm_fit) %>%
gather(model, prediction, -criterion) %>%
# Add error measures
mutate(ae = abs(prediction - criterion))
# accuracy_agg - Dataframe of aggregate errors
accuracy_agg <- accuracy %>%
group_by(model) %>%
summarise(mae = mean(ae)) # Calculate MAE (mean absolute error)
accuracy
and accuracy_agg
objects to see how they look.accuracy
accuracy_agg
head(accuracy) # Just printing the first few rows
# A tibble: 6 x 4
criterion model prediction ae
<dbl> <chr> <dbl> <dbl>
1 65 Regression 67.1 2.12
2 69 Regression 58.5 10.5
3 83 Regression 66.8 16.2
4 49 Regression 61.5 12.5
5 80 Regression 65.5 14.5
6 67 Regression 52.9 14.1
head(accuracy_agg)
# A tibble: 1 x 2
model mae
<chr> <dbl>
1 Regression 12.9
# Plot A) Scatterplot of criterion versus predictions
ggplot(data = accuracy,
aes(x = criterion, y = prediction)) +
geom_point(alpha = .2) +
geom_abline(slope = 1, intercept = 0) +
labs(title = "Regression: One Feature",
subtitle = "Line indicates perfect performance",
x = "True Graduation Rates",
y = "Fitted Graduation Rates") +
xlim(0, 120) +
ylim(0, 120)
# No the model is not great, values do not fall very closely to the black diagonal line.
# Plot B) Violin plot of absolute errors
ggplot(data = accuracy,
aes(x = model, y = ae, fill = model)) +
geom_violin() +
geom_jitter(width = .05, alpha = .2) +
labs(title = "Distributions of Fitting Absolute Errors",
subtitle = "Numbers indicate means",
x = "Model",
y = "Absolute Error") +
guides(fill = FALSE) +
annotate(geom = "label",
x = accuracy_agg$model,
y = accuracy_agg$mae,
label = round(accuracy_agg$mae, 2))
# On average, the model fits are 12.86 away from the true criterion values.
# However, there is also quite a bit of variability
So far we have only used one feature (PhD
), to predict Grad.Rate
. Let’s try again, but now we’ll use a total of four features:
PhD
- the percent of faculty with a PhD.Room.Board
- room and board costs.Terminal
- percent of faculty with a terminal degree.S.F.Ratio
- student to faculty ratio.Grad.Rate_glm
which predicts Grad.Rate
using all 4 features (you can also call it something else if you want to save your original model!). Specifically,…form
argument to Grad.Rate ~ PhD + Room.Board + Terminal + S.F.Ratio
.data
argument to your training data college_train
.method
argument to "glm"
for regression.trControl
argument to ctrl_none
.# Grad.Rate_glm: Regression Model
# Criterion: Grad.Rate
# Features: PhD, Room.Board, Terminal, S.F.Ratio
Grad.Rate_glm <- train(form = XXX ~ XXX + XXX + XXX + XXX,
data = XXX,
method = "XXX",
trControl = XXX)
# Grad.Rate_glm: Regression Model
# Criterion: Grad.Rate
# Features: PhD, Room.Board, Terminal, S.F.Ratio
Grad.Rate_glm <- train(form = Grad.Rate ~ PhD + Room.Board + Terminal + S.F.Ratio,
data = college_train,
method = "glm",
trControl = ctrl_none)
summary()
. Which features seem to be important? Tip: set the first argument to Grad.Rate_glm
.summary(XXX)
summary(Grad.Rate_glm)
Call:
NULL
Deviance Residuals:
Min 1Q Median 3Q Max
-45.10 -9.63 0.40 10.07 48.55
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 38.635042 5.288467 7.31 1.1e-12 ***
PhD 0.217725 0.080744 2.70 0.0072 **
Room.Board 0.004674 0.000676 6.91 1.5e-11 ***
Terminal -0.021957 0.088196 -0.25 0.8035
S.F.Ratio -0.524664 0.176980 -2.96 0.0032 **
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for gaussian family taken to be 224)
Null deviance: 141641 on 499 degrees of freedom
Residual deviance: 110813 on 495 degrees of freedom
AIC: 4131
Number of Fisher Scoring iterations: 2
glm_fit
. I.e., set the first argument of predict()
to your Grad.Rate_glm
model.# Save new model fits
glm_fit <- predict(XXX)
# Save new model fits
glm_fit <- predict(Grad.Rate_glm)
postResample()
calculate the Mean Absolute Error (MAE) of your new model that uses 4 features. How does this compare to your previous model that only used 1 feature? Specifically,…pred
argument to glm_fit
, your model fits.obs
argument to criterion
, a vector of the true criterion values.# New model fitting accuracy
postResample(pred = XXX, # Fitted values
obs = XXX) # criterion values
# New model fitting accuracy
postResample(pred = glm_fit, # Fitted values
obs = criterion) # criterion values
RMSE Rsquared MAE
14.887 0.218 11.779
# The new MAE value is 11.779, it's better (smaller) than the previous model, but still not great (in my opinion)
# accuracy: a dataframe of raw absolute errors
accuracy <- tibble(criterion = criterion,
Regression = glm_fit) %>%
gather(model, prediction, -criterion) %>%
# Add error measures
mutate(ae = abs(prediction - criterion))
# accuracy_agg: Dataframe of aggregate errors
accuracy_agg <- accuracy %>%
group_by(model) %>%
summarise(mae = mean(ae)) # Calculate MAE (mean absolute error)
# Plot A) Scatterplot of criterion versus predictions
ggplot(data = accuracy,
aes(x = criterion, y = prediction)) +
geom_point(alpha = .2) +
geom_abline(slope = 1, intercept = 0) +
labs(title = "Regression: Four Features",
subtitle = "Line indicates perfect performance",
x = "True Graduation Rates",
y = "Fitted Graduation Rates") +
xlim(0, 120) +
ylim(0, 120)
# Plot B) Violin plot of absolute errors
ggplot(data = accuracy,
aes(x = model, y = ae, fill = model)) +
geom_violin() +
geom_jitter(width = .05, alpha = .2) +
labs(title = "Distributions of Fitting Absolute Errors",
subtitle = "Numbers indicate means",
x = "Model",
y = "Absolute Error") +
guides(fill = FALSE) +
annotate(geom = "label",
x = accuracy_agg$model,
y = accuracy_agg$mae,
label = round(accuracy_agg$mae, 2))
Alright, now it’s time to use all features available!
glm_fit
which predicts Grad.Rate
using all features in the dataset. Specifically,…form
argument to Grad.Rate ~ .
.data
argument to the training data college_train
.method
argument to "glm"
for regression.trControl
argument to ctrl_none
.Grad.Rate_glm <- train(form = XXX ~ .,
data = XXX,
method = "glm",
trControl = XXX)
Grad.Rate_glm <- train(form = Grad.Rate ~ .,
data = college_train,
method = "glm",
trControl = ctrl_none)
summary()
, which features seem to be important?summary(XXX)
summary(Grad.Rate_glm)
Call:
NULL
Deviance Residuals:
Min 1Q Median 3Q Max
-38.10 -7.24 -0.58 7.51 47.10
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 31.010972 5.911481 5.25 2.3e-07 ***
PrivateYes 1.701840 2.114677 0.80 0.42135
Apps 0.001926 0.000572 3.37 0.00082 ***
Accept -0.001754 0.001046 -1.68 0.09417 .
Enroll 0.005550 0.002872 1.93 0.05387 .
Top10perc -0.049727 0.086281 -0.58 0.56466
Top25perc 0.206252 0.066972 3.08 0.00219 **
F.Undergrad -0.001069 0.000461 -2.32 0.02068 *
P.Undergrad -0.001294 0.000444 -2.92 0.00369 **
Outstate 0.001782 0.000297 6.01 3.7e-09 ***
Room.Board 0.000871 0.000721 1.21 0.22790
Books -0.000932 0.004089 -0.23 0.81988
Personal -0.001457 0.000998 -1.46 0.14494
PhD 0.104743 0.071027 1.47 0.14095
Terminal -0.101789 0.076321 -1.33 0.18293
S.F.Ratio 0.275943 0.191423 1.44 0.15008
perc.alumni 0.219944 0.061576 3.57 0.00039 ***
Expend -0.000683 0.000202 -3.39 0.00077 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for gaussian family taken to be 155)
Null deviance: 141641 on 499 degrees of freedom
Residual deviance: 74595 on 482 degrees of freedom
AIC: 3960
Number of Fisher Scoring iterations: 2
glm_fit
.# Save new model fits
glm_fit <- predict(XXX)
# Save new model fits
glm_fit <- predict(Grad.Rate_glm)
# New model fitting accuracy
postResample(pred = glm_fit, # Fitted values
obs = criterion) # criterion values
RMSE Rsquared MAE
12.214 0.473 9.250
# accuracy: a dataframe of raw absolute errors
accuracy <- tibble(criterion = criterion,
Regression = glm_fit) %>%
gather(model, prediction, -criterion) %>%
# Add error measures
mutate(ae = abs(prediction - criterion))
# accuracy_agg: Dataframe of aggregate errors
accuracy_agg <- accuracy %>%
group_by(model) %>%
summarise(mae = mean(ae)) # Calculate MAE (mean absolute error)
# Plot A) Scatterplot of criterion versus predictions
ggplot(data = accuracy,
aes(x = criterion, y = prediction)) +
geom_point(alpha = .2) +
geom_abline(slope = 1, intercept = 0) +
labs(title = "Regression: All Features",
subtitle = "Line indicates perfect performance",
x = "True Graduation Rates",
y = "Fitted Graduation Rates") +
xlim(0, 120) +
ylim(0, 120)
# Plot B) Violin plot of absolute errors
ggplot(data = accuracy,
aes(x = model, y = ae, fill = model)) +
geom_violin() +
geom_jitter(width = .05, alpha = .2) +
labs(title = "Distributions of Fitting Absolute Errors",
subtitle = "Numbers indicate means",
x = "Model",
y = "Absolute Error") +
guides(fill = FALSE) +
annotate(geom = "label",
x = accuracy_agg$model,
y = accuracy_agg$mae,
label = round(accuracy_agg$mae, 2))
Now it’s time to do a classification task! Recall that in a classification task, we are predicting a category, not a continuous number. In this task, we’ll predict whether or not a college is Private or Public, this is stored as the variable college_train$Private
.
caret
, all you need to do is make sure that the criterion is coded as a factor. To test whether it is coded as a factor, you can look at its class
as follows.# Look at the class of the variable Private, should be a factor!
class(college_train$Private)
[1] "factor"
criterion
.# Define criterion as college_train$Private
criterion <- college_train$Private
train()
, create Private_glm
, a regression model predicting the variable Private
. Specifically,…form
argument to Private ~ .
.data
argument to the training data college_train
.method
argument to "glm"
.trControl
argument to ctrl_none
.# Fit regression model predicting Private
Private_glm <- train(form = XXX ~ .,
data = XXX,
method = "XXX",
trControl = XXX)
# Fit regression model predicting private
Private_glm <- train(form = Private ~ .,
data = college_train,
method = "glm",
trControl = ctrl_none)
Private_glm
object using the summary()
function.# Explore the Private_glm object
summary(XXX)
# Show summary information from the regression model
summary(Private_glm)
Call:
NULL
Deviance Residuals:
Min 1Q Median 3Q Max
-2.9426 -0.0453 0.0272 0.1179 2.5261
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 1.25e+00 2.28e+00 0.55 0.5839
Apps -2.79e-04 2.71e-04 -1.03 0.3028
Accept -1.21e-03 5.48e-04 -2.20 0.0276 *
Enroll 3.90e-03 1.40e-03 2.80 0.0052 **
Top10perc -1.67e-02 3.82e-02 -0.44 0.6619
Top25perc 3.09e-02 2.76e-02 1.12 0.2640
F.Undergrad -4.14e-04 1.68e-04 -2.46 0.0140 *
P.Undergrad -1.76e-04 2.05e-04 -0.86 0.3899
Outstate 8.48e-04 1.55e-04 5.47 4.5e-08 ***
Room.Board 7.35e-04 3.60e-04 2.04 0.0410 *
Books 3.42e-03 1.83e-03 1.87 0.0619 .
Personal -6.20e-04 3.88e-04 -1.60 0.1097
PhD -5.63e-02 3.73e-02 -1.51 0.1315
Terminal -6.57e-02 3.68e-02 -1.79 0.0739 .
S.F.Ratio -1.91e-01 7.46e-02 -2.56 0.0104 *
perc.alumni 4.77e-02 2.79e-02 1.71 0.0876 .
Expend 2.81e-05 1.53e-04 0.18 0.8542
Grad.Rate 7.30e-03 1.48e-02 0.49 0.6220
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 609.16 on 499 degrees of freedom
Residual deviance: 144.29 on 482 degrees of freedom
AIC: 180.3
Number of Fisher Scoring iterations: 8
# Looking at the z statistics, Outstate, Enroll and S.F.Ratio (...) have quite large z-statistics
glm_fit
.# Get fitted values from the Private_glm object
glm_fit <- predict(XXX)
# Get fitted values from the Private_glm object
glm_fit <- predict(Private_glm)
glm_fit
object - what are these values? Do they look reasonable?# Plot glm_fit
plot(glm_fit)
confusionMatrix()
. This function compares model predictions to a ‘reference’ (in our case, the criterion, and returns several summary statistics). In the code below, we’ll use glm_fit
as the model predictions, and our already defined criterion
vector as the reference (aka, truth). Specifically,…data
argument to your glm_fit
values.reference
argument to the criterion
values.# Show accuracy of glm_fit versus the true criterion values
confusionMatrix(data = XXX, # This is the prediction!
reference = XXX) # This is the truth!
# Show accuracy of glm_fit versus the true values
confusionMatrix(data = glm_fit, # This is the prediction!
reference = criterion) # This is the truth!
Confusion Matrix and Statistics
Reference
Prediction No Yes
No 133 13
Yes 16 338
Accuracy : 0.942
95% CI : (0.918, 0.961)
No Information Rate : 0.702
P-Value [Acc > NIR] : <2e-16
Kappa : 0.861
Mcnemar's Test P-Value : 0.71
Sensitivity : 0.893
Specificity : 0.963
Pos Pred Value : 0.911
Neg Pred Value : 0.955
Prevalence : 0.298
Detection Rate : 0.266
Detection Prevalence : 0.292
Balanced Accuracy : 0.928
'Positive' Class : No
# The overall accuracy is 0.942. Across all cases, the model fits the true class values 94.2% of the time.
# The sensitivity is 0.893. Of those colleges that truly are private, the model fits are correct 89.3% of the time.
# The PPV is 0.911. Of those colleges that are predicted to be private, 91.1% truly are private.
# The sensitivity is 0.963. Of those collges that truly are not private, the model fits are correct 96.3% of the time
# The NPV is 0.955. Of those colleges that are predicted to be public, 95.5% truly are public.
# Get overall accuracy from regression model
glm_accuracy <- confusionMatrix(data = glm_fit,
reference = criterion)$overall[1]
# Combine results into one table
accuracy <- tibble(Regression = glm_accuracy) %>%
gather(model, accuracy)
# Plot the results!
ggplot(accuracy, aes(x = model, y = accuracy, fill = model)) +
geom_bar(stat = "identity") +
labs(title = "Is a college private or public?",
subtitle = "Fitting classification accuracy",
y = "Overall Accuracy") +
ylim(c(0, 1)) +
annotate(geom = "label",
x = accuracy$model,
y = accuracy$accuracy,
label = round(accuracy$accuracy, 2))
perc.alumni
). How good can your regression model fit this criterion? Which variables seem to be important in predicting it?mod <- train(form = perc.alumni ~ .,
data = college_train,
method = "glm",
trControl = ctrl_none)
summary(mod)
Call:
NULL
Deviance Residuals:
Min 1Q Median 3Q Max
-24.48 -6.05 -0.30 5.12 31.93
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 4.22e+00 4.43e+00 0.95 0.34142
PrivateYes 1.48e+00 1.54e+00 0.96 0.33690
Apps -7.58e-04 4.21e-04 -1.80 0.07231 .
Accept -1.66e-03 7.62e-04 -2.18 0.02984 *
Enroll 6.88e-03 2.08e-03 3.31 0.00101 **
Top10perc 3.65e-02 6.30e-02 0.58 0.56276
Top25perc 7.30e-02 4.93e-02 1.48 0.13894
F.Undergrad -3.32e-04 3.38e-04 -0.98 0.32622
P.Undergrad 5.27e-05 3.27e-04 0.16 0.87191
Outstate 1.09e-03 2.19e-04 4.95 1e-06 ***
Room.Board -1.75e-03 5.21e-04 -3.35 0.00088 ***
Books -3.72e-04 2.99e-03 -0.12 0.90100
Personal -2.18e-03 7.23e-04 -3.01 0.00276 **
PhD -4.28e-02 5.19e-02 -0.82 0.41045
Terminal 1.40e-01 5.55e-02 2.53 0.01173 *
S.F.Ratio -2.55e-01 1.40e-01 -1.82 0.06873 .
Expend 8.48e-05 1.49e-04 0.57 0.56928
Grad.Rate 1.17e-01 3.28e-02 3.57 0.00039 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for gaussian family taken to be 82.5)
Null deviance: 73707 on 499 degrees of freedom
Residual deviance: 39764 on 482 degrees of freedom
AIC: 3645
Number of Fisher Scoring iterations: 2
mod_predictions <- predict(mod)
hist(mod_predictions)
postResample(pred = mod_predictions,
obs = college_train$perc.alumni)
RMSE Rsquared MAE
8.918 0.461 7.024
hot
variable).# Add a new factor criterion 'hot' which indicates whether or not a schol receives at least 10,000 applications
college_train <- college_train %>%
mutate(hot = factor(Apps >= 10000))
mod_hot <- train(form = hot ~ .,
data = college_train,
method = "glm",
trControl = ctrl_none)
summary(mod_hot)
Call:
NULL
Deviance Residuals:
Min 1Q Median 3Q Max
-7.52e-05 -2.00e-08 -2.00e-08 -2.00e-08 6.52e-05
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -6.34e+01 1.96e+05 0 1
PrivateYes -4.40e+00 6.42e+04 0 1
Apps 1.96e-02 1.62e+01 0 1
Accept -8.88e-03 1.83e+01 0 1
Enroll 1.17e-02 4.31e+01 0 1
Top10perc -8.07e-01 2.33e+03 0 1
Top25perc 5.81e-01 2.14e+03 0 1
F.Undergrad 1.40e-03 7.34e+00 0 1
P.Undergrad -1.65e-05 3.31e+00 0 1
Outstate -6.25e-04 1.15e+01 0 1
Room.Board 6.30e-03 1.24e+01 0 1
Books -6.36e-02 1.09e+02 0 1
Personal -3.81e-05 2.95e+01 0 1
PhD -1.39e+00 2.10e+03 0 1
Terminal -2.41e-01 4.59e+03 0 1
S.F.Ratio -8.91e-01 3.22e+03 0 1
perc.alumni 1.86e-01 2.74e+03 0 1
Expend 6.00e-04 5.57e+00 0 1
Grad.Rate 3.72e-01 1.89e+03 0 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 2.5364e+02 on 499 degrees of freedom
Residual deviance: 4.4973e-08 on 481 degrees of freedom
AIC: 38
Number of Fisher Scoring iterations: 25
mod_predictions <- predict(mod_hot)
plot(mod_predictions)
confusionMatrix(data = mod_predictions, # This is the prediction!
reference = college_train$hot) # This is the truth!
Confusion Matrix and Statistics
Reference
Prediction FALSE TRUE
FALSE 465 0
TRUE 0 35
Accuracy : 1
95% CI : (0.993, 1)
No Information Rate : 0.93
P-Value [Acc > NIR] : <2e-16
Kappa : 1
Mcnemar's Test P-Value : NA
Sensitivity : 1.00
Specificity : 1.00
Pos Pred Value : 1.00
Neg Pred Value : 1.00
Prevalence : 0.93
Detection Rate : 0.93
Detection Prevalence : 0.93
Balanced Accuracy : 1.00
'Positive' Class : FALSE
?glm.control
. To fix it just add the following code in your train()
function control = list(maxit = 75)
, and run it again.mod_hot <- train(form = hot ~ .,
data = college_train,
method = "glm",
trControl = ctrl_none,
control = list(maxit = 75))
summary(mod_hot)
Call:
NULL
Deviance Residuals:
Min 1Q Median 3Q Max
-6.30e-06 -2.10e-08 -2.10e-08 -2.10e-08 5.38e-06
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -7.72e+01 2.47e+06 0 1
PrivateYes -6.17e+00 8.40e+05 0 1
Apps 2.43e-02 2.10e+02 0 1
Accept -1.11e-02 2.25e+02 0 1
Enroll 1.48e-02 5.65e+02 0 1
Top10perc -1.03e+00 3.24e+04 0 1
Top25perc 7.45e-01 2.91e+04 0 1
F.Undergrad 1.86e-03 9.21e+01 0 1
P.Undergrad -3.63e-05 4.00e+01 0 1
Outstate -7.15e-04 1.54e+02 0 1
Room.Board 7.87e-03 1.50e+02 0 1
Books -7.96e-02 1.33e+03 0 1
Personal -1.79e-04 3.80e+02 0 1
PhD -1.74e+00 2.58e+04 0 1
Terminal -3.30e-01 5.87e+04 0 1
S.F.Ratio -1.16e+00 4.00e+04 0 1
perc.alumni 2.05e-01 3.42e+04 0 1
Expend 7.89e-04 7.32e+01 0 1
Grad.Rate 4.91e-01 2.41e+04 0 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 2.5364e+02 on 499 degrees of freedom
Residual deviance: 3.0770e-10 on 481 degrees of freedom
AIC: 38
Number of Fisher Scoring iterations: 30
mod_predictions <- predict(mod_hot)
plot(mod_predictions)
confusionMatrix(data = mod_predictions, # This is the prediction!
reference = college_train$hot) # This is the truth!
Confusion Matrix and Statistics
Reference
Prediction FALSE TRUE
FALSE 465 0
TRUE 0 35
Accuracy : 1
95% CI : (0.993, 1)
No Information Rate : 0.93
P-Value [Acc > NIR] : <2e-16
Kappa : 1
Mcnemar's Test P-Value : NA
Sensitivity : 1.00
Specificity : 1.00
Pos Pred Value : 1.00
Neg Pred Value : 1.00
Prevalence : 0.93
Detection Rate : 0.93
Detection Prevalence : 0.93
Balanced Accuracy : 1.00
'Positive' Class : FALSE
glm.fit: fitted probabilities numerically 0 or 1 occurred
. This can happen if very strong predictors occur in the dataset (see Venables & Ripley, 2002, p. 197). If you added all predictors (except again the college names), then this problem occurs because the Apps
variable, used to create the criterion, was also part of the predictors (plus some other variables that highly correlate with Apps
). Check the variable correlations (the code below will give you a matrix of bivariate correlations). You will learn an easier way of checking the correlations of variables in a later session.# get correlation matrix of numeric variables
cor(college_train[,sapply(college_train, is.numeric)])
mod_hot <- train(form = hot ~ . - Apps -Enroll -Accept - F.Undergrad,
data = college_train,
method = "glm",
trControl = ctrl_none,
control = list(maxit = 75))
summary(mod_hot)
Call:
NULL
Deviance Residuals:
Min 1Q Median 3Q Max
-2.0603 -0.1783 -0.0609 -0.0177 3.0120
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -1.49e+01 4.42e+00 -3.37 0.00075 ***
PrivateYes -4.85e+00 1.32e+00 -3.67 0.00025 ***
Top10perc 2.42e-02 2.60e-02 0.93 0.35115
Top25perc 2.66e-02 2.73e-02 0.98 0.32940
P.Undergrad 5.22e-04 1.62e-04 3.23 0.00124 **
Outstate 8.41e-05 1.30e-04 0.65 0.51670
Room.Board 7.85e-04 3.33e-04 2.36 0.01826 *
Books -2.08e-03 2.33e-03 -0.90 0.37057
Personal 2.77e-04 4.08e-04 0.68 0.49704
PhD 1.65e-02 5.69e-02 0.29 0.77228
Terminal 1.97e-02 6.10e-02 0.32 0.74625
S.F.Ratio -2.56e-03 8.09e-02 -0.03 0.97480
perc.alumni -3.23e-02 3.21e-02 -1.01 0.31366
Expend 2.68e-05 6.19e-05 0.43 0.66542
Grad.Rate 6.40e-02 2.60e-02 2.47 0.01369 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 253.64 on 499 degrees of freedom
Residual deviance: 121.87 on 485 degrees of freedom
AIC: 151.9
Number of Fisher Scoring iterations: 8
mod_predictions <- predict(mod_hot)
plot(mod_predictions)
confusionMatrix(data = mod_predictions, # This is the prediction!
reference = college_train$hot) # This is the truth!
Confusion Matrix and Statistics
Reference
Prediction FALSE TRUE
FALSE 458 18
TRUE 7 17
Accuracy : 0.95
95% CI : (0.927, 0.967)
No Information Rate : 0.93
P-Value [Acc > NIR] : 0.0429
Kappa : 0.551
Mcnemar's Test P-Value : 0.0455
Sensitivity : 0.985
Specificity : 0.486
Pos Pred Value : 0.962
Neg Pred Value : 0.708
Prevalence : 0.930
Detection Rate : 0.916
Detection Prevalence : 0.952
Balanced Accuracy : 0.735
'Positive' Class : FALSE
# Fitting and evaluating a regression model ------------------------------------
# Step 0: Load packages-----------
library(tidyverse) # Load tidyverse for dplyr and tidyr
library(caret) # For ML mastery
# Step 1: Load and Clean, and Explore Training data ----------------------
# I'll use the mpg dataset from the dplyr package in this example
# no need to load an external dataset
data_train <- read_csv("1_Data/mpg_train.csv")
# Convert all characters to factor
# Some ML models require factors
data_train <- data_train %>%
mutate_if(is.character, factor)
# Explore training data
data_train # Print the dataset
View(data_train) # Open in a new spreadsheet-like window
dim(data_train) # Print dimensions
names(data_train) # Print the names
# Step 2: Define training control parameters -------------
# In this case, I will set method = "none" to fit to
# the entire dataset without any fancy methods
# such as cross-validation
train_control <- trainControl(method = "none")
# Step 3: Train model: -----------------------------
# Criterion: hwy
# Features: year, cyl, displ, trans
# Regression
hwy_glm <- train(form = hwy ~ year + cyl + displ + trans,
data = data_train,
method = "glm",
trControl = train_control)
# Look at summary information
summary(hwy_glm)
# Step 4: Access fit ------------------------------
# Save fitted values
glm_fit <- predict(hwy_glm)
# Define data_train$hwy as the true criterion
criterion <- data_train$hwy
# Regression Fitting Accuracy
postResample(pred = glm_fit,
obs = criterion)
# RMSE Rsquared MAE
# 3.246182 0.678465 2.501346
# On average, the model fits are 2.8 away from the true
# criterion values
# Step 5: Visualise Accuracy -------------------------
# Tidy competition results
accuracy <- tibble(criterion = criterion,
Regression = glm_fit) %>%
gather(model, prediction, -criterion) %>%
# Add error measures
mutate(se = prediction - criterion,
ae = abs(prediction - criterion))
# Calculate summaries
accuracy_agg <- accuracy %>%
group_by(model) %>%
summarise(mae = mean(ae)) # Calculate MAE (mean absolute error)
# Plot A) Scatterplot of criterion versus predictions
ggplot(data = accuracy,
aes(x = criterion, y = prediction, col = model)) +
geom_point(alpha = .2) +
geom_abline(slope = 1, intercept = 0) +
labs(title = "Predicting mpg$hwy",
subtitle = "Black line indicates perfect performance")
# Plot B) Violin plot of absolute errors
ggplot(data = accuracy,
aes(x = model, y = ae, fill = model)) +
geom_violin() +
geom_jitter(width = .05, alpha = .2) +
labs(title = "Distributions of Fitting Absolute Errors",
subtitle = "Numbers indicate means",
x = "Model",
y = "Absolute Error") +
guides(fill = FALSE) +
annotate(geom = "label",
x = accuracy_agg$model,
y = accuracy_agg$mae,
label = round(accuracy_agg$mae, 2))
| File | Rows | Columns |
|---|---|---|
| college_train.csv | 1000 | 21 |
college_train
data are taken from the College
dataset in the ISLR
package. They contain statistics for a large number of US Colleges from the 1995 issue of US News and World Report.college_train
| Name | Description |
|---|---|
Private |
A factor with levels No and Yes indicating private or public university. |
Apps |
Number of applications received. |
Accept |
Number of applications accepted. |
Enroll |
Number of new students enrolled. |
Top10perc |
Pct. new students from top 10% of H.S. class. |
Top25perc |
Pct. new students from top 25% of H.S. class. |
F.Undergrad |
Number of fulltime undergraduates. |
P.Undergrad |
Number of parttime undergraduates. |
Outstate |
Out-of-state tuition. |
Room.Board |
Room and board costs. |
Books |
Estimated book costs. |
Personal |
Estimated personal spending. |
PhD |
Pct. of faculty with Ph.D.’s. |
Terminal |
Pct. of faculty with terminal degree. |
S.F.Ratio |
Student/faculty ratio. |
perc.alumni |
Pct. alumni who donate. |
Expend |
Instructional expenditure per student. |
Grad.Rate |
Graduation rate. |
| Package | Installation |
|---|---|
tidyverse |
install.packages("tidyverse") |
caret |
install.packages("caret") |
| Function | Package | Description |
|---|---|---|
trainControl() |
caret |
Define modelling control parameters |
train() |
caret |
Train a model |
predict(object, newdata) |
base |
Predict the criterion values of newdata based on object |
postResample() |
caret |
Calculate aggregate model performance in regression tasks |
confusionMatrix() |
caret |
Calculate aggregate model performance in classification tasks |


{% extends 'tellme/js_inc.html' %} {% block jquery %} {# Overwrite the jquery block to stop tellme from importing another (old) jquery version #} {% endblock %}


Close
Enter the Email:
Enter the Password:
Not registered ? Registry
Name:
Surname:
Phone:
Your city:
Already Registered? Login


Created: 2021-02-27 Sat 17:49
This led to divisions along several themes that continue to the present day.
Created by Dale Hathaway.


|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The interface through which we receive playback notifications.
| Field Summary | |
static int |
PAUSING
If state == PAUSING then we are pausing |
static int |
PLAYING
If state == PLAYING then we are playing |
static int |
STOPPED
If state == STOPPED then we are stopped |
| Method Summary | |
void |
setPos(double pos)
Notification for current playback position in seconds from the monitoring thread. |
void |
setState(int state)
Current playback state notification from the monitoring thread. |
void |
updateViewports()
Notification for a top level windows change from the monitoring thread. |
| Field Detail |
public static final int STOPPED
public static final int PAUSING
public static final int PLAYING
| Method Detail |
public void setState(int state)
public void setPos(double pos)
public void updateViewports()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


|
|
IFXTaskManager Class ReferenceThis is the main interface for IFXTaskManager.
More...
Inheritance diagram for IFXTaskManager:
List of all members.
Detailed Description
This is the main interface for IFXTaskManager.
- Note:
- The associated IID is named IID_IFXTaskManager, and the CID for the component is CID_IFXTaskManager.
Member Function Documentation
|
|
This method adds a new task to the task manager.
Internally this creates an IFXTaskManagerNode to hold the registration data. A task handle is returned which identifies the registration, and can be used to remove the task from the TaskManager.
The Task Data is a template of the event this task is to handle. Fields which are filled with default values (zero, null, etc) are treated as wild fields and match any event; fields with a specific value must match the task data associated with a particular event in order for the IFXTask to be invoked. The registered IFXTaskData is not actually passed to the IFXTask::Execute method; rather, the IFXTaskData that is associated with the event is passed to the Execute method.
- Parameters:
-
| pTask | The IFXTask pointer.
|
| pData | The IFXTaskData pointer.
|
| priority | The priority for this task. Priority is used to resolve the order of execution when multiple tasks are registered to handle the same event.
|
| pTaskHandle | Returns the task handle.
|
- Returns:
- Returns an IFXRESULT code.
- IFX_OK upon success.
- IFX_E_NOT_INITIALIZED if the component has not been initialized.
- IFX_E_INVALID_POINTER is returned if pTask, pData, or pTaskHandle is NULL.
Implemented in CIFXTaskManager. |
| virtual IFXRESULT IFXAPI IFXTaskManager::AddTask |
( |
IFXTaskManagerNode * |
pNode |
) |
[pure virtual] |
|
|
|
This method adds a new task to the task manager.
Each registered Task must be wrapped by an IFXTaskManagerNode object. When a task is registered, the task manager sets the IFXTaskHandle member data on the IFXTaskManagerNode with the correct task handle; it can be retrieved with IFXTaskManagerNode::GetTaskHandle.
- Parameters:
-
- Returns:
- Returns an IFXRESULT code.
- IFX_OK upon success.
- IFX_E_NOT_INITIALIZED if the component has not been initialized.
- IFX_E_INVALID_POINTER is returned if pNode is NULL.
Implemented in CIFXTaskManager. |
|
|
This method creates an IFXTaskManagerView for a given event.
An event is defined by an IFXTaskData object. This method matches the event to the IFXTaskData "pattern" contained in each registered IFXTaskManagerNode. Each match results in the node pointer being added to the IFXTaskManagerView. Thus, the View contains all matching task handlers for a given event. Since tasks can be added, removed, and modified at virtually any time, a given view is highly time sensitive and should generally not be held.
It is possible for a View to contain no data (i.e., no task nodes). This simply indicates that there were no matching tasks.
See IFXTaskManagerView for more information.
- Parameters:
-
| pPattern | The IFXTaskData which defines the event.
|
| ppView | Returns an IFXTaskManagerView. ppView must not be NULL -- the caller must supply a valid pointer - but the pointer should not actually contain a IFXTaskManagerView. Rather, an IFXTaskManagerView will be created and returned when this method is called, and the contents of ppView will be overwritten.
|
- Note:
- For efficiency, the Task Manager recycles TaskManagerViews. It will not recycle a view object as long as anyone else has a pointer to it, and uses the reference count to verify this. For this reason it is very important not to keep a non-reference-counted pointer to a returned IFXTaskManagerView, as the contents could change without notice.
- Returns:
- Returns an IFXRESULT code. This may also return errors from IFXCreateComponent if it is necessary to create a new IFXTaskManagerView. It may also return errors from IFXTaskManagerNode::MatchPattern
- IFX_OK upon success.
- IFX_E_NOT_INITIALIZED if the component has not been initialized.
- IFX_E_INVALID_POINTER is returned if pPattern is NULL.
- IFX_E_INVALID_HANDLE is returned if ppView is NULL.
Implemented in CIFXTaskManager. |
| virtual IFXRESULT IFXAPI IFXTaskManager::GetTask |
( |
U32 |
taskHandle, |
|
|
IFXTaskManagerNode ** |
ppNode |
|
) |
[pure virtual] |
|
|
|
This method retrieves the IFXTaskManagerNode for a registered task.
This allows modification of registration data.
- Parameters:
-
| taskHandle | The task handle returned by AddTask.
|
| ppNode | Receives the IFXTaskManagerNode pointer.
|
- Returns:
- Returns an IFXRESULT code.
- IFX_OK upon success.
- IFX_E_NOT_INITIALIZED if the component has not been initialized.
- IFX_E_INVALID_POINTER is returned if ppNode is NULL.
- IFX_E_INVALID_HANDLE is returned if taskHandle is IFXTASK_HANDLE_INVALID.
- IFX_E_NOT_FOUND if the specified task is not found. Since multiple components contain an IFXTaskManager, this error may indicate an attempt to retrieve a task from the wrong component.
Implemented in CIFXTaskManager. |
| virtual IFXRESULT IFXAPI IFXTaskManager::Initialize |
( |
IFXCoreServices * |
|
) |
[pure virtual] |
|
|
|
This method initializes the IFXTaskManager.
- Parameters:
-
| pCoreServices | A pointer to the CoreServices object.
|
- Returns:
- Returns an IFXRESULT code.
- IFX_OK upon success.
- IFX_E_ALREADY_INITIALIZED if the IFXTaskManager object has already been initialized.
- IFX_E_INVALID_POINTER is returned if pCoreServices is invalid.
Implemented in CIFXTaskManager. |
| virtual IFXRESULT IFXAPI IFXTaskManager::RemoveTask |
( |
U32 |
taskHandle |
) |
[pure virtual] |
|
|
|
This method removes a task from the Task Manager.
- Parameters:
-
| taskHandle | The task handle returned by AddTask.
|
- Returns:
- Returns an IFXRESULT code.
- IFX_OK upon success.
- IFX_E_NOT_INITIALIZED if the component has not been initialized.
- IFX_E_INVALID_HANDLE is returned if taskHandle is IFXTASK_HANDLE_INVALID.
- IFX_E_NOT_FOUND if the specified task is not found. Since multiple components contain an IFXTaskManager, this error may indicate an attempt to remove a task from the wrong component.
Implemented in CIFXTaskManager. |
| virtual IFXRESULT IFXAPI IFXTaskManager::Reset |
( |
|
) |
[pure virtual] |
|
|
|
This method resets the IFXTaskManager, resetting it to a just-initialized state.
All registered tasks are removed.
- Returns:
- Returns an IFXRESULT code.
- IFX_OK upon success.
- IFX_E_NOT_INITIALIZED if the IFXTaskManager object has not been initialized.
Implemented in CIFXTaskManager. |
© 1999 - 2006 Intel Corporation. All rights reserved.
* Other names and brands may be claimed as the property of others.
|
|


IN THE HIGH COURT OF PUNJAB AND HARYANA AT CHANDIGARH CWP No. 20760 of 2015 DATE OF DECISION : 29.09.2015 M/s Gold Mine Stone Crusher, Village Napwal, Post Office Narot Jaimal Singh, Tehsil and District Pathankot and another .... PETITIONERS Versus State of Punjab and others .... RESPONDENTS CORAM :- HON'BLE MR. JUSTICE SATISH KUMAR MITTAL HON'BLE MR. JUSTICE MAHAVIR S. CHAUHAN Present : Mr. Gurminder Singh, Senior Advocate, with Mr. R.P.S. Bara, Advocate, for the petitioners. ***
SATISH KUMAR MITTAL, J. ( Oral ) In the instant writ petition, the petitioners have challenged the orders dated 20.07.2015 and 10.08.2015 issued by respondent No.4 under Sections 31-A of the Air Prevention & Control of Pollution Act, 1981 and under Section 33-A of the Water Prevention & Control of Pollution Act, 1974. It has also been averred that against the aforesaid orders, separate appeals have been filed by both the petitioners, but the same have not been considered and decided so far. A prayer has also been made in this writ petition that a direction be issued to the Appellate Authority (respondent No.2 herein) to consider and decide those appeals filed by the petitioners, expeditiously.
DASS NAROTAM 2015.10.01 12:15 I attest to the accuracy and authenticity of this document CWP No. 20760 of 2015 -2- After hearing learned counsel for the petitioners and keeping in view the fact that appeals filed by the petitioners against the impugned orders are still pending before the Appellate Authority, without issuing notice of motion as it will un-necessary delay the matter, we dispose of this petition with a direction to the Appellate Authority (respondent No.2) to consider and decide the appeals filed by the petitioners against the orders dated 20.07.2015 and 10.08.2015, expeditiously, preferably within a period of two months from the date of receipt of a certified copy of this order. However, till disposal of those appeals by the Appellate Authority, no coercive step be taken against the petitioners.
( SATISH KUMAR MITTAL ) JUDGE September 29, 2015 ( MAHAVIR S. CHAUHAN ) ndj JUDGE DASS NAROTAM 2015.10.01 12:15 I attest to the accuracy and authenticity of this document


Main Page
Where do you want to go?
Main Page
Communism Vs Capitalism - The Game
Wanna win a prize with your Dev. tools? Use this link and search for the secret function!
BlackJack Game
My Brother's Art Gallery


This page provides examples of the password widget capabilities.
In the first example, there is a password widget that checks if the field is not empty, when the password is required. The validation event can be 'onChange' - this means the validation will be triggered as you type. 'onBlur' - when the password field loses focus, and validation 'onSubmit' - when the form is submitted. All Spry Validation widgets validate onSubmit. 'onBlur' and 'onChange' are options.
The password validation widget can have conditions to increase the password complexity. This example contains a password validation widget that has to receive a minimum 6 characters and maximum 20 characters to pass the validation.
Using the password validation widget, you can define your own password strength by adding a combination of conditions.
In the first password example below you can have: a maximum 20 characters (any kind of character: number, special chars, etc.), but there should be a minimum of 3 Alphabetical (alpha) chars and maximum 6 Alpha characters to be a valid password.
The next password field uses min/maxUpperAlphaChars (any alpha character in upper case).
You can add conditions to the password field to force a min/max number of numeric characters and also a min/max number of special characters, as you can see in the last two examples of this section.
This example shows how to disallow special characters and numbers for your password.
You can also use a fixed number of characters for password by specifying the same value for min and max options.
To pass the validation in this example, the password should have at least: 2 number characters, 2 alpha characters in upper case and one Special character. The maximum length should be between 8 and 10 characters.The second input in this section is the password confirmation. To use this functionality you have to use the Confirm Validation Widget.
You can set an additional error message for the password widget in case you want to give more intuitive details to the user about what should be filled in.
The following example shows how to change the default appearance for the error messages, by over-writing the default css classes.


Dillon
Drenzek
D
D
P
M
M
Dillon D Drenzek
Desktop
Photography
Motion Picture
Music
// Desktop
D
> Walk Through
PHOTOSHOP
> Me, In So Many Words
PHOTOSHOP
> Celebrating Fourth Year at CU
PHOTOSHOP


What are three new things you have learned about yourself and your ego as a result of the core learning? I have learned that I get caught up in overthingking things and not doig somthing sometimes becasue my self-talk can sometimes be negative. Meditation helps trmendously with this.
What are the role of values, empathy and self awareness in learning and programming? I think all of them lead to an awreness of the situation you are operating in, which in turn allows you te be more productive.
What has surprised you the most about the core learning? The neuroplasticity information is very comforting - knowing that you can 'convince' yourself to be better at something is exciting. I speak as a person that can have logical thought, but convinced myself a long time ago that maths was not for me.
What were the most challenging aspects of the core learning?
Why do you think we, a programming school, are spending so much time focusing on core learning in a web development bootcamp course? Because the nature of the knowledge base that we are learning is contactly in flux and, as such good inter and intra-personal skills facilitat a more effective way to continue our knowledge aquirement in the industry.
Does the time you spent studying core learning here feel like a waste of time? Should you have just used that time to practicing programming instead? Justify your answer. A bit of both - I would prefer that more time was spent explaining things becasue at this stage I find it all a bit overwhelming, but the sore stuff equips you to deal with being overwhelmed so I see its value in the long term.I got stuck on the fizzbuzz challenge and didn't even know how to start. I was determined not to look at the answer until I had given the kata good try. I left it and decided to go over the learning material again. I took a short break, and then just explored the meaterial that I thought would be relevant and slowly figured out how to start. The feeling between was very different the second pass because I felt happy that I had persevered instead of giving in and looking at the answer (which made me feel more useless).The techniques I used were Rubber Ducky, Try soemthing, Pseudo code. Reflection.
pseudocode: Im okay with this. It's certainly helpful but I tend to do it in my head and not write things down. need to work on that (6/10)
Trying Something: I find this super helpful as it jogs my memory isntad of being caught in indecision. I do occasionally get lost though but its still good. (7/10)
Rubber Ducky: this is good to calrify what needs doing. I find I get lost witht the logical thought sometimes in terms of mapping steps, so this is really helpful for me. (7/10)
Readign errors: this is good but still dont understand some errors. should be more helpful as I start getting going more though...(4/10)
Console.logging: this is great. I feel like this really helps sometimes. Not helpful if the code is broken though (which mine often is) (5/10)Googling: is great. SOmetimes I get random results becasue im still learning the nomencalture, but expect this will improve. (8/10)
Asking peers: I'm gettign better at this. Definitel helpful and people have been really freindly and supportive which has been great. I try to return the support when I can. (7/10)
Asking Coach: Good too. Prefer to run a few questions during my one on ones though as I feel better about asking once I know I've tried other avenues. (5/10)
Improving processes with reflection: Tbh, I often forget to do this and need to develope this habit more. (3/10)
If HTML is the skeletal frame of a bauilding, then CSS is the paint, curtains, and decorations on and around it.
Control flow and loops are ways of controlling a piece of code so that instead of writing it out a million times, you are able to build conditions inot the code that must be met, and of they are, then the code can repeat itself until it no longer meeets the conditions. An example would be if I am walking to my car and want to drive away, I cant run straight up to the car, throw the key in its general direction and assume I will drive away. If I did that i would run into the car and fall over and embarass myself (and get nowhere)...FIRST I unlock the door. I cant start the car until I get in the car. Second, I get in and close the car, etc etc. I'm kind of living in a loop of re-running the same thought of running through a checklist or requirements incremntally until I finally meet all requirtemd conditions and then STOP, because I have now begun driving my car.
The DOM is a live and interactive way of seeing your code in action that allows you to test things before commiting them etc.It canbe accessed in any browser (though there are diferences)
An Array can usually be thought of as a list of similar items or peices of information. An Object cna be a collection of different sets of data and can also hold different collections of arrays within it.
Functions are self contained peices of code which "do" something. They are lebelled and can then be called into other processes much faster by using their names, which define them and should be descriptive of their function within the code.
My long term goal is to work as a story writer for a game developer like CD Project Red, which made The Witcher games franchise. This would allow me to utilise my skill and background as a writer and apply it to something that I love. Many of these jobs prefer applicants who have a working knowledge of game development and coding so that they can interface with the other developers. As well as this long term goal, I have a shorter term goal of working in the tech field as a junior dev wherever I could begin and secure a position in a company with a steady salary as I intend to buy a home and start a family soon.
I would like to develope my skills of working in a team (as I believe that the industry often works in small teams) and i would also like to develope a beter way to manage myself when stressed asI tend to get wound up and lose focus sometimes under time pressures.
I am extremely determined when I indentify something as a goal that is important to me. The flipside is that if something isn't important to me the i quickly lose focus and struggle to apply myself. I tend to be able to get along and deal with a large variety of people and communicate effectively. A weakness is that I goof around sometimes to blow off steam, which can be counter productive.
I commit to always do what i say I will do so that in any group exercises I will not slow down the progress of my fellow learners (and expect the same form them). I will do this by always putting the course first in terms of time commitments and will make sure that I am rested and taking care of myself in a manner that encourages productive and fun work. I will also treat all people respectfully.
I will seek help by communicating with tutors as early as I can so that there are as few surpises as possible. If I am having trouble with a project I will try toresolve it myself first before reaching out to mke sure that I deliver the work by the deadlines.
I expect the team to mirror the way I treat them. I expect them to be reasonbaly accesible if I have an issue with any concepts and to be able to adress my questions with answers or direct me to modes of self-learning.
Yes. I wil be in Nelson on the weekend of the 19th and 20th of October. I am flying there on friday and will regrettably only be able to attend the first part of the Friday. I also will be away on Thurs 31st OCT and Friday 1st NOV In Melbourne for a medical consultation. I will be able to use my laptop to work, but obviously wont be able to attend the bootcamp on that Thursday and Friday. I return Friday evening so can hopefully catch up over that weekend. Other than those dates, I have no other commitments and intend to be fully engaged with my classmates and the bootcamp.
I have been using pomodoro and find it useful to do sometimes, However, I may sometimes ingnore the times and work for 2-3 hours non-stop as I fiind that sometimes the timer interrupts the natural flow of my focus and I find it counter-intuitive to stop when I am engaging with the material. I hope to be able to balance these two apporaches as I go.
My general creed is "Don't be an ########" A family member in my life is an alcoholic. They have been for many years and, although they mean well, they constatntly created problems and demanded attention. After a very long time trying to help this person, I had to make a decision to stop helping them and back away from the relationship with that family member. The consequences have been that they are more isolated as I limit contact with them. This is painful, but I have accepted it a fact that cannot be helped. Part of the consequence is also that i have more energy and focus for my wife and building ourlife and working towards out goals. Culturally, I have a rather WASP'y background. That means lots of fake smiles and polite conversation with sub-text beneath it. I dislike it and tend to stay away from that "type" of person as I find them diffucult to relate to. As such I can occasionally be extremely frank and honest, which gets me in trouble sometimes. A positive thing about my culture is my cutural identity as being part scandinavian. I have a great interest in their mythology and poetry, which is often black-humoured and ascerbic. I try to laugh at the bad things in life.
Having been self-employed since 2014 I have a reserve of dsicipline for doing things un-managed. This has also made me rather shy around people as a great deal of time has been spent alone working. My Myers-Briggs category is Mediator; Mediator personalities are true idealists, always looking for the hint of good in even the worst of people and events, searching for ways to make things better. While they may be perceived as calm, reserved, or even shy, Mediators have an inner flame and passion that can truly shine.My stengths are that I am able to get along with most people and am very driven, but the drawbakc is that I ccan easlit overlook details sometimes because I may be off with the fairies a bit. I am fairly emotionally inteligent and I think that this skill will be one of my stronger advantages to building a career. I write with my wife on certain projects and we can work very fast, but after a lot of experience, we have definitly found that it is best if we work on a project one at a time. When we are both writing at the same time, we fight and begin to annoy eachother becasue critiscism is taken personally in those circumstances. How we fixed it was that we now only look at soemthing after the other pserson has finished their work on it. We then discuss it and are able to work more productivly by not sittign on eachothers' heads while we work.


A World Wide Adventure!
First of all I would like to thank all of you for making ths dream come true. We started as a small bakery in the outskirts of Seattle. I knew I had something when I made my first batch of salmon cookies, but I never knew what a it would become. This savory delight has revolutionized the entire baking industry.
I can understand why you would be skeptical at first, but once you have tried your first salmon cookie you will understand. It is just the right combination of sweet and savory, with just a touch of spice. Perfect for a quick easy breakfast, or an after dinner snack...there's no wrong time of day for a salmon cookie!
From a local bakery down the street to top of the Eiffel Tower, and even through Tokyo and Peru, I plan to share this delectable treat with the world. On our sales page you can see the success of our world wide stores for yourself. Also, if you think you might want to implement this treat into your own bakeries rotation you can contact us accordingly and we will get you started.