Biographical Sketch of Aaron
McCurdy
This sketch is quoted from
Historical Genealogy of the McCurdy Family compiled by Elmer Delwood Ellsworth
McCurdy, published by W. D. McCurdy.
(Elmer published a small 70 page booklet of the history of the McCurdy family
about 1909. William McCurdy gathered additional data, made changes, and
published this book about 1917.)
Aaron McCurdy, the youngest son of John and Mary (McGill),
was born in Monongahela County, WVA on May 3, 1820. He attended the district
school in its session and received a very fair education. In 1840, he went to
Monroe County, Ohio, where he worked on a farm for his brother-in-law, Isaac
Eddy, and remained there until he married. In 1842, he married Rebecca Kinkade,
the daughter of David Kinkade of Monroe County. To this union, twelve children
were born.
In 1850, Mr. McCurdy moved his family to Wirt County, WVA
and there located. In 1852, he bought fifty acres of land near the present town
of Burning Springs, and having cleared a few acres, moved thereon.
The first year of
the Civil War, 1861, there was in that section of the
state lawless bands of un-uniformed
soldiers with pronounced sympathy for the Confederacy; they were called
Bushrangers. In the latter part of 1861, a band of these Bushrangers attacked
Mr. McCurdy's home. He being absent at the time, his wife and children were
turned outdoors and the Bushrangers looted the place. They left a warning for
Mr. McCurdy to leave the country upon pain of death.
Shortly after,
another band attacked the house; again he was absent, but they did not molest
his family. Searching the house, they quietly left, leaving the same warning.
Some days later, taking his family in a canoe down the Little Kanawha River, he
took them to safety in Parkersburg, where he left them and returned to his home
only to find it in ashes.
Being now without
any resources whatsoever except a cow and a spinning wheel, the latter not
being in the house when burned, he took his family to Washington County, Ohio
where he located. After the war, he sold his land in Wirt County to John
Rainbone for $100 and a few years after, this tract became very valuable, as
oil was discovered there and Burning Springs sprang into existence. Soon after
the oil was discovered; a large tank was placed on the ground and into this oil
was turned. The oil in this tank ignited and exploded. The oil leaped to the
river, carrying sheets of flames for many miles down the river. From that time,
the village took the name of
Burning Spring.
In 1862, Mr.
McCurdy enlisted in the Union Army at Marietta, Ohio, but three months later
was discharged with 14 other men as being unable for active service. In 1865,
he removed to Marietta, Ohio, where he followed gardening until within a few
years of his death, Dec. 25, 1889.
His life was one of
peace and quietness; he was a very industrious man, a trustworthy neighbor, a
kind husband and father. He was very attentive to his family and his home
affairs, was temperate in his habits, never indulging in strong drinks,
strictly attended to his own business and was respected by all who knew him. He
was unpretentious; what he promised he performed. His financial means were
small but it was enough to care for his family.
LOST IN THE WILDERNESS--An
incident in the life of Aaron McCurdy.
When Mr. McCurdy lived in Wirt County, deer were quite
numerous in that and adjoining counties, and one day while hunting, he struck a
trail, followed it for several miles through the wilderness, when there
appeared indications of a heavy snow storm. Just then he saw a large buck which
sighted him and took flight but he pursued him. Before he realized the fact,
the snow was falling fast, so he abandoned the search, and tried to retrace his
steps but the blinding snow filled his tracks and he became lost in the
wilderness and sought shelter under an overhanging rock, and there he remained
until late that afternoon.
There being no lull in the storm, he again tried to find
his way out of the wilderness. He finally entered a ravine, which he followed a
short distance and came to a large rock under which appeared a cavern-like entrance.
Realizing he could not proceed much further that day, he entered and found it
led but a few feet. The ground being dry and covered with leaves, he gathered
some brush and such dry wood as he could find, started a fire near the opening,
and after consigning himself to God, sought rest in sleep.
Next morning, when he awoke, the storm had ceased, but the
sky was cloudy and he was at a loss to know which course to pursue, but went down
the ravine and finally came to a small creek which he followed, thinking it
might lead to some settlement. He traveled along this creek until toward
evening, then left it and ascended a high elevation of land expecting to
discover some settlement. Reaching the top he could see for miles over the
wilderness, but no signs of any habitation could he discover.
Descending the opposite side of the hill, he came to
another creek and traveled toward its source. Once, while crossing the creek,
his foot slipped and he fell into the water. At the same instant, the stopper
fell from his powder horn, which soon filled with water, destroying its contents. Recovering his gun, which also filled with
water, which dampened the powder therein and made it useless. He crossed to the
opposite bank and continued up the creek. As night approached, he heard
gunshots, but he couldn't locate from whence the sounds came. Changing his
course, he was surprised to find he had returned to the rock he had left that
morning.
There again he spent the night, but not as comfortable, his
powder being wet, tired with the days travel and hungry he laid again on his
bed of leaves and soon fell asleep. He did not awake until the sun was well up
in the heavens; when he attempted to rise, he discovered his feet were frozen
and perfectly numb. Working with them for some time, pounding, rubbing and
twisting them to restore circulation, he was at last able to stand. Again leaving
his dreary cave, as he termed it, he started once more to find his way home.
Traveling due west he came to a small stream into which he entered. The water
soothed his feet but he could not proceed far at a time. The day was clear and
late in the afternoon, he ascended a high knoll to locate himself.
Standing against a tree, he saw horsemen riding in his
direction; calling with all his might he was heard and the man rode up to him
and fired his gun. Soon other gunshots were heard and the truth soon flashed upon
Mr. McCurdy that these were the signals of his discovery. When the man, whose
name was Lemen, dismounted, Mr. McCurdy took a step toward him and fell. His
feet had frozen again. The man raised him, and place him in the saddle on the
horse. He then stated that about forty men were in search of him. He said that
the day before no trail or clue of his whereabouts could be discovered although
they had searched from daylight until dark. He also said when the search began
that morning no guns were to be fired upon any occasion unless he was found,
then when the first shot was fired, those within hearing were to fire and let
those at a distance know he had been found. When he was found, he was about ten
miles from home.
A few hours later, he arrived at his home and found his
wife nearly frantic with grief. For three weeks, his feet were in horrible
condition and were wrapped continuously in cotton but he could not stand on his
feet for two months.
That
country now has been cleared and once great wilderness has disappeared and its
stead are found farms and villages; but the rock under which Mr. McCurdy past
the two nights is known to this day as McCurdy's Rock.
In politics, he was a Whig, casting his 1st vote for Henry
Clay in 1844. After that party was abolished, he became a Republican and
remained with that party until his death.
In religion, he was a Methodist, having joined that
denomination when but 18 years of age. A few years later he became a local
preacher and preached for many years. Before his death, he prayed that the end
would come to him while asleep, and upon retiring each night would bid his
family goodbye expecting to awake in heaven. On Christmas morning, he was found
dead in bed. His wish was gratified; death had come peacefully.
His wife (Rebecca Kinkade)
died April 20, 1879 at the age of 54 years, a faithful and industrious wife, a
loving mother, sincere Christian; faithful in the saving power of Christ, she
departed to join six children who had preceded her across the dark river to that
golden shore whence none returns.
Provided by Betty Latta Kitchen
-- e-mail: Betty Kitchen
Click here for the Short-Cut Table of Contents


MY PLANTS
Information:
Full sun. Weekly to twice weekly watering in summer and weekly watering in winter. Prefers alkaline soils, use slow release fertilizer each spring. Good in sub-tropical areas. Good for intermidiates.


