Tuesday, March 26, 2013

Your Daily digest for Tech Geek`s Tools, Tips, Tricks and Tutorials

Tech Geek`s Tools, Tips, Tricks and Tutorials
Pipes Output
Google Tests White Space Spectrum For School Broadband In South Africa
Mar 26th 2013, 23:12

judgecorp writes with news that Google is beginning tests on white space spectrum to deliver broadband internet access to rural communities in South Africa. "White space has the advantage that low frequency signals can travel longer distances. The technology is well suited to provide low cost connectivity to rural communities with poor telecommunications infrastructure, and for expanding coverage of wireless broadband in densely populated urban areas. ... Ten schools in the Cape Town area will receive wireless broadband to test the technology. During the trial, we will attempt to show that broadband can be offered over white spaces without interfering with licensed spectrum holders. To prevent interference with other channels, the network uses Google’s spectrum database to determine white space availability."

Share on Google+

Read more of this story at Slashdot.



Spanish Open Source Group Files Complaint Over Microsoft Use of UEFI Secure Boot
Mar 26th 2013, 22:30

sl4shd0rk writes "Hispalinux, which represents Spanish Open Source developers and users, has filed a complaint against Microsoft with the European Commission. 14 pages of grief cited Windows 8 as an 'obstruction mechanism' calling UEFI Secure Boot a 'de facto technological jail for computer booting systems... making Microsoft's Windows platform less neutral than ever.' On March 6 of 2012 the Commission fined Microsoft 561 million Euros for failing to offer users a choice of web browser, and there was also a 2004 ruling which found the company had abused its market position by tying Windows Media Player to Windows itself. Relations appear to remain more tense towards Windows in Europe, so there may be some hope of making UEFI more Linux-friendly. UEFI has been implicated in the death of Samsung laptops running Linux."

Share on Google+

Read more of this story at Slashdot.



T-Mobile Ends Contracts and Subsidies
Mar 26th 2013, 21:40

AlphaWolf_HK writes "In what I see as a refreshing change, T-Mobile, the fourth largest carrier in the U.S., has made sweeping changes to its service, ending both phone subsidies and service contracts. Its CEO said, 'Here's the deal: If we suck this month, go somewhere else. If we're good, stay with us.' As part of that change, the new base plan will include unlimited access, including voice, text, and data. Data will be restricted to edge speeds after 500MB with no overage costs, but can be upgraded to 2.5GB for $10, or unlimited for $20. Portable Wi-Fi hotspot usage is also unrestricted for no additional cost. In addition, LTE services just went live in eight markets. As is already standard practice with T-Mobile, you are free to bring your own device. To keep customers from having to front the full cost of the phone with unsubsidized plans, they'll let people pay off phones in installments. They're also getting the iPhone 5 next month for $650."

Share on Google+

Read more of this story at Slashdot.



Targeted Attack Campaign Uses Android Malware
Mar 26th 2013, 20:57

Trailrunner7 writes "Android attacks have become all the rage in the last year or two, and targeted attacks against political activists in Tibet, Iran and other countries have been bubbling up to the surface more and more often. Now, those two trends have converged with the discovery of a targeted attack campaign that's going after Tibetan and Uyghur activists with a spear-phishing message containing a malicious APK file. Researchers say the attack appears to be coming from Chinese sources. The new campaign began a few days ago when unknown attackers were able to compromise the email account of a well-known Tibetan activist. The attackers then used that account to begin sending a series of spear-phishing messages to other activists in the victim's contact list. One of the messages referred to a human rights conference in Geneva in March, using the recipients' legitimate interest in the conference as bait to get them to open the attachment. The malicious attachment in the emails is named 'WUC's Conference.apk.'"

Share on Google+

Read more of this story at Slashdot.



UK Privacy Watchdog: 'Right To Be Forgotten' On the Web Unworkable
Mar 26th 2013, 20:15

An anonymous reader writes "Want to be invisible to Google? Apparently you can't, at least according to the European Commission and Information Commissioner's Office. '"The right to be forgotten worries us as it makes people expect too much," said [deputy commissioner David Smith]. Instead, Smith said the focus should be on the "right to object" to how personal data is used, as this places the onus on businesses to justify the collection and processing of citizens' data. "It is a reversal of the burden of proof system used in the existing process. It will strengthen the person's position but it won't stop people processing their data." EC data protection supervisor Peter Hustinx added the right to be forgotten is currently unworkable as most countries are divided on what qualifies as sensitive personal data. "I believe the right to be forgotten is an overstatement," said Hustinx."

Share on Google+

Read more of this story at Slashdot.



You Don't 'Own' Your Own Genes
Mar 26th 2013, 19:32

olePigeon (Wik) writes "Cornell University's New York based Weill Cornell Medical College issued a press release today regarding an unsettling trend in the U.S. patent system: Humans don't "own" their own genes, the cellular chemicals that define who they are and what diseases for which they might be at risk. Through more than 40,000 patents on DNA molecules, companies have essentially claimed the entire human genome for profit, report Dr. Christopher E. Mason of Weill Cornell Medical College, and the study's co-author, Dr. Jeffrey Rosenfeld, an assistant professor of medicine at the University of Medicine & Dentistry of New Jersey and a member of the High Performance and Research Computing Group, who analyzed the patents on human DNA. Their study, published March 25 in the journal Genome Medicine, raises an alarm about the loss of individual 'genomic liberty.'"

Share on Google+

Read more of this story at Slashdot.



Another Way Carriers Screw Customers: Premium SMS 'Errors'
Mar 26th 2013, 18:50

An anonymous reader writes "Almost no one likes their carrier. And with the behavior described in this article, it's not surprising. TechCrunch catches T-Mobile taking money from a new pay-as-you-go customer after signing her up to its own premium horoscope text message service — and taking money before she's even put the SIM in the phone. Quoting: 'Perhaps carriers think they can get away with a few “human errors” in the premium SMS department because these services aren’t regulated. Perhaps it’s also symptomatic of the command and control mindset of these oligarchs. What’s certain is that if carriers dedicated a little of the energy they plough into maintaining these anachronistic, valueless (to their customers, that is) premium SMS ‘services’ into creating genuinely useful services that customers want to use then they would have a better shot at competing with the startups leapfrogging their gates. Or they would, if they hadn’t spent years destroying the trust of their users by treating them like numbers on a spreadsheet.'"

