Crazy stat shows how bad Bears offense, Mitchell Trubisky have been
by TSD StaffIt’s fair to wonder if the Bears are considering moving on from No. 2 overall pick Mitchell Trubisky in the future, as he’s been awful this season.
Trubisky has been prone to turn the football over, and he’s just not seeing the field well. He’s making the same mistakes he made when he first entered the league, with a poor pocket presence, and just not being able to consistently command the offense. Not only that, the game simply has not slowed down for him, and he just looks lost on the football field, more often than not.
The Bears’ offense has been hindered as a result. Chicago may have a number of offensive playmakers on its roster, and an offensive-minded head coach in Matt Nagy, but Trubisky’s regression has really hurt them. Look how bad they were in the first half of Sunday’s game against the Eagles. A chyron showed that with five minutes remaining in the half, the Bears mustered only one (!) yard on offense.
That is insane.


Hyperloop is a new transportation idea that centers around lightweight, electrically powered pods with space for 2-20 people being shot within a vacuum tube at speeds close to the speed of sound. Oneloop is a hyperloop team based at the University of California, Davis . Our goal is to work towards the first, fully operable Hyperloop pod and Hyperloop track. We have participated in the SpaceX Hyperloop Competition since its inception in 2015 and continue to take part in the competition.
The pod we set out to build in 2017 is almost complete, with many components completely manufactured. However, after assessing simulations of how the pod would act under continous performance, we have decided to overhaul our chassis. This new chassis will eventually be coupled with a more integrated propulsion solution for both acceleration and braking, but will initally use our eddy current brakes, friction brakes, and air bearings as originally planned.


Lung cancer is a malignant tumour that starts in the cells of the lung. Malignant means that it can spread, or metastasize, to other parts of the body. When cancer starts in lung cells, it is called primary lung cancer. The lung is part of the respiratory system. You use your lungs when you breathe. The lungs are in the chest, one on each side of the heart. The right lung has 3 main parts, called lobes. The left lung is a bit smaller and has 2 lobes. The lungs are cushioned and protected by a thin covering called the pleura
Symptoms of lung cancer include cough, coughing up blood or rusty-colored phlegm, fatigue, unexplained weight loss, recurrent respiratory infections, hoarseness, new wheezing, and shortness of breath.
Treatment depends on the type of lung cancer you have. The treatment for non small cell lung cancer is different from the treatment for small cell lung cancer. Small cell lung cancer is mostly treated with chemotherapy. Surgery is only suitable if there is no sign that the cancer has spread to the lymph glands in the centre of the chest (the mediastinal lymph glands). This is rare with small cell lung cancer. It has usually spread at the time of diagnosis. So chemotherapy is usually the main treatment. You may also have radiotherapy to treat this type of lung cancer. Non small cell lung cancer can be treated with surgery, chemotherapy, radiotherapy or a combination of these, depending on the stage when the cancer is diagnosed. Some people with advanced lung cancer may have biological therapy.


_Dance_with_Me_ (PG) ** (out of ****)
_Dance_with_Me_'s original title was _Shut_Up_and_Dance_, and that confrontational moniker would have been a more apt name for this dance musical. But it's not because the film in question is in-your-face exuberant; rather, "Shut up and dance!" is likely what audience will be saying to the characters of this draggy romantic drama that is too heavy on talk and too light on fancy footwork.
Granted, the dancing that _is_ featured is quite impressive. The central location of _Dance_with_Me_ is a Houston dance studio, and one of its featured instructors is Ruby (Vanessa L. Williams), a former professional Latin dance champion determined to recapture her former glory. Also working at the studio, but as a handyman, is fresh-from-Cuba Rafael Infante (Chayanne), an untrained but equally skilled dancer himself.
Matthews also wrote the screenplay, and, frankly, he is overextended. While the pas de deux between Ruby and Rafael is an engaging enough core, the pro forma plot elements surrounding it are tedious filler. Rafael comes to America to meet the father he never knew, John Burnett (Kris Kristofferson), who owns the dance studio, which, in turn, is struggling to stay afloat. Ruby, who has never stayed in one place long enough to have a "home," is not eager to put down roots, geographically or emotionally. Meanwhile, a big dance competition in Vegas looms in the immediate future. Ironically, Matthews, a former professional dancer himself, piles on these familiar, trite subplots so heavily that they far outweigh the dancing in terms of screen time.
Fortunately for Matthews and director Randa Haines, in Williams they have a star who capably handles both the dance and dramatic chores. Though her character's baggage is strictly by the book, Williams is able to breathe some depth into Ruby, especially in one climactic dance where her eyes speak volumes of feeling. As it is widely known, Williams also has vocal chops to match, and her wide-ranging talents would make her an ideal star for a lavish Hollywood screen musical (that is, should a studio ever be game enough to mount one). The jury, however, is still out on her co-star, Chayanne, who is a major music star in Latin America. He certainly can move well on the dance floor, but he is rather stiff everywhere else, likely due to unease with the English language. Haines tries to hide Chayanne's unease by making him flash his megawatt smile every other second, but no amount of smiling can bail you out of a film as surprisingly talk-heavy as this.
In the press notes, producer Lauren C. Weissman says, "What initially attracted me to this script was the human drama." Ironically, the attraction for Weissman is exactly what will keep most audiences _away_ from _Dance_with_Me_, a film that falls short as a dance extravaganza, and, for that matter, as a "human drama." (opens August 21)
Michael Dequina
<EMAIL_ADDRESS>|<EMAIL_ADDRESS>Mr. Brown's Movie Site: http://welcome.to/mrbrown
CompuServe Hollywood Hotline: http://www.HollywoodHotline.com
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Gecode::Search::Parallel::Engine::Worker Class Reference
Parallel depth-first search worker
More...
#include <engine.hh>
List of all members.
Detailed Description
Parallel depth-first search worker
Definition at line 52 of file engine.hh.
Constructor & Destructor Documentation
| Gecode::Search::Parallel::Engine::Worker::Worker |
( |
Space * |
s, |
|
|
Engine & |
e | |
|
) |
| | [inline] |
Initialize for space s with engine e.
Definition at line 241 of file engine.hh.
| Gecode::Search::Parallel::Engine::Worker::~Worker |
( |
void |
|
) |
[virtual] |
Member Function Documentation
| Space * Gecode::Search::Parallel::Engine::Worker::steal |
( |
unsigned long int & |
d |
) |
[inline] |
Hand over some work (NULL if no work available).
Definition at line 396 of file engine.hh.
| Statistics Gecode::Search::Parallel::Engine::Worker::statistics |
( |
void |
|
) |
[inline] |
Return statistics.
Definition at line 277 of file engine.hh.
| Engine & Gecode::Search::Parallel::Engine::Worker::engine |
( |
void |
|
) |
const [inline] |
| NoGoods & Gecode::Search::Parallel::Engine::Worker::nogoods |
( |
void |
|
) |
[inline] |
Member Data Documentation
Reference to engine.
Definition at line 55 of file engine.hh.
Mutex for access to worker.
Definition at line 57 of file engine.hh.
Current path ins search tree.
Definition at line 59 of file engine.hh.
Current space being explored.
Definition at line 61 of file engine.hh.
Distance until next clone.
Definition at line 63 of file engine.hh.
Whether the worker is idle.
Definition at line 65 of file engine.hh.
The documentation for this class was generated from the following files:


