Search Results

Search found 141 results on 6 pages for 'n sai harish'.

Page 2/6 | < Previous Page | 1 2 3 4 5 6  | Next Page >

  • Playing HTML5 Video with fall back for IE8/IE7 and earlier versions of other browsers using Silverlight

    - by Harish Ranganathan
    One of the popular HTML5 tags is the video tag.  The ability to play videos without depending on a plugin is something that excites web developers to a great extent and no wonder you end up seeing video demos in all HTML5 conferences. Now, coming to HTML5 Video, the tag itself is simply <video id=”ID” src=”FILENAME.mp4/ogv/webm” > in the simplest form.  This also means that the video needs to be H.256 encoded MP4 format or some of the other formats as mentioned above.  For a detailed specification on this, check this Wikipedia article HTML5 video is supported by all the modern browsers such as IE9 (currently in RC stage), Mozilla Firefox 4 and Chrome latest versions.  Here below is a simple example of a HTML5 video tag and the screen shot of how it looks like in IE9 RC <!DOCTYPE html> <head></head> <body> <h1>This is a sample of an HTML5 Video</h1> <video src="video.mp4" id="myvideo">Your browser doesn’t support this currently</video> </body> </html> You can add attributes to the video tag such as “autoplay” which will automatically start playing the video.  Also, you can specify “poster” to display an initial picture before the video starts playing etc., but I am not going into those for now. This would play well in the modern browsers as mentioned above.  However, if the end users are viewing this page from an earlier version of browsers such as IE8/IE7 or IE6, this video wouldn’t play.  Whatever text that is specified between the video tags, would just show up. Note: for demo purposes, I went to the IE9 developer toolbar and chose IE8 as Browser Mode to exhibit this legacy behaviour.  However, in the interest of serving the larger community of users who visit the site, we would like to have a fall back mechanism for playing videos on older version of browsers. Now, Silverlight is supported in IE6/7 & 8 and other browsers too.  If we can have the same video encoded for Silverlight, we can put the fall-back code, as follows:- <video src="videos/video.mp4" id="myvideo">     <object height="252" type="application/x-silverlight-2" width="448">         <param name="source" value="resources/player.xap">         <param name="initParams" value="deferredLoad=true, duration=0, m=http://localhost/DemoSite/videos/video.mp4, autostart=false, autohide=true, showembed=true, postid=0" />         <param name="background" value="#00FFFFFF" />     </object> </video>   Note, this sample uses a Silverlight XAP file with the same video and uses the object tag to embed it instead of the HTML5 video tag. So, when I now run this sample and switch to IE8 (using the IE9 Developer toolbar’s Browser Mode), I get and when clicking on the “Play” icon, Note, there are multiple ways to play videos in Silverlight and this is one of the ways.  For a complete list of Silverlight samples, visit http://www.silverlight.net/learn/  Also, we can use Flash to play video in the fall-back mechanism as well. Thus, we can create a fall-back mechanism for playing HTML5 videos for the older browsers and hence ensure that the end users get to experience the same. Cheers !!!

    Read the article

  • FTP Publishing with the new Windows Azure Release

    - by Harish Ranganathan
    There is a good chance you might have stumbled upon the new Windows Azure Release that we made on June 6th.  Scott Guthrie’s Post quite summarizes the overall new features. One of my favorite features is the Windows Azure Websites and the ability to do publish files to Azure using your FTP Client. Windows Azure Websites offers low cost (free upto 10 websites) web hosting where you can deploy any website that can run on IIS 7.0, quickly. The earlier releases of Azure SDKs and the Azure platform support .NET 3.5 & above for running your applications.  This was a constraint for many since there are/were a lot of ASP.NET 2.0 applications built over time and simply to put it on Azure, many of you were skeptical to migrate it to .NET 4. Windows Azure Websites offer the flexibility of running IIS 7.0 supported .NET Versions which means you can run .NET 1.1, 2.0, 3.5 and .NET 4.  Not just that! You can also run classic ASP Applications. Windows Azure Websites don’t need you to go through the complexity of adding the Cloud Project Template and then publishing the Configuration Files.  Lets take a step by step understanding of Websites and publishing using FTP. I downloaded the Club Website Starter Kit from http://www.asp.net/downloads/starter-kits/club It also requires a database and I downloaded the SQL Scripts and created a SQL Server Database called Club. This installs a Web Site Project Template.  Note that I am running Windows 8 Release Preview and Visual Studio 2012 RC.  After installing the template, select File – New – Website and don’t forget to choose the Framework version as .NET 2.0 You can see the “Club Website Starter Kit” .  Once you select the Website gets created.  You would encounter a warning indicating that the Club Website Starter Kit uses SQL Express and the recommended database is LocalDB Express.  Click ok to continue.  Once the Website is created open up the Web.config and locate the “ClubSiteDB” connection string.  By default, it points to a SQL Express Database.  Instead configure it to use your local SQL Server. Also, open up Global.asax and comment out the following line if (!Roles.RoleExists("Administrators")) Roles.CreateRole("Administrators"); There seems to be an issue in the code that doesn’t create the role.  Post that, hit CTRL+F5 and you should be able to see the Website Running, as below So, now we have the Club Starter Kit site up running locally.  Moving to Azure Visit http://manage.windowsazure.com/ and sign up for a trial account.  This allows you to host up to 10 websites for free and a host of other benefits.  The free Websites can be extended to an year without any charge.  Once you have signed up, sign in to the portal using the Live ID used for sign up. After signing in, you would be presented with the “All Items” listing page which lists, Websites, Cloud Services, Databases etc.,  If this is the first time, you wouldn’t find anything. Click on the “Websites” link from the left menu.  Click on “New” in the bottom and it should show up a dialog.  In the same, select Website and click on “Quick Create” and in the URL Textbox, specify “MyFirstDemo” and click the “Create Web Site” link below. It should take a few seconds to create the Website.  Once the Website is created, click on the listing and it should open up the Dashboard.  Since we haven’t done anything yet, there shouldn’t be any statistics Click on the “Download publish profile” link in the right bottom.  This file has the FTP publishing settings. Also, if you scroll down you can see the FTP URL for this site.  It should typically start ftp://waws-xxxx-xxx-xxxx In the downloaded publish profile file, you can also find the ftp URL.  Pick the following from this file publishUrl (the 2nd one, the one that features after publishMethod =”FTP”) and the userName and userPWD that follows. Note that we have everything required to publish the files.  But since the Club Starter Kit uses Databases, we need to have the Database running on SQL Azure.  Go back to the Main Menu and click on “New” in the bottom but this time select “SQL Database” and provide “Club” as Database name for “Quick Create” If this is the first time a Server would be created.  Otherwise, it would pickup the existing server name. Once the database is created, you can use the SQL Azure Migration Wizard http://sqlazuremw.codeplex.com/ and provide the credentials to connect to local database and then the SQL Azure database for migrating the “Club” database.  The migration wizard UI hasn’t changed much and is the same as explained by me in one my posts earlier http://geekswithblogs.net/ranganh/archive/2009/09/29/taking-your-northwind-database-to-sql-azure-and-binding-it.aspx Once the database is migrated, come back to the main screen and click on the Database base in the Azure Management Portal.  It opens up the dashboard of the database.  Click on “Show connection Strings” and it would popup a list of connection string formats.  Choose the ADO.NET connection string and after editing the password with the password that you provided when creating the database server in the Azure Portal, paste it into the config file of the Club Starter Kit Website.  Just to reiterate, the connection string key is ClubSiteDB. Try running the Website once to ensure that the application though running locally could connect to the SQL Database running on Azure. Once you are able to run the website successfully, we are all set to do the FTP Publishing. Download your favorite FTP tool.  I use http://filezilla-project.org/ In the Host Textbox, paste the FTP URL that you picked up from the publish profile file and also paste the username and password.  Click on “QuickConnect”.  If everything is fine, you should be able to connect to the remote server.  If it is successfully connected, you can see the wwwroot folder of the Website, running in Azure Make sure on the “Local Site” in the left, you choose the path to the folder of your Website.  Open up the Website folder on the left such that it lists all the files and folders inside.  Select all of them and click select “Upload” or simply drag and drop all the files to the root folder that is listed above.  Once the publishing is done, you should be able to hit the SiteURL that you can find the dashboard page of the website.  In our case, it would be http://MyFirstDemo.azurewebsites.net That’s it, we have now done FTP publishing in Azure and that too we are running a .NET 2.0 Website on Azure. Cheers !!!

    Read the article

  • Visual Studio 2010 RC &ndash; Silverlight 4 and WCF RIA Services Development - Updates from MIX Anno

    - by Harish Ranganathan
    MIX is happening and there is a lot of excitement around the various releases such as the Windows Phone 7 Developer Preview, IE9 Platform Preview and few other announcements that have been made.  Clearly, the Windows Phone 7 Developer Preview has generated the maximum interest and opened a plethora of opportunities for .NET Developers.  It also takes the mobile development to a new generation and doesn’t force developers to learn different programming language. Along with this, few other releases have been out.  The most anticipated Silverlight 4 RC is out and its corresponding templates are also out there for you to download.  Once VS 2010 RC was released, it was much of a disappointment that it doesn’t support SL4 development as well as the SL4 Business Application Development (a.k.a. WCF RIA Services).   There were few workarounds though nothing concrete.  Earlier I had written about how the WCF RIA Services Preview does work with ASP.NET Development using VS 2010 RC. However, with the release of SL4 RC and the corresponding tooling updates, one can develop for both SL4 as well as SL4 + WCF RIA Services using VS 2010 RC.  This is kind of important and keeps the continuum going until VS 2010 RTMs.  So, the purpose of this post is to quickly give the updates and links to install the relevant tools. Silverlight 4 RC Runtime Windows Runtime or the Mac Runtime Silverlight 4 RC Developer Tools for Visual Studio 2010 RC Silverlight 4 Tools for Visual Studio 2010 (this would install the Runtime as well automatically) Expression Blend 4 Beta Expression Blend 4 Beta If you install the SL4 RC Developer Tools, it also installs the WCF RIA Services Preview automatically.  You just need to install the WCF RIA Services Toolkit that can be downloaded from Install the WCF RIA Services Toolkit Of course you can also just install the WCF RIA Services for VS 2010 RC separately (without SL4 Tools) from here Kindly note, all the above mentioned links are with respect to Visual Studio 2010 RC edition.  If you are developing with VS 2008, then you can just target SL3 (as I write this, there seems to be no official support for developing SL4 with VS 2008) and the related tools can be downloaded from http://www.silverlight.net/getstarted/ Basically you need to download SL 3 Runtime, SDK, Expression Blend 3 and the Silverlight Toolkit.  All the links for the download are available in the above mentioned page. Also, a version of WCF RIA Services that is supported in VS 2008 is available for download at WCF RIA Services Beta for VS 2008 I know there are far too many things to keep in mind.  So, I put a flowchart that could help with depicting it pictorial.  Note that this is just my own imagination and doesn’t cover all scenarios.  for example, if you are neither developing for Webform, Silverlight, you end up nowhere whereas in actual scenario you may want to develop Desktop, Services, Console, Game and what not.  So, keep in mind this is just Web. Cheers !!!

    Read the article

  • HTML5 Boilerplate template for ASP.NET with Visual Studio 2010

    - by Harish Ranganathan
    This is the 5th post in the series of HTML5 for ASP.NET Developers  Support for HTML5 in Visual Studio 2010 has been quite good with Visual Studio Service Pack 1 However, HTML5 Boilerplate template has been one of the most popular HTML5 templates out in the internet.  Now, there is one for your favorite ASP.NET Webforms as well as ASP.NET MVC 3 Projects (even for ASP.NET MVC 2).  And its available in the most optimal place, i.e. NuGet. Lets see it in action.  Let us fire up Visual Studio 2010 and create a “File – New Project – ASP.NET Web Application” and leave the default name to create the project.  The default project template creates Site.Master, Default.aspx and the Account (membership) files. When you run the project without any changes, it shows up the default Master Page with the Home and About placeholder pages. Also, just to check the rendering on devices, lets try running the same page in Windows Phone 7 Emulator.  You can download the SDK from here Clearly, it looks bad on the emulator and if we were to publish the application as is, its going to be the same experience when users browse this app. Close the browser and then switch to Visual Studio.   Right click on the project and select “Manage NuGet Packages” The NuGet Package Manager dialog opens up.  Search for HTML5 Boilerplate.  The options for MVC & Web Forms show up.  Click on Install corresponding to the “Add HTML5 Boilerplate to Web Forms” options. It installs the template in a few seconds.   Once installed, you will be able to see a lot of additional Script files and also the all important HTML5Boilerplate.Master file.  This would be the replacement for the default Site.Master.  We need to change the Content Pages (Default.aspx & other pages) to point to this Master Page.  Example <%@ <% Master Language="C#" AutoEventWireup="true" CodeBehind="Html5Boilerplate.Master.cs" Inherits="WebApplication14.SiteMaster" %> would be the setting in the Default.aspx Page. You can do a Find & Replace for Site.Master to HTML5Boilerplate.Master for the whole solution so that it is changed in all the locations. With this, we have our Webforms application ready with HTML5 capabilities.  Needless to say, we need to wire up HTML5 mark up level code, canvas, etc., further to use the actual HTML5 features, but even without that, the page is now HTML5’ed.   One of the advantages of HTML5 (here HTML5 is collectively referred for CSS3, Javascript enhancements etc.,)  is the ability to render the pages better on mobile and hand held devices. So, now when we run the page from Visual Studio, the following is what we get.  Notice the site.icon automatically added.  The page otherwise looks similar to what it was earlier. Now, when we also check this page on the Windows Phone Emulator, here below is what, we get. As you can see, we definitely get a better experience now.  Of course, this is not the only HTML5 feature that we can use.  We need to wire up additional code for using Canvas, SVG and other HTML5 features.  But, definitely, this is a good starting point. You can also install the HTML5boilerplate Template for your ASP.NET MVC 3 and ASP.NET MVC 2 from the NuGet packages and get them ready for HTML5. Cheers !!!

    Read the article

  • Recap: Oracle Fusion Middleware Strategies Driving Business Innovation

    - by Harish Gaur
    Hasan Rizvi, Executive Vice President of Oracle Fusion Middleware & Java took the stage on Tuesday to discuss how Oracle Fusion Middleware helps enable business innovation. Through a series of product demos and customer showcases, Hassan demonstrated how Oracle Fusion Middleware is a complete platform to harness the latest technological innovations (cloud, mobile, social and Fast Data) throughout the application lifecycle. Fig 1: Oracle Fusion Middleware is the foundation of business innovation This Session included 4 demonstrations to illustrate these strategies: 1. Build and deploy native mobile applications using Oracle ADF Mobile 2. Empower business user to model processes, design user interface and have rich mobile experience for process interaction using Oracle BPM Suite PS6. 3. Create collaborative user experience and integrate social sign-on using Oracle WebCenter Portal, Oracle WebCenter Content, Oracle Social Network & Oracle Identity Management 11g R2 4. Deploy and manage business applications on Oracle Exalogic Nike, LA Department of Water & Power and Nintendo joined Hasan on stage to share how their organizations are leveraging Oracle Fusion Middleware to enable business innovation. Managing Performance in the Wrld of Social and Mobile How do you provide predictable scalability and performance for an application that monitors active lifestyle of 8 million users on a daily basis? Nike’s answer is Oracle Coherence, a component of Oracle Fusion Middleware and Oracle Exadata. Fig 2: Oracle Coherence enabled data grid improves performance of Nike+ Digital Sports Platform Nicole Otto, Sr. Director of Consumer Digital Technology discussed the vision of the Nike+ platform, a platform which represents a shift for NIKE from a  "product"  to  a "product +" experience.  There are currently nearly 8 million users in the Nike+ system who are using digitally-enabled Nike+ devices.  Once data from the Nike+ device is transmitted to Nike+ application, users access the Nike+ website or via the Nike mobile applicatoin, seeing metrics around their daily active lifestyle and even engage in socially compelling experiences to compare, compete or collaborate their data with their friends. Nike expects the number of users to grow significantly this year which will drive an explosion of data and potential new experiences. To deal with this challenge, Nike envisioned building a shared platform that would drive a consumer-centric model for the company. Nike built this new platform using Oracle Coherence and Oracle Exadata. Using Coherence, Nike built a data grid tier as a distributed cache, thereby provide low-latency access to most recent and relevant data to consumers. Nicole discussed how Nike+ Digital Sports Platform is unique in the way that it utilizes the Coherence Grid.  Nike takes advantage of Coherence as a traditional cache using both cache-aside and cache-through patterns.  This new tier has enabled Nike to create a horizontally scalable distributed event-driven processing architecture. Current data grid volume is approximately 150,000 request per minute with about 40 million objects at any given time on the grid. Improving Customer Experience Across Multiple Channels Customer experience is on top of every CIO's mind. Customer Experience needs to be consistent and secure across multiple devices consumers may use.  This is the challenge Matt Lampe, CIO of Los Angeles Department of Water & Power (LADWP) was faced with. Despite being the largest utilities company in the country, LADWP had been relying on a 38 year old customer information system for serving its customers. Their prior system  had been unable to keep up with growing customer demands. Last year, LADWP embarked on a journey to improve customer experience for 1.6million LA DWP customers using Oracle WebCenter platform. Figure 3: Multi channel & Multi lingual LADWP.com built using Oracle WebCenter & Oracle Identity Management platform Matt shed light on his efforts to drive customer self-service across 3 dimensions – new website, new IVR platform and new bill payment service. LADWP has built a new portal to increase customer self-service while reducing the transactions via IVR. LADWP's website is powered Oracle WebCenter Portal and is accessible by desktop and mobile devices. By leveraging Oracle WebCenter, LADWP eliminated the need to build, format, and maintain individual mobile applications or websites for different devices. Their entire content is managed using Oracle WebCenter Content and secured using Oracle Identity Management. This new portal automated their paper based processes to web based workflows for customers. This includes automation of Self Service implemented through My Account -  like Bill Pay, Payment History, Bill History and Usage Analysis. LADWP's solution went live in April 2012. Matt indicated that LADWP's Self-Service Portal has greatly improved customer satisfaction.  In a JD Power Associates website satisfaction survey, results indicate rankings have climbed by 25+ points, marking a remarkable increase in user experience. Bolstering Performance and Simplifying Manageability of Business Applications Ingvar Petursson, Senior Vice Preisdent of IT at Nintendo America joined Hasan on-stage to discuss their choice of Exalogic. Nintendo had significant new requirements coming their way for business systems, both internal and external, in the years to come, especially with new products like the WiiU on the horizon this holiday season. Nintendo needed a platform that could give them performance, availability and ease of management as they deploy business systems. Ingvar selected Engineered Systems for two reasons: 1. High performance  2. Ease of management Figure 4: Nintendo relies on Oracle Exalogic to run ATG eCommerce, Oracle e-Business Suite and several business applications Nintendo made a decision to run their business applications (ATG eCommerce, E-Business Suite) and several Fusion Middleware components on the Exalogic platform. What impressed Ingvar was the "stress” testing results during evaluation. Oracle Exalogic could handle their 3-year load estimates for many functions, which was better than Nintendo expected without any hardware expansion. Faster Processing of Big Data Middleware plays an increasingly important role in Big Data. Last year, we announced at OpenWorld the introduction of Oracle Data Integrator for Hadoop and Oracle Loader for Hadoop which helps in the ability to move, transform, load data to and from Big Data Appliance to Exadata.  This year, we’ve added new capabilities to find, filter, and focus data using Oracle Event Processing. This product can natively integrate with Big Data Appliance or runs standalone. Hasan briefly discussed how NTT Docomo, largest mobile operator in Japan, leverages Oracle Event Processing & Oracle Coherence to process mobile data (from 13 million smartphone users) at a speed of 700K events per second before feeding it Hadoop for distributed processing of big data. Figure 5: Mobile traffic data processing at NTT Docomo with Oracle Event Processing & Oracle Coherence    

    Read the article

  • IE9, HTML5 and truck load of other stuff happening around the web

    - by Harish Ranganathan
    First of all, I haven’t been updating this blog as regularly as it used to be.  Primarily, due to the fact was I was visiting a lot of cities talking about SharePoint, Web Matrix, IE9 and few other stuff.  IE9 is my new found love and I simply think we have done great work in improving the browser and browsing experiences for our users. This post would talk about IE, general things happening around the web and few misconceptions around IE (I had earlier written about IE8 and common myths When you think about the way web has transformed, its truly amazing.  Rewind back to late 90s and early 2000s, web was a luxury.  There were lot of desktop applications running around and web applications was starting to pick up.  Primarily reason was not a lot of folks were into web development and the areas of web were confined to HTML and JavaScript.  CSS was around here and there but no one took it so seriously.  XML, XSLT was fast picking up and contributed to decent web development techniques. So as a web developer all we had to worry about was, building good looking websites which worked well with IE6 and occasionally with Safari.  Firefox was  not even in the picture then and so was Chrome.  But with the various arms of W3C consortium and other bodies working actively on stuff like CSS, SVG and XHTML, few more areas came into picture when it comes to browsers supporting standards.  IE6 for sure wasn’t up to the speed and the main issue we were tackling then was privacy and piracy.  We did invest a lot of our efforts to curb piracy and one of the steps into it was that, IE7 the next version of IE would install only on genuine windows machines.  What this means, is that, people who were running pirated windows xp knowingly/unknowingly could not install IE7 and the limitations of IE6 really hurt them.  One more thing of importance is that, if you were running pirated windows, lots of chances that you didn’t get the security updates and thereby were vulnerable to run viruses/trojans on your system. Many of them actually block using IE in the first place and make it difficult to browse.  SP2 came as a big boon but again was there only for genuine windows machines. With Firefox coming as a free install and also heavily pushed by Google then, it was natural that people would try an alternative.  By then, we had started working on IE8 supporting the best standards (note HTML5, CSS 2.1 and other specs were then work in progress.  they are still) Later, Google in their infinite wisdom realized that with Firefox they were going nowhere and they released Chrome.  Now, they heavily push Chrome even for Firefox users, which is natural since its their browser. In the meanwhile, these browsers push their updates as mandatory and therefore have a very short lifecycle to add enhancements and support for stuff like CSS etc., Meanwhile, when IE8 came out, it really was the best standards supported browser and a lot of people saw our efforts in improving our browser. HTML5 is the buzz word in the industry and there is a lot of noise being made by many browsers claiming their support for it.  IE8 doesn’t have much support for HTML5.  But, with IE9 Beta, we have great support for many of HTML5 specifications.  Note that, HTML5 is still work under progress and one of the board of members working on the spec has mentioned that these specs might change and relying on them heavily is dangerous.  But, some of the advances such as video tag, etc., are indeed supported in IE9 Beta.  IE9 Beta also has full hardware acceleration support which other browsers don’t have. IE8 had advanced security features such as smartscreen filter, in-private browsing, anti-phishing and a lot of other stuff.  IE9 builds on top of these with the best in town security standards as well as support for HTML5, CSS3, Hardware acceleration, SVG and many other advancements in browser.  Read more at http://www.beautyoftheweb.com/#/highlights/html5  To summarize, IE9 Beta is really innovative and you should try it to believe what it provides.  You can visit http://www.beautyoftheweb.com/  to install as well as read more on this. Cheers !!!

    Read the article

  • Best Programming Language for Web Development

    - by Harish Kurup
    I am a Web Developer in PHP, and also know Javascript and some bit of CSS which is needed for web development. I use Symfony framework to build Websites and Web Application. As now i want to learn new Programming Language, which is best for Web Development(like Ruby, Python), as i have heard about Frameworks like Rails and Django. Which language will be best for Web Development apart from PHP or like PHP?

    Read the article

  • Visual Studio 2010 and .NET Framework 4 Training Kit April 2010 Release

    - by Harish Pavithran
    The Visual Studio 2010 and .NET Framework 4 Training Kit includes presentations, hands-on labs, and demos. This content is designed to help you learn how to utilize the Visual Studio 2010 features and a variety of framework technologies including: C# 4 Visual Basic 10 F# Parallel Extensions Windows Communication Foundation Windows Workflow Windows Presentation Foundation ASP.NET 4 Windows 7 Entity Framework ADO.NET Data Services Managed Extensibility Framework Visual Studio Team System This version of the Training Kit works with Visual Studio 2010 and .NET Framework 4.  Here is the link enjoy www.microsoft.com/downloads/details.aspx

    Read the article

  • Formatting minified jQuery, JavaScript using the Internet Explorer 9 Developer Toolbar

    - by Harish Ranganathan
    Much has been talked about the F12 developer toolbar in IE and the support it provides for web developers.  Starting IE8, the Developer Toolbar is a menu item that helps you view the page source, scripts, profiling and many other details of the rendered page.  It even allows script debugging from within and that makes it a truly powerful web developer tool bar. With IE9, the developer toolbar got even better with the Networking Tab that allows you to inspect the traffic/time taken and drill down into the Request/Response headers and other specifics. The script tab allows you to view the scripts used in the page. One of the challenges of working with JavaScript / jQuery when they are minified, is that, it becomes really hard to read.  Minified JavaScript is a compression technique and also a best practice for delivering faster web pages.  However, when you would like to debug, minified JavaScript files become very hard since they aren't properly formatted.  Take the case of the above sample, which is a basic MVC 3 Web Application.  It uses the minified jQuery and modernizr files. Once we select the above scripts, the script source looks as follows:- But with the “Format JavaScript” option in the Configuration icon, Once you click on the “Format JavaScript”, you can see the formatted JavaScript as per screen below:- This makes the script readable and also easy for debugging.  Cheers !!!

    Read the article

  • Implementing Search for BlogReader Windows 8 Sample

    - by Harish Ranganathan
    The BlogReader sample is an excellent place to start speeding up your Windows 8 development skills.  The tutorial is available here and the complete source code is available here Create a project called WindowsBlogReader and create pages for ItemsPage.xaml, SplitPage.xaml and DetailPage.xaml and copy the corresponding code blocks from the sample listed above. Created a class file FeedData.cs and copy the code.  Finally, create a class DateConverter.cs and copy the code associated with it. With that you should be able to build and run the project.  There seems to be one issue in the sample feeds listed that the first week (feed1) doesn’t seem to expose it.  So you can skip that and use the second feed as first feed.  You will end up with one feed less but it works. I had demonstrated this in the recent TechDays at Chennai.  How we can use the Search Contract and implement Search for within the Blog Titles. First off, we need to declare that the App will be using Search Contract, in the Package.appmanifest file Next, we would need a handle of the Search Contract when user types on the search window in Charms Menu. If you had completed the code sample from the link above, you would have ItemsPage.xaml and ItemsPage.xaml.cs.  Open the ItemsPage.xaml.cs. Import the namespaces using System.Collections.ObjectModel and System.Linq. in the ItemsPage() constructor, right after this.InitializeComponent(); add the following code Windows.ApplicationModel.Search.SearchPane.GetForCurrentView().QuerySubmitted += ItemsPage_QuerySubmitted; This event is fired when users open up the Search Panel from Charms Menu, type something and hit enter. We need to handle this event declared in the delegate.  For that we need to pull the FeedDataSource instantiation to the root of the class to make it global. So, add the following as the first line within the partial class FeedDataSource feedDataSource; Also, modify the LoadState method, as follows:- protected override void LoadState(Object navigationParameter, Dictionary<String, Object> pageState)        {            feedDataSource = (FeedDataSource)App.Current.Resources["feedDataSource"];            if (feedDataSource != null)            {                this.DefaultViewModel["Items"] = feedDataSource.Feeds;            }        } Next is to implement the ItemsPage_QuerySubmitted method void ItemsPage_QuerySubmitted(Windows.ApplicationModel.Search.SearchPane sender, Windows.ApplicationModel.Search.SearchPaneQuerySubmittedEventArgs args)         {             this.DefaultViewModel["Items"] = from dynamic item in feedDataSource.Feeds                                              where                                              item.Title.Contains(args.QueryText)                                              select item;         } As you can see we are almost using the same defaultviewmodel with the change that we are using a linq query to do a search on feeds which has the Title that matches QueryText. With this we are ready to run the app. Run the App.  Hit the Charms Menu with Windows + C key combination and type a text to search within the blog. You can see that it filters the Blogs which has the matching text. We can modify the above Linq query to do a search for the Text in other attributes like description, actual blog content etc., I have uploaded the complete code since the original WindowsBlogReader Code is not available for download.  You can download it from here note:  this code is provided as-is without any warranties.  Cheers!!!

    Read the article

  • Making your ASP.NET/HTML Websites Indic aware &ndash; accepting Tamil, Telugu, Kannada, Hindi and ot

    - by Harish Ranganathan
    Its been a month since I wrote my last post.  Much of work has been happening around planning for Tech Ed India, the upcoming Virtual TechDays this week as well as our Developer content at the Great Indian Developer Summit 2010.  Its going to be one exciting period starting this week and I am glad I would be able to meet a lot of folks who have written to me personally that they would like to catch up at Tech Ed India. For now, I had a chance to meet the Microsoft India Development Centre team that worked on the Microsoft Indic Language Input Tool (erstwhile Akshara). The team updated me that they have also released the scripts  so that the Indic input feature can be encapsulated into your own websites.  For example, if you are having a web page where you collect user information, you can pretty much make your site indic aware i.e. accept inputs in Tamil, Telugu, Kannada, Hindi etc.,  All you would need to include would be a bunch of scripts onto your web pages and you are ready to make it, like I said, “indic aware” I have built a sample web page that accepts First Name, Last Name, Address and an additional field.  When it comes to accepting indic, sometimes, you may want to avoid the indic input in certain fields and accept it in English.  You can specify the MicrosoftILITWebAttach="false" attribute to the Text Boxes and Text Areas (TextMode=”Multiline” in ASP.NET) so that the particular field automatically switches over to English input.  Similarly, the moment you specify that the TextMode=”Password” to make it as a password field, it automatically ignores all indic recognition and shows the masked dots for the words entered. Note that, this is, when we are going for the Opt-out mode, where we are specifying that by default all the input controls would need indic awareness and we would specify for those controls where it is not required.  The other mode is Opt-in mode where you would need to add a different property to the script definition i.e. attachMode=”optin” .  When we do this, we need to explicitly add the MicrosoftILITWebAttach="true" attribute for every control where we need indic input. I have created a sample web page which accepts First Name, Last Name, Address and an additional input field to demonstrate the “Opt-out”.   You can copy paste this into any of your web pages to check it <form id="form1" runat="server">     <!-- Microsoft Indic Language Input Tool embed code --> <input type="hidden" id="MicrosoftILITWebEmbedInfo" attachMode="optout" value="" /> <script type="text/javascript" src="http://ilit.microsoft.com/bookmarklet/script/Tamil.js" defer="defer"></script>     <div>     <h2>         Welcome to the Registration Page     </h2>     <p>         First Name: <asp:TextBox runat="server" ID="txtFirstName" />         <br />         <br />         Last Name: <asp:TextBox runat="server" ID="txtLastName" />         <br />         <br />         Password:         <asp:TextBox runat="server" ID="txtPassword" TextMode="Password" />         <br />         <br />         Address: <asp:TextBox runat="server" ID="txtAddress" TextMode="MultiLine" Height="100" Width="200" />         <br />         <br />         English Text: <asp:TextBox ID="txtEnglishText" runat="server" MicrosoftILITWebAttach="false" />     </p>     <p>         <!-- Microsoft Indic Language Input Tool attribution image link --> <a style="text-decoration: none" href="http://go.microsoft.com/fwlink/?LinkID=184205&clcid=0x409"><img style="border: 0px" alt="Transliteration by Microsoft" src="http://ilit.microsoft.com/bookmarklet/images/attribution.png"></a>     </p>     </div>     </form> If you note the code snippet above, I have included the scripts in the top with the attachMode set to “optout” and for the last TextBox, I have mentioned the MicrosoftILITWebAttach="false” attribute to make it accept English input.   Additionally, you also need to add the “Microsoft Indic Language Input Tool attribution image” to your web page as a courtesy to the team that developed this feature.  It would basically add a image saying “Transliteration by Microsoft” similar to a Copy Right image.  You can see the screen shot below where I have typed it in Tamil.  In that you will notice that the password field behaves as expected and the last field accepts English Text.  You can also notice the icon that comes in the first textbox that indicates that, the field is going to accept indic text.   This sample is using Tamil, but you can pretty much do it for Hindi, Telugu, Kannada, Marathi, Bengali etc.,   The website for getting the Indic script and other instructions is http://specials.msn.co.in/ilit/WebEmbed.aspx?language=Tamil You can replace the querystring value “Tamil” to other languages as mentioned above to get the respective script. This also works for plain HTML based websites and doesn’t necessarily need you to use ASP.NET to achieve the functionality. Note that, this form is not completely localized.  This is transliterated.  You can add label controls for FirstName, LastName indication etc., and use the Visual Studio tools to localize and get those values from resource files.  In the resource files, you can enter the text in different languages to make this a truly localized page.  If you just want to download the Indic Tool Desktop version (that can be used for typing in Word, Excel, pretty much any input area), you can download it from http://specials.msn.co.in/ilit/  In the same page, there is also a web version where you can type and get text then and there if you dont want to install the desktop version. So, go ahead, download / use them in your websites and enjoy the power of Indic. Cheers !!!

    Read the article

  • Issue with resetting auto increment from default to big number

    - by Sai Srikanth
    I have a MySQL table naming Invoice for a Inventory Monitoring site, invoice_number is bigint(19) AUTO_INCREMENT field. Currently AUTO_INCREMENT value is 1. Client want it to start the invoice_number from 50000. With the following script reset the ALTER TABLE INVOICES AUTO_INCREMENT = 50000; When I wrote an Insert Script to insert data in SQLDBX, it is putting the invoice_number from 50000. But when i am trying to do insert a record using the application(web application), the invoice_number value is starting from 1. We are making use of Spring-JDBC template to insert data into mysql database.

    Read the article

  • Straight cable or cross over cable?

    - by om sai
    I have pppoe internet connection. My ISP provides connections like this: ISP->media converter(fiber)->8 port switch(TP Link TL-SF1008D)->to individual internet connection account holders (like me) Now the connection between the media converter and the switch is done using 4 pair cross over cat5 cable and I would like to connect the cable running from the switch to the router and through router to my PC. So what type of cable should I use to make the connection between the switch and the router (straight thru cable or cross over cable)? The point I am trying to make is I am able to connect to the internet using straight through cable between the switch and my PC but when I connect the same cable between the switch and the router and from router to my PC I am not able to connect to the internet. Also, if I am using the 2 pair cable (instead of 4) between the switch and the router I am able to connect to the internet but same is not true in case of 4 pair cat5 cable.

    Read the article

  • Estimating compressed file size using a list parameter

    - by Sai
    I am currently compressing a list of files from a directory in the following format: tar -cvjf test_1.tar.gz -T test_1.lst --no-recursion The above command will compress only those files mentioned in the list. I am doing this because this list is generated such that it fits a DVD. However, during compression the compression rate decreases the estimated file size and there is abundant space left in the DVD. This is something like a Knapsack algorithm. I would like to estimate the compressed file size and add some more files to the list. I found that it is possible to estimate file size using the following command: tar -cjf - Folder/ | wc -c This command does not take a list parameter. Is there a way to estimate compressed file size? I am also looking into options like perl scripts etc. Edit: I think I should provide more information since I have been doing a lot of web search. I came across a perl script(Link)that sort of emulates the Knapsack algorithm. The current problem with the above mentioned script is that it splits the files in their original state. When I compress the files after splitting them, there are opportunities for adding more files which I consider to be inefficient. There are 2 ways I could resolve the inefficiency: a) Compress individual files and save them in a directory using a script. The compressed file could provide a best estimate. I could generate a script using a folder of compressed files and use them on the uncompressed ones. b) Check whether the compressed file's size is less than the required size. If so, I should keep adding files until I meet the requirement. However, the addition of new files to the compressed file is an optimization problem by itself.

    Read the article

  • Issues after upgrading the servers PHP version

    - by Harish Kurup
    I have created my project in Symfony 1.4.8 with Propel ORM. previously server had PHP version 5.2.* and i have upgraded it to 5.3.4, then the problem started giving some error in Propel. the errors were, PHP Deprecated: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0 PHP Fatal error: Class 'PDO' not found in /usr/local/lib/php/symfony/plugins/sfPropelPlugin/lib/vendor/propel/util/PropelPDO.php on line 42 PHP Warning: Module 'PDO' already loaded in Unknown on line 0 PHP Warning: Module 'pdo_sqlite' already loaded in Unknown on line 0 PHP Warning: Module 'SQLite' already loaded in Unknown on line 0 Is there any config error that has to be taken care of?? please help!

    Read the article

  • exception while creating initial context

    - by Harish
    in thread "main" java.lang.NoClassDefFoundError: weblogic/kernel/KernelStatus at weblogic.jndi.Environment.<clinit>(Environment.java:78) at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288) I am getting this exception when I try to create a initial context to hit the weblogic server. This is the code I am trying from eclipse.I have added weblogic.jar and wlclient.jar in the classpath. Hashtable env = new Hashtable(); // WebLogic Server 10.x connection details env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory" ); env.put(Context.PROVIDER_URL, "t3://localhost:7001"); env.put(Context.SECURITY_PRINCIPAL, "xxxxx"); env.put(Context.SECURITY_CREDENTIALS, "******"); return new InitialContext( env Has anyone faced this issue,How to resolve it?

    Read the article

  • Google Chrome Browser

    - by Harish
    Hi friends. Am using Google Chrome as my default web browser. I don't have any problem with it. The only problem rise is when I enter gmail.com and login into my account. I need to go to Histories in Google chrome (ctrl + shft + del) and select "Del Cokies and Other datas" for entering into gmail again. My gmail page is workin just once. I nedd to log in. Check my mail and I have to clear the cookies in order to log in again If i fail, This is d info I get The webpage at https://mail.google.com/mail/?shva=1&ui=html&zy=l&pli=1&auth=DQAAALgAAABhdI_K9uptgb6yQfGVmnl74VZEUH7U2M7WGJn3kJnCiY0CNI5QBU3X-g6UjPENGoHKSHE9nRna_Ygu_d59mN-HG1SUzNpI_UEMJ9CwDqZAYxYLEJl8r_JA2qJNGF8H0fdKfn99Gb2YeI-lprGxCrWRT7LicyADxQvNLQ6l9xBvOccEBSJfdIrna8dOXeX06N41L0zpnLQrVG1qdulR7LxId9XwtVb6QtfhwnambqLoNiY402Y5pjGG1_gFL4dNpJA&gausr=hariss89%40gmail.com has resulted in too many redirects. Clearing your cookies for this site or allowing third-party cookies may fix the problem. If not, it is possibly a server configuration issue and not a problem with your computer. Here are some suggestions: Reload this web page later. Learn more about this problem. Wat can I do ...

    Read the article

  • How to delete a folder in python when [Error 32] is present

    - by harish
    I am using python 2.7. I want to delete a folder which may or may not be empty. The folder is handled by thread for file-monitoring. I am not able to kill thread but wanted to delete this folder any how. I tried with os.rmdir(Location) shutil.rmtree(Location) os.unlink(Location) But, it didn't work. It is showing error as [Error 32] The process cannot access the file because it is being used by another process: 'c:\\users\\cipher~1\\appdata\\local\\temp\\fis\\a0c433973524de528420bbd56f8ede609e6ea700' I want to delete folder a0c433973524de528420bbd56f8ede609e6ea700 or delete whole path will also suffice.

    Read the article

< Previous Page | 1 2 3 4 5 6  | Next Page >