|
I read a lot about random technical things all day long. I think reading keeps the mind sharp. I like to post articles around wireless technology, photography, science, fun gadgets, privacy and just all around interesting things to read.
Nematolah's shared items
Wednesday, October 9, 2013
Final reminder: needmorelove wants to connect with you on Pearltrees
Wednesday, September 25, 2013
2nd reminder: needmorelove wants to connect with you on Pearltrees
|
Wednesday, September 18, 2013
Reminder: needmorelove wants to connect with you on Pearltrees
|
Wednesday, September 11, 2013
I'd like to connect with you on Pearltrees
|
Friday, July 30, 2010
Your Questions Answered #11
The clinic is busy as ever with more HTML5 ailments. This week, we’ll show you how (and whether) to store a
<canvas>
on the server, whether to use <progress>
or <meter>
, more on <header>
, the placeholder
attribute, and HTML5 minification.
Getting info from a canvas to the server
Stephen asked:
I want to use a canvas element as a layout plan and allow people to move things about and the like but I then want to be able to submit the changed layout to the server so it can be kept not just as a bitmap but as the various current layout of the plan. Is this possible?
You could call canvas.toDataURL()
and store this output on the server. (Note that canvas
is the DOM node and not the 2D context.) This will store the current state of your canvas, but it’s effectively a bitmap at this point. If you want to store the element for later editing, I’d suggest you use SVG instead. You can achieve the same graphical effect, but you’ll have access to the actual vector data since it’s XML.
Hope that helps,
Remy
Progress or meter?
Pierre asked:
Hello doctor,
I’m beginning with HTML5. I just wonder if I’m using the progress and meter elements correctly. Just imagine a player. Is it correct to use: the progress element to specify a load bar; the meter element to specify the volume set.
Thank you Doctor, have a good day.
![]()
<progress>
is spot on for a loading bar, yes.
<meter>
is read only, however, so it’s not appropriate for a volume control. There are some examples in Tom’s article on <meter>
. To create a volume control, you could use one of the new input types specified in HTML5, perhaps <input type="range">
.
Cheers,
Rich
Headers
Brad asked:
Having read you can use the header tag within almost any other element, is it fair to say you no longer “design” the header but simply design the elements in each header? How does that work? Would you use header classes?
In the past you define your header with an image or text etc. You can no longer do that if you use multiple headers?
The <header>
element should be used if you have any related information within the “header” of that section that needs to be grouped. This means, for example, it isn’t necessary to wrap a lone <h1>
in a <header>
element. Also remember that the header doesn’t have to appear at the top of a section of page.
Our articles on the <header>
element and <hgroup>
element explain this some more.
Whether you need to use classes depends on your site.
Ta,
Rich
The placeholder
attribute
José asked:
I recall once having seen text inputs that had tips inside them. They didn’t need Javascript in order to manage those tips. Would you consider discussing that a little better? That’d be great! Thanks!
We’re publishing an article on forms shortly, so be sure to look out for it.
Meanwhile, you’re looking for the placeholder
attribute. Currently, this is supported only on Webkit browsers, although Mozilla is also working on it. You can use placeholder
like this:
<input placeholder="Search" title="Type your search here" ...>
We’ve also written a JavaScript solution using feature detection (i.e., it will check whether the browser supports placeholder
and adds support if not). Just add this script to the end of your markup (note that it should be the end since it needs to run once the DOM is ready).
Hope that helps,
Bruce & Remy
HTML5 Minified
Grant asked:
Hello! Big fan of your website. I wanted to know about the so called “HTML Minified” feature that allows you to strip the
html
,head
andbody
tags from your page.
The W3C Validator Conformance Checker for HTML5 says this is valid, but the Conformance Checker is beta and is supposedly unreliable. I haven’t heard from anywhere else that stripping these tags is a feature.
So is it really a feature? Or just a bug (A BIG one at that) in the experimental validator? I know that it works, but I would like to see any confirmation other than the validator that this is in fact an intended standard before I start using it on my websites. Thanks!
According to the spec, it is now explicitly permitted to omit all kinds of elements, including the ones you mention. Browsers are able to deduce the document structure based on context (e.g., some elements are only allowed within a <body>
element) and will fix the DOM as they go. In fact, these have always been optional tags in HTML (but not XHTML).
Browsers are so good at this, though, because they’ve had to deal with the pants code out there on the interwebs. Going this route means you’re relying on browser error handling to render your document (although said error handling has admittedly been standardised in HTML5). I personally see it as a more extreme version of quoting element attributes. Of course you don’t have to, but being strict makes errors much easier to find, helps out parsers that may not be as sophisticated as a full-fledged browser (like text editor syntax highlighting), and makes it easier for beginners and veterans alike to learn and use HTML.
In general, machines understand you better when you’re explicit, so I’d advise against omitting these elements.
For more detailed articles on HTML5 minification, check out Remy’s HTML5 Boilerplates and Bruce’s A minimal HTML5 document.
Peace,
Oli
Got a question for us?
That wraps up this round of questions. If you’ve got a query about the HTML5 spec or how to implement it, you can get in touch with us and we’ll do our best to help.
Related Posts:
Your Questions Answered #11 originally appeared on HTML5 Doctor on July 30, 2010.
Google - Tough times ahead
This CNN Money article states that 'the party is over' for Google, as record growth figures begin to dwindle and the company looks for new services and products to keep the figures pointing the right way. It's an interesting read, and shows how, despite the success of Android and the combined force of Google and YouTube, they're now seeing a 21% drop in shares since January.
Link - CNN.com
Read on and add your comments. Follow us on twitter too.
Samsung Still Loves Developers – Releases Captivate’s Source Code
Samsung’s Open Source website has just officially distributed the source code for the Samsung Captivate to anyone willing (and understandably wanting) to download it. The 161MB source package will help developers in creating ROMs for the device for users in the root community to enjoy. This is nothing new for Samsung: the Samsung Vibrant’s (SGH-T959) source has also been available for some time, as well as the source for the international version of the phone. It won’t surprise us when the source for their other Galaxy S phones (the Samsung Fascinate and the Samsung Epic 4G) are released (after the phones themselves are released, of course).
Head over to Samsung’s Open Source site to download now (click the Mobile tab in the top bar and look for SGH-i897 to get started).
[via BriefMobile]
"Wednesday, July 28, 2010
Mugtug offers beautiful, powerful sketching and image editing for the Web
Filed under: Web services, Imaging Tips, web 2.0
Mugtug is one name (and website) for two distinct, and equally impressive, image editing/creation applications:
Darkroom is a sophisticated, in-page photo 'adjustment' software. Note that I don't use the word 'editing.' That's because you can't really make selections (unless you want to crop or mirror). You can, however, adjust any image parameter (such as white balance, exposure, contrast, or saturation) and apply specific effects. There's a live histogram, and you can also look at just one channel of the histogram.
Sketchpad is a drawing application with a complete set of tools (except that I couldn't figure out how to draw a straight line!). It's also very fast, responsive, and solid. You get gradients, swatches, multiple options per tool, and a GIMP-like interface with a draggable panel that you can move around.
What's so striking about Mugtug is that it is usable. There are keyboard shortcuts, it's fast and responsive, it's not Flash, and it really doesn't feel like a toy. When I first messed up with the drawing application, I instinctively hit Ctrl-Z to undo; it worked! I then hit it again, and it rolled me another step back. Ctrl-Shift-Z brought me forward again, just like on the desktop. That feeling extends throughout both applications.
I don't know if Mugtug will catch on as an application suite (although I do hope so), but at any rate, I think this is a prime example of where the Web is headed.
Mugtug offers beautiful, powerful sketching and image editing for the Web originally appeared on Download Squad on Wed, 28 Jul 2010 10:30:00 EST. Please see our terms for use of feeds.
Tuesday, July 27, 2010
ShutterSnitch and Eye-Fi: Wireless Camera Tethering for iPad
Back in May, we took a look at a ShutterSnitch, an iPad app that lets you receive photos wirelessly from your camera. Combined with an Eye-Fi wireless SD card, you can shoot away and have the photos pop up on the big screen in seconds. It’s like shooting tethered to a laptop, only about a zillion times more convenient.
So why are we revisiting the subject? Because it got a whole lot easier to use. Now, the tricky networking part has been simplified and you need only follow a few steps to get things up and running. The first time you do this, you’ll need to configure both the Eye-Fi card (using the Eye-Fi Center) if it is not already aware of your Wi-Fi network, and also the ShutterSnitch app (just enter the Eye-Fi username and password).
From there, you simply need to shoot, with one weird caveat: you need to create a “collection” in ShutterSnitch to receive the photos. That’s it. Now you can beam the photos across as you shoot.
There are plenty of things you can do within the application. As you shoot, the images are shown full-screen, with or without shutter-speed, aperture and histogram overlays. Once done, you can keep the photos in ShutterSnitch, mail them, organize them, upload to Flickr and pass them off to the iPad’s own photo-library, from where it can be sent off to any other photo-editing application you might have.
There is one big gotcha. You’ll need to have a Wi-Fi network running to make this all work: The Eye-Fi cannot beam direct to the iPad. That means you’ll need either a portable hotspot like the MiFi, be in a place where there is already a network, or create one using a laptop (which kind of defeats the point of this). I’m going to pick up an Eye-Fi card this afternoon and also investigate jailbreak solutions for ad-hoc network creation on the iPad. If it works, I’ll let you know.
From Eye-Fi to iPad [Eye-Fi blog]
Eye-Fi Card, iPad, and ShutterSnitch for Wireless Transfer [The Digital Story]
Invites for Google’s Android App Inventor Begin Rolling Out
Google announced its App Inventor a few weeks ago with the promise to usher in a new era of Android software creation through their simplified, visual programming interface. At the time of announcement those interested in testing their hand at Android app development were only able to sign up for the opportunity to receive an invite to the service, and it now seems those invites are beginning to roll out. A quick scan of Twitter shows that quite a few would-be Android programmers are reporting that they can now download and begin toying around with the full App Inventor software.
One of our readers was kind enough to send in the full text of the invitation e-mail going out:
Welcome to App Inventor for Android!
The Google account that you are receiving this email on has been given access to App Inventor.
We recommend you start your app building adventures by working through the Getting Started material. You might also want to read more about App Inventor and take a look at some sample apps. Finally, you can ask questions and get help by signing up for the App Inventor Google Group.
Thanks!
Google’s App Inventor Team
Any other Phandroid faithful receiving good tidings from Google today? For those unfamiliar with the App Inventor check out Google’s demo video below and prepare for an onslaught of “Hello World” and “Pet My Kitty” apps.
[thanks to Bas for tipping us off to this!]
"