Sunday, August 24, 2014

(Short Story) The Girl who liked French Fries

The Girl who liked French Fries


By Mangesh Nadkarni (11/04/2010)

Sitting on seat number 36 while returning to Mumbai from one of my recent Pune trips, the bus halted at a food mall midway during the journey. I woke up from my partial doze. The headphones had gone misaligned, and my throat felt dry, which meant my mouth was open during my sleep. I cursed myself yet again for my embarrassment.

I didn’t get up although I felt the need of getting my face washed, to feel fresh. As a policy of my own I spend the first half sleeping and the next looking here and there. I avoid reading as I feel it is a primary catalyst for inducing sleep. Well the ‘real’ reason of not getting down the bus was this pretty girl who sat on the right corner of the two seats front of mine. Never mind I hadn’t drank much water and there was no real need to visit the loo, though sometimes we all do it for our ‘safety’. I sacrificed my ‘safety’ to have a look at her, when her boyfriend wasn’t around! “Mmmm..French Fries for me!” she wailed cutely at her boyfriend who proceeded to get down. I cried to myself why I wasn’t her McDonald.
She hadn’t streaked her straight hair, well that would look cute on her. Her ‘pinch able cheeks’ looked amazing on her not so chubby face. Mind you, the view was from her sideways. I never imagined how luscious one’s lips could look from that view. I cursed the caller who prompted her to pick up her mobile and talk, ruining my view. The call was short, presumably her boyfriend’s, asking “Do you want that extra cheese baby?” I never overheard that, but guessed it so, because of her obvious “no” to my ‘guessed’ extra cheese.

Tomorrow was Valentine’s Day and I so wanted her to be with me!! She looked outside the window and that wasn’t so good for my view. “Well let her look!” I said to myself in my mind. Then she picked up an Auto Car magazine and flipped few pages and threw it on the adjacent ‘boyfriend’s’ seat by force. It looked like she missed Femina or Cosmopolitan, oh sorry, Vanity Fair! Her bottle green top looked fabulous and I was lucky to admire her smooth hands. That was the closest my eyes could get thanks to the rift between two seats. My eyes were shamelessly (I thought about that afterwards!) fixed on her slim stable arm for a long time. Suddenly that fixation broke loose as her arm moved, as it grabbed a brown paper bag with McDonald’s logo. “Darn the delivery boy,” I said to myself.

The next thing I heard was a transition. Her cute voice had apparently gone for a vacation as she shouted, “You’re such a jerk!!” That was for her boyfriend. He had brought only one tiny sachet of ketchup. “You know I need more ketchup. Why do you always keep forgetting?” All other passengers had already occupied their seats and the bus left after the conductor’s checking.

And so the bus started on the conductor’s mark. After that it was all exercise for my neck and eyes. I thanked God for our fixed ears and wished for cat like ears. “Paani doge?” she asked her boyfriend. What followed after that question was lots of gunfire. He repented for having forgotten to buy the bottle. Twenty bucks could have suppressed her ire. Then after a brief silence she murmured, “You never take care of me…”, to which he replied, “I’m sorry Namrata…really I..” “Shut up!” she said in a stern voice, forgetting the fellow passengers around her. “Aah…Namrata” I said to myself looking at the expressway!
I was impressed by the guys coaxing and then began the dreaded public display of affection! They held each other’s hands, trying to find a perfect grip. I didn’t understand how I missed out the part where a fellow passenger uncle lent his water bottle to the guy to extinguish the fire. The chirping of the two sparrows was on and I could see her smile and laugh. “Why do you read such useless magazines?” she asked the guy, flinging the Autocar she picked up, at him.  “That’s because I love cars..” he replied back politely. “Typical of boys…all they like is unusual stuff, and forget about us, what we need” she said in a somewhat harsh tone, tauntingly referring the ‘untoward’ incident happened earlier. Mr. Boyfriend wore a dejected look on his face. “What’s the matter now? I’ve still allowed you to talk!” she pricked him. He kept quiet. “Brownie points for this guy for keeping his cool!” I said to myself!

We zipped past Panvel, Sion, and were now on the Western express highway. “Care to ask the conductor when is Andheri coming?” she irked the guy. Blinking his eyes forcibly, he went up to the conductor. “Few minutes…” he said to her, after coming back to his place. “How many minutes did he say?” asked Namrata. I won’t describe what followed next.

“So what are we doing tomorrow?” she asked him. He kept quiet and looked engrossed in some thought. After a brief moment of silence, she asked him gently, “Would you be my Valentine this year honey?”

“Nope”, we replied. The guy hadn’t uttered anything. Namrata and the guy sprung their necks, looking at me. In spontaneity, I had responded in a low tone, but I tried figuring it out who else shared my opinion. I found myself staring at a pretty girl at the window, sitting next to me!!

Friday, August 15, 2014

Slumber (a short story)


Slumber

‘You know something strange happened to me yesterday,’ he said to his friend. ‘What?’ his friend asked, keeping aside his phone, with which he was preoccupied with.

‘Well yesterday morning, I took my office bus as usual. It was running a little late, which is quite normal. The colleagues whom I see each day at the stop too boarded the bus along with me. The bus was quite packed, more than usual. I looked around for a seat, got one and sat.’

‘Was it a window seat?’ the friend asked.

