text:
Cremation Vs Traditional Burial
By Carla J. AkinPosted on September 30, 2019 September 18, 2019
When an individual passes away, their family members is confronted with a vital decision – whether to select cremation or interment for their enjoyed one. There are a variety of reasons that people choose cremation and also for typical burial, and also it is essential to supply some historical history on both methods of disposing of a liked one's remains. The word cremation is originated from the Latin word "cremo," which implies "to melt."
For several thousands of years, specifically throughout the Rock Age, cremation was the common method, according to historical study. Cremation was also the preferred approach among the ancient Greeks and also Romans. Frequently, a funeral pyre would be created in the battleground when a soldier was killed in fight in a foreign land, and the soldier's ashes were gathered and also sent out home to the deceased man's family members.
Cremation was presented by the Greeks to the Western World as early as 1,000 B.C. Today, during the cremation procedure, the body of the dead is placed inside a container and also melted in a chamber, with the temperature varying from 1,400 to 2,100 levels Fahrenheit.
The remains or "ashes" are made up of bone pieces as well as various other elements that are grated until they look like great sand. The typical weight of the remains is from 4 to 8 pounds, and the whole procedure usually takes approximately 1-5 hrs, depending upon the weight of the person.
Cremation began raising in appeal in Europe and The United States And Canada after the advancement of the first modern-day cremation chamber by Teacher Brunetti of Padua, Italy, in the 1870s. The initial crematorium was later integrated in the United States in 1876. Throughout the last component of the 19th century, the method of cremation was restored among concerns regarding possible unhygienic conditions produced by the enhancing variety of cemeteries.
Nonetheless, in 1886, the Roman Catholic Church formally outlawed cremation as well as, hence, accepted just of conventional interment of the body for Catholics worldwide. Learn more about cremation services in Denver by clicking on this link.
There are instances as current as World Battle II when church participants were unchurched for helping in the setups for cremation. Changes in religions, social worths, as well as scientific expertise has actually contributed to the popularity of cremation in Europe, the USA and throughout the world.
The Roman Catholic Church has raised the restriction on cremation for its followers. Hence, although cremation has actually been offered in the USA for 125 years, it was not in prevalent use up until just 25 years earlier. Today, 1 out of 4 Americans select cremation over traditional burial.
On the various other hand, conventional burial has also been exercised by several cultures for hundreds of years. The old Israelites, for instance, did not melt the bodies of the dead. Instead, they put the remains in sepulchers or burial places, where the bodies were exposed to the air of the tomb and also delegated decay naturally.
When just the bones remained, these would be collected and positioned inside a bone box. The old Egyptians believed in the afterlife; for that reason, they embalmed and hid their dead. Even the old Chinese hidden their dead.
Today, interment is the typical technique of dealing with a liked one's body in America as well as a lot of the Western Globe. Nonetheless, there were times in background when cremation came to be the preferred approach in Western nations, as well.
One example was throughout the Black Fatality in 1656, in which to prevent the spread of the condition, numerous hundreds of thousands of bodies were cremated. Research study indicates that throughout this time around over 60,000 bodies were cremated in Naples, Italy, alone, in the period of one week.
To choose cremation or burial? That is the concern. The selection is an individual one, which will certainly vary according to family practices, faiths as well as other elements. Below are simply some of the reasons why families could pick one technique of throwing away their liked one's continues to be over the various other.
Previous post: Sports Health and Wellness Niche
Next post: Auto Accident Lawsuit Mistakes
© 2020 At Large - You Need A Lawyer	Powered by WordPress	Theme by Design Lab


New Regalia® PTO prevents and controls bacterial and fungal diseases on turf and ornamental shrubs and flowers. It is a perfect complement to a contact fungicide like ZeroTol 2.0, providing longer-term preventative residual protection.
Turf diseases treated include Dollar Spot, Anthracnose, and Brown Patch. The active ingredient in Regalia PTO is derived from a plant extract of Reynoutria sachalihensis, which triggers turf's natural defenses systems to combat fungal and bacterial diseases. Independent research confirms that Regalia PTO provides economical control and improves turf quality. Regalia PTO can be used stand alone or as a tank mix partner with conventional fungicides.
Regalia PTO has a short re-entry interval of only 4 hours, so golfers and workers can get back on the course quickly. Regalia PTO is rainfast in 1 hour, so your fungicide sprays can get out even in tough weather.
Regalia PTO can be used in rotation or as a tank mix partner with most commercially available fungicides. Regalia PTO is shown to be compatible with strobilurins such as Heritage, Insignia, and Compass, DMI's such as Banner, and many other types of pesticide chemistries. While strobilurin and DMI chemistries have known resistance risks, this risk is extremely low with Regalia PTO.
When treated with Regalia PTO, the defense systems of turf are "switched on" to protect against attacking diseases. Research proves that turf treated with Regalia PTO produces and accumulates elevated levels of specialized proteins and other compounds known to inhibit fungal and bacterial diseases. Regalia PTO induces turf to produce phytoalexins, cell strengtheners, antioxidants, phen-olics, and PR proteins, which are all known inhibitors of plant pathogens.
For best results, use Regalia® PTO as a preventative treatment (before disease symptoms become visible). For maximum disease control, tank mix Regalia PTO with traditional fungicides and treat at 7-14 day intervals as needed (use shorter intervals under moderate to high disease pressure). When mixed with another fungicide, apply Regalia PTO at 2 ounces per 1000 square feet. When used alone, apply Regalia PTO at 3 ounces per 1000 square feet. Apply with spray water volumes of at least 1.5 gallons of water per 1000 sq. ft.


text:
Charles Oliver | From the October 2008 issue
Marnina Norys was trying to board a plane at Canada's Kelowna Airport when security guards noticed her necklace, which had a 1.75-inch silver replica of a Colt .45 on it. An agent told her she couldn't board the plane with it on. She noted that the pendant couldn't actually shoot anyone. "It's what it represents," came the reply. The Canadian Air Transport Security Authority is unapologetic about the incident. "How do you know it wasn't a real gun?" one agent said.
When Victor Abrahams decided to sell his car, he did what a lot of people do: He stuck a "For Sale" sign in the window. One day he drove to his office in the London, England, borough of Barnet and parked on the street. He emerged from his office to find he'd been ticketed for "offering goods for sale in a parking place."
A Melissa, Texas, cop pulled Mark Robinson over for failing to use his turn signal. Then he arrested him, took him to jail, stripsearched him, and held him for three hours. Police Chief Duane Smith admits he's never heard of anyone being arrested for a turn signal violation but says he stands by his officer.
Police in Rock Hill, South Carolina, arrested seven people at two different high school graduations for disorderly conduct. Their crime: shouting when students' names were called out. They face up to 30 days in jail and a $1,000 fine.
Anne Hartridge and Matt George take environmentalism seriously. They often bike to work, they have installed solar panels on their Sacramento home, they dry their clothes on a clothesline, and with California in a drought, they decided to stop watering their lawn. Then a neighbor complained about their brown lawn, and the city cited them for violating an ordinance requiring lawns to be "irrigated, landscaped and maintained."
More than 100 Northern Ireland pubs, about 7 percent of the total, have closed since the government banned smoking in them a little more than a year ago. The Federation of Retail Licensed Trade predicts another 100 will close within the year. "The much-promoted view that nonsmokers would be rushing to premises has not materialized," says federation chief Stephen Kelly.
Police in Yorkshire, England, have ordered pubs to ban customers wearing hats from their premises. Apparently hats make it harder to identify people on surveillance cameras.
The good news is that the police arrived very quickly when Max Foster of Coleford, England, called to report that three youths were riding his moped late one night. The bad news is that the officers just watched the thieves speed away on the moped. The police department says it couldn't chase the bandits because they weren't wearing helmets, and the government could have been held liable if one crashed and hurt himself.
NEXT: What Part of Legal Immigration Don't You Understand?
November.5.2010 at 9:27 pm
jrtedg

redpajama_set_name: RedPajamaCommonCrawl


Types of Water - All About Health, Inc.
You'll be surprised at the wonderful color, taste, and aroma of coffee or tea prepared with Kangen Water®. You can also use less or coffee or tea and still achieve a full rich taste due to the water's extractable ability.
Kangen Water® may give freshness and life to plants. The water stimulates germination and improves seedling development.
Neutral water is delicious drinking water that is easily absorbed by your body. Take your medicine with this water.
Spray foods with Acidic Water when freezing so that the food, including fish and shrimp, do not lose its flavor when thawed out.
This water has disinfecting properties. Use Strong Acidic Water to sanitize kitchen utensils, counter tops, etc. to keep areas safe and clean.
Beauty salons, hair salons, restaurants, agricultural colleges, daycare centers, pet shops, and nursing homes all benefit greatly from the use of Strong Acidic Water.


text:
package org.apache.ambari.server.api.services;

import org.apache.ambari.server.api.resources.ResourceInstance;
import org.apache.ambari.server.controller.spi.Resource;

import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriInfo;
import java.util.Collections;

/**
 * DR target cluster service.
 */
@Path("/targets/")
public class TargetClusterService extends BaseService {

  /**
   * Handles: GET /targets/{targetName}
   * Get a specific target.
   *
   * @param headers     http headers
   * @param ui          uri info
   * @param targetName    target id
   * @return target instance representation
   */
  @GET
  @Path("{targetName}")
  @Produces("text/plain")
  public Response getTargetCluster(@Context HttpHeaders headers, @Context UriInfo ui,
                          @PathParam("targetName") String targetName) {

    return handleRequest(headers, null, ui, Request.Type.GET, createTargetClusterResource(targetName));
  }

  /**
   * Handles: GET  /targets
   * Get all targets.
   *
   * @param headers http headers
   * @param ui      uri info
   * @return target collection resource representation
   */
  @GET
  @Produces("text/plain")
  public Response getTargetClusters(@Context HttpHeaders headers, @Context UriInfo ui) {
    return handleRequest(headers, null, ui, Request.Type.GET, createTargetClusterResource(null));
  }

  /**
   * Handles: POST /targets/{targetName}
   * Create a specific target.
   *
   * @param headers     http headers
   * @param ui          uri info
   * @param targetName target id
   * @return information regarding the created target
   */
  @POST
  @Path("{targetName}")
  @Produces("text/plain")
  public Response createTargetCluster(String body, @Context HttpHeaders headers, @Context UriInfo ui,
                             @PathParam("targetName") String targetName) {

    return handleRequest(headers, body, ui, Request.Type.POST, createTargetClusterResource(targetName));
  }

  /**
   * Handles: PUT /targets/{targetName}
   * Update a specific target.
   *
   * @param headers     http headers
   * @param ui          uri info
   * @param targetName target id
   * @return information regarding the updated target
   */
  @PUT
  @Path("{targetName}")
  @Produces("text/plain")
  public Response updateTargetCluster(String body, @Context HttpHeaders headers, @Context UriInfo ui,
                             @PathParam("targetName") String targetName) {

    return handleRequest(headers, body, ui, Request.Type.PUT, createTargetClusterResource(targetName));
  }

