OTSubscriber Class Reference
| Inherits from | NSObject |
| Declared in | OTSubscriber.h OTSubscriber.m |
Overview
An OTSubscriber (subscriber) object rasterizes media data bound to an OTStream. The subscriber object references a stream that you have subscribed to. The subscriber object includes methods that let you disable and enable local audio and video playback for the subscribed stream.
Tasks
Getting basic information about a Subscriber
-
session
The OTSession object that owns this subscriber. An instance will have one and only one OTSession associated with it, and this property is immutable.
property -
stream
The stream this subscriber is bound to. Any media channels on the stream should be available for display/playback with this instance.
property -
view
The view containing a playback buffer for associated video data. Add this view to your view heirarchy to display a video stream.
property -
delegate
The OTSubscriberDelegate object that serves as a delegate, handling events for this OTSubscriber object.
property -
subscribeToAudio
Whether to subscribe to the stream’s audio.
property -
subscribeToVideo
Whether to subscribe to the stream’s video. Setting this property only has an affect if you do so immediately after initializing the OTSubscriber object.
property
Initializing a Subscriber
-
– initWithStream:delegate:
Initializes an OTSubscriber and binds it to an OTStream instance. Once initialized, the instance is permanently bound to the stream.
Controling audio and video playback
-
– close
Disconnect the subscriber from the stream and removes the view from its superview.
Properties
delegate
The OTSubscriberDelegate object that serves as a delegate, handling events for this OTSubscriber object.
@property (nonatomic, weak) id<OTSubscriberDelegate> delegate
Declared In
OTSubscriber.h
session
The OTSession object that owns this subscriber. An instance will have one and only one OTSession associated with it, and this property is immutable.
@property (nonatomic, readonly) OTSession *session
Declared In
OTSubscriber.h
stream
The stream this subscriber is bound to. Any media channels on the stream should be available for display/playback with this instance.
@property (nonatomic, readonly) OTStream *stream
Declared In
OTSubscriber.h
subscribeToAudio
Whether to subscribe to the stream’s audio.
@property (nonatomic) BOOL subscribeToAudio
Discussion
The default value is YES.
Setting this property has no effect if the [OTStream hasAudio] property is set to NO.
Declared In
OTSubscriber.h
subscribeToVideo
Whether to subscribe to the stream’s video. Setting this property only has an affect if you do so immediately after initializing the OTSubscriber object.
@property (nonatomic) BOOL subscribeToVideo
Discussion
The default value is YES.
Setting this property has no effect if the [OTStream hasVideo] property is set to NO.
Declared In
OTSubscriber.h
Instance Methods
close
Disconnect the subscriber from the stream and removes the view from its superview.
- (void)close
Declared In
OTSubscriber.h
initWithStream:delegate:
Initializes an OTSubscriber and binds it to an OTStream instance. Once initialized, the instance is permanently bound to the stream.
- (id)initWithStream:(OTStream *)stream delegate:(id<OTSubscriberDelegate>)delegate
Parameters
- stream
The OTStream object to bind this instance to.
- delegate
The delegate (OTSubscriberDelegate) that will handle events generated by this instance.
Discussion
The OpenTok iOS SDK supports a limited number of simultaneous audio-video streams in an app:
- On iPad 2 and iPad 3, the limit is four streams. An app can have up to four simultaneous subscribers, or one publisher and up to three subscribers.
- On all other supported iOS devices, the limit is two streams. An app can have up to two subscribers, or one publisher and one subscriber.
Initializing an OTSubscriber causes it to start streaming data from the OpenTok server, regardless of whether the view of the OTSubscriber object is added to a superview.
You can stream audio only (without subscribing to the video stream) by setting the [OTSubscriber subscribeToVideo] property to NO immediately after initializing the OTSubscriber object. You can stream video only (without subscribing to the audio stream) by setting the [OTSubscriber subscribeToAudio] property to NO immediately after initializing the OTSubscriber object.
When the subscriber connects to the stream, the [OTSubscriberDelegate subscriberDidConnectToStream:] message is sent to the subscriber delegate. Then, when the first frame of video has been decoded, the [OTSubscriberDelegate subscriberVideoDataReceived:] message is sent to the subscriber delegate.
If the subscriber fails to connect to the stream, the [OTSubscriberDelegate subscriber:didFailWithError:] message is sent to the subscriber delegate.
Declared In
OTSubscriber.h


 Have fun looking up your movie metrics and perusing your own private movie database.
Utilize state of the art API's to showcase your entire Movie libraries IDMB information. Including movie descriptions, rating information, movie stars and more!


FTAssetRenderer 0.1.1 Reference
FTAssetRenderer
Create image assets, at runtime, in any color when used as mask and/or at any resolution when it’s a PDF.
Install
If you’re using CocoaPods, add the following to your Podfile:
ruby
pod 'FTAssetRenderer'
Otherwise, simply add the files from the Source
dir to your project.
Usage
If you have a bitmap image that’s used as a mask to generate images in different colors, then you can use it like so:
objc
FTImageAssetRenderer *renderer = [FTAssetRenderer rendererForImageNamed:@"my-icon" withExtension:@"png"];
renderer.targetColor = [UIColor redColor];
UIImage *result = [renderer imageWithCacheIdentifier:@"red"];
If, on the other hand, you have a vector based PDF image, you should generally indicate the size at which it should be rendered as well:
objc
FTPDFAssetRenderer *renderer = [FTAssetRenderer rendererForPDFNamed:@"my-scalable-icon"];
renderer.targetColor = [UIColor blueColor];
renderer.targetSize = CGSizeMake(123, 456);
UIImage *result = [renderer imageWithCacheIdentifier:@"without-preserving-aspect-ratio"];
In the above example, an explicit width and height is given for the result image, which might lead to the image not preserving its original aspect ratio. To ensure the ratio is preserved, a few convience methods are available:
[FTPDFAssetRenderer fitWidth:]
will make the result image as wide as the given width, while the height is based on it.[FTPDFAssetRenderer fitHeight:]
will make the result image as high as the given height, while the width is based on it.[FTPDFAssetRenderer fitSize:]
will make the image as large as possible, inside the bounding size, but without cropping any part of the image, thus only fully covering one of the two sides.
By default, the resulting image is cached on disk. For each different target color, a different cache identifier should be used. For instance, for controls you might use identifiers such as normal
, highlighted
, and selected
.
Acknowledgements
Based on work by: * Oliver Drobnik – http://www.cocoanetics.com/2010/06/rendering-pdf-is-easier-than-you-thought * Nigel Timothy Barber – https://github.com/mindbrix/UIImage-PDF * Jeffrey Sambells – http://jeffreysambells.com/2012/03/02/beating-the-20mb-size-limit-ipad-retina-displays * Ole Zorn – https://gist.github.com/1102091
Thanks to Peter Steinberger (of PSPDFKit fame) for his invaluable advice during the creation of this library.


WELCOME TO THE WORLD OF FLOWERS
Hey!!
Roses
!
Hey lets have a look at sun flower
clickhere
!
choose your favourite flower
clickhere
!


| Audience |
Issues, Concerns, Needs |
Approach |
Middle-aged and elderlyPeople in this group is older than 40 and well-educated. They are familiar with the Internet. They buy products from the official website and Amazon. Their favorite browsers are Chrome, Safari and Firefox, but mainly use Safari. Since they have worked for long times (or retired) and have more disposable money, they want to correct the bad hair pulling habits. |
- What kind of device do they need.
- Does the product send or launch to outside of America?
- Will new products launch in the future.
- Is the effect of eliminating bad habits good?
|
- The only device is that you need to have a smartphone. Instructions are provided on the current page.
- The product can be send to outside of the US, but customer needs to pay more shipping fee. More shipping information will be provided on the page.
- New products are currently being developed for correcting bad eating habits. New product pages will be developed in the future.
- The effect depends on personal. Product accuracy is 50%-70%, and most customers feel that they have improved their bad habits. Will develop a customer experience pages for potential customers in the future.
|
Young peopleYoung people are a little different compared to the other two groups. They don't have that much disposable money, but they are more concerned with appearances. They do not want the bad habit of pulling hair to affect their social life. This group is very familiar with online shopping and would like to correct bad habit through the product. |
- Cost
- Product's appearance
- What kind of services do you offer?
|
- The purchase page will provide more product information to emphasize the reasonableness of the price.
- The current page has a variety of product appearances to choose from. Customized services will be provided on this page in the future.
- The product comes with a one-year warranty. Currently the website has a contact page with email address and contact form. A page will be created more contact and warranty information in the future.
|
ChildrenThis group is that parents buy the product for their children. They are usually purchased online using Apple devices (iPhone, iPad, iMac) and very familiar with the Internet. They have a better lifestyle and also have high income, so they want to help children with the bad habit of pulling hair. |
- How to use it
- Is it possible use the product without a smartphone
- What kind of services do you offer? How about warranty?
|
- How to use this product is currently on the website. The design of this page will be improved in the future.
- The product must be used with a mobile phone, and the mobile app will record the activity. In the future, pages will be developed to provide data upload.
- The product comes with a one-year warranty. Currently the website has a contact page with email address and contact form. A page will be created more contact and warranty information in the future.
|


admin module¶
-
class
admin.
admin
¶ This is a class manages the users who use the system and also allows user to be created, check if the user exists, check the users password
-
check
(name, password)¶ [checks if the user is registered user, does this by checking if they’re name and password is in the textfile.The name should also match the corresponding password.]
Parameters: - name ([string]) – [This is the name the user uses to login]
- password ([string]) – [This is the password the user will uses to login.]
Returns: [Returns True if the user was successfuly validated and False if the user was not successfuly validated.]
Return type: [bool]
-
checkPassword
(name)¶ [Takes in a username and returns the corresponding password to the username]
Parameters: name ([string]) – [This is the name the user uses to login.] Returns: [plitList[0] which is the password of the user or Not found (str): Returns a Not found
string if the corresponding username is not registered]Return type: [string]
-
createUser
(name, password)¶ [Writes the name and password of the user in a textfile in a newline]
Parameters: - name ([string]) – [This is the name the user will use to login.]
- password ([string]) – [This is the password the user uses to sign in]
-


Coming soon to a screen near you!
Robert Weine's classic 1920 film
THE CABINET OF DR. CALIGARI
A TALE of the modern re-appearance of the 11th Century Myth involving the strange and mysterious influence of a mountebank monk over a somnambulist.
TREMBLE in fear at the doctor's wrath! THRILL to the mystery of Cesare! MARVEL at the fantastic and bizarre world of...CALIGARI!


It seems that something went wrong with your URL. 您访问的网址似乎有些问题。。。。。。
Please visit this site again with URL that contains valid object id like: 请重新访问本站，并附上合法的对象编号（objectID），就像：
Exception: {{exception}}


Photography to me is all about capturing moments and memories I have with my family. I have several pictures that show places we visited, activities, and scenery. Of course, I had to include photos of my 9 month old son, Elan. We recently remodeled our house so I have some before and after pictures to show the progress.


Chessure
Home
(current)
Profile
SignUp/LogIn
Email address
Password
Remember me
Sign in
New around here? Sign up
Forgot password?
Welcome to Chessure!
Log in ou sign up to play!


