NPR: ‘If We Left, They Wouldn’t Have Nobody’

Standard

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.

Continue reading

Vicki Panetti: “Texas will kill my brother on December 3rd”

Standard

My brother Scott is a mentally ill man with schizophrenia set to be executed in Texas onDecember 3, 2014. Even though the Supreme Court has held that the Constitution forbids the execution of severely mentally ill individuals who do not understand the reason for their punishment, Scott will die in just two weeks unless Governor Rick Perry commutes his sentence to life in prison.

Now 56, Scott still suffers severely from schizophrenia. He was diagnosed in 1978 and later began having delusions that he was engaged in spiritual warfare with Satan. Over the years he became obsessed with the idea that the devil was in his house. In 1992, he suffered a psychotic break and killed his wife’s parents.

Continue reading

Months After Chemical Spill in West Virginia, Chemical Industry Pours Money Into Midterm Elections

Standard

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.

Continue reading

Maura Washington: Congress: Take out language that will hurt Navajo housing in the renewal of NAHASDA

Standard

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.

Continue reading

The Hobbit: The Battle of the Five Armies’ Gets a Promotion Boost from WebRTC & HTML5

Standard

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.

Continue reading

C# ushort[] to string conversion

Standard

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[10];
for (int i = 0; i < data.Length; ++i)
    data[i] = (char) ('A' + i);

string asString;
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:

string asString;
unsafe
{
    fixed (ushort *dataPtr = &data[0])
        asString = new string((char *) dataPtr, 0, data.Length);
}