  /**
   * Handles: DELETE /targets/{targetName}
   * Delete a specific target.
   *
   * @param headers     http headers
   * @param ui          uri info
   * @param targetName target id
   * @return information regarding the deleted target
   */
  @DELETE
  @Path("{targetName}")
  @Produces("text/plain")
  public Response deleteTargetCluster(@Context HttpHeaders headers, @Context UriInfo ui,
                             @PathParam("targetName") String targetName) {

    return handleRequest(headers, null, ui, Request.Type.DELETE, createTargetClusterResource(targetName));
  }

  /**
   * Create a target resource instance.
   *
   * @param targetName target name
   *
   * @return a target resource instance
   */
  ResourceInstance createTargetClusterResource(String targetName) {
    return createResource(Resource.Type.DRTargetCluster,
        Collections.singletonMap(Resource.Type.DRTargetCluster, targetName));
  }
}

redpajama_set_name: RedPajamaGithub


Found 3 file extension associations related to OpenSCAD and 1 file format developed specifically for use with OpenSCAD.
OpenSCAD is a software for creating solid 3D CAD objects. It is free software and available for Linux/UNIX, MS Windows and Mac.
If you need more information please contact the developers of OpenSCAD (Marius Kintel), or check out their product website.


text:
ICE deportation raids will reportedly start this weekend
Officials will target immigrants in at least 10 cities.
By Emily Stewart Jul 11, 2019, 11:00am EDT
Share All sharing options for: ICE deportation raids will reportedly start this weekend
A woman holds up a sign at a protest against immigration detention centers in July 2019.
Tom Cooper/Getty Images for MoveOn.org Civic Action
The immigration raids that President Donald Trump threatened, then put off, are now set to start in the United States this weekend, according to a new report.
On Thursday, Caitlin Dickerson and Zolan Kanno-Youngs at the New York Times reported that Immigration and Customs Enforcement will commence the arrests of potentially thousands of undocumented immigrants on Sunday. Similar to the initial reported plan, ICE agents are targeting at least 2,000 immigrants for deportation across 10 major cities and could also sweep up immigrants who aren't the initial targets.
The Trump administration for weeks has been building up potential mass immigration raids, but thus far it has held off. President Donald Trump on June 17 tweeted that the following week ICE would begin removing "millions" of undocumented immigrants from the United States. But on June 22, he said he would hold off for two weeks, at Democrats' request, to see if they could "get together to work out a solution to the Asylum and Loophole problems at the Southern Border."
At the request of Democrats, I have delayed the Illegal Immigration Removal Process (Deportation) for two weeks to see if the Democrats and Republicans can get together and work out a solution to the Asylum and Loophole problems at the Southern Border. If not, Deportations start!
House speaker Nancy Pelosi (D-CA) had called Trump to ask him to call off the raids, and she publicly welcomed the delay on Twitter. "Families belong together," she wrote. But as Vox's Ella Nilsen and Li Zhou noted at the time, Trump's accompanying demand on asylum law "came out of the blue" and was one that Congress was never going to be able to tackle in the time frame he prescribed.
Mr. President, delay is welcome. Time is needed for comprehensive immigration reform. Families belong together. https://t.co/R9PDrfaKWj
— Nancy Pelosi (@SpeakerPelosi) June 22, 2019
The idea of immigration raids has been a fraught one, even within the Trump administration, the Department of Homeland Security, and ICE. According to the Times, immigration agents have "expressed apprehensions" about the prospect of potentially arresting children and babies, and within DHS, there's been disagreement as to what to do:
For weeks last month, the ICE director at the time, Mark Morgan, signaled that agents would escalate efforts to round up families. Days before the operation was to begin, Mr. Trump forecast the plan on Twitter, blindsiding ICE agents whose safety officials feared would be compromised as a result.
In early June, the Department of Homeland Security's acting secretary, Kevin K. McAleenan, told Mr. Morgan to call off the operation. Mr. McAleenan did not support the raids, officials said at the time, in part out of concern that undocumented parents could be separated from any of their children who are American citizens.
Just because immigrants are targeted for deportation doesn't mean they've committed a major crime
As Vox noted last month, while the families targeted for deportation have likely received final orders that they are to leave the country, they may not have been accused of any crimes besides disobeying that order:
Last year, the Trump administration developed an expedited legal process for migrant families, which, according to the [Washington] Post, fast-tracked "the cases of thousands of families in major cities, obtaining 'in absentia' deportation orders for thousands of families that did not show up for their court hearings."
But just because one or more members of a family have deportation orders doesn't mean they are the hardened criminals that Trump often portrays them as being. (In a departure from Obama administration policy, Trump hasn't made distinctions between undocumented immigrants who have criminal records and those that don't.)
According to the Times, if family members are arrested together, they'll be held in family detention centers — or, if there's not enough room, hotels — until they can be deported.
Pro-immigrant groups last month put out advisories for potential targets as to what they are and aren't allowed to do in the event an ICE agent comes knocking.
ICE Raids are expected to start on Sunday in:
- Miami
- Atlanta
- Chicago
- Baltimore
- Denver
- Houston
- Los Angeles
- New Orleans
- New York City,
- San Francisco
If you are in any of these cities, please share this info #ProtectEachOther #Protejamonos pic.twitter.com/Cqa777nnxq
— RAICES (@RAICESTEXAS) June 21, 2019
The ICE warrant on the left does NOT authorize agents to enter a home without permission.
La orden de ICE a la izquierda NO autoriza a los agentes a entrar al domicilio sin permiso. https://t.co/hl7Q1rv7sK
— ACLU (@ACLU) June 21, 2019
Also last month, Sen. Bernie Sanders (I-VT) used his presidential campaign email list to warn about raids. The cities where the raids at the time were supposed to take place were Atlanta, Baltimore, Chicago, Denver, Houston, Los Angeles, Miami, New Orleans, New York, and San Francisco. It's likely the same cities will be targeted now.
To be sure, this could be yet another threat from the Trump administration and the raids will again be postponed. But per the Times report, this weekend the enforcement campaign could happen. On Wednesday, Ken Cucinnelli, acting director of US Citizenship and Immigration Services, told reporters that raids are "absolutely going to happen," though he declined to comment on the timing.
Next Up In Politics & Policy


We enhance the user experience with stunning, customized visuals.
Our web development experience can help streamline processes.
As your compass, we navigate customers to your site.
Top-performing email and web hosting for your fast-paced business.
WHAT WILL A WEBQK WEBSITE COST YOU?


Bathroom Vinyl Flooring Incredible Stylish Floor Tiles And Eventsbymsk Regarding 19 | Brevardbesthomes.com bathroom vinyl flooring reviews. bathroom vinyl flooring tile effect. bathroom vinyl flooring lowe's.


text:
Episode 1 - Red Roses	Episode 2 - Hello, Emma	Episode 3 - Wanna Play a Game?	Episode 4 - Aftermath	Episode 5 - Exposed	Episode 6 - Betrayed	Episode 7 - In the Trenches	Episode 8 - Ghosts	Episode 9 - The Dance	Episode 10 - Revelations
Episode 1 - I Know What You Did Last Summer	Episode 2 - Psycho	Episode 3 - Vacancy	Episode 4 - Happy Birthday to Me	Episode 5 - Dawn of the Dead	Episode 6 - Jeepers Creepers	Episode 7 - Let the Right One In	Episode 8 - Village of the Damned	Episode 9 - The Orphanage	Episode 10 - The Vanishing	Episode 11 - Heavenly Creatures	Episode 12 - When a Stranger Calls	Episode 13
Episode 1 - The Deadfast Club	Episode 2 - Devil's Night	Episode 3 - The Man Behind the Mask	Episode 4 - Ports in the Storm	Episode 5 - Blindspots	Episode 6 - Endgame
What starts as a YouTube video going viral, soon leads to problems for the teenagers of Lakewood and serves as the catalyst for a murder that opens up a window to the town's troubled past. Everyone has secrets. Everyone tells lies. Everyone is fair game.
Genre: Crime, Drama, Horror, Mystery, Thriller
Director: Dan Dworkin, Jay Beattie, Jill E. Blotevogel, Wes Craven
Actors: Amadeus Serafini, Bex Taylor-Klaus, Bryan Batt, Carlson Young, John Karna, Kiana Ledé, Mike Vaughn, Santiago Segura, Tom Maden, Tracy Middendorf, Willa Fitzgerald
Studio: DiGa Vision, Dimension Films, Dimension Television, Netflix
Networks: MTV
Keywords:Scream
The series focuses on an eccentric motley crew that is the Smith family and their three housemates: Father, husband, and breadwinner Stan Smith; his better half housewife, Francine Smith; their…
Two teenage boys secretly meet up in a cabin, bear witness to a shooting and barely escape with their lives. Desperate to keep their relationship a secret and in fear…
Robin, Starfire, Raven, Beast Boy and Cyborg return in all-new, comedic adventures. They may be super heroes who save the world every day … but somebody still has to do…
Genre: Action, Action & Adventure, Animation, Comedy, Family, Sci-Fi
Set against the backdrop of the Wars of the Roses, the series is the story of the women caught up in the protracted conflict for the throne of England.
Country: France, UK
Genre: Drama, History, Romance, War
After her mother dies in a fire, Cassie Blake moves in with her grandmother in the beautiful small town of Chance Harbor, Washington. As Cassie gets to know her high…
Genre: Drama, Fantasy, Horror, Romance, Sci-Fi & Fantasy
A group of friends from Boston who feel feel stuck in life experience an unexpected wake-up call after one of their friend dies unexpectedly.
The first 40 days of the war in Iraq as seen through the eyes of an elite group of U.S. Marines who spearheaded the invasion along with an embedded Rolling…
Genre: Action & Adventure, Drama, War, War & Politics
Tell Me a Story takes the world's most beloved fairy tales and reimagines them as a dark and twisted psychological thriller.
The story of two vampire brothers obsessed with the same girl, who bears a striking resemblance to the beautiful but ruthless vampire they knew and loved in 1864.
Genre: Drama, Fantasy, Horror, Mystery, Romance, Thriller
Meet The Thundermans, a typical suburban family that happens to have astounding superpowers. At the center of the action are the 14-year-old Thunderman twins, who share the same bathroom, the…
Genre: Action, Action & Adventure, Comedy, Family, Sci-Fi, Sci-Fi & Fantasy
Bob Lee Swagger is an expert marksman living in exile who is coaxed back into action after learning of a plot to kill the president. Based on the best-selling Bob…
Genre: Action, Action & Adventure, Drama
The Tudors is a history-based drama series following the young, vibrant King Henry VIII, a competitive and lustful monarch who navigates the intrigues of the English court and the human…
Country: Canada, Ireland, UK, USA
A dance musical that explores the juxtaposition of several segments of 1980s life and society in New York: the ball culture world, the rise of the luxury Trump-era universe and…
The iron-fisted Akhandanand Tripathi is a millionaire carpet exporter and the mafia don of Mirzapur. His son, Munna, is an unworthy, power-hungry heir who will stop at nothing to inherit…
Genre: Action & Adventure, Crime
An ex-felon is shocked to see just how much the world has changed when he is released from prison for good behavior after a 15-year stint and returns to his…
A group of high school students navigate love and friendships in a world of drugs, sex, trauma, and social media.
Raymond "Red" Reddington, one of the FBI's most wanted fugitives, surrenders in person at FBI Headquarters in Washington, D.C. He claims that he and the FBI have the same interests:…
A drama about the local field office that investigates criminal cases affecting military personnel in The Big Easy, a city known for its music, entertainment and decadence.
Episodes ----- Incorrect episode Broken link Others
Contents ----- Incorrect details Wrong images Others


