Tuesday, June 26, 2012

DNS Changer Malware- its effects and how to secure your computer from this


ShareThis

DNSChanger Malware has been infecting computers from November last year.
The roughly half a million devices are still infected with DNSChanger.

Infected machines had their Domain Name System settings altered so websites would redirect to servers controlled by the criminals. The scammers reportedly earned millions in affiliate and referral fees by diverting users through those sites.

Computers affected with this Trojan will not be able to access Internet after 9th July.

If infected machines are not fixed by then, their Internet connections will go dark.
On Google, infected computers will see a warning atop their screen when completing a search (see below). 


  

Read more about this Malware and how to check whether your computer has been infected by this here in FBI’s Publication


Canvas vs. SVG


ShareThis

Canvas vs. SVG
With the advent of Canvas and SVG (scalable vector graphics), developers now have better choices for doing graphics on the Web than in the past.

Before Canvas, plug-ins such as Flash or Silverlight were the standard way to create animations on the Web. The alternative was to create a collection of good old-fashioned HTML, JavaScript and images, and bundle them into a collection of moving parts—a tedious task at best.

Two primary types of graphics are used on the Web:
·         Raster graphics are arrays of pixels arranged on a grid, also known as a bitmap. Common raster file extensions are .jpg, .bmp, .png, .tiff and .psd. Because Canvas uses pixels, it is raster based.
·         Vector graphics use mathematical metadata contained in a file to describe the graphic. The V in SVG stands for vector. Common vector file types are .svg, .eps and .xps.
Canvas and SVG have a few features in common. Both Canvas and SVG have an Open Source library ecosystem, and you never need plug-ins for either technology.

Side-by-side comparison of common Canvas and SVG characteristics.
Canvas
SVG
Single DOM element
Multiple DOM elements
Script language
Markup language
Raster graphics
Vector graphics
No file format
.svg file format
Must reset canvas to change drawn shape
Can edit shapes after drawing
Not accessible
Accessible
Doesn’t support event handlers
Supports event handlers
Non-searchable, can’t index
Searchable, can index
Non-compressible
Compressible
Can use hardware acceleration
No hardware acceleration

Canvas tends to be well suited for highly interactive games, especially when combined with Internet Explorer 9 GPU offloading.
Canvas is a great choice for image editing, and although you can’t edit , you can save the context state to allow the user to undo actions, essentially to do real-time editing.
SVG is great for graphic basics such as displaying a resolution-independent company logo that scales to any screen size without pixel distortion.
Fractals and Mandelbrot sets are just two types of complex data visualizations that are well suited for SVG.

Wednesday, May 16, 2012

HTML boilerplate code to start your mobile supported HTML project


ShareThis
Check out this HTML boilerplate code to start your mobile supported HTML project http://html5boilerplate.com/

Paper.js an excellent HTML5 vector drawing scripting library


ShareThis
I came across this excellent HTML5 vector drawing scripting library called paper.js.

Paper.js is an open source vector graphics scripting framework that runs on top of the HTML5 Canvas. It offers a clean Scene Graph / Document Object Model and a lot of powerful functionality to create and work with vector graphics and bezier curves, all neatly wrapped up in a well designed, consistent and clean programming interface.


See some wonderful examples here:
http://paperjs.org/examples/

Download source from here at github
https://github.com/paperjs/paper.js

Tuesday, May 8, 2012

Excellent JS playground to test your Java Script code with third party libraries


ShareThis

Found this excellent JS playground to test your Java Script code with different third party libraries
http://jsfiddle.net/
You can also save your code and share with the world, like this Knowckoutjs sample code:
http://jsfiddle.net/jimrhoskins/GCscS/2/
thanks!

-Sumit Pranav

Thursday, March 22, 2012

Generating Tag Cloud in ASP.net /C#


ShareThis
Tag Cloud or Word Cloud is used to show frequency of words or phrases on your website or in some content.
Here is what this Tag Cloud will look like:

//Add this code in your solution:

public class TagCloudGenerator
{
	public string GetTagCloudHTML(Dictionary<string, int> tagNameWithFrequesncies)
	{
		StringBuilder tagCloudString = new StringBuilder("");
		int highestFrequency = tagNameWithFrequesncies.Values.Max();
		int counter =1;
		foreach (string tag in tagNameWithFrequesncies.Keys)
		{
			string tagClass = GetTagClass(tagNameWithFrequesncies[tag], highestFrequency);
            //TODO: need to set proper URL where links should redirect to
			string targetUrl  = "http://abc.com/filter=" + tag;
			string tagItem = " + counter + "' class='" + tagClass + "'> + targetUrl + "'>" + tag + "";
			tagCloudString.Append(tagItem);
		}
 
		tagCloudString.Append("");
		return tagCloudString.ToString();
	}
 
	public string GetTagClass(int tagFrequency, int highestFrequency)
	{
		if(tagFrequency == 0 || highestFrequency ==0)
		return "tag0";
 
		var percentageFrequency = (tagFrequency * 100) / highestFrequency;
 
		if (percentageFrequency >= 90)
			return "tag90";
		if (percentageFrequency >= 80)
			return "tag80";
		if (percentageFrequency >= 70 )
			return "tag70";
		if (percentageFrequency >= 60)
			return "tag60";
		if (percentageFrequency >= 50)
			return "tag50";
		if (percentageFrequency >= 40)
			return "tag40";
		if (percentageFrequency >= 30)
			return "tag30";
		if (percentageFrequency >= 20)
			return "tag20";
		if (percentageFrequency >= 10)
			return "tag10";
		if (percentageFrequency >= 1)
			return "tag1";
 
// This is the required code to be placed in the Page where you want to generate Tag cloud 
protected void Page_Load(object sender, EventArgs e)
    {
        Dictionary<string, int> categoryTags = new Dictionary<string,int>();
        categoryTags.Add("Science", 100);
        categoryTags.Add("Maths", 80);
        categoryTags.Add("Biology", 190);
        categoryTags.Add("Physics", 70);
        categoryTags.Add("Commerce", 60);
        categoryTags.Add("Behavioral Science", 90);
        categoryTags.Add("Psychology", 40);
        categoryTags.Add("Numismatics", 43);
        categoryTags.Add("Philately", 45);
        categoryTags.Add("English", 28);
        categoryTags.Add("Hindi", 145);
        categoryTags.Add("Oriya", 40);
        categoryTags.Add("French", 10);
        categoryTags.Add("German", 9);
        categoryTags.Add("Sanskrit", 8);
        categoryTags.Add("Telugu", 20);
        categoryTags.Add("Kannara", 2);
        categoryTags.Add("Malyalam", 1);
        categoryTags.Add("Pongal", 0);
        categoryTags.Add("Earth Sciences", 90);
 
        tag.InnerHtml = new TagCloudGenerator().GetTagCloudHTML(categoryTags);
       
    }
// This is the CSS Style you need for rendering Tag Cloud
// Put this is the head section of your ASPX /HTML page 
<style type="text/css">
        
        .tagCloud
        {
            width:400px;
            height:auto;
            border:1px solid black;
            font-family:Arial;
            padding:10px;
        }
        
        .tagCloud span
        {
            display:inline-block; 
            vertical-align:middle
        }
        
        .tagCloud a
        {
            text-decoration:none;
        }
        
        .tagCloud a:hover
        {
            text-decoration:underline;
            background-color:Blue;
            color:White;
           
        }
        
 
        .tag0
        {
            font-size:0pt;
            padding:5px;    
        }
        
        .tag1
        {
            font-size:8pt;    
            padding:5px;    
            
        }
        .tag10
        {
            font-size:10pt;   
            padding:5px;    
             
        }
        
        .tag20
        {
            font-size:12pt;
            padding:5px;    
                
        }
        .tag30
        {
            font-size:14pt;
            padding:5px;    
                
        }
        .tag40
        {
            font-size:16pt;    
            padding:5px;    
            
        }
        .tag50
        {
            font-size:18pt; 
            padding:5px;    
               
        }
        .tag60
        {
            font-size:20pt;  
            padding:5px;    
              
        }
        .tag70
        {
            font-size:22pt;  
            padding:5px;    
              
        }
        .tag80
        {
            font-size:24pt;
            padding:5px;    
                
        }
        .tag90
        {
            font-size:30pt;
            padding:5px;    
        }
         
        
    style>  
return "tag0"; } }


Tuesday, November 29, 2011

unigo.com–One of the the Top ten Information website for colleges


ShareThis

I found a very interesting website that has authoritative information about most of the US colleges and universities - http://www.unigo.com/

Students and teachers have published voluminous content about the college and college life on this website. So this gives an insider story of the academic institutions.

USA Today says about Unigo-

"Millions of students have used Unigo to assist in their college search."

The NY Times says-

"One measure of an idea's greatness is how obvious it seems in retrospect... Unigo's college advice and reviews are vivid in a way no guidebook can match."

The Wall street Journal says-

"Unigo is a college resource built for the age of YouTube and Facebook."

Unigo has 50 times the college content of any book or website that already exists.

“An improved future for college planning ... offers fascinating slices of college life."

"One of the top ten college websites."

Monday, November 28, 2011

Tech Buzzwords that's selected as Words of the year - 2011 by Oxford Dictionary


ShareThis
  • Arab Spring: A series of anti-government uprisings in various countries in North Africa and the Middle East, beginning in Tunisia in December 2010.
  • Bunga bunga: Used in reference to parties hosted by the former Italian prime minister Silvio Berlusconi, at which various illicit sexual activities were alleged to have taken place.
  • Clicktivism: The use of social media and other online methods to promote a cause.
  • Crowdfunding: The practice of funding a project or venture by raising many small amounts of money from a large number of people, typically via the Internet.
  • Fracking: The forcing open of fissures in subterranean rocks by introducing liquid at high pressure, especially to extract oil or gas.
  • Gamification: The application of concepts and techniques from games to other areas of activity, for instance as an online marketing technique.
  • Occupy: The name given to an international movement protesting against perceived economic injustice by occupying buildings or public places and staying there for an extended period of time.
  • The 99%: The bottom 99% of income earners, regarded collectively.
  • Tiger mother: A demanding mother who pushes her children to high achievement using methods regarded as typical of Asian childrearing.
  • Sifi: A bank or other financial institution regarded as so vital to the functioning of the overall economy that it cannot be allowed to fail, a.k.a. “systemically important financial institution.”

Friday, November 18, 2011

SysInternal tools for Windows- Power Users


ShareThis

http://technet.microsoft.com/en-us/sysinternals

The Sysinternals web site was created in 1996 by Mark Russinovich and Bryce Cogswell to host their advanced system utilities and technical information. Whether you’re an IT Pro or a developer, you’ll find Sysinternals utilities to help you manage, troubleshoot and diagnose your Windows systems and applications.

These system tools are very productive and informative about the system. I personally use them and recommend every techy user to use them.

Wednesday, November 16, 2011

Does your copy paste stops working with remote desktop? Hers is the solution...


ShareThis

A very annoying occurrence that I sometimes suffer is when all of a sudden the copy and paste function stops working when I am connected to a remote machine.

Turns out the problem is coming from a little process called rdpclip.

Rdpclip (remote desktop clipboard) is responsible for managing a shared clipboard between your local host and the remote desktop (the process runs on the remote machine not your local host).

So here is the solution:

On the remote machine-

  • Use Task Manager to kill the rdpclip.exe process
  • Run rdpclip.exe to restart it

Or alternatively, Create a batch file with the following command and run it when this happens:

Taskkill.exe /im rdpclip.exe
Rdpclip.exe

Hope this helps! Smile