Share on Google+

Read more of this story at Slashdot.



Brain Scans Predict Which Criminals Are More Likely To Re-offend
Mar 26th 2013, 18:07

ananyo writes "In a twist that evokes the dystopian science fiction of writer Philip K. Dick, neuroscientists have found a way to predict whether convicted felons are likely to commit crimes again from looking at their brain scans. Convicts showing low activity in a brain region associated with decision-making and action are more likely to be arrested again, and sooner. The researchers studied a group of 96 male prisoners just before their release. They used functional magnetic resonance imaging (fMRI) to scan the prisoners' brains during computer tasks in which subjects had to make quick decisions and inhibit impulsive reactions. The scans focused on activity in a section of the anterior cingulate cortex (ACC), a small region in the front of the brain involved in motor control and executive functioning. The researchers then followed the ex-convicts for four years to see how they fared. Among the subjects of the study, men who had lower ACC activity during the quick-decision tasks were more likely to be arrested again after getting out of prison, even after the researchers accounted for other risk factors such as age, drug and alcohol abuse and psychopathic traits."

Share on Google+

Read more of this story at Slashdot.



Do Big-Money Acquisitions Mean We're In a Tech Bubble?
Mar 26th 2013, 17:25

Nerval's Lobster writes "When a major IT company pays a reported $30 million—roughly 90 percent of it in cash—for an iOS app with no monetization strategy and a million downloads since launch, is that a sign that the tech industry as a whole is riding a massive, overinflated bubble? Yahoo isn't alone, by a long shot: over the past couple years, a few apps have been snatched up for enormous sums—think Facebook's $1 billion acquisition of Instagram in 2012, or Google buying Sparrow for a reported $25 million. Nor has the money train stopped there: in a pattern that recalls the late-90s market frothiness for anyone over the age of 28, a handful of tech companies have either launched much-hyped IPOs or witnessed their share price skyrocket into the stratosphere. But does all this IPO activity and app-acquiring actually mean 'bubble'?"

Share on Google+

Read more of this story at Slashdot.



Ask Slashdot: Do-It-Yourself Security Auditing Tools?
Mar 26th 2013, 16:43

An anonymous reader writes "I'm a 'prosumer' website builder, have a few sites that are mainly hobbies, but I would like to know that they're at least fairly robust. I'm thinking of the equivalent of a 'dental clinic' — where someone interested in the white hat security field might be willing to take on an audit for the experience and to build a resume. Or, tools such as websites that let you put in a password and see how long it takes to crack it. Or sites where you can put in a URL and it gets poked and prodded by a number of different cracker tools and a 'score' is given. Ideally with suggestions on how to improve. Does anything like that exist? I'm not talking FBI/CIA level security, but just common-sense basics. I've tried to use techniques that improve security, but I don't know how well they work. And I've realized that in the ever growing, fast changing field of computers I'm not going to ever get the knowledge I need to do this myself. I know there are software suites that allow you to sniff and test things on your own, but I'm afraid it's overwhelmingly foreign to me and I just feel like I can't reliably do this myself. Any ideas?"

Share on Google+

Read more of this story at Slashdot.



No "Ungoogleable" In Swedish Lexicon, Thanks to Google
Mar 26th 2013, 16:02

jfruh writes "The Swedish Language Council is a semi-official, government funded body that regulates, cultivates, and tracks changes to the Swedish language. Every year it releases a list of new words that have crept into Swedish, and one of 2012's entries was 'ogooglebar' — 'ungoogleable,' meaning something that can't be found with a search engine. After Google demanded that the definition be changed and the Council add a disclaimer about Google's trademark, the Council has instead decided to remove the word from the list altogether."

Share on Google+

Read more of this story at Slashdot.



Man Who Pointed Laser At Aircraft Gets 30-Month Sentence
Mar 26th 2013, 15:21

coondoggie writes "In a move federal prosecutors hope sends a strong message to the knuckleheads who point lasers at aircraft for fun, a California man was sentenced to 30 months in prison for shining one at two aircraft. According to the FBI Adam Gardenhire, 19, was arrested on March 29, 2012 and named in a two-count indictment filed in United States District Court in Los Angeles that said he pointed the beam of a laser at a private plane and a police helicopter that responded to the report."

Share on Google+

Read more of this story at Slashdot.



La vicenda dei Marò e l'insostenibile giustizialismo sui social network
Mar 26th 2013, 15:18

Il Ministro Terzi:«Mi dimetto in disaccordo con la decisione di rimandare i marò in India. Le riserve da me espresse non hanno prodotto alcun effetto e la decisione è stata un’altra».
Non vi nascondo che faccio fatica. Faccio molta fatica a comprendere quelli che mossi da facili istinti giustizialisti, tipici ormai di una diffusa cultura nostrana, additano come "assassini" i due Marò Massimiliano La Torre e Salvatore Girone. Perché tra le tante iniziative e le pagine di solidarietà ai nostri militari che fiorisco sui social network si legge anche questo. Hanno ammazzato e devono pagare. Tout court.