This entry was posted on February 18, 2013 at 12:03 am and is filed under Contest, DX Contest.	You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.


That's important advice when you're feeding four gigantic rhinos apple slices, their mouths wide open awaiting every bite. It seems we can see all the way down into their pink throats. It's hard to believe that these huge creatures — they can weigh up to 5,000 pounds — can run as fast as 30 miles an hour. We're especially taken with baby Bandhu, the greater one-horned rhinoceros, born May 18, 2009.
No, we're not in Africa or India. But it sure feels like we could be at the San Diego Zoo's Safari Park (www.sandiegozoo.org), located about 30 miles north of downtown San Diego near Escondido.
We're riding in a truck on a photo caravan into the heart of the large animal enclosures, which means, as we bump along, we get up close to not only the rhinos (Southern white, as well as greater one-horned) but also the giraffes (try feeding leaves to two giraffes at once!), Springbok, Cape buffalo, ostrich, Defassa Waterbuck, zebras and more. We see a lion lolling on top of a safari-type vehicle — his personal lounger, we're told.
That's the idea, of course. This is a bona-fide adventure designed to give you the experience of seeing these animals in their natural habitats — there are more than 3,000 here representing some 375 species on land that spreads out over 1,800 acres.
Soar over the animals on a zip line 160 feet above the ground. Stay overnight in a tent overlooking the plains of "East Africa," the Safari Park's largest field exhibit and home to giraffes, antelope, rhino and more. Fly above the park in a Balloon Safari or head to the "Petting Kraal" where the littlest in your gang can touch and feed the antelope. Get up close and personal with all kinds of bugs during the Creepy Crawly festival (ready to pet a cockroach?) that goes on weekends until mid-November. There is also a special Family Caravan, lasting only an hour — ideal for younger children.
It's easy to see why so many families come to San Diego specifically to visit the Zoo and Safari Park — 40 percent of visitors are from outside California — as well as other first-rate family attractions like Sea World (www.seaworld.com) and Legoland (www.legoland.com). For more on San Diego visit www.sandiego.org for affordable hotel deals like the "Hassle-Free Holiday" from Omni (www.omnihotels.com) for Thanksgiving and Christmas. Rates start at just $129 per room.
A visit to the Safari Park and the San Diego Zoo — the most visited zoo in the country with some 3.4 million visitors a year, another 1.5 million to the Safari Park — is a lot more than seeing the pandas (the zoo has the largest population of giant pandas in the country), feeding a baby giraffe or watching an elephant get a pedicure (the 7.5 acre Elephant Odyssey at the zoo is the first habitat of its kind). Kids love the interactive area where they can play with oversized elephant tracking collars and work a bone puzzle. Or you can just observe.
Run your hands over a model that shows just how little ice there is for the polar bear, compared to just 30 years ago. Scary! Kids can try "hunting" like a polar bear, stepping and jumping from one ice floe to another, crawling through a replica of a polar bear den and even climbing into a research helicopter. Crowd on the giant scale and see how many of you it will take to come close to the weight of an adult bear — some 1,500 pounds.
"Kids are going to be the stewards of our planet and it's important for them to understand their role in this, and that they can make a difference," says JoAnne Simerson, the senior keeper primarily responsible for caring for the zoo's three polar bears: Kalluk, Tatqiq and Chinook.
© 2010 EILEEN OGINTZ, DISTRIBUTED BY TRIBUNE MEDIA SERVICES, INC.
Great article. Mia is so happy you mentioned her. Hope you enjoyed the adventure as much as we did.
Great website thanks for info.


You're trying to sell a Indianapolis, IN house that just won't sell?
If you need to sell a house near Indianapolis, we can help you. We buy Indianapolis houses.
Give us a call anytime 317-731-2540 or fill out the form here today!


The Guest House at Rose Cottage is a lovely, furnished private retreat. Beautiful garden views. Close to Easton. Shorter term rental preferred. Rent is inclusive of all services. Renter's Insurance Required. Available immediately.


Hearing aids may improve your hearing if you've been diagnosed with hearing loss. Though there is a wide variety of hearing aids available, they all have the same basic function of improving sound that enters the ear making it easier to hear. Research has shown that hearing aids help people with hearing loss continue to communicate with family and friends resulting in improved quality of life and better overall health.
If you have been diagnosed with hearing loss, please contact our office at (818) 859-7730 to schedule an appointment with our audiology services.


Curriculum approach: How will we get there?
Presentation of content as a separate, 'stand-alone' subject or as separately named course units or modules within suitable existing subjects.
Integration of topics and themes into lessons within one subject or across several different subjects.
Support through learning activities related to LTLT and DRR through school-led co-curricular activities.


In recent years, it's become increasingly clear that emotion plays a central role in global politics. For example, people readily care about acts of terrorism and humanitarian crises because they appeal to our compassion for human suffering. These struggles also command attention where social interactions have the power to produce or intensify the emotional responses of those who participate in them.
From passionate protests to poignant speeches, Andrew A. G. Ross analyzes high-emotion events with an eye to how they shape public sentiment and finds that there is no single answer. The politically powerful play to the public's emotions to advance their political aims, and such appeals to emotion also often serve to sustain existing values and institutions. But the affective dimension can produce profound change, particularly when a struggle in the present can be shown to line up with emotionally resonant events from the past. Extending his findings to well-studied conflicts, including the War on Terror and the violence in Rwanda and the Balkans, Ross identifies important sites of emotional impact missed by earlier research focused on identities and interests.


text:
On October 15-17, 2021, as part of the II International Award for the best audio recording of works of Russian Academic Music "Pure Sound", the II International Symposium "The recording industry of Academic Music" will be held in Moscow.
The event is aimed at practicing sound engineers and sound engineers, employees of sound workshops of music and drama theaters, concert halls, record companies, and film studios.
A separate part of the program is devoted to education in the field of sound engineering. We invite teachers and students of the directions "Sound Engineering" and "Sound engineering skills" of higher and secondary educational institutions
Among the speakers of the symposium are world-renowned professionals: sound engineer of Elbphilharmonie (Hamburg, Germany), director, producer, balance specialist of the Polyhymnia International recording company Erdo Groot (the Netherlands); sound engineer of the Moscow Conservatory Mikhail Spassky; professor of the VGIK, the Moscow Conservatory, the Institute of Contemporary Art, chairman of the Guild of Sound Engineers of the Russian Musical Union Maria Soboleva.
The program of the symposium includes round tables on education in the field of sound engineering, practical aspects of concert sound engineering, algorithms for interaction with composers; master classes on restoration and archiving of sound recordings, mastering, studio sound engineering.
A unique part of the program is technical tours to the halls and studios of the Moscow Conservatory, the Bolshoi Theater, the Musical Theater, the famous "Tonstudio" of Mosfilm.
The full-cycle CineLab film studio, which is a permanent partner of the Pure Sound Award, will host master classes on studio recording and mastering for vinyl.
The bright focus of the symposium is the exhibition of sound equipment, where the partner companies of the Pure Sound award-Sennheiser, Yamaha, Nikfi, Oktava, and others-will demonstrate new products in the field of sound technologies.
Participation in the symposium is free of charge. Registration.
The symposium was held for the first time in October 2019. You can read about how it was here.


Cardamom ((elakkayഏലക്കായ്)) is one of the most valued spices with a colorful history dating back thousands of years. Grown in the Western Ghats in Kerala, Tamil Nadu and Karnataka. Cardamom has some amazing cultivation methods, processing techniques and a charming aroma.
Cardamom gives you that extra piquancy and aromatic flavor in both savory and sweet dishes. Its eloquence, culinary magic and healing powers have earned it the title "Queen of Spices".


text:
package discount

import (
	"fmt"

	stripe "github.com/stripe/stripe-go"
)

// Client is used to invoke discount-related APIs.
type Client struct {
	B   stripe.Backend
	Key string
}

// Del removes a discount from a customer.
// For more details see https://stripe.com/docs/api#delete_discount.
func Del(customerID string) (*stripe.Discount, error) {
	return getC().Del(customerID)
}

func (c Client) Del(customerID string) (*stripe.Discount, error) {
	discount := &stripe.Discount{}
	err := c.B.Call("DELETE", fmt.Sprintf("/customers/%v/discount", customerID), c.Key, nil, nil, discount)

	return discount, err
}

// DelSub removes a discount from a customer's subscription.
// For more details see https://stripe.com/docs/api#delete_subscription_discount.
func DelSub(customerID, subscriptionID string) (*stripe.Discount, error) {
	return getC().DelSub(customerID, subscriptionID)
}

func (c Client) DelSub(customerID, subscriptionID string) (*stripe.Discount, error) {
	discount := &stripe.Discount{}
	err := c.B.Call("DELETE", fmt.Sprintf("/customers/%v/subscriptions/%v/discount", customerID, subscriptionID), c.Key, nil, nil, discount)

	return discount, err
}

func getC() Client {
	return Client{stripe.GetBackend(stripe.APIBackend), stripe.Key}
}


Dinosaurs are fighting depression in the bush. That's according to some locals from Eromanga.
It's being called 'the new CWA' with women getting together, not to bake scones, but instead, to chip away at an ancient dinosaur bone.
Fiona Ferguson from Belombre Station and Wendy Groves from Cooma, Eromanga sat down with Elly Bradfield in a dry creek bed and explained how.
Original clip from ABC LOCAL RADIO soundcloud account.


Buchanan, R.E. 1917. Studies in the Nomenclature and Classification of the Bacteria: II. The Primary Subdivisions of the Schizomycetes. Journal of Bacteriology 2(2): 155–64. Online version and PDF. Reference page.
Эта страница в последний раз была отредактирована 2 марта 2019 в 19:58.