#include <sxevent.h>
Collaboration diagram for sx360::sxEvent:
Public Member Functions |
|
| sxEvent (sxPunchFile *f) | |
| virtual void | execute ()=0 |
| virtual | ~sxEvent () |
Protected Attributes |
|
| sxPunchFile * | pf_ |
| sx360::sxEvent::sxEvent | ( | sxPunchFile * | f | ) | [inline] |
| virtual sx360::sxEvent::~sxEvent | ( | |
) | [inline, virtual] |
| virtual void sx360::sxEvent::execute | ( | |
) | [pure virtual] |
sxPunchFile* sx360::sxEvent::pf_
[protected] |


We only use cookies on this site for anonymised data to help us understand how people interact with the services so we can make them better. When you accept, we assume that you are happy to receive all cookies from Parliamentlive.tv
Oral Questions to the Secretary of State for Environment, Food and Rural Affairs
Q1. What plans he has to ensure that (a) environmental and (b) animal welfare standards are maintained after the UK leaves the EU. (900586)
Vicky Ford MP (Chelmsford, Conservative)
Q2. What assessment he has made of the opportunities available for the farming industry after the UK leaves the EU. (900587)
Robert Courts MP (Witney, Conservative)
Q3. What recent discussions he has had with the Scottish Government on a successor scheme to the Common Agricultural Policy after the UK leaves the EU. (900588)
Alan Brown MP (Kilmarnock and Loudoun, Scottish National Party)
Q4. What assessment he has made of the opportunities available for the farming industry after the UK leaves the EU. (900589)
Luke Hall MP (Thornbury and Yate, Conservative)
Q5. What steps he is taking to improve animal welfare. (900590)
Mrs Kemi Badenoch MP (Saffron Walden, Conservative)
Q6. What assessment his Department has made of the potential effect on food security of the UK leaving the EU. (900591)
Rt Hon Tom Brake MP (Carshalton and Wallington, Liberal Democrat)
Q7. What steps his Department is taking to support the rural economy. (900592)
Sir Edward Leigh MP (Gainsborough, Conservative)
Q8. What recent discussions he has had with food exporters in the west country on safeguarding tariff-free access to EU markets. (900593)
Rt Hon Ben Bradshaw MP (Exeter, Labour)
Q9. What his Department's policy is on farm subsidies after 2020; and if he will make a statement. (900594)
Tim Farron MP (Westmorland and Lonsdale, Liberal Democrat)
Q10. What steps he is taking to protect and enhance the marine environment. (900595)
Mims Davies MP (Eastleigh, Conservative)
Q11. What steps he is taking to protect and enhance the marine environment. (900596)
Steve Double MP (St Austell and Newquay, Conservative)
Q12. What assessment he has made of the opportunities available for the fishing industry in the South West after the UK leaves the EU. (900597)
Kevin Foster MP (Torbay, Conservative)
Q13. What proposals his Department plans to bring forward to support Cheshire farmers in preventing the spread of TB; and what support is available for TB-infected farms. (900598)
Rt Hon Esther McVey MP (Tatton, Conservative)
Q14. What steps he is taking to improve animal welfare. (900599)
Henry Smith MP (Crawley, Conservative)
Q15. Whether he plans to incorporate into UK law restrictions on the use of neonicotinoids after the UK leaves the EU. (900600)
Daniel Zeichner MP (Cambridge, Labour)
Q16. What plans he has to promote (a) local and (b) British produce through food labelling. (900601)
Nick Smith MP (Blaenau Gwent, Labour)
Q17. What steps his Department is taking to support the rural economy. (900602)
Victoria Prentis MP (Banbury, Conservative)
Topical Questions to the Secretary of State for Environment, Food and Rural Affairs
Oral Questions to the hon. Member for Houghton and Sunderland South, representing the Speaker's Committee on the Electoral Commission and the right hon. Member for Meriden, representing the Church Commissioners
Q1. To ask the hon. Member for Houghton and Sunderland South, representing the Speaker's Committee on the Electoral Commission, What discussions she has had with the Commission on allegations of illegal funding during the EU Referendum campaign. (900612)
Rt Hon Ben Bradshaw MP (Exeter, Labour)
Q2. To ask the hon. Member for Houghton and Sunderland South, representing the Speaker's Committee on the Electoral Commission, What recent assessment the Commission has made of the effectiveness of the regulation of (a) election expenses and (b) donations to political parties. (900613)
Martyn Day MP (Linlithgow and East Falkirk, Scottish National Party)
Q3. To ask the hon. Member for Houghton and Sunderland South, representing the Speaker's Committee on the Electoral Commission, What assessment the Commission has made of the suitability of the rules on emergency proxy vote applications for people who have suffered a family bereavement. (900614)
Kevin Foster MP (Torbay, Conservative)
Q4. To ask the hon. Member for Houghton and Sunderland South, representing the Speaker's Committee on the Electoral Commission, What discussions the Committee has had with the Commission on the effect of (a) recent rises in voter registration and (b) the 2017 General Election on the conclusions of the most recent boundary Commission review. (900616)
Dr Rupa Huq MP (Ealing Central and Acton, Labour)
Q5. To ask the right hon. Member for Meriden, representing the Church Commissioners, What steps the Church of England is taking to tackle food poverty. (900618)
Kerry McCarthy MP (Bristol East, Labour)
Q6. To ask the hon. Member for Houghton and Sunderland South, representing the Speaker's Committee on the Electoral Commission, Whether the Commission is undertaking a review of the compliance of political parties' compliance with electoral regulations during the 2017 General Election. (900619)
Wayne David MP (Caerphilly, Labour)
Q7. To ask the right hon. Member for Meriden, representing the Church Commissioners, What funds the Church of England makes available for rural parish growth. (900622)
Victoria Prentis MP (Banbury, Conservative)
Urgent Question: Contaminated blood
Statement: Fox-Sky merger
Business Statement
Statement: Grenfell Tower and fire safety
General debate: Matters to be raised before the forthcoming adjournment
Adjournment: Future of the NHS
Richard Drax MP (South Dorset, Conservative)
Note: Latency in the video stream means index items will appear first.
16:40:49
Michael Ellis MP (Northampton North, Conservative)
16:33:37
Karin Smyth MP (Bristol South, Labour)
16:28:17
Mr Nigel Evans MP (Ribble Valley, Conservative)
16:19:47
Alex Chalk MP (Cheltenham, Conservative)
16:13:10
Kevin Foster MP (Torbay, Conservative)
16:07:44
David Linden MP (Glasgow East, Scottish National Party)
16:01:41
James Cartlidge MP (South Suffolk, Conservative)
15:54:13
Liz McInnes MP (Heywood and Middleton, Labour)
15:48:40
Rachel Maclean MP (Redditch, Conservative)
15:41:48
Jim Shannon MP (Strangford, Democratic Unionist Party)
15:35:26
Paul Scully MP (Sutton and Cheam, Conservative)
15:27:53
Justin Madders MP (Ellesmere Port and Neston, Labour)
15:22:47
James Duddridge MP (Rochford and Southend East, Conservative)
15:16:31
Mary Glindon MP (North Tyneside, Labour)
15:09:29
Fiona Bruce MP (Congleton, Conservative)
15:04:11
Stuart C. McDonald MP (Cumbernauld, Kilsyth and Kirkintilloch East, Scottish National Party)
14:55:48
Tom Pursglove MP (Corby, Conservative)
14:47:17
Stewart Hosie MP (Dundee East, Scottish National Party)
14:40:28
Martin Vickers MP (Cleethorpes, Conservative)
14:33:14
Mary Creagh MP (Wakefield, Labour)
14:24:03
Richard Graham MP (Gloucester, Conservative)
14:17:17
Matt Rodda MP (Reading East, Labour)
14:09:00
Bob Blackman MP (Harrow East, Conservative)
14:02:00
Jim Fitzpatrick MP (Poplar and Limehouse, Labour)
13:54:37
Sir David Amess MP (Southend West, Conservative)
13:45:07
Rt Hon Keith Vaz MP (Leicester East, Labour)
13:38:32
Mr Ian Liddell-Grainger MP (Bridgwater and West Somerset, Conservative)
13:37:28
General debate: Matters to be raised before the forthcoming adjournment
13:35:16
Patrick Grady MP (Glasgow North, Scottish National Party)
13:31:39
Rt Hon Sir Kevin Barron MP (Rother Valley, Labour)
13:29:54
Sir Paul Beresford MP (Mole Valley, Conservative)
13:29:18
Karin Smyth MP (Bristol South, Labour)
13:28:02
Rt Hon Andrea Leadsom MP, Lord President of the Council and Leader of the House of Commons (South Northamptonshire, Conservative)
13:25:14
Parliamentary Commissioner for Standards
Rt Hon Tom Brake MP (Carshalton and Wallington, Liberal Democrat)
13:19:44
13:18:58
Rt Hon Sajid Javid MP, The Secretary of State for Communities and Local Government (Bromsgrove, Conservative)
13:18:45
Eddie Hughes MP (Walsall North, Conservative)
13:18:17
Rt Hon Sajid Javid MP, The Secretary of State for Communities and Local Government (Bromsgrove, Conservative)
13:17:57
Rachel Maclean MP (Redditch, Conservative)
13:17:25
Rt Hon Sajid Javid MP, The Secretary of State for Communities and Local Government (Bromsgrove, Conservative)
13:16:54
Luke Pollard MP (Plymouth, Sutton and Devonport, Labour (Co-op))
13:16:24
Rt Hon Sajid Javid MP, The Secretary of State for Communities and Local Government (Bromsgrove, Conservative)
13:15:44
Paul Scully MP (Sutton and Cheam, Conservative)
13:15:16
Rt Hon Sajid Javid MP, The Secretary of State for Communities and Local Government (Bromsgrove, Conservative)
13:14:30
Jack Dromey MP (Birmingham, Erdington, Labour)
13:14:03
Rt Hon Sajid Javid MP, The Secretary of State for Communities and Local Government (Bromsgrove, Conservative)
13:13:41
Tom Pursglove MP (Corby, Conservative)
13:13:26
Rt Hon Sajid Javid MP, The Secretary of State for Communities and Local Government (Bromsgrove, Conservative)
13:12:59
Rt Hon Tom Brake MP (Carshalton and Wallington, Liberal Democrat)
13:12:05
Rt Hon Sajid Javid MP, The Secretary of State for Communities and Local Government (Bromsgrove, Conservative)
13:11:37
Rebecca Pow MP (Taunton Deane, Conservative)
13:10:48
Rt Hon Sajid Javid MP, The Secretary of State for Communities and Local Government (Bromsgrove, Conservative)
13:10:07
Kate Hoey MP (Vauxhall, Labour)
13:09:48
Rt Hon Sajid Javid MP, The Secretary of State for Communities and Local Government (Bromsgrove, Conservative)
13:09:16
James Cartlidge MP (South Suffolk, Conservative)
13:08:51
Rt Hon Sajid Javid MP, The Secretary of State for Communities and Local Government (Bromsgrove, Conservative)
13:08:07
Ms Karen Buck MP (Westminster North, Labour)
13:07:30
Rt Hon Sajid Javid MP, The Secretary of State for Communities and Local Government (Bromsgrove, Conservative)
13:07:06
Victoria Atkins MP (Louth and Horncastle, Conservative)
13:06:12
Rt Hon Sajid Javid MP, The Secretary of State for Communities and Local Government (Bromsgrove, Conservative)
13:05:17
Jim Fitzpatrick MP (Poplar and Limehouse, Labour)
13:04:31
Rt Hon Sajid Javid MP, The Secretary of State for Communities and Local Government (Bromsgrove, Conservative)
13:04:10
Robert Courts MP (Witney, Conservative)
13:03:29
Rt Hon Sajid Javid MP, The Secretary of State for Communities and Local Government (Bromsgrove, Conservative)
13:02:43
Mr Clive Betts MP (Sheffield South East, Labour)
13:02:06
Rt Hon Sajid Javid MP, The Secretary of State for Communities and Local Government (Bromsgrove, Conservative)
13:01:39
Kevin Hollinrake MP (Thirsk and Malton, Conservative)
12:59:48
Rt Hon Sajid Javid MP, The Secretary of State for Communities and Local Government (Bromsgrove, Conservative)
12:57:43
Joanna Cherry QC MP (Edinburgh South West, Scottish National Party)
12:56:58
Rt Hon Sajid Javid MP, The Secretary of State for Communities and Local Government (Bromsgrove, Conservative)
12:55:53
Bob Blackman MP (Harrow East, Conservative)
12:50:48
Rt Hon Sajid Javid MP, The Secretary of State for Communities and Local Government (Bromsgrove, Conservative)
12:45:16
Rt Hon John Healey MP (Wentworth and Dearne, Labour)
12:36:49
Rt Hon Sajid Javid MP, The Secretary of State for Communities and Local Government (Bromsgrove, Conservative)
12:36:45
Statement: Grenfell Tower and fire safety
12:36:07
Rt Hon Andrea Leadsom MP, Lord President of the Council and Leader of the House of Commons (South Northamptonshire, Conservative)
12:35:03
Dr David Drew MP (Stroud, Labour (Co-op))
12:34:32
Rt Hon Andrea Leadsom MP, Lord President of the Council and Leader of the House of Commons (South Northamptonshire, Conservative)
12:33:47
Diana Johnson MP (Kingston upon Hull North, Labour)
12:33:03
Rt Hon Andrea Leadsom MP, Lord President of the Council and Leader of the House of Commons (South Northamptonshire, Conservative)
12:32:28
Cat Smith MP (Lancaster and Fleetwood, Labour)
12:32:05
Rt Hon Andrea Leadsom MP, Lord President of the Council and Leader of the House of Commons (South Northamptonshire, Conservative)
12:31:43
Martyn Day MP (Linlithgow and East Falkirk, Scottish National Party)
12:31:02
Rt Hon Andrea Leadsom MP, Lord President of the Council and Leader of the House of Commons (South Northamptonshire, Conservative)
12:30:18
Tonia Antoniazzi MP (Gower, Labour)
12:29:55
Rt Hon Andrea Leadsom MP, Lord President of the Council and Leader of the House of Commons (South Northamptonshire, Conservative)
12:29:11
Mrs Madeleine Moon MP (Bridgend, Labour)
12:28:16
Rt Hon Andrea Leadsom MP, Lord President of the Council and Leader of the House of Commons (South Northamptonshire, Conservative)
12:27:38
Paul Flynn MP (Newport West, Labour)
12:26:10
Rt Hon Andrea Leadsom MP, Lord President of the Council and Leader of the House of Commons (South Northamptonshire, Conservative)
12:25:28
Alan Brown MP (Kilmarnock and Loudoun, Scottish National Party)
12:24:55
Rt Hon Andrea Leadsom MP, Lord President of the Council and Leader of the House of Commons (South Northamptonshire, Conservative)
12:24:26
Jo Stevens MP (Cardiff Central, Labour)
12:23:24
Rt Hon Andrea Leadsom MP, Lord President of the Council and Leader of the House of Commons (South Northamptonshire, Conservative)
12:22:06
Mr Peter Bone MP (Wellingborough, Conservative)
12:21:27
Rt Hon Andrea Leadsom MP, Lord President of the Council and Leader of the House of Commons (South Northamptonshire, Conservative)
12:20:56
Patrick Grady MP (Glasgow North, Scottish National Party)
12:20:20
Rt Hon Andrea Leadsom MP, Lord President of the Council and Leader of the House of Commons (South Northamptonshire, Conservative)
12:19:44
Lucy Allan MP (Telford, Conservative)
12:18:44
Rt Hon Andrea Leadsom MP, Lord President of the Council and Leader of the House of Commons (South Northamptonshire, Conservative)
12:18:18
Paula Sherriff MP (Dewsbury, Labour)
12:17:42
Rt Hon Andrea Leadsom MP, Lord President of the Council and Leader of the House of Commons (South Northamptonshire, Conservative)
12:17:04
Mr Christopher Chope MP (Christchurch, Conservative)
12:16:36
Rt Hon Andrea Leadsom MP, Lord President of the Council and Leader of the House of Commons (South Northamptonshire, Conservative)
12:15:32
Geraint Davies MP (Swansea West, Labour (Co-op))
12:15:05
Rt Hon Andrea Leadsom MP, Lord President of the Council and Leader of the House of Commons (South Northamptonshire, Conservative)
Jackie Doyle-Price MP, The Parliamentary Under-Secretary of State for Health (Thurrock, Conservative)
10:43:14
Mrs Sharon Hodgson MP (Washington and Sunderland West, Labour)
10:42:48
Jackie Doyle-Price MP, The Parliamentary Under-Secretary of State for Health (Thurrock, Conservative)
10:42:18
Rt Hon Dr Julian Lewis MP (New Forest East, Conservative)
10:41:22
Jackie Doyle-Price MP, The Parliamentary Under-Secretary of State for Health (Thurrock, Conservative)
10:38:56
Diana Johnson MP (Kingston upon Hull North, Labour)
10:35:18
Jackie Doyle-Price MP, The Parliamentary Under-Secretary of State for Health (Thurrock, Conservative)
10:35:08
Urgent Question: Contaminated blood
10:33:48
Rt Hon Dame Caroline Spelman MP, The Second Church Estates Commissioner (Meriden, Conservative)
10:33:22
Michael Fabricant MP (Lichfield, Conservative)
10:32:39
Rt Hon Dame Caroline Spelman MP, The Second Church Estates Commissioner (Meriden, Conservative)
10:32:20
Martin Vickers MP (Cleethorpes, Conservative)
10:31:45
Rt Hon Dame Caroline Spelman MP, The Second Church Estates Commissioner (Meriden, Conservative)
10:31:23
Rt Hon Ben Bradshaw MP (Exeter, Labour)
10:30:56
Rt Hon Dame Caroline Spelman MP, The Second Church Estates Commissioner (Meriden, Conservative)
10:30:35
Victoria Prentis MP (Banbury, Conservative)
10:30:13
Rt Hon Dame Caroline Spelman MP, The Second Church Estates Commissioner (Meriden, Conservative)
10:30:10
Q7. To ask the right hon. Member for Meriden, representing the Church Commissioners, What funds the Church of England makes available for rural parish growth. (900622)
10:29:44
Bridget Phillipson MP (Houghton and Sunderland South, Labour)
10:29:17
Wayne David MP (Caerphilly, Labour)
10:28:55
Bridget Phillipson MP (Houghton and Sunderland South, Labour)
10:28:50
Q6. To ask the hon. Member for Houghton and Sunderland South, representing the Speaker's Committee on the Electoral Commission, Whether the Commission is undertaking a review of the compliance of political parties' compliance with electoral regulations during the 2017 General Election. (900619)
10:28:18
Rt Hon Dame Caroline Spelman MP, The Second Church Estates Commissioner (Meriden, Conservative)
10:27:49
Dr David Drew MP (Stroud, Labour (Co-op))
10:27:35
Rt Hon Dame Caroline Spelman MP, The Second Church Estates Commissioner (Meriden, Conservative)
10:27:19
Chris Davies MP (Brecon and Radnorshire, Conservative)
10:26:51
Rt Hon Dame Caroline Spelman MP, The Second Church Estates Commissioner (Meriden, Conservative)
10:26:24
Kerry McCarthy MP (Bristol East, Labour)
10:25:51
Rt Hon Dame Caroline Spelman MP, The Second Church Estates Commissioner (Meriden, Conservative)
10:25:48
Q5. To ask the right hon. Member for Meriden, representing the Church Commissioners, What steps the Church of England is taking to tackle food poverty. (900618)
10:25:28
Bridget Phillipson MP (Houghton and Sunderland South, Labour)
10:24:50
Mr Marcus Fysh MP (Yeovil, Conservative)
10:24:39
Bridget Phillipson MP (Houghton and Sunderland South, Labour)
10:24:13
Chris Ruane MP (Vale of Clwyd, Labour)
10:23:43
Bridget Phillipson MP (Houghton and Sunderland South, Labour)
10:23:18
Sir Peter Bottomley MP (Worthing West, Conservative)
10:23:00
Bridget Phillipson MP (Houghton and Sunderland South, Labour)
10:22:30
Dr Rupa Huq MP (Ealing Central and Acton, Labour)
10:21:56
Bridget Phillipson MP (Houghton and Sunderland South, Labour)
10:21:52
Q4. To ask the hon. Member for Houghton and Sunderland South, representing the Speaker's Committee on the Electoral Commission, What discussions the Committee has had with the Commission on the effect of (a) recent rises in voter registration and (b) the 2017 General Election on the conclusions of the most recent boundary Commission review. (900616)
10:21:33
Bridget Phillipson MP (Houghton and Sunderland South, Labour)
10:21:12
Jim Shannon MP (Strangford, Democratic Unionist Party)
10:20:53
Bridget Phillipson MP (Houghton and Sunderland South, Labour)
10:20:35
Luke Pollard MP (Plymouth, Sutton and Devonport, Labour (Co-op))
10:20:10
Bridget Phillipson MP (Houghton and Sunderland South, Labour)
10:19:40
Kevin Foster MP (Torbay, Conservative)
10:19:13
Bridget Phillipson MP (Houghton and Sunderland South, Labour)
10:19:08
Q3. To ask the hon. Member for Houghton and Sunderland South, representing the Speaker's Committee on the Electoral Commission, What assessment the Commission has made of the suitability of the rules on emergency proxy vote applications for people who have suffered a family bereavement. (900614)
10:18:46
Bridget Phillipson MP (Houghton and Sunderland South, Labour)
10:18:17
Martyn Day MP (Linlithgow and East Falkirk, Scottish National Party)
10:17:44
Bridget Phillipson MP (Houghton and Sunderland South, Labour)
10:17:38
Q2. To ask the hon. Member for Houghton and Sunderland South, representing the Speaker's Committee on the Electoral Commission, What recent assessment the Commission has made of the effectiveness of the regulation of (a) election expenses and (b) donations to political parties. (900613)
10:17:14
Bridget Phillipson MP (Houghton and Sunderland South, Labour)
10:16:48
Michael Fabricant MP (Lichfield, Conservative)
10:16:25
Bridget Phillipson MP (Houghton and Sunderland South, Labour)
10:16:10
Rt Hon Ben Bradshaw MP (Exeter, Labour)
10:15:45
Bridget Phillipson MP (Houghton and Sunderland South, Labour)
10:15:40
Q1. To ask the hon. Member for Houghton and Sunderland South, representing the Speaker's Committee on the Electoral Commission, What discussions she has had with the Commission on allegations of illegal funding during the EU Referendum campaign. (900612)
10:15:21
Oral Questions to the hon. Member for Houghton and Sunderland South, representing the Speaker's Committee on the Electoral Commission and the right hon. Member for Meriden, representing the Church Commissioners
10:14:56
George Eustice MP, The Minister of State, Department for Environment, Food and Rural Affairs (Camborne and Redruth, Conservative)
10:14:32
Tony Lloyd MP (Rochdale, Labour)
10:14:07
Rt Hon Michael Gove MP, The Secretary of State for Environment, Food and Rural Affairs (Surrey Heath, Conservative)
10:13:45
Rt Hon Richard Benyon MP (Newbury, Conservative)
10:13:17
Rt Hon Michael Gove MP, The Secretary of State for Environment, Food and Rural Affairs (Surrey Heath, Conservative)
10:13:01
Melanie Onn MP (Great Grimsby, Labour)
10:12:22
Dr Thérèse Coffey MP, The Parliamentary Under-Secretary of State for Environment, Food and Rural Affairs (Suffolk Coastal, Conservative)
10:11:51
Mims Davies MP (Eastleigh, Conservative)
10:11:28
Rt Hon Michael Gove MP, The Secretary of State for Environment, Food and Rural Affairs (Surrey Heath, Conservative)
10:11:06
Nick Smith MP (Blaenau Gwent, Labour)
10:10:44
George Eustice MP, The Minister of State, Department for Environment, Food and Rural Affairs (Camborne and Redruth, Conservative)
10:10:04
Rachel Maclean MP (Redditch, Conservative)
10:09:33
Dr Thérèse Coffey MP, The Parliamentary Under-Secretary of State for Environment, Food and Rural Affairs (Suffolk Coastal, Conservative)
10:09:12
Liz Twist MP (Blaydon, Labour)
10:08:50
George Eustice MP, The Minister of State, Department for Environment, Food and Rural Affairs (Camborne and Redruth, Conservative)
10:08:33
Robert Courts MP (Witney, Conservative)
10:08:15
Rt Hon Michael Gove MP, The Secretary of State for Environment, Food and Rural Affairs (Surrey Heath, Conservative)
10:07:53
Rt Hon Ben Bradshaw MP (Exeter, Labour)
10:07:24
George Eustice MP, The Minister of State, Department for Environment, Food and Rural Affairs (Camborne and Redruth, Conservative)
10:07:04
Rt Hon Esther McVey MP (Tatton, Conservative)
10:06:34
George Eustice MP, The Minister of State, Department for Environment, Food and Rural Affairs (Camborne and Redruth, Conservative)
10:05:48
Holly Lynch MP (Halifax, Labour)
10:05:13
Rt Hon Michael Gove MP, The Secretary of State for Environment, Food and Rural Affairs (Surrey Heath, Conservative)
10:04:48
Luke Graham MP (Ochil and South Perthshire, Conservative)
10:04:21
Rt Hon Michael Gove MP, The Secretary of State for Environment, Food and Rural Affairs (Surrey Heath, Conservative)
10:03:47
Rt Hon Alistair Carmichael MP (Orkney and Shetland, Liberal Democrat)
10:03:22
Rt Hon Michael Gove MP, The Secretary of State for Environment, Food and Rural Affairs (Surrey Heath, Conservative)
10:03:15
Topical Questions to the Secretary of State for Environment, Food and Rural Affairs
10:02:46
Rt Hon Michael Gove MP, The Secretary of State for Environment, Food and Rural Affairs (Surrey Heath, Conservative)
10:02:11
Neil Parish MP (Tiverton and Honiton, Conservative)
10:01:37
Rt Hon Michael Gove MP, The Secretary of State for Environment, Food and Rural Affairs (Surrey Heath, Conservative)
10:00:52
Tim Farron MP (Westmorland and Lonsdale, Liberal Democrat)
10:00:37
Rt Hon Michael Gove MP, The Secretary of State for Environment, Food and Rural Affairs (Surrey Heath, Conservative)
10:00:32
Q9. What his Department's policy is on farm subsidies after 2020; and if he will make a statement. (900594)
10:00:14
George Eustice MP, The Minister of State, Department for Environment, Food and Rural Affairs (Camborne and Redruth, Conservative)
09:59:40
Mr Marcus Fysh MP (Yeovil, Conservative)
09:59:16
George Eustice MP, The Minister of State, Department for Environment, Food and Rural Affairs (Camborne and Redruth, Conservative)
09:58:49
Rt Hon Ben Bradshaw MP (Exeter, Labour)
09:58:26
George Eustice MP, The Minister of State, Department for Environment, Food and Rural Affairs (Camborne and Redruth, Conservative)
09:58:22
Q8. What recent discussions he has had with food exporters in the west country on safeguarding tariff-free access to EU markets. (900593)
09:58:05
Dr Thérèse Coffey MP, The Parliamentary Under-Secretary of State for Environment, Food and Rural Affairs (Suffolk Coastal, Conservative)
09:57:49
Chris Elmore MP (Ogmore, Labour)
09:57:23
Dr Thérèse Coffey MP, The Parliamentary Under-Secretary of State for Environment, Food and Rural Affairs (Suffolk Coastal, Conservative)
09:56:57
Victoria Prentis MP (Banbury, Conservative)
09:56:44
Dr Thérèse Coffey MP, The Parliamentary Under-Secretary of State for Environment, Food and Rural Affairs (Suffolk Coastal, Conservative)
09:56:21
Rt Hon David Hanson MP (Delyn, Labour)
09:56:00
Dr Thérèse Coffey MP, The Parliamentary Under-Secretary of State for Environment, Food and Rural Affairs (Suffolk Coastal, Conservative)
09:55:26
Sir Edward Leigh MP (Gainsborough, Conservative)
09:55:04
Dr Thérèse Coffey MP, The Parliamentary Under-Secretary of State for Environment, Food and Rural Affairs (Suffolk Coastal, Conservative)
09:55:00
Q7. What steps his Department is taking to support the rural economy. (900592)
09:54:39
George Eustice MP, The Minister of State, Department for Environment, Food and Rural Affairs (Camborne and Redruth, Conservative)
09:54:05
Dr David Drew MP (Stroud, Labour (Co-op))
09:53:45
George Eustice MP, The Minister of State, Department for Environment, Food and Rural Affairs (Camborne and Redruth, Conservative)
09:53:15
Mr Nigel Evans MP (Ribble Valley, Conservative)
09:52:48
George Eustice MP, The Minister of State, Department for Environment, Food and Rural Affairs (Camborne and Redruth, Conservative)
09:52:17
Rt Hon Tom Brake MP (Carshalton and Wallington, Liberal Democrat)
09:51:56
George Eustice MP, The Minister of State, Department for Environment, Food and Rural Affairs (Camborne and Redruth, Conservative)
09:51:52
Q6. What assessment his Department has made of the potential effect on food security of the UK leaving the EU. (900591)
09:51:48
Rt Hon Michael Gove MP, The Secretary of State for Environment, Food and Rural Affairs (Surrey Heath, Conservative)
09:51:29
Paula Sherriff MP (Dewsbury, Labour)
09:51:05
Rt Hon Michael Gove MP, The Secretary of State for Environment, Food and Rural Affairs (Surrey Heath, Conservative)
09:50:51
Philip Davies MP (Shipley, Conservative)
09:50:15
Rt Hon Michael Gove MP, The Secretary of State for Environment, Food and Rural Affairs (Surrey Heath, Conservative)
09:49:53
Ian Austin MP (Dudley North, Labour)
09:49:37
Rt Hon Michael Gove MP, The Secretary of State for Environment, Food and Rural Affairs (Surrey Heath, Conservative)
09:49:16
Mrs Kemi Badenoch MP (Saffron Walden, Conservative)
09:48:45
Rt Hon Michael Gove MP, The Secretary of State for Environment, Food and Rural Affairs (Surrey Heath, Conservative)
09:48:39
Q5. What steps he is taking to improve animal welfare. (900590)
09:47:53
Rt Hon Michael Gove MP, The Secretary of State for Environment, Food and Rural Affairs (Surrey Heath, Conservative)
09:47:27
Chris Davies MP (Brecon and Radnorshire, Conservative)
09:47:08
Rt Hon Michael Gove MP, The Secretary of State for Environment, Food and Rural Affairs (Surrey Heath, Conservative)
09:46:44
Alan Brown MP (Kilmarnock and Loudoun, Scottish National Party)
09:46:27
Rt Hon Michael Gove MP, The Secretary of State for Environment, Food and Rural Affairs (Surrey Heath, Conservative)
09:46:23
Q3. What recent discussions he has had with the Scottish Government on a successor scheme to the Common Agricultural Policy after the UK leaves the EU. (900588)
09:45:59
George Eustice MP, The Minister of State, Department for Environment, Food and Rural Affairs (Camborne and Redruth, Conservative)
09:45:16
Sue Hayman MP (Workington, Labour)
09:44:50
George Eustice MP, The Minister of State, Department for Environment, Food and Rural Affairs (Camborne and Redruth, Conservative)
09:44:06
Sue Hayman MP (Workington, Labour)
09:43:39
George Eustice MP, The Minister of State, Department for Environment, Food and Rural Affairs (Camborne and Redruth, Conservative)
09:43:27
Colin Clark MP (Gordon, Conservative)
09:42:58
George Eustice MP, The Minister of State, Department for Environment, Food and Rural Affairs (Camborne and Redruth, Conservative)
09:42:29
Angus Brendan MacNeil MP (Na h-Eileanan an Iar, Scottish National Party)
09:42:06
George Eustice MP, The Minister of State, Department for Environment, Food and Rural Affairs (Camborne and Redruth, Conservative)
09:41:47
Jim Shannon MP (Strangford, Democratic Unionist Party)
09:41:30
George Eustice MP, The Minister of State, Department for Environment, Food and Rural Affairs (Camborne and Redruth, Conservative)
09:41:15
Luke Hall MP (Thornbury and Yate, Conservative)
09:40:45
George Eustice MP, The Minister of State, Department for Environment, Food and Rural Affairs (Camborne and Redruth, Conservative)
09:40:24
Robert Courts MP (Witney, Conservative)
09:39:55
George Eustice MP, The Minister of State, Department for Environment, Food and Rural Affairs (Camborne and Redruth, Conservative)
09:39:51
Q2. What assessment he has made of the opportunities available for the farming industry after the UK leaves the EU. (900587)
09:39:14
Rt Hon Michael Gove MP, The Secretary of State for Environment, Food and Rural Affairs (Surrey Heath, Conservative)
09:39:00
Kerry McCarthy MP (Bristol East, Labour)
09:38:38
Rt Hon Michael Gove MP, The Secretary of State for Environment, Food and Rural Affairs (Surrey Heath, Conservative)
09:38:18
Rt Hon Dame Caroline Spelman MP (Meriden, Conservative)
09:38:13
Rt Hon Michael Gove MP, The Secretary of State for Environment, Food and Rural Affairs (Surrey Heath, Conservative)
09:37:26
Mary Creagh MP (Wakefield, Labour)
09:36:53
Rt Hon Michael Gove MP, The Secretary of State for Environment, Food and Rural Affairs (Surrey Heath, Conservative)
09:36:38
Henry Smith MP (Crawley, Conservative)
09:36:18
Rt Hon Michael Gove MP, The Secretary of State for Environment, Food and Rural Affairs (Surrey Heath, Conservative)
09:35:56
Daniel Zeichner MP (Cambridge, Labour)
09:35:25
Rt Hon Michael Gove MP, The Secretary of State for Environment, Food and Rural Affairs (Surrey Heath, Conservative)
09:34:55
Vicky Ford MP (Chelmsford, Conservative)
09:34:26
Rt Hon Michael Gove MP, The Secretary of State for Environment, Food and Rural Affairs (Surrey Heath, Conservative)
09:34:23
Q1. What plans he has to ensure that (a) environmental and (b) animal welfare standards are maintained after the UK leaves the EU. (900586)
09:34:19
Oral Questions to the Secretary of State for Environment, Food and Rural Affairs


