In old comedy films and some classic cartoons, when a scene involves a railroad, there is a chance of a handcar pursuit where one of the character chases another character, also in a handcar usually, by operating a handcar.
In real life, the handcar has long been replaced for rail crews with special wheel frame attachments on ordinary cars or trucks which are designed to allow such automobiles to travel on the rails to get to a particular location.
Compare Racing the Train.
Examples:
- Pokémon:
- The short "Camp Pikachu" has the Pokemon chasing after a departing locomotive in a handcart (with some additional boost from Cyndaquil's Flamethrower) so that the Pichu Brothers could continue on their way.
- Best Wishes has this involving a subway. Justified that they were able to keep pace, however, because instead of operating it by hand they were using Electric-type Pokémon to power the cars.
- Tintin does this in Tintin in the Land of the Soviets. The handcar breaks just as he is about to catch up. He then spots a junk pile and motorizes the car by MacGyvering, but the villains succeed at literally derailing him.
- Little Lotta has this happen. However, given that the handcar is powered by Lotta, the engineer's concern that they will "knock it off the tracks" is justified.
- The Crown of the Russian Empire (a Soviet action movie) has the heroine chasing a train on a handcar. She catches up. However, later the villain they've been chasing unhooks the last train car (yes, while the train is moving) with an oil tank on it, and shoots it, causing it to explode. The heroine passes through the resulting fire on the same handcar (and, apparently, through the wreckage of the car itself, although it could've been blaste off the railway).
- Buster Keaton in The General has about any railborne vehicle chasing any other. (First the hero chases his stolen locomotive by foot, then by handcar and then by another locomotive.)
- Handcars form part of the chase scene in The Great St. Trinian's Train Robbery.
- Tonto and a bound and blindfolded Lone Ranger attempt to escape from a train on a handcar at the silver mine in The Lone Ranger.
- Mad Max: Beyond Thunderdome. Max and the tribe of desert children are racing away from Bartertown on a stolen train. One of them looks back to see a horde of Desert Punk vehicles led by Aunty Entity chasing them as well as her chief of guards Ironbar frantically working a handcar and keeping up with everyone.
- Italian comedy Le Comiche ("The Comic Actors") starts with a silent film with two fat men in a handcar desperately trying to get out of the way of a steam locomotive. They escape by jumping off the screen into the cinema.
- Dad's Army: The climax of "The Royal Train" involves Hodges on a handcar chasing a runaway train with the platoon aboard, so he can throw them the widget they need to stop the train. Then they throw the train into reverse, and it becomes Hodges on a handcar fleeing a runaway train instead.
- In the Loretta Lynn episode of The Muppet Show, a mix-up leaves Kermit and Gonzo stranded miles from the train station where the show is temporarily set, and they travel back by handcar. At one point they get chased by a locomotive
- On an early episode of Grimm, Monroe gets an old drasinine running to get him and Nick up an abandoned spur to the monster-of-the-week's lair.
- One of the films with the Olsen Gang wreaks havoc to the Danish railway system. While technically not using a handcar, the scene with the unexpected Intercity (luckily on the neighbor rails, unluckily not from the direction expected) clearly is a nod to this trope.
- Shining Time Station: In "Queen For a Day", a pair of thieves named Biff and Bull uncouple the Queen's coach from the train pulling it as part of their plan to steal the Queen's jewels, which results in the coach ending up lost in Indian Valley. The next morning, Biff and Bull travel to Indian Valley on a handcar to find the coach. Mr. Conductor sees them and becomes suspicious of their plan.
- One of the micro games in WarioWare Touched. Complete with being chased by another handcar, Wario in his car and a train respectively for the different difficulty levels.
- Twisted too; it's the boss game for the Dribble & Spitz stage.
- A recurring two-player team mini-game in Mario Party is a race between two handcars, where you have to coordinate with your partner to speed up, slow down, and bank around sharp corners.
- The climax of the Wild West world in Tiny Toon Adventures Buster Busts Loose has Max and Buster escaping from an oncoming train on a handcar ... which reaches 88 MPH.
- Magical Truck Adventure is all about this; two plucky kids try to get a magic stone that can transport people between dimensions away from a pair of crooks, and the two groups end up chasing each other in handcars through various other dimensions(all of which inexplicably have train tracks) as they try to get their hands on the stone. The game even comes with custom handcar pump controls.
- In Banjo-Tooie, in Glitter Gulch Mine, once you rescue Canary Mary, she repairs a broken handcar and you can race against her on it. Pressing the A button repeatedly causes Banjo to pump the handcar. Winning these races will earn you a Jiggy and a Cheato page.
- In Sly 2: Band of Thieves, the Cooper Gang must steal a disused cart (with the help of local bears) in order to catch up with a train during "He Who Tames The Iron Horse". It's slightly deconstructed as trying to keep the cart behind the train wears Murray down, especially when a Rival Turned Evil shows up in a helicopter.
- Arc Angle: The miniboss of the second stage is a weaponized train called the Highwayman that the Arc Angle pursues. When it takes enough damage, its outer armor breaks off and leaves behind an unmanned handcar-looking vehicle, which is still just as capable of outputting Bullet Hell.
- In the Brain POP toon "Industrial Revolution", Tim and Moby were using a handcar while discussing about the topic. They later tried to get away from a upcoming train when they're inside a tunnel at the end, though it turns out the train is on another line.
- Looney Tunes: "Rushing Roulette," with the Road Runner countering the Coyote with a handcar of his own. (This breaks an unwritten rule that the Road Runner should only stay on the road.)
- Scooby-Doo: Scooby and the gang retrace their path on a handcar in finding the trail of dognappers in "Decoy For A Dognapper." This is after Shaggy and Scooby use the handcar to outpace an oncoming train.
Velma: (after Shaggy imitates a train horn) We can get along...without...the sound effects...thank you.
- G.I. Joe have a variant with Snake-Eyes and Shipwreck on a handcar, being chased by Cobra, but they are occasionally able to get its automatic motor to let it pump by itself for some lengths.
- In the Phineas and Ferb episode Sidetracked Perry and his human partner Lyla chase after a hijacked train using a Handcar.
- The Looney Tunes Show: In "Ridiculous Journey", Blacque Jacque Shellacque uses a handcar to chase the pets after they hop aboard a freight train.
- Thomas the Tank Engine:
- Towards the end of the episode "Haunted Henry", Old Bailey chases after Henry on a handcar to try to warn him about an unsafe viaduct.
- A few other handcars were seen during the CGI era, such as when Sir Topham Hatt was in Misty Island in the episode "Stop that Bus!"
- In "Heart of Gold", a pair of thieves steal King Godred's crown from Ulfstead Castle and attempt to escape on a handcar, but Toby chases after them.
- Towards the end of the Tiny Toon Adventures episode, "Sawdust and Toonsil", Buster, Babs, and Plucky manage to escape from Silas Wonder's Wonderful Circus of Wonderment with Gogo Dodo and his friends on a handcar, however, they get chased by Silas' engine when he finds out they've escaped. Just before Silas' engine crashes through the handcar, they all jump off, carrying Gogo and each of his friends.
- In the The New Adventures of Winnie the Pooh episode "The good, the Bad and the Tigger", Sheriff Piglet, Rabbit and Eeyore were using one to catch the train Pooh and Tigger stole, but unfortunately didn't know how to slow it down. They ended up hitting Gopher who ends up riding with them and then finally collides with the upcoming train Pooh was in. Pooh and Tigger ended up using parts of it to repair the train later on.
- In The Mr. Men Show episode "Trains and Planes", Mr. Bump and Miss Helpful were using one to repair the damage tracks in their segment. Mr. Grumpy later hitched a ride with them towards the end of the episode after being stranded in the lone passenger car was uncoupled by Miss Whoops, but they get chased after her train and ends up crashing into them. They ended up alright, albeit a bit mangled.
- The Alvin Show has a bit of deconstruction thrown in. Of course the handcar has to flee from a train sooner or later, but in the end everything, train, handcar, railway, keels over as it was just cardboard backdrop.
- Tiny Planets: In "Tools, Glorious Tools", Bing and Bong hitch a ride on a handcar, and inevitably spend the next few minutes pumping furiously to stay ahead of an oncoming locomotive.
- The climax of the Donald Duck short Timber involves a handcar chase with Donald and Pete. Things get crazy when Donald's handcar starts falling apart and he has to keep rolling along the track lest Pete catches up to him.
- In the Animated Adaptation of Green Eggs and Ham from "Dr. Seuss on the Loose", the nameless guy used a handcar to get away from Sam-I-Am when the train was inside the tunnel.
- In the Action League NOW! episode, "I've Been Workin' On Derailroad", Meltman, who is riding an electric train set, screams when he accidentally loses his original nose. The Flesh and Stinky Diver, thinking that Meltman is in trouble, chase after him on a handcar, but The Mayor sets the switch to a dead end, causing them to land in a washing machine.
- In the TaleSpin episode, "Louie's Last Stand", Douglas "Dougie" Benson attempts to evict Louie from his island by sending the Khan Pilot Force after him with the help of a document with Shere Khan's forged signature. At one point, Baloo, Kit and Louie run across the tracks on their way to a trap that Louie set up years ago, and the Khan pilot force chases after them on a handcar. Just when it looks like Baloo, Kit, and Louie are cornered, the Khan Pilot Force crash their handcar into a wall, since Louie had yet to build a tunnel.
- The Dick Tracy Show: Sketch Paree and the Mole use a handcar to pursue the Casbah Express train where a special car filled with gold is in transport. Their efforts are met with diminishing returns after Joe Jitsu (the episode's police officer) gets through with them.
- Laff-A-Lympics had a competition with handcars pitting Blue Falcon and Dynomutt for the Scoobies, Grape Ape and Doggie Daddy for the Yogis and the Daltons for the Rottens. The judges ruled that Blue Falcon and Dynomutt could use their gadgets in the race because the Rottens (a) soldered their handcar wheels, (b) planted a huge boulder in their way (which got pulverized by Grape Ape anyway as the heroes allowed the Yogis to go ahead of them), and (c) were using jet propulsion on their handcar. The Scoobies won, but only by virtue that Grape Ape used too much force propelling the Yogis' handcar that it grounded in the Grape Ape-created hole. The Rottens? Dynomutt extended his arms to retrieve their handcar and redirect them back to the start.
- At the end of the My Little Pony: Friendship Is Magic episode "The Last Roundup", Pinkie Pie and Rarity, who were left behind at Dodge Junction, make it back to Ponyville on a handcar, with Pinkie annoying Rarity with her indecisiveness of whether to call it a "chimicherry" or "cherrychunga".
Rarity: When I get home, you're so gonna get it, Rainbow Dash!


Stroke Prediction
Age
Hypertension (Yes=1/No=0)
Heart Disease (Yes=1/No=0)
Average Glucose Level
BMI


Hey Bryan, it’s Nate from newline and today I’ll show you how to create a PostgreSQL database for your AWS Lambda app. In this walkthrough, we configure the database so that it’s covered by the AWS Free Tier, that way it won’t cost anything.
This lesson is part of The newline Guide to Serverless Django with Zappa. Check out the full course for more.
AWS RDS supports many types of database engines, but for this lesson, we will choose a well-supported and common engine: PostgreSQL. Make sure your AWS account has the permissions to create new RDS instances.
This lesson is going to be used for illustration purposes.  This insecure approach should not be used in production.
We’re going through this process now to become familiar with the steps and will delete this database at the end. In the full course we go over more steps to make this setup production-ready.
When you create an RDS instance, it’s like telling AWS to host a virtual database server for you. You can host one or more databases on an RDS instance, so if you have many small projects that don’t require many resources, they can all share a single RDS instance. This is nice if you’d like to continue to use the AWS free tier and keep your monthly costs low.
So we’re going to create an RDS instance
called newline-course-zappa
and on that instance, we’ll host
a database called ZappaCourseDB
.
Here are the steps we’re following to create the RDS instance. Not all the settings would be appropriate for creating a production RDS instance, and I’ve attempted to note them below.
Standard create
For Engine options, select PostgreSQL
PostgreSQL 12.5-R1
Free tier
For Settings, use the following:
newline-course-zappa
. Of course, you may choose
anything to identify your own RDS instance here.
postgres
as the username. For increased
security, you may want to choose something else. Pick a strong
password. Make sure to record these securely
db.t2.micro
should already be
selected for you (corresponds to the free tier)
Storage autoscaling
unless you know you need this.
For Availability and Durability, this section should be disabled due to the free tier restrictions.
For Connectivity, we need to edit some options
no preference
Password authentication
ZappaCourseDB
. Uncheck Enable automatic backups
(won’t be needed for this lesson, but valuable in production).
Uncheck Enable performance insights
(won’t be needed for
this lesson, but valuable in production). Keep defaults for Maintenance
and Deletion protection. Obviously, when creating production RDS
instances, you’ll want to pay more attention to these.
Click on Create Database
Once completed, you’ll see the new RDS instance in the console like this:
Even though you’ve set this RDS instance to be public, we’ll need to open up the security group to allow inbound database network traffic. Follow these steps:
default (sg-fe7fa7f1)
. Note the name will
be similar but the trailing characters after sg-
will be
different.
Configure the new rule with these settings:
Then click Save Rules
Your final security group configuration should resemble the following.
Don’t forget to test to see if you can connect to the database from your app. As a follow up to this simple set up, you’ll want to configure security settings more robustly after your initial connection is successful. If you need more guidance, check out our new course for running Django on AWS Lambda.
|
|


RequireJS takes a different approach to script loading than traditional <script> tags. Its goal is to encourage modular code. While it can also run fast and optimize well, the primary goal is to encourage modular code. As part of that, it encourages using module IDs instead of URLs for script tags.
RequireJS loads all code relative to a baseUrl. The baseUrl is normally set to the same directory as the script used in a data-main attribute for the top level script to load for a page. The data-main attribute is a special attribute that require.js will check to start script loading. This example will end up with a baseUrl of scripts:
<!--This sets the baseUrl to the "scripts" directory, and
loads a script that will have a module ID of 'main'-->
<script data-main="scripts/main.js" src="scripts/require.js"></script>
Or, baseUrl can be set manually via the RequireJS config. If there is no explicit config and data-main is not used, then the default baseUrl is the directory that contains the HTML page running RequireJS.
RequireJS also assumes by default that all dependencies are scripts, so it does not expect to see a trailing ".js" suffix on module IDs. RequireJS will automatically add it when translating the module ID to a path. With the paths config, you can set up locations of a group of scripts. All of these capabilities allow you to use smaller strings for scripts as compared to traditional <script> tags.
There may be times when you do want to reference a script directly and not conform to the "baseUrl + paths" rules for finding it. If a module ID has one of the following characterstics, the ID will not be passed through the "baseUrl + paths" configuration, and just be treated like a regular URL that is relative to the document:
In general though, it is best to use the baseUrl and "paths" config to set paths for module IDs. By doing so, it gives you more flexibility in renaming and configuring the paths to different locations for optimization builds.
Similarly, to avoid a bunch of configuration, it is best to avoid deep folder hierarchies for scripts, and instead either keep all the scripts in baseUrl, or if you want to separate your library/vendor-supplied code form your app code, use a directory layout like this:
in index.html:
<script data-main="js/app.js" src="js/require.js"></script>
and in app.js:
requirejs.config({
//By default load any module IDs from js/lib
baseUrl: 'js/lib',
//except, if the module ID starts with "app",
//load it from the js/app directory. paths
//config is relative to the baseUrl, and
//never includes a ".js" extension since
//the paths config could be for a directory.
paths: {
app: '../app'
}
});
// Start the main app logic.
requirejs(['jquery', 'canvas', 'app/sub'],
function ($, canvas, sub) {
//jQuery, canvas and the app/sub module are all
//loaded and can be used here now.
});
Notice as part of that example, vendor libraries like jQuery did not have their version numbers in their file names. It is recommended to store that version info in a separate text file if you want to track it, or if you use a tool like volo, it will stamp the package.json with the version information but keep the file on disk as "jquery.js". This allows you to have the very minimal configuration instead of having to put an entry in the "paths" config for each library. For instance, configure "jquery" to be "jquery-1.7.2".
Ideally the scripts you load will be modules that are defined by calling define(). However, you may need to use some traditional/legacy "browser globals" scripts that do not express their dependencies via define(). For those, you can use the shim config. To properly express their dependencies.
If you do not express the dependencies, you will likely get loading errors since RequireJS loads scripts asynchronously and out of order for speed.
A module is different from a traditional script file in that it defines a well-scoped object that avoids polluting the global namespace. It can explicitly list its dependencies and get a handle on those dependencies without needing to refer to global objects, but instead receive the dependencies as arguments to the function that defines the module. Modules in RequireJS are an extension of the Module Pattern, with the benefit of not needing globals to refer to other modules.
The RequireJS syntax for modules allows them to be loaded as fast as possible, even out of order, but evaluated in the correct dependency order, and since global variables are not created, it makes it possible to load multiple versions of a module in a page.
(If you are familiar with or are using CommonJS modules, then please also see CommonJS Notes for information on how the RequirejS module format maps to CommonJS modules).
There should only be one module definition per file on disk. The modules can be grouped into optimized bundles by the optimization tool.
If the module does not have any dependencies, and it is just a collection of name/value pairs, then just pass an object literal to define():
//Inside file my/shirt.js:
define({
color: "black",
size: "unisize"
});
If the module does not have dependencies, but needs to use a function to do some setup work, then define itself, pass a function to define():
//my/shirt.js now does setup work
//before returning its module definition.
define(function () {
//Do setup work here
return {
color: "black",
size: "unisize"
}
});
If the module has dependencies, the first argument should be an array of dependency names, and the second argument should be a definition function. The function will be called to define the module once all dependencies have loaded. The function should return an object that defines the module. The dependencies will be passed to the definition function as function arguments, listed in the same order as the order in the dependency array:
//my/shirt.js now has some dependencies, a cart and inventory
//module in the same directory as shirt.js
define(["./cart", "./inventory"], function(cart, inventory) {
//return an object to define the "my/shirt" module.
return {
color: "blue",
size: "large",
addToCart: function() {
inventory.decrement(this);
cart.add(this);
}
}
}
);
In this example, a my/shirt module is created. It depends on my/cart and my/inventory. On disk, the files are structured like this:
The function call above specifies two arguments, "cart" and "inventory". These are the modules represented by the "./cart" and "./inventory" module names.
The function is not called until the my/cart and my/inventory modules have been loaded, and the function receives the modules as the "cart" and "inventory" arguments.
Modules that define globals are explicitly discouraged, so that multiple versions of a module can exist in a page at a time (see Advanced Usage). Also, the order of the function arguments should match the order of the dependencies.
The return object from the function call defines the "my/shirt" module. By defining modules in this way, "my/shirt" does not exist as a global object.
Modules do not have to return objects. Any valid return value from a function is allowed. Here is a module that returns a function as its module definition:
//A module definition inside foo/title.js. It uses
//my/cart and my/inventory modules from before,
//but since foo/bar.js is in a different directory than
//the "my" modules, it uses the "my" in the module dependency
//name to find them. The "my" part of the name can be mapped
//to any directory, but by default, it is assumed to be a
//sibling to the "foo" directory.
define(["my/cart", "my/inventory"],
function(cart, inventory) {
//return a function to define "foo/title".
//It gets or sets the window title.
return function(title) {
return title ? (window.title = title) :
inventory.storeName + ' ' + cart.name;
}
}
);
If you wish to reuse some code that was written in the traditional CommonJS module format it may be difficult to re-work to the array of dependencies used above, and you may prefer to have direct alignment of dependency name to the local variable used for that dependency. You can use the simplified CommonJS wrapper for those cases:
define(function(require, exports, module) {
var a = require('a'),
b = require('b');
//Return the module value
return function () {};
}
);
This wrapper relies on Function.prototype.toString() to give a useful string value of the function contents. This does not work on some devices like the PS3 and some older Opera mobile browsers. Use the optimizer to pull out the dependencies in the array format for use on those devices.
More information is available on the CommonJS page, and in the in the "Sugar" section in the Why AMD page.
You may encounter some define() calls that include a name for the module as the first argument to define():
//Explicitly defines the "foo/title" module:
define("foo/title",
["my/cart", "my/inventory"],
function(cart, inventory) {
//Define foo/title object in here.
}
);
These are normally generated by the optimization tool. You can explicitly name modules yourself, but it makes the modules less portable -- if you move the file to another directory you will need to change the name. It is normally best to avoid coding in a name for the module and just let the optimization tool burn in the module names. The optimization tool needs to add the names so that more than one module can be bundled in a file, to allow for faster loading in the browser.
One module per file.: Only one module should be defined per JavaScript file, given the nature of the module name-to-file-path lookup algorithm. Multiple modules will be grouped into optimized files by the optimization tool, but you should only use the optimization tool to place more than one module in a file.
Relative module names inside define(): For require("./relative/name") calls that can happen inside a define() function call, be sure to ask for "require" as a dependency, so that the relative name is resolved correctly:
define(["require", "./relative/name"], function(require) {
var mod = require("./relative/name");
});
Or better yet, use the shortened syntax that is available for use with translating CommonJS modules:
define(function(require) {
var mod = require("./relative/name");
});
This form will use Function.prototype.toString() to find the require() calls, and add them to the dependency array, along with "require", so the code will work correctly with relative paths.
Relative paths are really useful if you are creating a few modules inside a directory, so that you can share the directory with other people or other projects, and you want to be able to get a handle on the sibling modules in that directory without having to know the directory's name.
Generate URLs relative to module: You may need to generate an URL that is relative to a module. To do so, ask for "require" as a dependency and then use require.toUrl() to generate the URL:
define(["require"], function(require) {
var cssUrl = require.toUrl("./style.css");
});
Console debugging: If you need to work with a module you already loaded via a require(["module/name"], function(){}) call in the JavaScript console, then you can use the require() form that just uses the string name of the module to fetch it:
require("module/name").callSomeFunction()
Note this only works if "module/name" was previously loaded via the async version of require: require(["module/name"]). If using a relative path, like './module/name', those only work inside define
If you define a circular dependency (a needs b and b needs a), then in this case when b's module function is called, it will get an undefined value for a. b can fetch a later after modules have been defined by using the require() method (be sure to specify require as a dependency so the right context is used to look up a):
//Inside b.js:
define(["require", "a"],
function(require, a) {
//"a" in this case will be null if a also asked for b,
//a circular dependency.
return function(title) {
return require("a").doSomething();
}
}
);
Normally you should not need to use require() to fetch a module, but instead rely on the module being passed in to the function as an argument. Circular dependencies are rare, and usually a sign that you might want to rethink the design. However, sometimes they are needed, and in that case, use require() as specified above.
If you are familiar with CommonJS modules, you could instead use exports to create an empty object for the module that is available immediately for reference by other modules. By doing this on both sides of a circular dependency, you can then safely hold on to the the other module. This only works if each module is exporting an object for the module value, not a function:
//Inside b.js:
define(function(require, exports, module) {
//If "a" has used exports, then we have a real
//object reference here. However, we cannot use
//any of a's properties until after b returns a value.
var a = require("a");
exports.foo = function () {
return a.bar();
};
});
Or, if you are using the dependency array approach, ask for the special 'exports' dependency:
//Inside b.js:
define(['a', 'exports'], function(a, exports) {
//If "a" has used exports, then we have a real
//object reference here. However, we cannot use
//any of a's properties until after b returns a value.
exports.foo = function () {
return a.bar();
};
});
JSONP is a way of calling some services in JavaScript. It works across domains and it is an established approach to calling services that just require an HTTP GET via a script tag.
To use a JSONP service in RequireJS, specify "define" as the callback parameter's value. This means you can get the value of a JSONP URL as if it was a module definition.
Here is an example that calls a JSONP API endpoint. In this example, the JSONP callback parameter is called "callback", so "callback=define" tells the API to wrap the JSON response in a "define()" wrapper:
require(["http://example.com/api/data.json?callback=define"],
function (data) {
//The data object will be the API response for the
//JSONP data call.
console.log(data);
}
);
This use of JSONP should be limited to JSONP services for initial application setup. If the JSONP service times out, it means other modules you define via define() may not get executed, so the error handling is not robust.
Only JSONP return values that are JSON objects are supported. A JSONP response that is an array, a string or a number will not work.
This functionality should not be used for long-polling JSONP connections -- APIs that deal with real time streaming. Those kinds of APIs should do more script cleanup after receiving each response, and RequireJS will only fetch a JSONP URL once -- subsequent uses of the same URL as a dependency in a require() or define() call will get a cached value.
Errors in loading a JSONP service are normally surfaced via timeouts for the service, since script tag loading does not give much detail into network problems. To detect errors, you can override requirejs.onError() to get errors. There is more information in the Handling Errors section.
There is a global function, requirejs.undef(), that allows undefining a module. It will reset the loader's internal state to forget about the previous definition of the module.
However, it will not remove the module from other modules that are already defined and got a handle on that module as a dependency when they executed. So it is really only useful to use in error situations when no other modules have gotten a handle on a module value, or as part of any future module loading that may use that module. See the errback section for an example.
If you want to do more sophisticated dependency graph analysis for undefining work, the semi-private onResourceLoad API may be helpful.
RequireJS loads each dependency as a script tag, using head.appendChild().
RequireJS waits for all dependencies to load, figures out the right order in which to call the functions that define the modules, then calls the module definition functions in the right order.
Using RequireJS in a server-side JavaScript environment that has synchronous loading should be as easy as redefining require.load(). The build system does this, the require.load method for that environment can be found in build/jslib/requirePatch.js.
In the future, this code may be pulled into the require/ directory as an optional module that you can load in your env to get the right load behavior based on the host environment.
When using require() in the top-level HTML page (or top-level script file that does not define a module), a configuration object can be passed as the first option:
<script src="scripts/require.js"></script>
<script>
require.config({
baseUrl: "/another/path",
paths: {
"some": "some/v1.0"
},
waitSeconds: 15
});
require( ["some/module", "my/module", "a.js", "b.js"],
function(someModule, myModule) {
//This function will be called when all the dependencies
//listed above are loaded. Note that this function could
//be called before the page is loaded.
//This callback is optional.
}
);
</script>
Also, you can define the config object as the global variable require
before require.js is loaded, and have the values applied automatically.
This example specifies some dependencies to load as soon as require.js defines require():
<script>
var require = {
deps: ["some/module1", "my/module2", "a.js", "b.js"],
callback: function(module1, module2) {
//This function will be called when all the dependencies
//listed above in deps are loaded. Note that this
//function could be called before the page is loaded.
//This callback is optional.
}
};
</script>
<script src="scripts/require.js"></script>
Note: It is best to use var require = {}
and do not use
window.require = {}
, it will not behave correctly in IE.
Supported configuration options:
baseUrl: the root path to use for all module lookups. So in the above example, "my/module"'s script tag will have a src="/another/path/my/module.js". baseUrl is not used when loading plain .js files, those strings are used as-is, so a.js and b.js will be loaded from the same directory as the HTML page that contains the above snippet.
If no baseUrl is explicitly set in the configuration, the default value will be the location of the HTML page that loads require.js. If a data-main attribute is used, that path will become the baseUrl.
The baseUrl can be a URL on a different domain as the page that will load require.js. RequireJS script loading works across domains. The only restriction is on text content loaded by text! plugins: those paths should be on the same domain as the page, at least during development. The optimization tool will inline text! plugin resources so after using the optimization tool, you can use resources that reference text! plugin resources from another domain.
paths: path mappings for module names not found directly under baseUrl. The path settings are assumed to be relative to baseUrl, unless the paths setting starts with a "/" or has a URL protocol in it ("like http:"). Using the above sample config, "some/module"'s script tag will be src="/another/path/some/v1.0/module.js". The path that is used for a module name should not include the .js extension, since the path mapping could be for a directory. The path mapping code will automatically add the .js extension when mapping the module name to a path.
shim: Configure the dependencies and exports for older, traditional "browser globals" scripts that do not use define() to declare the dependencies and set a module value. Example (RequireJS 2.1.0+):
requirejs.config({
shim: {
'backbone': {
//These script dependencies should be loaded before loading
//backbone.js
deps: ['underscore', 'jquery'],
//Once loaded, use the global 'Backbone' as the
//module value.
exports: 'Backbone'
},
'foo': {
deps: ['bar'],
exports: 'Foo',
init: function (bar) {
//Using a function allows you to call noConflict for
//libraries that support it, and do other cleanup.
//However, plugins for those libraries may still want
//a global. "this" for the function will be the global
//object. The dependencies will be passed in as
//function arguments. If this function returns a value,
//then that value is used as the module export value
//instead of the object found via the 'exports' string.
return this.Foo.noConflict();
}
}
}
});
//Then, later in a separate file, call it 'MyModel.js', a module is
//defined, specifying 'backbone' as a dependency.  The global Backbone will still exist on
//the page too.
define(['backbone'], function (Backbone) {
return Backbone.Model.extend({});
});
In RequireJS 2.0.*, the "exports" property in the shim config could have been a function instead of a string. In that case, it functioned the same as the "init" property as shown above. The "init" pattern is used in RequireJS 2.1.0+ so a string value for the exports can be used for enforceDefine, but then allow functional work once the library is known to have loaded.
For "modules" that are just jQuery or Backbone plugins that do not need to export any module value, the shim config can just be an array of dependencies:
requirejs.config({
shim: {
'jquery.colorize': ['jquery'],
'jquery.scroll': ['jquery'],
'backbone.layoutmanager': ['backbone']
}
});
Note however if you want to get 404 load detection in IE so that you can use paths fallbacks or errbacks, then a string exports value should be given so the loader can check if the scripts actually loaded:
requirejs.config({
shim: {
'jquery.colorize': {
deps: ['jquery'],
exports: 'jQuery.fn.colorize'
},
'jquery.scroll': {
deps: ['jquery'],
exports: 'jQuery.fn.scroll'
},
'backbone.layoutmanager': {
deps: ['backbone']
exports: 'Backbone.LayoutManager'
}
}
});
Important notes for "shim" config:
Important optimizer notes for "shim" config:
toplevel
to true, or if using the command line
do not pass -mt
. That option mangles
the global names that shim uses to find exports.map: For the given module prefix, instead of loading the module with the given ID, substitute a different module ID.
This sort of capability is really important for larger projects which may have two sets of modules that need to use two different versions of 'foo', but they still need to cooperate with each other.
This is not possible with the context-backed multiversion support. In addition, the paths config is only for setting up root paths for module IDs, not for mapping one module ID to another one.
map example:
requirejs.config({
map: {
'some/newmodule': {
'foo': 'foo1.2'
},
'some/oldmodule': {
'foo': 'foo1.0'
}
}
});
If the modules are laid out on disk like this:
When 'some/newmodule' does `require('foo')` it will get the foo1.2.js file, and when 'some/oldmodule' does `require('foo')` it will get the foo1.0.js file.
This feature only works well for scripts that are real AMD modules that call define() and register as anonymous modules.
There is also support for a "*" map value which means "for all modules loaded, use this map config". If there is a more specific map config, that one will take precedence over the star config. Example:
requirejs.config({
map: {
'*': {
'foo': 'foo1.2'
},
'some/oldmodule': {
'foo': 'foo1.0'
}
}
});
Means that for any module except "some/oldmodule", when "foo" is wanted, use "foo1.2" instead. For "some/oldmodule" only, use "foo1.0" when it asks for "foo".
config: There is a common need to pass configuration info to a module. That configuration info is usually known as part of the application, and there needs to be a way to pass that down to a module. In RequireJS, that is done with the config option for requirejs.config(). Modules can then read that info by asking for the special dependency "module" and calling module.config(). Example:
requirejs.config({
config: {
'bar': {
size: 'large'
},
'baz': {
color: 'blue'
}
}
});
//bar.js, which uses simplified CJS wrapping:
//http://requirejs.org/docs/whyamd.html#sugar
define(function (require, exports, module) {
//Will be the value 'large'
var size = module.config().size;
});
//baz.js which uses a dependency array,
//it asks for the special module ID, 'module':
//https://github.com/jrburke/requirejs/wiki/Differences-between-the-simplified-CommonJS-wrapper-and-standard-AMD-define#wiki-magic
define(['module'], function (module) {
//Will be the value 'blue'
var color = module.config().color;
});
packages: configures loading modules from CommonJS packages. See the packages topic for more information.
waitSeconds: The number of seconds to wait before giving up on loading a script. Setting it to 0 disables the timeout. The default is 7 seconds.
context: A name to give to a loading context. This allows require.js to load multiple versions of modules in a page, as long as each top-level require call specifies a unique context string. To use it correctly, see the Multiversion Support section.
deps: An array of dependencies to load. Useful when require is defined as a config object before require.js is loaded, and you want to specify dependencies to load as soon as require() is defined.
callback: A function to execute after deps have been loaded. Useful when require is defined as a config object before require.js is loaded, and you want to specify a function to require after the configuration's deps array has been loaded.
enforceDefine: If set to true, an error will be thrown if a script loads that does not call define() or have a shim exports string value that can be checked. See Catching load failures in IE for more information.
xhtml: If set to true, document.createElementNS() will be used to create script elements.
urlArgs: Extra query string arguments appended to URLs that RequireJS uses to fetch resources. Most useful to cache bust when the browser or server is not configured correctly. Example cache bust setting for urlArgs:
urlArgs: "bust=" + (new Date()).getTime()
During development it can be useful to use this, however be sure to remove it before deploying your code.
scriptType: Specify the value for the type="" attribute used for script tags inserted into the document by RequireJS. Default is "text/javascript". To use Firefox's JavaScript 1.8 features, use "text/javascript;version=1.8".
RequireJS supports loading modules that are in a CommonJS Packages directory structure, but some additional configuration needs to be specified for it to work. Specifically, there is support for the following CommonJS Packages features:
IMPORTANT NOTES
If you use a similar project layout as specified in the Start Guide, the start of your web project would look something like this (Node/Rhino-based projects are similar, just use the contents of the scripts directory as the top-level project directory):
Here is how the example directory layout looks with two packages, cart and store:
project.html will have a script tag like this:
<script data-main="scripts/main" src="scripts/require.js"></script>
This will instruct require.js to load scripts/main.js. main.js uses the "packages" config to set up packages that are relative to require.js, which in this case are the source packages "cart" and "store":
//main.js contents
//Pass a config object to require
require.config({
"packages": ["cart", "store"]
});
require(["cart", "store", "store/util"],
function (cart, store, util) {
//use the modules as usual.
});
A require of "cart" means that it will be loaded from scripts/cart/main.js, since "main" is the default main module setting supported by RequireJS. A require of "store/util" will be loaded from scripts/store/util.js.
If the "store" package did not follow the "main.js" convention, and looked more like this:
Then the RequireJS configuration would look like so:
require.config({
packages: [
"cart",
{
name: "store",
main: "store"
}
]
});
To avoid verbosity, it is strongly suggested to always use packages that use "main" convention in their structure.
As mentioned in Configuration Options, multiple versions of a module can be loaded in a page by using different "context" configuration options. require.config() returns a require function that will use the context configuration. Here is an example that loads two different versions of the alpha and beta modules (this example is taken from one of the test files):
<script src="../require.js"></script>
<script>
var reqOne = require.config({
context: "version1",
baseUrl: "version1"
});
reqOne(["require", "alpha", "beta",],
function(require, alpha, beta) {
log("alpha version is: " + alpha.version); //prints 1
log("beta version is: " + beta.version); //prints 1
setTimeout(function() {
require(["omega"],
function(omega) {
log("version1 omega loaded with version: " +
omega.version); //prints 1
}
);
}, 100);
});
var reqTwo = require.config({
context: "version2",
baseUrl: "version2"
});
reqTwo(["require", "alpha", "beta"],
function(require, alpha, beta) {
log("alpha version is: " + alpha.version); //prints 2
log("beta version is: " + beta.version); //prints 2
setTimeout(function() {
require(["omega"],
function(omega) {
log("version2 omega loaded with version: " +
omega.version); //prints 2
}
);
}, 100);
});
</script>
Note that "require" is specified as a dependency for the module. This allows the require() function that is passed to the function callback to use the right context to load the modules correctly for multiversion support. If "require" is not specified as a dependency, then there will likely be an error.
The example above in the Multiversion Support section shows how code can later be loaded by nested require() calls.
As of release 0.12, RequireJS can be run inside a Web Worker. Just use importScripts() inside a web worker to load require.js (or the JS file that contains the require() definition), then call require.
You will likely need to set the baseUrl configuration option to make sure require() can find the scripts to load.
You can see an example of its use by looking at one of the files used in the unit test.
RequireJS can be used in Rhino via the r.js adapter. See the r.js README for more information.
The general class of errors are 404s for scripts (not found), network timeouts or errors in the scripts that are loaded. RequireJS has a few tools to deal with them: require-specific errbacks, a "paths" array config, and a global requirejs.onError.
The error object passed to errbacks and the global requirejs.onError function will usually contain two custom properties:
If you get an error with a requireModules, it probably means other modules that depend on the modules in that requireModules array are not defined.
Internet Explorer has a set of problems that make it difficult to detect load failures for errbacks/paths fallbacks:
So it is very difficult with IE to allow both anonymous AMD modules, which are a core benefit of AMD modules, and reliable detect errors.
However, if you are in a project that you know uses define() to declare all of its modules, or it uses the shim config to specify string exports for anything that does not use define(), then if you set the enforceDefine config value to true, the loader can confirm if a script load by checking for the define() call or the existence of the shim's exports global value.
So if you want to support Internet Explorer, catch load errors, and have modular code either through direct define() calls or shim config, always set enforceDefine to be true. See the next section for an example.
NOTE: If you do set enforceDefine: true, and you use data-main="" to load your main JS module, then that main JS module must call define() instead of require() to load the code it needs. The main JS module can still call require/requirejs to set config values, but for loading modules it should use define().
If you then also use almond to build your code without require.js, be sure to use the insertRequire build setting to insert a require call for the main module -- that serves the same purpose of the initial require() call that data-main does.
Errbacks, when used with requirejs.undef(), will allow you to detect if a module fails to load, undefine that module, reset the config to a another location, then try again.
A common use case for this is to use a CDN-hosted version of a library, but if that fails, switch to loading the file locally:
requirejs.config({
enforceDefine: true,
paths: {
jquery: 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min'
}
});
//Later
require(['jquery'], function ($) {
//Do something with $ here
}, function (err) {
//The errback, error callback
//The error has a list of modules that failed
var failedId = err.requireModules && err.requireModules[0],
if (failedId === 'jquery') {
//undef is function only on the global requirejs object.
//Use it to clear internal knowledge of jQuery. Any modules
//that were dependent on jQuery and in the middle of loading
//will not be loaded yet, they will wait until a valid jQuery
//does load.
requirejs.undef(failedId);
//Set the path to jQuery to local path
requirejs.config({
paths: {
jquery: 'local/jquery'
}
});
//Try again. Note that the above require callback
//with the "Do something with $ here" comment will
//be called if this new attempt to load jQuery succeeds.
require(['jquery'], function () {});
} else {
//Some other error. Maybe show message to the user.
}
});
With `requirejs.undef()`, if you later set up a different config and try to load the same module, the loader will still remember which modules needed that dependency and finish loading them when the newly configured module loads.
Note: errbacks only work with callback-style require calls, not define() calls. define() is only for declaring modules.
The above pattern for detecting a load failure, undef()ing a module, modifying paths and reloading is a common enough request that there is also a shorthand for it. The paths config allows array values:
requirejs.config({
//To get timely, correct error triggers in IE, force a define/shim exports check.
enforceDefine: true,
paths: {
jquery: [
'http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min',
//If the CDN location fails, load from this location
'lib/jquery'
]
}
});
//Later
require(['jquery'], function ($) {
});
This above code will try the CDN location, but if that fails, fall back to the local lib/jquery.js location.
Note: paths fallbacks only work for exact module ID matches. This is different from normal paths config which can apply to any part of a module ID prefix segment. Fallbacks are targeted more for unusual error recovery, not a generic path search path solution, since those are inefficient in the browser.
To detect errors that are not caught by local errbacks, you can override requirejs.onError():
requirejs.onError = function (err) {
console.log(err.requireType);
if (err.requireType === 'timeout') {
console.log('modules: ' + err.requireModules);
}
throw err;
};
RequireJS supports loader plugins. This is a way to support dependencies that are not plain JS files, but are still important for a script to have loaded before it can do its work. The RequireJS wiki has a list of plugins. This section talks about some specific plugins that are maintained alongside RequireJS:
It is nice to build HTML using regular HTML tags, instead of building up DOM structures in script. However, there is no good way to embed HTML in a JavaScript file. The best that can be done is using a string of HTML, but that can be hard to manage, particularly for multi-line HTML.
RequireJS has a plugin, text.js, that can help with this issue. It will automatically be loaded if the text! prefix is used for a dependency. See the text.js README for more information.
It is possible when using RequireJS to load scripts quickly enough that they complete before the DOM is ready. Any work that tries to interact with the DOM should wait for the DOM to be ready. For modern browsers, this is done by waiting for the DOMContentLoaded event.
However, not all browsers in use support DOMContentLoaded. The domReady module implements a cross-browser method to determine when the DOM is ready. Download the module and use it in your project like so:
require(['domReady'], function (domReady) {
domReady(function () {
//This function is called once the DOM is ready.
//It will be safe to query the DOM and manipulate
//DOM nodes in this function.
});
});
Since DOM ready is a common application need, ideally the nested functions in the API above could be avoided. The domReady module also implements the Loader Plugin API, so you can use the loader plugin syntax (notice the ! in the domReady dependency) to force the require() callback function to wait for the DOM to be ready before executing. domReady will return the current document when used as a loader plugin:
require(['domReady!'], function (doc) {
//This function is called once the DOM is ready,
//notice the value for 'domReady!' is the current
//document.
});
Note: If the document takes a while to load (maybe it is a very large document, or has HTML script tags loading large JS files that block DOM completion until they are done), using domReady as a loader plugin may result in a RequireJS "timeout" error. If this a problem either increase the waitSeconds configuration, or just use domReady as a module and call domReady() inside the require() callback.
Once your web app gets to a certain size and popularity, localizing the strings in the interface and providing other locale-specific information becomes more useful. However, it can be cumbersome to work out a scheme that scales well for supporting multiple locales.
RequireJS allows you to set up a basic module that has localized information without forcing you to provide all locale-specific information up front. It can be added over time, and only strings/values that change between locales can be defined in the locale-specific file.
i18n bundle support is provided by the i18n.js plugin. It is automatically loaded when a module or dependency specifies the i18n! prefix (more info below). Download the plugin and put it in the same directory as your app's main JS file.
To define a bundle, put it in a directory called "nls" -- the i18n! plugin assumes a module name with "nls" in it indicates an i18n bundle. The "nls" marker in the name tells the i18n plugin where to expect the locale directories (they should be immediate children of the nls directory). If you wanted to provide a bundle of color names in your "my" set of modules, create the directory structure like so:
The contents of that file should look like so:
//my/nls/colors.js contents:
define({
"root": {
"red": "red",
"blue": "blue",
"green": "green"
}
});
An object literal with a property of "root" defines this module. That is all you have to do to set the stage for later localization work.
You can then use the above module in another module, say, in a my/lamps.js file:
//Contents of my/lamps.js
define(["i18n!my/nls/colors"], function(colors) {
return {
testMessage: "The name for red in this locale is: " + colors.red
}
});
The my/lamps module has one property called "testMessage" that uses colors.red to show the localized value for the color red.
Later, when you want to add a specific translation to a file, say for the fr-fr locale, change my/nls/colors to look like so:
//Contents of my/nls/colors.js
define({
"root": {
"red": "red",
"blue": "blue",
"green": "green"
},
"fr-fr": true
});
Then define a file at my/nls/fr-fr/colors.js that has the following contents:
//Contents of my/nls/fr-fr/colors.js
define({
"red": "rouge",
"blue": "bleu",
"green": "vert"
});
RequireJS will use the browser's navigator.language or navigator.userLanguage property to determine what locale values to use for my/nls/colors, so your app does not have to change. If you prefer to set the locale, you can use the module config to pass the locale to the plugin:
requirejs.config({
config: {
//Set the config for the i18n
//module ID
i18n: {
locale: 'fr-fr'
}
}
});
Note that RequireJS will always use a lowercase version of the locale, to avoid case issues, so all of the directories and files on disk for i18n bundles should use lowercase locales.
RequireJS is also smart enough to pick the right locale bundle, the one that most closely matches the ones provided by my/nls/colors. For instance, if the locale is "en-us", then the "root" bundle will be used. If the locale is "fr-fr-paris" then the "fr-fr" bundle will be used.
RequireJS also combines bundles together, so for instance, if the french bundle was defined like so (omitting a value for red):
//Contents of my/nls/fr-fr/colors.js
define({
"blue": "bleu",
"green": "vert"
});
Then the value for red in "root" will be used. This works for all locale pieces. If all the bundles listed below were defined, then RequireJS will use the values in the following priority order (the one at the top takes the most precedence):
If you prefer to not include the root bundle in the top level module, you can define it like a normal locale bundle. In that case, the top level module would look like:
//my/nls/colors.js contents:
define({
"root": true,
"fr-fr": true,
"fr-fr-paris": true
});
and the root bundle would look like:
//Contents of my/nls/root/colors.js
define({
"red": "red",
"blue": "blue",
"green": "green"
});


--- layout: post title: "What to test and not to test" description: "Should you unit test everything? Hardly surprising, the answer is that It Depends™. This article outlines some of the circumstances you might consider." date: 2018-11-12 7:45 UTC tags: [Unit Testing, Productivity] image: "/content/binary/one-test-path-through-complex-unit.png" image_alt: "Diagram that shows a unit test exercising one path through a unit." --- {% include JB/setup %}
{{ page.description }}
Some years ago, I, somewhat to my own surprise, found myself on the wrong side of a controversy about whether one should test trivial code. The context was a discussion about Test-Driven Development (TDD), and for reasons that I still stand behind today, I argued that you should test all code, including trivial code, such as property getters.
Most of the 'TDD community' reacted quite negatively to that article, some in not-so-nice ways. Some people reacted, I believe, based on their dislike of the conclusion, without responding to my arguments. Others, however, gave reasoned rebuttals. When people like Derick Bailey and Mark Rendle disagree with me, in a reasoned matter, even, I consider that a good reason to revisit my thinking.
Could I have been wrong? That certainly wouldn't be the first time, but even re-reading the article today, I find my logic sound. Yet, I've substantially nuanced my position since then.
It took me some time to understand how I could disagree so radically with people I respect. It didn't take me five years, though, but while I've been at peace with the apparent conflict for years, I've never written a coherent description of my current understanding of this problem space. This article is my attempt to remedy that omission.
Whenever you consult an expert about how to address a problem, you'll invariably get the answer that it depends. I'd suggest that if you don't get that answer, the person is probably not an expert, after all. A useful expert will also be able to tell you on what 'it' depends.
In an abstract sense, what 'it' depends on is the context.
I wrote my original piece from a particular context. Part of that context is explicitly present in the article, but another part is entirely implicit. People read the article from within their own contexts, which in many cases turned out to be incongruent with mine. No wonder people disagreed.
My context at that time was that I had some success with AutoFixture, an open source library, which is what I consider wildlife software. Once you've released a version of the software, you have no control of where it's installed, or how it's used.
This means that backwards compatibility becomes important. If I broke something, I would inconvenience the users of my software. Making sure that compatibility didn't break became one of my highest priorities. I used unit tests for regression tests, and I did, indeed, test the entire public API of AutoFixture, to make sure that no breaking changes were introduced.
That was my implicit context. Read in that light, my dogmatic insistence on testing everything hopefully makes a little more sense.
Does that mean that my conclusion transfers to other circumstances? No, of course it doesn't. If you're developing and maintaining zoo software, breaking changes are of less concern. From that perspective, my article could easily look like the creation of an unhinged mind.
In order to figure out what to test, and what not to test, you should ask yourself the question: what's the purpose of testing?
At first glance, that may seem like an inane question, but there's actually more than one purpose of a unit test. When doing TDD, the purpose of a test is to provide feedback about the API you're developing. A unit test is the first client of the production API. If a test is difficult to write, the production API is difficult to use. More on TDD later, though.
You may say that another purpose of automated tests is that they prevent errors. That's not the case, though. Automated tests prevent regressions.
If you wrote the correct test, your test suite may also help to prevent errors, but a unit test is only as good as the programmer who wrote it. You could have made a mistake when you wrote the test. Or perhaps you misunderstood the specification of what you were trying to implement. Why do you even trust tests?
Why do you want to prevent regressions? Because they're costly?
Based on the little risk management I know about, you operate with two dimensions of risk: the impact of an event, should it occur, and the probability that the event occurs.
Should we all be worried that an asteroid will hit the Earth and wipe out most life? The impact of such an event is truly catastrophic, yet the probability is diminishingly small, so the risk is insignificant. The risk of going for a drive in a car is much higher.
How do you reduce risk? You either decrease the probability that the adverse event will happen, or you reduce the impact of it, should it happen.
Steve Freeman once wrote a nice article about the distinction between fail-safe software, and software that could safely fail. Unfortunately, that article seems to have disappeared from the internet. The point, however, was that with unit tests, we attempt to make our software fail-safe. The unit tests act as a gate that prevents bad versions of the software from being released. That's not a bad strategy for managing risk, but only half of the strategies available.
For example, Continuous Delivery describes how you can use Canary Releases and automated rollbacks to reduce the impact of errors. That's what Steve Freeman called safe fail.
I apologise for this detour around risk management, but I think that it's important that you make an explicit decision about automated testing. You can use unit tests to prevent regressions. What's the impact of an error in production, though?
This depends on the type of software you're developing. When considering alternatives, I often envision the various options as inhabiting a continuum:
For some types of software, an error 'in production' could be fatal. This would be the case for guidance software for Voyager 1, 2, other guidance software, software for medical devices, and so on. If you deploy a defect to Voyager 2, you've probably lost the craft for ever.
(I'd be surprised if the Voyager guidance software is actually covered by unit tests, but I'd expect that other quality assurance checks are in place. For comparison, the space shuttle software development process has been appraised at CMMI level 5.)
On the other side of the continuum, as a software developer, you probably write small ad-hoc development tools for your own use. For example, a few years ago I did a lot of REST API development, and many of the APIs I worked with required OAuth authentication. I wrote a little command-line program that I could use to log on to an internal system and exchange that to a token. I don't think that I wrote any tests for that program. If there were problems with it, I'd just open the source code and fix the problem. Errors were cheap in that situation.
Most software probably falls somewhere in the middle of those extremes. The cost of errors in wildlife software is probably higher than it is for zoo software, but most software can get by with less coverage than everything.
How do you know that your software works? You test it. If you want to automate your testing efforts, you write unit tests... but a unit test suite is software. How do you know that your tests work? Is it going to be turtles all the way down?
I think that we can trust tests for other reasons, but one of them is that each test case exercises a deterministic path through a unit that supports many paths of execution.
In other words, each unit test is an example of a singular execution path. Tests, then, should have a cyclomatic complexity of 1. In other words, you write (test) code with a cyclomatic complexity of 1 in order to test code with a higher cyclomatic complexity.
Should you test code that has a cyclomatic complexity of 1?
What would be the point of that? Why would you write a unit test with a cyclomatic complexity of 1 to test a piece of code with a cyclomatic complexity of 1? Wouldn't you just be adding more code?
From the perspective of trusting the code, there's no reason to trust such a test more than the code that it exercises. In that light, I think it makes sense to not write that test.
To be clear, there could be other reasons to test code with a cyclomatic complexity of 1. One reason, that I pointed out in my original article, is that you don't know if the simple piece of code will stay simple. Another reason is to prevent regressions. A common metaphor for unit testing is double-entry bookkeeping. If you write the unit test in a different way than the implementation, the two views on that behaviour may keep each other in check. You could do that with triangulation using parametrised tests, or perhaps with property-based testing.
I tend to use a heuristic where the farther to the left I am on the above continuum, the more I'm inclined to skip testing of simple functionality. Code with a cyclomatic complexity of 1 falls into that bucket.
Let's return our attention to TDD. The previous paragraphs have mostly discussed automated tests as a way to prevent regressions. TDD gives us an entirely different motivation for writing tests: the tests provide feedback on the design of our production code.
Viewed like this, the tests themselves are only artefacts of the TDD process. It's usually a good idea to keep them around after the standard red-green-refactor cycle, because they serve double-duty as regression tests.
Should you test-drive everything? If you're inexperienced with TDD, you get the best exercise by test-driving as much as possible. This still doesn't have to mean that you must write a an explicit test case for each class member. That's what both Mark Rendle and Derick Bailey pointed out. It's often enough if the tests somehow exercise those members.
Revisiting my old article, my mistake was that I conflated TDD with regression testing. My motivation for writing an explicit test case for each member, no matter how trivial, was to preserve backwards compatibility. It really had nothing to do with TDD.
Despite all other rules of thumb I've so far listed, I'll suggest a few exceptions.
Even if a piece of code theoretically has a cyclomatic complexity of 1, if you're in doubt of how it works, then write a test.
If you have a defect in production, then reproduce that defect with one or more tests, even if the code in question is 'trivial'. Obviously, it wasn't trivial after all, if it caused a bug in production.
When you're leaning something new, you're typically struggling with even the most basic concepts. That's just how learning works. In that phase of learning, it often pays to follow explicit rules. A way to think about this is the Dreyfus model of skill acquisition. Once you gain some experience, you can start deviating from the rules. We could call this pragmatism.
I often discuss TDD with people who plead for pragmatism. Those people have typically practised TDD for years, if not decades. So have I, and, believe it or not, I'm often quite pragmatic when I practice TDD 'for real'. This is, however, a prerogative of experience.
You can only be pragmatic if you know how to be dogmatic.I use the concept of dogmatism as an antonym to pragmatism. I view pragmatism in programming as the choice of practical solutions over theoretical principles. It's a choice, which means that you must be aware of alternatives.
If you don't know the (principled) alternative, there's no choice.
When you're learning something new, you're still not aware of how to do things according to principle. That's natural. I find myself in that situation all the time. If you keep at it, though, eventually you'll have gained enough experience that you can make actual choices.
This applies to TDD as well. When you're still learning TDD, stick to the principles, particularly when it's inconvenient. Once you've done TDD for a few years, you've earned the right to be pragmatic.
Which parts of your code base should you (unit) test? It Depends™.
It depends on why you are unit testing, and on the cost of defects in production, and probably many other things I didn't think of.
What's the purpose of tests? Are you using TDD to get feedback on your API design ideas? Or is the main purpose of tests to prevent regressions? Your answers to such questions should guide your decisions on how much to test.
Recently, I've mostly been writing about topics related to computer science, such as the relationships between various branches of mathematics to computation. In such realms, laws apply, and answers tend to be either right or wrong. A piece like this article is different.
This is fundamentally a deeply subjective essay. It's based on my experience with writing automated tests in various circumstances since 2003. I've tried to be as explicit about my context as possible, but I've most likely failed to identify one or more implicit assumptions or biases. I do, therefore, encourage comments.
I wrote this commentary because people keep asking me about how much to test, and when. I suppose it's because they wish to learn from me, and I'm happy to share what I know, to the best of my ability. I have much to learn myself, though, so read this only as the partial, flawed, personal answer that it is.


\log_{base}number = {?}
answer
If \log_{b}x=y
, then b^y=x
.
First, try to write number
, the number we are taking the logarithm of, as a power of base
, the base of the logarithm.
number
can be expressed as power_string
.
number
can be expressed as base^answer
.
base^answer=number
, so \log_{base}number=answer
.


生物信息R数据分析
Cover picture
Acknowledgments
0.1
简介
这本书包含什么内容？
How Is This Book Different?
0.2
这本书有什么不同？
0.3
安装R
0.4
R基础知识
0.5
Installing Packages
0.6
Importing Data into R
0.6.1
Getting Started Exercises
0.7
Brief Introduction to
dplyr
0.7.1
dplyr
exercises
0.8
Mathematical Notation
1
Inference
1.1
Introduction
1.2
Random Variables
1.3
The Null Hypothesis
1.4
Distributions
1.5
Probability Distribution
1.6
Normal Distribution
1.7
Populations, Samples and Estimates
1.7.1
Population, Samples, and Estimates Exercises
1.8
Central Limit Theorem and t-distribution
1.9
Central Limit Theorem in Practice
1.10
t-tests in Practice
1.11
The t-distribution in Practice
1.12
Confidence Intervals
1.13
Power Calculations
1.14
Monte Carlo Simulation
1.15
Parametric Simulations for the Observations
1.16
Permutation Tests
1.17
Association Tests
2
探索性数据分析
2.1
QQ图
2.2
Boxplots
2.3
Scatterplots and Correlation
2.4
Stratification
2.5
Bivariate Normal Distribution
2.6
Plots to Avoid
2.7
Misunderstanding Correlation (Advanced)
2.8
Robust Summaries
2.9
Wilcoxon Rank Sum Test
3
Matrix Algebra
3.1
Motivating Examples
3.2
Matrix Notation
3.3
Solving Systems of Equations
3.4
Vectors, Matrices, and Scalars
3.5
Matrix Operations
3.6
Examples
4
Linear Models
4.1
The Design Matrix
4.2
The Mathematics Behind lm()
4.3
Standard Errors
4.4
Interactions and Contrasts
4.5
Linear Model with Interactions
4.6
Analysis of Variance
4.7
Collinearity
4.8
Rank
4.9
Removing Confounding
4.10
The QR Factorization (Advanced)
4.11
Going Further
5
Inference for High Dimensional Data
5.1
Introduction
5.2
Inference in Practice
5.3
Procedures
5.4
Error Rates
5.5
The Bonferroni Correction
5.6
False Discovery Rate
5.7
Direct Approach to FDR and q-values (Advanced)
5.8
Basic Exploratory Data Analysis
6
统计模型
6.1
二项分布 (The Binomial Distribution)
6.2
泊松分布 (The Poisson Distribution)
6.3
最大似然估计
6.4
连续变量的分布
6.5
贝叶斯统计
6.6
Hierarchical Models
7
距离和维度降低
7.1
简介
7.2
Euclidean Distance
7.3
高维数据的距离
7.4
Distance exercises
7.5
Dimension Reduction Motivation
7.6
Singular Value Decomposition
7.7
Projections
7.8
Rotations
7.9
Multi-Dimensional Scaling Plots
7.10
MDS exercises
7.11
Principal Component Analysis
8
Basic Machine Learning
8.1
Clustering
8.2
Conditional Probabilities and Expectations
8.3
Smoothing
8.4
Bin Smoothing
8.5
Loess
8.6
Class Prediction
8.7
Cross-validation
9
Batch Effects
9.1
Confounding
9.2
Confounding: High-Throughput Example
9.3
Discovering Batch Effects with EDA
9.4
Gene Expression Data
9.5
Motivation for Statistical Approaches
9.6
Adjusting for Batch Effects with Linear Models
9.7
Factor Analysis
9.8
Modeling Batch Effects with Factor Analysis
参考文献
本书由 bookdown 强力驱动
生物信息R数据分析
参考文献


If your doctor thinks you can be treated at home, he or she may give you special instructions, such as to isolate yourself as much as possible from family and pets while you're sick and to stay home for a period of time. If you're very ill, you may need to be treated in the hospital.
Confirmed Cases and Deaths by Country, Territory, or Conveyance:
| Country | Confirmed | Recovered | Deaths |
|---|
| City | Confirmed | Recovered | Deaths | Active cases |
|---|
This is some of the Starting stats, from which you can reach to the conclusion how big this pandemic is:
| Country | Total Cases | Total Deaths | Total Recovered |
|---|---|---|---|
| India | |||
| China | |||
| USA | |||
| Italy | |||
| Spain | |||
| Germany | |||
| Iran | |||
| France | |||
| South Korea | |||
| Netherland | |||
| Australia | |||
| Austria | |||
| Switzerland | |||
| UK | |||
| Canada | |||
| Japan | |||
| Iraq |


Technical Blog 4:
I got blocked a lot this sprint. It was pretty smooth sailing till I got to the issue of returning an Array for super fizzbuzz. I checked on the solution and didn’t understand .map. I had to do a lot of research regarding what it was and how it should be used, but then when I researched .map I would discover that I would then need to understand arrow functions. I ended up going down a rabbit hole of how to code more elegantly in javascript. I would say that I have a very shallow understanding of some of the higher order methods, I most certainly need to keep working and understanding things like the arrow function, .reduce, .map and .find.
I was quite happy when I managed to solve the .sum method problem without consulting the answers. I primarily used my main man google and then hit up youtube where I was able to find a video tutorial on some higher order methods. I felt pretty disappointed with myself at first as I was really struggling to avoid distractions, but, once I managed to watch the entire video it wasn’t difficult to apply what I’d learnt and solve the .sum kata.
Problem Solving Techniques:
- Pseudocode – I need to make an effort to use this more actively, I found that when I was able to actually solve an issue that I was stuck on for a while it was because I went back and wrote out what I was trying to do.
- Trying something – I am often just mashing in random bits of code crossing my fingers and then scratching my head
- Rubber ducky method – I have a little blue mecha man that my friend sent me from Japan. He has become my sounding board for all things tech related. He is also becoming a part time therapist.
- Reading error messages – Definitely helps a lot, I still frequently run into an issue where I’ve added an additional ‘}’ or I’m missing a ; or I’ve spelt a variable wrong.
- Console.logging – Not using this enough, will need to implement it more.
- Googling – Google is my home boy, we’ve been tight since my Uni days many moons ago and we continue to be absolute bros.
- Asking your peers for help – Less actively using this, I’ve posted some questions in the foundations channel, although I think that a lot of my current issue stem from me still getting together my basics. I’d rather make sure my basics are up to scratch before I pester fellow peers.
- Asking coaches for help – Don’t mind bugging coaches so much. I went in to get some coding help from Allie on Wednesday which I found super useful. Would recommend to anyone else trying to wrap their head around coding issues.
- Improving your process with reflection – This is definitely helpful, continual reflection and thoughts on the operations of JavaScript and things that I’ve learnt throughout the day are helping me consolidate my thoughts and understanding.