In a previous issue of the Journal, Richard Grimes discussed the role that legal clinics can play in facilitating access to justice in a post-‐conflict society, such as Afghanistan's, wracked by decades of civil war, external military intervention, and consequential regime changes. 1 ASIAN J. LEGAL EDUC. 71 (2014). As foreign military forces withdraw, this Central Asian nation faces renewed security concerns and uncertainty about its politico-‐economic future. Yet, there is now a critical mass of law and Shari'a professors trained in the principles of experiential education, a few legal clinics are in place, and many deans are keen on hosting a clinic, with a vigorous nod of approval from the higher education ministry. Piloting a clinical programme requires a team of faculty members who remain in continuous contact with their peers across the nation and across the globe. This should include a partnership with a reputable law school abroad; support from in-‐country administrative staff; and periodic visits by consultants.
In addition, legal faculties and university administrators need to nurture clinical education by facilitating the development of new curricula, service-‐learning, and interdisciplinary and inter-‐university collaboration and exchange. While they needn't reinvent policies, protocols or perhaps even priority assessments, they must remain vigilant that clinical legal education not be divorced from the rest of the curriculum. The temptation to purchase durable goods will be great, but the clinic staff should be much more strategic and frugal about ways for students, staff, and clients to access information and a space for consultation, training, and work. Finally, an essential but elusive goal is to maintain a relationship with donors that is marked by candour and coordination of activities with other funders.
3 Asian Journal of Legal Education _ (forthcoming 2016).


Costs less than double glazing, tinted or reflected glass. Visit our showroom at Solar Tinting Centre Wagga.
With Solar Gard solar control film installed on your office windows, you can save a lot on energy costs, maintain a more comfortable and productive environment, reduce interior fading and improve exterior appearance.
With Solar Gard window film installed on your home you can save significantly on energy costs. Once it is installed, the benefits keep coming year after year with durable, long-lasting Solar Gard window films.
A product that starts working for you the minute it's installed on your car, offering benefits beyond your needs. Solar Gard blocks up to 99% of damaging ultraviolet light and rejects as much as 61% of solar heat.
With over 30 years experience in the supply & installation of solar control films. Wagga Solar Tinting Centre will provide specialist advice to make certain that the choice of the product meets your requirements.
Our Safety films strengthen the glass and reduce the incident of breakage or serious Injury from flying shards by holding the smashed glass in place. Safety films are used in schools, day-care centres or other environments particularly where there are children.
Solar Tinting Centre's General Manager Rowan Laurent is a member of the International Window Film Association of Australia and New Zealand. This is testament to his product knowledge, standing and support throughout the industry.
Rowan's has the knowledge and expertise to give specialist advice, with skills that have been acquired from hands-on experience supported by regular seminars and training sessions over many years.
The results of the work at Solar Tinting Centre work can been seen at businesses and homes throughout Riverina towns and as far away as Canberra and Bendigo.


text:
DY SP GANAPATHY'S DEATH: ROLE OF CM, GEORGE & CID UNDER SCANNER
By P.T. Bopanna
As suspected from the beginning, it has now come to light that Siddaramaiah-led Congress government in Karnataka had allegedly tampered with evidence to shield the role of minister K.J. George (in picture) in the death of DY S.P., M.K. Ganapathy (in picture) who was found hanging in a lodge at Madikeri July last year.
In an investigation carried out by Times Now television channel, it has come to light from the forensic evidence that there was tampering of evidence in the case.
The advocate of the Ganapathy family which has gone to the Supreme Court demanding justice, has been quoted as saying: "The forensic report reportedly says that at least 335 contacts had been deleted from Ganapathy's phone, besides 2,400 photographs, 110 emails, 61 SMSs and 145 PDF documents. Call records pertaining to a prominent MLA and a minister too have been deleted but the CID had filed a closure report in the case."
In the light of the new evidence, state BJP president B S Yeddyurappa has alleged that the chief minister was protecting minister George. Yediyurappa added that a BJP delegation will call on Union home minister Rajnath Singh on August 26 and apprise him on the need for a CBI inquiry.
Ganapathy's brother M. K. Machaiah has gone on record to say that the family has no faith in the state's investigating agencies. "We have been asking the state government to hand over the case to the CBI but it never did and always maintained that it was a suicide. The Forensic Science Laboratory (FSL) report has proved that the CID officers destroyed crucial evidence to shield ministers and officers."
From the beginning, the Karnataka government used every dirty trick in its bag to save George, said to be the main fund-raiser in Karnataka for the Sonia Gandhi-led Congress party.
However, the government's plans came a cropper as the Kodagu Additional Judicial Magistrate Annapurneshwari ordered Madikeri police to file an FIR against George, Additional Director General of Police (Intelligence) A.M. Prasad and Lokayukta Inspector General of Police Pranob Mohanty on a private complaint filed by Ganapathi's elder son Nehal.
The Karnataka CID police which was entrusted with the investigation, submitted a 'B' report, citing lack of evidence over harassment charges levelled by Ganapathi against George and the IPS officers Pronab Mohanty and A.M. Prasad.
Soon after the 'B' report was submitted, George was re-inducted into the Cabinet by Siddarmaiah last September, raising suspicion on the haste in which he was brought back to the Cabinet.
With the latest disclosure made in the FSL report, it is not just George and Siddarmaiah, but also the CID will come under the scanner for alleged tampering of evidence and giving a clean chit without taking into consideration the forensic evidence. Only a CBI inquiry can bring out the truth behind the death of Dy SP Ganapathy.
HALF-BAKED IDEA: 'FLOATING AIRPORT' TO COME UP IN COORG?
DISASTER IN COORG: KUMARASWAMY GOVT RUBS SALT IN THE WOUND
IMMEDIATE THREAT TO KODAGU IS FROM 'DATY EXPRESS' & PRATAP SIMHA
CLOUD SEEDING BEGINS IN KARNATAKA AFTER GOVT ALLOWS FOREST LOOT
By P.T. Bopanna The Siddaramaiah-led Congress government in Karnataka which backed the Kerala timber lobby to loot timber in the...


The Hubbard Police Department has a staff that consists of a Chief of Police, one Sergeant, three full-time officers, ten reserve officers, one administrative assistant and one senior volunteer. The Hubbard Police Department uses three patrol cars and four patrol bicycles. Two square miles are patrolled 7 days a week, 24 hours a day.


text:
BHI Energy Adds Two Strategic Finance Executives
Home/Energy & Infrastructure/BHI Energy Adds Two Strategic Finance Executives
BHI Energy Adds Two Strategic Finance ExecutivesCarterBaldwin2022-07-15T15:21:31+00:00
CarterBaldwin Executive Search announces the appointment of two strategic finance executives at BHI Energy, an industry-leading specialty services and staffing solutions provider to the industrial/oil & gas, power generation, and transmission & distribution markets.
Steven Fergus joins BHI's Transmission and Distribution Construction Services division from INROCK, a global performance drilling tools, equipment, and services company owned by Sandvik (OTCMKTS: SDVKY), where he served as Senior Director of Finance, charged with building the controls, reporting, and governance necessary for a publicly-traded company. Before his time at INROCK, he served as Senior Business Manager/Project Controls Manager for VOLT Power, LLC, a top provider of overhead and underground utility services. Steven started his career as an audit associate at PricewaterhouseCoopers. He graduated summa cum laude from Texas A&M University with a BA in accounting and an MS in finance.
Sam Yohannes brings broad finance and accounting experience in the energy space across wind, solar, transmission, and distribution to his finance role in BHI's Transmission and Distribution Engineering Services division. Sam joins BHI from Day & Zimmerman, a construction & engineering, staffing, and defense solutions provider for corporations and governments around the world. There, he served as Director of Finance, Projects, and Construction and was charged with guiding the company through a transition to a more project-oriented model and developing new commercial structures to drive growth. Sam was born in Ethiopia and immigrated to the US when he was eleven. He holds a BA in finance and banking from Lincoln University.
These newly-created roles will support BHI's aggressive growth in the Transmission and Distribution (T&D) space. The company has made four of its last five acquisitions in T&D in the previous three years and expects to continue growing through strategic investments and advancing scale. These roles will be charged with maximizing the financial returns for the growth engine of BHI, allowing the business to continue to expand its offerings with existing customers, leverage capital investment, and enter new markets.
About BHI Energy
BHI Energy is a broad umbrella organization with a complete service offering covering all facets of Power Generation through the entire Electrical Delivery system. For over 40 years, their diverse services have focused on multiple end markets, united by their level of service and quality, their unique partnership approach to customer relationships, and their internal culture of interacting with and supporting each other.
BHI provides industry-leading specialty services and staffing solutions to the industrial/oil & gas, power generation, and transmission & distribution markets. In addition to offering select specialty services, BHI also can bundle individual offerings into a fully integrated platform. This platform provides customers with the quality of a specialty services provider with the coordination and cost savings of a fully integrated service provider. BHI delivers quality and cost-effective solutions to customers by leveraging its top leadership along with its highly skilled workforce, which includes more than 8,500 experienced project management and technical, professional, and craft labor operating at over 130 global project locations.
Delta-Montrose Electric Association Names Jack Johnston New Chief Executive Officer
Todd Hillman Named Chief Executive Officer for Sunflower Electric Power Corporation
Georgia System Operations Corporation Names Nathan Brown Chief Operating Officer
RPC Names Michael Schmit Chief Financial Officer and Corporate Secretary
BARC Board Appoints Bill Buchanan as New Chief Executive Officer


Democrats, backed by most public polling, have repeated that they will not give Trump wall funding and will not negotiate until the government reopens. Trump's offer on Saturday was described by various media outlets citing White House sources as an attempt to restart talks.
Seems to me that since Trump is only offering temporary protection for Dreamers for three years it's fair that he should only build a temporary wall that would be dismantled after three years.
Lego wall, they have some with turrets and catapults..?
Rope sprayed with hair gel?
If you haven't figured it out yet, the White House talkin point is "generous compromise."
They're holding a pair of twos.
Hey Mister! I'll give you three whole quarters for one measly dollar... whaddya say?
I can see the Dreamers For Trump KAG 2020 bumper stickers flying off the press. I doubt these hot blooded young people will forget the Ice Queen threw them under the bus for her power game.
Are you referring to the present moment?
Where a temporary lease on life was offered in exhcange for a construction project?
Or are you referencing some other negotiation held the last time Pelosi swung the gavel?
You may need to work for this one.
Everybody knows that is not true. You're as phony as a Russian orphan meeting in Trump Tower.
Democrats created DACA, Trump ended it as fodder for his rabid racist Base, a bunch of bigots and imbeciles like you. Trump has 800,000 federal emp!oyees hostage, then he throws in a million dreamers.
The Roberts court refused to end DACA, it's safe for another year at least.


Enjoy your planning and revel even more with All 0 Promocode.club's great Kultur promotion codes!
Choose a Kultur coupon you would like to use from Promocode.club. Press use Kultur code box, which is located just below. Now your web browser should copy the All 0 Kultur code for you, although it is best to make sure and copy it manually. The http://www.kulturvideo.com web page will open in a new window for you. Go to their Kultur checkout section and find the Promotional Keycode box. Paste your Kultur coupon code there and click apply.