‘No,’ he replied firmly. ‘I don’t like to sit beside the window. Dust, pollution, you know.’

Continuing his story he said, ‘so then I got settled, drank some water as per my habit. I saw the group of young boys and girls, frolicking and cracking jokes and patting each other candidly. They quite regularly board this bus. It is a very jovial group, but I don’t like the chaos they make.’

‘I hadn’t slept the night before and tiredness crept into my eyes. I don’t usually take a nap in the bus, but since the journey is about 2 hours, I thought it was a good idea to rest.’

‘The bus was pacing fast as there seemed less traffic than usual that day. I saw out of the window. Those underwear advertising hoardings that I see every day appeared. I find them awkward. The guy next to me was wearing dark glasses, which I found unusual as it was cloudy that day. He had placed his bag on his lap. On top of his bag he had placed his left palm, and had put his elbow next to it. His index finger pressed against his lips. It looked like he was in deep thought. But he also had his earphones on, so I think he might be engrossed in some audio book or some thought inducing music.’

‘My eyes began to heavily droop. Sleep was overtaking me; still my eyes were set outside the window, even as the bus sped fast, as if the driver was on some mission. I saw two cars coming out of a crematorium. Suddenly the thought of death and dead people struck me. I felt bad for those people in those cars. Then I thought about circle of life.’

‘My mind was going blank as overcoming sleep was almost impossible to me. The last thing I remember what I saw before my eyes shut down, was traffic signals, which surprisingly green each time; quite unusual for this time of the day. I could hear the laughing from the chaotic jovial group, faintly. It was airy. The thinker guy beside me was still deep in thought, looking outside. Then…I went dark. I felt completely comatose. I felt dog-tired. I felt as if I hadn’t slept for many days and I was covering up this huge sleep deficit. I was lost in sleep. But I was still feeling the wind gushing on my face. I did feel the bus was in motion, thanks to the potholes.’

‘I was in my siesta, but a strange feeling overcame me. Our bus has pretty good suspension, but as the bus sped more, the jerks became lesser. I suddenly didn’t feel a thing. Not even the blanket of gushing wind on my face. Feeling recharged, I opened my eyes, but the strong sunlight hurt my eyes and I closed them immediately. Then slowly I opened my eyes.’

‘I looked straight at the right seat ahead of me. It was empty. I remember, a girl from the chaotic jovial group occupying it. Hurriedly, I saw to my left. The thinker was nowhere to be found. I looked to my right. No one. I got up from my seat and to my amazement the bus was empty and still. My heart stared beating faster. Composing myself, quick thoughts came to me. It must have slept till the end and everybody must have got out of the bus and gone to office, but no one must have woken me up. I have seen that happen with some people in the bus, but why would anyone have not woke me up till now? Quickly I started getting down from the bus, with my back pack.’

‘What followed next was bizarre to me. The bus had stood still. There was no sign of the driver. Outside the entrance door of the bus I saw overgrown grass. I was looking at a land covered with thick grass and dense trees and leafy plants around me. I was in shock. Then I touched the bus, to get a grip of reality. I indeed feel the coldness of the metal. But still I saw the grassy land lay ahead of me. Ants and insects started creeping on my feet which was unprotected as I was wearing sandals. I ran towards the back of the bus and looked around. It looked as if I was alone with the bus in a jungle.’

‘I took out my cell phone which had no network coverage. I asked myself, what should I do now? Should I shout? Call out for help? What was happening to me? I got inside the bus again. It was still empty. I was puzzled and my mind was shattered. The only option was to keep walking and getting out of this place. But this thing was unexplainable. Why would I be stranded in a jungle with a bus. Where was everyone? Had there been an accident? These thoughts came to me as I took on a direction and kept walking.’

‘I kept walking on for some 15 minutes and my heart was pounding at a faster rate. Suddenly out of nowhere, I saw a short fence. It too was covered with grass as the path throughout. Then to add to the list of strange events happening to me that day, I saw people sneaking through that fence, which had an opening, deliberately made my some to break into. A bald guy with a back pack was making his move to sneak in. In a flash I caught him and asked where were all these people going? He coldly replied to me, the name of my office!’ I was aghast. My office! How could that be? In this jungle? I thought it was probably better not to question anyone now and I quickly sneaked in with others and followed them.’

‘The trail of about 3 minutes ended. I saw my office building; the exact same building which I go into every day. I turned opposite, to see the jungle from where I came from. I went to my desk in a state of shock. There were the regular people whom I work with on the floor.’


‘So, this is what happened to me yesterday. It’s completely unexplainable isn’t it?,’ he asked his friend. Strangely now, there was no one in front of him.

Mangesh Nadkarni, 15-08-14

Sunday, August 3, 2014

MultiDataTrigger : Handle OR condition


Building on my previous post on MultiDataTrigger, we saw that MultiDataTrigger generally works for AND conditions (all conditions should be true to fire the trigger to update the property)

What would you do to handle OR condition?

<Style x:Key="pricestyle" TargetType="TextBox">
            <Setter Property="Visibility" Value="Collapsed"/>
            <Style.Triggers>
                <MultiDataTrigger>
                    <MultiDataTrigger.Conditions>
                        <Condition Binding="{Binding AllowCheck}" Value="True"/>
                    </MultiDataTrigger.Conditions>
                        <Setter Property="Visibility" Value="Visible"/>
                </MultiDataTrigger>
                <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                        <Condition Binding="{Binding Action}" Value="SELL"/>
                    </MultiDataTrigger.Conditions>
                        <Setter Property="Visibility" Value="Visible"/>
                </MultiDataTrigger>
            </Style.Triggers>
        </Style>

