Mobility is the trend nowadays, and everything is becoming portable. There are the likes of portable software which we can access and use even without installation, portable laptop which we can carry around everywhere we go, portable players of MP3, CD, DVD and so much more. In this world of convenience, we can also manage to have portable kitchens which are suitable for those who are constantly on the move. In this article, we will learn about five unique designs of a mobile kitchen that you can do yourself.
The Compact Kitchen Why this is called as such is because this portable kitchen is a dining area and a storage area plus kitchen in one. This is especially helpful to people living in a small unit of condo or apartment with limited space. The compact kitchen involves a square or rectangular area where a kitchen counter can be transformed into a dining table and they can be folded back when necessary to store cutlery. This design is most appropriate for bachelors and single people who do not have a lot of guests coming to their homes to party. This type of kitchen is easy to set up and to serve food for quick, sit-down meals and buffet-style meals.
The Innovative Kitchen Composed of all innovative things, this portable kitchen consists of a foldable table where the handy electric stove can be placed, a warming plate, and dishwasher. Below it can be a mini fridge with a microwave on top. Saving space, this fully-functional kitchen can offer you enough room for cooking and storing kitchen utensils. You can even add counter tops that can be opened and closed with the use of a remote control. With the sink attached to the stove, you can make the cleaning process hassle-free.
Racks There's a popular steak restaurant called "Racks," but this is not the same with the one you can make in your home. "Racks" is what you can name your portable kitchen if you plan to create it using removable racks that can pose as shelves on your wall (instead of cabinets that take up a lot of space). This is where you can hang all the utensils and display the plates. You can also leave the racks plainly standing there to serve as interior design. This is a smart design for people who do not know how to keep their kitchen organized.
The Cart Kitchen We have all grown familiar with food carts in the streets. Why not copy the idea and boast it among your friends? By having a portable cart that houses a burner, small electric stove and simple kitchen materials, you can already cook favorite meals and express your culinary skills without any much hindrance.
This will not be conventional kitchen, but this cart kitchen style can nonetheless accommodate your needs. Because you can move around the electric appliances for cooking and the cart has wheels, you can even take the cart kitchen to any outdoor space and spend time with your family while pretending you're on a vacation out of town like camping in your own garden. You can also bring the cart kitchen to your garage area and grill meat and create delicious barbecue there. Use the recycle bins and composting bins for seating.
Kitchen in the Car Who says kitchens should only be placed in a house? When it comes to designing your portable kitchen, there are no rules to live by. If you are a traveler, you can create a mobile kitchen in your car. This can be made possible if you have a truck or SUV that has ample space to carry the structure. What you will need are hardy and stable items and storage for food items. The walls of the vehicle can serve multiple purposes such as shelves of the pantry or trays.
Notes All these ideas are primarily dictated by the minimal space you have. You also have to take note and plan according to your budget and layout of your house and car. Think good ergonomics and prepare a detailed list of all the things you will need to create this moveable kitchen. Choose to use light and mobile pieces of equipment and say no to bulky ones (even if they are made of heavy-duty materials). Moreover, it is wise to measure your floor plan and the size of every item you will place in the portable kitchen. To guide in the decision-making process, think of yourself as a military person who will need to get things fast with simple and accessible items all around.
Know where the windows and doors are, as smoke will get in the way when you cook food using the stove. There should be enough ventilation and exhaustion else somebody might think there's fire burning in your home. If you do not have the skills to layout or build your kitchen yourself employ the services of a food truck kitchen builder to design the kitchen, incorporating all building and health department rules that apply.
Things to Bring You're not going out to camp but you should always have these things for your portable kitchen to be complete: pots in different sizes, skillets, plates and bowls, utensils, travel pouches, cups, knives and cutting board, barbecue lighter, griller, matches and lighter, Ziploc bags, paper towels or rolls of tissue paper or wet wipes, spatula, whisk, serving spoons and stirring spoons with long handles, can opener, hand sanitizer, sponge for cleaning dishes, liquid soap, Tupperware for leftovers, water bottles, different spices, bottle of cooking oil, tin foil, food recipes (just in case you need inspiration), garbage bags, French press to make excellent coffee, propane to fuel your stove, and stove.
One of the most pivotal parts in our homes is the kitchen. It is where food, drinks and family conversations are held at the end of the tiring day. From breakfast, lunch to dinner, we spend about three hours per day preparing food that nourish our souls and satisfy our loved ones. With knowledge in space management and ability to create a moveable kitchen inspired by these designs, you can have so many options for a DIY portable kitchen. Mobile kitchens are ideal customized solutions that serve real function. What you get best in return as a benefit is mobility that is tailor-fitted to your lifestyle.
If you are not sure how to do it, you can hire professionals to create this temporary on-site kitchen not only in houses but in fairs, concerts, festivals and other public events and parties.
The experts from the Sarasota Tree Nursery canbuild your dream landscape.
You can have a beautiful home with new sod installation, tropical palm trees, potted plantings, and other Landscaping Sarasota FL features.


Since recent studies indicate that children with divorced parents who receive attention from both parents get better grades in school than those who do not, the Texas' Office of the Attorney General is offering parenting services to encourage divorced parents to become involved in their children's lives.
The Attorney General's Access and Visitation Hotline can be a tool for people to establish paternity, learn about child support, and access information about a parent's right and responsibility to see his or her child.
The OAG also awards grants to organizations that advocate for divorced parent involvement. For this year, $579,000 was given to such organizations all over Texas, aiding education initiatives for cooperative parenting.
The OAG also allots limited funding for the resolution of custody or visitation disputes.
If you are facing divorce or are involved in a child custody dispute, you may consider seeking legal representation. Please call (832) 534-2589 to speak with our lawyers at the BB Law Group PLLC in The Woodlands today.


Find your stylish new home at this peaceful location perfectly positioned between the wilds of Dartmoor and the ever-popular South Devon holiday coast. It is an important regional hub – a traditional market town on the main railway line, sitting astride the A380 Exeter – Dartmouth road.
With history, culture, great shopping and entertainment close by, plus good schools and colleges, Hele Park is perfect if for all the family.
Hele Park is open every day throughout the Easter period so visit us to find your dream home this bank holiday weekend.
Looking to take your first step on the property ladder? Look no further than this lovely one bedroom apartment. There is a kitchen/living room/dining area and double bedrooms alongside a master bathroom. This home comes with one parking allocated parking space.
This is a lovely two bedroom apartment ideal for couples or small families. There is a living room/dining area and stylish kitchen. One of the bedrooms is double and there is a further single bedroom alongside a family bathroom. It has an allocated parking space.
The Flatford is a beautiful 3 bedroom home with many stylish and practical features. The living room features French doors to the rear garden and the kitchen has room for a breakfast area. 2 of the bedrooms are double, with an en suite to the master, there is a family bathroom and a guest cloakroom.
This is the ideal starter home for couples or small families. The living room/dining area has French doors to the rear garden, there is a kitchen with room for a breakfast area and a guest cloakroom. There are 2 double bedrooms, with en suite shower room to the master bedroom, and a family bathroom.
From The M5 (Junction 31) continue forward onto the A38 signposted Plymouth. After about 10 miles, at Drumbridges Roundabout, turn left onto the A382 signposted Newton Abbot, Torquay. Entering Newton Abbot, at Dyrons Roundabout turn left onto the A383 Ashburton Road, signposted Ashburton. You will find Hele Park on the right hand side.
From Plymouth city centre, take the A374 towards Exeter, then merge onto the A38 signposted Exeter. After 23 miles, at Goodstone Junction, turn left for Newton Abbot, turn right onto the A383 signposted Newton Abbot, and follow the A383 Ashburton Road. You will find Hele Park on the left hand side after 0.4 of a mile.
As part of our national Proud campaign, we asked people to vote for a community cause to receive a donation of up to £500. Congratulations to our winner, Newton Abbot Community Transport, and our two runners up Newton Abbot Youth Enquiry Service and Newton Abbot CIC. Thank you all for your votes.
We are pleased to announce that Homeless in Teignbridge Support (HITS), has recently been selected as Hele Park's, Charity of the Year. In recognition of this, we have donated £1,000 to the Devon-based charity who provide a number of services for homeless individuals across Teignbridge.
We are delighted to once again be sponsoring Newton Abbot in Bloom. This sponsorship goes towards the planting, watering and maintenance of floral planters located around the town centre, to brighten it up during the summer season.Taylor Wimpey even had its very own planter.
Before starting work at Taylor Wimpey Hele Park, Taylor Wimpey employee Bradley Reed, and his wife Bethany, decided to make a trip to the new development to get a feel for it. While the aim of the visit was to look around Bradley's new workplace, the couple stumbled across their dream home.
The couple are now enjoying life in their new home as Bradley explains: "We're all settled in now and we completely adore our house - my wife is still in love with the master bedroom on the top floor. Having a room to ourselves on the third floor feels like a total luxury and it makes the rest of the home feel so spacious. We never imagined that we would be able to move to a three-storey townhouse and we feel incredibly lucky to have this much space.
Children at Highweek Community Primary and Nursery School will soon be able to enjoy reading a collection of new books after we gifted £100 to the Newton Abbot-based school to mark World Book Day, which took place on Thursday 7th March.


text:
Aston Martin Racing
Silverston, England
Aston Martin Racing Bars
Aston Martin Racing Schedule
Aston Martin Racing is a British auto racing team established in 2004 as a partnership between automobile manufacturer Aston Martin and engineering group Prodrive. The partnership was initially created for the purpose of returning Aston Martin to sports car racing with the DBR9, a heavily modified variant of the Aston Martin DB9. Since the DBR9's racing debut in 2005, Aston Martin Racing has expanded to build a variety of cars available to customers, as well as development of Aston Martin's V12 engine for Le Mans Prototype use. Aston Martin Racing's program has earned several successes over the years.
Although all cars are built by Prodrive at their factory, Aston Martin plays an integral part in designing the race cars, as well as integrating elements of the race cars back into Aston Martin's road cars.
On 23 April 2009, Aston Martin chairman and Prodrive founder David Richards announced his intent to return to Formula One in 2010 with the possibility of using the Aston Martin name, however this never materialised. Aston Martin had previously raced in the 1959 and 1960 Formula One seasons but failed to score points in either year.