From 0.76 to 3.45 seconds, "It seems a paradox, does it not," is shown
From 5 to 10 seconds, "that the image formed on the Retina should be inverted?" is shown
From 10 to 16 seconds, "It is puzzling, why is it we do not see things upside-down?" is shown
From 17.2 to 23 seconds, "You have never heard the Theory, then, that the Brain also is inverted?" is shown
From 23 to 27 seconds, "No indeed! What a beautiful fact!" is shown
From 27.76 to 30.45 seconds, "It seems a paradox, does it not," is shown
From 32 to 37 seconds, "that the image formed on the Retina should be inverted?" is shown
From 37 to 43 seconds, "It is puzzling, why is it we do not see things upside-down?" is shown
From 44.2 to 50 seconds, "You have never heard the Theory, then, that the Brain also is inverted?" is shown
From 50 to 54 seconds, "No indeed! What a beautiful fact!" is shown


Piers Morgan slams uni board that declares 'white people can identify as black'
Piers Morgan has slammed ‘insulting’ university ruling that declares white people can self-identify as black.
Both Piers and Susanna put on a united front of Good Morning Britain by refusing to defend the ruling, shunning impartiality rules put in place by Ofcom, to declare the move ‘insulting’.
The University and Colleges Union has ruled people can identify how they see fit – extending identification beyond gender to include declaring yourself a different race, and even if you’re disabled or not.
Advertisement Advertisement
Susanna compared the move to the Rachel Dolezal scandal from the States, where a white woman masqueraded as a black woman and self-identified as black, saying that she was ‘absolutely crucified’ for essentially the same thing.
Furious Piers declared: ‘This is the way the world’s going! And people think I’m the nutty one, I tell you I’m not.
‘If you’re white, you’re white, if you’re black, you’re black. That’s it. We don’t need 120,000 lunatic academics to tell us that white people are now black.
 To everybody. It’s mad.’
