Form Inputs
Inputs (Text boxes)
Input elements are for single-value or single-line contents. They are created by the <input />
HTML tag in combination with the .form-element
CSS class.
When you have form validation that failed for this input, you can mark it as such with the .is-danger
modifier class.
Example
<input class="form-element">
<input class="form-element" type="datetime">
<input class="form-element is-danger">
Normal form input:
Date input:
Form input with failed validation:
Text areas
Text areas are multiline inputs. They are created by the <textarea>
HTML tag in combination with the .form-element
CSS class.
When you have form validation that failed for this text area, you can mark it as such with the .is-danger
modifier class.
It's also possible to change the size of the text area. There are two modifiers for this: .is-large
and .is-small
Example
<textarea class="form-element"></textarea>
<textarea class="form-element is-small"></textarea>
<textarea class="form-element is-large"></textarea>
<textarea class="form-element is-danger"></textarea>
Normal text area:
Small textarea:
Large textarea:
Text area with failed validation:
Labels
Labels are important for accessibility. They should describe the form element in a way, that allows everyone to understand, what should be written into it, regardless of any limitations.
They are created by the
HTML tag in combination with the .form-element
CSS class.
You can add a .form-caption
directly below it for small explanations.
Example
Label for an input

Label for an input

<input class="form-element" id="labels-example--input">
Label for an textarea
<textarea class="form-element" id="labels-example--textarea"></textarea>
Radio buttons and Checkboxes
Radio buttons and checkboxes are special types of inputs. However the normal input presentation would not be appropriate for them. Therefore you need to give them the class .form-radio-element
or .form-checkbox-element
for radio buttons or checkboxes, respectively.
Example
<input type="radio" class="form-radio-element">
<input type="checkbox" class="form-checkbox-element">
Select elements
Select elements allow the user to choose one or many from a set of options. They are created by the <select>
HTML tag in combination with the .form-element
CSS class (with the options using the <option>
tag).
When you have form validation that failed for this select, you can mark it as such with the .is-danger
modifier class.
Example
<select class="form-element">
<option>Yes</option>
<option>No</option>
<option>Maybe</option>
</select>
<select class="form-element" multiple>
<option>Yes</option>
<option>No</option>
<option>Maybe</option>
</select>
<select class="form-element is-danger">
<option>Yes</option>
<option>No</option>
<option>Maybe</option>
</select>
Normal select:
Select with [multiple]:
Select with failed validation:


Try it in VMs. Do not run in you main device...
Or, else enable prevent pop-ups option in your browser


