LOVE SERENADE A film review by James Berardinelli Copyright 1997 James Berardinelli
RATING (0 TO 10): 7.5 Alternative Scale: *** out of ****
Australia, 1996 U.S. Release Date: Spring 1997 Running Length: 1:41 MPAA Classification: R (Mature themes, profanity, sex, brief nudity) Theatrical Aspect Ratio: 2.35:1 Shown at the Philadelphia Festival of World Cinema, 5/7/97 & 5/10/97
Cast: Miranda Otto, Rebecca Firth, George Shetsov, John Alansu Director: Shirley Barrett Producer: Jan Chapman Screenplay: Shirley Barrett Cinematography: Mandy Walker Music: Various U.S. Distributor: Miramax Films
Winner of the Camera d'Or at the 1996 Cannes Film Festival, LOVE SERENADE, the feature debut of Australian director Shirley Barrett, has the kind of nasty, biting wit that juries at film festivals seem to appreciate. For the most part, movies tend to tell the stories of love affairs between the "right" people, with romance and fate being an integral part of the mix. LOVE SERENADE is a clear exception -- call it an anti-romantic comedy. And, unlike Ellen DeGeneres' failed MR. WRONG, with which it shares a few superficial characteristics, LOVE SERENADE is well-written and ably acted.
There aren't many characters in LOVE SERENADE, which takes place in an almost-deserted outback town called Sunray. We're introduced to a pair of sisters, Dimity (Miranda Otto) and Vicki-Ann (Rebecca Firth), who share a house. Dimity, the shy and insecure sibling, is a waitress at a local Chinese restaurant. Vicki-Ann, the brash one, is a hair stylist. Both are, in their own way, looking for love, although the prospects in Sunray seem bleak, at best. That is, until Ken Sherry (George Shetsov) moves into the house next door.
To Dimity and Vicki-Ann, Sherry is a star. A journeyman radio personality who was once on the air in Brisbane, Sherry has come to Sunray to take a deejay's job at the local FM station. The sisters, enthralled by his apparently urbane, cultured manner, fail to recognize what a slimy person he is. Sherry has the mannerisms and appetites of a snake. He is cold, calculating, and cruel. He engages in mechanical sex, not because he likes it, but because it's a means to give him power. His dead eyes reflect an equally lifeless soul. Actor George Shetsov does a marvelous job bringing this character to life in all of his sinister glory.
In their own way, the sisters are both innocents. Dimity, who is played with great appeal by Miranda Otto, falls for Sherry when he arrives at her restaurant for a meal. Her clumsy "seduction" of him leads to a brief tryst that doesn't sit well with Vicki-Ann, who has set her sights on the disc jockey as a potential husband. As the brazen sister, Rebecca Firth's performance is the most broadly comic in the film, and occasionally seems a little too over-the-top.
The first thirty minutes of LOVE SERENADE are nearly perfect. The script is clever, the acting is fresh, and the cinematography is interesting. Thereafter, however, things start to become repetitive, leading to several patches where the proceedings drag. Fortunately, the level of humor remains consistently high and the film never loses its edge, even when it's spinning its wheels. And the ending is definitely worth staying for.
As has become commonplace in Australian films, the soundtrack is bloated with '70s songs, many of which we haven't heard since they stopped playing on the radio two decades ago. In this film, there's a twist -- the lyrics of the songs are matched perfectly to the scenes they're used in. The movie's title comes from a Barry White hit that the writer/director calls the "creepiest seduction song" that she has ever heard.
LOVE SERENADE is a sly, quirky offering guaranteed to appeal to anyone who is sick of screen romances that always work out for the best. In fact, this is one film where we pray that the leads don't get together in the end. Shirley Barrett has done an effective job of combining acid humor and parody with a somewhat more serious subtext about unrealistic expectations. The resulting motion picture is considerably different from the usual multiplex fare, and all the more worthwhile because of it.
- James Berardinelli e-mail<EMAIL_ADDRESS>ReelViews web site: http://www.cybernex.net/~berardin
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Depth-first search
Motivation
Depth-first search, commonly abbreviated as DFS, is an algorithm that's used to search through a graph. If you're unfamiliar with a graph, it's a data structure that represents a network of nodes optionally connected by lines called edges. A practical application is a social network like that used on your favourite social media site. It probably uses graphs to internally represent people (the nodes) and their connections to other people (the edges).
Fun fact: if you're in the UK and you google "DFS", you probably won't find anything about this algorithm on the first page of search results, because the DFS furniture company's search engine optimisation is so good. However, for our purposes, "DFS" refers to the algorithm at hand.
DFS fairly systematically explores the nodes and edges in a graph data structure. On its own, it's not particularly useful. But when it's combined with other algorithmic steps it can be used to do some pretty powerful things quite elegantly - for example:
- Generating mazes.
- Finding paths through mazes.
- Finding the strongly connected components in a directed graph.
- Solving a variety of other graph-related problems.
The main idea
Given a starting node in the graph, DFS selects one of the unvisited neighbours of the node (a neighbour node is a node that the starting node is connected to by an edge) and then does the same thing for the neighbour and so on until it reaches a node which doesn't have any unvisited neighbours. Then it backtracks and visits all the other unvisited neighbours of the nodes that it's visited so far.
An example will help to illustrate the point.
Consider the undirected graph above. Let's run DFS from the node labelled 0.
- The algorithm selects the only unvisited neighbour of 0, which is 1.
- Node 1 has two unvisited neighbours, 2 and 3. Suppose the algorithm chooses to explore 3 first.
- Node 3 has a single unvisited neighbour, 7.
- When exploring 7, the algorithm realises that it has no unvisited neighbours and backtracks to the last node with unvisited neighbours, which is 1.
- Node 2 is the next unvisited neighbour of 1. It has two unvisited neighbours, 6 and 4. Suppose 4 is chosen next.
- Node 4 also has two unvisited neighbours, 5 and 8. Suppose 8 is chosen next.
- Node 8 has no unvisited neighbours, so the algorithm backtracks to 4.
- Node 5 is the next unvisited neighbour of 4. It has one unvisited neighbour, node 6.
- Node 6 has no unvisited neighbours, so the algorithm backtracks all the way to starting node 0 and finishes running.
The order in which the nodes were visited is: 0, 1, 3, 7, 2, 4, 8, 5, 6.
This suggests a recursive implementation, but the implementation below is actually an iterative one. Iterative solutions can sometimes be faster than recursive ones, even though they might be more complex to code. They also tend to use less program call stack space than recursive solutions. Also, don't you just get a good feeling when you implement a recursive algorithm iteratively?
DFS code
In our iterative implementation of DFS, we'll use a stack to track the unvisited neighbours of a node.
First we'll define a helper Edge
class which represents an edge
in the graph between two nodes.
One of the arguments to our DFS method is the graph, which we'll be representing as an
adjacency list. This is a list of lists.
The elements of the outer list represent nodes in the graph. Each element is itself a list of
Edge
s
which the corresponding node is a part of. Other graph representations we could use include an
adjacency matrix
and an edge list.
Next, we'll implement the actual DFS algorithm. As well as the graph, it takes in the start node.
Complexity analysis
What's the time complexity of DFS? Let's suppose that the lines before the
while
loop take constant time. Then the real work
happens in the while
loop. How many times will this loop
execute? Well, in the worst, case, each node in the graph is reachable by a path of edges
from the start node. And, since each reachable node is pushed onto the stack exactly once,
this while
loop will
execute times, where
is the number of nodes, or "vertices", in the graph.
If we look closely, we see that the body of the for
loop
will be executed exactly times, where
is the number of edges in the graph.
So we pop a node off the stack exactly times and we execute the
for
loop
body times. This gives us a running time of
.
How about space? Well, at most vertices can be on the stack at any given time. So the space complexity is .
Key takeaways
We've seen that DFS is a common graph-search algorithm that is used to traverse the nodes and edges in a graph. On its own, it's not the most useful algorithm, but it can be used in combination with other algorithms to solve a variety of problems. Its running time and space complexity when the graph is represented as an adjacency list are both .


Analytics
at the Edge
Andrew Bodine
Agenda
- What to expect?
- Edge Analytics: What and Why?
- Edge Analyitcs at IBM
- Demo: Hands-on with Patterns
- Helpful links + Next steps
What should you expect to learn from this workshop?
- Basic IoT and Analytics nomenclature
- What Edge Analytics means, and why it's worth your time.
- The general flow of implementing IoT Edge Analytics.
- Types of cloud offerings IBM has to plug into this model.
- Types of run-anywhere offerings IBM has to plug into this model.
- How to demo Edge Analytics in action.
- Where to go to learn more.
Introduction to IoT Edge Analytics
Analytics
The process of inferring qualitative information, from quantitative streams of data.
at the Edge
For each edge in an IoT network tree
Edge Analytics is composed of:
- Things (Devices at the Edge)
- Data (Temperature, Pressure, Location, etc)
- Controllers
- Thresholds (When temp is too high)
- Actions (When thresholds are crossed)
Data at the Edge
What is the general flow of IoT Edge Analytics?
Why are Edge Analytics important?
- Constraints on IoT devices and their environments.
- Saves you $
- Less traffic clutter.
- More devices using same bandwidth
Why are Edge Analytics overlooked?
- Lack of domain knowledge
- Focus of existing documentation and tutorials
- Slightly harder to implement
Offerings related to general Edge Analytics flow
- Local Analytics
- Messaging
Cloud: Messaging
Advanced Analytics flow with IBM Offerings
Where to go from here?
Now that we have covered the basics, you can follow the link below
to dig deeper into the solution and expand on the Cognitive components.
Dig Deeper
Links for continued learning
Thank You
Andrew Bodine
acbodine@us.ibm.com


Elci32.github.io
View and Download IDEAL SPLIT-JAW 61-096 instructions manual online. SMART-METER. SPLIT-JAW 61-096 Measuring Instruments pdf manual download. IDEAL SPLIT-JAW 61-096 INSTRUCTIONS MANUAL Pdf Download. IDEAL Split Jaw Automatic Smart Meter Multimeter, LIFETIME. 61-096 Split-Jaw™ Smart Meter manualzz.com. Search among more than 1.000.000 user manuals and view them online
Ideal Split-Jaw Smart Digital Meter-61-096 - The Home Depot. IDEAL Split Jaw Automatic Smart Meter Multimeter, LIFETIME WARRANTY 61-096 NEW Sign in to check out Check out as guest . Add to cart - Add to watch list Remove from watch list. 2-year protection plan from SquareTrade - $12.99 2-year protection plan from SquareTrade - $12.99 Opens a information Overlay.
IDEAL INDUSTRIES INC. TECHNICAL MANUAL MODEL 61-096 Split. Ideal Split-Jaw Smartmeter Bedienungsanleitung.
N o Dial! - Automatically senses and displays AC/DC Volts, AC Amps, resistance and continuity. Features: Measures 0.9 - 200.0 Amps AC - Jaw opening accepts up to 1/0 Cu cable (5/8 max diameter).
The Split-Jaw Multi-Tester is another innovation from Ideal designed around the needs of modern electricians. The open configuration of the jaw allows for quick current measurements, especially in hard-to-reach panels. IDEAL 61-096 TECHNICAL MANUAL Pdf Download. Form Number TM61096 Rev 2 Nov 2010 IDEAL INDUSTRIES INC. TECHNICAL MANUAL MODEL 61-096 Split Jaw Smart Meter The Service Information provides the following information. Ideal Split-Jaw Smart-Meter 61-096 - LicensedElectrician.com. Find great deals on eBay for split jaw meter. Shop with confidence. View and Download IDEAL 61-096 technical manual online. Split Jaw Smart. 61-096 Measuring Instruments pdf manual download.


 Please open the Application root and check which link brought you here.
