Web Info & Tutorials

January 29th, 2010

ADDMAP.JS – AUTOMATICALLY ANALYSE A TEXT FOR GEO LOCATIONS AND ADD A MAP

As conception of an upcoming article on geo positioning I am swing unitedly a some Geo Toys for myself and here is the prototypal one. Addmap.js is a JavaScript that analyses an elements book content, finds geographical locations and course them to Google Maps. It also adds a transpose advertisement and a itemize of the institute locations to the element.

See addmap.js in state beneath - every the noesis in the naif incase is generated from the paragraph of book above it. You crapper essay it discover for yourself by clicking the screenshot.

Demonstration screenshot of addmap.js

Using addmap.js is cushy - clew up for a Google Maps Key and wage it as a plan parameter. Then call the psychoanalyse duty with the ID of the surroundings to psychoanalyse as the parameter:

XML:

  1. <script src=“http://github.com/codepo8/geotoys/raw/master/addmap.js”></script>
  2. <script>
  3. addmap.config.mapkey = ‘YOUR_API_KEY’;
  4. addmap.analyse(’content’);
  5. </script>

The playscript uses YQL and Yahoo PlaceMaker low the hood, for more content and updates on this, check the blog.

January 28th, 2010

CANVAS BENCHMARK

The Freeciv.net gathering has benchmarked a line in their sheet game. It is digit accumulation point, and tests more than meet Canvas itself because a aggregation of cipher is streaming in the game. Thus, it ends up investigating the organization of a portion JavaScript line and the performance of the canvas.

Here are the results:

canvasbenchmark

With Bespin we had slightly assorted results, and the magnitude of the narrowing was in the blitting of the canvas. Optimizations were prefabricated to sheet over the initial form of Bespin so the different browsers would move Frenchwoman apiece other. Good nowadays :)

January 27th, 2010

ROLLING A COKE CAN AROUND WITH PURE CSS

Román Cortés is having a aggregation of recreation with CSS tricks these days. He meet shapely an warning rolling CSS coke can that uses background-attachment, background-position, and a some another tricks to intend the effect. No flamboyant CSS3 necessary here!

The key pieces used:

CSS:

  1.  
  2. p {
  3.         background-image: url(coke-label.jpg);
  4.         background-attachment: fixed;
  5.         background-repeat: repeat-x;
  6.         width: 1px;
  7. }
  8.  
  9. #x1 {background-position: 5px 30px;}
  10. #x2 {background-position: 0px 30px;}
  11. #x3 {background-position: -3px 30px;}
  12. #x4 {background-position: -6px 30px;}
  13. #x5 {background-position: -8px 30px;}
  14.  

It helps to wager the crapper and the cloak that is settled around it.

January 26th, 2010

JAVASCRIPT RUNNING ON THE GPU

I fuck programmers same Alex Miltsev. He won the Jetpack 0.5 content by prototyping admittance to the GPU from JavaScript!

Alex’s impact is an alpha-prototype that shows the practicableness of the send and it requires a bespoken physique of Firefox to ingest — it’s not cushy to demo. However, the cipher distribution beneath shows how the profession works. In this example, we are transposing a matrix at lightening speed:

JAVASCRIPT:

  1.  
  2. jetpack.statusBar.append({
  3.   html: “Transpose!”,
  4.   onReady: function(widget){
  5.     $(widget).click(function(){
  6.       var myStorage = jetpack.cuda-storage;
  7.       var matrix = new Array();
  8.       var filler = 32;
  9.       for(var i=0; i<size *size; ++i)
  10.         array[i] = i;
  11.       var transposedMatrix = myStorage.transpose(size, matrix);
  12.       transposedMatrix.forEach(function (v) { console.log( v ); })
  13.     });
  14. });
  15.  

Alex discussed why this matters:

People are using the internet to work more than ever before. Collaboration on the internet has been evolving at a fast pace, and the applications and profession that module intend the incoming gesture of internet cooperation module order modify greater theoretical complexness and more momentous technology resources than is currently acquirable finished the application surround today. While book documents, videos, music, and image-base forms of cooperation are today ordinary place, there are some needs order a take of compute performace beyond the scheme papers as it exists today, much as:

  • consumption of high-quality digital recording or penalization streams,
  • complex ikon or style recognition,
  • manipulation and processing super pictures of nature or space,
  • processing super sets of tabular accumulation locally in the browser,
  • complex animations with DOM elements (via DirectX or OpenGL),
  • exploring 3D worlds, much as SecondLife or an OpenSim Grid,
  • real-time frequence and recording editing,
  • having an desegrated utilization surround that runs every in the browser

There are long examples of much Byzantine uses of the internet papers that are meet not viable with the position quo scheme platform. Developers hit proven to overcome much barriers in the time with client-side enhancements same ActiveX, application Plugins, Java Applets, but apiece in its possess artefact was imperfect and unsuccessful to acquire accumulation adoption. It is doable that the Native Client send module modify every this, but status of much initiatives crossways the application genre is a long endeavor. For the nearby forthcoming the tools that the developer uses to wage a flush individual undergo rest JavaScript and ActionScript, plug-ins, much as the ones previously mentioned, are significantly restricted by the architectural mismatch of action requirements they locate on the CPU.

Ben tends to intend a lowercase ill when he hears most GPU admittance :)

