Laurenitus is a Full Stack Web Developer in Orange County, California. He has a passion for the Anaheim Ducks, Dungeons Dragons, Star Trek, Star Wars, podcasts, video games, and music. Laurentius has a particular liking for Critical Role and Shield of Tomorrow, both on the Geek & Sundry Twitch channel. Laurentius also records a podcast on the side.
Laurentius is proficient in the following web technologies:
This project incorporates the use of the Materialize front-end framework, along with JQuery and JavaScript for UX/UI. The site is served up with Node.js, Express and Sequelize for routing, requests, MVC and ORM functionality/methodologies.
Node packages include inquirer, request, method-override, body-parser and cheerio. Web Scraping is utilized as well for data extraction, and nightmare is used for testing.
Close ProjectHome of the Below Decks Podcast
A fan podcast about the Geek & Sundry Twitch show Shield of Tomorrow, a Star Trek RPG.
Close ProjectThis is a simple full-stack application with front-end HTML and CSS using the Materialze framework, templating from Handlebars.js, a back-end implementation using Node.js, Express, and database support using MySQL.
Users can enter burgers on the menu, making them available for consumption. Adding a burger to the menu also updates the database with the new burger. Available burger entries are shown on the left side of the screen and colored blue. Clicking on a burger consumes it, moving it to the right side of the screen and turning the burger red. The database is then updated with its new status.
Close ProjectA single page application built with React made specifically for line management using MongoDB and deployed on Heroku
Close ProjectThis fun command line interface acts like a pseudo digital assistant!
Simply follow the prompts and select whether you want to get tweets, search Spotify , or search the OMDB (It's like IMDB, but open source!). There is also a defualt command that runs automatically.
Close ProjectThis page helps those who are hungry, but don't want to do the work of cooking. This project is built with the Foundation CSS Framework by Zurb, and utilizes the Eat Street Public API as well as the unofficial OpenTable API.
Laurentius acted as the project manager and dealt with the EatStreet delivery page.
Close Project


I am a backend architect, a python and nodejs evangelist.
and I fight for clean design of code and micro services!
Unit testing is a must!
I am occupied
... but nevertheless I am interested in hiking, biking and in
hackable things.
Problems are just tasks to be solved.
Cheers and stay save!


_____________________________________________________________________________________
Abstract
In a risky world, a pessimist assumes the worst will happen. Someone who ignores risk altogether
is an optimist. Consumption decisions are mathematically simple for both the pessimist and the
optimist because both behave as if they live in a riskless world. A realist (that is, someone
who wants to respond optimally to risk) faces a much more diﬃcult problem, but (under
standard conditions) will choose a level of spending somewhere between pessimist’s and the
optimist’s. We use this fact to redeﬁne the space in which the realist searches for optimal
consumption rules. The resulting solution accurately represents the numerical consumption
rule over the entire interval of feasible wealth values with remarkably few computations.
- Keywords
Dynamic Stochastic Optimization
- JEL codes
FillInLater
1Carroll: Department of Economics, Johns Hopkins University, Baltimore, MD, http://econ.jhu.edu/people/ccarroll/<EMAIL_ADDRESS>2Tokuoka: International Monetary Fund, Washington, DC<EMAIL_ADDRESS>3Wu: Weifeng Wu, Fanie Mae, Washington DC, .
Solving a consumption, investment, portfolio choice, or similar intertemporal optimization problem using numerical methods generally requires the modeler to choose how to represent a policy or value function. In the stochastic case, where analytical solutions are generally not available, a common approach is to use low-order polynominal splines that exactly match the function (and maybe some derivatives) at a ﬁnite set of gridpoints, and then to assume that interpolated or extrapolated versions of that spline represent the function well at the continuous inﬁnity of unmatched points.
This paper argues that a better approach in the standard consumption problem is to rely upon the fact that without uncertainty, the optimal consumption function has a simple analytical solution. The key insight is that, under standard assumptions, the consumer who faces an uninsurable labor income risk will consume less than a consumer with the same path for expected income but who does not perceive any uncertainty as being attached to that future income. The ‘realistic’ consumer, who does perceive the risks, will engage in ‘precautionary saving,’ so the perfect foresight riskless solution provides an upper bound to the solution that will actually be optimal. A lower bound is provided by the behavior of a consumer who has the subjective belief that the future level of income will be the worst that it can possibly be. This consumer, too, behaves according to the convenient analytical perfect foresight solution, but his certainty is that of a pessimist perfectly conﬁdent in his pessimism.
Using results from Carroll (2023b), we show how to use these upper and lower bounds to tightly constrain the shape and characteristics of the solution to problem of the ‘realist.’ Imposition of these constraints can clarify and speed the solution of the realist’s problem.
After showing how to use the method in the baseline case, we show how reﬁne it to encompass an even tighter theoretical bound.
We assume that truly optimal behavior in the problem facing the consumer who understands all his risks is captured by
|
| (1) |
subject to
|
| (2) |
where
|
|
and the exogenous variables evolve according to
|
| (3) |
It turns out (see Carroll (2023a) for a proof) that this problem can be rewritten in a more convenient form in which choice and state variables are normalized by the level of permanent income, e.g., using nonbold font for normalized variables, . When that is done, the Bellman equation for the transformed version of the consumer’s problem is
|
| (4) |
and because we have not imposed a liquidity constraint, the solution satisﬁes the Euler equation
|
| (5) |
For the remainder of the paper we will assume that permanent income grows by a constant factor and is not subject to stochastic shocks. (The generalization to the case with permanent shocks is straightforward.)
For comparison to our new solution method, we use the endogenous gridpoints solution to the microeconomic problem presented in Carroll (2006). That method computes the level of consumption at a set of gridpoints for market resources that are determined endogenously using the Euler equation. The consumption function is then constructed by linear interpolation among the gridpoints thus found.
Carroll (2023a) describes a speciﬁc calibration of the model and constructs a solution using ﬁve gridpoints chosen to capture the structure of the consumption function reasonably well at values of near the inﬁnite-horizon target value. (See those notes for details).
Unfortunately, this endogenous gridpoints solution is not very well-behaved outside the original range of gridpoints targeted by the solution method. (Though other common solution methods are no better outside their own predeﬁned ranges). Figure 1 demonstrates the point by plotting the amount of precautionary saving implied by a linear extrapolation of our approximated consumption rule (the consumption of the perfect foresight consumer minus our approximation to optimal consumption under uncertainty, ). Although theory proves that precautionary saving is always positive, the linearly extrapolated numerical approximation eventually predicts negative precautionary saving (at the point in the ﬁgure where the extrapolated locus crosses the horizontal axis).
This error cannot be ﬁxed by extending the upper gridpoint; in the presence of serious uncertainty, the consumption rule will need to be evaluated outside of any prespeciﬁed grid (because starting from the top gridpoint, a large enough realization of the uncertain variable will push next period’s realization of assets above that top; a similar argument applies below the bottom gridpoint). While a judicious extrapolation technique can prevent this problem from being fatal (for example by carefully excluding negative precautionary saving), the problem is often dealt with using inelegant methods whose implications for the accuracy of the solution are diﬃcult to gauge.
As a preliminary to our solution, deﬁne as end-of-period human wealth (the present discounted value of future labor income) for a perfect foresight version of the problem of a ‘risk optimist:’ a consumer who believes with perfect conﬁdence that the shocks will always take the value 1, . The solution to a perfect foresight problem of this kind takes the form2
|
| (6) |
for a constant minimal marginal propensity to consume given below. We similarly deﬁne as ‘minimal human wealth,’ the present discounted value of labor income if the shocks were to take on their worst possible value in every future period (which we deﬁne as corresponding to the beliefs of a ‘pessimist’).
A ﬁrst useful point is that, for the realist, a lower bound for the level of market resources is , because if equalled this value then there would be a positive ﬁnite chance (however small) of receiving in every future period, which would require the consumer to set to zero in order to guarantee that the intertemporal budget constraint holds. Since consumption of zero yields negative inﬁnite utility, the solution to realist consumer’s problem is not well deﬁned for values of , and the limiting value of the realist’s is zero as .
Given this result, it will be convenient to deﬁne ‘excess’ market resources as the amount by which actual resources exceed the lower bound, and ‘excess’ human wealth as the amount by which mean expected human wealth exceeds guaranteed minimum human wealth:
|
|
We can now transparently deﬁne the optimal consumption rules for the two perfect foresight problems, those of the ‘optimist’ and the ‘pessimist.’ The ‘pessimist’ perceives human wealth to be equal to its minimum feasible value with certainty, so consumption is given by the perfect foresight solution
|
|
The ‘optimist,’ on the other hand, pretends that there is no uncertainty about future income, and therefore consumes
|
|
It seems obvious that the spending of the realist will be strictly greater than that of the pessimist and strictly less than that of the optimist. Figure 2 illustrates the proposition for the consumption rule in period .
The proof is more diﬃcult than might be imagined, but the necessary work is done in Carroll (2023b) so we will take the proposition as a fact and proceed by manipulating the inequality:
where the fraction in the middle of the last inequality is the ratio of actual precautionary saving (the numerator is the diﬀerence between perfect-foresight consumption and optimal consumption in the presence of uncertainty) to the maximum conceivable amount of precautionary saving (the amount that would be undertaken by the pessimist who consumes nothing out of any future income beyond the perfectly certain component). Deﬁning (which can range from to ), the object in the middle of the last inequality is
|
| (7) |
and we now deﬁne
|
| (8) |
which has the virtue that it is linear in the limit as approaches .
Given , the consumption function can be recovered from
|
| (9) |
Thus, the procedure is to calculate at the points corresponding to the log of the points deﬁned above, and then using these to construct an interpolating approximation from which we indirectly obtain our approximated consumption rule by substituting for in equation (9).
Because this method relies upon the fact that the problem is easy to solve if the decision maker has unreasonable views (either in the optimistic or the pessimistic direction), and because the correct solution is always between these immoderate extremes, we call our solution procedure the ‘method of moderation.’
Results are shown in Figure 3; a reader with very good eyesight might be able to detect the barest hint of a discrepancy between the Truth and the Approximation at the far righthand edge of the ﬁgure.
Often it is useful to know the value function as well as the consumption rule. Fortunately, many of the tricks used when solving for the consumption rule have a direct analogue in approximation of the value function.
Consider the perfect foresight (or “optimist’s”) problem in period :
|
|
where is the present discounted value of consumption. A similar function can be constructed recursively for earlier periods, yielding the general expression
|
| (10) |
where the second line uses the fact demonstrated in Carroll (2023b) that .
This can be transformed as
|
|
and since is a constant while the consumption function is linear, will also be linear.
We apply the same transformation to the value function for the problem with uncertainty (the “realist’s” problem):
|
|
and an excellent approximation to the value function can be obtained by calculating the values of at the same gridpoints used by the consumption function approximation, and interpolating among those points.
However, as with the consumption approximation, we can do even better if we realize that the function for the optimist’s problem is an upper bound for the function in the presence of uncertainty, and the value function for the pessimist is a lower bound. Analogously to (7), deﬁne an upper-case
|
| (11) |
and an upper-case version of the equation in (8):
|
| (12) |
and if we approximate these objects then invert them (as above with the and functions) we obtain a very high-quality approximation to our inverted value function at the same points for which we have our approximated value function:
|
| (13) |
from which we obtain our approximation to the value function as
|
| (14) |
Although a linear interpolation that matches the level of at the gridpoints is simple, a Hermite interpolation that matches both the level and the derivative of the function at the gridpoints has the considerable virtue that the derived from it numerically satisﬁes the envelope theorem at each of the gridpoints for which the problem has been solved.
Carroll (2023b) derives an upper limit for the MPC as approaches its lower bound. Using this fact plus the strict concavity of the consumption function yields the proposition that
|
| (15) |
The solution method described above does not guarantee that approximated consumption will respect this constraint between gridpoints, and a failure to respect the constraint can occasionally cause computational problems in solving or simulating the model. Here, we describe a method for constructing an approximation that always satisﬁes the constraint.
Deﬁning as the ‘cusp’ point where the two upper bounds intersect:
|
|
we want to construct a consumption function for that respects the tighter upper bound:
Again deﬁning , the object in the middle of the inequality is
As approaches , converges to zero, while as approaches , approaches .
As before, we can derive an approximated consumption function; call it . This function will clearly do a better job approximating the consumption function for low values of while the previous approximation will perform better for high values of .
For middling values of it is not clear which of these functions will perform better. However, an alternative is available which performs well. Deﬁne the highest gridpoint below as and the lowest gridpoint above as . Then there will be a unique interpolating polynomial that matches the level and slope of the consumption function at these two points. Call this function .
Using indicator functions that are zero everywhere except for speciﬁed intervals,
|
|
we can deﬁne a well-behaved approximating consumption function
|
| (16) |
This just says that, for each interval, we use the approximation that is most appropriate. The function is continuous and once-diﬀerentiable everywhere, and is therefore well behaved for computational purposes.
We now construct an upper-bound value function implied for a consumer whose spending behavior is consistent with the reﬁned upper-bound consumption rule.
For , this consumption rule is the same as before, so the constructed upper-bound value function is also the same. However, for values matters are slightly more complicated.
Start with the fact that at the cusp point,
|
|
But for all ,
|
|
and we assume that for the consumer below the cusp point consumption is given by so for
|
|
which is easy to compute because where is as deﬁned above because a consumer who ends the current period with assets exceeding the lower bound will not expect to be constrained next period. (Recall again that we are merely constructing an object that is guaranteed to be an upper bound for the value that the ‘realist’ consumer will experience.) At the gridpoints deﬁned by the solution of the consumption problem can then construct
|
|
which yields the appropriate vector for constructing and . The rest of the procedure is analogous to that performed for the consumption rule and is thus omitted for brevity.
The method proposed here is not universally applicable. For example, the method cannot be used for problems for which upper and lower bounds to the ‘true’ solution are not known. But many problems do have obvious upper and lower bounds, and in those cases (as in the consumption example used in the paper), the method may result in substantial improvements in accuracy and stability of solutions.
Carroll, Christopher D. (2006): “The Method of Endogenous Gridpoints for Solving Dynamic Stochastic Optimization Problems,” Economics Letters, 91(3), 312–320, https://www.econ2.jhu.edu/people/ccarroll/EndogenousGridpoints.pdf.
__________ (2023a): “Solving Microeconomic Dynamic Stochastic Optimization Problems,” Econ-ARK REMARK.
__________ (2023b): “Theoretical Foundations of Buﬀer Stock Saving,” Submitted.


CoderUCI
Home
(current)
Explore
Search
Notifications
publish
Publish
Notifications
My Questions
Log out
Sign in


North Carolina’s famed Cold Mountain is on fire
ASHEVILLE, N.C. (AP) -- North Carolina’s famed Cold Mountain is on fire.
The Raleigh News & Observer reports that a U.S. Forest Service video shows orange flames and white smoke along multiple spots on the mountain’s ridge.
The mountain has been featured in a popular novel and an award-winning movie.
Charles Frazier’s best-selling book “Cold Mountain” is about a Confederate soldier’s journey through western North Carolina. The book was adapted into a 2003 movie starring Jude Law, Nicole Kidman and Renee Zellweger.
(Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.)
11/21/2019 2:25:04 PM (GMT -5:00)


basic token interface
More...
basic token interface
@brief Abstract token baseclass.
| def google.appengine._internal.antlr3.tokens.Token.getChannel |
( |
|
self | ) |
|
@brief Get the channel of the token
Using setter/getter methods is deprecated. Use o.channel instead.
| def google.appengine._internal.antlr3.tokens.Token.getCharPositionInLine |
( |
|
self | ) |
|
@brief Get the column of the tokens first character,
Columns are numbered 0..n-1
Using setter/getter methods is deprecated. Use o.charPositionInLine instead.
| def google.appengine._internal.antlr3.tokens.Token.getInputStream |
( |
|
self | ) |
|
@brief From what character stream was this token created.
You don't have to implement but it's nice to know where a Token
comes from if you have include files etc... on the input.
| def google.appengine._internal.antlr3.tokens.Token.getLine |
( |
|
self | ) |
|
@brief Get the line number on which this token was matched
Lines are numbered 1..n
Using setter/getter methods is deprecated. Use o.line instead.
| def google.appengine._internal.antlr3.tokens.Token.getText |
( |
|
self | ) |
|
@brief Get the text of the token.
Using setter/getter methods is deprecated. Use o.text instead.
| def google.appengine._internal.antlr3.tokens.Token.getTokenIndex |
( |
|
self | ) |
|
@brief Get the index in the input stream.
An index from 0..n-1 of the token object in the input stream.
This must be valid in order to use the ANTLRWorks debugger.
Using setter/getter methods is deprecated. Use o.index instead.
| def google.appengine._internal.antlr3.tokens.Token.getType |
( |
|
self | ) |
|
@brief Get the type of the token.
Using setter/getter methods is deprecated. Use o.type instead.
| def google.appengine._internal.antlr3.tokens.Token.setChannel |
( |
|
self, |
|
|
|
channel |
|
) |
| |
@brief Set the channel of the token
Using setter/getter methods is deprecated. Use o.channel instead.
| def google.appengine._internal.antlr3.tokens.Token.setCharPositionInLine |
( |
|
self, |
|
|
|
pos |
|
) |
| |
@brief Set the column of the tokens first character,
Using setter/getter methods is deprecated. Use o.charPositionInLine instead.
| def google.appengine._internal.antlr3.tokens.Token.setInputStream |
( |
|
self, |
|
|
|
input |
|
) |
| |
@brief From what character stream was this token created.
You don't have to implement but it's nice to know where a Token
comes from if you have include files etc... on the input.
| def google.appengine._internal.antlr3.tokens.Token.setLine |
( |
|
self, |
|
|
|
line |
|
) |
| |
@brief Set the line number on which this token was matched
Using setter/getter methods is deprecated. Use o.line instead.
| def google.appengine._internal.antlr3.tokens.Token.setText |
( |
|
self, |
|
|
|
text |
|
) |
| |
@brief Set the text of the token.
Using setter/getter methods is deprecated. Use o.text instead.
| def google.appengine._internal.antlr3.tokens.Token.setTokenIndex |
( |
|
self, |
|
|
|
index |
|
) |
| |
@brief Set the index in the input stream.
Using setter/getter methods is deprecated. Use o.index instead.
| def google.appengine._internal.antlr3.tokens.Token.setType |
( |
|
self, |
|
|
|
ttype |
|
) |
| |
@brief Get the type of the token.
Using setter/getter methods is deprecated. Use o.type instead.
The documentation for this class was generated from the following file:
- code/googleappengine-read-only/python/google/appengine/_internal/antlr3/tokens.py


About Me
Full-Stack Web Developer Lindsey Bordner received her introduction to coding through the University of Minnesota Coding Bootcamp. Having had a fruitful career performing and teaching the violin, Lindsey brings to the table invaluable experience of business ownership, contractor management, customer service, communication, and artistic expression. Integral to both professions is a lifelong commitment to learning and honing one's skill. Lindsey's analytical nature, attention to detail, and enjoyment of solving puzzles lend well to her web development success.
Lindsey holds degrees from the University of Minnesota and the University of Michigan. She lives in St. Paul, MN and in her free time enjoys going on walks with her husband and two dogs, playing video games, gardening, and playing music with friends.


Seven creepy 'public service films' that nearly scarred British children for life
Whether it's Charlie the Cat, Tufty the Squirrel, or a killer fridge, these British public information films will scare you straight
by Hannah Dodd, https://www.facebook.com/JournoDodd/Safety warnings for children also walk a fine line - serious enough to get the message across without being so troubling that your little one is traumatised.
Kids of the 90s may well remember the polite but stern 'Not the child- The sparkler' ads, maybe even the cute 'King of the Road' Safety Hedgehogs'.
But for the generation before that, the video arm of the now defunct 'Central Office of Information' clearly had an 'anything goes policy' when it came to public safety videos.
From the grim reaper delighting in a child drowning, to a cat intervening in a child abduction case, these are the nightmarish cautionary tales that a generation were raised on.
1. Don't Start November 6th Like This (1970s-1980s)
For a generation that wore that much nylon anything flammable was a risk, but to say the ads where on the terrifying side was an understatement.
The ad showed a little girl who had decided to handle a sparkler, not knowing they could remain hot long after they'd burnt out.
As you might imagine the caption 'Don't start November 6th like this' followed by a bandaged child, was enough to scare most children away from sparklers for life.
2. Don't Fool Around With Fireworks And 'Eyes' ad (1970s)
The stepped up versions of these adverts, aimed at older children, included a firework exploding in a child's face after being thrown at her.
But one ad in particular that scared us witless was shot entirely from behind the child, later revealing he had been blinded by a firework that also "exploded in his face".
But despite their seemingly over the top message, fireworks when handled improperly are a real danger. Stay safe out there.
3.) Lonely Water (1973)
The film aimed at seven to ten-year-olds was commissioned by the COI in response to the high number of child drowning cases in the UK during the 1970s.
The sombre film involved a creepy voice over from none other than 'The spirit of lonely water' who looked an awful lot like, well, the grim reaper.
The commentary opens with "I am the spirit of dark and lonely water: ready to trap the unwary, the showoff, the fool..." and to a shot of the grim reaper in the reeds (Comforting).

