Stories
Slash Boxes
Comments

SoylentNews is people

Log In

Log In

Create Account  |  Retrieve Password


Soylent Upgrade user extension for Chrome

Posted by takyon on Tuesday May 12 2015, @01:34AM (#1215)
7 Comments
Code

// ==UserScript==
// @name Soylent Upgrade
// @match http://soylentnews.org/submit.pl
// @match https://soylentnews.org/submit.pl
// @match http://soylentnews.org/submit.pl?op=viewsub&subid=*
// @match https://soylentnews.org/submit.pl?op=viewsub&subid=*
// @match http://soylentnews.org/admin.pl
// @match https://soylentnews.org/admin.pl
// @match http://soylentnews.org/admin.pl?op=edit&sid=*
// @match https://soylentnews.org/admin.pl?op=edit&sid=*
// @match http://soylentnews.org/comments.pl*
// ==/UserScript==

var simplifyChars = true;

var boxes = document.getElementsByTagName("textarea");
for (var x=0; x<boxes.length; x++)
{
    if (boxes[x].name == "introtext" || boxes[x].name == "bodytext")
    {
        var temp = boxes[x].value;
        temp = temp.replace(/<\/p><p>/g,"<\/p>\n\n<p>");
        temp = temp.replace(/<br>\s?<br>/g,"<\/p>\n\n<p>");
        temp = temp.replace(/<\/blockquote><p>/g,"<\/blockquote>\n\n<p>");
        temp = temp.replace(/<\/p><blockquote>/g,"<\/p>\n\n<blockquote>");
        temp = temp.replace(/<blockquote><div><p>/g,"<blockquote><div>\n\n<p>");
        temp = temp.replace(/<\/p><\/div><\/blockquote>/g,"<\/p>\n\n<\/div><\/blockquote>");
        temp = temp.replace(/<\/blockquote><blockquote>/g,"<\/blockquote>\n\n<blockquote>");
        temp = temp.replace(/<p class="byline">\s/i,"<p class=\"byline\">");
        temp = temp.replace(/<p>\s/g,"<p>");
        temp = temp.replace(/\s<\/p>/g,"<\/p>");
        temp = temp.replace(/<\/li><li>/g,"<\/li>\n<li>");
        temp = temp.replace(/<\/li><\/ul>/g,"<\/li>\n<\/ul>");
        temp = temp.replace(/<\/p><ul>/g,"<\/p>\n\n<ul>");
        temp = temp.replace(/  /g," ");
        if (simplifyChars)
        {
            temp = temp.replace(/\u2018/g,"'");
            temp = temp.replace(/\u2019/g,"'");
            temp = temp.replace(/\u201C/g,"\"");
            temp = temp.replace(/\u201D/g,"\"");
            temp = temp.replace(/\u2026/g,"..."); // ellipsis
        }
        boxes[x].value = temp;
        boxes[x].rows = 32;
    }
    var toolbar = document.createElement("div");
    var tempbutton = document.createElement("input");
    tempbutton.setAttribute("type","button");
    tempbutton.setAttribute("value","Blockquote");
    tempbutton.setAttribute("onmousedown","addBlockquote(document.getElementsByTagName('textarea')["+x+"]);");
    toolbar.appendChild(tempbutton);
    boxes[x].parentNode.insertBefore(toolbar, boxes[x].nextSibling);
}

var temp = document.createElement("script");
temp.appendChild(document.createTextNode("function addBlockquote(area) { var sel = getSelection(); if (sel.length != 0) { area.value = area.value.replace(sel,'<blockquote>'+sel+'<\/blockquote>'); } }"));
document.getElementsByTagName('head')[0].appendChild(temp);

function getSelection() {
    return (!!document.getSelection) ? document.getSelection() :
           (!!window.getSelection)   ? window.getSelection() :
           document.selection.createRange().text;
}

Getting Past the Yuck Factor With 'Toilet to Tap' Water

Posted by Papas Fritas on Monday May 11 2015, @11:59PM (#1214)
0 Comments
News
From a marketing point of view, using treated sewage to create drinking water is a proposition that has proved difficult to sell to customers. Now John Schwartz writes in the NYT that as California scrambles for ways to cope with its crippling drought and the mandatory water restrictions imposed last month by Gov. Jerry Brown, enticing people to drink recycled water is requiring California residents to get past what experts call the “yuck” factor. Efforts in the 1990s to develop water reuse in San Diego and Los Angeles were beaten back by activists who denounced what they called, devastatingly, “toilet to tap.” Orange County swung people to the idea of drinking recycled water with a special purification plant which has been operating since 2008 avoiding a backlash with a massive public relations campaign that involved more than 2,000 community presentations. The county does not run its purified water directly into drinking water treatment plants; instead, it sends the water underground to replenish the area’s aquifers and to be diluted by the natural water supply. This environmental buffer seems to provide an emotional buffer for consumers as well.

In 2000, Los Angeles actually completed a sewage reclamation plant capable of providing water to 120,000 homes — the Donald C. Tillman Water Reclamation Plant in Van Nuys.The plan was abandoned after public outrage. Angelenos, it seemed, were too good to drink perfectly safe recycled water — dismissed as “toilet to tap.” But Los Angeles is ready to try again, with plans to provide a quarter of the city’s needs by 2024 with recycled water and captured storm water routed through aquifers. ”The difference between this and 2000 is everyone wants this to happen,” says Marty Adams. The inevitable squeamishness over drinking water that was once waste ignores a fundamental fact, says George Tchobanoglous: “When it comes down to it, water is water. Everyone who lives downstream on a river is drinking recycled water.”

The Mathematician Who Loves Hitting People

Posted by Papas Fritas on Monday May 11 2015, @12:18AM (#1212)
0 Comments
News
Kate Murphy writes at NYT about John Urschel whose latest contribution to the mathematical realm was a paper for the Journal of Computational Mathematics with the impressively esoteric title, "A Cascadic Multigrid Algorithm for Computing the Fiedler Vector of Graph Laplacians." ""I have a Bachelor's and Master's in mathematics, all with a 4.0, and numerous published papers in major mathematical journals." But as an offensive guard for the Baltimore Ravens, John Urschel regularly goes head to head with the top defensive players in the NFL and does his best to keep quarterback Joe Flacco out of harm's way. "I play because I love the game. I love hitting people," Urshel writes. "There's a rush you get when you go out on the field, lay everything on the line and physically dominate the player across from you. This is a feeling I'm (for lack of a better word) addicted to, and I'm hard-pressed to find anywhere else." Urschel acknowledges that he has faced questions from NFL officials, journalists, fans and fellow mathematicians about why he runs the risk of potential brain injury from playing football when he has "a bright career ahead of me in mathematics" but doesn't feel able to quit. "When I go too long without physical contact I'm not a pleasant person to be around. This is why, every offseason, I train in kickboxing and wrestling in addition to my lifting, running and position-specific drill work."

Scientists Find Alarming Deterioration In DNA of the Urban P

Posted by Papas Fritas on Sunday May 10 2015, @11:45PM (#1211)
0 Comments
News
Nico Pitney reports that the urban poor in the United States are experiencing accelerated aging at the cellular level, and that chronic stress linked both to income level and racial-ethnic identity is driving this physiological deterioration. Researchers analyzed telomeres, tiny caps at the ends of DNA strands that protect cells from aging prematurely, of poor and lower middle-class black, white, and Mexican residents of Detroit and found that low-income residents of Detroit, regardless of race, have significantly shorter telomeres than the national average. "There are effects of living in high-poverty, racially segregated neighborhoods -- the life experiences people have, the physical exposures, a whole range of things -- that are just not good for your health," says Nobel laureate. Dr. Arline Geronimus, the lead author of the study, described as the most rigorous research of its kind examining how "structurally rooted social processes work through biological mechanisms to impact health." White Detroit residents who were lower-middle-class had the longest telomeres in the study. But the shortest telomeres belonged to poor whites. Black residents had about the same telomere lengths regardless of whether they were poor or lower-middle-class. And poor Mexicans actually had longer telomeres than Mexicans with higher incomes. Geronimus says these findings demonstrate the limitations of standard measures -- like race, income and education level -- typically used to examine health disparities. "We've relied on them too much to be the signifiers of everything that varies in the life experiences of difference racial or ethnic groups in different geographic locations and circumstances."

One co-author of this new study is Dr. Elizabeth Blackburn who helped to discover telomeres, an achievement that won her the Nobel Prize in physiology in 2009. Blackburn ticked off a list of studies in which people's experiences and perceptions directly correlated with their telomere lengths: whether people say they feel stressed or pessimistic; whether they feel racial discrimination towards others or feel discriminated against; whether they have experienced severely negative experiences in childhood, and so on. "These are all really adding up in this quantitative way," says Blackburn. "Once you get a quantitative relationship, then this is science, right?"

Fuck Windows 7 Ultimate 64bit Updates

Posted by jasassin on Sunday May 10 2015, @07:55PM (#1210)
13 Comments
OS

I have a computer with 2 GB RAM. I installed fresh Windows 7 Ultimate 64 bit. Installs fine. Go to update, select all the 180 plus updates click update and then go to bed. I wake up to find Windows shitting itself with a your computer is low on memory boxes all over. So I close the boxes and restart. It brings up its step 1 of 5 bullshit before shutting down. It shit for about 3 hours, then proceeds to tell me the updates failed and attempts to shit itself for another three hours reversing the updates. I've now hard reset and am starting all over.

It's pretty sad you've got to update this peice of shit Windows in chunks. Wasted a whole day on this bullshit (literally). And why does Windows update take over four hours to update itself anyway? Is it just me or is this fucked up?

North Korea Tests Submarine Ballistic Missile

Posted by Papas Fritas on Saturday May 09 2015, @02:58PM (#1208)
0 Comments
News
USA Today reports that under the watchful eyes of North Korean leader Kim Jong Un, North Korea says it has conducted an underwater test-firing of a submarine ballistic missile. Kim called the missile a "world-level strategic weapon" and an "eye-opening success." Although American officials had suspected North Korea was developing such a missile system, the country had not previously claimed to have conducted a test launching. The test, if confirmed, would pose a new challenge to the United States and its regional allies, South Korea and Japan, which have been trying to build missile defense capabilities to guard against potential North Korean missile attacks. The news of a successful test-fire was most likely a surprise to South Korean military officials, who have privately told reporters that they believed it would take years for the North to develop such a submarine-launched ballistic missile. “North Korea’s development of a submarine-launched missile capability would eventually expand Pyongyang’s threat to South Korea, Japan and U.S. bases in East Asia" says Joseph S. Bermudez Jr. “Submarines carrying land-attack missiles would be challenging to locate and track, would be mobile assets able to attack from any direction, and could operate at significant distances from the Korean peninsula.”

Harvard Engineering Students Build the Ultimate BBQ Smoker

Posted by Papas Fritas on Friday May 08 2015, @09:39PM (#1207)
0 Comments
News
Carolyn Y. Johnson reports at the Boston Globe that a 16-person team at Harvard has solved one of the toughest problems in the field of food preparation: How to build a foolproof smoker that can repeatedly produce the perfect brisket, to be judged on texture, taste, and appearance. Tested by countless computer simulations of virtual brisket smoking, nearly two dozen weekend smoking sessions — often in snow or sub-zero temperatures — and 220 pounds of meat, the smoker is a rigorous, data-driven tool for making a feast. Making a perfectly smoked piece of meat may seem to be as far as you can get from an engineering conundrum, but engineering professor Kevin Kit Parker saw it as a problem that required a deep understanding of chemistry, heat transfer, materials science, prototyping, and solving problems. According to Parker, Barbecue has been a veritable Wild West in which pit masters build mishmash setups that incorporate garbage cans, cinder blocks, a giant rotisserie. “They are the biggest contraptions and pieces of junk you’ve ever seen,” says Parker. “Everyone had their own little mojo they brought to the problem.”

In the end, the secret was to precisely control the temperature both in the smoker and in the meat over the “low and slow” smoke. They had to keep the meat below 120 degrees long enough to let the enzymes in the meat break down the collagen and make it tender; they wanted the smoker’s shape to cause “cyclonic airflow,” meaning the smoke would circulate down toward the brisket. While the wood would burn at 700 degrees, the meat would gradually rise over a 15-hour period to about 190 degrees. The class settled on a material — ceramic — and a shape that resembles a cooling tower at a power plant. The design solved one of the big problems with the commercial smoker they used, by eliminating hot spots where the meat might cook too quickly and dry out. They built an app that would allow cooks to monitor the conditions inside the smoker and share their experiences through social media. How to measure success? "They look for perfectly cooked brisket to take on a mahogany hue," says Johnson. "When sliced, there should be a slightly pink section around the edge, called the smoke ring. The meat must be tender, but not falling apart." “They’ve gone from basic science," says Patrick Connolly, chief strategy officer for Williams-Sonoma, who plans to bring the design back to the company’s leaders, "to really understanding how you optimize for flavor and texture."

It's Time to Close La Guardia Airport

Posted by Papas Fritas on Friday May 08 2015, @02:36PM (#1206)
0 Comments
News
George Haikalis writes in the NYT that last week, the Port Authority of New York and New Jersey put off, yet again, deciding between two proposals for a nearly $4 billion project to rehabilitate the dilapidated Central Terminal Building at La Guardia Airport. But piling billions of taxpayer dollars into upgrading La Guardia, which has been likened to an experience “in a third world country," won’t solve its fundamental problems. "It can’t easily expand," says Haikalis. "Its two runways and four terminals are surrounded on three sides by water, making landing difficult and hazardous. Parking is a nightmare."

There are precedents for replacing airports close to the center city with modern, more outlying airports. Hong Kong and Denver are two examples; Berlin will soon follow suit. With the consolidation of the major United States airlines and the sluggishness in the global economy, the much larger Kennedy and Newark airports could accommodate La Guardia’s passenger load, by adding more frequent service and using larger aircraft, if the F.A.A. were to lift the caps on the number of flights allowed there. Kennedy, with its two sets of parallel runways, could handle many more flights, particularly as new air-traffic control technology is introduced in the next few years. The money budgeted for the La Guardia upgrades would be better used to create a long-proposed one-ride express-rail link between Manhattan and J.F.K., by reviving a long-disused, 3.5-mile stretch of track in central Queens and completing the modernization of the terminals at Kennedy. "By avoiding the costly replacement of outmoded terminals at La Guardia and by creating a new express rail link and upgrading terminals at Kennedy, the increased economic activity could more than make up for the lost jobs," concludes Haikalis. "New York’s importance to America’s economy demands a first world vision to shutter this third world airport."

25 Percent of Cars Cause 90 Percent of Air Pollution

Posted by Papas Fritas on Thursday May 07 2015, @05:39PM (#1204)
0 Comments
News
Sara Novak reports that according to a recent study, “badly tuned” cars and trucks make up one quarter of the vehicles on the road, but cause 95 percent of black carbon, also known as soot, 93 percent of carbon monoxide, and 76 percent of volatile organic chemicals like benzene, toluene, ethylbenzene, and xylenes. “The most surprising thing we found was how broad the range of emissions was,” says Greg Evans. “As we looked at the exhaust coming out of individual vehicles, we saw so many variations. How you drive, hard acceleration, age of the vehicle, how the car is maintained – these are things we can influence that can all have an effect on pollution.” Researchers at the University of Toronto looked at 100,000 cars as they drove past air sampling probes on one of Toronto’s major roads. An automated identification and integration method was applied to high time resolution air pollutant measurements of in-use vehicle emissions performed under real-world conditions at a near-road monitoring station in Toronto, Canada during four seasons, through month-long campaigns in 2013–2014. Based on carbon dioxide measurements, over 100 000 vehicle-related plumes were automatically identified and fuel-based emission factors for nitrogen oxides; carbon monoxide; particle number, black carbon; benzene, toluene, ethylbenzene, and xylenes (BTEX); and methanol were determined for each plume. Evans and his team found that policy changes need to better target cars that are causing the majority of the air pollution. “The ultrafine particles are particularly troubling,” says Evans. “Because they are over 1,000 times smaller than the width of a human hair, they have a greater ability to penetrate deeper within the lung and travel in the body.”

What to Say When the Police Tell You to Stop Filming Them

Posted by Papas Fritas on Wednesday May 06 2015, @10:52PM (#1202)
0 Comments
News
Robinson Meyer writes in The Atlantic that first of all, police shouldn’t ask. “As a basic principle, we can’t tell you to stop recording,” says Delroy Burton, a 21-year veteran of DC's police force. “If you’re standing across the street videotaping, and I’m in a public place, carrying out my public functions, [then] I’m subject to recording, and there’s nothing legally the police officer can do to stop you from recording.” What you don’t have a right to do is interfere with an officer's work. "“Police officers may legitimately order citizens to cease activities that are truly interfering with legitimate law enforcement operations,” according to Jay Stanley who wrote the ACLU’s “Know Your Rights” guide for photographers, which lays out in plain language the legal protections that are assured people filming in public. Police officers may not confiscate or demand to view your digital photographs or video without a warrant and police may not delete your photographs or video under any circumstances.

What if an officer says you are interfering with legitimate law enforcement operations and you disagree with the officer? “If it were me, and an officer came up and said, ‘You need to turn that camera off, sir,’ I would strive to calmly and politely yet firmly remind the officer of my rights while continuing to record the interaction, and not turn the camera off," says Stanley. The ACLU guide also supplies the one question those stopped for taking photos or video may ask an officer: "The right question to ask is, ‘am I free to go?’ If the officer says no, then you are being detained, something that under the law an officer cannot do without reasonable suspicion that you have or are about to commit a crime or are in the process of doing so. Until you ask to leave, your being stopped is considered voluntary under the law and is legal."