posts - 22, comments - 29, trackbacks - 0

My Links

News

Twitter












Archives

Post Categories

Friday, February 25, 2011

MS Tech Ed 2011 Coming Soon

Microsoft Tech ed 2010 was a great success.
Infact  Most of such conferences always provide a great place to meet other  technology enthusiasts and ofcourse,whats in the pipeline for future products of a company or field..

And yet again,MS Tech ed India is coming on 23-25 march  in Banglore,India.Well,the place is  ofcourse right suited for any IT/Computing conference.After all,Its Silicon Valley of India..

From Last year.I remember  a session by Harish about  “Building pure client side apps with  Jquery and Microsoft Ajax .”

Here’s the video:

http://live.viasilverlight.com/TechEdOnDemand/Breakouts/TheWebSimplified1/Session4/AjaxClientSideApps.wmv

At that time only,I got to know that jquery is so easy to use for  ajax or client side templating.Though I prefer jquery over  Microsoft Ajax many folds.UpdatePanel  is Dead for sure in my view.
I believe,Web forms will be dead sooner or later with ASP.Net  MVC  gaining share many folds.(TODO:Learn MVC).

The new standard is surely:JQUERY .

Between,Last years videos and ppt’s  are available to browse and download:
http://microsoftteched.in/2010/downloads.aspx

After going through Tech Ad 2011 session agendas : http://www.microsoft.com/india/teched2011/agenda.aspx

Few of my personal choices to watch would be:

Day 1: a) Identity And Access Control in the Cloud
       b)Windows 7 at  Home:Digitizing your Home.(Sounds cool.)
       c) And ofcourse,Jquery and MS ajax(Lets see if MS can do something that’s not already happening with their version Of Ajax)..

Day 2:  a) Lap Around Silverlight 5 and Html 5 as I have heard some hot talks that html5 will kill Silverlight,(I don’t see it in near future though).

       b) Html 5 more than “Html 5”…Google will be seeing this one.

Day3: a) Cross Browser applications in Azure
      b)VS 2010 sessions of automated testing azure apps etc.

Windows Phone 7 sessions will surely be of more interest now after MS-Nokia Deal.

Though,Personally,I would want atleast some worth of  sessions on MS  future in Robotics,AI.Perhaps  I am looking at wrong place..(When is PDC?)

And Since,Bill Gates  consider Robotics as the next big thing,

Refer  this one : http://www.cs.virginia.edu/robins/A_Robot_in_Every_Home.pdf 

I am sure,they wont loose this new hot spot to competitors,  like how google rules in Online  Search now.Robotics and AI will surely provide a big battlefield  for future.See,What IBM is doing with IBM Watson.

OR see this, http://www.sciencedaily.com/releases/2011/02/110218083711.htm

this is cool only if you can control your mind.Atleast,I’ll prefer regular driving (I would devote my mind seeing  people,places which we see on road).thats what jouney makes “cool”.:P.

 


 

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Posted On Friday, February 25, 2011 1:52 AM | Feedback (0) | Filed Under [ .Net Fun ASP.net Robotics ]

Saturday, March 20, 2010

Whats new in My Life:Robotics,Azure

AZURE:

I haven’t blogged from long time.I was actually busy with doing some Azure.

For any starters with Azure,I would recommend to go with Neil:

http://nmackenzie.spaces.live.com/Blog/cns!B863FF075995D18A!564.entry

Awesome content.

 

Another thing that has come in my interests:Robotics

Yes,I am finally reading up on robotics, specially the mobile robotics.

Since,I don’t have any prof to guide yet,I am doing it independently by reading research papers and books.

My first robot is not autonomous but i am actually making it for RoboWars.

I got inspired by this video of Steve jobs and I think,I love to work on robotics.Perhaps ,thats my love.

http://www.youtube.com/watch?v=Hd_ptbiPoXM

Cya

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Posted On Saturday, March 20, 2010 6:46 PM | Feedback (0) | Filed Under [ Fun ]

Thursday, December 24, 2009

