Wednesday, December 31, 2008

Monday, December 29, 2008

Sunday, December 28, 2008

WPF and BackgroundWorker

Code from http://pavanpodila.spaces.live.com/blog/cns!9C9E888164859398!246.entry :

namespace WindowsApplication1
{
///
/// Interaction logic for Window1.xaml
///


public partial class Window1 : System.Windows.Window
{
private BackgroundWorker _worker;
public Window1()
{
InitializeComponent();
}

private void StartWorker(object sender, RoutedEventArgs e)
{
_worker = new BackgroundWorker();
_worker.WorkerReportsProgress = true;
_worker.WorkerSupportsCancellation = true;

_worker.DoWork += delegate(object s, DoWorkEventArgs args)
{
BackgroundWorker worker = s as BackgroundWorker;
for (int i = 0; i < 10; i++)
{
if (worker.CancellationPending)
{
args.Cancel = true;
return;
}

Thread.Sleep(1000);
worker.ReportProgress(i + 1);
}
};

_worker.ProgressChanged += delegate(object s, ProgressChangedEventArgs args)
{
_progressBar.Value = args.ProgressPercentage;
};

_worker.RunWorkerCompleted += delegate(object s, RunWorkerCompletedEventArgs args)
{
_btnStart.IsEnabled = true;
_btnCancel.IsEnabled = false;
_progressBar.Value = 0;
};

_worker.RunWorkerAsync();
_btnStart.IsEnabled = false;
_btnCancel.IsEnabled = true;
}

private void CancelWorker(object sender, RoutedEventArgs e)
{
_worker.CancelAsync();
}

}
}

Friday, December 26, 2008

FLV Streaming using IIS and HTTP handler

ASP.NET 2.0
http://blogs.ugidotnet.org/kfra/archive/2006/10/04/50003.aspx

ASP.NET 1.1
http://blogs.ugidotnet.org/kfra/archive/2006/11/26/57225.aspx

Thursday, December 25, 2008

Flash file - parsing for metadata, generating a preview

Generating a Preview using PHP -
http://flashvideo.damnfinecoffee.eu/flv_preview

Reading a Flv's metadata using C# -
http://johndyer.name/post/2005/08/23/Flash-FLV-meta-reader-in-NET-(C).aspx

Streaming FLV using PHP
http://www.flashcomguru.com/index.cfm/2005/11/2/Streaming-flv-video-via-PHP-take-two

Wednesday, December 24, 2008

Search Strategy - improving upon 'google.com for everything' strategy

http://www.lib.berkeley.edu/TeachingLib/Guides/Internet/Strategies.html

Above link describes a search strategy that we should use when we want to search for a certain topic on the net.

The step that I found most useful - 'picking the right starting place'. The different starting places are -
Search Engines, Subject Directories, Specialized Databases, Experts

Search Engines - good for searching 'distinctive phrases'; e.g. - www.google.com

Subject Directories - good for 'overview on a topic', understanding the broader concepts etc; e.g. - directory.google.com, dir.yahoo.com

Specialized Databases - good for facts, statistics of a topic

Expert (Society,organization,author,discussion group,blog) - good for everything

Smaller HD space = faster?

http://www.computing.net/answers/hardware/smaller-hd-space-faster/51684.html

Above link has a good discussion about the topic. One of the suggestions - a large hard disk (300GB etc) should use 3 partitions at least - a small one (20GB or so) for OS, a 2nd one for Programs , 3rd one for storage.

"IMO, you should have a minimum of 3...a relatively small one for the OS, one for programs & one for storage. If the 300GB HDD is setup as one huge partition, of course it's gonna take longer to run maintenance utilities.

http://partition.radified.com/"

Understanding XP performance

The below forum post is from a user asking about PF usage in XP.
http://www.computing.net/answers/windows-xp/reducing-pf-usage/169167.html

One of the replies to the post contains the below links to understand performance related topics -

http://support.microsoft.com/default.aspx?scid=kb;en-us;555223
RAM, Virtual Memory, Pagefile and all that stuff

http://support.microsoft.com/default.aspx?scid=kb;en-us;310419&Product=winxp
Computer Speed and Performance May Decrease
When you open, then close programs, programs may not free up RAM memory. That is called
"Memory Leak". Restarting computer will clear out its RAM memory.

http://support.microsoft.com/default.aspx?scid=kb;en-us;308417
HOWTO: Set Performance Options in Windows XP

http://support.microsoft.com/default.aspx?scid=kb;en-us;314482
How to Configure Paging Files for Optimization and Recovery in Windows XP

http://support.microsoft.com/default.aspx?scid=kb;en-us;314834&Product=winxp
How to Clear the Windows Paging File at Shutdown

