Tag Archives: Right

Chile president meets with ministers after attack

A string of arson attacks in a remote southern region of Chile where Mapuche Indian farmers are pitted against landowners and the forest industry has led to calls for the government to declare a state of emergency in the area.

In the latest attack, an elderly couple was burned alive in the remote southern region of Araucania on Friday while trying to defend their home. Their family’s vast landholdings had long been targeted by Mapuche Indians who claim ancestral rights over the land.

President Sebastian Pinera flew to the scene shortly after the attack, doubled the number of police agents in the region to 400 and announced tough new security measures. They include the application of Chile‘s tough anti-terror law, which dates back to the late Gen. Augusto Pinochet‘s 1973-1990 dictatorship and allows for suspects to be held in isolation without charge, and for the use of secret witnesses and telephone taps that have been discredited by Chile‘s courts in previous cases of Mapuche violence.

But despite the government‘s tough stance, police reported six more arson attacks over the weekend, the burning of a lumber truck and an abandoned house by unidentified groups.

“For now, we think the anti-terrorist law is the most efficient,” Interior Minister Andres Chadwick said after meeting with Pinera, police chiefs and Cabinet ministers on Sunday.

“What we have here is a terrorist movement that is launching attacks in different places and in precise ways, and that’s why we need police action and the collaboration of all citizens,” Chadwick said. “We’re not ruling out using any other legal tool provided by the constitution,” a reference to the state of emergency.

Although no one has claimed responsibility for Friday’s deadly attack and some Mapuches called it senseless and abhorrent, local business and land owners say they’ve had enough. Right-wing politicians are demanding the government take strong action against the perpetrators and act to guarantee safety by declaring the state of emergency.

Under Chilean law, a state of emergency can be declared in instances of internal war or serious local strife. It allows the president to ban meetings and demonstrations and restricts movement of citizens for 15 days.

Pinera inherited the conflict in Araucania from successive administrations that, like his, have also been unable to successfully address land claims that have erupted in clashes with police.

Human rights and Mapuche groups criticize the use of the anti-terror law, calling it an abuse of power and say the government should instead focus on reaching out to the Mapuche.

Demands for land and autonomy date by the Mapuche date back centuries. They resisted Spanish and Chilean domination for more than 300 years before they were forced south to Araucania in 1881. Many of the 700,000 Mapuche who survive among Chile‘s 17 million people still live in Araucania.

A small fraction have been rebelling for decades, destroying forestry equipment and torching trees. Governments on the left and right have sent in police while offering programs that fall far short of their demands.

“The rise in demonstrations by our Mapuche communities are due to the lack of justice and the rejection of any type of productive dialogue on the restitution of our territory,” Mapuche leader Juana Calfunao wrote in Mapuexpress, an online site that reports on the issues of the Mapuche.

Source: FULL ARTICLE at Fox World News

Motorsports: ALMS, Grand-Am announce combined class structure, LMP1 is out

By Jeffrey N. Ross

Filed under: ,

Other than the announcement back in September that the Grand-Am Rolex Sports Car Series and the American Le Mans Series were merging, there have been precious few details as to how the newly combined series would shake out. Today, both entities helped clear things up a bit by announcing some of the new classification changes that will go into effect for the 2014 Rolex 24, changes that are confirmed through the 2015 season.

The names for the new classes (or the new series as a whole) have yet to be released, but the breakdown goes like this:

  • The ALMS P1 prototype class (pictured above) has been eliminated
  • Grand-Am Daytona Prototype and ALMS P2 classes will be merged
  • ALMS Prototype Challenge will remain a separate class
  • Nissan Deltawing will move from the ALMS PC class to the ALMS P2 class
  • Grand-Am and ALMS GT classes will continue to run separate cars and classes
  • The future of the Grand-Am’s new GX class sounds unsure after this year, with it either becoming part of the ALMS GT class or becoming its own separate class

Right off the bat, this suggests we will no longer see LMP1 cars like the Audi R18 TDI or Lola racecars in the US, though we still don’t know what sort of rule changes there will be for the Prototype and GT classes (and we wouldn’t be surprised to see these competitors end up in a different class). Despite losing the LMP1 cars (which currently runs hybrid and diesel racecars), both organizations look to include more “green technologies.” We already know the new ALMS GX class will feature 2014 Mazda6 with a Skyactiv-D diesel engine under the hood.