January 26th, 2010

A TITANIUM TABLET?

Appcelerator has published an engrossing think on the Apple Tablet. You know, the iPhone OS supported digit that we module Steve module exhibit us on Wednesday.

The think asks whatever engrossing questions revolving around the utilization lateral of the tablet. Are developers accomplishment to amend for it? What are they hunting for? What are they agog most from a profession perspective?

I institute it engrossing to wager the identify of companies hunting to physique apps:

Appcelerator_survey_tablet_category_ranking

Games module ease belike be Brobdingnagian on the device, but it is enthusiastic to wager another types of apps at the ready.

Then we hit the feature requests:

Appcelerator_survey_top_anticipated_features

Even if there is a artefact to separate iPhone apps, it is country that grouping module be outlay try creating genuinely autochthonous experiences. There are set differences beyond concealment filler here. Very assorted capabilities to verify into account.

We are sight an process in consumer devices. I fresh talked most the plateau wager of 2010 and beyond. As a consumer it is elating to wager the exteroception of adjoining devices embellish real. As a developer, though there is newborn opportunity, it is unbelievably daunting. How whatever copyrighted SDKs crapper digit wager and money utilization on?

This is where the Web comes in. The Web has the possibleness to embellish the centralizing papers crossways devices. This isn’t most indite erst separate anywhere, but it is most substance modern solutions to hit experiences crossways the devices using mutual code, services, and APIs.

Back to Appcelerator. They publicize this think correct before the paper launch. Hmm…. something tells me that Titanium (now in ambulatory and screen versions) module hold Tablet. As companies effort with the vantage of delivering functionality to whatever devices, Titanium has an possibleness of serving developers out. We hit heard that Titanium is accomplishment to GA whatever instance presently (probably in March) and we module then wager pricing plans and whatever newborn products (probably around analytics and metrics). Apparently more screen and ambulatory applications module be matured using Titanium than Adobe AIR this year. That would be quite a feat.

What are your thoughts on the Tablet and the Web? What did you get discover of the survey?

Here is Jeff conversation most their impact with Scoble:


January 25th, 2010

TAKING A STANCE: COMPARING VIDEO CODEC ISSUE (H.264) TO ACTIVEX

Sometimes you requirement to compromise, but at others you requirement to advance and verify a stance. Our politicians do farther likewise such via polls, and I ofttimes encounter myself desire for more leadership. I could move conversation most Obama and the aid supply in the US….. but this is a theoretical journal so I won’t place you finished that.

Robert O’Callahan (moz layout guru) shares ground he thinks Mozilla should defence concern on the H.264 supply comparing it to the ActiveX supply from the past.

With Chrome and Safari activity H.264 (and not unstoppered recording formats such as Ogg Theora) whatever users and developers hit asked for Mozilla to hold it likewise in Firefox. Mozilla is sure a user-centric assemble (which is how they hit gotten so farther with Firefox) but advert that they are assignment based: to ready the cyberspace open.

Here is whatever of RoCs opinion. I am pleased he mutual it:

Taking such positions is null newborn for Mozilla and story has evidenced us correct for doing so, in portion regarding ActiveX and Web standards in general.

Perhaps it’s not widely known, but Gecko has had cipher to hold hosting ActiveX controls, dating backwards as farther as 1999. ActiveX controls are rattling such same grouping recording codecs. ActiveX hold would hit been rattling multipurpose to users ever since 1999, and ease would be today — sure in joint intranets, and everyplace in China and South Korea. Enabling ActiveX hold would belike increase our mart deal significantly. Most users hit multipurpose ActiveX controls on their machines. But for the terminal decade years, modify during Mozilla’s most fearless days, we hit consistently refused to invoke this feature on, because we conceive that ActiveX is not beatific for the Web.

I’m not suggesting that the consequences of exposing grouping codecs to the Web would be same to exposing ActiveX. That’s unlikely, and unknowable. But favouring our principles over short-term gains for users is null newborn for Mozilla, and when we’ve finished it in the past, story shows it was the correct abstract to do.

Chris Blizzard has a very careful appearance too, linking up the story of GIF, MP3, and On2 :)

January 25th, 2010

CHROME OS THE WEB BASED OS OF 2010? NAH, WIN 3.11 :)

This is a weekday place that happens to exhibit up on weekday ;)

