06 December 2012

Visual Studio 2012


Well, as everybody know Microsoft Visual Studio is an integrated development environment (IDE) from Microsoft.

I've started from using the Visual Studio 2003, this was many years ago and at that time it seemed amazing. But the technologies are developing very fast and we have to keep the pace together with it, by at least having the latest IDE.

At a first look at any new IDE it is hard to use it, and as I noticed - especially for Senior Developers with more than 5 years of experience. They seem very hard to be convince to use a new technology, application and IDE.

13 November 2012

HTML5: audio tag

Hello everybody,

We will discuss about the audio tag in this post.
This tag is available in HTML 5.
You can play an audio file right in browser, and you can do that without using flash.

A note that I did not find anywhere is that not all browsers support mp3 files and not all browsers support wav files. This is why you need to have both mp3 and wav files.

So a cross browser solution - that will work on IE, Chrome, Firefox and Safari will be something like this:

Orchard: Change Page Title


Here is how make so that you have a custom title for a custom page (View).

Open the View (.cshtml) file that you want with a custom title and add this code at the top of the file:

    Layout.Title = T("Custom Title | EXTREMEDEV").Text;

29 October 2012

Orchard: Change favicon


As you all probably know Orchard is a free, open source, community-focused project aimed at delivering applications and reusable components on the ASP.NET MVC platform.

So, now about the favicon, to change the default Orchard's favicon you need either to install the Favicon module, which I think is too complicated for this case, or to override the location of the favicon by overriding the default Document.cshtml template - just copy/paste to your theme.

You will find something like below in Document.cshtml:

RegisterLink(new LinkEntry {Type = "image/x-icon", Rel = "shortcut icon", Href = Url.Content("~/.../FavIcon.ico")});

Change the path of the href attribute to where your favicon is, and here it is you have your own favicon.

Happy coding!!!

21 May 2012

SSIS on SQL Server 2008 R2

Hi all,

These days I had a chance to take a look at SQL Server Integration Service 2008 R2 (SSIS) and do you know what? it is a really good thing when you need to Extract, Transform and Load (ETL) data from a DataBase to another.

However, unfortunately it is very buggy and is still like something that is not fully implemented, like not all the functionality was implemented till the end.
What I've found during several days of investigations on SSIS is:
1) it is very hard to maintain;

07 March 2012

Remove Skype haha foto virus / worm


Remember my post about Skype haha foto http://goo.gl/...?Facebook.com-IMG....JPG

After several days, I have found on the internet how to remove this worm.  Read below:

Try locate in processlist file called mdm.exe, and kill the process, Then download any startup program management utilities - for example Nirsoft Startup.cpl and look for "Windows Firevall engine" that references the "c:/windows/mdm.exe". Delete or disable those in startup and delete the file itself under c:/windows/mdm.exe

YouTube Service sent you a message: Your video has been approved


Here is an interesting email that is being sent to many people.

From: YouTube Service
To: someEmail@someDomain.com
Sent: Wednesday, March 7, 2012 11:56 AM
Subject: YouTube Service sent you a message: Your video has been approved

17 February 2012

Transaction count after EXECUTE indicates that a COMMIT or ROLLBACK TRAN is missing. Previous count = %ld, Current count = %ld

Such an error has appeared these days to me in SQL using SPROC in another SPROC where these are using transactions:

Msg 266, Level 16, State 2, Procedure SPROC_NAME2, Line 0
Transaction count after EXECUTE indicates that a COMMIT or ROLLBACK TRANSACTION statement is missing. Previous count = 1, current count = 2.

So what is that???
I will explain.

13 February 2012

Carousel with variable item-sizes

Carousel with variable item-sizes

I have implemented a Javascript / jQuery + CSS Carousel which is auto-scroll-able, but also has the possibility to manually scroll the items.

The biggest advantage of this carousel is that you can have items of different size and the carousel is not changing its size.

Here is the how you define the items that will be displayed in the Carousel:

<li><a href="#"><img src="./img/item5.png"></a></li>
<li><a href="#"><img src="./img/item3.png"></a></li>

To configure the speed of scrolling when auto-scrolling you need to amend this line of code:

12 February 2012

Skype haha foto http://goo.gl/...?Facebook.com-IMG....JPG

Many of my friends have sent me some "photos". Something like: haha foto http://goo.gl/...?Facebook.com-IMG....JPG

All these messages were sent through skype groups.
This of course is something like virus.

Because when you click on that link it is being opened in browser and there is no photo in it, however it looks like it is installing something on your computer and from now and on you are also sending group messages through skype :) with the message: haha foto http://goo.gl/...?Facebook.com-IMG....JPG

I very much believe that it's purpose is not only to send that link, but it should also do something in the background, I still don't know what, maybe some key logging of your credentials to email/skype/facebook and others.

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 OnlinePage 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

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:

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).

Need more? Leave comments and subscribe to my blog.