Wednesday 27 February 2013

Audio in HTML 5


<!DOCTYPE html>
<html>
<head>
    <title>Welcome to HTML5</title>
</head>
<body>
    <audio src="Media/00000.MP3" controls="controls" preload="auto">
    </audio>
    <br />
    <audio src="07 Kallikkaatil.mp3" controls="controls" preload="auto">
    </audio>
</body>
</html>

Monday 18 February 2013

SQL Database and Table memory size

hai all.
This post explaining is


How many rows add for one table in sql server 2008 r2 ?

and

can we how many database access in sql server 2008 r2?

and

how many coloumns add for one row in table on sql server 2008 r2?

and

what is size level  in sql server 2008 r2?



These are some of the Maximum Capacity Specifications for SQL Server 2008 R2

Database size: 524,272 terabytes
Databases per instance of SQL Server: 32,767
Filegroups per database: 32,767
Files per database: 32,767
File size (data): 16 terabytes
File size (log): 2 terabytes
Rows per table: Limited by available storage

Tables per database: Limited by number of objects in a database


The DataBase capacity is limited by the amount of storage it has. If you have 100 Gigabytes of storage available, then the database size will be under that. If you have 100 Terabytes of storage, than that will be the limit to the size of the database. Enterprise database systems like Oracle, MySQL, and SQL Server are more limited by the available storage than anything else.

 It is far more complex because there are certain amounts for various sizes based on how you design the database. The documents also clearly show that things like the number of columns per table is 1,024 for a normal table, or 30,000 for a wide table. SQL Server doesn't have a limit on rows, except the fact that you can't add more rows when you run out of storage.

Bottom line, if you're worried about the capacity chances are you won't hit it since the database can support almost half a petabyte in size.


Friday 15 February 2013

Slow Website? Check with Google Speed Test



A website that loads slowly is annoying to site visitors. With everything being fast-paced these days, it is likely that they would move to another website instead of sitting and waiting for yours to load. So, you’ll lose both business and reputation, and even blog readers.
Not only that, your search engine ranking is at stake too if you have a slow website. Google has always emphasized that your website loading speed is taken into consideration into the algorithm that determines your website ranking.
Now that you know how the speed of a website can affect your hits and business, you will certainly want to know how fast your website is. With Google being the mother of all search engines, the Google Speed Test is probably the best tool to use to determine the speed at which your website loads. The report doesn’t just tell you what the overall page speed score is, but also provides you with tips in how to boost your website’s speed.
So after checking your speed on Google Speed Test and other free website speed test tools, you find out that your website takes eternity to load and your competitors do much better. What next? Here are some things you can do to speed up your site; they are all free and easy to do:
Split long articles into pages

When your articles contain large multimedia files and very long content, it is best to use the just split it into multiple pages. That way, the file size within the page is smaller and thus takes less time to load. Splitting articles into pages is also a superb way to increase pageviews and boosting SEO.
Reduce image sizes

High resolution images are usually the culprits in a slow website. There are several ways you can optimize the images without compromising on its quality.
One is to compress the image by using a good software such as Adobe Photoshop. Alternatively, there are also various free tools to help you do this without affecting the quality of your images.
Another thing we can do is to combine the images into CSS sprites, resulting in something like a collage of pictures. By doing so, the web server only loads one image instead of multiple ones. This will reduce the number of hits and traffic the web server needs to handle to serve the page.
Finally, whenever possible, instead of using .png files as buttons, use .gif files instead. Buttons are, well, just buttons, which you don’t need high quality images of huge images sizes for.
Remove heavy elements that you don’t need

Whenever you use heavy codes in your website, your server needs to handle more request and needless to say, this translates into a longer processing time. Simple HTML tags are fine but if you don’t really need the image slides, animations and fancy navigation options, remove them as these run on heavy JavaScript and jQuery codes.
Cache your pages

To speed up your website, you can also cache your web pages with a good caching plugin such as W3 Total Cache, or WP Super Cache.
These plugins generate static HTML files from your dynamic WordPress blog which the web server will serve instead of processing the comparatively heavier and more expensive WordPress PHP scripts and MySQL database.
Replace PHP functions with HTML

Another method to reduce PHP load is by replacing certain PHP functions with HTML codes whenever possible. Usually, PHP functions come with your website theme’s scripts to simplify the process of changing the site’s contents. However, only certain pages actually use these functions. Therefore, find out where you can substitute the PHP functions with HTML codes instead.
Optimize CSS