Register
First Name:
Last Name:
Male
Female
Other
Email:
Password:
Birthday
Month
February
other months
Day
25
others
Year
CLASSIFIED INFO
other years
I agree to the terms and conditions


The Rime of the Ancient Mariner
by Samuel Taylor Coleridge
Additional Information
- Year Published: 1798
- Language: English
- Country of Origin: England
- Source: Coleridge, S.T. (1798) The Rime of Ancient Mariner London, England: J. & A. Arch, Gracechurch Street
-
Readability:
- Flesch–Kincaid Level: 9.0
- Word Count: 708
- Genre: Poetry
- Keywords: 18th century literature, british literature, poetry
- ✎ Cite This
Downloads
This Hermit good lives in that wood
Which slopes down to the sea.
How loudly his sweet voice he rears!
He loves to talk with marineres
That come from a far countree.
He kneels at morn and noon and eve—
He hath a cushion plump:
It is the moss that wholly hides
The rotted old oak-stump.
The skiff-boat neared: I heard them talk,
"Why this is strange, I trow!
Where are those lights so many and fair,
That signal made but now?"
"Strange, by my faith!" the Hermit said—
"And they answered not our cheer!
The planks looked warped! and see those sails,
How thin they are and sere!
I never saw aught like to them,
Unless perchance it were
"Brown skeletons of leaves that lag
My forest-brook along;
When the ivy-tod is heavy with snow,
And the owlet whoops to the wolf below,
That eats the she-wolf's young."
"Dear Lord! it hath a fiendish look—
(The Pilot made reply)
I am a-feared"—"Push on, push on!"
Said the Hermit cheerily.
The boat came closer to the ship,
But I nor spake nor stirred;
The boat came close beneath the ship,
And straight a sound was heard.
Under the water it rumbled on,
Still louder and more dread:
It reached the ship, it split the bay;
The ship went down like lead.
Stunned by that loud and dreadful sound,
Which sky and ocean smote,
Like one that hath been seven days drowned
My body lay afloat;
But swift as dreams, myself I found
Within the Pilot's boat.
Upon the whirl, where sank the ship,
The boat spun round and round;
And all was still, save that the hill
Was telling of the sound.
I moved my lips—the Pilot shrieked
And fell down in a fit;
The holy Hermit raised his eyes,
And prayed where he did sit.
I took the oars: the Pilot's boy,
Who now doth crazy go,
Laughed loud and long, and all the while
His eyes went to and fro.
"Ha! ha!" quoth he, "full plain I see,
The Devil knows how to row."
And now, all in my own countree,
I stood on the firm land!
The Hermit stepped forth from the boat,
And scarcely he could stand.
"O shrieve me, shrieve me, holy man!"
The Hermit crossed his brow.
"Say quick," quoth he, "I bid thee say—
What manner of man art thou?"
Forthwith this frame of mine was wrenched
With a woeful agony,
Which forced me to begin my tale;
And then it left me free.
Since then, at an uncertain hour,
That agony returns;
And till my ghastly tale is told,
This heart within me burns.
I pass, like night, from land to land;
I have strange power of speech;
That moment that his face I see,
I know the man that must hear me:
To him my tale I teach.
What loud uproar bursts from that door!
The wedding-guests are there:
But in the garden-bower the bride
And bride-maids singing are:
And hark the little vesper bell,
Which biddeth me to prayer!
O Wedding-Guest! this soul hath been
Alone on a wide wide sea:
So lonely 'twas, that God himself
Scarce seemed there to be.
O sweeter than the marriage-feast,
'Tis sweeter far to me,
To walk together to the kirk
With a goodly company!—
To walk together to the kirk,
And all together pray,
While each to his great Father bends,
Old men, and babes, and loving friends,
And youths and maidens gay!
Farewell, farewell! but this I tell
To thee, thou Wedding-Guest!
He prayeth well, who loveth well
Both man and bird and beast.
He prayeth best, who loveth best
All things both great and small;
For the dear God who loveth us
He made and loveth all.
The Mariner, whose eye is bright,
Whose beard with age is hoar,
Is gone: and now the Wedding-Guest
Turned from the bridegroom's door.
He went like one that hath been stunned,
And is of sense forlorn:
A sadder and a wiser man,
He rose the morrow morn.


