Saturday, December 31, 2011

8 things your webcam can do, that you dont know

8 things your webcam can do, that you dont know:



HOME
SECURITY SYSTEM




THERE
ARE PLENTY

of free programs you can use to turn a webcam into a remote security system.
Simply install Yawcam (Windows only) from www.yawcam. com or Vitamin D (Windows
and MAC) from www. vitamindinc.com. Both are free and once installed, you can
configure them to live stream video and monitor the feed remotely. The software
can also be set to alert you or start recording when motion is detected in the frame
of view — this is great because you obviously cannot monitor the feed from the
camera all the time. For general surveillance, you can setup the software to
take snapshots at set intervals and upload them to a remote FTP server. For
Linux users, Motion (www.lavrsen.dk) does the same thing.





FUN & GAMING



A WEBCAM
can literally put you into the action while playing a game. At www.newgrounds.
com, you will find a collection of short, quick online games and Adobe Flash
applets that use your webcam. Just head to the games section and webcam games
subsection on the website. You will need to allow Flash Player to access your
webcam when it prompts you — this has to be done for each game. There are
plenty of games available on the site that you can play using your webcam and
each of them has a different theme. Our favourites are the 3D Target Shooting
(the game uses the webcam to detect your location and displays a 3D effect,
relative to your position), Night of the Ninja (fend off angry ninjas by
hitting them), Bunny Zap (zap bunnies before they hit the ground) and Dress Up
Yourself (add spectacles, thought/speech bubbles, facial hair, accessories to
your face).





LOGIN VIA FACE
RECOGNITION




SOME
COMPUTERS

may have this feature built in, but if you have a PC running Windows and a
webcam, you can enable login via face recognition easily. Head to www.
luxand.com/blink or http://bananascreen.en.softonic.com and download the
free software. In the initial configuration register your face with the
software and set an auto-lock for Windows. Once active, the software will
recognise your face and automatically log you in to Windows without the need
for a password. Since the software recognises certain points on your face, it
doesn’t matter if you have a different hairstyle or if you’re wearing
spectacles one day. There is an easy way to break in though – if anyone just
holds up a photo of yours to the webcam, the software may log in because it
can’t recognise 2D or 3D shapes.










OPTICAL CHARACTER
RECOGNITION




OCR OR Optical character recognition
using a webcam is a bit tricky as the image quality of most webcams is average.
However, your webcam can double up as an OCR reader in a pinch. You can take an
image using the webcam and then use software like Microsoft Document imaging,
Google Docs and Abbyy FineReader Online to convert images to text. You can also
try Evernote (free from www.evernote. com). Evernote is recommended software
for OCR since it reads the image from the webcam and converts it into
searchable text in real-time. You can use it to save notes, book pages, reports
and business cards. Accuracy of converted text varies between 70-90% depending
on the image quality and software used for OCR conversion.






PHOTOS WITH FUNNY
EFFECTS




IF
YOU
go
to www.cameroid.com, you can use any webcam to take funny photos — either with
various filters, distortion effects, scenes or frames. You don’t need to
install anything or even sign up — just give the site permission to access your
webcam through Adobe Flash when prompted. Once you take a photo, you can either
save it to the Cameroid public gallery or download the JPG file to your
computer. You can also try out similar effects at www.seenly.com. You can also
get software to create realtime effects while you video chat with someone using
Skype or Google Talk. Videoskin.net offers some freeware while
www.webcammax.com and www.shiningmorning. com offer trial versions of
their software with thousands of different effects.






BAR
CODE READER





READING BAR
codes and QR codes is easy with a smartphone and a free app. But you can do the
same thing on a PC with a webcam (doesn't matter if the webcam is built in or
external, although external is probably better for this purpose). Download and
install bcWebCam (get it free from www.bcwebcam. de) and it will automatically
connect to your webcam to show the feed. Now just place the barcode or QR code
in front of the webcam, the software will take a few seconds to recognise the
embedded content and show you the text/link it contains. Mac users who need
similar functionality can use Evobarcode (15day trial & US$30 post that)
from www.evological.com or QuickMark (US$ 3.99) from the Mac App store.