The Microsoft Teams Platform is a powerful, flexible platform for creating apps for Microsoft Teams. That doesn't mean it will fit all scenarios. In this unit, we discuss some key scenarios where Teams apps excel.
Teams apps shine when they're focused on enhancing collaboration and communication. Most successful Teams apps involve either some form of pulling information in from another system, having a conversation about it, and allowing users to take action about that information from directly within the Teams client, or pushing information to a targeted audience based on an event or action in an external system.
Apps that focus on encouraging social interactions between team members work also work well. These are apps that send polls, let people send feedback to each other, connect them together, or are just for fun (don't underestimate the power of a few "just for fun" apps can have on team morale). Teams is a social platform; custom social-focused apps encourage your team to extend your company culture into your collaboration space.
Teams can be an effective platform for launching, and helping the completion of, common business processes. Things like creating and sharing a sales call report, tracking your time against a project, reserving common resources, submitting help desk requests and more can make for effective Teams apps. Often there is already some other system responsible for completing these actions. In those cases, using Teams as a bridge to start the process, and for communicating during the process can create an effective hybrid app.
If you've got an existing web app, SharePoint site (or SPFx extension), PowerApp, or other web-based application it may make sense to enable some or all of it in Teams. Just be sure to consider the context and scope carefully. If you enable your navigation and form heavy website as a channel tab, it probably won't work well.
One-to-one conversational bots are one of the more open-ended extensibility points within Microsoft Teams. The conversation is just between the bot and your user, you have the flexibility of including task modules to simplify the collection of complex sets of information, and you can combine them with personally scoped tabs. With this canvas, you can create a complete traditional app experience within the Teams client.
If there's already a good way to accomplish the task your potential Teams app is trying to perform, and/or your users are already used to accomplishing it with an existing system, converting the experience to within the Microsoft Teams client may be difficult. Instead you should look for ways to make the existing application and Microsoft Teams work together. It might make sense to send notifications to users or channels, or start workflows from within Teams, but complete the workflow in another app.
In general, apps built for Microsoft Teams fit seamlessly into the Teams client. This is good for your users, typically they don't think about the thing that they're using as an "app"; they just select a button, search for a thing, and the correct card shows up in a conversation. However, this means that in most cases your app isn't featured in any particular context. If your app is only designed to be used rarely, it can be easy for users to forget its there. Most successful apps stay top-of-mind for users through regular use.


|
Command patern for calling servicesThis function is like the ActionController of Ruby on Rails， the function handles incoming requests from the user's browser and routes them to the correct method of a service class , not a controller class such as Struts's DispatchAction.how to implements? three steps: First step: configure your struts-config.xml:
com.jdon.strutsutil.ForwardAction is the a class of jdon framework, xxxxx is your browser url parameter. Second Step: tell jdon framework:you will call which service(the name of the JavaBeans) :
Last Step: code your service interface:
|
|


coins.flow
Class FlowAdapter
java.lang.Object
coins.flow.FlowAdapter
- public class FlowAdapter
- extends java.lang.Object
FlowAdapter contains methods to expand the flow analysis capability.
A subclass of this may be added to afford new analysis requirements or
new methods commonly used in several cases may be added to this class
without disturbing other classes.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
flowRoot
public final FlowRoot flowRoot
ioRoot
protected IoRoot ioRoot
fSubpFlow
protected SubpFlow fSubpFlow
fResults
protected FlowResults fResults
dummyUninitialization
public final HIR dummyUninitialization
dummySettingByParam
public final HIR dummySettingByParam
fDominatorTree
TreeStructure fDominatorTree
fPostDominatorTree
TreeStructure fPostDominatorTree
fDominatorListsOfSubp
java.util.List[] fDominatorListsOfSubp
fPostDominatorListsOfSubp
java.util.List[] fPostDominatorListsOfSubp
FlowAdapter
public FlowAdapter(FlowRoot pFlowRoot)
getDominators
public java.util.List getDominators(BBlock pBBlock)
getPostDominators
public java.util.List getPostDominators(BBlock pBBlock)
makeDominatorTreeFor
public TreeStructure makeDominatorTreeFor(java.util.List pBBlocks,
BBlock pEntry,
boolean pIsDom)
- Makes a (post)dominator tree for the given list of BBlocks.
pEntry will be the root of the tree. The list of BBlockspBBlocks
should be connected and every BBlock should be reachable from
(should reach) pBBlock.
This method is a modified version of makeDominatorTreeFor
in coins.aflow.MakeDominatorTree.
- Parameters:
pIsDom
- if true, find dominator tree,
otherwise, find postdominator tree.
- Returns:
- the resultant coins.flow.util.TreeStructure object.
prepareDominators
protected boolean prepareDominators()
preparePostDominators
protected boolean preparePostDominators()
setFlowResults
public void setFlowResults(FlowResults pResults)
getFlowResults
public FlowResults getFlowResults()


Unwebbable
by Joe Clark
- Published in: HTML and XHTML |
It’s time we came to grips with the fact that not every “document” can be a “web page.” Some forms of writing just cannot be expressed in HTML—or they need to be bent and distorted to do so. But for once, XML might actually help.
The creation myth of the web tells us that Tim Berners-Lee invented HTML as a means of publishing physics research papers. True? It doesn’t matter; it’s a founding legend of the web whose legacy continues to this day. You can gin up as many web applications as you want, but the web is mostly still a place to publish documents.
The web is replete with projects to “digitize legacy content”—patent applications, books, photographs, everything. While photographs might survive well as JPEGs or TIFFs (disregarding accessibility issues for a moment), the bulk of this legacy content requires semantic markup for computers to understand it. A sheet of paper provides complete authorial freedom, but that freedom can translate poorly to the coarse semantics of HTML. The digitization craze—that’s what it is—crashes headlong into HTML semantics.
Some documents cannot be published using HTML. In many cases, we shouldn’t even bother trying. In other cases, we have to radically change the appearance and structure of the document. Ideally, we’ll start using custom XML document types—which, finally and at long last, might actually work.
The screenplay problem
An example of the conundrum of transferring print documents to the web, one that has become legendary in some circles, is the film screenplay.
A lot of people want to write a screenplay. The outcomes for most of these writers are the same: Nobody films and releases their movie. And they all go through the same phase—learning the generations-old “style” of screenplay formatting.
Typewritten screenplay from Die Hard 2.
Originating in the typewriter age, screenplay layouts are custom-engineered so that one printed page (in what we now call U.S. letter size) equals almost exactly one minute of onscreen time. Since most commercial movies run about two hours in length, typical Hollywood movie scripts are 118 to 122 pages long.
Typography is lousy; old typewriter fonts of yesteryear were errantly mapped onto today’s spindly Courier type. But as an example of document engineering, scripts are brilliant.
- There’s an entire science involved in text indention. Text is rarely, if ever, “centered”; everything lines up at a tab stop, a concept that CSS expunges from the collective memory. (You could set left margins using the
ch
unit in CSS3, but nobody does.) - With careful alignments like these, it’s easy to scan down a screenplay page.
And now people want to transfer the format—intact—to the web. It’s not going to work.
- Web “pages” may be called that, but the term is metaphorical. It has nothing to do with sheets of paper that equate to screen time. (Right away that means a shooting script’s many headers and footers would disappear, since we’re dealing with only one “page.”)
- Nobody seriously intends screenplays on the web to have the same function they do in real life—getting read, getting optioned or bought, and getting shot. All of that happens on paper, not on Firefox.
- HTML (per se) is not extensible. Extensible HTML (XHTML) has really not been extended. Hence the following truism is not going to change: HTML does not have enough tags for the semantics of screenplays, where nearly everything needs its own tag.
- Dialogue seems to be no problem, but dialogue is intermingled with screen and actor instructions, and in HTML both of those would just be placed in paragraph elements—even though the function, and expected appearance, differ drastically.
- What about the myriad headings, including the names of people speaking and notations for the time of day and the manner of speech (often called slugs or sluglines)? We have “a lot” of heading tags in HTML—six of them—but they are arranged hierarchically, not according to function. Would class names really suffice here—that is,
H2 class="slugline"
versusH2 class="charactername"
? Really, the answer is no. Script headings and HTML headings are two different things.
- The real movie industry doesn’t need HTML in the first place; it already has viable electronic exchange formats for scripts.
- One is the proprietary format of Final Draft, the software that dominates the screenplay market the way MS Word dominates in offices. Open-source fanatics may look at this as one more delicious chance to inveigh against a proprietary format, but screenwriters have better things to worry about than open source. Anyway, Final Draft 8’s default document format is now XML.
- The other is PDF. The movie business doesn’t have to care about accessibility, so even PDFs to which no accessibility features have been added suffice for script exchange. You don’t need tagged PDF, which also doesn’t have enough semantics for screenplays. (You could, in theory, write your own PDF tags, since they’re just XML.)
The quest to adapt scripts to the web recalls other “category errors,” to use Martin Amis’s phrase. Electronic commerce, we eventually figured out, does not take the form of “shopping malls” you “walk” through. “Magazines” and “catalogues” do not have discrete pages you flip (complete with sound effects) and dog-ear.
Tellingly, this quest recalls early television, which, conventional wisdom holds, behaved more like filmed stageplays. Bringing scripts to the web is noticeably worse than filming a stageplay.
Now, people have tried to make web pages look exactly like typewritten screenplays. The star of this show is screenwriter and inveterate blogger John August. Scrippets, August’s plug-in for WordPress, Blogger, and other systems, does everything it can to spin straw into gold. Among other things, one of August’s use cases is perfect “screenplay” formatting when viewed in an RSS reader, and the only way to make that happen is through presentational HTML and inline styles. These are, of course, outmoded development methods.
August pitches his project thus (emphasis added): “With Scrippets, you can add boxes of nicely-formatted script to your blog.” That’s actually a restatement of the problem—failed reliance on a page metaphor, failed efforts to duplicate typewriter typography, and failed attempts to replicate one-page-per-minute layout. Script formatting is “nice” for print, but it’s wrong for the web—even for “little boxes” of script content.
Worse, Scrippets ignores whatever small contribution HTML semantics can offer in marking up a screenplay. Pretty much everything gets marked up as paragraphs, but not everything is a paragraph. This is a worse sin than loading up H2
s with class names in an uphill battle to notate screenplay semantics.
The screenplay solution
The way to adapt scripts for the web is through cosmetic surgery. And we have a precedent for it. There’s a healthy market for screenplays published in book form. In fact, “the shooting script” is an actual U.S. trademark (from Newmarket Press) for one series of book versions of movie screenplays.
- Some books just reprint typewritten screenplays at reduced size. This may make you feel like a pro, but what you should feel is cheated: You’re paying good money to read an author’s typewritten manuscript. Spindly Courier looks even worse in reduced size.
- Other books completely redesign typewritten screenplays into a design native to book publishing. In a typical layout, speaker names are run inline with dialogue, normal book margins are used, and there’s a huge compaction of vertical whitespace. Typewritten screenplays read quite well in their intended context—but so do screenplay books in their context. (Retypeset scripts have also been used as language-learning aids.)
Hence to adapt this existing printed form to the web, you have to abandon all hope of duplicating original typescript formatting. You have to design something native to the web, with its relatively weak semantics and pageless or single-page architecture.
- You could use HTML definition lists to mark up dialogue—explicitly permitted in (W3C-brand) HTML, explicitly banned by Ian Hickson under HTML5. (There, use
DIALOG
instead, even though the descendants of that tag,DT
andDD
, are the same descendantsDL
has.) - You can use
PRE
to fake indention and line breaks (but you can’t fake the division of a script into pages). - You can disregard text indention and just use
CENTER
ed text. - You could, without too much of a stretch, mark up a script as a table.
- You could just not bother too much with semantics, run character names (in bold or
STRONG
) inline with dialogue, and use HTML headings where feasible.
Other print formats that need transformation
- Mastheads: The list of who does what at a magazine or newspaper is actually semantically complex, because each person’s title or the department they work in seems to be a heading. But a masthead marked up with
H1
throughH6
essentially pollutes the tag stream of the surrounding web page. - Callouts and sidebars: These structures, familiar from magazines, newspapers, and nonfiction books, cause serious confusion in creating a functioning document tree. (At what exact point in the tag stream are you expected to read the callout or sidebar?)
- Footnotes: There isn’t a structure for footnotes in HTML (though there is in tagged PDF). Developers have tried all sorts of hacks, including JavaScript show/hide widgets and various rats’ nests of links and reverse links. For literature fans, HTML’s lack of footnotes makes the work of the late David Foster Wallace functionally impossible to render on the web (especially his footnotes within footnotes).
- Charticles: With origins commonly attributed to Spy, a charticle is an illustrated featurette with a lot more accompanying text than what a bare illustration has. By way of comparison, a Flickr photo festooned with notes is functionally identical to a charticle, but HTML has no semantics for it.
- Math and science: Yes, that old chestnut. Before you exclaim “MathML!” the way a pensioner might yell out “Bingo!,” understand that barely anybody uses MathML on real web pages due to serious authoring difficulty—physicist Jacques Distler remains among the very few who do.
How do we solve the problem?
Armed with this knowledge, what are we going to do? Prediction: nothing. People will continue to fake the appearance of scripts and use John August–caliber presentational code. But we do have an alternative.
The case typified by screenplays is merely a new variation of the difficulty of encoding literature in XML. People have tried it time and time again over the years, but barely any DTD has gotten traction. People just want to mark up everything in HTML (which has staying power). Ill-trained authors mark up everything as a paragraph or a DIV
.
People seem to have taken the catchphrase “HTML is the lingua franca of the web” a bit too literally. HTML derives from SGML; XHTML is XML in a new pair of shoes. That’s four kinds of markup right there, but everybody acts as though there is only one kind, HTML. (Most of the time, browsers act like XTHML is HTML with trailing slashes.) Even electronic books are marked up as HTML, as the ePub file format is essentially XHTML 1.1 inside a container file—but that makes ePub files simultaneously HTML and XML. If we can spit those out, why can’t we spit out other kinds of XML?
We are well past the stage where browsers could not be expected to display valid, well-formed XML. Browsers can now do exactly that. Variant literary document types could actually work now. But because they languished on the vine for so long, now it seems nobody wants to make them work. After all, isn’t our new future wrapped up in HTML5? Just as our old future was wrapped up in XHTML2?
Conclusion
The web is, of course, a wondrous thing, but its underlying language lacks the vocabulary to express even the things that humans have already expressed elsewhere. We ought to accept that some documents have to be reformatted for the web, at least if the goal is using plain HTML. To give web documents the rich semantics of print documents, XML is finally a viable option.
- Illustration by Kevin Cornell
Learn More
Related Topics: HTML and XHTML
Discuss
Was it good for you, too? Join the discussion »


Estimating COVID-19's $R_t$ in Real-Time for the Netherlands
The effective reproduction number $R_t$ is a way to quantify how quickly a virus spreads and measures the number of people infected by one contagious person. In this post, I model the Dutch daily case count with a simple Bayesian model proposed by Systrom et al. [1] that allows us to estimate the $ R_t $ in real-time.
The daily updated graph below displays the real-time estimate of the $R_t$ in the Netherlands which is obtained by modelling the daily national case count data gathered by De Bruin [2].
The estimation of $R_t$ is based on the smoothed daily case count. As suggest by Systrom et al. [1], a gaussian filter is applied to the daily case count time-series. This reduces the noise of the stochastic nature of case counts, caused by late reporting or corrections. A window size of 7 days is arbitrarily chosen to smooth this stochastic process. This gives late-stage reporting, back-logs and corrections a week to catch up. The real-world infections are much less stochastic than the process of reporting, making smoothing necessary. The smoothing applied to the daily case count displayed in the figure below.
Later on, Systrom et al.’s [1] developed a more complex Bayesian model that uses the positive test rate and MCMC sampling to estimate $R_t$, as seen on rt.live. The positive test rate is a more useful measure because the number of raw positive tests is influenced by how many people are tested. The more you test, the more positive cases you will find. Therefore making test positive rate more informative.
Furthermore, this simple model does not take into account the onset distribution or the incubation period of the virus. More plainly stated this is the distribution of the delay between infection and confirmed positive test. The more complex Bayesian model does take this into account.
Ideally, I would like to use this more complex model. However, the Rijksinstituut voor Volksgezondheid en Milieu (RIVM) and the Gemeentelijke gezondheidsdiensten (GGD’s) only publish the positive test rate weekly. If these organizations decided to publish the daily positive test rate, I consider implementing the more complex model.
Code can be found on GitHub.
References
[1] K. Systrom, T. Vladek, and M. Krieger, “Project Title,” GitHub repository. GitHub, 2020 [Online]. Available at: https://github.com/rtcovidlive/covid-model
[2] J. De Bruin, “Novel Coronavirus (COVID-19) Cases in The Netherlands.” Zenodo, Oct-2020 [Online]. Available at: https://doi.org/10.5281/zenodo.4068121


| GET |
/stocks[id | symbol | name | market | currency | country | status] |
Searchs stock for the match of the query parameter passed, the query parameters are optional |
/stocks?id=1¤cy=USD |
-- |
| GET |
/stocks/{search} |
Searches stocks for 'search' text that matches the columns id, symbol, name, market, currency, country, status |
/stocks/as |
-- |
| POST |
/stocks |
Creates a new record will return the new record or empty. Returns a validation error if there is one. The id, created, and updated are always ignored. |
/stocks |
{
"symbol": "test",
"name": "Test Inc.",
"market": "NMS",
"currency": "USD",
"country": "USA",
"status": "active",
} |
| PUT |
/stocks/{id} |
Updates a record by id. Returns a validation error if there is one. Note will not update created and updated columns even if passed. |
/stocks/1 |
{
"symbol": "test aapl",
"name": "Test Apple Inc.",
"market": "NMS",
"currency": "USD",
"country": "USA",
"status": "active",
} |
| DELETE |
/stocks/{id} |
Deletes a record by id. Will return the stock if it was deleted otherwise returns no record. |
/stocks/1 |
-- |


Dashboard Overview¶
The K10 dashboard is broken up into a number of different sections. While we will return to performing actions on these later, you can find a brief but useful description of the sections below.
System Overview¶
The first thing you see on the screen is a list of stateful applications (currently mapped to namespaces) and their associated workloads (stateful sets and deployments).
After filtering to only include objects that have stateful services (defined as containing a persistent volume), the above screen breaks down each section into three categories:
- Unmanaged: There are no protection policies that cover this object
- Non-compliant: A policy applies to this object but the actions associated with the policy are failing (e.g., due to underlying storage slowness, configuration problems, etc.) or the actions haven't been every invoked yet (e.g., right after policy creation)
- Compliant: Objects that both policies apply to and the policy SLAs are being respected
It is also easy to see system-wide compliance by looking at the bar just above this view.
Namespaces, Applications, and Workloads¶
The current version of the K10 platform assumes that applications and namespaces have a 1:1 correspondence but that is not a requirement. As one will see later, policies can be defined to only operate on a subset of the applications residing in a namespace. Assuming you have already installed applications, clicking on the namespace card on the dashboard will take you to the following view:
A namespace or application in turn is made up of multiple workloads including deployments and stateful sets. In the above diagram, we see the GitLab application composed of three workloads and a MongoDB application consisting of just one. By further clicking on the Namespace/Application, you will see the stateful workloads it is composed of including labels and individual workload protection status:
Finally, if you would like to view the volumes used by a workload,
just click on the pulldown associated with each workload and select
Workload Details.
Policies¶
Going back to the main dashboard, you will find a section on how to manage policies right under the overview section. Within K10, policies are used to automate your data management workflows. To achieve this, they combine actions you want to take (e.g., snapshot), a frequency or schedule for how often you want to take that action, and a label-based selection criteria for the resources you want to manage.
If you click on Manage Policies
, you will notice in the below
screenshot that we currently do not create default policies at install
time. As a part of bringing the system into a compliant state, you
will later create new policies.
Activity¶
Below the policy management section of the dashboard, you will find activity data. This consists of a graph that shows all activity in the system. As there are no default policy-driven actions defined in the system, you will see no activity after first install but, once policies are defined, the graph will start displaying activity. Mousing over the graph will display job information such as status, job duration, job start time, and job completion time.
Some of the same activity information can also be viewed in tabular form under the graph. In particular, the dashboard first displays a summary of activity in the system including total jobs, average job duration, number of data artifacts, the size of those artifacts, etc.
Following the activity and artifact summary, the first column displays information on recent jobs. This includes the policy that generated the job, the job phases, and the start and completion times. You can also filtered the displayed jobs by the originating policy, failed jobs, and completed jobs.
The second column shows recent artifacts created by the system with additional information on the policy and job that generated the artifacts along with the artifact creation time and, optionally, deletion time.


Note
Currently, the English development is currently taking place with a different html document than the one referred to here.
There are 5 different possible translations tasks into a different (human) language. Before you start on any translation, you should get in touch with me to ensure that your work is not being duplicated.
1. Use the current English (or French) version of the website but enhanced by having available robot commands in language X.
For example, if you go to http://reeborg.ca/world.html, you can type and run the following program:
from reeborg_fr import *
move()
avance() # French equivalent
For this level of tranlsation, all that is needed is a reeborg_xx.py file, where xx is the standard two-letter code for a given language.
Before starting this work, you might want to see if Reeborg’s World (i.e. Brython) support the character set used by your language: Brython’s unicode support is not as complete as that of the standard Python distribution, nor as complete as Javascript itself. One way to verify, is to define a function into your own language. For example, I chose not to use accented letters in French when writing instructions. However, Brython would allow me to do the following:
def tourne_à_droite(): # notice the accent on à
for i in range(3):
tourne_a_gauche()
If you go to https://github.com/aroberge/reeborg/tree/master/src/libraries/brython/Lib/site-packages you will see three such language files (one for English, one for French, and the third, incomplete and most likely buggy one for Spanish). You can use either the English or the French one as a model.
2. Translate the English messages provided by Reeborg. There are two examples of such files (translation_en.js and translation_fr.js) located here at https://github.com/aroberge/reeborg/tree/master/src/lang.
3. Do the equivalent to 1 above, but for Javascript instead of Python; these files (reeborg_en.js and reeborg_fr.js) are also located in https://github.com/aroberge/reeborg/tree/master/src/lang.
4. Have a special world page with interface in a different language. These are html files located in https://github.com/aroberge/reeborg The English version is world.html and the French version is monde.html
5. Translate the current documentation.
6. Create a new default world menu and possibly translate/adapt the existing worlds.


This picture was taken in fall 2012 after my dad and I rebuilt the bottom section of the deck (right side of the picture). We also did some work to replace the worst boards on the top section and level it out where it was being pushed up by the roots of the gigantic cottonwood tree. In 2016 we noticed the roots of the cottonwood tree were also pushing on the foundation of the house and that the decking on the top section had further deteriorated. Several of the posts on the perimeter of the deck had also rotted away. After 25+ years of service it was time to deconstruct it and replace it.
Mom acquired several quotes for the removal of the cottonwood tree and it was performed in the summer of 2016. Sadly, to access the cottonwood tree they also had to remove the seedless ash. Another annoyance was the roughly 2 feet of cottonwood stump sticking above the plane of the decking. That would result in me spending an entire day with various chainsaws reducing its height. My sister was incredibly helpful handling almost all the deconstruction of the old deck.
The frame is a simple design made primarily out of green-treated 2x8 joists and 4x4 posts. On the perimeter of the deck there are 4x4 posts buried 42 inches deep every 48 inches (inside to inside distance). A single 2x8 around the inside and a pair of 2x6 split by a pair of 1x6 boards lining the base of the outside secures to each post. The 2x8 ledger boards lag bolted to the frame of the house and garage. There are 10 and 12 foot joists that meet in the middle where they lie atop a double 2x8 beam split by 4x4 posts buried 42 inches deep roughly every 48 inches. All joists are 16 inches center to center.
We worked feverishly over the next 4 days to go from the partially completed frame shown above to the finished product. Most of the construction was very straightforward but the large volume of decking that had to be cut and secured to the frame meant some long days. We developed a system where I would cut decking and my sister would secure it. The lattice work on the railings took a fair bit of time but was not complicated. Thankfully the solid board exterior of the base of this deck was much easier than the lattice base on the south deck. The staircase coming off at 45° was a small challenge to get all the angles of the frame and railings correct.


[viewBag] title = "LIST OF SUBJECT EXAMINATION" ==
A range of subjects appropriate to the curriculum and the test (2018-2019 academic years)
|
Selection code |
Name of educational direction |
Complex of subjects for testing |
Point |
|
5110100 |
Methodology of Teaching Mathematics |
Mathematic (with Informatics) |
3,1 |
|
Physics |
2,1 |
||
|
Native language and literature |
1,1 |
||
|
5110200 |
Methodology of Teaching Physics and Astronomy |
Physics |
3,1 |
|
Mathematics (with Informatics) |
2,1 |
||
|
Native language and literature |
1,1 |
||
|
5110300 |
Methodology of Teaching Chemistry |
Chemistry |
3,1 |
|
Mathematics (with Informatics) |
2,1 |
||
|
Native language and literature |
1,1 |
||
|
5110400 |
Methodology of Teaching Biology |
Biology |
3,1 |
|
Chemistry |
2,1 |
||
|
Native language and literature |
1,1 |
||
|
5110500 |
Methodology of Teaching Geography |
Geography |
3,1 |
|
Mathematics (with Informatics) |
2,1 |
||
|
Native language and literature |
1,1 |
||
|
5110600 |
Methodology of Teaching History |
History |
3,1 |
|
Native language and literature |
2,1 |
||
|
Foreign Language |
1,1 |
||
|
5110700 |
Methodology of Teaching Informatics |
Mathematics (with Informatics) |
3,1 |
|
Physics |
2,1 |
||
|
Native language and literature |
1,1 |
||
|
5110800 |
Fine arts and engineering graphics |
Professional (creative) exam |
|
|
5110900 |
Pedagogy and psychology |
Biology |
3,1 |
|
Native language and literature |
2,1 |
||
|
History |
1,1 |
||
|
5111100 |
Music Education |
Professional (creative) exam |
|
|
5111200 |
Uzbek Language and Literature |
Native language and literature |
3,1 |
|
History |
2,1 |
||
|
Foreign Language |
1,1 |
||
|
5111300 |
Russian Language and Literature |
Russian Language and Literature |
3,1 |
|
Uzbek Language and Literature |
2,1 |
||
|
History |
1,1 |
||
|
5111300 |
Russian Language and Literature (in self-help groups) |
Russian Language and Literature |
3,1 |
|
Uzbek Language and Literature |
2,1 |
||
|
History |
1,1 |
||
|
5111400 |
Foreign Language and Literature: English |
English Language |
3,1 |
|
History |
2,1 |
||
|
Foreign Language |
1,1 |
||
|
5111600 |
National Idea: Fundamentals of Spirituality and Law Education |
History |
3,1 |
|
Native language and literature |
2,1 |
||
|
Foreign Language |
1,1 |
||
|
5111700 |
Primary Education and Sports Education |
Native language and literature |
3,1 |
|
Mathematics (with Informatics) |
2,1 |
||
|
Foreign Language |
1,1 |
||
|
5111800 |
Pre-school Education |
Biology |
3,1 |
|
Native language and literature |
2,1 |
||
|
History |
1,1 |
||
|
5111900 |
Defectology (on various field of activity) |
Biology |
3,1 |
|
Native language and literature |
2,1 |
||
|
History |
1,1 |
||
|
5112000 |
Physical Culture |
Professional (creative) exam |
|
|
5112001 |
Sports activities (in the field of women's sports) |
Professional (creative) exam |
|
|
5112100 |
Labour Education |
Physics |
3,1 |
|
Mathematics (with Informatics) |
2,1 |
||
|
Native language and literature |
1,1 |


A simple instant search engine powered by Apache hadoop / Google App Engine for Guttenberg Text Books.
Try pressing search Once in a while , if No results show up
Search Guttenberg Books


Landing Page
Special Projects
This story is part of a series of specially designed stories that represents some of the best journalism The Post has to offer. Check out the rest of the special projects here.
05.31.18
College can be intimidating and a bit scary at times, especially the first couple of weeks. Here are some tips on how to make friends so college doesn’t seem as scary:
Leaving your door open means you are open to new friendships. Leave it open if you are doing homework, folding laundry or even just watching Netflix. Someone walking by might love the same show and want to start a watch party.
Tagging along with people in your building to grab a bite to eat is a great way to make new friends. Everyone can feel a little lonely the first few weeks, especially during meal times. Getting food with a few people can make the large dining halls seem less intimidating.
Seth Archer | FILE
Thousands of freshman students follow the Marching 110 across the Richland bridge on their way through the involvement fair on August 24, 2014.
The university always has a lot of events going on the first few weekends. There’s the Involvement Fair, where College Green is covered in clubs looking for new members to sign up. There are also other events like Ohio Late Nights or even just walking around Uptown to get a lay of the land.
Working on classwork in common spaces like a residence hall’s lobby or in the courtyards can be a great way to meet new people. More than likely someone is taking the same class and will want to work together on the homework. Working in common spaces also shows you want to make friends and are open to it.
As tempting as it may be, don’t beeline to the back few rows in a massive lecture hall. Sitting next to someone can lead to a friendship and a study buddy for hard exams and homework. It’ll also make the class seem less scary.
It sounds cheesy, but it’s true. Being yourself is the most important thing when making friends. Everyone’s a little frightened their first few weeks on campus, even if they have a ton of friends. Just remember to be yourself and friends will come.
Landing Page
This story is part of a series of specially designed stories that represents some of the best journalism The Post has to offer. Check out the rest of the special projects here.


There are few things in existence more reprehensible than mosquitoes.  Various scientists will point to the importance of mosquitoes to our ecosystems - this is Fake News. Among the diseases mosquitoes take pleasure in spreading are: Malaria, dengue, Japanese encephalitis, Zika virus, and many more. Do not let yourself feel sympathy for these creatures, they belong crushed beneath our swatters as our blood spurts from their wretched bodies.
 For a start, you get 3 cents for every mosquito you kill. It doesn't seem like a lot but trust me it adds up. You'll get bonuses along the way if and when I see some worthwhile achievement. Remember, mosquitoes are killing people at this very moment, so get swatting.
Mozzies in Existence:
70000000000000000
Hours Gone By:
Title: 0
Mozzies Killed:
0
Cash Per Kill: $ 0
Cash Per Swat: $ 0
Average Mozzies Killed Per Hour:
0
Cash: $ 20.00
Unclaimed Kills:
0
Primary Weapon:
Secondary Weapon:
Pets:
School of Swat
Kill-Multiplier:
Mozzies Killed Per Swat:
Primary Weapon:
Secondary Weapon:
Pets:
Stealth Level:
Skill Level:


After installation, usage is:
.md
make
emd.sh
will parse the file to create an html page
with fancy spoiler text that can be expanded like on
the Endless blog.
Here’s a demo. (Why?)(why-demo)
(start why-demo)
I like to show you what the point of it all is: \(a^2 + b^2 = c^2\)
And some more math: \[ ax^2 + bx + c = 0 \]
After which you use the (quadratic formula!Quadratic Formula)(quad-form).
(start quad-form)
\[ x=\frac{-b\pm\sqrt{b^2-4ac}}{2a} \]
(stop quad-form)
(stop why-demo)
update-emd.sh
is a helper script to be run from a newly updated directory that:
searches its first input recursively for any emd.sh files,
updates the files in those directories with the files in the curent directory,
touches any .md
files in those directories and runs emd.sh
on them.
update-emd.sh
is designed to allow the user to have a reference git directory
for emd.sh
that is updated by a single git pull
,
painlessly pushing those updates to all other locations.
Copying all files in this directory to another is all that is required for installation.
If desired, update-emd.sh
may be abused for installation.
Simply run touch $DIR/emd.sh
for every directory $DIR
that you want
to install emd.sh
into, then run update-emd.sh $SUPER_DIR
for any
directory $SUPER_DIR
that contains all the install directories.
The makefile is set to run emd.sh
on every .md
file
in the current directory.
emd.sh
depends on premd.html
and postmd.html
,
which it simply prepends and appends to every document after parsing markdown.
extended_markdown.js
and extended_markdown.css
are necessary
for the spoiler text to be handled correctly.
If you want an example of the CSS that formats everything just like the Endless blog, then you download the CSS file for the Casper theme for Ghost.


does someone know how to use the my_tx_history call? i have MORTY enabled natively, with the address imported. balance shows correctly and i successfully did a RICK/MORTY trade. i issue the my_tx_history call to see the transactions done, but all the output says is:
{"current_block":223580,"from_id":null,"limit":10,"skipped":0,"sync_status":{"state":"NotEnabled"},"total":0,"transactions":[]}}


President Harvey Shi is a Pratt Junior studying BME/CS. He really enjoys basketball, playing with Arduino, and building webapps.
Dhruv Patel
Vice President Dhruv is a Sophomore studying ECE/CS. He loves playing tennis, watching TV, and Chick-fil-A. He is planning to build a robot army to take over the world.
Tom Wu
Senior Advisor Tom Wu is a Senior studying ECE/CS. Aside from working on projects in Duke IEEE, he is working on a research project in the marvelous field of nanotechnology.
Mason Zhang
Treasurer Mason is a Pratt BME/ECE sophomore considering dropping BME for CS. He enjoys playing Super Smash Bros Melee.
Kimberly Eddleman
Secretary Kimberly is a junior majoring in ECE and minoring in Spanish. Kimberly enjoys bike riding, yoga, watching football, and laser burning wood at the innovation colab.
Jasmine Lu
Publicity Chair Jasmine is a sophomore planning on majoring in ECE and Computer Science. Jasmine is really big on art and travel as well as a million other side interests!
Jerry Pan
Webmaster Jerry is a sophomore majoring in Computer Science. Although he does lots of web development, he is passionate about AI. In his free time, he enjoys playing ping pong.
Matthew Wu
Lab Manager Matthew is currently a junior at Duke University studying ECE/CS with a minor in Economics. His interests include: music, table tennis, food, Netflix, the Internet, and sleep.
Let's Get In Touch!
Have a cool project in mind? Any general questions? Contact us at<EMAIL_ADDRESS>Want to get involved? Subscribe to our mailing list here


Before we continue …
A Word from the Sponsor!
They are just a versatile abstraction, like map
or fold
.
Parsers
A parser is a function that
- converts unstructured data (e.g.
String
, array ofByte
,…) - into structured data (e.g. JSON object, Markdown, Video…)
Every large software system contains a Parser
| System | Parses |
|---|---|
| Shell Scripts | Command-line options |
| Browsers | HTML |
| Games | Level descriptors |
| Routers | Packets |
| Netflix | Video |
| Spotify | Audio, Playlists… |
How to build Parsers?
Two standard methods
Regular Expressions
- Doesn’t really scale beyond simple things
- No nesting, recursion
Parser Generators
- Specify grammar via rules
- Tools like
yacc
,bison
,antlr
,happy
- convert grammar into executable function
Grammars Don’t Compose!
If we have two kinds of structured objects Thingy
and Whatsit
.
To parse sequences of Thingy
and Whatsit
we must duplicate the rules
Thingies : Thingy Thingies { ... }
EmptyThingy { ... }
;
Whatsits : Whatsit Whatsits { ... }
EmptyWhatsit { ... }
;
No nice way to reuse the sub-parsers for Whatsit
and Thingy
:-(
A New Hope: Parsers as Functions
Lets think of parsers directly as functions that
- Take as input a
String
- Convert a part of the input into a
StructuredObject
- Return the remainder unconsumed to be parsed later
A Parser a
- Converts a prefix of a
String
- Into a structured object of type
a
and - Returns the suffix
String
unchanged
Parsers Can Produce Many Results
Sometimes we want to parse a String
like
into a list of possible results
So we generalize the Parser
type to
EXERCISE
Given the definition
Implement a function
QUIZ
Given the definition
Which of the following is a valid Parser Char
- that returns the first
Char
from a string (if one exists)
-- A
oneChar = P (\cs -> head cs)
-- B
oneChar = P (\cs -> case cs of
[] -> [('', [])
c:cs -> (c, cs))
-- C
oneChar = P (\cs -> (head cs, tail cs))
-- D
oneChar = P (\cs -> [(head cs, tail cs)])
-- E
oneChar = P (\cs -> case cs of
[] -> []
cs -> [(head cs, tail cs)])
Lets Run Our First Parser!
>>> runParser oneChar "hey!"
[('h', "ey")]
>>> runParser oneChar "yippee"
[('y', "ippee")]
>>> runParser oneChar ""
[]
Failure to parse means result is an empty list!
EXERCISE
Your turn: Write a parser to grab first two chars
When you are done, we should get
QUIZ
Ok, so recall
twoChar :: Parser (Char, Char)
twoChar = P (\cs -> case cs of
c1:c2:cs' -> [((c1, c2), cs')]
_ -> [])
Suppose we had some foo
such that twoChar'
was equivalent to twoChar
What must the type of foo
be?
A. Parser (Char, Char)
B. Parser Char -> Parser (Char, Char)
C. Parser a -> Parser a -> Parser (a, a)
D. Parser a -> Parser b -> Parser (a, b)
E. Parser a -> Parser (a, a)
EXERCISE: A forEach
Loop
Lets write a function
such that we get the following behavior
>>> forEach [] (\i -> [i, i + 1])
[]
>>> forEach [10,20,30] (\i -> [show i, show (i+1)])
["10", "11", "20", "21", "30", "31"]
QUIZ
What does quiz
evaluate to?
A. [10,20,30,0,1,2]
B. [10,0,20,1,30,2]
C. [[10,11,12], [20,21,22] [30,31,32]]
D. [10,11,12,20,21,22,30,31,32]
E. [32]
A pairP
Combinator
Lets implement the above as pairP
forEach :: [a] -> (a -> [b]) -> [b]
forEach xs f = concatMap f xs
pairP :: Parser a -> Parser b -> Parser (a, b)
pairP aP bP = P (\s -> forEach (runParser aP s) (\(a, s') ->
forEach (runParser bP s') (\(b, s'') ->
((a, b), s'')
)
)
Now we can write
QUIZ
What does quiz
evaluate to?
A. [((
h,
h), "")]
B. [(
h, "")]
C. [("", "")]
D. []
E. Run-time exception
Does the Parser a
type remind you of something?
Lets implement the above as pairP
Parser
is a Monad!
Like a state transformer, Parser
is a monad!
We need to implement two functions
QUIZ
Which of the following is a valid implementation of returnP
data Parser a = P (String -> [(a, String)])
returnP :: a -> Parser a
returnP a = P (\s -> []) -- A
returnP a = P (\s -> [(a, s)]) -- B
returnP a = P (\s -> (a, s)) -- C
returnP a = P (\s -> [(a, "")]) -- D
returnP a = P (\s -> [(s, a)]) -- E
HINT: return a
should just
- “produce” the parse result
a
and - leave the string unconsumed.
Bind
Next, lets implement bindP
- we almost saw it as
pairP
bindP :: Parser a -> (a -> Parser b) -> Parser b
bindP aP fbP = P (\s ->
forEach (runParser aP s) (\(a, s') ->
forEach (runParser (fbP a) s') (\(b, s'') ->
[(b, s'')]
)
)
)
The function
- Builds the
a
values out ofaP
(usingrunParser
) - Builds the
b
values by callingfbP a
on the remainder strings'
- Returns
b
values and the remainder strings''
The Parser
Monad
We can now make Parser
an instance of Monad
And now, let the wild rumpus start!
Parser Combinators
Lets write lots of high-level operators to combine parsers!
Here’s a cleaned up pairP
Failures are the Pillars of Success!
Surprisingly useful, always fails
- i.e. returns
[]
no successful parses
QUIZ
Consider the parser
What is the value of
quiz1 = runParser (satP (\c -> c == 'h')) "hellow"
quiz2 = runParser (satP (\c -> c == 'h')) "yellow"
quiz1 |
quiz2 |
|
|---|---|---|
| A | [] |
[] |
| B | [('h', "ellow")] |
[('y', "ellow")] |
| C | [('h', "ellow")] |
[] |
| D | [] |
[('y', "ellow")] |
Parsing Alphabets and Numerics
We can now use satP
to write
-- parse ONLY the Char c
char :: Parser Char
char c = satP (\c' -> c == c')
-- parse ANY ALPHABET
alphaCharP :: Parser Char
alphaCharP = satP isAlpha
-- parse ANY NUMERIC DIGIT
digitChar :: Parser Char
digitChar = satP isDigit
QUIZ
We can parse a single Int
digit
digitInt :: Parser Int
digitInt = do
c <- digitChar -- parse the Char c
return (read [c]) -- convert Char to Int
What is the result of
quiz1 |
quiz2 |
|
|---|---|---|
| A | [] |
[] |
| B | [('9', "2")] |
[('c', "at")] |
| C | [(9, "2")] |
[] |
| D | [] |
[('c', "at")] |
EXERCISE
Write a function
when you are done, we should get the following behavior
>>> dogeP = strP "doge"
>>> runParser dogeP "dogerel"
[("doge", "rel")]
>>> runParser dogeP "doggoneit"
[]
A Choice Combinator
Lets write a combinator orElse p1 p2
such that
- returns the results of
p1
or, else if those are empty
- returns the results of
p2
:: Parser a -> Parser a -> Parser a
orElse p1 p2 = -- produce results of `p1` if non-empty
-- OR-ELSE results of `p2`
e.g. orElseP
lets us build a parser that produces an alphabet OR a numeric character
Which should produce
>>> runParser alphaNumChar "cat"
[('c', "at")]
>>> runParser alphaNumChar "2cat"
[('2', "cat")]
>>> runParser alphaNumChar "230"
[('2', "30")]
QUIZ
orElse :: Parser a -> Parser a -> Parser a
orElse p1 p2 = -- produce results of `p1` if non-empty
-- OR-ELSE results of `p2`
Which of the following implements orElse
?
-- a
orElse p1 p2 = do
r1s <- p1
r2s <- p2
return (r1s ++ r2s)
-- b
orElse p1 p2 = do
r1s <- p1
case r1s of
[] -> p2
_ -> return r1s
-- c
orElse p1 p2 = P (\cs ->
runParser p1 cs ++ runParser p2 cs
)
-- d
orElse p1 p2 = P (\cs ->
case runParser p1 cs of
[] -> runParser p2 cs
r1s -> r1s
)
An “Operator” for orElse
It will be convenient to have a short “operator” for orElse
A Simple Expression Parser
Now, lets write a tiny calculator!
-- 1. First, parse the operator
intOp :: Parser (Int -> Int -> Int)
intOp = plus <|> minus <|> times <|> divide
where
plus = do { _ <- char '+'; return (+) }
minus = do { _ <- char '-'; return (-) }
times = do { _ <- char '*'; return (*) }
divide = do { _ <- char '/'; return div }
-- 2. Now parse the expression!
calc :: Parser Int
calc = do x <- digitInt
op <- intOp
y <- digitInt
return (x `op` y)
When calc
is run, it will both parse and calculate
>>> runParser calc "8/2"
[(4,"")]
>>> runParser calc "8+2cat"
[(10,"cat")]
>>> runParser calc "8/2cat"
[(4,"cat")]
>>> runParser calc "8-2cat"
[(6,"cat")]
>>> runParser calc "8*2cat"
[(16,"cat")]
QUIZ
What will quiz
evaluate to?
calc :: Parser Int
calc = do x <- digitInt
op <- intOp
y <- digitInt
return (x `op` y)
quiz = runParser calc "99bottles"
A. Type error
B. []
C. [(9, "9bottles")]
D. [(99, "bottles")]
E. Run-time exception
Next: Recursive Parsing
Its cool to parse individual Char
…
… but way more interesting to parse recursive structures!
EXERCISE: A “Recursive” String Parser
The parser string s
parses exactly the string s
- fails otherwise
>>> runParser (string "mic") "mickeyMouse"
[("mic","keyMouse")]
>>> runParser (string "mic") "donald duck"
[]
Lets fill in an implementation
Which library function will eliminate the recursion from string
?
QUIZ: Parsing Many Times
Often we want to repeat parsing some object
-- | `manyP p` repeatedly runs `p` to return a list of [a]
manyP :: Parser a -> Parser [a]
manyP p = m0 <|> m1
where
m0 = return []
m1 = do { x <- p; xs <- manyP p; return (x:xs) }
Recall digitChar :: Parser Char
returned a single numeric Char
What will quiz
evaluate to?
A. [("" , "1234horse")]
B. [("1" , "234horse")]
C. [("1", "23horse"), ("12", "3horse"), ("123", "horse )]
D. [("123", "horse")]
E. []
Lets fix manyP
!
Run p
first and only return []
if it fails …
-- | `manyP p` repeatedly runs `p` to return a list of [a]
manyP :: Parser a -> Parser [a]
manyP p = m1 <|> m0
where
m0 = return []
m1 = do { x <- p; xs <- manyP p; return (x:xs) }
now, we can write an Int
parser as
which will produce
Parsing Arithmetic Expressions
Now we can build a proper calculator!
calc0 :: Parser Int
calc0 = binExp <|> int
int :: Parser Int
int = do
xs <- many digitChar
return (read xs)
binExp :: Parser Int
binExp = do
x <- int
o <- intOp
y <- calc0
return (x `o` y)
Works pretty well!
QUIZ
calc0 :: Parser Int
calc0 = binExp <|> int
int :: Parser Int
int = do
xs <- many digitChar
return (read xs)
binExp :: Parser Int
binExp = do
x <- int
o <- intOp
y <- calc0
return (x `o` y)
What does quiz
evaluate to?
A. [(0, "")]
B. []
C. [(10, "")]
D. [(10, "-5-5")]
E. [(5, "-5")]
Problem: Right-Associativity
Recall
"10-5-5"
gets parsed as 10 - (5 - 5)
because
The calc0
parser implicitly forces each operator to be right associative
doesn’t matter for
+
,*
but is incorrect for
-
QUIZ
Recall
What does quiz
get evaluated to?
A. [(1020,"")]
B. [(120,"")]
C. [(120,""), (1020, "")]
D. [(1020,""), (120, "")]
E. []
The calc0
parser implicitly forces all operators to be right associative
doesn’t matter for
+
,*
but is incorrect for
-
Does not respect precedence!
Simple Fix: Parentheses!
Lets write a combinator that parses something within (...)
now we can try
calc1 :: Parser Int
calc1 = parens binExp <|> int
binExp :: Parser Int
binExp = do
x <- int
o <- intOp
y <- calc1
return (x `o` y)
now the original string wont even parse
but we can add parentheses to get the right result
>>> runParser calc1 "((10-5)-5)"
[(0 ,"")]
>>> runParser calc1 "(10-(5-5))"
[(10 ,"")]
>>> runParser calc1 "((10*2)+100)"
[(120, "")]
>>> runParser calc1 "(10*(2+100))"
[(1020, "")]
Left Associativity
But how to make the parser left associative
- i.e. parse “10-5-5” as
(10 - 5) - 5
?
Lets flip the order!
calc1 :: Parser Int
calc1 = binExp <|> oneInt
binExp :: Parser Int
binExp = do
x <- calc1
o <- intOp
y <- int
return (x `o` y)
But …
Infinite loop! calc1 --> binExp --> calc1 --> binExp --> ...
- without consuming any input :-(
Solution: Parsing with Multiple Levels
Any expression is a sum-of-products
10 * 20 * 30 + 40 * 50 + 60 * 70 * 80
=>
((((10 * 20) * 30) + (40 * 50)) + ((60 * 70) * 80))
=>
((((base * base) * base) + (base * base)) + ((base * base) * base))
=>
(((prod * base) + prod) + (prod * base))
=>
((prod + prod) + prod)
=>
(sum + prod)
=>
sum
=>
expr
Parsing with Multiple Levels
So lets layer our language as
expr :== sum
sum :== (((prod "+" prod) "+" prod) "+" ... "+" prod)
prod :== (((base "*" base) "*" base) "*" ... "*" base)
base :== "(" expr ")" ORELSE int
that is the recursion looks like
No infinite loop!
expr --> prod --> base -->* expr
but last step
-->*
consumes a(
Parsing oneOrMore
Lets implement oneOrMore vP oP
as a combinator - vP
parses a single a
value - oP
parses an operator a -> a -> a
- oneOrMore vP oP
parses and returns the result ((v1 o v2) o v3) o v4) o ... o vn)
But how?
grab the first
v1
usingvP
- continue by
- either trying
oP
thenv2
… and recursively continue withv1 o v2
orElse
(no moreo
) just returnv1
- either trying
oneOrMore :: Parser a -> Parser (a -> a -> a) -> Parser a
oneOrMore vP oP = do {v1 <- vP; continue v1}
where
continue v1 = do { o <- oP; v2 <- vP; continue (v1 `o` v2) }
<|> return v1
Implementing Layered Parser
Now we can implement the grammar
simply as
where addOp
is +
or -
and mulOp
is *
or /
addOp, mulOp :: Parser (Int -> Int -> Int)
addOp = constP "+" (+) <|> constP "-" (-)
mulOp = constP "*" (*) <|> constP "/" div
constP :: String -> a -> Parser a
constP s x = do { _ <- string s; return x }
Lets make sure it works!
>>> doParse sumE2 "10-1-1"
[(8,"")]
>>> doParse sumE2 "10*2+1"
[(21,"")]
>>> doParse sumE2 "10+2*1"
[(12,"")]
Parser combinators
That was a taste of Parser Combinators
- Transferred from Haskell to many other languages.
Many libraries including Parsec used in your homework - oneOrMore
is called chainl
Read more about the theory - in these recent papers
Read more about the practice - in this recent post that I like JSON parsing from scratch


Announcing ncurses 5.3
The ncurses (new curses) library is a free software emulation of
curses in System V Release 4.0, and more. It uses terminfo format,
supports pads and color
and multiple highlights and forms characters and function-key mapping,
and has all the other SYSV-curses enhancements over BSD curses.
In mid-June 1995, the maintainer of 4.4BSD curses declared that he
considered 4.4BSD curses obsolete, and is encouraging the keepers of
Unix releases such as BSD/OS, freeBSD and netBSD to switch over to
ncurses.
The ncurses code was developed under GNU/Linux.
It has been in use for some time with OpenBSD as the system curses library,
and on FreeBSD and NetBSD as an external package.
It should port easily to any ANSI/POSIX-conforming UNIX.
It has even been ported to OS/2 Warp!
The distribution includes the library and support utilities, including a
terminfo compiler tic(1), a decompiler infocmp(1), clear(1), tput(1), tset(1),
and a termcap conversion tool captoinfo(1). Full manual pages are provided for
the library and tools.
The ncurses distribution is available via anonymous FTP at
the GNU distribution site
ftp://ftp.gnu.org/pub/gnu/ncurses.
It is also available at
ftp://invisible-island.net/ncurses.
Release Notes
This release is designed to be upward compatible from ncurses 5.0 and 5.2;
very few applications will require recompilation, depending on the platform.
These are the highlights from the change-log since ncurses 5.2 release.
Interface changes:
- change type for bool used in headers to
NCURSES_BOOL
,
which usually is the same as the compiler's definition for
bool
.
- add all but two functions for X/Open curses wide-character support.
These are only available if the library is configured using the
--enable-widec option. Missing functions are
- add environment variable
$NCURSES_ASSUMED_COLORS
to
modify the assume_default_colors()
extension.
New features and improvements:
- Improved support for termcap applications:
- add logic to dump_entry.c to remove function-key definitions that do
not fit into the 1023-byte limit for generated termcaps. This makes
hds200 fit.
- modify tgetent() to check if exit_attribute_mode resets the alternate
character set, and if so, attempt to adjust the copy of the termcap
"me" string which it will return to eliminate that part. In
particular, 'screen' would lose track of line-drawing characters.
- add check/fix to comp_parse.c to suppress warning about missing acsc
string. This happens in configurations where raw termcap information
is processed; tic already does this and other checks.
- add tic -A option to suppress capabilities which are commented out
when translating to termcap.
- modify logic in lib_baudrate.c for ospeed, for FreeBSD to make it
work properly for termcap applications (patch by Andrey A Chernov).
- add a call to _nc_keypad() in keypad() to accommodate applications
such as nvi, which use curses for output but not for input (fixes
Debian #131263, cf: 20011215).
- correct logic for COLORFGBG environment variable: if rxvt is compiled
with xpm support, the variable has three fields, making it slightly
incompatible with itself. In either case, the background color is
the last field.
Major bug fixes:
- rewrote limit-checks in wscrl() and associated _nc_scroll_window(),
to ensure that if the parameter of wscrl() is larger than the size of
the scrolling region, then the scrolling region will be cleared.
- modify tset to restore original I/O modes if an error is encountered.
Also modify to use buffered stderr consistently rather than mixing
with write().
- move calls to def_shell_mode() and def_prog_mode() before loop with
callbacks in lib_set_term.c, since the c++ demo otherwise initialized
the tty modes before saving them.
- modified wresize() to ensure that a failed realloc will not corrupt
the window structure, and to make subwindows fit within the resized
window.
- altered resizeterm() to avoid having it fail when a child window
cannot be resized because it would be larger than its parent.
- correct/improve logic to produce an exit status for errors in tput,
which did not exit with an error when told to put a string not in the
current terminfo entry.
- modify behavior of can_clear_with() so that if an application is
running in a non-bce terminals with default colors enabled, it
returns true, allowing the user to select/paste text without picking
up extraneous trailing blanks.
- add a check in relative_move() to guard against buffer overflow in
the overwrite logic.
- add some limit/pointer checks to -S option of tputs.
- modify mvcur() to avoid emitting newline characters when nonl() mode
is set. Normally this is not a problem since the actual terminal
mode is set to suppress nl/crlf translations, however it is useful to
allow the caller to manipulate the terminal mode to avoid staircasing
effects after spawning a process which writes messages (for lynx
2.8.4).
Portability:
- configure script:
- modify check in --disable-overwrite option so that it is used by
default unless the --prefix/$prefix value is not /usr, in attempt to
work around packagers who do not read the INSTALL notes.
- correct a typo in configure --enable-colorfgbg option, and move it
to the experimental section (cf: 20011208).
- modify configure script to allow building with termcap only, or with
fallbacks only. In this case, we do not build tic and toe.
- modify run_tic.sh to check if the build is a cross-compile. In that
case, do not use the build's tic to install the terminfo database.
- modify c++/Makefile.in to accommodate archive programs that are
different for C++ than for C, and add cases for vendor's C++
compilers on Solaris and IRIX.
- add several configure script options to aid with cross-compiling:
--with-build-cc, --with-build-cflags, --with-build-ldflags, and
--with-build-libs.
- add experimental --with-caps=XXX option to customize to similar
terminfo database formats such as AIX 4.x
- add configure option --with-ospeed to assist packagers in transition
to 5.3 change to ospeed type.
- library:
- implement a simple vsscanf() fallback function which uses the %n
conversion to help parse the input data.
- various fixes to build/work with different implementations of
vsscanf().
- add/use macro to suppress sign-extension of char type on
platforms where this is a problem in ctype macros, e.g., Solaris.
- finish changes needed to build dll's on cygwin.
- add #undef's before possible redefinition of ERR and OK in curses.h
- programs:
- modify ifdef's in write_entry.c to allow use of symbolic links on
platforms with no hard links, e.g., BeOS.
- modify _nc_write_entry() to allow for the possibility that linking
aliases on a filesystem that ignores case would not succeed because
the source and destination differ only by case, e.g., NCR260VT300WPP0
on cygwin.
- modify logic in tic, toe, tput and tset which checks for basename of
argv[0] to work properly on systems such as OS/2 which have
case-independent filenames and/or program suffixes, e.g., ".ext".
Features of Ncurses
The ncurses package is fully compatible with SVr4 (System V Release 4) curses:
- All 257 of the SVr4 calls have been implemented (and are documented).
- Full support for SVr4 curses features including keyboard mapping, color,
forms-drawing with ACS characters, and automatic recognition of keypad
and function keys.
- An emulation of the SVr4 panels library, supporting
a stack of windows with backing store, is included.
- An emulation of the SVr4 menus library, supporting
a uniform but flexible interface for menu programming, is included.
- An emulation of the SVr4 form library, supporting
data collection through on-screen forms, is included.
- Binary terminfo entries generated by the ncurses tic(1) implementation
are bit-for-bit-compatible with the entry format SVr4 curses uses.
- The utilities have options to allow you to filter terminfo
entries for use with less capable curses/terminfo
versions such as the HP/UX and AIX ports.
The ncurses package also has many useful extensions over SVr4:
- The API is 8-bit clean and base-level conformant with the X/OPEN curses
specification, XSI curses (that is, it implements all BASE level features,
but not all EXTENDED features). Most EXTENDED-level features not directly
concerned with wide-character support are implemented, including many
function calls not supported under SVr4 curses (but portability of all
calls is documented so you can use the SVr4 subset only).
- Unlike SVr3 curses, ncurses can write to the rightmost-bottommost corner
of the screen if your terminal has an insert-character capability.
- Ada95 and C++ bindings.
- Support for mouse event reporting with X Window xterm and OS/2 console windows.
- Extended mouse support via Alessandro Rubini's gpm package.
- The function
wresize()
allows you to resize windows, preserving
their data.
- The function
use_default_colors()
allows you to
use the terminal's default colors for the default color pair,
achieving the effect of transparent colors.
- The functions
keyok()
and define_key()
allow
you to better control the use of function keys,
e.g., disabling the ncurses KEY_MOUSE,
or by defining more than one control sequence to map to a given key code.
- Support for 16-color terminals, such as aixterm and XFree86 xterm.
- Better cursor-movement optimization. The package now features a
cursor-local-movement computation more efficient than either BSD's
or System V's.
- Super hardware scrolling support. The screen-update code incorporates
a novel, simple, and cheap algorithm that enables it to make optimal
use of hardware scrolling, line-insertion, and line-deletion
for screen-line movements. This algorithm is more powerful than
the 4.4BSD curses quickch() routine.
- Real support for terminals with the magic-cookie glitch. The
screen-update code will refrain from drawing a highlight if the magic-
cookie unattributed spaces required just before the beginning and
after the end would step on a non-space character. It will
automatically shift highlight boundaries when doing so would make it
possible to draw the highlight without changing the visual appearance
of the screen.
- It is possible to generate the library with a list of pre-loaded
fallback entries linked to it so that it can serve those terminal types even
when no terminfo tree or termcap file is accessible (this may be useful
for support of screen-oriented programs that must run in single-user mode).
- The tic(1)/captoinfo utility provided with ncurses has the
ability to translate many termcaps from the XENIX, IBM and
AT&T extension sets.
- A BSD-like tset(1) utility is provided.
- The ncurses library and utilities will automatically read terminfo
entries from $HOME/.terminfo if it exists, and compile to that directory
if it exists and the user has no write access to the system directory.
This feature makes it easier for users to have personal terminfo entries
without giving up access to the system terminfo directory.
- You may specify a path of directories to search for compiled
descriptions with the environment variable TERMINFO_DIRS (this
generalizes the feature provided by TERMINFO under stock System V.)
- In terminfo source files, use capabilities may refer not just to
other entries in the same source file (as in System V) but also to
compiled entries in either the system terminfo directory or the user's
$HOME/.terminfo directory.
- A script (capconvert) is provided to help BSD users
transition from termcap to terminfo. It gathers the information in a
TERMCAP environment variable and/or a ~/.termcap local entries file
and converts it to an equivalent local terminfo tree under $HOME/.terminfo.
- Automatic fallback to the /etc/termcap file can be compiled in
when it is not possible to build a terminfo tree. This feature is neither
fast nor cheap, you don't want to use it unless you have to,
but it's there.
- The table-of-entries utility toe makes it easy for users to
see exactly what terminal types are available on the system.
- The library meets the XSI requirement that every macro entry
point have a corresponding function which may be linked (and will be
prototype-checked) if the macro definition is disabled with
#undef
.
- An HTML "Introduction to Programming with NCURSES" document provides
a narrative introduction to the curses programming interface.
State of the Package
Numerous bugs present in earlier versions have been fixed; the
library is far more reliable than it used to be. Bounds checking in many
`dangerous' entry points has been improved. The code is now type-safe
according to gcc -Wall. The library has been checked for malloc leaks and
arena corruption by the Purify memory-allocation tester.
The ncurses code has been tested with a wide variety of applications
including (versions starting with those noted):
- cdk
- Curses Development Kit
http://invisible-island.net/cdk.
http://www.vexus.ca/CDK.html
- ded
- directory-editor
http://invisible-island.net/ded.
- dialog
- the underlying application used in Slackware's setup, and the basis
for similar applications on GNU/Linux.
http://invisible-island.net/dialog.
- lynx
- the character-screen WWW browser
http://lynx.isc.org/release.
- Midnight Commander
- file manager
www.gnome.org/mc/.
- mutt
- mail utility
http://www.mutt.org.
- ncftp
- file-transfer utility
http://www.ncftp.com.
- nvi
- New vi versions 1.50 are able to use ncurses versions 1.9.7 and later.
http://www.bostic.com/vi/.
- tin
- newsreader, supporting color, MIME
http://www.tin.org.
- taper
- tape archive utility
http://members.iinet.net.au/~yusuf/taper/.
- vh-1.6
- Volks-Hypertext browser for the Jargon File
http://www.bg.debian.org/Packages/unstable/text/vh.html.
as well as some that use ncurses for the terminfo support alone:
- minicom
- terminal emulator
http://www.pp.clinet.fi/~walker/minicom.html.
- vile
- vi-like-emacs
http://invisible-island.net/vile.
The ncurses distribution includes a selection of test programs (including
a few games).
Who's Who and What's What
The original developers of ncurses are Zeyd Ben-Halim and
Eric S. Raymond.
Ongoing work is being done by
Thomas Dickey
and
Jürgen Pfeifer.
Thomas Dickey
acts as the maintainer for the Free Software Foundation, which holds the
copyright on ncurses.
Contact the current maintainers at
<EMAIL_ADDRESS>To join the ncurses mailing list, please write email to
<EMAIL_ADDRESS>containing the line:
subscribe<EMAIL_ADDRESS>This list is open to anyone interested in helping with the development and
testing of this package.
Beta versions of ncurses and patches to the current release are made available at
ftp://invisible-island.net/ncurses.
Future Plans
- Extended-level XPG4 conformance, with internationalization support.
- Ports to more systems, including DOS and Windows.
We need people to help with these projects. If you are interested in working
on them, please join the ncurses list.
Other Related Resources
The distribution includes and uses a version of the terminfo-format
terminal description file maintained by Eric Raymond.
http://earthspace.net/~esr/terminfo.
You can find lots of information on terminal-related topics
not covered in the terminfo file at
Richard Shuford's
archive.


Angular Adaptive Backgrounds
Frame an image with its dominant color using a simple directive
View on GitHub
Testing Adaptive color


SuperChromePass
Domain Name
Disable subdomain removal
Master Password:
Your generated password
Click to reveal password
Generate


Ban on wearing face masks restricts fundamental rights, rules Hong Kong high court
The ban on face-covering came into force in October
A government ban on demonstrators wearing face masks, aimed at helping to quell months of pro-democracy unrest in Hong Kong, is unconstitutional, the territory's high court ruled Monday.
"The restrictions it imposes on fundamental rights... go further than is reasonably necessary... and therefore fail to meet the proportionality test," the court said, according to a press summary.
The ban on face-covering came into force in October, when the city's unelected pro-Beijing leader invoked colonial-era legislation for the first time in more than 50 years.
The move was seen as a watershed legal moment for the city since its 1997 return by Britain to China but has been largely symbolic.
Demonstrators, most of them wearing masks, have continued to clash with police, often violently, as they press their demands for greater democracy for Hong Kong, as well as an independent inquiry into alleged brutality by the increasingly unpopular police force.


Click me
Click me With Arguments
To Test remove elements
This is the second p
To remove
To Test add elements
To ADD


This is a guest post by Mark Siemers, who kindly volunteered to suggest a series of Crystal blog posts. Expect more to come, or - even better - contact us about writing your own post.
1. Extremely low learning curve
Think of some languages that have become popular in the last 5-10 years. What comes to mind? Elixir, Go, Rust perhaps? They all have performance advantages over Ruby but are more difficult to learn and master.
What if you could get the performance gain with a much easier learning curve?
How easy? Let’s take a look at some code.
Q: Which of the following modules are written in Ruby? Which in Crystal?
A: Trick question - it’s both. The modules above will work in Ruby or Crystal. How cool is that?
See more examples of code similarities here.
This doesn’t mean that all Ruby code will work in Crystal (and vice-versa), but you can do an awful lot with Crystal immediately and be productive on day one, even minute one.
How does Crystal (a strongly-typed & compiled language) act like Ruby (a dynamic & duck-typed language)? Crystal’s compiler uses a combination of two powerful techniques: type inference and union types. This allows the compiler to read your ruby-like code and figure out (infer) the correct types to use.
Beyond the similarities, Crystal offers some core advantages over Ruby. Advantages like…
2. Compile time checks & method overloading
Does it feel hacky when you write is_a?
or respond_to?
to make sure your code doesn’t break in Ruby? Do you ever worry about all the places you did NOT put in those checks? Are those all bugs waiting to happen?
Crystal is a compiled language and checks all your method inputs and outputs at compile time. If any types don’t line-up, they will be caught before runtime.
Let’s revisit the Year::leap?
example from above. In Ruby, what happens when the input isn’t an integer?
For a String
we get the wrong answer, for a Date
we get a runtime exception. Fixing things in Ruby would require at least one is_a?
statement:
Does that method look good to you? We still have a chance at a runtime exception, just with a more helpful error message.
In Crystal, we have the option of explicitly typing our inputs (and outputs). We can change the method signature to self.leap?(year : Int)
and we are guaranteed to have an integer as input.
We get helpful messages at compile time, rather than runtime:
If we want to add support for Time
(think DateTime
in Ruby) in our module, we can overload Year::leap?
:
Like Ruby, method overloading allows flexibility with inputs but without the guesswork of duck-typing. Compile time checks prevent type mismatch errors from making it to production.
Speaking of production, how about…
3. Blazing fast performance
Another advantage of compilation is speed and optimization. When comparing the performance of Ruby to Crystal, often, it can be stated in orders of magnitude rather than percentages.
In one example, summing random numbers in crystal can be 10 orders of magnitude faster than Ruby (~ 37 million percent faster). This is due to compiler optimizations and the ability to use primitive data types in Crystal. This does come with the risk of integer overflow for large numbers (See Ary’s explanation).
Crystal’s built-in HTTP server has been able to handle over 2 million requests per second in benchmark testing. And many of the web frameworks are consistently delivering sub-millisecond response times for web applications.
Which brings us to the next point…
4. The web framework you want is already here
Love the completeness of Rails (or even Elixir’s Phoenix)? You’ll feel right at home with the Amber framework.
Is the simplicity and easy customization of Sinatra more your thing? You’ll find that simplicity with Kemal.
Do you want a full-stack framework that leverages compile time checks for strong params, HTTP verbs, and database queries? It’s your Lucky day.
During January, each of these web frameworks will be highlighted in their own dedicated post. Check back with the Crystal blog to find out more.
5. Crystal is written in Crystal! It’s easy to understand and contribute to the language
Have you ever read Ruby’s source code? Tried to figure out how some Enumerable
methods work?
Ruby’s Implementation of Enumerable#all?
How long does it take to figure out what that code is doing? If you’ve never worked with C code, probably a really long time.
Compare that to Crystal’s implementation of Enumerable#all?
How long did that take to figure out? If you know Ruby or Crystal, probably a matter of seconds.
With this in mind, consider that 98.4% of Crystal is written in Crystal and only 0.3% is written in C++.
Ruby is written 30.6% in C and 64.8% in Ruby.
In fact, only one file in crystal is written in C++, so as long as your aren’t changing LLVM extensions whatever you’re looking for in the crystal language is virtually guaranteed to be written in crystal.
Reading, understanding, and contributing to Crystal is easier than just about any language you can find.
Where to start?
If you’re looking to try out the Crystal programming language, here are some good resources to get started:
- Crystal Play - an online REPL-like tool for Crystal
- Install Crystal
- Crystal for Rubyists
- Crystal Exercisms
- Create your own HTTP Server in minutes


";
echo "Phone Number : " . $phoneNumber . " " . "
";
echo "Email : " . $email . " " . "
";
echo "Program : " . $program . " " . "
";
// creating the user in the table
$query = "INSERT INTO involved (`user_id`, `name`, `phone_number`, `email`, `program`, `content`, `date`)
VALUES (null,'$name','$phoneNumber','$email','$program','$message',NOW();";
// $sql = "INSERT INTO `bsysca_wp821`.`involved` (`user_id`, `name`, `phone_number`, `email`, `program`, `content`, `date`) VALUES (NULL, \'jfyj\', \'jyfj\', \'jfyj\', \'yfjfjy\', \'fyjfyj\', \'\');";
if (mysqli_query($dbc, $query)) {
echo "You have been registered successfully." . '
' ;
} else {
echo "Error: " . $query . "
" . mysqli_error($dbc);
}
} else {
// redirect
?>
Thanks for joining our movement. You will hear from us as soon as possible !!
You can always join us/contact us on one of these. You can also use these links to find out more about us, our events and our projects.
You can also email us at
or by filling this form.


Author: David L. Mills<EMAIL_ADDRESS>Last update:
10-Nov-2012 14:14
UTC
Address: 127.127.18.u
Reference ID: NIST | USNO | PTB | WWVB
Driver ID: ACTS_MODEM
Serial Port: /dev/actsu; 9600 baud, 8-bits, no parity
Features: tty_clk
Requires: /usr/include/sys/termios.h header file with modem control and a dial-out (cua) device.
This driver supports the US (NIST and USNO) and European (PTB (Germany), NPL (UK), etc.) modem time services, as well as Spectracom GPS and WWVB receivers connected via a modem. The driver periodically dials a number from a telephone list, receives the timecode data and calculates the local clock correction. It is designed primarily for backup when neither a radio clock nor connectivity to Internet time servers are available. It can also be configured to operate full period.
For best results the indicated time must be corrected for the modem and telephone circuit propagation delays, which can reach 200 ms or more. For the NIST service, corrections are determined automatically by measuring the roundtrip delay of echoed characters. With this service the absolute accuracy is typically a millisecond or two. Corrections for the other services must be determined by other means. With these services variations from call to call and between messages during a call are typically a few milliseconds, occasionally higher.
This driver requires a 9600-bps modem with a Hayes-compatible command set and control over the modem data terminal ready (DTR) control line. The actual line speed ranges from 1200 bps with USNO to 14,400 bps with NIST. The modem setup string is hard-coded in the driver and may require changes for nonstandard modems or special circumstances.
There are three modes of operation selected by the mode keyword in the server configuration command. In manual mode (2) the calling program is initiated by setting fudge flag1. This can be done manually using ntpq, or by a cron job. In auto mode (0) flag1 is set at each poll event. In backup mode (1) flag1 is set at each poll event, but only if no other synchronization sources are available.
When flag1 is set, the calling program dials the first number in the list specified by the phone command. If the call fails for any reason, the program dials the second number and so on. The phone number is specified by the Hayes ATDT prefix followed by the number itself, including the prefix and long-distance digits and delay code, if necessary. The flag1 is reset and the calling program terminated if (a) valid clock update has been determined, (b) no more numbers remain in the list, (c) a device fault or timeout occurs or (d) fudge flag1 is reset manually using ntpq.
The driver automatically recognizes the message format of each modem time service. It selects the parsing algorithm depending on the message length. There is some hazard should the message be corrupted. However, the data format is checked carefully and only if all checks succeed is the message accepted. Corrupted lines are discarded without complaint. Once the service is known, the reference identifier for the driver is set to NIST, USNO, PTB or WWVB as appropriate.
The Spectracom radio can be connected via a modem if the radio is configured to send time codes continuously at 1-s intervals. In principle, fudge flag2 enables port locking, allowing the modem to be shared when not in use by this driver. At least on Solaris with the current NTP I/O routines, this results in lots of ugly error messages.
The minpoll and maxpoll keywords of the server configuration command can be used to limit the intervals between calls. The recommended settings are 12 (1.1 hours) for minpoll and 17 (36 hours) for maxpoll. Ordinarily, the poll interval will start at minpoll and ramp up to maxpoll in a day or two.
Note: Phone numbers include the entire Hayes modem command, including the ATDT and other control codes as may be necessary. For most cases only the ATDT may be necessary.
National Institute of Science and Technology (NIST)
Phone:<PHONE_NUMBER> (Boulder, CO);<PHONE_NUMBER> (Hawaii)
National Institute of Standards and Technology
Telephone Time Service, Generator 3B
Enter question mark "?" for HELP
MJD YR MO DA H M S ST S UT1 msADV <OTM>
47999 90-04-18 21:39:15 50 0 +.1 045.0 UTC(NIST) *
47999 90-04-18 21:39:16 50 0 +.1 045.0 UTC(NIST) #
...
MJD, YR, ST, UT1 and UTC(NIST) are not used by this driver. The <OTM> on-time character "*" changes to "#" when the delay correction is valid.
Phone:<PHONE_NUMBER> (Washington, DC);<PHONE_NUMBER> (Boulder, CO)
Data Format (two lines, repeating at one-second intervals)
jjjjj nnn hhmmss UTC
* on-time character for previous timecode message
jjjjj modified Julian day number (not used)
nnn day of year
hhmmss second of day
European Phone Numbers and Formats
Spectracom GPS and WWVB Receivers
If a modem is connected to a Spectracom receiver, this driver will call it and retrieve the time in one of two formats, 0 and 2. Ordinarily, the receiver requires a T in order to return the timecode. As this driver does not send data via the modem, it must either be configured in continuous mode or be polled by another local driver.
The received timecode is written as-is to the clockstats file along with the Hayes connection and hang-up commands and result codes.


--- layout: default title: Blog pagination: enabled: true collection: posts permalink: /page/:num/ per_page: 3 sort_field: date sort_reverse: true trail: before: 1 # The number of links before the current page after: 3 # The number of links after the current page ---


This will overwrite your previously saved video!
By clicking 'Save', you will replace your previously saved video with this new one, this action cannot
be undone.
This will perminatly delete your saved video!
By clicking 'Delete', you will perminatly remove your saved video, this action cannot
be undone.


Customizing wysiwyg buttons and submitting the form
Reset
Submit
×
Wysiwyg editor's HTML content
Content can be put inside a hidden input and sent to server


The Ghanian Way Of Naming
Akan names are derived from Ghanian culture. Frequently in Ghana, children are given their first name as a 'day name' which corresponds to the day in the week they were born. Here are Ghanian day names.
The names are actualy given in acorrdance to the sex of the baby too learn more →
| Day | Akan name |
|---|---|
| Sunday | Kwasi |
| Monday | Kwadwo |
| Tuesday | Kwabena |
| Wednesday | Kwaku |
| Thursday | Yaw |
| Friday | Kofi |
| Saturday | Kwame |
| Day | Akan name |
|---|---|
| Sunday | Akosua |
| Monday | Adwoa |
| Tuesday | Abena |
| Wednesday | Akua |
| Thursday | Yaa |
| Friday | Afua |
| Saturday | Ama |


Time-tracking tool for counting working hours daily.
Time is on my side, yes it is!
Repository on GitHub LunaWorks/TimeSide.


{% extends 'main/base.html' %} {% block title %} The Good Life Meal Prep Subscribers | Password Reset Sent {% endblock %} {% block content %}
If your provided email address is associated with a Good Life Meal Prep subscriber account, then instructions for resetting your password have been sent. If you don't receive an email, please make sure you've entered the correct email address. If you're still not receiving a password reset email, please email Chef Andrew at<EMAIL_ADDRESS>Login