The voice then says "the show offs are easy, but the unwary ones are easier still" as another child is dragged to a watery grave.
Cut to a shot of the danger no swimming sign, with the voice saying "Only a fool would ignore this. But there's one born every minute."

The spirit of lonely water says "sensible children, I have no power over them" before dissolving and maniacally cackling "I'll be back" as the children throw his shawl into the water.
But as most of the children who watched it at the time will tell you what the film actually did was deter most children from swimming ever again.
4. Charlie Says, Strangers (1970s -1980s)
"Charlie Says" was a series of six short animated films about a boy called Tony and his cat Charlie aimed at children.
Charlie, a cat with a voice that grated worse than your tape getting stuck recording Top 40, used to warn Tony (who would translate his garblings) against everything from matches to scalding hot kettles.
But one episode that continues to haunt the memories of British children everywhere was about never going off with strangers.
The film starts with Tony saying "Charlie and I were in the park. Then this man came up and said would I like to see some puppies?
"And I said Yes. And I was going to go but Charlie stopped me.
It finishes with Tony saying "Charlie's reminded me I shouldn't go off with people I don't know. Then the man went away. We went and told mummy and she said we'd been very good."
The film provides a haunting window to the past, to a decade living in the wake of the Moors' murders, a time where many people mistakenly believed only strangers hurt children.
5.
This was a genuine public information film, illustrating the dangers of discarded 'lock' friges.
And in fairness they were very dangerous, if a child got locked inside they could suffocate, because as the advert points out, fridges were impossible to open from the inside.
The advert opened with the line, "to her it's a caravan, a ship, a castle, even a bed".
The wonder of magnetic locks has somewhat diminished this threat but the creepy film still remains.
6. Play Safe, 1978
Play Safe consisted of three films, highlighting the dangers of playing near electrical equipment such as overhead lines, electrical substations and pylons.
Each film was part of a longer film to be shown in schools, and as you might expect some dramatic license was used to scare children straight.
It was commissioned by the Electricity Council, and featured an animated robin and owl.
But the final film Frisbee, was not narrated, and struck rather a more sombre tone.
The film showed two children sneaking into a substation to retrieve a frisbee, the children had seen older children sneak in the week before, and Jimmy decides to go first.
He climbs onto a transducer, and the last thing we see is his legs on fire and his friend screaming "Jimmy".
The radio plays telling viewers that a sixty six thousand volt shock killed a boy when he broke into a substation.
The last scene showed a cap and school blazer lying vacant near the porch. Bleak.
The film was later replaced with a film called 'Powerful Stuff' which placed a greater emphasis on older children.
7. Tufty the Squirell, 1970s
On the surface Tufty is no more scary than any of the clangers, the Magic Roundabout characters, or Rainbow puppets of the 70s.
But there's something about Tufty's lifeless eyes that unnerve people.
That and the fact most of Tufty's woodland palls keep getting hit by trucks which is rather a downer for children.
Tufty's information films definitely aren't for the iPhone generation, but at the time he was a dynamite way of teaching young children about road safety.
But one problem with the films lies in the fact the cartoons tone has aged really badly.