Effectively you would need to write 2 multi data triggers to get this working.

Side notes (not related to this post topic)
http://stackoverflow.com/questions/17598200/datatrigger-binding-in-wpf-style
http://stackoverflow.com/questions/15814639/consolidating-common-wpf-styles

Saturday, August 2, 2014

MultiDataTrigger in WPF: an example

Here is the XAML
<Window x:Class="WpfApplication1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:diag="clr-namespace:System.Diagnostics;assembly=WindowsBase"
Title="Window1" Height="300" Width="300">
<Window.Resources>
<Style x:Key="pricestyle" TargetType="TextBox">
<Setter Property="Visibility" Value="Collapsed"/>
<Style.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding AllowCheck}" Value="True"/>
<Condition Binding="{Binding Action}" Value="SELL"/>
</MultiDataTrigger.Conditions>
<MultiDataTrigger.Setters>
<Setter Property="Visibility" Value="Visible"/>
</MultiDataTrigger.Setters>
</MultiDataTrigger>
</Style.Triggers>
</Style>
</Window.Resources>
<Grid>
<StackPanel Margin="20" HorizontalAlignment="Left">
<Label Content="Action" Margin="0,3,0,0"></Label>
<ComboBox Width="100" ItemsSource="{Binding Actions}" SelectedItem="{Binding Action, UpdateSourceTrigger=PropertyChanged}"></ComboBox>
<Label Content="Price" Margin="0,3,0,0"></Label>
<TextBox Width="100" Margin="0,3,0,0" Style="{StaticResource ResourceKey=pricestyle}"></TextBox>
<CheckBox x:Name="dd" Content="Allow" IsChecked="{Binding AllowCheck, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></CheckBox>
</StackPanel>
</Grid>
</Window>

On acceptable values defined in the trigger (highlighted in blue colour), on selection of Allow checkbox and SELL from action combo box, the trigger gets fired and the price textbox gets visible.


One important thing to note here (which may get missed out). Note the text in red colour. It's important to set a default state of the property for which you want the trigger to be applied on (in our example, its Visibility property of the textbox)

Sunday, July 6, 2014


XAML to ViewModel creator.

This demo is in works. Currently it reads a XAML file (using XElement) and identifies Bindings and their controls.

Next i'll complete this by printing out a view model class with properties using the bindings that i've collected in a collection.

You may want to improve this; feel free!

Download Demo Code

Placeholder trial: Placeholder code
Update to placeholder: Handle events of a control within a datatemplate. Refer this link:
http://stackoverflow.com/questions/1800595/event-handler-in-datatemplate

Tuesday, July 1, 2014


WPF: Quick way to display columnar data for printing. The code below displays textblocks in 2 columns. You can bind this listview or place data in XAML as shown below.

<ListView SelectionChanged="ListView_SelectionChanged_1" x:Name="lview"> <ListViewItem></ListViewItem> <ListView.View> <GridView x:Name="gview"> <GridViewColumn Width="100"> <GridViewColumn.CellTemplate> <DataTemplate> <StackPanel> <TextBlock HorizontalAlignment="Stretch" Text="hello"/> <TextBlock HorizontalAlignment="Stretch" Text="hello"/> <TextBlock HorizontalAlignment="Stretch" Text="hello"/> <TextBlock HorizontalAlignment="Stretch" Text="hello"/> </StackPanel> </DataTemplate> </GridViewColumn.CellTemplate> </GridViewColumn> <GridViewColumn> <GridViewColumn.CellTemplate> <DataTemplate> <StackPanel> <TextBlock HorizontalAlignment="Stretch" Text="mangesh"/> <TextBlock HorizontalAlignment="Stretch" Text="mangesh"/> <TextBlock HorizontalAlignment="Stretch" Text="mangesh"/> <TextBlock HorizontalAlignment="Stretch" Text="mangesh"/> </StackPanel> </DataTemplate> </GridViewColumn.CellTemplate> </GridViewColumn> </GridView> </ListView.View> </ListView>


Things such as hiding column headers, setting column width if required need to be done.

2 column grid example

Sunday, May 18, 2014

User controls for clutter free forms in WPF

User controls for clutter free forms in WPF

https://sites.google.com/site/mvnworldinc/Home/UserControlTest.zip?attredirects=0&d=1

Exposing inner Control properties for binding in WPF

http://stackoverflow.com/questions/4169090/exposing-inner-control-properties-for-binding-in-wpf

http://stackoverflow.com/questions/18158500/usercontrol-dependency-property-design-time

http://tech.pro/tutorial/807/wpf-tutorial-how-to-use-a-datatemplateselector

http://stackoverflow.com/questions/3922908/changing-contenttemplate-based-on-listbox-selection

http://breakingdotnet.blogspot.in/2012/05/data-template-selector-in-xaml.html

http://jacobaloysious.wordpress.com/2013/08/19/mvvm-using-contenttemplateselector-in-tab-control-view/

http://www.experts-exchange.com/Programming/Languages/.NET/Q_28029825.html