Vi invito per un secondo a guardare la vicenda da un altro punto di vista. E per questo bisogna fare un piccolo passo indietro, quando il 2 agosto 2011 il Parlamento (con l'allora Ministro Frattini agli Affari Esteri e La Russa alla Difesa) ha approvato la legge 130. Nel testo c'è un corposo riferimento alle cosiddette «misure urgenti antipirateria» che autorizzano l'utilizzo di personale militare a bordo di navi battente bandiera italiana per la difesa da atti di pirateria.

La norma, letta così, può anche avere un senso. Porta nelle tasche del Ministero della Difesa qualche spicciolo che gli armatori rendono in cambio di un servizio armato offerto dai militari italiani alle navi che navigano su rotte potenzialmente pericolose. L'alternativa è quella di affidarsi ad agenzie private di contractors comunemente noti come mercenari. Non ci sarebbe una gran differenza. Se non per un dettaglio per niente trascurabile. Il costo medio giornaliero di un militare impiegato in questo genere di attività si aggira intorno ai 500 euro. Un mercenario costa almeno sei volte di più. Capite bene da quale parte stia la convenienza o quella che potremmo definire come una "svendita" a buon mercato.

Massimiliano La Torre e Salvatore Girone sono solo due dei tanti militari italiani impiegati nel difendere gli interessi dell'Italia fuori dal nostro Paese. E i nostri militari, notoriamente, non navigano nell'oro. Associare l'inconfutabile dato di fatto della morte di due pescatori indiani, le cui dinamiche non sono ancora per niente chiare, a una specie di omicidio volontario come se i nostri Marò abbiano ucciso per il solo gusto di uccidere, è sintomatico di malafede e disinformazione.

Quando la legge 130 è stata approvata nessuno si è posto il problema del vuoto normativo internazionale per dirimere, in caso di incidente, situazioni come quella che si è venuta a creare tra Italia e India. Con il risultato che due dei nostri, nell'imbarazzante incapacità della politica di riportarli a casa, rischiano pene severissime in un Paese straniero. Qualcuno avrà solo ragionato con una calcolatrice in mano. Costano sei volte di meno. Pura logica di mercato. Il rischio, accettabile. E invece c'è scappato il morto. Sai, com'è, alle volte, il Diavolo.

Lì fuori c'è una guerra. Schivare le pallottole non è come starsene seduti davanti un computer a ticchettare sulla tastiera destreggiandosi tra un commento e un altro sui social network. Fateci un piacere. Non chiamateli, così alla spicciola "assassini", infangando l'onore dei nostri militari. È nient'altro che pressappochismo bell'e buono. E non rende onore a nessuno. Meno che meno a voi.

Ask Slashdot: Getting Apps To Use Phones' Full Power?
Mar 26th 2013, 15:00

First time accepted submitter MurukeshM writes "I have a 16 GB Nexus 4. I rarely manage to push the RAM usage above 1 GB (not counting cached processes). Yet I find it increasingly annoying when apps do stuff to save on RAM usage, such as having a browser reload a tab if I havent used it for a long time, instead of keeping it in memory or have an ebook reader load from storage instead of keeping the entire eBook in RAM. I know there are plenty of phones with far less memory, but when most of the RAM is unutilized, with more and more phones and tablets having 1GB+ RAM, isn't it time that apps check on available RAM and use optimizations accordingly? And it isn't only about RAM. Android by default only downloads one thing at a time, whether it be an app from Play Store or a file from a site. When connected to WiFi or 3G/LTE, there's no reason why multiple simultaneous downloads shouldn't be used. How do Slashdot readers with high-end phones get the most out of their device? Are there custom ROMs which act more sensibly?"

Share on Google+

Read more of this story at Slashdot.



PlanetIQ's Plan: Swap US Weather Sats For Private Ones
Mar 26th 2013, 14:42

We've mentioned over the last few years several times the funding problems that mean the U.S. government's weather satellite stable is thinner than we might prefer. A story at the Weather Underground outlines the plan of a company called PlanetIQ to fill the needs met with the current constellation of weather sats with private ones instead. From the article, describing testimony last week before the House Appropriations Subcommittee on Commerce: "PlanetIQ's solution includes launching a constellation of 12 small satellites in low-Earth orbit to collect weather data, which PlanetIQ says the federal government could access at less cost and risk than current government-funded efforts. ... [PlanetIQ Anne Hale] Miglarese added that within 28 to 34 months from the beginning of their manufacture, all 12 satellites could be in orbit. As for the cost, she says, "We estimate that for all U.S. civilian and defense needs globally for both terrestrial and space weather applications, the cost to government agencies in the U.S. will be less than $70 million per year. As the satellites collect data, PlanetIQ would sell the data to government weather services around the world as well as the U.S. Air Force. The most recently launched polar-orbiting satellite, sent into space by the U.S. in 2011, cost $1.5 billion."

Share on Google+

Read more of this story at Slashdot.



DOS Emulation Arrives For the Raspberry Pi
Mar 26th 2013, 14:00

An anonymous reader writes "Homebrew Coder Pate has released a DOS Emulator for the Raspberry Pi. Originally released for the Nintendo DS and Android, the emulator currently can emulate a CPU: 80486 processor, including the protected mode features (for running DOS4GW games) but without virtual memory support. The emulation runs at a speed around that of a 20MHz 80486 (which equals a 40MHz 80386) machine. It has support for Super VGA graphics, Soundblaster 2.0, Memory, USB keyboard and mouse. Perfect for playing old classics such as Doom, Duke Nukem 3D and Theme Park."

Share on Google+

Read more of this story at Slashdot.



Free Software Camps Wading Into VP8 Patent Fight
Mar 26th 2013, 13:22

An anonymous reader writes "As reported by Slashdot, Nokia recently notified the IETF that its RFC 6386 video codec (aka VP8, released by Google under a BSD license with a waiver of that company's patent rights) infringed several dozen of its patents; furthermore, Nokia was not inclined to license them under FRAND (fair, reasonable, and non-discriminating) terms. While the list provided by Nokia looks intimidating, Pamela Jones at Groklaw discovered that many appeared to be duplicates except for the country of filing; and even within a single country (e.g. the U.S.), some appeared to be overlapping. In other words, there may be far fewer distinct patented issues than what appears on Nokia's IETF form. Thom Holwerda at OSNews also weighed in, recalling another case where sweeping patent claims by Qualcomm and Huawei against the Opus open source audio codec proved to be groundless FUD. The familiar name Florian Mueller pops up again in Holwerda's article."

Share on Google+

Read more of this story at Slashdot.



James Cameron Gives Sub To Woods Hole Oceanographic Institution
Mar 26th 2013, 13:04

A year ago James Cameron made history by traveling solo almost seven miles deep in an area of the Pacific Ocean known the Mariana Trench’s Challenger Deep. He made the trip in a submersible he helped design, the Deepsea Challenger submersible system and science platform. To celebrate the anniversary, Cameron is forming a partnership with Woods Hole Oceanographic Institution (WHOI), and donating the Deep Sea Challenger. From the press release: "Cameron will transfer the Deepsea Challenger to Woods Hole, where WHOI scientists and engineers will work with Cameron and his team to incorporate the sub’s numerous engineering advancements into future research platforms and deep-sea expeditions. This partnership harnesses the power of public and private investment in supporting deep-ocean science. “The seven years we spent designing and building the Deepsea Challenger were dedicated to expanding the options available to deep-ocean researchers. Our sub is a scientific proof-of-concept, and our partnership with the Woods Hole Oceanographic Institution is a way to provide the technology we developed to the oceanographic community,” says Cameron. James even sent us a few early drawings of the Deepsea Challenger that he made during a conversation with oceanographer Don Walsh in November 2003. The sketches are proof that many great ideas start out on napkins or lined paper.

Share on Google+

Read more of this story at Slashdot.



The End Is Nigh For the Linux Game Tome
Mar 26th 2013, 12:41

First time accepted submitter Sodki writes "The Linux Game Tome, one of the most important websites related to video gaming in GNU/Linux, will shut down on the 13th of April, according to a news post published on the website. The decision was made due to the 'lack both the time and the ambition to do what is necessary to keep the site afloat,' which has resulted in 'spam clogging the forums, lack of updates and increasing brokenness of the site.' This might not be the end, though. The maintainers of The Linux Game Tome will make available a dump of the games database, so that anyone interested can cook up a new and updated version of the website, and a worthwhile effort will be considered for a transfer of ownership of the domain. The current source code of the website, which is from 1999, will not be available because 'it is not fit for human consumption.'" It certainly had a good run; I remember poking around the Linux Game Tome as a teenager in the misty past (and it's where I discovered Freeciv, Warzone 2100, and lbreakout2). Are there any alternatives already operating (unfortunately, Freecode doesn't seem popular with game authors)? Or: Which one of you is going to write the Linux Game Tome 3.0?

Share on Google+

Read more of this story at Slashdot.



Bezos Patenting 'Dumb' Tablets, Glasses, Windshields
Mar 26th 2013, 12:01

theodp writes "GeekWire reports on Amazon CEO Jeff Bezos' pending patent on remote displays that communicate with base stations and operate on wireless power. Reducing devices to mere screens with minimal storage that receive pre-rendered content (e.g., bitmap images), the patent application explains, eliminates the need for bulky batteries or processors, and employing techniques like electromagnetic or electrostatic induction allows one to cut the cord completely. Such remote displays, Amazon suggests, could find a home on college campuses (tablets), in your car (windshield displays or DVD players), and even on your face (eyeglasses)." There's already a (not wirelessly powered) device similar to the one described in the patent.

Share on Google+

Read more of this story at Slashdot.



High-Speed Coding: Goodbye, Zen Coding. Hello, Emmet!
Mar 26th 2013, 11:36


  

Back in 2009, Sergey Chikuyonok wrote an article to present a new way of writing HTML and CSS code. This revolutionary plugin, called Zen Coding, has helped many developers through the years and has now reached a new level.

Emmet, previously known as Zen Coding, is the most productive and time-saving text-editor plugin you will ever see. By instantly expanding simple abbreviations into complex code snippets, Emmet can turn you into a more productive developer.

For those who prefer to watch instead of read, here is a summary of my favorite tricks.

How Does It Work?

Let's face it: writing HTML code takes time, with all of those tags, attributes, quotes, braces, etc. Of course, most text editors have code completion, which helps a lot, but you still have to do a lot of typing. Emmet instantly expands simple abbreviations into complex code snippets.

HTML Abbreviations

Initializers

Getting started with a new HTML document takes less than a second now. Just type ! or html:5, hit "Tab," and you'll see an HTML5 doctype with a few tags to jumpstart your application.

Emmet Demonstration - Initializers

  • html:5 or !
    for an HTML5 doctype
  • html:xt
    for an XHTML transitional doctype
  • html:4s
    for an HTML4 strict doctype

Easily Add Classes, IDs, Text and Attributes

Because Emmet's syntax for describing elements is similar to CSS selectors, getting used to it is very easy. Try mixing an element's name (e.g. p) with an identifier (e.g. p#description).

Emmet Demonstration - Classes and IDs

Also, you can combine classes and IDs. For example, p.bar#foo will output this:

  <p class="bar" id="foo"></p>  

Now let's see how to define content and attributes for your HTML elements. Curly brackets are used for content. So, h1{foo} will produce this:

  <h1>foo</h1>  

And square brackets are used for attributes. So, a[href=#] will generate this:

  <a href="#"></a>  

Emmet Demonstration - Texts and Attributes

Nesting

By nesting abbreviations, you can build a whole page using just one line of code. First, the child operator, represented by >, allows you to nest elements. The sibling operator, represented by +, lets you place elements near each other, on the same level. Finally, the new climb-up operator, represented by ^, allows you to climb up one level in the tree.

Emmet Demonstration - Nesting operators

Grouping

To effectively take advantage of nesting without turning them into a confusing mess of operators, you'll need to group some pieces of code. It's like math — you just need to use parentheses around certain pieces. For example, (.foo>h1)+(.bar>h2) will output this:

  <div class="foo">    <h1></h1>  </div>  <div class="bar">    <h2></h2>  </div>  

Emmet Demonstration - Grouping

Implicit Tag Names

To declare a tag with a class, just type div.item, and then it will generate <div class="item"></div>.

In the past, you could omit the tag name for a div; so, you just had to type .item and it would generate <div class="item"></div>. Now Emmet is more intelligent. It looks at the parent tag name every time you expand the abbreviation with an implicit name. So, if you declare .item inside of a <ul>, it will generate <li class="item"></li> instead of <div class="item"></div>.

Emmet Demonstration - Implicit tag names

Here's a list of all implicit tag names:

  • li
    for ul and ol
  • tr
    for table, tbody, thead and tfoot
  • td
    for tr
  • option
    for select and optgroup

Multiplication

You can define how many times an element should be outputted by using the * operator. So, ul>li*3 will produce:

  <ul>    <li></li>    <li></li>    <li></li>  </ul>  

Emmet Demonstration - Multiplication

Numbering

What about mixing the multiplication feature with some item numbering? Just place the $ operator in the element's name, the attribute's name or the attribute's value to output the number of currently repeated elements. If you write ul>li.item$*3, it will output:

  <ul>    <li class="item1"></li>    <li class="item2"></li>    <li class="item3"></li>  </ul>  

Emmet Demonstration - Numbering

Try It Now!

Why not try it right now? Go ahead: type in an Emmet HTML abbreviation, and hit the Tab key.

CSS Abbreviations

Values

Emmet is about more than just HTML elements. You can inject values directly into CSS abbreviations, too. Let's say you want to define a width. Type w100, and it will generate:

  width: 100px;  

Emmet Demonstration - Values

Pixel is not the only unit available. Try running h10p+m5e, and it will output:

  height: 10%;  margin: 5em;  

Here's a list with a few aliases:

  • p → %
  • e → em
  • x → ex

Extra Operator

You already know many intuitive abbreviations, such as @f, which produces:

  @font-face {    font-family:;    src:url();  }  

Some properties — such as background-image, border-radius, font, @font-face, text-outline, text-shadow — have some extra options that you can activate by using the + sign. For example, @f+ will output:

  @font-face {    font-family: 'FontName';    src: url('FileName.eot');    src: url('FileName.eot?#iefix') format('embedded-opentype'),       url('FileName.woff') format('woff'),       url('FileName.ttf') format('truetype'),       url('FileName.svg#FontName') format('svg');    font-style: normal;    font-weight: normal;  }  

Emmet Demonstration - Extra operator

Fuzzy Search

The CSS module uses fuzzy search to find unknown abbreviations. So, every time you enter an unknown abbreviation, Emmet will try to find the closest snippet definition. For example, ov:h and ov-h and ovh and oh will generate the same:

  overflow: hidden;  

Emmet Demonstration - Fuzzy Search

Vendor Prefixes

CSS3 is awesome, but those vendor prefixes are a real pain for all of us. Well, not anymore — Emmet has abbreviations for them, too. For example, the trs abbreviation will expand to:

  -webkit-transform: ;  -moz-transform: ;  -ms-transform: ;  -o-transform: ;  transform: ;  

Emmet Demonstration - Vendor Prefixes

You can also add prefixes to any kind of element. You just need to use the - prefix. So, -super-foo will expand to:

  -webkit-super-foo: ;  -moz-super-foo: ;  -ms-super-foo: ;  -o-super-foo: ;  super-foo: ;  

What if you don't want all of those prefixes? No problem. You can define exactly which browsers to support. For example, -wm-trf will output:

  -webkit-transform: ;  -moz-transform: ;  transform: ;  
  • w-webkit-
  • m-moz-
  • s-ms-
  • o-o-

Gradients

Speaking of annoying CSS3 features, we cannot forget gradients. Those long definitions with different notations can now be easily replaced with a concise, bulletproof abbreviation. Type lg(left, #fff 50%, #000), and the output will be:

  background-image: -webkit-gradient(linear, 0 0, 100% 0, color-stop(0.5, #fff), to(#000));  background-image: -webkit-linear-gradient(left, #fff 50%, #000);  background-image: -moz-linear-gradient(left, #fff 50%, #000);  background-image: -o-linear-gradient(left, #fff 50%, #000);  background-image: linear-gradient(left, #fff 50%, #000);  

Emmet Demonstration - Gradients

Try It Now!

Had enough of the animated GIFs? Go ahead — type an Emmet CSS abbreviation, and hit the Tab key.

Extras

Lorem Ipsum

Forget about those third-party services that generate "Lorem ipsum" text. Now you can do that right in your editor. Just use the lorem or lipsum abbreviations. You can specify how many words to generate. For instance, lorem10 will output:

  Lorem ipsum dolor sit amet, consectetur adipisicing elit. Libero delectus.  

Emmet Demonstration - Lorem Ipsum

Also, lorem can be chained to other elements. So, p*3>lorem5 will generate:

  <p>Lorem ipsum dolor sit amet.</p>  <p>Voluptates esse aliquam asperiores sunt.</p>  <p>Fugiat eaque laudantium explicabo omnis!</p>  

Customization

Emmet offers a wide range of tweaks that you can use to fine-tune your plugin experience. There are three files you can edit to do this:

And A Lot More!

This is just the beginning. Emmet has a lot of other cool features, such as encoding and decoding images to data:URL, updating image sizes and incrementing and decrementing numbers.

Go check out the new website, the awesome documentation and the handy cheat sheet!

Supported Editors

If you are wondering, "Will it work in my text editor?," The answer is, "Oh yes, my friend!" A lot of editors are supported, and I hope you find yours in the list below.

And You?

What are your favorite tricks? Leave a comment below. Now it's your turn to share your favorite tricks.

(al) (ea)


© Zeno Rocha for Smashing Magazine, 2013.

ICANN's Trademark Clearinghouse Launching Today
Mar 26th 2013, 09:08

itwbennett writes "If you want to protect your brand before ICANN rolls out the new gTLDs (generic top-level domains), here's your chance. The clearinghouse will allow trademark owners to register their marks for an annual fee of between $95 and $150. The clearinghouse 'doesn't necessarily prevent trademark infringement or cybersquatting, but it does help trademark owners and brand owners somewhat in mitigating the damage that might occur,' said Keith Kupferschmid, general counsel and vice president of IP policy and enforcement for the Software and Information Industry Association (SIIA). 'We've been telling brand owners it's not that expensive to protect themselves and they ought to do it.'" All of the new TLD registrars will be required to check the trademark clearinghouse before issuing domains, preemptively squashing trademark disputes.

Share on Google+

Read more of this story at Slashdot.



Apache CloudStack Becomes a Top-level Project
Mar 26th 2013, 07:11

ke4qqq writes with an excerpt from an ASF press release: "The Apache Software Foundation (ASF), the all-volunteer developers, stewards, and incubators of nearly 150 Open Source projects and initiatives, today announced that Apache CloudStack has graduated from the Apache Incubator to become a Top-Level Project (TLP), signifying that the Project's community and products have been well-governed under the ASF's meritocratic process and principles."

Share on Google+

Read more of this story at Slashdot.



iCheck: Super Customized Checkboxes & Radio Buttons
Mar 26th 2013, 07:10

Advertise here via BSA

iCheck is super customized checkboxes and radio buttons with jQuery. iCheck is created to avoid routine of reinventing the wheel when working with checkboxes and radio buttons. It provides an expected identical result for the huge number of browsers, devices and their versions. Callbacks and methods can be used to easily handle and make changes at customized inputs.

iCheck is verified to work in Internet Explorer 7+, Firefox 2+, Google Chrome, Safari 3+ and Opera 9+ browsers. Should also work in many others. Mobile browsers like Opera mini, Chrome mobile, Safari mobile and others are also supported. Tested on iOS, Android, BlackBerry and Windows Phone devices.

icheck

Requirements: jQuery Framework
Demo: http://damirfoy.com/iCheck/
License: MIT License

Sponsors

Professional Web Icons for Your Websites and Applications

Getting More Through Polyfills with HTML5
Mar 26th 2013, 07:01

Advertise here via BSA

One of the most stubbornly persistent misconceptions about HTML5 is that it's effectively unusable for years to come. With that myth and the uncertainty over fragmented browser support for HTML5's new features, it's easy to find someone with reasons for avoiding HTML5 right now.

But while some features are legitimately not ready for use in production, many of the new APIs in HTML5 have solidified enough to be relied on in newer browsers like Chrome, Firefox 4 and Internet

Explorer 9. In fact, even Internet Explorer 6 includes support for one of HTML5's "new" features, contentEditable. More importantly, many of the new features in HTML5 are compelling enough that waiting another decade to begin using them doesn't make sense.

Cross-Browser Support

The most nagging issue with making the leap to HTML5 is that most of us have no choice but to support a variety of older browsers that have little or no support for the most useful new APIs. The thought of adopting a new Web technology conjures up nightmares of cross-browser inconsistencies, unmaintainable branching code, browser sniffing and a host of other problems. However, there's an underappreciated technique that can entirely mitigate those problems for certain new features of HTML5 and still allow you to develop against the new APIs as though all your users had upgraded their browsers overnight: polyfills.

Polyfilling is a term coined by Remy Sharp to describe an approach for backfilling missing functionality in a way that duplicates the missing API. Using this technique allows you to write application-specific code without worrying about whether or not each user's browser implements it natively. In fact, polyfills aren't a new technique or tied to HTML5. We've been using polyfills such as json2.js, ie7-js, and the various fallbacks for providing transparent PNG support in Internet Explorer for years. The difference is the proliferation of HTML5 polyfills in the last year.

What Makes a Polyfill?

For a concrete example of what I'm talking about, take a look at json2.js. Specifically, here is the first line of code in its JSON.parse implementation:

if (typeof JSON.parse !== 'function') { // Crockford's JavaScript implementation of JSON.parse }

By guarding the code with the typeof test, if the browser has a native implementation of JSON.parse, json2.js doesn't try to interfere with or redefine it. If the native API is not available, json2.js implements a JavaScript version of JSON.parse in a way that's exactly compatible with JavaScript's native JSON API. Ultimately, this means you can include json2.js on a page and be confident of using JSON.parse without any regard for which browser your code is running in.

This shows the advantage of the polyfilling approach—to not only provide a compatibility layer, but to provide it in a way that attempts to closely mirror the standard API that the polyfill implements. Thus, none of the site-specific code needs to know or care about the compatibility layer's existence. Ultimately, this results in cleaner, simpler, application-specific code that lets you take advantage of new APIs while still maintaining compatibility with older browsers.

HTML5's New Semantic Elements

One of the new features in HTML5 that's easiest to polyfill is the set of semantic elements that have been added, such as <article>, <aside>, <header> and <time>. Most of these elements render exactly as the venerable <div> and <span> do, but they impart richer, more specific semantic meaning.

Because these elements are valid SGML, the good news is that even older browsers like Internet Explorer 6 will display them today. However, one of Internet Explorer's quirks is that it applies CSS styling only to elements that it recognizes. So, even though older versions of Internet Explorer do render the content of HTML5's new semantic elements, they ignore any user-defined styling when doing so.

Luckily, Sjoerd Visscher discovered an easy workaround for Internet Explorer, and his approach was made popular by John Resig. Making a call to document.createElement() with any arbitrary element type specified as the argument causes Internet Explorer to recognize elements of that type and properly apply CSS styles to them as expected.

For example, adding a single call to document.createElement('article') in the <head> of the document shown in Figure 1 tames Internet Explorer and coerces it to apply CSS styles to the <article> element.

<html> <head> <title>HTML5 Now?</title> <style> article { margin: 0 auto; width: 960px; } </style> <script> document.createElement('article'); </script> </head> <body> <article> <!-- TODO: Write article… --> </article> </body> </html>

Figure 1 This call to document.createElement changes how Internet Explorer applies CSS styles.

Of course, no one wants to manually add createElement statements for each of the plethora of new semantic elements added in HTML5. Abstracting away that tedium is exactly where a polyfill shines. In this case, there's a polyfill called html5shim (also known as html5shiv) that automates the process of initializing Internet Explorer compatibility with the new semantic elements.

For example, the code in Figure 1 could be refactored to use html5shim as shown in Figure 2.

<html> <head> <title>HTML5 Now!</title> <style> article { margin: 0 auto; width: 960px; } </style> <!--[if lt IE 9]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> </head> <body> <article> <!-- TODO: Write article… --> </article> </body> </html>

Figure 2 Using the html5shim polyfill

Notice the conditional comment surrounding the script reference to html5shim. This ensures that the polyfill will be loaded and executed only in versions of Internet Explorer earlier than version 9. No time is wasted downloading, parsing, and executing this code in browsers that already provide proper support for the new elements.

Another Alternative to Consider

If you're interested enough in HTML5 to be reading this article, you're probably aware of or using Modernizr already. However, one thing you might not be aware of is that Modernizr has the html5shim createElement functionality built-in. If you're using Modernizr for feature detection, you already have backward compatibility for HTML5's semantic elements.

Persistent Client-Side Storage

For years, we've had no choice but to hack together combinations of vendor-specific DOM extensions and proprietary plug-ins to solve the problem of persisting long-term state in the browser. These solutions included Firefox's globalStorage, Internet Explorer's userData, cookies and plug-ins like Flash or Google Gears. Though viable, these hacked-together workarounds are tedious, difficult to maintain, and prone to error.

To remedy this, one of the most warmly welcomed additions in HTML5 is a standards-based API for persistently storing data in the browser: localStorage. This storage API provides a consistent client-server key/value store, which can store up to 5 MB of isolated data for each Web site a user visits. You can think of localStorage as a massive cookie that is easier to work with and isn't needlessly transmitted back and forth between the browser and server during every HTTP request. The localStorage feature is perfect for tasks that require browser-specific data, like remembering preferences and locally caching remote data.

The localStorage feature is already supported in every A-grade browser, including Internet Explorer 8, but it's missing from older versions of most browsers. In the meantime, several solutions have arisen to polyfill cross-browser storage into those older browsers. They range from the simplicity of Remy Sharp's Storage polyfiller, to the comprehensive backward compatibility provided by store.js and PersistJS, to the full-featured API of LawnChair and the AmplifyJS storage module.

For example, this is how you might use the AmplifyJS storage module to persist some data in a user's browser without resorting to cookies—even if that user was using Internet Explorer 6:

// Sets a localStorage variable 'Name' with my name in it.    amplify.store('name', 'Dave Ward');    var website = {    name: 'Encosia',    url: 'http://encosia.com'    }    // The library takes care of serializing objects automatically.    amplify.store('website', website);    Pulling that data out at a later date becomes extremely easy:    // The values we stored before could then be used at a later time, even    // during a different session.    var $personLink = $('<a>', {    text: amplify.store('name'),    href: amplify.store('website').url    });    $personLink.appendTo('body');

Again, the great thing about using localStorage or a localStorage-based API is that none of this data needs to be persisted in cookies and then be transmitted along with every HTTP request, nor does it require that you invoke a heavyweight plug-in like Flash just to store a bit of data. The data is stored in a true, isolated local storage mechanism, which makes it great for caching data locally or developing sites that have rich support for offline usage.

What to Use?

Remy Sharp's Storage polyfiller is the only one that truly qualifies as a polyfill, because the others don't exactly mimic the HTML5 localStorage API. However, store.js and the AmplifyJS storage module provide support for a wider range of fallback approaches to achieve compatibility in older browsers. Pragmatically, that's hard to ignore.

Geolocation

Geolocation is another HTML5 feature ripe for polyfilling. If both browser and operating system support geolocation and are running on a device with a GPS sensor, HTML5 provides access to a geolocation API that allows JavaScript code to determine where your page is being accessed from.

Mobile devices are the most impressive example of browser-based geolocation. By coupling their built-in GPS hardware with modern browsers that support the HTML5 geolocation API, both Android and iOS devices support native HTML5 geolocation with as much accuracy as their native apps.

The JavaScript necessary to access geolocation data in those optimal environments is as simple as this:

navigator.geolocation.getCurrentPosition(function(position) {    var lat = position.coords.latitude;    var long = position.coords.longitude;    console.log('Current location: ', lat, log);    });

That's well and good for mobile apps, but desktop hardware doesn't typically contain a GPS sensor. We're all accustomed, however, to the location-aware advertising that's been following us around the Internet on desktop hardware for far longer than the geolocation API has existed, so it's obviously possible to work around the lack of a GPS on desktop browsing environments.

In JavaScript, the current workaround is to look up a visitor's IP address in a database of known IP locations. That approach suffers from significantly lower accuracy than using a GPS device, but these databases are usually able to locate an IP address within the correct regional area, which is enough to be useful for many applications.

You may be aware of techniques for more accurate GPS-less geolocation that don't rely solely on IP address lookups. Most often, those enhanced estimations are accomplished by the novel approach of comparing visible Wi-Fi hotspot identifiers with a database of where those particular combinations of hotspots have been physically located in the past.

Unfortunately, JavaScript code running in a browser is not currently privy to that data from the operating system. So, the Wi-Fi–based technique is not available to polyfills for the foreseeable future, leaving us with IP lookups as the only alternative.

Paul Irish wrote a simple geolocation polyfill that provides some level of geolocation in older browsers and on hardware lacking a GPS sensor. It accomplishes this by using Google's geolocation API to translate a visitor's IP address to an approximate physical location. It's a true polyfill in the sense that it plugs its geolocation functionality into the navigator.geolocation object, but only if the browser doesn't natively provide the geolocation API.

Browser History and Navigation

As superficial DHTML effects give way to more structural client-side features such as AJAX-based paging and single-page interfaces, those structural changes begin to fall out of sync with the browser's built-in navigation and history functionality. Then, when users intuitively attempt to use their Back button to navigate to a previous page or application state, things go badly. Searching for "disable the back button" reveals the extent to which this problem plagues modern Web development.

Manipulating the "hash" portion of the browser's location helps tackle one side of the problem. Since the hash was originally intended for jumping between navigation points within the same page, changing a URL's hash doesn't trigger a page refresh like changes to the underlying URL prefix do. Leveraging that property of the hash allows client-side updates to keep the browser's displayed address in sync with JavaScript-driven changes that happen without traditional navigation events.

The onhashchange Event

While manipulating the browser's hash is well supported, reaching back beyond even Internet Explorer 6, a standardized method for monitoring changes to the hash has been more elusive until recently. The current crop of browsers support an onhashchange event, which is triggered when the hash portion of the address changes—perfect for detecting when a user attempts to navigate through client-side state changes by using the browser's navigation controls. Unfortunately, the onhashchange event is only implemented in relatively new browsers, with support beginning in Internet Explorer 8 and Firefox's 3.6 release.

Though the onhashchange event isn't available in older browsers, there are libraries that provide an abstraction layer in older browsers. These compatibility shims use browser-specific quirks to replicate the standard onhashchange event, even resorting to monitoring location.hash several times per second and reacting when it changes in browsers with no alternative methods.

One solid choice in that vein is Ben Alman's jQuery Hashchange plug-in, which he extracted from his popular jQuery BBQ plug-in. Alman's jQuery Hashchange exposes a hashchange event with remarkably deep cross-browser compatibility. I hesitate to call it a polyfill because it requires jQuery and doesn't exactly duplicate the native API, but it works great if you're using jQuery on your pages already.

Beyond HashState

Manipulating the hash is a good start toward solving the client-side state-management problem, but it's not without its drawbacks. Hijacking a legitimate browser navigation feature isn't optimal since the hash-based URL structure can cause confusion for users and conflict with existing on-page navigation.

An even more fundamental problem is that browsers do not include the hash portion of requested URLs in the HTTP requests. Without access to that portion of the URL, it's impossible to immediately return a page that's in the same state as one that the user bookmarked, received via email, or discovered through social sharing. That leads to sites having no alternative but to display pages in their default, initial state and then automatically trigger a jarring transition to the state that the user actually desires. To find evidence of the impact this has on usability, you need look no further than the widespread negative reaction to Twitter and Gawker Media's "hash bang" redesigns.

Enter pushState

Luckily, HTML5 has also introduced a pair of more advanced APIs that significantly improve the client-side history-management situation. Often referred to simply as pushState, the combination of the window.history.pushState method and the window.onpopstate event provides an avenue for asynchronously manipulating the entire path portion of the browser's address and, likewise, reacting to navigation events outside the hash.

Browsing through the source for a project on GitHub is one of the best real-world examples of using pushState right now. Since manipulating the browser's address with pushState doesn't cause a full page refresh like traditional changes to the address, GitHub is able to provide animated transitions between each "page" of code while still retaining user-friendly URLs that aren't crufted up with hashes or querystrings.

Better yet, if you save a bookmark to one of these URLs and navigate directly to it later, GitHub is able to immediately serve the correct content to you on the first request because the client-side URL structure matches what they use on the server. As I mentioned earlier, doing this is impossible when you use hash-based URLs because your Web server is never privy to the hash portion of requests.

Using onhashchange and pushState in Your Own Code

Unfortunately, to truly polyfill pushState functionality into browsers that don't support it is impossible. No abstraction layer can change the fact that modifying the URL in older browsers will trigger a page load. However, you can have the best of both worlds by using pushState in browsers that implement it and then fall back to using the hash-based approach in older browsers.

Benjamin Lupton has assembled a great cross-browser library to smooth over the wide range of quirks and inconsistencies that come along with maintaining client-side history. His library covers browsers all

the way from Internet Explorer 6 to the latest version of Chrome. Using the library is simple. It has a syntax that closely follows HTML5's own pushState syntax:

// This changes the URL to /state1 in HTML5 browsers, and changes it to    // /#/state1 in older browsers.    History.pushState(null, 'State 1', 'state1');    // Same as before, but /state2 and /#/state2.    History.pushState(null, 'State 2', 'state2');

Rather than exposing an exact replica of the HTML5 popstate event, history.js includes a variety of adapters to work with the eventing systems in those libraries. For example, using the jQuery adapter, you could bind an event handler to the history.js statechange event like this:

History.Adapter.bind(window, 'statechange', function() {    // Get the new history state from history.js.    var state = History.getState();    // Write the URL we've navigated to on the console.    console.log(state.url);    });

This statechange event handler is triggered any time the browser navigates through history points that have been persisted via the history.js pushState method. Whether in an HTML5 browser that supports pushState natively or in an older browser that supports only hash-based URL changes, monitoring this single event catches any activity.

Putting this to work in real-world applications is easy. You can probably imagine using it in conjunction with AJAX-powered grid paging and sorting, or even for the navigation for an entire site (Gmail or Twitter, for example) without resorting to those universally loathed hash-bang URLs and redirects.

Running with pushScissors

One thing to watch out for when using pushState is that you must take care that your server will respond correctly to every URL that you use on the client-side. Since it's easy to build up a client-side URL that your server will respond to with a 404 or 500 error (for example, /undefined), it's a good idea to be sure that your server-side routing or URL rewriting is configured to handle unexpected URLs as gracefully as possible. For example, if you have a multipage report at /report, with pushState-driven URLs of /report/2, /report/3, and so on for each page, you should ensure that your server-side code responds gracefully to requests for URLs like /report/undefined.

A less-desirable alternative is to use querystring URL fragments in your pushState address updates, like /report?page=2 and /report?page=3. The resulting URLs don't look as nice, but they are at least unlikely to result in a 404 error.

Where to Go from Here

This article only scratches the surface of the HTML5 polyfills ecosystem. There are active projects that provide cross-browser support for features such as SVG and canvas graphics, HTML5 video, ECMAScript 5, and even WebWorkers. If you're interested in learning more about these projects, Paul Irish has assembled a fantastic resource with brief descriptions and links to many of them here: https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-browser-Polyfills

About the Author

Dave Ward is an independent ASP.NET consultant in Atlanta, Georgia, specializing in creating functional, interactive web applications with HTML, CSS, and JavaScript. With over fifteen years' experience developing websites, he has been recognized as a Microsoft ASP.NET/IIS MVP and a member of the ASP Insiders. His client-side web development focused website can be found at http://Encosia.com, or you can find him on Twitter as @Encosia.

Sponsors

Professional Web Icons for Your Websites and Applications

Drone Swarm Creates Star Trek Logo In London Sky
Mar 26th 2013, 04:04

garymortimer writes "As a harbinger for the Paramount film 'Star Trek — Into Darkness', starting in May in Europe's cinemas, last night a swarm of 30 mini-helicopters equipped with the LED lights drew the Star Trek logo into the skies over London. The choreography for the show was developed by Ars Electronica Futurelab from Linz (Austria). Quadrocopter maker Ascending Technologies GmbH from Munich (Germany) provided the aircrafts."

Share on Google+

Read more of this story at Slashdot.



Wi-Fi Enabled Digital Cameras Easily Exploitable
Mar 26th 2013, 01:58

An anonymous reader writes with some news that might make you think twice before getting a network-enabled camera. From the article: "Users' desire to share things online has influenced many markets, including the digital camera one. Newer cameras increasingly sport built-in Wi-Fi capabilities or allow users to add SD cards to achieve them in order to be able to upload and share photos and videos as soon as they take them. But, as proven by Daniel Mende and Pascal Turbing, security researchers with ERNW, these capabilities also have security flaws that can be easily exploited for turning these cameras into spying devices. The researchers chose to compromise Canon's EOS-1D X DSLR camera and exploit each of the four ways it can communicate with a network. Not only have they been able to hijack the information sent from the camera, but have also managed to gain complete control of it."

Share on Google+

Read more of this story at Slashdot.



You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions