"JUST STOP, in the name of love" ….
What we allow, is what will continue. So what is going on in your life at present that you have had a gutful of?
What do you now want to JUST STOP and no longer continue?
What blocks us from living and loving to our fullest? Our fears. We don't need to be a rocket scientist to work that one out, however to JUST STOP a behavior is often easier said than done.
How do we JUST STOP a habit we have been repeating for decades? One day at a time, that's how.
Too often we overwhelm ourselves before we even start working towards achieving a new dream for ourselves. Dreams are made too big for us to allow us time to grow into them. As a recovering alcoholic addict I have embraced my heartfelt dreams "one day at a time" approach to putting a STOP to my corrosive addictions. It has worked without fail for me consistently since October 12th, 1995.
So what is it in your life you would like to JUST STOP doing?
For some like me it's drinking and taking drugs, but for many of my clients who are not addicts they too have areas of their lives where they would like to JUST STOP self sabotaging. Issues with managing finances, body weight, fears around intimacy, over spending, gambling, infidelity, workaholism, self sabotage, choosing emotionally unavailable lovers or setting healthy personal boundaries. Learning how to say yes, no and maybe is another area many of us struggle with.
Once we identify the problem areas we choose that we want to JUST STOP consistently letting ourselves and others down in, we can commence to make some constructive change.
If we commit to JUST STOPPING whatever it is we are unhappy to continue doing, just for the 16 or so hours ahead of us when we are not sleeping new healthier habits become more achievable. If we focus on having to find the self-discipline to put a STOP to our knee jerk habit for an entire lifetime sustainable change just seems too daunting. But most of us can find the willingness to implement self-discipline in small bite size pieces, just for one day.
When others ask me if I am never going to drink, smoke a cigarette (I had a three packet a day habit) or take drugs again, my answer is that I wholeheartedly hope not to. But I'm only in my 56th year of my life, so if I live into my 80's that's another 30 years or so of total abstinence before me. I have yet to clock up 20 years and that has seemed monumental to achieve. So I choose not to overwhelm myself each day with the thought of enduring another 30 years without booze, ciggies or drugs. I just do one day at a time. That is manageable and not overwhelming. And, it works for me and many fellow addicts like a charm.
So whatever it is that you choose to JUST STOP doing, why not try it just for 16 or so hours ahead of you as of tomorrow? Just for the day. And if you feel your self-respect growing, do it again the following day. Days melt into weeks then months soon become years then decades.


The original Whittemore school opened in the mid-1800s. Its purpose was to educate the children of former slaves living in Horry County. The school was most likely started on 5th Avenue in Conway by a man named B.F. Whittemore from Boston, according to a history of the school written by an alum and kept by the Horry County Museum.
Early in its history, the school was a one-room building without a solid ceiling or running water. The teachers were people "who were thought to have possessed an unusual degree of intelligence," according to an old record of the school history.
During this time all students attended the same classroom. There were no grade levels, but over the years the school grew and expanded its offerings. Notably, in 1910, Ella Cochran is believed to be one of the first black people from Conway to attend college. She attended the Whittemore schools.
It did no take long for the school to start to grow. At one point students from as far away as Bucksport and Murrells Inlet were being driven daily to the Whittemore School. The elementary school opened in 1953.
Horry County Schools were integrated in 1970, with the last class graduating in May of that year. The Whittemore High School combined with Conway High School.
Blain-Bellamy said that it's probably easier to find items from the high school, but she is hoping to find memorabilia specifically from the elementary school to include in the building.
Today, many alums of Whittemore remain active in Facebook groups remembering the schools legacy.
Taylor Newell, spokeswoman for Conway, said they have yet to receive any items. While City leaders are still figuring out what to do with the elementary school building, the items are going to be used to remember the history of the school.
Some potential uses for the building would be culinary classes, a science education center or even a yoga facility. A decision about what to do with the building is expected to come around October of this year.
If you have any items from the school they would like to be preserved, contact the City of Conway.


text:
Mayors of F.C. & Vienna in Solar Challenge
April 22, 2015 7:50 PM by FCNP.com
Falls Church Mayor David Tarter and Vienna Mayor Laurie DiRocco have issued a challenge to each other and will join in a friendly competition to see whose community can enroll the greatest number of participants for free home energy checkups and solar PV reviews as part of the Solarize NoVA campaign. "The City of Falls Church is a leader in environmental sustainability and stewardship, mostly recently becoming Virginia's first EPA Green Power Community" said F.C. Mayor Tarter. "I am confident that we will prevail." Mayor DiRocco retorted, "We may be a small town, but we have a very engaged citizenry who very much supports our sustainability practices and efforts to protect the environment. I look forward to Mayor Tarter having to come to the Vienna Town Council to offer his congratulations to Vienna residents and businesses."
The runner-up in the contest will provide dinner to the winning Council from a restaurant within that locality. "In all seriousness we are pleased to be able to encourage our residents to participate in this program and receive a free home energy checkup as part of the program. We both have signed up for the review and hope others will do as well," said Mayors DiRocco and Tarter. From April 1 through June 30 solar power for homes will be easier and more affordable than ever thanks to another round of Solarize Falls Church, a program that offers bulk purchasing discounts and free solar site assessments to homeowners in select communities in Northern Virginia.
Author: FCNP.com

redpajama_set_name: RedPajamaCommonCrawl


Stephen King wrote in his book "On Writing: A Memoir of the Craft," "You can, you should, and if you're brave enough to start, you will." (emphasis added) He called this a "permission slip." Couple this with Ranier Maria Rilke's "Letters to a Young Poet" (which I talk about here) and the whole picture emerges: when faced with the questions of who we are and what we want to be, we need to harness our passion (Rilke's "I must"), couple it with the strength of our heart (courage), and not get in the way of our own potential.
Excuses become victories to overcome.
Obstacles become challenges to meet head-on.
Failures aren't disasters, but stepping stones.
That last one is important. I know so many people who are afraid to evolve, to try new things, to go new places, to meet new people because they fear the failures that may await outside of their comfort zone. That's an oppressive way to live -- and it's self-inflicted! There's such great freedom in detaching yourself from expectations (of failure or even success). It a beautiful blank canvas where anything can happen (Bob Ross: "We don't make mistakes: we have happy accidents").
#GoTheDist 2016's theme hopes to inspire and encourage the greatness that is within all of us.
1. Click on the SUMMARY PAGE (bookmarking it would be a good idea as you will be using it often).
2. Fill out the next available line on the "Summary" spreadsheet. You are responsible for filling out your biographical information (columns A–D), your tracking modality and goal (columns E and F), your quarterly goals (columns G, J, M, and P), and your half-year and full-year rewards (columns U and W).
3. **CREATE YOUR INDIVIDUAL PAGE** (The information you have entered in step 2 should auto-complete to an individual page. Check your line number and then look at the bottom of the page. Match up your line number and double check that your information is correct).
4. Rename the tab "@[twitter name]" or if you don't have Twitter "[nickname]"
5. Fill out the sheet as you wish. See step #8.
6. Update your own individual page as needed (if tracking is too hard, consider printing out your page and filling it out by hand and updating it online once a week). The total mileage will automatically be updated on the Summary tab as you report on your individual page.
7. Follow #GoTheDist on Twitter for support if you need it or to support others when they do, to announce achievements, and find new/old friends!
8. PLEASE DO NOT DELETE LINES OR TABS! Do not SORT. If you want to add columns, please add them to the RIGHT of the page. Please do NOT move your page around! You CAN bookmark your individual page using your browser to find it easily.
You are so super awesome with all your spread sheets and stuff! #gothedistance is a fantastic idea! Happy New Year chicken!


text:
Michigan Man Found Guilty In Shooting Death Of Girl On His Porch : The Two-Way The white homeowner said he shot the 19-year-old because he'd felt threatened when she pounded on his door after 4 a.m. She had crashed her car about half a mile from his house.
The Two-Way
Michigan Man Found Guilty In Shooting Death Of Girl On His Porch
August 7, 20143:15 PM ET
Christopher Dean Hopkins
Theodore Wafer (center) and his attorney Mack Carpenter sit in the back of the courtroom Jan. 15 before his arraignment in Detroit in the shooting death of Renisha McBride. Rebecca Cook/Reuters/Landov hide caption
Rebecca Cook/Reuters/Landov
Theodore Wafer (center) and his attorney Mack Carpenter sit in the back of the courtroom Jan. 15 before his arraignment in Detroit in the shooting death of Renisha McBride.
Michigan Man Charged With Murder In Shooting Death On Porch
Anger Grows After Black Woman Is Shot By White Homeowner
In Detroit Porch Shooting Trial, It's Murder Vs. Self-Defense
The white Detroit-area homeowner who said he felt threatened when he shot and killed an unarmed black teenager on his front porch in November has been found guilty of second-degree murder, Michigan Radio reports.
Theodore Wafer of Dearborn Heights, Mich., has said he intentionally shot Renisha McBride, 19, through his front screen door after she pounded on his door after 4 a.m. Wafer's lawyers say McBride was hitting the door hard enough to break it; prosecutors say the damage was caused when Wafer fired his shotgun, Michigan Radio's Sarah Cwiek reports.
McBride had crashed her car about half a mile away. She was bloodied, and autopsy results showed elevated levels of alcohol and marijuana.
Because McBride was unarmed when she was shot and killed, the case drew comparisons to the killing of Trayvon Martin in Florida, for which George Zimmerman was acquitted in July 2013. Aside from the racial parallels, critics also were angered that, like Zimmerman, Wafer was not immediately arrested, Cwiek reports.
She also reported last month that the opinions of Wafer's neighbors appeared to have settled into sharp contrasts.
"It does appear that many people here have already made up their minds," Cwiek said. "Either Theodore Wafer was a frightened homeowner who made a hasty, tragic mistake in the middle of the night, or he's a killer who didn't think twice before he shot a confused, defenseless girl in the dark."


text:
'Brownsville' has more water than Cairns
DRASTIC action is required to ensure the continued supply of clean drinking water for Cairns.
By Peter McCullagh
Cairns Regional Council earlier this month unveiled a bold plan to ensure the city does not run short of water in the coming years.
Cairns is a fast-growing regional area in Queensland, with a population of 160,000 with strong annual growth of 1.11 per cent compared with Townsville with 195,000 people, however bulk water storage for Cairns is minimal compared to the resources available in Townsville.
With population projections of 215,000 people the water resources of Cairns are under extreme pressure and this pressure continues to increase.
Cairns Regional Council Mayor, Bob Manning said water security was this Council's highest priority.
A water shortage by 2027 would mean severe and frequent restrictions, potential capping of population growth, damage to the region as a destination and loss of business confidence.
Currently Cairns draws 80% of its water needs from Copperlode Dam. Commissioned in 1976 when the population of Cairns was 58,000 Coperlode easily met the needs of a young city.
The current capacity of Copperlode represents the equivalent of 1.5 years of water supply for Cairns.
The balance of the water supply for Cairns is drawn from Behana Creek and does not have bulk storage capacity.
The plans unveiled this month include building water infrastructure on the Mulgrave River delivering greater supply into the city's mains.
Cairns Mayor Bob Manning said residents were frugal with water, consuming an average 400 litres per person daily compared with Townsville's 700 litres.
"We are very efficient in our use of water and when restrictions are called for, people do it," he said.
"Now, we can try and bring demand back further, but we need to start looking further ahead.
"Copperlode Dam was our main storage; it is not a big dam it is about 38,000ML – we consume about 27,000ML a year. We can get from one wet season to the next, but if a wet season fails and we go into a low, we will have trouble.
"The dam in Townsville is about four times the capacity of Copperlode … in the past we've never had to worry about it, the mentality of everyone is 'it'll rain next year, it always does' – but one day it may not."
Mark Wuth, General Manager Water & Resources Recovery, Cairns Regional Council believes the Mulgrave River project will help secure the region's water needs for the future.
"Our approach to take and treat water from the Mulgrave River is a much more cost-effective and timely option than building a new dam, with a much lower environmental footprint.
"It also focuses on providing drinking water without competing with agricultural needs, which would arise from a new dam on the Tablelands.
Council will still target a reduction in water consumption designed to ease the strain on resources.
"Council's strategy targets a further 10% reduction by 2025, which is significantly more than Townsville and Darwin; cities that share a comparable climate.
"While demand management has ensured the city's drinking water supply meets current needs, it won't be sufficient to accommodate anticipated population growth of 80,000 people by 2041," he said.
Whilst Council would prefer to measure our water consumption against our nearest major city, Townsville, where we do reflect favourably, when compared to southern cities where water security has previously been of critical concern, Cairns is shown to be wasteful in the use of this precious commodity.
The following figures are all measured using identical methods. Total volume of water consumed, through business and residential usage including public space watering, divided by the totally projected population of the region.
In Cairns our current consumption is approximately 400 litres per person per day..
To the south of the state, where water-wise campaigns and generational education are paying dividends, Gold Coast, consumes on average 156 litres per person per day, Logan City 139 litres and Redland 192 litres. (Source SEQWater.com.au)
Cairns Regional Council's Division 9 Councillor, Brett Olds believes water security is one of the most important issues we face here in the north.
"I have long believed that we all need to be better stewards and custodians of our natural resources and environment and that responsibility falls to each individual.
"Are we doing enough? The answer has to be, No! Because we can always do better".
"Other States have tried incentivising water tanks and the like in the past and there are always pro's and cons, but yes, I would support looking in to innovative solutions to reduce water usage in new builds – and also looking into helping out residents that choose to retrofit older homes.
Let's look at all options and make some informed decisions," said Councillor Olds.
Cairns Regional Council is progressing with the roll out and installation of 'smart meters' throughout the region. This is an enormous and costly undertaking; however, they do assist with the detection of leakages from the mains.
Mark Wuth advised that Council have currently installed approximately 1000 smart meters. Since the installation of those meters, Council has identified approximately 88 leaks, saving approximately 10 megalitres of water.
Council plan to continue the rollout of smart meters throughout the region with completion in June 2025.
Planning for the Cairns Water Security – Stage 1 project is well advanced with construction forecast to take two years and be completed by 30 June 2026.
The project has widespread support from key stakeholders, including Advanced Cairns, Cairns, TTNQ, Chamber of Commerce, FNQROC, Regional Development Australia – Tropical North, and Urban Development Institute of Australia (Queensland).
Council has commenced a community awareness campaign to inform residents about the project and why it is critical to the city's future.
Regional quarantine facility announced in Queensland
Queensland is set to have a dedicated regional...
Ingham News
Telstra upgrades services in Regional Queensland
Rural and remote communities across North Queensland...
Douglas CEO to move on
Douglas Shire Council's CEO has announced he is...


text:
Gold Market Report
October 11, 2018 / 10:16 AM / in 9 months
PRECIOUS-Gold tops $1,205 mark as share sell-off sparks safe-haven buying
Sethuraman N R
* European stocks hit 21-month lows following Wall St slump
* Holdings in SPDR Gold Trust rise for first time since July (Adds quotes, updates prices)
By Sethuraman N R
BENGALURU, Oct 11 (Reuters) - Gold rose more than 1 percent to near three-week highs on Thursday, climbing above $1,200 per ounce as sliding global stock markets prompted risk-wary investors to seek out the metal, with a weaker dollar also supporting prices.
Spot gold gained 1.3 percent to $1,209.30 an ounce by 1457 GMT, having hit its highest since Sept. 21, at $1,210.34. U.S. gold futures added 1.4 percent to $1,210 an ounce.
European stocks fell in line with a slump on Wall Street, pointing to growing risk aversion across global markets.
"Gold is finding a bit of support from the global sell-off seen in equities. If this (sell-off) persists, we will start seeing more of a move to gold as a safe-haven asset," ING analyst Warren Patterson said.
"Rising U.S. yields and general strength in the dollar have meant that investors have largely ignored gold. But people are seeing fairly good value at current levels on the back of some macro concerns."
Wednesday's dive on Wall Street prompted U.S. President Donald Trump to lash out against the U.S. Federal Reserve for raising interest rates.
The Fed increased rates last month for the third time this year and is widely expected to hike again in December.
Gold has fallen more than 12 percent since hitting a peak in April, with investors increasingly switching to the safety of the greenback as the U.S.-China trade war unfolded against a backdrop of rising U.S. interest rates.
But prices have managed to stay above a 1-1/2-year low of $1,059.96 hit mid-August, propped up by limited safe-haven buying at lower levels linked to concerns over economic growth and inflationary pressure from soaring oil prices.
Peter Hug, global trading director at Kitco Metals, said that a break above $1,208 could trigger more buying.
"The weakness in the dollar and to some extent the fear in the equity carnage have spooked the shorts."
Holdings in the SPDR Gold Trust, the world's largest gold-backed exchange-traded fund, rose 1.21 percent to 738.99 tonnes on Wednesday, the first gain in holdings since July and the biggest inflow since March.
Spot silver rose 1.4 percent to $14.43 an ounce, while palladium was up 1.7 percent at $1,085. Platinum edged up 0.6 percent to $824.10 an ounce. (Reporting by Nallur Sethuraman and Arpan Varghese in Bengaluru; Editing by Jan Harvey and Adrian Croft)


I raided my local Home Goods and Target for pillows - still deciding on the arrangement so the tags are all still attached! You should have seen the looks I was getting with my cart overflowing with at least 15 pillows (I like to have lots of options, then return what doesn't work). The table between the chairs was also a Home Goods find for $50.
Next up: A coffee table for that big bare spot in the middle!
I already found a winner on the classifieds at KSL that is currently being spray painted - stay tuned!
I was looking at buying the same sofa at Down East. How do you like it? How has it held up? And most importantly for me, does the fabric show spots because no matter what, my kids get the sofa dirty. I would love your oppinion!
I haven't had it long - but so far I have loved this couch. It seems like it was made very well - which is surprising for how cheap it is! I was worried about spots as well (I have 4 boys after all!). So far I have been pleasantly surprised by how the spots have cleaned up. Also it is such a dark color that I think it hides what lighter fabrics would show. Overall I recommend it to anyone considering this couch!
Oh thank you! I tried it out today. It's kind of hard but I really like the style and thought that pillows would help. I like your chairs too! I wonder how they'll hold up with the kids I have four kids myself! I may have put my sofa up for sale on a whim and sold it crazy fast so now we have nothing to sit on!
It's true it isn't the softest couch, but I don't feel uncomfortable whenever I'm on it. I'm more worried about my chairs with 4 kids than the couch -because of the lighter color. But for the price I just couldn't say no! Good luck!


How is the room damp proof?
For example, how indoor moisture?
For indoor humidity, what are some good ways to do this?
No moisture outside the window, any chance of invasion.
Appliances to reduce air humidity in the room.
Have the function of dehumidification.
And it can make people feel cold indoors.
Effective faster, but relatively large power consumption.
Can not play an immediate dehumidification effect.
The most common are the moisture absorption boxes and the two types of dehumidifiers.
In the big space of daily life.
Buy bulk desiccant in cartridge box and reuse.
Put a bag of moisture packs in order to expel moisture.
It can also damp down the indoor humidity.
Disinfection, deodorization and other functions.
And the cabinet naturally evaporates into the air in vitro.
New Post:What about indoor humidity?
Old Post:How is the room damp proof?


text:
Q: How do I get cached image stored by AFNetworking's UIImageView category? I'm using following category UIImageView+AFNetworking.h from AFNetworking in my app, its working fine, its caching photos for me and loads images smoothly.
At one point, I want to get an image which is already there in my cache.
So I dig up into above category class where I found following code, which I think – can be helpful.
Here's the snippet from it:
@implementation AFImageCache

- (UIImage *)cachedImageForRequest:(NSURLRequest *)request {
    switch ([request cachePolicy]) {
        case NSURLRequestReloadIgnoringCacheData:
        case NSURLRequestReloadIgnoringLocalAndRemoteCacheData:
            return nil;
        default:
            break;
    }

    return [self objectForKey:AFImageCacheKeyFromURLRequest(request)];
}

- (void)cacheImage:(UIImage *)image
        forRequest:(NSURLRequest *)request
{
    if (image && request) {
        [self setObject:image forKey:AFImageCacheKeyFromURLRequest(request)];
    }
}

@end

If you want me to add web version of this, it's already here.
I think, - (UIImage *)cachedImageForRequest:(NSURLRequest *)request is the method which can return me my cached image.
But I'm not sure, how can I use it?
If I know Objective-C a bit, it's a kinda a "protocol"?
What I have tried so far is to use it like a protocol in one of my view controller. Like this:
#import <UIKit/UIKit.h>

@interface MyViewController : UIViewController<AFImageCache>

@end

But then it is giving me following warnings:

I'm not sure how to resolve those warnings and get the image from cache? Or any other more appropriate way?

A: I assume you import UIImageView+AFNetworking.h header.
If you want to access to the cached image. You should have a NSURLRequest object. Then it is like this:
UIImage *image = [[UIImageView sharedImageCache] cachedImageForRequest:request];

Done!

redpajama_set_name: RedPajamaStackExchange


text:
from sqlalchemy.test.testing import assert_raises, assert_raises_message
from sqlalchemy import Integer, String, ForeignKey, Sequence, exc as sa_exc
from sqlalchemy.test.schema import Table, Column
from sqlalchemy.orm import mapper, relation, create_session, sessionmaker, class_mapper, backref
from sqlalchemy.orm import attributes, exc as orm_exc
from sqlalchemy.test import testing
from sqlalchemy.test.testing import eq_
from test.orm import _base, _fixtures

class O2MCascadeTest(_fixtures.FixtureTest):
    run_inserts = None

    @classmethod
    @testing.resolve_artifact_names
    def setup_mappers(cls):
        mapper(Address, addresses)
        mapper(User, users, properties = dict(
            addresses = relation(Address, cascade="all, delete-orphan", backref="user"),
            orders = relation(
                mapper(Order, orders), cascade="all, delete-orphan", order_by=orders.c.id)
        ))
        mapper(Dingaling,dingalings, properties={
            'address':relation(Address)
        })

    @testing.resolve_artifact_names
    def test_list_assignment(self):
        sess = create_session()
        u = User(name='jack', orders=[
                 Order(description='someorder'),
                 Order(description='someotherorder')])
        sess.add(u)
        sess.flush()
        sess.expunge_all()

        u = sess.query(User).get(u.id)
        eq_(u, User(name='jack',
                    orders=[Order(description='someorder'),
                            Order(description='someotherorder')]))

        u.orders=[Order(description="order 3"), Order(description="order 4")]
        sess.flush()
        sess.expunge_all()

        u = sess.query(User).get(u.id)
        eq_(u, User(name='jack',
                    orders=[Order(description="order 3"),
                            Order(description="order 4")]))

        eq_(sess.query(Order).order_by(Order.id).all(),
            [Order(description="order 3"), Order(description="order 4")])

        o5 = Order(description="order 5")
        sess.add(o5)
        assert_raises_message(orm_exc.FlushError, "is an orphan", sess.flush)

    @testing.resolve_artifact_names
    def test_save_update_sends_pending(self):
        """test that newly added and deleted collection items are cascaded on save-update"""

        sess = sessionmaker(expire_on_commit=False)()
        o1, o2, o3 = Order(description='o1'), Order(description='o2'), Order(description='o3')
        u = User(name='jack', orders=[o1, o2])
        sess.add(u)
        sess.commit()
        sess.close()

        u.orders.append(o3)
        u.orders.remove(o1)

        sess.add(u)
        assert o1 in sess
        assert o2 in sess
        assert o3 in sess
        sess.commit()

    @testing.resolve_artifact_names
    def test_delete(self):
        sess = create_session()
        u = User(name='jack',
                 orders=[Order(description='someorder'),
                         Order(description='someotherorder')])
        sess.add(u)
        sess.flush()

        sess.delete(u)
        sess.flush()
        assert users.count().scalar() == 0
        assert orders.count().scalar() == 0

    @testing.resolve_artifact_names
    def test_delete_unloaded_collections(self):
        """Unloaded collections are still included in a delete-cascade by default."""
        sess = create_session()
        u = User(name='jack',
                 addresses=[Address(email_address="address1"),
                            Address(email_address="address2")])
        sess.add(u)
        sess.flush()
        sess.expunge_all()
        assert addresses.count().scalar() == 2
        assert users.count().scalar() == 1

        u = sess.query(User).get(u.id)

        assert 'addresses' not in u.__dict__
        sess.delete(u)
        sess.flush()
        assert addresses.count().scalar() == 0
        assert users.count().scalar() == 0

    @testing.resolve_artifact_names
    def test_cascades_onlycollection(self):
        """Cascade only reaches instances that are still part of the collection,
        not those that have been removed"""

        sess = create_session()
        u = User(name='jack',
                 orders=[Order(description='someorder'),
                         Order(description='someotherorder')])
        sess.add(u)
        sess.flush()

        o = u.orders[0]
        del u.orders[0]
        sess.delete(u)
        assert u in sess.deleted
        assert o not in sess.deleted
        assert o in sess

        u2 = User(name='newuser', orders=[o])
        sess.add(u2)
        sess.flush()
        sess.expunge_all()
        assert users.count().scalar() == 1
        assert orders.count().scalar() == 1
        eq_(sess.query(User).all(),
            [User(name='newuser',
                  orders=[Order(description='someorder')])])

    @testing.resolve_artifact_names
    def test_cascade_nosideeffects(self):
        """test that cascade leaves the state of unloaded scalars/collections unchanged."""

        sess = create_session()
        u = User(name='jack')
        sess.add(u)
        assert 'orders' not in u.__dict__

        sess.flush()

        assert 'orders' not in u.__dict__

        a = Address(email_address='foo@bar.com')
        sess.add(a)
        assert 'user' not in a.__dict__
        a.user = u
        sess.flush()

        d = Dingaling(data='d1')
        d.address_id = a.id
        sess.add(d)
        assert 'address' not in d.__dict__
        sess.flush()
        assert d.address is a

    @testing.resolve_artifact_names
    def test_cascade_delete_plusorphans(self):
        sess = create_session()
        u = User(name='jack',
                 orders=[Order(description='someorder'),
                         Order(description='someotherorder')])
        sess.add(u)
        sess.flush()
        assert users.count().scalar() == 1
        assert orders.count().scalar() == 2

        del u.orders[0]
        sess.delete(u)
        sess.flush()
        assert users.count().scalar() == 0
        assert orders.count().scalar() == 0

    @testing.resolve_artifact_names
    def test_collection_orphans(self):
        sess = create_session()
        u = User(name='jack',
                 orders=[Order(description='someorder'),
                         Order(description='someotherorder')])
        sess.add(u)
        sess.flush()

        assert users.count().scalar() == 1
        assert orders.count().scalar() == 2

        u.orders[:] = []

        sess.flush()

        assert users.count().scalar() == 1
        assert orders.count().scalar() == 0

class O2OCascadeTest(_fixtures.FixtureTest):
    run_inserts = None

    @classmethod
    @testing.resolve_artifact_names
    def setup_mappers(cls):
        mapper(Address, addresses)
        mapper(User, users, properties = {
            'address':relation(Address, backref=backref("user", single_parent=True), uselist=False)
        })

    @testing.resolve_artifact_names
    def test_single_parent_raise(self):
        a1 = Address(email_address='some address')
        u1 = User(name='u1', address=a1)

        assert_raises(sa_exc.InvalidRequestError, Address, email_address='asd', user=u1)

        a2 = Address(email_address='asd')
        u1.address = a2
        assert u1.address is not a1
        assert a1.user is None

class O2MBackrefTest(_fixtures.FixtureTest):
    run_inserts = None

    @classmethod
    @testing.resolve_artifact_names
    def setup_mappers(cls):
        mapper(User, users, properties = dict(
            orders = relation(
                mapper(Order, orders), cascade="all, delete-orphan", backref="user")
        ))

    @testing.resolve_artifact_names
    def test_lazyload_bug(self):
        sess = create_session()

        u = User(name="jack")
        sess.add(u)
        sess.expunge(u)

        o1 = Order(description='someorder')
        o1.user = u
        sess.add(u)
        assert u in sess
        assert o1 in sess

class NoSaveCascadeTest(_fixtures.FixtureTest):
    """test that backrefs don't force save-update cascades to occur
    when the cascade initiated from the forwards side."""

    @testing.resolve_artifact_names
    def test_unidirectional_cascade_o2m(self):
        mapper(Order, orders)
        mapper(User, users, properties = dict(
            orders = relation(
                Order, backref=backref("user", cascade=None))
        ))

        sess = create_session()

        o1 = Order()
        sess.add(o1)
        u1 = User(orders=[o1])
        assert u1 not in sess
        assert o1 in sess

        sess.expunge_all()

        o1 = Order()
        u1 = User(orders=[o1])
        sess.add(o1)
        assert u1 not in sess
        assert o1 in sess

    @testing.resolve_artifact_names
    def test_unidirectional_cascade_m2o(self):
        mapper(Order, orders, properties={
            'user':relation(User, backref=backref("orders", cascade=None))
        })
        mapper(User, users)

        sess = create_session()

        u1 = User()
        sess.add(u1)
        o1 = Order()
        o1.user = u1
        assert o1 not in sess
        assert u1 in sess

        sess.expunge_all()

        u1 = User()
        o1 = Order()
        o1.user = u1
        sess.add(u1)
        assert o1 not in sess
        assert u1 in sess

    @testing.resolve_artifact_names
    def test_unidirectional_cascade_m2m(self):
        mapper(Item, items, properties={
            'keywords':relation(Keyword, secondary=item_keywords, cascade="none", backref="items")
        })
        mapper(Keyword, keywords)

        sess = create_session()

        i1 = Item()
        k1 = Keyword()
        sess.add(i1)
        i1.keywords.append(k1)
        assert i1 in sess
        assert k1 not in sess

        sess.expunge_all()

        i1 = Item()
        k1 = Keyword()
        sess.add(i1)
        k1.items.append(i1)
        assert i1 in sess
        assert k1 not in sess

class O2MCascadeNoOrphanTest(_fixtures.FixtureTest):
    run_inserts = None

    @classmethod
    @testing.resolve_artifact_names
    def setup_mappers(cls):
        mapper(User, users, properties = dict(
            orders = relation(
                mapper(Order, orders), cascade="all")
        ))

    @testing.resolve_artifact_names
    def test_cascade_delete_noorphans(self):
        sess = create_session()
        u = User(name='jack',
                 orders=[Order(description='someorder'),
                         Order(description='someotherorder')])
        sess.add(u)
        sess.flush()
        assert users.count().scalar() == 1
        assert orders.count().scalar() == 2

        del u.orders[0]
        sess.delete(u)
        sess.flush()
        assert users.count().scalar() == 0
        assert orders.count().scalar() == 1

class M2OCascadeTest(_base.MappedTest):
    @classmethod
    def define_tables(cls, metadata):
        Table("extra", metadata,
            Column("id", Integer, primary_key=True, test_needs_autoincrement=True),
            Column("prefs_id", Integer, ForeignKey("prefs.id")))

        Table('prefs', metadata,
            Column('id', Integer, primary_key=True, test_needs_autoincrement=True),
            Column('data', String(40)))

        Table('users', metadata,
            Column('id', Integer, primary_key=True, test_needs_autoincrement=True),
            Column('name', String(40)),
            Column('pref_id', Integer, ForeignKey('prefs.id')),
            Column('foo_id', Integer, ForeignKey('foo.id'))
            )

        Table('foo', metadata,
            Column('id', Integer, primary_key=True, test_needs_autoincrement=True),
            Column('data', String(40))
        )
    @classmethod
    def setup_classes(cls):
        class User(_fixtures.Base):
            pass
        class Pref(_fixtures.Base):
            pass
        class Extra(_fixtures.Base):
            pass
        class Foo(_fixtures.Base):
            pass

    @classmethod
    @testing.resolve_artifact_names
    def setup_mappers(cls):
        mapper(Extra, extra)
        mapper(Pref, prefs, properties=dict(
            extra = relation(Extra, cascade="all, delete")
        ))
        mapper(User, users, properties = dict(
            pref = relation(Pref, lazy=False, cascade="all, delete-orphan", single_parent=True  ),
            foo = relation(Foo) # straight m2o
        ))
        mapper(Foo, foo)

    @classmethod
    @testing.resolve_artifact_names
    def insert_data(cls):
        u1 = User(name='ed', pref=Pref(data="pref 1", extra=[Extra()]))
        u2 = User(name='jack', pref=Pref(data="pref 2", extra=[Extra()]))
        u3 = User(name="foo", pref=Pref(data="pref 3", extra=[Extra()]))
        sess = create_session()
        sess.add_all((u1, u2, u3))
        sess.flush()
        sess.close()

    @testing.fails_on('maxdb', 'FIXME: unknown')
    @testing.resolve_artifact_names
    def test_orphan(self):
        sess = create_session()
        assert prefs.count().scalar() == 3
        assert extra.count().scalar() == 3
        jack = sess.query(User).filter_by(name="jack").one()
        jack.pref = None
        sess.flush()
        assert prefs.count().scalar() == 2
        assert extra.count().scalar() == 2

    @testing.resolve_artifact_names
    def test_cascade_on_deleted(self):
        """test a bug introduced by r6711"""

        sess = sessionmaker(expire_on_commit=True)()

        u1 = User(name='jack', foo=Foo(data='f1'))
        sess.add(u1)
        sess.commit()

        u1.foo = None

        # the error condition relies upon
        # these things being true
        assert User.foo.impl.active_history is False
        eq_(
            attributes.get_history(u1, 'foo'),
            ([None], (), [attributes.PASSIVE_NO_RESULT])
        )

        sess.add(u1)
        assert u1 in sess
        sess.commit()

    @testing.resolve_artifact_names
    def test_save_update_sends_pending(self):
        """test that newly added and deleted scalar items are cascaded on save-update"""

        sess = sessionmaker(expire_on_commit=False)()
        p1, p2 = Pref(data='p1'), Pref(data='p2')

        u = User(name='jack', pref=p1)
        sess.add(u)
        sess.commit()
        sess.close()

        u.pref = p2

        sess.add(u)
        assert p1 in sess
        assert p2 in sess
        sess.commit()

    @testing.fails_on('maxdb', 'FIXME: unknown')
    @testing.resolve_artifact_names
    def test_orphan_on_update(self):
        sess = create_session()
        jack = sess.query(User).filter_by(name="jack").one()
        p = jack.pref
        e = jack.pref.extra[0]
        sess.expunge_all()

        jack.pref = None
        sess.add(jack)
        sess.add(p)
        sess.add(e)
        assert p in sess
        assert e in sess
        sess.flush()
        assert prefs.count().scalar() == 2
        assert extra.count().scalar() == 2

    @testing.resolve_artifact_names
    def test_pending_expunge(self):
        sess = create_session()
        someuser = User(name='someuser')
        sess.add(someuser)
        sess.flush()
        someuser.pref = p1 = Pref(data='somepref')
        assert p1 in sess
        someuser.pref = Pref(data='someotherpref')
        assert p1 not in sess
        sess.flush()
        eq_(sess.query(Pref).with_parent(someuser).all(),
            [Pref(data="someotherpref")])

    @testing.resolve_artifact_names
    def test_double_assignment(self):
        """Double assignment will not accidentally reset the 'parent' flag."""

        sess = create_session()
        jack = sess.query(User).filter_by(name="jack").one()

        newpref = Pref(data="newpref")
        jack.pref = newpref
        jack.pref = newpref
        sess.flush()
        eq_(sess.query(Pref).order_by(Pref.id).all(),
            [Pref(data="pref 1"), Pref(data="pref 3"), Pref(data="newpref")])

class M2OCascadeDeleteTest(_base.MappedTest):
    @classmethod
    def define_tables(cls, metadata):
        Table('t1', metadata,
              Column('id', Integer, primary_key=True, test_needs_autoincrement=True),
              Column('data', String(50)),
              Column('t2id', Integer, ForeignKey('t2.id')))
        Table('t2', metadata,
              Column('id', Integer, primary_key=True, test_needs_autoincrement=True),
              Column('data', String(50)),
              Column('t3id', Integer, ForeignKey('t3.id')))
        Table('t3', metadata,
              Column('id', Integer, primary_key=True, test_needs_autoincrement=True),
              Column('data', String(50)))

    @classmethod
    def setup_classes(cls):
        class T1(_fixtures.Base):
            pass
        class T2(_fixtures.Base):
            pass
        class T3(_fixtures.Base):
            pass

    @classmethod
    @testing.resolve_artifact_names
    def setup_mappers(cls):
        mapper(T1, t1, properties={'t2': relation(T2, cascade="all")})
        mapper(T2, t2, properties={'t3': relation(T3, cascade="all")})
        mapper(T3, t3)

    @testing.resolve_artifact_names
    def test_cascade_delete(self):
        sess = create_session()
        x = T1(data='t1a', t2=T2(data='t2a', t3=T3(data='t3a')))
        sess.add(x)
        sess.flush()

        sess.delete(x)
        sess.flush()
        eq_(sess.query(T1).all(), [])
        eq_(sess.query(T2).all(), [])
        eq_(sess.query(T3).all(), [])

    @testing.resolve_artifact_names
    def test_cascade_delete_postappend_onelevel(self):
        sess = create_session()
        x1 = T1(data='t1', )
        x2 = T2(data='t2')
        x3 = T3(data='t3')
        sess.add_all((x1, x2, x3))
        sess.flush()

        sess.delete(x1)
        x1.t2 = x2
        x2.t3 = x3
        sess.flush()
        eq_(sess.query(T1).all(), [])
        eq_(sess.query(T2).all(), [])
        eq_(sess.query(T3).all(), [])

    @testing.resolve_artifact_names
    def test_cascade_delete_postappend_twolevel(self):
        sess = create_session()
        x1 = T1(data='t1', t2=T2(data='t2'))
        x3 = T3(data='t3')
        sess.add_all((x1, x3))
        sess.flush()

        sess.delete(x1)
        x1.t2.t3 = x3
        sess.flush()
        eq_(sess.query(T1).all(), [])
        eq_(sess.query(T2).all(), [])
        eq_(sess.query(T3).all(), [])

    @testing.resolve_artifact_names
    def test_preserves_orphans_onelevel(self):
        sess = create_session()
        x2 = T1(data='t1b', t2=T2(data='t2b', t3=T3(data='t3b')))
        sess.add(x2)
        sess.flush()
        x2.t2 = None

        sess.delete(x2)
        sess.flush()
        eq_(sess.query(T1).all(), [])
        eq_(sess.query(T2).all(), [T2()])
        eq_(sess.query(T3).all(), [T3()])

    @testing.future
    @testing.resolve_artifact_names
    def test_preserves_orphans_onelevel_postremove(self):
        sess = create_session()
        x2 = T1(data='t1b', t2=T2(data='t2b', t3=T3(data='t3b')))
        sess.add(x2)
        sess.flush()

        sess.delete(x2)
        x2.t2 = None
        sess.flush()
        eq_(sess.query(T1).all(), [])
        eq_(sess.query(T2).all(), [T2()])
        eq_(sess.query(T3).all(), [T3()])

    @testing.resolve_artifact_names
    def test_preserves_orphans_twolevel(self):
        sess = create_session()
        x = T1(data='t1a', t2=T2(data='t2a', t3=T3(data='t3a')))
        sess.add(x)
        sess.flush()

        x.t2.t3 = None
        sess.delete(x)
        sess.flush()
        eq_(sess.query(T1).all(), [])
        eq_(sess.query(T2).all(), [])
        eq_(sess.query(T3).all(), [T3()])

class M2OCascadeDeleteOrphanTest(_base.MappedTest):

    @classmethod
    def define_tables(cls, metadata):
        Table('t1', metadata,
              Column('id', Integer, primary_key=True, test_needs_autoincrement=True),
              Column('data', String(50)),
              Column('t2id', Integer, ForeignKey('t2.id')))
        Table('t2', metadata,
              Column('id', Integer, primary_key=True, test_needs_autoincrement=True),
              Column('data', String(50)),
              Column('t3id', Integer, ForeignKey('t3.id')))
        Table('t3', metadata,
              Column('id', Integer, primary_key=True, test_needs_autoincrement=True),
              Column('data', String(50)))

    @classmethod
    def setup_classes(cls):
        class T1(_fixtures.Base):
            pass
        class T2(_fixtures.Base):
            pass
        class T3(_fixtures.Base):
            pass

    @classmethod
    @testing.resolve_artifact_names
    def setup_mappers(cls):
        mapper(T1, t1, properties=dict(
            t2=relation(T2, cascade="all, delete-orphan", single_parent=True)))
        mapper(T2, t2, properties=dict(
            t3=relation(T3, cascade="all, delete-orphan", single_parent=True, backref=backref('t2', uselist=False))))
        mapper(T3, t3)

    @testing.resolve_artifact_names
    def test_cascade_delete(self):
        sess = create_session()
        x = T1(data='t1a', t2=T2(data='t2a', t3=T3(data='t3a')))
        sess.add(x)
        sess.flush()

        sess.delete(x)
        sess.flush()
        eq_(sess.query(T1).all(), [])
        eq_(sess.query(T2).all(), [])
        eq_(sess.query(T3).all(), [])

    @testing.resolve_artifact_names
    def test_deletes_orphans_onelevel(self):
        sess = create_session()
        x2 = T1(data='t1b', t2=T2(data='t2b', t3=T3(data='t3b')))
        sess.add(x2)
        sess.flush()
        x2.t2 = None

        sess.delete(x2)
        sess.flush()
        eq_(sess.query(T1).all(), [])
        eq_(sess.query(T2).all(), [])
        eq_(sess.query(T3).all(), [])

    @testing.resolve_artifact_names
    def test_deletes_orphans_twolevel(self):
        sess = create_session()
        x = T1(data='t1a', t2=T2(data='t2a', t3=T3(data='t3a')))
        sess.add(x)
        sess.flush()

        x.t2.t3 = None
        sess.delete(x)
        sess.flush()
        eq_(sess.query(T1).all(), [])
        eq_(sess.query(T2).all(), [])
        eq_(sess.query(T3).all(), [])

    @testing.resolve_artifact_names
    def test_finds_orphans_twolevel(self):
        sess = create_session()
        x = T1(data='t1a', t2=T2(data='t2a', t3=T3(data='t3a')))
        sess.add(x)
        sess.flush()

        x.t2.t3 = None
        sess.flush()
        eq_(sess.query(T1).all(), [T1()])
        eq_(sess.query(T2).all(), [T2()])
        eq_(sess.query(T3).all(), [])

    @testing.resolve_artifact_names
    def test_single_parent_raise(self):

        sess = create_session()

        y = T2(data='T2a')
        x = T1(data='T1a', t2=y)
        assert_raises(sa_exc.InvalidRequestError, T1, data='T1b', t2=y)

    @testing.resolve_artifact_names
    def test_single_parent_backref(self):

        sess = create_session()

        y = T3(data='T3a')
        x = T2(data='T2a', t3=y)

        # cant attach the T3 to another T2
        assert_raises(sa_exc.InvalidRequestError, T2, data='T2b', t3=y)

        # set via backref tho is OK, unsets from previous parent
        # first
        z = T2(data='T2b')
        y.t2 = z

        assert z.t3 is y
        assert x.t3 is None

class M2MCascadeTest(_base.MappedTest):
    @classmethod
    def define_tables(cls, metadata):
        Table('a', metadata,
            Column('id', Integer, primary_key=True, test_needs_autoincrement=True),
            Column('data', String(30)),
            test_needs_fk=True
            )
        Table('b', metadata,
            Column('id', Integer, primary_key=True, test_needs_autoincrement=True),
            Column('data', String(30)),
            test_needs_fk=True

            )
        Table('atob', metadata,
            Column('aid', Integer, ForeignKey('a.id')),
            Column('bid', Integer, ForeignKey('b.id')),
            test_needs_fk=True

            )
        Table('c', metadata,
              Column('id', Integer, primary_key=True, test_needs_autoincrement=True),
              Column('data', String(30)),
              Column('bid', Integer, ForeignKey('b.id')),
              test_needs_fk=True

              )

    @classmethod
    def setup_classes(cls):
        class A(_fixtures.Base):
            pass
        class B(_fixtures.Base):
            pass
        class C(_fixtures.Base):
            pass

    @testing.resolve_artifact_names
    def test_delete_orphan(self):
        mapper(A, a, properties={
            # if no backref here, delete-orphan failed until [ticket:427] was
            # fixed
            'bs': relation(B, secondary=atob, cascade="all, delete-orphan", single_parent=True)
        })
        mapper(B, b)

        sess = create_session()
        b1 = B(data='b1')
        a1 = A(data='a1', bs=[b1])
        sess.add(a1)
        sess.flush()

        a1.bs.remove(b1)
        sess.flush()
        assert atob.count().scalar() ==0
        assert b.count().scalar() == 0
        assert a.count().scalar() == 1

    @testing.resolve_artifact_names
    def test_delete_orphan_dynamic(self):
        mapper(A, a, properties={
            # if no backref here, delete-orphan failed until [ticket:427] was
            # fixed
            'bs': relation(B, secondary=atob,
                    cascade="all, delete-orphan", single_parent=True,lazy="dynamic")
        })
        mapper(B, b)

        sess = create_session()
        b1 = B(data='b1')
        a1 = A(data='a1', bs=[b1])
        sess.add(a1)
        sess.flush()

        a1.bs.remove(b1)
        sess.flush()
        assert atob.count().scalar() ==0
        assert b.count().scalar() == 0
        assert a.count().scalar() == 1

    @testing.resolve_artifact_names
    def test_delete_orphan_cascades(self):
        mapper(A, a, properties={
            # if no backref here, delete-orphan failed until [ticket:427] was
            # fixed
            'bs':relation(B, secondary=atob, cascade="all, delete-orphan", single_parent=True)
        })
        mapper(B, b, properties={'cs':relation(C, cascade="all, delete-orphan")})
        mapper(C, c)

        sess = create_session()
        b1 = B(data='b1', cs=[C(data='c1')])
        a1 = A(data='a1', bs=[b1])
        sess.add(a1)
        sess.flush()

        a1.bs.remove(b1)
        sess.flush()
        assert atob.count().scalar() ==0
        assert b.count().scalar() == 0
        assert a.count().scalar() == 1
        assert c.count().scalar() == 0

    @testing.resolve_artifact_names
    def test_cascade_delete(self):
        mapper(A, a, properties={
            'bs':relation(B, secondary=atob, cascade="all, delete-orphan", single_parent=True)
        })
        mapper(B, b)

        sess = create_session()
        a1 = A(data='a1', bs=[B(data='b1')])
        sess.add(a1)
        sess.flush()

        sess.delete(a1)
        sess.flush()
        assert atob.count().scalar() ==0
        assert b.count().scalar() == 0
        assert a.count().scalar() == 0

    @testing.resolve_artifact_names
    def test_single_parent_raise(self):
        mapper(A, a, properties={
            'bs':relation(B, secondary=atob, cascade="all, delete-orphan", single_parent=True)
        })
        mapper(B, b)

        sess = create_session()
        b1 =B(data='b1')
        a1 = A(data='a1', bs=[b1])

        assert_raises(sa_exc.InvalidRequestError,
                A, data='a2', bs=[b1]
            )

    @testing.resolve_artifact_names
    def test_single_parent_backref(self):
        """test that setting m2m via a uselist=False backref bypasses the single_parent raise"""

        mapper(A, a, properties={
            'bs':relation(B,
                secondary=atob,
                cascade="all, delete-orphan", single_parent=True,
                backref=backref('a', uselist=False))
        })
        mapper(B, b)

        sess = create_session()
        b1 =B(data='b1')
        a1 = A(data='a1', bs=[b1])

        assert_raises(
            sa_exc.InvalidRequestError,
            A, data='a2', bs=[b1]
        )

        a2 = A(data='a2')
        b1.a = a2
        assert b1 not in a1.bs
        assert b1 in a2.bs

class UnsavedOrphansTest(_base.MappedTest):
    """Pending entities that are orphans"""

    @classmethod
    def define_tables(cls, metadata):
        Table('users', metadata,
            Column('user_id', Integer,primary_key=True, test_needs_autoincrement=True),
            Column('name', String(40)))

        Table('addresses', metadata,
            Column('address_id', Integer,primary_key=True, test_needs_autoincrement=True),
            Column('user_id', Integer, ForeignKey('users.user_id')),
            Column('email_address', String(40)))

    @classmethod
    def setup_classes(cls):
        class User(_fixtures.Base):
            pass
        class Address(_fixtures.Base):
            pass

    @testing.resolve_artifact_names
    def test_pending_standalone_orphan(self):
        """An entity that never had a parent on a delete-orphan cascade can't be saved."""

        mapper(Address, addresses)
        mapper(User, users, properties=dict(
            addresses=relation(Address, cascade="all,delete-orphan", backref="user")
        ))
        s = create_session()
        a = Address()
        s.add(a)
        try:
            s.flush()
        except orm_exc.FlushError, e:
            pass
        assert a.address_id is None, "Error: address should not be persistent"

    @testing.resolve_artifact_names
    def test_pending_collection_expunge(self):
        """Removing a pending item from a collection expunges it from the session."""

        mapper(Address, addresses)
        mapper(User, users, properties=dict(
            addresses=relation(Address, cascade="all,delete-orphan", backref="user")
        ))
        s = create_session()

        u = User()
        s.add(u)
        s.flush()
        a = Address()

        u.addresses.append(a)
        assert a in s

        u.addresses.remove(a)
        assert a not in s

        s.delete(u)
        s.flush()

        assert a.address_id is None, "Error: address should not be persistent"

    @testing.resolve_artifact_names
    def test_nonorphans_ok(self):
        mapper(Address, addresses)
        mapper(User, users, properties=dict(
            addresses=relation(Address, cascade="all,delete", backref="user")
        ))
        s = create_session()
        u = User(name='u1', addresses=[Address(email_address='ad1')])
        s.add(u)
        a1 = u.addresses[0]
        u.addresses.remove(a1)
        assert a1 in s
        s.flush()
        s.expunge_all()
        eq_(s.query(Address).all(), [Address(email_address='ad1')])

class UnsavedOrphansTest2(_base.MappedTest):
    """same test as UnsavedOrphans only three levels deep"""

    @classmethod
    def define_tables(cls, meta):
        Table('orders', meta,
            Column('id', Integer, primary_key=True, test_needs_autoincrement=True),
            Column('name', String(50)))

        Table('items', meta,
            Column('id', Integer, primary_key=True, test_needs_autoincrement=True),
            Column('order_id', Integer, ForeignKey('orders.id'),
                   nullable=False),
            Column('name', String(50)))

        Table('attributes', meta,
            Column('id', Integer, primary_key=True, test_needs_autoincrement=True),
            Column('item_id', Integer, ForeignKey('items.id'),
                   nullable=False),
            Column('name', String(50)))

    @testing.resolve_artifact_names
    def test_pending_expunge(self):
        class Order(_fixtures.Base):
            pass
        class Item(_fixtures.Base):
            pass
        class Attribute(_fixtures.Base):
            pass

        mapper(Attribute, attributes)
        mapper(Item, items, properties=dict(
            attributes=relation(Attribute, cascade="all,delete-orphan", backref="item")
        ))
        mapper(Order, orders, properties=dict(
            items=relation(Item, cascade="all,delete-orphan", backref="order")
        ))

        s = create_session()
        order = Order(name="order1")
        s.add(order)

        attr = Attribute(name="attr1")
        item = Item(name="item1", attributes=[attr])

        order.items.append(item)
        order.items.remove(item)

        assert item not in s
        assert attr not in s

        s.flush()
        assert orders.count().scalar() == 1
        assert items.count().scalar() == 0
        assert attributes.count().scalar() == 0

class UnsavedOrphansTest3(_base.MappedTest):
    """test not expunging double parents"""

    @classmethod
    def define_tables(cls, meta):
        Table('sales_reps', meta,
            Column('sales_rep_id', Integer,primary_key=True, test_needs_autoincrement=True),
            Column('name', String(50)))
        Table('accounts', meta,
            Column('account_id', Integer,primary_key=True, test_needs_autoincrement=True),
            Column('balance', Integer))
        Table('customers', meta,
            Column('customer_id', Integer,primary_key=True, test_needs_autoincrement=True),
            Column('name', String(50)),
            Column('sales_rep_id', Integer,
                   ForeignKey('sales_reps.sales_rep_id')),
            Column('account_id', Integer,
                   ForeignKey('accounts.account_id')))

    @testing.resolve_artifact_names
    def test_double_parent_expunge_o2m(self):
        """test the delete-orphan uow event for multiple delete-orphan parent relations."""

        class Customer(_fixtures.Base):
            pass
        class Account(_fixtures.Base):
            pass
        class SalesRep(_fixtures.Base):
            pass

        mapper(Customer, customers)
        mapper(Account, accounts, properties=dict(
            customers=relation(Customer,
                               cascade="all,delete-orphan",
                               backref="account")))
        mapper(SalesRep, sales_reps, properties=dict(
            customers=relation(Customer,
                               cascade="all,delete-orphan",
                               backref="sales_rep")))
        s = create_session()

        a = Account(balance=0)
        sr = SalesRep(name="John")
        s.add_all((a, sr))
        s.flush()

        c = Customer(name="Jane")

        a.customers.append(c)
        sr.customers.append(c)
        assert c in s

        a.customers.remove(c)
        assert c in s, "Should not expunge customer yet, still has one parent"

        sr.customers.remove(c)
        assert c not in s, "Should expunge customer when both parents are gone"

    @testing.resolve_artifact_names
    def test_double_parent_expunge_o2o(self):
        """test the delete-orphan uow event for multiple delete-orphan parent relations."""

        class Customer(_fixtures.Base):
            pass
        class Account(_fixtures.Base):
            pass
        class SalesRep(_fixtures.Base):
            pass

        mapper(Customer, customers)
        mapper(Account, accounts, properties=dict(
            customer=relation(Customer,
                               cascade="all,delete-orphan",
                               backref="account", uselist=False)))
        mapper(SalesRep, sales_reps, properties=dict(
            customer=relation(Customer,
                               cascade="all,delete-orphan",
                               backref="sales_rep", uselist=False)))
        s = create_session()

        a = Account(balance=0)
        sr = SalesRep(name="John")
        s.add_all((a, sr))
        s.flush()

        c = Customer(name="Jane")

        a.customer = c
        sr.customer = c
        assert c in s

        a.customer = None
        assert c in s, "Should not expunge customer yet, still has one parent"

        sr.customer = None
        assert c not in s, "Should expunge customer when both parents are gone"

class DoubleParentOrphanTest(_base.MappedTest):
    """test orphan detection for an entity with two parent relations"""

    @classmethod
    def define_tables(cls, metadata):
        Table('addresses', metadata,
            Column('address_id', Integer, primary_key=True, test_needs_autoincrement=True),
            Column('street', String(30)),
        )

        Table('homes', metadata,
            Column('home_id', Integer, primary_key=True, key="id", test_needs_autoincrement=True),
            Column('description', String(30)),
            Column('address_id', Integer, ForeignKey('addresses.address_id'),
                   nullable=False),
        )

        Table('businesses', metadata,
            Column('business_id', Integer, primary_key=True, key="id", test_needs_autoincrement=True),
            Column('description', String(30), key="description"),
            Column('address_id', Integer, ForeignKey('addresses.address_id'),
                   nullable=False),
        )

    @testing.resolve_artifact_names
    def test_non_orphan(self):
        """test that an entity can have two parent delete-orphan cascades, and persists normally."""

        class Address(_fixtures.Base):
            pass
        class Home(_fixtures.Base):
            pass
        class Business(_fixtures.Base):
            pass

        mapper(Address, addresses)
        mapper(Home, homes, properties={'address':relation(Address, cascade="all,delete-orphan", single_parent=True)})
        mapper(Business, businesses, properties={'address':relation(Address, cascade="all,delete-orphan", single_parent=True)})

        session = create_session()
        h1 = Home(description='home1', address=Address(street='address1'))
        b1 = Business(description='business1', address=Address(street='address2'))
        session.add_all((h1,b1))
        session.flush()
        session.expunge_all()

        eq_(session.query(Home).get(h1.id), Home(description='home1', address=Address(street='address1')))
        eq_(session.query(Business).get(b1.id), Business(description='business1', address=Address(street='address2')))

    @testing.resolve_artifact_names
    def test_orphan(self):
        """test that an entity can have two parent delete-orphan cascades, and is detected as an orphan
        when saved without a parent."""

        class Address(_fixtures.Base):
            pass
        class Home(_fixtures.Base):
            pass
        class Business(_fixtures.Base):
            pass

        mapper(Address, addresses)
        mapper(Home, homes, properties={'address':relation(Address, cascade="all,delete-orphan", single_parent=True)})
        mapper(Business, businesses, properties={'address':relation(Address, cascade="all,delete-orphan", single_parent=True)})

        session = create_session()
        a1 = Address()
        session.add(a1)
        try:
            session.flush()
            assert False
        except orm_exc.FlushError, e:
            assert True

class CollectionAssignmentOrphanTest(_base.MappedTest):
    @classmethod
    def define_tables(cls, metadata):
        Table('table_a', metadata,
              Column('id', Integer, primary_key=True, test_needs_autoincrement=True),
              Column('name', String(30)))
        Table('table_b', metadata,
              Column('id', Integer, primary_key=True, test_needs_autoincrement=True),
              Column('name', String(30)),
              Column('a_id', Integer, ForeignKey('table_a.id')))

    @testing.resolve_artifact_names
    def test_basic(self):
        class A(_fixtures.Base):
            pass
        class B(_fixtures.Base):
            pass

        mapper(A, table_a, properties={
            'bs':relation(B, cascade="all, delete-orphan")
            })
        mapper(B, table_b)

        a1 = A(name='a1', bs=[B(name='b1'), B(name='b2'), B(name='b3')])

        sess = create_session()
        sess.add(a1)
        sess.flush()

        sess.expunge_all()

        eq_(sess.query(A).get(a1.id),
            A(name='a1', bs=[B(name='b1'), B(name='b2'), B(name='b3')]))

        a1 = sess.query(A).get(a1.id)
        assert not class_mapper(B)._is_orphan(
            attributes.instance_state(a1.bs[0]))
        a1.bs[0].foo='b2modified'
        a1.bs[1].foo='b3modified'
        sess.flush()

        sess.expunge_all()
        eq_(sess.query(A).get(a1.id),
            A(name='a1', bs=[B(name='b1'), B(name='b2'), B(name='b3')]))

class PartialFlushTest(_base.MappedTest):
    """test cascade behavior as it relates to object lists passed to flush().

    """
    @classmethod
    def define_tables(cls, metadata):
        Table("base", metadata,
            Column("id", Integer, primary_key=True, test_needs_autoincrement=True),
            Column("descr", String(50))
        )

        Table("noninh_child", metadata,
            Column('id', Integer, primary_key=True, test_needs_autoincrement=True),
            Column('base_id', Integer, ForeignKey('base.id'))
        )

        Table("parent", metadata,
            Column("id", Integer, ForeignKey("base.id"), primary_key=True)
        )
        Table("inh_child", metadata,
            Column("id", Integer, ForeignKey("base.id"), primary_key=True),
            Column("parent_id", Integer, ForeignKey("parent.id"))
        )

    @testing.uses_deprecated()
    @testing.resolve_artifact_names
    def test_o2m_m2o(self):
        class Base(_base.ComparableEntity):
            pass
        class Child(_base.ComparableEntity):
            pass

        mapper(Base, base, properties={
            'children':relation(Child, backref='parent')
        })
        mapper(Child, noninh_child)

        sess = create_session()

        c1, c2 = Child(), Child()
        b1 = Base(descr='b1', children=[c1, c2])
        sess.add(b1)

        assert c1 in sess.new
        assert c2 in sess.new
        sess.flush([b1])

        # c1, c2 get cascaded into the session on o2m.
        # not sure if this is how I like this
        # to work but that's how it works for now.
        assert c1 in sess and c1 not in sess.new
        assert c2 in sess and c2 not in sess.new
        assert b1 in sess and b1 not in sess.new

        sess = create_session()
        c1, c2 = Child(), Child()
        b1 = Base(descr='b1', children=[c1, c2])
        sess.add(b1)
        sess.flush([c1])
        # m2o, otoh, doesn't cascade up the other way.
        assert c1 in sess and c1 not in sess.new
        assert c2 in sess and c2 in sess.new
        assert b1 in sess and b1 in sess.new

        sess = create_session()
        c1, c2 = Child(), Child()
        b1 = Base(descr='b1', children=[c1, c2])
        sess.add(b1)
        sess.flush([c1, c2])
        # m2o, otoh, doesn't cascade up the other way.
        assert c1 in sess and c1 not in sess.new
        assert c2 in sess and c2 not in sess.new
        assert b1 in sess and b1 in sess.new

    @testing.uses_deprecated()
    @testing.resolve_artifact_names
    def test_circular_sort(self):
        """test ticket 1306"""

        class Base(_base.ComparableEntity):
            pass
        class Parent(Base):
            pass
        class Child(Base):
            pass

        mapper(Base,base)

        mapper(Child, inh_child,
            inherits=Base,
            properties={'parent': relation(
                Parent,
                backref='children',
                primaryjoin=inh_child.c.parent_id == parent.c.id
            )}
        )

        mapper(Parent,parent, inherits=Base)

        sess = create_session()
        p1 = Parent()

        c1, c2, c3 = Child(), Child(), Child()
        p1.children = [c1, c2, c3]
        sess.add(p1)

        sess.flush([c1])
        assert p1 in sess.new
        assert c1 not in sess.new
        assert c2 in sess.new

redpajama_set_name: RedPajamaGithub


7 PM, MARCH 27. RABBI RACHEL SHERE AND HAZZAN DANIEL GROSS CO-LEAD A PRE-PESACH HEALING SERVICE, AN OPPORTUNITY TO SHARE PERSONAL PRAYERS WITH OTHERS IN A SAFE AND LOVING ENVIRONMENT. AT ADAT SHALOM, FARMINGTON HILLS. FREE. INFO: 248-851-5100.


Why a draw bridge if there is stone on both sides? How do you get under it with a boat?
I see pasture and possibly barns in the distance, so if I had to guess, I'd say it's to keep the animals from going across?


text:
JAY clinic keeps costs down, comfort level up
Health care site opens in Rochester
By Jeffrey Pieters
jpieters@postbulletin.com
Bigger is not always the better consumer choice, which is why Sandra Anderson of Rochester went not to a traditional doctor's office but to her city's new walk-in clinic, the JAY Clinic, for a recent cholesterol test.
For $40 — or less than one-half of the cost for which some larger providers offer the service — Anderson had her results in one day. She picked them up and walked out of the office smiling.
"It's an easy, simple way of doing it (receiving health care)," she said.
Anderson has visited similar kinds of walk-in clinics before, on visits to the Phoenix area. But for those whose eyes and ears have been tended to only in larger, more specialized centers, the JAY Clinic, a two-month-old, one-man shop headed by nurse practitioner Jay Fotland, might look and sound strange.
After all, it's among the first of its kind in Rochester. But there are several dozen similar clinics in locations scattered around the Twin Cities — many of them in grocery or department stores — and hundreds more nationwide.
Those clinics, like Fotland's, offer immediate, appointment-free care for a variety of common ailments — everything from sore throats and the flu to burns and rashes to annual physicals.
Set against the specialization of our age, these simple clinics are in essence refilling the role of the traveling country doctor, a generalist equipped with a stethoscope and whatever other tools might fit in his black satchel.
In fact, it's the image of the "small-town clinic" that Fotland says he hopes to re-create for visitors to his office, at 3257 19th St. N.W. , in the Highlands office park, one block west of the Rochester Athletic Club.
"I think people need to come in and feel comfortable, and know that we really do care about them," Fotland said.
Every inch of the clinic, which Fotland co-owns and manages with his wife, Deb, seems to have been planned with patient comfort — even enjoyment — in mind. It starts with the spacious, tasteful lobby and extends even beyond the four patient examination rooms, outside of which Fotland spread corn kernels to attract wildlife, for patients' visual interest.
The service-first approach is summed up in the clinic's name, which on one hand is a first-name reference to Fotland, a salt-and-pepper-haired 51-year-old who's seen patients at Mayo Clinic and Olmsted Medical Center for the last 14 years. It's also partly an acronym, standing for "Just About You."
From his experiences, Fotland said, he saw the need for a local clinic that's convenient, affordable and service-oriented.
Getting seen at JAY Clinic is a snap. Stop in, and chances are good you can be seen right away. Or call ahead, just to be sure.
It's a short walk — just 20 steps or so — from your car to the receptionist's desk, and only another dozen steps from there to the nearest exam room.
Thanks to low overhead costs, JAY Clinic's prices are one-third to one-half the prevailing rates charged by traditional medical clinics, Fotland said. Most insurance companies are willing to reimburse for those bills, but Fotland relies on the patients themselves to submit the paperwork. It's part of holding down overhead.
"The hardest thing to do was just keep is as simple as we can," Fotland said. "Try to keep insurance companies out, government out, and just allow us to have the patient decide how much they want to spend and where they want to go."
"I've always been sensitive about the cost of health care, and that's one of the reasons why I'm doing it," he said.


text:
Old Country Store, Longmeadow, Mass
June 16, 2019 by Derek Strahan
The Old Country Store at 776 Longmeadow Street, near the corner of Williams Street in Longmeadow, on October 14, 1912. Image courtesy of the Longmeadow Historical Society.
This building was constructed around 1805, and was originally owned by Calvin Burt, who operated a general store out of the first floor. The post office was also located here for many years, and the building housed a variety of retail occupants throughout the 19th century. These included William White, who had a gold and silver thimble shop here from 1839 to 1848, in addition to his duties as a postmaster. He was succeeded by button manufacturer Dimond Chandler, whose factory was located here in a part of the building that has since been demolished. Chandler went into business with his son-in-law, Nelson C. Newell, an Nelson's brother Samuel, and the two carried on the business after Chandler's retirement in 1855. They would subsequently relocate to Springfield in 1864, opening a large factory on Howard Street.
The store was later used as a spectacle shop, but by the end of the 19th century it had again reverted to a general store, run by Charles Allen. He died in 1909, and by 1911 the store had been sold to Charles L. Wood, whose shop is visible in the first photo.The sign above the door advertises for "Meat and Groceries" and "Fish and Oysters," and there is an assortment of fresh fruits and vegetables visible in the window on the left side. To the right of the door is a large display for "Pillsbury's Best Flour," which was "Made from selected hard wheat," and "never disappoints." On the left side of the building, just beyond the mailbox, is a bulletin board with a number of flyers, including one that reads "$20 reward," although the rest of this flyer, including the details of the reward, is unreadable from this distance.
The business would be owned by several more merchants during the first half of the 20th century, and remained as a general store until 1964, when it became a women's clothing store called The Separate Shop. The building now houses the Spa on the Green, but it has seen very few exterior changes since the first photo was taken more than 100 years ago. It survives as a rare, well-preserved early 19th century commercial building, and it is a contributing property in the Longmeadow Historic District, which was added to the National Register of Historic Places in 1982.
Categories Commercial Buildings, Longmeadow Massachusetts, Massachusetts, Paesiello Emerson Tags National Register of Historic Places
Old Town Hall, Enfield, Connecticut
Brewer-Young Mansion, Longmeadow, Mass
1 thought on "Old Country Store, Longmeadow, Mass"
Paige Price Mitchell
Hello,. You mention Charles Wood, but not Mr. Steele. When I was a little kid growing up in Long meadow (1948 – 1971) we always got our penny candy at "Wood & Steele".


text:
En båtlänning (av land, landning), eller kås i södra Sverige, är en förtöjnings- eller uppdragsplats för mindre båtar. Vid stränder består angöringsplatsen av en grävd ränna förstärkta av två parallella stenvallar lagda i en rät vinkel ut från stranden. Vid stränder som saknar lämplig sten används ofta grova stockar lagda i liknande vinkel. Även stolpar slås ned i botten för att förtöja båten eller båtarna.

Det vanliga ortnamnet Länna antas betyda att där i gångna tider funnits en båtlänning. Några kustsamhällen har namnet efter kås, till exempel Kåseberga, Abbekås.

Se även
Brygga

Hamnar
Sjöfartsanläggningar

redpajama_set_name: RedPajamaWikipedia


text:
Second-hand Hire Purchase (HP) finance
Want to own your car once you've made all the monthly payments - but with the lowest possible instalments? Check out used car Hire Purchase
BuyaCar team
If you're planning to buy a used car on finance, then you're in good company. Millions of drivers have chosen to take out car finance over the last few years alone, with more than 90% of new cars now being financed, along with a rapidly increasing proportion of used cars.
Drivers are using finance to afford newer and safer models, with cleaner emissions and more modern technology. Brand new cars may have high prices and, as a result, high monthly payments, but that needn't be the case if you look at nearly-new or used cars.
Cars available with finance
Many of these cars are financed using Hire Purchase (HP), which is available on virtually any car, and sees you own the car outright one you've made all the monthly payments. Alternatively, Personal Contract Purchase (PCP) comes with lower monthly payments - as these only cover part of the car's value - and the option to return the car at the end of the agreement. If you want to own the car, however, remember that you'll have to make the large optional final payment to be able to keep the keys.
Scroll down for more information on buying a second-hand car with Hire Purchase, or watch our video guide to get a feel for whether Hire Purchase is for you.
Hire Purchase finance
Video of Hire Purchase: What is HP?
Hire Purchase finance splits the cost of a car into equal monthly instalments. Contracts typically last for between two and four years and once you've made the final monthly payment, you'll own the vehicle.
Most buyers put down a deposit, although a no-deposit option is often available. Be aware, though, that the higher the deposit you put down, the lower your monthly payments will be and the less interest you'll pay - as you're borrowing less. Also bear in mind that the deposit goes towards paying off the car, so don't expect it to be returned at the end of the contract.
How HP finance works
1. Deposit & delivery
A deposit reduces the amount owed. A no-deposit option may be available
2. Monthly payments
Pay for the rest of the car with fixed monthly instalments
3. You own the car
Once the final payment is made, the car is yours
HP finance pros and cons
✔ Spreading the cost of your car
✔ No mileage restriction
✔ Available for most vehicles
✔ No-deposit option
Not so good for
✘ Cheapest monthly payments
✘ Regular car upgrades
✘ Flexibility - you own the car at the end
✘ Protection against the car dropping in value
Car deals under £200 per month
Hire Purchase or PCP?
Personal Contract Purchase (PCP) finance offers more flexibility and lower monthly payments than HP. That's because monthly payments only cover part of the car's cost, leaving you with the option to return the car or buy it at the end by making the optional final payment.
Low monthly payments and flexibility have made PCP the most popular type of car finance, but it's not the best option for everyone. We've highlighted some of the key differences below.
Monthly payments with PCP finance are lower than with Hire Purchase because they don't cover the full cost of the car. This can enable you to drive a newer and more expensive vehicle but will mean that you don't own the car at the end unless you make a further large payment at the end.
Both types of finance usually allow you to adjust your deposit and agreement length - which have an impact on your monthly payments - to enable you to find a combination that suits you.
However, PCP is far more flexible at the end of the agreement, with the ability to return the car and walk away, trade it in for another or buy it for an additional pre-agreed sum, which can be refinanced.
If the car is worth more than the cost of buying it at this stage, then you can trade it in and use the difference to put towards the deposit on another vehicle.
If you take out PCP finance and then return the car at the end, you'll have spent less than paying for a car outright - although you'll have nothing to show for what you have paid, as you have effectively rented the car. Make the optional final payment to buy the car and you'll have paid more overall than with an equivalent Hire Purcase deal, though (assuming the same deposit and contract length), as you're paying off the amount owed more slowly, meaning more interest is charged.
Hire Purchase's higher monthly payments mean that you clear your debt more quickly than with PCP, where you continue to owe (and pay interest on) the large optional final payment until the very end of the agreement.
So if you do want to own your car at the end of the agreement, Hire Purchase is likely to be a cheaper option.
Car age
Both HP and PCP car finance are available for new and used cars. While PCP is normally only available on cars up to around five years old, however, Hire Purchase is available on older cars as well.
Once a car is more than five years old, it becomes difficult to establish its likely future value, so PCP becomes less common. Hire Purchase continues to be available for these older cars, though.
PCP monthly payments add up to the amount that a car is expected to lose over the course of the arrangement. You'll then have the option of making the final payment to own the car. This means that for the lowest monthly payments opting for a used car and paying for it with PCP should get you the lowest possible monthly payments.
Future value guarantee
One major advantage of PCP finance is that you're protected even if the value of the car you're driving drops dramatically.
That's because its future value is estimated at the start of the agreement and used to calculate your monthly payments. This is known as the optional final payment, the balloon payment or the 'Guaranteed Minimum Future Value' (GMFV).
No matter what happens in the used car market, you can return the car at the end of the agreement. If the car is worth less than the GMFV, then the finance company will lose out, not you.
If the car is worth more than the optional final payment at the end of the contract, you don't have to forfeit this surplus: by trading the car in or selling it yourself - with the agreement of the lender, since you don't own the car unless you make the optional final payment - you can use the difference towards the deposit on your next car.
Search all car deals
Buying a car on finance
Best new cars for under £200 per month
Cheapest SUVs
Latest car buying advice
Plug-in hybrid (PHEV) vs hybrid power: which is best for me?
Should I buy a new car?
Buying a car without driving it


text:
Q: How to properly upload multiple attachments to sharepoint using pnpjs? I need the users to be able to upload attachments. then i need to display the attachment so it can be selected and viewed.
sometimes there may only be a single attachment. sometimes multiple.
file type can be .xlsx,.xls,.doc, .docx,.ppt, .pptx,.txt,.pdf,.png, .jpg, .jpeg,.gif, .msg

right now im using this line of code in our react/typescript project
faqList.items.getById(addedFaq.data.Id).attachmentFiles.add(attachmentFiles![i].name, 'File added')

it currently uploads a single file (and i need to be able to upload multiple files).
and when the file is retrieved and opened. it displays "File added". which is the text added at the end of the code snippet above.
So Im doing something wrong.
So can someone write an example of the proper code needed to upload multiple attachments to a sharepoint list and to retrieve those attachments without them being overwritten?
UPDATE:
in the the documentation PNPJS ATTACHMENT DOCS
In the example to add an attachment they use the following code
await item.attachmentFiles.add("file2.txt", "Here is my content");

But what is "Here is my content", what does that represent?


Arrive Beijing at 3:40pm via AC29, upon arrival in Beijing, you are met by our friendly tour guide and transferred to Qianmen Jianguo Hotel (or similar).
Fly to Xi'an, the ancient capital city in China, upon arrival, transfer to Bell Tower Hotel (or similar).
Join full day seat-in coach tour to the Museum of Terra Cotta Warriors, Banpo Neolithic Museum, Huaqing Imperial Hot Spring and the Big Wild Goose Pagoda with lunch.
Take a morning flight to the Holy City of Lhasa (if there is no direct flight, connect flight in Chengdu), upon arrival at Lhasa Gong Gar Airport, You will be greeted by your Tibetan tour guide and drive two hours to Lhasa City. Check into Lhasa Hotel (Former Holiday Inn, 4 star, the best available). Remainder of the day is at leisure to rest and adjust the high altitude.
Today's excursion features the renovated Potala Palace, which rises majestically from the face of sacred Putuo Hill, the Norbulingka Palace, which was the Summer Palace of Tibetan Kings, and the Sera Monastery.
Today's sightseeing begins with the 7th century Jokhang Monastery, one of the holiest shrines in Tibet, then continue on the cliff top Drepung Monastery. In the afternoon, visit a Tibetan clinic and famous Eight-Corner Street to get a glimpse of daily Tibetan life.
Fly to Beijing, (connect flight in Chengdu if there is no direct flight), transfer to Qianmen Jianguo Hotel, get ready for your Great Wall Hiking adventure.
Drive to Huangyaguan and check into Huanyaguan Great Wall Hotel at the foot of the Wall. Hike along the wall from Taipingzhai to the base area. The Great Wall at Huangya Pass acquired its name from the yellow cliffs into which it was built. Built across the Ju River in Jixian County, the pass and its round guardhouse, Phoenix Tower, have an imposing look. The most unique feature here is the Street of the Eight Diagrams, an architectural wonder of the Ming Dynasty lying just below the pass. A labyrinth meant to confuse and entrap invading armies, this fortification's design is based on the ancient trigrams of the Book of Changes. Lunch at a local restaurant. Afternoon free or hike along the west wing of the Wall. Optional visit to the Great Wall Museum. Dinner at the hotel.
Check out of your hotel after breakfast, then drive to the Great Wall at Simatai. Here the wall travels along the ridges of high mountains and, at certain points, along cliffs formed by huge rocks, where builders were able to create an impregnable wall by merely piling up a few layers of bricks. Hike from Simatai to Jinshanling with lunchbox enroute (approximately 4 hours), and then check into the Jinshanling Hotel. The Jinshanling section is virtually a museum of the architectural styles of Ming-era towers. As many as 67 are found within a distance of only 10 kms. The towers are built in a surprising variety of shapes, the largest of which is the impressive "Storehouse Tower", so named because of the storehouse on its southern terrace. This tower was used as a garrison headquarters and is protected by special defensive barriers and an extra wall 60 meters downhill.
Full day walk along the Great Wall at Huanghuacheng (Yellow Flower Fortress). Here the Wall clings to a high hillside adjacent to a reservoir. Lunch box provided. Dinner at Dayi Friendship Restaurant. Overnight Zhongshang Hotel.
Full day walk along the Juyongguan Great Wall. Juyong Pass is site of an ancient citadel (or pass town in Chinese). The town is replete with military installations, watch towers, official residences, temples, a confucian school and other structures. The Juyong Pass has been known for its strategic importance for more than 2,000 years. Lunch box provided or lunch at Dayi Friendship Restaurant. Drive back to Beijing in the afternoon and check into Qianmen Jianguo Hotel (or similar).
Have a day free to explore on your own, or arrange an optional sightseeing tour to some of Beijing's cultural attractions. Gala Peking Duck Dinner at famous Quanjude Restaurant.
Private drive from Beijing to Tianjin Xingang Pier and board your cruise ship.
The best times for hiking along the Great Wall are April, May, early June, September, October, and early November. Not recommended during the bitter cold of winter or the sweltering heat of summer. Your hiking tour along the Great Wall includes English-speaking guide(s), transfers to and from the airport, hotel accommodations as listed, transportation for yourself and one piece of luggage between sections of the Great Wall, meals as listed, 2 bottles of drinking water during the hikes, admission fees and Beijing Duck dinner.


text:
The Manifestos – for broadband, a case of steady as you go
Matthew Evans2015-04-16T09:45:50+00:00
With just over 20 days to go until the next General Election, the main political parties have now published their manifestos and whilst the result is still up for grabs it looks like policy on digital connectivity is pretty settled.
In various forms, the Conservatives, Labour and the Liberal Democrats all pledged to continue and expand the current BDUK programme in order to drive superfast broadband to near universal levels.
All three also made commitments to continuing to improve both the digital skill level of the workforce and also tackle the digital exclusion although again, this seemed to be continuing rather than deviating from current Government policy.
The Conservatives, unsurprisingly, also outlined their ambition that "ultrafast broadband should be available to nearly all UK premises as soon as practicable??? – which mirrors the recently published Digital Communications Infrastructure Strategy.
Both they and Labour also pledged to work with the mobile phone operators to expand coverage and address mobile not-spots, with Labour interestingly raising the issue of market failure – a necessary step for State Aid approval.
The Liberal Democrats devoted a whole section to the creation of a Digital Bill of Rights, picking up on calls from people such as Tim Berners-Lee, in which they would look to enshrine the right for people to control their own data. They would look to place stronger controls on public bodies accessing and storing an individual's data including in the context of counter-terrorism surveillance, whilst the Conservatives would push for the creation of Extremism Disruption Orders which may stop some people from communicating via social media.
However, all in all it seems that the general direction is to push for steady improvements in connectivity and building on the current policy position – both fixed and mobile – rather than a radical departure.
This means that the main drivers of any change may come from the EU and Ofcom. The European Commission is set to announce its strategy to deliver a Digital Single Market, which is likely to include a review of the framework for electronic communications and potential policy changes in the areas of spectrum and competition. Ofcom's recently announced a major review of UK's digital communications which will focus on issues related to incentives for efficient private sector investments and competition could also lead to significant remedies.
Matthew is CEO of the BSG having joined the organisation as Policy Manager in April 2014. Matthew joined the BSG from Arqiva's public policy team where he worked for over two years across the broadcast and telecoms markets. Before that he was a researcher for an MP at Westminster.


text:
Kurna – wieś w Estonii w prowincji Virumaa Zachodnia, w gminie Viru-Nagula. Zamieszkana przez 15 osób (31 grudnia 2011).

Przypisy

Miejscowości w gminie Viru-Nigula


text:
U.S. Lawmakers Seek Kushner Company Records on Maryland Apartments
Democrats from the state's congressional delegation say articles by ProPublica, The New York Times Magazine and The Baltimore Sun raise "very serious and troubling concerns" about whether Kushner's businesses comply with federal housing standards.
by Alec MacGillis
Aug. 18, 2017, 5:54 p.m. EDT
Morningside Park, a Kushner Companies-owned housing complex, in Middle River, Maryland (Philip Montgomery for The New York Times)
Maryland's two U.S. senators and four of its U.S. House representatives, all Democrats, sent a letter today to the large real-estate company owned by the family of Jared Kushner, President Donald Trump's son-in-law and senior adviser, demanding information about the company's management of 17 apartment complexes it owns in the state.
The letter to Kushner Companies came in response to a May 23 article co-published by ProPublica and The New York Times Magazine investigating management practices at the rental complexes, most of which are in the suburbs of Baltimore, as well as an article this week in The Baltimore Sun that revealed additional details.
The original story described the highly aggressive legal tactics that Kushner Companies has used to pursue tenants who owed back rent or had left their leases early — even tenants who left the complexes well before the company bought them in 2012 and the years following. In many of the hundreds of cases brought by the company, it pursued tenants in court for years, with late fees and court fees expanding the claims to amounts far above what was initially owed.
The article reported several instances in which the company sought payment even when tenants were able to provide proof that they had followed the terms of the lease. The article also described the shoddy upkeep of many of the complexes' roughly 9,000 units, where problems such as ceiling leaks, mice and mold are rampant.
The Sun article this week reported that in 105 instances, the company went so far as to seek the civil arrests of tenants who failed to appear in court to address allegations of unpaid debt — more than any other landlord in the state over the same period. Court records show that 20 former Kushner tenants were in fact detained, the paper reported. The paper also disclosed just how dependent the company's complexes are on federal housing vouchers for rental revenue. While many of the complexes' tenants pay their own rent, the paper determined that at three of the complexes alone, the company has received $6.1 million in federal rental subsidies since Jan. 1, 2015.
In their letter, Maryland Sens. Chris Van Hollen and Ben Cardin and the four congressmen — Elijah Cummings (the ranking Democratic on the House Government Oversight Committee), Dutch Ruppersberger, John Sarbanes and Anthony Brown — note that the company's reliance on subsidies from the Housing Choice program (Section 8) obliges it to follow Department of Housing and Urban Development rules. Under Housing Choice, each "dwelling unit must pass the program's housing quality standards and be maintained up to those standards as long as the owner receives housing assistance payments." The rules specify that each "dwelling unit and its equipment must be in sanitary condition" and "must be free of vermin and rodent infestation."
"If [the news reports] are accurate," the six members of Congress wrote, "they raise very serious and troubling concerns about whether Kushner Companies and its subsidiaries are complying with HUD's housing quality standards to ensure the safety and health of their own tenants." The letter also cites from ProPublica's report that the complexes require tenants to go to a Walmart or Ace Cash Express outlet every month if they want to pay their rent by money order, a process that comes with an extra fee.
The letter asks the company to turn over by Sept. 8 copies of any housing assistance contracts it holds with HUD or any public housing authority in the state; the standard lease agreements for all its complexes in the state; all notifications from HUD, public housing authorities, inspection companies or local jurisdictions identifying defects in the complexes in the past three years; all complaints from residents about maintenance and repair issues over the past three years; any notifications about elevated blood lead levels affecting any tenants; and any agreements with vendors regarding the fees that residents get charged to pay their rent by money order.
The letter also seeks information regarding the role played by Jared Kushner, who was instrumental in purchasing the complexes but stepped down as the company's CEO when he took on his senior role in the White House. Kushner retains his ownership stake in the partnerships that hold the complexes, and has, according to the White House, recused himself from any discussions around Section 8, which is targeted for cuts in Trump's proposed budget.
The letter seeks all communications between the company and the White House, "including but not limited to communications regarding the management and resolution of Jared Kushner's conflicts of interest," all documents describing the company's policies to manage conflicts of interest involving Kushner, and all communications between him and the company since the inauguration.
In a written statement, the company did not say whether it would provide the requested materials.
"We are in compliance with the requirements of the Federal Housing Choice Program," said its general counsel, Emily Wolf. "We exercise our legal rights under the relevant provisions of Maryland law only as a last resort after all other reasonable attempts to collect rent payments are unsuccessful."
Do you have access to information about the Trump family's business dealings that should be public? Email [email protected], or here's how to send tips and documents to ProPublica securely.
For more coverage, read ProPublica's previous reporting on the Trump administration.
Alec MacGillis
Alec MacGillis covers politics and government for ProPublica.
@AlecMacGillis


Originally American University students but has since expanded to a far more general audience - an estimated 500M users as of July 2010.
Sub-organised by geographical or institutional networks: 'friends' share photos, videos, links, and events and chat via a customisable profile page. Users can also join groups and 'like' pages (e.g. celebrities, products, businesses). Most popular social network – originally designed for American colleges but has since expanded. Increasingly used to market businesses and products.