Version 9.0.0
The new major version brings a reworked styling system. Highlight.js now defines
a limited set of highlightable classes giving a consistent result across all the
styles and languages. You can read a more detailed explanation and background in
the tracking issue that started this long process back in May.
This change is backwards incompatible for those who uses highlight.js with a
custom stylesheet. The new style guide explains how to write styles
in this new world.
Bundled themes have also suffered a significant amount of improvements and may
look different in places, but all the things now consistent and make more sense.
Among others, the Default style has got a refresh and will probably be tweaked
some more in next releases. Please do give your feedback in our
issue tracker.
New languages in this release:
Improvements to existing languages and styles:
- ECMAScript 6 modules import now do not require closing semicolon.
- ECMAScript 6 classes constructors now highlighted.
- Template string support for Typescript, as for ECMAScript 6.
- Scala case classes params highlight fixed.
- Built-in names introduced in Julia v0.4 added by Kenta Sato.
- Refreshed Default style.
Other notable changes:
- Web workers support added bu Jan Kühle.
- We now have tests for compressed browser builds as well.
- The building tool chain has been switched to node.js 4.x. and is now
shamelessly uses ES6 features all over the place, courtesy of Jeremy Hull.
- License added to non-compressed browser build.
@highlightjs


Hello! Welcome to the webpage for PHY 132-02 peer mentoring. Here, you will find my notes from class (Class Notes), worksheets from mentor sessions (Worksheets), the Mentor Session Schedule (Resources), as well as links to resources to help you succeed (Resources).
Our next mentor session is Wednesday, 3/6 from 7pm-9pm in Noyce 1022
Physics Seminar is this Tuesday @ 12pm in room Noyce 1023. Lunch will be provided!
Physics Snack Time is this Tuesday @ 4pm in the physics commons. The department provides snacks (vegan and gluten free options).
Physics Table is this Friday @ 12pm in the Whale Room (Dining Hall). Lunch will be paid for by the department for those without meal plans!


Gawp-eyed and jaw dropped, drool dribbling down my chin, I remain astonished at the seemingly fathomless ornithological ignorance I find around me. Only the other day, as I passed an aspen clump in which dozens of birds were perched, chirping, I had to explain, slowly and patiently, to my walking companion that the noise he heard was birdsong, that it was made by birds, that birds were, for the most part, aerial life-forms with wings and beaks and feathers, and that though they were capable of flight they often perched on tree-branches and other handy surfaces. This intelligence seemed to dumbfound him. It was with a certain desolation that I realised this said more about my choice of walking companion than it did about the companion himself.  My own prospects are not much better, but at least I know what a bird is.
And the reason I know is that I carry always with me, tucked in my pocket, an aide memoire, like the one shown below, courtesy of Agence Eureka. Might I suggest that you print it out, have it laminated, and keep it about your person at all times? Then you, too, will know what I know, at least in the ornithological field.


LightWallet
Create New Wallet
Create New Wallet
Password:
Restore Wallet from Seed
Restore wallet from Seed
Import Wallet from keystore
Send Ether
To:
Ether:
Send Ether
Send ERC20
To:
Ether:
Contract Address:
Send Ether
ETH Balance
Show Seed
ERC20 Balance
Contract Address:
Show Seed


This site contains a collection of charts with content generated using Clojure. All the charts on this page are dynamically generated, and the charts can be zoomed. Clicking minimizes a section, and expands.
All of the source code can be found here: Github: ericdwhite/fmath. For issues or comments please drop a note here.
The first example is a coin flip random walk:
Tools and Resources:


TBD
Saved!
Load
Save
Available
Working
Total
Hour
Day
Season
Year
Speed
Load Game
New Game
Choose your leader:
Continue
Journal Entry 1
Continue
Journal Entry 2
Continue
Journal Entry 3
Begin!
Assignments
Starvation Counter:
Supplies
Food:
Timber:
Stone:
Scrap Metal:
Tools:
Map Square Info
Terrain:
Improvement:
Distance from Base:
Build Farm
Construction progress:
Starvation deaths:
Old age deaths:
No cell selected
×
Close


This tool helps you set up the Active Display Area on your eye tracker. The active display area must be configured before the eye tracker can be calibrated.
Guidelines for mounting the eye tracker can be found on the Tobii Developer Zone.
All eye trackers from Tobii measure and report the user's eye-gaze position relative to a planar surface called the Active Display Area. For example, in the common scenario where the eye tracker is mounted on a computer monitor, the active display area should be set to the part of the panel where the image shows.
The active display area is specified as three points in space corresponding to the top left, bottom left, and top right corners. You can either use the setdisplayarea
tool to set the active display area, or use the tobiigaze_set_display_area[_async]
API call. The setting will be stored in persistent memory on the eye tracker device.
You can use this guide to calculate the active display area if your eye tracker is mounted on a display monitor, or something that resembles a display monitor.
That is, the size of the image that displays on the monitor:
| Screen width: | mm |
| Screen height: | mm |
The value should be zero if the eye tracker is perfectly centered on the screen, a positive value if the eye tracker is to the right of the screen center, or a negative value if the tracker is to the left of the screen center.
Horizontal offset: mm
The depth offset should typically be positive, meaning that the eye tracker is in front of the screen.
The height offset should be zero if the top of the eye tracker is aligned with the bottom of the screen, positive if it is above the bottom of the screen, or negative if it is below the bottom of the screen.
| Depth offset: | mm |
| Height offset: | mm |
Load the default values for:
| Vertical distance optical center to mid front: | mm |
| Distance mid front to top front: | mm |
| Mounting angle: | degrees |


DESCRIPTION: We are asking you to participate in a research study about language learning. In this study, we will present you with a variety of stimuli, including natural and artificial language samples, pictures of known or unknown objects, and/or movies of people talking. Sometimes some of the speech you will hear will be from a foreign or made-up language. Participation should take less than five minutes.
RISKS AND BENFITS: The risks to your participation in this online study are those associated with basic computer tasks, including boredom, fatigue, mild stress, or breach of confidentiality. The only benefit to you is the learning experience from participating in a research study.
COMPENSATION: You will receive 13 cents for your participation. NOTE: This study contains comprehension checks to make sure that participants are paying attention. As long as you read the instructions and complete the tasks, your HIT will be approved. If you fail these checks, your HIT will be rejected.
CONFIDENTIALITY: Your Mechanical Turk Worker ID will be used to distribute payment to you but will not be stored with the research data we collect from you. Please be aware that your MTurk Worker ID can potentially be linked to information about you on your Amazon public profile page, depending on the settings you have for your Amazon profile. We will not be accessing any personally identifying information about you that you may have put on your Amazon public profile page.
The research is being conducted with the goal of publication in academic journals and presentations at academic conferences. Any reports and presentations about the findings from this study will not include your name or any other information that could identify you. We may share the data we collect in this study with other researchers– again, we will not include information that could identify you.
SUBJECT’S RIGHTS: Your participation is voluntary. You may stop participating at any time by closing the browser window or the program to withdraw from the study.
CONTACT: If you have any questions, comments, or concerns please contact the Principal Investigator, Daniel Yurovsky at<EMAIL_ADDRESS>For questions about your rights as a research participant, you may contact:
The Social & Behavioral Sciences Institutional Review Board
University of Chicago
Phone:<PHONE_NUMBER>
E-mail<EMAIL_ADDRESS>Please indicate, in the box below, that you are at least 18 years old, have read and understand this consent form, and you agree to participate in this online research study.
* Timing and amount of payment to be determined. Participants will be paid at the rate of 2.5 cents/minute, as is the common standard.
Please look at the example below. Select the pattern which is most dissimilar from the other two.
There will be 15 trials. Feel free to take as many breaks while completing the task as necessary. Continue to choose the grid which is most dissimilar from the other grids. There will be a few attention checks throughout the study, so pay attention to the instructions on each trial.
Progress
Congrats, you're all done! Thanks for contributing to science.


Security API
Introduction
Opencast is distributing encoded media to download and streaming servers to make that media available to end users. At the same time, that media needs to be protected such that - once provided a link to the download and/or streaming representations - only authorized users are able to consume it.
This is achieved by handing signed URLs to end users which are validated by the distribution servers and become invalid after a given period of time (usually 1 hour, depending on the server configuration).
As a consequence, users of the External API who are presenting URLs to distributed media for playback will need to make
sure that those urls are signed, otherwise the distribution servers will refuse to deliver the content and respond with
a 401 NOT AUTHORIZED
status.
Best practices
The use of signed URLs requires a set of best practices to be followed when clients interact with the External API, most notably in the area of performance and caching.
Performance
When consuming URLs that need to be signed before handing them to the user, client implementors may be inclinded to use
the sign=true
parameter for the events queries to request all URLs to be already signed. On one hand, this saves the
client implementation from having to explicitly sign those URLs that users are visiting for playback. On the other hand,
signing URLs introduces an overhead to performance for the pre-signing of all urls that are sent to the client, so in
these cases it will be important to make sure not to transfer large lists and require presigning.
Caching
One obvious caveat when using pre-signed URLs is the use of cached responses. As described above, signed URLs have a maxmimum life time and therefore need to be refreshed on a regular basis so that a user's request to play back a recording won't be rejected by the distribution servers.
Secure access by source IP
The signing facility of the security API provides the ability to sign URLs and restrict that URL to a given IP address.
Even though this greatly increases security in sense that signed URLs can only be accessed from that device, it is important to note that in many network setups, source IP addresses of network packets will undergo network address translation (NAT) with NAT replacing the original source address from private networks with a single public address, thereby diminishing the security impact of adding the source IP address immensely.
URL Signing
POST /api/security/sign
Returns a signed URL that can be played back for the indicated period of time, while access is optionally restricted to the specified IP address.
| Form Parameters | Required | Type | Description |
|---|---|---|---|
url |
yes | string |
The URL to be signed |
valid-until |
no | datetime |
The date and time until when the signed URL is valid |
valid-source |
no | string |
The IP address from which the url can be accessed |
Response
200 (OK)
: A JSON object containing the signed URL or an error message is returned:
| Field | Type | Description |
|---|---|---|
url |
string |
The signed URL |
valid-until |
datetime |
The date and time until when the signed URL is valid |
In case of an error:
| Field | Type | Description |
|---|---|---|
error |
string |
An error message describing the error |
401 (NOT AUTHORIZED)
: The caller is not authorized to have the link signed.
Example
{
"valid-until": "2018-03-19T13:08:39Z",
"url":"http://localhost?policy=eyJTdGF0ZW1lbnQiOnsiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6MTUyMTQ2NDkxOTI4NH0sIlJlc291cmNlIjoiaHR0cDpcL1wvbG9jYWxob3N0In19&keyId=demoKeyOne&signature=717dd8f958a15c1cdb7e88a61417a07bb6a1e6238d9293805cc0893f798a07e8"
}
Error example:
{
"error": "Given URL cannot be signed"
}


Company Projects
Log Out
| Project Name | Project Description | Edit | Delete |
|---|---|---|---|
| {{project["name"]}} | {{project.description}} |
Delete Your Account
|
| Project Name | Project Description | Edit | Delete |
|---|---|---|---|
| {{project["name"]}} | {{project.description}} |
Delete Your Account
Are you sure you want to delete your Project |