Not one person rang an ambulance, then again in those days it probably would have come rather late anyway.


Skip to main
Enter some information to get started…
Domain name?
Contact name?
Company name?
Locations
Add Another


Learning Space
home
about us
Resources
E-cell
Account
Change password
Current Password
New Password
Re-confirm Password
Submit
My Details
My Name:
My E-mail:
My Company:
ISO number:
Logout


Put Sleeping Baby in Crib without Waking Them Up
As a new parent, one of the most frustrating things is when you can’t put your sleeping baby down in the crib because they keep waking up every time …
As a new parent, one of the most frustrating things is when you can’t put your sleeping baby down in the crib because they keep waking up every time …
October is fast approaching and before you know it, Halloween will come knocking on your door. If you’re a new mommy, you’re probably looking for tips on Halloween costumes. …
So, you want to breastfeed but are worried that you will not have a large enough breast milk supply? It’s a concern for many moms out there. Here are …
There are many options when choosing to use essential oils for breastfeeding. It’s important to be safe and do your research before using them and always consult your doctor …
Hair loss in newborn babies can be a surprise for new parents. While not all infants lose their hair, many develop at least a few bald spots during their first …
As a photographer, it’s my goal to capture every ounce of love possible with the camera in my hands. As a mama, I take so many photos of my …


Company logo
Requirements
Test Plan
Test Analyses
Test Execution
Issues
Reports
Administration
Dashboards
Test Plan:
Edit | Delete
Test Plan Status
Related content:
Add
Jira link:
https://denevy.atlassian.net/secure/Dashboard.jspa
Delete | Edit
Other link:
https://portal.denevy.eu/secure/Dashboard.jspa
Delete | Edit
Test Release 01-2018
Folder/Sprint/Campaign
Change 201805
90%
UMP ZOPS 2018
2<IP_ADDRESS> Messaging app receiver AO_MT_no limit exceeded
2<IP_ADDRESS> Messaging app sender AO_MT_no billing key
Limits
2<IP_ADDRESS> Messaging content receiver AO_MT_daily limit exceeded
2<IP_ADDRESS> Messaging content receiver AO_MT_monthly limit exceeded
2<IP_ADDRESS> Messaging content receiver AO_MT_wrong CDR
2<IP_ADDRESS> Messaging content receiver MO_AT_monthly limit exceeded
Add or Edit Test Set | List of Test Case
NoRun
NoRun
Failed
Failed
Passed
Passed
Bug 458
Bug 121
Start date
Due date
1.1.2017
3.2.2018
Test Set | Test Case
Status Defect ID


wall TCs ingrowth cells deposition Plant Arabidopsis phloem transfer {border-style ingrowths px;} staining #ffffff;} leaves cell transcription vein localized Haritatos loading Amiard Edwards Offler leaf sucrose transcriptional Calcofluor analysis expression low regulators Andriunas McCurdy Patrick development epidermal faba genes minor veins Cell MYB-related Maeda NAC-domain factors gene identify increased px; regulating role {font-family Atg Chen TCs. Transfer Vicia cells. fluorescence font-size formation gi- levels mutant stress unloading using Arabidopsis. GIGANTEA Gunning University Wall White abundance adjacent apoplasmic bioinformatics double; electron genetic however, membrane observation occur pathway plants plasma putative reduced response secondary showed sugar tissue various Aniline CCs MYB Pate Physiol. SALK_ Sci. Zhong approach border-color border-width component consistent cotyledons double endosperm high-light highly identified involved parenchyma pathways plant seen sieve signals solid; temperature trans-differentiation used {font-style {font-weight AtSWEET Blue Demmig-Adams Frontiers Furthermore, New Phytol. Planta Protoplasma SE/CC Zhang acid bold candidate commonly compared complex cotyledons. courier; deposition, deposition. em; experimental export genes. identification jasmonate loading, methyl molecular physiological post-phloem pt;} regulates regulatory signal species species, switches thaliana. types vascular wild-type


This privacy policy has been compiled to better serve those who are concerned with how their 'Personally Identifiable Information' (PII) is being used online. PII, as described in US privacy law and information security, is information that can be used on its own or with other information to identify, contact, or locate a single person, or to identify an individual in context. Please read our privacy policy carefully to get a clear understanding of how we collect, use, protect or otherwise handle your Personally Identifiable Information in accordance with our website.
The VENu app requests the use of the camera only to scan the QR profile of the VR viewer the user wishes to use. No image will be stored on the device or sent to us or to other third parties.
This Application may ask for some Facebook permissions allowing it to perform actions with the User's Facebook account and to retrieve information, including Personal Data, from it.
For more information about the following permissions, refer to the Facebook permissions documentation and to the Facebook privacy policy.
The permissions asked are the following:
By default, this includes certain User’s Data such as id, name, picture, gender, and their locale. Certain connections of the User, such as the Friends, are also available. If the User has made more of their Data public, more information will be available.
Provides read access to the publish to user's timeline (only after user approval).
We only collect the name and the e-mail address from visitors that leave a feedback in our contact form. Visitors are free to leave the name and e-mail field empty.
We use your name and e-mail address only to respond to you in case you have questions.
We do not use vulnerability scanning and/or scanning to PCI standards. We only provide articles and information. We never ask for credit card numbers. We do not use Malware Scanning. We do not use an SSL certificate.
This is because we never ask for credit card numbers.
We do not use cookies for tracking purposes. You can choose to have your computer warn you each time a cookie is being sent, or you can choose to turn off all cookies. You do this through your browser settings. Since browser is a little different, look at your browser's Help Menu to learn the correct way to modify your cookies. If you turn cookies off, some features will be disabled.
We do not sell, trade, or otherwise transfer to outside parties your Personally Identifiable Information.
We do not include or offer third-party products or services on our website.
When it comes to the collection of personal information from children under the age of 13 years old, the Children's Online Privacy Protection Act (COPPA) puts parents in control. The Federal Trade Commission, United States' consumer protection agency, enforces the COPPA Rule, which spells out what operators of websites and online services must do to protect children's privacy and safety online.We do not specifically market to children under the age of 13 years old.
The CAN-SPAM Act is a law that sets the rules for commercial email, establishes requirements for commercial messages, gives recipients the right to have emails stopped from being sent to them, and spells out tough penalties for violations.
Send information, respond to inquiries, and/or other requests or questions
Not use false or misleading subjects or email addresses. Identify the message as an advertisement in some reasonable way. Include the physical address of our business or site headquarters. Monitor third-party email marketing services for compliance, if one is used. Honor opt-out/unsubscribe requests quickly. Allow users to unsubscribe by using the link at the bottom of each email.
<EMAIL_ADDRESS>and we will promptly remove you from correspondence.
If there are any questions regarding this privacy policy, you may contact us using the information below. VENu Denys Wilkinson Building Oxford, Oxfordshire OX1 3RH United Kingdom<EMAIL_ADDRESS>Last Edited on 2017-02-09


