Profilo di ambatiProgramming Myself.. Amb...FotoBlogElenchiAltro ![]() | Guida |
|
30 aprile Youtube.aspx: Autoplaying capability2nd Project Youtube.aspx: Having only Autoplaying capability
<html xmlns="http://www.w3.org/1999/xhtml" > </script> Its code behind: public partial class MuteOff_YouTube : System.Web.UI.Page /// <summary> /// <summary> /// <summary> //by search }
Youtube Mute AutoplayFirst project: having mute ,autoplaying functionality
For Mute functionality u require this js file Required js file: (for mute functionality http://code.google.com/apis/youtube/js_api_reference.html) Youtube.aspx: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="YouTube.aspx.cs" Inherits="YouTube" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head id="Head1" runat="server"> <script type="text/javascript" src="swfobject.js"></script> <title>Querying YouTube using C#</title>
{ var objplayer =document.getElementById("myytplayer"); objplayer.mute(); }
{ if (videoid=="") return; var params = { allowScriptAccess: "always" }; var atts = { id: "myytplayer" }; swfobject.embedSWF("http://www.youtube.com/v/" + videoid + "&autoplay=1&enablejsapi=1&playerapiid=ytplayer", "divVideo", "425", "356", "8", null, null, params, atts); }
{ var objplayer =document.getElementById("myytplayer"); if (objplayer != null) objplayer.unMute(); }
</head> <body onload ="showVideo('<%=strVideoId%>')" onunload="makeDefault()"> <form id="form1" runat="server"> <div> Enter search <asp:TextBox ID="txtSearch" runat="server"></asp:TextBox> <asp:Button ID="btoSearch" runat="server" OnClick="btoSearch_Click" Text="Search" /><br /> <br /> <asp:Label ID="lblResults" runat="server" Text="Label" Visible="false"></asp:Label></div> <div id="divVideo"> </div> </form> </body> </html> Its code behind: using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using Google.GData.Client; using Google.GData.Extensions; public partial class YouTube : System.Web.UI.Page { public string strVideoId = string.Empty; /// <summary> /// Create and returns and Google.GData.Client.AtomFee from url with the specific start and number of items /// </summary> /// <param name="url"></param> /// <param name="start"></param> /// <param name="number"></param> /// <returns></returns> private static AtomFeed GetFeed(string url, int start, int number) { System.Diagnostics.Trace.Write("Conectando youtube at " + url); FeedQuery query = new FeedQuery(""); Service service = new Service("youtube", "exampleCo"); query.Uri = new Uri(url); query.StartIndex = start; query.NumberToRetrieve = number; AtomFeed myFeed = service.Query(query); return myFeed; }
/// Gets html code to display video /// </summary> /// <param name="id"></param> /// <returns></returns> private void RenderVideoEmbedded(string id) { //return string.Format("<div id=\"video{0}\"><object width=\"425\" height=\"355\" id=\"srdee\"><param name=\"movie\" value=\"http://www.youtube.com/v/{0}&rel=1&enablejsapi=1&playerapiid=srdee\"></param><param name=\"wmode\" value=\"true\"></param><param name=\"allowScriptAccess\" value=\"always\"></param><embed src=\"http://www.youtube.com/v/{0}&rel=1&autoplay=1&enablejsapi=1&playerapiid=srdee\" type=\"application/x-shockwave-flash\" wmode=\"true\" width=\"425\" height=\"355\"></embed></object></div>", id); // return string.Format("<div id=\"video{0}\"><object width=\"425\" height=\"355\" id=\"srdee\"><param name=\"movie\" value=\"http://www.youtube.com/v/{0}&rel=1&enablejsapi=1&playerapiid=srdee\"></param><param name=\"wmode\" value=\"true\"></param><param name=\"allowScriptAccess\" value=\"always\"></param><embed src=\"http://www.youtube.com/v/{0}&rel=1&autoplay=1&enablejsapi=1&playerapiid=srdee\" type=\"application/x-shockwave-flash\" wmode=\"true\" width=\"425\" height=\"355\"></embed></object></div>", id); strVideoId=id ; } /// <summary> /// Converts URL ID to short one /// </summary> /// <param name="googleID"></param> /// <returns></returns> private string getIDSimple(string googleID) { int lastSlash = googleID.LastIndexOf("/"); return googleID.Substring(lastSlash + 1); }
/// Renders feed in example aspx page /// </summary> /// <param name="myFeed"></param> private void DisplayFeed(AtomFeed myFeed) { System.Text.StringBuilder sb = new System.Text.StringBuilder(); foreach (AtomEntry entry in myFeed.Entries) { #region render each sb.Append("<br /><b>Title:</b> "); sb.Append(entry.Title.Text); sb.Append("<br /><b>Categories:</b> "); foreach (AtomCategory cat in entry.Categories) { sb.Append(cat.Term); sb.Append(","); } RenderVideoEmbedded(getIDSimple(entry.Id.AbsoluteUri)); sb.Append("<br /><b>Published on:</b> "); sb.Append(entry.Published); #endregion } this.lblResults.Visible = true; this.lblResults.Text = sb.ToString(); }
//feel free to change number of items, by there is a limit of 50, I believe. //If you want to retreive more, you have to do a loop (retrieve 1-50, then 51 to 100, etc) protected void btoSearch_Click(object sender, EventArgs e) { string url = "http://gdata.youtube.com/feeds/videos?q=" + this.txtSearch.Text; AtomFeed myFeed = GetFeed(url, 1, 1); DisplayFeed(myFeed); } }
YouTube APIs revealedAs per of my current project I worked on Google YouTube Apis.
No need of developer key.
There is a change in old and new apis. (http://code.google.com/apis/youtube/migration.html)
I started my application with this code base : http://www.dotneat.net/2007/12/20/QueryingYoutubeAPIUsingC.aspx
Then I developed two extensions to it.
One is mute and autoplaying of the video on click of search button.Once closing the page it should made in default state ie unmute.
I have a textbox and a button.Search for a keyword and click on button. Then the youtube player automatically instantiates and automatically plays the video in mute state. When u r closing the page it will be return to unmute state so that the other pages which should be played with sound wont effect.
For autoplay u have to use " &autoplay=1" in "http://www.youtube.com/v/{0}&rel=1&autoplay=1&enablejsapi=1&playerapiid=srdee\"
For further help: http://groups.google.com/group/youtube-api (google groups) http://www.eamonnflynn.net/YouTubeDotNet/YouTubeApi.htm (another sample application) http://www.rushfrisby.com/apps/youtube-api-dotnet.aspx (another sample application) http://www.rushfrisby.com/youtubedotnetdemo/ code demos http://code.google.com/support/bin/topic.py?topic=12357 (faqs) http://gdata.youtube.com/feeds/videos?max-results=1&vq=flower (view it in youtube site) http://code.google.com/apis/youtube/js_api_reference.html (Javascript youtube api reference) http://code.google.com/apis/youtube/migration.html (Difference in old and new youtube api : Syntax changes) 28 aprile BangaloreBIOOn Friday night I went to my friend's room who is my colleague once.
We discussed about different virtualization softwares (vpc, vmware,vmplayer) and how to use them.
He showed his current project too on Life Sciences which is meant for pharma companies which contains modules from database management, clinical trails, inventory and logistics management etc etc.
He is working in a new startup and he is the sole member in India.
He got 2 tickets for BangaloreBIO event and he told me to come to that event.
Actually I have no interest to go there.
But for his sake I went to that on Saturday morning at Bangalore International Exhibition Centre (BIEC)
Bangalore after Peenya industrial estate. Its an international event ( from 24 - 26) .UK,France,Australia,US have participated too.
So many stalls were kept (nearly 50) by both India and foreign companies.
A big crowd both from pharma , related software companies and students too.
Companies like Merck,Avathesgis, Biocon etc .. kept their stalls.I worked for some these clients in my earlier companies.
I came to know about BioInformatics and some companies..
the good thing I learned about the market of Bioinformatics..
One more thing how colleges are creating unnecessary hipe around Biotechnology engg, biochemistry, bio... courses.
I felt its worth for me to go there.
I left in the afternoon and went to sp road for buying dvd drive
Then I went to electronic city to meet my friend ( MSP) Aakash who is a student in PES college.
He is expert in Mac OS. He taught me how to tweak Leopard OS , and IPHONe SDK .It works on Leopard and this OS cant work in vmware or external harddisks.Like that Apple has blocked the hardware. I saw how to use SDK on Mac system.It wont work in Windows. Itunes is required like activesync for windows mobile.
Then I got to know how to work on Opensocial (orkut ,hi5 etc.. they formed as an association) apis which is giving competition to facebooks apis.He developed an APP which has become very popular now.Its a tagging app on Orkut friends.
Then about twitter,torrents (seeds,),firewalls.
Then I went to Marthahalli to meet my engg college junior who has done his Mtech in IIT Kanpur.Now he has 2 yrs experience.
He told me one interesting thing. How Oracle has misused him and now he is with Cisco. Here also no suitable good work. So planning for Amazon.
Really how IITians are being misused by big companies.
I got some training videos on Adobe ,and Java.
Now planning to work on these.
I went to room at 10 pm night.
Lot of travel on bus that day Saturday. But useful.
But yesterday I was sick because of pollution. So stayed in room and washed my clothes (Sunday) 25 aprile Adobe demo URLshttp://www.cornflex.org/?cat=5 papervision3d--- flash opensource what is thermo RIA designer tool
Talking about Truly understanding Dynamic Controls & ViewStateSource: From Sendhil. This is for my purpose. If Sendhil says means 100% guarantee. It is worthful. An example project has been added to the series here. Quote Truly understanding Dynamic Controls & ViewState GETTING THE RIGHT MANAGERSource: Economic TimesGETTING THE RIGHT MANAGERGreat motivators, ones who make work fun are the right guys to leadRohit Chattar (Manager with an MNC) "I'M NOT motivated. The kind of work I'm doing is repetitive, monotonous and operational and is not challenging enough. I'm not learning anything new. I'm not growing..." These are complaints which IT managers often hear. And what does the manager do? Some point their fingers back at the employee and tell him where they failed to deliver. They detail the missed project deliverables and what they think is repetitive work. Sometimes the manager may bring out all that went wrong in the last 3-6 months denying all the reasons given by the employee irrespective of how genuine it may be. 24 aprile Nokia s60 wdgets developmentHi friends,
My name is Sreedhar Ambati. I am a dotnet developer but recently started working on Windows mobile.
I attended Nokia forums events both widgets and flashlite sessions. I struggled for getting started development in these areas.
Didn't get much support especially from the speakers after the session. They wrote official ids and personal ids in the session. But after the session didnt replied atlease to one mail.
So I tried and succeeded now atleast on widgets development.
My experience with Widgets .. a small sample application to get the feel for a new bee like me. Prerequisite : Java Run Time Environment 1.5 or above
Visit this: ( for installation of emulator or sdk)
http://www.forum.nokia.com/main/resources/getting_started/index.html left side: Resources -> Tools and SDKs --> Symbian c++ tools -->S60 Platform SDKs for Symbian OS, for
C++ --> See Download now button in the middle (3rd edition fp2 439 mb). By clicking on that you can
download "s60-3.2 sdk" .After downloading click on exe.
Then start- programs-s60 developer tools - 3rd edition fp2 sdk - emulator.
Now emulator runs.
We want some more ie webruntime toolkit
For that go here: http://groups.google.co.in/group/nokia-wrt-tools-beta join in this group. On the home page of this group you can notice : http://xdawrt001.ext.nokia.com/ and there also provides with username: wrt password: alpha.2008 By clicking on that link u r in "http://xdawrt001.ext.nokia.com/" From there u can download "Tools for Widget Developers" In the same site U can see "Web Developer's Library" browse that :: u r in http://xdawrt001.ext.nokia.com/Web_Developers_Library/webIndex.html
There from example widgets download al the 4 provided widgets "Keypad,Helloworld,Rss Reader, Travel Companion widgets"
Thats it.
Now how to use these widgets in our emulator .Explaination is given below change the names of the widgets that you downloaded from zip extension to .wgz extension
I installed s60 sdk in "d:\phonesamples "
Move the four widgets after changing their file extension to wgz to "d:\phonesamples\S60 \devices\S60_3rd_FP2_SDK\epoc32\winscw\c\Data\Others"
Now in emulator :
steps: 1. installation : click on menu ->organiser->file manager-> phone memory-> other ->"select the widget file ie helloworldwgz". select it . It prompts for installation either on phone or memory card.Select phome
memory and it installs .
2. Run the widget
click on menu- installations->helloworld widget.
Thats it
Note: When working with emulators you have to feel that u r operation mobile phone. Navigations are not mouse events . U have to choose the keys from the emulator. Patience is required when working with this Emulator as it is very very slow.
References:
http://www.forum.nokia.com/info/sw.nokia.com/id/4a7149a5-95a5-4726-913a-3c6f21eb65a5/S60-SDK-0616-3.0- mr.html
http://discussion.forum.nokia.com/forum/forumdisplay.php?f=160 http://xdawrt001.ext.nokia.com/ http://xdawrt001.ext.nokia.com/Web_Developers_Library/webIndex.html http://groups.google.co.in/group/nokia-wrt-tools-beta http://ambatisreedhar.wordpress.com (tech events in and around Bangalore) ScalabilitySource: Vinod Explained how youtube,flickr etc handling traffic Windows Live MeshLive Mesh is a synchronization system from Microsoft that allows files and folders to be shared and synchronized across multiple devices.Live Mesh consists of a software component that allows synchronization relationships to be created among different devices. Once a folder is set for synchronization, it will be available in all devices, and any changes made to the content of the folder will be reflected across all devices. Live Mesh uses FeedSync to convey the changes made in each device so that the changes can be synchronized. The information about devices and folders participating in a synchronization relationship is not stored locally but at the service-end.Devices in a sync relationship are collectively referred to as a Mesh. The Live Mesh software, called Mesh Operating Environment,is currently available only for Windows XP and Windows Vista; Mac OS X and Windows Mobile support will be added later. It can be used to create and manage the synchronization relationships between devices and data. Live Mesh also includes a cloud storage component, called Live Desktop. It is an online storage service that allows synchronized folders to be accessible via a website. Live Mesh also provides a remote desktop software called Live Mesh Remote Desktop that can be used to remotely connect and manage to any of the devices in a synchronization relationship. 23 aprile Freecycle mission statement"Our mission is to build a worldwide gifting movement that reduces waste, saves precious resources & eases the burden on our landfills while enabling our members to benefit from the strength of a larger community." People interested in RunningFrom my colleague Ramjee:
People who have passion towards running can refer these Bangalore groups:
http://greaterbangalorehash.com/whythey.html http://groups.google.com/group/runnersforlife-bangalore?hl=en-GB
StorageI usually heard people in storage domain feel proud.
They proudly tells that they are working in HP,emc2, Tivoli, Data Domain etc .. in storage domain.
They tells that they are working in c,c++ with unix platform.
Till this it is ok.
But they also comments that they dotnet , java are for low programmers and they consider themselves as big shots.
People from VLSI , Embedded systems also treats others like this only.
I wont agree for this.
Some of storage domain companies are American Megatrends, Bakbone, CommVault,Quantum ,Nexsar,Pillar,Legato , Telligentn etc.
If you want information on these areas its tough to find. They are closed areas.
In one of the session on Storage for ERP I got this URL,
http://www.snia-inida.org
Adobe India Flex Team BlogrollList of Adobe bloggers Source :http://raghuonflex.wordpress.com/2008/04/21/adobe-india-flex-team-blogroll/ compiled a list of incubators in IndiaSource : http://www.svaksha.com/?p=39
1] IIM Bangalore
Hari also has a list of incubation centres in India. Do leave a comment if you find any broken links and if you know any INcubators and angel investors in INdia. |
|
|