For more information about the newly combined road racing series, check out the press release by scrolling below.

Continue reading ALMS, Grand-Am announce combined class structure, LMP1 is out

ALMS, Grand-Am announce combined class structure, LMP1 is out originally appeared on Autoblog on Fri, 04 Jan 2013 19:00:00 EST. Please see our terms for use of feeds.

Permalink | Email this | Comments

Source: FULL ARTICLE at Autoblog

Grand Jury Threatens To Expose Police/mayoral Cover-up Of Manslaughter In Chicago

By Doug Book

Chicago White House Grand Jury threatens to expose police/mayoral cover up of manslaughter in Chicago

Photo credit: terrellaftermath

In March, Coach is Right published a story of official cover-up and falsification of witness testimony involved in the 2004 death of David Koschman at the hands of Richard Vanecko, nephew of former Chicago Mayor Richard Daley.

In the early morning hours of April 25th 2004, Koschman and three friends bumped into someone from a group that had been visiting the bars in downtown Chicago. A moment later, a member of that party struck Koschman, driving his head into the street and causing brain damage from which the young man never recovered. His mother buried him 20 days later, disconnecting life support after 2 failed surgeries.

One full month after the event, police informed Koschman’s mother that her 5’5”, 125 lb son had “been the aggressor” in a fight with the 6’3”, 230 lb Vanecko and as a result, though her son was killed, no charges would be filed. Police told Mrs. Koschman that she would be “impressed” with who her son’s attacker was related to and that “… if she sued, his family had the wherewithal to tie the case up in court ‘for years.’ In fact, Vanecko and a friend had run away after the punch was thrown, and Vanecko was only identified at all because another member of his party had been physically restrained at the scene by witnesses.

Seven years later, the case was briefly reopened in response to a flurry of articles in which the Chicago Sun Times accused police and the Mayor’s office of official malfeasance and cover-up. The Sun Times had discovered that police did NOT interview witnesses until Koschman had died, some 3 weeks after the event; that Vanecko had refused to be interviewed by police and had shaved his head to change his appearance in anticipation of a police lineup that was held 1 MONTH after the altercation; that witness Michael Connolly claimed police had misrepresented his statements to them in order to make Koschman appear the aggressor; that the case file had suddenly gone missing from the prosecutor’s office; and that the States Attorney refused to reveal the name of the prosecutor who decided to neither file charges or refer the case to a Grand Jury.

The case was then officially closed by Chicago police.

But in 2012, the events of Koschman’s death were finally turned over to a Grand Jury, which on December 3rd indicted Vanecko for “…the use of physical force without lawful justification…” and with “…recklessly perform[ing] acts which were likely to cause death or great bodily harm to another…” Vanecko has been indicted for involuntary manslaughter, a charge which could bring up to 5 years in jail.

Circuit Court Judge Michael Toomin found that, “…in public statements, prosecutors and police portrayed Vanecko as acting in self-defense despite never having interviewed or spoken to him…” A special prosecutor appointed by the judge is asking for “…the grand jury’s investigation into whether the Chicago Police Department and the county’s state attorney’s office ‘acted intentionally to suppress and conceal evidence, furnish false evidence and generally impede the investigation’ .”

“Under [the] circumstances, the public could well conclude that the entire claim of self-defense came not from Vanecko, but, rather, was conjured up in the minds of law enforcement,” concluded Toomin.

Difficult as it is to believe that a Daley family member might get preferential—indeed ILLEGALLY preferential—treatment in Chicago, that is exactly what a grand jury could refer for trial.

Unfortunately for Richard Vanecko, it appears that Rahm has found no personal benefit in continuing a cover up for the nephew of Richard Daley.

Source: FULL ARTICLE at Western Journalism

Toyota Settling Lost-Resale-Value Lawsuits: Why It’s Insane and Why Everybody Loses (Except the Lawyers)

By Justin Berkowitz

2009 Toyota Camry hybrid