http://support.microsoft.com/default.aspx?scid=kb;en-us;307886
How To Move the Paging File in Windows XP

Tuesday, December 23, 2008

An engineer from IIT, now a farmer

http://specials.rediff.com/money/2008/dec/23slide1-an-engineer-from-iit-now-a-farmer.htm

Madhavan, a mechanical engineer who garduated from IIT Madras worked for ONGC for 9 years, saved enough money to buy 6 acres of land and started farming on that land. He started making a profit only after 4 years partly because of the time it took him to get the required know-how. He says it took him 4 years in the 90s to get the know-how but can do the same in 6 months now given the current communication and information facilities. He has a net annual income of 50,000 from 1 acre. He is trying to make improvements so that that figure will become 100,000 from 1 acre. He currently has 10 acres of land and comes into the small-farms category. He mentions the lack of tools for small farmers.
If more food is produced per acre, the cost per acre will go down, reducing the cost per every meal, which he says is very high today in India, when compared to the US.

Vertical farming

http://science.howstuffworks.com/conservation-issues/vertical-farming.htm

Summary - idea is to do farming in buildings in urban areas. This could be the future of farming as most of the world's population is moving to urban areas and arable land decreasing in percentage. Since farming is carried out indoors, conditions can be controlled.

"Dr. Despommier believes that 150 30-story farms could feed all of New York City. Elegantly designed, these vertical farms would be carefully placed around a city or clustered together in a nearby development (in the case of New York City, possibly on Governor's Island). They would remain unobtrusive, or even pleasant to the eye."

Article has pointers to more information as well.

Rinku and Dinesh - Baseball pitchers for Pittsburgh Pirates

http://sports.espn.go.com/broadband/video/videopage?videoId=3785319&categoryId=3286128&n8pe6c=2

Bollywood - Online business (Vivah - was released online and in theatres on the same day!)

The below Time article talks about the new option of releasing Bollywood movies online at the same time as the theatres. Vivah was released like that and it made $4.5 million dollars which was almost a quarter of the movie's entire earnings.

http://www.time.com/time/magazine/article/0,9171,1713342,00.html

http://www.Rajshri.com
http://www.erosentertainment.com/

Monday, December 22, 2008

Outside.In - a hyper-local news service

http://broadcastengineering.com/news/outside-in-attempts-1222/

Outside.in started as a service that aggregated local bloggers who cover topics that a town's citizens are passionate about.

The service can tell advertisers where a reader is and affirm that they are reading about their neighborhood.

"Outside.In helps small publishers find an audience and aides larger publishers in finding local stories. By serving up all this local content, it hopes to help advertisers target the reader on precise streets. The service can tell advertisers where a reader is and affirm that they are reading about their neighborhood. That means an ad for a bookstore that is 50ft from the reader will be more useful for the advertiser and the reader."

Glossary for Broadcasting/Webcasting technology

http://broadcastengineering.com/glossary/

64 bit encoding

http://digitalcontentproducer.com/affordablehd/newsletter/cs4_64bit_1208/index.html?imw=Y

The author of the above article found that CS4 on 64 bit machines - Windows and Apple (since they can work with a larger RAM) outperformed CS4 on a 32 bit Windows machine significantly in terms of speed when CS4 was used to convert AVHCD.

AVCHD (Audio and Video Compression for High Definition) is a high-definition and standard-definition recording format for use in digital tapeless camcorders.

32 bit Windows (eight core, 2.83GHz HP xw6600, 3GB RAM) - 68 mins
64 bit Apple OS X 10.5.5 (3.2GHz, 8GB RAM) - 11 mins
64 bit Windows (eigt 3.33GHz cores, HP xw8600, 16GB RAM)- 8.5 mins