Cardiff Marathon
Cardiff WAL
Race Winners
(14 runnings)
15 Oct
2006
09
Oct
2005
03
Oct
2004
28
Sep
2003
01
Sep
2002
1993-2001
13
Sep
1992
15
Sep
1991
16
Sep
1990
1987-89
07
Sep
1986 17 Sep
1985 09
Sep
1984
25
Sep
1983
26 Sep
1982
20
Sep
1981
Notes: 1981 was the inaugural year. This race was known as the Western
Mail Marathon for 1981-1986. The 1981-83 course was a single loop west to
Barry; the 1984-86 course was a double loop in Cardiff, all course starting at
finishing at the Civic Centre. The 1990-92 courses started and finished at
the Eastern Leisure Centre. The 2003-06 races finished at the Millennium
Stadium.
2:29:39
Mark Roberts (WAL)
2:58:41
Michele Awuye (GBR)
2:29:14
Neo Molema (RSA)
2:56:51
Victoria Perry ENG)
2:28:45
Julian Baker (WAL)
2:53:47
Ruth Pickvance-2
2:24:43.9
Richard Gardiner (WAL)
2:51:35.7
Ruth Pickvance (ENG)
2:32:04
Dominic Croft (ENG)
3:15:11
Sarah McLoughlin (GBR)
---
not held
---
not held
2:32:42
Dewi Jones-2
(nc)
3:07:37
Kay Davies-2
(nc)
2:29:04
Jeremy Collins (WAL)
(nc)
3:05:04
Caroline Jones (WAL)
(nc)
2:29:51
Dewi Jones (WAL)
(nc)
3:12:57
Kay Davies (WAL)
(nc)
---
not held
---
not held
2:18:16
Ieuan Ellis-3
2:58:35
Eryl Davies (WAL)
2:28:57
Bernard Plain-3
2:53:08
Sue Graham-2
2:20:35
Ieuan Ellis-2
(nc)
3:06:52
Sue Graham (WAL)
(nc)
2:21:00
Ieuan Ellis (WAL)
3:09:00
Ruth Mann (WAL)
2:23:40
Bernard Plain-2
3:02:08
Susan Martin (WAL)
2:26:04
Bernard Plain (WAL)
3:03:30
Ann Franklin (WAL)
(nc) => national champion
Most Wins (1981-date)
Men
3
Bernard Plain (WAL)
1981-82,1985
Women
2
Sue Graham (WAL)
1984-85
Kay Davies (WAL)
1990,1992
Ruth Pickvance
(ENG)
2003-04
Prize Money
(ARRS qualified runners)
No information on prize money has been received for this race.
Race Time Bias
(sec/km)
Insufficient information to calculate the race time bias.
Competitive Level (1990-date)
Insufficient information to calculate the competitive level.
Quality Performances
Men <2:19 1 <2:20 1 Women No women under 2:50
Last Updated on 30 May 2009
Contributors: Dave Walsh, Mick McGeoch (34)


Chiefs And Maritzburg Face Suspensions
by Soccer LadumaThe Premier Soccer League confirmed that just two clubs will have their players serve suspension this weekend in the Telkom Knockout semi-finals.
Kaizer Chiefs have three players suspended on the weekend after Daniel Akpeyi and Willard Katsande picked up their fourth yellow card each in the Soweto Derby and Eric Mathoho was red-carded in the same clash.
Read more: The 6 Coaching Casualties So Far This Season
Chiefs will host Maritzburg United at the Mbombela Stadium on Sunday, 24 November.
However, the Team of Choice will also be without one of their players, with Kwanda Mngonyama serving his second match suspension after picking up two yellow cards, which resulted in a red against Orlando Pirates on November 05.
The other semi-final will take place on Saturday, November 23 between Golden Arrows and Mamelodi Sundowns.


The blabbering crab quickly dabbed at the drab spot on the wall with its claw. [G|D]
The fab fashion designer gabbed on the phone while expertly grabbing flab from the excess fabric and snipping it away with a pair of scissors. [G|D]
The thief tried to nab the woman's hijab from her head, but she quickly jabbed him with her elbow and ran away, leaving a scab on his arm from the struggle. [G|D]
She used a swab to clean the small wound she had gotten from accidentally stabbing her finger on a sharp slab of concrete while trying to catch a squab that had flown into the room. [G|D]


1
2
3
Pratz
Home
Download
Getting Started
Installation
Testing
Lead
Download stable (v0.5)
Download Latest (dev)
This theme's support for more third-party widgets may improve over-time, based on requests and the popularity of the widgets.


---
title: Chesapeake District Oxon Hill, Maryland Event
date: Friday, March 22, 2019
end_date: Sunday, March 24, 2019
---
Spartan Robotics will be competing in the Chesapeake District Oxon Hill, Maryland Event in 2019!
The event is free and open to the public. The event schedule is available at the link below if you plan to attend.
More information, including the event schedule, can be found at:
https://www.firstchesapeake.org/first-programs/frc/first-chesapeake-district-events/southern-md
The event's The Blue Alliance page, for match schedules, webcast links, etc., can be found here:
https://www.thebluealliance.com/event/2019mdoxo


出版商：Saylor Foundation
语言：英语
本书pdf是 文字版，彩图版 。
Introduction to Chemistry
Molecules, Ions, and Chemical Formulas
Chemical Reactions
Reactions in Aqueous Solution
Energy Changes in Chemical Reactions
The Structure of Atoms
The Periodic Table and Periodic Trends
Ionic versus Covalent Bonding
Molecular Geometry and Covalent Bonding Models
Gases
Liquids
Solids
Solutions
Chemical Kinetics
Chemical Equilibrium
Aqueous Acid–Base Equilibriums
Solubility and Complexation Equilibriums
Chemical Thermodynamics
Electrochemistry
Nuclear Chemistry
Periodic Trends and the s-Block Elements
The p-Block Elements
The d-Block Elements
Organic Compounds


{% extends "base.html" %} {% load experiments %} {% block title %}Experiments - {% endblock title %} {% block content %}
Show:
{% if user.is_authenticated %}
{% endif %}
This matrix shows the latest versions (visible to you) of the models and protocols in our database, with the corresponding experiments. {% if perms.create_experiment %} If you can't see experiments you expect to be there, this is probably because they are associated with an older version of a listed model or protocol. You can click on the white squares to launch experiments using the latest versions. {% endif %}
Note that you can compare models' behaviours under a particular protocol by viewing the protocol (click on a column heading), selecting the 'Compare models' button, and comparing the experiments using models of interest. The converse comparison (one model, many protocols) is available via viewing a model.
Alternatively, enable 'comparison mode' to allow selecting arbitrary experiments from this matrix view to compare.
Click on a column or row heading to select the entire column or row.
Comparison mode:
| not run | queued | running | ran to completion | partially ran | did not complete | inapplicable |
An 'inapplicable' experiment is one where the model does not contain some biological feature probed by the protocol. Experiments show as red if no graphs are available, green if all those expected from the protocol description are generated. Note that no comparison is done against experimental data, and so the colours do not indicate model 'correctness' in any sense.


Webpage Roaster - Contact
The Webpage Roaster is developed and hosted by Tim Daish BA(Hons) MBCS CTAL-TM.
Please contact me via either of the links below:
GitHub
LinkedIn


|
DJI Onboard SDK
|
APIs for Hotpoint (Point of Interest) Missions. More...
#include <DJI_HotPoint.h>
Public Types | |
| enum | View { VIEW_NORTH = 0, VIEW_SOUTH = 1, VIEW_WEST = 2, VIEW_EAST = 3, VIEW_NEARBY = 4 } |
| enum | YawMode { YAW_AUTO = 0, YAW_INSIDE = 1, YAW_OUTSIDE = 2, YAW_CUSTOM = 3, YAW_STATIC = 4 } |
Public Member Functions | |
| HotPoint (Vehicle *vehicle=0) | |
| void | initData () |
| init hotpoint default data More... | |
| HotPointSettings | getData () const |
| getting hotpoint data More... | |
| void | start (VehicleCallBack callback=0, UserData userData=0) |
| start the hotpoint mission More... | |
| ACKErrorCode | start (int timer) |
| start the hotpoint mission More... | |
| void | stop (VehicleCallBack callback=0, UserData userData=0) |
| stop the hotpoint mission More... | |
| ACKErrorCode | stop (int timer) |
| stop the hotpoint mission More... | |
| void | pause (VehicleCallBack callback=0, UserData userData=0) |
| pause the hotpoint mission More... | |
| ACKErrorCode | pause (int timer) |
| pause the hotpoint mission More... | |
| void | resume (VehicleCallBack callback=0, UserData userData=0) |
| resume the hotpoint mission More... | |
| ACKErrorCode | resume (int timer) |
| resume the hotpoint mission More... | |
| void | updateYawRate (YawRate &Data, VehicleCallBack callback=0, UserData userData=0) |
| update yaw rate and orientation of hotpoint mission More... | |
| ACKErrorCode | updateYawRate (YawRate &Data, int timer) |
| update yaw rate and orientation of hotpoint mission More... | |
| void | updateYawRate (float32_t yawRate, bool isClockwise, VehicleCallBack callback=0, UserData userData=0) |
| update yaw rate and orientation of hotpoint mission More... | |
| void | updateRadius (float32_t meter, VehicleCallBack callback=0, UserData userData=0) |
| update radius of hotpoint mission More... | |
| ACKErrorCode | updateRadius (float32_t meter, int timer) |
| update radius of hotpoint mission More... | |
| void | resetYaw (VehicleCallBack callback=0, UserData userData=0) |
| reset yaw of hotpoint mission More... | |
| ACKErrorCode | resetYaw (int timer) |
| reset yaw of hotpoint mission More... | |
| void | readData (VehicleCallBack callback=0, UserData userData=0) |
| read hotpt mission info from flight controller More... | |
| ACKErrorCode | readData (int timer) |
| read hotpt mission info from flight controller More... | |
| void | setHotpointCallback (VehicleCallBack callback, UserData userData) |
| Set hotpoint callback. More... | |
| void | setData (HotPointSettings *data) |
| void | setHotPoint (float64_t longtitude, float64_t latitude, float64_t altitude) |
| void | setHotPoint (Telemetry::GlobalPosition gps) |
| void | setRadius (float64_t meter) |
| void | setYawRate (float32_t defree) |
| void | setClockwise (bool isClockwise) |
| void | setCameraView (View view) |
| void | setYawMode (YawMode mode) |
| Public Member Functions inherited from DJI::onboardSDK::MissionBase | |
| MissionBase (Vehicle *vehicle=0) | |
Static Public Member Functions | |
| static void | startCallback (RecvContainer recvFrame, UserData userData) |
| A callback function for start non-blocking calls. More... | |
| static void | readCallback (RecvContainer recvFrame, UserData userData) |
| A callback function for read non-blocking calls. More... | |
Public Attributes | |
| VehicleCallBackHandler | hotPointCallback |
Additional Inherited Members | |
| Protected Attributes inherited from DJI::onboardSDK::MissionBase | |
| Vehicle * | vehicle |
APIs for Hotpoint (Point of Interest) Missions.
This class inherits from MissionBase and can be used with MissionManager.
| HotPoint::HotPoint | ( | Vehicle * | vehicle = 0 | ) |
| HotPointSettings HotPoint::getData | ( | ) | const |
getting hotpoint data
| void HotPoint::initData | ( | ) |
init hotpoint default data
|
virtual |
pause the hotpoint mission
| callback | callback function |
| userData | user data (void ptr) |
Implements DJI::onboardSDK::MissionBase.
|
virtual |
pause the hotpoint mission
| timer | timeout to wait for ACK |
Implements DJI::onboardSDK::MissionBase.
|
static |
A callback function for read non-blocking calls.
| recvFrame | the data comes with the callback function |
| userData | a void ptr that user can manipulate inside the callback |
| void HotPoint::readData | ( | VehicleCallBack | callback = 0 , |
| UserData | userData = 0 |
||
| ) |
read hotpt mission info from flight controller
| callback | callback function |
| userData | user data (void ptr) |
| ACKErrorCode HotPoint::readData | ( | int | timer | ) |
read hotpt mission info from flight controller
| timer | timeout to wait for ACK |
| void HotPoint::resetYaw | ( | VehicleCallBack | callback = 0 , |
| UserData | userData = 0 |
||
| ) |
reset yaw of hotpoint mission
| callback | callback function |
| userData | user data (void ptr) |
| ACKErrorCode HotPoint::resetYaw | ( | int | timer | ) |
reset yaw of hotpoint mission
| timer | timeout to wait for ACK |
|
virtual |
resume the hotpoint mission
| callback | callback function |
| userData | user data (void ptr) |
Implements DJI::onboardSDK::MissionBase.
|
virtual |
resume the hotpoint mission
| timer | timeout to wait for ACK |
Implements DJI::onboardSDK::MissionBase.
| void HotPoint::setData | ( | HotPointSettings * | data | ) |
| void HotPoint::setHotpointCallback | ( | VehicleCallBack | callback, |
| UserData | userData | ||
| ) |
Set hotpoint callback.
| callback | callback function |
| userData | a void ptr that user can manipulate inside the callback |
|
virtual |
start the hotpoint mission
| callback | callback function |
| userData | user data (void ptr) |
Implements DJI::onboardSDK::MissionBase.
|
virtual |
start the hotpoint mission
| timer | timeout to wait for ACK |
Implements DJI::onboardSDK::MissionBase.
|
static |
A callback function for start non-blocking calls.
| recvFrame | the data comes with the callback function |
| userData | a void ptr that user can manipulate inside the callback |
|
virtual |
stop the hotpoint mission
| callback | callback function |
| userData | user data (void ptr) |
Implements DJI::onboardSDK::MissionBase.
|
virtual |
stop the hotpoint mission
| timer | timeout to wait for ACK |
Implements DJI::onboardSDK::MissionBase.
| void HotPoint::updateRadius | ( | float32_t | meter, |
| VehicleCallBack | callback = 0 , |
||
| UserData | userData = 0 |
||
| ) |
update radius of hotpoint mission
| meter | radius |
| callback | callback function |
| userData | user data (void ptr) |
| ACKErrorCode HotPoint::updateRadius | ( | float32_t | meter, |
| int | timer | ||
| ) |
update radius of hotpoint mission
| meter | radius |
| timer | timeout to wait for ACK |
| void DJI::onboardSDK::HotPoint::updateYawRate | ( | YawRate & | Data, |
| VehicleCallBack | callback = 0 , |
||
| UserData | userData = 0 |
||
| ) |
update yaw rate and orientation of hotpoint mission
| Data | specified yaw rate and orientation |
| callback | callback function |
| userData | user data (void ptr) |
| ACKErrorCode DJI::onboardSDK::HotPoint::updateYawRate | ( | YawRate & | Data, |
| int | timer | ||
| ) |
update yaw rate and orientation of hotpoint mission
| Data | specified yaw rate and orientation |
| timer | timeout to wait for ACK |
| void HotPoint::updateYawRate | ( | float32_t | yawRate, |
| bool | isClockwise, | ||
| VehicleCallBack | callback = 0 , |
||
| UserData | userData = 0 |
||
| ) |
update yaw rate and orientation of hotpoint mission
| yawRate | specified yaw rate |
| isClockwise | specified orientation |
| timer | timeout to wait for ACK |


