Wednesday, February 9, 2011

BitDefender 2011

Bitdefender is my trusted antivirus for a long time, I liked its 2007 and 2010 versions, they are flawless.  Recently, I downloaded and installed the BitDefender Internet Security 2011 trail for 30 days, this time, the story is reverse, Btdefender 2011 did not stay to my expectations, it took a lot of system resources, when I use more than 4 apps like VS, Photoshop, Wnamp, illustrator and expression web and expression design at the same time on my WIN7 with 2010 version the ram consumption did not exceed 70%, but with now just the same VS and Bitdefender 2011 version alone the ram is touching 85% easily.

Although this is the new version, I don’t expect it to run at such high ram cost, I even stopped the phishing and firewall module.  For firewall I use Zone Alarm Free version and I recommend it too.

Tuesday, February 8, 2011

Rocking Trailer

The movie series Transformers have been giving its best at graphics and clarity to every details and is increasing with every movie that comes in that series.

This is about the Transformers 3: Dark Of the Moon, you can have a look at the movie trailer here:

The trailer mixed with a heavy beat music in the starting and then when the main hero, here it is Optimus Prime enters, only the sound of his blade is heard, I would say this is one of the best trailers I have see, the background beat is mixed only slightly with the machines metal sounds, pretty nice combination.

Sunday, February 6, 2011

Super Tower Defense 2

After a long time I played some online game, the game is Super Tower Defense 2, it is coded in Silverlight, it is a VERY BAD GAME because it stole my time from me.  I played it for nearly more than 2hrs at a stretch leaving all my college work and another activities to god.

The game is all about placing  different kind of turrets around our command center to protect it from enemy raids.  I think, ARACADE games still rock Open-mouthed smile

You also play it at":

Hope one day even I could program something like that Smile with tongue out

Saturday, February 5, 2011

LIKE operation with LINQ and SQL

LIKE operator is a very useful and the most frequently used operator in SQL, with the advent of linq, we started to use linq more than SQL, i.e. small filtering is now done in code rather than going back to DB,  but the lack of proper LIKE operator is a bad aspect, per my research, in order to have a proper LIKE operator, we need to call the SQL Client and then use its functionality through linq and many suggest not to do it.

Hope Microsoft deals with small things too. Sad smile

However, I don’t know if it is Good for MIcrosoft to give the same functionality with “Contains” method Smile with tongue out,  Yes, that is correct, the like can be fully implemented with the help of Contains method.

MS Rocks some times.

Custom Data Column in Silverlight


Well, following is the code for creating a custom column with button or what ever is required in a datagrid

<sdk:DataGrid AutoGenerateColumns="False">
                <sdk:DataGridTemplateColumn CanUserReorder="True" CanUserResize="True" CanUserSort="True" Header="Show Details" IsReadOnly="True" Width="100">
                                <Button x:Name="ShowContact" Content="Show" Click="ShowContact_Click" Tag="{Binding ContactID}"/>

Certain names and bindings are used a example only.

Thursday, February 3, 2011

Double Click for ListBox - Silverlight


Following is the code that I follow for getting my code working for the doubleclick event for a listbox event in silverlight

First I declare 2 field/variables at Form level so that they are accessible through out the form/silverlight page like this:

Dim t1 As New DateTime
Dim t2 As New Integer

Then I write the following code in the MouseUp or left mouse up event.

Dim n As New DateTime
        n = Now
        Dim c As Double = DateDiff(DateInterval.Second, t1, n)
        If DateDiff(DateInterval.Second, t1, n) < 1 Then
            If n.Millisecond - t1.Millisecond < 100 Then
                If t2 = ListBox1.SelectedIndex Then
                    'Double click event code here
                    'Single Click event code here
                End If
            End If
        End If
        t1 = Now
        t2 = ListBox1.SelectedIndex

It works well, I use it.

Property VS Field –XAML Binding- Silverlight

After a brain storming and internet searching for hours together, I came to know that Silverlight do not bind the data from field, but it binds only property.  Following is the declaration methodology

FIeld Dim fullname as string

Property FullName() As String
                Return namee
            End Get
            Set(ByVal value As String)
                namee = value
            End Set
End Property

Here ‘namee’ is a field declared in the class or etc.

Following the XAML binding to be used:

<sdk:Label Height="28" Content="{Binding FullName}"/>

Hence during the code we can just use Itemsourcebinding for multivalue binding or if the value is only since like in this case then we use dataContext binding, but itemsourcebinding would do the trick too.