Capturing optional groups in regular expressions?

  string input = @"cool  man dog no dude yes fight son";
  string pattern = @"cool (?<hello>((.)* ))   (?<h>( (dude)?)) (?(h)(?<dude>((.)*)))";
            
       MatchCollection matches = Regex.Matches(input, pattern, RegexOptions.ExplicitCapture
              | RegexOptions.IgnorePatternWhitespace);


            foreach (Match match in matches)
            {
                Console.WriteLine("dude=" + match.Groups["dude"].Value);
                Console.WriteLine("hello=" + match.Groups["hello"].Value);
                Console.ReadLine();
            }
/*Output-


dude=
hello=  man dog no dude yes fight son

*/

But the required output is:

/*Output-


dude=yes fight son
hello=  man dog no

*/


The target is that i want to capture "strings that have cool as first 'word'  and have 'dude' word as optional in between".
Now,I want string that follows word "cool" ("man dog no") until "dude" word comes or end comes.
if "dude" word comes,I want the string that follows word "dude".

Can anybody explain me why the output is not correct or where i am wrong?
Thanks in advance.

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Posted On Thursday, December 24, 2009 7:05 AM | Feedback (2) | Filed Under [ Fun ]

Sunday, October 04, 2009

Adding controls dynamically in ASP.Net?

The Problem scenario is like this:

I have a button and a textbox on a asp.net page:

<asp:Panel ID="Panel1" runat="server"

          

                <asp:TextBox ID="GroupName" runat="server" Width="352px” />

                <asp:Button ID="CreateGroup" runat="server" Text="Create"

                onclick="CreateGroup_Click"    />

                     

 </asp:Panel>

<asp:PlaceHolder ID="PlaceHolder1" runat="server"   />

 

When I click the button a label should be added dynamically to the placeholder located in the page:

The code in click event handler is as:

protected void CreateGroup_Click(object sender, EventArgs e)

        {

         

 

            Label label = new Label();

            label.Text = GroupName.Text;

            label.ID = GroupName.Text;

            PlaceHolder1.Controls.Add(label);

        }

 

Its working but the problem is only last label are added to placeholder not the previous ones like:

If I put “Computer” in texbox and click,then the label is added .fine.

But If I put again “science” and click,then the label with “science” is added but the previous label is not rendered.

 

Any guesses,solutions?

Well..here are some workarounds:

You can use this:SEE THE EXPLANATION WHY ITS HAPPENING:

http://igregor.net/post/2007/12/24/Adding-Controls-to-an-ASPNET-form-Dynamically.aspx

Or this:

http://stackoverflow.com/questions/113392/dynamically-added-controls-in-asp-net

http://www.4guysfromrolla.com/articles/092904-1.aspx

Or the best solution is

Avoid dynamically creating controls.Actually creating controls dynamically is not the problem but maintaining there state might be.

Instead of storing dynamically added controls in ViewState,

You can use a collection to store them and store it in ViewState[Updated] . But I would again say,Avoid such things as much as possible..

If you get any better workaround ,Please do point me to that.

In my opinion,The best Solution will be the solution which will add the controls just like they are added at design time.But design time is different than runtime..Which occurs after compilation.

Please read the second comments that follows this post(Some nice cons of static variables in ASP.Net pages).

I am pasting here as i really liked the "Disadvantages of static variables in ASP.NET"

"You can use a collection to store them and declare it as static"  I need to caution against this. I have learned some hard lessons with this.

I have many developers use static variables in their ASP.NET pages and NOT realize thast every user shares that variable.

If I have static array of strings that a button click adds to, and I have 2 users click that button, there will be 1 array 2 items in that array. A page where this is the intended affect desireable is rare.. and probally badly designed :).

The implications of adding a Control as a static member would be much, much worse. (GC collection and a threading nightmare!)

Storing Meta data using a client-specific storage, like Viewstate may be the way to go.

 

 

 

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Posted On Sunday, October 04, 2009 10:58 PM | Feedback (3) |

Tuesday, July 21, 2009

Setting "WindowStyle=None" hides taskbar on maximizing