Lawsuits have have created a warning-label culture, but where are the warning labels on the lawsuits themselves? For the cover of a 237-page settlement proposal that Toyota filed yesterday, we’d propose “Beware: Contains Idiocy and Greed.” Pending approval from a federal judge, Toyota will buy its way out of a class-action lawsuit that claims perfectly functional cars depreciated in value after the Sudden Unintended Acceleration Circus of 2009 and 2010. (The DOT ultimately ruled in 2011 that the vast majority of instances were the result of driver error.) Why spend time and money going to court and potentially losing? Most civil lawsuits end with settlements for these very reasons. Following logic from The Price Is Right, the total package value is over $1.3 billion. Then again, a toaster costs $159.99 on The Price is Right. Here’s why each of the parts of the settlement are insane and/or stupid—plus we name the actual winners. 

What The Lawsuit Is Supposedly About

Despite being an extraordinarily complex lawsuit, which ended up with a single federal court managing over 200 cases from courts around the country, the case is fairly simply explained. As we wrote when the suit picked up steam earlier this year, the plaintiffs argued that “because Toyota’s cars were involved in this phenomenon, every example of each model in question is now worth less on the used market. Toyota, the plaintiffs say, owes its customers the difference between what the cars were worth before people started crashing them and what they’re worth now.”

These claims fit into a controversial legal category called “Economic Loss.” People usually can’t sue if they haven’t suffered an “injury,” whether that’s physical or economic. The plaintiffs might have had to prove cars did accelerate unintentionally and that Toyota was to blame—this would be almost impossible. You can read more about why this was so unusual our original article.

Term 1: Toyota puts $250 million into a fund to compensate former owners who sold or returned a leased example of select Toyota models (almost all of them) between September 1, 2009 and December 31, 2010

This sounds like a lot of money. It’s not. Depending on the model, its age, mileage, and other bookkeeping stats, the estimated payout spread among potentially millions of sellers is “in the range of hundreds of dollars to over a thousand dollars.”

Actual Winner(s): Big used-car dealerships, which may have sold hundreds of Toyotas and Lexuses during that time.

Term 2: Toyota pays to install Brake Override Systems on eligible vehicles

These systems, which are common in many new cars, essentially lock out the gas pedal when the brake pedal is depressed. Toyota will pay to have these installed on eligible cars—most of its non-hybrid lineup from 2005 to 2010, estimated to be roughly three million vehicles. Take a moment and think about what Toyota is doing here: It’s paying to buy parts and to have Toyota dealers install them. In other words, Toyota is pumping a giant load of cash into its suppliers and dealers’ service departments. What are the odds that all of these vehicles will come down off the lifts without the discovery of additional parts needing replacement or service?

Actual Winner(s): Toyota dealerships, Toyota’s suppliers, and—somewhat indirectly—Toyota.


Term 3: Toyota puts $250 million into a fund to pay people who still own certain Toyotas that aren’t compatible with Brake Override Systems

Some of the vehicles on the master list cannot, for mechanical and electronic reasons, be fitted with a Brake Override System. The current owners of these vehicles will receive a cash payout, determined by the model, its age, mileage, and other factors. Compensation will range from $37.50 to $125 per car.

Actual Winner(s): Nobody, really.

Term 4: Toyota spends $30 million for automotive safety research and education

Toyota will give approximately $800,000 to a major university, which the settlement says is likely be the University of Iowa’s Public Policy Center, to conduct a study “focusing on identifying critical gaps in awareness and practice regarding defensive driving skills.” If that’s not passive-aggressive enough, among those “specific driver behaviors” to be studied: “issues relating to driver pedal misapplication.” Toyota will then spend up to $14.2 million dollars on a public safety campaign to raise awareness about the issues it discovered in the study. Translation: This is how we think you crashed our cars, and this is how you can avoid doing that again.

The other $15 million (maximum) will go to fund university research into safety technology.

Actual Winners: The University of Iowa, other universities, billboard owners.

And the Grand Prize Winners Are . . .

Weighing in at some 85 attorneys spread over 25 firms, the grand prize winners are: the law firms. Toyota’s settlement proposal agrees to pay up to $200 million in fees to the plaintiffs’ lawyers, with an additional maximum of $27 million allocated to cover their expenses. (It’s distributed proportionately to how much work the firms put into the suit.)

