Thursday, July 28, 2011

Turn Your Webcam Into a Credit Card Reader


Payment startup Jumio revealed a new technology Tuesday that turns a standard webcam into a secure credit card reader.
The technology, called Netswipe, uses secure video streaming to recognize and verify credit card information. Hold a credit card up to the camera, wait for it to initialize and then enter the 3-digit CVN number.
We think Jumio’s ideas are interesting, and for businesses that have a hard time with traditional payment processors or for consumers who are iffy about typing their credit card details into a form, this might be a solution.
SEE ALSO: How Mobile Payment Systems Are Redefining Commerce
We have to wonder though how much traction this idea will really have. Credit card readers were once built into computer keyboards and that trend never took off, partly because convincing businesses to adopt alternate payment technologies is difficult.
Still, for online purchases, this could be a better, potentially faster and safer way to make payments.

Hot IT Jobs...


Hot Jobs Today

On  


[+] Wipro,Infosys,Tech Mahindra,CTS Recruiting. Apply
[+] Zenith Infotech Walk-in For Fresh & Exp Support Engineers Apply
[+] Rolta India Recruiting M.Tech Freshers Apply
[+] Wipro Infotech Recruiting SAP Trainees (0-2 Yrs.) Apply

[+] Ford Technology Services India (FTSI) Recruiting Trainee – Software Engineers Apply
[+] ECIL Recruiting Graduate Engineer Trainee (GET) : 126 posts Apply
[+] NHPC walk-in for engineers and junior engineers Apply
[+] An opportunity in SAIL for 375 Management Trainees(Technical & Administration) Apply
[+] Motorola Recruiting Fresh B.E\B.Tech\MCA Apply
[+] Urgent requirement of Sales Engineers-Mechanical Apply
[+] Genpact Walk-in for Tech Support-Process Associate/Developer – 75 Opening(s) Apply
[+] NIC( Govt. of India) Recruiting 62 Scientific Officers/Software Engineers Apply
[+] Cambridge Solutions Walkin – Mainframes Certified Fresher – 2010 & 2011 Apply
[+] Cisco Systems- Fresh Graduate Engineer Hiring Apply
[+] CTS walk-in for C++ UNIX Developers on 16th july Apply
[+] Times Group Hiring Trainee J2EE Developers Apply
[+] CTS Recruiting Project Associates(0-4 Yrs.) Apply
[+] Openings at aspire systems, chennai Apply

Facebook Makes It Easier to Opt Out of Facial Recognition Tagging Feature



facebook_150_logo.jpgFacebook is treading carefully with its facial-recognition "tag suggestion" feature and now is making it easier for users to opt out of the feature according to Connecticut Attorney General George Jepsen, via Bloomberg. When last we heard from Facebook's facial recognition feature it had just been opened released as a global feature but remained opt out as opposed to opt in, upsetting many users and privacy advocates across the world.
According to Bloomberg, Jepsen said that Facebook will begin running online ads today that link users to their privacy settings, allowing them to opt out of the service. Have you seen the ads to which Jepsen refers? Have you or will you opt out of the "tag suggestion" feature?
Inbound-writer enables you to optimize the content of your website or blog to drive better business results. It makes it easy to understand what your audience is reading, sharing and discussing. It's like a personal writing coach. You'll get guidance on how to write killer content to boost traffic from search engines and social media sites. Optimize up to 8 documents each month for free. Sign up now.
Ad powered by BTBuckets
Facebook does not tag people in photos automatically. It tries to recognize when people are in photos and suggests that users tag them. What upsets privacy advocates and government regulators like Jepsen is that Facebook has been sharing personal information by default. Facebook reportedly gave Jepsen assurances that the facial recognition software was used purely in the suggestion feature and that it was not a way for other users to glean more information from user profiles.
Facebook users upload more than 100 million photos to the platform on a daily basis. A company called Divvyshot and founder Sam Odio were acquired by Facebook to help institute the facial recognition feature. Odio, the product manager for photos, left Facebook in June to create a new company called Freshplum.
Bloomberg also reported that Jepsen responded to problems with impostor accounts, making it easier to report and delete them. Facebook added "new language and links to a contact form to help users trying to report an impostor or fake profile." Part of Google Plus's trouble around using real names and not allowing brands on the platform at first had to do with authentication and dealing with potential impostor accounts.