TIME LAPSE VIDEOS



TIME LAPSE
is a photography technique wherein multiple photographs, taken at the same
location over a period of time are stitched together to form a video. The
resulting effect is of time passing by very quickly, hence the name. Free
software called Tilaphos (http://sourceforge.net/ projects/tilaphos) or
Webcam TimerShot (available on http:// download.cnet.com) can do this for you
without hassling you with too many technical details. An external webcam is
recommended for time lapse videos because it is easier to keep it still. Also,
it is much easier to place it at a location from where a wider frame can be
captured — larger coverage would result in capturing of more movements, which
in turn will make the video look good. It’s important that the laptop (or
webcam) is kept perfectly still and that it receives constant power. After
that, it’s just a matter of setting the time interval and recording the time
lapse.






MAKE YOUR OWN FONT




YOU
CAN

use your webcam to create a font from your own handwriting. This font can be
used to send emails or create documents with a personal touch. Head over to
www.pilothandwriting.com, download and print the template provided. Now fill
out the boxes in the printed form with the corresponding alphabets — using your
handwriting. Once done, use your webcam to take an image of the form and upload
it to the website. After upload, the site will show you the template and you
can edit it to make the alphabets look better. Next, the website will generate
a font based on your handwriting and then you can download the font to your
computer and use it with any software of your choice.





Tuesday, December 27, 2011

Unescaping unicode characters in C#, encoded in JavaScript

Recently I came across a problem where I need to post HTML content (through JSON) in AJAX call and was end up getting "A potentially dangerous Request.Form value was detected from the client"


This problem lead me to learn a new thing which I thought may helpful programmers in many cases.


The problem:


I used java script escape funnction to encode html contents which I need to decode on the server side.
JavaScript escape and unescape are very powerful functions, but they do have its various idiosyncrasies that do not work appropriately with the standard escaping methods in the serverside C# code.


The regualr methods we have on C# to handle escaping/unescaping are:


  • Uri.EscapeDataString
  • Uri.EscapeUriString
  • HttpUtility.UrlEncode
  • HttpUtility.URLPathEncode

but none of these return a properly unescaped string as escaped by the JavaScript conterpart. 


The solution:

Fortunately for us, Microsoft's own JScript libary has it's own, serverside implementation of the JavaScript encode/unencode methods, that do the job exactly as expected. They are exact equivalents.


  • Microsoft.JScript.GlobalObject.unescape(string escapedString) 
  • Server.UrlDecode(Microsoft.JScript.GlobalObject.unescape(string escapedString))

To use it in your code: Reference Micrtosoft.JScript.dll in your project.
Use the static methods in GlobalObject to do the escape/unescape


Thanks for Reading..

Friday, December 16, 2011

Silverlight goes to version 5, Microsoft almost embarassed to announce it

Microsoft has announced the next generation of Silverlight, version 5, is now available for clients and developers.
While they made their target (just – they originally said “by the end of 2011”), Microsoft’s growing move towards modern web technologies such as HTML 5 and CSS 3 and away from Silverlight is becoming clear. For example, the release was publicised by a single blog post on MSDN, and made public at 9pm on a Friday – probably the second worst time you could possibly choose (after 3am on a Sunday) to make an announcement you actually want people to hear about.
It’s not as if Silverlight 5 doesn’t come with a bunch of features SL devs won’t like – it’s packed with new features that enrich the platform (even if it is dying). There’s a whole 3D stack included in an XNA 3D API, with built in effects and a full XNA content pipeline. H.264 (unprotected) is decoded in hardware, XNA boosts low-latency sound, P/Invoke, multiple windows, 64-bit support in Windows, Full Trust mode for enterprise with unrestricted filesystem access, and all kinds of other features.
However it seems Silverlight’s days are numbered, as Microsoft moves to HTML 5 for its Windows 8 tile apps and improves its support in IE 10. If you’re still interested, you can get it from Silverlight.net.

SQL Server 2012 Release Candidate arrives

Late last week Microsoft made available the first Release Candidate of SQL Server 2012 (previously codenamed Denali).
According to Microsoft, over 100,000 people downloaded the CTPs (Community Technology Previews) leading up to the release, the feedback from which has been put into the release candidate.
“SQL Server 2012 RC is the first release which is feature complete and represents an exciting milestone for customers and partners looking to experience the full value of SQL Server 2012” said the team. “As the foundation of the cloud-ready information platform, SQL Server 2012 will help organizations unlock breakthrough insights across the organization as well quickly build solutions and extend data across on-premises and public cloud backed by mission critical confidence.”
There are a number of improvements in SQL Server 2012 that enterprises and developers alike will be interested in. It includes “AlwaysOn” technology, which permits multiple readable database secondary servers for reporting and backup workloads as well as support for high availability in complex data types. It also has some significant speed boosts, CPU usage controls, Resource Governor for multi-tenancy environments and predictable resource allocation for these scenarios.
The RC is available today for anyone looking to have a go with all of the headline features in a production-ready package.

Google BigQuery helps companies of any size analyse their datasets

So-called “big data” – the concept of us all creating an ever-increasing amount of data and requiring it processed and analysed – is a hot topic at the moment, both among big companies and startups looking to get an edge in the sector.
Google have announced the availability of BigQuery, a web service designed for everyone from small businesses to Fortune 500 companies to help them analyse their massive datasets. A preview of the service was made available at the Google IO conference in 2010, and now anyone can get involved with its new UI and REST APIs. Other new functionality includes JOIN statement and support for Google Cloud Storage data export.
“We’re looking forward to helping businesses innovate faster by harnessing their own large data sets” writes BigQuery’s product manager, Ju-kay Kwek. “[We’re] putting one of Google's most powerful data analysis systems into the hands of more companies of all sizes.”
Use cases for the service vary from quick analysis of a dataset in a one-off case through to heavy API-based usage. The service is currently free (with 30 days’ notice before any charges are brought into effect), and developers can get involved on the Google Code site.

Friday, December 9, 2011

The null-coalescing Operator (??) Operatorin C#.net

?? Operator (C# Reference)

 

The ?? operator is called the null-coalescing operator and is used to define a default value for nullable value types or reference types. It returns the left-hand operand if the operand is not null; otherwise it returns the right operand. 

A nullable type can contain a value, or it can be undefined. The ?? operator defines the default value to be returned when a nullable type is assigned to a non-nullable type. If you try to assign a nullable value type to a non-nullable value type without using the ?? operator, you will generate a compile-time error. If you use a cast, and the nullable value type is currently undefined, an InvalidOperationException exception will be thrown.

 Example:

class NullCoalesce
{
    static int? GetNullableInt()
    {
        return null;
    }

    static string GetStringValue()
    {
        return null;
    }

    static void Main()
    {
        // ?? operator example.
        int? x = null;

        // y = x, unless x is null, in which case y = -1.
        int y = x ?? -1;

        // Assign i to return value of method, unless
        // return value is null, in which case assign
        // default value of int to i.
        int i = GetNullableInt() ?? default(int);

        string s = GetStringValue();
        // ?? also works with reference types. 
        // Display contents of s, unless s is null, 
        // in which case display "Unspecified".
        Console.WriteLine(s ?? "Unspecified");
    }
}

  

For more information, see Nullable Types (C# Programming Guide) and ?? Operator (C# Reference)

Find a cool free stuff everyday

Giveaway of the Day

Hiren Bharadwa's Posts

DotNetJalps