26 January 2012

How to check your site speed and performance

Hi all,

In this post I will give a short list of sites and tips that will help you to improve your site's speed and performance.

First a list of sites:
1) Google's Page Speed Online, Page Speed Online analyzes the content of a web page, then generates suggestions to make that page faster. Reducing page load times can reduce bounce rates and increase conversion rates; Note: you can also find a Google Chrome Extension for this tool, here on this page.

23 January 2012

SQL: Concatinate Rows into a string without using variables

Hi All,

Here is a small SQL script which allows you to concatenate the values from all rows into a single row/value.


SELECT T.value + ',' AS [text()]

FROM myTable T
FOR XML PATH ('')

Override jQuery.val() and jQuery.val(value)

Hi all,

Sometimes there are cases when you need to do something when $.val() and $.val(value) from jQuery is called,  but then you still want the default behavior to be kept. Here is an example of how you could do that:

Code:
var originalVal = this.originalVal = $.fn.val;
$.fn.val = function(value) {
    if (typeof value == 'undefined') {
        alert('Getting the value');
        return originalVal.call(this);
    }
    else {
        alert('Setting the value');

        return originalVal.call(this, value);
    }
};


I for example have used it for a jQuery widget, I wanted to override the default behavior of the val()  function when this is performed on the element for which a widget was used. So what I have done is I have added a custom attribute to the element for which I am using the widget and then in the val() I am checking the presence of that attribute - just like below:

11 January 2012

SQL: Rename Column/Table Name

Hi All,

We all sometimes need to rename a column/table from our database, however we do not want to drop all our records from the table where the column is renamed or the name of that table is changed.

For that there is such a nice SPROC in MS SQL: sp_rename.

This SPROC can be used to rename any user-created object in current DB.

However there is also a caution:

10 January 2012

What's New in ASP.NET 4.5 and Visual Web Developer 11 Developer Preview

What's New in ASP.NET 4.5 and Visual Web Developer 11 Developer Preview

This document lists features and enhancements that are being introduced in ASP.NET 4.5. It also lists improvements being made for web development in Visual Studio (Visual Web Developer).

14 December 2011

SQL Performance Tips 5

Hello,

Another SQL Performance tip, which will help you to determine the exact execution time of your sql statements. The simplest way of doing that is to save the time before running your statement and then compare that value with current time. Here is a sample SQL statement:

25 November 2011

ANTS Memory Profiler 7.1 without license

Hi All,

The trial period of 14 days of your ANTS Memory Profiler has passed.

You are now searching for a license for ANTS Memory Profiler?
Or are you searching for a crack for ANTS Memory Profiler?
Or are you searching for a keygen for ANTS Memory Profiler?

No need to do that anymore because there is an easy way to use it without having a license, crack or keygen (Note: the version that I am using is 7.1).

So what to do?

23 November 2011

SQL Performance Tips 4

Hi All,

Again me with some more SQL Performance Tips.

If you have a lot of tables with which you have to join and those tables are big then pay attention to the order of how you join those tables because the order matters.

Why the order of the tables in joins matters?

It is because even if the result of your query returns only a few of records, lets say 7 records, it doesn't mean that it will run fast, and it will not run fast because during the first joins your tables can "return" thousands, millions or even more records with which the SQL Server will be working further.

So the idea is that you have to use the Actual Execution Plan to see what is Estimated Number of Rows with which the SQL Server will be working with.

Try to filter the data using the joins, so that less data remains to be processed, and less time it takes to the SQL Server to return the result to you.

Good luck,
Roman

18 November 2011

SQL Performance Tips 3

Hi All,

Me again with another SQL Performance tip.

Another way to optimize a query is using the Actual Execution Plan.

Well, first of all by using it you will see what indexes are missing, what table or join is causing the performance issue, which join is returning a lot of rows and many more.

It worth learning how to use the Actual Execution Plan.

Now about indexes, you must keep in mind that not all indexes that are suggested to be created by Actual Execution Plan are good to be created, and this is for several reasons:

17 November 2011

SQL Performance Tips 2

Hi All,

Here are some more tips on SQL Performance.

SET NOCOUNT
So what is it useful for?
First of all what is it doing: Stops the message indicating the number of rows affected by a Transact-SQL statement from being returned as part of the results.

Which means that when you do not need the number of rows affected to be returned from the SPROC then write that at the beginning of the SPROC. Why? because it will reduce the traffic and the execution time of your SPROC.

16 November 2011

SQL Performance Tips 1

Hi All,

By working at some performance issues with SQL Stored Procedures, Views and Functions I had to make some investigations on SQL performace, how to do that, I've been searching a lot to find some tips.

So the first tip is: Avoid using CURSORS.

Yes, avoid cursors, do everything to avoid cursors.

Often time people say to me that for their case it is not possible to avoid cursors, and often times I prove them that it is possible.

When there is just a few things that you could do with a set of data then try to do that in some statements by joining the data, instead of going through each item.

It is not always clear that cursors could be avoided, this is why you have to think several times if it is really not possible to avoid them.

Regards,
Roman

27 October 2011

Migrating .wdproj From VS 2008 to VS 2010

Hi All,

Do you want to work under Visual Studio 2010 and your project is currently working under VS 2008?
All you need to do is to to convert your projects into a VS 2010 Version.

However there could be a small problem that we are going to solve: not all projects can be converted, and I am speaking about Web Deployment Projects. In order to make those available for VS 2010 you will need to download and install the "Visual Studio® 2010 Web Deployment Projects - RTW".

Now if you want to migrate your project from a .Net 3.5 to .Net 4.0 then you can face an error like this:
"Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive."

19 October 2011

Visual Studio Memory Profiler resulted into - Blue Screen

Hi everyone,

Have you ever tried to use Visual Studio's Memory Profiler?
I have recently had a need to profile a .Net application and was searching for a memory Profiler tool, and that was the moment when I have found out that Visual Studio 2008 Development Edition has it's own memory Profiler.

I decided to search for a quick guide and have  found several of those on the internet.

Unfortunately when I started my application using that profiler my computer showed me the Blue Screen of Death.

11 October 2011

Invalid Argument, jQuery bgiframe + position + iframe + IE6

Hi all,

Do you have an error when using jQuery bgiframe library together with jQuery UI position and your own frame? An error like: Invalid Argument. Which is actually very odd.

The problem when putting my own iframe behind a element that I want to position somewhere on the page with jQuery UI position function it throws the error. The error is thrown because jQuery UI position is automatically calling the bgiframe function if it exists. Here is the code:

06 October 2011

jQuery dialog height problem

Hi All,

I will describe you a problem that I have experienced with jQuery dialog in IE8 (but I guess that it can be reproduced on other versions of IE too).

The problem appears when you create a draggable dialog and you want to set a height to it, and the problem is that when you drag and drop the dialog multiple times then the dialog height will get smaller.

If you notice such a strange behavior then you need to know that this is because of the height that you have set for the dialog.

When you set the height of the dialog something wrong is happening inside the jQuery library.

How to fix this?

Need more? Leave comments and subscribe to my blog.

.