If you ever tried to make irregular windows in wpf and used setting windowstyle=none,You might have used some code like this to enable minimising,maximising properties for the window:

        private void Minimize_Click(object sender, RoutedEventArgs e)
        {

            this.WindowState = WindowState.Minimized;

        }

        private void Maximize_Click(object sender, RoutedEventArgs e)
        {

            this.WindowState = WindowState.Maximized;

        }

But on maximizing  ,the window hides the taskbar.i.e it goes fullscreen.
To avoid that issue,You can use this code and yes,it works like a charm.

http://blogs.msdn.com/llobo/archive/2006/08/01/Maximizing-window-_2800_with-WindowStyle_3D00_None_2900_-considering-Taskbar.aspx

    public override void OnApplyTemplate()
{
System.IntPtr handle = (new WinInterop.WindowInteropHelper(this)).Handle;
WinInterop.HwndSource.FromHwnd(handle).AddHook(new WinInterop.HwndSourceHook(WindowProc));
}

private static System.IntPtr WindowProc(
System.IntPtr hwnd,
int msg,
System.IntPtr wParam,
System.IntPtr lParam,
ref bool handled)
{
switch (msg)
{
case 0x0024:/* WM_GETMINMAXINFO */
WmGetMinMaxInfo(hwnd, lParam);
handled = true;
break;
}

return (System.IntPtr)0;
}

private static void WmGetMinMaxInfo(System.IntPtr hwnd, System.IntPtr lParam)
{

MINMAXINFO mmi = (MINMAXINFO)Marshal.PtrToStructure(lParam, typeof(MINMAXINFO));

// Adjust the maximized size and position to fit the work area of the correct monitor
int MONITOR_DEFAULTTONEAREST =0x00000002;
System.IntPtr monitor = MonitorFromWindow(hwnd, MONITOR_DEFAULTTONEAREST);

if (monitor != System.IntPtr.Zero)
{

MONITORINFO monitorInfo = new MONITORINFO();
GetMonitorInfo(monitor, monitorInfo);
RECT rcWorkArea = monitorInfo.rcWork;
RECT rcMonitorArea = monitorInfo.rcMonitor;
mmi.ptMaxPosition.x = Math.Abs(rcWorkArea.left - rcMonitorArea.left);
mmi.ptMaxPosition.y = Math.Abs(rcWorkArea.top - rcMonitorArea.top);
mmi.ptMaxSize.x = Math.Abs(rcWorkArea.right - rcWorkArea.left);
mmi.ptMaxSize.y = Math.Abs(rcWorkArea.bottom - rcWorkArea.top);
}

Marshal.StructureToPtr(mmi, lParam, true);
}

As seen above the code basically handles the WM_GETMINMAXINFO message. The sample project code is also included. Have Fun. :)

 

Update: A better way to get the handle to the window is to use the SourceInitialized event. This would also avoid calling ApplyTemplate everytime the window template is changedon the fly. Thanks to Hamid for pointing out the better solution. The attached project is now updated.

win.SourceInitialized += new EventHandler(win_SourceInitialized);

void win_SourceInitialized(object sender, EventArgs e)
{
   System.
IntPtr handle = (new WinInterop.WindowInteropHelper(this)).Handle;
   WinInterop.
HwndSource.FromHwnd(handle).AddHook(new WinInterop.HwndSourceHook(WindowProc));
}

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Posted On Tuesday, July 21, 2009 11:49 PM | Feedback (0) |

What happened to my vacations

College is opening tommorow and I am thinking what i have done in past 1 and half months of vacations.

The only thing i can remember is bluz,my open source project.
Where is that p2p thing i decided earlier?
All the research papers about skype,overlay networks ,guntella etc are lying there on disk as it is.i have read them only once.I have read not understood..

The positive side of vacations is:
1)I learned a lot about WPF,Blend etc.
2) I am participating in win7 contest based on above experience.
3)I met shaun,my  new co-developer of bluz..
4)I have got some books of ASP.Net by bill ,scott and  WPF book by Mathew macdonald..

And now i have some web 2.0 ideas that i hope to implement as a way of parcticing this ASP.net stuff.Thats a business idea,So you might  see something interesting on web soon.


So,If i look back that way,I think it was more rewarding than any of internship i could get.