Barquilla de la Santa Maria
BULLETIN of
the Catholic Record Society
Diocese of Columbus
----------------------------------------------------------------------------------------------------------------------------------------
Vol. XIV, No.
.6 - June. 29: Sts. Peter and
Paul June, 1989
----------------------------------------------------------------------------------------------------------------------------------------
STS. PETER AND PAUL MISSION
DOUGHERTY'S SETTLEMENT or
CRANE'S NEST,
WASHINGTON TOWNSHIP, MONROE
COUNTY, ca 1841-ca 1869
Among the rough, wooded hills of Washington and Wayne townships in Monroe County, Ohio the only good highways in the first half of the nineteenth century were the water courses. It was the creeks and small rivers which the settlers followed into the country from the Ohio and it was along the bottom lands that they settled. Along Crane's Nest Creek (the lower part now called the Little Muskingum) their houses, stores, and mills were built. About the year 1841 the log church of Saints Peter and Paul was built by a few Catholic families in an area on the creek known as Dougherty's Settlement.
The exact location of the church is still pointed
out as "Chapel Bottom," the bottom land on the east side of the
Little Muskingum River, across the road and south from the Cox residence at
39887 Stonehouse Road (County Road42). It is directly across the river from the
Dougherty Cemetery. (1) The date of construction of the church is less certain.
The parish history of Woodsfield St. Sylvester states that Sts. Peter and Paul
was built in 1839 (2) but this date seems a little early. Sketches of three of
the founding families were published in the 1882 history of Monroe County. (3)
Each of these mentions the church, but they do not provide enough information to
place its date beyond doubt.
Edward Dougherty was a son of David and Sarah
(Maloy) Dougherty, born in Co. Donegal, Ireland in 1809. The parents came to
Monroe County in 1817 and Edward settled in Washington Township in 1833.
"He came here when there were but few settlers, mostly hunters. He helped
build the first school-house, on the Gray farm; also the first church, of logs,
on the creek, named St. Paul and St. Peter." This simply dates the church
to 1833 or later.
William Dougherty was born in Letterkenny, Co.
Donegal, Ireland in 1816, a son of Patrick and Rose (McTeague) Dougherty.
"His father settled in Wayne Township, August 9, 1820, one of the early
settlers in the unbroken forest, and helped to clear the country and organize
schools.... Their first church, and the present one, the church of St. Paul and
St. Peter, is located in Washington township, and was built in 1847." This
date is of no value, for the church is known to have been older; Sts. Peter and
Paul is first listed in the annual Catholic Directory of 1843, a mission of
Beaver St. Dominic.
The sketch of John W. Poulton states that his
father, John Poulton, "settled near Antioch, Perry township, in 1841, and
cleared his first farm
-145-
near that place. He went into the wild woods and helped to build the first Catholic church in Washington township, Monroe county." This would place the construction of the church no earlier than 1841. John Poulton was married in Belmont County in 1834 and was living near the present Temperanceville when the 1840 census was taken. (4) If he indeed helped with the construction of the church, then it could have been built no earlier than 1841. It may have been built that very year, if the date of 1847 mentioned in the William Dougherty sketch (see above) was a misreading of a hand-written 1841. A stone preserved from the old Archer's Settlement church says that it was erected in 1841 "under direction of Rev. Peter Murphy." This was Rev. William Peter Murphy of Beaver. Sts. Peter and Paul Church was probably also erected under his direction and was named after his own patron.
Nothing is known of the mission for more than a
decade after its founding. The annual directories list it as a mission of Rev. Charles
McCallion of Beaver in the years 1843 through 1846 and of Rev. John C. Kroemer
of Miltonsburg, 1848 through 1854.
In November of 1852 the remarkable Rev. J. W.
Brummer was sent to Beaver as pastor, relieving Father Kroemer of some of his
duties in the wide mission area. Father Brummer wrote many long letters to
Archbishop Purcell and these provide astounding glimpses of the difficult
condition of the Church in Monroe County, including Crane's Nest. (5) Father
Brummer had been stationed at Dayton but had gotten into a quarrel there and as
a result had been transferred. He viewed the assignment to Beaver as a
punishment and this colored his early view of the missions and their people. In
January of 1853 he wrote, "you gave me penance here enough for it on corn
bread & creeks, rain & cold & the most ignorant people that want to
be instructed & so disordered that every one ought to have a priest for
himself continually yet I am alone run[n]ing or rather tumbling about on
horseback from one place to another[.] wanting to do good to all I can do no
good to any & whatever might be done or learned is long undone &
forgotten before the time I come round again. "When he came to Crane's
Nest, the people were just pulling one of the men drunk and half dead out of
the creek, "who not three weeks ago had heard you & Father Hengehold
instruct them & giving them the Pledge." Others "would not come
to church the way of a c[o]ouple hundred rods distance after I coming 24 miles
through heavy rain to give them Mass."
Soon enough, however, his attitude changed toward
these "poor but very generous people," and even in later years after
he had been assigned elsewhere he continued to solicit the Archbishop for their
spiritual care. In 1853 he reported that the people at Crane's Nest wished to
have a church in a better location; they would use the old one as a school
house and "give a small place around it for play ground with a good deed
for the same for I understand there is no deed made of any account of the old
church & lot." William Dougherty jr., Edward Dougherty, and another
had offered three different pieces of land for the new church. One site was
"opposite the old one across the creek where the graveyard is."
Father Brummer seems not to have encouraged them, for he wrote, "These are
the speculations of these wild regions[;] what is feasable of all this &
what will be done the future must teach & you must determine. For my part I
feel I am not made for these things & I would much rather work at getting
up living temples of the Holy G[h]ost in as far as my little capacity with
God's assistence goes"... (6)
-146-
-147-
In January of 1854 Father Brummer wrote an
eight-page letter to the Archbishop which, simply stated, was a plea for a
third priest for the area. He was still stationed at Beaver and Father Kroemer
was living at Miltonsburg. He noted that the new annual directory listed Father
Kroemer as attending Crane's Nest, Wills Creek, Archer's Settlement, and
Immaculate Conception (Enoch or Fulda), but that Father Kroemer, "weak and
infirm", could not possibly attend to them all. In his opinion "the
Congregations of St. Peter & Paul Cranes Nest & St. Michaels Duck Creek
[Archer's] are inevitably lost to the Church & heaven & you may
forthwith erase them from the map of your authority & jurisdiction if they
do not get a good Pastor speedily." He menioned also the hundreds of Irish
building the Marietta railroad, "poor good people", and scattered
Catholics at Martinsville, Bridgeport, Bellaire, and "every place along the
River down to Marietta." He thought a third priest could build a church at
Bellaire or Bridgeport and Crane's Nest and attend the scattered Catholics
along the Ohio River, though the assignment would be "anything but a
comfortable & agreeable mission." Apparently based on some intention
expressed previously by the Archbishop, Fr. Brummer had already announced to
the people of Sts. Peter and Paul that they would have another priest and he
had left with Mr. Poulton $30 in cash plus some pledges to give to the new
priest. (7)
Archbishop Purcell responded by sending the third
priest, Rev. S. Herzog. The outcome was reported in another letter from Father
Brummer to the Archbishop, dated May 18, 1854:
I must announce to your
Lordship the important event that the great champion you sent to these savage
regions of Archers & Cranes Nest Revd. S. Herzog "venit - vidit - et -
fugit" & is I hope now lodged in some part of good father Dieters
hospitable Residence at Zanesville to recover from the fright & then reorganize
& repair his scattered - Baggages for some other expedition. Deo Gratias! a
Similibus libera nos Domine! Father Herzog may be very good in his place but to
put him in these places is both killing him & these missions. I lost eight
whole days of this precious paschal time & went to some expense & to
great tr[o]uble to wait on him & bring him here & thus it ends now.
Fully
a year later, the situation had not changed. The two priests still had seven
missions (Beaver St. Dominic, Washington St. Patrick, Miltonsburg St. John the
Baptist, Fulda Immaculate Conception, Crane's Nest Sts. Peter & Paul,
Archer's Settlement St. Michael, and Wills Creek St. Joseph), besides calls
from the railroad and Bellaire. Father Kroemer was completely broken down and could
not answer even the most urgent calls. The danger to the priests was not only
physical, as Father Brummer wrote:
...the priest always running about is always
distracted becomes careless to his own prayers, meditation & even breviary
(this I say of myself not of saintly Father Kroemer) & very seldom gets the
chance to go to confession his mind is occupied with his worldly temperary
material difficulties & trubles more & more he becomes a man of worldly
mind & how can such a person bring & lead these poor & ----- people
to become good catholics & save their souls. He actually does more harm
than good & both pastor & people must go to distruction. It has been
this wild, unsettled life of the priests
-148-
that were sent here, successively, & nearly all
ruined or at least made dissipated & distracted that has caused the ruin of
most of these missions. Certainly the mismanagement & neglect of supplying
pastors have done their share too. If things go on this way most of these
missions will become what Archers is now, die away & if you sent a third
priest he will not be able to get his support except by worldly ---- &
management & incompatible with his state of a good priest. (8)
On August 1, 1855, Father Brummer wrote again to the
Archbishop, in preparation for a visit he was to make that month. (He had
learned of the date of the visit by reading the Telegraph!) The new St. Mary's
Church, replacing Beaver St. Dominic, would be dedicated on August 15. In
addition, the Archbishop would visit Washington, Wills Creek St. Joseph, and
Crane's Nest. There would be over twenty to be confirmed at the latter. Father
Brummer could not attend to instruct them himself, so he had appointed Mr.
James Hilliard to do that. He added, "You need not think of coming here
without helping Cranes Nest &c. with another priest that can attend
them." This, however, the Archbishop could not or would not do.
In the autumn of 1855 several changes were made in
the assignments of the clergy. Father Brummer was given a rest at St. Nicholas
in Zanesville and Father John M. Jacquet was sent to replace him at St. Mary's.
It would appear that the Archbishop had taken seriously the proposal which Fr.
Brummer had made whereby a priest would be stationed on the River. In a letter
dated January 8, 1856 Father Brummer remarked that "Revd. father Kennedy
is gone to Belair to establish a congregation & church there & attend
from there to Cranes nest. poor Cranes nest! I think it will be lost as
Archers!" This experiment did not last and Crane's Nest came into the care
of Father Jacquet at Batesville (Beaver).
In 1856 and 1857 we at last get a glimpse of the
Crane's Nest congregation, for the names of those who made Easter Communions
those years were recorded by Father Jacquet in the Marriage Register at St.
Mary's. The thirty-four names for 1856 are:
Old Mr. Leek Mrs.
Hillard John
Paulton
Old Mrs. Leek Old
Mrs. Wil. Daugherty Adrian Paulton
James Leek Mrs.
Nathan Daugherty Mrs. Paulton
Anna Arnas (?) Barbary
Daugherty William Paulton
Mr. McManimy Old
Mrs. Sweeney Jacob Daugherty
Old Mrs. Haren Old
Mrs. Sweeney her sister Frances Daugherty
Old Mr. Haren Stephen
Daugherty Old Wilson
Mrs. Thomas Maier Mrs.
Daugherty Edward
Daugherty
William Shepherd Catherine
Daugherty Mrs. Edward Daugherty
Mr. Shepherd Margaret
Daugherty Mary Daugherty
Miss Shepherd Ellen
Daugherty Margaret
Daugherty
James W. Hillard
In
1857, only twenty-two names were recorded. (9)
About 1858 Father Brummer was sent as pastor to
Miltonsburg, Fulda, and Wills Creek, with his residence to be at Fulda when he
could make proper arrangements there. Father Jacquet was to keep the other
missions, but he was
-149-
expanding
his work in Guernsey and Belmont counties and soon prevailed upon Father
Brummer to attend Archer's and Crane's Nest. In April of 1859 the Archbishop
wrote that he would soon ordain Rev. D. Klueber and would send him to care for
Miltonsburg and Wills Creek that autumn. The ordination was delayed however,
and the status remained the same. By the spring of 1860 Stephen Dougherty was
troubling Father Brummer, "all the time with his complaints of not being
better attended. 'How much they would do if they were well attended' & if I
go there I hardly get enough to pay expenses. Faith, living Faith is what is
wanting & then the pay will follow & for the right priest that would
save these poor people." The priest was eventually provided, but not in
any way proposed up until then.
The last years of Sts. Peter and Paul mission are almost
as obscure as the first. The annual Catholic Directory for the years 1864
through 1879 lists "Dougherty Settlement" as a mission of Fulda. For
the later years of this period, this listing is not supported by the only
extant annual pastor's report. (10) Rev. D. J. Klueber of Fulda for the year
1868 reported only three missions: St. Michael's (Archer's), St. Henry's
(Harrietsville), and St. Patrick's (Fox's Settlement in Washington County).
This may be a spurious directory entry, at least in the later years, one which
simply was not deleted when the situation changed.
In July of 1865 Rev. Nicholas Pilger was sent to
Miltonsburg and relieved Father Klueber of the Monroe County missions. He began
a mission at Woodsfield and by 1867 had a church under construction there. In
his report to Bishop Rosecrans for 1868 he listed twenty-five souls at Sts.
Peter and Paul, Crane's Nest, but one hundred at Woodsfield, where St.
Sylvester's Church was nearing completion. The dedication of St Sylvester's on
Sept. 12, 1869 by Bishop Rosecrans (at which 32 persons from Woodsfield and
Crane's Nest were confirmed) is generally seen as the end of Sts. Peter and
Paul mission. Crane's Nest continued to be listed in the annual directories as
a mission of Miltonsburg (along with Woodsfield and Wills Creek) through the
year 1876. This may be another carry-over, however, for the 1872 report by
Father Fladung of Miltonsburg makes no mention of it. The log church must have
been abandoned as a mission about 1869 or 1870 and thereafter the people
travelled six miles to perform their religious duties in Woodsfield. They
finally were sent a resident pastor in the early 1880s.
Adding to the
confusion in the history of Sts. Peter and Paul mission is the evidence for two
additional Catholic churches and one church property near Crane's Nest Creek.
The two churches appear both on John B. Noll's 1869 map of Monroe County and in
Caldwell's 1898 atlas. No other evidence of their existence has been found. One
was located on the east side of Moose Ridge Road, near a school house in
Section 2. This is just south of the old village of Edwina in Wayne Township.
The other was located on the hill overlooking the west end of New Castle, now
called Laing's, in Green Township. This was near the Crane's Nest Fork of the
Little Muskingum.
The other property was on the west side of State
Route 537 in Section 15 in Washington Township, southeast of Graysville,
between the road and Clear Fork Creek. It was deeded to Bishop Rosecrans by B.
F. Oblinger in 1875 "for the Catholics of Elm Cove." Bishop Watterson
sold this property in 1882. (See Monroe Co. Deed Records 32/118 and 39/477.)
-150-
NOTES
1. Pointed out by Mr. John
Paulus of Francis Paulus Road, who was shown the site by his father and others.
2. See for example the
sketch in the Steubenville Register, Nov. 2, 1984, supplement page 59.
3. Historical Hand Atlas ...
containing-History of Northwestern Ohio ... and Monroe County...; Chicago &
Toledo: H. H. Hardesty & Co., 1882; biographical section, pages 10, 14, and
22.
4. Belmont County Marriage
Register 3, page 263; census of 1840, Belmont County, Somerset Township, page
22. An interesting note: on December 27, 1841 John Poulton purchased from
Edward Dougherty and wife Sarah 39 acres 1/4 mile south of the Dougherty
Cemetery (Monroe Co. Deed Record 2/420).
5. The letters were copied
by the late Rev. Herman Mattingly at the University of Notre Dame Archives and
the copies were placed in the Archives of the Diocese of Columbus.
6. Brummer to Purcell, Jan.
7, 1853.
7. Same to same, Jan. 21,
1854.
8. Same to same, May 24,
1855.
9. Courtesy of Rev. Charles
Mascolino, pastor of Barnesville Church of the Assumption and Temperanceville
St. Mary.
10. The 1868 and 1872
reports are preserved in the Archives of the Diocese of Columbus.
--------
DOUGHERTY CEMETERY, CRANES
NEST CREEK
Section 6, Washington
Township, Monroe County, Ohio
These
stones were read on April 20, 1989, with the assistance of Mr. John Paulus and Rev.
George J. Schlegel. Every legible stone is included.
Ernest
S., died [center broken out] ...1883, aged 1Mo...
John
N. Cline, Feb. 27, 1831; Oct. 30, 1907 )
Margaret
Cline, June 10, 1834, Apr. 6, 1903 )
Elmer,
son of J. & S.E. Cox, Nov. 1, 1877-Dec: 9, 1877. Of such is Thy
kingdom of heaven.
Catherine
A. Dougherty-Cronin, Feb. 25, 1854, June 22, 1883
Peter,
son of Wm. J. & S. Dougherty, died Dec. 28, 1851, aged 8M 8D.
William,
son of Wm. J. & S. Dougherty, died Oct. 19, 1841, aged 3Y 10M & 27D. Emily,
daughter of John & Mary Daugherty, died Apr. 23, 1865, aged 3M & 5D. )
Infant daughter of John & Mary Daugherty, died Mar. 13, 1870. )
Infant
daughter of John & Mary Daugherty, died Dec. 13, 1870. )
Infant
daughter of John & Mary Daugherty, died Dec. 24, 1870, aged 13 ds. )
John
S., son of Wm & Sarah Dougherty jr., died November 8, 1861, aged 16
y s, 11
mo's, & 29 d's.
Sarah,
wife of Wm. Dougherty jr., Died Jun 11, 1855, Aged 36Y 1M & 26D.
David
Dougherty, born May 28, 1829, died Jan. 26, 1894
Margaret,
wife of David Dougherty, died May 28, 1889, aged 56 Y 3M 18 D.
Jeremiah
Daugherty, born July 21, 1833, died Nov. 22, 1885 )
Sarah
Daugherty, born Sept. 1, 1834, died Aug. 5, 1895 )
Cynthia A., daughter
of D. & M. Daugherty, died Feb. 11, 1879, aged 19 Ys 1 Mo
Infant son of D. & M. Daugherty, died Mar. 11,
1869.
Infant
son of D. & M. Daugherty, died Feb. 27, 1871.
+
In memory of Philip, son of Daniel & Mary Daugherty, departed this life
Feb. 3d 1841 aged - years & 6
mos.
-151-
Edward
Daugherty, Aug. 29, 1809, Dec. 6, 1888 (verse)
Sarah,
wife of E. Daugherty, Jan. 9, 1815, Aug. 9, 1885
Mary
E., wife of Simon Dougherty, died Oct. 10, 1873, Aged 38 Ys 9 Ms 5 Ds.
Simon
Dougherty, died Apr. 14, 1889, aged 55Y. 1M. 8D.
James
Daugherty, born May 24, 1806, died July 12, 1890. At rest.
Hettie
E., wife of Edward Dougherty, born Feb. 5, 1864, died Nov. 20, 1905.
Sgt
David Daugherty, Co. K, 62nd Ohio Inf.
Alelia, wife of David G.
Dougherty, daughter of Henry and Ann E. Okey, died Aug. 20, 1886, aged 36Y ,,.9,M 28D.
David
A., son of I.N. and M F. Daugherty, died July 26, 1866, aged 2Ys 1Mo.
Edward
Daugherty, 1841 - 1912.
)
Helen
M., wife of Edward Daugherty, 1851 - 1894. )
Daniel
Daugherty, died April 27, 1857, in his 49 year.
William
Daugherty, died Dec. 17, 1851, aged 14 y's, 6 mo's, 7 d's.
Mary E., daughter of Wm.
& Margaret Dougherty, died Nov. 3d, 1861 aged 2y's 5m's & 21 d's
+
Cornelius, son of E. & S. Dougherty, May 18, 1851 - Nov. 26, 1876. (verse)
Emily
E., daughter of E. & S. Dougherty, Feb. 14, 1857 - Feb. 28, 1888.
In My Father's house are
many mansions. Margaret, wife of J. Dougherty, born Mar. 29, 1839, died Oct.
29, 1904.
Dora
E. Dougherty, 1882 - 1883.
E.
Everitt Dougherty, 1873 - 1894.
Brooklyn
H. Dougherty, born Dec. 24, 1902, died Sept. 15, 1904.
Wm.
H. Dougherty, Co. K [military marker, remainder buried]
Louisa,
daughter of H. & E.A.B. Daugherty, died Jan. 1, 1867, aged 4Ds.
Infant
______of J.W. & M.A. Daugherty, died May 26, 1865, aged 3 days.
William
Daugherty, died Jan. 26, 1879 (?), aged 67Y 8M 1D
James
Dougherty, born March 22, 1833, died March 4, 1896, 62nd Reg OVI
John
Harran, died Dec. 6, 1858 in his 84 year.
Rebecca,
wife of John Harran, died Sep. 15, 1863 in her 71 year.
William,
son of T. and C. Harn, died March 20, 1855, aged 2 yrs & 18 ds.
Martin,
son of T. & C. Harn, died June 17, 1856, aged 10 mos, 21 ds.
Amanda
J., daughter of S. & M. Hill, died Jan. 5, 1865, aged 4M 15D.
Robert
E., son of S. & M. Hill, died Feb. 23, 1872, aged 9Mos 8Ds.
Margaret,
wife of Simeon Hill, born Aug. 12, 1840, died March 10, 1874.
Willie,
son of Simeon Hill, born March 12, 1866, died Nov. 26, 1874.
Mollie
L., daughter of Simeon Hill, born Feb. 3d, 1873, died Oct 2d, 1875.
Mary
E., daughter of J. & N. Lowe, Died Jan. 20, 1857 Aged 3 Mo's & 14 d's.
+
IHS Hugh McMeniama, departed this life Mar. 29, 1853(?), aged 45 years.
+ IHS In memory of Susannah
McMeniama, wife of Hugh McMeniama, who departed this life the 11 day of Sept,
1846, in the 31st year of her age. Also Hugh McMeniama, infant son of the
above, aged 4 mos & 4 ds.
Denis McMeniama, died April
3, 1859, aged 21 ys, 10 ms, and 29 ds.
Louisa, daughter of J. &
R.J. Stafford, died Feb. 20, 1877, aged 17Y 2M 1D.