This week, we discussed the ideas we have brainstormed with the staff, and settled on one idea: a VR Game called "Who's the Murderer".
Brainstorming Process
Sky Walk/Sky Tour
Inspiration: World Wide Telescope
Description: Users get to explore the universe via the project. Potential Interaction includes the camera will display parameters according to user’s camera, or/and the user can drive a spaceship to move faster The pros are it is for educational purpose and the existing database that can help us the set up the sky. However, there is not a lot of user interactions besides walking around. And it might be hard to transfer the data from web to VR
Synthetic Big Watermelon
Inspiration: An Existing Game
Description: going from a small grape, users will try to combine identical items to get the big watermelon. The pros are it’s fun and popular, but it might be relatively easy to implement
Driving Test Simulation
Description: a driving test simulation. This woudl be a useful tool to learn about driving, but it is hard to simulate the brakes and scenes as moving.
Campus Tour
We crossed this one out because it is hard to find pictures with large enough resolution. Also, the intention for this project is to give new Huskies a chance to explore the campus before we can get back to in-person schooling. With the vaccines out, there is a good chance that the campus will reopen this fall, making the work unnecessary.
RPG game: Who’s the murderer
Description: 6 players will be assigned different roles, five suspects and one detective. Someone has died, and there is only one murderer. Each character has their own storyline, and their rooms will have clues about their stories. At the end of two rounds of scene explorations, the 6 players will vote and figure out who is the murderer. This is a popular game that encourage social interactions, but it ight be hard to implement to build scenes and add interactions, plus networking needed.
Decision
After careful considerations and discussions about the conversations we had with TAs and the instructors, we picked the last one as our project. Great appreciation for all the staff that has helped out for our brainstorming process!Introduction to: Who’s the Murderer
Basics, Process, and Settings
Story Settings
There is an island on this planet, called the Middle of Nowhere. It is a quiet place with only two inns on it: Happy Inn, and Wendy’s Inn.
Recently, Happy Inn has become more a more popular because of four suicide cases. Starting on April 30, there is one person committed to suicide each month on the 30th. After investigations, the police believe that these are all indeed suicidal cases. But the dead body of Jane, the owner of Happy Inn, was found today, August 30th.
When people on the island try to call the police, they find that there is no way to communicate with the outside world. No phone, no internet, no ships, everyone is trapped on the island. There is no way to escape unless they can solve the puzzles, gather the hints, and identify the killer.
So, who is the murderer? Who killed Jane?
Next Steps
- Build the initial networking part of the project. The goal is to have players connect and go to a plane successfully.
- Continue refine the storylines for each players.
- Design the rooms of each player with more details. Visualize all the furnitures and tools that need to present in each room to hide clues.
- Start building the initial scenes, which is the meeting room.
- Continue researching and learning A-frame, WebXR, and Croquet.