In fact, Adobe recommends (from Adobe's reply to the author) to use 64 bit machines with CS4. Its new architecture splits up the application into separate executables. Each executable has to be 32 bit to maintain compatibility with 32 bit machines and hence can access upto 4 GB RAM only. But, since the application consists of separate executables, the combined RAM that is available for the app is more than 4 GB. And compatibility with 32 bit machines has also been achieved.

Apple Compressor 3

Apple Compressor 3

Uses Optical Flow analysis and Dynamic Upsampling techniques (analyze motion of pixels from frame to frame and create new frames for the output clip) - superior to Frame Blending technique used by other technologies

Features -
Batch processing
SD,HD, Mpeg2, H264, VC1, WMV, GXF, FLV
Prepare video content especially for Apple TV, Ipod, DVD, Mobile Phones
Can leverage multiple MACs on the network to distribute encoding tasks using QMaster (that is available with every copy of Final Cut Studio)
Metadata and support for closed captioning

Portable Live Encoders - TouchStream (Digital Rapids), GoStream (Viewcast), Tricaster

1. Portable live encoder that is operated using a touch screen

http://www.digital-rapids.com/Products/IndividualProducts/TouchStream.aspx

YouTube video - http://www.youtube.com/watch?v=dBmiLQhT33A&feature=related

2. GoStream
Very good review at -
http://digitalcontentproducer.com/videoencodvd/revfeat/viewcast_niagara_gostream/

Can use IPod or Zune as input device
No support for SDI, Component vide at the time of review in 2007

3. Tricaster

Sunday, December 21, 2008

3 monitors on a Windows XP machine

http://www.microsoft.com/windowsxp/using/setup/learnmore/northrup_multimon.mspx
http://daggle.com/060223-231233.html

Excerpts from the above links -

What is MaxiVista?
MaxiVista turns any networked computer into an external monitor. MaxiVista's only hardware requirement is that the two computers must connect to each other across a network, so it's perfect if you can't add an extra video adapter. I have a network adapter for my old laptop, so I connected it to my network and installed the free MaxiVista demo. It worked and my laptop's desktop was immediately spread across three displays, as shown in Figure 1.

Manage Multiple Monitors with Ultramon
There's a downside to using multiple displays—it's hard to keep track of your windows. Arranging windows on each of the different displays requires dragging and dropping, which takes as long as switching between windows with the taskbar. The Windows XP General newsgroup has many questions from people with similar complaints, and everyone gets the same answer: Ultramon.

Ultramon makes it easier to work with multiple displays by adding a taskbar to each monitor, adding a button to the title bar of every window that you can use to move it to a different monitor, and letting you quickly switch between different monitor configurations. I configured Ultramon so that pressing F4 moves a window one display to the right and pressing F3 moves it one display to the left, as shown in Figure 2.

2 mouse , 2 pointers, 1 computer

http://www.experts-exchange.com/Hardware/Misc/Q_21306997.html

Excerpt from one of the posts from Experts-Exchange -

1st download: http://prdownloads.sourceforge.net/cpnmouse/cpnmouse-driver-binary-1.0.1.zip?download
2nd download: http://prdownloads.sourceforge.net/cpnmouse/cpnmouse-ordinary-binary-0.1.0.zip?download

Unpack etc...

Then go to your hardware manager: Update driver for each of your mouses connected. Use the supplied driver from cpnmouse-driver-binary.
During installation choose the kind of your mousetyp: serial, PS/2, USB respectivly.

If at least 2 mouses are supported, you are in the game. Now start the exe from cpnmouse-ordinary-binary. It will find all mices that are using that special driver. Now a red cursorblock appears, that can be directed with 1 mouse. The ordinary mouse cursor remains.
That's it. Good Luck with your hardware. If just one mouse is supported you can still see that red cursor block, but it is not that much fun.

Dressing properly in winter

http://www.weather.com/activities/recreation/outdoors/extreme/layerintro.html?from=tenday_trigger

Layer 1: Wicking
Layer 2: Insulation
Layer 3: The Shell
Use a Hat, Get Good Gloves, Protect Your Feet

Top 10 Survival Items

http://adventure.howstuffworks.com/10-survival-tools10.htm

Map and Compass
Fire-starter
First Aid Kit
Mirror
Flares
Survival Knife (Rambo)
Multi-tools (Swiss Army Knife)
Snake-bite kit
Water treatment - water filters etc
Machete

Dec 21, 2008 - Pan IIT 2008 , Rural development, Agriculture

Learn about farming here - http://42explore.com/farming.htm
www.agriculture.com

Pan-IIT 2008 at IIT-Madras in Chennai :

Surprisingly, of the six themes -- Research (leveraging research and technology in rural development), Entrepreneurship (enabling and launching a million entrepreneurs), Infrastructure (opportunities & problems in India), Education (transforming education for a better tomorrow), Innovation (innovation & entrepreneurship), the theme that has attracted the maximum number of people was Rural Transformation!

An IIT-M alumnus, R Madhavan is a farmer today. He spoke of his successful Padapai Farms and why he chose to be a farmer and not an engineer.
http://www.youtube.com/user/Madhavan65

The man who won the heart of all listeners was Popatrao Pawar, a village sarpanch from Ahmednagar district in Maharashtra. In eight years, Popatrao transformed his village of 180 families with his many projects which include the successful 'pani panchayat'. Today, the World Bank has included a visit to this village as a must for its staff.

Website -
http://www.paniit2008.org/

YouTube videos of Rural Development presentations -
http://paniit2008.org/index.php?option=com_content&task=view&id=298&Itemid=152

Blog Archive