Raphael-js-tutorial-part-II

This is the second part of the tutorial about getting started with Raphael.js. To see the first part go here.

Writing Text with Raphael

Some code first ;)

var canvas = Raphael(0, 0, 250, 250 );

var t1 = canvas.text(50, 50, *"Some text Goes here"*);

var t2 = canvas.text(60,90,"First line \n Second Line \n Third line");

var t3 = canvas.text(214, 140, "1079").attr({"text-anchor":"middle",'font-size':16,"font-family":"arial","fill":"#fff"});

In the above examples canvas.text will create a simple text element at 50,50. Strangely VML /SVG do not have Line breaks therefore the programmer is responsible for creating new lines, in most cases appending** ‘\n’** does the trick.

Read more →

Turn Off Autocomplete for Input

The autocomplete attribute specifies whether or not an input field should have autocomplete enabled.

Autocomplete allows the browser to predict the value from locally saved history/cache. When a user starts to type in a field, the browser should display options to fill in the field, based on earlier typed values.

Note: The autocomplete attribute works with the following types: text, search, url, tel, email, password, datepickers, range, and color.

example usage:

Read more →

Embedding Flash,Quicktime,Windows Media,Silverlight or HTML5 Video

Flash Object

This is a quick snippet which demonstrates how to embed a flash object in a web page.

<object type="application/x-shockwave-flash"
 data="path-to-my-flash-file.swf"
 width="0" height="0">
 <param name="movie" value="your-flash-file.swf" />
 <param name="quality" value="high"/>
</object>

Quicktime

This is a quick snippet which demonstrates how to embed a quicktime object in a web page

<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
      codebase="http://www.apple.com/qtactivex/qtplugin.cab"
      width="200" height="16">
<param name="src" value="pathToMyMovie.mov" />
<param name="autoplay" value="true" />
<param name="pluginspage" value="http://www.apple.com/quicktime/download/" />
<param name="controller" value="true" />
<!--[if !IE]> <-->
  <object data="movie.mov" width="200" height="16" type="video/quicktime">
    <param name="pluginurl" value="http://www.apple.com/quicktime/download/" />
    <param name="controller" value="true" />
  </object>
<!--> <![endif]-->
</object>

Windows Media

This is a quick snippet which demonstrates how to embed a Windows Media object in a web page.

Read more →

Mod Proxy equivalent in IIS using ARR and URL Rewrite Module

IIS7 is quite modular, it is shipped with lots of goodies as separate modules and together it is now one of the most powerful and flexible web servers.

In this post I intend to cover how we can easily configure ARR and URL Rewrite Module to get a similar functionality as of Mod Proxy in Apache.

Here I will demonstrate configuration of a reverse proxy which according to the definition is

Reverse proxy is a type of proxy server that retrieves resources on behalf of a client from one or more servers. A general use case to configure such proxies could be to handle cross domain Ajax requests, so basically if I would like to call a service hosted as http://anotherdomain.com/service from http://localdomain/service I would need to configure a proxy which will request resources from anotherdomain.com/service on behalf of localdomain ### Configuration

Read more →

Signing android release apk from the command line (via ant)

This post is probably out too late ,as almost all IDEs these days (which support android development) ,probably have an Integrated release signing or debug signing utility/wizard built in, but if somebody is using an old IDE or perhaps want to integrate release in a CI (continuous integration) environment, this tutorial might come in handy.

Basically one has to sign an apk either with a debug key (which is generally present in your .android folder) or create a fresh application-specific keystore, to know more go here

Read more →