{% extends "pages/base_page.html" %} {% block content %}
June 10, 2017, 8:00 PM EDT
Our Revolution is powered by thousands of volunteers from across the world. From phonebanking and researching to rapid response teams and help desk volunteers, there’s a way to get involved where you feel comfortable.
After you fill out the volunteer form you'll receive immediate instructions on how to get started.
Our Revolution is made up of local groups from all around the world. Search for a group to get involved with in your area or start your own group today.
Find or host an Our Revolution event near you today.
There are as many as 8,793 positions of leadership within local parties up for grabs in the next two years, and we need real progressives like you filling them.
Browse our map of sanctuary community policies and find out how you can get involved to help build communities where we all feel welcomed and safe.
Sign up to be notified of actions going on in your community surrounding the muslim ban, immigration raids or any event where we need people to stand up for vulnerable communities.
Sign up to call voters for Our Revolution endorsed candidates and ballot initiatives.


|
Support Class Library
A set of tools providing classes and utility
|
Creator for an iterator-based range. More...
#include <stl_iterators.h>
Public Types | |
| using | value_type = iterator_value_type< It > |
| using | iterator_type = scl::stream::details::iterator::BaseStreamIterator< value_type > |
| using | payload_type = typename iterator_type::payload_type |
| Public Types inherited from scl::stream::details::iterator::BaseStreamIterator< iterator_value_type< It > > | |
| using | iterator_type = StreamIterator< iterator_value_type< It > > |
| Type alias for the iterator type. | |
| Public Types inherited from scl::stream::details::iterator::StreamIterator< iterator_value_type< It > > | |
| using | payload_type = StreamIteratorPayload< iterator_value_type< It > > |
| Type alias for the payload used. | |
| using | value_type = typename payload_type::value_type |
| Type alias for the data type manipulated. | |
Public Member Functions | |
| FromStlIterator (It begin, It end) | |
| Construct the iterator from STL-like iterators. More... | |
| bool | hasNext () const override |
| Determines whether or not this iterator can produce another value payload. More... | |
| payload_type | next () override |
| Retrieve the next iterator payload. More... | |
| Public Member Functions inherited from scl::stream::details::iterator::StreamIterator< iterator_value_type< It > > | |
| virtual StlAdapter< iterator_value_type< It > > | begin () |
| Retrieve a stl-like iterator for this stream iterator. More... | |
| virtual StlAdapter< iterator_value_type< It > > | end () |
| Retrieve a stl-like iterator for the end of this stream iterator. More... | |
Protected Attributes | |
| It | begin |
| the iterator to the first element | |
| It | end |
| the iterator to the point after the last element | |
Creator for an iterator-based range.
| It | being the type of the iterators |
Definition at line 24 of file stl_iterators.h.
|
inline |
Construct the iterator from STL-like iterators.
| begin | being the beginning of the range |
| end | being the end of the range |
Definition at line 46 of file stl_iterators.h.
|
inlineoverridevirtual |
Determines whether or not this iterator can produce another value payload.
Implements scl::stream::details::iterator::StreamIterator< iterator_value_type< It > >.
Definition at line 49 of file stl_iterators.h.
|
inlineoverridevirtual |
Retrieve the next iterator payload.
Implements scl::stream::details::iterator::StreamIterator< iterator_value_type< It > >.
Definition at line 51 of file stl_iterators.h.