Susanna then backed up her co-anchor and refused to defend the ruling that people can identify their own race.
‘If Ofcom are watching I think I’m supposed to defend them, the university chiefs. But I’m not sure I can in this case,’ Susanna said.
‘How do they get to be academics, these people?,’ a livid Piers added.
The Universities and Colleges union stated in their ruling: ‘Our rules commit us to ending all forms of discrimination, bigotry and stereotyping.
‘UCU has a long history of enabling members to self-identify whether that is being black, disabled, LGBT+ or women.’
Advertisement Advertisement
Good Morning Britain airs weekdays from 6am on ITV.
Got a showbiz story? If you've got a story, video or pictures get in touch with the Metro.co.uk Entertainment team by emailing us<EMAIL_ADDRESS>calling 020 3615 2145 or by visiting our Submit Stuff page - we'd love to hear from you.


Bougainville in the Pacific could become world’s newest nation
by Robert GeartyResidents of a Pacific archipelago started voting Saturday in a historic referendum that could lead to the establishment of the world’s newest nation.
The two-week vote will decide if Bougainville favors independence from Papua New Guinea or more autonomy.
The referendum is taking place 19 years after a peace agreement ended a brutal, decade-long civil war in Bougainville in which 15,000 people died.
Official observers don’t expect violence to mar voting.
CHILEAN SINGER PROTESTS TOPLESS AT LATIN GRAMMYS AS GOVERNMENT BOWS TO REFERENDUM DEMANDS
“They’ve been waiting 19 years for this historic moment,” said Gianluca Rampolla, the United Nations resident coordinator in Papua New Guinea. “I think they will be left with joy.”
The 250,000 eligible voters will have two weeks to vote, a period of time that is due to the region’s rugged terrain.
“There are people coming on boats,” Rampolla said. “There are people walking. It’s the rainy season. There are rough seas. Flexibility is needed to adjust on the ground.”
PACIFIC ARCHIPELAGO TO VOTE ON INDEPENDENCE FROM FRANCE
An overwhelming majority is expected to vote for independence in the referendum,which is nonbinding. Papua New Guinea’s Parliament will have the final say.
John Momis, president of the Autonomous Region of Bougainville, told reporters Friday the region stood on the verge of a new socio- economic and political order.
CLICK HERE FOR THE FOX NEWS APP
“We are trailblazers forging a new path into the unknown with the sheer determination to face any challenge that comes our way,” he said. “We will face this together as one people and one voice to decide our ultimate political future.”
The Associated Press contributed to this report.


