When an assisted living home in California shut down last fall, many of its residents were left behind, with nowhere to go.
The staff at the Valley Springs Manor left when they stopped getting paid — except for cook Maurice Rowland and Miguel Alvarez, the janitor.
“There was about 16 residents left behind, and we had a conversation in the kitchen, ‘What are we going to do?’ ” Rowland says.
“If we left, they wouldn’t have nobody,” the 34-year-old Alvarez says.
Their roles quickly transformed for the elderly residents, who needed round-the-clock care.
Nine months after a massive chemical spill in my home state of West Virginia contaminated the water supply for 300,000 residents, a new report out this week shows that the American Chemistry Council (ACC) has spent nearly $2 million so far in the 2014 election cycle running thousands of ads in congressional races. According to the report, published by Citizens for Responsibility and Ethics in Washington (CREW), the trade association has also tripled its lobbying spending in recent years as it pushes for legislation that would make it harder for states to regulate chemicals.
For the Navajo, home is a sacred place — but far too many have no running water, no electricity and no bathrooms. Thousands of Navajo people are living in substandard homes while their fate lies in the hands of the federal government, who’s currently pondering a bill that can dramatically cut aid to the impoverished nation.
The statistics about life on the reservation are devastating. About 40 percent of the Navajo don’t have electricity, kitchens or bathrooms. The Navajo Housing Authority found that more than $9 billion is needed to build 34,000 new homes, and another 33,000 existing homes need major repairs to bring them up to basic livable standards.
I am all but certain that I am not alone in looking forward to Warner Bros.’ release of “The Hobbit: The Battle of the Five Armies” coming to theaters in a little under a month. For those who just can’t wait, or for those who need a little extra push to get excited, a Chrome Experiment that emerged last year has taken on a new coat of paint and some new options, backed up by not only HTML5, but also by WebRTC.
P/Invoke can actually handle what you’re after most of the time using StringBuilder to create writable buffers, for example see pinvoke.net on GetWindowText and related functions.
However, that aside, with data as ushort, I assume that it is encoded in UTF-16LE. If that is the case you can use Encoding.Unicode.GetString(), but that will exepect a byte array rather than a ushort array. To turn your ushorts into bytes, you can allocate a separate byte array and use Buffer.BlockCopy, something like this:
ushort data = new ushort;
for (int i = 0; i < data.Length; ++i)
data[i] = (char) ('A' + i);
byte asBytes = new byte[data.Length * sizeof(ushort)];
Buffer.BlockCopy(data, 0, asBytes, 0, asBytes.Length);
asString = Encoding.Unicode.GetString(asBytes);
However, if unsafe code is OK, you have another option. Get the start of the array as a ushort*, and hard-cast it to char*, and then pass it to the string constructor, like so:
fixed (ushort *dataPtr = &data)
asString = new string((char *) dataPtr, 0, data.Length);