Selamat Datang Di Website Macam Macam Alat Musik
Display "Good day!" if the hour is less than 18:00:
Good Evening!


Framework needed! This library doesn't include any icons so you need to install Font Awesome 5, which is the icon framework we're using, separately. We're using the regular version (previously we use the light version), if you're on SEB:s network you can read more about our license here otherwise contact Robert Hjalmers for more info.
Using angular? Great! Then you should follow these instructions (if you're on SEB:s network) on how to use Font Awesome's Angular lib. If you don't have access to SEB:s network you can read more about how to get started with the Font Awesome framework for Angular here.
In order to try out Font Awesome 5 you need to install the icon framework. Once you've added the framework, you'll be able to use the icons with the following markup: <i class="far fa-print"></i> and change print to the name of the icon you'd like to use (see some of the available icons below).
Icons
{{icon}}
Sizing
Icons are available in 4 different sizes, add fa-xx(replace with one of the classes below) to adjust icon size. Even though bigger sizes are available we should avoid using them and consider using pictograms instead.
fa-xs (extra small, 12 px)
(normal, 16 px)
fa-lg (large, 24 px)
fa-2x (2x, 32 px)
Do's and don'ts
Use icons when they add value
Use Font Awesome 5 for generic system icons up to 32 px (fa-2x)
Use Font Awesome for larger icons (bigger than 32 px), use pictograms (coming soon!)
Stack icons on top of each other
Add colors to icons other than text-success, text-warning or text-danger when applicable


Arsenal sack manager Unai Emery
Arsenal have sacked boss Unai Emery following a run of seven games without a win.
The Gunners have confirmed Freddie Ljungberg will take charge on an interim basis and pointed to “results and performances not being at the level required” for the reason behind Emery’s exit.
The 48-year-old replaced Arsene Wenger in May 2018 but was unable to take the club back to the Champions League, finishing fifth last season and losing the Europa League final to Chelsea.
The start of this season has proved a challenge and a 2-1 defeat to Eintracht Frankfurt on Thursday night proved to be the last straw.
Speaking on behalf of the Arsenal board and the club’s owners Kroenke Sports & Entertainment, Josh Kroenke said: “Our most sincere thanks go to Unai and his colleagues who were unrelenting in their efforts to get the club back to competing at the level we all expect and demand. We wish Unai and his team nothing but future success.”
The club statement added: “The decision has been taken due to results and performances not being at the level required.
“We have asked Freddie Ljungberg to take responsibility for the first team as interim head coach. We have full confidence in Freddie to take us forward.
“The search for a new head coach is underway and we will make a further announcement when that process is complete.”
The likes of Wolves boss Nuno Espirito Santo and former Arsenal midfielder Mikel Arteta, currently a coach at Manchester City, have been linked with the full-time job.
But it remains to be seen how long Ljungberg, promoted from manager of Arsenal’s Under-23s to Emery’s assistant head coach during the summer, will remain in charge.
His first game at the helm will come away to Norwich on Sunday before a home game with Brighton and a London derby at West Ham.
Speculation had been rife over Emery’s future during a poor run of form which leaves Arsenal without a win since October 24.
He was publicly backed by head of football Raul Sanllehi and managing director Vinai Venkatesham during the international break but lasted only two more matches.
Alexandre Lacazette’s injury-time goal rescued a point at home to struggling Southampton on Saturday before the 2-1 defeat to Frankfurt, in front of a sparse Emirates Stadium crowd, ultimately saw Emery lose his job.
body check tags ::


{% extends "base.html" %} {% load static %} {% block content %}
| Equipment Serial Number | Equipment Type | Equipment Code | Equipment Model | Manufacturer Name | Owner |
|---|---|---|---|---|---|
| {{ equipment.equipmentserialnumber }} | {{ equipment.equipmenttypecv }} | {{ equipment.equipmentcode }} | {{ equipment.equipmentmodelid.modelname }} | {{ equipment.equipmentmodelid.modelmanufacturerid.organizationname }} | {{ equipment.equipmentownerid.personfirstname }} {{ equipment.equipmentownerid.personlastname|default:" -- " }} |


Collection
, Date
, Map
,
Calendar
, etc. field from a method parameter.
Since such types are mutable, this construct may
result in an object having its state modified unexpectedly from outside the owning class.
While occasionally useful for performance reasons, this construct is inherently bug prone. Quick-fix adds a call to the field's .clone()
method.
The inspection reports usage of following mutable types:
java.util.Date
java.util.Calendar
java.util.Collection
java.util.Map
com.google.common.collect.Multimap
com.google.common.collect.Table
Example:
class Log {
String[] messages;
...
String[] getMessages() {
return messages; // warning: Return of String[] field 'messages'
}
}
After the quick-fix is applied:
class Log {
String[] messages;
...
String[] getMessages() {
return messages.clone();
}
}
Use the checkbox below to ignore assignments and returns in private
methods.
New in 2017.3


MEMORY CODES REVEALED BY
RESPONSE LATENCIES
by
Lee Frederick DeCoster
A dissertation submitted in partial fulfillment of the requirements for the degree of Doctor of Philosophy (Psychology) in The University of Michigan 1971
Doctoral Committee:
Professor Irwin Pollack, Chairman
Professor Wilfred M. Kincaid
Professor Arthur W. Melton
Professor Daniel J. Weintraub
Dr. Sylvan Kornblum, Mental Health Research Institute
ay


-
SnappyTV is joining the flock | Twitter Blogs
blog.twitter.com
One of the best ways to follow events as they unfold is through real-time videos on Twitter. As we continue to invest in video, it’s important for us ...
-
Coming soon: a whole new you, in your Twitter profile | Twitter Blogs
blog.twitter.com
Your Twitter profile shows the world who you are. Starting today, as we roll out a new and improved profile, it will be even easier to express ...
-
Photos just got more social | Twitter Blogs
blog.twitter.com
Tag your friends in photos and add up to four pictures in a single Tweet.
-
TweetDeck: Pro tips to help you cover the #WorldCup
www.youtube.com
This video will help you make the most of TweetDeck's powerful features as you follow the #WorldCup.
-
What was your first Tweet?
discover.twitter.com
Everybody has to start somewhere. Find and share any #FirstTweet.
-
50 Years Later: Civil Rights - CBS News
www.cbsnews.com
CBS News looks back at the fight against segregation, and the continuing struggle for equal rights
-
Sky News sur Twitter : "Confused about who has gone where in the ...
twitter.com
Mot de passe oublié ? Vous utilisez déjà Twitter via SMS ?
-
WFMY and Twitter: Inside.
www.youtube.com
Follow @wfmy and look for #wfmystory to see the story inside the story everyday. Pull back the curtain and inside raw, uncut and real.
-
CBS This Morning sur Twitter : "What's Eat, Pray, Love author ...
twitter.com
Mot de passe oublié ? Vous utilisez déjà Twitter via SMS ?
-
GIF x News
twitter.com
Connectez-vous à vos amis — et d'autres personnes fascinantes. Recevez des mises à jour instantanées sur les choses qui vous intéressent. Et regardez ...
-
Twitter Support sur Twitter : "Starting today, you can share and view ...
twitter.com
Mot de passe oublié ? Vous utilisez déjà Twitter via SMS ?
-
Join #1Connection and Expand Your Network by One
mashable.com
On Social Media Day, follow one user who tweets the hashtag #1connection. Join us and expand your network by one to be part of a global movement.
-
Yahoo Sports sur Twitter : "Former #USMNT captain Carlos Bocanegra is ...
twitter.com
Mot de passe oublié ? Vous utilisez déjà Twitter via SMS ?
-
Convert your Twitter followers to email subscribers with a Twitter Lead ...
www.niemanlab.org
Few tweets we've sent out from @NiemanLab have gotten as much attention in the media world as this one: Want to understand the future of news? Sign ...
-
#BRAvsCRO: 7 #WorldCup @TwitterData points you need to know | Twitter Blogs
blog.twitter.com
Follow @TwitterData and @TwitterSports throughout the #WorldCup for key metrics and trends.
-
Dean Baquet sur Twitter : "How to write a funeral story. A great example ...
twitter.com
Mot de passe oublié ? Vous utilisez déjà Twitter via SMS ?
-
Welcome to #UkraineDesk | VICE News
news.vice.com
We're very excited to begin a new experiment with some of the web's leading media organizations.
-
CNN answers #370Qs questions on air | Twitter Blogs
blog.twitter.com
The network takes Twitter questions for coverage of the disappearance of Malaysia Airlines Flight 370.
-
BBC News US sur Twitter : "We made it to 100,000 followers! Thanks for ...
twitter.com
Mot de passe oublié ? Vous utilisez déjà Twitter via SMS ?
-
The Washington Post to feature Twitter Mirror at WHCD Pre-Party, announces ...
www.washingtonpost.com
Celebrities, newsmakers and others will be able to share selfies instantly on Twitter, thanks to the interactive mirror exclusively available onsite ...
-
April 15, 2013: How Twitter Informed Us - Boston.com
www.boston.com
In the early hours following the tragic events of April 15, Twitter was a powerful source of information.
-
Problems occurred when retrieving your information
app.tweet.twitter.com
The following content is no longer available through this link.
-
The TIME 100 2014 Reader Poll Nominees’ Year on Twitter
time.com
How much we did -- or didn't -- Tweet about the nominees.
-
NPR showcases Twitter chats for social storytelling | Twitter Blogs
blog.twitter.com
Month-long #NPRWIT series highlights women in tech.
-
Twitter for newsrooms and journalists
media.twitter.com
Turn Twitter into a virtual notebook, point readers to your work, share perspectives and more.


{% extends "email_alert_base.html" %}
{% block salutation %}Appeals Registry,{% endblock %}
{% block primary_text_1 %}
VIPS does not have three dates currently available to offer prohibition {{ prohibition_number }}
a review within 17 days of the date of service.
{% endblock %}
{% block primary_text_2 %}
We have not sent this email to the applicant.
{% endblock %}
{% block primary_text_3 %}{% endblock %}
{% block primary_text_4 %}{% endblock %}
{% block callout_block %}{% endblock %}
{% block timeline_image %}{% endblock %}
{% block sign_off %}{% endblock %}
{% block email_not_monitored %}{% endblock %}


5.3 Magnitude Earthquake Registered in Japan
An earthquake of magnitude 5.3 was recorded off the coast of Japan at 176 km. from Katsuura City, Tiba Prefecture, BGNES reported.
The quake struck at 05.51 Bulgarian time.
It was at a depth of 10 kilometers.
There is no information about victims, devastation, tsunami threat or injured people.