Officially, the millions of members of the “class” in this class-action lawsuit—the owners and sellers—are the ones suing and negotiating with Toyota, and ultimately the class members and the federal court have to approve the attorneys’ fees. (Although it happens as frequently as a friendly Michigan-Ohio State game, class members do occasionally revolt and even sue their lawyers.) But in reality, this is and was an attorneys’ show all along. These folks were, after all, the ones who made this monstrosity of a class-action lawsuit possible. Law firms took the initiative to bundle together individual clients, to manage the litigation, to spend their time working without income on the expectation that they’d win a settlement or judgment against Toyota. And, in a sense, nobody actually hired them—they work with a few representative plaintiffs, post updates on their websites, and generally communicate with any potential class members who want to do so. But once involved, the firms really run the operation.

The lawyers who sued Merck for selling the anti-inflammatory drug Vioxx took home $315 million in fees. In their cases, people had actually died. This class action against Toyota specifically excludes anyone who was physically injured or killed in a collision.

Photos and Info: All-New 2013 Toyota RAV4
Comparison Test: 2013 Malibu Eco vs. 2012 Accord, 2012 Sonata, 2012 Optima, 2012 Camry, 2012 Passat
How to Deal with Unintended Acceleration: Car and Driver Puts Three Cars to the Test

Who Loses Next?

Even though Toyota admits nothing—and very likely would have won this lawsuit eventually—this big settlement shows that (1) the economic-loss category of lawsuits has legs, which means the classes in class-action lawsuits can potentially be much bigger in the future, and (2) car companies are still willing to make blockbuster payouts.

Hyundai is now facing a class-action lawsuit for misstating its vehicles’ fuel-economy ratings, even though the company already offered to compensate owners. (The firm pursuing this case is the same one that quarterbacked this Toyota suit.) Ford is dealing with a similar lawsuit in California regarding its mileage claims for the C-Max hybrid.

Warning: The next few years are going to be messy.

Source: Car & Driver

Right justifying prompt data in bash

By vnayakHi,

I have a custom prompt in Bash. However, I would like to further customise it so that it shows me the date and time. However, I would like this new addition to appear on the right side of the terminal window.

The idea behind this is to “visually balance” some data on the right as most of the time the terminal is used from the left.

I hope this make sense. Please let me know if you require further information.

Regards,

vnayak
Source: The UNIX and Linux Forums

Ultimate Windows 8 starter guide: Must-know tips, apps and utilities

The year is drawing to a close, so there’s a very good chance that you now find yourself staring straight down the gaping maw of Windows 8.

Maybe someone gave you a new Windows tablet or PC as a gift. Or maybe you decided to use your holiday down time to upgrade an old PC. The details don’t really matter. You’re now using Windows 8 for the very first time, and you’re searching for answers on how to make the OS an integral, productive part of your high-tech life.

Sound familiar? Then walk with me as we take a tour of recent PCWorld Windows 8 coverage. I trust we have answers to all your Windows 8 questions.

Getting started with Windows 8

Right when the new OS launched, we published a number of essential how-to guides for first-time Windows 8 users. You can start your orientation process with this handy guide to maximizing your first 30 minutes with the new OS. But perhaps even more useful is our compendium of 20 must-know Windows 8 tips and tricks, which starts off with a thorough look at keyboard shortcuts—you should know them all if you don’t have a touch screen.

To read this article in full or to leave a comment, please click here

Source: PCWorld

IGN Can't Draw Super Mario

Here at IGN, we’re experts on video games. We know about them before anyone else knows about them. We play them before anyone else plays them. We consume them, day and night, until we can’t possibly eat, sleep, or breathe another moment of video game-inspired madness.

So I figured we’d also be able to, say, draw the most memorable video game character of all time from memory. Right?

Actually, no. Absolutely not, in fact. The following results might shock you…

Andrew has probably written hundreds of Super Mario related news stories since he started at IGN in 2011. That’s no excuse for why he sees Mario as a melting, miserable husk of a man huddling through his final days of depression. Wahoo!

Continue reading…

Source: IGN Video Games