Avoid using the @import function as this add multiple requests to the server, stretching the time it takes to load your website. Also, did you know that you can reduce the size of a file by writing 3-letter color codes instead of 6-letter ones? For instance, write #fff instead of #ffffff.
Simple, but it makes quite significant difference in a page’s loading speed!
There you go – 6 simple optimize the images tips to speed up your website. Some are really easy to implement that you needn’t be an expert. Even if you might struggle through some steps or need to enlist help, the returns of a fast website are well-worth the efforts. You wouldn’t want to turn potential customers and blog readers away with your lagging website, right?

Finally check  your page speed

https://developers.google.com/speed/pagespeed/insights

Tuesday 12 February 2013

ASP.NET Open Source Projects

ASP.NET Open Source Projects

Links to ASP.NET Open Source Projects
Blogs
  • Blogsa.net - A blog engine in Asp.net.
  • dasBlog
  • BlogEngine.NET - Very functional, simple and clean Blog engine in ASP .Net 3.5.
  • SubText - A blogging engine in ASP.NET.
  • Owlpal - Web Content System.
  • AtomSite (formerly BlogSvc) - Built using ASP.NET MVC.
  • Oxite - Built using ASP.NET MVC.
Content Management Systems
e-Commerce
Controls/Toolkits/Frameworks 

Forums
Galleries
Starter Kits
Wikis 
Miscellaneous
Additional Projects

Monday 11 February 2013

Asp.net TextBox watermark in JQuery


This short article demonstrates how to create a watermark effect on your TextBox and display instructions to users, without taking up screen space. This article is a sample chapter from my EBook called 51 Tips, Tricks and Recipes with jQuery and ASP.NET Controls. The chapter has been modified a little to publish it as an article.
Note that for demonstration purposes, I have included jQuery code in the same page. Ideally, these resources should be created in separate folders for maintainability.
Let us quickly jump to the solution and see how we can create a watermark effect on your TextBox using client-side code.
<!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">
    <title>TextBox WaterMark</title>
    <script type="text/javascript"
        src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js">
    </script>  
   
    <style type="text/css">
    .water
    {
         font-familyTahoma, Arial, sans-serif;
         color:gray;
    }
    </style>
   
    <script type="text/javascript">
        $(function() {
 
            $(".water").each(function() {
                $tb = $(this);
                if ($tb.val() != this.title) {
                    $tb.removeClass("water");
                }
            });
 
            $(".water").focus(function() {
                $tb = $(this);
                if ($tb.val() == this.title) {
                    $tb.val("");
                    $tb.removeClass("water");
                }
            });
 
            $(".water").blur(function() {
                $tb = $(this);
                if ($.trim($tb.val()) == "") {
                    $tb.val(this.title);
                    $tb.addClass("water");
                }
            });
        });       
 
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="smallDiv">
     <h2>TextBox Watermark Demonstration</h2>    <br />          
        <asp:TextBox ID="txtFNm" class="water" Text="Type your First Name"
        Tooltip="Type your First Name" runat="server"></asp:TextBox><br />
        <asp:TextBox ID="txtLNm" class="water" Text="Type your Last Name"
        Tooltip="Type your Last Name" runat="server"></asp:TextBox>
        <br /><br />
        <asp:Button ID="btnSubmit" runat="server" Text="Submit" />
        <br /><br />
        Tip: Click on the TextBox to start typing. The watermark
        text disappears.
    </div>
    </form>
</body>
</html>
 
The code shown above adds the “watermark” behavior to controls marked with the ‘class=water’ attribute. When the user loads the page, a watermarked textbox displays a message to the user. As soon as the watermarked textbox receives focus and the user types some text, the watermark goes away. This technique is a great space saver as you can use it to provide instructions to the user, without using extra controls that take up valuable space on your form.
   The ‘Tooltip’ attribute applied to the textbox is crucial to this example. The ‘Tooltip’ gets rendered as ‘title’. Observe the code, as we use this ‘title’ property to compare it to the textbox value and remove the watermark css, when the textbox control gains focus
$(".water").focus(function() {
                $tb = $(this);
                if ($tb.val() == this.title) {
                    $tb.val("");
                    $tb.removeClass("water");
                }
            });
 
Similarly when the user moves focus to a different control without entering a value in the textbox, we add the watermark css again.
$(".water").blur(function() {
                $tb = $(this);
                if ($.trim($tb.val()) == "") {
                    $tb.val(this.title);
                    $tb.addClass("water");
                }
            });
 