“The first ₹1,00,00,000 is a bitch, but you gotta do it.
I don’t care what you have to do—if it means walking everywhere and not eating anything that
wasn’t purchased with a
coupon, find a way to get your hands on ₹1,00,00,000.
After that, you can ease off the gas a little bit.”
If you reach ₹1Crore quickly, that means you have high earning power.
Let’s say you start a
successful
small business or are in a well-paid professional field. Well, you have the saving
potential to
reach the
millionaire level, you just have to keep it by not increasing your spending accordingly.
If you reach ₹1Crore gradually, that means you have built up a strong habit of spending less than
you
earn.
Let’s say it takes you a decade of steady saving to reach ₹1Crore. That’s okay, as
you’ve shown
that have both consistent earning power and spending restraint. You’ll be able to save another ₹1Crore
over the next
decade for sure, meanwhile your first ₹1Crore is going to keep on growing.
At the ₹1Crore level, compound interest become significant.
At 5% return, your ₹1Crore will
grow
by ₹5,00,000 in just one year. That’s ₹5,00,000 for doing nothing but waiting around for a year. The
year
after that, you
won’t just have another ₹5,00,000. You’ll have ₹5,25,000 due to compound interest. At the end of five
years,
that ₹1Crore is
already ₹1,27,62,815.63