Weekly News & Politics Digest, December 21, 2012

  • Opinions • The constitution, Immigration, and Medicare
    I am an elderly widow living alone in my home in North Carolina. I am a child of The Great Depression, and worked hard my whole life with only a high school diploma to my credit. I feel I could have had so much more, had better employment, and been paid much better with higher education. My father did not let me continue my education, because at that time education was considered wasted on a girl ("you’ll only just get married anyway, and never work"). As a child of The Depression, and armed with a high school education, I determined that things would be better for my children. I worked hard my entire life, and lived within my means.

    I have been voting since FDR was in office, and I am dissatisfied with the political parties of today. I don’t see them accomplishing anything. Individually they seem to want a "big name", and collectively they do not work together, compromise, and do the job we elect them to do on our behalf.

    The Constitution is good, and should be adhered to. It is not perfect, but I feel it is better than anything else in the world.

    Regarding immigration- My mother and father were Canadian citizens who came legally to the United States around 1930. They went through the process legally, although it took some time. People who are in the country today illegally should have to get in line and proceed legally. They should not be granted special consideration or be exempted from the rule of law.

    Regarding the Right to Bear Arms- I support the Constitution as the supreme law of the land. Within its boundaries, I would allow that some of these rapid-fire and semi-automatic weapons should be harder to own. It is an issue that should be examined carefully and soberly; not as a knee-jerk reaction to passion or fear. But something should be done about these automatic weapons.

    I voted for Mitt Romney in 2012, and don’t understand how Barack Obama was re-elected. However, in every game there is a winner and a loser, and he did win. I fear he will get his way on the budget, and keep spending and spending. The Republicans will probably give in, and Mr. Obama will get his way. What we need, instead of winners and losers, is a compromise of the two positions for the good of America.

    I am satisfied with my Medicare and my Social Security. If you’re wise and careful, you can live within your means, and as you age, give up some of the things you had when you were younger and still working. I am able to just cover my bills.

    Statistics: Posted by mreill01 — Mon Dec 17, 2012 8:20 pm


Bash arrays that compare ip addresses.

By AzraelI’ve been trying to have an array of ip addresses go through a loop one at a time. Then compare if the current element is in another array of ip addresses. I’ve traced my error with /bin/bash -x

Code:
+ for c in ‘”${ip[@]}”‘
./netk5: line 65: 50.17.231.23 23.64.146.110 23.64.159.139 107.14.36.129 31.13.74.7 173.194.77.95: syntax error: invalid arithmetic operator (error token is “.17.231.23 23.64.146.110 23.64.159.139 107.14.36.129 31.13.74.7 173.194.77.95”)
From what I found on Google it seems Bash isn’t great at comparing floating point numbers. I saw some suggestions on piping through bc first, but I’m unfamiliar with how that would work here. Perhaps there’s also a simpler way.

Here is the code I’m using:

Code:
#!/bin/bash -x

fox=”firefox”

declare -a white

while true
do

stat=`netstat -antup | awk ‘{ print $7 }’ | grep firefox | sed -ne “s/^[^/]+///p” | awk ‘!x[$0]++’;`
b=$stat

if [ “$b” = “$fox” ];
then

getip=`netstat -antup | grep firefox | awk ‘{ print $5 }’ | sed -e ‘s/:[^:]*$//’ | awk ‘!x[$0]++’;`
ip+=$getip

for c in “${ip[@]}”
do
if [ $c == “${white[$c]}” ]
then
echo -e “${white[$c]} in arrayn”

else

echo -e “Not in array”

pass=${ip[$c]}
white+=$pass

# clear array to avoid duplicates
unset ip

fi

done
fi

sleep 2

done
Right now it looks to see if an ip Firefox is connected to is in the “white” array. You may have to refresh your browser to get an ip.
Source: The UNIX and Linux Forums

On the Fiscal Cliff, Republican Rebels are Right: No Deal is Better Than a Bad Deal

By Avik Roy, ContributorLast night, House Speaker John Boehner (R., Ohio) pulled his “Plan B” off the House floor because it lacked support from the House Republican caucus. The media is atwitter about Boehner’s failure to control his troops, because they believe that President Obama has gained a tactical victory from it. But as a policy matter, it’s far better that Republicans pass nothing, than pass a tax increase without any accompanying reform of our runaway spending on health-care entitlements. Indeed, despite all of the dramatic hyperbole about the “fiscal cliff,” it’s important to remember that going over the fiscal cliff will reduce the budget deficit by $503 billion in 2013, and $682 billion in 2014, relative to the “solutions” being bandied about on Capitol Hill. What’s so terrible about that?
Source: Forbes Latest

Stuart Langridge: Why I don’t like Biscuit (not biscuits)

Fresh from the Pastry Box reject bin! For the last year, I’ve been part of The Pastry Box, a series of short daily essays about the tech world, the web, philosophy, and similar things. For December’s essay I wrote two and couldn’t decide between them. One about creativity and the nature of being lost was published today, and I didn’t want the other to just vanish, so here it is.

While I was in my first year at university, Portishead released Dummy, the greatest album the world has ever known. Now, admittedly, I was at that point in my life as impressionable as a dollop of warm wax, but my liking was also influenced by how it is the greatest album the world has ever known.
I had a cassette copy of it made by my friend Andy which I played obsessively. All the time. Over and over again. And, for some reason, that cassette copy didn’t have Biscuit on it. To this day I do not know why.
And to this day, I don’t like Biscuit as much as the rest of the album.
What you say matters, but what you leave out also matters.If you are a designer, go to 5. If you are a public speaker, go to 6. If you are neither, go to 7. To open the door and attack the beast, go to 11.
“Perfection is finally attained not when there is no longer anything to add, but when there is no longer anything to take away”, right? But Brillat-Savarin said: A dessert without cheese is like a beautiful woman with only one eye. In this age of minimalism, of stripped-down and stripped-out experiences, of getting what you need right there with no extraneous clutter, be careful we’re not serving the dessert without cheese.To continue, go to 8.
A philosopher once said: with great power comes great responsibility. This happens even if you don’t want the great power. It happens even if you don’t think you’ve got it. Someone looks up to you. If you leave things out when you talk to people, they’ll think it’s OK to leave them out too. They’ll think it’s not important, because you obviously don’t think it is. It doesn’t matter if in your heart you know it’s important. You have to find a way of talking about it without ruining your elegant simplicity. That’s why they pay you the big bucks. Even when they don’t.To continue, go to 8.
Read them both.
Now go back and read the other one.
And: don’t worry about it. Expert Persian carpet makers used to deliberately drop a stitch, because to make something of flawless perfection would be to challenge the perfection of Allah. We can’t all be right all the time. It’s only the web. It’s only our world.

Not that important.

Right?

Source: Planet Ubuntu

Opinions • The constitution, Immigration, and Medicare

By mreill01I am an elderly widow living alone in my home in North Carolina. I am a child of The Great Depression, and worked hard my whole life with only a high school diploma to my credit. I feel I could have had so much more, had better employment, and been paid much better with higher education. My father did not let me continue my education, because at that time education was considered wasted on a girl (“you’ll only just get married anyway, and never work”). As a child of The Depression, and armed with a high school education, I determined that things would be better for my children. I worked hard my entire life, and lived within my means.I have been voting since FDR was in office, and I am dissatisfied with the political parties of today. I don’t see them accomplishing anything. Individually they seem to want a “big name”, and collectively they do not work together, compromise, and do the job we elect them to do on our behalf.The Constitution is good, and should be adhered to. It is not perfect, but I feel it is better than anything else in the world.Regarding immigration- My mother and father were Canadian citizens who came legally to the United States around 1930. They went through the process legally, although it took some time. People who are in the country today illegally should have to get in line and proceed legally. They should not be granted special consideration or be exempted from the rule of law.Regarding the Right to Bear Arms- I support the Constitution as the supreme law of the land. Within its boundaries, I would allow that some of these rapid-fire and semi-automatic weapons should be harder to own. It is an issue that should be examined carefully and soberly; not as a knee-jerk reaction to passion or fear. But something should be done about these automatic weapons.I voted for Mitt Romney in 2012, and don’t understand how Barack Obama was re-elected. However, in every game there is a winner and a loser, and he did win. I fear he will get his way on the budget, and keep spending and spending. The Republicans will probably give in, and Mr. Obama will get his way. What we need, instead of winners and losers, is a compromise of the two positions for the good of America.I am satisfied with my Medicare and my Social Security. If you’re wise and careful, you can live within your means, and as you age, give up some of the things you had when you were younger and still working. I am able to just cover my bills.

Statistics: Posted by mreill01 — Mon Dec 17, 2012 8:20 pm

Source: gov.summit.net

Application wide shortcuts in QML (this time without QShortcut)

Hi,
In my previous post i was using QShortcut to get application wide shortcuts. That route i’d like to take because QShortcut requires QWidget. After a little bit of discussion on how to get the same stuff working without QShortcut (thus no QWidget dependency) i started out trying the same using Qt’s event filter system. That turned out to work rather nice! Because there is no more need for QWidget the somewhat ugly trick to put the QWidget based mainwindow in a global class isn’t needed anymore. The C++ side looks as follows:
shortcut.cpp
#include “shortcut.h”
#include
#include
#include

Shortcut::Shortcut(QDeclarativeItem *parent)
: QDeclarativeItem(parent)
, m_keySequence()
{
qApp->installEventFilter(this);
}

void Shortcut::setKey(QVariant key)
{
if(key.canConvert()) {
m_keySequence = key.value();
} else {
m_keySequence = QKeySequence();
}
}

bool Shortcut::eventFilter(QObject *obj, QEvent *e)
{
if(!m_keySequence.isEmpty()) {
QKeyEvent *keyEvent = static_cast(e);

// Just mod keys is not enough for a shortcut, block them just by returning.
if (keyEvent->key() >= Qt::Key_Shift && keyEvent->key() modifiers() + keyEvent->key();

if(e->type() == QEvent::KeyPress && QKeySequence(keyInt).matches(m_keySequence)) {
emit activated();
}
}

return QObject::eventFilter(obj, e);
}
And the header, shortcut.h:
#ifndef SHORTCUT_H
#define SHORTCUT_H

#include

class Shortcut : public QDeclarativeItem
{
Q_OBJECT
Q_PROPERTY(QVariant key READ key WRITE setKey)
public:
explicit Shortcut(QDeclarativeItem *parent = 0);

void setKey(QVariant key);
QKeySequence key() { return m_keySequence; }

bool eventFilter(QObject *obj, QEvent *e);

signals:
void activated();

public slots:

private:
QKeySequence m_keySequence;
};

#endif // SHORTCUT_H
Making it available in QML is done the same way as in the previous post:

qmlRegisterType(“Project”, 0, 1, “Shortcut”);

The reason that this works is because of the re-implemented eventFilter function. That filter listens for key events and if it finds one (and if that one matches the one we registered) then a signal is emitted to indicate the application that the registered key has been pressed. It’s really that simple. The filter is registered in the class constructor through qApp->installEventFilter(this); That’s all i needed to do to get is working.
In QML it still looks as simple as this:Shortcut {
key: “Ctrl+C”
onActivated: {
console.log(“JS: ” + key + ” pressed.”)
}
}
Right now this is not part of any KDE QML imports, but i do want to try and get this specific component in QML. It will help other applications as well if they happen to need this functionality.
Cheers,
Mark
Source: Planet KDE

Concerns over privacy as NHTSA prepares to push for black boxes in cars

Many motorists don’t know it, but it’s likely that every time they get behind the wheel, there’s a snitch along for the ride.

In the next few days, the National Highway Traffic Safety Administration is expected to propose long-delayed regulations requiring auto manufacturers to include event data recorders — better known as “black boxes” — in all new cars and light trucks. But the agency is behind the curve. Automakers have been quietly tucking the devices, which automatically record the actions of drivers and the responses of their vehicles in a continuous information loop, into most new cars for years.

When a car is involved in a crash or when its airbags deploy, inputs from the vehicle’s sensors during the 5 to 10 seconds before impact are automatically preserved. That’s usually enough to record things like how fast the car was traveling and whether the driver applied the brake, was steering erratically or had a seat belt on.

The idea is to gather information that can help investigators determine the cause of accidents and lead to safer vehicles. But privacy advocates say government regulators and automakers are spreading an intrusive technology without first putting in place policies to prevent misuse of the information collected.

Data collected by the recorders is increasingly showing up in lawsuits, criminal cases and high-profile accidents. Massachusetts Lt. Gov. Timothy Murray initially said that he wasn’t speeding and that he was wearing his seat belt when he crashed a government-owned car last year. But the Ford Crown Victoria‘s data recorder told a different story: It showed the car was traveling more than 100 mph (160 kph) and Murray wasn’t belted in.

In 2007, then-New Jersey Gov. Jon Corzine was seriously injured in the crash of an SUV driven by a state trooper. Corzine was a passenger. The SUV‘s recorder showed the vehicle was traveling 91 mph (146 kph) on a parkway where the speed limit was 65 mph (105 kph), and Corzine didn’t have his seat belt on.

There’s no opt-out. It’s extremely difficult for car owners to disable the recorders. Although some vehicle models have had recorders since the early 1990s, a federal requirement that automakers disclose their existence in owner’s manuals didn’t go into effect until three months ago. Automakers who voluntarily put recorders in vehicles are also now required to gather a minimum of 15 types of data.

Besides the upcoming proposal to put recorders in all new vehicles, the traffic safety administration is also considering expanding the data requirement to include as many as 30 additional types of data such as whether the vehicle’s electronic stability control was engaged, the driver’s seat position or whether the front-seat passenger was belted in. Some manufacturers already are collecting the information. Engineers have identified more than 80 data points that might be useful.

Despite privacy complaints, the traffic safety administration so far hasn’t put any limits on how the information can be used. About a dozen states have some law regarding data recorders, but the rest do not.

Right now we’re in an environment where there are no rules, there are no limits, there are no consequences and there is no transparency,” said Lillie Coney, associate director of the Electronic Privacy Information Center, a privacy advocacy group. “Most people who are operating a motor vehicle have no idea this technology is integrated into their vehicle.”

Part of the concern is that the increasing computerization of cars and the growing transmission of data to and from vehicles could lead to unintended uses of recorder data.

“Basically your car is a computer now, so it can record all kinds of information,” said Gloria Bergquist, vice president of the Alliance of Automotive Manufacturers. “It’s a lot of the same issues you have about your computer or your smartphone and whether Google or someone else has access to the data.”

The alliance opposes the government requiring recorders in all vehicles.

Data recorders “help our engineers understand how cars perform in the real world, and we already have put them on over 90 percent of (new) vehicles without any mandate being necessary,” Bergquist said.

Safety advocates, however, say requiring data recorders in all cars is the best way to gather a large enough body of reliable information to enable vehicle designers to make safer cars.

“The barn door is already open. It’s a question of whether we use the information that’s already out there,” said Henry Jasny, vice president of Advocates for Highway and Automotive Safety.

The National Transportation Safety Board has been pushing for recorders in all passenger vehicles since the board’s investigation of a 2003 accident in which an elderly driver plowed through an open-air market in Santa Monica, Calif. Ten people were killed and 63 were injured. The driver refused to be interviewed and his 1992 Buick LeSabre didn’t have a recorder. After ruling out other possibilities, investigators ultimately guessed that he had either mistakenly stepped on the gas pedal or had stepped on the gas and the brake pedals at the same time.

When reports of sudden acceleration problems in Toyota vehicles cascaded in 2009 and 2010, recorder data from some of the vehicles contributed to the traffic safety administration’s conclusion that the problem was probably sticky gas pedals and floor mats that could jam them, not defects in electronic throttle control systems.

“Black box” is a mechanic’s term for a part that should only be opened by someone with authority to do so. The term is most widely used to refer to flight data recorders, which continually gather hundreds of data points about an aircraft’s operation during flight. Aircraft recorders, by law, are actually bright orange.

Some automakers began installing the recorders at a time when there were complaints that air bags might be causing deaths and injuries, partly to protect themselves against liability and partly to improve air bag technology. Most recorders are black boxes about the size of a deck of card with circuit boards inside. After an accident, information is downloaded to a laptop computer using a tool unique to the vehicle’s manufacturer. As electronics in cars have increased, the kinds of data that can be recorded have grown as well. Some more recent recorders are part of the vehicle’s computers rather than a separate device.

Democratic Rep. Michael Capuano has repeatedly, and unsuccessfully, introduced legislation to require that automakers design recorders so that they can be disabled by motorists

A transportation bill passed by the Senate earlier this year would have required that all new cars and light trucks have recorders and designated a vehicle’s owner as the owner of the data. The provision was removed during House-Senate negotiations on the measure at the behest of House Republican lawmakers who said they were concerned about privacy.

“Many of us would see it as a slippery slope toward big government and Big Brother knowing what we’re doing and where we are,” Rep. Bill Shuster, R-Pa., who is slated to take over the chairmanship of the House Transportation and Infrastructure Committee in January, said at the time. “Privacy is a big concern for many across America.”
Source: Fox US News