@import domain.Assessment @(assessment: Assessment, error: Option[String])(implicit request: RequestHeader, messagesProvider: MessagesProvider, context: RequestContext) @adminLayout(s"Generating submissions zip for assessment ${assessment.moduleCode}", extraClasses = if (error.isEmpty) Seq("generating-zip") else Seq.empty) { @error.map { errorMessage =>
@context.appFullName is generating a zip file of submissions for @{assessment.title}.
Your download will start once the zip file is ready…
} }


3 DIfference in diet between H. curtus and H. schsitosus
3.1 No. of samples collected by sea snake species
source("./Functions/setup.R")
# importing gut content data
= read.csv("./Data/Sea_snakes_gut_content_2018-19.csv") %>%
gc filter(Source == "Gut content") # removing specimens collected from fisheries landings
%>%
snakesfilter(Species == "Hydrophis curtus" | Species == "Hydrophis schistosus")%>%
group_by(Species)%>%
summarise(N = n(), # total number of individuals sampled
n = sum((Gut.Content) == "Yes"), # number of individuals with gut content
n_male = sum((Gut.Content) == "Yes" & Sex == "Male"), # males with gut content
n_female = sum((Gut.Content) == "Yes" & Sex == "Female"), # females with content
prop.gc = n/N) # propotion of individuals with gut content
| Species | N | n | n_male | n_female | prop.gc |
|---|---|---|---|---|---|
| Hydrophis curtus | 179 | 36 | 18 | 18 | 0.2011173 |
| Hydrophis schistosus | 605 | 93 | 55 | 36 | 0.1537190 |
A very low proportion of individuals had gut content present at the time of sampling. Sampling across species and sexes may be adequate for comparison.
3.2 Total number of prey specimens collected
%>%
gc group_by(Snake.Species) %>%
summarise(N = length(unique(GC.Code)))
| Snake.Species | N |
|---|---|
| Hydrophis curtus | 35 |
| Hydrophis schistosus | 89 |
3.3 Proportion of unidentified specimens
# calculating richness
%>%
gcsummarise(N_sp = length(unique(Prey.Species)), # number of prey species
N_fam = length(unique(Prey.Family)), # number of prey families
# proportion of unidentitified specimens
unid_sp = sum(Prey.Species == "Unidentified" | Prey.Species == "", na.rm = T)*100/n(), ## species
unid_fam = sum(Prey.Family == "Unidentified" | Prey.Family == "", na.rm = T)*100/n())%>% ## family
# creating clean table
gather()%>%
mutate(Metric = ifelse(substr(key, 1, 1) == "N", "Richness", "% Unidentified"),
Unit = ifelse(grepl(key, pattern = "sp", fixed = T), "Prey Species", "Prey Family"))%>%
::select(Unit, Metric, value)%>%
dplyrspread(Metric, value)
| Unit | % Unidentified | Richness |
|---|---|---|
| Prey Family | 29.45736 | 17 |
| Prey Species | 40.31008 | 26 |
A large portion of gut content specimens were unidentifiable. This is an unavoidable consquence of VGCA.
3.4 No. of snakes with mode than one prey specimen
%>%
gc filter(Field.Code != "") %>%
count(Field.Code, name = "Prey") %>%
count(Prey > 1)
| Prey > 1 | n |
|---|---|
| FALSE | 96 |
| TRUE | 8 |
3.5 Prey preference
We modified and used the the Index of relative importance according to Pinkas et al. 1971 to determine the difference in prey preference between H. curtus and H. schistosus
# calulating index of relative importance (Pinkas et al. 1971)
<- gc%>%
IRI filter(Prey.Family != "")%>%
filter(Snake.Species == "Hydrophis schistosus" | Snake.Species == "Hydrophis curtus")%>%
group_by(Snake.Species)%>%
mutate(Fr = length(unique(Field.Code)), # total number of snakes sampled
W = sum(Weight..g., na.rm = T), # total weight of prey sampled
N = n())%>% # total number of prey sampled
group_by(Snake.Species, Prey.Family)%>%
summarise(f = length(unique(Field.Code)), # number snakes in which prey family occured
Fr = last(Fr),
w = sum(Weight..g., na.rm = T), # weight of prey family
W = last(W),
n = n(), # number of individuals of prey family
N = last(N))%>%
group_by(Snake.Species, Prey.Family)%>%
# caluclating percentages
summarise(per.F = f*100/Fr,
per.W = w*100/W,
per.N = n*100/N,
# caluclating IRI
IRI = (per.N + per.W)*per.F)%>%
ungroup()%>%
complete(Prey.Family, nesting(Snake.Species), fill = list(0))%>%
replace_na(replace = list(IRI = 0, per.F = 0, per.W = 0, per.N = 0))%>%
arrange(Snake.Species, desc(IRI))%>%
mutate(rank = 1:n())
# clean table
%>%
IRIfilter(IRI > 0)
| Prey.Family | Snake.Species | per.F | per.W | per.N | IRI | rank |
|---|---|---|---|---|---|---|
| Unidentified | Hydrophis curtus | 44.827586 | 15.2823920 | 40.625000 | 2506.193436 | 1 |
| Clupeidae | Hydrophis curtus | 6.896552 | 29.9003322 | 9.375000 | 270.864360 | 2 |
| Engraulidae | Hydrophis curtus | 10.344828 | 11.9601329 | 9.375000 | 220.708271 | 3 |
| Carangidae | Hydrophis curtus | 13.793103 | 3.3222591 | 12.500000 | 218.238057 | 4 |
| Scombridae | Hydrophis curtus | 6.896552 | 6.6445183 | 6.250000 | 88.927712 | 5 |
| Cynoglossidae | Hydrophis curtus | 6.896552 | 3.9867110 | 6.250000 | 70.598007 | 6 |
| Serranidae | Hydrophis curtus | 3.448276 | 16.6112957 | 3.125000 | 68.056192 | 7 |
| Leiognathidae | Hydrophis curtus | 6.896552 | 2.9900332 | 6.250000 | 63.724367 | 8 |
| Tetraodontidae | Hydrophis curtus | 3.448276 | 7.6411960 | 3.125000 | 37.124814 | 9 |
| Nemipteridae | Hydrophis curtus | 3.448276 | 1.6611296 | 3.125000 | 16.503895 | 10 |
| Tetraodontidae | Hydrophis schistosus | 34.246575 | 38.7307267 | 35.869565 | 2554.804519 | 17 |
| Unidentified | Hydrophis schistosus | 23.287671 | 12.9453244 | 21.739130 | 807.720182 | 18 |
| Ariidae | Hydrophis schistosus | 9.589041 | 8.8407094 | 8.695652 | 168.156891 | 19 |
| Clupeidae | Hydrophis schistosus | 6.849315 | 10.9456402 | 6.521739 | 119.639584 | 20 |
| Plotosidae | Hydrophis schistosus | 8.219178 | 7.7882440 | 6.521739 | 117.616299 | 21 |
| Teraponidae | Hydrophis schistosus | 6.849315 | 6.5673841 | 5.434783 | 82.206621 | 22 |
| Serranidae | Hydrophis schistosus | 5.479452 | 7.6303742 | 5.434783 | 71.589900 | 23 |
| Leiognathidae | Hydrophis schistosus | 4.109589 | 1.0524654 | 3.260870 | 17.726034 | 24 |
| Synodontidae | Hydrophis schistosus | 2.739726 | 1.1840236 | 2.173913 | 9.199826 | 25 |
| Sillaginidae | Hydrophis schistosus | 1.369863 | 2.4206704 | 1.086957 | 4.804968 | 26 |
| Scombridae | Hydrophis schistosus | 1.369863 | 1.2103352 | 1.086957 | 3.146975 | 27 |
| Pleuronectidae | Hydrophis schistosus | 1.369863 | 0.3683629 | 1.086957 | 1.993588 | 28 |
| Carangidae | Hydrophis schistosus | 1.369863 | 0.3157396 | 1.086957 | 1.921502 | 29 |
# plotting prey preference
%>%
IRI ggplot(aes(reorder(Prey.Family, IRI), IRI, fill = Snake.Species)) + geom_col(col = "black", position = position_dodge(preserve = "single")) + scale_y_sqrt(name = "IRI (sq.rt.)") +
labs(x = "Prey Family") + scale_fill_brewer(palette = "Greys", name = "Snake Species") + theme(axis.text.x = element_text(hjust = 1, angle = 60), legend.text = element_text(face = "italic"))
# saving high res plot
ggsave(last_plot(), filename = "./Figures and Tables/figure2.tiff", width = 8, height = 6, dpi = 300)
Figure 2: Index of relative importance (IRI, square root transformed) (Pinkas et al., 1970) of prey families in sea snake diet.
H. schistosus showed preference for the Tetraodontid fish, while H. curtus did not exhibit any prey preference.
3.6 Range of prey found in H. curtus and H. shistosus gut
We compared the dietary breadth between snakes species using the richness and diversity of prey families.
# Creating data matrix for prey community analysis analysis
= gc%>%
fam_spade filter(Prey.Family != "Unidentified", Prey.Family !="", Field.Code != "")%>% # removing unidentified specimens
group_by(Snake.Species, Prey.Family)%>%
summarise(n = n())%>% # total number of specimens per family in each snake species
spread(Snake.Species, n, fill = 0)%>%
column_to_rownames("Prey.Family")
3.6.1 Prey richness
%>%
gcfilter(Snake.Species == "Hydrophis schistosus" | Snake.Species == "Hydrophis curtus",
!= "Unidentified", Prey.Family != "")%>%
Prey.Family group_by(Snake.Species)%>%
summarise(Prey.Species = length(unique(Prey.Species)) - 1, # removing unidentified
Prey.Families = length(unique(Prey.Family)))
| Snake.Species | Prey.Species | Prey.Families |
|---|---|---|
| Hydrophis curtus | 11 | 9 |
| Hydrophis schistosus | 19 | 12 |
3.6.2 Prey family diversity
# loading libraries
library(SpadeR) ## for community indices
# calculating shanon diversity
= as.data.frame(Diversity(fam_spade[, 1])$Shannon_diversity) %>%
HC_div rownames_to_column("Estimator") %>%
mutate(Species = "Hydrophis curtus")
= as.data.frame(Diversity(fam_spade[, 2])$Shannon_diversity) %>%
HS_div rownames_to_column("Estimator") %>%
mutate(Species = "Hydrophis schistosus")
%>%
HC_div full_join(HS_div) %>%
::select(Species, everything()) %>%
dplyrarrange(Estimator)
| Species | Estimator | Estimate | s.e. | 95%Lower | 95%Upper |
|---|---|---|---|---|---|
| Hydrophis curtus | Chao & Shen | 11.671 | 3.155 | 5.487 | 17.855 |
| Hydrophis schistosus | Chao & Shen | 7.427 | 1.158 | 5.158 | 9.696 |
| Hydrophis curtus | Chao et al. (2013) | 12.029 | 3.207 | 5.744 | 18.314 |
| Hydrophis schistosus | Chao et al. (2013) | 7.509 | 1.179 | 5.198 | 9.820 |
| Hydrophis curtus | Jackknife | 11.776 | 2.583 | 6.713 | 16.839 |
| Hydrophis schistosus | Jackknife | 7.301 | 1.126 | 5.093 | 9.508 |
| Hydrophis curtus | MLE | 8.073 | 1.181 | 5.758 | 10.388 |
| Hydrophis schistosus | MLE | 6.428 | 0.911 | 4.642 | 8.214 |
While H. schistosus fed on greater number of prey families, H. curtus showed greater evenness in prey preference.
Statistical comparison is difficult as each individual snake fed on only one type of specimen at time.
3.7 Diet overlap between H. curtus and H. shistosus
Number of overlapping prey families:
%>%
gc filter(Snake.Species == "Hydrophis schistosus" | Snake.Species == "Hydrophis curtus", Prey.Family != "Unidentified", Prey.Family != "") %>%
group_by(Prey.Family) %>%
summarise(N_pred = length(unique(Snake.Species))) %>%
ungroup() %>%
summarise(Overlap = sum(N_pred > 1)) %>%
as.numeric()
## [1] 6
Shoener’s (1971) resource overlap index (D):
%>%
gcfilter(Prey.Species != "Unidentified")%>%
group_by(Snake.Species, Prey.Family)%>%
summarise(n = n())%>% # number of speciemens per prey family in each snake species
group_by(Snake.Species)%>%
mutate(N = sum(n))%>% # total number of specimens collected from each snake species
group_by(Snake.Species, Prey.Family)%>%
summarise(p = n/N)%>% # relative proportion of each prey family
spread(Snake.Species, p, fill = 0)%>%
rename("HC" = 'Hydrophis curtus', "HS" = 'Hydrophis schistosus')%>%
mutate(P = abs(HC - HS))%>% # difference in relactive proportion prey items
summarise(D = 1 - 0.5*sum(P))%>% # Schoener's resource overlap index
as.numeric()
## [1] 0.2380952
Morista - Horn overlap:
<- SimilarityPair(X = fam_spade, datatype = "abundance")
prey_sim
$Empirical_relative prey_sim
## Estimate s.e. 95%.LCL 95%.UCL
## C12=U12(q=1,Horn) 0.4419859 0.1103973 0.2256071 0.6583647
## C22(q=2,Morisita) 0.2777801 0.1131096 0.0560853 0.4994749
## U22(q=2,Regional overlap) 0.4347854 0.1461632 0.1483056 0.7212653
## ChaoJaccard 0.4946000 0.1537000 0.1933480 0.7958520
## ChaoSorensen 0.6619000 0.1736000 0.3216440 1.0021560
There was limited overlap in prey between H. schistosus and H. curtus
3.7.1 Testing segregation in prey between H. curtus and H. schistosus
# loading libraries
library(vegan)
# formating data for vegan
<- gc %>%
fam_simboo filter(Prey.Family != "Unidentified", Prey.Family != "", Field.Code != "") %>%
group_by(Snake.Species, Field.Code, Prey.Family) %>%
summarise(n = n()) %>%
spread(Prey.Family, n, fill = 0) %>%
ungroup()
# PERMANOVA to compare composition
set.seed(2)
<- adonis2(fam_simboo[, 3:length(fam_simboo)] ~ fam_simboo$Snake.Species, data = fam_simboo[, 1])
permanova_sp
## clean table
::tidy(permanova_sp) broom
| term | df | SumOfSqs | R2 | statistic | p.value |
|---|---|---|---|---|---|
| fam_simboo$Snake.Species | 1 | 1.556349 | 0.0511228 | 3.771403 | 0.002 |
| Residual | 70 | 28.886984 | 0.9488772 | ||
| Total | 71 | 30.443333 | 1.0000000 |
Prey composition was significantly different between the two snake species.
3.8 Difference in size selectivity of prey between H. curtus and H. schistosus
# summary
%>%
gcfilter(Snake.Species == "Hydrophis schistosus" | Snake.Species == "Hydrophis curtus",
< 3)%>% # removing very digested specimens
Condition group_by(Snake.Species)%>%
::skim(Maximum.Body.Girth..cm.)%>%
skimr::yank("numeric")%>%
skimr::select(Snake.Species:p100) dplyr
Variable type: numeric
| Snake.Species | n_missing | complete_rate | mean | sd | p0 | p25 | p50 | p75 | p100 |
|---|---|---|---|---|---|---|---|---|---|
| Hydrophis curtus | 2 | 0.86 | 2.77 | 0.76 | 2.0 | 2.08 | 2.65 | 3.2 | 4.5 |
| Hydrophis schistosus | 0 | 1.00 | 3.46 | 1.17 | 0.6 | 3.00 | 3.60 | 4.3 | 5.5 |
# testing diff max prey width by species
%>%
gcfilter(Snake.Species == "Hydrophis schistosus" | Snake.Species == "Hydrophis curtus",
< 3, # removing digested specimens
Condition !is.na(Maximum.Body.Girth..cm.))%>% # removing unrecorded data
::select(Snake.Species, Maximum.Body.Girth..cm.)%>%
dplyrdroplevels()%>%
nest()%>%
mutate(test = map(data, ~t.test(Maximum.Body.Girth..cm. ~ Snake.Species, data = .)), # t test
sumry = map(test, broom::tidy),
d = map(data, ~lsr::cohensD(Maximum.Body.Girth..cm. ~ Snake.Species, data = .)))%>% # effect size
::select(sumry, d)%>%
dplyrunnest()%>%
::select(estimate1:parameter, d)%>%
dplyrrename(`Hydrophis curtus` = estimate1,
`Hydrophis schistosus` = estimate2)
| Hydrophis curtus | Hydrophis schistosus | statistic | p.value | parameter | d |
|---|---|---|---|---|---|
| 2.76775 | 3.463946 | -2.386272 | 0.0237889 | 28.90876 | 0.6420566 |
H. schistosus fed on larger prey than H. curtus