@* * Copyright 2021 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *@ @import config.FrontendAppConfig @(appConfig: FrontendAppConfig, c: Case, getCountryName: String => Option[String])(implicit request: Request[_], messages: Messages) @createLink(path: String)(implicit req: play.api.mvc.Request[_]) = @{ s"${appConfig.host}${routes.Assets.versioned(path)}" } @main_template( title = s"${messages("rulingInformation.title")}", appConfig = appConfig, contentClass = Some("column-full pl-0"), bodyClasses = None) {
@rulingCoverLetterTemplate(appConfig, c, c.decision.get, getCountryName: String => Option[String], compositeMode = true)


Welcome to my personal website! For information on how this website was created and hosted, please see the documentation page.
This website is currently a work in progress and updates will be made as I find time. You can follow development and make suggestions on GitHub.


miniprolog
[source] [example]Miniprolog is a minimalist prolog interpeter. It does not contain cuts, arithmetic, lists, or equality – just basic Horn clauses.
The terms of the language consist of:
- constants, which are strings of alphanumeric characters, starting with a lower case letter.
- variables, which are strings of alphanumeric characters, starting with a upper case letter.
- composite terms of the form
f(t1, ..., tn)
wheref
is a constant andt1
, …,tn
are terms.
Examples of terms are: x
, y
, X
, A
, son(abel, adam)
, less(X, plus(X, one))
.
You may type in assertions and queries. An atomic assertion is written as a term followed by a period,
assertion.
an inference rule (complex assertion) is written as
goal :- subgoal1, ..., subgoalN.
where assertion
, goal
, subgoal1
, …, subgoalN
are terms. A query is written as
(including the “?-
”)
?- query.
where query is a term. You may type assertions and queries at the command line or place them in a file. See the enclosed examples.
Sample session, see also the file example.miniprolog
.
miniProlog -- programming languages zoo
Type Ctrl-D to exit
miniProlog> it_is_raining.
miniProlog> no_umbrella.
miniProlog> i_am_wet :- it_is_raining, no_umbrella.
miniProlog> ?- i_am_wet.
Yes
miniProlog> ?- i_am_dry.
No
miniProlog> child(luke, vader).
miniProlog> child(leia, vader).
miniProlog> ?- child(X, vader).
X = luke
more? (y/n) [y] y
X = leia
more? (y/n) [y] y
No
miniProlog> sibling(X,Y) :- child(X,Z), child(Y,Z).
miniProlog> ?- sibling(A,B).
A = luke
B = luke
more? (y/n) [y] y
A = luke
B = leia
more? (y/n) [y] y
A = leia
B = luke
more? (y/n) [y] y
A = leia
B = leia
more? (y/n) [y] y
No
miniProlog>


International Institute of Multiscale Materials Modeling
Multiscale Methods
Contents
Home
About us
Research
Multiscale Methods
Outreach
There are various types of multiscale methods, etc. This list is in no way exhausting. The methods below are in alphabetic order. In the coming years, there will undoubtedly be more applications to which multiscale analysis may lend itself. Please feel free to contact us if you want to add your own multiscale methods.
Concurrent Multiscale Methods
- Concurrent atomistic-continuum (CAC)
- Coupled Atomistic Discrete Dislocation (CADD)
- Embedded Statistical Coupling Method (ESCM)
- Particle-Based Multiscale Analysis Program (PMAP)
- Quasi-Continuum (QC)
Hierarchical Multiscale Methods
- Discrete Dislocation Dynamics (DDD)
- Multilevel Finite Element Method (FE2)


The factorization timer informs you about the progress of each factorization method in the dialog Factorization of a number.
Pressing the Cancel button right of the particular factorization method will preliminary stop the algorithm.
Pressing the Cancel button below the progress bars will stop all factorizations.


Moderator: Joe M.
Joe M. wrote::(
It will be nice when we hit commercial (scheduled for the summer-time) and there's enough cash coming in to support a real server. But until then we're on a pretty tight budget, and must suffer the irritation of poor service. Hopefully this will be fixed soon (usually doesn't take but a couple days--though it seems like forever, I know).
Return to Evidyon Alpha - Private
Users browsing this forum: No registered users and 1 guest


Ebook Homebrew: ElixirPerformanceTool
Checking TAT benchmark test tools for Parallel HTTP requests by Elixir.
Table of Contents
Background
One day, I needed to test the performance of Ebook Homebrew, and decided to solve it by creating a load testing tool that could send a lot of requests in parallel.
Install
Preconditions
Dependencies
Install dependencies by Mix.
mix deps.get
Installation for another modules
If available in Hex, the package can be installed
by adding elixir_performance_tool
to your list of dependencies in mix.exs
:
def deps do
[
{:elixir_performance_tool, "~> 0.1.0"}
]
end
Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/elixir_performance_tool.
Usage
Run the test by IEx.
Run the test by IEx.
iex -S mix
iex(1)> ElixirPerformanceTool.run(10, 10)
Function ElixirPerformanceTool.run
set 2 args, first one is parallel task number, second one is repeating times.
Contributing
PRs accepted.
Small note: If editing the Readme, please conform to the standard-readme specification.


Color tips in the tree that are unique to certain groups of samples. Internal nodes where all descendants are unique to a group are themselves considered unique to that group.
Color nodes in the tree based on feature metadata: for example, taxonomic annotations.
Change how the tree is drawn.
Color nodes in the tree that are unique to certain groups of samples (specified by the trajectory) at different timepoints throughout a gradient.
If checked, this draws circles at the positions of all tree nodes which had a specified name in the input Newick file.
Repositions the camera at the center of the tree.


Profile
Account
Settings
Privacy
About
Le Canon de la nation
Pint price
Example block-level help text here.
Cocktail price
Cocktail price
Check me out
Submit


Crunchbase
https://www.crunchbase.com
Companies enumerator
Search for acquisitions for widening the pentest scope


A story about me
I'm a student studying Web Development in NSCC.
Well-organised, problem solving and independent entry-level web developer with high attention to detail.
I‘m passionate about designing and developing websites with MVC and SPA pattern.
Let's make something spicial
Designer
I value simple content structure, clean design patterns, and thoughtful interactions.
Things I enjoy designing:
UX, UI, Web, Mobile, Apps
Design Tools:
Front-end Developer
I like to code things with framworks, and enjoy bringing ideas to life in the browser.
Frameworks I used:
ReactJS, Bootstrap, jQuery, Electron, AngularJS, Materialize
Language I speak:
Back-end Developer
I did some back-end work with expressJS and Laravel PHP.
Tools I used:
Terminal, Git, Heroku, Wordpress, Centos, MySQL Workbench
Lauguages I speak:
Built with React Material Framework and Spring boot Java.
Built with Asp.net and Microsoft sql server
Built with ReactJS, MongoDB and Node.js Express server.


Privacy Policy
Your privacy is important to us. This privacy policy is intended to give you confidence in the privacy and security of the personal information we obtain during your visit or engagement on CuteStat.com
However, please note that we are not responsible for any use of your personal information you provide to third-party applications or websites that may be accessed via CuteStat.com unless it is clearly mentioned below. We recommend that you review the privacy policy of any third-party applications or websites that you use.
Information We Collect
During your visit on CuteStat.com, you may be asked for personally identifiable information such as your name and email address. By providing us such information, you will need to consent to our using it in the manner described in this policy. Cookie information, pages you have requested and your IP address may also be recorded by us and/or third parties from your browser as set out in this policy.
Use of Personal Information
We use personal information to allow us to process your service requests, provide access to privileged areas of the Websites, send out newsletters, and enable us to improve the products and services we offer. We may occasionally carry out market research and send you details of services and offers that we think may be of interest to you. If you do not wish to receive such information, please e-mail us or, alternatively, when we send you an e-mail, it will contain a provision for you to opt out of receiving any further information from us.
Disclosure of Personal Information
We may provide information about you to our employees and agents in order to administer any accounts, products and services provided to you by us. We will not disclose your personal information to any third party unless you have consented to such disclosure or where we are required to do so by law.
Cookies
Cookies are small data files that a website you visit may save on your computer or handheld device that usually includes an anonymous unique identifier. Our Websites and those of our Products may use cookies for user authentication, keeping track of your preferences, promotional campaigns, tracking our audience size and traffic patterns, and in certain other cases.
As you browse CuteStat.com, advertising cookies will be placed on your computer so that we can understand what you are interested in. Our display advertising partner, Google Adwords, then enables us to present you with retargeting advertising on other sites based on your previous interaction with CuteStat.com. The techniques our partners employ do not collect personal information such as your name, email address, postal address or telephone number. You can visit this page to opt out of targeted advertising.
If you have any questions & issues regarding the policy then you may contact us.
NOTES:
Information that our tools generates is freely and openly available from different sources and we don't have any control over them.
Our tools may generate a cache copy of information that will be refreshed after certain period. Which means even you have changed the information on your end our tools may display it's cached copy for the time being.
Changes to this policy
We reserves the right to change our Privacy Policy at any time to adjust it with the new services and tools that we launch. As we don't inform everyone, we suggest you (our users) to check this page periodically for any changes. Your continued use of our website, services and tools means that you accept those changes.
Our Privacy Policy was Last Updated on May 07, 2013
Worldwide Top 15 Websites Ordered by Alexa Traffic Rank
| google.com | youtube.com | facebook.com | baidu.com | ||||
| wikipedia.org | taobao.com | tmall.com | yahoo.com | ||||
| amazon.com | twitter.com | sohu.com | jd.com | ||||
| live.com | vk.com | instagram.com | More Topsites |
| Recently Analyzed | Alexa | Worth | Updated | |
|---|---|---|---|---|
| motoburg.com | 6,092,586 | $ 240.00 | 6 seconds ago | |
| igverified.xyz | 16,692,735 | $ 8.95 | 16 seconds ago | |
| derobux.top | N/A | $ 8.95 | 33 seconds ago | |
| dailyskins4free.com | N/A | $ 8.95 | 40 seconds ago | |
| csgoget.win | 3,028,924 | $ 480.00 | 1 minute ago | |
| softwebtuts.com | 2,767,537 | $ 480.00 | 1 minute ago | |
| playcsgo.win | 19,713,170 | $ 8.95 | 2 minutes ago | |
| legendstricks.com | N/A | $ 8.95 | 3 minutes ago | |
| win90look.xyz | 1,383,316 | $ 960.00 | 3 minutes ago | |
| srilanka-ferien.net | 17,398,987 | $ 8.95 | 3 minutes ago |


HackMerced is looking for a wide range of skilled engineers, designers, leaders, and creatives. This year, we created not just leadership roles, but also constructive and career-focused jobs for those with a strict schedule or the ambition to learn new skills. All applicants will get an initial interview to determine if you will be on the team or not.
We also have an FAQ for you below the job listings!
Join the HackMerced Team!
As spots fill up we will remove them from this list!!!!
Please review the roles below and follow the "Apply now" link to send us your application.
We are looking forward to hearing from you! It's going to be an amazing event!
NOTE: We may be accepting more than one applicant for some positions, such as Software Engineering.
Filter Role
Role Listings
{% for job in jobs['jobs'] %}
{{ job.Role }}
{{ job.Division }}
{% if job.Leadership == "Yes" %}
Leadership
{% endif %}
Description
{{ job.Description }}
What we look for:
{% for reqs in job.Requirements %}
{{ reqs }}
{% endfor %}
Things that aren't required but will help your application:
{% for opts in job.Optional %}
{{ opts }}
{% endfor %}
{% endfor %}
FAQ
Are these positions paid?
No, we are solely a school organization that is run entirely by volunteers.
Why should I contribute?
If you have a strong desire to help the Merced community as well as gain experience working in a professional environment, we recommend working with us!
Do I need to be a programmer?
No, most of our roles are actually non-programming positions that are open to a wide skill-set of students, including Finance, Administration, Product Management, and Human Resources.
Is it hard to get in?
No, we are very accepting to all ranges of skill level and offer a variety of positions to accomodate all.
Do I need to work a lot?
We believe that as long as you have the desire and drive to make HackMerced amazing, you won't even notice how much you work! That being said, HackMerced is not usually a low-commitment position, and since we want to train you for real life employment we will try to engage you for at least 3-7 hours a week.
Can I still participate in HackMerced if I work here?
Yes, as long as you are not a Director.
What happened to the students last year?
In the last two years, we've worked with a small cohort of students that have excelled tremendously both in school and in real life. They have taken what they've learned in leading HackMerced to positions and offers at companies including: Google, Microsoft, Roche, Apple, Pandora, PayPal, Sony, Lockheed Martin, Goldman Sachs, Qualcomm, Esri, and much much more!


The requested page was not found on this website!
If you did not mean the above website, your page was either moved into a diffrent or new folder, deleted, or was never created.
If you do nothing, you will be redirected to to the above page in .
Or click here to go to the home page.


I really like this puzzle, although the one I bought didn't turn very well and eventually broke.
Get it back into cube shape, but do it without disturbing the current parity of the middle slices. That is, a single 45-degree rotation of a middle slice is fine, but it must be undone. In other words, such rotations are fine as setup moves.
For example, do a single 45-degree rotation of a middle slice as a setup, then tri-cycle edge locations to get center and edge pieces in their proper locations, even if not in their proper orientations, then undo the setup.
To orient edges in edge locations when they're off by 90-degrees (as apposed to 180-degrees, which is only possible on a 3x3),
I use (1/2)Zi,Xi,F,X,(1/2)Z
.
Note that, collectively, there will be a proper orientation of the center pieces, but this won't be clear until the puzzle is nearly solved.
Once back in cube shape, get the centers in proper position relative to one another, then try solving as a 3x3. If doing layer-solve, the last layer will tell you what kind of parity problem(s), if any, you have.
For example, if a single edge is flipped (which can't happen on a 3x3), then simply do a setup move that allows you to flip that edge with a center put in an edge location (since edges are flipped in pairs on a 3x3.)
If everything is solved, except two corners need to swap, then you need to do a 45-degree rotation of any middle slice, then begin again at step 1 above.


Dandy is a fashionable space explorer on the hunt for aliens that have never been seen previously. For every new species Dandy discovers, he gets a significant reward. But he's not the only one searching for the aliens, and he must be quick because alien hunting is a first come, first served profession. Helping Dandy on his intergalactic quest are his sidekicks, rundown robot QT and cat-looking space alien Meow. The best-dressed alien hunter in space explores unknown, alien-inhabited worlds on an adventure that ends at the edge of the universe. RATED R(RESTRICTED)
ExecuteIn the year 2071, humanity has colonized several of the planets and moons of the solar system leaving the now uninhabitable surface of planet Earth behind. The Inter Solar System Police attempts to keep peace in the galaxy, aided in part by outlaw bounty hunters, referred to as "Cowboys". The ragtag team aboard the spaceship Bebop are two such individuals. RATED R
ExecuteOne Piece is a Japanese manga series written and illustrated by Eiichiro Oda. It has been serialized in Shueisha's Weekly Shōnen Jump magazine since July 19, 1997, with the chapters collected into eighty-two tankōbon volumes to date. RATED PG
ExecuteMoments prior to Naruto Uzumaki's birth, a huge demon known as the Kyuubi, the Nine-Tailed Fox, attacked Konohagakure, the Hidden Leaf Village, and wreaked havoc. In order to put an end to the Kyuubi's rampage, the leader of the village, the Fourth Hokage, sacrificed his life and sealed the monstrous beast inside the newborn Naruto. Now, Naruto is a hyperactive and knuckle-headed ninja still living in Konohagakure. Shunned because of the Kyuubi inside him, Naruto struggles to find his place in the village, while his burning desire to become the Hokage of Konohagakure leads him not only to some great new friends, but also some deadly foes. RATED PG
ExecuteJoJo's Bizarre Adventure is a Japanese manga series written and illustrated by Hirohiko Araki. It was originally serialized in Weekly Shōnen Jump from 1986 to 2004, before being transferred to the monthly seinen magazine Ultra Jump in 2005. RATED PG-13
Execute


| Class and Description |
|---|
| KeyPair
Class KeyPair
|
| Class and Description |
|---|
| Image
An image is a collection of files you use to create or rebuild a server.
|
| Class and Description |
|---|
| KeyPair
Class KeyPair
|
| Class and Description |
|---|
| FloatingIP
A Floating IP is an IP address that can be created and associated with a
Server instance.
|
| Image.Status
In-flight images will have the status attribute set to SAVING and the conditional progress
element (0-100% completion) will also be returned.
|
| KeyPair
Class KeyPair
|
| Server.Status
Servers contain a status attribute that can be used as an indication of the current server
state.
|
| Class and Description |
|---|
| SecurityGroup
Defines a security group
|
| Class and Description |
|---|
| FloatingIP
A Floating IP is an IP address that can be created and associated with a
Server instance.
|
| Image
An image is a collection of files you use to create or rebuild a server.
|
| Image.Status
In-flight images will have the status attribute set to SAVING and the conditional progress
element (0-100% completion) will also be returned.
|
| SecurityGroup
Defines a security group
|
| SecurityGroupRule
Defines a security group rule
|
| Server.Status
Servers contain a status attribute that can be used as an indication of the current server
state.
|
| Class and Description |
|---|
| FloatingIP
A Floating IP is an IP address that can be created and associated with a
Server instance.
|
| KeyPair
Class KeyPair
|
| Class and Description |
|---|
| KeyPair
Class KeyPair
|
| Class and Description |
|---|
| HostResourceUsage
Class HostResourceUsage
|
| Server
A server is a virtual machine instance in the compute system.
|
| ServerWithSecurityGroups
Extended server returned by ServerWithSecurityGroupsApi
|
| Class and Description |
|---|
| Address
IP address
|
| Address.Builder |
| BackupType |
| Flavor
A flavor is an available hardware configuration for a server.
|
| Flavor.Builder |
| FloatingIP
A Floating IP is an IP address that can be created and associated with a
Server instance.
|
| FloatingIP.Builder |
| Host
Class Host
|
| Host.Builder |
| HostAggregate
Aggregates can be manipulated using the Aggregate Extension to Nova (alias "OS-AGGREGATES")
|
| HostAggregate.Builder |
| HostResourceUsage
Class HostResourceUsage
|
| HostResourceUsage.Builder |
| Image
An image is a collection of files you use to create or rebuild a server.
|
| Image.Builder |
| Image.Status
In-flight images will have the status attribute set to SAVING and the conditional progress
element (0-100% completion) will also be returned.
|
| Ingress
Ingress access to a destination protocol on particular ports
|
| Ingress.Builder |
| KeyPair
Class KeyPair
|
| KeyPair.Builder |
| Quota
Represents the set of limits (quotas) returned by the Quota Extension
|
| Quota.Builder |
| QuotaClass
Represents the set of limits (quota class) returned by the Quota Class Extension
|
| QuotaClass.Builder |
| RebootType |
| SecurityGroup
Defines a security group
|
| SecurityGroup.Builder |
| SecurityGroupRule
Defines a security group rule
|
| SecurityGroupRule.Builder |
| SecurityGroupRule.Cidr |
| Server
A server is a virtual machine instance in the compute system.
|
| Server.Builder |
| Server.Status
Servers contain a status attribute that can be used as an indication of the current server
state.
|
| ServerCreated
Server Resource with administrative password returned by ServerApi#CreateServer calls
|
| ServerCreated.Builder |
| ServerExtendedAttributes
Additional attributes delivered by Extended Server Attributes extension (alias "OS-EXT-SRV-ATTR")
|
| ServerExtendedAttributes.Builder |
| ServerExtendedStatus
Additional attributes delivered by Extended Server Status extension (alias "OS-EXT-STS")
|
| ServerExtendedStatus.Builder |
| ServerWithSecurityGroups
Extended server returned by ServerWithSecurityGroupsApi
|
| ServerWithSecurityGroups.Builder |
| SimpleServerUsage
Information the SimpleTenantUsage extension return data about each Server
|
| SimpleServerUsage.Builder |
| SimpleServerUsage.Status |
| SimpleTenantUsage
Information the SimpleTenantUsage extension returns data about each tenant
|
| SimpleTenantUsage.Builder |
| TenantIdAndName
Class TenantIdAndName
|
| TenantIdAndName.Builder |
| VirtualInterface
Represents a Virtual Interface (VIF)
|
| VirtualInterface.Builder |
| Volume
An OpenStack Nova Volume
|
| Volume.Builder |
| Volume.Status |
| VolumeAttachment
An OpenStack Nova Volume Attachment (describes how Volumes are attached to Servers)
|
| VolumeAttachment.Builder |
| VolumeSnapshot
An OpenStack Nova Volume Snapshot
|
| VolumeSnapshot.Builder |
| VolumeType
Volume Type used in the Volume Type Extension for Nova
|
| VolumeType.Builder |
| Class and Description |
|---|
| Flavor
A flavor is an available hardware configuration for a server.
|
| Image
An image is a collection of files you use to create or rebuild a server.
|
| SecurityGroup
Defines a security group
|
| Server
A server is a virtual machine instance in the compute system.
|
| Class and Description |
|---|
| BackupType |
| FloatingIP
A Floating IP is an IP address that can be created and associated with a
Server instance.
|
| Host
Class Host
|
| HostAggregate
Aggregates can be manipulated using the Aggregate Extension to Nova (alias "OS-AGGREGATES")
|
| HostResourceUsage
Class HostResourceUsage
|
| Ingress
Ingress access to a destination protocol on particular ports
|
| KeyPair
Class KeyPair
|
| Quota
Represents the set of limits (quotas) returned by the Quota Extension
|
| QuotaClass
Represents the set of limits (quota class) returned by the Quota Class Extension
|
| SecurityGroup
Defines a security group
|
| SecurityGroupRule
Defines a security group rule
|
| ServerWithSecurityGroups
Extended server returned by ServerWithSecurityGroupsApi
|
| SimpleTenantUsage
Information the SimpleTenantUsage extension returns data about each tenant
|
| VirtualInterface
Represents a Virtual Interface (VIF)
|
| Volume
An OpenStack Nova Volume
|
| VolumeAttachment
An OpenStack Nova Volume Attachment (describes how Volumes are attached to Servers)
|
| VolumeSnapshot
An OpenStack Nova Volume Snapshot
|
| VolumeType
Volume Type used in the Volume Type Extension for Nova
|
| Class and Description |
|---|
| Flavor
A flavor is an available hardware configuration for a server.
|
| Image
An image is a collection of files you use to create or rebuild a server.
|
| RebootType |
| Server
A server is a virtual machine instance in the compute system.
|
| ServerCreated
Server Resource with administrative password returned by ServerApi#CreateServer calls
|
| Class and Description |
|---|
| Flavor
A flavor is an available hardware configuration for a server.
|
| Image
An image is a collection of files you use to create or rebuild a server.
|
| KeyPair
Class KeyPair
|
| Server
A server is a virtual machine instance in the compute system.
|
| Class and Description |
|---|
| Image
An image is a collection of files you use to create or rebuild a server.
|
| Image.Status
In-flight images will have the status attribute set to SAVING and the conditional progress
element (0-100% completion) will also be returned.
|
| KeyPair
Class KeyPair
|
| SecurityGroup
Defines a security group
|
| SecurityGroupRule
Defines a security group rule
|
Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.


ballerinax/jdbc module
Module overview
This module provides the functionality required to access and manipulate data stored in any type of relational database that is accessible via Java Database Connectivity (JDBC).
Client
To access a database, you must first create a client
object. A sample for creating a JDBC client can be found below.
NOTE: Although the JDBC client type supports connecting to any type of relational database that is accessible via JDBC, if you are using a MySQL or H2 database, it is recommended to use clients that are created using the client types specific to them via the relevant Ballerina modules.
Connection pool handling
There are 3 possible scenarios for connection pool handling.
- Global, shareable default connection pool
If you do not provide the
poolOptions
field, a globally shareable pool will be created for your database unless a connection pool matching with the properties you provided already exists.
jdbc:Client testDB = new({
url: "jdbc:mysql://localhost:3306/testdb",
username: "root",
password: "root",
dbOptions: { useSSL: false }
});
- Client owned, unshareable connection pool
If you define the
poolOptions
field inline, an unshareable connection pool will be created.
jdbc:Client testDB = new({
url: "jdbc:mysql://localhost:3306/testdb",
username: "root",
password: "root",
poolOptions: { maximumPoolSize: 5 },
dbOptions: { useSSL: false }
});
- Local shareable connection pool
If you create a record of type
sql:PoolOptions
and reuse that in the configuration of multiple clients, for each set of clients that connect to the same database instance with the same set of properties, a shared connection pool will be created.
jdbc:Client testDB1;
jdbc:Client testDB2;
jdbc:Client testDB3;
sql:PoolOptions poolOptions1 = { maximumPoolSize: 5 };
testDB1 = new({
url: "jdbc:mysql://localhost:3306/testdb1",
username: "root",
password: "root",
poolOptions: poolOptions1,
dbOptions: { useSSL: false }
});
testDB2 = new({
url: "jdbc:mysql://localhost:3306/testdb1",
username: "root",
password: "root",
poolOptions: poolOptions1,
dbOptions: { useSSL: false }
});
testDB3 = new({
url: "jdbc:mysql://localhost:3306/testdb2",
username: "root",
password: "root",
poolOptions: poolOptions1,
dbOptions: { useSSL: false }
});
Database operations
Once the client is created, database operations can be executed through that client. This module provides support for creating tables and executing stored procedures. It also supports selecting, inserting, deleting, updating, and batch updating data. Samples for these operations can be found below. Details of the SQL data types and query parameters relevant for these database operations can be found in the documentation for the SQL module.
Samples
Creating a client
jdbc:Client testDB = new({
url: "jdbc:mysql://localhost:3306/testdb",
username: "root",
password: "root",
dbOptions: { useSSL: false }
});
The full list of client properties can be found listed under the sql:PoolOptions
type, which is located in the
types.bal
file of the SQL module directory.
Creating tables
This sample creates a table with two columns. One column is of type int
, and the other is of type varchar
.
The CREATE statement is executed via the update
remote function of the client.
// Create the ‘Students’ table with fields ‘id’, 'name' and ‘age’.
var returned = testDB->update("CREATE TABLE student(id INT AUTO_INCREMENT, age INT, name VARCHAR(255), PRIMARY KEY (id))");
if (returned is sql:UpdateResult) {
io:println("Students table create status in DB: " + returned.updatedRowCount);
} else {
io:println("Students table creation failed: " + <string>returned.detail().message);
}
Inserting data
This sample shows three examples of data insertion by executing an INSERT statement using the update
remote function of the client.
In the first example, query parameter values are passed directly into the query statement of the update
remote function:
var returned = testDB->update("INSERT INTO student(age, name) values (23, 'john')");
if (returned is sql:UpdateResult) {
io:println("Inserted row count to Students table: " + returned.updatedRowCount);
} else {
io:println("Insert to Students table failed: " + <string>returned.detail().message);
}
In the second example, the parameter values, which are in local variables, are passed directly as parameters to the update
remote function. This direct parameter passing can be done for any primitive Ballerina type like string, int, float, or boolean. The sql type of the parameter is derived from the type of the Ballerina variable that is passed in.
string name = "Anne";
int age = 8;
var returned = testDB->update("INSERT INTO student(age, name) values (?, ?)", age, name);
if (returned is sql:UpdateResult) {
io:println("Inserted row count to Students table: " + returned.updatedRowCount);
} else {
io:println("Insert to Students table failed: " + <string>returned.detail().message);
}
In the third example, parameter values are passed as an sql:Parameter
to the update
remote function. Use sql:Parameter
when you need to provide more details such as the exact SQL type of the parameter, or the parameter direction. The default parameter direction is "IN". For more details on parameters, see the sql
module.
sql:Parameter p1 = { sqlType: sql:TYPE_VARCHAR, value: "James" };
sql:Parameter p2 = { sqlType: sql:TYPE_INTEGER, value: 10 };
var returned = testDB->update("INSERT INTO student(age, name) values (?, ?)", p2, p1);
if (returned is sql:UpdateResult) {
io:println("Inserted row count to Students table: " + returned.updatedRowCount);
} else {
io:println("Insert to Students table failed: " + <string>returned.detail().message);
}
Inserting data with auto-generated keys
This example demonstrates inserting data while returning the auto-generated keys. It achieves this by using the update
remote function to execute the INSERT statement.
int age = 31;
string name = "Kate";
var retWithKey = testDB->update("INSERT INTO student (age, name) values (?, ?)", age, name);
if (retWithKey is sql:UpdateResult) {
int count = retWithKey.updatedRowCount;
int generatedKey = <int>retWithKey.generatedKeys.GENERATED_KEY;
io:println("Inserted row count: " + count);
io:println("Generated key: " + generatedKey);
} else {
io:println("Insert to table failed: " + <string>retWithKey.detail().message);
}
Selecting data
This example demonstrates selecting data. First, a type is created to represent the returned result set. Next, the SELECT query is executed via the select
remote function of the client by passing that result set type. Once the query is executed, each data record can be retrieved by looping the result set. The table returned by the select operation holds a pointer to the actual data in the database and it loads data from the table only when it is accessed. This table can be iterated only once.
// Define a type to represent the results set.
type Student record {
int id;
string name;
int age;
};
// Select the data from the table.
var selectRet = testDB->select("SELECT * FROM student", Student);
if (selectRet is table<Student>) {
// Iterating returned table.
foreach var row in selectRet {
io:println("Student:" + row.id + "|" + row.name + "|" + row.age);
}
} else {
io:println("Select data from student table failed: " + <string>selectRet.detail().message);
}
To re-iterate the same table multiple times, set the loadToMemory
argument to true within the select
remote function.
var selectRet = testDB->select("SELECT * FROM student", Student, loadToMemory = true);
if (selectRet is table<Student>) {
// Iterating data first time.
foreach var row in selectRet {
io:println("Student:" + row.id + "|" + row.name + "|" + row.age);
}
// Iterating data second time.
foreach var row in selectRet {
io:println("Student:" + row.id + "|" + row.name + "|" + row.age);
}
} else {
io:println("Select data from student table failed: " + <string>selectRet.detail().message);
}
Updating data
This example demonstrates modifying data by executing an UPDATE statement via the update
remote function of the client
var returned = testDB->update("UPDATE student SET name = 'Jones' WHERE age = ?", 23);
if (returned is sql:UpdateResult) {
io:println("Updated row count in Students table: " + returned.updatedRowCount);
} else {
io:println("Insert to Students table failed: " + <string>returned.detail().message);
}
Batch updating data
This example demonstrates how to insert multiple records with a single INSERT statement that is executed via the batchUpdate
remote function of the client. This is done by first creating multiple parameter arrays, each representing a single record, and then passing those arrays to the batchUpdate
operation. Similarly, multiple UPDATE statements can also be executed via batchUpdate
.
// Create the first batch of parameters.
sql:Parameter para1 = { sqlType: sql:TYPE_VARCHAR, value: "Alex" };
sql:Parameter para2 = { sqlType: sql:TYPE_INTEGER, value: 12 };
sql:Parameter[] parameters1 = [para1, para2];
// Create the second batch of parameters.
sql:Parameter para3 = { sqlType: sql:TYPE_VARCHAR, value: "Peter" };
sql:Parameter para4 = { sqlType: sql:TYPE_INTEGER, value: 6 };
sql:Parameter[] parameters2 = [para3, para4];
// Do the batch update by passing the batches.
var retBatch = testDB->batchUpdate("INSERT INTO Students(name, age) values (?, ?)", parameters1, parameters2);
if (retBatch is int[]) {
io:println("Batch item 1 update count: " + retBatch[0]);
io:println("Batch item 2 update count: " + retBatch[1]);
} else {
io:println("Batch update operation failed: " + <string>retBatch.detail().message);
}
Calling stored procedures
The following examples demonstrate executing stored procedures via the call
remote function of the client.
The first example shows how to create and call a simple stored procedure that inserts data.
// Create the stored procedure.
var returned = testDB->update("CREATE PROCEDURE INSERTDATA (IN pName VARCHAR(255), IN pAge INT)
BEGIN
INSERT INTO Students(name, age) values (pName, pAge);
END");
if (returned is sql:UpdateResult) {
io:println("Stored proc creation status: : " + returned.updatedRowCount);
} else {
io:println("Stored proc creation failed: " + <string>returned.detail().message);
}
// Call the stored procedure.
var retCall = testDB->call("{CALL INSERTDATA(?,?)}", (), "George", 15);
if (retCall is ()|table<record {}>[]) {
io:println("Call operation successful");
} else {
io:println("Stored procedure call failed: " + <string>retCall.detail().message);
}
This next example shows how to create and call a stored procedure that accepts INOUT
and OUT
parameters.
// Create the stored procedure.
var returned = testDB->update("CREATE PROCEDURE GETCOUNT (INOUT pID INT, OUT pCount INT)
BEGIN
SELECT COUNT(*) INTO pID FROM Students WHERE id = pID;
SELECT COUNT(*) INTO pCount FROM Students WHERE id = 2;
END");
if (returned is sql:UpdateResult) {
io:println("Stored proc creation status: : " + returned.updatedRowCount);
} else {
io:println("Stored procedure creation failed: " + <string>returned.detail().message);
}
// Call the stored procedure.
sql:Parameter param1 = { sqlType: sql:TYPE_INTEGER, value: 3, direction: sql:DIRECTION_INOUT };
sql:Parameter param2 = { sqlType: sql:TYPE_INTEGER, direction: sql:DIRECTION_OUT };
var retCall = testDB->call("{CALL GETCOUNT(?,?)}", (), param1, param2);
if (retCall is ()|table<record {}>[]) {
io:println("Call operation successful");
io:print("Student count with ID = 3: ");
io:println(param1.value);
io:print("Student count with ID = 2: ");
io:println(param2.value);
} else {
io:println("Stored procedure call failed: " + <string>retCall.detail().message);
}
Module Detail
Records
| Record | Description |
|---|---|
| ClientEndpointConfig | The Client endpoint configuration for SQL databases. |
Endpoints
| Endpoint | Description |
|---|---|
| Client | Represents a JDBC SQL client endpoint. |
public type ClientEndpointConfig
The Client endpoint configuration for SQL databases.
| Field Name | Data Type | Default Value | Description |
|---|---|---|---|
| url | string | URL of the database to connect |
|
| username | string | Username for the database connection |
|
| password | string | Password for the database connection |
|
| poolOptions | sql:PoolOptions | Properties for the connection pool configuration. Refer |
|
| dbOptions | map | {} | A map of DB specific properties. These properties will have an effect only if the dataSourceClassName is provided in poolOptions |
Endpoint Client
Represents a JDBC SQL client endpoint.
-
<Client> call(string sqlQuery, typedesc[]? recordType, string|int|boolean|float|decimal|byte[][]|sql:Parameter? parameters) returns (table<$anonType$0>[]|null|error<>)
The call remote function implementation for JDBC Client to invoke stored procedures/functions.
Parameter Name Data Type Default Value Description sqlQuery string The SQL stored procedure to execute
recordType typedesc[]? Array of record types of the returned tables if there is any
parameters string|int|boolean|float|decimal|byte[][]|sql:Parameter? The parameters to be passed to the procedure/function call. The number of parameters is variable
Return Type Description table<$anonType$0>[]|null|error<> A
table[]
if there are tables returned by the call action and else nil,error
will be returned if there is any error -
<Client> select(string sqlQuery, typedesc? recordType, boolean loadToMemory, string|int|boolean|float|decimal|byte[][]|sql:Parameter? parameters) returns (table<$anonType$1>|error<>)
The select remote function implementation for JDBC Client to select data from tables.
Parameter Name Data Type Default Value Description sqlQuery string SQL query to execute
recordType typedesc? Type of the returned table
loadToMemory boolean false Indicates whether to load the retrieved data to memory or not
parameters string|int|boolean|float|decimal|byte[][]|sql:Parameter? The parameters to be passed to the select query. The number of parameters is variable
Return Type Description table<$anonType$1>|error<> A
table
returned by the sql query statement elseerror
will be returned if there is any error -
<Client> update(string sqlQuery, string[]? keyColumns, string|int|boolean|float|decimal|byte[][]|sql:Parameter? parameters) returns (sql:UpdateResult|error<>)
The update remote function implementation for JDBC Client to update data and schema of the database.
Parameter Name Data Type Default Value Description sqlQuery string SQL statement to execute
keyColumns string[]? () Names of auto generated columns for which the auto generated key values are returned
parameters string|int|boolean|float|decimal|byte[][]|sql:Parameter? The parameters to be passed to the update query. The number of parameters is variable
Return Type Description sql:UpdateResult|error<> sql:UpdateResult
with the updated row count and key column values, elseerror
will be returned if there is any error -
<Client> batchUpdate(string sqlQuery, string|int|boolean|float|decimal|byte[][][]|sql:Parameter? parameters) returns (int[]|error<>)
The batchUpdate remote function implementation for JDBC Client to batch data insert.
Parameter Name Data Type Default Value Description sqlQuery string SQL statement to execute
parameters string|int|boolean|float|decimal|byte[][][]|sql:Parameter? Variable number of parameter arrays each representing the set of parameters of belonging to each individual update
Return Type Description int[]|error<> An
int[]
- The elements in the array returned by the remote function may be one of the following or else anerror
will be returned if there is any error. A number greater than or equal to zero - indicates that the command was processed successfully and is an update count giving the number of rows A value of -2 - Indicates that the command was processed successfully but that the number of rows affected is unknown A value of -3 - Indicates that the command failed to execute successfully and occurs only if a driver continues to process commands after a command fails


Introduction
This is a book about getting computers to do what you want them to do. Computers are about as common as screwdrivers today, but they contain a lot more hidden complexity and thus are harder to operate and understand. To many, they remain alien, slightly threatening things.
We’ve found two effective ways of bridging the communication gap between us, squishy biological organisms with a talent for social and spatial reasoning, and computers, unfeeling manipulators of meaningless data. The first is to appeal to our sense of the physical world and build interfaces that mimic that world and allow us to manipulate shapes on a screen with our fingers. This works very well for casual machine interaction.
But we have not yet found a good way to use the point-and-click approach to communicate things to the computer that the designer of the interface did not anticipate. For open-ended interfaces, such as instructing the computer to perform arbitrary tasks, we’ve had more luck with an approach that makes use of our talent for language: teaching the machine a language.
Human languages allow words and phrases to be combined in many ways, which allows us to say many different things. Computer languages, though typically less grammatically flexible, follow a similar principle.
Casual computing has become much more widespread in the past 20 years, and language-based interfaces, which once were the default way in which people interacted with computers, have largely been replaced with graphical interfaces. But they are still there, if you know where to look. One such language, JavaScript, is built into almost every web browser and is thus available on just about every consumer device.
This book intends to make you familiar enough with this language to be able to make a computer do what you want.
On programming
I do not enlighten those who are not eager to learn, nor arouse those who are not anxious to give an explanation themselves. If I have presented one corner of the square and they cannot come back to me with the other three, I should not go over the points again.
Besides explaining JavaScript, I also will introduce the basic principles of programming. Programming, it turns out, is hard. The fundamental rules are typically simple and clear. But programs built on top of these rules tend to become complex enough to introduce their own rules and complexity. You’re building your own maze, in a way, and you might just get lost in it.
There will be times when reading this book feels terribly frustrating. If you are new to programming, there will be a lot of new material to digest. Much of this material will then be combined in ways that require you to make additional connections.
It is up to you to make the necessary effort. When you are struggling to follow the book, do not jump to any conclusions about your own capabilities. You are fine—you just need to keep at it. Take a break, reread some material, and always make sure you read and understand the example programs and exercises. Learning is hard work, but everything you learn is yours and will make subsequent learning easier.
The computer programmer is a creator of universes for which he [sic] alone is responsible. Universes of virtually unlimited complexity can be created in the form of computer programs.
A program is many things. It is a piece of text typed by a programmer, it is the directing force that makes the computer do what it does, it is data in the computer’s memory, yet it controls the actions performed on this same memory. Analogies that try to compare programs to objects we are familiar with tend to fall short. A superficially fitting one is that of a machine—lots of separate parts tend to be involved, and to make the whole thing tick, we have to consider the ways in which these parts interconnect and contribute to the operation of the whole.
A computer is a machine built to act as a host for these immaterial machines. Computers themselves can do only stupidly straightforward things. The reason they are so useful is that they do these things at an incredibly high speed. A program can ingeniously combine an enormous number of these simple actions in order to do very complicated things.
To some of us, writing computer programs is a fascinating game. A program is a building of thought. It is costless to build, it is weightless, and it grows easily under our typing hands.
But without care, a program’s size and complexity will grow out of control, confusing even the person who created it. Keeping programs under control is the main problem of programming. When a program works, it is beautiful. The art of programming is the skill of controlling complexity. The great program is subdued—made simple in its complexity.
Many programmers believe that this complexity is best managed by using only a small set of well-understood techniques in their programs. They have composed strict rules (“best practices”) prescribing the form programs should have, and the more zealous among them will consider those who go outside of this safe little zone to be bad programmers.
What hostility to the richness of programming—to try to reduce it to something straightforward and predictable, to place a taboo on all the weird and beautiful programs! The landscape of programming techniques is enormous, fascinating in its diversity, and still largely unexplored. It is certainly dangerous going, luring the inexperienced programmer into all kinds of confusion, but that only means you should proceed with caution and keep your wits about you. As you learn there will always be new challenges and new territory to explore. Programmers who refuse to keep exploring will stagnate, forget their joy, and get bored with their craft.
Why language matters
In the beginning, at the birth of computing, there were no programming languages. Programs looked something like this:
00110001 00000000 00000000 00110001 00000001 00000001 00110011 00000001 00000010 01010001 00001011 00000010 00100010 00000010 00001000 01000011 00000001 00000000 01000001 00000001 00000001 00010000 00000010 00000000 01100010 00000000 00000000
That is a
program to add the numbers from 1 to 10 together and print out the
result: 1 + 2 + ... + 10 = 55
. It could run on a simple,
hypothetical machine. To program early computers, it was necessary to
set large arrays of switches in the right position or punch holes in
strips of cardboard and feed them to the computer. You can probably imagine
how tedious and error-prone this procedure was. Even writing simple
programs required much cleverness and discipline. Complex ones were
nearly inconceivable.
Of course, manually entering these arcane patterns of bits (the ones and zeros) did give the programmer a profound sense of being a mighty wizard. And that has to be worth something in terms of job satisfaction.
Each line of the previous program contains a single instruction. It could be written in English like this:
1. Store the number 0 in memory location 0. 2. Store the number 1 in memory location 1. 3. Store the value of memory location 1 in memory location 2. 4. Subtract the number 11 from the value in memory location 2. 5. If the value in memory location 2 is the number 0, continue with instruction 9. 6. Add the value of memory location 1 to memory location 0. 7. Add the number 1 to the value of memory location 1. 8. Continue with instruction 3. 9. Output the value of memory location 0.
Although that is already more readable than the soup of bits, it is still rather unpleasant. It might help to use names instead of numbers for the instructions and memory locations.
Set “total” to 0. Set “count” to 1. [loop] Set “compare” to “count”. Subtract 11 from “compare”. If “compare” is zero, continue at [end]. Add “count” to “total”. Add 1 to “count”. Continue at [loop]. [end] Output “total”.
Can you see how the program
works at this point? The first two lines give
two memory locations their starting values: total
will be used to
build up the result of the computation, and count
will keep track of the
number that we are currently looking at. The lines using compare
are
probably the weirdest ones. The program wants to see
whether count
is equal to 11 in order to decide whether it can stop
running. Because our hypothetical machine is rather primitive, it can only
test whether a number is zero and make a decision (or jump) based on
that. So it uses the memory location labeled compare
to compute the
value of count - 11
and makes a decision based on that value. The
next two lines add the value of count
to the result and increment
count
by 1 every time the program has decided that count
is not 11 yet.
Here is the same program in JavaScript:
var total = 0, count = 1; while (count <= 10) { total += count; count += 1; } console.log(total); // → 55
This version gives us a few more improvements.
Most importantly, there is no need to specify the way we want the
program to jump back and forth anymore. The while
language
construct takes care of that. It continues executing the block
(wrapped in braces) below it as long as the condition it was given
holds. That condition is count <= 10
, which means “count
is less than or equal to
10”. We no longer have to create a temporary value and compare that
to zero, which was an uninteresting detail. Part of the power of
programming languages is that they take care of uninteresting details
for us.
At the end of the program, after the while
construct has
finished, the console.log
operation is applied to the result in
order to write it as output.
Finally, here is what the
program could look like if we happened to have the convenient
operations range
and sum
available, which respectively create a
collection of numbers within a range and compute the sum of a
collection of numbers:
console.log(sum(range(1, 10))); // → 55
The moral of this story is that the same program can
be expressed in long and short, unreadable and readable ways. The
first version of the program was extremely obscure, whereas this last
one is almost English: log
the sum
of the range
of numbers from
1 to 10. (We will see in later chapters how to
build operations like sum
and range
.)
A good
programming language helps the programmer by allowing them to talk
about the actions that the computer has to perform on a higher level.
It helps omit uninteresting details, provides convenient building
blocks (such as while
and console.log
), allows you to define your
own building blocks (such as sum
and range
), and makes those blocks
easy to compose.
What is JavaScript?
JavaScript was introduced in 1995 as a way to add programs to web pages in the Netscape Navigator browser. The language has since been adopted by all other major graphical web browsers. It has made modern web applications possible—applications with which you can interact directly, without doing a page reload for every action. But it is also used in more traditional websites to provide various forms of interactivity and cleverness.
It is important to note that JavaScript has almost nothing to do with the programming language named Java. The similar name was inspired by marketing considerations, rather than good judgment. When JavaScript was being introduced, the Java language was being heavily marketed and was gaining popularity. Someone thought it was a good idea to try to ride along on this success. Now we are stuck with the name.
After its adoption outside of Netscape, a standard document was written to describe the way the JavaScript language should work to make sure the various pieces of software that claimed to support JavaScript were actually talking about the same language. This is called the ECMAScript standard, after the Ecma International organization that did the standardization. In practice, the terms ECMAScript and JavaScript can be used interchangeably—they are two names for the same language.
There are those who will say terrible things about the JavaScript language. Many of these things are true. When I was required to write something in JavaScript for the first time, I quickly came to despise it. It would accept almost anything I typed but interpret it in a way that was completely different from what I meant. This had a lot to do with the fact that I did not have a clue what I was doing, of course, but there is a real issue here: JavaScript is ridiculously liberal in what it allows. The idea behind this design was that it would make programming in JavaScript easier for beginners. In actuality, it mostly makes finding problems in your programs harder because the system will not point them out to you.
This flexibility also has its advantages, though. It leaves space for a lot of techniques that are impossible in more rigid languages, and as you will see (for example in Chapter 10) it can be used to overcome some of JavaScript’s shortcomings. After learning the language properly and working with it for a while, I have learned to actually like JavaScript.
There have been several versions of JavaScript. ECMAScript version 3 was the widely supported version in the time of JavaScript’s ascent to dominance, roughly between 2000 and 2010. During this time, work was underway on an ambitious version 4, which planned a number of radical improvements and extensions to the language. Changing a living, widely used language in such a radical way turned out to be politically difficult, and work on the version 4 was abandoned in 2008, leading to the much less ambitious version 5 coming out in 2009. We’re now at the point where all major browsers support version 5, which is the language version that this book will be focusing on. A version 6 is in the process of being finalized, and some browsers are starting to support new features from this version.
Web browsers are not the only platforms on which JavaScript is used. Some databases, such as MongoDB and CouchDB, use JavaScript as their scripting and query language. Several platforms for desktop and server programming, most notably the Node.js project (the subject of Chapter 20) are providing a powerful environment for programming JavaScript outside of the browser.
Code, and what to do with it
Code is the text that makes up programs. Most chapters in this book contain quite a lot of it. In my experience, reading code and writing code are indispensable parts of learning to program, so try to not just glance over the examples. Read them attentively and understand them. This may be slow and confusing at first, but I promise that you will quickly get the hang of it. The same goes for the exercises. Don’t assume you understand them until you’ve actually written a working solution.
I recommend you try your solutions to exercises in an actual JavaScript interpreter. That way, you’ll get immediate feedback on whether what you are doing is working, and, I hope, you’ll be tempted to experiment and go beyond the exercises.
When reading this book in your browser, you can edit (and run) all example programs by clicking them.
If you want to run the programs defined in this book outside of the book’s sandbox, some care is required. Many examples stand on their own and should work in any JavaScript environment. But code in later chapters is mostly written for a specific environment (the browser or Node.js) and can run only there. In addition, many chapters define bigger programs, and the pieces of code that appear in them depend on each other or on external files. The sandbox on the website provides links to Zip files containing all of the scripts and data files necessary to run the code for a given chapter.
Overview of this book
This book contains roughly three parts. The first 11 chapters discuss the JavaScript language itself. The next eight chapters are about web browsers and the way JavaScript is used to program them. Finally, two chapters are devoted to Node.js, another environment to program JavaScript in.
Throughout the book, there are five project chapters, which describe larger example programs to give you a taste of real programming. In order of appearance, we will work through building an artificial life simulation, a programming language, a platform game, a paint program, and a dynamic website.
The language part of the book starts with four chapters to introduce
the basic structure of the JavaScript language. They introduce
control structures
(such as the while
word you saw in this introduction),
functions (writing your own
operations), and data structures. After these,
you will be able to write simple programs. Next, Chapters
5 and
6 introduce techniques to use functions
and objects to write more abstract code and thus keep complexity
under control.
After a first project chapter, the first part of the book continues with chapters on error handling and fixing, on regular expressions (an important tool for working with text data), and on modularity—another weapon against complexity. The second project chapter concludes the first part of the book.
The second part, Chapters 12 to 19, describes the tools that browser JavaScript has access to. You’ll learn to display things on the screen (Chapters 13 and 16), respond to user input (Chapters 14 and 18), and communicate over the network (Chapter 17). There are again two project chapters in this part.
After that, Chapter 20 describes Node.js, and Chapter 21 builds a simple web system using that tool.
Typographic conventions
In this book, text written in a monospaced
font will represent elements of programs—sometimes
they are self-sufficient fragments, and sometimes they just refer to
part of a nearby program. Programs (of which you have already seen a
few), are written as follows:
function fac(n) { if (n == 0) return 1; else return fac(n - 1) * n; }
Sometimes, in order to show the output that a program produces, the expected output is written after it, with two slashes and an arrow in front.
console.log(fac(8)); // → 40320


... flooded streets reported
This is a crowdsourced effort to map inundated roads in Kerala. All the data is open source.
Report a flooded street by zooming into the map and clicking it.


I wish I had learned coding much earlier as an undergraduate but I was thrown into a C++ class and never wanted to see it again. I met some Computer Science students in graduate school, the second time I went, and they taught me how powerful Computer Science is but I figured my chance to learn was over. I signed up for a free computing conference and my perspective changed again, no offense Pure Math. The keynote speaker majored in math and learned computers so why not go back to school, at one of places I teach, and learn? I am old, I just had a really big birthday, but I discovered I can learn new things. I am really liking web design and at some point I want to go back to C++ and learn to program the robot to dance like they did at the conference and get kids interested in Science Technology Engineering and MATHEMATICS, even the pure kind. The National Association of University Women, Los Angeles Branch, is starting a youth program.