Keywords
C#, .NET Core, Azure, Functional Programming, Lambda Calculus, Category Theory, LINQ, LINQ to Objects, LINQ to XML, Parallel LINQ, LINQ to Entities, Entity Framework Core, Azure SQL Database.
Abstract
This is a latest, in-depth, cross-platform book on functional programming and LINQ programming via C# language. It discusses:
- Elegant functional programming via C#
- Use functional LINQ to work with local data, and cloud data in Azure SQL Database
- The internal implementation and underlying mathematics theories
Acclaim and endorsement
The following are the acclaim from Microsoft:
-
“An excellent book for those of us who need to get in-depth understanding on LINQ and functional programming with latest C# language. The author made sure this book includes the latest and cross-platform knowledge for the language, the framework, as well as the underlying mathematical theories.”
Hongfei Guo
Microsoft Principal Group PM Manager
-
“Awesome book for developers who are interested in learning or advancing LINQ or functional programming. It covers real world examples and theories. It is well organized with lots of code samples, easy for readers to digest.”
Jeff Yan
Microsoft Director
-
“This book explains practical and in-depth material clearly, concisely and accurately to the areas of the C# language, functional programming, and LINQ on .NET Framework and .NET Core. This is a great book for anyone wanting to understand the whys and hows behind these important technologies.”
Samer Boshra
Microsoft Principal Software Engineering Manager
-
“This is a great book for developers who want to go functional programming. It's one-stop shopping for serious developers who have to get up to speed with LINQ and functional programming quickly and in-depth. I'll keep this book on my desk not on my bookshelf.”
Roshan Kommussetty
Microsoft Principal Software Engineering Manager
-
“A C# functional programming book truly for .NET and .NET Core developers, from an authority on the subject. I'll be turning to this book first when I need to understand functional programming and LINQ.”
Surabhi Pandey
Microsoft Principal Software Engineer
-
“This book provides comprehensive information about the C# functional programming and LINQ technologies to developers. The detailed text and wealth of examples will give developers an in-depth understanding of this area.”
Wei Xia
Microsoft Senior Software Engineering Manager
-
“This is an excellent in-depth C# functional programming and LINQ book. It explains the latest technology with clear, concise and accurate examples. I would love to encourage everybody who wants to improve their productivity and efficiency of C# programming to have a read of this book.”
Kai Gao
Microsoft Software Engineering Manager
-
“This is a great book for C# developers, it covers both basic C# programming concepts for the beginners new to the .NET world, and C# advanced constructs for experienced .NET programmers. The book is up to date, talks C# 7.0 new language features and demonstrates how you can use them for functional programming. Thanks for the awesome work!”
Mark Zhou
Microsoft Senior Software Engineer
-
“Since LINQ has been introduced into .NET Framework, it has been becoming more and more important and powerful for .NET developers. This book greatly breaks down LINQ and functional programming into well-organized pieces, and makes me much more easily understand how to use LINQ and functional programming better than I used to. I highly recommend this book to C# developers.”
Tom Zhou
Microsoft Senior Software Engineer
-
“I like the way the author presented the detailed knowledge with a lot of examples. As a data scientist with statistics background in a number of industries, I can pick up C# programming and LINQ quickly when I followed the book. The book was concise and easy to read. It was a pleasant experience for me to spend my time emerging myself in the book in the sunshine weekday afternoon.”
Xue Liu
Microsoft Senior Data Scientist
-
“This is a marvelous book for C# developers who want to gain a deep yet practical understanding in functional programming and LINQ. Dixin showed his in-depth hands-on experience with countless useful examples. It’s my go-to book on the topics. I highly recommend this book to anyone who wants to learn LINQ/functional programming in C#.”
Baochen Sun
Microsoft Senior Researcher
-
“Functional Programming and LINQ in C# language, have been fully and clearly unraveled in this book, with many practical examples. The author has not saved any effort to go beyond scratching the surface of C# language and has successfully explained the magic behind the scene. This book is a must-have for anyone who wants to understand functional programming using C#.”
Jie Mei
Microsoft Data & Applied Scientist
-
“This book covers a great length of details to work through someone from beginner to advanced level. I'd highly recommend it to anyone who's interested in learning the latest technology on functional programming and LINQ via C# to make use of this super helpful tutorial book. The technology taught within the book starts from C# but is highly generalizable to other languages used in the day to day software engineering work.”
Cindy Liu
Microsoft Senior Program Manager
The following are the acclaim from academy and technical community:
-
“This book provides comprehensive and in-depth information about the C# functional programming and LINQ technologies to application developers on both .NET Framework and .NET Core. The detailed text and wealth of examples will give a developer a clear and solid understanding of C# language, functional programming and using LINQ to work with different data domains.”
Dong Si
Assistant Professor, Department of Computer Science, University of Washington, Bothell
-
“This book offers a comprehensive, in-depth, yet easy-to-understand tutorial to functional C# programming and LINQ. Filled with detailed explanations and real-world examples, this book is highly valuable for beginners and experienced developers alike.”
Shuang Zhao
Assistant Professor, Department of Computer Science, University of California, Irvine
-
“This book provides very comprehensive treatment of functional programming and LINQ. Dixin did a tremendous job at collecting information and wrote real world examples. This book also covers underlying functional programming concepts in great detail and shows how to take advantage of the language features in everyday application code. I'm happy with the book and highly recommended it.”
Yong Zheng
Google Senior Software Engineer
-
“This excellent book is an in-depth and also readable exploration of C# functional programming and LINQ programming. It covers .NET Framework and .NET Core in great detail.”
Yang Sha
Google Senior Software Engineer
-
“Great book! It takes a hands-on approach to LINQ and functional programming in an easy to understand format. I would highly recommend this book to developers looking to develop expertise in C#, functional programming, and LINQ.”
Himanshu Lal
Facebook Software Engineering Manager
-
“This is an excellent book on LINQ as it goes beyond covering how to program with LINQ but articulates the theory behind it and mechanics of the language, a coverage which is not easy to come by. Understanding this level of detail is necessary to program with LINQ to develop first class applications that are efficient and maintainable.”
Bertan Ari
Facebook Software Engineer
-
“Dixin did an excellent job to write this book for anyone who wants to learn LINQ/functional programming in C#. It has lots of very practical hands-on materials so it is very easy to learn from. It also contains lots of details and has well explained the theory, so it can be used as one-stop reference book!”
Hua Wang
Uber Senior Software Engineer
-
“This is a great book if you want to learn LINQ and functional programming with C# in depth. You can see Dixin’s deep expertise and feel his obsession for technologies. I started using C# since it was born, but I still learned new things from this book. It is an easy-to-read book, and there are lots of well-picked code examples. I have no doubt that readers will become experts on the topics after reading this book.”
Paul Lou
Uber Senior Software Engineer/Tech Lead
-
“This is a great book that combines practical examples with in-depth analysis of LINQ and functional programming in C#. Dixin leverages his expertise in .NET to provide a well written tutorial on the effective use of LINQ and an overview of the theoretical principles behind it. A must read for anyone working on these technologies!”
Dimitrios Soulios
Amazon Software Development Manager
-
“This book does a phenomenal job of explaining various facets of the LINQ and functional programming in C#. Tutorials provided in the book seamlessly fill the gap between the theory and its application. I highly recommend this book for both beginner and experienced developers in the .NET world.”
Amit Soni
Amazon Software Engineer
-
“This book covers LINQ and underlying functional programming concepts comprehensively. It employs tutorials and examples to illustrate various features and applications. The underlying theory is thoroughly explained as well to strengthen your understanding of the topic. Whether you are a beginner or journeyman, you will gain in-depth knowledge of the subject through this book.”
Alok Parmesh
Amazon Software Engineer
Contents at a Glance
The contents are organized as the following chapters:
-
Part 1 Code - covers functional programming via C#, and fundamentals of LINQ.
-
Chapter 1 Functional programming and LINQ paradigm
- What is LINQ, how LINQ uses language to work with many different data domains.
- Programming paradigm, imperative vs. declarative programming, object-oriented vs. functional programming.
-
Chapter 2 Functional programming in depth
- C# fundamentals for beginners.
- Aspects of functional programming via C#, including function type, named/anonymous/local function, closure, lambda, higher-order function, currying, partial application, first class function, function composition, query expression, covariance/contravariance, immutability, tuple, purity, async function, pattern matching, etc., including how C# is processed at compile time and runtime.
-
Part 2 Data - covers how to use functional LINQ to work with different data domains in the real world, and how LINQ works internally.
-
Chapter 3 LINQ to Objects
- How to use functional LINQ queries to work with objects, covering all LINQ and Ix.
- How the LINQ to Objects query methods are implemented, how to implement useful custom LINQ queries.
-
Chapter 4 LINQ to XML
- How to modeling XML data, and use functional LINQ queries to work with XML data.
- How to use the other LINQ to XML APIs to manipulate XML data.
-
Chapter 5 Parallel LINQ
- How to use parallelized functional LINQ queries to work with objects.
- Performance analysis for parallel/sequential LINQ queries.
-
Chapter 6 Entity Framework/Core and LINQ to Entities
- How to model database with object-relational mapping, and use functional LINQ queries to work with relational data in database.
- How the C# LINQ to Entities queries are implemented to work with database.
- How to change data in database, and handle concurrent conflicts.
- Performance tips and asynchrony.
-
Part 3 Theories - demystifies the abstract mathematics theories, which are the rationale and foundations of LINQ and functional programming.
-
Chapter 7 Lambda Calculus via C#
- Core concepts of lambda calculus, bound and free variables, reduction (α-conversion, β-reduction, η-conversion), etc.
- How to use lambda functions to represent values, data structures and computation, including Church Boolean, Church numbers, Church pair, Church list, and their operations.
- Combinators and combinatory logic, including SKI combinator calculus, fixed point combinator for function recursion, etc.
-
Chapter 8 Category Theory via C#
- Core concepts of category theory, including category, object, morphism, monoid, functor, natural transformation, applicative functor, monad, and their laws.
- How these concepts are applied in functional programming and LINQ.
- How to manage I/O, state, exception handling, shared environment, logging, and continuation, etc., in functional programming.
This tutorial delivers highly reusable knowledge:
- It covers C# language in depth, which can be generally applied in any programming paradigms besides functional programming.
- It is a cross platform tutorial, covering both .NET Framework for Windows and .NET Core for Windows, Mac, Linux.
- It demonstrates both usage and implementation of LINQ for mainstream data domains, which also enables developer to use the LINQ technologies for other data domains, or build custom LINQ APIs for specific data scenarios.
- It also demystifies the abstract mathematics knowledge for functional programming, which applies to general functional programming, so it greatly helps developers understanding any other functional languages too.
As a fun of functional programming, LINQ, C#, and .NET technologies, hope this helps.
Table of Contents
All code examples are available on GitHub: https://github.com/Dixin/CodeSnippets.
-
-
-
Introducing cross platform .NET, C# and LINQ
- .NET Framework, C#, and LINQ
- .NET Core, UWP, Mono, Xamarin and Unity
- .NET Standard
- Introducing this book
- Book structure
- Code examples
-
Start coding
- Start coding with Visual Studio (Windows)
- Start coding with Visual Studio Code (Windows, macOS and Linux)
- Start coding with Visual Studio for Mac (macOS)
-
- Programming paradigms
- Imperative programming vs. declarative programming
- Object-oriented programming vs. functional programming
-
-
One language for different data domains
- LINQ to Objects
- Parallel LINQ
- LINQ to XML
- LINQ to DataSets
- LINQ to Entities
- LINQ to SQL
- LINQ to NoSQL (LINQ to CosmosDB)
- LINQ to JSON
- LINQ to Twitter
- Sequential query vs. parallel query
- Local query vs. remote query
-
-
-
Types and members
- Types and members
- Built-in types
-
Reference type vs. value type
- ref local variable and immutable ref local variable
- Array and stack-allocated array
- Default value
- ref structure
- Static class
- Partial type
-
Interface and implementation
- IDisposable interface and using declaration
-
Generic type
- Type parameter
- Type parameter constraints
- Nullable value type
- Auto property
- Property initializer
- Object initializer
- Collection initializer
- Index initializer
- Null coalescing operator
- Null conditional operator
- throw expression
- Exception filter
- String interpolation
- nameof operator
- Digit separator and leading underscore
-
- Constructor, static constructor and finalizer
- Static method and instance method
- Extension method
- More named functions
-
Function polymorphisms
- Ad hoc polymorphism: method overload
-
Parametric polymorphism: generic method
- Static import
- Partial method
-
- Local function
-
Closure
- Outer variable
- Implicit reference
- Static local function
-
-
Input by copy vs. input by alias (ref parameter)
- Input by immutable alias (in parameter)
- Output parameter (out parameter) and out variable
- Parameter array
- Positional argument vs. named argument
- Required parameter vs. optional parameter
- Caller information parameter
-
Output by copy vs. output by alias
- Output by immutable alias
-
-
Delegate type as function type
- Function type
- Generic delegate type
- Unified built-in delegate types
-
Delegate instance as function instance
-
Delegate instance as function group
-
- Anonymous method
- Lambda expression as anonymous function
- IIFE (Immediately-invoked function expression)
- Closure
- Expression bodied function member
-
-
Lambda expression as expression tree
- Metaprogramming: function as abstract syntax tree
- .NET expressions
-
Compile expression tree at runtime
- Traverse expression tree
- Expression tree to CIL at runtime
- Expression tree to executable function at runtime
- Expression tree and LINQ remote query
-
- First order function vs. higher-order function
- Convert first-order function to higher-order function
- Lambda operator => associativity
- Curry function
- Uncurry function
- Partial applying function
- First-class function
-
- Forward composition vs. backward composition
- Forward piping
- Method chaining and fluent interface
-
- Syntax and compilation
- Query expression pattern
- LINQ query expression
- Query expression vs. query method
-
- Subtyping and type polymorphism
- Variances of non-generic function type
- Variances of generic function type
- Variances of generic interface
- Variances of generic higher-order function type
- Covariance of array
- Variances in .NET and LINQ
-
-
Immutable value
- Constant local
- Enumeration
- using declaration and foreach statement
- Immutable alias (immutable ref local variable)
- Function’s immutable input and immutable output
- Range variable in LINQ query expression
- this reference for class
-
Immutable state (immutable type)
- Constant field
- Immutable class with readonly instance field
- Immutable structure (readonly structure)
-
Immutable anonymous type
- Local variable type inference
-
Immutable tuple vs. mutable tuple
- Construction, element name and element inference
- Deconstruction
- Tuple assignment
- Immutable collection vs. readonly collection
- Shallow immutability vs. deep immutability
-
- Pure function vs. impure function
- Referential transparency and side effect free
- Purity in .NET
- Purity in LINQ
-
- Task, Task<TResult> and asynchrony
- Named async function
- Awaitable-awaiter pattern
- Async state machine
- Runtime context capture
-
Generalized async return type and async method builder
- ValueTask<TResult> and performance
- Anonymous async function
- Asynchronous sequence: IAsyncEnumerable<T>
- async using declaration: IAsyncDispose
-
- Is expression
- switch statement and switch expression
-
-
- Iteration pattern and foreach statement
-
IEnumerable<T> and IEnumerator<T>
- foreach loop vs. for loop
- Non-generic sequence vs. generic sequence
- LINQ to Objects queryable types
-
-
Sequence queries
- Generation: Empty , Range, Repeat, DefaultIfEmpty
- Filtering (restriction): Where, OfType, where
- Mapping (projection): Select, SelectMany, from, let, select
- Grouping: GroupBy, group, by, into
-
Join
- Inner join: Join, SelectMany, join, on, equals
- Outer join: GroupJoin, join, into, on, equals
- Cross join: SelectMany, Join, from select, join, on, equals
- Concatenation: Concat
- Set: Distinct, Union, Intersect, Except
- Convolution: Zip
- Partitioning: Take, Skip, TakeWhile, SkipWhile
- Ordering: OrderBy, ThenBy, OrderByDescending, ThenByDescending, Reverse, orderby, ascending, descending, into
- Conversion: Cast, AsEnumerable
-
Collection queries
- Conversion: ToArray, ToList, ToDictionary, ToLookup
-
Value queries
- Element: First, FirstOrDefault, Last, LastOrDefault, ElementAt, ElementAtOrDefault, Single, SingleOrDefault
- Aggregation: Aggregate, Count, LongCount, Min, Max, Sum, Average
- Quantifier: All, Any, Contains
- Equality: SequenceEqual
- Queries in other languages
-
- Implementing iterator pattern
- Generating sequence and iterator
- Yield statement and generator
-
-
Immediate execution vs. Deferred execution
- Cold IEnumerable<T> vs. hot IEnumerable<T>
- Lazy evaluation vs. eager evaluation
-
- Argument check and deferred execution
-
Collection queries
- Conversion: ToArray, ToList, ToDictionary, ToLookup
-
Sequence queries
- Conversion: Cast, AsEnumerable
- Generation: Empty , Range, Repeat, DefaultIfEmpty
- Filtering (restriction): Where, OfType
- Mapping (projection): Select, SelectMany
- Grouping: GroupBy
- Join: SelectMany, Join, GroupJoin
- Concatenation: Concat
- Set: Distinct, Union, Intersect, Except
- Convolution: Zip
- Partitioning: Take, Skip, TakeWhile, SkipWhile
- Ordering: OrderBy, ThenBy, OrderByDescending, ThenByDescending, Reverse
-
Value queries
- Element: First, FirstOrDefault, Last, LastOrDefault, ElementAt, ElementAtOrDefault, Single, SingleOrDefault
- Aggregation: Aggregate, Count, LongCount, Min, Max, Sum, Average
- Quantifier: All, Any, Contains
- Equality: SequenceEqual
-
-
Sequence queries
- Generation: Defer, Create, Return, Repeat
- Filtering: IgnoreElements, DistinctUntilChanged
- Mapping: SelectMany, Scan, Expand
- Concatenation: Concat, StartWith
- Set: Distinct
- Partitioning: TakeLast, SkipLast
- Conversion: Hide
- Buffering: Buffer, Share, Publish, Memoize
- Exception: Throw, Catch, Finally, OnErrorResumeNext, Retry
- Imperative: If, Case, Using, While, DoWhile, Generate, For
- Iteration: Do
-
Value queries
- Aggregation: Min, Max, MinBy, MaxBy
- Quantifiers: isEmpty
-
Void queries
-
-
Sequence queries (deferred execution)
- Generation: Create, RandomInt32, RandomDouble, FromValue, FromValues, EmptyIfNull
- Filtering: Timeout
- Concatenation: Join, Append, Prepend, AppendTo, PrependTo
- Partitioning: Subsequence
- Exception: Catch, Retry
- Comparison: OrderBy, OrderByDescending, ThenBy, ThenByDescending, GroupBy, Join, GroupJoin, Distinct, Union, Intersect, Except
- List: Insert, Remove, RemoveAll, RemoveAt
-
Collection queries
- Comparison: ToDictionary, ToLookup
-
Value queries
- List: IndexOf, LastIndexOf
- Aggregation: PercentileExclusive, PercentileInclusive, Percentile
- Quantifiers: IsNullOrEmpty, IsNotNullOrEmpty
- Comparison: Contains, SequenceEqual
-
Void queries
-
-
- Imperative vs. declarative paradigm
- Types, conversions and operators
- Read and deserialize XML
- Serialize and write XML
- Deferred construction
-
- Navigation
- Ordering
- Comparison
- More useful queries
-
XPath
- Generate XPath expression
-
- Clone
- Adding, deleting, replacing, updating, and events
- Annotation
- Validating XML with XSD
- Transforming XML with XSL
-
-
- Parallel query vs. sequential query
- Parallel query execution
-
Visualizing parallel query execution
- Using Concurrency Visualizer
- Visualizing sequential and parallel LINQ queries
- Visualizing chaining query methods
-
-
Partitioning and load balancing
- Range partitioning
- Chunk partitioning
- Hash partitioning
- Stripped partitioning
-
Implement custom partitioner
- Static partitioner
- Dynamic partitioner
-
-
Query settings
- Cancellation
- Degree of parallelism
- Execution mode
- Merge the values
-
Ordering
- Preserving the order
- Order and correctness
- Orderable partitioner
-
Aggregation
- Commutativity, associativity and correctness
- Partitioning and merging
-
- Sequential query vs. parallel query
- CPU bound operation vs. IO bound operation
- Factors to impact performance
-
-
- Entity Framework and Entity Framework Core
- SQL database
- Remote query vs. local query
- Function vs. expression tree
-
- Data types
-
Database
- Connection resiliency and execution retry strategy
- Tables
-
Relationships
- One-to-one
- One-to-many
- Many-to-many
- Inheritance
- Views
-
- Application side logging
- Database side tracing with Extended Events
-
-
Sequence queries
- Generation: DefaultIfEmpty
- Filtering (restriction): Where, OfType
- Mapping (projection): Select
- Grouping: GroupBy
-
Join
- Inner join: Join, SelectMany, GroupJoin, Select
- Outer join: GroupJoin, Select, SelectMany
- Cross join and self join: SelectMany, Join
- Concatenation: Concat
- Set: Distinct, Union, Intersect, Except
- Partitioning: Take, Skip
- Ordering: OrderBy, ThenBy, OrderByDescending, ThenByDescending
- Conversion: Cast, AsQueryable
-
Value queries
- Element: First, FirstOrDefault, Single, SingleOrDefault
- Aggregation: Count, LongCount, Min, Max, Sum, Average
- Quantifier: All, Any, Contains
-
-
Code to LINQ expression tree
- IQueryable<T> and IQueryProvider
- Standard remote queries
- Building LINQ to Entities abstract syntax tree
-
.NET expression tree to database expression tree
- Database query abstract syntax tree
- Compiling LINQ expressions to database expressions
- Compiling LINQ queries
- Compiling .NET API calls
- Remote API call vs. local API call
- Compile database functions and operators
-
Database expression tree to database query language
- SQL generator and SQL command
- Generating SQL from database expression tree
-
-
Deferred execution
- Iterator pattern
- Lazy evaluation vs. eager evaluation
- Explicit loading
- Eager loading
-
Lazy loading
- The N + 1 problem
- Disabling lazy loading
-
- Repository pattern and unit of work pattern
-
Tracking entities and changes
- Tracking entities
- Tracking entity changes and property changes
- Tracking relationship changes
- Enabling and disabling tracking
-
Change data
-
Transaction
- Transaction with connection resiliency and execution strategy
- EF Core transaction
- ADO.NET transaction
- Transaction scope
-
- Detecting concurrent conflicts
-
Resolving concurrent conflicts
- Retaining database values (database wins)
- Overwriting database values (client wins)
- Merging with database values
- Saving changes with concurrent conflict handling
-
-
-
Expression
- Bound variable vs. free variable
-
Reductions
- α-conversion (alpha-conversion)
- β-reduction (beta-reduction)
- η-conversion (eta-conversion)
- Normal order
- Applicative order
-
Function composition
-
- Church encoding
- Church Boolean
- Logical operators
- Conversion between Church Boolean and System.Boolean
- If
-
- Church numerals
- Increase and decrease
- Arithmetic operators
-
Predicate and relational operators
- Conversion between Church numeral and System.UInt32
-
-
Church pair (2-tuple)
- N-tuple
-
Signed numeral
-
-
Tuple as list node
-
Aggregation function as list node
- Model everything
-
- Combinator
-
SKI combinator calculus
- SKI compiler: compile lambda calculus expression to SKI calculus combinator
- Iota combinator calculus
-
- Normal order fixed point combinator (Y combinator) and recursion
- Applicative order fixed point combinator (Z combinator) and recursion
-
- Halting problem
- Equivalence problem
-
-
- Category and category laws
- DotNet category
-
- Monoid and monoid laws
- Monoid as category
-
-
Functor and functor laws
- Endofunctor
- Type constructor and higher-kinded type
-
LINQ to Functors
- Built-in IEnumerable<> functor
- Functor pattern of LINQ
- More LINQ to Functors
-
- Natural transformation and naturality
-
Functor Category
-
- Bifunctor
- Monoidal category
-
-
Monoidal functor
- IEnumeable<> monoidal functor
-
Applicative functor
- IEnumeable<> applicative functor
- Monoidal functor vs. applicative functor
- More Monoidal functors and applicative functors
-
- Monad
-
LINQ to Monads and monad laws
- Built-in IEnumerable<> monad
- Monad laws and Kleisli composition
- Kleisli category
- Monad pattern of LINQ
- Monad vs. monoidal/applicative functor
- More LINQ to Monads
-
- IO monad
- State monad
- Try monad
- Reader monad
- Writer monad
- Continuation monad