To view the T3A1 Workbook in Github
Please click here
Provide an overview and description of a standard source control process for a large project
Outline a standard high level structure for a MERN stack application and explain the components
Explain control flow, using an example from the JavaScript programming language
Explain type coercion, using examples from the JavaScript programming language
Explain data types, using examples from the JavaScript programming language
Let say you want to check source code or files from start to finish, Version Control or Source control is a tool most projects used. It functions as a time machine in which you can go back from history to present.
| # | Functions of Version Control(Source Control) |
|---|---|
| Backup and Restore | All your work will be saved, edited and can be restored in the beginning up to the recent changes. |
| Synchronization | People working in the project can collaborate with source codes and will let them update to the current one. |
| Short-term undo | If we made any errors and don't know how to fixed it, we can just disregard the changes and go back to the last known working state. |
| Long-term undo | If theres already a lot of source code written and let say they have tag with versions, We can go over it and check the logs for that tag. |
| Track Changes | Any changes we made, let say adding, removing, updating or deleting files, we can comment message for that certain change or changes making it easy for yourself or others when you go back and had a look on how your work had developed overtime. |
| Track Ownership | All the changes that you've made will be reflected under however made those revisions so everyone working on that file will know whoever is responsible. |
| Sandboxing | Basically, you can test whatever you want to change before committing and deploying your changes. |
| Branching and merging | This provides us an option for our code to be modular. We can segregate major changes, test it before we merge it back to the working state. |
| # | Basic Setup |
|---|---|
| Repository (repo) | This will be your online database thats stores your code. |
| Server | This will be your local machine which stores the repository. |
| Client | This will be your computer connecting to the repository. |
| Working Set/Working Copy | This will be your local files where you made changes. |
| Trunk/Main | This will be the main line for your code in the repository. |
*** In this example, each time we made a change or add something to a code, it provides references
*** In this example, everthing time you check in youl be given the recent version of the code and can go back to previous ones.
*** In this example, we can see the difference between every stages weve made.
*** In this example, we can sandbox any changes we want to implement before adding it to the working state.
*** In this, example after making those changes in the branch, we added those changes in the main one.
*** In this example, we can see two those changes which is different and gives conflict on which is right or wrong before merging to the main state
*** In this example, we can tag changes so that it will be easier to reference.
The following are aspects in measuring the quality of a software:
| Aspect of Quality Software | Description |
|---|---|
| Reliability | A reliable software should be consistent and plenty software testing is imperative prior to deployment to minimise errors. There is no such thing as a zero-bug software however a reliable software should have very few faults and these faults should be fixed in a timely manner. |
| Understandability | A software developer must exercise clear, highly organised and logical structured code. It is difficult to manage a software if it is poorly written. It also affects the effectivity and efficiency during bug-fixing and testing if code is not done in an organised way. |
| Modifiability | Similar to understandability, if a software is well-organised, it is easy to make modifications. It should be flexible and any changes to be done should be also be easy to deploy when done. |
| Usability | One of the purposes of a software development is to meet specific needs of a client. This can be achieved when a software is effective, and it can only be effective if the user is comfortable using the software after a short training. |
| Testability | Testability – Quality of a software depends on testability. If the errors are found and corrected prior deployment, the software becomes reliable. Testing saves time, effort and costs. |
| Portability | A software should be able to work in multiple environments and can be transferred to another environment and still work properly with small changes. |
| Efficiency | An efficient software should use very little physical resources as can possibly get but still perform a function as required. |
MERN stack is one of the JavaScript web app stacks that is being used in creating web applications. Its main purpose is to create effective, efficient, fast and flexible web applications by putting together these four components – MongoDB, Express, React and Node.js.
| Components | Description |
|---|---|
| MongoDB | Compared to other database, MongoDB is a document database which is non relational (NOSQL) and doesn't use schema formats like tables and columns. The data format of the document is query through Javascript Object Notation (JSON). |
| Express | A back-end or server side framework. Its considered web application framework for Node. It simplifies the task of writing server side codes. Known for its speed and minimalist structure, which features many available plugins which will make your code DRY. |
| React | It is one of javaScript libraries for client side interface. It was created by Facebook. Its library is used for creating views in HTML. React views are declarative which automate the creation of repetitive HTML or DOM elements. |
| Node.js | A cross-platform JavaScript runtime environment which is built on Chrome’s V8 JavaScript engine. It is designed to run Javascript code with multiple files. |
| # | Skills / Knowledge to develop a Website |
|---|---|
| Programming | there are plenty of programming languages available and they are created for different purposes. HTML, CSS and JavaScript are the three most popular. HTML is short for Hypertext Markup Language, it is used in creating pages in web browser. Contents and links that can be viewed in the web pages are done using HTML. CSS means Cascading Style Sheets, this allows programmer to create style on pages. Colours, fonts and layout that we view in web pages are done using CSS. JavaScript on the other hand is .... |
| Learning | Web developers should not only know how about programming languages but also knowledgeable about the project. It is important that the programmer is aware of the purpose why there is a project and able to meet expectations. |
| Testing | Testing during the development phase and prior to delivering the final product are equally both important. This is to save time, money and make sure everything is working fine to satisfy customer requirements. |
| Basic Knowledge of Design | A developer should have basic understanding in graphic design or using graphic tools. This assists the developer into building the website as to what the customer desires. |
| SEO | It is important for a developer to have understanding on how search engines work. As the team is developing a website for a small business, it is vital for the business to have online presence and increase customers. |
| Understanding Common Security Attacks and How to Prevent Them | Protecting website from Cybersecurity attacks are essential. Any website developer should have a basic understanding of different types and how to prevent as such. These could pose serious threats to businesses if not considered at time of web development. |
| Image Resizing and Effects | A website developer should be familiar in using Photoshop or related graphics editor. In this day and age, customers are more inclined into visually minded web pages. |
| Resoluteness | Resoluteness is a character of a person rather than a skill. It takes an adequate of determination to learn from mistakes, fixing the problem and finishing a task. |
| Confidence | A website developer should stay focused on his task and believe in one’s self that it can be done. |
| Frustration Tolerance and Patience | When working on a project, there are plenty of testing that needs to be done. It is important that the developer does not give up when faced with trials. |
| Time Management and Detailed Planning | It very important for the team to do lots of planning when working on a project. A project management software or applications can be used to delegate tasks, managing hours and tracking progress. |
In relation to my last rails project (marketplace app), listed below were the knowledge or skills required and challenges encountered;
| Knowledge / Skills | Description |
|---|---|
| Programming | As part of the requirement, we need to create the application using Ruby on Rails. Upon learning Ruby on the first term, it helps to learn the basics for the MVC framework such as Ruby on Rails. Also learning HTML and CSS in term 1 contributes in designing and styling the Client-side of the application. |
| Learning | Before or as you build the project, you will encounter some ideas that you want to implement in the application. Most of the time, these will include a lot of reading documentations and even watching tutorials on how it works. Some of these concept were not taught in school so you need to do a lot of research. |
| Testing | As we build along the project, we make sure that we test the application after every feature we implement. This include testing on both development and production. By doing that, it helps us narrow down the source of errors or bugs if theres any. |
| Design | By learning HTML and CSS on the first term, we managed to implement some knowledge and techniques to our design. The use of wireframes and mood boards helps us layout the basic design and build up as we go along. Learning CSS libraries such as Bootstrap and Bulma contributes well for the overall user experience. |
| Time Management and Planning | Whether you’re in school learning or at work for a company, we need to stay on top of your schedule and your projects This can mean getting to know productivity apps like task lists or calendars or, especially if you’re in a large organization. We've used project tracking tools like Trello to keep track on the development of the project. Whatever the tools, mastering the art of prioritizing and tracking your work will be essential. |
| Challenges Encountered | How we overcome |
|---|---|
| Time Limitation | Delivering a project in a very short period of time was challenging. Judgment and emotions affect decision making when working under pressure. Using Trello and Canban methodology, we were able to manage our time and tasks. |
| User-friendly Design | End users of the project does not have understandings of how the website was done or what programming languages were used. They are more concerned of what the web pages will look like, how appealing it is and how easy it is to navigate. Usability can be perspective. We asked our educators and associates to test the website and get some feedback. |
If given chance to redo everything, il will consider;
| Steps | Changes |
|---|---|
| Reevaluate | Using my knowledge in software development, learning new skills and plenty of testing, I was able to finish the project. In future projects, it will be great to work in teams so we can collaborate, share the load and increase efficiency. |
| Figure out the failures | Creating a project and learning new things can be quite exciting. During planning, I was inclined to add plenty of features not realising how complicated it can be and that it took much of my time trying to figure out how to do it. In future projects, I would still want to add a feature or two that I know the end user will appreciate, to challenge myself but also make sure that it can be done within the time-frame. |
Most of our code involves control flow in which often times we want our program to act differently based on the information supplied to it. In Javascript it uses control flow like any other languages, we just need to understand and be able to use different operators and how to use them.
| Operators | Description | Example |
|---|---|---|
| Undefined and Null | Whenever you are looking for something that does not exist like a variable which has no value yet then you'll get undefined. Null is an object that we can use to tell others that the item exists, but there is no value at the moment. | |
| Truthiness | It gives us a true or false value when we use an if or other statements otherwise Javascript will perform type coercion and will transform it to Boolean value which will be truthy or falsey. | |
| Comparison Operators | The triple equal sign(===) compares everything about two items which includes its type and value. The not equal which is represented by adding exclamation symbol (!==) does the opposite of equality operator. | |
| Logical Operators | The AND which is composed with two ampersands && assesses the two articulations and returns valid if the two articulations are valid. Otherwise, if one or both of them is false it will return false. The OR is composed with two vertical bar checks on the off chance that one of the articulations is valid. It will return valid in the event that one or both of the articulations is valid. It will return false if BOTH articulations are false. Lastly, the NOT operator returns the opposite Boolean value you've passed to it. | |
| If Operator | If operators check if the statement we pass is true then proceed to executing some functions otherwise skips the code and do something else. | |
| If,Else if, Else | These statements must be used with if and must come after it. These statements are going to be evaluated if the initial if returns false. we are able to consider the else if as another if statement that has been chained and we can have as many else if statements we want. The else statement will always come at the tip of an if-else if chain, and can act as a default. If none of the expressions returned true, the else code block is going to be run regardless of what. If any of the previous if alternatively if expressions are true, the else statement code block won't be run. |
Type Coercion is that the process of converting type of value from one type to a different like string to boolean, object to boolean, and so on. Any type, be it primitive or an object, could be a valid subject for type coercion.
| Types of Coercion | Description | Example |
|---|---|---|
| Explicit or ‘Type casting’ | This happens when the programmer explicitly converts the kind of value to the required type. | |
| Implicit | They are the sort of conversions that are hidden. JavaScript being the weakly-typed language, values are often converted between differing types of ‘implicitly’. |
| Types of Conversion | Description | Example |
|---|---|---|
| String conversion | The toString() may also be accustomed convert any type to string, however, as explicit because it might sound from the code, it's much underlying nature. the explanation being it can not be directly used on primitive values like numbers or Boolean true. So, a kind variable being an object wrapper will invoke the toString() method. | |
| Numeric conversion | The Number(..) function coerces to the other type value to a primitive number value. in a different way of explicit coercion is by using unary operator + where it explicitly coerces its operand (i) to number value. | |
| Boolean conversion | To explicitly convert the value to a boolean type Boolean(..) function is used. a bit like the unary + operator coerces a worth to variety the unary !== operator explicitly coerces a worth to a boolean. '!' operator explicitly inverses the truthy to falsy and the other way around. Any value utilized in these contexts that's not already a boolean will first be implicitly coerced to a boolean. Both Or and And operators perform a boolean test on the primary operand (a or c). For the OR operator, if the test is true, the OR expression ends up in the value of the primary operand (a or c). If the test is fake, the OR expression ends up in the value of the second operand (b). Inversely, for the && operator, if the test is true, the && expression ends up in the value of the second operand (b). If the test not true, the AND expression ends up in the value of the primary operand (a or c). This test returns the primary falsy value. | Explicit Implicit |
| Data Types | Description |
|---|---|
| Number | The numbers in Javascript were '+Infinity', ' -Infinity', 'NaN' (Not a number). Infinity is the numeric value that represents a positive number that approaches infinity and -Infinity is the numeric value that represents a negative number that approaches infinity while NaN is the numeric value that represents a non-number, standing for not variety |
| String | String represents some textual data and its values were enclosed in quotation marks often times may be single or double quotation. |
| Boolean | It represents a logical entity that may have one among two values true or false. |
| Undefined | The undefined value is assigned to a newly created variable that isn’t assigned with any value. |
| Null | Null shows a end point to a non-existent entity or some invalid address in memory. |
| Symbol | The Symbol() function makes a value of type symbol. |
| Object | Objects are often represented with curly braces which represent an instance that one can access. |
| Array Manipulation | Description | Example |
|---|---|---|
| Iterating Array | The for loop is one amongst the foremost basic which takes a starting index and so loops through to the ending index which must be an integer. | |
| while loops whenever a condition stays true. | ||
| do...while loop will always run the first iteration. | ||
| forEach will iterate through every entry of the array which takes a callback function where you can execute code. | ||
| Find Element in Array | Array.find will return the element in the array with the given condition. | |
| Array.findIndex will return the index of the element in the array with the given condition. | ||
| Check if Element Exists in Array | Array.includes checks if an item exists in an array. | |
| Array.some checks if some items meet the condition given. It takes a callback function which returns a boolean for the condition. | ||
| Array.every checks if every item meet the condition given. It takes a callback function which returns a boolean for the condition. | ||
| Check If an Object Is an Array | Array.isArray checks if an object given is an array. It is a convenient way to check if an element is an array. | |
| Remove Duplicates in Array | Set is a object that cannot have duplicate entries. You can create a new Set from an array then convert it back to an array. | |
| Array.slice(startIndex, endIndex) Returns a new array from startIndex to endIndex — 1. | ||
| Array.splice(index, numberOfItems) Remove array item in place with the given index, and then numberOfItems after it. | ||
| Array.sort sorts array in place according to the condition you return in sortFunction. | ||
| Array.fill will add or replace the element with the element specified from startIndex to endIndex. | ||
| Array.flat function does not do a good job of recursively flatten arrays. The depth is limited and it does not flatten all kinds of nested array structures. | ||
| Array.join will return a string by concatenating the entries after they are converted to string with separator between each entry. | ||
| Array.indexOf will return the first index of the elementToFind in the array. | ||
| Array.lastIndexOf will return the last index of the elementToFind in the array. | ||
| Array.push adds a new element to an array. | ||
| Array.pop removes the last element of the array. | ||
| Array.map returns a new array which transforms the existing array’s element by calling the mapFunction . mapFunction takes one argument, which is the array element. | ||
| Array.reduce combines elements of an array to return a value by calling the reduceFunction on all the elements to combine them. reduceFunction takes 2 arguments, which is the current and next element in the array. | ||
| Array.reverse returns a new array with the existing array’s elements in reverse order. |
| Object Manipulation | Description | Example |
|---|---|---|
| Accessing Object Properties | We are able to access object properties in two other ways. one among them is bracket notation and another is that the dot notation. | |
| Get Values from an Object | Object.values() returns an array of the values of an object | |
| Get Keys from an Object | Object.keys() gives back an array of the keys of an its object. | |
| Object To Array Entries | Object.entries() creates an array that contains arrays of key/value pairs of an object. | |
| Merging Object with Spread | Merging two objects which returns a brand new object. | |
| Combining Two Object | Object.assign() is comparable to the spread operator. It allows for objects to be combined together. | |
| Freezing An Object | Object.freeze() prevents from modifying existing properties or adding new properties and values within the object. It’s often what people think const does, however const allows you to change an object. | |
| Object Frozen or Not | The Object.isFrozen() determines if an object is frozen. Return Boolean value. | |
| Sealing an Object | Object.seal() seals an object, preventing new properties from being added thereto and marking all existing properties as non-configurable. Values of present properties can still be changed as long as they're writable. | |
| Object Sealed or Not | The Object.isSealed() method finds out if an object is sealed. | |
| Localization | Object.toLocaleString() method returns a string representing the article. This method is supposed to be overridden by derived objects for locale-specific purposes. |
| JSON Manipulation | Description | Example |
|---|---|---|
| JSON.parse() | To parse is to divide a sentence into grammatical parts and identify the parts and their relations to every other. In Software coding, a string is traditionally a sequence of characters. after we receive data from the API server, the information is often a string. We parse the information using JSON.parse() which turns the information into a JavaScript object. Before parsing it, it's just a string, some text and you can't access the information encoded in it. After parsing it, it becomes a JavaScript Object and you'll be able to access the information. | |
| JSON.stringify() | JSON.stringify() turns an object to a JSON string. When sending data to a back-end server, the information has got to be a string that converts an object into a string by using the function. It can take 2 additional arguments in which the first one being a replacer function and the second parameter is a string or number value to use as an area within the returned string. |
class Car {// Initialise a class named ‘Car’
constructor(brand) {// Initialize of a constructor method with an argument of ‘brand’. The constructors forms the properties of the class. The constructor is called every Car class is initialized
this.carname = brand;// the parameter ‘brand’ from constructor is called to by ‘this.carname’. ‘this’ is refering to the specific instance of the class
}//end of constructor method.
present() {// Initialize class name ‘present’
return 'I have a ' + this.carname; // will return the join string of ‘I have a’ and the value of ‘this.carname’.
} //end of ‘present’ function
} // end of ‘Car’ class.
class Model extends Car {//Initialize a class named ‘Model’ which inherits from the class ‘Car’.
constructor(brand, mod) { // Initialize a constructor which takes parameter ‘brand’ and ‘mod’. In which ‘brand’ is inherited from the ‘Car’ class.
super(brand); // the key super indicates that 'brand is inherited from Car class
this.model = mod; //the parameter ‘mod’ is referred to by ‘this.model’ comes from the constructor in Model class is equated to the model variable ‘.
} //end of constructor method
show() { // Initializeof a class function ‘show’
return this.present() + ', it was made in ' + this.model; // return of a joined string of the value from the inherited class method of present and the value of ‘this.model’.
} // end of the class method
} // end of the class ‘Model’
let makes = ['Ford', 'Holden', 'Toyota']; // creates an array assigned to variable ‘makes’ with string type values of "Ford", "Holden", "Toyota".
let models = Array.from(new Array(40), (x, i) => i + 1980); // creates of an array of 40 elements with values from 1980 plus 39 so 2019 in which ‘x’ is the value of the element and ‘i’ is the iterator. ‘i’ plus to 1980 to form the value for the ‘x’ element of the new array.
function randomIntFromInterval(min, max) { // initialize a function taking ‘min’ and ‘max’ as parameter.
return Math.floor(Math.random() * (max - min + 1) + min); // ‘Math.random()’ returns a random value between 1 and 0 then multiplied by the ‘Math.random()’, will then return a value based on ‘Math.random()’. ‘Math.floor()’ will return a rounded-down integer of the value from ‘Math.random()*(max-min+1)+min’.
} // end of randomIntFromInterval function
for (model of models) { //Initialized a for-loop from the ‘models’ array with ‘model’ as the iterator
make = makes[randomIntFromInterval(0, makes.length - 1)]; // stores random string from the makes array to the make variable.
model = models[randomIntFromInterval(0, makes.length - 1)]; // stores a value of either 1980, 1981, 1982 in the model variable using the ‘randomIntFromInterval’ function with values of 0 for ‘min’ and 3 for max .
mycar = new Model(make, model); // creating a new instance of the ‘Model’ object and stored in my car variable with make and model as parameters
console.log(mycar.show()); // printing the show method from from the model object stored in variable ‘mycar’.
} // end of for loop
A Visual Guide to Version Control, Better Explained , https://betterexplained.com/articles/a-visual-guide-to-version-control/
The Seven Aspects of Software Quality, Silas Reinagel, https://www.silasreinagel.com/blog/2016/11/15/the-seven-aspects-of-software-quality/
Everything You Need to Know about the MERN Stack, Hyperion Development, https://blog.hyperiondev.com/index.php/2018/09/10/everything-need-know-mern-stack/
12 Skills You Need to Develop a Website, Julia Blake, https://onextrapixel.com/12-skills-you-need-to-develop-a-website/
Introduction to JavaScript: Control Flow, Mahendra Choudhary, https://medium.com/javascript-in-plain-english/introduction-to-javascript-control-flow-6272f92b75fa
Intro to Type Coercion in JavaScript, Abid Rahim<EMAIL_ADDRESS>Basics of JavaScript: Data Types, Tim Han, https://medium.com/@timhancodes/basics-of-javascript-data-types-385bab24b51
How to Manipulate Arrays in JavaScript, Bolaji Ayodeji,https://www.freecodecamp.org/news/manipulating-arrays-in-javascript/
Manipulating Objects in JavaScript, Todd Fronenberg, https://medium.com/@TK_CodeBear/manipulating-objects-in-javascript-59fefeb6a738
Understanding JSON in JavaScript, Timothy Robards, https://medium.com/@timothyrobards/understanding-json-in-javascript-5098876d0915