--- title: Laravel Lumen's performance under production use date: 2015-11-23 06:19:00 +08:00 permalink: laravel-lumen-performance-production/ header-img: "img/15968544719_fc3a048ce0_k.jpg" subtitle: "Ever wondered how Lumen will perform under real-production use? Let me share some of my experience about deploying and optimizing it in a production environment which takes 50,000 hits per minute." layout: post tags: - laravel lumen in newrelic - hhvm and lumen ---
Yes, you read that right.
Disclaimer: since the web application is protected by NDA. I cannot give the url of website and the company. So I was just limited of technology-related stuffs that Lumen's performance is involved.
To give you an idea what kind of site is receiving so much traffic like that, the site is basically some sort of like Google Adsense, a custom made one. It serves ads and analyze the surfers behaviour to deliver and target ads in a very optimized way.
here is the server stack that powers the application
All of the server has relatively similar spec, except for Memcached which has 64.00 GB RAM
Note that the following charts are NOT results from benchmarks or some sort of profilers. They are real-production traffic usage. In this case, we are using a commercial product called NewRelic APM to capture these information from production servers. This also not includes the requests to static assets, as we have a CDN that serves those.
Apdex and Throughput
In case you are not familiar with what is Apdex is, you can find a detailed explanation here. For now, lets just we say you have number on a uniform scale of 0-to-1 wherein
Further drilling down in the result
You can clearly see here that Lumen runs at about 20-25 milliseconds
Scalability Analysis
the line chart looks promising, its almost a straight line. In a non-scalable system, line usually tends to be curved upward at the end, or has some really high slope. That simply means even if you continue to hurdle more requests, response time is not exponentially increasing, thus not affecting the end-users experience.
Of course, we did not came up with these figures without any sort of roadblocks, it is first time we deploy Lumen in production use. Here are the some of the problems we had encountered along the way:
You can make Lumen execute as fast as 6 ms using HHVM in a 4 bare-metal servers (3 web servers, 1 queue listener), then 25 ms under PHP-FPM. If you are using custom extensions like NewRelic, HHVM might hamper your ability to see the stats of APM and could give you random segmentation fault errors. Standard PHP-FPM will give you more stability and support for wider set of extensions in exchange of slower execution time. Overall, I think I'm pretty satisfied with what Lumen's performance in a production environment.


