MDAL
Mesh Data Abstraction Library (MDAL) is a C++ library for handling unstructured mesh data released with MIT license. It provides a single data model for multiple supported data formats. MDAL is used by QGIS for data access for mesh layers.
MDAL is OSGeo Community Project
This documentation is also available as a PDF file.
- Download
- Programs
- MDAL drivers
- GRIB – WMO General Regularly-distributed Information in Binary form
- NetCDF – Network Common Data Form
- 2dm – SMS mesh format
- XDMF – eXtensible Data Model and Format
- XMDF – eXtensible Model Data Format
- DAT – ASCII or Binary Dataset Files
- SWW – NetCDF format for AnuGA
- HDF – HEC-RAS outputs format
- 3Di – NetCDF with Climate and Forecast (CF) metadata
- PLY – ASCII Stanford Polygon Format
- UGRID – NetCDF with Climate and Forecast (CF) metadata
- Esri TIN – Elevation model as TIN
- HDF and ASCII – FLO-2D outputs format
- Selafin/Serafin – TELEMAC outputs format
- SAGA Flow – Raster flow directions from SAGA GIS
- ADCIRC – NetCDF outputs from ADCIRC
- XMS TIN – ASCII TIN
- DFSU – DHI flexible file format
- DFS2 – DHI Grid Series File
- User
- API
- Tutorials
- Development
- Community
- How to contribute?
- FAQ
- What does MDAL stand for?
- When would I use it?
- When was the MDAL project started?
- Is MDAL proprietary software?
- What license does MDAL use?
- What operating systems does MDAL run on?
- Is there a graphical user interface to MDAL?
- What compiler can I use to build MDAL?
- I have a question that’s not answered here. Where can I get more information?
- How do I add support for a new format?
- How do I cite MDAL ?
- License


This is the first paragraph
hello paragraph 2
Link Example: My fav website is Google.
Link Example new tab: My fav website is Google.
Link to another page on this site Hobbies.
Link to another page on this site new tab Hobbies.
Line of poem
Another line of the poem
Video conferencing bears a terrifying promise: Distance will no longer be an excuse for not attending meetings.
Steve Steinberg, 1994
Video conferencing bears a terrifying promise: Distance will no longer be an excuse for not attending meetings.
Steve Steinberg, 1994
Putting your hand on a hot stove will get you burned. Don't do it!
You simply must try this new coffee shop!


| About Dailyrotten |
|
Feedback
If you like this page, hate it, or would like to suggest changes,
<EMAIL_ADDRESS>is listening. This page
is experimental and somewhat different from what we usually offer, so please
do send your feedback.
Adding Stories
If you are a rotten newshound and you would like to suggest a story,
visit our submit page to
send us the URL. Stories that are accepted will have your name credited.
Posting Comments
In order to post comments to stories, you will have to
create an account.
Accounts will generally be validated within 24 hours, and of
course will be disabled if there is abuse.
Viewership
On the first full day this page went live, 100,000 people visited this Rotten
News page. Of course that was the day after the WTC attacks, so that number is
somewhat distorted. Right now this page gets between 50,000 and 75,000 people
every day.
Linking
We encourage everyone to link to this page; if you like it, others probably
will as well.
Other Rotten
Rotten
Gaping Maw
Celebrity Morgue
Mugshots
Rotten Store
Rate My Poo
Rate My Kitten
Rate My Finger
Penny Postcards
Phallic
Boners
Home
Make Dailyrotten your start page
|
|
|
April 18, 2002
I just shit on him to be sure he was ok...
North Jersey Media | Submitted by: Epic Soundtracks
"A Tenafly man pleaded guilty Monday to savagely beating another man and
then urinating and defecating on his unconscious victim...
At one point he told the judge: "I came back outside to check on him."
 Ritter
nodded, wiping his eyes."
|
|
Read article...
|
|
Jobless Ukrainian shoves head into saw
Tiscali World Online | Submitted by: Lou
"An immigrant who had been looking for work in the Czech Republic reacted
very badly to news that a woodworking company didn't need his services: he
committed suicide by putting his head into the spinning blade of their
circular saw... He purposely rammed his head several times into the whirling
saw blade... Workers who witnesses the grisly death were shocked."
|
|
Read article...
|
|
Man secretly videotapes own family
Beaver County Times | Submitted by: Tonester
"For nearly eight years, a Brighton Township man moved a video camera from
room to room in his house, tucking it away in air ducts or throwing clothing
over it so that it couldn't be seen, but the camera could certainly capture
the goings-on in the room, police said...
|
|
Read article...
|
|
Thousands of Inca mummies exhumed
National Geographic | Submitted by: swann
"Thousands of Inca mummies, many with hair, skin, and eyes intact,
have been rescued from beneath the streets of a sprawling settlement on
the outskirts of Lima, Peru... Archaeologists recovering the bodies
found many of them in "mummy bundles," large cocoons that held up to
seven individuals and weighed as much as 400 pounds."
|
|
Read article...
|
|
Feds want to issue national Microsoft ID's
Seattle Times | Submitted by: Soylent
I hope this scares everyone as much as it scares all of us:
"Getting the United States to use Passport to authenticate its 285 million
citizens online would be a coup for the Redmond software company. It would
also be a large step toward fulfilling Microsoft Chairman Bill Gates' stated
goal of getting everyone on the Internet to use Passport as their
sign-on tool."
|
|
Read article...
|
|
Force Fed Faster
Penn Live | Submitted by: Pete
Michael Tyrone Walker, a vegetarian, is a member of the Nation of Islam and routinely observed fasting periods up to 15 days for religious holidays, according to court papers.
He claims in his lawsuit that he had agreed to end his fast and eat before the medical director at the prison and several guards strapped him to a bed and force-fed him liquefied liver and mashed potatoes through a tube in his nose.
|
|
Read article...
|
|
Winner at Pistolbury Bake-Off
South Bend Tribune | Submitted by: snoozer
"Donna Miller was cleaning up the house Tuesday morning when she
discovered the gun in the kitchen area. Wanting to get it out of the
way, she had apparently placed it into the broiler drawer of the gas
oven in the kitchen.... At about 7:30 p.m. EDT Tuesday Donna Miller
is believed to have turned on the oven to heat some pizza."
|
|
Read article...
|
|
Will Dailyrotten be made illegal?
Wired | Submitted by: Soylent
A Danish newspaper coalition wants to remove the ability of sites to
"deep link" to other sites without their explicit permission. Truth is,
sites who feel that way should not even be on the Internet.
"We strongly disagree with the Danish Newspaper Association. They don't
live in this century and they think that they can keep things as they have
always been. If they could, they would turn time back and remove the Internet."
|
|
Read article...
|
|
It only hurts when I smile
Wire Services | Submitted by: Ryano
Falun Gong member Hao Huijun talks to reporters in Central China,
fourteen months after his unsuccessful self immolation attempt.
|
|
Read article...
|
|
January/December romance goes horribly wrong
Connecticut Post | Submitted by: grytpype
A 75-year-old man has impregnated a 10-year-old girl he met at a senior
center.
|
|
Read article...
|
|
Segway to get a Stirling engine?
New York Times | Submitted by: Soylent
Those little Segway scooters may be getting a lot more interesting:
"The importance of It, however, may have as much to do with the
scooter's future engine as with the scooter itself. Last month, the United
States Patent Office published application No.<PHONE_NUMBER>7 — with Mr. Kamen
named as one of the inventors — for the manufacturing of a Stirling engine,
which can be powered by heat from any fuel and is virtually nonpolluting."
|
|
Read article...
|
|
|
|
|


I am Nagendra Mahesh, a software developer living in Bengalūru, India.
I am passionate about building stuff and solving problems, and having fun while doing it.
Currently, I am part of a team building next-gen customer collaboration solutions for Cisco Systems.
I primarily code in and , and I love hacking on and , specifically and
Web services, Public-Key Encryption, NoSQL databases (Cassandra), Server-side javascript, and Websockets are some of my current technology interests.
Beyond the world of software, I am also interested in re-usable space flight, stand-up comedy, alternate history, street food, pasta, and most importantly - Game of Thrones.


{% include head.html %}
{% include nav.html %} {% include header.html %} {% include call-to-action.html %} {% include skills.html %} {% include backend.html %} {% include backend-portfolio.html %} {% include frontend.html %} {% include frontend-portfolio.html %} {% include contact.html %} {% include footer.html %} {% include scripts.html %}


Type JavaScript must be enabled. Type to Read New Repo GitHub repository you are interested in: https://github.com/ Branch that the file is in: Previous Repos About Type


Seasoning
Showing a non-interactive list of seasonings.
{{item}}
Mailbox navigation
Showing a navigation list with links to google search
{{link.name}}
Messages
Showing a list of messages, where each message item has sender's name, sender's avatar,
message subject, and content of the message.
{{message.from}}
{{message.subject}}
{{message.message}}
Folders and notes for mailbox
Showing a list with two sections, "folders" and "notes".
Folders
folder
{{folder.name}}
{{folder.updated}}
Notes
note
{{note.name}}
{{note.updated}}


Image of Titan:
Titan is a largest moon of Saturn.
Titan is covered in methane, the main ingredient of farts.
Titan's atmosphere is very dense.
Titan is the second largest moon in the Solar System after Ganymede.
Titan's nitrogen atmosphere may be the reason why it appears orange.


The Embryo Digital Atlas is an open source web based platform to visualize complex experimental datasets of embryogenesis in an easy and beautiful way. Embryogenesis is the process by which a single fertilized egg is transformed into a multicellular organism. It is studied in various model organisms, from the sea urchin, to the fruit fly, to the zebrafish, to the chicken, to the mouse, to the human! Many mechanisms are conserved across species, this is why it is useful to study and compare these processes in the various models. Images have an important role in these studies, mainly because this is such a complex and intricate process that researchers first need to be able to describe it comprehensively.
Embryogenesis is at the heart of the public debate about stem cell research or genome editing. In addition, it is a source of inspiration for engineers, designers and architects interested in how a complex structure can emerge from simple units. The aim of The Embryo Digital Atlas is to make public datasets of embryogenesis easily accessible for an audience ranging from curious citizen, to students, to professional researchers.


001 package realtimeweb.redditservice.structured; 002 003 import realtimeweb.redditservice.main.AbstractRedditService; 004 import realtimeweb.redditservice.util.Util; 005 006 import java.util.ArrayList; 007 import java.util.HashMap; 008 import java.util.LinkedHashMap; 009 import com.google.gson.Gson; 010 import realtimeweb.redditservice.json.JsonRedditService; 011 import realtimeweb.redditservice.json.JsonGetPostsListener; 012 import realtimeweb.redditservice.json.JsonGetCommentsListener; 013 014 /** 015 * Used to get data as built-in Java objects (HashMap, ArrayList, etc.). 016 */ 017 public class StructuredRedditService implements AbstractRedditService { 018 private static StructuredRedditService instance; 019 private JsonRedditService jsonInstance; 020 private Gson gson; 021 /** 022 * **For internal use only!** Protected Constructor guards against instantiation. 023 024 * @return 025 */ 026 protected StructuredRedditService() { 027 this.jsonInstance = JsonRedditService.getInstance(); 028 this.gson = new Gson(); 029 } 030 031 /** 032 * Retrieves the singleton instance. 033 034 * @return StructuredRedditService 035 */ 036 public static StructuredRedditService getInstance() { 037 if (instance == null) { 038 synchronized (StructuredRedditService.class) { 039 if (instance == null) { 040 instance = new StructuredRedditService(); 041 } 042 } 043 044 } 045 return instance; 046 } 047 048 /** 049 * Establishes a connection to the online service. Requires an internet connection. 050 051 */ 052 @Override 053 public void connect() { 054 jsonInstance.connect(); 055 } 056 057 /** 058 * Establishes that Business Search data should be retrieved locally. This does not require an internet connection.

If data is being retrieved locally, you must be sure that your parameters match locally stored data. Otherwise, you will get nothing in return. 059 060 */ 061 @Override 062 public void disconnect() { 063 jsonInstance.disconnect(); 064 } 065 066 /** 067 * Retrieves all the top posts 068 * @param subreddit The subreddit that Posts will be returned from. Use "all" to return results from all subreddits. 069 * @param sortMode The order that the Posts will be sorted by. Options are: "top" (ranked by upvotes minus downvotes), "best" (similar to top, except that it uses a more complicated algorithm to have good posts jump to the top and stay there, and bad comments to work their way down, see http://blog.reddit.com/2009/10/reddits-new-comment-sorting-system.html), "hot" (similar to "top", but weighted by time so that recent, popular posts are put near the top), "new" (posts will be sorted by creation time). 070 * @return HashMap<String, Object> 071 */ 072 public HashMap<String, Object> getPosts(String subreddit, String sortMode) throws Exception { 073 return gson.fromJson(jsonInstance.getPosts(subreddit, sortMode), LinkedHashMap.class); 074 } 075 076 /** 077 * Retrieves all the top posts 078 * @param subreddit The subreddit that Posts will be returned from. Use "all" to return results from all subreddits. 079 * @param sortMode The order that the Posts will be sorted by. Options are: "top" (ranked by upvotes minus downvotes), "best" (similar to top, except that it uses a more complicated algorithm to have good posts jump to the top and stay there, and bad comments to work their way down, see http://blog.reddit.com/2009/10/reddits-new-comment-sorting-system.html), "hot" (similar to "top", but weighted by time so that recent, popular posts are put near the top), "new" (posts will be sorted by creation time). 080 * @param callback The listener that will be given the data (or error) 081 */ 082 public void getPosts(String subreddit, String sortMode, final StructuredGetPostsListener callback) { 083 084 jsonInstance.getPosts(subreddit, sortMode, new JsonGetPostsListener() { 085 @Override 086 public void getPostsFailed(Exception exception) { 087 callback.getPostsFailed(exception); 088 } 089 090 @Override 091 public void getPostsCompleted(String data) { 092 callback.getPostsCompleted(gson.fromJson(data, ArrayList.class)); 093 } 094 }); 095 096 } 097 098 /** 099 * Retrieves comments for a post 100 * @param id The unique id of a Post from which Comments will be returned. 101 * @param sortMode The order that the Posts will be sorted by. Options are: "top" (ranked by upvotes minus downvotes), "best" (similar to top, except that it uses a more complicated algorithm to have good posts jump to the top and stay there, and bad comments to work their way down, see http://blog.reddit.com/2009/10/reddits-new-comment-sorting-system.html), "hot" (similar to "top", but weighted by time so that recent, popular posts are put near the top), "new" (posts will be sorted by creation time). 102 * @return HashMap<String, Object> 103 */ 104 public HashMap<String, Object> getComments(String subreddit, String id, String sortMode) throws Exception { 105 return gson.fromJson(jsonInstance.getComments(subreddit, id, sortMode), LinkedHashMap.class); 106 } 107 108 /** 109 * Retrieves comments for a post 110 * @param id The unique id of a Post from which Comments will be returned. 111 * @param sortMode The order that the Posts will be sorted by. Options are: "top" (ranked by upvotes minus downvotes), "best" (similar to top, except that it uses a more complicated algorithm to have good posts jump to the top and stay there, and bad comments to work their way down, see http://blog.reddit.com/2009/10/reddits-new-comment-sorting-system.html), "hot" (similar to "top", but weighted by time so that recent, popular posts are put near the top), "new" (posts will be sorted by creation time). 112 * @param callback The listener that will be given the data (or error) 113 */ 114 public void getComments(String subreddit, String id, String sortMode, final StructuredGetCommentsListener callback) { 115 116 jsonInstance.getComments(subreddit, id, sortMode, new JsonGetCommentsListener() { 117 @Override 118 public void getCommentsFailed(Exception exception) { 119 callback.getCommentsFailed(exception); 120 } 121 122 @Override 123 public void getCommentsCompleted(String data) { 124 callback.getCommentsCompleted(gson.fromJson(data, ArrayList.class)); 125 } 126 }); 127 128 } 129 130 }


REGISTER and Get
£3 OFF
Be the first to know
We're so sorry to inform you that your IP is limited to register more . For further help, please contact us !
Thanks
for joining!
You are on the list!
Please check your email for £3 OFF coupon code.
If you have any questions before making a purchase, chat with our online operaters to get more information.
If you need any help about the after-sales issues, please submit a ticket.
Submit a TicketPrivacy&Security Policy
For users logging on to the site to be personally identifiable, the following information is collected and stored.
When you register on our website or through other companies products or services, or visit the company website, the site will collect your personal information, including name, phone number, zip code, and address.
The Bank will automatically receive and record your browser and the server log information, including but not limited to your IP address, cookie information in this site, and your web history requirements.
The use and protection of information.
The company will collect the contents of the information mentioned above.
The company might use some of the pictures you will uploads on Shein.com and share them on our various social media accounts.
Customer information held by the company is confidential, except:
1. when the company has your consent to share the information;
2. when disclosing your personal information to provide you with requested products and services;
3. according to legal requirements, the company has the authority to make law or comply with legal directives, but the company will provide the appropriate jurisdiction;
4. in case of emergency, to safeguard the interests of users and the public;
5. in the case that other companies need to open, edit, or disclose personal information in the situation;
The revised privacy policy website reserves the right to make changes.
Choice and Opt-Out
If you no longer wish to receive the Company's promotional communications, you may "opt-out" of receiving them by following the instructions included in each communication or by e-mailing the Company at<EMAIL_ADDRESS>When you register, you will be given the option to opt-out of subscribing to our regular update service. If you are subscribed to our update service, we will send you e mail alerts for new products, features, enhancements, special offers, contests, events of interest, and one-off marketing promotions.
At all times, we will offer you the opportunity to unsubscribe out of any service or update to which you have subscribed, if you change your mind. Any e-mail we send you will contain an easy automated unsubscribe link so that you can opt-out of that subscription. Simply follow the indications in the e-mail.
Sign up for SheIn style news
Do you want to have Wholesale discount?
Wholesalers can enjoy at least 25% off, just the minimum order must be over US$200. More discount if you order more.
Signing in to SheIn, sit back and relax....
We are signing you in using your Facebook or Twitter account| Your account needs an email binding | |
| Email: | |
| The email you entered is invalid |


About tests
Hi :)
I'm starting a blog post serie about various stats. Let's start with one topic that remove lot of stress in the release: tests :D
Tests: a long history
Tests are not very fun, but they are so useful that no-one should avoid them
When Shinken code base was less than 5K lines (late 2009), we did not have any tests, it was a hobby project without even a name, and I did launch the daemon to look if all was OK.
But at this time Gerhard did find a regression on the state logic, and it was the automatic test startup :)
So if you start a project, remember that after some few Kilo lines (or even before), you will need tests cases, and it's always harder to add them after coding, so maybe it's better to add them from the begining ;)
I take a little time to thanks again Gerhard for this, because without the test framework, the project should have been full of bugs and not as powerful :)
Evolution
But how the number of tests is evolving when the project gets bigger and bigger? Do they increase as the same rythme than the code size? Let's look at this :)
I did look at all our previous release since 2010 and count code line, and test lines ones.
(Note: I did remove the modules code/test line count in the pre-2.0 versions)
There are some period in the project:
- between 0.1 and 0.5: the tests did increase a lot compared to the code size. 0.6 did saw a refactoring pass
- between 0.8 and 1.0: it's a "go production stabilization" pass, so lot of new tests to be sure we have everything under control for the production world ^^
- since the 1.2 : we are still increasing the code base and test, but at the same rythm
The tests code did saw some refactoring phase so they are still maintenable. Thanks a lot to Gregory Stark & Seb for the last refactoring, that allow to easily provide a test framework for the modules too :)
So in the end, it's quite classic, with more and more tests until everyone is used to add tests with the new features or when we find bugs. We did allow some test-less features in the past, but since the 2.0 PRs should be provided with tests (look at dev rules for more about it).
Now tests are by default. And thanks to them we can refactor or add new features without fearing regressions :)
Our 60% ratio seems to be a great, and allow us to reach a great stability.
And you, what is the test ratio of your favorite project? Are the higer value the better? Feel free to share your experience in the comments :)
(next article: about ok/critical service state ratio in the real world ^^)
comments powered by Disqus