| Module | ArkanisDevelopment::SimpleLocalization::LocalizedTemplates |
| In: |
lib/features/localized_templates.rb
|
# File lib/features/localized_templates.rb, line 20 20: def self.included(base) 21: base.class_eval do 22: 23: alias_method :render_file_without_localization, :render_file 24: 25: # Name of file extensions which are handled internally in rails. Other types 26: # like liquid has to register through register_handler. 27: # The erb extension is used to handle .html.erb templates. 28: @@native_extensions = /\.(rjs|rhtml|rxml|erb)$/ 29: 30: @@localized_path_cache = {} 31: 32: def render_file(template_path, use_full_path = true, local_assigns = {}) 33: @first_render ||= template_path 34: 35: localized_path, template_extension = locate_localized_path(template_path, use_full_path) 36: 37: # Delegate templates are picked by the template extension and if 38: # use_full_path is true Rails does not search for an extension and so 39: # delegate templates won't work. To fix this try to convert the path 40: # back to a relative one. 41: if use_full_path 42: localized_path.gsub!(/#{Regexp.escape('.' + template_extension)}$/, '') if template_extension 43: 44: # Make this rails edge secure. Edgy uses an array called view_paths 45: # to store paths of the view files. Rails 1.2 stors just on path in 46: # the @base_path variable. 47: if self.respond_to?(:view_paths) 48: self.view_paths.each do |view_path| 49: localized_path.gsub!(/^#{Regexp.escape(view_path)}\//, '') 50: end 51: else 52: localized_path.gsub!(/^#{Regexp.escape(@base_path)}\//, '') 53: end 54: end 55: 56: # don't use_full_path -- we've already expanded the path 57: # FALSE: doing this will break delegate templates! 58: render_file_without_localization(localized_path, use_full_path, local_assigns) 59: end 60: 61: private 62: 63: alias_method :path_and_extension_without_localization, :path_and_extension 64: 65: # Override because the original version is too minimalist 66: def path_and_extension(template_path) #:nodoc: 67: template_path_without_extension = template_path.sub(@@native_extensions, '') 68: [ template_path_without_extension, $1 ] 69: end 70: 71: def locate_localized_path(template_path, use_full_path) 72: current_language = Language.current_language 73: 74: cache_key = "#{current_language}:#{template_path}" 75: cached = @@localized_path_cache[cache_key] 76: return cached if cached 77: 78: if use_full_path 79: template_path_without_extension, template_extension = path_and_extension(template_path) 80: 81: if template_extension 82: template_file_name = full_template_path(template_path_without_extension, template_extension) 83: else 84: template_extension = pick_template_extension(template_path).to_s 85: template_file_name = full_template_path(template_path, template_extension) 86: end 87: else 88: template_file_name = template_path 89: template_extension = path_and_extension(template_path).last 90: end 91: 92: # template_extension is nil if the specified template does not use a 93: # template engine (like render :file => ... with a .html, .txt, ect. 94: # extension). In this case just pass the template name as it is. 95: if template_extension 96: pn = Pathname.new(template_file_name) 97: dir, filename = pn.dirname, pn.basename('.' + template_extension) 98: 99: localized_path = dir + "#{filename}.#{current_language}.#{template_extension}" 100: 101: unless localized_path.exist? 102: localized_path = template_file_name 103: end 104: else 105: localized_path = template_file_name 106: end 107: 108: [@@localized_path_cache[cache_key] = localized_path.to_s, template_extension] 109: end 110: 111: end 112: end
# File lib/features/localized_templates.rb, line 71 71: def locate_localized_path(template_path, use_full_path) 72: current_language = Language.current_language 73: 74: cache_key = "#{current_language}:#{template_path}" 75: cached = @@localized_path_cache[cache_key] 76: return cached if cached 77: 78: if use_full_path 79: template_path_without_extension, template_extension = path_and_extension(template_path) 80: 81: if template_extension 82: template_file_name = full_template_path(template_path_without_extension, template_extension) 83: else 84: template_extension = pick_template_extension(template_path).to_s 85: template_file_name = full_template_path(template_path, template_extension) 86: end 87: else 88: template_file_name = template_path 89: template_extension = path_and_extension(template_path).last 90: end 91: 92: # template_extension is nil if the specified template does not use a 93: # template engine (like render :file => ... with a .html, .txt, ect. 94: # extension). In this case just pass the template name as it is. 95: if template_extension 96: pn = Pathname.new(template_file_name) 97: dir, filename = pn.dirname, pn.basename('.' + template_extension) 98: 99: localized_path = dir + "#{filename}.#{current_language}.#{template_extension}" 100: 101: unless localized_path.exist? 102: localized_path = template_file_name 103: end 104: else 105: localized_path = template_file_name 106: end 107: 108: [@@localized_path_cache[cache_key] = localized_path.to_s, template_extension] 109: end
# File lib/features/localized_templates.rb, line 32 32: def render_file(template_path, use_full_path = true, local_assigns = {}) 33: @first_render ||= template_path 34: 35: localized_path, template_extension = locate_localized_path(template_path, use_full_path) 36: 37: # Delegate templates are picked by the template extension and if 38: # use_full_path is true Rails does not search for an extension and so 39: # delegate templates won't work. To fix this try to convert the path 40: # back to a relative one. 41: if use_full_path 42: localized_path.gsub!(/#{Regexp.escape('.' + template_extension)}$/, '') if template_extension 43: 44: # Make this rails edge secure. Edgy uses an array called view_paths 45: # to store paths of the view files. Rails 1.2 stors just on path in 46: # the @base_path variable. 47: if self.respond_to?(:view_paths) 48: self.view_paths.each do |view_path| 49: localized_path.gsub!(/^#{Regexp.escape(view_path)}\//, '') 50: end 51: else 52: localized_path.gsub!(/^#{Regexp.escape(@base_path)}\//, '') 53: end 54: end 55: 56: # don't use_full_path -- we've already expanded the path 57: # FALSE: doing this will break delegate templates! 58: render_file_without_localization(localized_path, use_full_path, local_assigns) 59: end