If you think this is an application error, you should open a bug ticket, or check if a similar one already exists.


Movies
Choose a Movie
Star Wars
Lobster
Warcraft
Teenage Mutant Ninja Turtles: Out of the Shadows
Movies
Second Run
Frist Run
Movie Times
11am
noon
1pm
2pm
3pm
4pm
5pm
6pm
7pm
8pm
9pm
Choose your age
Youth: 12 and under
Adult
Senior 55+
Ticket price:
$


These Markdown examples are take from Github's Mastering Markdown Guide.
It's very easy to make some words bold and other words italic with Markdown. You can even link to Google!
Sometimes you want numbered lists:
Sometimes you want bullet points:
Alternatively,
If you want to embed images, this is how you do it:
Sometimes it's useful to have different levels of headings to structure your documents. Start lines with a #
to create headings. Multiple ##
in a row denote smaller heading sizes.
You can use one #
all the way up to ######
six for different heading sizes.
If you'd like to quote someone, use the > character before the line:
Coffee. The finest organic suspension ever devised... I beat the Borg with it. - Captain Janeway
Normal code snippet:
if (isAwesome){
return true
}
There are many different ways to style code with GitHub's markdown. If you have inline code blocks, wrap them in backticks: var example = true
. If you've got a longer block of code, you can indent with four spaces:
1 2 3 |
if (isAwesome){
return true
}
|
You can create tables by assembling a list of words and dividing them with hyphens -
(for the first row), and then separating each column with a pipe |
:
| First Header | Second Header |
|---|---|
| Content from cell 1 | Content from cell 2 |
| Content in the first column | Content in the second column |


This is a utility for displaying your Rutgers Newark schedule on a map.
Unfortunately, we do not support mobile. This is because the main flow requires copying from the Webreg website - a flow that is not very mobile friendly!
Learn more


Helping individuals to manage task and work records.
This software is developed and maintained by Laniak
Information :
- Version
- v 1.0
- Product Name
- Task Schedular
- UI Framework
- Metro UI 4
- Backend -Framework
- Electron
- Developer
- Shashank Kawle
- Designer
- Shashank Kawle


Curated Coffee Components
-
AeroPress Coffee Maker
$29.99
-
MSR Reactor 2.5L Stove System
$159.99
-
Bunum Wo AA, Papua New Guinea
$21.99
-
Chemex Classic 6-cup Coffee Maker
$39.99
Complete Brewing Kits
-
The Chemex Kit
$396.96
-
The Pour Over Kit
$171.96
-
The Camper’s Kit
$272.95
-
The French Press Kit
$219.94
-
The Cold Brew Kit
$133.96


Shop's name is required!
Shop address is required!
Shop's phone number is required!
Shop's email is required!


May 20 is World Metrology Day, commemorating the anniversary of the signing of the Metre Convention in 1875.
The theme for World Metrology Day 2023 is Measurements supporting the global food system. This theme was chosen because of the increasing challenges of climate change, and global distribution of food in a world whose population reached 8 billion at the end of 2022.
Happy Pi Day 2023!
Pi Day is celebrated on March 14th (3/14) around the world. Pi (Greek letter “π”) is the symbol used in mathematics to represent a constant — the ratio of the circumference of a circle to its diameter — which is approximately 3.14159. Pi Day is an annual opportunity for math enthusiasts to recite the infinite digits of Pi, talk to their friends about math, and eat pie.
The General Conference on Weights and Measures (CGPM), at its 27th meeting,
recalling that decisions were made at previous meetings when it was considered timely to extend the range of SI prefixes including Resolution 12 (paragraph 3) adopted by the CGPM at its 11th meeting (1960), Resolution 8 adopted by the CGPM at its 12th meeting (1964), Resolution 10 adopted by the CGPM at its 15th meeting (1975), and Resolution 4 adopted by the CGPM at its 19th meeting (1991), decided to add to the list of SI prefixes to be used for multiples and submultiples of units the following prefixes:
Happy Ada Lovelace Day 2022!
Ada Lovelace Day (ALD) is an international celebration of the achievements of women in science, technology, engineering and maths (STEM). It aims to increase the profile of women in STEM and, in doing so, create new role models who will encourage more girls into STEM careers and support women already working in STEM.
It took a while, maybe partly due to COVID19, including fewer meetings and activities, we also had to send the Spec Documents again with different dates, but thanks everyone for getting the last deliverables out there now.
May 20 is World Metrology Day, commemorating the anniversary of the signing of the Metre Convention in 1875.
The theme for World Metrology Day 2021 is Measurement for Health. For somewhat obvious reasons.
As a nice coincidence, Mannheim JUG held a Meetup (in German) javax.measure bringt verständliche Einheiten in die Software allowing me to share insight and experience with the audience especially during Q&A.
The presentation looked more at domain specific use cases for JSR 385 and how to integrate Units of Measurement support in your applications from the backend or middleware to the UI frontend using UI frameworks like React or Angular.
After visiting IoT Meetup Zurich several times in person, I was honored to virtually join it again and give a short version of the JSR 385 talk at IoT Day 2021 Virtual Meetup.
It was nice to see an old picture from the 2014 event:


Break Boundaries, Learn New Things
An educational game where you have to use your knowledge to break boundaries and beat your high score!
Are you ready to break boundaries?
Play NowAn educational game where you have to use your knowledge to break boundaries and beat your high score!
Are you ready to break boundaries?
Play Now


Hams TerConsultant, Analyst, Architect. Something about me: was born, had been studying, working at a job right now! |
| Date | Work |
|---|---|
| 2020 | Lead of the Juba Co |
| 2016-2019 | St Consultant |
| 2010-2019 | St Analyst |
| Analysis | ☀☀☀☀☀ |
| Time management | ☀☀☀ |
| Hard Skills | ☀☀☀☀ |
| Soft SKills | ☀☀☀☀ |


The Web Hypertext Application Technology Working Group recently created an open mailing list. And I think the WHAT-WG itself follows from the workshop which Ian Hickson has been writing about (4, 3, 2, 1) and the position paper that accompanied it.
I look forward to the output from this group -- hopefully it will produce technology and specifications that normal web developers can actually use.


Role Manage
| # | Name | Authority | Operation |
| {{$index}} | {{$item.Name}} | {{range $i, $e := $item.Authority}} | {{end}}Edit Delete |
Admin Manage
| # | Name | Role | Operation |
| {{$index}} | {{$item.Name}} | {{$item.Role.Name}} | Edit Delete |
Origin Manage
| # | Name | Operation |
| {{$index}} | {{$item.Name}} | Delete |
Account Manage
you can manage the accounts here, eg: alipay, email...


{% extends "admin/index.html" %} {% block extrastyle %} {{ block.super }} {% endblock %} {% block extrahead %} {% endblock %} {% block breadcrumbs %}
{% endblock %} {% block content %} {{ block.super }}The full documentation is at https://django-telegrambot.readthedocs.org.
Please remember to start polling mode with commands:
No bots are available. Please configure it in settings.py
{% endif %}


Level 100 character build that maximizes summoned creature potential. Race: Elf Levels: * Combat: 0 * Melee: 0 * Nature: 100 * 2 Aquatic Afinity * 20 Summon Fortitude * 20 Enveloping Embrace * 20 Summon Might * 20 Feral Wrath * 18 Summon Bond * Ranged: 0


