Thursday, September 5, 2013

Geo Tagging – What is geo tagging and risks involved in geotag photos


Internet, facebbok and twitter kind of social sites from smartphones is very common today. Photos clicked on smartphones are immediately shared on social media like facebook. The potential of sending the information to any corner of world is unbeatable and impressive. However, one needs to understand the risks involved in such spontaneous sharing of photos and information from smart phones. The feature is “Geo Tagging”. This is very useful feature of smartphone but at the same time equally dangerous. 
What is Geo Tagging?
It is the process by which geographical location information is added to various media. Location of earth at which smartphone photo is clicked is attached with photo because of geo tagging feature. So when these photos are published on internet, this location of earth information is also gets published. This information includes latitude, longitude, height, distance, name of place and many things related to location at which photo is taken. Hence people on earth now automatically know where do you stay, where are you right now and may be they can know if you are alone or not in home. So it becomes very easy for a person who wants to track or follow you. Especially Criminals may track information using geo tagging to identify next target for robbery. Action news in America few years back had conducted a program to improve overall literacy in people about geo tagging risks. Video is here - http://www.youtube.com/watch?v=N2vARzvWxwY
Avoiding the risks of geotagging is a thing to keep in mind in this day and age of decreasing privacy.
So what exactly you need to do?

Thursday, August 22, 2013

WPF - The dependency property is already registered


This is the error you will face when you are copy pasting the code to write dependency property. JJoking…That is not the reason of this error. But I have received it when I copy pasted dependency property code from one of the site.
You will land up in this error when you have dependency property written in following way –
public readonly DependencyProperty SelectedItems2 =
            DependencyProperty.Register("SelectedItems2", typeof(string), typeof(ListBox), new PropertyMetadata(null));

What is missing here? - STATIC keyword.
The problem lies in a way you register your dependency property. You should not register in the default constructor of the class, but in static constructor or initialize it at the time of declaration and preceding with Static keyword. Best way to write dependency property without error is code snippet. Type ‘propdp’ then press tab twice. And then customize the property as per your requirement. This is how you can avoid this error; avoid learning of dependency property syntax and save time.
public static readonly DependencyProperty SelectedItems2 =
            DependencyProperty.Register("SelectedItems2", typeof(string), typeof(ListBox), new PropertyMetadata(null));

Hope this helps.
Cheers…
Happy Properting!!!

Wednesday, August 21, 2013

Facebook Tips & Facebook Help – How to get back up of your facebook data



Benefits of Facebook can be the topic of debate, because facebook is mainly being used for gaming, chatting and time passing. So facebook is for time pass and that can be proved without any survey and this is period. However if you have a look at facebook timeline; one can easily get the information of things you had done since you have joined facebook, places you had visited, how had you reacted to certain incidents, new friends and many incidents can be viewed from timeline. This information can be valuable to live the moments you spent. What If you facebook account gets deleted? Or you clicked on some virus based link and your facebook wall has some weird posts and now you only have option to delete the current account and get new? In such scenarios if you have the back up of facebook data then life will be easyJ.
Login to the facebook. Click on Settings icon present in right hand upper corner of your browser. The icon is of “Gear” sign. You will see numerous options on click on Gear sing. Out of these options choose “Account Settings”. You will see the screen as shown below –
 
As shown above choose the option “Download a copy of your facebook data”. Further you will be presented an option to selected for starting archive of your data on facebook as shown below –

Tuesday, August 20, 2013

Value produced by BindingExpression is not valid for target property – WPF-MVVM-Prism and Telerik control



Ahhh, Telerik - what a pain this is…Telerik controls have made my life bit hard…
I am using MaskedTextInput control and trying to Clear the text in it on the click on Clear button which is inbuilt in this control. It clears the text however does not clear the value in property bind to it in XAML. To understand what I mean here refer to following tag –
<ams:AmsMaskedTextInput Value="{Binding TemperatureValue,Mode=TwoWay, NotifyOnSourceUpdated=True,ValidatesOnDataErrors=True}" Mask="###.#" Placeholder=" " Width="150" HorizontalAlignment="Left" /> 

Here if I click on the default clear button available in masked text input, it clears the entered text however value entered by user persisted in TemperatureValue  property. So my aim to make the binding property set to null on click of default clear button available in masked input text control.
I was using the MVVM-Prism framework an hence I defined my command in view model as –
Microsoft.Practices.Prism.Commands.DelegateCommand TemperatureClearCommand { get; private set; } 
 
In initialize view model – TemperatureClearCommand = new Microsoft.Practices.Prism.Commands.DelegateCommand (OnMaskedTextInputClear);
And in callback method –
public void OnMaskedTextInputClear()
        {
                TemperatureValue = null;
                NotifyPropertyChanged(() => TemperatureValue);
        } 

Updated the XAML as follows –