text:
Scrobipalpa distincta is a moth in the family Gelechiidae. It was described by Oleksiy V. Bidzilya and Hou-Hun Li in 2010. It is found in China in Gansu, Ningxia and Henan.

Etymology
The species name refers to the distinctive genitalia and external characters of the new species and is derived from Latin distinctus (meaning separate, different).

References

Scrobipalpa
Moths described in 2010

redpajama_set_name: RedPajamaWikipedia


text:
Lojinx home page
Welcome Fred Abbott
We're excited to announce that Fred Abbott has joined the Lojinx family and that The Guardian have premiered his debut track Funny How Good It Feels today.
Fred is a London-based musician until now best known as lead guitarist and keyboard player in the recently disbanded Noah And The Whale (NME|BBC|Independent).
Fred's debut solo album "Serious Poke", will be released on Lojinx in July. He enlisted the help of his Noah And The Whale compadres and other friends for the recording of the album, with sessions taking place at West London's British Grove Studios over the past year. The album was co-produced by Fred with Martin Hollis, whose diverse credits include Grinderman, The Rolling Stones and Take That.
Listen and download, for free, Funny How Good It Feels here. Free download here.
<< back to news
Share notizie - welcome fred abbott
A proposito di Lojinx
Lojinx è una etichetta discografica indipendente britannica con sede a Londra.


One of the most important things to come out of the iPhone a few years ago (and almost by accident) was the App Store, the place where all iOS device users get their apps from (unless you have a jailbroken iPhone of course).
While at the beginning it was very unexciting and plagued by navigation problems, the App Store has improved dramatically over the past few years to become a great place to browse, discover and download the latest games and apps for your iOS devices.
Still, why just browse and download casually when you can use the following suggestions to have a much better experience of what the App Store has to offer and also take advantage of some of its sweetest deals before they expire?
Easily one of the better aspects of the App Store is how often it is updated. Applications are reviewed, accepted and included in the App Store every day. So it is very likely that the very same search you perform now might have a couple of extra results the next time you perform it.
On top of that, its featured items, staff picks and top charts are also updated at least once a week, which makes it definitely worth your while browsing often.
Needless to say, the App Store offers some great apps and games that are completely free. But not just that, it also features some paid apps and games for users to download every week completely free of charge. So make sure to visit the Free section of the App Store's Top Charts, as well as its featured Free App of the Week for great finds.
With so many apps and games being submitted and published on the App Store every day, even the store's navigation can't get everything sorted out perfectly and on time.
Because of this, several sites on the web do the heavy-lifting for you and filter all this content to offer the best deals and free offers for both apps and games. Simply search the web for "app deals" and you will find sites like IGN's daily newsletter or App Shopper, which feature the latest discounts and great deals on app and games, in most cases even updated hourly.
We've all read the horror stories of parents having to pay hundreds and even thousands of dollars because of their kids buying buying items uncontrollably via in-app purchases in some of their favorite games. Naturally, it is not Apple's job to parent someone else's kids. So it falls upon us to ensure our wallets don't end up dry because of someone else using our iTunes account to purchase countless items from within an app.
Thankfully, you can disable in-app purchases on your iPhone or any iOS device by simply going to Settings > General > Restrictions and then by tapping Enable Restrictions. After authenticating with your passcode, scroll down and turn In-App Purchases OFF.
So now you know. The App Store has really a lot more to offer than what you can see at first, so make sure you make the most of every visit.


text:
"""
Writing to a textfile:
1. open the file as either "w" or "a"
   (write or append)

2. write the data
"""

with open("hello.txt", "w") as fout:
    fout.write("Hello World\n")

with open("/etc/shells", "r") as fin:
    with open("hello.txt", "a") as fout:
        for line in fin:
            fout.write(line)


text:
<?php

/**
 * TODO:
 *
 * optional buffering on disk rather than in RAM
 * Use of ../ within a URL should be allowed (and automatically resolved) for ease of coding
 *
 * A stream wrapper for Amazon S3 based on Amazon's offical PHP API.
 * Amazon S3 files can be accessed at s3://bucketname/path/to/object. Unlike other
 * wrappers, this wrapper supports opendir/readdir/closedir for any subdirectory level
 * (to the limit of S3 key length). Although S3 does not have a concept exactly matching
 * subdirectories, it can do prefix matches and return common prefixes, which is just as good.
 * Just keep in mind that you don't really have to create or remove directories. mkdir and rmdir
 * return success and do nothing (however, rmdir fails if the "directory" is not empty in order to
 * better emulate what regular filesystems do since some code may rely on this behavior).
 * Any subdirectories returned by readdir() have a trailing / attached to allow both your code
 * and the stat() function to distinguish them from files without an expensive network call.
 *
 * THERE IS A 5GB LIMIT ON EACH FILE, AND YOUR PHP MEMORY LIMIT WILL PROBABLY STOP YOU LONG
 * BEFORE YOU GET THERE, since currently everything is read and written as a complete file and
 * buffered in its entirety in memory. I'm looking into changing this, but one step at a time.
 *
 * Usage (with a public ACL so people can see your files via the web):
 *
 * $wrapper = new aS3StreamWrapper();
 * $wrapper->register(array('key' => 'xyz', 'secretKey' => 'abc', 'region' => AmazonS3::REGION_US_E1, 'acl' => AmazonS3::ACL_PUBLIC));
 * Now fopen("s3://mybucket/path/to/myobject.txt", "r") and friends work.
 *
 * You can get buffering of the first 8K of every file and the stat() results in a local cache by passing a
 * cache option, which must be an object supporting get($key) and set($key, $value, $lifetime_in_seconds)
 * (such as any implementation of sfCache). This cache must be consistently consulted by all
 * servers of course or it will not work properly
 *
 * Built for Apostrophe apostrophenow.com
 *
 * @class aS3StreamWrapper
 * @license BSD
 * @author tom@punkave.com Tom Boutell of P'unk Avenue
 */

require dirname(__FILE__) . '/../../../aws-sdk/sdk.class.php';
require dirname(__FILE__) . '/aS3StreamWrapperMimeTypes.class.php';

class aS3StreamWrapper
{
  /**
   * Create an object of this class with new and then call register() on it.
   *
   * Internal dev note: supposedly the constructor of a stream wrapper does not get called
   * except on stream_open, so keep that in mind
   */
  public function __construct()
  {
  }

  /**
   * Options specified in the register() call. These can be overridden
   * for individual streams using a stream context
   */
  static protected $protocolOptions;
  static protected $registeredInstances = array();
    static protected $statCache;
  /**
   * Stream context, set by fopen and friends if stream_create_context was used.
   * We can call stream_context_get_options on this
   */
  public $context;

  /**
   * Final set of options arrived at by merging the above
   */
  protected $options;

  /**
   * Protocol name. This is usually s3 but you can register more than one, and
   * we use this to distinguish sets of options. Usually $this->init() sets this
   * from the $path but the rename() operation, which takes two paths, sets it
   * on its own
   */
  protected $protocol;

  /**
   * Returns options set at register() time, unless overridden by
   * options set with stream_context_create() for this particular stream.
   * Looks for options in the 's3' key of the array passed to stream_context_create()
   */

  protected function getOption($o, $default = null)
  {
    if (!isset($this->options))
    {
      $this->options = array();
      if (isset(self::$protocolOptions[$this->protocol]))
      {
        $this->options = self::$protocolOptions[$this->protocol];
      }
      if ($this->context)
      {
        $streamOptions = stream_context_get_options($this->context);
        if (isset($streamOptions['s3']))
        {
          $this->options = array_merge($this->options, $streamOptions['s3']);
        }
      }
    }
    if (isset($this->options[$o]))
    {
      return $this->options[$o];
    }
    return $default;
  }

  protected function getRegion()
  {
    return $this->getOption('region', AmazonS3::REGION_US_E1);
  }

  /**
   * Register the stream wrapper. Options passed here are available to
   * the stream wrapper methods at any time via getOption. Note that you can
   * register two different s3 "protocols" with different credentials (the default
   * protocol name is s3).
   *
   * The following options are required, either here or in stream_create_context:
   * 'key', 'secretKey'
   *
   * The optional 'region' option specifies what Amazon S3 region to create
   * new buckets in, if you choose to create buckets with mkdir() calls.
   * It defaults to AmazonS3::REGION_US_E1. See services/s3.class.php in the SDK
   *
   * The optional 'protocol' option changes the name of the protocol from s3 to
   * something else. You can register multiple protocols
   *
   */
  public function register(array $options = array())
  {
    // Every protocol gets its own set of options
    $protocol = isset($options['protocol']) ? $options['protocol'] : 's3';
    self::$protocolOptions[$protocol] = $options;
    self::$registeredInstances[$protocol] = $this;
    stream_wrapper_register($protocol, get_class($this));
  }

  /**
   * Directory listing data doled out by readdir
   */
  protected $dirInfo = false;

  /**
   * Offset into directory data
   */
  protected $dirOffset = 0;

  /**
   * Array with protocol, bucket and path keys once init() is called successfully
   */
  protected $info = false;

  /**
   * Amazon S3 service objects. Usually just one exists but if you make
   * requests with custom credentials via a stream context or multiple
   * protocol registrations more than one can be created
   */
  static protected $services = array();

  /**
   * Bust up the path of interest into its component parts.
   * The "site" name must be a bucket name. The path (key) will
   * always be at least / for consistency
   */
  protected function init($path)
  {
    $info = $this->parse($path);
    if (!$info)
    {
      return false;
    }
    $this->info = $info;
    $this->protocol = $info['protocol'];
    return true;
  }

  protected function parse($path)
  {
    $info = array();
    $parsed = parse_url($path);
    if (!$parsed)
    {
      return false;
    }
    $info['protocol'] = $parsed['scheme'];
    $info['bucket'] = $parsed['host'];
    // No leading / in S3 (otherwise our public S3 URLs are strange)
    if (isset($parsed['path']))
    {
      $info['path'] = substr($parsed['path'], 1);
      // Lame: substr() returns false, not the empty string, if you
      // attempt to take an empty substring starting right after the end
      if ($info['path'] === false)
      {
        $info['path'] = '';
      }
    }
    else
    {
      $info['path'] = '';
    }
    // Consecutive slashes make no difference in the filesystems we're emulating here
    $info['path'] = preg_replace('/\/+/', '/', $info['path']);
    return $info;
  }

  /**
   * Allow separate S3 objects for separate credentials but don't
   * make redundant S3 objects
   */
  protected function getService()
  {
    $key = $this->getOption('key', '');
    $secretKey = $this->getOption('secretKey', '');
    $token = $this->getOption('token', '');
    $id = $key . ':' . $secretKey . ':' . $token;
    if (!isset(self::$services[$id]))
    {
      $options = array('certificate_authority' => true);
      if (!empty($key)) $options['key'] = $key;
      if (!empty($secretKey)) $options['secret'] = $secretKey;
      if (!empty($token)) $options['token'] = $token;

      self::$services[$id] = new AmazonS3($options);
    }
    return self::$services[$id];
  }

    public static function getAWSServiceForProtocol($protocol){
        if(isSet(self::$registeredInstances[$protocol])){
            return self::$registeredInstances[$protocol]->getService();
        }
        return null;
    }

  protected $dirResults = null;
  protected $dirPosition = 0;

  /**
   * Implements opendir(). Pulls a list of "files" and "directories" at
   * $path from S3 and preps them to be returned one by one by readdir().
   * Note that directories are suffixed with a / to distinguish them
   */
  public function dir_opendir ($path, $optionsDummy)
  {

    if (!$this->init($path))
    {
      return false;
    }
    $this->dirResults = $this->getDirectoryListing($this->info);
    if ($this->dirResults === false)
    {
      $this->dirResults = null;
      return false;
    }
    $this->dirPosition = 0;
    return true;
  }

  /**
   * Set up options array for a call to list_objects. If delimited
   * is true, return "subdirectories" plus "files" at this level,
   * rather than all objects
   */
  protected function getOptionsForDirectory($options = array())
  {
    $s3Options = array();
    // Usually the path is the single path this operation cares about, but not always
    $path = isset($options['path']) ? $options['path'] : $this->info['path'];
    // Append a / unless we are listing items at the root
    if (strlen($path) && (!preg_match('/\/$/', $path)))
    {
      $path .= '/';
    }
    $s3Options['prefix'] = $path;
    if (isset($options['delimited']) && (!$options['delimited']))
    {
      // No delimiter wanted (for instance, we want a simple "are there any files darn it" test on just one XML query)
    }
    else
    {
      // Normal case: return everything in the same "subdirectory" as a subdirectory
      $s3Options['delimiter'] = '/';
    }
    return $s3Options;
  }

  protected function getDirectoryListing($info = null, $options = array())
  {
    if ($info === null)
    {
      $info = $this->info;
    }
    $options = $this->getOptionsForDirectory(array_merge($options, array('path' => $info['path'])));
		$results = array();

    // Markers can be fetched more than once according to the spec, don't return them twice,
    // but don't blindly assume we scan skip the first result either in case they surprise us
    $have = array();

		do
		{
			$list = $this->getService()->list_objects($info['bucket'], $options);
			if (!$list->isOK())
			{
			  return false;
			}
            self::$statCache[$info["bucket"]."-".$info["path"]] = $list->body->to_array();
			$keys = $list->body->query('descendant-or-self::Prefix');
			if ($keys)
			{
  			foreach ($keys as $key)
  			{
  			  $key = (string) $key;
  			  if (strlen($key) <= strlen($options['prefix']))
  			  {
  			    // S3 tells us about the directory itself as a prefix, which is not interesting
  			    continue;
  			  }
  			  // results of readdir() do not include the path, just the basename
  			  $key = substr($key, strlen($options['prefix']));
  			  if (!isset($have[$key]))
  			  {
    			  // Make sure there is no XML object funny business returned
    			  // Leave the delimiter attached, it allows us to identify
    			  // directories without more network calls
    			  $results[] = $key;
    			  $have[$key] = true;
    			}
  			}
  		}
			// Files
			$keys = $list->body->query('descendant-or-self::Key');
			if ($keys)
			{
  			foreach ($keys as $key)
  			{
  			  $key = (string) $key;
  			  // results of readdir() do not include the path, just the basename
  			  if (strlen($key) <= strlen($options['prefix']))
  			  {
  			    // If something is both a file and a directory - possible in s3 where directories
  			    // are virtual - it could show up in its own listing. This tends to result in
  			    // nasty infinite loops in recursive delete functions etc. Defend against this by
  			    // not returning it
  			    continue;
  			  }
  			  $key = substr($key, strlen($options['prefix']));

  			  if (!isset($have[$key]))
  			  {
    			  // Make sure there is no XML object funny business returned
    			  $results[] = (string) $key;
    			  $have[$key] = true;
    			}
  			}
  		}
  		// Pick up where we left off
      /**
       * Make sure that you send the correct marker not just the last file in the list
       * 2012-04-05 Giles Smith <tech@superrb.com>
       */
			$options = array_merge($options, array('marker' => $list->body->NextMarker));
		} while (((string) $list->body->IsTruncated) === 'true');
    return $results;
  }

  /**
   * Implements readdir(), reading the name of the next file or subdirectory
   * in the directory or returning false if there are no more or opendir() was
   * never called. Subdirectories returned are suffixed with '/' to distinguish them
   * from files without repeated API calls
   */
  public function dir_readdir()
  {
    if (isset($this->dirResults))
    {
      if ($this->dirPosition < count($this->dirResults))
      {
        return $this->dirResults[$this->dirPosition++];
      }
    }
    return false;
  }

  /**
   * Implements closedir(), closing the directory listing
   */
  public function dir_closedir()
  {
    //self::$statCache = null;
    $this->dirResults = null;
    $this->dirPosition = 0;
    return true;
  }

  /**
   * Rewind to start of directory listing so we can start calling
   * readdir again from the top
   */
  public function dir_rewinddir()
  {
    if (isset($this->dirResults))
    {
      $this->dirPosition = 0;
      return true;
    }
    return false;
  }

  /**
   * Implements mkdir for the s3 protocol
   * Make a directory. If $path is s3://bucketname or s3://bucketname/
   * with no subdirectory name, we attempt to create that bucket and
   * return failure if it already exists or it otherwise cannot be made.
   * Buckets are created in the region specified by the
   * region option when register() is called, defaulting to
   * AmazonS3::REGION_US_E1 (see services/s3.class.php in the SDK).
   *
   * If there is a subdirectory name, we always return success since
   * you don't really have to create common prefixes with S3, they
   * just work. Note that in this case we assume the bucket already exists for
   * performance reasons (if it isn't you'll find out soon enough when
   * you try to manipulate files or read directory contents).
   */
  public function mkdir($path, $mode, $options)
  {
    if (!$this->init($path))
    {
      return false;
    }
    $path = $this->info['path'];
    if ($path === '')
    {
      return $this->getService()->create_bucket($this->info['bucket'], $this->getRegion())->isOK();
    }else{
        $this->getService()->create_object($this->info['bucket'], $path.'/.create', array("body" => "empty"));
    }

    // Subdirectory creation always succeeds because subdirectories are implemented
    // using the prefix/delimiter mechanism, which doesn't require creating anything first
    return true;
  }

  /**
   * Implements rmdir for the s3 protocol
   * Remove a directory. If the URL is s3://bucketname/ or just s3://bucketname we
   * attempt to remove the entire bucket, returning failure if it is not empty or
   * otherwise not a valid bucket to delete. If the URL has a subdirectory in it,
   * we just return success as long as the subdirectory is not empty, because this is what
   * other file systems do, and some code may use it as a test. S3 doesn't really
   * need us to physically delete a "directory" since it does not have directory
   * objects, just a prefix/delimiter mechanism for queries. But let's emulate
   * the semantics as closely as possible
   */
  public function rmdir($path, $options)
  {
    if (!$this->init($path))
    {
      return false;
    }

    $path = $this->info['path'];
    if ($path === '')
    {
      // On success this returns a CFResponse, on failure it returns false.
      // Convert the CFResponse to plain old true
      return !!$this->getService()->delete_bucket($this->info['bucket']);
    }
    if ($this->hasDirectoryContents())
    {
      return false;
    }

    return true;
  }

  protected function hasDirectoryContents()
  {
    $list = $this->getService()->list_objects($this->info['bucket'], array_merge($this->getOptionsForDirectory(array('delimited' => false)), array('max-keys' => 1)));
    $keys = $list->body->query('descendant-or-self::Key');
    return !!count($keys);
  }

  /**
   * Implement unlink() for the s3 protocol. Removes files only, not folders or buckets
   * (see rmdir()).
   */

  public function unlink($path)
  {
    if (!$this->init($path))
    {
      return false;
    }
    $this->deleteCache();
    return $this->getService()->delete_object($this->info['bucket'], $this->info['path'])->isOK();
  }

  /**
   * Implement rename() for the s3 protocol
   * Rename a file or directory. WARNING: S3 does NOT have a native rename feature,
   * so this method must COPY EVERYTHING INVOLVED. If you rename a bucket, the
   * ENTIRE BUCKET MUST BE COPIED. If you copy a subdirectory, everything in that
   * subdirectory must be copied, etc. That equals a lot of S3 traffic.
   *
   * For safety, this method does not delete the old material at $from until the copy operation has
   * completely succeeded.
   *
   * If, after the copy has completely succeeded, there are errors during the deletion
   * of the source or its contents, this method returns false but the new copy remains
   * in place along with whatever portions of the old copy could not be removed. Otherwise
   * you could be left with no way to recover a portion of your data.
   *
   * THERE IS A 5GB LIMIT ON THE SIZE OF INDIVIDUAL OBJECTS INVOLVED IN A rename() OPERATION.
   * This is a limitation of the copy_object API in Amazon S3.
   */