Now ,its my last year of  graduation,My targets include:
1)Enjoy it fully.I know thats hard but i'll have to make this year remeberable .
2)Implement business ideas.(I love making money in humanatic way).
3)Make final year Project.
The 3rd one is where i'll cut my efforts ,Becoz i don't think that really matters as compared to my learning.Also,I don't see potential partners for a cool. .Net team to make a cool project at the college.

cya guys,
cheers

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Posted On Tuesday, July 21, 2009 5:20 PM | Feedback (0) |

I am gonna win this contest

Hii guys,
Just heard about this

https://www.code7contest.com/

If you have a little experience with MS .Net and you are as empty as me,Have a look over it.

The prizes are awesome and mouth watering .You will have to grasp a little about the windows 7 techonolgies though .But you can do that for atleast 17777$.


I am getting ready with a killer app idea..yes it is a a killer idea,Either it will Kill MS or my Laptop.lol!(Sorry bill,its a metaphor,don't take it serious.)

And the best thing is that ,My Last 2-3 months of WPF experience is what gonna be tested.
The deadline is short but thats good for me ,I am entering with an optimistic mind,Hope to see you guys at LA soon..

cheer with a beer.(I don't drink though)


  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Posted On Tuesday, July 21, 2009 7:57 AM | Feedback (1) |

Wednesday, July 15, 2009

New Open Source Project-Bluz(Next Generation Media Player)

hi guys.

I have just released a pre beta release of next generation media player bluz.

Link is here:


http://code.google.com/p/bluz/

Its based on vlc libraries and bass and a couple of others for various tasks.
Its in c#,WPF but if any of you would like to contribute through any means.
The UI is purely in XAML,I am not a good designer,Even all icons are made in XAML.
.
If any of you would like to contribute through coding various modules or helping me develop the website,it would be nice of you to make it a hit on windows OS.

Atleast,U guys can check out and report any bugs you find to me directly..

It requires .Net 3.5
Have a nice day.



Screenshots:






  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Posted On Wednesday, July 15, 2009 8:49 AM | Feedback (0) |

Thursday, June 11, 2009

Extracting Album art from An Audio File

I have moved the tagging features for my media player application from MediaInfo to taglib-sharp.
because taglib-sharp provides writing of tags back to audio files too..
As a matter of fact,
Everything else was fine but,it took me whole half day to figure out how to display an image (album art) from taglib-sharp.

I thought to finally post this workaround.

    TagLib.File file = TagLib.File.Create((FilePath); //FilePath is the audio file location

                TagLib.IPicture pic=file.Tag.Pictures[0];  //pic contains data for image.



                MemoryStream stream = new MemoryStream(pic.Data.Data);  /create an in memory stream

              Image im = new Image();


              BitmapFrame bmp = BitmapFrame.Create(stream);

              im.Source = bmp;
now u can use this image as a normal image..:)..i.e transformation,animation should be possible as usual.

cheers, i didn't  got any  post on web till now even after searching Novell's Repositories..Hopefully it helps to somebody out there .

           
 
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Posted On Thursday, June 11, 2009 3:27 AM | Feedback (4) |

Sunday, May 03, 2009

I got task for summers:Study p2p architectures

This is in continuation to my last post in which i was confused of "what  to do in summers".
After a lot of thinking,I have got the answer.
I'll study/research on "p2p architectures and there use in enterprises"...Lets see how it goes,i have semester exams next week and i have downloaded a lot of  books/technical papers to get started. ..

p2p will help me distinguish my music player from others in the market...

I'll also look at using the p2p library "Brunet" which is not much publicized as gnutella ...You can see the work here:.
.
http://github.com/johnynek/brunet/tree/master

Its a work by Sir ,Oscar  BoyKin at UCLA(University of California)..For a weath of softwares and knowledge/he blogs at:
http://boykin.acis.ufl.edu/

I'll make my player a true web 2.0 social app..doing some homework in p2p architectures will be good for my summers...

And I'll keep posting tuts/links or any cool things that i'll encounter in my p2p research.I am really excited for it.

Have a happy coding.
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Posted On Sunday, May 03, 2009 12:14 AM | Feedback (0) |

Powered by: