text:
HomeTechnologySamsung Galaxy S23 colors: every rumored shade, including the S23 Plus and Ultra
Samsung Galaxy S23 colors: every rumored shade, including the S23 Plus and Ultra
January 14, 2023 admin Technology 0
A new year means a new series of Samsung Galaxy S phones, and with them a new selection of colors. But Samsung seems to be doing things slightly differently with the Samsung Galaxy S23 line compared to previous years.
With the Samsung Galaxy S22 series, we saw one set of colors for the S22 and Galaxy S22 Plus, and another set for the Samsung Galaxy S22 Ultra, but with the S23 series, leaks suggest that all three phones will be available in the same shades.
So below, you'll find all the shades we've heard rumored for the Samsung Galaxy S23 line, with all of the most likely options expected for every phone.
(Image credit: Samsung / SnoopyTech)
One shade that we've heard mentioned is Cotton Flower, which based on leaked images, such as the one above, is probably a cream or off-white shade. We've elsewhere heard beige mentioned, which is probably also referring to this.
Multiple sources have mentioned a color along these lines and leaked images have shown this shade, strongly suggesting that this will be one of the options.
It's not the most inspiring finish, going by the images we've seen, but then white always seems to be a popular color regardless, and this might be the closest the Samsung Galaxy S23 series gets to that.
This also looks to be different to any Samsung Galaxy S22 shade – there was a cream color offered there, but that was more yellow. The S22 series is also available in a pure white.
Misty Lilac
(Image credit: 91Mobiles)
Misty Lilac appears to be a fancy name for pink, going by leaked imagery which you can see above. This shade has also been mentioned mulitple times, so it's likely to be offered at launch.
It looks to be a very light pink that's even paler and more understated than the Pink Gold shade the Samsung Galaxy S22 can be had in. So, this too is a shade the current models aren't available in.
Botanic Green
We've also heard multiple mentions of a green shade, with one source claiming this is called Botanic Green, and sharing images of how it might look.
This is a bit more interesting and unusual than the previous two options, but may also prove less popular as a result. It looks vaguely similar to the green Galaxy S22 shade, but a little lighter and paler.
Phantom Black is a classic Samsung shade that we've seen before. It's also just black, which is one of the most popular and common smartphone finishes in general.
Of course, there's more than one type of black, and this one appears to be a quite muted, pale black going by the leaked imagery.
It's another color that we've heard mention of multiple times, so coupled with what a popular choice this is, it's one we'd expect to see.
Light Gold / Pink Gold
The four colors above currently seem like the shades we'll most likely see, but at least one source has also mentioned that there might be a Light Gold or Pink Gold option.
Now, there's a pink color above, so they could be referring to that, but leaked images don't suggest there's anything gold about that one, so this could be something different. We wouldn't count on seeing it though if so, as it hasn't been widely mentioned.
(Image credit: SlashLeaks / LeakSpinner)
White isn't a color that we've heard mentioned by name for the Samsung Galaxy S23 series, but one leak showed dummy units of the three phones in a white shade, which appears different to the Cotton Flower color above.
So we can't rule this color out, but we're also a lot less convinced we'll see this compared to other rumored shades.
Other possible shades
While the colors above are all the specific shades we've heard about, one source has said that there might be additional shades that are exclusive to Samsung's stores.
That wouldn't be unusual for the company so it's believable, and it's here that we might see some variation in the color options for each model, with perhaps some Galaxy S23 Ultra shades that the other two phones can't be had in, and vice versa.
It's unclear what shades these might be – unless they're the lesser rumored Light Gold or White options above – but there are loads of possibilities. The Samsung Galaxy S22 series is available in all sorts of colors that Samsung could pick from; including Sky Blue, Burgundy, Red, Violet, and other options.
Of course, the company equally choose something from an older model, or new shades that it hasn't offered before.
Facebook Creator Studio shuts down, rebrands as Meta Business Suite
Super Bowl TV deals 2023: today's best early sales
eleven + one =


Tekashi 6ix9ine does not need to be freed because he is not behind bars.
He then tweeted, "#FREE69" … which sure sounds like he wanted his fans to think he'd been locked up.
Back in 2015, 6ix9ine (real name Daniel Hernandez) pleaded guilty to "the use of a child in a sexual performance." As part of the terms of his probation, the "Gummo" rapper was required to get his General Education Development certificate (aka a GED) and present it to the court.
6ix9ine was scheduled to do just that on Tuesday, but the county clerk for the Supreme Court of New York County tells The Blast the case was adjourned. The clerk says 6ix9ine's lawyer asked for the continuance.
The case was re-scheduled for June 19, so 6ix9ine has about two months to make sure his GED paperwork is in order … or else he'll get his wish.


Simply put, OneCalifornia Bank, FSB, a community development bank, is the grooviest local bank around. It's a bank with a heart, because it operates with a socially driven mission to better poor and moderate-income areas, thanks to its companion right arm, OneCalifornia Foundation. That charitable organization dreams up initiatives to stamp out social ills like poverty and discrimination. The relative newcomer wants to be part of the community and puts its customers' successes, not its own profits, first by helping its clients succeed. This bank seeks out the likes of struggling nonprofits and small business owners as its customer base, deftly guiding them through the complex world of finance to get the loans and monetary cachet they need to be community players. Plus, OneCalifornia Bank founders Tom Steyer and Kat Taylor are fun-loving do-gooders who are just a little wacky, singing, for instance — yes, singing — about their bank at the many community events the bank sponsors. They give the bank a personality lacking from its dreary contemporaries. The bank is brilliant at picking projects everyone can get behind, from rebuilding homes in East Oakland to assisting Zimbabwean orphans and improving Chabot Space & Science Center programs and helping folks restore their credit.


For example, the experimental jungle boots, manufactured in September 1942 by "Geo. Keith Co." featured brown leather lower and green canvas upper, lined with poplin fabric. The unlined boot's tongue was also made of green canvas and impregnated with water and/or gas repellent. The peculiarity of these boots is 3-buckle closure for a 12,5 inches (31,75 cm) tall boot. "Goodrich"-made rubber out-soles and heels were stitched and glued, and the heels were square-shaped.
Actually, the canvas and leather Tropical Combat Boots were developed in the year 1944 and put into manufacturing during the summer of the next year - too late for mass production, because the Second World war was over. Though the production was canceled, these boots were issued at the early stage of the war in Vietnam, and continued to be issued until the year 1965, when new types of DMS jungle boots with Vibram-type out-soles came into service. The brown leather and green canvas boots shown on the Picture 1 were made in June, 1950. The two-buckle fasteners on the upper part of the boots were exactly "borrowed" from the two-buckle M-43 all-leather American WW II Combat boots (Picture 2).
These double buckle "jungle" boots with brown leather and canvas panels for tropical climates are also referred to as "M-45 Tropical Combat Boots" or "Okinawa boots", because in the early years of Indochina conflict many American advisors were sent to Vietnam from U.S. military base in Okinawa, Japan.
TB QM 13 (Department of the Army Technical Bulletin (Quartermaster Manual)) of 28 August 1961.
The boot chart of the year 1951 specifies "Boot, Combat, Tropical" made of leather, nylon duck and rubber, weight per pair is 3,88 lbs (1,76 kg), which are to be worn with 1 pair of socks (wool, cushion sole) and 1 pair of ventilating insoles (total weight 0,29 lbs (132 g)).
These "jungle" boots (quick-drying, permitting sweat evaporation and ventilation and providing good traction with surfaces) were designated for forests, jungles and grasslands under tropic and semi-tropic conditions.
The leather parts of the boot's top were intended to provide robustness of construction and tight grip of the legs in boots. As the leather is more thick and rigid in comparison with soft and thin canvas, it provides better protection from insects, pebbles and other hard and sharp objects that could potentially injure the feet. The canvas panels are intended to provide better temperature and humidity regulation of the feet inside the boots, and to make the overall construction more lightweight and easy to dry.


International Armoring Corporation ("IAC"), a Utah corporation, announces that it has moved its worldwide corporate headquarters from Ogden, Utah to Salt Lake City, Utah (30 miles to the south). Since 1993 IAC has based its headquarters in Ogden, Utah. Due to the sale of its Ogden manufacturing facility to the city, increased worldwide demand and the need for more manufacturing workspace, IAC found it necessary to move operations to a larger, better equipped facility.
Visit www.youtube.com/user/armormaxmovies to see company videos and product demonstrations.
The new company owned headquarters location provides: more convenient access to Salt Lake City International Airport (10 minutes), the Salt Lake City metropolitan area and increased vehicle manufacturing and storage areas. In addition, the new state-of-the-art offices and facilities better represent the worldwide innovator and manufacturer of armored passenger vehicles. With over 35,000+ sq./ft of secured manufacturing space divided into four separate areas, IAC now has the flexibility with regards to highly confidential vehicles, as well as government facility clearance projects. The facility sits on 3 acres of land, which gives it the flexibility for future expansion within the same compound.
We invite all our valued clients to visit our new worldwide headquarters. Please contact us at [email protected] or call 801-393-1075. Also visit www.armormax.com.


text:
Q: Curved labels on circular diagram (D3.js) So, I'm basically trying to make a multilevel circular partition (aka sunburst diagram) with D3.js (v4) and a JSON data.
I placed some labels, which must have different angles depending of their levels (circles) on the partition :
- Level < 3 must be curved and "follow" the arc radius.
- level == 3 must be straight and perpendicular of the arc radius.
I didn't use textPath tags, because I'm not really experienced in SVG and it looks overly complicated to me, and I don't really know how to use it.
here's my code (without the JSON but this is a really classical one, I can add a part of it if it is needed):
var width = 800;
var height = 800;
var radius = 400;
var formatNumber = d3.format(",d");
var x = d3.scaleLinear().range([0, 2 * Math.PI]);
var y = d3.scaleSqrt().range([0, radius]);

var arc = d3.arc()
    .startAngle(function(d) { return Math.max(0, Math.min(2 * Math.PI, x(d.x0))); })
    .endAngle(function(d) { return Math.max(0, Math.min(2 * Math.PI, x(d.x1))); })
    .innerRadius(function(d) { return setRadius("inner", d.data.level); })
    .outerRadius(function(d) { return setRadius("outer", d.data.level); });

var svg = d3.select("#chart")
    .append("svg")
    .attr("width", width)
    .attr("height", height)
    .append("g")
    .attr("transform", "translate(" + width/2 + "," + (height/2) + ")");

var hierarchy = d3.hierarchy(dataset)
    .sum(function(d) { return d.size; });

var partition = d3.partition();

svg.selectAll("path")
    .data(partition(hierarchy).descendants())
    .enter().append("path")
    .attr("id", function(d, i){ return "path" + i; })
    .attr("d", arc)
    .attr("stroke", "white")
    .attr("stroke-width", "1px")
    .style("fill", function(d) { return (d.data.color) ? d.data.color : 'black'; });

svg.selectAll("text")
    .data(partition(hierarchy).descendants())
    .enter().append("text")
    .attr("transform", function(d){ return setLabelPosition(d); })
    .attr("text-anchor", "middle")
    .attr("alignment-baseline", "middle")
    .attr("font-size", "18px")
    .attr("fill", function(d){ return d.data.textcolor; })
    .text(function(d){ if(parseInt(d.data.level) > 0 && parseInt(d.data.level) < 4){ return (d.data.name).toUpperCase(); }});

d3.select(self.frameElement)
    .style("height", height + "px");

function setRadius(side, level){
    var result = 0;
    var innerValues = [0, 120, 180, 240, 365];
    var outerValues = [0, 180, 240, 365, 400];
    if(!side){
        throw error;
    }
    if(side === "inner"){
        result = innerValues[level];
    }
    if(side === "outer"){
        result = outerValues[level];
    }
    return result;
};

function setLabelPosition(d){
    var result = '';
    var angle = 0;
    var centroid = arc.centroid(d);
    if(parseInt(d.data.level) === 3){
        angle = (180/Math.PI * (arc.startAngle()(d) + arc.endAngle()(d))/2 - 90);
        if(angle > 90){
            angle = angle - 180;
        }
        result = "translate(" + centroid + ")rotate(" + angle + ")";
    } else {
        angle = (180/Math.PI * (arc.startAngle()(d) + arc.endAngle()(d))/2);
        result = "translate(" + centroid + ")rotate(" + angle + ")";
    }
    return result;
};

And the result :

My problem is, how to curve these level 1 & 2 labels (like the one which have a red border), but keep my lvl 3 labels as they currently are.
It's really a pain in the head, and I did many search (on Google and SO) but I didn't find any satisfying answer.
A solution without using a textPath will be awesome if possible, but any advice is welcome.
Many thanks guys and sorry for my English (as you can probably see it's not my birth language).
PS : This is D3.js v4.

redpajama_set_name: RedPajamaStackExchange


Employee safety is the constant concern of this organization. Every precaution has been taken to provide a safe workplace. The Safety Committee makes regular inspections and holds regular monthly safety meetings. The Committee also meets with management to plan and implement further improvements in our safety program. Personal responsibility in safety is the greatest guarantee of your safety at work, on the road, and at home.


Handmade in Melbourne with fresh ingredients.
Try on our Sausage Rolls or Korma Puffs!
Tomato Sauce: Tomato, Onion, Sugar, Apple, Salt, Ginger, Vinegar, Mixed Spices. Allergens: Onion.
Smokey Sauce: Tomato, Onion, Apple, Vinegar, Sugar, Worcestershire Sauce, Apricot Nectar, Salt, Mustard Powder, Garlic, Ginger, Paprika, Chili Powder, Allspice, Cloves, Cinnamon, Ground Pepper, Cumin Powder. Allergens: Onion, Garlic.
Sweet Chili: Raw Chili, Raw Capsicum, Tomato, Onion, Ginger, Garlic, Tomato Paste, Sugar, Salt, Vinegar, Ground Coriander Seeds. Allergens: Onion, Garlic.


text:
GOV OKOWA FELICITATES WITH NIPR ON AGM, CONFERENCE, PROMISES ROBUST PARTNERSHIP
Posted by blcknyt1511 | Dec 6, 2019 | Featured |
The Governor of Delta State, Senator Ifeanyi Okowa, has congratulated the Nigerian Institute of Public Relations on its conference and annual general meeting, promising to partner with the institute for better image building ventures.
Governor Okowa, who made the promise today in Asaba while delivering a goodwill message at the opening ceremony of the Delta State Chapter of the NIPR Conference and Annual General Meeting (AGM), said that the techniques and tools of public relations practice needed to be fully exploited for national security and growth.
The governor who was represented by the Commissioner for Information, Mr Charles Aniagwu, described the theme, "Safeguarding National Security through Civic Engagement for National Reputation" as a welcome development, adding that resolutions from it would help address challenges facing the polity.
In his address, the National President and Chairman of Council of the Nigerian Institute of Public Relations, Mallam Muktah Sirajo, said that the institute was established by law to regulate public relations practice in Nigeria.
Mallam Sirajo called on governments at all levels, corporate bodies and groups to ensure they engage only qualified and certified PR professionals, warning that the institute would soon embark on prosecuting quacks masquerading as PR personnel.
He thanked the state government, the Ministry of Information and other government agencies for their support in the successful hosting of the conference and AGM.
Earlier, in a welcome address, the Chairman of the Chapter and Commissioner for Basic and secondary Education, Chief Patrick Ukah, said the Delta State chapter was resuscitated in 2017 after a long time of inactivity.
While welcoming delegates to the conference and AGM, he appealed to member of the chapter to develop more interest in the institute to advance the tenet of professionalism in their place of work and conduct.
The conference featured a discussion session on the theme, comprising PR professionals, the representative of the governor and Commissioner for Information and the representative of the Commissioner of Police, Delta State Command.
Among dignitaries present at the meeting was the People's Democratic Party (PDP) Vice Chairman, South-South, Brother Emmanuel Ogidi.
PreviousDTHA PASSES N395 BILLION DELTA 2020 APPROPRIATION BUDGET
NextDTSG PLEDGES RESOLVE TO REPOSITION SACA FOR SERVICE DELIVERY
Delta to partner media for "Stronger Delta'' vision
DTSG Reiterates its Commitment to Providing Welfare Package for Students of Delta State Origin – Ologe
ELOZINO OGEGE: Gov Okowa Assures Family Of Justice
Transfer Of Newly Employed Teachers In Delta State

redpajama_set_name: RedPajamaCommonCrawl


text:
Yacare Coulibaly (born 11 November 1986) is a Malian footballer. She has been a member of the Mali women's national team.

International career
Coulibaly capped for Mali at senior level during the 2006 African Women's Championship.

References

1986 births
Living people
Malian women's footballers
Mali women's international footballers
21st-century Malian people
Women's association footballers not categorized by position

redpajama_set_name: RedPajamaWikipedia


text:
2021 Chevy Equinox Spied Partially Camouflaged
Equinox crossover will get a mid-cycle update for 2021. Chevrolet is focused on the visual updates, interior tech, and new powertrain is a possibility. The upcoming 2021 Chevy Equinox was spotted on the road doing tests and quad exhaust pipes are clearly suggesting new engine. On the other hand, the base model could remain in terms of mechanics.
On the same spy shots, some reports are speculating a high-performance model. There is still a lot of speculations about the 2021 Equinox. On the other hand, the crossover will remain attractive and modern. The third-gen model will hit the dealerships in 2022. For that reason, the 2021 model will surely introduce mid-cycle refreshments.
2021 Chevy Equinox Design, Platform
The forthcoming 2021 Chevy Equinox will ride on the same GM D2 platform. Whatsoever, the same architecture underpins models such as Buick Envision and GMC Terrain. Equinox will remain a four-door model with compact dimensions. For the next year, Chevrolet will introduce mid-cycle updates.
The manufacturer will focus on the visual changes so we can expect innovations. The prototype was perfectly camouflaged so the spy shots are not useful in terms of exterior changes. However, Equinox will surely introduce small updates on the front and rear fascia. The compact crossover will get new exterior colors and possible new optional features.
Infotainment System Is Updated
The interior of the all-new 2021 Chevy Equinox will also suffer a couple of changes. Chevrolet will provide all of the important updates in terms of tech. However, the compact crossover will get a bigger dash and shorter center stack. When it comes to displays, a 7-inch unit is still standard.
Optionally, you can buy an 8-inch touchscreen. The infotainment system will get the latest version and it will act quicker. As for the interior layout, things will largely remain. That also includes the interior room that will see no further improvements. However, the cabin is very practical and comfort is on a high level. Legroom is ample and cargo area still provides 63.4 cubic feet of space.
2021 Chevy Equinox Powertrain
Latest spy shots showed us a prototype with quad exhaust pipes. That clearly suggests a new engine option. The 2021 Chevy Equinox could get a new powertrain. On the other hand, it could be the all-new high-performance version. Either way, both outcomes are very likely to happen. New Equinox will surely arrive with the same engine lineup. That means Chevrolet won't ditch any of its engines. The compact crossover comes with 1.5-liter gasoline that produces 170 HP and 205 lb-ft of torque.
This unit delivers 26 mpg in the city and 32 mpg on the highway. Optionally, you can buy a 2.0-liter that cranks out 255 horses and 260 lb-ft of twist. The third option is a 1.6-liter turbodiesel. This engine is capable of producing 140 HP and 240 lb-ft of torque. Front-wheel-drive setup is standard on all models. An all-wheel-drive system is optional, just like the 9-speed automatic transmission. Whatsoever, a 6-speed automatic gearbox remains standard.
Price and Arrival
The all-new compact crossover will arrive in the second half of 2020. The 2021 Chevy Equinox will look to rival Toyota RAV4 and Mitsubishi Outlander. As for the pricing details, Chevrolet still refuses to answer that question. Current Equinox starts at $26,000 so we can expect a slightly higher price this time.
2021 Mazda CX-9 – Changes, Performance, Release Date


text:
Q: Ignoring user input when testing with unity I have a chatbot program that uses a function called userInput() to get the input from the user.
I have to test the program for my project but I don't know how to input text into the function in the test program. Everything I have tried has stopped the automatic testing waiting for the user to type something.
Any help adding test phrases the user would say without stopping the testing program.
char *userInput()
{
    char *str = NULL;
    int ch;
    size_t size = 0, len = 0;

    while ((ch=getchar()) != EOF && ch != '\n') {
        if (len + 1 >= size)
        {
            size = size * 2 + 1;
            str = realloc(str, sizeof(char)*size);
        }
        str[len++] = ch;
    }

    if (str != NULL) {
        str[len] = '\0';
    }

    return str;
}

A: I ran with anonmess's idea that you can input text from the user using an input file. I used an input file with the following lines:
testing input
testing input 2

The input file name is given through the command line. You can hard code the filename if you'd like.
#include <stdio.h>
#include <string.h>

int processInputFile(char *filename)
{
    FILE *ifp;
    char buffer[1024];
    char *p;

    if ((ifp = fopen(filename, "r")) == NULL)
    {
        fprintf(stderr, "Failed to open \"%s \" in processInputFile.\n", filename);
        return -1;
    }

    while ((fgets(buffer, sizeof(buffer), ifp)) != NULL)
    {
        // remove newline character
        p = strchr(buffer, '\n');

        if (p != NULL)
            *p = '\0';

        // We can also remove the newline character by getting
        // its length and chomping the last character

        // int length = strlen(buffer);
        // buffer[length - 1] = '\0';

        printf("%s\n", buffer);
    }

    fclose(ifp);

}

int main(int argc, char **argv)
{
    if (argc < 2)
    {
        printf("Proper syntax: ./a.out <n>\n");
        return -1;
    }

    processInputFile(argv[1]);

    return 0;
}

The file is read and the lines are printed. You can pass the string to another function within the while loop.


Code Blue Doe Estrous W/drag 1 Oz.
The no-freeze formulation with Silver-Zyme protects you from head to toe.
Silver-Zyme combines nano-silver and enzyme technology for a solution that eliminates bacteria and foreign odors.
No more frozen bottles and the endless frustration of hunting unprotected.
Destroys human odor on contact.
Most convenient way to eliminate odor and refresh skin.
Wipe out human odor with Code Blue's advanced Formula Field Wipes that are convenient and effective way to eliminate odor and refresh skin. 7"x 10" 20 pads.
Code Blue Foaming Estrous Urine 8 Oz.
Code Blue Rack Rub Gel 2 Oz.
Smoke Detector's odorless cloud is ultra sensitive and shows air movements hunters can't feel.
A highly effective cloud is easy to see in low visibility conditions.
Simple to use, doesn't clog and is 100% accurate.
Effectively remove odor causing bacteria, viruses and mold with D/Code.
Eliminates 99.9% of odor causing bacteria - continues to work even after drying.
Designed to eliminate odors that develop before or during the hunt.
Packed with the odor eliminating power of Silver Scent technology.
Trigger spray bottle for easy widespread application.
Long lasting protection - keeps you dry.
Unscented solid formula glides on smooth and dry.
Leaves no stains or residue.
Unscented, all natural formula featuring patented Silver Scent technology.
100% safe on hair and skin and gentle enough for everyday use.
Long lasting, head to toe odor elimination in one convenient product.
Removes body and hair odors and helps keep them from coming back.
Perfect partner to D/Code Laundry Detergent for complete odor control.
Softens clothes to help keep them quiet in the field.
Helps remove odors from your hunting clothes.
Eliminates static cling to repel odors.
(24) pre-moistened, unscented wipes for convenient carry in packs or pockets.
Ideal for refreshing or applying in the field.
Use to eliminate scents on face, neck, arms or gear.
Perfect for refreshing or applying in the field.
Deep clean tough stains and eliminate bacterial odors caused by sweat.
Silver Scent technology rids fabrics of odors caused by human, smoke, pets, food, exhaust and other game spooking odors.
Remove odors from clothing without adding fragrance.
UV inhibitors help prevent camo clothing from fading.


Shopper Bag 100% organic cotton, painted love in Italy, with colors for permanent fabrics.
The painting represents a winged unicorn. The design is the result of my imagination, a unique work that will not be replicated on other bags.
Although the colours used are indelible, avoid rubbing the painted area by hand, because it is delicate.
The decorative part has been handmade, making it an object unique in its kind, also and especially thanks to any small imperfections, or smudges of color, can not be considered defect but quality. In fact, they demonstrate the real craftsmanship of the product, underlininging its artistic quality.


text:
<img alt="dcsimg" id="dcsimg" width="1" height="1" src="//www.qsstats.com/dcs8krshw00000cpvecvkz0uc_4g4q/njs.gif?dcsuri=/index.php/innovation/the-internet-of-things-means-business-2.html&WT.js=No&WT.tv=10.4.1&dcssip=www.baselinemag.com&WT.qs_dlk=XiOZIkgS9laKTgfpj7fXjAAAAAI&">
Innovation / The Internet of Things Means Business
The Internet of Things Means Business
Connected devices and networked machines are enabling industry and government to collect information and act on it in ways that will redefine IT and business.
Another organization that has embraced the Internet of things is Oregon Health Sciences University (OHSU). The Portland, Ore.-based health and research institution tags assets ranging from infusion pumps to crutches so they can be easily located. Using passive RFID and WiFi, its nurses, physical therapists and technicians can see exactly where an item is at any given moment.
"The system helps us manage the flow of devices," says Dennis Minsent, director of clinical technology. Later this year, OHSU plans to tag patients and clinicians to better understand where they spend time, how they move around within the facility and how long patients wait in a room before a clinician arrives. "It will provide insights into how we can operate more efficiently," he explains.
PwC's Curran says that the IoT creates entirely new capabilities for businesses, opening the door to new types of products and services that extend throughout the supply chain and out to customers. "The technology has the potential to create far more active and engaged relationships," he adds. "It offers enormous possibilities revolving around big data and analytics."
In fact, by plugging in data from other sources—including social media and crowdsourcing—it's possible to create a much deeper and broader view of fast-changing events, conditions and behaviors.
Kavi's Kaduwela says that machine-generated data currently accounts for about 15 percent of the overall data organizations hold, and he expects the figure to rise to around 50 percent within the next decade. The value proposition for the industrial Internet already exists, he says. Optimizing and streamlining operations—even by a percent or two—can result in substantial gains.
The key to success is by effectively integrating and managing the data and developing the right analytical solutions. Kaduwela believes that, for now, the value proposition is much stronger in the industrial space than it is in the consumer space.
However, the IoT also creates new security and privacy risks that organizations cannot ignore, notes Robert Stroud, chair of the ISO liaison subcommittee for the Information Systems Audit and Control Association (ISACA). "Information could be aggregated or shared in a way that a person or an organization isn't aware of—or in a way they don't approve," he says.
Part of the problem, Stroud notes, is that many connection points and vulnerabilities are not well-tested or understood. "A failure could lead to unintended implications and serious consequences," he explains, "so there needs to be an understanding of how to mitigate risks and secure the data." Already, hackers have demonstrated that it's possible to breach automobiles, baby monitors and medical devices.
PwC's Curran says that, in the end, it's crucial to formulate a strategy for the industrial Internet and IoT. It's important to begin thinking about how to connect devices or sell products that fit into a larger ecosystem of intelligent devices. This means identifying opportunities and problems that connected technologies can solve and understanding how they can provide deeper insights into a business, including customer touch points.
"It's important to begin building prototypes, testing and piloting systems, and learning how to harness the technology," Curran concludes. "The Internet of things will play a major role in the future of business."
Samuel Greengard is a contributing writer for Baseline.


text:
Terry W. Virts Jr. est un astronaute américain de la NASA né le  à Baltimore.

Vols réalisés
Terry Virts a reçu une formation de pilote de chasse à l'École de l'air française en 1988 dans le cadre d'un programme d'échange avec l'académie de l'armée de l'air américaine. Il intègre une unité opérationnelle volant sur F-16 en 1992. Il est affecté en Corée et en Allemagne. En 1997, il intègre l'école des pilotes d'essais d'Embry-Riddle et devient pilote d'essais à compter de 1999 jusqu'à sa sélection en tant qu'astronaute par la NASA en 2000. Il a volé 3000 heures sur 40 types d'avions.

Carrière à la NASA
Virts est sélectionné astronaute en 2000 dans le  groupe d'astronautes de la NASA.

Il effectue son premier vol spatial en  en tant que pilote de la navette spatiale Endeavour pour la mission STS-130.

Terry Virts a participé aux expéditions 42/43, et a été commandant de l'Expédition 43. Le , il a décollé à bord du Soyouz TMA-15M russe du cosmodrome de Baïkonour en compagnie de Samantha Cristoforetti (ESA) et Anton Shkaplerov (Roscosomos). Il est revenu sur Terre après 199 jours passé à bord de l'ISS (Station Spatiale Internationale), le . Son retour était programmé pour , mais dû à la perte d'un module Progress, il a dû être reporté au . Au cours de cette seconde mission, il a réalisé 3 sorties extravéhiculaires en compagnie de Barry Wilmore pour un total de 19 heures.

Il est parti à la retraite en 2016.

Distinctions
Ses décorations militaires comprennent la Médaille du mérite, la Médaille de l'air, la Médaille de la réalisation aérienne et la Médaille de l'éloge de l'Armée de l'Air.

Publications en tant qu'écrivain

 View from beyond: an astronaut photographs the world (2017, National Geographic)

Galerie

Notes et références

Voir aussi

Articles connexes
 Liste des commandants de la Station spatiale internationale
 Station spatiale internationale
 NASA

Liens externes
  Biographie sur le site de la NASA
  Biographie sur spacefacts.de

Naissance en décembre 1967
Naissance à Baltimore
Astronaute américain du programme STS
Colonel de l'United States Air Force
Récipiendaire de l'Aerial Achievement Medal
Récipiendaire de l'Air Medal
Élève de l'United States Air Force Academy
Étudiant de l'école des pilotes d'essai de l'United States Air Force
Membre d'une expédition ISS
Astronaute américain
Commandant de la Station spatiale internationale


The vineyard of Chateau Lestage-Darquier, of the oldest of Moulis, was created at the beginning of the 19th century by M. Darquier. Situated on the west part of the famous gravel hill-top of Grand-Poujeaux. To ensure quality of terroir the wine is classified "Protection Raisonnee du Vignoble".
Intense aromas, the wine presents hints of spices and vanilla, aged in French oak barrels for 12 months, 1/3 new.


The Academy of Languages Translation and Interpretation Services (AOLTI) was established in 2002 to fulfill an increasing need by companies and individuals seeking a global reach. AOLTI is located in the historic Pioneer Square district of Seattle, Washington, USA.
AOLTI has enabled clients to succeed worldwide and domestically through language services including translation, interpretation, multimedia, voice-over, branding evaluation, cultural appropriateness evaluation, localization and desktop publishing.
AOLTI provides essential language and cultural services in a variety of fields for industry leaders such as the Seattle Cancer Care Alliance, Microsoft, Battelle - Pacific Northwest National Laboratory, Seattle Children's Hospital, the Bill & Melinda Gates Foundation, Allstate Staff Counsel, and many other Seattle law firms and insurance companies.


The Town of Ocean View will hold its annual election between the hours of 8:00am and 5:00pm on Saturday, April 14, 2018, at the Town Hall located at 32 West Avenue.
One Candidate will be selected as Council Person for District 4.
CAROL BODINE and BERTON REYNOLDS have qualified for this position.
Absentee ballots are available for any resident who is not able to vote at the Town Hall on April 14, 2018. Any Town of Ocean View eligible registered voter who needs to obtain an absentee ballot by mail should call the Town Hall at 302 539-9797, ext.101, and an affidavit will be mailed to you. The affidavit can also be downloaded from the Town's web site (www.oceanviewde.com). If you prefer, you may come to the Wallace A. Melson Municipal Building, which is located at 201 Central Avenue, between the hours of 8:30 a.m. and 4:00 p.m. to complete the affidavit and receive an absentee ballot. The affidavit must be filed with the Town no later than 12 noon April 13, 2018. Absentee ballots must be received prior to the close of the election, 5:00 pm on April 14, 2018. Identification will be required for anyone who wishes to obtain an absentee ballot.
All residents who are registered in the Town of Ocean View are urged to vote in this election. Identification will be required on Election Day in order to vote.


Merkel is locked in a standoff with her interior minister, Horst Seehofer, over his demand for some asylum-seekers to be turned back at the border.
European stocks, and particularly the German market, have been hit once again over recent days by the possibility of political turmoil in Germany caused by disagreements within the ruling coalition over the country's migrant policy. Under fire over the inhumane treatment of immigrant children at the U.S. border, Trump is telling his supporters that an overly harsh treatment of illegal immigrants is surely better than the chaos Angela Merkel's open-door policy has created.
German Chancellor Angela Merkel says she will hold talks with other European countries on migration issues and report back to her party on July 1.
Seehofer wants Germany to have the right to reject migrants who have already registered in another European Union state but Merkel opposes any unilateral move by him that would reverse her 2015 open-door policy and undermine her authority.
Laura Bush, married to the last Republican president before Trump, took the highly unusual step of publishing a Father's Day op-ed in the Washington Post on Sunday, in which she said "this zero-tolerance policy is cruel".
If Seehofer were to defy her and go ahead with his plans on Monday, Merkel would nearly certainly be forced to fire him.
After the tweet, the president defended his stance during a press conference and repeated his claims.
As outlined in his "migration master plan", Seehofer wants to refuse asylum access to German territory if they have already formally entered the Schengen zone via another country.
Italian Interior Minister Matteo Salvini, who this month refused entry for a boat with 600 refugees, on Saturday said on his Facebook page the country won't permit two ships allegedly carrying migrants and asylum seekers from Libya to reach its shores. As she so often does with the men who challenge her, Merkel gave him just enough rope to hang himself.
He said all 28 European Union member states had to be involved.
In an extraordinary move, the CSU - facing a tough regional election in October - has threatened to defy her and on Monday go ahead with plans for Germany to send back migrants already registered in other European Union states.
They pointed out that Germany's crime rate is at its lowest since 1992, according to Interior Ministry figures released last month.
He said Turkey's goal is to make the northern Syrian region a safe zone, after the United States provided weapons to the group. The deal focuses on the withdrawal of the PKK-affiliated YPG from the northern Syrian city and stability in the region.


A traditional "image film" offers many different options for placing your product in the limelight, whether through emotions, factual information or a story about your company.
Use the special effect that moving images have and present unique insights into your company.
A corporate film, shown either to a select audience or the general public, allows you to present your company in both a personal and an individual manner. We can showcase the corporate features that are most important to you. Your corporate film can be shown in many different contexts: screening at trade fairs, on your company's home page or in other online networks such as Facebook, Twitter, YouTube and Co.


text:
Wedgwood & Co (Ltd)
Enoch Wedgwood (Tunstall) Ltd
Earthenware manufacturers at the Unicorn Pottery and Pinnox Works in Tunstall, Stoke-on-Trent, England
The ware of Wegwood & Co are sometimes confused with those of Josiah Wedgwood & Sons Ltd. However the inclusion of "& Co" or "& Co Ltd" in the name always differentiates between the two companies as Josiah Wedgwood never used "& Co".
Enoch Wedgwood (a distant cousin of Josiah Wedgwood) became a partner in Podmore, Walker & Co. in 1835 and in 1856 the business was renamed Podmore, Walker, Wedgwood & Co.
Following the death of Thomas Podmore in 1860, Enoch Wedgwood inherited shares in the interests of the business left to him by Podmore, the partnership was dissolved and became Wedgwood & Co.
Enoch Wedgwood took his younger brother Jabez into partnership.
By the 1870's the company was employing between 600 and 700 men.
Enoch died in 1879 and was succeeded by his sons Edmund and Alfred Enoch Wedgwood who ran the business until 1900 when family control ceased.
The company did not have the same drive under the two sons and in 1890 Hollinshead and Kirkham took over the Unicorn Works.
In 1900 the firm became a limited company and effective control passed out of the hands of the Wedgwood family. The new money and management put new life into the company and up to 1950 great efforts were put into regaining their former markets, largely by playing to the company's strengths in producing high quality goods.
In 1965 the company was sold to Semart Importing Co. based in New Jersey, USA and refloated as Enoch Wedgwood (Tunstall) Ltd. Semart was an importer of tableware and at the same time as buying Wedgwood & Co. purchased Crown Staffordshire China Co.
In 1969 Enoch Wedgwood (Tunstall) Ltd. purchased the Furnivals name together with the rights to a number of patterns which were marked under the Furnivals name.
In order to expand production facilities the business of A G Richardson was purchased in 1974. Although A G Richardson ceased to exist, the use of their Crown Ducal name and some patterns was continued by Enoch Wedgwood for a few years.
In 1980 Josiah Wedgwood & Sons Ltd (who, up to this point had nothing to do with Wedgwood & Co.) purchased Enoch Wedgwood and it operated within the Wedgwood Group as the 'Unicorn Pottery'.
Previously Podmore, Walker and Co
Taken over by Wedgwood Group and renamed Unicorn Pottery 1980.
[ see "Confused by Wedgwood?" ]
Unicorn Pottery and Pinnox Works
"These were large and important manufactories of general earthenware, situated in Amicable Street and Great Woodland Street, ..... they were succeeded by Wedgwood & Co, the head of the firm being Enoch Wedgwood.
The works were very extensive and gave employment to six or seven hundred persons, occupied an area of about an acre of ground and were among the most substantially built and best arranged in the pottery district.
The goods produced were the higher classes of earthenware, in which dinner, tea, breakfast, desert, toilet and other services, and all the usual miscellaneous articles were made to a very considerable extent, for the home, Colonial, Continental and American markets.
The quality of the "Imperial Ironstone China" - the staple production of the firm - was of remarkable excellence, both in body and glaze...... They also supplied large quantities of Ironstone china, specially made for the use of ships.
The Unicorn Works were entirely devoted to the production of plain white graniteware for the American trade.
Messrs. Wedgwood & Co. became a limited company in 1900 and continued to use this old title until 1965, when the new style Enoch Wedgwood (Tunstall) Ltd. was adopted to avoid the confusion which often arose between the old title (and marks) and that of Josiah Wedgwood & Sons Ltd."
Jewitt's - Ceramic Art of Great Britain 1800-1900
Wedgwood & Co
Pinnox & Unicorn Works, Tunstall
The Pottery Gazette, American and Canadian Edition, January 1st 1880
Printed ware on white and Ivory, Decorated table, tea and toilet ware
WHITE GRANITE
The Pottery Gazette, January 1885
Wedgwood & Co., Ltd
Tunstall, Staffs
Pottery Gazette - January 1906
Transferware plate in the Woronzoff pattern
The pattern name 'Woronzoff' commemorates the Tsarist governor of the Ukraine, Prince Mikhail Vorontsov (1782-1856), whose statue forms the centre of the design.
Vorontsov was governor of New Russia from 1823 to 1844 having fought with distinction in the resistance to the invasion by Napoleon. His statue was erected in 1863 in Cathedral Square [later Soviet Army Square] in Odessa, where it still stands.
Paris White Ironstone
Wedgwood & Co (impressed)
The registration diamond gives a date for the registration of the pattern as 17the September 1867
This mark incorporates the Royal Arms
Hand painted coffee set
Wedgwood & Co, England
c.1862-1900
The unicorn mark was introduced around 1862
'Ltd' was added to marks from 1900
photos courtesy: Clare Dingwall
Marks used on ware for identification:
Marks are split into three date ranges (click for more)
1860-1965 Enoch Wedgwood (Tunstall Ltd)
1965-1980 Unicorn Pottery
QUEEN'S IVORY
WACOLWARE
WACOL IMPERIAL
EVERWARE
ROYAL TUNSTALL
VITRILAIN
Ironstone Names:
IMPERIAL PORCELAIN
STONE GRANITE
ROYAL STONE CHINA
SEMI ROYAL PORCELAIN
(impressed mark, 1860+)
WEDGWOOD & CO. LTD.
Standard name-mark used alone or incorporated in printed marks. Used alone - impressed.
c.1860-90
ROYAL STONE CHINA WEDGWOOD & Co.
(printed)
WEDGWOOD & Co.
(impressed)
This mark incorporates
the Royal Arms
c.1860+
Semi-Porcelain
marks with ENGLAND are
generally after 1891
Wedgwood & Co Ld
'Ltd' or 'Ld' added from around 1900
Royal Semi Porcelain
'LD' was added c.1900
with or without
'Imperial porcelain'
often the name of the pattern is included
the unicorn mark was registered as a trade mark in 1910 (although it was used prior to this)
Estabd 1835
The original manufacturers
Asiatic Pheasants
Wedgwood & Co Ltd
note: the introduction of "Estab 1835"
It was the earlier company of Podmore, Walker & Co which was established around 1835 and are generally acknowledged as being the first producers of the 'Asiatic Pheasants' pattern
Reg Trade Mark
No 547269
WACOL
4 B 52
the "4 52" refers to the month & year of manufacture
in this case April 1952
the letter "B" refers to the permitted class of ware produced under the
Wartime Concentration Scheme
by Enoch Wedgwood
the "8-63" refers to the month & year of manufacture
in this case August 1963
It was the earlier company of Podmore, Walker & Co which was established around 1834 and in 1835 Enoch Wedgwood became a partner in the firm of Podmore, Walker & Co
"These initials, AMS occur in a bow knot type outline, on a dinner service made by Wedgwood & Co of Tunstall. This service bears the registration mark for June 1880. The initials probably relate to the retailer."
Geoffrey A. Godden ' Encyclopedia of British Pottery and Porcelain Marks'
NOTE: the AMS mark denotes the retailer 'Silber & Fleming' - a number of North Staffordshire pottery companies produced ware for them.
In 1965 the company Wedgwood & Co. was sold to Semart Importing Co. based in New Jersey, USA and refloated as Enoch Wedgwood (Tunstall) Ltd.
Unicorn Tableware
It is unclear when Josiah Wedgwood & Sons Ltd stopped producing ware under the Unicorn Tableware name.
It was not Unicorn Tableware nor Enoch Wedgwood & Co who were established in 1835 - it was the earlier company of Podmore, Walker & Co which was established around 1834 and in 1835 Enoch Wedgwood became a partner in the firm of Podmore, Walker & Co
The earlier company of Podmore, Walker & Co are generally acknowledged
as being the first producers of the 'Asiatic Pheasants' pattern
- click for information on the Pinnox Works -
Questions, comments, contributions? email: Steve Birks


text:
package ethanjones.cubes.world.storage;

import ethanjones.cubes.block.Block;
import ethanjones.cubes.block.data.BlockData;
import ethanjones.cubes.core.event.world.block.BlockChangedEvent;
import ethanjones.cubes.core.id.IDManager;
import ethanjones.cubes.core.id.TransparencyManager;
import ethanjones.cubes.core.logging.Log;
import ethanjones.cubes.core.settings.Settings;
import ethanjones.cubes.core.system.CubesException;
import ethanjones.cubes.core.system.Executor;
import ethanjones.cubes.core.util.ThreadRandom;
import ethanjones.cubes.core.util.locks.LockManager;
import ethanjones.cubes.core.util.locks.Lockable;
import ethanjones.cubes.core.util.locks.Locked;
import ethanjones.cubes.graphics.world.area.AreaRenderStatus;
import ethanjones.cubes.graphics.world.area.AreaRenderer;
import ethanjones.cubes.networking.NetworkingManager;
import ethanjones.cubes.side.common.Cubes;
import ethanjones.cubes.side.common.Side;
import ethanjones.cubes.world.CoordinateConverter;
import ethanjones.cubes.world.light.SunLight;
import ethanjones.cubes.world.reference.BlockReference;
import ethanjones.cubes.world.thread.WorldLockable;
import ethanjones.data.Data;
import ethanjones.data.DataGroup;

import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Iterator;
import java.util.concurrent.atomic.AtomicReference;

public class Area extends Lockable<Area> {

  public static final int BLOCK_VISIBLE = 1 << 28;

  public static final int SIZE_BLOCKS = 32;
  public static final int SIZE_BLOCKS_POW2 = 5;
  public static final int SIZE_BLOCKS_SQUARED = SIZE_BLOCKS * SIZE_BLOCKS;
  public static final int SIZE_BLOCKS_CUBED = SIZE_BLOCKS * SIZE_BLOCKS * SIZE_BLOCKS;
  public static final int HALF_SIZE_BLOCKS = SIZE_BLOCKS / 2;
  public static final int MAX_Y = ((Integer.MAX_VALUE - 8) / SIZE_BLOCKS_CUBED) * SIZE_BLOCKS;

  // update every block about once a minute
  public static final int NUM_RANDOM_UPDATES = SIZE_BLOCKS_CUBED / (1000 / Cubes.tickMS) / 60;

  public static final int MAX_X_OFFSET = 1;
  public static final int MIN_X_OFFSET = -MAX_X_OFFSET;
  public static final int MAX_Y_OFFSET = SIZE_BLOCKS_SQUARED;
  public static final int MIN_Y_OFFSET = -MAX_Y_OFFSET;
  public static final int MAX_Z_OFFSET = SIZE_BLOCKS;
  public static final int MIN_Z_OFFSET = -MAX_Z_OFFSET;

  private static final LockManager<Area> LOCK_MANAGER = new LockManager<>();

  public final AtomicReference<Object> features;

  public final int areaX;
  public final int areaZ;
  public final int minBlockX;
  public final int minBlockZ;
  public final int hashCode;

  // Least significant
  // ID (20 bits, 0- 1,048,575)
  // Meta (8 bits, 0-255)
  // Visible (1 bit)
  //
  // blank == 0, as id=0 meta=0 visible=0
  //
  //int blockID = blocks[i] & 0xFFFFF;
  //int blockMeta = (blocks[i] >> 20) & 0xFF;
  //boolean blockVisible = (blocks[i] & BLOCK_VISIBLE) == BLOCK_VISIBLE;
  public volatile int[] blocks;
  public volatile byte[] light; // most significant 4 bits are sunlight. the least significant are lights
  public volatile int[] heightmap = new int[SIZE_BLOCKS_SQUARED];
  public volatile AreaRenderer[] areaRenderer; //Always null on server, unless shared
  public volatile int maxY;
  public volatile int height;
  public volatile ArrayList<BlockData> blockDataList = new ArrayList<BlockData>(0);
  private volatile int modCount = 0, saveModCount = -1, saveEntities = 0;

  public int[] renderStatus = new int[0];

  private volatile boolean unloaded;

  private volatile Area[] neighboursClient = new Area[9];
  private volatile Area[] neighboursServer = new Area[9];
  private volatile AreaMap areaMapClient;
  private volatile AreaMap areaMapServer;
  public final boolean shared;

  public Area(int areaX, int areaZ) {
    super(LOCK_MANAGER);

    this.areaX = areaX;
    this.areaZ = areaZ;
    minBlockX = areaX * SIZE_BLOCKS;
    minBlockZ = areaZ * SIZE_BLOCKS;

    int hashCode = 7;
    hashCode = 31 * hashCode + areaX;
    this.hashCode = 31 * hashCode + areaZ;

    areaRenderer = null;
    blocks = null;
    maxY = 0;
    height = 0;
    unloaded = false;
    features = new AtomicReference<>();

    this.shared = isShared();
  }

  public Area(Area toCopy) {
    this(toCopy.areaX, toCopy.areaZ);

    try (Locked<Area> l = LockManager.lockMany(true, this, toCopy)) {
      if (toCopy.isReady()) {
        this.setupArrays(toCopy.maxY);
        System.arraycopy(toCopy.blocks, 0, this.blocks, 0, this.blocks.length);
        System.arraycopy(toCopy.light, 0, this.light, 0, this.light.length);
        System.arraycopy(toCopy.heightmap, 0, this.heightmap, 0, this.heightmap.length);
        if (toCopy.features.get() != null) this.features.set(Boolean.TRUE);
      }
    }
  }

  public Block getBlock(int x, int y, int z) {
    try (Locked<Area> l = acquireReadLock()) {
      if (unready(y)) return null;
      int b = blocks[getRef(x, y, z)] & 0xFFFFF;
      return IDManager.toBlock(b);
    }
  }

  public int getMeta(int x, int y, int z) {
    try (Locked<Area> l = acquireReadLock()) {
      if (unready(y)) return 0;
      return (blocks[getRef(x, y, z)] >> 20) & 0xFF;
    }
  }

  public int heightmap(int x, int z) {
    try (Locked<Area> l = acquireReadLock()) {
      if (!isReady()) return 0;
      return heightmap[getHeightMapRef(x, z)];
    }
  }

  // Get the bits XXXX0000
  public int getSunlight(int x, int y, int z) {
    try (Locked<Area> l = acquireReadLock()) {
      if (unready(y)) return 15;
      return (light[getRef(x, y, z)] >> 4) & 0xF;
    }
  }

  // Get the bits 0000XXXX
  public int getLight(int x, int y, int z) {
    try (Locked<Area> l = acquireReadLock()) {
      if (unready(y)) return 0;
      return (light[getRef(x, y, z)]) & 0xF;
    }
  }

  public int getMaxLight(int x, int y, int z) {
    try (Locked<Area> l = acquireReadLock()) {
      if (unready(y)) return 15;
      int sunlight = (light[getRef(x, y, z)] >> 4) & 0xF;
      int blocklight = (light[getRef(x, y, z)]) & 0xF;
      return sunlight > blocklight ? sunlight : blocklight;
    }
  }

  // Set the bits XXXX0000
  public void setSunlight(int x, int y, int z, int l) {
    try (Locked<Area> locked = acquireWriteLock()) {
      if (unready(y)) return;
      int ref = getRef(x, y, z);
      light[ref] = (byte) ((light[ref] & 0xF) | (l << 4));
      modify();
      updateRender(y / SIZE_BLOCKS);
    }
  }

  // Set the bits 0000XXXX
  public void setLight(int x, int y, int z, int l) {
    try (Locked<Area> locked = acquireWriteLock()) {
      if (unready(y)) return;
      int ref = getRef(x, y, z);
      light[ref] = (byte) ((light[ref] & 0xF0) | l);
      modify();
      updateRender(y / SIZE_BLOCKS);
    }
  }

  public int getLightRaw(int x, int y, int z) {
    try (Locked<Area> locked = acquireReadLock()) {
      if (y > maxY) return SunLight.MAX_SUNLIGHT;
      if (unready(y)) return 0;
      return light[getRef(x, y, z)] & 0xFF; // byte is signed (-128 to 127) so & 0xFF to convert to 0-255
    }
  }

  public boolean isBlank() {
    return blocks == null;
  }

  public boolean isUnloaded() {
    return unloaded;
  }

  // must be locked
  public boolean isReady() {
    return !unloaded && blocks != null;
  }

  private boolean unready(int y) {
    return !isReady() || y < 0 || y > maxY;
  }

  public void unload() {
    if (shared && Side.isClient()) return;

    try (Locked<Area> locked = acquireWriteLock()) {
      if (!unloaded) removeArrays();
    }
  }

  private void removeArrays() {
    try (Locked<Area> locked = acquireWriteLock()) {
      if (unloaded) {
        throw new CubesException("Area has been unloaded");
      }
      blocks = null;
      light = null;
      blockDataList.clear();
      AreaRenderer.free(areaRenderer);
      areaRenderer = null;
      if (renderStatus.length > 0) renderStatus = new int[0];
      maxY = 0;
      height = 0;
      Arrays.fill(heightmap, 0);
      Arrays.fill(neighboursClient, null);
      Arrays.fill(neighboursServer, null);

      unloaded = true;
    }
  }

  //Should already be write locked
  private void update(int x, int y, int z, int i) {
    if (y > maxY || y < 0) {
      return;
    }
    if (blocks[i] == 0) return; // air cannot be visible

    blocks[i] &= 0xFFFFFFF; // keep block id and meta

    if (x < SIZE_BLOCKS - 1) {
      if (TransparencyManager.isTransparent(blocks[i + MAX_X_OFFSET])) {
        blocks[i] |= BLOCK_VISIBLE;
        return;
      }
    } else {
      blocks[i] |= BLOCK_VISIBLE;
      return;
    }
    if (x > 0) {
      if (TransparencyManager.isTransparent(blocks[i + MIN_X_OFFSET])) {
        blocks[i] |= BLOCK_VISIBLE;
        return;
      }
    } else {
      blocks[i] |= BLOCK_VISIBLE;
      return;
    }
    if (y < maxY) {
      if (TransparencyManager.isTransparent(blocks[i + MAX_Y_OFFSET])) {
        blocks[i] |= BLOCK_VISIBLE;
        return;
      }
    } else {
      blocks[i] |= BLOCK_VISIBLE;
      return;
    }
    if (y > 0) {
      if (TransparencyManager.isTransparent(blocks[i + MIN_Y_OFFSET])) {
        blocks[i] |= BLOCK_VISIBLE;
        return;
      }
    } else {
      blocks[i] |= BLOCK_VISIBLE;
      return;
    }
    if (z < SIZE_BLOCKS - 1) {
      if (TransparencyManager.isTransparent(blocks[i + MAX_Z_OFFSET])) {
        blocks[i] |= BLOCK_VISIBLE;
        return;
      }
    } else {
      blocks[i] |= BLOCK_VISIBLE;
      return;
    }
    if (z > 0) {
      if (TransparencyManager.isTransparent(blocks[i + MIN_Z_OFFSET])) {
        blocks[i] |= BLOCK_VISIBLE;
        return;
      }
    } else {
      blocks[i] |= BLOCK_VISIBLE;
      return;
    }
  }

  public void setBlock(Block block, int x, int y, int z, int meta) {
    if (y < 0) return;

    int n = block == null ? 0 : block.intID;
    n += (meta & 0xFF) << 20;

    int b, ref = getRef(x, y, z);
    Block old;

    try (Locked<Area> locked = acquireWriteLock()) {
      if (isUnloaded()) return;
      setupArrays(y);

      b = blocks[ref];
      blocks[ref] = n;

      old = IDManager.toBlock(b & 0xFFFFF);

      if (old != null && old.blockData() && old != block) {
        removeBlockData(x, y, z);
      }
      if (block != null && block.blockData()) {
        addBlockData(block, x, y, z, meta);
      }

      doUpdatesThisArea(x, y, z, ref);

      int hmRef = x + z * SIZE_BLOCKS;
      if (y > heightmap[hmRef] && block != null) heightmap[hmRef] = y;
      if (y == heightmap[hmRef] && block == null) calculateHeight(x, z);

      modify();
    }

    //Must be after lock released to prevent dead locks
    if (TransparencyManager.isTransparent(b) != TransparencyManager.isTransparent(n))
      doUpdatesOtherAreas(x, y, z, ref);
    new BlockChangedEvent(new BlockReference().setFromBlockCoordinates(x + minBlockX, y, z + minBlockZ), old, (b >> 20) & 0xFF, block, meta, this).post();
  }

  public BlockData removeBlockData(int x, int y, int z) {
    try (Locked<Area> locked = acquireWriteLock()) {
      Iterator<BlockData> iterator = blockDataList.iterator();
      while (iterator.hasNext()) {
        BlockData blockData = iterator.next();
        if (blockData.getX() == x && blockData.getY() == y && blockData.getZ() == z) {
          iterator.remove();
          return blockData;
        }
      }
      return null;
    }
  }

  public BlockData getBlockData(int x, int y, int z) {
    try (Locked<Area> locked = acquireWriteLock()) {
      for (BlockData blockData : blockDataList) {
        if (blockData.getX() == x && blockData.getY() == y && blockData.getZ() == z) {
          return blockData;
        }
      }
      return null;
    }
  }

  public BlockData addBlockData(Block block, int x, int y, int z, int meta) {
    BlockData data = block.createBlockData(this, x, y, z, meta, null);
    addBlockData(data);
    return data;
  }

  public void addBlockData(BlockData blockData) {
    try (Locked<Area> locked = acquireWriteLock()) {
      blockDataList.add(blockData);
    }
  }

  public Area neighbourBlockCoordinates(int blockX, int blockZ) {
    return neighbour(CoordinateConverter.area(blockX), CoordinateConverter.area(blockZ));
  }

  public Area neighbour(final int areaX, final int areaZ) {
    if (areaX == this.areaX && areaZ == this.areaZ) return this;
    Side side = Side.getSide();
    int dX = areaX - this.areaX;
    int dZ = areaZ - this.areaZ;
    int n = 3 * (dX + 1) + (dZ + 1);

    if (side == Side.Client) {
      if (areaMapClient == null) return null;
      if (dX < -1 || dX > 1 || dZ < -1 || dZ > 1) return areaMapClient.getArea(areaX, areaZ);

      Area a = neighboursClient[n];
      if (a != null && a.areaMapClient == areaMapClient) return a;
      neighboursClient[n] = a = areaMapClient.getArea(areaX, areaZ);
      if (a != null && a.areaMapClient == areaMapClient) return a;
    } else if (side == Side.Server) {
      if (areaMapServer == null) return null;
      if (dX < -1 || dX > 1 || dZ < -1 || dZ > 1) return areaMapServer.getArea(areaX, areaZ);

      Area a = neighboursServer[n];
      if (a != null && a.areaMapServer == areaMapServer) return a;
      neighboursServer[n] = a = areaMapServer.getArea(areaX, areaZ);
      if (a != null && a.areaMapServer == areaMapServer) return a;
    }
    return null;
  }

  public AreaMap areaMap() {
    Side side = Side.getSide();
    if (side == Side.Client) return areaMapClient;
    else if (side == Side.Server) return areaMapServer;
    return null;
  }

  protected void setAreaMap(AreaMap areaMap) {
    Side side = Side.getSide();
    if (side == Side.Client) areaMapClient = areaMap;
    else if (side == Side.Server) areaMapServer = areaMap;
  }

  // must be locked
  public void tick() {
    if (Side.isServer()) {
      AreaMap areaMap = areaMap();
      if (!featuresGenerated() || areaMap == null) return;
      ThreadRandom random = ThreadRandom.get();
      //try (Locked<Area> locked = lockAllNeighbours(true, false)) {
      int updates = NUM_RANDOM_UPDATES * height;
      for (int i = 0; i < updates; i++) {
        int randomX = random.nextInt(SIZE_BLOCKS);
        int randomZ = random.nextInt(SIZE_BLOCKS);
        int randomY = random.nextInt(maxY + 1);
        randomTick(randomX, randomY, randomZ, areaMap);
      }
      for (BlockData blockData : blockDataList) {
        blockData.update();
      }
      //}
    }
  }

  private void randomTick(int x, int y, int z, AreaMap areaMap) {
    int b = blocks[getRef(x, y, z)];
    Block block = IDManager.toBlock(b & 0xFFFFF);
    if (block == null) return;
    block.randomTick(areaMap.world, this, x, y, z, (b >> 20) & 0xFF);
  }

  public void doUpdatesThisArea(int x, int y, int z, int ref) {
    updateSurrounding(x, y, z, ref);

    boolean updateRender = Side.isClient() || shared;
    int section = y / SIZE_BLOCKS;

    if (updateRender) {
      updateRender(section);
      if (y % SIZE_BLOCKS == 0) updateRender(section - 1);
      if (y % SIZE_BLOCKS == SIZE_BLOCKS - 1) updateRender(section + 1);
    }
  }

  public void doUpdatesOtherAreas(int x, int y, int z, int ref) {
    boolean updateRender = Side.isClient() || shared;
    int section = y / SIZE_BLOCKS;

    AreaMap areaMap = areaMap();
    if (areaMap != null && (x == 0 || x == SIZE_BLOCKS - 1 || z == 0 || z == SIZE_BLOCKS - 1)) {
      Area area;

      try (Locked<WorldLockable> areaMapLock = areaMap.acquireReadLock()) {
        if (x == 0) {
          area = neighbour(areaX - 1, areaZ);
          if (area != null) {
            try (Locked<Area> locked = area.acquireWriteLock()) {
              if (area.isReady()) area.update(SIZE_BLOCKS - 1, y, z, getRef(SIZE_BLOCKS - 1, y, z));
              if (updateRender) area.updateRender(section);
            }
          }
        } else if (x == SIZE_BLOCKS - 1) {
          area = neighbour(areaX + 1, areaZ);
          if (area != null) {
            try (Locked<Area> locked = area.acquireWriteLock()) {
              if (area.isReady()) area.update(0, y, z, getRef(0, y, z));
              if (updateRender) area.updateRender(section);
            }
          }
        }
        if (z == 0) {
          area = neighbour(areaX, areaZ - 1);
          if (area != null) {
            try (Locked<Area> locked = area.acquireWriteLock()) {
              if (area.isReady()) area.update(x, y, SIZE_BLOCKS - 1, getRef(x, y, SIZE_BLOCKS - 1));
              if (updateRender) area.updateRender(section);
            }
          }
        } else if (z == SIZE_BLOCKS - 1) {
          area = neighbour(areaX, areaZ + 1);
          if (area != null) {
            try (Locked<Area> locked = area.acquireWriteLock()) {
              if (area.isReady()) area.update(x, y, 0, getRef(x, y, 0));
              if (updateRender) area.updateRender(section);
            }
          }
      }
    }
    }
  }

  private void updateSurrounding(int x, int y, int z, int ref) {
    try (Locked<Area> locked = acquireWriteLock()) {
      update(x, y, z, ref);
      if (x < SIZE_BLOCKS - 1) update(x + 1, y, z, ref + MAX_X_OFFSET);
      if (x > 0) update(x - 1, y, z, ref + MIN_X_OFFSET);
      if (y < maxY) update(x, y + 1, z, ref + MAX_Y_OFFSET);
      if (y > 0) update(x, y - 1, z, ref + MIN_Y_OFFSET);
      if (z < SIZE_BLOCKS - 1) update(x, y, z + 1, ref + MAX_Z_OFFSET);
      if (z > 0) update(x, y, z - 1, ref + MIN_Z_OFFSET);
    }
  }

  public void updateRender(int section) {
    if (section >= 0 && section < renderStatus.length) {
      renderStatus[section] = AreaRenderStatus.UNKNOWN;
      if (areaRenderer != null && areaRenderer[section] != null) areaRenderer[section].refresh = true;
    }
  }

  public void updateAll() {
    try (Locked<Area> locked = acquireWriteLock()) {
      if (!isBlank()) {
        int i = 0;
        for (int y = 0; y < maxY; y++) {
          for (int z = 0; z < SIZE_BLOCKS; z++) {
            for (int x = 0; x < SIZE_BLOCKS; x++, i++) {
              update(x, y, z, i);
            }
          }
        }
      }
    }
  }

  // initial update and build of heightmap
  public void initialUpdate() {
    try (Locked<Area> locked = acquireWriteLock()) {
      if (!isReady()) return;

      // neg x side
      for (int z = 0; z < SIZE_BLOCKS; z++) {
        int height = -1;
        for (int y = 0; y <= maxY; y++) {
          int ref = (z * SIZE_BLOCKS) + (y * SIZE_BLOCKS_SQUARED);
          if (TransparencyManager.isTransparent(blocks[ref])) {
            if (blocks[ref + MAX_X_OFFSET] != 0) blocks[ref + MAX_X_OFFSET] |= BLOCK_VISIBLE;
          } else {
            blocks[ref] |= BLOCK_VISIBLE;
            height = y;
          }
        }
        heightmap[z * SIZE_BLOCKS] = height;
      }
      // pos x side
      for (int z = 0; z < SIZE_BLOCKS; z++) {
        int height = -1;
        for (int y = 0; y <= maxY; y++) {
          int ref = (SIZE_BLOCKS - 1) + (z * SIZE_BLOCKS) + (y * SIZE_BLOCKS_SQUARED);
          if (TransparencyManager.isTransparent(blocks[ref])) {
            if (blocks[ref + MIN_X_OFFSET] != 0) blocks[ref + MIN_X_OFFSET] |= BLOCK_VISIBLE;
          } else {
            blocks[ref] |= BLOCK_VISIBLE;
            height = y;
          }
        }
        heightmap[(SIZE_BLOCKS - 1) + (z * SIZE_BLOCKS)] = height;
      }
      // neg z side
      for (int x = 1; x < SIZE_BLOCKS - 1; x++) { //don't include x = 0 or x = SIZE_BLOCKS - 1
        int height = -1;
        for (int y = 0; y <= maxY; y++) {
          int ref = x + (y * SIZE_BLOCKS_SQUARED);
          if (TransparencyManager.isTransparent(blocks[ref])) {
            if (blocks[ref + MAX_Z_OFFSET] != 0) blocks[ref + MAX_Z_OFFSET] |= BLOCK_VISIBLE;
          } else {
            blocks[ref] |= BLOCK_VISIBLE;
            height = y;
          }
        }
        heightmap[x] = height;
      }
      // pos z side
      for (int x = 1; x < SIZE_BLOCKS - 1; x++) {
        int height = -1;
        for (int y = 0; y <= maxY; y++) {
          int ref = x + (SIZE_BLOCKS_SQUARED - SIZE_BLOCKS) + (y * SIZE_BLOCKS_SQUARED);
          if (TransparencyManager.isTransparent(blocks[ref])) {
            if (blocks[ref + MIN_Z_OFFSET] != 0) blocks[ref + MIN_Z_OFFSET] |= BLOCK_VISIBLE;
          } else {
            blocks[ref] |= BLOCK_VISIBLE;
            height = y;
          }
        }
        heightmap[x + (SIZE_BLOCKS_SQUARED - SIZE_BLOCKS)] = height;
      }
      // inner
      for (int x = 1; x < SIZE_BLOCKS - 1; x++) {
        for (int z = 1; z < SIZE_BLOCKS - 1; z++) {
          int height = -1;
          for (int y = 0; y <= maxY; y++) {
            int ref = x + z * SIZE_BLOCKS + y * SIZE_BLOCKS_SQUARED;
            if (TransparencyManager.isTransparent(blocks[ref])) {
              if (blocks[ref + MAX_X_OFFSET] != 0) blocks[ref + MAX_X_OFFSET] |= BLOCK_VISIBLE;
              if (blocks[ref + MIN_X_OFFSET] != 0) blocks[ref + MIN_X_OFFSET] |= BLOCK_VISIBLE;
              if (blocks[ref + MAX_Z_OFFSET] != 0) blocks[ref + MAX_Z_OFFSET] |= BLOCK_VISIBLE;
              if (blocks[ref + MIN_Z_OFFSET] != 0) blocks[ref + MIN_Z_OFFSET] |= BLOCK_VISIBLE;
              if (y < maxY && blocks[ref + MAX_Y_OFFSET] != 0) blocks[ref + MAX_Y_OFFSET] |= BLOCK_VISIBLE;
              if (y > 0 && blocks[ref + MIN_Y_OFFSET] != 0) blocks[ref + MIN_Y_OFFSET] |= BLOCK_VISIBLE;
            } else {
              height = y;
            }
          }
          heightmap[x + z * SIZE_BLOCKS] = height;
        }
      }
      // top and bottom
      for (int x = 0; x < SIZE_BLOCKS; x++) {
        for (int z = 0; z < SIZE_BLOCKS; z++) {
          int i = getRef(x, 0, z);
          if (blocks[i] != 0) blocks[i] |= BLOCK_VISIBLE;
          i = getRef(x, maxY, z);
          if (blocks[i] != 0) blocks[i] |= BLOCK_VISIBLE;
        }
      }

      modify();
    }
  }

  public void setupArrays(int y) {
    try (Locked<Area> locked = acquireWriteLock()) {
      if (unloaded) {
        throw new CubesException("Area has been unloaded");
      }
      if (isBlank()) {
        int h = (int) Math.ceil((y + 1) / (float) SIZE_BLOCKS);
        blocks = new int[SIZE_BLOCKS_CUBED * h];
        light = new byte[SIZE_BLOCKS_CUBED * h];
        AreaRenderer.free(areaRenderer);
        if (Side.isClient() || shared) {
          areaRenderer = new AreaRenderer[h];
          renderStatus = AreaRenderStatus.create(h);
        }
        height = h;
        maxY = (h * SIZE_BLOCKS) - 1;
      } else if (y > maxY) {
        expand(y);
      }

      neighboursClient[4] = this;
      neighboursServer[4] = this;
    }
  }

  public void rebuildHeightmap() {
    try (Locked<Area> locked = acquireWriteLock()) {
      if (!isReady()) return;

      for (int x = 0; x < SIZE_BLOCKS; x++) {
        zLoop:
        for (int z = 0; z < SIZE_BLOCKS; z++) {
          int column = x + z * SIZE_BLOCKS;
          int y = maxY;
          while (y >= 0) {
            if (blocks[column + y * SIZE_BLOCKS_SQUARED] != 0) {
              heightmap[column] = y;
              continue zLoop;
            }
            y--;
          }
          heightmap[column] = -1;
        }
      }
    }
  }

  public void calculateHeight(int x, int z) {
    try (Locked<Area> locked = acquireWriteLock()) {
      int column = x + z * SIZE_BLOCKS;
      int y = maxY;
      while (y >= 0) {
        if (blocks[column + y * SIZE_BLOCKS_SQUARED] != 0) {
          heightmap[column] = y;
          return;
        }
        y--;
      }
      heightmap[column] = -1;
    }
  }

  private void expand(int h) {
    try (Locked<Area> locked = acquireWriteLock()) {

      if (unloaded) throw new CubesException("Area has been unloaded");
      if (isBlank() || h <= maxY || h > MAX_Y) return;

      int oldMaxY = maxY;
      int[] oldBlocks = blocks;
      byte[] oldLight = light;
      AreaRenderer[] oldAreaRenderer = areaRenderer;

      int newHeight = (int) Math.ceil((h + 1) / (float) SIZE_BLOCKS); //Round up to multiple of SIZE_BLOCKS

      int[] newBlocks = new int[SIZE_BLOCKS_CUBED * newHeight];
      System.arraycopy(oldBlocks, 0, newBlocks, 0, oldBlocks.length);

      byte[] newLight = new byte[SIZE_BLOCKS_CUBED * newHeight];
      System.arraycopy(oldLight, 0, newLight, 0, oldLight.length);
      if (featuresGenerated()) Arrays.fill(newLight, oldLight.length, newLight.length, (byte) SunLight.MAX_SUNLIGHT);

      if (Side.isClient() || shared) {
        this.areaRenderer = new AreaRenderer[newHeight];
        if (renderStatus.length < newHeight) renderStatus = AreaRenderStatus.create(newHeight);
      } else {
        this.areaRenderer = null;
      }

      this.blocks = newBlocks;
      this.light = newLight;
      this.height = newHeight;
      this.maxY = (newHeight * SIZE_BLOCKS) - 1;

      int i = oldMaxY * SIZE_BLOCKS_SQUARED;
      for (int z = 0; z < SIZE_BLOCKS; z++) { //update previous top
        for (int x = 0; x < SIZE_BLOCKS; x++, i++) {
          updateSurrounding(x, oldMaxY, z, i);
        }
      }

      AreaRenderer.free(oldAreaRenderer);
    }
  }

  public boolean featuresGenerated() {
    return features.get() != null;
  }

  public void shrink() {
    try (Locked<Area> locked = acquireWriteLock()) {
      if (unloaded) throw new CubesException("Area has been unloaded");
      if (isBlank()) return;

      int usedHeight = usedHeight();
      if (usedHeight == height) return;
      if (usedHeight == 0) {
        removeArrays();
        return;
      }

      int[] oldBlocks = blocks;
      blocks = new int[SIZE_BLOCKS_CUBED * usedHeight];
      System.arraycopy(oldBlocks, 0, blocks, 0, blocks.length);

      byte[] oldLight = light;
      light = new byte[SIZE_BLOCKS_CUBED * usedHeight];
      System.arraycopy(oldLight, 0, light, 0, light.length);

      AreaRenderer.free(areaRenderer);
      if (Side.isClient() || shared) {
        areaRenderer = new AreaRenderer[usedHeight];
        renderStatus = AreaRenderStatus.create(usedHeight);
      } else {
        areaRenderer = null;
      }

      maxY = (usedHeight * SIZE_BLOCKS) - 1;
      int i = maxY * SIZE_BLOCKS_SQUARED;
      for (int z = 0; z < SIZE_BLOCKS; z++) {
        for (int x = 0; x < SIZE_BLOCKS; x++, i++) {
          updateSurrounding(x, maxY, z, i); //update new top
        }
      }
    }
  }

  //Should be read or write locked
  private int usedHeight() {
    int y = maxY;
    int i = blocks.length - 1;
    int maxUsedY = -1;
    while (y >= 0 && maxUsedY == -1) {
      for (int b = 0; b < SIZE_BLOCKS_SQUARED; b++) {
        if (blocks[i] != 0) {
          maxUsedY = y;
          break;
        }
        i--;
      }
      y--;
    }
    return (int) Math.ceil((maxUsedY + 1) / (float) SIZE_BLOCKS);
  }

  @Override
  public int hashCode() {
    return hashCode;
  }

  public void writeNetworking(DataOutputStream dataOutputStream) throws IOException {
    write(dataOutputStream, false, true, false, null);
  }

  public void writeSave(DataOutputStream dataOutputStream, DataGroup[] entities) throws IOException {
    write(dataOutputStream, false, false, true, entities); //TODO resize when writing
  }

  private void write(DataOutputStream dataOutputStream, boolean resize, boolean writeCoordinates, boolean writeEntities, DataGroup[] entities) throws IOException {
    try (Locked<Area> locked = acquireReadLock()) {
      if (writeCoordinates) {
        dataOutputStream.writeInt(areaX);
        dataOutputStream.writeInt(areaZ);
      }
      if (isBlank()) {
        dataOutputStream.writeInt(0);
        return;
      }

      int usedHeight = resize ? usedHeight() : height;
      dataOutputStream.writeInt(featuresGenerated() ? usedHeight : -usedHeight);

      for (int i = 0; i < SIZE_BLOCKS_SQUARED; i++) {
        dataOutputStream.writeInt(heightmap[i]);
      }

      int currentBlock = -1, num = 0;
      for (int i = 0; i < (SIZE_BLOCKS_CUBED * usedHeight); i++) {
        int block = blocks[i]; // always positive
        if (block == currentBlock) {
          num++;
        } else {
          if (currentBlock != -1) {
            if (num == 1) {
              dataOutputStream.writeInt(currentBlock);
            } else {
              dataOutputStream.writeInt(-num);
              dataOutputStream.writeInt(currentBlock);
            }
          }
          currentBlock = block;
          num = 1;
        }
      }
      if (num == 1) {
        dataOutputStream.writeInt(currentBlock);
      } else {
        dataOutputStream.writeInt(-num);
        dataOutputStream.writeInt(currentBlock);
      }

      for (int i = 0; i < (SIZE_BLOCKS_CUBED * usedHeight); i++) {
        dataOutputStream.writeByte(light[i]);
      }

      if (writeEntities && entities != null) {
        dataOutputStream.writeShort(entities.length);
        dataOutputStream.writeShort(blockDataList.size());

        for (DataGroup entity : entities) {
          Data.output(entity, dataOutputStream);
        }
      } else {
        dataOutputStream.writeShort(0);
        dataOutputStream.writeShort(blockDataList.size());
      }

      for (BlockData blockData : blockDataList) {
        dataOutputStream.writeInt(getRef(blockData.getX(), blockData.getY(), blockData.getZ()));
        Data.output(blockData.write(), dataOutputStream);
      }

      if (usedHeight != height) {
        Executor.execute(new Runnable() {
          @Override
          public void run() {
            try (Locked<Area> l = acquireWriteLock()) {
              if (!unloaded) shrink();
            }
          }
        });
      }
    }
  }

  public void read(DataInputStream dataInputStream) throws IOException {
    int height = dataInputStream.readInt();
    if (height == 0) return;

    if (height > 0) { //if features
      features.set(Boolean.TRUE);
    } else {
      height = -height;
    }
    setupArrays((height * SIZE_BLOCKS) - 1);

    for (int i = 0; i < SIZE_BLOCKS_SQUARED; i++) {
      heightmap[i] = dataInputStream.readInt();
    }

    int counter = 0;
    boolean invalidBlocks = false;
    while (counter < (SIZE_BLOCKS_CUBED * height)) {
      int a = dataInputStream.readInt();
      if (a >= 0) {
        if (!IDManager.validBlock(a)) {
          invalidBlocks = true;
          a = 0;
        }
        blocks[counter++] = a;
      } else {
        int block = dataInputStream.readInt();
        if (!IDManager.validBlock(block)) {
          invalidBlocks = true;
          block = 0;
        }
        for (int i = 0; i < -a; i++) {
          blocks[counter++] = block;
        }
      }
    }

    for (int i = 0; i < light.length; i++) {
      light[i] = dataInputStream.readByte();
    }

    int entitiesSize = dataInputStream.readShort();
    int dataSize = dataInputStream.readShort();
    for (int i = 0; i < entitiesSize; i++) {
      DataGroup dataGroup = (DataGroup) Data.input(dataInputStream);
      Side.getCubes().world.addEntityFromSave(dataGroup);
    }
    saveEntities = entitiesSize;

    blockDataList.clear();
    blockDataList.ensureCapacity(dataSize);
    for (int i = 0; i < dataSize; i++) {
      int ref = dataInputStream.readInt();
      int x = getX(ref), y = getY(ref), z = getZ(ref);
      Block block = getBlock(x, y, z);
      if (block == null) continue;
      int meta = getMeta(x, y, z);
      DataGroup dataGroup = (DataGroup) Data.input(dataInputStream);
      BlockData data = block.createBlockData(this, x, y, z, meta, dataGroup);
      if (data == null) continue;
      data.read(dataGroup);
      blockDataList.add(data);
    }

    if (invalidBlocks) {
      Log.warning("Invalid blocks in " + toString());
      updateAll();
    }

    saveModCount();
  }

  public static Area readArea(DataInputStream dataInputStream) throws IOException {
    int areaX = dataInputStream.readInt();
    int areaZ = dataInputStream.readInt();
    Area area = new Area(areaX, areaZ);

    area.read(dataInputStream);
    return area;
  }

  public static int getRef(int x, int y, int z) {
    return x + z * SIZE_BLOCKS + y * SIZE_BLOCKS_SQUARED;
  }

  public static int getX(int ref) {
    return ref % SIZE_BLOCKS;
  }

  public static int getZ(int ref) {
    return (ref % SIZE_BLOCKS_SQUARED) / SIZE_BLOCKS;
  }

  public static int getY(int ref) {
    return ref / SIZE_BLOCKS_SQUARED;
  }

  public static int getHeightMapRef(int x, int z) {
    return x + z * SIZE_BLOCKS;
  }

  public static boolean isShared() {
    return NetworkingManager.isSingleplayer() && Settings.getBooleanSettingValue(Settings.DEBUG_AREA_SHARING);
  }

  @Override
  public String toString() {
    return areaX + "," + areaZ;
  }

  /**
   * Crucial to call this so changes are written to disk.
   * Area should be write locked
   */
  public void modify() {
    modCount++;
  }

  public boolean modifiedSinceSave(DataGroup[] entities) {
    return (entities != null && entities.length > 0) || saveEntities > 0 || saveModCount != modCount;
  }

  public void saveModCount() {
    try (Locked<Area> locked = acquireWriteLock()) {
      saveModCount = modCount;
    }
  }

  @Override
  public int compareTo(Area o) {
    int c = Integer.compare(areaX, o.areaX);
    if (c != 0) return c;
    return Integer.compare(areaZ, o.areaZ);
  }

  private static final int[][] NEIGHBOUR_OFFSETS = new int[][] {{-1, -1}, {-1, 0}, {-1,1}, {0, -1}, {0, 1}, {1, -1}, {1, 0}, {1, 1}};

  public Locked<Area> lockAllNeighbours(boolean write, boolean requireAll) {
    boolean all = true;
    for (int[] offset : NEIGHBOUR_OFFSETS) {
      all &= neighbour(areaX + offset[0], areaZ + offset[1]) != null;
    }
    if (!all && requireAll) throw new CubesException("Not all neighbours are loaded");

    return LockManager.lockMany(write, Side.isClient() ? neighboursClient : neighboursServer);
  }

  public static final Comparator<Area> LOCK_ITERATION_ORDER = new Comparator<Area>() {
    @Override
    public int compare(Area o1, Area o2) {
      int c = Integer.compare(o1.areaZ, o2.areaZ);
      if (c != 0) return c;
      return Integer.compare(o1.areaX, o2.areaX);
    }
  };
}

redpajama_set_name: RedPajamaGithub


text:
More papers are found by FBI
PRESIDENT JOE BIDEN (White House photo).
Six more classified documents have been turned up in a search of President Joe Biden's home by the FBI.
According to the Associated Press, agents also took some of the presidents' notes. The papers taken appear to have been from Biden's time as a senator and vice president rather than his time in the White House.
The president and First Lady were not at home during the search, said lawyers representing the President.
Wait a bit, U.S. tells Ukrainians
Hold off on launching a major push against Russian invaders is the advice that senior U.S. military officials are giving Ukraine, at least until the latest bunch of weapons and training from America arrive and are in place.
According to reuters.com, the U.S. is sending Bradley armed fighting vehicles and Patriot air defense systems, among other assistance. The latest weapons package is worth $2.5 billion.
Also in the news … Former astronaut Buzz Aldrin, the second person to walk on the surface of the moon, has married at the age of 93. "We are excited as teenagers he said," in reference to his marriage to Anca Faur, his fourth wife.
Sports: Chiefs outlast Jags; Eagles top Giants
An ankle injury to quarterback Patrick Mahomes wasn't enough to keep the Kansas City Chiefs from defeating the Jacksonville Jaguars 27-20 in an American Football Conference divisional playoff game Saturday in Kansas City.
With Mahomes on the sidelines for a while, backup quarterback Chad Henne led the team on a scoring drive, completing five of seven passes for 23 yards and a score.
Mahomes, who returned for the next drive, finished with 230 yards passing and two TDs. He completed 22 of 30 passes.
For the Jags, Trevor Lawrence completed 24 of 39 passes for 217 yards and a touchdown.
Also on Saturday, the Philadelphia Eagles defeated the New York Giants 38-7 in a National Football Conference divisional game. Jalen Hurts passed for 154 yards and two TDs; he rushed for 34 yards and a touchdown.
Weather: Some clouds, lots of sun
The forecast for Sunday in the West Orange County area is for partly cloudy skies, but the sun won't be far behind. Sunday's daytime high should be 62 with an overnight low of 43. But on Monday – extending to Friday – skies should be sunny with daytime highs in the mid-60s to low 70s. If you miss the clouds, they are expected to return on Saturday, Jan. 28.
Categories: The Wider World
Tagged as: Buzz Aldrin, FBI, Joe Biden, Kansas City Chiefs, News Update, Russia, Ukraine
Moving toward new police HQ


Jose Mourinho has agreed to take charge of Manchester United but his move his being held up by the club's owners, according to Spanish radio station Cadena Cope.
The Portuguese boss has been out of work since being sacked by Chelsea in December and has been linked with the United job ever since.
Last month, reports claimed he had a pre-contract agreement with United which would see him due £5m compensation if not confirmed as Louis van Gaal's replacement on May 1 and another £10m if not done by June 1.
And Cope say Mourinho has everything agreed with United to take the hotseat but the Glazer family are stopping a deal being signed.
United have told Benfica they will pay £40m up front for Renato Sanches, according to Portuguese paper A Bola.
The Red Devils have scouted Sanches on several occasions this season and once again had representatives at Benfica's game against Braga on Friday evening.
Benfica are reported to want £48m in total but would be ready to accept United's offer provided the remaining £8m was made up with achievable bonuses.
Talks are said to be continuing to reach a final agreement and should a deal be struck, Sanches could become United's first signing ahead of the summer transfer window.
Former Real Madrid president Ramon Calderon has told talkSPORT the La Liga giants may have an agreement in place to sign David de Gea.
The United goalkeeper saw a proposed move to the Bernabeu last summer collapse at the last moment after the required paperwork was not completed in time.
"Apparently there is some agreement," Calderon said.


Total hip replacement (unilateral) is an orthopaedic surgery in which a painful hip is replaced by a prosthetic implant. These artificial joints are often made from metal and plastic. This surgical procedure is generally conducted to relieve severe arthritis pain. Both the acetabulum and the femoral head of one side are removed in a unilateral total hip replacement.
Total hip replacement indication is, when all other nonsurgical treatment options have failed to provide adequate pain relief. Total hip replacement procedure can be performed through the conventional method or by using a minimally-invasive technique. The basic difference between both the procedures is the size of the incision.
Traditional total hip replacement will need a general anaesthesia. Your orthopaedic surgeon will make an 8 to 10 inch incision along the side of the hip and move the muscles connected to the top of the thigh bone.
Now, the ball portion of the joint is removed by cutting the thigh bone and an artificial joint is attached to the thighbone, generally by using surgical cement. After that, a replacement socket will be attached to the hip bone and the new ball part of the thighbone is inserted into the socket and muscles are reattached. Finally, the incision is closed with stitches.