--- layout: post title: Last Train Home (2009) date: 2011-07-01 14:34:06.000000000 -04:00 categories: - Culture and Society - Economics - International Relations - Movies tags: [] status: publish type: post published: true meta: _edit_last: '7106425' author: login: samarthbhaskar email<EMAIL_ADDRESS>display_name: samarthbhaskar first_name: '' last_name: '' ---
Last Train Home (2009) is a Chinese documentary dedicated to migrant workers in China. It follows a family working to produce consumer goods for Western consumers that end up destroying the lives of the producers who hardly get paid a dime for their labor. It features heart-wrenching scenes of a father and mother committing themselves to arduous factory work only to see their son and daughter once a year during the Chinese New Year (only reaching them after being herded like cattle on crowded trains traveling between provinces). The entire film captures very well the emotions of the bleak reality of migrant workers' lives. The "low-hanging fruit" of China that has catapulted it to global economic success hardly benefits from these successes.
Although the film is wrought with pain and strife, it comes highly recommended as a fantastic piece of work in film-making and also as a worthwhile look into migrant workers lives in China. I can only imagine that the struggles featured in this film are characteristic of struggles of workers around the world.


Retrieving records from the database and mapping the results into ActiveRecord models are a big part of every Rails app. A large majority of your controllers will retrieve one or more ActiveRecord models. For something as important and fundamental as 'find', knowing more of it's options and idioms can help you write less, write it more elegantly, and do more.
For starters, let's look at the basic form.
Fruit.find(1) # single integer id
Fruit.find(params[:id]) # single string id
Fruit.find(@user1, @user2) # by list
Fruit.find([@user1, @user2]) # by array
This is how you find a record given an id. When you search like this, it will raise ActiveRecord::RecordNotFound if no record can be found. This exception is what causes the 404 page to load in your controllers when you hit a URL for a record that doesn't exist. You can emulate this by explicitly raising RecordNotFound if you don't want a user to access a certain record.
@banana = Fruit.find(5)
# pretend that no record was found and show a 404 page.
if @banana.rotten?
raise ActiveRecord::RecordNotFound.new
end
Fruit.find(:first)
Fruit.first
Fruit.find(:last)
Fruit.last
Fruit.find(:all)
Fruit.all
These methods do what you expect them to. I prefer using the shortcut methods 'all', 'first' and 'last', rather than explicitly saying Fruit.find(:first). The order for :first and :last is the 'id' of the table. Think of 'first' as the first inserted record, and 'last' as the most recently inserted record.
Something I would like to see more people using is the shortcuts in conjunction with find's arguments. Instead of:
Fruit.find(:all, :conditions => { :color => 'yellow' })
I prefer the shorter:
Fruit.all(:conditions => { :color => 'yellow' })
This works with all 3 shortcut methods. It also works with all of the options that the normal find method accepts.
Conditions are what get translated into the WHERE clause in the SQL statement. There are 3 different way to specify your conditions: the String form, the Array form, and the Hash form.
The string form is easy to understand and is useful for querying specific known values.
Fruit.all(:conditions => "name = 'banana' OR name = 'apple'")
DO NOT use the string form for tainted values that come in from submitted web forms. The String form does not escape values for you and can cause SQL injection attacks if you aren't careful. For example:
# DO NOT do this!
Fruit.first(:conditions => "name = '#{params[:name]}')
While this may look harmless at first, there's no guarantee that params[:name] is a safe value. It could very well have the value
# dangerous params[:name] value
'; DROP TABLE fruits;
When you interpolate that value into the condition string, you end up dropping all your delicious fruits! When you need to do a find based on unsafe web input, use the Array and Hash forms instead. Both of these will escape and quote the values properly.
Using the same example, we could write that last dangerous query as:
Fruit.first(:conditions => ["name IN (?) OR color = ?", params[:keywords], params[:color]])
This works, but gets kind of ugly when you have a lot of values to interpolate. To make it more readable, you can name your interpolations in a hash instead of using '?'.
Fruit.all(:conditions => [
"name IN (:keywords) OR color = :color",
{
:keywords => params[:keywords],
:color => params[:color]
}
])
Finally, we come to my favorite and most used form of condition.
I find this style to be the most readable for equality and SQL IN conditions. It keeps the column name close to the value being queried. If the value is an Array, then ActiveRecord knows to use the SQL IN operator.
Fruit.all(:conditions => {
:name => params[:keywords], # SQL - name IN ('banana', 'apple')
:color => params[:color] # SQL - color = 'yellow'
})
If you use :joins or :include to pull in associations, you can still use the Hash form to do equality comparisons. For example:
Fruit.all(:include => [ :company ], :conditions => {
"company.name" => params[:company_name],
"company.phone" => params[:phone],
:color => params[:color]
})
In general, I like using the String form to do short hardcoded SQL queries like "aroma IS NULL". The Hash form is ideal for conditions that only use the equality operator. The Array form is the most general purpose; I try to use the named arguments version when using the Array form.
You can use the :include or :joins to pull in a model's associations if you want to use them in the find's :conditions, or if you want them to be eager loaded in the results. :include uses 'LEFT OUTER JOIN' and :joins uses 'INNER JOIN'. Both forms can take a raw SQL string, or symbols for what associations to follow.
# fruits LEFT OUTER JOIN companies ON companies.id = fruits.company_id
Fruit.all(:include => [ :company ])
# fruits INNER JOIN companies ON companies.id = fruits.company_id
Fruit.all(:joins => [ :company ])
You can follow associations arbitrarily deep:
# fruits LEFT OUTER JOIN companies ON companies.id = fruits.company_id LEFT OUTER JOIN employees ON employees.company_id = company.id LEFT OUTER JOIN profiles.employee_id = employees.id
Fruit.all(:include => [ { :company => { :employees => :profiles } } ])
Multiple associations work too:
Fruit.all(:include => [ :company, :farm ])
For more examples, google 'rails eager loading', and read up about Rails Eager Loading. Use :joins when an inner join is sufficient. This will give you faster queries, and cleaner log output.
When you do multiple joins or includes, you may end up with duplicates in the results. Rather than removing the duplicates in code, let ActiveRecord handle it.
Fruit.all(:select => "DISTINCT fruits.*", ...)
By default, all selects will select all columns (SELECT * FROM ...). If you know ahead of time that you'll only be using a few specific columns, specify them with :select and large queries will feel noticeably faster.
@banana = Fruit.first(:select => 'id, name')
@banana.id # ok
@banana.name # ok
@banana.color # raise ActiveRecord::MissingAttributeError
This is especially useful when writing data migrations that only need to modify a specific column's data. Make sure you include 'id' because it's not included by default.
named_scope is great. Everything you learn about 'find' applies to named_scope. It's a great way to compose complex queries.
Grokking the various ways to retrieve database rows and control how they are mapped into models by your ORM will make you a stronger developer regardless of what framework you're using. There'll be less code to maintain, and that code will be both readable and concise. Spend an afternoon and read the documentation for find, eager loading, and named_scope. I promise that even if you've been doing Rails for a while, you'll pick up on an option or a style that you hadn't seen before.