redpajama_set_name: RedPajamaCommonCrawl


text:
NLF Highlights Race Social Movements
Beginning Today: Reviving the Poor People's Movement
May 2018 June 2018 Paula Finn Civil Rights, Poor People's Movement, poverty
Highlights for May 14th
The May 2018 issue of New Labor Forum is out. On the 50th anniversary of Dr. Martin Luther King, Jr.'s assassination, the journal features an article by Reuel Schiller measuring the magnitude of King's loss in relation to the dissolution of the Poor People's Movement he helped birth and the subsequent suspension in large-scale, multiracial organizing for economic justice.
Today may mark the beginning of the end of that long hiatus. As we send this newsletter off, The Poor People's Campaign: A National Call for Moral Revival, launches a nation-wide event including nonviolent moral direct actions in over 30 state capitals, and a series of similar actions that will take place over the next 40 days. This follows two years of meetings in communities throughout the country which led to a report, entitled "The Souls of Poor Folk: Auditing America 50 Years After the Poor People's Campaign Challenged Racism, Poverty, the War Economy/Militarism and Our National Morality." Those conversations in turn resulted in a Declaration of Fundamental Rights and Poor People's Moral Agenda. We include here a profile of the campaign's co-founder, the Reverend William Barber, by Jelani Cobb in the current issue of The New Yorker, as well as a report on the campaign that ran over NPR earlier this morning.
As the Poor People's Campaign seeks to end the poverty that plagues approximately 40 million Americans, we would all do well to reassess the War on Poverty, declared by President Lyndon Johnson four years before Martin Luther King, Jr.'s assassination. In a 2014 article for New Labor Forum, Frances Fox Piven argues that, contrary to accepted wisdom, that the War on Poverty was a largely victorious engagement which mobilized pressure from below reinforced by the Democratic Party's need to shore up its dwindling political reach in the North, producing a measurable reduction in poverty over the next twenty years. Yet now, Piven notes, not only is poverty back, but the faces of poverty have changed. The most telling difference is that, when Michael Harrington wrote The Other America and Lyndon Johnson took up arms, poverty was thought to afflict people cut off from employment in the mainstream economy, like older people no longer working or those living in Appalachia or the country's urban ghettos. Today poverty has become, as it once was back in the 19th century, a function of exploitation at work (not mostly exclusion from work) so that somewhere between 30 and 40 million people make up what we call "the working poor." And it is this changed nature of poverty that the new Poor People's Campaign explicitly intends to address.
Mourning King: The Civil Rights Movement and the Fight for Economic Justice/ Reuel Schiller, New Labor Forum
William Barber Takes on Poverty and Race in the Age of Trump/ Jelani Cobb, The New Yorker
50 Years Later, Reviving King's Poor People's Campaign/ Brakkton Booker, NPR Radio
The Changing Faces of Poverty and Inequality: How We Once Came to Fight a War on Poverty/ Frances Fox Piven, New Labor Forum
The Poor People's Campaign: A National Call for Moral Revival Portfolio/ JustSeeds Artists' Cooperative
Scholarship for Diversity in Labor Awards & Reception/ Joseph S. Murphy Institute
Mourning King: The Civil Rights Movement and the Fight for Economic Justice
By Reuel Schiller/ New Labor Forum
It is impossible to contemplate the fiftieth anniversary of Martin Luther King Jr.'s assassination without hearing a whispered "if only." King, after all, was murdered just as he sought to expand the Civil Rights Movement's agenda to include an explicit focus on promoting multiracial economic justice, a cause that has met with little success in the intervening years. If only he had survived, the whispered voice says, he would have transformed the Movement into a force that powerfully and effectively fought for…
William Barber Takes on Poverty and Race in the Age of Trump
By Jelani Cobb/ The New Yorker
At first glance, the crowds of people congregating on a block of Mulberry Street, a stretch of squat brick buildings near downtown Memphis, on the morning of April 4th, might have been there for a variety of reasons. The street venders selling T-shirts and posters and the jumbotron set up near a parking lot suggested the start of a music festival; delegations of men and women dressed in their union best pointed to a labor rally. But the plaintive notes of gospel music drifting from speakers and the black bunting draped over a balcony of the building at the center of the activities indicated a more sombre occasion. The space behind the bunting had begun as an overlook, became a crime scene, and is now a historic site. The hundreds of people, most but by no means all of them black, were gathering at the Lorraine Motel and the National Civil…
50 Years Later, Reviving King's Poor People's Campaign
By Brakkton Booker/ NPR Radio
Faith leaders are renewing Martin Luther's King's effort to demand better jobs and living conditions for the poor, by organizing demonstrations across the country to highlight the issue of poverty.
Listen to the full story here.
The Changing Faces of Poverty and Inequality: How We Once Came to Fight a War on Poverty
By Frances Fox Piven/ New Labor Forum
The fifty-year anniversary of Lyndon Baines Johnson's declaration of a war on poverty has sparked a new round of right-wing attacks on social policies for the poor. The arguments are familiar. Ronald Reagan set the tone with the quip "we fought a war on poverty, and poverty won." Now it was people like Paul Ryan who led the chorus, loudly claiming that despite trillions of dollars spent, and hundreds of programs…
The Poor People's Campaign: A National Call for Moral Revival Portfolio
By JustSeeds Artists' Cooperative
The Poor People's Campaign: A National Call for Moral Revival Portfolio features a series of twenty-five screenprints by twenty-four artists that express the fundamental principles and core concepts that guide the work of the new Poor People's Campaign. On December 4, 1967, Rev. Dr. Martin Luther King Jr. announced plans for a Poor People's Campaign and called for the nation to take dramatic steps to end poverty. In the wake of his assassination the Campaign went forward but fell short of its vision. Fifty years later, a new Poor…
View the full portfolio here.
Scholarship for Diversity in Labor Awards
& Reception
By Joseph S. Murphy Institute
You are cordially invited to the fifth annual Scholarship for Diversity in Labor Awards & Reception introducing the 2018 Scholarship recipients. The event will also have a special guest speaker, Terry Melvin, President of the Coalition of Black Trade Unionists and will honor today's rising leaders for Labor's future; Dante Barry, co-founder and Executive Director of Million Hoodies Movement for Justice and Maritza Silva-Farrell, Executive Director of ALIGN. The Joseph S. Murphy Scholarship for Diversity in Labor is dedicated to promoting excellence and diversity in union leadership and in the field of Labor Studies.
Subscribe to New Labor Forum
Do you subscribe to New Labor Forum, our publication for labor and its allies to test and debate new ideas? In this new year, consider giving your favorite friends and colleagues a subscription too. Three times a year scholars, journalists, labor leaders and activists explore topics like the global economy's impact on work and labor; new union organizing and political strategies; labor's new constituencies and their relationship to organized labor's traditional institutions; internal union reform and new structural models for the labor movement; alternative economic and social policies; and the role of culture in a new, revitalized labor movement. It is required reading for anyone who is concerned with issues of work, workers, and social change. Subscribe now to get each issue of New Labor Forum.
← Portrait of the Worker as a Black Woman
The New Geography of Suburbia: An Anatomy of America's Hinterland →


This light balsamic vinegar is especially suited to marinades or where a large quantity is required, but is also ideal for vinaigrettes or in sauces.
Emilia-Romagna is the north-eastern region of Italy, home to two historic regions of 'Emilia' & 'Romagna'.
Its capital and largest city is Bologna, famous for its beautiful buildings, architecture and churches dating from the Roman period. The University of Bologna is the world's oldest university, founded in 1088.
On a slightly more modern front, Emilia-Romagna is the automotive centre of Italy. Ferrari, Bugatti, Lamborghini and Maseratis are all made in the region. However, it is also the birth place of some of the most traditional and well-known Italian foods: Parma prosciutto ham, balsamic vinegar (only made in the cities of Modena and Reggio-Emilia) and Parmigiano Reggiano (parmesan cheese).
Wine vinegar (SULPHITES), cooked grape must, concentrated grape must, caramel colour E150d. Acidity 6%.
Good for everyday use, and great in vinaigrettes.