flixel.tweens.FlxTween
- type
- class
- implements
- flixel.interfaces.IFlxDestroyable
- subclasses
- flixel.tweens.misc.AngleTween, flixel.tweens.misc.ColorTween, flixel.tweens.misc.MultiVarTween, flixel.tweens.misc.NumTween, flixel.tweens.misc.VarTween, flixel.tweens.motion.Motion, flixel.tweens.sound.Fader, flixel.tweens.sound.SfxFader
Static Methods
- parameters
Sprite
Optional Sprite whose angle should be tweened.
FromAngle
Start angle.
ToAngle
End angle.
Duration
Duration of the tween.
Options
An object containing key/value pairs of the following optional parameters: type Tween type. complete Optional completion callback function. ease Optional easer function. startDelay Seconds to wait until starting this tween, 0 by default. loopDelay Seconds to wait between loops of this tween, 0 by default.
- returns
- The added AngleTween object.
- parameters
Object
The object to move (FlxObject or FlxSpriteGroup)
CenterX
X position of the circle's center.
CenterY
Y position of the circle's center.
Radius
Radius of the circle.
Angle
Starting position on the circle.
Clockwise
If the motion is clockwise.
DurationOrSpeed
Duration of the movement in seconds.
UseDuration
Duration of the movement.
Eease
Optional easer function.
Options
An object containing key/value pairs of the following optional parameters: type Tween type. complete Optional completion callback function. ease Optional easer function. startDelay Seconds to wait until starting this tween, 0 by default. loopDelay Seconds to wait between loops of this tween, 0 by default.
- returns
- The CircularMotion object.
- parameters
Sprite
Optional Sprite whose color should be tweened.
Duration
Duration of the tween in seconds.
FromColor
Start color.
ToColor
End color.
FromAlpha
Start alpha.
ToAlpha
End alpha.
Options
An object containing key/value pairs of the following optional parameters: type Tween type. complete Optional completion callback function. ease Optional easer function. startDelay Seconds to wait until starting this tween, 0 by default. loopDelay Seconds to wait between loops of this tween, 0 by default.
- returns
- The added ColorTween object.
- parameters
Object
The object to move (FlxObject or FlxSpriteGroup)
FromX
X start.
FromY
Y start.
aX
First control x.
aY
First control y.
bX
Second control x.
bY
Second control y.
ToX
X finish.
ToY
Y finish.
Duration
Duration of the movement in seconds.
Options
An object containing key/value pairs of the following optional parameters: type Tween type. complete Optional completion callback function. ease Optional easer function. startDelay Seconds to wait until starting this tween, 0 by default. loopDelay Seconds to wait between loops of this tween, 0 by default.
- returns
- The CubicMotion object.
- parameters
Volume
The volume to fade to.
Duration
Duration of the fade in seconds.
Options
An object containing key/value pairs of the following optional parameters: type Tween type. complete Optional completion callback function. ease Optional easer function. startDelay Seconds to wait until starting this tween, 0 by default. loopDelay Seconds to wait between loops of this tween, 0 by default.
- returns
- The added Fader object.
- parameters
Object
The object to move (FlxObject or FlxSpriteGroup)
FromX
X start.
FromY
Y start.
ToX
X finish.
ToY
Y finish.
DurationOrSpeed
Duration (in seconds) or speed of the movement.
UseDuration
Whether to use the previous param as duration or speed.
Options
An object containing key/value pairs of the following optional parameters: type Tween type. complete Optional completion callback function. ease Optional easer function. startDelay Seconds to wait until starting this tween, 0 by default. loopDelay Seconds to wait between loops of this tween, 0 by default.
- returns
- The LinearMotion object.
- parameters
Object
The object to move (FlxObject or FlxSpriteGroup)
Points
An array of at least 2 FlxPoints defining the path
DurationOrSpeed
Duration (in seconds) or speed of the movement.
UseDuration
Whether to use the previous param as duration or speed.
Options
An object containing key/value pairs of the following optional parameters: type Tween type. complete Optional completion callback function. ease Optional easer function. startDelay Seconds to wait until starting this tween, 0 by default. loopDelay Seconds to wait between loops of this tween, 0 by default.
- returns
- The LinearPath object.
- parameters
Object
The object containing the properties to tween.
Values
An object containing key/value pairs of properties and target values.
Duration
Duration of the tween in seconds.
Options
An object containing key/value pairs of the following optional parameters: type Tween type. complete Optional completion callback function. ease Optional easer function. startDelay Seconds to wait until starting this tween, 0 by default. loopDelay Seconds to wait between loops of this tween, 0 by default.
- returns
- The added MultiVarTween object.
- parameters
FromValue
Start value.
ToValue
End value.
Duration
Duration of the tween.
Options
An object containing key/value pairs of the following optional parameters: type Tween type. complete Optional completion callback function. ease Optional easer function. startDelay Seconds to wait until starting this tween, 0 by default. loopDelay Seconds to wait between loops of this tween, 0 by default.
- returns
- The added NumTween object.
- parameters
Object
The object to move (FlxObject or FlxSpriteGroup)
FromX
X start.
FromY
Y start.
ControlX
X control, used to determine the curve.
ControlY
Y control, used to determine the curve.
ToX
X finish.
ToY
Y finish.
DurationOrSpeed
Duration (in seconds) or speed of the movement.
UseDuration
Whether to use the previous param as duration or speed.
Options
An object containing key/value pairs of the following optional parameters: type Tween type. complete Optional completion callback function. ease Optional easer function. startDelay Seconds to wait until starting this tween, 0 by default. loopDelay Seconds to wait between loops of this tween, 0 by default.
- returns
- The QuadMotion object.
- parameters
Object
The object to move (FlxObject or FlxSpriteGroup)
Points
An array of at least 3 FlxPoints defining the path
DurationOrSpeed
Duration (in seconds) or speed of the movement.
UseDuration
Whether to use the previous param as duration or speed.
Options
An object containing key/value pairs of the following optional parameters: type Tween type. complete Optional completion callback function. ease Optional easer function. startDelay Seconds to wait until starting this tween, 0 by default. loopDelay Seconds to wait between loops of this tween, 0 by default.
- returns
- The QuadPath object.
- parameters
Object
The object containing the properties to tween.
Property
The name of the property (eg. "x").
To
Value to tween to.
Duration
Duration of the tween in seconds.
Options
An object containing key/value pairs of the following optional parameters: type Tween type. complete Optional completion callback function. ease Optional easer function. startDelay Seconds to wait until starting this tween, 0 by default. loopDelay Seconds to wait between loops of this tween, 0 by default.
- returns
- The added MultiVarTween object.
- parameters
Object
The object containing the properties to tween.
Values
The object containing values to tween (eg. { x: 500 } for singleVar, or { x: 500, y: 350 } for multiVar).
Duration
Duration of the tween in seconds.
Options
An object containing key/value pairs of the following optional parameters: type Tween type. complete Optional completion callback function. ease Optional easer function. startDelay Seconds to wait until starting this tween, 0 by default. loopDelay Seconds to wait between loops of this tween, 0 by default.
- returns
- FlxTween that was added to TweenManager plugin.
Constructor
- parameters
duration
Duration of the tween (in seconds or frames).
type
Tween type, one of Tween.PERSIST (default), Tween.LOOPING, or Tween.ONESHOT.
complete
Optional callback for when the Tween completes.
ease
Optional easer function to apply to the Tweened value.
Instance Methods
- parameters
startDelay
Seconds to wait until starting this tween, 0 by default.
loopDelay
Seconds to wait between loops of this tween, 0 by default.


DIFFERENT SHAPES OF BORDERS
NORMAL BORDER
BORDER OF RADIUS 5px
BORDER OF RADIUS 10px
BORDER OF RADIUS 15px


Welcome to 9 Lives
Can you help Smoosh find their way home? Smoosh just moved to a new city and has gone exploring. Now they can't remember the way home. Smoosh remembers that there was a word written on the building they live in. Can you help Smoosh remember the word? If you guess wrong too many times Smoosh will get too far from home and will never make it back.


Simple Page
This is a
simple page
. It contains a link, a list and a table.
Item 1
Item 2
Cell 1.1
Cell 1.2
Cell 2.1
Cell 2.2
CYA!


Using elements
Table of contents
Introduction
Polymer provides a large collection of elements for you to pick from. Of course, these elements have all of the features described in Custom Elements 101. Using them is straightforward:
- You don’t have to care how they work. Their internals are safely encapsulated. You interact with them using a well-defined API of attributes, events, properties, methods, and how they handle child nodes. They could use some kind of space-age magic inside, but from the outside you don’t know or care.
- They’re easy to add to your project. Elements, no matter which framework they’re from, should define their dependencies using Bower. That means that setting up an element for use in your project–no matter how complex its dependencies, or which frameworks it depends on–is just a matter of running
bower install the-element
, importing the element to your page, and using it.
Polymer’s set of elements includes the usual suspects like buttons and other UI components, but also includes non-UI elements like <polymer-ajax>
. It may sound surprising, but when you embrace the world-view that “everything is an element” you’ll find yourself reaching for pre-built elements more often than script to accomplish common tasks. Polymer’s collection of elements is already robust, and continues to grow.
Installing elements
The first step in using an element (or a set of elements) is to install it locally into your app using Bower. If you haven’t already done so, check out Getting the Code to learn more about using Bower.
Installing a single element
Elements can be installed individually as needed. For example, to download <polymer-ajax>
and install it in your current project, run:
bower install --save Polymer/polymer-ajax
Note: Polymer/polymer-ajax
is shorthand for the element’s github repo, https://github.com/Polymer/polymer-ajax. You can install other elements the same way.
Running this command adds a bower_components/
folder and fills it with <polymer-ajax>
:
yourapp/
bower_components/
platform/
polymer/
polymer-ajax/
Using the --save
flag adds the element to your app’s bower.json
file:
{
"name": "your-app",
"version": "0.0.0",
"dependencies": {
"polymer-ajax": "Polymer/polymer-ajax#~0.1.4"
}
}
Note If your project does not yet have a bower.json
file, create one by running bower init
.
Don’t worry about the other dependencies that were added. Bower installs them automatically, and HTML Imports will do the heavy lifting and load them at runtime.
Installing an element set
Although you can grab elements independently, sometimes you want to grab a whole collection. Polymer contains a set of UI elements and a set of non-UI elements:
- Polymer elements. Non-UI utility elements that perform common tasks like layout, AJAX, signaling, and storage, but don’t render anything in the browser.
- Polymer UI elements. UI elements that render in the browser.
Each set can be downloaded separately using Bower:
bower install --save polymer-elements
bower install --save polymer-ui-elements
Using elements
To use elements, first load platform.js
. Many browsers have yet to implement the various web components APIs. Until they do, platform.js
provides polyfill support. Be sure to include this file before any code that touches the DOM.
Once you have some elements installed and you’ve loaded platform.js
, using an element is simply a matter of loading the element file using an HTML Import.
An example index.html
file:
<!DOCTYPE html>
<html>
<head>
<!-- 1. Load platform.js for polyfill support. -->
<script src="bower_components/platform/platform.js"></script>
<!-- 2. Use an HTML Import to bring in the element. -->
<link rel="import"
href="bower_components/polymer-ajax/polymer-ajax.html">
</head>
<body>
<!-- 3. Declare the element. Configure using its attributes. -->
<polymer-ajax url="http://example.com/json"
handleAs="json"></polymer-ajax>
<script>
// Wait for 'polymer-ready'. Insures the element is upgraded.
window.addEventListener('polymer-ready', function(e) {
var ajax = document.querySelector('#ajax');
// Respond to events it fires.
ajax.addEventListener('polymer-response', function(e) {
console.log(this.response);
});
ajax.go(); // Call it's API methods.
});
</script>
</body>
</html>
Note: You must run your app from a web server for the HTML Imports polyfill to work properly. This requirement goes away when the API is available natively.
Passing object and array values in attributes
HTML attributes are string values, but sometimes you need to pass more complicated values into a custom element, such as objects or arrays. Ultimately, it’s up to the element author to decide how to decode values passed in as attributes, but many Polymer elements understand attribute values that are a JSON-serialized object or array. For example:
<roster-list persons="[{'name': 'John'}, {'name': 'Bob'}]"></roster-list>
For Polymer elements, you can find the expected type for each attribute listed in the Elements reference . If you pass the wrong type, it may be decoded incorrectly.
When creating your own Polymer elements, you can choose to expose properties as attributes, as described in Published properties.
Next steps
Now that you’ve got the basic idea of using and installing elements, it’s time to start
building something! In the next section we’ll cover the features of Polymer and how to create new <polymer-element>
s. Continue on to:
If you’d rather browse the existing elements, check out the Polymer elements and Polymer UI elements catalogs.


Provides functions for robust PCA by projection pursuit. The methods are described in Croux et al. (2006) <doi:10.2139/ssrn.968376>, Croux et al. (2013) <doi:10.1080/00401706.2012.727746>, Todorov and Filzmoser (2013) <doi:10.1007/978-3-642-33042-1_31>.
| Version: | 1.9-73 |
| Imports: | mvtnorm |
| Published: | 2018-01-14 |
| Author: | Peter Filzmoser, Heinrich Fritz, Klaudius Kalcher |
| Maintainer: | Valentin Todorov <valentin.todorov at chello.at> |
| License: | GPL (≥ 3) |
| NeedsCompilation: | yes |
| Materials: | ChangeLog |
| In views: | ChemPhys, Multivariate, Psychometrics, Robust |
| CRAN checks: | pcaPP results |
| Reference manual: | pcaPP.pdf |
| Vignettes: |
Compiling pcaPP for Matlab |
| Package source: | pcaPP_1.9-73.tar.gz |
| Windows binaries: | r-devel: pcaPP_1.9-73.zip, r-release: pcaPP_1.9-73.zip, r-oldrel: pcaPP_1.9-73.zip |
| OS X binaries: | r-release: pcaPP_1.9-73.tgz, r-oldrel: pcaPP_1.9-73.tgz |
| Old sources: | pcaPP archive |
| Reverse depends: | ccaPP, DetMCD, diffee, jeek, muma, rainbow, rrlda, simule, sscor |
| Reverse imports: | chemometrics, copula, DetR, ftsa, lcopula, MAINT.Data, OutlierDM, rmgarch, rospca, rrcov, rrcovHD, smart, specmine, sprm |
| Reverse suggests: | ChemoSpec, cord, dimRed, fractaldim, MetaPCA, ProjectionBasedClustering, zenplots |
Please use the canonical form https://CRAN.R-project.org/package=pcaPP to link to this page.


Our customer's are going to want to see their current balance.
The system should therefore be able to respond with a customer's current balance at the point in time they request it.
Dale has an account with a balance of 1045
.
Dale checks his balance at 2019-02-03T10:15:30.00Z
.
The system correctly reports the balance (along with the current date and time).