  public function rename($from, $to)
  {
    $fromInfo = $this->parse($from);
    if (!$fromInfo)
    {
      return false;
    }
    $this->protocol = $fromInfo['protocol'];
    $toInfo = $this->parse($to);
    if (!$toInfo)
    {
      return false;
    }
    if ($fromInfo['protocol'] !== $toInfo['protocol'])
    {
      // You cannot "rename" across protocols
      return false;
    }

    $service = $this->getService();

    // See if this is a simple copy of an object. If $from is an object rather than a bucket or
    // subdirectory then this operation will succeed. Don't try this if either from or to is
    // the root of a bucket

    if (strlen($fromInfo['path']) && strlen($toInfo['path']))
    {
      if ($service->copy_object(array('bucket' => $fromInfo['bucket'], 'filename' => $fromInfo['path']),
        array('bucket' => $toInfo['bucket'], 'filename' => $toInfo['path']), array('acl' => $this->getOption('acl')))->isOK())
      {
        // Make sure we reset the mime type based on the new file extension.
        // Otherwise added extensions like .tmp tend to mean everything winds up
        // application/octet-stream even after it is renamed to remove .tmp
        if (!$service->change_content_type($toInfo['bucket'], $toInfo['path'], $this->getMimeType($toInfo['path']))->isOK())
        {
          $service->delete_object($toInfo['bucket'], $toInfo['path']);
          return false;
        }
        // That worked so delete the original
        $this->deleteCache($fromInfo);
        if ($service->delete_object($fromInfo['bucket'], $fromInfo['path'])->isOK())
        {
          return true;
        }
        // The delete failed, but the copy succeeded. No way to be that specific in our error message
        return false;
      }
    }

    $createdBucket = true;

    // If $to is the root of a bucket, create the bucket
    if ($toInfo['path'] === '')
    {
      if (!$service->create_bucket($toInfo['bucket'], $this->getRegion())->isOK())
      {
        return false;
      }
    }

    // Get a full list of objects at $from

    $objects = $this->getDirectoryListing($fromInfo, array('delimited' => false));
    if ($objects === false)
    {
      if ($createdBucket)
      {
        $service->delete_bucket($toInfo['bucket']);
      }
      return false;
    }

    $fromPaths = array();
    $toPaths = array();
    foreach ($objects as $object)
    {
      if (strlen($fromInfo['path']))
      {
        $fromPaths[] = $fromInfo['path'] . '/' . $object;
      }
      else
      {
        $fromPaths[] = $object;
      }
      if (strlen($toInfo['path']))
      {
        $toPaths[] = $toInfo['path'] . '/' . $object;
      }
      else
      {
        $toPaths[] = $object;
      }
    }

    // and copy them all to $to

    for ($i = 0; ($i < count($objects)); $i++)
    {
      // Make sure we reset the mime type based on the new file extension.
      // Otherwise added extensions like .tmp tend to mean everything winds up
      // application/octet-stream even after it is renamed to remove .tmp
      if ((!$service->copy_object(array('bucket' => $fromInfo['bucket'], 'filename' => $fromPaths[$i]),
        array('bucket' => $toInfo['bucket'], 'filename' => $toPaths[$i]),
        array('acl' => $this->getOption('acl'), 'contentType' => $this->getMimeType($toPaths[$i])))->isOK()) ||
        (!$service->change_content_type($toInfo['bucket'], $toPaths[$i], $this->getMimeType($toPaths[$i]))))
      {
        for ($j = 0; ($j <= $i); $j++)
        {
          $service->delete_object($toInfo['bucket'], $toPaths[$j]);
        }
        if ($createdBucket)
        {
          $service->delete_bucket($toInfo['bucket']);
        }
        return false;
      }
    }

    // BEGIN DELETION UNDER THE ORIGINAL NAME

    // Once we get started with the deletions of the old copy it is better not to delete the
    // new copy if something goes wrong, because then we have no copies at all.

    for ($i = 0; ($i < count($objects)); $i++)
    {
      $this->deleteCache(array_merge($fromInfo, array('path' => $fromPaths[$i])));
      if (!$service->delete_object($fromInfo['bucket'], $fromPaths[$i])->isOK())
      {
        return false;
      }
    }

    // If $from is the root of a bucket delete the old bucket
    if ($fromInfo['path'] === '')
    {
      if (!$service->delete_bucket($fromInfo['bucket']))
      {
        return false;
      }
    }
    return true;
  }

  /**
   * s3 does not have a select() operation, so we can't cast to a resource
   */
  public function stream_cast ($cast_as)
  {
    return false;
  }

  /**
   * Data to be written to or read from a stream. Alas S3's limited semantics pretty much
   * require we read or write the entire object at a time (even if it's massive) which leads
   * to practical limitations due to memory usage. Possibly we can use multipart upload later
   * to ameliorate this in the case of writing big new objects
   * https://forums.aws.amazon.com/thread.jspa?threadID=10752&start=25&tstart=0
   */
  protected $data = null;

  /**
   * Offset into the data of the seek pointer at this time
   */
  protected $dataOffset = 0;

  /**
   * True if the data was modified in any way and therefore we must write on close
   */
  protected $dirty = false;

  /**
   * Whether we are expecting read operations
   */
  protected $read = false;

  /**
   * Whether we are expecting write operations
   */
  protected $write = false;

  /**
   * When a cache is configured, we cache the first 8K block of each file whenever
   * possible to avoid unnecessary slow S3 calls for things like getimagesize()
   * or exif_read_info() etc. etc. stream_open sets $this->start to that initial
   * block of 8K bytes (or less, if the file is smaller than 8K bytes) as retrieved
   * from the cache
   */
  protected $start = null;

  /**
   * When a cache is configured, we also cache the results of stat() for quick
   * access
   */
  protected $stat = null;

  /**
   * After the first block is read from $this->start there must be a hint to the
   * next stream_read call to call $this->fullRead() and move the pointer to the
   * 8K boundary. This is that hint
   */
  protected $afterStart = false;

  /**
   * If a stream_seek is attempted to somewhere other than byte 0, we need to
   * give up on the start cache - that is, if they actually read from that point
   * in the stream. However we don't want to give up right away in case the caller
   * is just implementing the fseek(SEEK_END) ... ftell()... fseek(SEEK_SET)
   * pattern to measure the length and then come back to the top because they are
   * afraid to use stat() (I'm looking at you, exif_read_file)
   */
  protected $startSeeking = false;

  /**
   * Opens a stream, as in fopen() or file_get_contents()
   */
  public function stream_open ($path, $mode, $options, &$opened_path)
  {
    if (!$this->init($path))
    {
      return false;
    }
    $end = false;
    $create = false;
    $modes = array_flip(str_split($mode));

    if (isset($modes['r']))
    {
      $this->read = true;
      $this->write = false;
    }
    elseif (isset($modes['a']))
    {
      $this->read = true;
      $this->write = true;
      $end = true;
      $create = true;
    }
    elseif (isset($modes['w']))
    {
      // Read nothing in, get ready to write to the buffer
      $this->read = false;
      $this->write = true;
      $create = true;
    }
    elseif (isset($modes['x']))
    {
      $this->read = false;
      $this->write = true;
      $create = true;
      $response = $this->getService()->get_object_headers($this->info['bucket'], $this->info['path']);
      if ($response->isOK())
      {
        // x does not allow opening an existing file
        return false;
      }
    }
    elseif (isset($modes['c']))
    {
      $this->read = false;
      $this->write = true;
      $create = true;
    }
    else
    {
      // Unsupported mode
      return false;
    }
    if (isset($modes['+']))
    {
      $this->read = true;
      $this->write = true;
    }
    $this->data = '';
    $this->dataOffset = 0;
    $this->dirty = false;
    if ($this->read && (!$this->write) && (!$end))
    {
      // Read-only operations support an optional cache of the first 8K block so that
      // repeated operations like getimagesize() can succeed quickly. Note that
      // PHP fread()s in 8K blocks
      $cacheInfo = $this->getCacheInfo();
      if ($cacheInfo)
      {
        $this->stat = $cacheInfo['stat'];
        $this->start = $cacheInfo['start'];
        return true;
      }
    }
    if ($this->read || isset($modes['c']))
    {
      $result = $this->fullRead();
      if (!$result)
      {
        if ($end)
        {
          // It's OK if an append operation starts a new file
          // Mark it dirty so we know the creation of the file is needed even if
          // nothing gets written to it
          $this->dirty = true;
          return true;
        }
        else
        {
          // Otherwise failure to find an existing object here is an error
          return false;
        }
      }
      else
      {
        if ($end)
        {
          $this->dataOffset = strlen($this->data);
        }
      }
    }
    else
    {
      // If we are not reading, and creating missing files is
      // implied by the mode, then make sure we mark the file dirty
      // so that we upload it even if 0 bytes are written
      if ($create)
      {
        $this->dirty = true;
      }
    }
    return true;
  }

  /**
   * Fetch and unserialize cache contents for the specified file or the
   * file indicated by $this->info
   */

  protected function getCacheInfo($info = null)
  {
    if (is_null($info))
    {
      $info = $this->info;
    }
    $cache = $this->getCache();
    if ($cache)
    {
      $info = $cache->get($this->getCacheKey($info));
      if (!is_null($info))
      {
        $info = unserialize($info);
        return $info;
      }
    }
    return null;
  }

  /**
   * cache key for a given protocol/bucket/path
   */
  protected function getCacheKey($info = null)
  {
    if ($info === null)
    {
      $info = $this->info;
    }
    return $info['protocol'] . ':' . $info['bucket'] . ':' . $info['path'];
  }

  protected function fullRead()
  {
    $result = $this->getService()->get_object($this->info['bucket'], $this->info['path']);
    if (!$result->isOK())
    {
      return false;
    }
    $this->data = (string) $result->body;
    /**
     * Theoretically redundant, but if S3 files are created by a non-cache-aware tool this lets us
     * gradually roll that information into the cache
     */
    $this->updateCache();
    return true;
  }

  protected function updateCache()
  {
    // Cache the first 8K and the stat() results for future calls, if desired
    $cache = $this->getCache();
    if ($cache)
    {
      $cache->set($this->getCacheKey(), serialize(array('start' => substr($this->data, 0, 8192), 'stat' => $this->getStatInfo(false, strlen($this->data), time()))), 365 * 86400);
    }
  }

  protected function deleteCache($info = null)
  {
    $cache = $this->getCache();
    if ($cache)
    {
      $cache->remove($this->getCacheKey($info));
    }
  }

  protected function getCache()
  {
    if ($this->getOption('cache'))
    {
      return $this->getOption('cache');
    }
    return null;
  }

  /**
   * Close a stream opened with stream_open. Implements fclose() and is also closed by
   * file_put_contents and the like
   */
  public function stream_close()
  {
    if (is_null($this->data))
    {
      // No stream open
      return false;
    }
    $result = $this->stream_flush();
    // If this distresses you should call fflush separately first and make sure it works.
    // That's necessary with any filesystem in principle although we rarely bother
    // to check with the regular filesystem (and then we get busted by "disk full")
    $this->data = null;
    return $result;
  }

  /**
   * Flush any unstored data in the buffer to S3. Implements fflush() and is used by stream_close
   */
  public function stream_flush()
  {
    if ($this->write)
    {
      if ($this->dirty)
      {
        $response = $this->getService()->create_object($this->info['bucket'], $this->info['path'], array('body' => $this->data, 'acl' => $this->getOption('acl'), 'contentType' => $this->getMimeType($this->info['path']), 'headers' => $this->getOption('headers')));
        if (!$response->isOK())
        {
          // PHP calls stream_flush when closing a stream (before calling stream_close, FYI),
          // but it doesn't pay any attention to the return value of stream_flush:

          // PHP bug https://bugs.php.net/bug.php?id=60110

          // Call trigger_error so the programmer is not completely in the dark.
          // This is similar to what the native file functionality does on I/O errors

          trigger_error("Unable to write to bucket " . $this->info['bucket'] . ", path " . $this->info['path'], E_USER_WARNING);
          return false;
        }
        $this->updateCache();
        $this->dirty = false;
      }
    }
    return true;
  }

  /**
   * Returns true if we are at the end of a stream.
   *
   */
  public function stream_eof()
  {
    return (strlen($this->data) === $this->dataOffset);
  }

  /**
   * You can't lock an S3 "file"
   */
  public function stream_lock($operation)
  {
    return false;
  }

  /**
   * You can't unlock an S3 "file"
   */
  public function stream_unlock($operation)
  {
    return false;
  }