Cahair O'Kane's 20 best games of the decade
Dublin, Mayo and Kerry dominated the big days in the last 10 years, with the trio involved in many of the best games – but there were others. Cahair O'Kane raids the archives to present his 20 best football games of the decade...
1
2013 All-Ireland SFC semi-final: Dublin 3-18 Kerry 3-11
NEVER mind this decade, has there ever been a better game of football played? The relentlessness, the pace, the quality, the drama. The seven-point margin tells nothing of the game, which looked like going Kerry’s way as the ball hung in the air at midfield with 69 minutes played and the sides level. But Michael Darragh Macauley won a ball he had no right to, Kevin McManamon raced away to find the top corner and then Eoghan O’Gara buried another goal deep into stoppage time. Kerry had hit three first half goals but were reeled in.
2
2014 All-Ireland SFC semi-final replay: Kerry 3-16 Mayo 3-13 (AET)
WITH an American Football game in Croke Park forcing the All-Ireland semi-final replay down the road to Limerick, the scene was quickly set for something very different. The drawn game had been dramatic but the second date was epic. They were tied at 3-11 apiece at the end of normal time (when Rob Hennelly dragged a late free to win it), 3-13 apiece at half-time in extra-time, before the Kingdom hit the last three points on their way to Sam Maguire.
3
2019 All-Ireland SFC final: Dublin 1-16 Kerry 1-16
THE most breathless of All-Ireland deciders. David Clifford had Jonny Cooper on toast, leading to a second booking before half-time for the Dublin defender, but the Dubs still led by four after Stephen Cluxton brilliantly saved Paul Geaney’s penalty. There was no let-up and Killian Spillane’s superb goal put Kerry in command, but they were suffocated in the dying minutes as Dean Rock managed to grab an equaliser to force it to a replay.
4
2017 All-Ireland SFC final: Dublin 1-17 Mayo 1-16
OF ALL the battles Dublin and Mayo had across the decade, none compared to the final two years ago. Dean Rock landed the late free to win it despite Lee Keegan tossing a GPS tracker into his path, but Mayo’s regret goes back to Donal Vaughan’s 47th minute red card, when he joined John Small in getting the line. Mayo seemed in a great position when Lee Keegan burst through to net seven minutes later, but the Dubs clawed it back again.
5
2014 All-Ireland SFC semi-final: Donegal 3-14 Dublin 0-17
AT THE very peak of their powers, Dublin were the unbackable unbeatables. Despite having won an All-Ireland two years previous, absolutely nobody gave Donegal a hope. Had Paul Flynn’s early goal chance gone in, the very course football itself was on might have changed. But Jim McGuinness’s side took the early blows and, with two Ryan McHugh goals and one for Colm McFadden, they stunned the champions and the country.
6
2016 All-Ireland SFC final replay: Dublin 1-15 Mayo 1-14
ABSOLUTE ‘cornage’, as the D4 lads would say. Right from the off, with Mayo springing a surprise by putting Rob Hennelly in for David Clarke, there was an edge of chaos about the game. Lee Keegan’s wonderful first half finish had Mayo in a semblance of control, but Hennelly’s fumble and drag-down of Paddy Andrews gave Diarmuid Connolly the chance to swing it with a perfect penalty. Cillian O’Connor pulled a late free to equalise wide of the near post.
7
2015 Leinster SFC semi-final: Westmeath 3-19 Meath 2-18
WESTMEATH had never beaten their rivals in 22 attempts in Championship football. And when they trailed by 2-17 to 1-11 with 20 minutes to go, there appeared no hope of that record changing. But as Meath wilted, the men in maroon were led by Kieran Martin and John Heslin in forging the most remarkable victory. Westmeath won the last 20 minutes by 2-8 to 0-1, with Heslin’s late breakaway goal making it an unforgettable day.
8
2016 All-Ireland SFC semi-final: Dublin 0-22 Kerry 2-14
AFTER an early wobble, Kerry steadied in the final 10 minutes of the first-half and turned a four-point deficit into a five-point lead by half-time, thanks to late goals from Darran O’Sullivan and Paul Geaney. But any notion that the Dubs would be spooked were wiped away on the restart as they quickly drew level. From there, it went back and forth until Kerry had appeals for a late free turned away and Dublin broke to seal it with a wonderful left-footed effort from Diarmuid Connolly.
9
2011 All-Ireland SFC quarter-final: Donegal 1-12 Kildare 0-14 (AET)
“HE has it, he has it!” Kevin McStay’s palpable excitement in the commentary box from the moment he realised Kevin Cassidy’s 48-yard winner had the legs summed up the mood. Kildare had looked home and hosed when they led by 0-14 to 1-8 early in the second half of extra-time, but with Christy Toye having a huge influence on the game, Donegal fought back in the pouring rain to earn a semi-final spot.
10
2017 All-Ireland SFC semi-final: Kerry 2-14 Mayo 2-14
IT WILL always best be remembered for the day that Aidan O’Shea played at full-back on Kieran Donaghy, but it was superb entertainment in its own right. Despite the fact that Mayo, led by Andy Moran, were the better team for most of the game, they were still the ones that needed a Paddy Durcan equaliser at the death. Andy Moran and Colm Boyle had goaled for them, but David Moran and Johnny Buckley raised green flags for Kerry in a topsy-turvy encounter.
11
2018 All-Ireland SFC Qualifier: Roscommon 2-22 Armagh 1-19
THE first-half of this round four Qualifier bordered on the ridiculous. Every time either side attacked, they scored. It was man-to-man, end-to-end football. By the interval, it was 1-11 to 0-12 and, despite the blistering heat in Portlaoise, the scoring rate barely let up. Despite missing a penalty, Armagh closed the gap from six to one, only for Roscommon to finally pull away in the last few minutes.
12
2019 All-Ireland SFC Super 8s: Donegal 1-20 Kerry 1-20
THE Super 8s got a bad name fairly quickly, but it did produce a handful of excellent games, none better than this summer’s draw between Donegal and Kerry. Paul Geaney’s goal was cancelled out by Michael Murphy penalty, with Eoin McHugh then having a goal disallowed for a square ball in a frantic final 20 minutes that saw Murphy land a late free to tie it.
13
2014 All-Ireland SFC Qualifiers: Monaghan 2-16 Kildare 2-14 (AET)
CHRIS McGuinness has since become something of a forgotten man of Monaghan football, but it was his goal in extra-time that helped the Farneymen to a first Championship win at Croke Park for 84 years. Two Emmet Bolton goals had Kildare ahead at half-time, but Vinny Corey netted to force an extra 20 minutes. McGuinness’s goal gave Monaghan a lead that they never relinquished.
14
2015 Munster SFC final: Cork 3-12 Kerry 2-15
IF YOU put a lie detector on Fionn Fitzgerald to this day, he’d do well to convince it that he meant to kick the late equaliser in this dramatic Munster final. He was landing one into the square from 50 yards when it surprised everyone, not least the Kerry corner-back, by flying over the bar and denying Cork a first win in Killarney for 20 years. Barry O’Driscoll’s late goal looked to have settled it, but the Kingdom didn’t let go.
15
2015 All-Ireland SFC Qualifier: Fermanagh 1-14 Roscommon 0-16
DESPITE being caught out by Sligo in Connacht, there was still a degree of hype about Roscommon, that wasn’t for dampening when they led by six with 13 minutes left. But Pete McGrath’s Fermanagh side chipped and chipped away at it, with a Seán Quigley penalty followed by a 45. A Tomás Corrigan line ball then helped pull them level before Quigley fired the winner in stoppage time.
16
2018 All-Ireland SFC Super 8s: Monaghan 1-17 Kerry 1-17
IT’S funny how this game is – and will be – remembered. Monaghan played some superb stuff, with Conor McManus revelling in the acres of space Kerry afforded him, gathering up 1-9 by himself including an early goal. They led the whole way but, off a long ball in stoppage time, David Clifford somehow managed to squeeze the ball through the eye of a needle past Rory Beggan to grab a draw. Even then, Monaghan botched a late chance to win it.
17
2016 All-Ireland SFC Qualifier: Tipperary 1-21 Derry 2-17
WITH a place in the last-eight at stake, Tipperary and Derry came to Cavan to slug it out. Mark Lynch’s goal saw Derry lead by one at half-time. Although Tipp responded with a Kevin O’Halloran goal, the Oak Leafers seemed to have won it when Eoghan Brown raced in at the far post to palm a levelling major before Danny Heavron kicked them ahead. But two late Conor Sweeney scores flipped it and sent Tipp on their way to an eventual All-Ireland semi-final.
18
2011 All-Ireland SFC final: Dublin 1-12 Kerry 1-11
AT SOME point, this Dublin group would have got over the line. But as Colm Cooper scored a free to put the experienced Kerry four up in the Dubs’ first final for 16 years, there seemed only one winner. Step up Kevin McManamon. He raced through to drill a goal that, despite it all, has been pushed into the shade by Stephen Cluxton’s brilliant winning free.
19
2010 Leinster SFC semi-final: Meath 5-9 Dublin 0-13
IT’S only hindsight that allows us to marvel at the significance of Meath scoring five goals past Dublin. It was, to this day, the last time they lost a Leinster Championship match. The Royals hadn’t been in a final for nine years but they set about cutting the Dubs apart in Croke, goals from Stephen Bray (two), Cian Ward, Joe Sheridan and Brian Farrell leaving the Dubs shellshocked.
20
2018 Ulster SFC quarter-final: Tyrone 1-16 Monaghan 1-18
FOR quality and drama this was the best Ulster SFC game of recent years. The score-taking was sublime on both sides all afternoon, and the sides seemed inseparable for a long time but Monaghan, with Conor McManus hitting an unbelievable score from out on the sideline, hit a purple patch in the final 10 minutes to grab a deserved win in Omagh.