'Catastrophic' hail storm hits Australia with stones 'the size of cricket balls
A hailstorm in Australia yesterday is estimated to have cost £21 million of damage.
The ‘catastrophic’ storm saw hailstorms ‘the size of cricket balls’ pound the Sunshine Coast and Brisbane, leaving 20,000 homes without power.
Thousands of cars were left with smashed windscreens, while windows of people’s homes were also affected.
The Insurance Council of Australia declared the storm a catastrophe, saying they had received 5,000 claims in relation to it including from 3,000 vehicles.
One company alone was working on 200 cars wrecked in the storm.
Mike Clayton from Clayton’s Towing Service said: ‘It was just total mayhem out there. When it hit, it hit hard and the cars were just destroyed so it was all hands on deck to get them off the highway.’
Advertisement Advertisement
He told ABC: ‘Some of the windscreens and the windows – the holes went right through them.
‘The amount of damage on the southern end of the coast is amazing and the size of the hail is not something you would see very often that’s for sure.
‘A lot of people were really shaken up because of the size of the hail that came down while they were in the car and visibility was nothing. It’s thankful nothing really bad happened.’
The Bureau of Meteorology issued warnings for large and giant hail, saying there would also be ‘damaging winds’.
Advertisement Advertisement
Farmers were also affected, with fruit damaged as it grew on trees from the impact of the hail.
Nets set up to protect lychees were filled to the top and had to be cut down.
Lyndon Westbrook told the broadcaster that he returned home to find up to 15 windows of his home smashed.
Three of his cars were written off and glass was strewn around his garden.
He said: ‘Bit of a setback but that’s life hey.’
Got a story for Metro.co.uk?
Get in touch with our news team by emailing us at<EMAIL_ADDRESS>For more stories like this, check our news page.