  /**
   * Someday: stream_metadata. Doesn't exist in 5.3
   */

  /**
   * Read specified # of bytes. Implements fread() among other things
   */
  public function stream_read($bytes)
  {
    if (!$this->read)
    {
      // Not supposed to be reading
      return false;
    }

    // If we have a cache of the first 8K block and that's what we've been asked for, cough it up
    if (!is_null($this->start))
    {
      if (($bytes === 8192) && (!$this->startSeeking))
      {
        $result = $this->start;
        $this->start = null;
        $this->afterStart = true;
        $this->dataOffset = min(strlen($result), 8192);
        return $result;
      }
      else
      {
        // We were asked for something else. Don't get fancy, just revert to a normal open
        $this->start = false;
        $this->fullRead();
      }
    }
    // The second read call, after the first resulted in returning a cached first block.
    // The caller wants more than just that first 8K, so we need to do a real read now and
    // skip the first 8K of it. TODO: it would be nice to use a byte range here to avoid
    // reading that first 8K from S3
    if ($this->afterStart)
    {
      if (!$this->fullRead())
      {
        return false;
      }
      // Don't try to reset dataOffset here as a seek() right after the
      // first fread() gets lost that way (getimagesize() on certain JPEGs for example)
      $this->afterStart = null;
    }

    $total = strlen($this->data);
    $remaining = $total - $this->dataOffset;
    if ($bytes > $remaining)
    {
      $bytes = $remaining;
    }
    $result = substr($this->data, $this->dataOffset, $bytes);
    $this->dataOffset += $bytes;
    return $result;
  }

  /**
   * Write specified # of bytes. Implements fwrite() among other things
   */
  public function stream_write($data)
  {
    if (!$this->write)
    {
      // Not supposed to be writing
      return 0;
    }
    $len = strlen($data);
    $this->data = substr_replace($this->data, $data, $this->dataOffset);
    $this->dataOffset += $len;
    $this->dirty = true;
    return $len;
  }

  /**
   * Seek to the specified point the buffer. Implements fseek(), sort of.
   * PHP will sometimes just adjust its own read buffer instead
   */
  public function stream_seek($offset, $whence)
  {
    // Seeking potentially invalidates the first-block cache, but
    // don't panic unless we actually try to read something after the seek

    if ($this->stat)
    {
      // The stat cache is available only when we are doing read-only operations,
      // and it means that we can calculate this correctly even if we haven't
      // really loaded the full data yet for this file
      $len = $this->stat['size'];
    }
    else
    {
      // In other cases we have the full data because we're writing, or reading
      // and writing
      $len = strlen($this->data);
    }
    $newOffset = 0;
    if ($whence === SEEK_SET)
    {
      $newOffset = $offset;
    }
    elseif ($whence === SEEK_CUR)
    {
      $newOffset += $offset;
    }
    elseif ($whence === SEEK_END)
    {
      $newOffset = $len + $offset;
    }
    else
    {
      // Unknown whence value
      return false;
    }
    if ($newOffset < 0)
    {
      return false;
    }
    if ($newOffset > $len)
    {
      return false;
    }
    $this->dataOffset = $newOffset;

    if (!is_null($this->start))
    {
      if ($this->dataOffset !== 0)
      {
        $this->startSeeking = true;
      } else
      {
        // If they seek right back again after calling ftell()
        // we can cancel the red alert and keep the start of the
        // file coming from the cache
        $this->startSeeking = false;
      }
    }
    return true;
  }

  public function stream_tell()
  {
    return $this->dataOffset;
  }

  /**
   * Nonblocking and such. We don't support this at this time.
   * It's possible to have a read timeout. Maybe later after we
   * get around to pulling files in chunks rather than all at once
   */
  public function stream_set_option($option, $arg1, $arg2)
  {
    return false;
  }

  /**
   * Implements stat($url)
   */
  public function url_stat($path, $flags)
  {

    if (!$this->init($path))
    {
      return false;
    }
    return $this->stream_stat();
  }

  /**
   * Implements fstat($resource) - stat on an already opened file
   */
  public function stream_stat()
  {
    if (is_null($this->info))
    {
      // No file open
      return false;
    }
    if (!is_null($this->stat))
    {
      // stream_open already pulled it in when loading the cache
      return $this->stat;
    }
    else
    {
      $cacheInfo = $this->getCacheInfo();
      if ($cacheInfo)
      {
        $this->stat = $cacheInfo['stat'];
        return $this->stat;
      }
    }
    $dir = false;
    if ($this->info['path'] === '')
    {
      // We want to know about the bucket
      if ($this->getService()->if_bucket_exists($this->info['bucket']))
      {
        $dir = true;
      }
    }
    if ((!$dir) && (preg_match('/\/$/', $this->info['path'])))
    {
      $dir = true;
    }
    else
    {
        $parentPath = rtrim(dirname($this->info["path"]), ".");
        $cacheKey = $this->info["bucket"]."-".$parentPath;
        if(isSet(self::$statCache[$cacheKey])){
            $baseName = basename($this->info["path"]);
            $list = self::$statCache[$cacheKey];
            $keys = array();
            if(isSet($list["Contents"])){
                $keys = array_merge($keys, $list["Contents"]);
            }
            if(isSet($list["CommonPrefixes"])){
                $keys = array_merge($keys, $list["CommonPrefixes"]);
            }
            //var_dump($keys);
            //var_dump($baseName);
            foreach($keys as $entry){
                if(isSet($entry["Key"]) && $entry["Key"] == $baseName){
                    $dir = false;
                    $mtime = strtotime($entry['LastModified']);
                    $size = intval($entry['Size']);
                    break;
                }else if(isSet($entry["Prefix"]) && $entry["Prefix"] == $baseName){
                    $dir = true;
                    $mtime = time();
                    $size = 0;
                    break;
                }
            }
            if(isSet($mtime)){
                //var_dump($this->info);
                $this->stat = $this->getStatInfo($dir, $size, $mtime);
                return $this->stat;
            }

        }
        //AJXP_Logger::debug("Wrapper : stating ".$this->info["path"], debug_backtrace() );
      $response = $this->getService()->get_object_headers($this->info['bucket'], $this->info['path']);
      if (!$response->isOK())
      {
        // Hmm. Let's take another shot at this possibly being a folder
        if ($this->hasDirectoryContents())
        {
          $dir = true;
        }
        else
        {
          return false;
        }
      }
    }
    if ($dir)
    {
      $mtime = time();
      $size = 0;
    }
    else
    {
      $mtime = strtotime($response->header['last-modified']);
      $size = (int) $response->header['content-length'];
    }
    $this->stat = $this->getStatInfo($dir, $size, $mtime);
    return $this->stat;
  }

  /**
   * Fake a stat() response array using the three pieces of
   * information we really have
   */
  protected function getStatInfo($dir, $size, $mtime)
  {
    if ($dir)
    {
      // Paths ending in a slash are always considered folders, and folders don't need to be
      // explicitly created in S3
      $mode = 0040000 + 0777;
    }
    else
    {
      // Bitflags for st_mode indicating a regular file that everyone can read/write/execute
      $mode = 0100000 + 0777;
    }
    return array(
      // 0	dev	device number
      0,
      // 1	ino	inode number
      0,
      // Permissions and file type
      $mode,
      // nlink	number of links 1 is a reasonable value
      1,
      // uid of owner
      0,
      // gid of owner
      0,
      // device type, if inode device
      0,
      // size in bytes
      $size,
      // atime time of last access (unix timestamp). Most systems, including Linux, don't really maintain this separately from mtime
      $mtime,
      // mtime time of last modification (unix timestamp)
      $mtime,
      // ctime time of last inode change (unix timestamp)
      $mtime,
      // blksize blocksize of filesystem IO (-1 where not relevant)
      -1,
      // blocks number of 512-byte blocks allocated (-1 where not relevant)
      -1,
      'dev' => 0,
      'ino' => 0,
      'mode' => $mode,
      'nlink' => 1,
      'uid' => 0,
      'gid' => 0,
      'rdev' => 0,
      'size' => $size,
      'atime' => $mtime,
      'mtime' => $mtime,
      'ctime' => $mtime,
      'blksize' => -1,
      'blocks' => -1
    );
  }

  /**
   * Override me if you hate our mime types list
   */
  public function getMimeType($path)
  {
    $dot = strrpos($path, '.');
    if ($dot !== false)
    {
      $extension = substr($path, $dot + 1);
    }
    else
    {
      $extension = '';
    }
    if (isset(aS3StreamWrapperMimeTypes::$mimeTypes[$extension]))
    {
      return aS3StreamWrapperMimeTypes::$mimeTypes[$extension];
    }
    else
    {
      return 'application/octet-stream';
    }
  }
}


Offering a cloud-based, configurable application that can accommodate multiple languages on multiple platforms, REDCap Cloud is the best system for commercial solutions of every kind, regardless of size or complexity.
Set up and validate your study in a matter of days. REDCap Cloud offers simple, efficient workflows using our flexible workflow engine for easier data entry and management, and remote monitoring with minimal resource requirements.
Get a single study subscription based on the length and type of study, from complex early phase studies that quickly collect data from a small number of patients, to more time-consuming late phase studies and sponsors looking to conduct multiple studies.
Support complex studies that capture large amounts of data from multiple data sources with a business model for studies with short timeframes and a small number of patients.
Data collected from Phase IIb & III studies form the basis for the labeling and approval of commercial products, and as such, must be of the highest quality. REDCap Cloud is a comprehensive eClinical solution that is capable of collecting, cleaning, and managing data and workflows from multiple sources and applications within a single platform.
Find the best budget and timeframe, whether your research requires a short subscription model with unlimited users, a single study over a long period, or multi-platform global study. Design, deploy, and manage from a single system that captures everything at once.
For Phase IV, registries, and outcome research studies that may be used to support labeling claims and reimbursement strategies, design the study once, deploy it to the right technology for the purpose intended, and manage the data and workflow from a single system with our multi-functional platform.
Patient input is essential, whether to support clinical studies or help determine the effectiveness of a protocol, and with REDCap Cloud, no matter how the survey tool is accessed or what operating system is used for the mobile device, all the data sits in the same database.
From single-arm, open label observational studies to complex, multi-armed, cross over oncology studies, we have the flexibility and experience to meet every study design for any therapeutic area.
Accommodate research needs across your industry and around the globe with a system currently being used in over 100 countries. Choose REDCap Cloud for single language, single country, or global multilingual studies.
A multi-functional platform that enables Sponsors, CROs, investigators, and research teams to collaborate around the world.
Our comprehensive on-demand, hosted eClinical platform integrates EDC, CDMS, eCOA, patient registries, surveys, and outcome tracking capabilities in a single solution. REDCap Cloud technology scales reliably and cost-effectively for research projects of all types and sizes including proof of concept, early phase studies, late phase studies, marketing support studies, surveys and questionnaires, patient registries, and outcomes research.