The water class declared in Demos.css looks like this:
.water
{
     font-familyTahoma, Arial, sans-serif;
     font-size:75%;
     color:gray;
}
When the page loads for the first time, the watermark is visible as shown here:
Watermark
When the user enters the First/Last Name and submits the form, the watermark behavior is no more needed to be displayed. This is achieved by comparing the ‘title’ with the ‘value’ of the textbox. If the ‘value’ does not match the ‘title’, this indicates that the user has entered some value in the textboxes and submitted the form. So in this case we remove the watermark appearance.
$(".water").each(function() {
                $tb = $(this);
                if ($tb.val() != this.title) {
                    $tb.removeClass("water");
                }
            });
After the user enters the details and submits the form, the result is similar to the one shown here, without the watermark:
Watermark disappears
Thanks to Arnold Matusz for sharing the tip about the tooltip property. The code has been tested on IE 7, IE 8, Firefox 3, Chrome 2, Safari 4 browsers
You can see a Live Demo over here
I hope you found this article useful and I thank you for viewing it. This article was taken from my EBook called 51 Tips, Tricks and Recipes with jQuery and ASP.NET Controls which contains similar recipes that you can use in your applications. 

Saturday 9 February 2013

HTML5 - New Features


Some of the most interesting new features in HTML5:
  • The <canvas> element for 2D drawing
  • The <video> and <audio> elements for media playback
  • Support for local storage
  • New content-specific elements, like <article>, <footer>, <header>, <nav>, <section>
  • New form controls, like calendar, date, time, email, url, search

SignalR


Hai all
signalR.
What is it
Its using for call serverside methode in javascript(Its very 

easy than webmethod) and its perfect than webmethod. 

Now i  tried one sample code for

Get it on NuGet!

Install-Package Microsoft.AspNet.SignalR -pre

then add one html page
<!DOCTYPE html>
<html>
<head>
<title>SignalR Simple Chat</title>
<style type="text/css">
.container {
background-color: #99CCFF;
border: thick solid #808080;
padding: 20px;
margin: 20px;
}
</style>
</head>
<body>
<div class="container">
<input type="text" id="message" />
<input type="button" id="sendmessage" value="Send" />
<input type="hidden" id="displayname" />
<ul id="discussion">
</ul>
</div>
<!--Script references. -->
<script src="Scripts/jquery-1.6.4.min.js" type="text/javascript"></script>
<!--Reference the jQuery library. -->
<script src="Scripts/jquery.signalR-1.0.0-rc2.js" type="text/javascript"></script>
<!--Reference the autogenerated SignalR hub script. -->
<script src="/signalr/hubs"></script>
<!--Add script to update the page and send messages.--> 
<script type="text/javascript">
$(function () {
// Declare a proxy to reference the hub. 
var chat = $.connection.chatHub;
// Create a function that the hub can call to broadcast messages.
chat.client.broadcastMessage = function (name, message) {
// Html encode display name and message. 
var encodedName = $('<div />').text(name).html();
var encodedMsg = $('<div />').text(message).html();
// Add the message to the page. 
$('#discussion').append('<li><strong>' + encodedName
+ '</strong>:&nbsp;&nbsp;' + encodedMsg + '</li>');
};
// Get the user name and store it to prepend to messages.
$('#displayname').val(prompt('Enter your name:', ''));
// Set initial focus to message input box. 
$('#message').focus();
// Start the connection.
$.connection.hub.start().done(function () {
$('#sendmessage').click(function () {
// Call the Send method on the hub. 
chat.server.Send($('#displayname').val(), $('#message').val());
// Clear text box and reset focus for next comment. 
$('#message').val('').focus();
});
});
});
</script>
</body>
</html>
then add global application and copy past the code 

RouteTable.Routes.MapHubs(); in our app start
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.SessionState;
using System.Web.Routing;
using Microsoft.AspNet.SignalR;

namespace ChatSignarR
{
public class Global : System.Web.HttpApplication
{

protected void Application_Start(object sender, EventArgs e)
{
RouteTable.Routes.MapHubs();
}
protected void Session_Start(object sender, EventArgs e)
{

}
protected void Application_BeginRequest(object sender, EventArgs e)
{

}
protected void Application_AuthenticateRequest(object sender, EventArgs e)
{

}
protected void Application_Error(object sender, EventArgs e)
{

}
protected void Session_End(object sender, EventArgs e)
{

}
protected void Application_End(object sender, EventArgs e)
{

}
}
}
Use one class and try  for below 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Microsoft.AspNet.SignalR;

namespace ChatSignarR
{
public class ChatHub:Hub
{
public void Send(string name, string message)
{
// Call the broadcastMessage method to update clients.
Clients.All.broadcastMessage(name, message);
}
}
}


How to reduce angular CLI build time

 Index: ----- I am using angular cli - 7 and I am going to tell how to reduce the build time as per my knowledge. Problem: -------- Now the ...