Service Metadata
Auto-collect metadata on page load.
Feature Counts
Auto-collect feature counts on page load.
Warning:
Requires "Auto-collect metadata on page load" to be checked
Auto-collect field value counts on page load.
Auto-collect domain counts on page load.
Print Task
Default Print Task WebMapAsJSON
Query Helper
Default where clause in query statements if space is blank
On clicking
Select All
or
Select all but Geometry
...
Query (GET)
Query (POST)
Do Nothing
Map Images
Show Map Images when hovering over links
Minimum Map Image Width
Minimum Map Image Height
Save


1-1 Online Training
It doesn’t matter where in the world you are, the online training program ensures that you achieve your goals through individual coaching and guidance, keeping you up to date with the best programs to suit you. After an online consultation, establishing your diet, lifestyle and goals, we then put together a personalised, bespoke program specifically for you. This service offers ongoing contact and support, working closely and adjusting your set training and nutrition goals each month and guiding you through your fitness program.
Let’s train together!
The price for one-to-one online 60 min session is now only 99 DKK
6 sessions: 550 DKK
12 sessions: 1100 DKK
The package includes:
- Initial fitness assessment and lifestyle analysis
- Tailored training program
- Strategy for establishing positive lifestyle habits
TRAINING
Working closely with clients programs are tailored to the individual.
NUTRITION
After the comprehensive questionnaire we will work together to help you create a diet that fits your lifestyle and goals.
EDUCATION
Providing resources on request to help you further educate yourself on what works best for you and your goals.


Apple's Phil Schiller claims kids who use Chromebooks 'won't succeed'
But quickly backtracks on sharp-tongued remarks
by Carly PageAPPLE'S HEAD OF MARKETING WAFFLE Phil Schiller has trash-talked Chromebooks and brazenly claimed the kids that use them are "not going to succeed".
In an interview with CNET following the launch of the 16in MacBook Pro, Schiller was quizzed about the growing popularity of Chromebooks for education. This line of questioning didn't go down well - likely because Apple has long been losing ground to Chrome OS machines - and Schiller slammed the low-cost machines as "cheap testing tools" in a sharp-tongued response.
"Kids who are really into learning and want to learn will have better success," Schiller said. "It's not hard to understand why kids aren't engaged in a classroom without applying technology in a way that inspires them. You need to have these cutting-edge learning tools to help kids really achieve their best results."
"Yet Chromebooks don't do that. Chromebooks have gotten to the classroom because, frankly, they're cheap testing tools for required testing. If all you want to do is test kids, well, maybe a cheap notebook will do that. But they're not going to succeed."
So there you have it. If you want your child to succeed in school, you'll instead need to cough up hundreds of pounds for a keyboard-less iPad, which Schiller has brandished as the "ultimate tool for a child to learn on".
Perhaps unsurprisingly, it didn't take long for Schiller to attempt to backtrack on his spicy remarks. He tweeted that "every child has the ability to succeed" and that Apple was also providing children with "content, curriculum and tools."
Apple has been trying to push its devices into education for the past few years, but expensive price-tags have long held many schools back and seen them opt for cheap-and-cheerful Chromebooks instead. µ
Further reading
Google and Dell team up to tackle Microsoft with first Chromebook Enterprise laptops
- 27 Aug 2019
Google quietly cans plans to bring Windows dual-booting to Chromebooks
- 16 May 2019
Microsoft is working on 'Windows Lite' for dual-screen and Chromebook-a-like devices
- 04 Mar 2019
Microsoft's latest low-cost lappys look to oust Chromebooks in edu sector
- 23 Jan 2019


Successfully registered !!
"You have successfully been registered for Vaccine availability notifier !"
Click here to star us on github


{% extends "home.html" %} {% block title %}Missing Student Profile — Carthage College{% endblock %} {% block content %}
Please contact the Dean of Students Office for questions about your on-campus housing status or the Registrar's Office for registration questions.
{% endblock %}