Python Projects with Pants
Pants makes the manipulation and distribution of hermetically sealed Python environments painless. You can organize your code in the Pants way with targets for binaries, libraries, and tests. Pants builds Python code into PEXes. (A PEX is, roughly, an archive file containing a runnable Python environment.) Pants isn't the only PEX-generation tool out there; but if you have some "common code" used by more than one PEX, Pants makes it easy to manage the dependencies.
This page assumes that you've already read the Pants Tutorial.
Relevant Goals and Targets
Runnable Binary
Pants can generate PEXes, executables built from Python. Invoke the
binary
goal on apython_binary
target to generate a.pex
. You can also invoke therun
goal on apython_binary
to run its code "in place."
Importable Code
python_library
BUILD targets make Python code "import-able". The rule of thumb is that each directory of.py
files has aBUILD
file with apython_library
target. A Python target that has apython_library
in itsdependencies
can import its code.To use code that's not in your workspace, use a
python_requirement_library
and apython_requirement
to refer to the code. To use several several of these via apip
-stylerequirements.txt
file, use apython_requirements
. For details, see Python 3rdparty Pattern.
Tests
A
python_tests
BUILD target has somepytest
tests. It normally depends on apython_library
target so it can import and test the library's code. Use thetest
goal to run these tests.
Generated Code
A
python_thrift_library
generates Python code from.thrift
source; a Python target that has this target in itsdependencies
canimport
the generated Python code.
Configure the Python Version
Pants allows users to select their Python interpreter by configuring "interpreter constraints."
By default, pants uses ['CPython>=2.7,<3']
- notice how the requirements-style string specifies
an interpreter (e.g.: CPython
, PyPy
) and version constraint, and that a list of constraints
may be specified.
The most common approach is to configure interpreter constraints for your whole repo.
For example, to use python3 for the whole repo, update pants.ini
as follows:
[python-setup] interpreter_constraints: ["CPython>=3.5"]
If you require more granularity, the compatibility
parameter may be specified on
python_library targets
that require a particular interpreter. For example, a mixed python2/python3 repo may have library
targets that are only compatible with a given interpreter version.
python_binary targets
also have the compatibility
parameter, allowing users to build a PEX binary targeting a given
interpreter. For example, an environment with production machines running a mix of python2/python3
might have two python_binary
targets that build the same binary, but targeting different
interpreters.
To configure interpreter constraints for an individual Python target, update its build target:
python_binary( name='server-bin', dependencies = [ 'src/main/python/server', ], source='main.py', # No need to set compatibility if it matches the default interpreter constraints. #compatibility='CPython>=2.7,<3', ) python_binary( name='server-bin3', dependencies = [ 'src/main/python/server', ], source='main.py', # This target will always use python3, even if the default interpreter constraint is python2. compatibility='CPython>=3', )
For additional details, see ./pants python-setup --help-advanced
and read the
--python-setup-interpreter-constraints
docstring.
BUILD for a Simple Binary
The pantsbuild/pants repo has a simple "hello world" sample Python
binary. You can use binary
to build a PEX from it. You can then
run the PEX:
$ ./pants binary examples/src/python/example/hello/main ...much output... $ ./dist/main.pex # run the generated PEX Hello, world! $ ./dist/main.pex Whirled Hello, Whirled! $
You can also run the binary "from source" with the run
goal:
$ ./pants run.py --args='Whirled' examples/src/python/example/hello/main ...much output... 14:32:01 00:00 [py] 14:32:02 00:01 [run] Hello, Whirled! 14:32:02 00:01 [jvm] SUCCESS $
examples/src/python/example/hello/main/BUILD
defines a python_binary
target, a build-able thing that defines a runnable program made from
Python code:
python_binary( dependencies=[ 'examples/src/python/example/hello/greet:greet', ], source='main.py', ) # An "app" is a binary plus other loose files bundled together in # an archive (e.g.: tar.gz, zip). In this example, the archive includes # bothmain.pex
andBUILD
. python_app( name='hello-app', binary=':main', bundles=[ bundle(fileset=globs('BUILD')), ], )
This binary has a source file, main.py
, with its "main". A Python binary's "main" can be in a
depended-upon python_library
or in the python_binary
's source
. (Notice that's source
,
not sources
; a binary can have only one source file. If you want more, put them in a
python_library
and let the python_binary
depend on that.)
if name == 'main': greetees = sys.argv[1:] or ['world'] for greetee in greetees: print(greet(greetee))
This code imports code from another target. To make this work, the
binary target has a dependency examples/src/python/example/hello/greet
and the Python code can thus import things from example.hello.greet
.
You remember that libraries configure "importable" code;
example/hello/greet/BUILD
has a python_library
:
python_library( dependencies=[ '3rdparty/python:ansicolors', ], )
This python_library
pulls in greet.py
's Python code:
from colors import green def greet(greetee): """Given the name, return a greeting for a person of that name.""" return green('Hello, {}!'.format(greetee))
BUILD for Tests
To test the library's code, we set up
examples/tests/python/example_test/hello/greet/BUILD
with a python_tests
target. It depends on the library:
python_tests( dependencies=[ 'examples/src/python/example/hello/greet:greet', ':prep', ], ) # Prepare for the 'greet' test. Realistically, you wouldn't set up a # prep_command just to create an emtpy temp file. This is meant as a # simple example. prep_command(name='prep', prep_executable='touch', prep_args=['/tmp/prep_command_result'] )
Use test
to run the tests. This uses pytest
:
$ ./pants test examples/tests/python/example_test/hello/greet 13:29:28 00:00 [main] (To run a reporting server: ./pants server) 13:29:28 00:00 [bootstrap] 13:29:28 00:00 [setup] 13:29:28 00:00 [parse] ... 13:29:29 00:01 [test] 13:29:29 00:01 [pytest] 13:29:29 00:01 [run] ============== test session starts =============== platform linux2 -- Python 2.7.12, pytest-3.0.7, py-1.4.32, pluggy-0.4.0 rootdir: /home/jsirois, inifile: plugins: cov-2.4.0, timeout-1.2.0 collected 2 items .pants.d/pyprep/sources/48bd113ee4f5fa26f55357fbd9bb6d31382241fa/example_test/hello/greet/test_greet.py .. generated xml file: /home/jsirois/dev/pantsbuild/jsirois-pants2/.pants.d/test/pytest/examples.tests.python.example_test.hello.greet.greet/junitxml/TEST-examples.tests.python.example_test.hello.greet.greet.xml ============ 2 passed in 0.01 seconds ============ examples.tests.python.example_test.hello.greet.greet ..... SUCCESS 13:30:18 00:50 [junit] 13:30:18 00:50 [specs] SUCCESS $
Python Apps for Deployment
For deploying your Python apps, Pants can create archives (e.g.: tar.gz, zip) that contain an executable pex along with other files it needs at runtime (e.g.: config files, data sets). These archives can be extracted and run on production machines as part of your deployment process.
To create a Python app for deployment, define a python_app
target. Notice how the python_app
target combines an existing python_binary
with bundles
that describe the other files to
include in the archive.
python_binary( dependencies=[ 'examples/src/python/example/hello/greet:greet', ], source='main.py', ) # An "app" is a binary plus other loose files bundled together in # an archive (e.g.: tar.gz, zip). In this example, the archive includes # bothmain.pex
andBUILD
. python_app( name='hello-app', binary=':main', bundles=[ bundle(fileset=globs('BUILD')), ], )
Use ./pants bundle
to create the archive.
$ ./pants bundle examples/src/python/example/hello/main/:hello-app --bundle-py-archive=tgz <output omitted for brevity> 00:59:52 00:02 [bundle] 00:59:52 00:02 [py] created bundle copy dist/examples.src.python.example.hello.main.hello-app-bundle created archive copy dist/examples.src.python.example.hello.main.hello-app.tar.gz 00:59:53 00:03 [complete]
The archive contains an executable pex file, along with a loose file matched by the bundle glob.
$ tar -tzvf dist/examples.src.python.example.hello.main.hello-app.tar.gz drwxr-xr-x root/root 0 2018-05-02 02:16 ./ -rwxr-xr-x root/root<PHONE_NUMBER>-05-02 02:16 ./main.pex -rw-rw-r-- root/root 562 2018-05-01 13:34 ./BUILD
See bundle in the BUILD dictionary for additional details about defining the layout of files in your archive.
Debugging Tests
Pants scrubs the environment's PYTHONPATH
when running tests, to ensure a hermetic, repeatable test run.
However some Python debuggers require you to add the debugger's code to the PYTHONPATH
.
To do so, set the extra_pythonpath
option on the test.pytest
scope.
You can do so with the --test-pytest-extra-pythonpath
flag, but it may be more convenient to
set this permanently in your personal environment using the PANTS_TEST_PYTEST_EXTRA_PYTHONPATH
environment variable.
So, for example, to use PyCharm's interactive debugger:
- Find the pycharm-debug.egg in your PyCharm installation.
- Set the environment variable to point to it:
PANTS_TEST_PYTEST_EXTRA_PYTHONPATH=/path/to/pycharm-debug.egg
. - Start the debug server in PyCharm (this assumes you have previously set it up to listen on port 5000).
- Set a breakpoint in your code by adding this line where you wish to break:
import pydevd;pydevd.settrace('localhost', port=5000, stdoutToServer=True, stderrToServer=True)
- Run your
./pants test
command.
When your code hits the breakpoint, you'll enter an interactive debugging session in PyCharm!
Handling python_requirement
BUILD
files specify outside Python dependencies via
python_requirements
and a
requirements.txt
file and/or
python_requirement_library
targets wrapping
python_requirement
s.
Pants handles these dependencies for you. It never installs anything
globally. Instead, it builds the dependencies, caches them in .pants.d
,
and assembles them a la carte into an execution environment.
PEX Contents
To build a PEX, invoke ./pants binary
on a python_binary
target:
$ ./pants binary examples/src/python/example/hello/main ... SUCCESS $ ./dist/main.pex Hello, world!
Though the binary itself specifies just one dependency, the transitive closure of hello/main's dependencies pulled in hello/greet and, in turn, hello/greet's dependencies. Pants bundles up the closed set of all dependencies into into the PEX.
Interactive Console with repl
Goal
Use the repl
goal with a Python target to run an interactive
Python REPL session.
Within the session, you can import
the target's code and the code of its dependencies.
To drop into our example library target examples/src/python/example/hello/greet
with verbosity
turn on to see what's going on in the background:
$ ./pants -ldebug repl examples/src/python/example/hello/greet 15:11:41 00:00 [main] (To run a reporting server: ./pants server) ...lots of build output... 15:11:42 00:01 [repl] 15:11:42 00:01 [python-repl]Building chroot for [PythonLibrary(BuildFileAddress(/Users/lhosken/workspace/pants/examples/src/python/example/hello/greet/BUILD, greet))]: Dumping library: PythonLibrary(BuildFileAddress(/Users/lhosken/workspace/pants/examples/src/python/example/hello/greet/BUILD, greet)) Dumping requirement: ansicolors==1.0.2 Dumping distribution: .../ansicolors-1.0.2-py2-none-any.whl 15:11:42 00:01 [run] Python 2.7.5 (default, Mar 9 2014, 22:15:05) [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>>
Pants loads ansicolors
(greet
's 3rdparty dependency). It would have
fetched this dependency over the network if necessary. (It wasn't
necessary to download ansicolors
; Pants had already fetched it while
"bootstrapping" itself.)
To convince yourself that the environment contains greet
's dependencies, you can inspect
sys.path
and import libraries:
>>> from example.hello.greet.greet import greet >>> greet("escape codes") u'\x1b[32mHello, escape codes!\x1b[0m' >>> from colors import red >>> red("other escape codes") '\x1b[31mother escape codes\x1b[0m'
Dependencies built by Pants are never installed globally. These dependencies only exist for the duration of the Python interpreter forked by Pants.
python_binary
entry_point
An advanced feature of python_binary
targets, you may in addition
specify direct entry points into PEX files rather than a source file.
For example, if we wanted to build an a la carte fab wrapper for fabric:
python_binary(name = "fab", entry_point = "fabric.main:main", dependencies = [ "3rdparty/python:fabric", ] )
We build:
$ ./pants src/python/fabwrap:fab
...
Wrote /private/tmp/wickman-pants/dist/fab.pex
And now dist/fab.pex behaves like a standalone fab binary:
$ dist/fab.pex -h Usage: fab [options] <command>[:arg1,arg2=val2,host=foo,hosts='h1;h2',...] ... Options: -h, --help show this help message and exit -d NAME, --display=NAME print detailed info about command NAME -F FORMAT, --list-format=FORMAT formats --list, choices: short, normal, nested -l, --list print list of possible commands and exit --set=KEY=VALUE,... comma separated KEY=VALUE pairs to set Fab env vars --shortlist alias for -F short --list -V, --version show program's version number and exit -a, --no_agent don't use the running SSH agent -A, --forward-agent forward local agent to remote end --abort-on-prompts abort instead of prompting (for password, host, etc) ...
More About Python Tests
Pants runs Python tests with pytest
. You can pass CLI options to pytest
with
test.pytest --options
. For example, to only run tests whose names contain req
,
you could run:
$ ./pants test.pytest --options='-k foo' examples/tests/python/example_test/hello/greet ... ============== test session starts =============== platform linux2 -- Python 2.7.12, pytest-3.0.7, py-1.4.32, pluggy-0.4.0 rootdir: /home/jsirois, inifile: plugins: cov-2.4.0, timeout-1.2.0 collected 2 items generated xml file: /home/jsirois/dev/pantsbuild/jsirois-pants2/.pants.d/test/pytest/examples.tests.python.example_test.hello.greet.greet/junitxml/TEST-examples.tests.python.example_test.hello.greet.greet.xml =============== 2 tests deselected =============== ========== 2 deselected in 0.01 seconds ========== examples.tests.python.example_test.hello.greet.greet ..... SUCCESS 13:34:28 00:02 [junit] 13:34:28 00:02 [specs] SUCCESS
You can pass CLI options to pytest
via passthrough parameters if test.pytest
is the last goal
and task on your command line. E.g., to run only tests whose names contain req
via passthrough
parameters:
$ ./pants test.pytest examples/tests/python/example_test/hello/greet -- -k req ...lots of build output... 10:43:04 00:01 [test] 10:43:04 00:01 [run_prep_command] 10:43:04 00:01 [prep_command] 10:43:04 00:01 [pytest] 10:43:04 00:01 [run] ============== test session starts =============== platform linux2 -- Python 2.7.12, pytest-3.0.7, py-1.4.32, pluggy-0.4.0 rootdir: /home/jsirois, inifile: plugins: cov-2.4.0, timeout-1.2.0 collected 2 items .pants.d/pyprep/sources/48bd113ee4f5fa26f55357fbd9bb6d31382241fa/example_test/hello/greet/test_greet.py . generated xml file: /home/jsirois/dev/pantsbuild/jsirois-pants2/.pants.d/test/pytest/examples.tests.python.example_test.hello.greet.greet/junitxml/TEST-examples.tests.python.example_test.hello.greet.greet.xml =============== 1 tests deselected =============== ===== 1 passed, 1 deselected in 0.01 seconds ===== examples.tests.python.example_test.hello.greet.greet ..... SUCCESS 10:43:05 00:02 [junit] 10:43:05 00:02 [specs] SUCCESS
...and to "unsilence" py.test (not suppress stderr and stdout), pass -- -s
:
$ ./pants test.pytest examples/tests/python/example_test/hello/greet -- -s
...and to remind yourself of py.test's help:
$ ./pants test.pytest examples/tests/python/example_test/hello/greet -- -h
Code Coverage
To get code coverage data, set the --coverage
flag in test.pytest
scope.
The value of the flag is a comma-separated list of names of python packages or directories
containing code to measure coverage against. It can also take the special value auto
, which
will cause Pants to attempt to deduce what to measure coverage against.
This auto-deduction examines the coverage
attribute on each python_tests
target, which should be a list of packages. If a target has no coverage
attribute,
Pants uses the package containing the test code. This is of course only useful if the
code under test lives in the same package as the code that tests it.
If you do specify package or directory names with --coverage
, this overrides any coverage
attributes on python_tests
targets.
For example:
$ ./pants test.pytest --coverage=example.hello.greet,example.hello.main examples/tests/python/example_test/hello/greet ...lots of build output... ============ 2 passed in 0.22 seconds ============ Name Stmts Miss Branch BrMiss Cover ------------------------------------------------------------------------------------ examples/src/python/example/hello/greet/__init__ 0 0 0 0 100% examples/src/python/example/hello/greet/greet 4 0 0 0 100% ------------------------------------------------------------------------------------ TOTAL 4 0 0 0 100%
This measures coverage against all python code in example.hello.greet
and example.hello.main
.
Similarly, a list of directories can be specified (either absolute or relative to the build root):
$ ./pants test.pytest --coverage=example/hello examples/tests/python/example_test/hello/greet ...lots of build output... ============ 2 passed in 0.23 seconds ============ Name Stmts Miss Branch BrMiss Cover ------------------------------------------------------------------------------------ examples/src/python/example/hello/__init__ 0 0 0 0 100% examples/src/python/example/hello/greet/__init__ 0 0 0 0 100% examples/src/python/example/hello/greet/greet 4 0 0 0 100% ------------------------------------------------------------------------------------ TOTAL 4 0 0 0 100%
Interactive Debugging on Test Failure
You can invoke the Python debugger on a test failure by leaving out the
test
and passing --pdb
. This can be useful for inspecting the
state of objects especially if you are mocking interfaces.
Building a setup.py
Distutils Package
You can build Distutils packages from python_library
targets.
To make a python_library
"setup-able", give it a provides
parameter; this parameter's value
should be a setup_py
call; this call's parameters will be
passed to the setup
function.
python_library( name='test_infra', dependencies=[ 'tests/python/pants_test:base_test', ... ], provides=setup_py( name='pantsbuild.pants.testinfra', version='0.0.24', description='Test support for writing pants plugins.', long_description='''A much longer description of this package. Pages and pages!''', url='https://github.com/pantsbuild/pants', license='Apache License, Version 2.0', zip_safe=True, namespace_packages=['pants_test'], classifiers=[ 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', 'Operating System :: MacOS :: MacOS X', 'Operating System :: POSIX :: Linux', 'Programming Language :: Python', 'Topic :: Software Development :: Build Tools', 'Topic :: Software Development :: Testing', ] ) )
The setup-py
goal builds a package from such a target:
$ ./pants setup-py src/python/pants:test_infra 10:23:06 00:00 [main] (To run a reporting server: ./pants server) 10:23:07 00:01 [bootstrap] 10:23:07 00:01 [setup] 10:23:07 00:01 [parse] Executing tasks in goals: setup-py 10:23:07 00:01 [setup-py] 10:23:07 00:01 [setup-py] Running packager against /Users/you/workspace/pants/dist/pantsbuild.pants.testinfra-0.0.24 Writing /Users/you/workspace/pants/dist/pantsbuild.pants.testinfra-0.0.24.tar.gz SUCCESS
Manipulating PEX behavior with environment variables
You can alter a PEX file's behavior during invocation by setting some environment variables.
PEX_INTERPRETER=1
If you have a PEX file with a prescribed executable source or
entry_point
, you can still drop into an interpreter with the
environment bootstrapped. Set PEX_INTERPRETER=1
in your environment,
and the PEX bootstrapper skips any execution and instead launches an
interactive interpreter session.
PEX_VERBOSE=1
If your environment is failing to bootstrap or simply bootstrapping very
slowly, it can be useful to set PEX_VERBOSE=1
in your environment to
get debugging output printed to the console. Debugging output includes:
- Fetched dependencies
- Built dependencies
- Activated dependencies
- Packages scrubbed out of sys.path
- The sys.path used to launch the interpreter
PEX_MODULE=entry_point
If you have a PEX file without a prescribed entry point, or want to
change the entry_point
for a single invocation, you can set
PEX_MODULE=entry_point
using the same format as described in the
python_binary
Pants target.
This can be useful for bundling up some packages together and using that single file to execute scripts from each of them.
Another common pattern is to link pytest into your PEX file, and run
PEX_MODULE=pytest my_pex.pex tests/*.py
to run your test suite in its
isolated environment.
PEX_COVERAGE
There is nascent support for performing code coverage within PEX files
by setting PEX_COVERAGE=<suffix>
. By default the coverage files will
be written into the current working directory with the file pattern
.coverage.<suffix>
. This requires that the coverage Python module has
been linked into your PEX.
You can then combine the coverage files by running PEX_MODULE=coverage
my_pex.pex
.coverage.suffix*
and run a report using
PEX_MODULE=coverage
my_pex.pex
report. Since PEX files are just zip files, coverage is able
to understand and extract source and line numbers from them in order to
produce coverage reports.


This experience requires multiple devices, such as phone, tablet, laptop for a fuller, more orchestral experience. This should work across all platforms but we’ve found the best browsers to be Chrome and Firefox. If you are asked for your address, we will use this to then send you a postcard of a limited edition print, but only if you want one. Shake, click or touch your screen the experience will move with you. Move your smaller device to a dark place. Close your eyes and listen, open your eyes and watch. Move your devices next to each other. Open multiple tabs in a browser and stay with this experience for as long as you’d like.


Catherine Zeta Jones shares anniversary note from father-in-law Kirk Douglas
The actress married Michael Douglas in 2000.
Catherine Zeta Jones has shared a card sent to her by father-in-law Kirk Douglas on her wedding anniversary.
The actress and her husband Michael Douglas are celebrating their 19th anniversary.
Zeta Jones shared a photo on Instagram of her letter from Douglas Snr, who is 102.
It said: “Dear Michael and Catherine, Happy anniversary!
“Michael, you have learned a very important lesson, to stay married you must obey your wife!
“Keep practicing what I do with my wife.”
Zeta Jones, 50, also shared an old photo of her and Michael on the dancefloor.
She wrote: “Dancing in to our 20th year!
“Happy Anniversary my love. Such a beautiful letter from my father in law. I am touched.”

The star couple tied the knot at the Plaza in New York in 2000.
Zeta Jones and Douglas are parents to son Dylan and daughter Carys.


Home
API
Articles
GitHub
Documentation
Page not found 😱
Please try
going back
or try one of the links above.


?6
7
8
9
10~
XT
The
New
York
copyright
reserved
botanical
Garden
Erythrina
velutina
Willd.
Det.
by
B.A.Krukoff»!988-
New
York
Botanical
Garden
L.
J.
K.
Brace,
Collector
April
16-May
8,1905
GREAT
BAHAMA
£vU/
ō^dujJŚM^
h
',+y
IV-
THE
NEW
YORK
BOTANICAL
GARDEN
EXPLORATION
OF
THE
BAHAMAS
1619099
Legend -
Level of confidence that token is an accurately-transcribed word
extremely low
very low
low
undetermined
medium
high
very high


Slow Dive is a small eco-friendly company that organize diving trip, dive courses and sea excursions.
Why diving with us? Because, as experienced instructors, we want to offer an alternative to bigger dive centers, to offer a dedicated quality service, more personnal, in small groups, and we like to take our time to teach you diving or to show you the best creatures that you can see in the Caribbean Sea. Because we like and know nature, and we can teach you how to dive in a sustainable way.
Check also our Slow Adventures trips and Casa Chihuahua B&B accommodation :


Welcome to Hacky Snake!
Created by Aashish Dugar
(not an original idea ofcourse. Every 90s kid knows that.)
SCORE
HIGH-SCORE


FRC Teams App
Please sign in or Register
Email address
Password
Remember me
Sign in
Register
© A-Team Robotics 2019