{% load i18n %}
{% trans "If you host your project on github, follow the instructions below to setup a post receive hook." %}
http://www.julython.org/api/v1/github" %}
{% trans "You can test it out by selecting 'WebHook URLs' again and choosing 'Test Hook'.  %}
{% trans "If you host your project on bitbucket, follow the instructions below to setup a post receive hook." %}
http://www.julython.org/api/v1/bitbucket" %}
{% trans "You can test it out by pushing a commit to your repository." %}


of the data variety
Alan Palazzolo
I make the news more exciting at MinnPost.
With the help of these fine folk
I also founded and organize the Twin Cities (Data) Visualization Group.
We meet on the 3rd Tuesday of every month.
I help found Open Twin Cities, a group of civic hackers.
We meet on the 4th Tuesday of every month.
We are running a hackathon on Feb 23rd.
I am not a data visualization expert.
I am a programmer
I am a coder just getting into Data Visualization and Journalism.
Simplistically put, its just what it says it is.
It's functional art.
It's the application of design and aesthetics.
It's kind of like
architecture
furniture design
graphic design
fashion design
Fine art is an expression of the artist.
Functional art provides a practical need to others.
They are not mutually exclusive.
[..] the relationship between visualization and art, which is similar to the linkage of journalism and literature. A journalist can borrow tools and techniques from literature, and be inspired by great fiction writing, but she will never allow her stories to become literature. That notion applies to visualization, which is, above all, a functional art.
It's function informing form
It's form AND function
Visualizing is quicker and more impactful.
The coefficient of determination
(how correlated are two things):
R2 = 0.98
Explanation and exploration
It tells a story. It answers questions.
Well, that's for another time.
Good data visualization requires programming, design, analytics, user-interface, and content-specific skills.
I work on the web. It's actually a great cross-platform medium.
The modern son of Protovis
D3 is the only real data visualization library.
The R-project is a statistical computing program.
Shiney starts to bring R to the web more easily.
Mapping/cartography tools. Maps are data visualization.
Charting libraries:
Hosted services
Illustrator. Or similar program.
Paper and pencil.
Presentation: jQuery, Underscore, Backbone, Raphael, Mapbox, Leaflet, D3
Design: HTML/CSS, Noun Project, Bootstrap, Color Brewer
Mike Bostock (D3)
The Functional Art book by Alberto Cairo
Data Viz, a successful design process book by Andy Kirk
Flowing Data blog by Nathan Yau
Visualize This book by Nathan Yau
Edward Tufte books
Visualizing.org
and many more...
This presentation:
github.com/zzolo/data-viz-presentation
zzolo.github.com/data-viz-presentation
MinnPost projects:
github.com/minnpost


--- layout: post title: Packing packing and packing date: 2009-10-12 02:58:56.000000000 -07:00 type: post published: true status: publish categories: [] tags: [] meta: {} author: ---
Sent via iPidgeon


class: center, middle, inverse, title-slide # Machine Learning ### R for Data Science
www.therbootcamp.com
### November 2018 --- layout: true
 Geneva, November 2018                                           www.therbootcamp.com
 --- # What is machine learning? .pull-left55[ ### Algorithms autonomously learning from data. Given data, an algorithm tunes its <high>parameters</high> to match the data, understand how it works, and make predictions for what will occur in the future.

 ] .pull-right4[

 ] --- # Everyone uses machine learning .pull-left4[ > ### "Machine learning drives our algorithms for demand forecasting, product search ranking, product and deals recommendations, merchandising placements, fraud detection, translations, and much more." > ### Jeff Bezos, founder of Amazon ] .pull-right55[

 ] --- # What is the basic machine learning process?

 --- .pull-left45[ # What is a model? A model is a <high>formal</high> (mathematical) procedure describing the relationships between variables. Most data have one main <high>criterion</high> or variable of interest, and several <high>features</high>.
 .pull-left7[ | id|sex | age|fam_history |smoking | disease| |--:|:---|---:|:-----------|:-------|-------:| | 1|m | 45|No |FALSE | 0| | 2|m | 43|Yes |FALSE | 1| | 3|f | 40|Yes |FALSE | 1| | 4|m | 51|Yes |FALSE | 1| | 5|m | 44|No |TRUE | 0| ] ] .pull-right5[

 ### Decision Tree

 ### Weighted Additive (Regression) `$$\large{Risk = age \times 0.01 + smoking \times 0.20 + fam\_history \times 0.20}$$` ] --- .pull-left45[ # What is model training? Model <high>training</high> (aka, fitting) is the process of matching a model's <high>parameters</high> to a specific dataset. Q: What are the parameters in the two models on the right?
 .pull-left7[ | id|sex | age|fam_history |smoking | disease| |--:|:---|---:|:-----------|:-------|-------:| | 1|m | 45|No |FALSE | 0| | 2|m | 43|Yes |FALSE | 1| | 3|f | 40|Yes |FALSE | 1| | 4|m | 51|Yes |FALSE | 1| | 5|m | 44|No |TRUE | 0| ] ] .pull-right5[

 ### Decision Tree

 ### Weighted Additive (Regression) `$$\large{Risk = age \times 0.01 + smoking \times 0.20 + fam\_history \times 0.20}$$` ] --- # Fit your own linear model!
  --- # Fit your own linear model!
  --- # Fit your own linear model!
  --- # Why do we separate training from prediction? .pull-left35[
 Just because a model can <high>fit past data well</high>, does *not* necessarily mean that it will <high>predict new data well</high>. Anyone can come up with a model of past data (e.g.; stock performance, lottery winnings). <high>Predicting what you can't see in the future is much more difficult.</high> ] .pull-right6[

 ] ---

 "Can you come up with a model that will perfectly match past data but is worthless in predicting future data?"

 .pull-left45[
 <hfont>Past <high>Training</high> Data</hfont>
 | id|sex | age|fam_history |smoking | disease| |--:|:---|---:|:-----------|:-------|-------:| | 1|m | 45|No |FALSE | 0| | 2|m | 43|Yes |FALSE | 1| | 3|f | 40|Yes |FALSE | 1| | 4|m | 51|Yes |FALSE | 1| | 5|m | 44|No |TRUE | 0| ] .pull-right45[
 <hfont>Future <high> Test</high> Data</hfont>
 | id|sex | age|fam_history |smoking |disease | |--:|:---|---:|:-----------|:-------|:-------| | 91|m | 51|Yes |TRUE |? | | 92|f | 47|No |TRUE |? | | 93|m | 39|No |TRUE |? | | 94|f | 51|Yes |TRUE |? | | 95|f | 50|Yes |FALSE |? | ] --- # Two types of prediction tasks .pull-left45[

 ] .pull-right45[

 ] --- # What machine learning algorithms are there? .pull-left55[ There are thousands of machine learning algorithms from many different fields. [Wikipedia](https://en.wikipedia.org/wiki/Category:Machine_learning) lists 57 categories of machine learning algorithms:

 ] .pull-right4[ ### Algorithims we focus on
 We will focus on 3 algorithms that apply to most ML tasks: .pull-left6[ | Algorithm | Complexity| |:--------------------------------------|:-------------------| | [Decision Trees](https://en.wikipedia.org/wiki/Decision_tree) | Low | | [Regression](https://en.wikipedia.org/wiki/Regression_analysis) | Low / Medium | | [Random Forests](https://en.wikipedia.org/wiki/Random_forest) | High | ] ] --- # How do you fit and evaluate ML models in R? .pull-left45[ <high>ML models work the same way you fit standard statistical models.</high> Install the package, load, and find the main fitting functions. ```r # Install the glmnet package install.packages("glmnet") # Load glmnet library(glmnet) # Look at help menu ?glmnet ``` Note: Some functions will use the standard `FUN(formula, data)` arguments, but others (like `glmnet()`) require other arguments, like `x, y` (numeric matrices). ] .pull-right5[

 ] --- # Regression .pull-left45[ In regression, the criterion is modeled as the <high>sum of predictors times weights `\(\beta_{1}\)`, `\(\beta_{2}\)`</high>. Loan example
 For instance, one could model the risk of defaulting on a loan as: `$$Risk = Age \times \beta_{age} + Income \times \beta_{income} + ...$$` Training a model means finding values of `\(\beta_{Age}\)` and `\(\beta_{Income}\)` that 'best' match the training data.

 ] .pull-right5[ ### Regression with glm() The `glm()` function in the base stats package performs standard regression ```r # Standard linear regression glm_mod <- glm(formula = happiness ~ ., data = baselers) # Logisitic regression with family = 'binomial' glm_mod <- glm(formula = sex ~ ., data = baselers. family = "binomial") ``` ] --- # Decision Trees .pull-left45[ In decision trees, the criterion is modeled as a <high>sequence of logical YES or NO questions</high>.

 Loan example

 ] .pull-right5[ ### Decision trees with rpart This codes runs decision trees with functions from the `rpart`-package. ```r install.packages("rpart") library(rpart) # Train rpart model loan_rpart_mod <- rpart(formula, data, method = "class", rpart.control) ``` ] --- # Random Forest .pull-left45[ In [Random Forest](https://en.wikipedia.org/wiki/Random_forest), the criterion is models as the <high>aggregate prediction of a large number of decision trees</high> each based on different features.
 Loan example

 Source
 ] .pull-right5[ ### Random Forests with `randomforest` ```r install.packages("randomForest") library(randomForest) # Create a randomForest model randomForest(formula = y ~., # Formula data = data_train, # Training data ntree, mtry) # Tuning parameters ```
 Tuning parameters |Parameter | Description| |:-------|:-------| |`ntree`|Number of trees in forest| |`mtry`|Number of variables randomly selected at splits| ] --- .pull-left35[ # Exploring ML objects Just like objects from statistical functions, objects from machine learning functions are <high>lists</high> that you can explore using <high>generic functions</high>: |Function|Description |:------|:----| |`summary()`| Overview of the most important information| |`names()`|See all named elements you can access with $| |`plot()`|Visualise the object (sometimes)| |`predict()`|Predict new data based on the ML model| ] .pull-right6[ ```r # Create a regression object baselers_glm <- glm(income ~ age + height + children, data = baselers) # Look at summary results summary(baselers_glm) # [...] ``` ```r # Look at all named outputs names(baselers_glm) ``` ``` ## [1] "coefficients" "residuals" "fitted.values" "effects" "R" ## [6] "rank" "qr" "family" "linear.predictors" "deviance" ## [11] "aic" "null.deviance" "iter" "weights" "prior.weights" ## [16] "df.residual" "df.null" "y" "converged" "boundary" ## [21] "model" "na.action" "call" "formula" "terms" ## [26] "data" "offset" "control" "method" "contrasts" ## [31] "xlevels" ``` ```r # Access specific outputs baselers_glm$coefficients ``` ``` ## (Intercept) age height children ## 574.740 149.302 1.720 7.727 ``` ] --- # Predict new data with predict() .pull-left4[ All machine learning objects will allow you to <high>predict the criterion of new data</high> using `predict()`. Compare the predicted values to the true criterion values of `newdata` to see how well your model did.
 |argument|description| |:----|:-----| |object| A machine learning / statistical object created from `glm()`, `randomforest()`, ...| |newdata|A dataframe of new data| ] .pull-right55[ Predict values from `zurichers` data frame: | id| age| children| height| income| |--:|---:|--------:|------:|------:| | 1| 65| 0| 1.66| 7500| | 2| 75| 3| 1.96| 5400| | 3| 35| 1| 1.76| 8400| | 4| 54| 0| 1.73| 9500| | 5| 65| 2| 1.59| 3700| ```r # produce vector of new predictions predict(object = baselers_glm, # ML object newdata = zurichers) # DF of new data ``` ``` ## 1 2 3 4 5 ## 10282 11799 5811 8640 10298 ``` ] --- # Practical
  Link to practical


We have an unrivalled team of coach drivers here at Hickley Travel. All our coach drivers have the Driver Certificate of Professional Competence. We ensure that all drivers update their driving skills and knowledge each year.
Joanne Jordan
Jo is our most recent recruit. She has passed the advanced driving certificate. She also holds the NVQ level 3 Qualification in Road Passenger Vehicle Driving - the first driver to pass this qualification in our area. Jo is used to driving the distances which our tours cover. She looks forward to getting to know the passengers on each tour that she takes charge of. Jo's main interests are rock climbing and Salsa dancing.
William Palmer
Will is our longest serving driver. He has been with the company for 15 years. Will has the most experience of any of our team. He is very knowledgeable about the areas that his tours visit. Will is a member of the Hickley Conservation Group. You will find him helpful and he is always making jokes in conversations. At least Will calls them jokes!
Andy Serento
We are fortunate to have Andy on our staff. He joined the company four years ago from a rival tour company. He brings with him the experience of taking coach tours all around the UK. Andy is unflappable and always has a smile and a kind word for passengers. In addition he is very involved with martial arts and holds a Judo black belt, which is just the thing if there are any awkward situations to be dealt with.


Information about the file to update along with the new properties to set. The /files/update
API accepts requests in the following format:
UpdateFileNameRequest Model - Request to update the name of a file. |
|
|---|---|
| projectId | integer Project Id to which the file belongs. |
| oldFileName | string The current name of the new file. |
| newFileName | string The new name for the file. |
| Example |
{ "projectId": 0, "oldFileName": "string", "newFileName": "string" } |
UpdateFileContentsRequest Model - Request to update the contents of a file. |
|
|---|---|
| projectId | integer Project Id to which the file belongs. |
| fileName | string The name of the file that should be updated. |
| newFileContents | string The new contents of the file. |
| Example |
{ "projectId": 0, "fileName": "string", "newFileContents": "string" } |


Welcome to PAPI for Windows
PAPI, or the Performance Application
Programming Interface is a machine independent
set of callable routines that provide access to the performance counters
on most modern processors. This version of PAPI implements the
interface for Windows NT, 2000 or XP running on Intel IA32 archtectures.
If you are reading this, you have successfully installed PAPI
on your machine.
Below are some topics you may wish to learn more about:
Caveats:
This release of PAPI for Windows contains the basic PAPI functionality.
It works, but it is still a work in progress. Some fundamental limitations
exist. For example, this implementation measures everything at the system
level, not the process or thread level. Although PAPI properly binds itself
to the processor on which it is called on a MultiProcessor Build of
Windows, PAPI will still measure all events on that processor at the system
rather than process level. Further, some advanced areas such as multiplexing,
overflow, and profiling have not been exhaustively tested and may not perform
as advertised. We hope to remove these restrictions in future releases. Check
the PAPI website
for information on current releases.
About this Installation
Three installation options were presented to you when you installed
WinPAPI:
Typical
The typical installation contains the following components:
- The WinPAPI DLL
to which you can link your instrumented programs.
- The WinPMC kernel driver
which supports the WinPAPI DLL and provides access to the low
level performance counter hardware.
- A collection of examples
that exercise the WinPAPI DLL Library and provide a variety
of metrics on your machine. These tests are provided both as precompiled
console executables, and as source projects in C or Fortran that can be
modified and rebuilt using Microsoft Visual C++ 6.0 or higher, and Compaq
Fortran 6.1 or higher.
- A WinPAPI Shell Application
that provides simple button access to a variety of functions.
- The Perfometer
DLL and Java GUI application to allow you to instrument and visually
monitor the performance of your applications.
- A MATLAB support folder that contains
tools to call PAPI functions from MATLAB, and example programs to show
you how.
In addition to the files mentioned above, the installer will also
create several shortcuts to these components and place them in the Start->Programs->WinPAPI
shortcut path for your convenience.
Compact
The compact installation includes only the linkable
WinPAPI DLL
and WinPMC kernel driver
. It assumes that you have access to the support and reference materials
from another source, such as the PAPI CVS repository
.
Custom
The custom installation allows you to select only those components
(such as just the help files) that you wish to install or reinstall
on your system. Note that for access to the full sources of the driver,
dll, and shell application, you must use the PAPI
CVS repository
.
The WinPAPI Shell Application
The Shell provides a simple interface to the basic functions
of PAPI on Windows. You can run the shell from the shortcut in the Start->Programs->WinPAPI
path, or by double-clicking the icon in the directory where WinPAPI
was installed. The Shell consists of a splash screen with eight buttons,
as described below:
Exit
Exits the Shell application.
Diagnostics
Displays a secondary menu of options as shown and described below:
Return
Removes this Dialog and returns to the main WinPAPI display screen.
Smoke Test
Checks for proper installation of the low
level PAPI components, verifies that the operating system is the Uniprocessor
Free Build (this version of PAPI will not run on the MultiProcessor
or Checked Build versions of Windows), and runs all of the C and Fortran
example programs found in the default locations. The examples provided
with PAPI will respond with a PASSED, SKIPPED or FAILED message, depending
on the outcome. You can add your own examples to the SmokeTest simply by
copying the executable to an appropriate directory. See the section on
programming your own
examples
for more details.
Driver Version
Displays the version number of the WinPMC kernel driver if it is enabled.
RDPMC Test
Tests the kernel driver functionality by attempting to issue a RDPMC assembly
instruction. This instruction is ordinarily disabled if the kernel is not
properly installed.
Hello Test
HelloNum Test
Two low level tests of the WinPMC kernel driver functionality. They send
a simple command to the kernel, which responds with an appropriate text string.
Task Switch
Counts the number of times the task switch routine is executed. Only available
for the checked or multiprocessor build.
<open>
Button available for future functionality.
Help
Web
Same as main screen. See below.
C Examples
Presents an Open File dialog, as shown below, that allows you
to select a precompiled C example to exercise specific PAPI functionality.
if you want to modify existing examples or create your own, see the section
on programming your own examples
. All examples will open and execute in a separate console window,
which will display the results and wait for a keypress on completion.
Fortran Examples
Similar to C Examples, above, allows you to select a precompiled Fortran
example. The Fortran examples mimic the C examples and are provided to
demonstrate how to access the PAPI functions from Fortran.
Perfometer
Executes the Perfometer.jar file, a graphical
performance visualization tool
for PAPI, written in Java. Perfometer monitors the performance of
a separately running program that has been instrumented with calls to
the Perfometer DLL. The instrumented program can run either on your machine
or another machine connected over a network.
Perfometer Examples
Presents an Open File dialog similar to that for the C or Fortran
examples. In this case, you can select a precompiled C or Fortran example
that has been instrumented with calls to the Perfometer DLL. The example
runs in a console window, and displays a message similar to the following:
With this message displayed, click the Perfometer button described
above to execute the Perfometer.jar file and click on the Connect Local
button to make a graphical connection to the target example. More
information on using Perfometer can be found elsewhere
.
Help
If enabled, opens this page in your default browser.
NOTES:
- If the help files are not found where expected,
this button will be dimmed.
- If your browser is already open, the proper page
may not be displayed.
Web
Links to the PAPI home page on the World Wide Web.
The PAPI Programmer's Reference
The PAPI programming interface consists of a collection of 6
high-level calls, and roughly 40 low-level calls for both C and Fortran.
Unix style man pages for each of these calls are available in html format
here
.
The Example Suites
Two sets of precompiled eamples are included with the WinPAPI Shell
Application. The first set is written in C and resides in the /tests directory.
The second similar set is written in Fortran and duplicates many of the
C examples. This set is in the /ftests directory. Both sets execute
as Windows console applications, and can be run quietly in batch mode to
provide go/no-go testing of the PAPI installation, or from a command line
to provide more detailed information.The examples provide a variety of measurements
of operations and functionality on your system and print their results to
the console window. If you run them from the Shell Application, they will
dynamically open in a console window that is dismissed with a keystroke
after the test completes. You can also run the examples directly by opening
a console window and typing the name of the test as shown below for the
C examples:
- Start->Run...
- Open: cmd OK
- >cd %root%\tests (where %root% is the root
directory where WinPAPI was installed)
- >zero (or any other test.exe file)
Programming your own examples
PAPI and the programs in the example suites were all developed using
Microsoft Visual Studio. The C compiler was Visual C++ 6.0, and the Fortran
compiler was Compaq Visual Fortran 6.6.0. If you want to modify any of
the existing examples or use them as templates to create your own programs,
you must have these or more recent tools installed on your computer. If
you do, you can click the shortcut to PAPI_tests.dsw or PAPI_ftests.dsw
found in the Start->Programs->WinPAPI path. These shortcuts will
open a workspace in Visual Studio that contains projects for all the examples
included with this installation. You can then open the source for any example
to examine how things are done, or use any of the projects to pattern the
development of a test of your own. Note that the files in all the projects
are referenced by paths relative to the existing project. If you move
anything, the builds are likely to break.
In addition to the basic C and Fortran examples, several examples in
both languages are provided to demonstrate the Perfometer interface. You
can open the perfometer_tests.dsw project file to view and experiment with
these examples.
Typical Output
from some C Examples
The programs included with the Example Suites are intended to
illustrate a variety of features of PAPI, or solutions to specific user
problems. They also serve as examples of programming with PAPI. The
best way to understand what the tests are doing is to browse the source
code included in the "Typical" installation. If you do not have Microsoft
Visual Studio installed, any other text editor will work. These source
files can be found in:
%root%\src\tests (where %root% is the root directory where WinPAPI
was installed).
The output obtained on an 850 MHz Pentium III for a number of
the C examples can be viewed here
.
The Perfometer Graphic Visualization Tool
Perfometer is a collection of components that allow you to quickly
create a visual interface to the performance of PAPI metrics in your code.
These components include:
- perfometer.lib -- the library to which your code links
- perfometer.dll -- the shared library that provides the client
functionality
- perfometer.jar -- the Java GUI interface that displays the results
You can instrument your code by linking it to perfometer.lib, and adding
calls to perfometer() or mark_perfometer() as appropriate. Several examples
are provided in both source and compiled forms to illustrate how this
is done. The source code for the Perfometer library and GUI is not
distributed with this installation. The source code and project to rebuild
these components is available in the PAPI CVS repository
.
The Perfometer GUI can be invoked through the Perfometer button
in the PAPI Shell Application or through the Start->Programs->WinPAPI->Perfometer
shortcut. Either way produces a window similar to the one shown below:
The area below the top button bar will initially be blank, indicating
that the GUI is not connected to an executing program. You can use the
Connect Local or Connect to Net buttons to begin
receiving data from running instrumented programs that are waiting for a
connection. The color changes in the bar chart indicate calls to mark_perfometer()
with varying color paramters. The other interface features of the Perfometer
GUI are best discovered by inspection and experimentation.
The WinPAPI Dynamic Link Library
The WinPAPI DLL consists of two pieces:
- WinPAPI.DLL, installed (typically) in C:\WINNT\system32\,
and
- WinPAPI.lib, the linkable library, found in %root%\src\win2k\substrate\Release.
The library is placed in this arcane location to make sure that the
test projects can find it where they expect it to be in the development
environment. You can copy it to your own projects as desired.
To incorporate PAPI calls into your codes, you must include
WinPAPI.lib and papi.h, fpapi.h or papi_test.h in your project. You
can do this either by referencing the files in this directory tree,
or by copying the files to your local project.
The source code for the PAPI library is not distributed with
this installation. If you would like access to the source code and
project to rebuild the library, you must use the
PAPI CVS repository
.
The WinPMC Kernel Driver
The WinPMC Kernel Driver is a small (~3K) code that provides
access to the normally restricted assembly instructions that allow programming
of the hardware performance monitoring counters found on all Pentium
class x86 cpus. If the driver has been installed successfully, the Driver
Test button in the WinPAPI Shell will be enabled and the tests it performs
will be successful.
The driver file, WinPMC.sys, requires administrator privileges
to be installed in C:\WINNT\system32\drivers. Also, the registry must
be modified for this service to be recognized by calling programs. DO
NOT attempt to install this driver on a new machine by simply copying the
file!
As with the PAPI library, The source code for the Kernel Driver
is not distributed with this installation. The source code for the
library is available in the PAPI CVS repository
. In addition to Microsoft Visual Studio, you must also have a current
version of the Microsoft NTDDK
installed on your computer to rebuild the driver.
The structure of PAPI files and folders on your disk
The folder structure created on your disk to hold the PAPI installation
may appear rather arcane and complex. This is because it must reproduce
the folder structure of the development environment in order for the test
applications to build successfully. The structure of the default install
is shown graphically below:
CVS access to the complete sources for PAPI
Access to all of the PAPI sources for Windows and all other
supported platforms is available through the
PAPI CVS Repository
.
CVS
is a sophisticated version control system used primarily in
the Unix world to allow multiple developers to work on a project simultaneously.
You can interactively browse the PAPI CVS Repository through the WWW
by visiting the
PAPI CVS Web
, or you can download a branch of the PAPI CVS tree using a program
for Windows such as WinCVS
. Contact the PAPI development team
if you would like to participate in PAPI development.
|
|


Madagascar is experiencing a large outbreak of plague affecting major cities and other non-endemic areas since August 2017. This outbreak caries a moderate risk of spread to neighbouring Indian Ocean islands. This risk has been mitigated by the short incubation period (the time from exposure to onset of symptoms) of pneumonic plague and the institution of exit screening measures at the airport and other major ports. For more information, see the latest situation report available from:
On 10 October 2017, the Seychellois Ministry of Health notified WHO of a probable case of pneumonic plague. The probable case is a 34-year-old man who had visited Madagascar and returned to Seychelles on 6 October 2017. He developed symptoms on 9 October 2017 and presented to a local health centre. Based on a medical examination and reported history of recent travel to Madagascar, pneumonic plague infection was suspected and he was immediately referred to hospital where he was isolated and treated.
A rapid diagnostic test (RDT) preformed within the country on 11 October on a sputum sample was weakly positive. Since then he has been treated as a probable case until confirmation by a WHO plague reference laboratory is completed. The specimen is being sent to Institut Pasteur in Paris, France for confirmation. The patient continues to be hospitalized in isolation until completion of the antibiotic treatment. He is currently asymptomatic and in stable condition.
Between 9 and 11 October 2017, eight of his contacts developed mild symptoms and have been isolated. Two other suspected cases, without any established epidemiological link to the probable case, have also been identified isolated and are on treatment.
In total 10 laboratory specimens have been collected from the probable case, his contacts and the two suspected cases and are being shipped to Institut Pasteur in France for testing.
October 13 was the last day of monitoring of over 320 contact persons of the probable case, including 41 passengers and seven crew from the flight, 12 close family members, and 18 staff and patients from the health centre visited by the probable case. All were provided a prophylactic course of antibiotics to prevent the disease.
In addition, 577 children and 63 teachers in potential contact with one of the individual identified by contact tracing were given antibiotics as a prophylaxis precautionary measure. Thus contact tracing is done thoroughly.
Currently only eleven (11) close contacts and one foreign national who was not in contact with the probable case but recently arrived from Madagascar, are hospitalised as precautionary measure and will remain in the hospital on treatment although they do not present signs of respiratory distress.
A Crisis Emergency Committee was established on 10 October, and has since then, been meeting daily to coordinate surveillance, contact tracing, case management, isolation and supplies.
A hotline was revived on 12th October.
The Government has allocated funds to support the Committee interventions, enabling the setting up of a temporary isolation ward (whilst the existing ward is expanded), procurement of key supplies, contact tracing, and expanded contact tracers training next week, etc.
Air Seychelles flights to-from Madagascar were stopped from 8 October to reduce likelihood of further importation of cases from Madagascar.
WHO does not recommend restrictions on travel and trade, based on the currently available information.
On 10 October 2017, Madagascar Ministry of Health, with support from WHO, has implemented exit screening at the international airport in Antananarivo to prevent international spread. Further support from WHO and partners is being planned to strengthen measures at points of entry to avoid international spread.
WHO has deployed three epidemiologists and one risk communication officer to support the Country Office and Ministry of Public Health in responding to the current situation.
Plague is an infectious disease caused by the bacteria Yersinia pestis, a zoonotic bacterium, usually found in small mammals and their fleas. Humans can be contaminated by the bite of infected fleas, through direct contact with infected materials or animals or by inhalation.
There are three forms of plague infection, depending on the route of infection: bubonic, septicaemic and pneumonic.
Pneumonic plague is the most virulent form of plague and can trigger severe epidemics through person-to-person contact via droplets in the air. Incubation period can be as short as 24 hours. Typically, the pneumonic form is caused by spread to the lungs from advanced bubonic plague. However, a person with secondary pneumonic plague may form aerosolized infective droplets and transmit plague to other humans. Plague is treatable disease; however, untreated pneumonic plague is always fatal.
Plague has never been reported in Seychelles, and at this stage, no cases have been definitively confirmed. The case reported above being considered as probable until final classification according to the laboratory results that will be performed at Institut Pasteur in Paris.
The Seychelles Government has established precautionary measures including, enhanced surveillance, isolation and treatment of suspect cases, contact tracing and prophylactic treatment of potential contact.
The risk of further spread in the Seychelles (should the case be confirmed) is considered as low and the overall regional and global risk levels as very low.
At this stage, there is a very low risk international travellers would come into contact with plague in Seychelles. WHO advises against any restriction on travel or trade on Seychelles or Madagascar based on the available information.
On 3 October 2017, WHO published advice for international travellers in relation to the outbreak of plague in Madagascar, which should also be followed for travellers to Seychelles.
On 11 October, the Ministry of Health announced several measures against pneumonic in a press release on its website. As many of these measures significantly interfere with international traffic, on 13 October, the Ministry of Health informed WHO that it will provide the scientific evidence and public health rationale for these measures, as required by Article 43.3 of the International Health Regulations (IHR, 2005).
For further information on plague, including prevention measures, please visit the WHO Plague website.


...
Total number of Documents :
Total number of tenant :
Total number of owner :
Tenants statistics
| Week/File |
Total tenant |
No files |
|
|
|
|
|
|
|
|
|
|
|
|
|
Actions statistics
| Week/Action |
INCOMPLETE -> TO_PROCESS |
TO_PROCESS -> DECLINE |
TO_PROCESS -> VALIDATED |
DECLINE -> TO_PROCESS |
RATIO |
|
|
|
|
|
|
0
|
Honor declaration not validated
Links counters
| Week |
LIGHT_APPLICATION |
FULL_APPLICATION |
TOTAL |
DOCUMENT |
|
|
|
|
|
AVG Time Serve Tenant by Operators
| Week |
AVG (sec) |
AVG below 3 min (sec) |
|
|
|
Tenant Satisfaction Rate
| Week |
Tenants contacted |
replies |
Reply rate |
YES |
RATIO ( yes / replies ) |
|
|
|
|
|
|
Properties
| Week |
Created |
Deleted |
Visited |
Subscribed |
|
|
|
|
|


this is a template for starting a progressive web application
Once you've subscribed your user, you'd send their subscription to your server to store in a database so that when you want to send a message you can lookup the subscription and send a message to it.
To simplify things for this code lab copy the following details into the Push Companion Site and it'll send a push message for you, using the application server keys on the site - so make sure they match.


Accident spot notification application for best driving experience
DRIVE SAFE !
Driving at high speed where safe and legal is part of your life. Beware of the speed limit sign or you could endanger other drivers. Focus on the road, dont text and drive.


<?php namespace CodeIgniter\Session\Handlers; /** * CodeIgniter * * An open source application development framework for PHP * * This content is released under the MIT License (MIT) * * Copyright (c) 2014-2019 British Columbia Institute of Technology * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * * @package CodeIgniter * @author CodeIgniter Dev Team * @copyright 2014-2019 British Columbia Institute of Technology (https://bcit.ca/) * @license https://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 3.0.0 * @filesource */ use CodeIgniter\Config\BaseConfig; use Psr\Log\LoggerAwareTrait; /** * Base class for session handling */ abstract class BaseHandler implements \SessionHandlerInterface { use LoggerAwareTrait; /** * The Data fingerprint. * * @var boolean */ protected $fingerprint; /** * Lock placeholder. * * @var mixed */ protected $lock = false; /** * Cookie prefix * * @var type */ protected $cookiePrefix = ''; /** * Cookie domain * * @var type */ protected $cookieDomain = ''; /** * Cookie path * * @var type */ protected $cookiePath = '/'; /** * Cookie secure? * * @var type */ protected $cookieSecure = false; /** * Cookie name to use * * @var type */ protected $cookieName; /** * Match IP addresses for cookies? * * @var type */ protected $matchIP = false; /** * Current session ID * * @var type */ protected $sessionID; /** * The 'save path' for the session * varies between * * @var mixed */ protected $savePath; /** * @var string */ protected $ipAddress; //-------------------------------------------------------------------- /** * Constructor * * @param BaseConfig $config */ public function __construct($config, string $ipAddress) { $this->cookiePrefix = $config->cookiePrefix; $this->cookieDomain = $config->cookieDomain; $this->cookiePath = $config->cookiePath; $this->cookieSecure = $config->cookieSecure; $this->cookieName = $config->sessionCookieName; $this->matchIP = $config->sessionMatchIP; $this->savePath = $config->sessionSavePath; $this->ipAddress = $ipAddress; } //-------------------------------------------------------------------- /** * Internal method to force removal of a cookie by the client * when session_destroy() is called. * * @return boolean */ protected function destroyCookie(): bool { return setcookie( $this->cookieName, null, 1, $this->cookiePath, $this->cookieDomain, $this->cookieSecure, true ); } //-------------------------------------------------------------------- /** * A dummy method allowing drivers with no locking functionality * (databases other than PostgreSQL and MySQL) to act as if they * do acquire a lock. * * @param string $sessionID * * @return boolean */ protected function lockSession(string $sessionID): bool { $this->lock = true; return true; } //-------------------------------------------------------------------- /** * Releases the lock, if any. * * @return boolean */ protected function releaseLock(): bool { $this->lock = false; return true; } //-------------------------------------------------------------------- /** * Fail * * Drivers other than the 'files' one don't (need to) use the * session.save_path INI setting, but that leads to confusing * error messages emitted by PHP when open() or write() fail, * as the message contains session.save_path ... * To work around the problem, the drivers will call this method * so that the INI is set just in time for the error message to * be properly generated. * * @return mixed */ protected function fail() { ini_set('session.save_path', $this->savePath); return false; } }


Inherits Assimp::Blender::ElemBase.
◆ Type
| Enumerator |
|---|
| Type_EMPTY | |
| Type_MESH | |
| Type_CURVE | |
| Type_SURF | |
| Type_FONT | |
| Type_MBALL | |
| Type_LAMP | |
| Type_CAMERA | |
| Type_WAVE | |
| Type_LATTICE | |
◆ Object()
| Assimp::Blender::Object::Object |
( |
| ) |
|
|
inline |
◆ dna_type
| const char* Assimp::Blender::ElemBase::dna_type |
|
inherited |
Type name of the element.
The type string points is the c_str
of the name
attribute of the corresponding Structure
, that is, it is only valid as long as the DNA is not modified. The dna_type is only set if the data type is not static, i.e. a std::shared_ptr<ElemBase> in the scene description would have its type resolved at runtime, so this member is always set.
◆ FAIL [1/3]
| ID id Assimp::Blender::Object::FAIL |
◆ FAIL [2/3]
| Type type Assimp::Blender::Object::FAIL |
◆ FAIL [3/3]
| std::shared_ptr<ElemBase> data Assimp::Blender::Object::FAIL |
◆ modifiers
| ListBase Assimp::Blender::Object::modifiers |
◆ proxy
| std::shared_ptr<Object> Assimp::Blender::Object::proxy |
◆ proxy_from
| std::shared_ptr<Object> Assimp::Blender::Object::proxy_from |
◆ WARN [1/7]
| float obmat [4][4] Assimp::Blender::Object::WARN |
◆ WARN [2/7]
| float parentinv [4][4] Assimp::Blender::Object::WARN |
◆ WARN [3/7]
| char parsubstr [32] Assimp::Blender::Object::WARN |
◆ WARN [4/7]
| Object* parent Assimp::Blender::Object::WARN |
◆ WARN [5/7]
| std::shared_ptr<Object> track Assimp::Blender::Object::WARN |
◆ WARN [6/7]
| std::shared_ptr<Object> proxy_group Assimp::Blender::Object::WARN |
◆ WARN [7/7]
| std::shared_ptr<Group> dup_group Assimp::Blender::Object::WARN |
The documentation for this struct was generated from the following file:


Statement re: Nancy Brunning
by Malcolm Mulholland
STATEMENT FROM CHAIR OF PATIENT VOICE AOTEAROA MALCOLM MULHOLLAND
NAN BRUNNING
17 November 2019
Moe mai ra Nan, moe mai ra i roto te ngakau o te kaihanga e kore rawa koe e warewaretia, ka tangi tonu mei mou moe mai ra moe mai ra.
On behalf of Patient Voice Aotearoa, I would like to extend our heartfelt sympathy to the whanau of Nancy ‘Nan’ Brunning. While Nan will be remembered for her outstanding acting career, we also remember her for joining with other patients around New Zealand in supporting our petition to double the Pharmac budget and to have the Government agency reformed. Sadly, Nan was one of the many thousand of New Zealanders who desperately needed life-extending medication and was forced to have to fundraise in order to prolong her life. Nan was passionate about the need to change Pharmac so that others, like herself, would not have the worry of paying for expensive drugs when what time they had was so precious.
 The drugs that were needed for Nan and Blair are still to be funded, whereas for Melanie the funding of Lynparza came too late. We call upon all New Zealanders to honour the memory of Nan by signing our petition.
Link to the ‘Sensitive to a Smile’ video that features Nan, Blair and Melanie can be found at: https://www.youtube.com/watch?v=RyJzEjzFXtw
Link to the petition can be found at: https://www.parliament.nz/en/pb/petitions/document/PET_91080/petition-of-malcolm-mulholland-for-patient-voice-aotearoa


Verify Code
Please enter your code that has been sent to your account
Not recieve any code? Click to Resend
Verify Code


welcome to north !
It is a long established fact that a reader will be distracted by the readable content of at its layout.
It is a long established fact that a reader will be distracted by the readable content of at its layout.
There are many variations of passages of Lorem Ipsum available, but the joy have suffered alteration in some format, by injected humour.
There are many variations of passages of Lorem Ipsum available, but the joy have suffered alteration in some format, by injected humour.
Contrary to popular belief, Lorem Ipsum is not simply random text.  Rich McClintock not simply. There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form.
There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even snormally believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.
It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English.
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting,
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
Contrary to popular belief, Lorem Ipsum is not simply random text.  Rich McClintock not simply. There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form.
Contrary to popular belief, Lorem Ipsum is not simply random text.  Richard McClintock not simply.
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium dolorem que laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.
read moreThere are many variations of passages of the Lorem Ipsum available, but the majority have suffered alteration in some form.
There are many variations of passages of the Lorem Ipsum available, but the majority have suffered alteration in some form.
There are many variations of passages of the Lorem Ipsum available, but the majority have suffered alteration in some form.
There are many variations of passages of the Lorem Ipsum available, but the majority have suffered alteration in some form.
Contrary to popular belief, Lorem Ipsum is a not simply It has roots in a piece of classical Latin literature making it over 2000 years old. Richard.
Contrary to popular belief, Lorem Ipsum is a not simply It has roots in a piece of classical Latin literature making it over 2000 years old. Richard.
Contrary to popular belief, Lorem Ipsum is a not simply It has roots in a piece of classical Latin literature making it over 2000 years old. Richard.
Contrary to popular belief, Lorem Ipsum is a not simply It has roots in a piece of classical Latin literature making it over 2000 years old. Richard.
Contrary to popular belief, Lorem Ipsum is a not simply It has roots in a piece of classical Latin literature making it over 2000 years old. Richard.
Contrary to popular belief, Lorem Ipsum is not simply random text.  Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discover the undoubtable source.
Contrary to popular belief, Lorem Ipsum is not simply random text.  Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discover the undoubtable source.
Contrary to popular belief, Lorem Ipsum is not simply random text.  Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discover the undoubtable source.
This is Photoshop's version of Lorem Ipsum. Proin gravida nibh vel velit auctor aliquet. Aenean sollicitudin, lorem quis bibendum.
click for our all works
send us a message
There are many variations of passages of Lorem Ipsum available, but the joy have suffered alteration in some format, by injected humour.
There are many variations of passages of Lorem Ipsum available, but the joy have suffered alteration in some format, by injected humour.
There are many variations of passages of Lorem Ipsum available, but the joy have suffered alteration in some format, by injected humour.


Vous êtes invités à participer à une étude dirigée par Viviane Deprez, directrice de recherche au CNRS et professeur à l'Université de Rutgers.
What we will ask you to do: If you agree to participate in this study, you will be asked to read sentences and rate them according to their naturalness, and/or answers questions about their content. Before beginning the study, you will be asked to fill out some basic information about your linguistic background and demographics.
Risks and benefits: This experiment involves no known risks or discomfort to you, nor is it expected to be of any direct benefit to you. You will receive a compensation for your participation through Amazon Mechanical Turk. Be sure to enter the correct worker ID at the end of the experiment so we can process your payment.
Taking part is voluntary: Your participation is completely voluntary. You are free to withdraw consent and discontinue participation in the project at any time.
Your answers will be confidential: The responses will be stored on a password protected computer. The results we collect will not be linked to your identity.
If you have any questions: Please also feel free to contact the investigators at _____EMAIL_____ if you have any questions. If you have any questions or concerns regarding your rights as a subject in this study, you may contact the Research Ethics Board Office at __________ or access their website at: _____URL______


Datalith is a collection of lightweight and easily customizable React components to
visualize data on the web.
Designed for simplicity, speed and ease of use. The raw data is the only requirement.
# Single install
$ yarn add datalith
# Scoped packages install
$ yarn add @datalith/flower @datalith/hexmap
All components are statically typed.
If you use Typescript you can get live type checking with intellisense and
IDE-specific tooling.
The charts have a common set of configurations,
as well as data accessor functions provided as
props
, to associate
each chart feature with the right data point.
The scoped package install allows to only plug in the packages you need for your
project.
The charts are quickly customizable, and may be easily extended with additional svg
elements
(e.g. to add axis or labels) using the
additionalElements
prop.


I.T Support 24/7 I.T Support & Security. Technical Support PNGAHWA members A Week long meeting ending with small refreshments!  :) Give yourself a tap with small refreshments! Previous Next IT Support Our Support Staff can attend to your response with 24 hour support response team. Support covering PC, Network, Server and maintenance support. Cyber Security Support Security support for Network, Server and Helpdesk and Surveilance checks on system, site and equipment. Network & Server TechShop renders Network work support as well as Server support for your IT infrastructure. Support for Cisco devices as well as to Microsoft Server. Infrustucture.


#include <QtCore/QObject>
#include <QtCore/QAtomicPointer>
#include <QtCore/QList>
#include <QtCore/QReadWriteLock>
#include "log4qt/helpers/logerror.h"
#include "log4qt/helpers/classlogger.h"
#include "log4qt/helpers/logobjectptr.h"
#include "log4qt/level.h"
Go to the source code of this file.
Classes | |
| class | Log4Qt::Logger |
| The class Logger provides logging services. More... | |
Namespaces | |
| namespace | Log4Qt |
The namespace Log4Qt encloses all parts of the package. | |
Defines | |
| #define | LOG4QT_DECLARE_STATIC_LOGGER(FUNCTION, CLASS) |
| #define | LOG4QT_DECLARE_QCLASS_LOGGER |
| #define LOG4QT_DECLARE_QCLASS_LOGGER |
private: \ mutable Log4Qt::ClassLogger mLog4QtClassLogger; \ public: \ inline Log4Qt::Logger *logger() const \ { return mLog4QtClassLogger.logger(this); } \ private:
LOG4QT_DECLARE_QCLASS_LOGGER declares member functions to retrieve Logger for the class it is used in.
On the first invocation the Logger is requested by a call to Logger::logger(const char *pName). The pointer is stored to be returned on subsequent invocations.
The following example shows how to use the macro to define a logger to be used within a class derived from QObject.
#file: counter.h #include qobject.h #include logger.h class Counter : public QObject { Q_OBJECT LOG4QT_DECLARE_QCLASS_LOGGER public: Counter(); Counter(int preset); private: int mCount; }
#file: counter.cpp #include counter.h Counter::Counter() : mCount(0) {} void Counter::Counter(int preset) mCount(preset) { if (preset < 0) { logger()->warn("Invalid negative counter preset %1. Using 0 instead.", preset); mCount = 0; } }
| #define LOG4QT_DECLARE_STATIC_LOGGER | ( | FUNCTION, | ||
| CLASS | ||||
| ) |
static Log4Qt::Logger *FUNCTION() \ { \ static QBasicAtomicPointer<Log4Qt::Logger > p_logger = \ Q_BASIC_ATOMIC_INITIALIZER(0); \ if (!p_logger) \ { \ p_logger.testAndSetOrdered(0, \ Log4Qt::Logger::logger( #CLASS )); \ } \ return p_logger; \ }
LOG4QT_DECLARE_STATIC_LOGGER declares a static function FUNCTION that returns a pointer to a Logger named after CLASS.
On the first invocation the Logger is requested by calling Logger::logger( #CLASS ). The pointer is stored to be returned on subsequent invocations.
The following example shows how to use the macro to define a logger to be used within a class not derived from QObject.
#file: counter.h #include logger.h class Counter { public: Counter(); Counter(int preset); private: int mCount; }
#file: counter.cpp #include counter.h LOG4QT_DECLARE_STATIC_LOGGER(logger, Counter) Counter::Counter() : mCount(0) {} void Counter::Counter(int preset) : mCount(preset) { if (preset < 0) { logger()->warn("Invalid negative counter preset %1. Using 0 instead.", preset); mCount = 0; } }


C++ Programming Language
Home
Stack
Queue
Red Black Tree
Queues are a data structure in c++ that is like a container.This container is designed to work in a FIFO (first in first out) context. This means that the first element that is put in is the first thing that comes out.


functions
Javascript Closure
A closure is the combination of a function bundled together (enclosed) with references to its surrounding state (the lexical environment). In other words, a closure gives you access to an outer function's scope from an inner function.
functions with validation
Javascript Objects and Context
Anonymous Functions


Last Name
First Name
Address
City
State
Zip Postal Code
Country
Bulgaria
England
Greece
Spain
Russia
Poland
Turkey
Egypt
Brasil
USA
Canada
Mexico
Phone(country code,area code,number)
(+
)
Email
Birth Date
Gender
Male
Female
Starting Date
Spring 2015
Summer 2015
Comments/Questions


WITNESS LIST Public School Finance, Select Committee (SUBCOMMITTEE ON Incentives/Accountability) July 10, 2003-8:00A Educational Accountability On: Cloudt, Criss (Texas Education Agency) Cortez, Albert (Intercultural Development Research Association) Duggan, Brad (National Center for Educational Accountability) Patterson, Chris (Texas Public Policy Foundation) Saucedo, Leticia M. (MALDEF) Valenzuela, Angela (LULAC - ED Committee - State)


{% extends "qmratool/layout.html" %} {% block body %}
{{assessment.description|capfirst}} Edit risk assessment


SublimeCSS
A simple, lightweight and responsive CSS framework for the modern web.
link rel="stylesheet" href="https://sublime-css.github.io/SublimeCSS/code/css/sublime.css">
Home
Docs
Examples
Download
Non-Responsive Grids:
1-15
2-15
3-15
4-15
5-15
6-15
7-15
8-15
9-15
10-15
11-15
12-15
13-15
14-15
15-15
Responsive Grids:
Fitter
Happier
More Productive
Comfortable
Not Drinking Too Much
Regular Exercise At The Gym
Three Days A Week
Getting On Better WIth Your Associate Employee Contemporaries
At Ease
Eating Well
Buttons:
Yes!
No!
Warning!
Grey!


The great thing about MY INDUSTRY is that it's always improving and making new strides. With over YEARS of experience in this industry, my passion has yet to diminish. During my tenure, I've seen this sector adapt and become innovative in this digital world. I'm eager to merge my expertise with your organization's mission, where together we can take things to the next level.


Tim Minchin on how having his animated film cancelled ‘traumatised’ him
It was suggested that both Margot Robbie and Hugh Jackman had signed up to the project.
Tim Minchin said he was “traumatised” by the experience of having his animated film Larrikins cancelled.
The Australian comedian, 44, spent four years developing the project for DreamWorks Animation, but it was shelved indefinitely in 2017.
Margot Robbie and Hugh Jackman were thought to have signed up to voice characters.
The same year, despite a commercially successfully and well-reviewed run at the Old Vic in London, his musical adaptation of Groundhog Day closed early on Broadway.
Minchin told the PA news agency he had found the writing process for his TV series Upright therapeutic.
He said: “Yeah, I really like it. I mean, this is my first telly script. First script of any description really, apart from my film that will never see the light of day.
“And what I learnt…
“But out of that shit… Upright wouldn’t have happened without that, and Upright is the best thing I’ve ever been involved in.
“So interestingly, the show’s themes are reflected utterly by what the show did for my life, which was get me back on track.”
Upright airs on Sky Atlantic on November 28 with all episodes available on NOW TV.


Four Levels of the Problem
Level 1: Surface Problems
These are hurtful words, actions and attitudes and represent the content of words or actions.
-
Ask "What did you hear me say?"
-
Ask "What did you see me do?"
-
Remember that what someone else sees or hears may not be what you
intended or even what you thought you said or did. The important thing
is not to determine whose perspective is correct but more that you
understand the other person's perspective. Many times what we say or do
can speak into other's fears and get filtered negatively.
Level 2: Surface Causes
These are the resulting thoughts, fears, and conclusions, and represent
the interpreted intent of
your words or actions.
-
Ask "What did my words,
actions, attitudes cause you to think?" This allows you to
understand the lies that the speaker began to believe.
-
Ask "What meaning did you give
to my words or actions?"
-
Ask "The meaning often
determines the feeling, what did you feel?"
-
Ask "What fears did this
produce in you?"
-
Ask "What painful memories did
this trigger?"
-
Ask "What stress did this
cause?"
-
Ask "What conclusions did you
come to?"
Level 3: Root Problem
Regardless o your intent this is often a failure to demonstrate love or
respect and a lack of vital character qualities (see the 49 Character
Qualities of Christ).
-
Ask "How did I fail to
demonstrate love or respect to you?"
-
Ask "What character qualities
did I fail to demonstrate?"
-
Ask "What qualities do you
need to see in me?"

Level 4: Root Cause
This root cause is us resisting God’s grace in our pride and
stubbornness.
-
Ask "What do you perceive I am
unwilling to do?"
-
Ask "How did I resist
God’s grace in this situation?"
-
Ask "How did I demonstrate
pride to you?"
-
Ask "How did my stubbornness
affect you?"


Smart real-time dashboard for Face System
Connected to server on:
House's emotion:
Neutral
Music suggestion


This library is a collection of common 2D collision detection tests. Hopefully this saves you from the pain of hunting them down yourself, or trying to rip them out of physics libraries.
If you’re looking for further reading, you are hurting yourself if you don’t buy Real-Time Collision Detection. It is easily the best purchase you could make if you are learning about collision detection. There is also an excellent list of different algorithms here.
The code is written in TypeScript, but it’s simple and should be easily portable to your language of choice. If you just want to see the code, take a look at the TypeScript file. The animated examples on this page are also written in TypeScript, using the library.
Let’s define a couple helpers that we’ll use through the code.
export const EPSILON: number = 1e-8;
export function abs(value: number): number {
return value < 0 ? -value : value;
}
export function clamp(value: number, min: number, max: number): number {
if (value < min) {
return min;
} else if (value > max) {
return max;
} else {
return value;
}
}
export function sign(value: number): number {
return value < 0 ? -1 : 1;
}
We’ll also need a 2D point. We could just use a literal
{x: 0, y: 0}
object, but you have to normalize and copy
things quite a bit when doing collision detection, so it makes things
a bit more readable to formalize it as a class.
export class Point {
public x: number;
public y: number;
constructor(x: number = 0, y: number = 0) {
this.x = x;
this.y = y;
}
public clone(): Point {
return new Point(this.x, this.y);
}
public normalize(): number {
let length = this.x * this.x + this.y * this.y;
if (length > 0) {
length = Math.sqrt(length);
const inverseLength = 1.0 / length;
this.x *= inverseLength;
this.y *= inverseLength;
} else {
this.x = 1;
this.y = 0;
}
return length;
}
}
Collision and physics libraries generally assign things to two categories: static objects at rest, and dynamic moving objects. Full physics libraries often solve things in more complicated (and more efficient) ways, and optimize for cases of many objects moving at once and colliding against one another.
But, for most simple 2D games, it’s usually enough to do a collision test between the object you’re moving now (while moving it in the code), and the rest of the world. The world for this type of game rarely contains so many objects that this hurts your performance, and it makes the problem far easier to solve. It also makes it easier to fine tune the physics system, which is often very important for platformers.
As such, the functions in this code are all written for static vs static or moving vs static object tests, to keep things simple.
Intersection tests are a static vs static test. They check whether two static objects are overlapping. They have a boolean result (colliding or not), with a vector which tells you how you could move the objects so that they’re no longer overlapping.
Intersection tests will return a Hit object when a collision occurs:
type Collider = AABB;
export class Hit {
public collider: Collider;
public pos: Point;
public delta: Point;
public normal: Point;
public time: number;
constructor(collider: Collider) {
this.collider = collider;
this.pos = new Point();
this.delta = new Point();
this.normal = new Point();
this.time = 0;
}
}
Sweep tests are a moving vs static test. They take two objects, sweep one along a line of movement, and determine when it first collides with the other object along that path of movement.
Normal intersection tests are helpful for static objects, but they aren’t the best choice to collide a moving object. If you are trying to collide an object A against two objects, B and C, you can easily get into an ambiguous situation where the collision isn’t as easy to resolve.
Our intersection tests can only determine what the best way to resolve a collision with an object is for that one object, independent of any other objects you want to collide with. This means that correcting for a collision with object B moves you into a state where are colliding with object C, and the same thing happens with object C.
Instead, you can use a sweep test to take the path of movement into account, and stop objects from ever moving into other objects.
Sweep tests return a Sweep
object:
export class Sweep {
public hit: Hit | null;
public pos: Point;
public time: number;
constructor() {
this.hit = null;
this.pos = new Point();
this.time = 1;
}
}
sweep.hit.time
, offset by epsilon, or 1 if the object
didn’t hit anything during the sweep.
Axis-aligned bounding boxes (AABBs) are bounding rectangles that do not rotate. This means that their edges are always aligned with the main X and Y axes, which makes collision detection much simpler. These examples specify an AABB via a center point and box’s half size for each axis (that is, the box’s “radius” on each axis).
export class AABB {
public pos: Point;
public half: Point;
constructor(pos: Point, half: Point) {
this.pos = pos;
this.half = half;
}
The library has four axis-aligned bounding box (AABB) tests: AABB vs point, AABB vs segment (raycast), AABB vs AABB, and AABB vs swept AABB.
This test is very simple, but I’ve included it for completeness. If a
point is behind all of the edges of the box, it’s colliding. The
function returns a Hit object, or null if the two do not collide.
hit.pos
and hit.delta
will be set to the
nearest edge of the box.
This code first finds the overlap on the X and Y axis. If the overlap is less than zero for either, a collision is not possible. Otherwise, we find the axis with the smallest overlap and use that to create an intersection point on the edge of the box.
public intersectPoint(point: Point): Hit | null {
const dx = point.x - this.pos.x;
const px = this.half.x - abs(dx);
if (px <= 0) {
return null;
}
const dy = point.y - this.pos.y;
const py = this.half.y - abs(dy);
if (py <= 0) {
return null;
}
const hit = new Hit(this);
if (px < py) {
const sx = sign(dx);
hit.delta.x = px * sx;
hit.normal.x = sx;
hit.pos.x = this.pos.x + (this.half.x * sx);
hit.pos.y = point.y;
} else {
const sy = sign(dy);
hit.delta.y = py * sy;
hit.normal.y = sy;
hit.pos.x = point.x;
hit.pos.y = this.pos.y + (this.half.y * sy);
}
return hit;
}
Games use segment intersection tests all the time, for everything from line of sight to checking whether a bullet hit a monster. This is the most complicated of the four AABB tests, and is commonly known as a slab test. It finds the time of the line’s intersection with the near and far edges of each axis of the AABB. If they overlap, the segment is intersecting.
What are the near and far edges? Well, in our examples to the right, the direction of the segment is from the top left to the bottom right. This means that the near edges of the box are the top and left edges, and the far edges of the box are the bottom and right edges.
Note that the intersection points might not actually be on the box or the segment. They will be at the intersection of the infinite lines of the box’s edges and the infinite line of the segment.
This is a weird concept, so don’t feel bad if it takes a while for it to sink in. For further reading, I recommend IRT p.65,104 and WilliamsEtAl05.
The function calculates the collision times along the line for each
edge of the box. It returns a Hit object (with an extra
time
property), or null if the two do not overlap.
paddingX
and paddingY
will be added to the
radius of the bounding box, if specified.
public intersectSegment(pos: Point, delta: Point, paddingX: number = 0,
paddingY: number = 0): Hit | null {
You might notice we haven’t defined a segment argument. A segment from
point \(A\) to point \(B\) can be expressed with the equation \(S(t) =
A + t(B - A)\), for \(0 <= t <= 1\). In this equation, \(t\) is
the time along the line, or percentage distance from \(A\) to \(B\).
Instead of formalizing the concept of a segment, we use this equation
and create a variable pos
with the value of \(A\), and a
variable delta
with the value of \(B - A\).
Next, we need to find the linear time at which point the segment intersects with the box’s near and far edges.
We can calculate this by subtracting the position of the edge from the segment’s start position, then dividing by the segment’s delta. Scaling is done here using multiplication instead of division to deal with floating point issues.
const scaleX = 1.0 / delta.x;
const scaleY = 1.0 / delta.y;
const signX = sign(scaleX);
const signY = sign(scaleY);
const nearTimeX = (this.pos.x - signX * (this.half.x + paddingX) - pos.x) * scaleX;
const nearTimeY = (this.pos.y - signY * (this.half.y + paddingY) - pos.y) * scaleY;
const farTimeX = (this.pos.x + signX * (this.half.x + paddingX) - pos.x) * scaleX;
const farTimeY = (this.pos.y + signY * (this.half.y + paddingY) - pos.y) * scaleY;
Now we have to compare these times to see if a collision is possible.
If the closest time of collision on either axis is further than the far time on the opposite axis, we can’t be colliding. For instance, in the example to the right, because the segment’s infinite line intersected the infinite line of the box’s top edge, before it ever hit the line for the left edge, we know the intersection occurred before the segment ever reached the box. We don’t need to do any more checks, because we know a collision isn’t possible.
if (nearTimeX > farTimeY || nearTimeY > farTimeX) {
return null;
}
Otherwise, find the greater of the near times, and the lesser of the far times — we want the times that got closest to the slab. We can check these two times to determine whether the collision occurred on the segment.
const nearTime = nearTimeX > nearTimeY ? nearTimeX : nearTimeY;
const farTime = farTimeX < farTimeY ? farTimeX : farTimeY;
If the near time is greater than or equal to 1, the line starts in front of the nearest edge, but finishes before it reaches it. That is, it means it further than a whole segment length away. If the far time is less than or equal to 0, the line starts in front of the far side of the box, and points away from the box.
if (nearTime >= 1 || farTime <= 0) {
return null;
}
If we’ve gotten this far a collision of some sort is happening. If the near time is greater than zero, the segment starts outside and is entering the box. Otherwise, the segment starts inside the box, and is exiting it. If we’re entering the box, we can set the hit time to the near time, since that’s the point along the segment at which it collided. If it’s inside, it’s colliding at the very starting of the line, so just set the hit time to zero.
const hit = new Hit(this);
hit.time = clamp(nearTime, 0, 1);
if (nearTimeX > nearTimeY) {
hit.normal.x = -signX;
hit.normal.y = 0;
} else {
hit.normal.x = 0;
hit.normal.y = -signY;
}
hit.delta.x = (1.0 - hit.time) * -delta.x;
hit.delta.y = (1.0 - hit.time) * -delta.y;
hit.pos.x = pos.x + delta.x * hit.time;
hit.pos.y = pos.y + delta.y * hit.time;
return hit;
}
This test uses a separating axis test, which checks for overlaps between the two boxes on each axis. If either axis is not overlapping, the boxes aren’t colliding.
The function returns a Hit object, or null if the two static boxes do
not overlap, and gives the axis of least overlap as the contact point.
That is, it sets hit.delta
so that the colliding box will
be pushed out of the nearest edge. This can cause weird behavior for
moving boxes, so you should use sweepAABB
instead for
moving boxes.
This code is very similar to the intersectPoint
function
above.
public intersectAABB(box: AABB): Hit | null {
const dx = box.pos.x - this.pos.x;
const px = (box.half.x + this.half.x) - abs(dx);
if (px <= 0) {
return null;
}
const dy = box.pos.y - this.pos.y;
const py = (box.half.y + this.half.y) - abs(dy);
if (py <= 0) {
return null;
}
const hit = new Hit(this);
if (px < py) {
const sx = sign(dx);
hit.delta.x = px * sx;
hit.normal.x = sx;
hit.pos.x = this.pos.x + (this.half.x * sx);
hit.pos.y = box.pos.y;
} else {
const sy = sign(dy);
hit.delta.y = py * sy;
hit.normal.y = sy;
hit.pos.x = box.pos.x;
hit.pos.y = this.pos.y + (this.half.y * sy);
}
return hit;
}
Swept volume tests are awesome — they tell you whether object A hits object B at any point along a movement path. This problem seems hard, until someone tells you the magic word: Minkowski. If you inflate the static box by the size of the moving box, you can just test the movement segment against the padded static box. The point at which the segment intersects the padded box tells you where the moving box first collided with the static box.
sweepAABB
finds the intersection of this box and another
moving box, where the delta
argument is a point
describing the movement of the box. It returns a Sweep object.
sweep.hit
will be a Hit object if the two collided, or
null if they did not overlap.
public sweepAABB(box: AABB, delta: Point): Sweep {
const sweep = new Sweep();
If the sweep isn’t actually moving anywhere, just do a static test. It’s faster and will give us a better result for that case.
if (delta.x === 0 && delta.y === 0) {
sweep.pos.x = box.pos.x;
sweep.pos.y = box.pos.y;
sweep.hit = this.intersectAABB(box);
sweep.time = sweep.hit ? (sweep.hit.time = 0) : 1;
return sweep;
}
Otherwise, call into intersectSegment
instead, where the
segment is the center of the moving box, with the same delta. We pass
the moving box’s half size as padding. If we get a hit, we need to
adjust the hit pos. Since a segment vs box test was used, the hit pos
is the center of the box. This offsets it to the edge of the box, as
close to the segment of movement as possible.
sweep.hit = this.intersectSegment(box.pos, delta, box.half.x, box.half.y);
if (sweep.hit) {
sweep.time = clamp(sweep.hit.time - EPSILON, 0, 1);
sweep.pos.x = box.pos.x + delta.x * sweep.time;
sweep.pos.y = box.pos.y + delta.y * sweep.time;
const direction = delta.clone();
direction.normalize();
sweep.hit.pos.x = clamp(
sweep.hit.pos.x + direction.x * box.half.x,
this.pos.x - this.half.x, this.pos.x + this.half.x);
sweep.hit.pos.y = clamp(
sweep.hit.pos.y + direction.y * box.half.y,
this.pos.y - this.half.y, this.pos.y + this.half.y);
} else {
sweep.pos.x = box.pos.x + delta.x;
sweep.pos.y = box.pos.y + delta.y;
sweep.time = 1;
}
return sweep;
}
So, let’s say we have an AABB we want to move from one point to
another, without allowing it to collide with a list of static AABBs.
To do this, we need to call sweepAABB
on each static
object, and keep track of the sweep that moved the least distance
— that is, the nearest collision to the start of the path.
public sweepInto(staticColliders: Collider[], delta: Point): Sweep {
let nearest = new Sweep();
nearest.time = 1;
nearest.pos.x = this.pos.x + delta.x;
nearest.pos.y = this.pos.y + delta.y;
for (let i = 0, il = staticColliders.length; i < il; i++) {
const sweep = staticColliders[i].sweepAABB(this, delta);
if (sweep.time < nearest.time) {
nearest = sweep;
}
}
return nearest;
}
}
It’s a common use case to have a single object that needs to move through a world, colliding with many other objects. Note that solving this problem efficiently requires two steps:
The first step is out of scope for this library, but these tests are great for solving the narrow phase. You can usually get away without a broad phase for simple games, however, if you aren’t colliding against a huge number of objects.


Given a non-empty array of integers where every element appears twice except for one. Find that single number. You may assume that there will always be one odd-number-out and every other number in the input shows up exactly twice.
Sample input: [2, 2, 1]
Expected output: 1
Sample iput: [4, 1, 2, 1, 2]
Expected output: 4
Can you implement a solution that finds the single number in one pass through the input array with O(1)
space complexity?
Run the test file by executing python test_single_number.py
.