High performance
Ruby
TCP services
$ whoami --code
Maciej Mensfeld
-
Software Engineer / Architect
-
Karafka framework creator
-
OSS contributor (~12 years with Ruby)
$ whoami --work
Castle detects and mitigates account takeovers in web and mobile apps
$ whoami --moscow
- 1st time in Russia
- Moscow is awesome!
M: Solnic, is it a dating scam?
S: Go!
Kraków Ruby Users Group organizer
- One of the biggest Ruby communities in Europe
- Over 1200 members
- 60-150 attendees per event
- One meeting per month with 2-3 tech talks
- 21 sponsors
github.com/karafka/karafka
Workshops tomorrow
Talk to me about:
Karafka, Kafka, Ruby, System Architecture, High throughput data processing,
dry-rb, Trailblazer, TCP, Ruby on Rails or anything else TBH :)
Please notify me if...
-
I speak 2 fast
-
I should repeat anything
-
I should explain something better
-
You have any questions
What do I hope to leave you with?
Non-standard solutions can be good! Ruby has a lot more to offer than just the "Rails ecosystem".
HTTP is a great protocol. It's well designed, well known, extremely popular and supported by multiple libraries.
But it's not the end of the world.
This session should help you understand that and should provide a gentle intro to TCP itself and how it can be used in Ruby based applications to obtain sub-milisecond performance.
Agenda
- Problem characteristics
- Internal SLAs
- dRuby?
- Sync services
- Async services
Warning!
Simplifications ahead
It's a huge topic, so I made some simplifications down the road.
Castle detects and mitigates account takeovers in web and mobile apps
Password hacking is easy in 2018
- sentry-mba.com, 2captcha.com, pastebin.com, ...
- 73% passwords are used on multiple sites
- 3.1B credentials leaked only in 2016
- More than 100 mln events per day
- Over 21 mln active daily users
- Over 50 mlnactive user overall
- Over 2.5 mln failed logins daily
And everything would we awesome, if all of it could be asynchronous.
(and it can, but let's assume it's a no-no)
More about that in Antons talk
There are always some customer facing endpoints,
that must remain synchronous.
Sometimes even internal services need to remain synchronous due to the processing flow.
(do they?)
This is exactly the case we will tackle today.
Castle Leaked Credentials
- Over 2 billion of records that need to be accessible in a synchronous mode
- It's a crutial but not mission critical component, so if it fails, it should not impact the rest of the system
- It should be efficient enough to handle a lot of traffic cheaply
- The less infrastructure it requires the better
- Should allow to set internal SLA policies depending on the usecase and the client
How much is 100 mln requests a day?
- ~ 4,2 mln rq per hour
- ~ 70 k rq per miIdenute
- ~ 1200 rq per second
So, what do we actually need?
A service, that will:
- Receive an email and return statistics on it's presence in e-mail leaks
- Always respond within a certain timeframe
- Ideally handle all the traffic using a single process + some backup
- Will provide the versioning information
HTTP
GET /version
GET /leaks/:email
Why not HTTP?
- Because it creates a new connection per each request
- Because it has a certain overhead in it due to it's specification
- Because this is meant to be a micro-service with a single endpoint (plus versioning) with small pieces of data being transfered
SLA management
SLAs are used as a method of measuring and potentially penalizing performance according to predetermined, mutually agreed upon standards
SLA management
- They work great also for internal services
- "SLAized" approach requires team that understands timeouts, monitoring and infrastructure details
- It needs to be supported and handled by both client and server side
- Requires awareness of the importance of particular system components
dRuby is a distributed object system for Ruby. It is written in pure Ruby and uses its own protocol. No add-in services are needed beyond those provided by the Ruby runtime, such as TCP sockets.
Quote source: DRb
dRuby
dRuby
- Methods called upon this DRbObject instance are forwarded to its remote object.
- Any object can receive calls over dRuby
- Method calls made over dRuby behave largely the same as normal Ruby method calls made within a process
- A dRuby reference to an object is not sufficient to prevent it being garbage collected!
dRuby
- Works remotely
- Allows distribution
- Provides failover support (connection errors detection)
- Pure Ruby, Ruby only
dRuby server
require 'drb/drb'
URI="druby://localhost:8787"
class TimeServer
def current_time
Time.now
end
end
FRONT_OBJECT=TimeServer.new
DRb.start_service(URI, FRONT_OBJECT)
DRb.thread.join
dRuby client
require 'drb/drb'
SERVER_URI="druby://localhost:8787"
DRb.start_service
timeserver = DRbObject.new_with_uri(SERVER_URI)
puts timeserver.current_time
dRuby
- It's synchronous
- Works
- It's super simple even for more complex cases
- Rapid development process
dRuby
- Almost unknown outside of Japan
- Brings a lot of uncertainties
- It's not explicit
- Lacks in the documentation
- Lacks in any docs on the scalability and load balancing
- Due to the marshalling process, it's a bit slow (> 10ms)
- No timeout support, no control over the socket
dRuby
dRuby
Sync services
So, if it's going to be a sync service, why not to put it into the codebase?
Sync services
- Isolation (easier deployment, management, replacement, scaling)
- Extraction of concerns (context separation)
- Memory usage efficiency
- Possibility to reuse across the whole eco-system
- Cross-app dependencies reduced only to the interface / API of the service
Sync services
Challenges
Despite of it's nature (sync/async) be aware, that you will have to deal with following things:
- Server timeouts
- Clients timeouts
- Partial data in the socket
- Linux specific things like priorities, schedulers, etc
- Handling new connections / disconnections
Sync services
Challenges
- Low level frameworking (signals, hangs, exceptions)
- Heavy instrumentation
- Managing server limits and rejection support
- Keep alive for LB (NLB in particular)
- Poor Ruby docs on the particular TCP options
Sync services
Challenges
- Network / recovery issues
- Poor Ruby socket operations timeouts support
- Protocol format
- Ruby bugs (#14997)
Sync services
require 'socket'
server = TCPServer.new 2000
loop do
Thread.start(server.accept) do |client|
while ping = client.gets
client.puts ping
end
end
end
Sync services
require 'socket'
server = TCPServer.new 2000
loop do
Thread.start(server.accept) do |client|
while ping = client.gets
client.puts ping
end
end
end
Design
Applications are meant to
live
within the VM.
They should be started, stopped, restarted and killed without interrupting the VM.
This means, that ideally it would be great to just provide a TCP "frame" to which you can bind any apps you want in any way.
Sync services
Sync services
- Great when less than 100 concurrent connections
- Everything under your control (not only the client)
- A lot of work to get things done in a stable way
- Can easily incorporate any custom instrumentation / logging that you might need
- Highly memory efficient
- Most of the time not worth the effort
Sync services
EventMachine
You don't have to do things manually
EventMachine
EventMachine is an event-driven I/O and lightweight concurrency library for Ruby. It provides event-driven I/O using the Reactor pattern, much like JBoss Netty, Apache MINA, Python's Twisted, Node.js, libevent and libev.
EventMachine
- Battle tested for years
- Suited for systems with thousands of connections
- Includes support for both sync and async business logic execution
- Easy sockets state management
EventMachine
module EchoServer
def post_init
puts "-- someone connected to the echo server!"
end
def receive_data(data)
send_data data
end
end
EventMachine.run do
EventMachine.start_server "<IP_ADDRESS>", 8081, EchoServer
end
Client
You will have to wrap the socket by yourself with a lot of magic for timeouts and settings:
setsockopt(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1)
setsockopt(Socket::SOL_SOCKET, Socket::SO_KEEPALIVE, val)
setsockopt(Socket::SOL_TCP, Socket::TCP_KEEPIDLE, value)
setsockopt(Socket::SOL_TCP, Socket::TCP_KEEPINTVL, value)
setsockopt(Socket::SOL_TCP, Socket::TCP_KEEPCNT, value)
Client
You will have to wrap the socket by yourself with a lot of magic for timeouts and settings:
unless IO.select([socket], nil, nil, config.wait_timeout)
raise(
Errors::TimeoutError,
config.wait_timeout
)
end
Nagle's algorithm - your worse nightmare
Nagle's algorithm is a means of improving the efficiency of TCP/IP networks by reducing the number of packets that need to be sent over the network.
Nagle's algorithm - your worse nightmare
setsockopt(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1)
Performance
Performance
Problems you won't bypass
- DNS resolving performance
- Network overhead
- Random CPU spikes
- Linux kernel schedulers
- Processes priorities
- Randomness
Hitting the production
So, you've built yourself a nice server and a client
- Works locally
- Works for staging
- Timeouts and recovery works like a charm
- Obeys all the performance limits
you deploy it and...
Hitting the production
Everything works until a certain Saturday...
Unexpected Ruby behaviours
This problem actually affects
any
TCP based Ruby code.
That means, that it will apply to your HTTP applications as well
Ruby is not the best with networking
If you set a timeout to 50ms,
you would expect it to stop after 50ms, right?
Well...
It doesn't
Unexpected Ruby behaviours
Let's do Ruby!
Addrinfo.foreach(host, port, nil, :STREAM) {|ai|
# Not important stuff here...
begin
sock = local_addr ?
ai.connect_from(local_addr, timeout: connect_timeout) :
ai.connect(timeout: connect_timeout)
rescue SystemCallError
last_error = $!
next
end
ret = sock
break
}
Unexpected Ruby behaviours
If you combine it with a LB that during server downtime holds the connection
half-open, you end up with a timeout multiplication
when everything behind is down.
In our case, that meant slowing system down 5 times causing serious problems.
Unexpected Ruby behaviours
Can it be fixed?
Yes, but...
It's been 2 months since I've reported that issue and no one is willing
to even tell me, whether my fix is valid in the way it works.
The issue remained unreplied...
Unexpected Ruby behaviours
Until now!
Making things even better
Making things even better
Asynchronous is back!
- You can achieve multi-process parallel execution that way
- IO operations aren't GILed
- You can embrace SLAs and minimize the risk of extreme slowness of the whole system
- < 5ms performance is achievable because it's not needed
How?
EventMachine
+ asynchronous libraries almost the same way as the sync once
Things you will have to deal with
- All the sync problems
- Plus partial data in the sockets (both ways)
Isolate
Play
Experiment
Monitor


I’m a Data Analyst based in Sydney, Australia, but my work takes me to many places so make sure to check my current location below. I specialise in startups and agile environments.
I love building dashboards and creating reports. If you need to know how to utilise your data more efficiently, get insights into your customer base or merely know what information you should be collecting, please get in touch below. I'm currently available for hire.


| 004:055 Khan | : |
Of them were (some) who believed in him (Muhammad SAW), and of them were (some) who averted their faces from him (Muhammad SAW); and enough is Hell for burning (them). |
| 004:055 Maulana | : |
So of them is he who believes in him, and of them is he who turns away from him. And Hell is sufficient to burn. |
| 004:055 Pickthal | : |
And of them were (some) who believed therein and of them were (some) who turned away from it. Hell is sufficient for (their) burning. |
| 004:055 Rashad | : |
Some of them believed therein, and some of them repelled therefrom; Hell is the only just retribution for these. |
| 004:055 Sarwar | : |
Some have believed, others have disbelieved and tried to prevent people from believing.  And sufficient for them as punishment is the blazing fire of Hell. |
| 004:055 Yusufali | : |
Some of them believed, and some of them averted their faces from him: And enough is Hell for a burning fire. |
Concepts/Themes Covered: الإيمان > الغيب > النار > أسماء النار > السعير Faith> The Unseen World> Hell-Fire>Hell Names> The Blaze الإيمان > الغيب > النار > أصحاب النار Faith> The Unseen World> Hell-Fire>Hell Fellows
This tool uses eight English parallel translations for the Holy Quran imported from Mr. Clay Smith. You can also visit Qurany Concepts for browsing the Quran themes or topics. If you want to search the Holy Quran for keywords, please visit Qurany Keywords.


Either "spanning" or "split", to specify how this extension will behave if allowed to run in incognito mode.
The default for extensions is "spanning", which means that the extension will run in a single shared process. Any events or messages from an incognito tab will be sent to the shared process, with an incognito flag indicating where it came from. Because incognito tabs cannot use this shared process, an extension using the "spanning" incognito mode will not be able to load pages from its extension package into the main frame of an incognito tab.
The default for installable web apps is "split", which means that all app pages in an incognito window will run in their own incognito process. If the app or extension contains a background page, that will also run in the incognito process. This incognito process runs along side the regular process, but has a separate memory-only cookie store. Each process sees events and messages only from its own context (for example, the incognito process will see only incognito tab updates). The processes are unable to communicate with each other.
As a rule of thumb, if your extension or app needs to load a tab in an incognito browser, use split incognito behavior. If your extension or app needs to be logged into a remote server or persist settings locally, use spanning incognito behavior.


4 Poems
Little ghost
grief can be milk
or it can be two boys standing at a window
looking out at baby clothes
left hanging on the washing line for weeks
can be a kind of fraying in the breeze
can be little blankets
muslin sheets and little boots
hanging in the air
like little ghosts
At the truck-stop on the edge of town
we pull in with the gauge a line above empty
out of fuel and out of money
but Hercules gets out and fills the tank anyway.
The pump churns like a bad heart,
pulling blood from somewhere underneath our feet
and through the screen I watch
a thousand moths all hurl themselves
against the god-lights, fall away in rapture
then hurl themselves again.
Inside, a TV plays a rerun of The Green Berets.
Old John Wayne appears on screen, rifle in hand,
as Herc walks in like an empire of blood,
nods to the counter man,
counter-man nods back, Herc goes outside and sits and waits
for someone. And so we wait, long enough for old John Wayne
to press his mouth against a landscape,
to resurrect a myth then watch it burn again.
to become a gun, then a father,
then a mean drunk, then a gun again.
Long enough for old John Wayne
to swallow it and call it history,
to bleed a nation white,
Outside, a trucker pulls in and eyeballs Herc
who looks clean through the world
and sees a howling dark beneath it.
Or perhaps he sees himself.
Either way he nods to the trucker
and they disappear around the corner.

The boy always calls for someone, finds no one calling back.
Old John Wayne always follows, takes the hand of the boy
says "you're what this is all about."
Herc comes back then, fist full of bills and hard blank.
He doesn’t look at me, doesn’t look at anything,
just unfolds a bill and slides it to the counter-man.
His whole body says it’s time for us to go
as the air swells up like blood.
Outside the morning breaks like a bad heart
bleeding red across the sky
while old John Wayne and the boy -
they walk into horizon.
John Wayne and the boy -
they are walking into nothing.
At the coast, Hercules, least mortal of us all, tells the sea what it means to die.
Do you know the problem
with all language?
How to speak of the dead.
“And so he died,
went down into the ground
or up into the air etc.”
But dying’s not a disappearing trick.
There’s no trapdoor out the body.
Death is the world under erasure.
Proof that there was never anyone inside.
You want a metaphor for dying?
Take everything you ever wrote
and burn it.
Then gather up and burn the ash.
Then burn the space that’s left behind.
Interlude (2) / notes from an incomplete drama / 3rd person omniscient
ACT 1
Iphicles and the boy called C are imagined here as field and presence which is to say they are two shapes unfolding from a single plane which is to say something like the ‘immanence of one within its other’ which is to say that C already holds the whole of Iphicles inside his mouth. In any case, the scene is ext and the sky is blue, blue, blue.
C: What’s it like living with all those bones?
Iphicles: (question mark)
C: Over the fence I mean. In the cemetery.
 I think they probably look like roots. Or water.
Iphicles: (smaller sound)
C: I wonder sometimes what my daddy would look like in the ground. Or maybe just his hands.
Iphicles: (the colour red) (a kind of static)
ACT 2
SCENE 1
In the afternoon, C shows Iphicles a trick at the river. C lays belly down on the jetty, holds his hands beneath the water and starts to sing a gentle silverness. Within a minute a catfish has risen up and set its belly in his hands. C looks up. Smiles like a waking sky. Like an answer to the one big question. Iphicles thinks this is the most amazing thing he’s ever seen.

SCENE 3
When C is gone from sight, the world comes back into a heaviness. Iphicles feels night falling over everything. He turns and climbs the stairs. In his room, he falls face down on his bed. Hugs nothing. The red noise in him swells. The house braces.
ACT 3
Iphicles: (unpunctuated howl)


--- layout: data_model title: NetworkPacketObjectType this_version: 1.0 ---
The NetworkPacketObjectType's definition of a network packet is based on the TCP/IP model/Internet protocol suite. In the TCP/IP stack, "packet" is generally defined as IP header plus payload, but we also include the LinkLayer from the OSI model, which defines the physical network interfaces and routing protocols. Protocol fields are provided but requirements are not enforced/captured; all fields are optional.
| Field Name | Type | Description |
|---|---|---|
| @object_referenceoptional | QName |
The object_reference field specifies a unique ID reference to an Object defined elsewhere. This construct allows for the re-use of the defined Properties of one Object within another, without the need to embed the full Object in the location from which it is being referenced. Thus, this ID reference is intended to resolve to the Properties of the Object that it points to. |
| Custom_Properties0..1 | CustomPropertiesType |
The Custom_Properties construct is optional and enables the specification of a set of custom Object Properties that may not be defined in existing Properties schemas. |
| Link_Layer0..1 | LinkLayerType |
The Link Layer is the lowest layer of the TCP/IP network stack and is comprised of physical and logical protocols that operate between adjacent nodes of a network segment or a WAN connection. |
| Internet_Layer0..1 | InternetLayerType |
Internet layer characterizes information about the network layer of this Network Packet. The network layer is one layer from the 7-layer OSI Model. |
| Transport_Layer0..1 | TransportLayerType |
Transport layer characterizes information about the transport layer of this Network Packet. The transport layer is one layer from the 7-layer OSI Model. |


Trello Card Numbers now allows you to customize the color and weight of your card numbers! If you go to the chrome://extensions url, you can find the options button under Trello Card Numbers. You will find the following settings:
Page refresh is required after changing options.
The best part: if you don't do anything, it will function exactly as before.
Finally, 1000 apologies for this annoying pop-up. I take pride in this extension just working in the background, but wanted to make sure you knew about the new features.


--- layout: post title: Speaking At MADExpo categories: - ruby-rails - database ---
Over the past few months I have been actively working with both Luis Lavena and Wayne E Seguin to incorporate both TinyTDS and the SQL Server Adapter into the latest release of the Rails Installer for Windows. Like them, I firmly believe that Ruby's success is tightly bound to how well we can bring these tools to the Windows platform. So despite that I have no love for the Windows – I do want to see Ruby succeed and help spread the gospel. To this end, I have been working really hard at making both TinyTDS and the adapter a superb backend for ActiveRecord. In fact today, I just released a 3.1 beta that takes advantage of the new prepared statement support.
To go one step further in helping Ruby, I have decided to speak at a local conference called the Mid Atlantic Developer Expo or just MADExpo. The details for my talk are below and if you find any of the other talks interesting, I highly advise you to grab a ticket and help me bring the message of Ruby right to the belly of the beast!
On the heals of Luis Lavena's RailsConf talk "Infiltrating Ruby Onto The Enterprise Death Star Using Guerilla Tactics" comes a local and frank talk about the current state of Open Source Software (OSS) participation from Windows developers. Learn what OSS is, what motivates its contributors, and how OSS can make you a stronger developer. Be prepared to fall in love with writing software again!
We will start off with a 101 introduction to both the Ruby programming language and the Ruby on Rails web application framework. You will learn about ActiveRecord, a powerful ORM that maps rich objects to your databases, and the latest components to use it with SQL Server. As a Rails core contributor and author of the SQL Server stack, I will give you a modern insight into both that will allow you to leverage your legacy data with Ruby.
Lastly, I will review the bleeding edge tools being actively created for Windows developers to ease the transition to Ruby, Rails and OSS from a POSIX driven world. Many things have changed. It is time to learn and perform some occupational maintenance.


{% if greeting.author %}
{{ greeting.author.email }}
{% if user and user.user_id() == greeting.author.identity %}
(You)
{% endif %}
chose:
{% else %}
An anonymous person wrote:
{% endif %}
{{ greeting.content }}
{% endfor %}
Here is the puzzle. Good luck !
The objective of the game is to fill a 9×9 grid with digits so that each column, each row, and each of the nine 3×3 sub-grids that compose the grid (also called "boxes", "blocks", "regions", or "sub-squares") contains all of the digits from 1 to 9.
The puzzle setter provides a partially completed grid, which typically has a unique solution.
Completed puzzles are always a type of Latin square with an additional constraint on the contents of individual regions.
For example, the same single integer may not appear twice in the same 9x9 playing board row or column or in any of the nine 3x3 subregions of the 9x9 playing board.
{% for greeting in greetings %}
{% if greeting.author %}
{% endif %}
{% endfor %}


 But it turns out that it is for a project where a colleague did most of the work. What would you do?
Please provide a short answer (max. 2 lines).


前言
最近研究了下Pivotal的Cloud foundry，CF本身是一款开源软件，很多PAAS厂商都加入了CF，我们用的是的PCF Dev（PCF Dev是一款可以在工作站上运行的轻量级PCF安装）来试用的，因为它可以部署在自己的环境里，而Pivotal Web Services只免费两个月，之后就要收费。这里有官方的详细教程。
开始
根据官网的示例，我们将运行一个Java程序示例。
安装命令行终端
下载后双击安装即可，然后执行cf help
能够看到帮助。
安装PCF Dev
先下载，如果你没有Pivotal network账号的话，还需要注册个用户，然后用以下命令安装：
$./pcfdev-VERSION-osx && \
cf dev start
Less than 4096 MB of free memory detected, continue (y/N): > y
Please sign in with your Pivotal Network account.
Need an account? Join Pivotal Network: https://network.pivotal.io
Email><EMAIL_ADDRESS>Password>
Downloading VM...
Progress: |+++++++++++++=======>| 100%
VM downloaded.
Allocating 4096 MB out of 16384 MB total system memory (3514 MB free).
Importing VM...
Starting VM...
Provisioning VM...
Waiting for services to start...
8 out of 57 running
8 out of 57 running
8 out of 57 running
46 out of 57 running
57 out of 57 running
_______ _______ _______ ______ _______ __ __
| || || | | | | || | | |
| _ || || ___| | _ || ___|| |_| |
| |_| || || |___ | | | || |___ | |
| ___|| _|| ___| | |_| || ___|| |
| | | |_ | | | || |___ | |
|___| |_______||___| |______| |_______| |___|
is now running.
To begin using PCF Dev, please run:
cf login -a https://api.local.pcfdev.io --skip-ssl-validation
Apps Manager URL: https://local.pcfdev.io
Admin user => Email: admin / Password: admin
Regular user => Email: user / Password: pass
启动过程中还需要Sign In，所以注册完后要记住用户名（邮箱地址）和密码（必须超过8位要有特殊字符和大写字母）。这个过程中还要下载VM，对内存要求至少4G。而且下载速度比较慢，我下载的了大概3个多小时吧。
下面部署一个应用到PCF Dev上试一试。
部署应用
下载代码
$git clone https://github.com/cloudfoundry-samples/spring-music
$cd ./spring-music
$cf login -a api.local.pcfdev.io --skip-ssl-validation
API endpoint: api.local.pcfdev.io
Email> user
Password> pass
Authenticating...
OK
Targeted org pcfdev-org
Targeted space pcfdev-space
API endpoint: https://api.local.pcfdev.io (API version: 2.65.0)
User: user
Org: pcfdev-org
Space: pcfdev-space
编译应用
使用gradle来编译。
$./gradlew assemble
:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:findMainClass
:jar
:bootRepackage
Download https://repo1.maven.org/maven2/com/sun/jersey/jersey-client/1.13/jersey-client-1.13.jar
Download https://repo1.maven.org/maven2/com/sun/jersey/jersey-json/1.13/jersey-json-1.13.jar
Download https://repo1.maven.org/maven2/org/apache/httpcomponents/httpcore/4.4.5/httpcore-4.4.5.jar
Download https://repo1.maven.org/maven2/com/nimbusds/oauth2-oidc-sdk/4.5/oauth2-oidc-sdk-4.5.jar
Download https://repo1.maven.org/maven2/com/google/code/gson/gson/2.3.1/gson-2.3.1.jar
Download https://repo1.maven.org/maven2/com/sun/jersey/jersey-core/1.13/jersey-core-1.13.jar
Download https://repo1.maven.org/maven2/org/codehaus/jackson/jackson-core-asl/1.9.2/jackson-core-asl-1.9.2.jar
Download https://repo1.maven.org/maven2/org/codehaus/jackson/jackson-mapper-asl/1.9.2/jackson-mapper-asl-1.9.2.jar
Download https://repo1.maven.org/maven2/org/codehaus/jackson/jackson-jaxrs/1.9.2/jackson-jaxrs-1.9.2.jar
Download https://repo1.maven.org/maven2/org/codehaus/jackson/jackson-xc/1.9.2/jackson-xc-1.9.2.jar
Download https://repo1.maven.org/maven2/net/jcip/jcip-annotations/1.0/jcip-annotations-1.0.jar
Download https://repo1.maven.org/maven2/org/apache/commons/commons-lang3/3.3.1/commons-lang3-3.3.1.jar
Download https://repo1.maven.org/maven2/net/minidev/json-smart/1.1.1/json-smart-1.1.1.jar
Download https://repo1.maven.org/maven2/com/nimbusds/lang-tag/1.4/lang-tag-1.4.jar
Download https://repo1.maven.org/maven2/com/nimbusds/nimbus-jose-jwt/3.1.2/nimbus-jose-jwt-3.1.2.jar
Download https://repo1.maven.org/maven2/stax/stax-api/1.0.1/stax-api-1.0.1.jar
Download https://repo1.maven.org/maven2/org/bouncycastle/bcprov-jdk15on/1.51/bcprov-jdk15on-1.51.jar
Download https://repo1.maven.org/maven2/javax/mail/mail/1.4.7/mail-1.4.7.jar
:assemble
BUILD SUCCESSFUL
Total time: 1 mins 25.649 secs
This build could be faster, please consider using the Gradle Daemon: https://docs.gradle.org/2.14/userguide/gradle_daemon.html
上传应用
设置应用的主机名为spring-music。
$cf push --hostname spring-music
Using manifest file /Users/jimmy/Workspace/github/cloudfoundry-samples/spring-music/manifest.yml
Creating app spring-music in org pcfdev-org / space pcfdev-space as user...
OK
Creating route spring-music.local.pcfdev.io...
OK
Binding spring-music.local.pcfdev.io to spring-music...
OK
Uploading spring-music...
Uploading app files from: /var/folders/61/f7mqkyjn1nz5mfmfvdztgzjw0000gn/T/unzipped-app139680305
Uploading 38.9M, 234 files
Done uploading
OK
Starting app spring-music in org pcfdev-org / space pcfdev-space as user...
Downloading dotnet-core_buildpack...
Downloading go_buildpack...
Downloading python_buildpack...
Downloading php_buildpack...
Downloading staticfile_buildpack...
Downloaded staticfile_buildpack
Downloading binary_buildpack...
Downloaded binary_buildpack (9.3K)
Downloading java_buildpack...
Downloaded java_buildpack (249.1M)
Downloaded dotnet-core_buildpack (169.3M)
Downloading ruby_buildpack...
Downloading nodejs_buildpack...
Downloaded python_buildpack (255.3M)
Downloaded nodejs_buildpack (109.4M)
Downloaded go_buildpack (392M)
Downloaded php_buildpack (310.4M)
Downloaded ruby_buildpack (260.8M)
Creating container
Successfully created container
Downloading app package...
Downloaded app package (38.8M)
Staging...
-----> Java Buildpack Version: v3.10 (offline) | https://github.com/cloudfoundry/java-buildpack.git#193d6b7
-----> Downloading Open Jdk JRE 1.8.0_111 from https://java-buildpack.cloudfoundry.org/openjdk/trusty/x86_64/openjdk-1.8.0_111.tar.gz (found in cache)
Expanding Open Jdk JRE to .java-buildpack/open_jdk_jre (1.4s)
-----> Downloading Open JDK Like Memory Calculator 2.0.2_RELEASE from https://java-buildpack.cloudfoundry.org/memory-calculator/trusty/x86_64/memory-calculator-2.0.2_RELEASE.tar.gz (found in cache)
Memory Settings: -Xss349K -Xmx681574K -XX:MaxMetaspaceSize=104857K -Xms681574K -XX:MetaspaceSize=104857K
-----> Downloading Spring Auto Reconfiguration 1.10.0_RELEASE from https://java-buildpack.cloudfoundry.org/auto-reconfiguration/auto-reconfiguration-1.10.0_RELEASE.jar (found in cache)
Exit status 0
Staging complete
Uploading droplet, build artifacts cache...
Uploading build artifacts cache...
Uploading droplet...
Uploaded build artifacts cache (108B)
Uploaded droplet (83.9M)
Uploading complete
Destroying container
Successfully destroyed container
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
1 of 1 instances running
App started
OK
App spring-music was started using this command `CALCULATED_MEMORY=$($PWD/.java-buildpack/open_jdk_jre/bin/java-buildpack-memory-calculator-2.0.2_RELEASE -memorySizes=metaspace:64m..,stack:228k.. -memoryWeights=heap:65,metaspace:10,native:15,stack:10 -memoryInitials=heap:100%,metaspace:100% -stackThreads=300 -totMemory=$MEMORY_LIMIT) && JAVA_OPTS="-Djava.io.tmpdir=$TMPDIR -XX:OnOutOfMemoryError=$PWD/.java-buildpack/open_jdk_jre/bin/killjava.sh $CALCULATED_MEMORY" && SERVER_PORT=$PORT eval exec $PWD/.java-buildpack/open_jdk_jre/bin/java $JAVA_OPTS -cp $PWD/. org.springframework.boot.loader.JarLauncher`
Showing health and status for app spring-music in org pcfdev-org / space pcfdev-space as user...
OK
requested state: started
instances: 1/1
usage: 1G x 1 instances
urls: spring-music.local.pcfdev.io
last uploaded: Thu Mar 23 14:29:46 UTC 2017
stack: cflinuxfs2
buildpack: java-buildpack=v3.10-offline-https://github.com/cloudfoundry/java-buildpack.git#193d6b7 java-main open-jdk-like-jre=1.8.0_111 open-jdk-like-memory-calculator=2.0.2_RELEASE spring-auto-reconfiguration=1.10.0_RELEASE
state since cpu memory disk details
#0 running 2017-03-23 10:31:36 PM 160.7% 442M of 1G 165.6M of 512M
在浏览器中访问app
spring-music.local.pcfdev.io页面如图：
requested state: started
instances: 1/1
usage: 512M x 1 instances
urls: spring-music.local.pcfdev.io
查看日志
PCF提供应用的日志聚合功能，你可以查看HTTP请求、对应用操作时候的output，如扩容、重启等。
每行日志中都包括如下信息：
- Timestamp
- Log type
- Channel
- Message
查看刚才那个应用的日志信息：
查看最近输出：
$cf logs spring-music --recent
2017-03-23T22:34:05.17+0800 [RTR/0] OUT spring-music.local.pcfdev.io - [23/03/2017:14:34:05.163 +0000] "GET /templates/albumForm.html HTTP/1.1" 200 0 2518 "http://spring-music.local.pcfdev.io/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36" <IP_ADDRESS>:52097 <IP_ADDRESS>:60012 x_forwarded_for:"-" x_forwarded_proto:"http" vcap_request_id:c6b5f34d-bc5a-4c66-77aa-cb768b273f21 response_time:0.007390127 app_id:fdc7a43e-61b8-40e9-b1dc-38b858037da9 app_index:0
查看实时输出流：
$cf logs spring-music
连接数据库
在上面的那个例子中用的是内存数据库。我们可以改用mysql数据库。
查看可用的数据
$cf marketplace -s p-mysql
Getting service plan information for service p-mysql as user...
OK
service plan description free or paid
512mb PCF Dev MySQL Server free
1gb PCF Dev MySQL Server free
创建数据库
$cf create-service p-mysql 512mb my-spring-db
Creating service instance my-spring-db in org pcfdev-org / space pcfdev-space as user...
OK
将它与我们上面的示例应用程序绑定。
$cf bind-service spring-music my-spring-db
Binding service my-spring-db to app spring-music in org pcfdev-org / space pcfdev-space as user...
OK
TIP: Use 'cf restage spring-music' to ensure your env variable changes take effect
重启app
$cf restart spring-music
Stopping app spring-music in org pcfdev-org / space pcfdev-space as user...
OK
Starting app spring-music in org pcfdev-org / space pcfdev-space as user...
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
1 of 1 instances running
App started
OK
App spring-music was started using this command `CALCULATED_MEMORY=$($PWD/.java-buildpack/open_jdk_jre/bin/java-buildpack-memory-calculator-2.0.2_RELEASE -memorySizes=metaspace:64m..,stack:228k.. -memoryWeights=heap:65,metaspace:10,native:15,stack:10 -memoryInitials=heap:100%,metaspace:100% -stackThreads=300 -totMemory=$MEMORY_LIMIT) && JAVA_OPTS="-Djava.io.tmpdir=$TMPDIR -XX:OnOutOfMemoryError=$PWD/.java-buildpack/open_jdk_jre/bin/killjava.sh $CALCULATED_MEMORY" && SERVER_PORT=$PORT eval exec $PWD/.java-buildpack/open_jdk_jre/bin/java $JAVA_OPTS -cp $PWD/. org.springframework.boot.loader.JarLauncher`
Showing health and status for app spring-music in org pcfdev-org / space pcfdev-space as user...
OK
requested state: started
instances: 1/1
usage: 1G x 1 instances
urls: spring-music.local.pcfdev.io
last uploaded: Thu Mar 23 14:29:46 UTC 2017
stack: cflinuxfs2
buildpack: java-buildpack=v3.10-offline-https://github.com/cloudfoundry/java-buildpack.git#193d6b7 java-main open-jdk-like-jre=1.8.0_111 open-jdk-like-memory-calculator=2.0.2_RELEASE spring-auto-reconfiguration=1.10.0_RELEASE
state since cpu memory disk details
#0 running 2017-03-23 10:44:18 PM 150.4% 461.6M of 1G 165.6M of 512M
现在我们再查看下自己的service。
$cf services
Getting services in org pcfdev-org / space pcfdev-space as user...
OK
name service plan bound apps last operation
my-spring-db p-mysql 512mb spring-music create succeeded
应用扩容
扩展应用的示例数。
$cf scale spring-music -i 2
Scaling app spring-music in org pcfdev-org / space pcfdev-space as user...
OK
再查看下spring-music
应用的信息。
$cf app spring-music
Showing health and status for app spring-music in org pcfdev-org / space pcfdev-space as user...
OK
requested state: started
instances: 2/2
usage: 1G x 2 instances
urls: spring-music.local.pcfdev.io
last uploaded: Thu Mar 23 14:29:46 UTC 2017
stack: cflinuxfs2
buildpack: java-buildpack=v3.10-offline-https://github.com/cloudfoundry/java-buildpack.git#193d6b7 java-main open-jdk-like-jre=1.8.0_111 open-jdk-like-memory-calculator=2.0.2_RELEASE spring-auto-reconfiguration=1.10.0_RELEASE
state since cpu memory disk details
#0 running 2017-03-23 10:44:18 PM 0.5% 451.4M of 1G 165.6M of 512M
#1 starting 2017-03-23 10:46:19 PM 0.0% 348.3M of 1G 165.6M of 512M
还可以对内存进行扩容。这个操作会重启应用。
$cf scale spring-music -m 1G
0 of 2 instances running, 1 starting, 1 down
0 of 2 instances running, 1 starting, 1 down
0 of 2 instances running, 1 starting, 1 down
0 of 2 instances running, 1 starting, 1 down
0 of 2 instances running, 1 starting, 1 down
0 of 2 instances running, 1 starting, 1 down
1 of 2 instances running, 1 down
App started
OK
App spring-music was started using this command `CALCULATED_MEMORY=$($PWD/.java-buildpack/open_jdk_jre/bin/java-buildpack-memory-calculator-2.0.2_RELEASE -memorySizes=metaspace:64m..,stack:228k.. -memoryWeights=heap:65,metaspace:10,native:15,stack:10 -memoryInitials=heap:100%,metaspace:100% -stackThreads=300 -totMemory=$MEMORY_LIMIT) && JAVA_OPTS="-Djava.io.tmpdir=$TMPDIR -XX:OnOutOfMemoryError=$PWD/.java-buildpack/open_jdk_jre/bin/killjava.sh $CALCULATED_MEMORY" && SERVER_PORT=$PORT eval exec $PWD/.java-buildpack/open_jdk_jre/bin/java $JAVA_OPTS -cp $PWD/. org.springframework.boot.loader.JarLauncher`
Showing health and status for app spring-music in org pcfdev-org / space pcfdev-space as user...
OK
requested state: started
instances: 1/2
usage: 1G x 2 instances
urls: spring-music.local.pcfdev.io
last uploaded: Thu Mar 23 14:29:46 UTC 2017
stack: cflinuxfs2
buildpack: java-buildpack=v3.10-offline-https://github.com/cloudfoundry/java-buildpack.git#193d6b7 java-main open-jdk-like-jre=1.8.0_111 open-jdk-like-memory-calculator=2.0.2_RELEASE spring-auto-reconfiguration=1.10.0_RELEASE
state since cpu memory disk details
#0 running 2017-03-23 10:48:43 PM 145.1% 412.2M of 1G 165.6M of 512M
#1 down 2017-03-23 10:48:14 PM 0.7% 436.2M of 1G 165.6M of 512M insufficient resources: memory
还可以增加应用的磁盘大小。这个操作也会重启应用。
$cf scale spring-music -k 512M
This will cause the app to restart. Are you sure you want to scale spring-music?> y
Scaling app spring-music in org pcfdev-org / space pcfdev-space as user...
OK
Stopping app spring-music in org pcfdev-org / space pcfdev-space as user...
OK
Starting app spring-music in org pcfdev-org / space pcfdev-space as user...
0 of 2 instances running, 1 starting, 1 down
0 of 2 instances running, 1 starting, 1 down
0 of 2 instances running, 1 starting, 1 down
0 of 2 instances running, 1 starting, 1 down
0 of 2 instances running, 1 starting, 1 down
1 of 2 instances running, 1 down
App started
OK
App spring-music was started using this command `CALCULATED_MEMORY=$($PWD/.java-buildpack/open_jdk_jre/bin/java-buildpack-memory-calculator-2.0.2_RELEASE -memorySizes=metaspace:64m..,stack:228k.. -memoryWeights=heap:65,metaspace:10,native:15,stack:10 -memoryInitials=heap:100%,metaspace:100% -stackThreads=300 -totMemory=$MEMORY_LIMIT) && JAVA_OPTS="-Djava.io.tmpdir=$TMPDIR -XX:OnOutOfMemoryError=$PWD/.java-buildpack/open_jdk_jre/bin/killjava.sh $CALCULATED_MEMORY" && SERVER_PORT=$PORT eval exec $PWD/.java-buildpack/open_jdk_jre/bin/java $JAVA_OPTS -cp $PWD/. org.springframework.boot.loader.JarLauncher`
Showing health and status for app spring-music in org pcfdev-org / space pcfdev-space as user...
OK
requested state: started
instances: 1/2
usage: 1G x 2 instances
urls: spring-music.local.pcfdev.io
last uploaded: Thu Mar 23 14:29:46 UTC 2017
stack: cflinuxfs2
buildpack: java-buildpack=v3.10-offline-https://github.com/cloudfoundry/java-buildpack.git#193d6b7 java-main open-jdk-like-jre=1.8.0_111 open-jdk-like-memory-calculator=2.0.2_RELEASE spring-auto-reconfiguration=1.10.0_RELEASE
state since cpu memory disk details
#0 running 2017-03-23 10:50:57 PM 130.8% 376.2M of 1G 165.6M of 512M
#1 down 2017-03-23 10:50:32 PM 0.6% 438.5M of 1G 165.6M of 512M insufficient resources: memory
从上面的操作中可以看到，连续性特别强，所有的操作都可以在几秒钟内完成，特别适合微服务的部署和Cloud Native APP。


Part One: Egress
While Postgres is an incredibly robust and defensively-written system, occasionally one does run into problems with data corruption. This can happen due to hardware issues, filesystem or other OS bugs, and sometimes, yes, even Postgres bugs. However, even when data corruption does occur, Postgres will generally contain the damage to specific chunks of data, and manual intervention will let you recover anything that was not affected.
This is the story of lessons learned from treating an extensive case of such corruption in the course of my job with the Heroku Postgres Department of Data. This post describes recognizing the problems and getting the data out of a corrupt system; the next details restoring it.
All data and metadata is mocked out; no customer data was used in the making of this post.
Preface
Josh Williams has a fantastic post about treating corruption; Josh’s post and tips from my colleagues (and Postgres contributors) Daniel Farina and Peter Geogheghan were instrumental in helping me wrap my head around all the nuts and bolts relevant here.
Now before we dig in, note that the easiest recovery is one you don’t need
to perform at all. So how can you get a pristine copy of your database? Try your
standby. There’s
a chance that the corruption only affects the primary, because it
never made it into the WAL stream and was not present when the
replica’s base backup was taken. Don’t have a standby, but have a
base backup
and the required WAL segments? Try making a fresh replica (this can
take some time when the base backup is old, but it’s better than the
alternative). You can try a fresh replica in parallel with other
recovery efforts. Validate these with pg_dump
, as discussed below,
and then run a dump and restore (again, see below) to ensure that the
corruption is quarantined. Seriously,
don’t delude yourself into thinking it’s going to be okay.
This is by far the easiest and safest mechanism for treating corruption. It’s not a panacea, but we’ve found it to be unreasonably effective.
In my case, the existing standby and fresh standbys all failed and extensive manual recovery was required, but at least it makes for an interesting story.
If you do need to treat corruption manually, there are a few things you should keep in mind:
- Avoid writes: Postgres is in a precarious state; don’t tempt fate by asking it to do more than necessary. In particular, this is a good point to turn off autovacuum.
- Stop Postgres and make a filesystem copy of the full data directory, ideally to another disk if you suspect the hardware. The recovery process will involve clobbering data; you want to be able to start over or cross-reference with the original state of the system if you run into problems.
- Your final step in a corruption recovery should almost always be a dump and restore via pg_dump. This is the only way to ensure that you’re actually running on a sane system. This can take many hours for a large database, but if you skip this you might be back at square one before too long.
- The zero_damaged_pages setting may be an easier way to recover. It doesn’t always work, but it basically does what is outlined here for you.
- This ain’t Kansas anymore: this is effectively Byzantine failure territory. The advice here might work or everything might go horribly wrong. There are no fool-proof step-by-step instructions. You’re on your own. Furthermore, what’s outlined here is a general-purpose, fairly coarse approach to recovery. If you need to take a more precise approach or just need someone to blame, consider hiring a Postgres consultancy.
A bad sign
In this particular case, the problem was almost certainly caused by a filesystem or hardware issue. Postgres keeps track of the state of your database via three main sets of data: the heap, where all the physical data resides; the c(ommit)log, which tracks which transactions have been committed and which haven’t; and the write-ahead log (WAL), which does all the bookkeeping to ensure crash-safety and is a key mechanism in Postgres replication.
After intially noticing the corruption, I poked at the affected files
with hexdump
, and noticed that one of the clog
files, which normally
look like this:
1 2 3 4 5 6 7 8 9 10 11 |
|
…looked more like this instead:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
Note the ASCII view of the last few lines. If you see anything
human-readable in the clog
bitmaps, you should either start buying
lottery tickets, or something very bad has happened.
I originally checked the file after seeing an unexpected error message that led me to file a Postgres bug. (The Postgres community, by the way, takes data integrity issues very seriously and addresses them quickly, so don’t hesitate to file a bug if you think you’re running into a legitimate Postgres problem.)
Trouble with transactions
The above happened on a replica, and checking the master revealed a different—but just as serious—problem in the logs:
1 2 |
|
The clog
files are bitmaps that live in the pg_clog
subdirectory of
your Postgres data directory and track which transactions have been
committed and which have aborted.
You can take a look in the subdirectory and see the various clog
files. If you don’t know where your data directory is, you can run the
following Postgres command (this must be run as a Postgres supseruser,
e.g. postgres
in most installations):
1 2 3 4 5 |
|
In that directory, you’ll see a number of clog
files
1 2 3 4 5 6 7 8 |
|
These are sequential, and end way before the 09BF
file that the
error message complained about, so that’s not a great sign. So what
can we do? A reasonable assumption might be that everything
referencing transactions in that suspect clog
file committed
(actually, that’s a terrible assumption, but it’s easy to fake
transaction metadata like that, and that’s the only way to see the
effects of these alleged transactions, so let’s roll with it). In
order to gin up a hunky-dory clog
file, where everything committed, we
can use the trusty dd
tool. If you’re not familiar with dd
, you
can think of it as a bit scalpel for file surgery:
1 2 3 |
|
Here, of
is the output clog
file you need to generate (dd has a
somewhat unconventional way to pass arguments). Everything else (block
size, block count, and input file—the handy /dev/zero
special file)
can stay the same. Note that you’ll probably need to run with sudo as
whatever user owns the other clog
files (typically postgres
).
Checking sanity
So does this fix our problem? One way to check is to re-run the query
that triggered the error in the first place. A more thorough check is
to just run pg_dump
to /dev/null
:
1
|
|
This works because generally, corruption manifests as either
references to bogus transactions (which can be addressed as above), or
some sort of failure when attempting to read a specific set of data
from disk. Postgres organizes data on disk in pages, normally 8192
bytes each. When things get corrupted, problems tend to be
page-aligned—either a page will be fine, or it’s wholy
suspect. Failure to read a page indicates that either the Postgres
page headers are corrupt, or that the data is mangled in such a way as
to cause errors in the per-datatype recv
deserialization functions.
Occasionally, a page will be corrupt in such a way as to crash Postgres when one attempts to read it. This is problematic for recovery, but not a showstopper—if we can figure out what pages are causing crashes, we can surgically excise them.
In either case, pg_dump attempts to read every single live page of data, so if you make it through that, you’re on your way to a functioning system. Note, however, that this does not validate the integrity of your indexes: another good reason to always go through a dump and restore.
Note also that the most pernicious aspects of corruption occur when none of the above trigger: when bits get shuffled around, but in such a way as to still represent valid data (just not the data you put there). Unfortunately, prior to Postgres 9.3’s checksums feature, there’s not much you can do about this. Fortunately, this is also the least likely problem, as corruption tends to cause chaos and very few datatypes are resilient to bit scrambling (numeric types being a notable exception).
Pages behaving badly
In this case, the pg_dump still failed with the same error a few more
times. After applying the same remedy a few times to different clog
files, I eventually got to a different error:
1 2 |
|
While Postgres supports pretty big rows and fields, its internal memory management is limited to working with chunks up to 1GB. This request for 2.5GB seems shady. It’s likely the metadata about the size of the value stored on this page is corrupted.
Without significantly more digging, we have to give up on this data as lost and nuke the page. There are a few other errors you may see that likely point to corruption:
1 2 3 |
|
and
1 2 3 |
|
and
1 2 3 |
|
So how do we track down the offending page? Fortunately, all rows in
Postgres have a hidden column called ctid
that is effectively the
“physical” row id. If you have the ctid
, you can figure out where
the page lives on disk. You can project the ctid
just like any other
column:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
|
The ctid
values you see are a (page, offset) pair. Chances are,
projecting just the ctid
from an affected table is not going to
trigger the memory allocation error we saw above (because Postgres
doesn’t have to read any of the affected data).
With that, you can go row by row, projecting every value to see if it
causes problems. Doing this manually can take forever on a good-sized
table, so I wrote a PL/pgSQL function to do it (the FETCH_COUNT
trick
from Josh’s post could also have helped, but I didn’t think of that
at the time):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
|
This looks at all the ctid
s in the target table, and for each one,
tries to project the values in every column for that row. The columns
are projected one at a time, so that if one exhibits a problem and we
have to purge the row, we can still check the valid ones and save
that data beforehand.
This works for small and medium-sized tables, but takes forever on
anything sizable. I tried to optimize it first by doing a binary
search for bad tuples across ctid
s, and then by taking advantage of
the fact that corruption is—as mentioned above—typically
page-oriented. In the end, neither of these panned out (for reasons
I’ll get to below), but I learned some interesting PL/pgSQL. In any
case, this approach was serviceable for a while and did help me make
progress. The output looks something like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
|
Trouble on page 6! At this point, you can try to project the other columns from the affected rows (and any potentially unaffected rows) so you can save whatever data is still recoverable.
Once we find an affected page, we need to figure out where it lives on
disk. Again, we find what we’re looking for in the data directory.
The base
subdirectory contains all the “actual” data (as opposed to
metadata) in your Postgres instance, so this is where we look. The
first level looks like this:
1 2 3 4 5 6 7 8 9 |
|
This contains all the different databases (as in CREATE
DATABASE ...
) in your Postgres instance. This query can help you
figure out the right subdirectory:
1 2 3 4 5 6 7 8 9 10 |
|
(oid
is another hidden column, a surrogate logical identifier for
many system tables.) In there, you’ll see files for your tables and
other aspects of your database:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
To find the right table, you might assume you can use the oid again (I
certainly did), but this won’t always work. The pg_class
system
catalog table can show you the actual file you need (adjust the namespace
as needed):
1 2 3 4 5 6 7 |
|
So we have the subdirectory for the database, the file for the table,
and the page and offset from the ctid
. Now we need to do some bit
surgery, just as with the clog
files above. This is where dd
’s
“addressing” feature (via its blocksize
and seek
parameters) comes
in really handy: dd
makes it easy to treat a file as a sequence
of contiguous chunks, and to overwrite just one of these chunks.
Let’s go to town:
1 2 3 4 |
|
Here, bs=8192
indicates the Postgres page size, count=1
means we
overwrite just one page, and seek=6
means we want to seek to the 6th
8192-byte page. Again, we use /dev/zero
as a source. The very
important conv=notruc
means don’t truncate the file; just write to
the middle.  That’s a fantastic property for what
is effectively a massive binary serialization format.
In any case, doing these one-by-one can get tedious (and
error-prone). If you find a lot of these up front, you can even script
the dd
invocations:
1 2 3 4 5 |
|
Be extremely careful with this, though—it’s easy to fat-finger your way to wiping out large swathes of your database.
Trouble in purgatory
After a while of making progress like this, I ran into a problem that I couldn’t solve with PL/pgSQL:
1 2 3 4 |
|
Postgres is written defensively, but if its data is scrambled badly enough, it will still occasionally wig out. With luck, it will recover in a few seconds and you can continue treating the corruption, but subsequent attempts to read the affected pages are likely to cause repeat crashes. This means that any PL/pgSQL functions that rely on being able to scan a whole table can’t really cope with server crashes.
Bash (and shell scripting in general) gets a bad rap—in many cases, deservedly so—but it’s still a fantastic way to glue together other programs. It seemed like an appropriate tool here:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
|
This selects all ctid
s from a table and then iterates over them.
For each, it dumps all data on a page, and then skips ctid
s until
the next page (yes, it would probably be faster to query for only
distinct pages and iterate over just that; this was fast enough).
This prints errors on failed pages (I no longer cared about individual
columns anymore; these few pages were a mess and I couldn’t get
anything out), but the really nice part is if that Postgres crashes,
it also just prints an error and waits for it to come back up. This
lets you scan a full table even if Postgres crashes on every page,
and you can apply the page-zapping technique above.
Victory (sort of)
After a few more rounds of dealing with a potpourri of the issues above, I was eventually able to clear out all the errors and get pg_dump to complete successfully. Only a few dozen pages were affected, but sorting through everything took hours and was very mentally demanding: this is where any abstraction provided by your database breaks down, and you need to start thinking of your data in a completely different way.
I’ve also elided some of the more frustrating inconsistencies and
gotchas in dealing with a system in this state. Occasionally corrupt
pages that I had cleared would come back (autovacuum and other
connections were off, so I’m still not sure what caused these),
and in one case a manual COPY
worked even though pg_dump
’s invocation
of the same command failed. Be prepared for weirdness.
Overall, though, Postgres held up admirably: it’s very impressive how well it does in the face of serious data corruption.
Unfortunately, after all this, the dump I got would still not restore cleanly. I’ll go over the (much simpler) steps I had to take to get things back into Postgres in the next post.