You are welcome to worship among us, participate in any of our activities and attend any of our groups &/or studies.
There are two entrances to the church. The main entrance into the sanctuary narthex is on the corner of Main St. & State Ave. The east entrance is handicap accessible with an elevator, and also has stairs.
Our Sunday worship service lasts one hour and typically includes a Choir Anthem or Contemporary praise band, traditional hymns, and Biblical preaching. We take time during the service to share joys and concerns so we can pray for each other, announcements of upcoming events and service opportunities, and offering (If you are a guest, please don't feel pressured to give).
Main entrance of Wessington Springs UMC.
You will not be put on the spot or pointed out. We will do everything we can to avoid embarrassing you.
You're dressed just right. We care about you, not what you wear. Suits or jeans, wear whatever you feel comfortable in as you worship God.
Our nursery is available at the beginning of each service for ages 2 and under. Children's Church is for ages 3 years old through 6th grade and the children are dismissed to Children's Church following the Youth message. We love kids and if you feel more comfortable keeping your children with you during the service we welcome you to do so.


text:
11-11-11 este un film de groază american din 2011 scris și regizat de Darren Lynn Bousman. Acțiunea filmului are loc la ora 11:11 în ziua 11 a lunii 11 în momentul în care o entitate din altă lume intră pe tărâmul pământesc prin a 11-a poartă a cerului. Filmul a avut premiera pe 11-XI-'11. O campanie a fost lansată pe situl Eventful pentru ca oamenii să "ceară" ca acest film să ruleze în cinematografele din orașul lor.

Povestea

După moartea tragică a soției sale și a copilului, faimosul autor american Joseph Crone pleacă din Statele Unite spre Barcelona, Spania ca să se întâlnească cu fratele său înstrăinat, Samuel, și cu tatăl său pe moarte, Richard. Cu toate acestea, soarta are un plan diferit pentru Joseph și în viata lui au loc tot felul de întâmplări ciudate, pe lângă observarea constantă a numărului 11. Curiozitatea se transformă rapid în obsesie și Joseph își dă seama în curând că acest număr are o semnificație îngrozitoare, nu numai pentru el însuși, ci, eventual, pentru toate religiile. Izolat într-o țară străină unde are numai sprijinul însoțitoarei sale Sadie, Joseph realizează că 11/11/11 este mai mult decât doar o dată, este un avertisment!

Distribuție
 Timothy Gibbs ca Joseph Crone
 Michael Landes este Samuel
 Denis Rafter este Richard Crone
 Wendy Glenn este Sadie
 Lluís Soler este Vavier
 Brendan Price este Grant
 Lolo Herrero este Proprietarul ascuns
 Montserrat Alcoverro este Celia
 Benjamin Cook este David
 Salomé Jiménez este Sarah

Note

Legături externe

Filme de groază din anii 2010
Filme din 2011
Filme regizate de Darren Lynn Bousman

redpajama_set_name: RedPajamaWikipedia


Super import Mike Harris is here to win not just an individual plum, but a more coveted championship for his team Alaska Aces.
The former NBA player made that assurance following his slim lead in an airtight race for the Best Import award entering the semi-finals of the 2018 Philippine Basketball Association Governors' Cup.
Behind his monster double-double average of 29.8 points and 21.7 rebounds aside from 2.6 assists and 1.4 blocks, Harris has amassed 60.4 statistical points at the end of the elimination round to set the pace in the battle for the best reinforcement this season-ending conference.
Not far behind him are Ginebra's Justin Brownlee and Phoenix's Eugene Phelps who had 59.1 and 58.0 SPs, respectively – making it a tightrope sprint to the top.
However, for Harris. who's been there and done that, the only thing that matters to him now is a ring – especially in his first ever year in the Philippines.
"Once again, I had plenty of those. Hats off to them. My thing is, I want to win. Once again, I don't care about it," said the 35-year old veteran, who tallied 25 points and 17 rebounds as Alaska dominated San Miguel, 96-85 to barge into the best-of-five semi-finals.
True enough, Harris was already a celebrated import all over the world prior to his PBA stint witht eh Aces.
Aside from multiple championships in almost every country he has played in – especially the NBA D-League, Chinese Basketball Association, and Baloncesto Superior Nacional (BSN) – Harris also won Most Valuable Player honors and Finals MVP in those leagues.
This explained why the former Utah Jazz is still not into that Best Import lead.
In fact, he doesn't care at all, as he is focused on steering Alaska to ending their five-year title drought in the PBA.
"Once again, I had plenty of those. Hats off to them. My thing is, I want to win. Once again, I don't care about it," he added.
Harris also played down his injury after not returning in the fourth quarter, saying that it was just a cramp, and that he will be ready against either the Meralco Bolts or the Phoenix Fuel Masters, who are still set to dispute the last semis seat tomorrow at the SMART Araneta Coliseum.


text:
Q: asset.source.buffer is not a function error while using @wordpress/dependency-extraction-webpack-plugin I am creating WordPress theme but am stuck on an error. When I try to create a build it shows the error "asset.source.buffer is not a function" which is due to @wordpress/dependency-extraction-webpack-plugin webpack plugin. When I Remove this plugin, it starts working normally but I want to use @wordpress/dependency-extraction-webpack-plugin to combine assets.
Webpack Config
const path = require("path");

const JS_DIR = path.resolve(__dirname, "js/");
const IMG_DIR = path.resolve(__dirname, "images/");
const BUILD_DIR = path.resolve(__dirname, "build");

const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
const CssMinimizerPlugin = require("css-minimizer-webpack-plugin");
const DependencyExtractionWebpackPlugin = require("@wordpress/dependency-extraction-webpack-plugin");
const Uglify = require("uglifyjs-webpack-plugin");

const entry = {
  index: JS_DIR + "/index.js",
  single: JS_DIR + "/single.js",
  editor: JS_DIR + "/editor.js",
  block: JS_DIR + "/block.js",
};
const output = {
  path: BUILD_DIR,
  filename: "js/[name].js",
};
const rules = [
  {
    test: /\.js$/,
    include: [JS_DIR],
    exclude: /node_modules/,
    use: "babel-loader",
  },
  {
    test: /\.scss$/,
    exclude: /node_modules/,
    use: [MiniCssExtractPlugin.loader, "css-loader", "sass-loader"],
  },
  {
    test: /\.(png|jpg|svg|jpeg|gif|ico)$/,
    use: [
      {
        loader: "file-loader",
        options: {
          name: "[path][name].[ext]",
          publicPath: "production" === process.env.NODE._ENV ? "../" : "../../",
        },
      },
    ],
  },
];

const plugins = (argv) => [
  new CleanWebpackPlugin({
    cleanStaleWebpackAssets: argv.mode === "production",
  }),

  new MiniCssExtractPlugin({
    filename: "css/[name].css",
  }),

  new DependencyExtractionWebpackPlugin({
    injectPolyfill: true,
    // combineAssets: true,
  }),
];

module.exports = (env, argv) => ({
  entry: entry,
  output: output,
  devtool: "source-map",
  module: {
    rules: rules,
  },
  optimization: {
    minimizer: [
      new CssMinimizerPlugin(),
      new Uglify({
        cache: false,
        parallel: true,
        sourceMap: false,
      }),
    ],
  },
  plugins: plugins(argv),
  externals: {
    jquery: "jquery",
  },
});

A: Issue Has Been Solved By Downgrading plugin to version "3.0.0"

redpajama_set_name: RedPajamaStackExchange


text:
Meek v. Fowler
Woodson v. Everson
To constitute "wilful misconduct" there must be actual knowledge, or that which in the law is esteemed to be…
Reese v. Day
In Wright v. Sellers, 25 Cal.App.2d 603, 613 [ 78 P.2d 209], it is said that it is "sufficient if the act, or…
Full title:ANNE MEEK, an Infant, etc., et al., Respondents, v. H.M. FOWLER et al.…
Court:Supreme Court of California
Date published: Apr 30, 1935
3 Cal.2d 420 (Cal. 1935)
45 P.2d 194
Supreme Court of California
In Meek v. Fowler, supra, page 426, it was also said that: "Such intent and knowledge of probable injury may not be inferred from the facts in every case showing an act or omission constituting negligence for, if this were true, any set of facts sufficient to sustain a finding of negligence would likewise be sufficient to sustain a finding of wilful misconduct.
Summary of this case from Weber v. Pinyan
Docket No. L.A. 15014.
APPEAL from an order of the Superior Court of Fresno County granting a new trial. K. Van Zante, Judge Presiding. Reversed.
Francis J. Gabel for Appellants.
Bronson, Bronson Slaven, John H. Painter, Harry D. Parker, Raymond G. Stanbury, White McGee, Jr., Vernon W. Hunt, Redman, Alexander Bacon, Herbert Chamberlin, Frankley Spray, L.W. Frankley, Joseph A. Spray and W.H. Abrams, as Amici Curiae on Behalf of Appellants.
Henry E. Barbour and Tarance S. Magee for Respondents.
C. Douglas Smith, as Amicus Curiae on Behalf of Respondents.
WASTE, C.J.
This is an action for damages for personal injuries incurred by the plaintiff, Anne Meek, a guest in one of two automobiles involved in a collision at the intersection of Del Rey and Belmont Avenues near the city of Fresno. Her parents are joined as parties plaintiff. Named as defendants are the driver of the guest car, Harold M. Fowler, a minor, and his parents, who owned the car and who had signed his application for an operator's license, and the driver and owner of the other car involved in the collision. Following a trial before the court, sitting without a jury, judgment went against the plaintiffs and in favor of all the defendants. Plaintiffs' motion for a new trial was granted as to the minor driver of the guest car and his parents, who have appealed from the order. They present two main contentions, the first of which involves the issue whether the evidence is such as to warrant a finding of wilful misconduct so as to make the driver of the guest car answerable in damages, under the 1931 amendment of section 141 3/4 of the California Vehicle Act. Should the evidence warrant such a finding, it is then urged that it becomes essential to determine whether such wilful misconduct may be imputed to his parents as owners of the car or as signers of his application for an operator's license. Upon this latter proposition the appellants urge, and they are supported by the briefs of several amici curiae, that because section 62 of the California Vehicle Act, and section 1714 1/4 of the Civil Code, provide that the signer of a minor's application for an operator's license, in the one case, and the owner of an automobile used with his implied or express consent, in the other, is liable for the "negligence" of the minor, or the user, as the case may be, no recovery can be had against such signer or owner for any wilful misconduct, as distinguished from negligence, of such minor or user, in the operation of such vehicle. The conclusion we have reached upon the first question above stated makes it unnecessary for us to pass upon the latter one. In our opinion, the evidence will not warrant a finding of wilful misconduct on the part of the minor operator, and we therefore refrain from expressing any opinion upon the question whether his wilful misconduct, if shown to exist, may be imputed to the owner of the car or the signers of his application for an operator's license.
The accident occurred about 7 o'clock on the evening of August 14, 1932. Just prior thereto the car in which the injured plaintiff was riding was proceeding in a southerly direction along the right side of Del Rey Avenue. The minor operator thereof testified that when he was approximately one hundred feet from the intersection of Belmont Avenue he was traveling at a speed of about twenty-eight miles an hour; that he then looked to his right and saw, over or through some vines or trees that line the thoroughfare, the lights of an approaching car on Belmont Avenue; that said car, operated by the defendant Peckinpah, was at that time approximately two hundred feet from the intersection; that after looking to observe the lights and position of the approaching vehicle, he accelerated the speed of his car to approximately thirty miles an hour and continued on and into the intersection, believing that he had ample time to negotiate the crossing ahead of the Peckinpah car; that as his car entered the intersection he observed the other car near the west line of the intersection; that he immediately applied his brakes and turned his car to the left in the hope of avoiding a collision. This latter effort proved futile, the impact occurring near the center of Del Rey Avenue and on the south side of Belmont Avenue.
The testimony of the injured plaintiff, and that of another guest in the car, was, as to certain matters, antecedent to the accident, substantially the same. Their versions as to the rate of speed at which the guest car was traveling just prior to and at the time of the accident vary from that of the operator of said car. The plaintiff testified that when they were about a quarter of a mile from the intersection they were traveling about thirty-five miles an hour; that the defendant Fowler did not slow down as his car entered the intersection, even though he had been requested earlier in the evening by the plaintiff to go "at a slower speed at intersections"; that she saw the other car involved in the accident just before entering the intersection and when both cars were about an equal distance therefrom and traveling at about the same rate of speed; that on prior occasions the operator of the guest car "always drove all right"; that she did not remember telling an adjuster three days after the accident that the defendant Fowler reduced the rate of speed of his car to fifteen or twenty miles an hour, but that she did remember telling him, "our car was in the intersection first", and that the other car was going at a high rate of speed. A written statement, bearing plaintiff's signature, was introduced in evidence wherein appears the following: "We traveled south on Del Rey avenue about 25-30 miles per hour. Harold [operator of the guest car] slacked his car down to 15-20 miles per hour before entering the intersection. . . . [when] within the intersection a very short distance I saw the lights of a car approaching the intersection . . . about 200 feet west of the intersection; it was traveling at a high rate of speed, I would estimate about 45-50 miles per hour. It was right on us in less than a moment . . . Harold did his best in attempting to avoid an accident by swerving to the left and trying to get across before the other car reached us. Our car was in the intersection first . . ." Plaintiff attempted to explain those portions of the written statement that vary from her testimony by stating that they were untrue and were prompted by a desire to protect the defendant Fowler from a manslaughter charge in the event she died from the injuries incurred.
The other guest in the Fowler car testified that though earlier he had told the operator thereof to "take it easy", he nevertheless entered the intersection between forty and forty-five miles an hour. This witness likewise testified that he did not remember telling an adjuster that the guest car was traveling about twenty miles an hour at the time of the impact. A written statement, signed by this witness, was received in evidence and contains the following: "As we approached the intersection Harold traveled about 25-30 miles per hour. Before entering the intersection Harold slowed down to about 15-20 miles per hour."
The mother of the driver of the guest car, also named as a defendant, testified that she talked with the plaintiff on the day following the accident and that the latter said that the occupants of said car thought they could get across the intersection before the other car, which was approximately two hundred feet away; and that the plaintiff did not at that time blame the operator of the guest car for the happening of the accident, nor did she say he had been speeding.
The person who had procured the written statements above referred to testified that he heard the conversation between the plaintiff and the mother of the operator of the guest car, and that he returned two days later and procured the written statements. He stated that he wrote the details of the accident as narrated to him by the plaintiff and that the latter read and signed the same when completed.
[1] We have examined the entire record and, in our opinion, those portions thereof most favorable to the plaintiffs will not support a finding of wilful misconduct. The phrase "wilful misconduct", as employed in our so-called guest statute, has been variously defined in the many cases that have had occasion to consider the same. We shall not attempt to reconcile the several definitions and applications given to this phrase. It is satisfactorily defined in Turner v. Standard Oil Co., 134 Cal.App. 622, 626 [ 25 P.2d 988], wherein it is declared that "`wilful misconduct', within the meaning of this statute, may then be defined as intentionally doing something in the operation of a motor vehicle which should not be done or intentionally failing to do something which should be done under circumstances disclosing knowledge, express or to be implied, that an injury to a guest will be a probable result".
The case of Howard v. Howard, 132 Cal.App. 124, 128 [ 22 P.2d 279], after defining gross negligence as set forth in Krause v. Rarity, 210 Cal. 644 [ 293 P. 62, 77 A.L.R. 1327], and what is meant by wilful misconduct as set forth in Helme v. Great Western Milling Co., 43 Cal.App. 416 [ 185 P. 510], declares that "`The mere failure to perform a statutory duty is not, alone, wilful misconduct. It amounts only to simple negligence. To constitute "wilful misconduct" there must be actual knowledge, or that which in the law is esteemed to be the equivalent of actual knowledge, of the peril to be apprehended from the failure to act, coupled with a conscious failure to act to the end of averting injury'.
"While the line between gross negligence and wilful misconduct may not always be easy to draw, a distinction appears from the definition given in that gross negligence is merely such a lack of care as may be presumed to indicate a passive and indifferent attitude toward results, while wilful misconduct involves a more positive intent actually to harm another or to do an act with a positive, active and absolute disregard of its consequences. It seems clear that in excluding all forms of negligence as a basis for recovery in a guest case, the legislature must have intended that to permit a recovery in such a case the thing done by a defendant must amount to misconduct as distinguished from negligence and that this misconduct must be wilful. While the word `wilful' implies an intent, the intention referred to relates to the misconduct and not merely to the fact that some act was intentionally done. In ordinary negligence, and presumably more so in gross negligence, the element of intent to do the act is present and any negligence might be termed misconduct. But wilful misconduct as used in this statute means neither the sort of misconduct involved in any negligence nor the mere intent to do the act which constitutes negligence. Wilful misconduct implies at least the intentional doing of something either with a knowledge that serious injury is a probable (as distinguished from a possible) result, or the intentional doing of an act with a wanton and reckless disregard of its possible result."
Such intent and knowledge of probable injury may not be inferred from the facts in every case showing an act or omission constituting negligence for, if this were true, any set of facts sufficient to sustain a finding of negligence would likewise be sufficient to sustain a finding of wilful misconduct. As has been repeatedly declared, "`wilful misconduct' means something more than negligence — more, even, than gross negligence". ( North Pac. S.S. Co. v. Industrial Acc. Com., 174 Cal. 500, 502 [ 163 P. 910]; Kastel v. Stieber, 215 Cal. 37, 47 [ 8 P.2d 474].)
[2] The evidence in the present case is capable of but one construction, viz., that the attempt of the driver of the guest car to cross the intersection in advance of the Peckinpah car, whether he was driving at a normal or an excessive rate of speed, was the result of his conclusion, mistaken though his judgment may have been, that he could safely negotiate said crossing before the arrival of the other car. His conduct under the circumstances constituted, at most, gross negligence. Upon the record now before us it cannot be said that he proceeded in utter disregard of, or that he was utterly indifferent to, the rights of his guests. While his judgment, under the circumstances confronting him, may have been poor, it does not appear that he was wantonly reckless in exposing his guests to danger, nor did his conduct partake of the nature of a wilful, intentional wrong.
The order appealed from is reversed.
Shenk, J., Thompson, J., Preston, J., and Seawell, J., concurred.
CURTIS, J., Dissenting.
I dissent.
If wilful misconduct is correctly defined in the opinion as implying "at least the intentional doing of something either with knowledge that serious injury is a probable (as distinguished from a possible) result, or the intentional doing of an act with a wanton and reckless disregard of its possible result", then I think the minor was guilty of wilful misconduct when he drove his car at a speed of forty to forty-five miles per hour onto and across an obstructed or blind intersection knowing that another car was approaching the intersection on the cross-street at a rapid rate of speed. In doing so, he was surely driving his car with a wanton and reckless disregard of the possible if not a probable result of a collision with the car which he knew was on the cross-street, or with some other car which might be on said cross-street and which was approaching said crossing. I, therefore, submit that the opinion is erroneous in concluding that the minor was not guilty of wilful misconduct.
In Meek v. Fowler, supra, this court approved the definition of wilful misconduct found in Turner v. StandardOil Co., supra, reading (p. 626): "Wilful misconduct, within the meaning of this statute, may then be defined as intentionally doing something in the operation of a motor vehicle which should not be done or intentionally failing to do something which should be done under circumstances disclosing knowledge, express or to be implied, that an injury to a guest will be a probable result.
In Meek v. Fowler, 3 Cal.2d 420 [ 45 P.2d 194], the court stated that "Wilful misconduct implies at least the intentional doing of something either with a knowledge that serious injury is a probable (as distinguished from a possible) result, or the intentional doing of an act with a wanton and reckless disregard of its possible result.
Summary of this case from Reese v. Day
In Meek v. Fowler, supra, it was held not to be wilful misconduct, but a mistake in judgment as to whether or not a driver could cross an intersection before the arrival of another vehicle.
Summary of this case from Hallman v. Richards


text:
Find the Strawberry
Find the Strawberry in…
Find the strawberry in Spiritfarer
My favourite combat free games of 2021
Wow! 2021 was an incredible year for indie games! But, more specifically, it was an incredible year for combat free indie games. A few of which ended up as Steam Awards nominees for the Sit Back and Relax category. Hopefully, this is a sign of things to come, and we'll see more indie games appearing in mainstream awards.
Earlier this year, a tweet claimed there weren't any good games released in 2021! It was a gaming drought! Meanwhile, I was swamped with incredible games to play at the time. I'm sure many of us had overflowing backlogs and not enough time to play everything.
Here are seven of my favourite combat free games for the year, but there are so many more out there just waiting to be discovered. So, let's get on with this list!
TOEM
Full review | Website | Twitter | Soundtrack
Platforms: PC (Steam), Nintendo Switch & Playstation
Genre: Adventure, puzzle, exploration, point & click
TOEM is such a delight! Grab your backpack, your Hikelady (as opposed to walkman) and your camera, say goodbye to Nana and hit the road to Toem! Your journey will take you through multiple regions, with creatures to capture in your album and people with quandaries and queries to solve. Maybe you'll even get to capture the elusive Nessy on your adventure. So, let's hop on the bus and go!
TOEM is an excellent photo-taking game, with the interesting difference of being entirely in black and white. It is one of the few games I took the time to 100% because I wanted to experience everything TOEM had to offer.
Platforms: PC (Steam) and Xbox inc. Game Pass
Genre: Adventure, atmospheric, story-rich
Feeling burnt out at work? Have a boss that expects you to work all day and night? It sounds like it's time to get away to the idyllic Providence Oaks to drive a mail truck. Lake is just this. Meredith is fed up with her overbearing boss and is going back to her hometown for the first time in 22 years. Her parents are on an adventure of their own, and she is filling in for her Dad as a mail carrier.
Lake is just what I wanted it to be: a laid back experience with no pressure. I had a wonderful time exploring Providence Oaks in my little mail truck and pausing to take in the view, which, rain or shine, was beautiful. Lake is an excellent game if you want a chance to slow down and enjoy the scenery.
Dorfromantik
Website | Twitter
Platform: PC (Steam & Gog)
Genres: Strategy, puzzle, relaxing, casual, simulation
Adorable and full of charm, Dorfromantik is a lovely hex tile placement town-builder puzzle game. Start with one tile in a sea of blue, and place tiles from a stack matching tile edges to the ones already placed. Build sprawling towns, giant forests, meandering rivers and more while being mindful of your limited tile pile. A creative mode was also recently released and allows you to place tiles however you like. No pressure, just build the village of your dreams.
Dorfromantik is a game I go back to again and again. Whenever I feel like I want to take a break and focus on something else, I'll load up Dorfromantik and marvel at the life on my tiles. I am always overjoyed when a train or boat tile comes out; it's so awesome to see their journey across the countryside.
Moonglow Bay
Full review | Website | Twitter
Platforms: PC (Steam and Epic) and Xbox inc. Gamepass
Genre: Adventure, fishing, RPG
After spending decades together in the city, you and your spouse decide it's time for a seachange and move to beautiful Moonglow Bay. Once thriving, it is now shrouded in rumours and superstition of monsters lurking in the bay and surroundings. Your spouse's lifelong dream is to discover the secrets of the bay and disprove the monster rumours once and for all. After surprising you with a present, they leave for an overnight fishing outing. You promise to open the gift when they get back tomorrow.
I love the relaxing vibe of Moonglow Bay. Play at your own pace and do whatever you like. Want to meet all the locals? Sure. Sail the high seas looking for adventure? Ok! Further, there is also a lovely story woven throughout about love, life, overcoming grief and learning to live again.
Platforms: PC (Humble, Steam and Gog), Nintendo Switch & Xbox inc. Gamepass.
Genre: Simulation, story-rich
Unpacking shouldn't be exciting or fun, and yet, it is. We all hate packing (or unpacking) when we move, but for some reason, it's far more fun when you're unpacking a strangers room and deciding where their items should go. If only real life unpacking could be done with the click of a button.
Unpacking has a real hit of nostalgia, especially if you were an 80s or 90s kid. The storytelling is incredible, with many players having the same experience even though there is no dialogue in the game. You also never see your character. The storytelling is told entirely through the items this person owns. Even the smallest details can bring big emotions in Unpacking. It is an incredible feat for a game that looks like it shouldn't be fun.
Platforms: PC (Steam & Itch.io)
Genre: Exploration, story-rich, cute
Baxter wants to hold a big party for all his friends! They've been feeling a little glum recently, and he thinks it could cheer them up. Unfortunately, he doesn't have time to plan the party and asks for your help. Explore the island, meeting many adorable characters along the way. Each of them has a struggle they're trying to overcome. Perhaps you can help them out?
If I had a category for 'most adorable game', Shindig would win! The story can be a little heavy at times, but the characters all have a little beacon of hope. The voice acting (done almost entirely by Fay Maillardet – half of the dev team), dialogue and story are top-notch and all quite charming. Shindig is perfect if you want something cute and uplifting to play.
Lost Words: Beyond the Page
Platforms: PC (Steam, Epic Games, Humble & Gog), Nintendo Switch, Xbox inc. Gamepass, Playstation & Stadia
Genre: 2D platformer, sidescroller, puzzle platformer
Izzy is an avid writer who loves writing in her journal. One day, she starts writing a story for her gran, as they love adventuring together! Jump through the pages of her journal into a magical land where words have immense power. Overcome challenges using magic words and help save your home from destruction.
I love a combat free platformer! In Lost Words, you will get to jump around the lines of Izzy's journal as well as in the fantasy land of Estoria. I enjoyed playing through these two very different environments and seeing how they intertwined. The art and voice acting are also quite lovely and really bring the story together.
2021 was a fantastic year for indie games. It's actually quite incredible just how many excellent games were released. By the end of the year, I could not keep up with everything I wanted to play! If that's not the case for you, and you're still keen on even more games, check out my favourite combat free games of 2019 and 2020 and keep an out on everything we're yet to see in 2022!
2D platformeradventureatmosphericcasualcombat freecuteDorfromantikexplorationfishingLakeLost Words: Beyond the PageMoonglow BayPoint & Clickpuzzlepuzzle platformerpuzzlesrelaxingRPGShindigsidescrollersimulationstory-richStrategyToemUnpacking
Growbot review
Autumn Steam Game Festival – (so many) demos to try
Find the Strawberry is all about the love of indie titles. Over the last year or so I've come across a lot of great indie games that no one had ever heard of and it was great to introduce them to some amazing new titles.
Subscribe to Find the Strawberry and be emailed whenever we post something awesome!
Kraken Academy!! review
Moonglow Bay review
November 2021 indie game releases – part 1
Still worth it?
2022 Find The Strawberry ©


Today's weather is turning out to be patchy rain possible. The visibility is going to be around 16 km i.e. 10 miles and an atmospheric pressure of 1016 mb . The daytime temperature is going to reach 22 °c and the temperature is going to dip to 15 °c at night. It will be mostly dry with little or no precipitation and cloud covering 47% of the sky, the humidity will be around 74%.
Tomorrow weather is forecasted to be light rain shower. The visibility is going to be around 6 km i.e. 3 miles and an atmospheric pressure of 1010 mb. The daytime temperature is going to reach 21 °c and the temperature is going to dip to 17 °c at night. We expect around 8.3 mm of precipitation to fall and cloud covering 67% of the sky, the humidity will be around 84%.
On Thursday weather will be light drizzle with daytime temperature reaching 17 °c. Night time temperature are expected to be 15 °c.It will be mostly dry with little or no precipitation. The visibility is going to be around 13 km i.e. 8 miles and an atmospheric pressure of 1007 mb. It will be mostly dry with little or no precipitation and cloud covering 86% of the sky, the humidity will be around 93%.
Friday seems to be light drizzle. Naka-Ogawa, Japan visibility is going to be around 16 km i.e. 9 miles and an atmospheric pressure of 1011 mb. The daytime temperature is going to reach 13 °c and the temperature is going to dip to 11 °c at night. We expect around 1.1 mm of precipitation to fall and cloud covering 83% of the sky, the humidity will be around 84%.
Partly cloudy will be the weather pattern for the Saturday. The visibility is going to be around 20 km i.e. 12 miles and an atmospheric pressure of 1021 mb. The daytime temperature is going to reach 14 °c and the temperature is going to dip to 8 °c at night. It will be dry with no precipitation and cloud covering 5% of the sky, the humidity will be around 61%.
Looking at the weather in Naka-Ogawa, Japan over the next 7 days, the maximum temperature will be 22℃ (or 72℉) on Tuesday 23rd April at around 12 pm. In the same week the minimum temperature will be 8℃ (or 47℉) on Saturday 27th April at around 3 am.
The national weather service for Naka-Ogawa, Japan is reporting Wednesday 24th April to be the wettest day in the coming week with around 2.30mm (or 0.1 inches) of rainfall. Make sure to carry an umbrella if you are out and about in Naka-Ogawa, Japan.
The windiest of all days will be Wednesday 24th April as wind will reach 22mph (or 36kmph) at around 9 am.
Please also visit Naka-Ogawa Historical Weather, Text Weather and Weather Charts pages. Historical or past weather forecast page provides historical weather forecast from 1st July, 2008 till now in 3 hourly interval. Text weather page will allow you to get a weather text summary for next 14 days and weather chart page displays weather pattern like temperature, wind speed, gust, pressure, etc. in graphical mode for next 14 days. We hope you like it.


How music lesson can grow your children's lifespan?
Attentiveness: Music School Sydney will help your children to develop concentration, as children must focus on a particular activity over extended period of time. Through this way, developing the concentration will also help them to pay attention on other subjects at the school.
Harmonization: music lessons also improve hand-eye harmonization as practicing the music instruments and your children can develop important motor skills when they playing music just as they do when playing different sports.
Moderation: music therapy is more being used to complement more traditions forms of medicine. Many researchers found that certain types of music can aid moderation by lowering heart rates and blood pressure also reduce stress level and increase peace of mind.
Patient and salvation: in order to learn a music instrument, children need to develop patient and salvation that will help them later in their lives when they must tackle many difficult challenges.
Self-assurance: music lessons also increase the level of assurance in the children as the act of learning and playing an instrument, reassurance of the teacher and passion of proud of parent; all will help your children to build the sense of pride and self-confidence. Furthermore, children who practices self-expressions and creativity often become better communicators later in their lives.
Well, most of the researchers found that there is a significant relation between music lessons and positive performances in different areas as reading comprehension, spelling, mathematics, listening skills, mental abilities and motorized skills of children. Music has proven to provide many more benefits to children than simple entertainment but it is important to understand that music does not make one smarter as many intrinsic benefits of music education being the part of music world and managing the performance of your children. That is somewhat parents can be proud of their child.


text:
Q: How do I prevent my Sims from moving out because of their long commute time? I have a big city with 173,000 population and there are lots of abandoned structures caused by having too long commute times. I don't have any industrial inside the city because I have them at neighboring cities.
To lower commute time I put bus stops literally everywhere, but I still get long commute time. How can I fix this?

A: Having your Sim's jobs exist in neighboring cities automatically makes their commute time long. Frankly, there isn't any fix for that - that's the burden of having jobs in other cities, they take the pollution, you take the commute.
You can prevent having abandoned buildings with a variety of solutions, the simplest being increasing your land values. Placing down parks, monuments, emergency services, or a variety of other improvements will make your Sims tolerate the long commute. They'll never stop complaining about their commute, but the benefits of living in your city will make them stay. Other options like lowering taxes can achieve the same effect.
With that being said, make sure you have enough capacity for your commuters too. With 175k citizens it is very easy for your city to have too many people and not enough buses. Allocate more funding for your transit system or look into other means of locomotion such as railways, subways, highways, or even airports. Right now the problem is "too long of a commute" but it could quickly escalate into "I can't commute at all"


text:
using System.IO;
using EventStore.Core.Exceptions;
using EventStore.Core.TransactionLog.Checkpoint;
using EventStore.Core.TransactionLog.Chunks;
using EventStore.Core.TransactionLog.FileNamingStrategy;
using NUnit.Framework;

namespace EventStore.Core.Tests.TransactionLog.Validation
{
    [TestFixture]
    public class when_validating_tfchunk_db : SpecificationWithDirectory
    {
        [Test]
        public void with_file_of_wrong_size_database_corruption_is_detected()
        {
            var config = new TFChunkDbConfig(PathName,
                                             new VersionedPatternFileNamingStrategy(PathName, "chunk-"),
                                             10000,
                                             0,
                                             new InMemoryCheckpoint(500),
                                             new InMemoryCheckpoint(),
                                             new InMemoryCheckpoint(-1),
                                             new InMemoryCheckpoint(-1));
            using (var db = new TFChunkDb(config))
            {
                File.WriteAllText(GetFilePathFor("chunk-000000.000000"), "this is just some test blahbydy blah");
                Assert.That(() => db.Open(verifyHash: false),
                            Throws.Exception.InstanceOf<CorruptDatabaseException>()
                            .With.InnerException.InstanceOf<BadChunkInDatabaseException>());
            }
        }

        [Test]
        public void with_not_enough_files_to_reach_checksum_throws()
        {
            var config = new TFChunkDbConfig(PathName,
                                             new VersionedPatternFileNamingStrategy(PathName, "chunk-"),
                                             10000,
                                             0,
                                             new InMemoryCheckpoint(15000),
                                             new InMemoryCheckpoint(),
                                             new InMemoryCheckpoint(-1),
                                             new InMemoryCheckpoint(-1));
            using (var db = new TFChunkDb(config))
            {
                DbUtil.CreateSingleChunk(config, 0, GetFilePathFor("chunk-000000.000000"));
                Assert.That(() => db.Open(verifyHash: false),
                            Throws.Exception.InstanceOf<CorruptDatabaseException>()
                            .With.InnerException.InstanceOf<ChunkNotFoundException>());
            }
        }

        [Test]
        public void allows_with_exactly_enough_file_to_reach_checksum()
        {
            var config = new TFChunkDbConfig(PathName,
                                             new VersionedPatternFileNamingStrategy(PathName, "chunk-"),
                                             10000,
                                             0,
                                             new InMemoryCheckpoint(10000),
                                             new InMemoryCheckpoint(),
                                             new InMemoryCheckpoint(-1),
                                             new InMemoryCheckpoint(-1));
            using (var db = new TFChunkDb(config))
            {
                DbUtil.CreateSingleChunk(config, 0, GetFilePathFor("chunk-000000.000000"));
                Assert.DoesNotThrow(() => db.Open(verifyHash: false));
            }
        }

        [Test]
        public void does_not_allow_not_completed_not_last_chunks()
        {
            var config = new TFChunkDbConfig(PathName,
                                             new VersionedPatternFileNamingStrategy(PathName, "chunk-"),
                                             1000,
                                             0,
                                             new InMemoryCheckpoint(4000),
                                             new InMemoryCheckpoint(),
                                             new InMemoryCheckpoint(-1),
                                             new InMemoryCheckpoint(-1));
            using (var db = new TFChunkDb(config))
            {
                DbUtil.CreateSingleChunk(config, 0, GetFilePathFor("chunk-000000.000000"));
                DbUtil.CreateOngoingChunk(config, 1, GetFilePathFor("chunk-000001.000000"));
                DbUtil.CreateOngoingChunk(config, 2, GetFilePathFor("chunk-000002.000000"));
                DbUtil.CreateOngoingChunk(config, 3, GetFilePathFor("chunk-000003.000000"));
                Assert.That(() => db.Open(verifyHash: false),
                            Throws.Exception.InstanceOf<CorruptDatabaseException>()
                            .With.InnerException.InstanceOf<BadChunkInDatabaseException>());
            }
        }

        [Test]
        public void allows_next_new_chunk_when_checksum_is_exactly_in_between_two_chunks()
        {
            var config = new TFChunkDbConfig(PathName,
                                             new VersionedPatternFileNamingStrategy(PathName, "chunk-"),
                                             10000,
                                             0,
                                             new InMemoryCheckpoint(10000),
                                             new InMemoryCheckpoint(),
                                             new InMemoryCheckpoint(-1),
                                             new InMemoryCheckpoint(-1));
            using (var db = new TFChunkDb(config))
            {
                DbUtil.CreateSingleChunk(config, 0, GetFilePathFor("chunk-000000.000000"));
                DbUtil.CreateOngoingChunk(config, 1, GetFilePathFor("chunk-000001.000000"));
                Assert.DoesNotThrow(() => db.Open(verifyHash: false));
            }
        }

        [Test, Ignore("Due to truncation such situation can happen, so must be considered valid.")]
        public void does_not_allow_next_new_completed_chunk_when_checksum_is_exactly_in_between_two_chunks()
        {
            var config = new TFChunkDbConfig(PathName,
                                             new VersionedPatternFileNamingStrategy(PathName, "chunk-"),
                                             10000,
                                             0,
                                             new InMemoryCheckpoint(10000),
                                             new InMemoryCheckpoint(),
                                             new InMemoryCheckpoint(-1),
                                             new InMemoryCheckpoint(-1));
            using (var db = new TFChunkDb(config))
            {
                DbUtil.CreateSingleChunk(config, 0, GetFilePathFor("chunk-000000.000000"));
                DbUtil.CreateSingleChunk(config, 1, GetFilePathFor("chunk-000001.000000"));
                Assert.That(() => db.Open(verifyHash: false),
                            Throws.Exception.InstanceOf<CorruptDatabaseException>()
                            .With.InnerException.InstanceOf<BadChunkInDatabaseException>());
            }
        }

        [Test]
        public void allows_last_chunk_to_be_not_completed_when_checksum_is_exactly_in_between_two_chunks_and_no_next_chunk_exists()
        {
            var config = new TFChunkDbConfig(PathName,
                                             new VersionedPatternFileNamingStrategy(PathName, "chunk-"),
                                             10000,
                                             0,
                                             new InMemoryCheckpoint(10000),
                                             new InMemoryCheckpoint(),
                                             new InMemoryCheckpoint(-1),
                                             new InMemoryCheckpoint(-1));
            using (var db = new TFChunkDb(config))
            {
                DbUtil.CreateOngoingChunk(config, 0, GetFilePathFor("chunk-000000.000000"));
                Assert.DoesNotThrow(() => db.Open(verifyHash: false));
            }
        }

        [Test]
        public void does_not_allow_pre_last_chunk_to_be_not_completed_when_checksum_is_exactly_in_between_two_chunks_and_next_chunk_exists()
        {
            var config = new TFChunkDbConfig(PathName,
                                             new VersionedPatternFileNamingStrategy(PathName, "chunk-"),
                                             10000,
                                             0,
                                             new InMemoryCheckpoint(10000),
                                             new InMemoryCheckpoint(),
                                             new InMemoryCheckpoint(-1),
                                             new InMemoryCheckpoint(-1));
            using (var db = new TFChunkDb(config))
            {
                DbUtil.CreateOngoingChunk(config, 0, GetFilePathFor("chunk-000000.000000"));
                DbUtil.CreateOngoingChunk(config, 1, GetFilePathFor("chunk-000001.000000"));
                Assert.That(() => db.Open(verifyHash: false),
                            Throws.Exception.InstanceOf<CorruptDatabaseException>()
                            .With.InnerException.InstanceOf<BadChunkInDatabaseException>());
            }
        }

        [Test, Ignore("Not valid test now after disabling size validation on ongoing TFChunk ")]
        public void with_wrong_size_file_less_than_checksum_throws()
        {
            var config = new TFChunkDbConfig(PathName,
                                             new VersionedPatternFileNamingStrategy(PathName, "chunk-"),
                                             10000,
                                             0,
                                             new InMemoryCheckpoint(15000),
                                             new InMemoryCheckpoint(),
                                             new InMemoryCheckpoint(-1),
                                             new InMemoryCheckpoint(-1));
            using (var db = new TFChunkDb(config))
            {
                DbUtil.CreateSingleChunk(config, 0, GetFilePathFor("chunk-000000.000000"));
                DbUtil.CreateSingleChunk(config, 1, GetFilePathFor("chunk-000001.000000"), actualDataSize: config.ChunkSize - 1000);
                Assert.That(() => db.Open(verifyHash: false),
                            Throws.Exception.InstanceOf<CorruptDatabaseException>()
                            .With.InnerException.InstanceOf<BadChunkInDatabaseException>());
            }
        }

        [Test]
        public void when_in_first_extraneous_files_throws_corrupt_database_exception()
        {
            var config = new TFChunkDbConfig(PathName,
                                             new VersionedPatternFileNamingStrategy(PathName, "chunk-"),
                                             10000,
                                             0,
                                             new InMemoryCheckpoint(9000),
                                             new InMemoryCheckpoint(),
                                             new InMemoryCheckpoint(-1),
                                             new InMemoryCheckpoint(-1));
            using (var db = new TFChunkDb(config))
            {
                DbUtil.CreateOngoingChunk(config, 0, GetFilePathFor("chunk-000000.000000"));
                DbUtil.CreateSingleChunk(config, 1, GetFilePathFor("chunk-000001.000000"));
                Assert.That(() => db.Open(verifyHash: false),
                            Throws.Exception.InstanceOf<CorruptDatabaseException>()
                            .With.InnerException.InstanceOf<ExtraneousFileFoundException>());
            }
        }

        [Test]
        public void when_in_multiple_extraneous_files_throws_corrupt_database_exception()
        {
            var config = new TFChunkDbConfig(PathName,
                                             new VersionedPatternFileNamingStrategy(PathName, "chunk-"),
                                             10000,
                                             0,
                                             new InMemoryCheckpoint(15000),
                                             new InMemoryCheckpoint(),
                                             new InMemoryCheckpoint(-1),
                                             new InMemoryCheckpoint(-1));

            using (var db = new TFChunkDb(config))
            {
                DbUtil.CreateSingleChunk(config, 0, GetFilePathFor("chunk-000000.000000"));
                DbUtil.CreateOngoingChunk(config, 1, GetFilePathFor("chunk-000001.000000"));
                DbUtil.CreateSingleChunk(config, 2, GetFilePathFor("chunk-000002.000000"));
                Assert.That(() => db.Open(verifyHash: false),
                            Throws.Exception.InstanceOf<CorruptDatabaseException>()
                            .With.InnerException.InstanceOf<ExtraneousFileFoundException>());
            }
        }

        [Test]
        public void when_in_brand_new_extraneous_files_throws_corrupt_database_exception()
        {
            var config = new TFChunkDbConfig(PathName,
                                             new VersionedPatternFileNamingStrategy(PathName, "chunk-"),
                                             10000,
                                             0,
                                             new InMemoryCheckpoint(0),
                                             new InMemoryCheckpoint(),
                                             new InMemoryCheckpoint(-1),
                                             new InMemoryCheckpoint(-1));
            using (var db = new TFChunkDb(config))
            {
                DbUtil.CreateSingleChunk(config, 4, GetFilePathFor("chunk-000004.000000"));
                Assert.That(() => db.Open(verifyHash: false),
                            Throws.Exception.InstanceOf<CorruptDatabaseException>()
                            .With.InnerException.InstanceOf<ExtraneousFileFoundException>());
            }
        }

        [Test]
        public void when_a_chaser_checksum_is_ahead_of_writer_checksum_throws_corrupt_database_exception()
        {
            var config = new TFChunkDbConfig(PathName,
                                             new VersionedPatternFileNamingStrategy(PathName, "chunk-"),
                                             10000,
                                             0,
                                             new InMemoryCheckpoint(0),
                                             new InMemoryCheckpoint(11),
                                             new InMemoryCheckpoint(-1),
                                             new InMemoryCheckpoint(-1));
            using (var db = new TFChunkDb(config))
            {
                Assert.That(() => db.Open(verifyHash: false),
                            Throws.Exception.InstanceOf<CorruptDatabaseException>()
                            .With.InnerException.InstanceOf<ReaderCheckpointHigherThanWriterException>());
            }
        }

        [Test]
        public void when_an_epoch_checksum_is_ahead_of_writer_checksum_throws_corrupt_database_exception()
        {
            var config = new TFChunkDbConfig(PathName,
                                             new VersionedPatternFileNamingStrategy(PathName, "chunk-"),
                                             10000,
                                             0,
                                             new InMemoryCheckpoint(0),
                                             new InMemoryCheckpoint(0),
                                             new InMemoryCheckpoint(11),
                                             new InMemoryCheckpoint(-1));
            using (var db = new TFChunkDb(config))
            {
                Assert.That(() => db.Open(verifyHash: false),
                            Throws.Exception.InstanceOf<CorruptDatabaseException>()
                            .With.InnerException.InstanceOf<ReaderCheckpointHigherThanWriterException>());
            }
        }

        [Test]
        public void allows_no_files_when_checkpoint_is_zero()
        {
            var config = new TFChunkDbConfig(PathName,
                                             new VersionedPatternFileNamingStrategy(PathName, "chunk-"),
                                             10000,
                                             0,
                                             new InMemoryCheckpoint(),
                                             new InMemoryCheckpoint(),
                                             new InMemoryCheckpoint(-1),
                                             new InMemoryCheckpoint(-1));
            using (var db = new TFChunkDb(config))
            {
                Assert.DoesNotThrow(() => db.Open(verifyHash: false));
                Assert.IsTrue(File.Exists(GetFilePathFor("chunk-000000.000000")));
            }
        }

        [Test]
        public void allows_first_correct_ongoing_chunk_when_checkpoint_is_zero()
        {
            var config = new TFChunkDbConfig(PathName,
                                             new VersionedPatternFileNamingStrategy(PathName, "chunk-"),
                                             10000,
                                             0,
                                             new InMemoryCheckpoint(),
                                             new InMemoryCheckpoint(),
                                             new InMemoryCheckpoint(-1),
                                             new InMemoryCheckpoint(-1));
            using (var db = new TFChunkDb(config))
            {
                DbUtil.CreateOngoingChunk(config, 0, GetFilePathFor("chunk-000000.000000"));
                Assert.DoesNotThrow(() => db.Open(verifyHash: false));
            }
        }

        [Test, Ignore("Due to truncation such situation can happen, so must be considered valid.")]
        public void does_not_allow_first_completed_chunk_when_checkpoint_is_zero()
        {
            var config = new TFChunkDbConfig(PathName,
                                             new VersionedPatternFileNamingStrategy(PathName, "chunk-"),
                                             10000,
                                             0,
                                             new InMemoryCheckpoint(),
                                             new InMemoryCheckpoint(),
                                             new InMemoryCheckpoint(-1),
                                             new InMemoryCheckpoint(-1));
            using (var db = new TFChunkDb(config))
            {
                DbUtil.CreateSingleChunk(config, 0, GetFilePathFor("chunk-000000.000000"));
                Assert.That(() => db.Open(verifyHash: false),
                            Throws.Exception.InstanceOf<CorruptDatabaseException>()
                            .With.InnerException.InstanceOf<BadChunkInDatabaseException>());
            }
        }

        [Test]
        public void allows_checkpoint_to_point_into_the_middle_of_completed_chunk_when_enough_actual_data_in_chunk()
        {
            var config = new TFChunkDbConfig(PathName,
                                             new VersionedPatternFileNamingStrategy(PathName, "chunk-"),
                                             1000,
                                             0,
                                             new InMemoryCheckpoint(1500),
                                             new InMemoryCheckpoint(),
                                             new InMemoryCheckpoint(-1),
                                             new InMemoryCheckpoint(-1));
            using (var db = new TFChunkDb(config))
            {
                DbUtil.CreateSingleChunk(config, 0, GetFilePathFor("chunk-000000.000000"));
                DbUtil.CreateSingleChunk(config, 1, GetFilePathFor("chunk-000001.000001"), actualDataSize: 500);

                Assert.DoesNotThrow(() => db.Open(verifyHash: false));

                Assert.IsTrue(File.Exists(GetFilePathFor("chunk-000000.000000")));
                Assert.IsTrue(File.Exists(GetFilePathFor("chunk-000001.000001")));
                Assert.AreEqual(2, Directory.GetFiles(PathName, "*").Length);
            }
        }

        [Test, Ignore("We don't check this as it is too erroneous to read ChunkFooter from ongoing chunk...")]
        public void does_not_allow_checkpoint_to_point_into_the_middle_of_completed_chunk_when_not_enough_actual_data()
        {
            var config = new TFChunkDbConfig(PathName,
                                             new VersionedPatternFileNamingStrategy(PathName, "chunk-"),
                                             1000,
                                             0,
                                             new InMemoryCheckpoint(1500),
                                             new InMemoryCheckpoint(),
                                             new InMemoryCheckpoint(-1),
                                             new InMemoryCheckpoint(-1));
            using (var db = new TFChunkDb(config))
            {
                DbUtil.CreateSingleChunk(config, 0, GetFilePathFor("chunk-000000.000000"));
                DbUtil.CreateSingleChunk(config, 1, GetFilePathFor("chunk-000001.000001"), actualDataSize: 499);

                Assert.That(() => db.Open(verifyHash: false),
                            Throws.Exception.InstanceOf<CorruptDatabaseException>()
                            .With.InnerException.InstanceOf<BadChunkInDatabaseException>());
            }
        }

        [Test]
        public void does_not_allow_checkpoint_to_point_into_the_middle_of_scavenged_chunk()
        {
            var config = new TFChunkDbConfig(PathName,
                                             new VersionedPatternFileNamingStrategy(PathName, "chunk-"),
                                             1000,
                                             0,
                                             new InMemoryCheckpoint(1500),
                                             new InMemoryCheckpoint(),
                                             new InMemoryCheckpoint(-1),
                                             new InMemoryCheckpoint(-1));
            using (var db = new TFChunkDb(config))
            {
                DbUtil.CreateSingleChunk(config, 0, GetFilePathFor("chunk-000000.000000"));
                DbUtil.CreateSingleChunk(config, 1, GetFilePathFor("chunk-000001.000001"), isScavenged: true, actualDataSize: 1000);

                Assert.That(() => db.Open(verifyHash: false),
                            Throws.Exception.InstanceOf<CorruptDatabaseException>()
                            .With.InnerException.InstanceOf<BadChunkInDatabaseException>());
            }
        }

        [Test]
        public void old_version_of_chunks_are_removed()
        {
            File.Create(GetFilePathFor("foo")).Close();
            File.Create(GetFilePathFor("bla")).Close();

            var config = new TFChunkDbConfig(PathName,
                                             new VersionedPatternFileNamingStrategy(PathName, "chunk-"),
                                             100,
                                             0,
                                             new InMemoryCheckpoint(350),
                                             new InMemoryCheckpoint(),
                                             new InMemoryCheckpoint(-1),
                                             new InMemoryCheckpoint(-1));
            using (var db = new TFChunkDb(config))
            {
                DbUtil.CreateSingleChunk(config, 0, GetFilePathFor("chunk-000000.000000"));
                DbUtil.CreateSingleChunk(config, 0, GetFilePathFor("chunk-000000.000002"));
                DbUtil.CreateSingleChunk(config, 0, GetFilePathFor("chunk-000000.000005"));
                DbUtil.CreateSingleChunk(config, 1, GetFilePathFor("chunk-000001.000000"));
                DbUtil.CreateSingleChunk(config, 1, GetFilePathFor("chunk-000001.000001"));
                DbUtil.CreateSingleChunk(config, 2, GetFilePathFor("chunk-000002.000000"));
                DbUtil.CreateSingleChunk(config, 3, GetFilePathFor("chunk-000003.000007"));
                DbUtil.CreateOngoingChunk(config, 3, GetFilePathFor("chunk-000003.000008"));

                Assert.DoesNotThrow(() => db.Open(verifyHash: false));

                Assert.IsTrue(File.Exists(GetFilePathFor("foo")));
                Assert.IsTrue(File.Exists(GetFilePathFor("bla")));
                Assert.IsTrue(File.Exists(GetFilePathFor("chunk-000000.000005")));
                Assert.IsTrue(File.Exists(GetFilePathFor("chunk-000001.000001")));
                Assert.IsTrue(File.Exists(GetFilePathFor("chunk-000002.000000")));
                Assert.IsTrue(File.Exists(GetFilePathFor("chunk-000003.000008")));
                Assert.AreEqual(6, Directory.GetFiles(PathName, "*").Length);
            }
        }

        [Test]
        public void when_checkpoint_is_on_boundary_of_chunk_last_chunk_is_preserved()
        {
            var config = new TFChunkDbConfig(PathName,
                                             new VersionedPatternFileNamingStrategy(PathName, "chunk-"),
                                             100,
                                             0,
                                             new InMemoryCheckpoint(200),
                                             new InMemoryCheckpoint(),
                                             new InMemoryCheckpoint(-1),
                                             new InMemoryCheckpoint(-1));
            using (var db = new TFChunkDb(config))
            {
                DbUtil.CreateSingleChunk(config, 0, GetFilePathFor("chunk-000000.000000"));
                DbUtil.CreateSingleChunk(config, 1, GetFilePathFor("chunk-000001.000001"));
                DbUtil.CreateOngoingChunk(config, 2, GetFilePathFor("chunk-000002.000005"));

                Assert.DoesNotThrow(() => db.Open(verifyHash: false));

                Assert.IsTrue(File.Exists(GetFilePathFor("chunk-000000.000000")));
                Assert.IsTrue(File.Exists(GetFilePathFor("chunk-000001.000001")));
                Assert.IsTrue(File.Exists(GetFilePathFor("chunk-000002.000005")));
                Assert.AreEqual(3, Directory.GetFiles(PathName, "*").Length);
            }
        }

        [Test]
        public void when_checkpoint_is_on_boundary_of_new_chunk_last_chunk_is_preserved_and_excessive_versions_are_removed_if_present()
        {
            var config = new TFChunkDbConfig(PathName,
                                             new VersionedPatternFileNamingStrategy(PathName, "chunk-"),
                                             100,
                                             0,
                                             new InMemoryCheckpoint(200),
                                             new InMemoryCheckpoint(),
                                             new InMemoryCheckpoint(-1),
                                             new InMemoryCheckpoint(-1));
            using (var db = new TFChunkDb(config))
            {
                DbUtil.CreateSingleChunk(config, 0, GetFilePathFor("chunk-000000.000000"));
                DbUtil.CreateSingleChunk(config, 1, GetFilePathFor("chunk-000001.000001"));
                DbUtil.CreateSingleChunk(config, 2, GetFilePathFor("chunk-000002.000000"));
                DbUtil.CreateOngoingChunk(config, 2, GetFilePathFor("chunk-000002.000001"));

                Assert.DoesNotThrow(() => db.Open(verifyHash: false));

                Assert.IsTrue(File.Exists(GetFilePathFor("chunk-000000.000000")));
                Assert.IsTrue(File.Exists(GetFilePathFor("chunk-000001.000001")));
                Assert.IsTrue(File.Exists(GetFilePathFor("chunk-000002.000001")));
                Assert.AreEqual(3, Directory.GetFiles(PathName, "*").Length);
            }
        }

        [Test]
        public void when_checkpoint_is_exactly_on_the_boundary_of_chunk_the_last_chunk_could_be_not_present_but_should_be_created()
        {
            var config = new TFChunkDbConfig(PathName,
                                             new VersionedPatternFileNamingStrategy(PathName, "chunk-"),
                                             100,
                                             0,
                                             new InMemoryCheckpoint(200),
                                             new InMemoryCheckpoint(),
                                             new InMemoryCheckpoint(-1),
                                             new InMemoryCheckpoint(-1));
            using (var db = new TFChunkDb(config))
            {
                DbUtil.CreateSingleChunk(config, 0, GetFilePathFor("chunk-000000.000000"));
                DbUtil.CreateSingleChunk(config, 1, GetFilePathFor("chunk-000001.000001"));

                Assert.DoesNotThrow(() => db.Open(verifyHash: false));
                Assert.IsNotNull(db.Manager.GetChunk(2));

                Assert.IsTrue(File.Exists(GetFilePathFor("chunk-000000.000000")));
                Assert.IsTrue(File.Exists(GetFilePathFor("chunk-000001.000001")));
                Assert.IsTrue(File.Exists(GetFilePathFor("chunk-000002.000000")));
                Assert.AreEqual(3, Directory.GetFiles(PathName, "*").Length);
            }
        }

        [Test]
        public void when_checkpoint_is_exactly_on_the_boundary_of_chunk_the_last_chunk_could_be_present()
        {
            var config = new TFChunkDbConfig(PathName,
                                             new VersionedPatternFileNamingStrategy(PathName, "chunk-"),
                                             100,
                                             0,
                                             new InMemoryCheckpoint(200),
                                             new InMemoryCheckpoint(),
                                             new InMemoryCheckpoint(-1),
                                             new InMemoryCheckpoint(-1));
            using (var db = new TFChunkDb(config))
            {
                DbUtil.CreateSingleChunk(config, 0, GetFilePathFor("chunk-000000.000000"));
                DbUtil.CreateSingleChunk(config, 1, GetFilePathFor("chunk-000001.000001"));
                DbUtil.CreateOngoingChunk(config, 2, GetFilePathFor("chunk-000002.000000"));

                Assert.DoesNotThrow(() => db.Open(verifyHash: false));
                Assert.IsNotNull(db.Manager.GetChunk(2));

                Assert.IsTrue(File.Exists(GetFilePathFor("chunk-000000.000000")));
                Assert.IsTrue(File.Exists(GetFilePathFor("chunk-000001.000001")));
                Assert.IsTrue(File.Exists(GetFilePathFor("chunk-000002.000000")));
                Assert.AreEqual(3, Directory.GetFiles(PathName, "*").Length);
            }
        }

        [Test]
        public void when_checkpoint_is_on_boundary_of_new_chunk_and_last_chunk_is_truncated_no_exception_is_thrown()
        {
            var config = new TFChunkDbConfig(PathName,
                                             new VersionedPatternFileNamingStrategy(PathName, "chunk-"),
                                             100,
                                             0,
                                             new InMemoryCheckpoint(200),
                                             new InMemoryCheckpoint(),
                                             new InMemoryCheckpoint(-1),
                                             new InMemoryCheckpoint(-1));
            using (var db = new TFChunkDb(config))
            {
                DbUtil.CreateSingleChunk(config, 0, GetFilePathFor("chunk-000000.000000"));
                DbUtil.CreateSingleChunk(config, 1, GetFilePathFor("chunk-000001.000001"), actualDataSize: config.ChunkSize - 10);

                Assert.DoesNotThrow(() => db.Open(verifyHash: false));
                Assert.IsNotNull(db.Manager.GetChunk(2));

                Assert.IsTrue(File.Exists(GetFilePathFor("chunk-000000.000000")));
                Assert.IsTrue(File.Exists(GetFilePathFor("chunk-000001.000001")));
                Assert.IsTrue(File.Exists(GetFilePathFor("chunk-000002.000000")));
                Assert.AreEqual(3, Directory.GetFiles(PathName, "*").Length);
            }
        }

        [Test, Ignore("Not valid test now after disabling size validation on ongoing TFChunk ")]
        public void when_checkpoint_is_on_boundary_of_new_chunk_and_last_chunk_is_truncated_but_not_completed_exception_is_thrown()
        {
            var config = new TFChunkDbConfig(PathName,
                                             new VersionedPatternFileNamingStrategy(PathName, "chunk-"),
                                             100,
                                             0,
                                             new InMemoryCheckpoint(200),
                                             new InMemoryCheckpoint(),
                                             new InMemoryCheckpoint(-1),
                                             new InMemoryCheckpoint(-1));
            using (var db = new TFChunkDb(config))
            {
                DbUtil.CreateSingleChunk(config, 0, GetFilePathFor("chunk-000000.000000"));
                DbUtil.CreateOngoingChunk(config, 1, GetFilePathFor("chunk-000001.000001"), actualSize: config.ChunkSize - 10);

                Assert.That(() => db.Open(verifyHash: false),
                            Throws.Exception.InstanceOf<CorruptDatabaseException>()
                            .With.InnerException.InstanceOf<BadChunkInDatabaseException>());
            }
        }

        [Test]
        public void temporary_files_are_removed()
        {
            var config = new TFChunkDbConfig(PathName,
                                             new VersionedPatternFileNamingStrategy(PathName, "chunk-"),
                                             100,
                                             0,
                                             new InMemoryCheckpoint(150),
                                             new InMemoryCheckpoint(),
                                             new InMemoryCheckpoint(-1),
                                             new InMemoryCheckpoint(-1));
            using (var db = new TFChunkDb(config))
            {
                DbUtil.CreateSingleChunk(config, 0, GetFilePathFor("chunk-000000.000000"));
                DbUtil.CreateOngoingChunk(config, 1, GetFilePathFor("chunk-000001.000001"));

                File.Create(GetFilePathFor("bla")).Close();
                File.Create(GetFilePathFor("bla.scavenge.tmp")).Close();
                File.Create(GetFilePathFor("bla.tmp")).Close();

                Assert.DoesNotThrow(() => db.Open(verifyHash: false));

                Assert.IsTrue(File.Exists(GetFilePathFor("chunk-000000.000000")));
                Assert.IsTrue(File.Exists(GetFilePathFor("chunk-000001.000001")));
                Assert.IsTrue(File.Exists(GetFilePathFor("bla")));
                Assert.AreEqual(3, Directory.GetFiles(PathName, "*").Length);
            }
        }
    }
}

redpajama_set_name: RedPajamaGithub


Disposal to landfill has long been seen as a quick and simple method of site remediation. However, the removal of the landfill tax exemption for contaminated land has led to substantial (and escalating) cost increases.
ERS has specialist knowledge and experience of a comprehensive range of technologies capable of remediating soil and groundwater without the need for disposal to landfill.
We do understand that in some circumstances, off-site soil treatment remains the best option for our Clients, and ERS offers integrated waste handling and remediation at our soil treatment centres, minimising landfill tax liability.