http://zamjad.wordpress.com/2011/09/21/using-contenttemplateselector/

Demo of how user controls can have their own VM
https://sites.google.com/site/mvnworldinc/Home/UsercontrolVM_Demo.zip?attredirects=0&d=1

Tab Header with context menu button:

Sample

Sample 2

Tuesday, April 15, 2014

Wiring Views and ViewModels using DataTemplate in resource dictionary in Prism:


Replace square brackets with <> tags

1. In module Initialize() :

// Merge Resource Dictionaries
ResourceDictionary dictionary = new ResourceDictionary();
dictionary.Source = new Uri("pack://application:,,,/Project.AssemblyName;component/MainResourceDictionary.xaml ");
Application.Current.Resources.MergedDictionaries.Add(dictionary);

2. Create a main resource dictionary:

[ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:vw="clr-namespace:Project.AssemblyName"
    xmlns:v="clr-namespace:Project.AssemblyName;assembly=Project.Views"]
    [!-- Resource dictionary entries should be defined here. --]
    [DataTemplate DataType="{x:Type vw:VM_1}"]
        [v:View_1 /]
    [/DataTemplate]
    [DataTemplate DataType="{x:Type vw:VM_2}"]
        [v:View_2 /]
    [/DataTemplate]
[/ResourceDictionary]

3. In Views project, your user control:

[UserControl x:Class="Project.Views.View_1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
     xmlns:Resx="clr-namespace:Project.AssemblyName"
      ..

Question posted:

http://goo.gl/MI1YCz

Others:
http://wpfthemes.codeplex.com/discussions/43074
http://transitionals.codeplex.com/releases/view/15792
http://stackoverflow.com/questions/9796174/load-usercontrol-in-tabitem
https://compositewpf.codeplex.com/discussions/30673

Saturday, February 22, 2014

A tutorial application in WPF

When you're new to some project and new to its application, a tutorial could be of use to quickly understand the application, its purpose, what its components do and what is the intention of the application. While there is no substitute for personal training, a simple tutorial app could get you started quickly. Plus there is always an advantage to look back at it whenever you want without any time limitation.

Here is a simple idea and its simplest implementation in WPF. It's just a starter.

Download Demo

Update:
I thought it'd be easier, faster and better if this were implemented in html using jQuery. I got a chance to learn jQuery because of this and ended up making a demo page. Hope someone builds up on this.

Download Demo in JQuery

Update 28/03/14: Intro.js is an amazing jquery library. Thanks to the developers.

Demo with intro js

TL_App_Concept

Friday, January 1, 2010

Time: A tale of three moving needles.

Fast do I move?

Slow do I seem?

I start at dusk.

Or at the first sunbeam.

Foolish you humans,

Err and make mistakes,

Waste me or use me or foul mouth me,

Careless me, I move with my own pace.

Rewind me in your thoughts,

Feel pleasure but mostly pain,

Try to call me back,

Or drive me off in vain!

Thursday, December 31, 2009

Of Capacity and Quality..

MP3 players remain popular as new models roll out periodically. We not only care for the design aesthetics but also the capacity of the player to hold songs so that we may never require adding songs that have been left out apart from the latest ones. When I think of the ‘capacity’ as in 8GB, 16GB and 32GB, I compare it with the higher capacity hard drives which are in the market today. It took me back to the year 2000 (now I could say, “a decade ago”!), when I had this Seagate 20GB drive. It was massive in size compared to what we look at today (size zero?). And the capacity? Tiny!!


With a 500GB HDD being a regular drive on home computers, whenever I’ve visit my friends, what I see is the enormous collection of movies and TV episodes of many “popular” sitcoms. A 10 to 15 GB collection of songs is bare minimum. But how much one hear the erstwhile gazhals (erstwhile on the drive!)? how much do we watch the sitcoms apart from all episodes of FRIENDS? And the movie collection is nothing to be proud of as many of them are just archived because we couldn’t find anything better than that!


With my old 20GB HDD, I remember how choosy I was. I used to convert some MP3s, apart from my favorites at the cost of quality, to OGG!! Now wonder why I did that!! I really saved some MBs! I used to archive old files and compress them, not choosing the popular Winzip but going for WinAce (anyone uses it now? I don’t!). I never knew WinRAR then. Once I got a 50MB software from a friend compressed in UHARC format and was amazed when I unzipped it as it had the command line interface and the unpacked software was well over 200MB!! I immediately used it (for a while of course).


I was kept songs that I heard more than once not compromising my collection. Back then CDs were a little expensive. I archived movies on them which I liked and kept some on my drive. What I learnt from my 20GB HDD was discipline. Effective partitioning and quality of data was of importance, which I think sadly is missed these days. What we do is get anything and everything. I still don’t own a 500GB or a 1TB HDD, but I wonder how would I stick on my ‘principles’?!

Friday, April 10, 2009

A Good Friday




Well today happens to be Good Friday (the holiday day for some of us) and it was also our group mate Chinmay's marriage. Good Marriage!!

Manas and i reached first at 10, the venue being Shruti Mangal Karyalay. Vishal came in with his dad, in traditional avatar. Later he would be only accompanied by Ranjeet in traditional attire, as the rest of us were in formals. It was an injustice, but considering the heat, give us a clean chit!


Narendra made a short presence as he had to go to the office. Ajay followed suit. It was pleasant to see Prakash Ramchandran (it had been a while seeing him). Jeetu, Pushkar and Ankur Shah (combo offer of sorts) too were present.

Abhijeet Thakur was a delight, as we have been really good friends, and it had been a long time we hadn't met. He had come from Aurangabad specially to attend the wedding. Nice!

Then followed an adhoc but a pretty good program of going to "Mee Shivajiraje..", Manjrekar's latest marathi film, which has become a cult lately. I had planned uniting many of us at Ranjeet's place and watch "Bolt", which i had copied on my pen drive. But that didn't materialise. In due course we saw a Mazda RX8 in the parking of E-Square ;) WOW!



We enjoyed the movie and i am now home. Let's see what rest of the day follows. It was a pleasant day having met old friends and enjoying with them!

Thursday, February 26, 2009

Music Review: Rahul Sharma & Richard Clayderman - Confluence II

VERDICT: WOW!! Confluence is a fantastic and a mind blowing album.
Track listing:
1 Dance Of The Sufis
2 Pure Flame Of Love, A
3 Chase, The
4 Dance AveeTa Vie
5 Fragrant Night
6 Endless Love
7 Forbidden Dreams
8 Le Chant Des Algues
9 Chase Continues, The

Dance Of The Sufis
----------------------------------------
The first track starts with RC's prelude piano. RS then picks it up from him, and sets the stage. The beats get groovier, making the track dancable. You would want to do a tango on this one! The middle is a reminiscent of a track(Fragrant Night) which comes later.

A Pure Flame Of Love
-----------------------------------------
RS's santoor makes its grand entry, while RC's piano lights up the atmosphere in the background. True to its name, its a soft musical perfect for night ambience. RC creates magic with beautiful orchestration. What's more, RC plays the "anatara" of this masterpiece. RS doesn't let you forget his prelude. It’s a fantastic song and keeps the mood 'alive' and 'afresh'. The pace of the song is smooth and soft. Not too slow, not too fast. RS $ RC have their fair share in this track, with each one playing their piece. Certainly, one of my favourites!

Dance AveeTa Vie
-----------------------------------------------
The santoor and the piano in this track have been kept in shade. The track didn't make me say "wow". It would be okay to skip this track or have a listen to it once.

Fragrant Night
-----------------------------------------
How can the santoor and the piano be used in a hip hop track? Baffled? The answer is "fragrant night". I couldn't relate the music with the name, but its one of the most exciting tracks in the album and has become an instant favourite. RS $ RC have indeed succeeded in making music 'different' altogether apart from taking it to a different level. RC's piano is played in 2 modes, one is subtle and to match RS's firm santoor tune, he plays firm piano notes! WOW!

Endless Love
--------------------------------------------
This track instantly reminds you of the waltz. Its touching, and soothing. It’s an amazing track. RC $ RS have given their best in this track. You certainly cannot miss this one. It matches in tune with the name and symbolizes romance. A splendid example of how an instrumental piece makes you visualise it as a song; something which is not easy to do. The ends are foot tapping and the song is joyous.

Forbidden dreams
---------------------
Again a fast paced track. the prelude of the track is racing, it just gets better and better in the middle. The orchestration is amazing and sounds dramatic! True to its name; you cannot stop yourself from seeing forbidden dreams!

Le Chant Des Algues
--------------------------------
RS and RC do an Enigma. With the hustling background and lightly emphasised santoor with a tinge of the piano, the track is kept short and sweet.

Chase Continues, The
-------------------------------------
Taking queue from Time Traveller, a revisit to the "Chase" sounds exciting. With more instruments added, like the tabla, and remixing, the track is more of an addition. Something, which wasn't required, but too good to be ignored.

Thursday, February 5, 2009

Tutorial : Dual booting Ubuntu and Windows XP: with Win XP already installed and having NTFS partitions

Dual booting Ubuntu and Windows XP: with Win XP already installed and having NTFS partitions. Ubuntu has taken by storm as a popular flavor of Linux. This has happened because Canonical (the makers of Ubuntu), has adopted a unique strategy for marketing Ubuntu. It not only rests at that; but the OS has undergone a lot of improvements and is ready to catch the eye of PC users, who somewhat fear the “text” mode, by radically upgrading the UI.

Enough said; let’s move on to our target.

I’ll explain you in short, the situation in which I was. That would probably be easy for to relate to.

My notebook specs: Dell Inspiron 1420, 2GB DDR2 RAM, 128MB Nvdia Graphics, 160GB SATA HDD, DVD Combo drive.

Situation: My hard drive had configuration like this:

Since I wanted to dual boot the system; I needed to make room for Ubuntu. That would mean reconfiguring the whole file system or resize partitions using any partition tool.

The easiest way to dual boot Ubuntu with XP, is getting XP installed first, and then installing Ubuntu. The reason being, Windows needs itself to be installed in the master drive (C drive). If you do it other way around, you might end up screwing up your bootloader. I found Ubuntu’s bootloader (GRUB) to be friendly (it understands the Windows installation its location).

So the point to remember is : Install windows XP first and then install Ubuntu.

A 10 GB partition was quite sufficient for Windows XP, as all my program files get stored onto my D drive which is large enough. Ubuntu can enjoy itself on a drive which is of 20GB. Its too much, still, with a large HDD, it can be worth it, since, you want to learn Ubuntu and keep installing its free programs.


The re-configuration of my HDD and creating new partitions and then again installation of Win XP, was pointless in this case, as I felt it would be okay to sacrifice my Stuff0 drive. (You can choose any drive you want, depending on your data intensity).
Note of caution: Back up all of your drives before starting this. Get a portable (you can borrow it, as I did!). Copy all the data which means to you.

You need to only COPY PASTE your data onto any external media. Do not CUT and PASTE. Cut paste is NOT required here and it also takes some more time.

Next, format the partition where you want Ubuntu to be installed. Right click the partition and click “format”. Then select the checkbox “Quick Format”. The partition shall be formatted in NTFS format. That shouldn’t matter to us, as Ubuntu will format the same drive in its type. In my case; I formatted my Stuff0 partition after copying all my data onto a portable.

Once you backup your partitions (which takes hell lot of time to complete); we proceed to our next step.

Insert your Ubuntu Intrepid Ibex Installation disk (which also acts as a live CD) and restart your system.

Assuming that your DVD drive comes first in the boot sequence; select the option “Try Ubuntu without any changes to your computer”.

Let the live environment load. It takes some time as you are booting from the DVD. We need to check if Ubuntu shows our existing partitions. One way to do this is to go to “System >> Administration>> Partition Manager”

Here you’ll see your partitions. The “unknown” type of partition (mostly /dev/sda) is your C: drive where Win XP is installed. Identify the drive where disk space free is maximum. That would be your target partition. In my case it was /dev/sdb6. Drive D was /dev/sdb5, while the last drive it showed as /dev/sdb3. The numbering depends on primary and logical extensions. But let’s not get into that.

Identifying your target partition is very important as any mistake shall install ubuntu on that drive. Hence, be careful. It’s not difficult at all. Just that you need to be in your senses while doing this step. Now you can close the partition manager. Now that you’ve identified the target drive, things to come are a piece of cake.

Double click the “Install” icon on the Ubuntu desktop. We’ll now proceed with the installation.
Select appropriate choices, like languages, time zone, keyboard layout etc and proceed. Ubuntu installer will then scan your existing drives and OS installations (XP here).

What you would see next is “Prepare disk space” window. It would show you “Before” and “After” bars.
Select the “Guided” option (it’s selected by default). You see /sda6 (referring to the Stuff0 partition) selected here. Don’t change anything here. It shows you 2 boxes with
percentages of space that Ubuntu would occupy. You don’t have to do anything here.

What happens is internally, ubuntu makes space for /,/home and swap partitions.
What’s going on here?

As you can see partition sdb6 (which is your Stuff0 of 20GB) will have ubuntu installed on it. And of course, Ubuntu’s bootloader (GRUB) will take care of dual boot sequence.

Proceed for the rest of the installation. The DVD will be ejected once it’s done, before asking you to restart the system.


When you restart the system (remove the DVD before that), GRUB shows Ubuntu in its list as well as Windows XP entry in “Other Operating systems” list.

Check into Windows XP to see whether XP is working fine. It should probably do. All your settings are retained files left untouched. All the drives show up in “My Computer” as it is, with only exception being “Stuff0” which is empty and would show something like a 3GB partition. Don’t worry, as XP doesn’t show Linux partitions as it is. It’s better not to touch that drive and keep it for Ubuntu itself.

Well then! Ubuntu is finally installed, and is in dual boot! Enjoy!



Wednesday, December 3, 2008

Underworld Evolution - Soundtrack


Whew!! Back afresh after a 2 month abscence. Hmm..nothing like, 'was busy', 'didn't get time' stuff. There's simply no reason whatsoever. I can't wait for my next review!


Underworld Evolution was not a box office hit, but the film's impressive with hardcore action lovers. Put some slime into it and it caters to a different set of audiences. The part that amazed me was Kate Beckinsale; whom i percieve as an incredibly beautiful actress (WOW!!), did a film such as this. It put her with the likes of Angelina Jolie, as an action superwoman!


Alright then, the OST has a compilation of 16 songs (enough to write a lengthy review!). It opens up with "Puscifier (Renholder Mix)" performed by ' The Undertaker' . I am forewarned that maximum tracks are remixed here, if i go by the track listing. Puscifier is truly an amazing song. The rock guitar makes its sound and the basses take its place. It hits hard. I am impressed!


"Chester Bennington- Morning After (Julien K Remix)" does its best to spread the message of the film (reminds me the ending). Its a fast, racy track that does juistice by sticking to the film's concept. "Hawthorne Heights - When do i Stab Myself in the Ears (The leigion of doom remix)" is impressive as it proves to be true metal. But i found it to be drastically similar to Linkin Park, whom i adore so much.


Another remix in the line, "My Chemical Romance - To the end (RNR Cheryl Mix)" doesn't fit the bill. Thank heavens they changed the title to "To the end". Linkin Park's "In the end" is inevitable. The next track may be suited to the peaceful (hardly any) moments in the film. "Slipknot- Vermillion pt 2 - (bloodstone remix)" is silent and smooth.


"Alkaline Trio - Burn (Alleged remix)" appears next, sticking true to the film. Its a combination of rock, messages and Kate's fight to the finish. "Aiden - the last sunrise (dusk mix)" then again inspires the plot of the film. This track too sounds well.


"Senses Fail - Bite to break skin (legion of doom remix)" doesnt need a mention because it does what i hate; aping my favourite rock band. I choose to skip it. "Atreyu - Her portrait in black" followed by "Trivium - Washing away me in tides" sound fast. They have been misplaced i guess, as i feel they have no place in OST of such film. They suit NFS editions. The next track, "Mendozza - Eternal battle" need not be left out with the previous ones. The intro is impressive and stands out, but it doesn't fit the scheme of the OST of this film.


"Lacuna Coil - Our truth" follows immediately and it impresses quickly too. I am reminded of Evanascence. This track suits Kate perfectly, and describes of her responsiblities and antics. A remarkable choice of track selection. "Gosling - Cat people (Putting out the fire)" is a track that you would love to hear while you are in your car, driving home in the evening. Its a silent and classic rock song.


"Why are you up? - Bobby Gold" follows next, again fitting the plot of the film. Though its not impressive. "Suicide - Meat beat manifesto", follows the same league.


At last, finally the ending track of the compilation, "Halloween 2 - Cradle of Filth", thankfully does not ruin the OST. Its a cool track, with an element of rock. A nice ending, though not perfect.


All in all, Underworld Evolution OST is SIMPLY AMAZING. Its impressive. What impressed me was the director's selection of tracks. Nearly all of theme stay true to the theme. An OST has to carry the spirit of the film with itself, and thats what this OST does. My favourite? well, the opening track. Go on, get yourself rocked and evolve!!

Wednesday, October 1, 2008

Music Review / Talvin Singh : Anokha - Soundz Of The Asian Underground



The soundtrack of Boom impressed me, and i was prompted to give a try for more of Talvin Singh's albums. "Anokha" was his album released way back in 1997. Talvin Singh is known to be a pioneer of the Asian Undergrounds in the UK, and his fusion music has always managed to create waves in yet unstable world of fusion music. Trilok Gurtu could be an equal to him.

A collection of 12 tracks, the album, as for me, opened up with the immortal "Theme from Bombay"; A.R Rahman's classic. It simply refuses to fade away. Truly, it assists you to visualise the shores of Mumbai. It can never fail. Its truly a benchmark. Orchestra and the flute...oohh la la!

The 2nd track features Amar, with "Heavy Intro". The 'sarangi' is used well and it has a classical midtone touch, with an aalaap encrusted. Though it fails you to proceed to the next track.

Having said that, i still did proceed...how could i abandon my review! TS would have something good up his sleeves! Tracks 3 and 4; "Equal I Equation" and "Shangh High" are just about the same. They're fast paced, racy, and more electro. There are traces of tabla. But that didnt impress me.

Track 5 from Kingsuk Biswas, "K-Ascendent" has mixed tabla. While 6th, Lelonek's "Kizmet" sounds like unreal tournament track. Next comes Osmani Soundz, with "Spiritual Master Key'; which doesn't sound like spiritual at all! It has ample of bass and is mixed like "Shang High".
Till now i am devasted. Its just not TS!

State of Bengal perform back to back with "Chittagong Chill" which pleasantly starts with flute notes and ends in a disaster. "Flight IC408" is another crap song. It starts with announcments and Captain Dasgupta welcomes you aboard further, it continues with Chittagong. I think that flight was meant to land Chittagong. God knows!! Its a rubber!

Now i have lost the count of tracks. Amar comes back (he didnt have enough) along with TS. The same female who crooned in the 2nd track comes back.singing only one line "o mere jaaneja, aankho se door na ho". Till now i am broke.

TS performs featuring Leone. It includes the classic matka, while Leone just doesnt manage an Enigma impersonation.

The final track was, i wont say a saving grace; leave that, it was a massive impressive track. "The Milky bar Kid" is one amazing jugalbandi between a DJ and a tabla player. The tabla is very well given an attention, which it deserves. 

In all, its a big disappointer. I would suggest you to go with the 1st and the last track. The rest of them, you can play in your car as you drive. They dont need much attention! Drive safely!

Saturday, September 6, 2008

Review / U2 How to dismantle an atomic bomb.


This is one album that's playing in my mind these days. I was shifted to Pune DLF location, a few weeks ago, and there's absolutely no source of entertainment. What i did, was cleaned up my memory stick and copied this album hurriedly, as i wanted to try out something which i had never set my ears on. It had to be U2.

Apple's products, particuarly iPod has been a fascinating one; afterall thats the product which turned the tables. U2's "Vertigo" was selected to brand the iconic player, of which the proceeds were used for some charitable purposes (Bono does his bit again.) "Vertigo", indeed instantly sets the tempo, and keeps you swinging.

"Miracle Drug", is a silent rock song, with superb, touching lyrics. Excellent keyboard percussion is noted. "Elevation", helps change the mood of the album, once again, matching the standard of "Vertigo". One song, has been particuarly my favourite in this album, is "City of blinding lights", a song which indeed has beautiful meaning. Its my recommendation, for those of you, who haven't heard it, please do.

Other songs such as "A man and a woman", "Crumbs from your table" amongst others have been excellently crooned by Bono. Its definately one of the best rock albums i've recently heard. In all, U2 keeps it legacy. What a rocking performance guys!

Pune v/s Vizag


Now that i've been having a bad impression about Pune is a past, and a thing to be known to all; Vizag was definitely a better place. FYI the photograph to the right taken on 23rd Oct 2007 is the road which is parallel to the Satyam Development Centre in Vizag.

I was intially apprehensive about the city, holding grudges against it due to my incompatiblity of the language. As i left the place, i found it to be having a good environment. Pune sucks big time. It has become a place of ordeal. Its not only increasingly difficult to travel in the traffic; the cost of living has increased manifold. I could easily see a different Pune, from back when i stayed during my BCS years. I saw a different side of Pune while in MCA, as i stayed near Katraj. Now i hear, a lot of buildings have come up. There isnt a single place left to set foot on, and now we could see areas like Wakad and Aundh Annexe to be stagnated in a few years; thanks to the IT Park. One could see the amount of traffic piling up on the Hinjewadi road; a road which leads to the city.

One solid splash of rain shower, makes the city kneel down; the sewage system just not being able to bear the brunt. Back in Vizag, i could not witness heavy rains, just because it doesnt rain much. Summer is absolutly humid; a perfect one for those who have stayed in Mumbai. I never tried my hands on bus travel in Vizag as it used to be loaded with passengers, but i cannot do so here in Pune. But i can say its pretty much the same condition. One could keep standing throughout the journey, as people continually out number the amount of seats. And that applies to just about anytime in the day, including afternoon, where we suppose it to be the laxing time for people sitting in their offices sipping hot tea.

There are so many homes, so many families. And people cram on their vehicles, making way, jetting past the obstacles and get to offices. They work, they sit, they have lunch, the afternoon passes by, just to make way for an evening. Evening as it comes, lures people of returning to their sweet homes, have dinner with loved ones, entertaining themselves with the idiot box; and slowly dim their lamps, to sleep into the dark. Lo! good morning! Here comes the new day, a new adventure or not, remains to be seen!!

Happy Ganesh Chaturthi!!

Friday, August 22, 2008

More Notes




About .NET Framework
http://en.wikipedia.org/wiki/.NET_Framework


The Base Class Library (BCL) includes a small subset of the entire class library and is the core set of classes that serve as the basic API of the Common Language Runtime. The classes in mscorlib.dll and some of the classes in System.dll and System.core.dll are considered to be a part of the BCL.

The Framework Class Library (FCL) is a superset of the BCL classes and refers to the entire class library that ships with .NET Framework.[10] It includes an expanded set of libraries, including WinForms, ADO.NET, ASP.NET, Language Integrated Query, Windows Presentation Foundation, Windows Communication Foundation among others

Difference between Abstract Class and Interfaces

An abstract class is a class that can not be instantiated but that can contain code. An interface only contains method definitions but does not contain any code. With an interface, you need to implement all the methods defined in the interface.
If you have logic that will be the same for all the derived classes, it is best to go for a abstract class in stead of an interface.
You can implement multiple interfaces but only inherit from one class.

Differences between the GridView control and the DataGrid control include:
1.Different custom-paging support.
2.Different event models.

DataReader v/s DataAdapter
Data Reader read only forward only. It's connection oriented. One should explicitly close the connection.
Data Adapter is disconnected. It's acts as a bridge between data set and database.

DataGrid Code
http://www.codersource.net/asp_net_datagrid_part1_azam.html
Grid view control in ASP .Net 2.0
http://www.codersource.net/asp_net_gridviewcontrol.aspx

Garbage Collection
The .NET Framework's garbage collector manages the allocation and release of memory for your application. Each time you use the newoperator to create an object, the runtime allocates memory for the object from the managed heap. As long as address space is available in the managed heap, the runtime continues to allocate space for new objects. However, memory is not infinite. Eventually the garbage collector must perform a collection in order to free some memory. The garbage collector's optimizing engine determines the best time to perform a collection, based upon the allocations being made. When the garbage collector performs a collection, it checks for objects in the managed heap that are no longer being used by the application and performs the necessary operations to reclaim their memory.
This section describes how the garbage collector automatically manages the allocation and release of memory for the managed objects in your application. In addition, it describes the recommended design pattern to use to properly clean up any unmanaged resources that your application creates.


Page Life Cycle
http://blogs.clearscreen.com/dtax/files/aspNET_Page_LifeCycle.jpg

Wednesday, August 6, 2008

Common Questions Links

For CLR/CTS
http://msdn.microsoft.com/en-us/library/zw4w595w.aspx (CLR)
http://msdn.microsoft.com/en-us/library/2hf02550.aspx (CTS)
For OOPS concepts (does not include abstraction)
http://www.eggheadcafe.com/articles/pfc/oopbasics.asp
For ADO.NET concepts in brief
http://en.wikipedia.org/wiki/Ado.net
Abstraction concept: http://forums.msdn.microsoft.com/en-US/csharplanguage/thread/8ad621b8-a915-4d7e-89c3-5dbbc47202fd/
--------------------------------------------------------------------------------
Difference between Overloading and Overriding (http://www.dotnetspider.com/forum/ViewForum.aspx?ForumId=36)
OverLoading :- Method Name remains the same with different signatures.[mostly happens for operators]
Overriding : - Method name and signatures must be same.[mostly for functions]


Marshal Class
Provides a collection of methods for allocating unmanaged memory, copying unmanaged memory blocks, and converting managed to unmanaged types, as well as other miscellaneous methods used when interacting with unmanaged code.