Tuesday, July 26, 2011

Delegate :C# ( Digging , Explain , Use it)

Delegate in C# (Digging and explain internals of Delegate)

Overview

.NET provides one nice characteristic that is delegate. Delegate is an object or instance which can hold reference of any function OR which can bind function. Referenced function may be static or any class object’s function. This can hold more than one function references. This also provides callback method. Developer’s perspective Delegate is two type single cast and multicast.
Every delegate base class is System.MulticastDelegate. System.MulticastDelegate class is inheriting from delegate class. Both classes are abstract class.
.NET provide standard constructor as follows:
Constructor for MultiCastDelegate : protected MulticastDelegate(object target, string method);
Constructor for Delegate : protected Delegate(object target, string method);

Declare Delegate

Declaring of the delegation is quite tricky, because when we declare delegation. We inform the compiler which kind of function signature’s reference could be hold by this delegate. Let’s explain by following: Fig-1.0  
Look at FIG-1.0:
 
  1. public is Access modifier .
  2. delegate is keyword which indicates this is delegate type.
  3. Return type of function signature.
  4. Delegate class name. (Explain below).
  5. Parameter of function signature.
  6. Parameter of function signature
3,5,6 are optional. Because these are depending on function signature, which function type we want bind or wrap with delegate.
Lets one more example:  protected delegate string DelegateReverse (string StrText) ;
It means this delegate class object can bind a function which function return type should be string with one string parameter. DelegateReverse is delegate class name.
Question:   Look at Fig-1 DelegateFunction what is this?  Is this is an object or name of the delegate.
Answer:  This is sealed class. Look following example then we describe
//Code Sample - 1.0

using System;
using System.Collections.Generic;
using System.Text;
namespace DelegateCode
{
   class DelExample
    {
       // Delegate declaration.  
      public delegate string StringOperation(string myString);
        static void Main(string[] args)
        {
            // Create instance of class for accessing its function
           DelExample objEx = new DelExample();
                    // create instance of Delegate Class 
           StringOperation Objdelegate = new      StringOperation(objEx.MyOperationReverseString);
                 // Call delegate object and store result in appropriate variable
           string result = Objdelegate("ABC DEF GHI");           
          // Get Type
            Type Tp = Objdelegate.GetType();
        // Output 
         Console.WriteLine("Is this Class : " + Tp.IsClass.ToString()+ "\n");
         Console.WriteLine("Inherit from : " + Tp.BaseType.ToString() + "\n");
         Console.WriteLine("Is Abstract : " + Tp.IsAbstract.ToString() + "\n");
         Console.WriteLine("Is ByRef : " + Tp.IsByRef.ToString() + "\n");
         Console.WriteLine("Is Sealed : " + Tp.IsSealed.ToString() + "\n");
         Console.WriteLine("Output of Delegate : " + result+"\n");
         Console.WriteLine("Output by Invoke : " + Objdelegate.Invoke("ABC DEF GHI"));
         Console.Read();
        }
        // definition of the function MyOperationReverseString
        public string MyOperationReverseString(string test)
        {
            char[] Spl = test.ToCharArray();
            test = string.Empty;
            for (int icnt = 0; icnt < Spl.Length; icnt++)
            {
                test = Spl[icnt] + test;
            }
            return test;
        }
    }
}
 
Output of this program Fig – 2.0
Consider Fig – 2.0 output.  In the above code the following line
public delegate string StringOperation(string myString);
StringOperation is sealed Class. This inherited by System.MultiCastDelegate and not is abstract.
Look last two lines of output. We can call delegate by invoke method or by passing parameter without invoke method. 

How C# Compiler Understands

Whenever compiler encountered delegate declaration like:
public delegate string StringOperation(string myString);
Then compiler generate following code:
public sealed class StringOperation: System.MulticastDelegate
{
  public StringOperation (object target, int method);
  public virtual void Invoke(string myString);
  public virtual IAsyncResult BeginInvoke(string myString,
  AsyncCallback callback, object obj);
  public virtual void EndInvoke(IAsyncResult result);
}
 
Look Program-1 IL-DASM view (Fig-3.0)
You can see .ctor: void (Object ,native int) ( This is similar constructor asSystem.MulticastDelege constructor.)
Invoke method should have same signature of the referenced function 

History Delegate Cannot Declare and Use as Field

//Code Sample – 2.0:
namespace DelegateExample
{
   public delegate string MyDelegate(string myString);
    interface MyCallable
    {
        int GetInfo();
delegate int CalcArea(int x, int y); // Error : interfaces cannot declare types      
MyDelegate ObjDelegae; // Error : Interfaces cannot contain fields    
    }
  }

//Code Sample – 3.0:
public void DispachCall(int tStr)
        {
           public delegate string MyDelegate(string myString); // Error          
            
           
        }

History Difference b/w Single and Multicast Delegate

Developer’s perspective Delegate is two type single cast and multicast. Although ".NET" has provides two classes for the delegate. 
Singlecast delegate vs Multicast delegate have not any declaration and implementation differences. This is only perspective.  
Even I read more articles related delegate, they told Multicast delegate cannot wrap / bind a function which returns value. But I never seem like this.
  1. Delegate class ( Abstract class).
  2. MulticastDelegate (Abstract class inherited by Delegate class).
Every delegate in the .NET is Multicast delegate. Then…
Question : So what is Singlecast Delegate ?
Answer: If delegate object have only one function’s reference then its call single cast delegate. If delegate object references more than one functions this called MulticastDelegate
When delegate object refer or bind multiple functions references then all functions reference store as linked list.  All functions will call in sequence as they assigned.
Example : let’s we have delegate object  ObjDel.
ObjDel bind or wrap three functions in sequence respectively Add , Mul , Divide. All three functions return integer type.
Let’s calling delegate:
Int result = ObjDel.invoke(15,5); It will return 3.
If function wrap in sequence Add, Divide, Mul.
Result = ObjDel.invoke(15,5). It will return 75.
It always returns the value of last function. So what about the other function return values ?

Keypoint: 

If any delegate object bind or wrap 5 return type functions. Then only 5th functions will return value but rest 4 functions could not return value. So always end of calling function return value. Rest 4 functions return value will ignored.

Delegate Asynchronously

Note : Simple overview for delegate as asynchronous call. More explain in next article 
Recall Fig-3.0 there is IL-DASM view. StringOperation delegate have Invoke and BeginInvoke function. These two functions created by compiler at run time.
In C# we can achieve asynchronous function call using delegate.
By default every function in the C# is the synchronous. But we can call synchronous function as asynchronous.
The Invoke method calls the target method on the current thread. But BeginInvoke method is called with different thread, the common language runtime (CLR) queues the request and returns immediately to the caller.
BeginInvoke can call by only single cast delegate otherwise its get run time exception (ArgumentException) is “The delegate must have only one target”.

About BeginInvoke

.NET implements BeginInvoke function for each Delegate class. So whenever compiler encountered delegate declaration its implement three method for each delegate class. 
Invoke, BeginInvoke and EndInvoke. Each BeginInvoke have corresponding EndInvoke.

Key Point

Always call EndInvoke to complete your asynchronous call does not matter technique of the calling.
BeginInvoke have three parameters. BeginInvoke return IAsyncresult
S.No

Description
1.parameters of the function which calling

2.AsynchCallback. delegate void AsyncCallback( IAsyncResult ar );
3.
System.Object

AsyncCallback (IAsyncResult  Ar).

Key Point

IAsyncresult is using for monitoring and state or progress of the asynchronous function call. This is return by BeginInvoke and it is also parameter for AsyncCallback function. Its declaration is.
public interface IAsyncResult 
{ 
    object AsyncState{ get; } 
    WaitHandle AsyncWaitHandle { get; } 
     bool CompletedSynchronously { get; } 
    bool IsCompleted { get; } 
}

Key Point

Call delegate using Invoke method. Then it’s run at same thread.
Look at following simple code. I called same delegate using Invoke and BeginInvoke method. And write thread ID for both call.

Code Sample – 4.0

using System;
using System.Threading;

namespace TestMultipuleDelegate
{
    class MultiCastTest : TestMultipuleDelegate.IMultiCastTest
    {

       delegate int Calc(int x, int y,out int id);
       
        static void Main(string[] args)
        {

            int thid = 0;
            MultiCastTest ClObj = new MultiCastTest();

            Calc objCalc = new Calc(ClObj.Add);    
           
                      
            // Get current thread ID
            thid = AppDomain.GetCurrentThreadId();

            Console.WriteLine("     ");
            Console.WriteLine(" Main Application Thread ID : " + thid.ToString()); Console.WriteLine();
            
            // Call delegate by Invoke method (synchronous call 
            int Result = objCalc.Invoke(8, 8, out thid);

            Console.WriteLine("Invoke method completed "); Console.WriteLine();
            
            // Call delegate by BeginInvoke : Asynchronous call 
            IAsyncResult rs = objCalc.BeginInvoke(234, 6, out thid, null,null);
           
            Console.WriteLine("Begin Invoke has been start."); Console.WriteLine();
          //  Calling continue Mul funtion along Main thread.
            Console.WriteLine( "Resule Mul " + ClObj.Mul(10, 8).ToString());
            // Waiting till completed the Asynchronous call completed.
            while (rs.IsCompleted == false)
            {

                Console.WriteLine("On processing..."); Console.WriteLine();
                Thread.Sleep(1000);
            }
           //// Get the result of Asynchronous ,calling functions
           Result = objCalc.EndInvoke(out thid,rs);
            Console.WriteLine("Result : " + Result.ToString()); Console.WriteLine();
            Console.WriteLine("Process completed"); Console.WriteLine();
            Console.ReadKey();
        }
       
        public int Add(int x, int y,out int thid)
        {
            
            Console.WriteLine("In side Calling function Add  : "); Console.WriteLine();
            // Get calling function thread ID
            thid = AppDomain.GetCurrentThreadId();
            Console.WriteLine(" Calling function Thread ID : " + thid.ToString());
            Console.WriteLine();
            Thread.Sleep(1000);
            return x + y;
        }

        public int Mul(int a, int b)
        {
Console.WriteLine("Inside Multipule function thred ID. "+     AppDomain.GetCurrentThreadId().ToString()); Console.WriteLine();
            return a*b;
        }
                        
    }
}

// Another .CS file
using System;
namespace TestMultipuleDelegate
{
    interface IMultiCastTest
    {
        int Add(int x, int y, out int thid);
        int Mul(int a, int b);
    }
}
 
Fig – 4.0 ( Code Sample – 4.0 outputs)
We can see at Fig-4.0: (Code Sample – 4.0 outputs)
Main thread id = Invoke method function call thread id = simple function call immediate after BeginInvoke function call. But BeginInvoke function call thread id is 2992 different.

Some fact about the Delegate

  • Delegate is object and by default private type access modifier.
  • Delegate class generated by C# compiler according its declaration.
  • Delegate class object can hold reference of static or any class object’s function.
  • Delegate class is sealed class which generated by the C# compiler during run time.
  • Delegate is keyword so any function cannot return delegate type.
  • Delegate cannot use as field of the class.
  • Delegate provides asynchronous and synchronous call.

Wednesday, July 20, 2011

Microsoft envisions a universal OS, but it might not be called Windows


Imagine, for a moment, a world without Microsoft Windows.
Windows_logoYeah, I know, Mac fanboys have been dreaming of that since the mid-1990s. But based on some chatter coming out of Microsoft’s Worldwide Partner Conference this week, it could happen, but Apple wouldn’t necessarily be the cause.
Well, not directly, anyway.
Writing at the This Is My Next blog, Nilay Patel quotes Microsoft mobile chief Andrew Lees as declaring that, soon, there will be “a single ecosystem” for various devices running Microsoft’s software – phones, computers, tablets, TVs.
…“You can have full PC compute power available in whatever form factor you like,” said Lees, noting that the Windows on ARM demo motherboards were smaller than mobile phones. “We won’t have an ecosystem for PCs, and one for phones, and one for tablets — they’ll all come together.” Lees went on to say that Microsoft wants to provide “coherence and consistency” across different devices, “particularly with Xbox,” and that the goal isn’t just to share UI, but also core technologies like Internet Explorer.
Usually, when a Microsoftie uses the word “ecosystem”, he or she is referring to a whole universe of devices that work together thanks to the company’s software. It doesn’t necessarily mean that all those devices are running the same software.
But Patel says he’s heard from sources who indicate that Microsoft is starting to think exactly that, creating a unified software platform that would run everything from PCs to smartphones to the next version of the Xbox.
Even more interesting, he’s heard that it may not be known as Windows in the not-too-distant future.
Our sources also tell us that Microsoft is seriously considering ditching the “Windows” brand name in favor of something new when all this goes down. The idea is to rebrand this new super-OS with something that better fits with Redmond’s vision of the future. Obviously that could well change over the next few years as this plan takes shape — Steve Ballmer in particular has always been quite enamored with the Windows brand — but dropping the name is apparently at least on the table, and that’s a big step.
Now, this wouldn’t happen tomorrow, and it likely wouldn’t happen with the next version of Microsoft’s flagship operating, now presumably known as Windows 8. But as Mary Jo Foley at ZDNet points out, the fact that Microsoft has now ported Windows to ARM chips – the processors that power many smartphones – means it would be possible to make a true version of Windows for smartphones. That would be something very different than the old Windows CE or Windows Mobile, which were completely different programs that had a quasi version of the Windows interface grafted onto them. The Windows paradigm of Start buttons and cascading menus didn’t really work well on a small phone screen, but Microsoft has thrown out that whole approach with the Metro UI powering Windows Phone 7. Design is now moving the other way, with a phone-inspired interface being grafted onto a desktop OS.
Whether that works out remains to be seen. But the point is this: by thinking this way, Microsoft may finally have hit upon a way to do what it has always wanted to do – run Windows, literally, everywhere.
Foley, though, raises some good points how applications would work in this scenario.
The biggest question mark in this “one big Windows world” scenario is on the apps front. Even if Microsoft can’t/won’t have the same Windows operating system on phones, PCs and TVs, does that mean the same apps can’t run across all of these devices? In other words, would the Angry Birds game on Windows Phone automatically work on a Windows 8 tablet and on your Xbox? The “write once, run anywhere” goal — is it possible when the underlying operating systems are different — even though their user interfaces look very much alike?
Some developers with whom I’ve spoken think the differences between the platforms are relatively trivial, since Windows Embedded Compact is a subset of Windows. At one point, Microsoft was talking about plans to make its Silverlight browser plug-in available everywhere — on phones, PCs, set-top boxes and Xbox. (The Silverlight on Mediaroom and Silverlight on set-top plans — codenamed Taos and Santa Fe –may or may not still be alive). But in recent months, that talk has waned.
Other developers think that new apps that are written in HTML5/JavaScript will be able to run on any Microsoft platform that has an HTML5 browser built in, and that HTML5/JavaScript will enable Microsoft, its partners and its customers to gloss over underlying Windows-level differences.
Does this still sound technically challenging? At least one company is already doing it: Apple. Keep in mind that iOS – which runs on iPads, iPhone and iPod Touches – is a derivative of Mac OS X.
Whether Microsoft drops the Windows name is somewhat irrelevant to the technology itself – it’s just marketing, after all. But Windows is a strong brand with plenty of attachment from users, and Microsoft wouldn’t toss it away lightly. But it’s interesting that factions within the company are apparently debating it.
What do you think? Does a Windows by any other name still appeal to you?