COME, CLICK WITH US 
 OMNIA CONNECT BLOG

Archive for August, 2009

Twitter Connection Visualisation Experiment

Monday, August 31st, 2009

We have taken Twitter users from the UAE and visualised their connection between each other. The below graphs show user nodes and connection lines to the accounts they follow. The first graph shows a snapshot of 200 users within the UAE and the second one shows the connections of 1200 users within the UAE.

Twitter Visualisation 200 User UAE1000_users

Twitter user statistics for UAE

Wednesday, August 26th, 2009

The below figures show some statistics of the current Twitter user base in the UAE. The data was collected on the 25th of August 2009 and represents a sample snapshot of user activity.

We counted 1260 active users on August 25th 2009. Active means users that actually “tweeted”.

The users evaluated had

  • average followers per users 192
  • average following count 180
  • average updates per user (all time) 438

From the users evaluated above we had a look at when they joined the service:

Twitter user growth UAE

Twitter user growth UAE

Interesting that over 80% joined Twitter in 2009.

We will continue taking data samples and post them here in the future.

Lavalamp effect with jquery easing plugin

Tuesday, August 11th, 2009

Here’s a small Javascript function which enables animated highlighting effect on the navigation (lavalamp effect) with the help of jquery easing plugin

$.fn.lavalamb = function(ImgPath){
/* ImgPath:  Path of the image which you need to animate when you hover over a navigation link
   this can be a shadow png image or a pointer image or underline image which you want to animate with a mouseover / mouseout action on a link

   Add css class "Highlight" to the node which is currently active, so the image will always be animated back to this node on mouseout
*/
var LeftPos;
$(this).append('<div id="lavalamp"><img src="'+ImgPath+'" alt="" /></div>'); //Appending lavalamb image to the html, this div can be skinned in the css.
$(this).parent().css({position: "relative"}); //setting the position
$("#lavalamp").css({
position: "absolute",top: $(this).height() // These css values can be edited to vertically position the lavalamb image
});
  $(this).find("li").hover(  //Link hover function
function(){ 	//Rollover
LeftPos = $(this).offset().left - $(this).parent().offset().left; //calculating the left position
LeftPos = (LeftPos - ($("#lavalamp").width()/2) + ($(this).width()/2)); //calculating the left position
$("#lavalamp").animate({left: LeftPos},{queue:false,duration:700,easing: "easeInQuart"}); //Animating the image from the start position to the current mouseover position
},
function(){
   LeftPos = $(this).parent().find("li.Highlight").offset().left - $(this).parent().offset().left; // Getting the position of the highlighted node
 	 $("#lavalamp").animate({left: LeftPos},{queue:false,duration:700,easing: "easeOutQuart"}); //Animating the image back to the start position from the current mouseover position
  });
}

And call this function in the html page

<script type="text/javascript">
$("#Navigation").lavalamb("Images/Background/NavShadow.png"); // Navigation is an id of the <UL> list which has navigation nodes
</script>

lavalamb
Here’s an example
Example1

Javascript sound manager API

Thursday, August 6th, 2009

Browsers lack good, consistent native audio/video support. (HTML 5’s audio and video are on the way, but not universal yet.)
Here’s Sound Manager 2, a nice Javascript API via Flash + ExternalInterface to add audio & video to your website.

http://www.schillmania.com/projects/soundmanager2/doc/getstarted/#intro

Demo Audios
http://www.schillmania.com/projects/soundmanager2/demo/page-player/

Demo Videos
http://www.schillmania.com/projects/soundmanager2/demo/video/

here is a live example …
http://paris.conciergerie.com/

Top 100 websites of 2009

Tuesday, August 4th, 2009

Yes Youtube is no more #1 (19th!)

Check out the full listing on PCMag (thanks Hammad)

Adding Service References and ‘The system cannot find the path specified’ error

Tuesday, August 4th, 2009

I was facing this problem recently in a project when adding a reference to a WCF Service simply gave me this error.

wcferror

I google’d it for a while but in vain, I also removed the auto-gen service entries from the web.config but that did not work either.

Then I realized that earlier I had deleted the Service References folder from the application root, re-add and it worked as expected.

Funny thing is that Visual Studio will not tell you what went wrong, neither folder name appears under Add > ASP.NET Folders nor Visual Studio attempts to recreate it.

Skinning HTML form elements

Sunday, August 2nd, 2009

It’s always a pain to skin the normal radio/checkboxes and the select lists by using CSS.
I was doing some research on this and figured out a way using javascript/css. I put the functions together in a small jquery plugin.

My idea was to customize the radio/checkbox/listboxes without disturbing the actual markup.
The solution makes use of real radio buttons with labels and their toggle functionality and skinned list-items, allowing radiobutton list rendering and easy skinning.

skindefault

In the above form thre are a few dropdown lists, radio button and checkboxes. The markup looks like

 <fieldset class="Dropdown">
	<select class="NonJsSelect">
	 <option>List Item 1</option>
	 <option>List Item 2</option>
	 <option>List Item 3</option>
	 <option>List Item 4</option>
	 <option>List Item 5</option>
	 <option>List Item 6</option>
	 <option>List Item 7</option>
	 <option>List Item 8</option>
	 <option>List Item 9</option>
	 <option>List Item 10</option>
	 <option>List Item 11</option>
	</select>
 </fieldset>
 <p><strong>Checkbox controls</strong></p>
 <fieldset class="CheckList">
 	<input type="checkbox" id="CheckBox1" class="Checkbox" />
 	<label for="CheckBox1">Checklist 1 value </label>
 </fieldset>
 <fieldset class="CheckList">
 	<input type="checkbox" id="CheckBox2" class="Checkbox" />
 	<label for="CheckBox2">Checklist 2 value </label>
 </fieldset>
 <fieldset class="CheckList">
 	<input type="checkbox" id="CheckBox3" class="Checkbox" />
 	<label for="CheckBox3">Checklist 3 value </label>
 </fieldset>

Just wrap your controls in a <fieldset> or a <div> and add css classes “Dropdown” for comboboxes and “CheckList” for radio/checkbox controls as shown above.

Download the css/javascript files then add the javascript javascript css references to the page.

Finally just initiate the javascript function

&lt;script type=&quot;text/javascript&quot;&gt;
$.function(){
 $(&quot;select&quot;).AddSkin();
 $(&quot;.Checkbox&quot;).AddSkin();
//you can reference the controls by its name, id or css class just like any other jquery calls.
}
&lt;/script&gt;

skin_1
You can change the skin by editing the CustomControls.css and replacing the images.

here’s an example

Try it out!

You can download the sample code and plugin from here.

Note: The plugin currently supports only Dropdown, checkbox and radio button controls.
I order to make this work you have to include the latest jquery library.

LINQ To SQL Very Slow Performance

Sunday, August 2nd, 2009

Interesting article by Perter Keller, shows how you can get drastic speed improvement by compiling LINQ Queries using System.Data.Linq.CompiledQuery Class in .NET. You can find a complete performance test and sample code, please follow the link  http://peterkellner.net/2009/05/06/linq-to-sql-slow-performance-compilequery-critical/