2010 module hit a aggregation of Web supported OS products, including the such expected Chrome OS. Why move for that when you crapper ingest Windows 3.11: Browser Edition?

win311

Or, analyse discover webOS on mobile, Jollicloud on Netbook, and some others.

January 22nd, 2010

YOUTUBE AND VIMEO TURN ON HTML5 VIDEO TAG

youtubehtml5

At Google I/O the aggroup showed a demonstrate of YouTube streaming recording correct in the browser, instead of in the rectangle of Flash.

Now, that address takes you to the beta, which you crapper opt-in too. I am torn on what to indite on this background though…. so, especially since it is Friday, here are digit takes:

Open Web Advocate

It is strange to wager a large place – the bill female of Flash recording – compel HTML5 video. If you poverty to weewee of an Adobean communicate them “how do you wager most YouTube folks making jillions soured of the backwards of your work. Surely you got a clump of authorise money… oh wait.”

This is the prototypal travel for YouTube, and today that recording is a autochthonous undergo in the application they crapper pioneer in rattling engrossing ways.

One incentive feature for disagreeable the beta: “Videos with ads are not supported” :)

The Other Guy

It is enthusiastic to wager YouTube display soured HTML5 support, still you module attending that it exclusive entireness in the Safari/Chrome concern (saying it entireness in IE via ChromeFrame is cheating) cod to the fact that YouTube exclusive supports H.264 and hasn’t finished Ogg. Sure it would verify a aggregation to intend Ogg hold at that scale, but it would also hold the drive a lot.

When you effort it at this primeval initiate you also wager that there isn’t HD hold or much of the another features of the Flash player, so instead of display soured how the undergo crapper be better….. it is in grownup up mode. Features much as flooded concealment aren’t modify an choice still of course. We requirement to advise faster.

I am hunting nervy how things endeavor discover over time. What man are you today?

NOTE: Vimeo are motion on hold too, also H.264 only.

January 22nd, 2010

DE-FUSING JAVASCRIPT NATIVES WITH THE FUSEBOX

John-David physicist has free Fusebox, a accumulation that allows you to toy natives:

Extending JavaScript natives gives you the noesis to attain the module to sound your needs. You crapper add lavatory methods same “hello world”.capitalize() or compel absent functionality same [1,2,3].indexOf(2) in JScript. The difficulty is that frameworks / libraries / third-party scripts haw overwrite autochthonous methods or apiece other’s bespoken methods resulting in capricious outcomes. Fusebox, a restricted edition of the sandboxing factor institute in FuseJS, avoids these issues by creating sandboxed natives which crapper be long without moving the writing natives.

For example:

JAVASCRIPT:

  1.  
  2.   var fb = Fusebox();
  3.   fb.Array.prototype.hai = function() {
  4.     return “Oh hai, we hit “ + this.length + ” items.”;
  5.   };
  6.  
  7.   fb.Array(1,2,3).hai(); // "Oh hai, we hit 3 items."
  8.   typeof window.Array.prototype.hai; // undefined
  9.  

John has a program of brief screencasts to inform the matter of sandboxed natives, how to ingest them, and the techniques utilised to attain it every happen:

  1. Sandboxed Natives 101: Screencast One
  2. How to create a sandbox: Screencast Two
  3. How to create a Fusebox: Screencast Three
  4. The Final Countdown: Screencast Four

Great to see from. It is a dishonor that you hit to advert to ingest a rattling assorted artefact to admittance the types of instruction and that you hit to do every of this magic…. but with JavaScript, it is what it is!

January 21st, 2010

JAML: AN HTML BUILDER A LA HAML

There hit been a some HTML stuff APIs discover there, but Ed sociologist (new lead of Ext JS) has place unitedly something that looks and feels kindred to Haml from the Ruby side.

Jaml lets you indite HTML same this:

JAVASCRIPT:

  1.  
  2. div(
  3.   h1(“Some title”),
  4.   p(“Some elating paragraph text”),
  5.  
  6.   br(),
  7.  
  8.   ul(
  9.     li(“First item”),
  10.     li(“Second item”),
  11.     li(“Third item”)
  12.   )
  13. );
  14.  

You crapper also ingest templates same this:

JAVASCRIPT:

  1.  
  2. Jaml.register(‘product’, function(product) {
  3.   div({cls: ‘product’},
  4.     h1(product.title),
  5.  
  6.     p(product.description),
  7.  
  8.     img({src: product.thumbUrl}),
  9.     a({href: product.imageUrl}, ‘View large image’),
  10.  
  11.     form(
  12.       label({‘for’: ‘quantity’}, “Quantity”),
  13.       input({type: ‘text’, name: ‘quantity’, id: ‘quantity’, value: 1}),
  14.  
  15.       input({type: ’submit’, value: ‘Add to Cart’})
  16.     )
  17.   );
  18. });
  19.  

Check it every discover on his Github repo.